2 # From configure.in Revision: 1.82 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20210105.
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.20210105. Invocation command line was
836 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
837 uname -m = `(uname -m) 2>/dev/null || echo unknown`
838 uname -r = `(uname -r) 2>/dev/null || echo unknown`
839 uname -s = `(uname -s) 2>/dev/null || echo unknown`
840 uname -v = `(uname -v) 2>/dev/null || echo unknown`
842 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
843 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
845 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
846 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
847 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
848 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
849 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
850 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
851 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
865 # Keep a trace of the command line.
866 # Strip out --no-create and --no-recursion so they do not pile up.
867 # Also quote any args containing shell meta-characters.
873 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
874 | --no-cr | --no-c) ;;
875 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
876 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
877 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
878 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
879 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
881 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
884 # Get rid of the leading space.
887 # When interrupted or exit'd, cleanup temporary files, and complete
888 # config.log. We remove comments because anyway the quotes in there
889 # would cause problems or look ugly.
891 # Save into config.log some information that might help in debugging.
893 echo "## ----------------- ##" >&5
894 echo "## Cache variables. ##" >&5
895 echo "## ----------------- ##" >&5
897 # The following way of writing the cache mishandles newlines in values,
900 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
903 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
904 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
908 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
912 sed "/^$/d" confdefs.h >conftest.log
913 if test -s conftest.log; then
915 echo "## ------------ ##" >&5
916 echo "## confdefs.h. ##" >&5
917 echo "## ------------ ##" >&5
922 test "$ac_signal" != 0 &&
923 echo "$as_me: caught signal $ac_signal" >&5
924 echo "$as_me: exit $exit_status" >&5
925 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
928 for ac_signal in 1 2 13 15; do
929 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
933 # confdefs.h avoids OS command line length limits that DEFS can exceed.
934 rm -rf conftest* confdefs.h
935 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
938 # Let the site file select an alternate cache file if it wants to.
939 # Prefer explicitly selected file to automatically selected ones.
940 if test -z "$CONFIG_SITE"; then
941 if test "x$prefix" != xNONE; then
942 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
944 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
947 for ac_site_file in $CONFIG_SITE; do
948 if test -r "$ac_site_file"; then
949 { echo "$as_me:949: loading site script $ac_site_file" >&5
950 echo "$as_me: loading site script $ac_site_file" >&6;}
951 cat "$ac_site_file" >&5
956 if test -r "$cache_file"; then
957 # Some versions of bash will fail to source /dev/null (special
958 # files actually), so we avoid doing that.
959 if test -f "$cache_file"; then
960 { echo "$as_me:960: loading cache $cache_file" >&5
961 echo "$as_me: loading cache $cache_file" >&6;}
963 [\\/]* | ?:[\\/]* ) . $cache_file;;
968 { echo "$as_me:968: creating cache $cache_file" >&5
969 echo "$as_me: creating cache $cache_file" >&6;}
973 # Check that the precious variables saved in the cache have kept the same
975 ac_cache_corrupted=false
976 for ac_var in `(set) 2>&1 |
977 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
978 eval ac_old_set=\$ac_cv_env_${ac_var}_set
979 eval ac_new_set=\$ac_env_${ac_var}_set
980 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
981 eval ac_new_val="\$ac_env_${ac_var}_value"
982 case "$ac_old_set,$ac_new_set" in
984 { echo "$as_me:984: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
985 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
986 ac_cache_corrupted=: ;;
988 { echo "$as_me:988: error: \`$ac_var' was not set in the previous run" >&5
989 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
990 ac_cache_corrupted=: ;;
993 if test "x$ac_old_val" != "x$ac_new_val"; then
994 { echo "$as_me:994: error: \`$ac_var' has changed since the previous run:" >&5
995 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
996 { echo "$as_me:996: former value: $ac_old_val" >&5
997 echo "$as_me: former value: $ac_old_val" >&2;}
998 { echo "$as_me:998: current value: $ac_new_val" >&5
999 echo "$as_me: current value: $ac_new_val" >&2;}
1000 ac_cache_corrupted=:
1003 # Pass precious variables to config.status. It doesn't matter if
1004 # we pass some twice (in addition to the command line arguments).
1005 if test "$ac_new_set" = set; then
1006 case "$ac_new_val" in
1007 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1008 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1009 ac_configure_args="$ac_configure_args '$ac_arg'"
1011 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1016 if "$ac_cache_corrupted"; then
1017 { echo "$as_me:1017: error: changes in the environment can compromise the build" >&5
1018 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1019 { { echo "$as_me:1019: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1020 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1021 { (exit 1); exit 1; }; }
1025 ac_cpp='$CPP $CPPFLAGS'
1026 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1027 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1028 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1029 ac_main_return="return"
1031 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1033 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1045 echo "#! $SHELL" >conftest.sh
1046 echo "exit 0" >>conftest.sh
1047 chmod +x conftest.sh
1048 if { (echo "$as_me:1048: PATH=\".;.\"; conftest.sh") >&5
1049 (PATH=".;."; conftest.sh) 2>&5
1051 echo "$as_me:1051: \$? = $ac_status" >&5
1052 (exit "$ac_status"); }; then
1053 ac_path_separator=';'
1057 PATH_SEPARATOR="$ac_path_separator"
1060 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1065 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1066 if test -f "$ac_dir/install-sh"; then
1068 ac_install_sh="$ac_aux_dir/install-sh -c"
1070 elif test -f "$ac_dir/install.sh"; then
1072 ac_install_sh="$ac_aux_dir/install.sh -c"
1074 elif test -f "$ac_dir/shtool"; then
1076 ac_install_sh="$ac_aux_dir/shtool install -c"
1080 if test -z "$ac_aux_dir"; then
1081 { { echo "$as_me:1081: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1082 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1083 { (exit 1); exit 1; }; }
1085 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1086 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1087 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1089 # Make sure we can run config.sub.
1090 $ac_config_sub sun4 >/dev/null 2>&1 ||
1091 { { echo "$as_me:1091: error: cannot run $ac_config_sub" >&5
1092 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1093 { (exit 1); exit 1; }; }
1095 echo "$as_me:1095: checking build system type" >&5
1096 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1097 if test "${ac_cv_build+set}" = set; then
1098 echo $ECHO_N "(cached) $ECHO_C" >&6
1100 ac_cv_build_alias=$build_alias
1101 test -z "$ac_cv_build_alias" &&
1102 ac_cv_build_alias=`$ac_config_guess`
1103 test -z "$ac_cv_build_alias" &&
1104 { { echo "$as_me:1104: error: cannot guess build type; you must specify one" >&5
1105 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1106 { (exit 1); exit 1; }; }
1107 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1108 { { echo "$as_me:1108: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1109 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1110 { (exit 1); exit 1; }; }
1113 echo "$as_me:1113: result: $ac_cv_build" >&5
1114 echo "${ECHO_T}$ac_cv_build" >&6
1116 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1117 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1118 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1120 echo "$as_me:1120: checking host system type" >&5
1121 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1122 if test "${ac_cv_host+set}" = set; then
1123 echo $ECHO_N "(cached) $ECHO_C" >&6
1125 ac_cv_host_alias=$host_alias
1126 test -z "$ac_cv_host_alias" &&
1127 ac_cv_host_alias=$ac_cv_build_alias
1128 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1129 { { echo "$as_me:1129: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1130 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1131 { (exit 1); exit 1; }; }
1134 echo "$as_me:1134: result: $ac_cv_host" >&5
1135 echo "${ECHO_T}$ac_cv_host" >&6
1137 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1138 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1139 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1141 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1142 echo "$as_me:1142: checking target system type" >&5
1143 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1144 if test "${ac_cv_target+set}" = set; then
1145 echo $ECHO_N "(cached) $ECHO_C" >&6
1147 ac_cv_target_alias=$target_alias
1148 test "x$ac_cv_target_alias" = "x" &&
1149 ac_cv_target_alias=$ac_cv_host_alias
1150 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1151 { { echo "$as_me:1151: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1152 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1153 { (exit 1); exit 1; }; }
1156 echo "$as_me:1156: result: $ac_cv_target" >&5
1157 echo "${ECHO_T}$ac_cv_target" >&6
1158 target=$ac_cv_target
1159 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1160 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1161 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1163 # The aliases save the names the user supplied, while $host etc.
1164 # will get canonicalized.
1165 test -n "$target_alias" &&
1166 test "$program_prefix$program_suffix$program_transform_name" = \
1168 program_prefix=${target_alias}-
1169 system_name="$host_os"
1171 system_name="`(uname -s -r) 2>/dev/null`"
1172 if test -z "$system_name" ; then
1173 system_name="`(hostname) 2>/dev/null`"
1176 test -n "$system_name" &&
1177 cat >>confdefs.h <<EOF
1178 #define SYSTEM_NAME "$system_name"
1181 if test "${cf_cv_system_name+set}" = set; then
1182 echo $ECHO_N "(cached) $ECHO_C" >&6
1184 cf_cv_system_name="$system_name"
1187 test -z "$system_name" && system_name="$cf_cv_system_name"
1188 test -n "$cf_cv_system_name" && echo "$as_me:1188: result: Configuring for $cf_cv_system_name" >&5
1189 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1191 if test ".$system_name" != ".$cf_cv_system_name" ; then
1192 echo "$as_me:1192: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1193 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1194 { { echo "$as_me:1194: error: \"Please remove config.cache and try again.\"" >&5
1195 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1196 { (exit 1); exit 1; }; }
1199 # Check whether --with-system-type or --without-system-type was given.
1200 if test "${with_system_type+set}" = set; then
1201 withval="$with_system_type"
1202 { echo "$as_me:1202: WARNING: overriding system type to $withval" >&5
1203 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1204 cf_cv_system_name=$withval
1209 ### Save the given $CFLAGS to allow user-override.
1210 cf_user_CFLAGS="$CFLAGS"
1212 ### Default install-location
1213 for ac_prog in ggrep grep
1215 # Extract the first word of "$ac_prog", so it can be a program name with args.
1216 set dummy $ac_prog; ac_word=$2
1217 echo "$as_me:1217: checking for $ac_word" >&5
1218 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1219 if test "${ac_cv_prog_GREP+set}" = set; then
1220 echo $ECHO_N "(cached) $ECHO_C" >&6
1222 if test -n "$GREP"; then
1223 ac_cv_prog_GREP="$GREP" # Let the user override the test.
1225 ac_save_IFS=$IFS; IFS=$ac_path_separator
1227 for ac_dir in $ac_dummy; do
1229 test -z "$ac_dir" && ac_dir=.
1230 $as_executable_p "$ac_dir/$ac_word" || continue
1231 ac_cv_prog_GREP="$ac_prog"
1232 echo "$as_me:1232: found $ac_dir/$ac_word" >&5
1238 GREP=$ac_cv_prog_GREP
1239 if test -n "$GREP"; then
1240 echo "$as_me:1240: result: $GREP" >&5
1241 echo "${ECHO_T}$GREP" >&6
1243 echo "$as_me:1243: result: no" >&5
1244 echo "${ECHO_T}no" >&6
1247 test -n "$GREP" && break
1249 test -n "$GREP" || GREP=": "
1251 echo "$as_me:1251: checking for fgrep" >&5
1252 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1253 if test "${ac_cv_path_FGREP+set}" = set; then
1254 echo $ECHO_N "(cached) $ECHO_C" >&6
1256 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1257 then ac_cv_path_FGREP="$GREP -F"
1259 for ac_prog in gfgrep fgrep
1261 # Extract the first word of "$ac_prog", so it can be a program name with args.
1262 set dummy $ac_prog; ac_word=$2
1263 echo "$as_me:1263: checking for $ac_word" >&5
1264 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1265 if test "${ac_cv_path_FGREP+set}" = set; then
1266 echo $ECHO_N "(cached) $ECHO_C" >&6
1270 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1273 ac_save_IFS=$IFS; IFS=$ac_path_separator
1275 for ac_dir in $ac_dummy; do
1277 test -z "$ac_dir" && ac_dir=.
1278 if $as_executable_p "$ac_dir/$ac_word"; then
1279 ac_cv_path_FGREP="$ac_dir/$ac_word"
1280 echo "$as_me:1280: found $ac_dir/$ac_word" >&5
1288 FGREP=$ac_cv_path_FGREP
1290 if test -n "$FGREP"; then
1291 echo "$as_me:1291: result: $FGREP" >&5
1292 echo "${ECHO_T}$FGREP" >&6
1294 echo "$as_me:1294: result: no" >&5
1295 echo "${ECHO_T}no" >&6
1298 test -n "$FGREP" && break
1300 test -n "$FGREP" || FGREP=": "
1302 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1302: error: cannot find workable fgrep" >&5
1303 echo "$as_me: error: cannot find workable fgrep" >&2;}
1304 { (exit 1); exit 1; }; }
1307 echo "$as_me:1307: result: $ac_cv_path_FGREP" >&5
1308 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1309 FGREP="$ac_cv_path_FGREP"
1311 echo "$as_me:1311: checking for prefix" >&5
1312 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1313 if test "x$prefix" = "xNONE" ; then
1314 case "$cf_cv_system_name" in
1315 # non-vendor systems don't have a conflict
1316 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1319 (*) prefix=$ac_default_prefix
1323 echo "$as_me:1323: result: $prefix" >&5
1324 echo "${ECHO_T}$prefix" >&6
1326 if test "x$prefix" = "xNONE" ; then
1327 echo "$as_me:1327: checking for default include-directory" >&5
1328 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1329 test -n "$verbose" && echo 1>&6
1332 "$includedir/ncurses" \
1334 "$prefix/include/ncurses" \
1335 /usr/local/include \
1336 /usr/local/include/ncurses \
1338 /usr/include/ncurses
1340 cf_dir=`eval echo "$cf_symbol"`
1341 if test -f "$cf_dir/curses.h" ; then
1342 if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1343 includedir="$cf_symbol"
1344 test -n "$verbose" && echo $ECHO_N " found " 1>&6
1348 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1350 echo "$as_me:1350: result: $includedir" >&5
1351 echo "${ECHO_T}$includedir" >&6
1354 ### Checks for programs.
1357 ac_cpp='$CPP $CPPFLAGS'
1358 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1359 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1360 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1361 ac_main_return="return"
1362 if test -n "$ac_tool_prefix"; then
1363 for ac_prog in gnatgcc gcc cc
1365 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1366 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1367 echo "$as_me:1367: checking for $ac_word" >&5
1368 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1369 if test "${ac_cv_prog_CC+set}" = set; then
1370 echo $ECHO_N "(cached) $ECHO_C" >&6
1372 if test -n "$CC"; then
1373 ac_cv_prog_CC="$CC" # Let the user override the test.
1375 ac_save_IFS=$IFS; IFS=$ac_path_separator
1377 for ac_dir in $ac_dummy; do
1379 test -z "$ac_dir" && ac_dir=.
1380 $as_executable_p "$ac_dir/$ac_word" || continue
1381 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1382 echo "$as_me:1382: found $ac_dir/$ac_word" >&5
1389 if test -n "$CC"; then
1390 echo "$as_me:1390: result: $CC" >&5
1391 echo "${ECHO_T}$CC" >&6
1393 echo "$as_me:1393: result: no" >&5
1394 echo "${ECHO_T}no" >&6
1397 test -n "$CC" && break
1400 if test -z "$CC"; then
1402 for ac_prog in gnatgcc gcc cc
1404 # Extract the first word of "$ac_prog", so it can be a program name with args.
1405 set dummy $ac_prog; ac_word=$2
1406 echo "$as_me:1406: checking for $ac_word" >&5
1407 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1408 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1409 echo $ECHO_N "(cached) $ECHO_C" >&6
1411 if test -n "$ac_ct_CC"; then
1412 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1414 ac_save_IFS=$IFS; IFS=$ac_path_separator
1416 for ac_dir in $ac_dummy; do
1418 test -z "$ac_dir" && ac_dir=.
1419 $as_executable_p "$ac_dir/$ac_word" || continue
1420 ac_cv_prog_ac_ct_CC="$ac_prog"
1421 echo "$as_me:1421: found $ac_dir/$ac_word" >&5
1427 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1428 if test -n "$ac_ct_CC"; then
1429 echo "$as_me:1429: result: $ac_ct_CC" >&5
1430 echo "${ECHO_T}$ac_ct_CC" >&6
1432 echo "$as_me:1432: result: no" >&5
1433 echo "${ECHO_T}no" >&6
1436 test -n "$ac_ct_CC" && break
1442 test -z "$CC" && { { echo "$as_me:1442: error: no acceptable cc found in \$PATH" >&5
1443 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1444 { (exit 1); exit 1; }; }
1446 # Provide some information about the compiler.
1447 echo "$as_me:1447:" \
1448 "checking for C compiler version" >&5
1449 ac_compiler=`set X $ac_compile; echo "$2"`
1450 { (eval echo "$as_me:1450: \"$ac_compiler --version </dev/null >&5\"") >&5
1451 (eval $ac_compiler --version </dev/null >&5) 2>&5
1453 echo "$as_me:1453: \$? = $ac_status" >&5
1454 (exit "$ac_status"); }
1455 { (eval echo "$as_me:1455: \"$ac_compiler -v </dev/null >&5\"") >&5
1456 (eval $ac_compiler -v </dev/null >&5) 2>&5
1458 echo "$as_me:1458: \$? = $ac_status" >&5
1459 (exit "$ac_status"); }
1460 { (eval echo "$as_me:1460: \"$ac_compiler -V </dev/null >&5\"") >&5
1461 (eval $ac_compiler -V </dev/null >&5) 2>&5
1463 echo "$as_me:1463: \$? = $ac_status" >&5
1464 (exit "$ac_status"); }
1466 cat >"conftest.$ac_ext" <<_ACEOF
1467 #line 1467 "configure"
1468 #include "confdefs.h"
1478 ac_clean_files_save=$ac_clean_files
1479 ac_clean_files="$ac_clean_files a.out a.exe"
1480 # Try to create an executable without -o first, disregard a.out.
1481 # It will help us diagnose broken compilers, and finding out an intuition
1483 echo "$as_me:1483: checking for C compiler default output" >&5
1484 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1485 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1486 if { (eval echo "$as_me:1486: \"$ac_link_default\"") >&5
1487 (eval $ac_link_default) 2>&5
1489 echo "$as_me:1489: \$? = $ac_status" >&5
1490 (exit "$ac_status"); }; then
1491 # Find the output, starting from the most likely. This scheme is
1492 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1494 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1495 ls a.out conftest 2>/dev/null;
1496 ls a.* conftest.* 2>/dev/null`; do
1498 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1499 a.out ) # We found the default executable, but exeext='' is most
1502 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1503 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1510 echo "$as_me: failed program was:" >&5
1511 cat "conftest.$ac_ext" >&5
1512 { { echo "$as_me:1512: error: C compiler cannot create executables" >&5
1513 echo "$as_me: error: C compiler cannot create executables" >&2;}
1514 { (exit 77); exit 77; }; }
1517 ac_exeext=$ac_cv_exeext
1518 echo "$as_me:1518: result: $ac_file" >&5
1519 echo "${ECHO_T}$ac_file" >&6
1521 # Check the compiler produces executables we can run. If not, either
1522 # the compiler is broken, or we cross compile.
1523 echo "$as_me:1523: checking whether the C compiler works" >&5
1524 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1525 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1526 # If not cross compiling, check that we can run a simple program.
1527 if test "$cross_compiling" != yes; then
1528 if { ac_try='./$ac_file'
1529 { (eval echo "$as_me:1529: \"$ac_try\"") >&5
1532 echo "$as_me:1532: \$? = $ac_status" >&5
1533 (exit "$ac_status"); }; }; then
1536 if test "$cross_compiling" = maybe; then
1539 { { echo "$as_me:1539: error: cannot run C compiled programs.
1540 If you meant to cross compile, use \`--host'." >&5
1541 echo "$as_me: error: cannot run C compiled programs.
1542 If you meant to cross compile, use \`--host'." >&2;}
1543 { (exit 1); exit 1; }; }
1547 echo "$as_me:1547: result: yes" >&5
1548 echo "${ECHO_T}yes" >&6
1550 rm -f a.out a.exe "conftest$ac_cv_exeext"
1551 ac_clean_files=$ac_clean_files_save
1552 # Check the compiler produces executables we can run. If not, either
1553 # the compiler is broken, or we cross compile.
1554 echo "$as_me:1554: checking whether we are cross compiling" >&5
1555 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1556 echo "$as_me:1556: result: $cross_compiling" >&5
1557 echo "${ECHO_T}$cross_compiling" >&6
1559 echo "$as_me:1559: checking for executable suffix" >&5
1560 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1561 if { (eval echo "$as_me:1561: \"$ac_link\"") >&5
1562 (eval $ac_link) 2>&5
1564 echo "$as_me:1564: \$? = $ac_status" >&5
1565 (exit "$ac_status"); }; then
1566 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1567 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1568 # work properly (i.e., refer to `conftest.exe'), while it won't with
1570 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1572 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1573 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1580 { { echo "$as_me:1580: error: cannot compute EXEEXT: cannot compile and link" >&5
1581 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1582 { (exit 1); exit 1; }; }
1585 rm -f "conftest$ac_cv_exeext"
1586 echo "$as_me:1586: result: $ac_cv_exeext" >&5
1587 echo "${ECHO_T}$ac_cv_exeext" >&6
1589 rm -f "conftest.$ac_ext"
1590 EXEEXT=$ac_cv_exeext
1592 echo "$as_me:1592: checking for object suffix" >&5
1593 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1594 if test "${ac_cv_objext+set}" = set; then
1595 echo $ECHO_N "(cached) $ECHO_C" >&6
1597 cat >"conftest.$ac_ext" <<_ACEOF
1598 #line 1598 "configure"
1599 #include "confdefs.h"
1609 rm -f conftest.o conftest.obj
1610 if { (eval echo "$as_me:1610: \"$ac_compile\"") >&5
1611 (eval $ac_compile) 2>&5
1613 echo "$as_me:1613: \$? = $ac_status" >&5
1614 (exit "$ac_status"); }; then
1615 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1617 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1618 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1623 echo "$as_me: failed program was:" >&5
1624 cat "conftest.$ac_ext" >&5
1625 { { echo "$as_me:1625: error: cannot compute OBJEXT: cannot compile" >&5
1626 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1627 { (exit 1); exit 1; }; }
1630 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1632 echo "$as_me:1632: result: $ac_cv_objext" >&5
1633 echo "${ECHO_T}$ac_cv_objext" >&6
1634 OBJEXT=$ac_cv_objext
1636 echo "$as_me:1636: checking whether we are using the GNU C compiler" >&5
1637 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1638 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1639 echo $ECHO_N "(cached) $ECHO_C" >&6
1641 cat >"conftest.$ac_ext" <<_ACEOF
1642 #line 1642 "configure"
1643 #include "confdefs.h"
1656 rm -f "conftest.$ac_objext"
1657 if { (eval echo "$as_me:1657: \"$ac_compile\"") >&5
1658 (eval $ac_compile) 2>&5
1660 echo "$as_me:1660: \$? = $ac_status" >&5
1661 (exit "$ac_status"); } &&
1662 { ac_try='test -s "conftest.$ac_objext"'
1663 { (eval echo "$as_me:1663: \"$ac_try\"") >&5
1666 echo "$as_me:1666: \$? = $ac_status" >&5
1667 (exit "$ac_status"); }; }; then
1670 echo "$as_me: failed program was:" >&5
1671 cat "conftest.$ac_ext" >&5
1674 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1675 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1678 echo "$as_me:1678: result: $ac_cv_c_compiler_gnu" >&5
1679 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1680 GCC=`test $ac_compiler_gnu = yes && echo yes`
1681 ac_test_CFLAGS=${CFLAGS+set}
1682 ac_save_CFLAGS=$CFLAGS
1684 echo "$as_me:1684: checking whether $CC accepts -g" >&5
1685 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1686 if test "${ac_cv_prog_cc_g+set}" = set; then
1687 echo $ECHO_N "(cached) $ECHO_C" >&6
1689 cat >"conftest.$ac_ext" <<_ACEOF
1690 #line 1690 "configure"
1691 #include "confdefs.h"
1701 rm -f "conftest.$ac_objext"
1702 if { (eval echo "$as_me:1702: \"$ac_compile\"") >&5
1703 (eval $ac_compile) 2>&5
1705 echo "$as_me:1705: \$? = $ac_status" >&5
1706 (exit "$ac_status"); } &&
1707 { ac_try='test -s "conftest.$ac_objext"'
1708 { (eval echo "$as_me:1708: \"$ac_try\"") >&5
1711 echo "$as_me:1711: \$? = $ac_status" >&5
1712 (exit "$ac_status"); }; }; then
1715 echo "$as_me: failed program was:" >&5
1716 cat "conftest.$ac_ext" >&5
1719 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1721 echo "$as_me:1721: result: $ac_cv_prog_cc_g" >&5
1722 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1723 if test "$ac_test_CFLAGS" = set; then
1724 CFLAGS=$ac_save_CFLAGS
1725 elif test $ac_cv_prog_cc_g = yes; then
1726 if test "$GCC" = yes; then
1732 if test "$GCC" = yes; then
1738 # Some people use a C++ compiler to compile C. Since we use `exit',
1739 # in C++ we need to declare it. In case someone uses the same compiler
1740 # for both compiling C and C++ we need to have the C++ compiler decide
1741 # the declaration of exit, since it's the most demanding environment.
1742 cat >"conftest.$ac_ext" <<_ACEOF
1747 rm -f "conftest.$ac_objext"
1748 if { (eval echo "$as_me:1748: \"$ac_compile\"") >&5
1749 (eval $ac_compile) 2>&5
1751 echo "$as_me:1751: \$? = $ac_status" >&5
1752 (exit "$ac_status"); } &&
1753 { ac_try='test -s "conftest.$ac_objext"'
1754 { (eval echo "$as_me:1754: \"$ac_try\"") >&5
1757 echo "$as_me:1757: \$? = $ac_status" >&5
1758 (exit "$ac_status"); }; }; then
1759 for ac_declaration in \
1761 '#include <stdlib.h>' \
1762 'extern "C" void std::exit (int) throw (); using std::exit;' \
1763 'extern "C" void std::exit (int); using std::exit;' \
1764 'extern "C" void exit (int) throw ();' \
1765 'extern "C" void exit (int);' \
1768 cat >"conftest.$ac_ext" <<_ACEOF
1769 #line 1769 "configure"
1770 #include "confdefs.h"
1781 rm -f "conftest.$ac_objext"
1782 if { (eval echo "$as_me:1782: \"$ac_compile\"") >&5
1783 (eval $ac_compile) 2>&5
1785 echo "$as_me:1785: \$? = $ac_status" >&5
1786 (exit "$ac_status"); } &&
1787 { ac_try='test -s "conftest.$ac_objext"'
1788 { (eval echo "$as_me:1788: \"$ac_try\"") >&5
1791 echo "$as_me:1791: \$? = $ac_status" >&5
1792 (exit "$ac_status"); }; }; then
1795 echo "$as_me: failed program was:" >&5
1796 cat "conftest.$ac_ext" >&5
1799 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1800 cat >"conftest.$ac_ext" <<_ACEOF
1801 #line 1801 "configure"
1802 #include "confdefs.h"
1812 rm -f "conftest.$ac_objext"
1813 if { (eval echo "$as_me:1813: \"$ac_compile\"") >&5
1814 (eval $ac_compile) 2>&5
1816 echo "$as_me:1816: \$? = $ac_status" >&5
1817 (exit "$ac_status"); } &&
1818 { ac_try='test -s "conftest.$ac_objext"'
1819 { (eval echo "$as_me:1819: \"$ac_try\"") >&5
1822 echo "$as_me:1822: \$? = $ac_status" >&5
1823 (exit "$ac_status"); }; }; then
1826 echo "$as_me: failed program was:" >&5
1827 cat "conftest.$ac_ext" >&5
1829 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1832 if test -n "$ac_declaration"; then
1833 echo '#ifdef __cplusplus' >>confdefs.h
1834 echo "$ac_declaration" >>confdefs.h
1835 echo '#endif' >>confdefs.h
1839 echo "$as_me: failed program was:" >&5
1840 cat "conftest.$ac_ext" >&5
1842 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1844 ac_cpp='$CPP $CPPFLAGS'
1845 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1846 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1847 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1848 ac_main_return="return"
1851 if test "$GCC" = yes ; then
1852 echo "$as_me:1852: checking version of $CC" >&5
1853 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1854 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1855 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1856 echo "$as_me:1856: result: $GCC_VERSION" >&5
1857 echo "${ECHO_T}$GCC_VERSION" >&6
1862 if test "$GCC" = yes ; then
1865 echo "$as_me:1865: checking if this is really Intel C compiler" >&5
1866 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1867 cf_save_CFLAGS="$CFLAGS"
1868 CFLAGS="$CFLAGS -no-gcc"
1869 cat >"conftest.$ac_ext" <<_ACEOF
1870 #line 1870 "configure"
1871 #include "confdefs.h"
1877 #ifdef __INTEL_COMPILER
1886 rm -f "conftest.$ac_objext"
1887 if { (eval echo "$as_me:1887: \"$ac_compile\"") >&5
1888 (eval $ac_compile) 2>&5
1890 echo "$as_me:1890: \$? = $ac_status" >&5
1891 (exit "$ac_status"); } &&
1892 { ac_try='test -s "conftest.$ac_objext"'
1893 { (eval echo "$as_me:1893: \"$ac_try\"") >&5
1896 echo "$as_me:1896: \$? = $ac_status" >&5
1897 (exit "$ac_status"); }; }; then
1899 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1902 echo "$as_me: failed program was:" >&5
1903 cat "conftest.$ac_ext" >&5
1905 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1906 CFLAGS="$cf_save_CFLAGS"
1907 echo "$as_me:1907: result: $INTEL_COMPILER" >&5
1908 echo "${ECHO_T}$INTEL_COMPILER" >&6
1915 if test "$GCC" = yes ; then
1916 echo "$as_me:1916: checking if this is really Clang C compiler" >&5
1917 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1918 cf_save_CFLAGS="$CFLAGS"
1919 cat >"conftest.$ac_ext" <<_ACEOF
1920 #line 1920 "configure"
1921 #include "confdefs.h"
1936 rm -f "conftest.$ac_objext"
1937 if { (eval echo "$as_me:1937: \"$ac_compile\"") >&5
1938 (eval $ac_compile) 2>&5
1940 echo "$as_me:1940: \$? = $ac_status" >&5
1941 (exit "$ac_status"); } &&
1942 { ac_try='test -s "conftest.$ac_objext"'
1943 { (eval echo "$as_me:1943: \"$ac_try\"") >&5
1946 echo "$as_me:1946: \$? = $ac_status" >&5
1947 (exit "$ac_status"); }; }; then
1951 echo "$as_me: failed program was:" >&5
1952 cat "conftest.$ac_ext" >&5
1954 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1955 CFLAGS="$cf_save_CFLAGS"
1956 echo "$as_me:1956: result: $CLANG_COMPILER" >&5
1957 echo "${ECHO_T}$CLANG_COMPILER" >&6
1962 if test "x$CLANG_COMPILER" = "xyes" ; then
1964 (c[1-9][0-9]|*/c[1-9][0-9])
1965 { echo "$as_me:1965: WARNING: replacing broken compiler alias $CC" >&5
1966 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
1967 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
1972 echo "$as_me:1972: checking version of $CC" >&5
1973 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1974 CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1975 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
1976 echo "$as_me:1976: result: $CLANG_VERSION" >&5
1977 echo "${ECHO_T}$CLANG_VERSION" >&6
1979 for cf_clang_opt in \
1980 -Qunused-arguments \
1981 -Wno-error=implicit-function-declaration
1983 echo "$as_me:1983: checking if option $cf_clang_opt works" >&5
1984 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
1985 cf_save_CFLAGS="$CFLAGS"
1986 CFLAGS="$CFLAGS $cf_clang_opt"
1987 cat >"conftest.$ac_ext" <<_ACEOF
1988 #line 1988 "configure"
1989 #include "confdefs.h"
1996 printf("hello!\\n");
2001 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2002 if { (eval echo "$as_me:2002: \"$ac_link\"") >&5
2003 (eval $ac_link) 2>&5
2005 echo "$as_me:2005: \$? = $ac_status" >&5
2006 (exit "$ac_status"); } &&
2007 { ac_try='test -s "conftest$ac_exeext"'
2008 { (eval echo "$as_me:2008: \"$ac_try\"") >&5
2011 echo "$as_me:2011: \$? = $ac_status" >&5
2012 (exit "$ac_status"); }; }; then
2016 echo "$as_me: failed program was:" >&5
2017 cat "conftest.$ac_ext" >&5
2021 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2022 echo "$as_me:2022: result: $cf_clang_optok" >&5
2023 echo "${ECHO_T}$cf_clang_optok" >&6
2024 CFLAGS="$cf_save_CFLAGS"
2025 if test "$cf_clang_optok" = yes; then
2026 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2028 echo "${as_me:-configure}:2028: testing adding option $cf_clang_opt ..." 1>&5
2030 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2031 CFLAGS="${CFLAGS}$cf_clang_opt"
2037 echo "$as_me:2037: checking for $CC option to accept ANSI C" >&5
2038 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2039 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2040 echo $ECHO_N "(cached) $ECHO_C" >&6
2042 ac_cv_prog_cc_stdc=no
2044 cat >"conftest.$ac_ext" <<_ACEOF
2045 #line 2045 "configure"
2046 #include "confdefs.h"
2049 #include <sys/types.h>
2050 #include <sys/stat.h>
2051 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2052 struct buf { int x; };
2053 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2054 static char *e (p, i)
2060 static char *f (char * (*g) (char **, int), char **p, ...)
2065 s = g (p, va_arg (v,int));
2069 int test (int i, double x);
2070 struct s1 {int (*f) (int a);};
2071 struct s2 {int (*f) (double a);};
2072 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2078 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2083 # Don't try gcc -ansi; that turns off useful extensions and
2084 # breaks some systems' header files.
2085 # AIX -qlanglvl=ansi
2086 # Ultrix and OSF/1 -std1
2087 # HP-UX 10.20 and later -Ae
2088 # HP-UX older versions -Aa -D_HPUX_SOURCE
2089 # SVR4 -Xc -D__EXTENSIONS__
2090 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2092 CC="$ac_save_CC $ac_arg"
2093 rm -f "conftest.$ac_objext"
2094 if { (eval echo "$as_me:2094: \"$ac_compile\"") >&5
2095 (eval $ac_compile) 2>&5
2097 echo "$as_me:2097: \$? = $ac_status" >&5
2098 (exit "$ac_status"); } &&
2099 { ac_try='test -s "conftest.$ac_objext"'
2100 { (eval echo "$as_me:2100: \"$ac_try\"") >&5
2103 echo "$as_me:2103: \$? = $ac_status" >&5
2104 (exit "$ac_status"); }; }; then
2105 ac_cv_prog_cc_stdc=$ac_arg
2108 echo "$as_me: failed program was:" >&5
2109 cat "conftest.$ac_ext" >&5
2111 rm -f "conftest.$ac_objext"
2113 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2118 case "x$ac_cv_prog_cc_stdc" in
2120 echo "$as_me:2120: result: none needed" >&5
2121 echo "${ECHO_T}none needed" >&6 ;;
2123 echo "$as_me:2123: result: $ac_cv_prog_cc_stdc" >&5
2124 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2125 CC="$CC $ac_cv_prog_cc_stdc" ;;
2128 # This should have been defined by AC_PROG_CC
2131 echo "$as_me:2131: checking \$CFLAGS variable" >&5
2132 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2135 echo "$as_me:2135: result: broken" >&5
2136 echo "${ECHO_T}broken" >&6
2137 { echo "$as_me:2137: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2138 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2141 for cf_arg in $cf_flags
2147 cf_new_extra_cppflags=
2149 for cf_add_cflags in $cf_arg
2151 case "$cf_fix_cppflags" in
2153 case "$cf_add_cflags" in
2154 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2155 case "$cf_add_cflags" in
2157 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2159 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2160 && test -z "${cf_tst_cflags}" \
2161 && cf_fix_cppflags=yes
2163 if test "$cf_fix_cppflags" = yes ; then
2165 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2166 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2169 elif test "${cf_tst_cflags}" = "\"'" ; then
2171 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2172 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2182 case "$cf_add_cflags" in
2184 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2186 CPPFLAGS=`echo "$CPPFLAGS" | \
2187 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2188 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2193 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2194 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2201 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2202 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2209 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2210 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2212 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2214 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2215 && test -z "${cf_tst_cflags}" \
2216 && cf_fix_cppflags=no
2221 if test -n "$cf_new_cflags" ; then
2223 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2224 CFLAGS="${CFLAGS}$cf_new_cflags"
2228 if test -n "$cf_new_cppflags" ; then
2230 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2231 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2235 if test -n "$cf_new_extra_cppflags" ; then
2237 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2238 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2245 echo "$as_me:2245: result: ok" >&5
2246 echo "${ECHO_T}ok" >&6
2250 echo "$as_me:2250: checking \$CC variable" >&5
2251 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2254 echo "$as_me:2254: result: broken" >&5
2255 echo "${ECHO_T}broken" >&6
2256 { echo "$as_me:2256: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2257 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2259 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2260 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2262 for cf_arg in $cf_flags
2270 cf_new_extra_cppflags=
2272 for cf_add_cflags in $cf_arg
2274 case "$cf_fix_cppflags" in
2276 case "$cf_add_cflags" in
2277 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2278 case "$cf_add_cflags" in
2280 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2282 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2283 && test -z "${cf_tst_cflags}" \
2284 && cf_fix_cppflags=yes
2286 if test "$cf_fix_cppflags" = yes ; then
2288 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2289 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2292 elif test "${cf_tst_cflags}" = "\"'" ; then
2294 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2295 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2305 case "$cf_add_cflags" in
2307 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2309 CPPFLAGS=`echo "$CPPFLAGS" | \
2310 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2311 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2316 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2317 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2324 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2325 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2332 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2333 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2335 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2337 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2338 && test -z "${cf_tst_cflags}" \
2339 && cf_fix_cppflags=no
2344 if test -n "$cf_new_cflags" ; then
2346 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2347 CFLAGS="${CFLAGS}$cf_new_cflags"
2351 if test -n "$cf_new_cppflags" ; then
2353 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2354 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2358 if test -n "$cf_new_extra_cppflags" ; then
2360 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2361 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2371 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2373 echo "${as_me:-configure}:2373: testing resulting CC: '$CC' ..." 1>&5
2375 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2377 echo "${as_me:-configure}:2377: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2379 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2381 echo "${as_me:-configure}:2381: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2385 echo "$as_me:2385: result: ok" >&5
2386 echo "${ECHO_T}ok" >&6
2390 echo "$as_me:2390: checking for egrep" >&5
2391 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2392 if test "${ac_cv_path_EGREP+set}" = set; then
2393 echo $ECHO_N "(cached) $ECHO_C" >&6
2395 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2396 then ac_cv_path_EGREP="$GREP -E"
2398 for ac_prog in gegrep egrep
2400 # Extract the first word of "$ac_prog", so it can be a program name with args.
2401 set dummy $ac_prog; ac_word=$2
2402 echo "$as_me:2402: checking for $ac_word" >&5
2403 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2404 if test "${ac_cv_path_EGREP+set}" = set; then
2405 echo $ECHO_N "(cached) $ECHO_C" >&6
2409 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2412 ac_save_IFS=$IFS; IFS=$ac_path_separator
2414 for ac_dir in $ac_dummy; do
2416 test -z "$ac_dir" && ac_dir=.
2417 if $as_executable_p "$ac_dir/$ac_word"; then
2418 ac_cv_path_EGREP="$ac_dir/$ac_word"
2419 echo "$as_me:2419: found $ac_dir/$ac_word" >&5
2427 EGREP=$ac_cv_path_EGREP
2429 if test -n "$EGREP"; then
2430 echo "$as_me:2430: result: $EGREP" >&5
2431 echo "${ECHO_T}$EGREP" >&6
2433 echo "$as_me:2433: result: no" >&5
2434 echo "${ECHO_T}no" >&6
2437 test -n "$EGREP" && break
2439 test -n "$EGREP" || EGREP=": "
2441 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2441: error: cannot find workable egrep" >&5
2442 echo "$as_me: error: cannot find workable egrep" >&2;}
2443 { (exit 1); exit 1; }; }
2446 echo "$as_me:2446: result: $ac_cv_path_EGREP" >&5
2447 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2448 EGREP="$ac_cv_path_EGREP"
2451 ac_cpp='$CPP $CPPFLAGS'
2452 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2453 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2454 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2455 ac_main_return="return"
2456 echo "$as_me:2456: checking how to run the C preprocessor" >&5
2457 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2458 # On Suns, sometimes $CPP names a directory.
2459 if test -n "$CPP" && test -d "$CPP"; then
2462 if test -z "$CPP"; then
2463 if test "${ac_cv_prog_CPP+set}" = set; then
2464 echo $ECHO_N "(cached) $ECHO_C" >&6
2466 # Double quotes because CPP needs to be expanded
2467 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2470 for ac_c_preproc_warn_flag in '' yes
2472 # Use a header file that comes with gcc, so configuring glibc
2473 # with a fresh cross-compiler works.
2474 # On the NeXT, cc -E runs the code through the compiler's parser,
2475 # not just through cpp. "Syntax error" is here to catch this case.
2476 cat >"conftest.$ac_ext" <<_ACEOF
2477 #line 2477 "configure"
2478 #include "confdefs.h"
2482 if { (eval echo "$as_me:2482: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2483 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2485 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2487 cat conftest.err >&5
2488 echo "$as_me:2488: \$? = $ac_status" >&5
2489 (exit "$ac_status"); } >/dev/null; then
2490 if test -s conftest.err; then
2491 ac_cpp_err=$ac_c_preproc_warn_flag
2498 if test -z "$ac_cpp_err"; then
2501 echo "$as_me: failed program was:" >&5
2502 cat "conftest.$ac_ext" >&5
2503 # Broken: fails on valid input.
2506 rm -f conftest.err "conftest.$ac_ext"
2508 # OK, works on sane cases. Now check whether non-existent headers
2509 # can be detected and how.
2510 cat >"conftest.$ac_ext" <<_ACEOF
2511 #line 2511 "configure"
2512 #include "confdefs.h"
2513 #include <ac_nonexistent.h>
2515 if { (eval echo "$as_me:2515: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2516 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2518 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2520 cat conftest.err >&5
2521 echo "$as_me:2521: \$? = $ac_status" >&5
2522 (exit "$ac_status"); } >/dev/null; then
2523 if test -s conftest.err; then
2524 ac_cpp_err=$ac_c_preproc_warn_flag
2531 if test -z "$ac_cpp_err"; then
2532 # Broken: success on invalid input.
2535 echo "$as_me: failed program was:" >&5
2536 cat "conftest.$ac_ext" >&5
2537 # Passes both tests.
2541 rm -f conftest.err "conftest.$ac_ext"
2544 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2545 rm -f conftest.err "conftest.$ac_ext"
2546 if $ac_preproc_ok; then
2558 echo "$as_me:2558: result: $CPP" >&5
2559 echo "${ECHO_T}$CPP" >&6
2561 for ac_c_preproc_warn_flag in '' yes
2563 # Use a header file that comes with gcc, so configuring glibc
2564 # with a fresh cross-compiler works.
2565 # On the NeXT, cc -E runs the code through the compiler's parser,
2566 # not just through cpp. "Syntax error" is here to catch this case.
2567 cat >"conftest.$ac_ext" <<_ACEOF
2568 #line 2568 "configure"
2569 #include "confdefs.h"
2573 if { (eval echo "$as_me:2573: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2574 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2576 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2578 cat conftest.err >&5
2579 echo "$as_me:2579: \$? = $ac_status" >&5
2580 (exit "$ac_status"); } >/dev/null; then
2581 if test -s conftest.err; then
2582 ac_cpp_err=$ac_c_preproc_warn_flag
2589 if test -z "$ac_cpp_err"; then
2592 echo "$as_me: failed program was:" >&5
2593 cat "conftest.$ac_ext" >&5
2594 # Broken: fails on valid input.
2597 rm -f conftest.err "conftest.$ac_ext"
2599 # OK, works on sane cases. Now check whether non-existent headers
2600 # can be detected and how.
2601 cat >"conftest.$ac_ext" <<_ACEOF
2602 #line 2602 "configure"
2603 #include "confdefs.h"
2604 #include <ac_nonexistent.h>
2606 if { (eval echo "$as_me:2606: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2607 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2609 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2611 cat conftest.err >&5
2612 echo "$as_me:2612: \$? = $ac_status" >&5
2613 (exit "$ac_status"); } >/dev/null; then
2614 if test -s conftest.err; then
2615 ac_cpp_err=$ac_c_preproc_warn_flag
2622 if test -z "$ac_cpp_err"; then
2623 # Broken: success on invalid input.
2626 echo "$as_me: failed program was:" >&5
2627 cat "conftest.$ac_ext" >&5
2628 # Passes both tests.
2632 rm -f conftest.err "conftest.$ac_ext"
2635 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2636 rm -f conftest.err "conftest.$ac_ext"
2637 if $ac_preproc_ok; then
2640 { { echo "$as_me:2640: error: C preprocessor \"$CPP\" fails sanity check" >&5
2641 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2642 { (exit 1); exit 1; }; }
2646 ac_cpp='$CPP $CPPFLAGS'
2647 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2648 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2649 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2650 ac_main_return="return"
2652 if test $ac_cv_c_compiler_gnu = yes; then
2653 echo "$as_me:2653: checking whether $CC needs -traditional" >&5
2654 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2655 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2656 echo $ECHO_N "(cached) $ECHO_C" >&6
2658 ac_pattern="Autoconf.*'x'"
2659 cat >"conftest.$ac_ext" <<_ACEOF
2660 #line 2660 "configure"
2661 #include "confdefs.h"
2663 int Autoconf = TIOCGETP;
2665 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2666 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2667 ac_cv_prog_gcc_traditional=yes
2669 ac_cv_prog_gcc_traditional=no
2673 if test $ac_cv_prog_gcc_traditional = no; then
2674 cat >"conftest.$ac_ext" <<_ACEOF
2675 #line 2675 "configure"
2676 #include "confdefs.h"
2678 int Autoconf = TCGETA;
2680 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2681 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2682 ac_cv_prog_gcc_traditional=yes
2688 echo "$as_me:2688: result: $ac_cv_prog_gcc_traditional" >&5
2689 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2690 if test $ac_cv_prog_gcc_traditional = yes; then
2691 CC="$CC -traditional"
2695 echo "$as_me:2695: checking whether $CC understands -c and -o together" >&5
2696 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2697 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2698 echo $ECHO_N "(cached) $ECHO_C" >&6
2701 cat > conftest.$ac_ext <<CF_EOF
2704 ${cf_cv_main_return:-return}(0);
2707 # We do the test twice because some compilers refuse to overwrite an
2708 # existing .o file with -o, though they will create one.
2709 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2710 if { (eval echo "$as_me:2710: \"$ac_try\"") >&5
2713 echo "$as_me:2713: \$? = $ac_status" >&5
2714 (exit "$ac_status"); } &&
2715 test -f conftest2.$ac_objext && { (eval echo "$as_me:2715: \"$ac_try\"") >&5
2718 echo "$as_me:2718: \$? = $ac_status" >&5
2719 (exit "$ac_status"); };
2721 eval cf_cv_prog_CC_c_o=yes
2723 eval cf_cv_prog_CC_c_o=no
2728 if test "$cf_cv_prog_CC_c_o" = yes; then
2729 echo "$as_me:2729: result: yes" >&5
2730 echo "${ECHO_T}yes" >&6
2732 echo "$as_me:2732: result: no" >&5
2733 echo "${ECHO_T}no" >&6
2736 test "$program_prefix" != NONE &&
2737 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2738 # Use a double $ so make ignores it.
2739 test "$program_suffix" != NONE &&
2740 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2741 # Double any \ or $. echo might interpret backslashes.
2742 # By default was `s,x,x', remove it if useless.
2743 cat <<\_ACEOF >conftest.sed
2744 s/[\\$]/&&/g;s/;s,x,x,$//
2746 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2749 for ac_prog in mawk gawk nawk awk
2751 # Extract the first word of "$ac_prog", so it can be a program name with args.
2752 set dummy $ac_prog; ac_word=$2
2753 echo "$as_me:2753: checking for $ac_word" >&5
2754 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2755 if test "${ac_cv_prog_AWK+set}" = set; then
2756 echo $ECHO_N "(cached) $ECHO_C" >&6
2758 if test -n "$AWK"; then
2759 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2761 ac_save_IFS=$IFS; IFS=$ac_path_separator
2763 for ac_dir in $ac_dummy; do
2765 test -z "$ac_dir" && ac_dir=.
2766 $as_executable_p "$ac_dir/$ac_word" || continue
2767 ac_cv_prog_AWK="$ac_prog"
2768 echo "$as_me:2768: found $ac_dir/$ac_word" >&5
2775 if test -n "$AWK"; then
2776 echo "$as_me:2776: result: $AWK" >&5
2777 echo "${ECHO_T}$AWK" >&6
2779 echo "$as_me:2779: result: no" >&5
2780 echo "${ECHO_T}no" >&6
2783 test -n "$AWK" && break
2786 test -z "$AWK" && { { echo "$as_me:2786: error: No awk program found" >&5
2787 echo "$as_me: error: No awk program found" >&2;}
2788 { (exit 1); exit 1; }; }
2790 echo "$as_me:2790: checking for egrep" >&5
2791 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2792 if test "${ac_cv_prog_egrep+set}" = set; then
2793 echo $ECHO_N "(cached) $ECHO_C" >&6
2795 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2796 then ac_cv_prog_egrep='grep -E'
2797 else ac_cv_prog_egrep='egrep'
2800 echo "$as_me:2800: result: $ac_cv_prog_egrep" >&5
2801 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2802 EGREP=$ac_cv_prog_egrep
2804 test -z "$EGREP" && { { echo "$as_me:2804: error: No egrep program found" >&5
2805 echo "$as_me: error: No egrep program found" >&2;}
2806 { (exit 1); exit 1; }; }
2808 # Find a good install program. We prefer a C program (faster),
2809 # so one script is as good as another. But avoid the broken or
2810 # incompatible versions:
2811 # SysV /etc/install, /usr/sbin/install
2812 # SunOS /usr/etc/install
2813 # IRIX /sbin/install
2815 # AmigaOS /C/install, which installs bootblocks on floppy discs
2816 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2817 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2818 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2819 # ./install, which can be erroneously created by make from ./install.sh.
2820 echo "$as_me:2820: checking for a BSD compatible install" >&5
2821 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2822 if test -z "$INSTALL"; then
2823 if test "${ac_cv_path_install+set}" = set; then
2824 echo $ECHO_N "(cached) $ECHO_C" >&6
2826 ac_save_IFS=$IFS; IFS=$ac_path_separator
2827 for ac_dir in $PATH; do
2829 # Account for people who put trailing slashes in PATH elements.
2831 / | ./ | .// | /cC/* \
2832 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2835 # OSF1 and SCO ODT 3.0 have their own names for install.
2836 # Don't use installbsd from OSF since it installs stuff as root
2838 for ac_prog in ginstall scoinst install; do
2839 if $as_executable_p "$ac_dir/$ac_prog"; then
2840 if test $ac_prog = install &&
2841 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2842 # AIX install. It has an incompatible calling convention.
2844 elif test $ac_prog = install &&
2845 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2846 # program-specific install script used by HP pwplus--don't use.
2849 ac_cv_path_install="$ac_dir/$ac_prog -c"
2859 if test "${ac_cv_path_install+set}" = set; then
2860 INSTALL=$ac_cv_path_install
2862 # As a last resort, use the slow shell script. We don't cache a
2863 # path for INSTALL within a source directory, because that will
2864 # break other packages using the cache if that directory is
2865 # removed, or if the path is relative.
2866 INSTALL=$ac_install_sh
2869 echo "$as_me:2869: result: $INSTALL" >&5
2870 echo "${ECHO_T}$INSTALL" >&6
2872 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2873 # It thinks the first close brace ends the variable substitution.
2874 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2876 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2878 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2880 echo "$as_me:2880: checking whether ln -s works" >&5
2881 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2883 if test "$LN_S" = "ln -s"; then
2884 echo "$as_me:2884: result: yes" >&5
2885 echo "${ECHO_T}yes" >&6
2887 echo "$as_me:2887: result: no, using $LN_S" >&5
2888 echo "${ECHO_T}no, using $LN_S" >&6
2891 echo "$as_me:2891: checking if $LN_S -f options work" >&5
2892 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2894 rm -f conf$$.src conf$$dst
2896 echo first >conf$$.src
2897 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2902 rm -f conf$$.dst conf$$src
2903 echo "$as_me:2903: result: $cf_prog_ln_sf" >&5
2904 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2906 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2908 # Find a good install program. We prefer a C program (faster),
2909 # so one script is as good as another. But avoid the broken or
2910 # incompatible versions:
2911 # SysV /etc/install, /usr/sbin/install
2912 # SunOS /usr/etc/install
2913 # IRIX /sbin/install
2915 # AmigaOS /C/install, which installs bootblocks on floppy discs
2916 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2917 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2918 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2919 # ./install, which can be erroneously created by make from ./install.sh.
2920 echo "$as_me:2920: checking for a BSD compatible install" >&5
2921 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2922 if test -z "$INSTALL"; then
2923 if test "${ac_cv_path_install+set}" = set; then
2924 echo $ECHO_N "(cached) $ECHO_C" >&6
2926 ac_save_IFS=$IFS; IFS=$ac_path_separator
2927 for ac_dir in $PATH; do
2929 # Account for people who put trailing slashes in PATH elements.
2931 / | ./ | .// | /cC/* \
2932 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2935 # OSF1 and SCO ODT 3.0 have their own names for install.
2936 # Don't use installbsd from OSF since it installs stuff as root
2938 for ac_prog in ginstall scoinst install; do
2939 if $as_executable_p "$ac_dir/$ac_prog"; then
2940 if test $ac_prog = install &&
2941 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2942 # AIX install. It has an incompatible calling convention.
2944 elif test $ac_prog = install &&
2945 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2946 # program-specific install script used by HP pwplus--don't use.
2949 ac_cv_path_install="$ac_dir/$ac_prog -c"
2959 if test "${ac_cv_path_install+set}" = set; then
2960 INSTALL=$ac_cv_path_install
2962 # As a last resort, use the slow shell script. We don't cache a
2963 # path for INSTALL within a source directory, because that will
2964 # break other packages using the cache if that directory is
2965 # removed, or if the path is relative.
2966 INSTALL=$ac_install_sh
2969 echo "$as_me:2969: result: $INSTALL" >&5
2970 echo "${ECHO_T}$INSTALL" >&6
2972 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2973 # It thinks the first close brace ends the variable substitution.
2974 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2976 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2978 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2984 cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
2985 test -z "$cf_dir" && cf_dir=.
2986 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
2990 echo "$as_me:2990: checking if you want to install stripped executables" >&5
2991 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2993 # Check whether --enable-stripping or --disable-stripping was given.
2994 if test "${enable_stripping+set}" = set; then
2995 enableval="$enable_stripping"
2996 test "$enableval" != no && enableval=yes
2997 if test "$enableval" != "yes" ; then
3000 enable_stripping=yes
3004 enable_stripping=yes
3007 echo "$as_me:3007: result: $enable_stripping" >&5
3008 echo "${ECHO_T}$enable_stripping" >&6
3010 if test "$enable_stripping" = yes
3017 : "${INSTALL:=install}"
3018 echo "$as_me:3018: checking if install accepts -p option" >&5
3019 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
3020 if test "${cf_cv_install_p+set}" = set; then
3021 echo $ECHO_N "(cached) $ECHO_C" >&6
3028 if $INSTALL -p conftest.in conftest.out 2>/dev/null
3030 if test -f conftest.out/conftest.in
3032 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
3033 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
3034 if test -s conftest.err
3049 echo "$as_me:3049: result: $cf_cv_install_p" >&5
3050 echo "${ECHO_T}$cf_cv_install_p" >&6
3052 echo "$as_me:3052: checking if install needs to be told about ownership" >&5
3053 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
3054 case `$ac_config_guess` in
3063 echo "$as_me:3063: result: $with_install_o" >&5
3064 echo "${ECHO_T}$with_install_o" >&6
3065 if test "x$with_install_o" = xyes
3067 INSTALL_OPT_O="`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`"
3072 echo "$as_me:3072: checking for long file names" >&5
3073 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3074 if test "${ac_cv_sys_long_file_names+set}" = set; then
3075 echo $ECHO_N "(cached) $ECHO_C" >&6
3077 ac_cv_sys_long_file_names=yes
3078 # Test for long file names in all the places we know might matter:
3079 # . the current directory, where building will happen
3080 # $prefix/lib where we will be installing things
3081 # $exec_prefix/lib likewise
3082 # eval it to expand exec_prefix.
3083 # $TMPDIR if set, where it might want to write temporary files
3084 # if $TMPDIR is not set:
3085 # /tmp where it might want to write temporary files
3088 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3091 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3093 for ac_dir in . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3094 test -d "$ac_dir" || continue
3095 test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3096 ac_xdir=$ac_dir/cf$$
3097 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3098 ac_tf1=$ac_xdir/conftest9012345
3099 ac_tf2=$ac_xdir/conftest9012346
3100 (echo 1 >"$ac_tf1") 2>/dev/null
3101 (echo 2 >"$ac_tf2") 2>/dev/null
3102 ac_val=`cat "$ac_tf1" 2>/dev/null`
3103 if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3104 ac_cv_sys_long_file_names=no
3105 rm -rf "$ac_xdir" 2>/dev/null
3108 rm -rf "$ac_xdir" 2>/dev/null
3111 echo "$as_me:3111: result: $ac_cv_sys_long_file_names" >&5
3112 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3113 if test "$ac_cv_sys_long_file_names" = yes; then
3115 cat >>confdefs.h <<\EOF
3116 #define HAVE_LONG_FILE_NAMES 1
3121 # if we find pkg-config, check if we should install the ".pc" files.
3123 echo "$as_me:3123: checking if you want to use pkg-config" >&5
3124 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3126 # Check whether --with-pkg-config or --without-pkg-config was given.
3127 if test "${with_pkg_config+set}" = set; then
3128 withval="$with_pkg_config"
3129 cf_pkg_config=$withval
3133 echo "$as_me:3133: result: $cf_pkg_config" >&5
3134 echo "${ECHO_T}$cf_pkg_config" >&6
3136 case "$cf_pkg_config" in
3142 if test -n "$ac_tool_prefix"; then
3143 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3144 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3145 echo "$as_me:3145: checking for $ac_word" >&5
3146 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3147 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3148 echo $ECHO_N "(cached) $ECHO_C" >&6
3152 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3155 ac_save_IFS=$IFS; IFS=$ac_path_separator
3157 for ac_dir in $ac_dummy; do
3159 test -z "$ac_dir" && ac_dir=.
3160 if $as_executable_p "$ac_dir/$ac_word"; then
3161 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3162 echo "$as_me:3162: found $ac_dir/$ac_word" >&5
3170 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3172 if test -n "$PKG_CONFIG"; then
3173 echo "$as_me:3173: result: $PKG_CONFIG" >&5
3174 echo "${ECHO_T}$PKG_CONFIG" >&6
3176 echo "$as_me:3176: result: no" >&5
3177 echo "${ECHO_T}no" >&6
3181 if test -z "$ac_cv_path_PKG_CONFIG"; then
3182 ac_pt_PKG_CONFIG=$PKG_CONFIG
3183 # Extract the first word of "pkg-config", so it can be a program name with args.
3184 set dummy pkg-config; ac_word=$2
3185 echo "$as_me:3185: checking for $ac_word" >&5
3186 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3187 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3188 echo $ECHO_N "(cached) $ECHO_C" >&6
3190 case $ac_pt_PKG_CONFIG in
3192 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3195 ac_save_IFS=$IFS; IFS=$ac_path_separator
3197 for ac_dir in $ac_dummy; do
3199 test -z "$ac_dir" && ac_dir=.
3200 if $as_executable_p "$ac_dir/$ac_word"; then
3201 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3202 echo "$as_me:3202: found $ac_dir/$ac_word" >&5
3207 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3211 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3213 if test -n "$ac_pt_PKG_CONFIG"; then
3214 echo "$as_me:3214: result: $ac_pt_PKG_CONFIG" >&5
3215 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3217 echo "$as_me:3217: result: no" >&5
3218 echo "${ECHO_T}no" >&6
3221 PKG_CONFIG=$ac_pt_PKG_CONFIG
3223 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3232 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3233 if test "$PKG_CONFIG" != none ; then
3235 if test "x$prefix" != xNONE; then
3236 cf_path_syntax="$prefix"
3238 cf_path_syntax="$ac_default_prefix"
3241 case ".$PKG_CONFIG" in
3246 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3248 (.\$\{*prefix\}*|.\$\{*dir\}*)
3249 eval PKG_CONFIG="$PKG_CONFIG"
3250 case ".$PKG_CONFIG" in
3252 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3257 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3260 { { echo "$as_me:3260: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3261 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3262 { (exit 1); exit 1; }; }
3266 elif test "x$cf_pkg_config" != xno ; then
3267 { echo "$as_me:3267: WARNING: pkg-config is not installed" >&5
3268 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3271 case "$PKG_CONFIG" in
3273 echo "$as_me:3273: checking for pkg-config library directory" >&5
3274 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3277 echo "$as_me:3277: checking for $PKG_CONFIG library directory" >&5
3278 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3282 PKG_CONFIG_LIBDIR=no
3284 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3285 if test "${with_pkg_config_libdir+set}" = set; then
3286 withval="$with_pkg_config_libdir"
3287 PKG_CONFIG_LIBDIR=$withval
3289 test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3292 case x$PKG_CONFIG_LIBDIR in
3296 # Look for the library directory using the same prefix as the executable
3297 if test "x$PKG_CONFIG" = xnone
3301 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3304 # If you don't like using the default architecture, you have to specify the
3305 # intended library directory and corresponding compiler/linker options.
3307 # This case allows for Debian's 2014-flavor of multiarch, along with the
3308 # most common variations before that point. Some other variants spell the
3309 # directory differently, e.g., "pkg-config", and put it in unusual places.
3310 # pkg-config has always been poorly standardized, which is ironic...
3311 case x`(arch) 2>/dev/null` in
3314 $cf_path/lib/*64-linux-gnu \
3322 $cf_path/lib/*-linux-gnu \
3330 test -n "$verbose" && echo " list..." 1>&6
3332 echo "${as_me:-configure}:3332: testing list... ..." 1>&5
3334 for cf_config in $cf_search_path
3336 test -n "$verbose" && echo " checking $cf_config/pkgconfig" 1>&6
3338 echo "${as_me:-configure}:3338: testing checking $cf_config/pkgconfig ..." 1>&5
3340 if test -d "$cf_config/pkgconfig"
3342 PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3343 echo "$as_me:3343: checking done" >&5
3344 echo $ECHO_N "checking done... $ECHO_C" >&6
3353 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3354 echo "$as_me:3354: result: $PKG_CONFIG_LIBDIR" >&5
3355 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3358 echo "$as_me:3358: checking if you want to build test-programs" >&5
3359 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3361 # Check whether --with-tests or --without-tests was given.
3362 if test "${with_tests+set}" = set; then
3363 withval="$with_tests"
3364 cf_with_tests=$withval
3368 echo "$as_me:3368: result: $cf_with_tests" >&5
3369 echo "${ECHO_T}$cf_with_tests" >&6
3371 echo "$as_me:3371: checking if we should assume mixed-case filenames" >&5
3372 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3374 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3375 if test "${enable_mixed_case+set}" = set; then
3376 enableval="$enable_mixed_case"
3377 enable_mixedcase=$enableval
3379 enable_mixedcase=auto
3381 echo "$as_me:3381: result: $enable_mixedcase" >&5
3382 echo "${ECHO_T}$enable_mixedcase" >&6
3383 if test "$enable_mixedcase" = "auto" ; then
3385 echo "$as_me:3385: checking if filesystem supports mixed-case filenames" >&5
3386 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3387 if test "${cf_cv_mixedcase+set}" = set; then
3388 echo $ECHO_N "(cached) $ECHO_C" >&6
3391 if test "$cross_compiling" = yes ; then
3392 case "$target_alias" in
3393 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3401 rm -f conftest CONFTEST
3403 if test -f CONFTEST ; then
3408 rm -f conftest CONFTEST
3412 echo "$as_me:3412: result: $cf_cv_mixedcase" >&5
3413 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3414 test "$cf_cv_mixedcase" = yes &&
3415 cat >>confdefs.h <<\EOF
3416 #define MIXEDCASE_FILENAMES 1
3420 cf_cv_mixedcase=$enable_mixedcase
3421 if test "$enable_mixedcase" = "yes" ; then
3422 cat >>confdefs.h <<\EOF
3423 #define MIXEDCASE_FILENAMES 1
3429 # do this after mixed-case option (tags/TAGS is not as important as tic).
3430 echo "$as_me:3430: checking whether ${MAKE-make} sets \${MAKE}" >&5
3431 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3432 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3433 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3434 echo $ECHO_N "(cached) $ECHO_C" >&6
3436 cat >conftest.make <<\EOF
3438 @echo 'ac_maketemp="${MAKE}"'
3440 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3441 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3442 if test -n "$ac_maketemp"; then
3443 eval ac_cv_prog_make_${ac_make}_set=yes
3445 eval ac_cv_prog_make_${ac_make}_set=no
3449 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3450 echo "$as_me:3450: result: yes" >&5
3451 echo "${ECHO_T}yes" >&6
3454 echo "$as_me:3454: result: no" >&5
3455 echo "${ECHO_T}no" >&6
3456 SET_MAKE="MAKE=${MAKE-make}"
3459 for ac_prog in exctags ctags
3461 # Extract the first word of "$ac_prog", so it can be a program name with args.
3462 set dummy $ac_prog; ac_word=$2
3463 echo "$as_me:3463: checking for $ac_word" >&5
3464 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3465 if test "${ac_cv_prog_CTAGS+set}" = set; then
3466 echo $ECHO_N "(cached) $ECHO_C" >&6
3468 if test -n "$CTAGS"; then
3469 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3471 ac_save_IFS=$IFS; IFS=$ac_path_separator
3473 for ac_dir in $ac_dummy; do
3475 test -z "$ac_dir" && ac_dir=.
3476 $as_executable_p "$ac_dir/$ac_word" || continue
3477 ac_cv_prog_CTAGS="$ac_prog"
3478 echo "$as_me:3478: found $ac_dir/$ac_word" >&5
3484 CTAGS=$ac_cv_prog_CTAGS
3485 if test -n "$CTAGS"; then
3486 echo "$as_me:3486: result: $CTAGS" >&5
3487 echo "${ECHO_T}$CTAGS" >&6
3489 echo "$as_me:3489: result: no" >&5
3490 echo "${ECHO_T}no" >&6
3493 test -n "$CTAGS" && break
3496 for ac_prog in exetags etags
3498 # Extract the first word of "$ac_prog", so it can be a program name with args.
3499 set dummy $ac_prog; ac_word=$2
3500 echo "$as_me:3500: checking for $ac_word" >&5
3501 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3502 if test "${ac_cv_prog_ETAGS+set}" = set; then
3503 echo $ECHO_N "(cached) $ECHO_C" >&6
3505 if test -n "$ETAGS"; then
3506 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3508 ac_save_IFS=$IFS; IFS=$ac_path_separator
3510 for ac_dir in $ac_dummy; do
3512 test -z "$ac_dir" && ac_dir=.
3513 $as_executable_p "$ac_dir/$ac_word" || continue
3514 ac_cv_prog_ETAGS="$ac_prog"
3515 echo "$as_me:3515: found $ac_dir/$ac_word" >&5
3521 ETAGS=$ac_cv_prog_ETAGS
3522 if test -n "$ETAGS"; then
3523 echo "$as_me:3523: result: $ETAGS" >&5
3524 echo "${ECHO_T}$ETAGS" >&6
3526 echo "$as_me:3526: result: no" >&5
3527 echo "${ECHO_T}no" >&6
3530 test -n "$ETAGS" && break
3533 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3534 set dummy ${CTAGS:-ctags}; ac_word=$2
3535 echo "$as_me:3535: checking for $ac_word" >&5
3536 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3537 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3538 echo $ECHO_N "(cached) $ECHO_C" >&6
3540 if test -n "$MAKE_LOWER_TAGS"; then
3541 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3543 ac_save_IFS=$IFS; IFS=$ac_path_separator
3545 for ac_dir in $ac_dummy; do
3547 test -z "$ac_dir" && ac_dir=.
3548 $as_executable_p "$ac_dir/$ac_word" || continue
3549 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3550 echo "$as_me:3550: found $ac_dir/$ac_word" >&5
3554 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3557 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3558 if test -n "$MAKE_LOWER_TAGS"; then
3559 echo "$as_me:3559: result: $MAKE_LOWER_TAGS" >&5
3560 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3562 echo "$as_me:3562: result: no" >&5
3563 echo "${ECHO_T}no" >&6
3566 if test "$cf_cv_mixedcase" = yes ; then
3567 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3568 set dummy ${ETAGS:-etags}; ac_word=$2
3569 echo "$as_me:3569: checking for $ac_word" >&5
3570 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3571 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3572 echo $ECHO_N "(cached) $ECHO_C" >&6
3574 if test -n "$MAKE_UPPER_TAGS"; then
3575 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3577 ac_save_IFS=$IFS; IFS=$ac_path_separator
3579 for ac_dir in $ac_dummy; do
3581 test -z "$ac_dir" && ac_dir=.
3582 $as_executable_p "$ac_dir/$ac_word" || continue
3583 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3584 echo "$as_me:3584: found $ac_dir/$ac_word" >&5
3588 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3591 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3592 if test -n "$MAKE_UPPER_TAGS"; then
3593 echo "$as_me:3593: result: $MAKE_UPPER_TAGS" >&5
3594 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3596 echo "$as_me:3596: result: no" >&5
3597 echo "${ECHO_T}no" >&6
3604 if test "$MAKE_UPPER_TAGS" = yes ; then
3610 if test "$MAKE_LOWER_TAGS" = yes ; then
3616 echo "$as_me:3616: checking for makeflags variable" >&5
3617 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3618 if test "${cf_cv_makeflags+set}" = set; then
3619 echo $ECHO_N "(cached) $ECHO_C" >&6
3623 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3625 cat >cf_makeflags.tmp <<CF_EOF
3628 @ echo '.$cf_option'
3630 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[ ]*$,,'`
3631 case "$cf_result" in
3633 cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
3634 case "$cf_result" in
3635 (.*CC=*) cf_cv_makeflags=
3637 (*) cf_cv_makeflags=$cf_option
3646 echo "${as_me:-configure}:3646: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3651 rm -f cf_makeflags.tmp
3654 echo "$as_me:3654: result: $cf_cv_makeflags" >&5
3655 echo "${ECHO_T}$cf_cv_makeflags" >&6
3657 if test -n "$ac_tool_prefix"; then
3658 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3659 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3660 echo "$as_me:3660: checking for $ac_word" >&5
3661 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3662 if test "${ac_cv_prog_RANLIB+set}" = set; then
3663 echo $ECHO_N "(cached) $ECHO_C" >&6
3665 if test -n "$RANLIB"; then
3666 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3668 ac_save_IFS=$IFS; IFS=$ac_path_separator
3670 for ac_dir in $ac_dummy; do
3672 test -z "$ac_dir" && ac_dir=.
3673 $as_executable_p "$ac_dir/$ac_word" || continue
3674 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3675 echo "$as_me:3675: found $ac_dir/$ac_word" >&5
3681 RANLIB=$ac_cv_prog_RANLIB
3682 if test -n "$RANLIB"; then
3683 echo "$as_me:3683: result: $RANLIB" >&5
3684 echo "${ECHO_T}$RANLIB" >&6
3686 echo "$as_me:3686: result: no" >&5
3687 echo "${ECHO_T}no" >&6
3691 if test -z "$ac_cv_prog_RANLIB"; then
3692 ac_ct_RANLIB=$RANLIB
3693 # Extract the first word of "ranlib", so it can be a program name with args.
3694 set dummy ranlib; ac_word=$2
3695 echo "$as_me:3695: checking for $ac_word" >&5
3696 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3697 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3698 echo $ECHO_N "(cached) $ECHO_C" >&6
3700 if test -n "$ac_ct_RANLIB"; then
3701 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3703 ac_save_IFS=$IFS; IFS=$ac_path_separator
3705 for ac_dir in $ac_dummy; do
3707 test -z "$ac_dir" && ac_dir=.
3708 $as_executable_p "$ac_dir/$ac_word" || continue
3709 ac_cv_prog_ac_ct_RANLIB="ranlib"
3710 echo "$as_me:3710: found $ac_dir/$ac_word" >&5
3714 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3717 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3718 if test -n "$ac_ct_RANLIB"; then
3719 echo "$as_me:3719: result: $ac_ct_RANLIB" >&5
3720 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3722 echo "$as_me:3722: result: no" >&5
3723 echo "${ECHO_T}no" >&6
3726 RANLIB=$ac_ct_RANLIB
3728 RANLIB="$ac_cv_prog_RANLIB"
3731 if test -n "$ac_tool_prefix"; then
3732 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3733 set dummy ${ac_tool_prefix}ld; ac_word=$2
3734 echo "$as_me:3734: checking for $ac_word" >&5
3735 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3736 if test "${ac_cv_prog_LD+set}" = set; then
3737 echo $ECHO_N "(cached) $ECHO_C" >&6
3739 if test -n "$LD"; then
3740 ac_cv_prog_LD="$LD" # Let the user override the test.
3742 ac_save_IFS=$IFS; IFS=$ac_path_separator
3744 for ac_dir in $ac_dummy; do
3746 test -z "$ac_dir" && ac_dir=.
3747 $as_executable_p "$ac_dir/$ac_word" || continue
3748 ac_cv_prog_LD="${ac_tool_prefix}ld"
3749 echo "$as_me:3749: found $ac_dir/$ac_word" >&5
3756 if test -n "$LD"; then
3757 echo "$as_me:3757: result: $LD" >&5
3758 echo "${ECHO_T}$LD" >&6
3760 echo "$as_me:3760: result: no" >&5
3761 echo "${ECHO_T}no" >&6
3765 if test -z "$ac_cv_prog_LD"; then
3767 # Extract the first word of "ld", so it can be a program name with args.
3768 set dummy ld; ac_word=$2
3769 echo "$as_me:3769: checking for $ac_word" >&5
3770 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3771 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3772 echo $ECHO_N "(cached) $ECHO_C" >&6
3774 if test -n "$ac_ct_LD"; then
3775 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3777 ac_save_IFS=$IFS; IFS=$ac_path_separator
3779 for ac_dir in $ac_dummy; do
3781 test -z "$ac_dir" && ac_dir=.
3782 $as_executable_p "$ac_dir/$ac_word" || continue
3783 ac_cv_prog_ac_ct_LD="ld"
3784 echo "$as_me:3784: found $ac_dir/$ac_word" >&5
3788 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3791 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3792 if test -n "$ac_ct_LD"; then
3793 echo "$as_me:3793: result: $ac_ct_LD" >&5
3794 echo "${ECHO_T}$ac_ct_LD" >&6
3796 echo "$as_me:3796: result: no" >&5
3797 echo "${ECHO_T}no" >&6
3805 if test -n "$ac_tool_prefix"; then
3806 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3807 set dummy ${ac_tool_prefix}ar; ac_word=$2
3808 echo "$as_me:3808: checking for $ac_word" >&5
3809 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3810 if test "${ac_cv_prog_AR+set}" = set; then
3811 echo $ECHO_N "(cached) $ECHO_C" >&6
3813 if test -n "$AR"; then
3814 ac_cv_prog_AR="$AR" # Let the user override the test.
3816 ac_save_IFS=$IFS; IFS=$ac_path_separator
3818 for ac_dir in $ac_dummy; do
3820 test -z "$ac_dir" && ac_dir=.
3821 $as_executable_p "$ac_dir/$ac_word" || continue
3822 ac_cv_prog_AR="${ac_tool_prefix}ar"
3823 echo "$as_me:3823: found $ac_dir/$ac_word" >&5
3830 if test -n "$AR"; then
3831 echo "$as_me:3831: result: $AR" >&5
3832 echo "${ECHO_T}$AR" >&6
3834 echo "$as_me:3834: result: no" >&5
3835 echo "${ECHO_T}no" >&6
3839 if test -z "$ac_cv_prog_AR"; then
3841 # Extract the first word of "ar", so it can be a program name with args.
3842 set dummy ar; ac_word=$2
3843 echo "$as_me:3843: checking for $ac_word" >&5
3844 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3845 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3846 echo $ECHO_N "(cached) $ECHO_C" >&6
3848 if test -n "$ac_ct_AR"; then
3849 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3851 ac_save_IFS=$IFS; IFS=$ac_path_separator
3853 for ac_dir in $ac_dummy; do
3855 test -z "$ac_dir" && ac_dir=.
3856 $as_executable_p "$ac_dir/$ac_word" || continue
3857 ac_cv_prog_ac_ct_AR="ar"
3858 echo "$as_me:3858: found $ac_dir/$ac_word" >&5
3862 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3865 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3866 if test -n "$ac_ct_AR"; then
3867 echo "$as_me:3867: result: $ac_ct_AR" >&5
3868 echo "${ECHO_T}$ac_ct_AR" >&6
3870 echo "$as_me:3870: result: no" >&5
3871 echo "${ECHO_T}no" >&6
3879 if test -n "$ac_tool_prefix"; then
3880 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3881 set dummy ${ac_tool_prefix}ar; ac_word=$2
3882 echo "$as_me:3882: checking for $ac_word" >&5
3883 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3884 if test "${ac_cv_prog_AR+set}" = set; then
3885 echo $ECHO_N "(cached) $ECHO_C" >&6
3887 if test -n "$AR"; then
3888 ac_cv_prog_AR="$AR" # Let the user override the test.
3890 ac_save_IFS=$IFS; IFS=$ac_path_separator
3892 for ac_dir in $ac_dummy; do
3894 test -z "$ac_dir" && ac_dir=.
3895 $as_executable_p "$ac_dir/$ac_word" || continue
3896 ac_cv_prog_AR="${ac_tool_prefix}ar"
3897 echo "$as_me:3897: found $ac_dir/$ac_word" >&5
3904 if test -n "$AR"; then
3905 echo "$as_me:3905: result: $AR" >&5
3906 echo "${ECHO_T}$AR" >&6
3908 echo "$as_me:3908: result: no" >&5
3909 echo "${ECHO_T}no" >&6
3913 if test -z "$ac_cv_prog_AR"; then
3915 # Extract the first word of "ar", so it can be a program name with args.
3916 set dummy ar; ac_word=$2
3917 echo "$as_me:3917: checking for $ac_word" >&5
3918 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3919 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3920 echo $ECHO_N "(cached) $ECHO_C" >&6
3922 if test -n "$ac_ct_AR"; then
3923 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3925 ac_save_IFS=$IFS; IFS=$ac_path_separator
3927 for ac_dir in $ac_dummy; do
3929 test -z "$ac_dir" && ac_dir=.
3930 $as_executable_p "$ac_dir/$ac_word" || continue
3931 ac_cv_prog_ac_ct_AR="ar"
3932 echo "$as_me:3932: found $ac_dir/$ac_word" >&5
3936 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3939 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3940 if test -n "$ac_ct_AR"; then
3941 echo "$as_me:3941: result: $ac_ct_AR" >&5
3942 echo "${ECHO_T}$ac_ct_AR" >&6
3944 echo "$as_me:3944: result: no" >&5
3945 echo "${ECHO_T}no" >&6
3953 echo "$as_me:3953: checking for options to update archives" >&5
3954 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3955 if test "${cf_cv_ar_flags+set}" = set; then
3956 echo $ECHO_N "(cached) $ECHO_C" >&6
3959 case "$cf_cv_system_name" in
3962 cat >mk_static_lib.sh <<-EOF
3967 exec \$MSVC_BIN -out:"\$out" \$@
3969 chmod +x mk_static_lib.sh
3970 AR=`pwd`/mk_static_lib.sh
3973 cf_cv_ar_flags=unknown
3974 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
3977 # check if $ARFLAGS already contains this choice
3978 if test "x$ARFLAGS" != "x" ; then
3979 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3980 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3986 rm -f "conftest.$ac_cv_objext"
3989 cat >"conftest.$ac_ext" <<EOF
3990 #line 3990 "configure"
3991 int testdata[3] = { 123, 456, 789 };
3993 if { (eval echo "$as_me:3993: \"$ac_compile\"") >&5
3994 (eval $ac_compile) 2>&5
3996 echo "$as_me:3996: \$? = $ac_status" >&5
3997 (exit "$ac_status"); } ; then
3998 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3999 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
4000 if test -f conftest.a ; then
4001 cf_cv_ar_flags="$cf_ar_flags"
4005 test -n "$verbose" && echo " cannot compile test-program" 1>&6
4007 echo "${as_me:-configure}:4007: testing cannot compile test-program ..." 1>&5
4012 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
4017 echo "$as_me:4017: result: $cf_cv_ar_flags" >&5
4018 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4020 if test -n "$ARFLAGS" ; then
4021 if test -n "$cf_cv_ar_flags" ; then
4022 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4025 ARFLAGS=$cf_cv_ar_flags
4028 echo "$as_me:4028: checking for PATH separator" >&5
4029 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4030 case "$cf_cv_system_name" in
4031 (os2*) PATH_SEPARATOR=';' ;;
4032 (*) ${PATH_SEPARATOR:=':'} ;;
4035 echo "$as_me:4035: result: $PATH_SEPARATOR" >&5
4036 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4038 echo "$as_me:4038: checking if you have specified an install-prefix" >&5
4039 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4041 # Check whether --with-install-prefix or --without-install-prefix was given.
4042 if test "${with_install_prefix+set}" = set; then
4043 withval="$with_install_prefix"
4047 (*) DESTDIR="$withval"
4051 echo "$as_me:4051: result: $DESTDIR" >&5
4052 echo "${ECHO_T}$DESTDIR" >&6
4054 ###############################################################################
4056 # If we're cross-compiling, allow the user to override the tools and their
4057 # options. The configure script is oriented toward identifying the host
4058 # compiler, etc., but we need a build compiler to generate parts of the source.
4060 if test "$cross_compiling" = yes ; then
4062 # defaults that we might want to override
4063 : ${BUILD_CFLAGS:=''}
4064 : ${BUILD_CPPFLAGS:=''}
4065 : ${BUILD_LDFLAGS:=''}
4067 : ${BUILD_EXEEXT:='$x'}
4068 : ${BUILD_OBJEXT:='o'}
4070 # Check whether --with-build-cc or --without-build-cc was given.
4071 if test "${with_build_cc+set}" = set; then
4072 withval="$with_build_cc"
4075 for ac_prog in gcc clang c99 c89 cc cl
4077 # Extract the first word of "$ac_prog", so it can be a program name with args.
4078 set dummy $ac_prog; ac_word=$2
4079 echo "$as_me:4079: checking for $ac_word" >&5
4080 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4081 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4082 echo $ECHO_N "(cached) $ECHO_C" >&6
4084 if test -n "$BUILD_CC"; then
4085 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4087 ac_save_IFS=$IFS; IFS=$ac_path_separator
4089 for ac_dir in $ac_dummy; do
4091 test -z "$ac_dir" && ac_dir=.
4092 $as_executable_p "$ac_dir/$ac_word" || continue
4093 ac_cv_prog_BUILD_CC="$ac_prog"
4094 echo "$as_me:4094: found $ac_dir/$ac_word" >&5
4100 BUILD_CC=$ac_cv_prog_BUILD_CC
4101 if test -n "$BUILD_CC"; then
4102 echo "$as_me:4102: result: $BUILD_CC" >&5
4103 echo "${ECHO_T}$BUILD_CC" >&6
4105 echo "$as_me:4105: result: no" >&5
4106 echo "${ECHO_T}no" >&6
4109 test -n "$BUILD_CC" && break
4111 test -n "$BUILD_CC" || BUILD_CC="none"
4114 echo "$as_me:4114: checking for native build C compiler" >&5
4115 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4116 echo "$as_me:4116: result: $BUILD_CC" >&5
4117 echo "${ECHO_T}$BUILD_CC" >&6
4119 echo "$as_me:4119: checking for native build C preprocessor" >&5
4120 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4122 # Check whether --with-build-cpp or --without-build-cpp was given.
4123 if test "${with_build_cpp+set}" = set; then
4124 withval="$with_build_cpp"
4125 BUILD_CPP="$withval"
4127 BUILD_CPP='${BUILD_CC} -E'
4129 echo "$as_me:4129: result: $BUILD_CPP" >&5
4130 echo "${ECHO_T}$BUILD_CPP" >&6
4132 echo "$as_me:4132: checking for native build C flags" >&5
4133 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4135 # Check whether --with-build-cflags or --without-build-cflags was given.
4136 if test "${with_build_cflags+set}" = set; then
4137 withval="$with_build_cflags"
4138 BUILD_CFLAGS="$withval"
4140 echo "$as_me:4140: result: $BUILD_CFLAGS" >&5
4141 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4143 echo "$as_me:4143: checking for native build C preprocessor-flags" >&5
4144 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4146 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4147 if test "${with_build_cppflags+set}" = set; then
4148 withval="$with_build_cppflags"
4149 BUILD_CPPFLAGS="$withval"
4151 echo "$as_me:4151: result: $BUILD_CPPFLAGS" >&5
4152 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4154 echo "$as_me:4154: checking for native build linker-flags" >&5
4155 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4157 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4158 if test "${with_build_ldflags+set}" = set; then
4159 withval="$with_build_ldflags"
4160 BUILD_LDFLAGS="$withval"
4162 echo "$as_me:4162: result: $BUILD_LDFLAGS" >&5
4163 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4165 echo "$as_me:4165: checking for native build linker-libraries" >&5
4166 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4168 # Check whether --with-build-libs or --without-build-libs was given.
4169 if test "${with_build_libs+set}" = set; then
4170 withval="$with_build_libs"
4171 BUILD_LIBS="$withval"
4173 echo "$as_me:4173: result: $BUILD_LIBS" >&5
4174 echo "${ECHO_T}$BUILD_LIBS" >&6
4176 # this assumes we're on Unix.
4180 : ${BUILD_CC:='${CC}'}
4182 if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
4183 { { echo "$as_me:4183: error: Cross-build requires two compilers.
4184 Use --with-build-cc to specify the native compiler." >&5
4185 echo "$as_me: error: Cross-build requires two compilers.
4186 Use --with-build-cc to specify the native compiler." >&2;}
4187 { (exit 1); exit 1; }; }
4191 : ${BUILD_CC:='${CC}'}
4192 : ${BUILD_CPP:='${CPP}'}
4193 : ${BUILD_CFLAGS:='${CFLAGS}'}
4194 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4195 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4196 : ${BUILD_LIBS:='${LIBS}'}
4197 : ${BUILD_EXEEXT:='$x'}
4198 : ${BUILD_OBJEXT:='o'}
4201 ###############################################################################
4203 ### Options to allow the user to specify the set of libraries which are used.
4204 ### Use "--without-normal --with-shared" to allow the default model to be
4205 ### shared, for example.
4208 echo "$as_me:4208: checking if you want to build shared C-objects" >&5
4209 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
4211 # Check whether --with-shared or --without-shared was given.
4212 if test "${with_shared+set}" = set; then
4213 withval="$with_shared"
4214 with_shared=$withval
4218 echo "$as_me:4218: result: $with_shared" >&5
4219 echo "${ECHO_T}$with_shared" >&6
4220 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4222 echo "$as_me:4222: checking for specified models" >&5
4223 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4224 test -z "$cf_list_models" && cf_list_models=normal
4225 echo "$as_me:4225: result: $cf_list_models" >&5
4226 echo "${ECHO_T}$cf_list_models" >&6
4228 ### Use the first model as the default, and save its suffix for use in building
4229 ### up test-applications.
4230 echo "$as_me:4230: checking for default model" >&5
4231 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4232 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4233 echo "$as_me:4233: result: $DFT_LWR_MODEL" >&5
4234 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4236 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4238 echo "$as_me:4238: checking for specific curses-directory" >&5
4239 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4241 # Check whether --with-curses-dir or --without-curses-dir was given.
4242 if test "${with_curses_dir+set}" = set; then
4243 withval="$with_curses_dir"
4244 cf_cv_curses_dir=$withval
4248 echo "$as_me:4248: result: $cf_cv_curses_dir" >&5
4249 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4251 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
4254 if test "x$prefix" != xNONE; then
4255 cf_path_syntax="$prefix"
4257 cf_path_syntax="$ac_default_prefix"
4265 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4267 (.\$\{*prefix\}*|.\$\{*dir\}*)
4268 eval withval="$withval"
4271 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4276 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4279 { { echo "$as_me:4279: error: expected a pathname, not \"$withval\"" >&5
4280 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4281 { (exit 1); exit 1; }; }
4285 if test -d "$cf_cv_curses_dir"
4288 if test -n "$cf_cv_curses_dir/include" ; then
4289 for cf_add_incdir in $cf_cv_curses_dir/include
4291 while test "$cf_add_incdir" != /usr/include
4293 if test -d "$cf_add_incdir"
4296 if test -n "$CFLAGS$CPPFLAGS" ; then
4297 # a loop is needed to ensure we can add subdirs of existing dirs
4298 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4299 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4300 cf_have_incdir=yes; break
4305 if test "$cf_have_incdir" = no ; then
4306 if test "$cf_add_incdir" = /usr/local/include ; then
4307 if test "$GCC" = yes
4309 cf_save_CPPFLAGS=$CPPFLAGS
4311 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4312 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4314 cat >"conftest.$ac_ext" <<_ACEOF
4315 #line 4315 "configure"
4316 #include "confdefs.h"
4326 rm -f "conftest.$ac_objext"
4327 if { (eval echo "$as_me:4327: \"$ac_compile\"") >&5
4328 (eval $ac_compile) 2>&5
4330 echo "$as_me:4330: \$? = $ac_status" >&5
4331 (exit "$ac_status"); } &&
4332 { ac_try='test -s "conftest.$ac_objext"'
4333 { (eval echo "$as_me:4333: \"$ac_try\"") >&5
4336 echo "$as_me:4336: \$? = $ac_status" >&5
4337 (exit "$ac_status"); }; }; then
4340 echo "$as_me: failed program was:" >&5
4341 cat "conftest.$ac_ext" >&5
4344 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4345 CPPFLAGS=$cf_save_CPPFLAGS
4350 if test "$cf_have_incdir" = no ; then
4351 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4353 echo "${as_me:-configure}:4353: testing adding $cf_add_incdir to include-path ..." 1>&5
4355 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4357 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
4358 test "$cf_top_incdir" = "$cf_add_incdir" && break
4359 cf_add_incdir="$cf_top_incdir"
4370 if test -n "$cf_cv_curses_dir/lib" ; then
4371 for cf_add_libdir in $cf_cv_curses_dir/lib
4373 if test "$cf_add_libdir" = /usr/lib ; then
4375 elif test -d "$cf_add_libdir"
4378 if test -n "$LDFLAGS$LIBS" ; then
4379 # a loop is needed to ensure we can add subdirs of existing dirs
4380 for cf_test_libdir in $LDFLAGS $LIBS ; do
4381 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4382 cf_have_libdir=yes; break
4386 if test "$cf_have_libdir" = no ; then
4387 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4389 echo "${as_me:-configure}:4389: testing adding $cf_add_libdir to library-path ..." 1>&5
4391 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4400 cf_ncuconfig_root=ncurses
4401 cf_have_ncuconfig=no
4403 if test "x${PKG_CONFIG:=none}" != xnone; then
4404 echo "$as_me:4404: checking pkg-config for $cf_ncuconfig_root" >&5
4405 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
4406 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
4407 echo "$as_me:4407: result: yes" >&5
4408 echo "${ECHO_T}yes" >&6
4410 echo "$as_me:4410: checking if the $cf_ncuconfig_root package files work" >&5
4411 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
4412 cf_have_ncuconfig=unknown
4414 cf_save_CFLAGS="$CFLAGS"
4415 cf_save_CPPFLAGS="$CPPFLAGS"
4416 cf_save_LIBS="$LIBS"
4418 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
4419 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
4421 # while -W for passing linker flags is prevalent, it is not "standard".
4422 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
4423 # incompatible _and_ non-standard -W option which gives an error. Work
4424 # around that pitfall.
4425 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
4431 cf_new_extra_cppflags=
4433 for cf_add_cflags in $cf_pkg_cflags
4435 case "$cf_fix_cppflags" in
4437 case "$cf_add_cflags" in
4438 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4439 case "$cf_add_cflags" in
4441 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4443 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4444 && test -z "${cf_tst_cflags}" \
4445 && cf_fix_cppflags=yes
4447 if test "$cf_fix_cppflags" = yes ; then
4449 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4450 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4453 elif test "${cf_tst_cflags}" = "\"'" ; then
4455 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4456 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4466 case "$cf_add_cflags" in
4468 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4470 CPPFLAGS=`echo "$CPPFLAGS" | \
4471 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4472 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4477 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4478 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4485 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4486 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4493 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4494 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4496 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4498 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4499 && test -z "${cf_tst_cflags}" \
4500 && cf_fix_cppflags=no
4505 if test -n "$cf_new_cflags" ; then
4507 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4508 CFLAGS="${CFLAGS}$cf_new_cflags"
4512 if test -n "$cf_new_cppflags" ; then
4514 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4515 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4519 if test -n "$cf_new_extra_cppflags" ; then
4521 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4522 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4529 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4531 for cf_add_1lib in $cf_add_0lib; do
4532 for cf_add_2lib in $cf_add_libs; do
4533 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4538 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4542 cat >"conftest.$ac_ext" <<_ACEOF
4543 #line 4543 "configure"
4544 #include "confdefs.h"
4545 #include <${cf_cv_ncurses_header:-curses.h}>
4549 initscr(); mousemask(0,0); tigetstr((char *)0);
4554 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4555 if { (eval echo "$as_me:4555: \"$ac_link\"") >&5
4556 (eval $ac_link) 2>&5
4558 echo "$as_me:4558: \$? = $ac_status" >&5
4559 (exit "$ac_status"); } &&
4560 { ac_try='test -s "conftest$ac_exeext"'
4561 { (eval echo "$as_me:4561: \"$ac_try\"") >&5
4564 echo "$as_me:4564: \$? = $ac_status" >&5
4565 (exit "$ac_status"); }; }; then
4566 if test "$cross_compiling" = yes; then
4567 cf_test_ncuconfig=maybe
4569 cat >"conftest.$ac_ext" <<_ACEOF
4570 #line 4570 "configure"
4571 #include "confdefs.h"
4572 #include <${cf_cv_ncurses_header:-curses.h}>
4574 { char *xx = curses_version(); return (xx == 0); }
4576 rm -f "conftest$ac_exeext"
4577 if { (eval echo "$as_me:4577: \"$ac_link\"") >&5
4578 (eval $ac_link) 2>&5
4580 echo "$as_me:4580: \$? = $ac_status" >&5
4581 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4582 { (eval echo "$as_me:4582: \"$ac_try\"") >&5
4585 echo "$as_me:4585: \$? = $ac_status" >&5
4586 (exit "$ac_status"); }; }; then
4587 cf_test_ncuconfig=yes
4589 echo "$as_me: program exited with status $ac_status" >&5
4590 echo "$as_me: failed program was:" >&5
4591 cat "conftest.$ac_ext" >&5
4592 cf_test_ncuconfig=no
4594 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4597 echo "$as_me: failed program was:" >&5
4598 cat "conftest.$ac_ext" >&5
4599 cf_test_ncuconfig=no
4601 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4603 CFLAGS="$cf_save_CFLAGS"
4604 CPPFLAGS="$cf_save_CPPFLAGS"
4605 LIBS="$cf_save_LIBS"
4607 if test "x$cf_test_ncuconfig" != xyes; then
4608 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4609 cf_pkg_cflags="$cf_temp"
4610 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4611 cf_pkg_libs="$cf_temp"
4619 cf_new_extra_cppflags=
4621 for cf_add_cflags in $cf_pkg_cflags
4623 case "$cf_fix_cppflags" in
4625 case "$cf_add_cflags" in
4626 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4627 case "$cf_add_cflags" in
4629 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4631 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4632 && test -z "${cf_tst_cflags}" \
4633 && cf_fix_cppflags=yes
4635 if test "$cf_fix_cppflags" = yes ; then
4637 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4638 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4641 elif test "${cf_tst_cflags}" = "\"'" ; then
4643 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4644 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4654 case "$cf_add_cflags" in
4656 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4658 CPPFLAGS=`echo "$CPPFLAGS" | \
4659 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4660 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4665 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4666 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4673 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4674 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4681 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4682 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4684 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4686 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4687 && test -z "${cf_tst_cflags}" \
4688 && cf_fix_cppflags=no
4693 if test -n "$cf_new_cflags" ; then
4695 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4696 CFLAGS="${CFLAGS}$cf_new_cflags"
4700 if test -n "$cf_new_cppflags" ; then
4702 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4703 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4707 if test -n "$cf_new_extra_cppflags" ; then
4709 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4710 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4717 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4719 for cf_add_1lib in $cf_add_0lib; do
4720 for cf_add_2lib in $cf_add_libs; do
4721 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4726 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4730 cat >"conftest.$ac_ext" <<_ACEOF
4731 #line 4731 "configure"
4732 #include "confdefs.h"
4733 #include <${cf_cv_ncurses_header:-curses.h}>
4737 initscr(); mousemask(0,0); tigetstr((char *)0);
4742 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4743 if { (eval echo "$as_me:4743: \"$ac_link\"") >&5
4744 (eval $ac_link) 2>&5
4746 echo "$as_me:4746: \$? = $ac_status" >&5
4747 (exit "$ac_status"); } &&
4748 { ac_try='test -s "conftest$ac_exeext"'
4749 { (eval echo "$as_me:4749: \"$ac_try\"") >&5
4752 echo "$as_me:4752: \$? = $ac_status" >&5
4753 (exit "$ac_status"); }; }; then
4754 if test "$cross_compiling" = yes; then
4755 cf_have_ncuconfig=maybe
4757 cat >"conftest.$ac_ext" <<_ACEOF
4758 #line 4758 "configure"
4759 #include "confdefs.h"
4760 #include <${cf_cv_ncurses_header:-curses.h}>
4762 { char *xx = curses_version(); return (xx == 0); }
4764 rm -f "conftest$ac_exeext"
4765 if { (eval echo "$as_me:4765: \"$ac_link\"") >&5
4766 (eval $ac_link) 2>&5
4768 echo "$as_me:4768: \$? = $ac_status" >&5
4769 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4770 { (eval echo "$as_me:4770: \"$ac_try\"") >&5
4773 echo "$as_me:4773: \$? = $ac_status" >&5
4774 (exit "$ac_status"); }; }; then
4775 cf_have_ncuconfig=yes
4777 echo "$as_me: program exited with status $ac_status" >&5
4778 echo "$as_me: failed program was:" >&5
4779 cat "conftest.$ac_ext" >&5
4780 cf_have_ncuconfig=no
4782 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4785 echo "$as_me: failed program was:" >&5
4786 cat "conftest.$ac_ext" >&5
4787 cf_have_ncuconfig=no
4789 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4790 echo "$as_me:4790: result: $cf_have_ncuconfig" >&5
4791 echo "${ECHO_T}$cf_have_ncuconfig" >&6
4792 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
4793 if test "$cf_have_ncuconfig" != "yes"
4795 CPPFLAGS="$cf_save_CPPFLAGS"
4796 LIBS="$cf_save_LIBS"
4797 NCURSES_CONFIG_PKG=none
4800 cat >>confdefs.h <<\EOF
4804 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
4806 echo "$as_me:4806: checking for terminfo header" >&5
4807 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4808 if test "${cf_cv_term_header+set}" = set; then
4809 echo $ECHO_N "(cached) $ECHO_C" >&6
4812 case "${cf_cv_ncurses_header}" in
4813 (*/ncurses.h|*/ncursesw.h)
4814 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4817 cf_term_header=term.h
4821 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4823 cat >"conftest.$ac_ext" <<_ACEOF
4824 #line 4824 "configure"
4825 #include "confdefs.h"
4827 #include <${cf_cv_ncurses_header:-curses.h}>
4833 int x = auto_left_margin; (void)x
4838 rm -f "conftest.$ac_objext"
4839 if { (eval echo "$as_me:4839: \"$ac_compile\"") >&5
4840 (eval $ac_compile) 2>&5
4842 echo "$as_me:4842: \$? = $ac_status" >&5
4843 (exit "$ac_status"); } &&
4844 { ac_try='test -s "conftest.$ac_objext"'
4845 { (eval echo "$as_me:4845: \"$ac_try\"") >&5
4848 echo "$as_me:4848: \$? = $ac_status" >&5
4849 (exit "$ac_status"); }; }; then
4851 cf_cv_term_header="$cf_test"
4853 echo "$as_me: failed program was:" >&5
4854 cat "conftest.$ac_ext" >&5
4856 cf_cv_term_header=unknown
4859 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4860 test "$cf_cv_term_header" != unknown && break
4864 echo "$as_me:4864: result: $cf_cv_term_header" >&5
4865 echo "${ECHO_T}$cf_cv_term_header" >&6
4867 # Set definitions to allow ifdef'ing to accommodate subdirectories
4869 case "$cf_cv_term_header" in
4872 cat >>confdefs.h <<\EOF
4873 #define HAVE_TERM_H 1
4879 case "$cf_cv_term_header" in
4882 cat >>confdefs.h <<\EOF
4883 #define HAVE_NCURSES_TERM_H 1
4889 cat >>confdefs.h <<\EOF
4890 #define HAVE_NCURSESW_TERM_H 1
4899 echo "$as_me:4899: result: no" >&5
4900 echo "${ECHO_T}no" >&6
4901 NCURSES_CONFIG_PKG=none
4904 NCURSES_CONFIG_PKG=none
4907 if test "x$cf_have_ncuconfig" = "xno"; then
4908 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
4910 if test -n "$ac_tool_prefix"; then
4911 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4913 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4914 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4915 echo "$as_me:4915: checking for $ac_word" >&5
4916 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4917 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
4918 echo $ECHO_N "(cached) $ECHO_C" >&6
4920 if test -n "$NCURSES_CONFIG"; then
4921 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
4923 ac_save_IFS=$IFS; IFS=$ac_path_separator
4925 for ac_dir in $ac_dummy; do
4927 test -z "$ac_dir" && ac_dir=.
4928 $as_executable_p "$ac_dir/$ac_word" || continue
4929 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
4930 echo "$as_me:4930: found $ac_dir/$ac_word" >&5
4936 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
4937 if test -n "$NCURSES_CONFIG"; then
4938 echo "$as_me:4938: result: $NCURSES_CONFIG" >&5
4939 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4941 echo "$as_me:4941: result: no" >&5
4942 echo "${ECHO_T}no" >&6
4945 test -n "$NCURSES_CONFIG" && break
4948 if test -z "$NCURSES_CONFIG"; then
4949 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
4950 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4952 # Extract the first word of "$ac_prog", so it can be a program name with args.
4953 set dummy $ac_prog; ac_word=$2
4954 echo "$as_me:4954: checking for $ac_word" >&5
4955 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4956 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
4957 echo $ECHO_N "(cached) $ECHO_C" >&6
4959 if test -n "$ac_ct_NCURSES_CONFIG"; then
4960 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
4962 ac_save_IFS=$IFS; IFS=$ac_path_separator
4964 for ac_dir in $ac_dummy; do
4966 test -z "$ac_dir" && ac_dir=.
4967 $as_executable_p "$ac_dir/$ac_word" || continue
4968 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
4969 echo "$as_me:4969: found $ac_dir/$ac_word" >&5
4975 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
4976 if test -n "$ac_ct_NCURSES_CONFIG"; then
4977 echo "$as_me:4977: result: $ac_ct_NCURSES_CONFIG" >&5
4978 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
4980 echo "$as_me:4980: result: no" >&5
4981 echo "${ECHO_T}no" >&6
4984 test -n "$ac_ct_NCURSES_CONFIG" && break
4986 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
4988 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
4991 if test "$NCURSES_CONFIG" != none ; then
4996 cf_new_extra_cppflags=
4998 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
5000 case "$cf_fix_cppflags" in
5002 case "$cf_add_cflags" in
5003 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5004 case "$cf_add_cflags" in
5006 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5008 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5009 && test -z "${cf_tst_cflags}" \
5010 && cf_fix_cppflags=yes
5012 if test "$cf_fix_cppflags" = yes ; then
5014 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5015 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5018 elif test "${cf_tst_cflags}" = "\"'" ; then
5020 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5021 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5031 case "$cf_add_cflags" in
5033 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5035 CPPFLAGS=`echo "$CPPFLAGS" | \
5036 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5037 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5042 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5043 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5050 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5051 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5058 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5059 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5061 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5063 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5064 && test -z "${cf_tst_cflags}" \
5065 && cf_fix_cppflags=no
5070 if test -n "$cf_new_cflags" ; then
5072 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5073 CFLAGS="${CFLAGS}$cf_new_cflags"
5077 if test -n "$cf_new_cppflags" ; then
5079 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5080 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5084 if test -n "$cf_new_extra_cppflags" ; then
5086 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5087 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5094 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5096 for cf_add_1lib in $cf_add_0lib; do
5097 for cf_add_2lib in $cf_add_libs; do
5098 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5103 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5107 # even with config script, some packages use no-override for curses.h
5109 echo "$as_me:5109: checking if we have identified curses headers" >&5
5110 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5111 if test "${cf_cv_ncurses_header+set}" = set; then
5112 echo $ECHO_N "(cached) $ECHO_C" >&6
5115 cf_cv_ncurses_header=none
5117 ncurses.h ncurses/ncurses.h \
5118 curses.h ncurses/curses.h
5120 cat >"conftest.$ac_ext" <<_ACEOF
5121 #line 5121 "configure"
5122 #include "confdefs.h"
5123 #include <${cf_header}>
5127 initscr(); tgoto("?", 0,0)
5132 rm -f "conftest.$ac_objext"
5133 if { (eval echo "$as_me:5133: \"$ac_compile\"") >&5
5134 (eval $ac_compile) 2>&5
5136 echo "$as_me:5136: \$? = $ac_status" >&5
5137 (exit "$ac_status"); } &&
5138 { ac_try='test -s "conftest.$ac_objext"'
5139 { (eval echo "$as_me:5139: \"$ac_try\"") >&5
5142 echo "$as_me:5142: \$? = $ac_status" >&5
5143 (exit "$ac_status"); }; }; then
5144 cf_cv_ncurses_header=$cf_header; break
5146 echo "$as_me: failed program was:" >&5
5147 cat "conftest.$ac_ext" >&5
5149 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5153 echo "$as_me:5153: result: $cf_cv_ncurses_header" >&5
5154 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5156 if test "$cf_cv_ncurses_header" = none ; then
5157 { { echo "$as_me:5157: error: No curses header-files found" >&5
5158 echo "$as_me: error: No curses header-files found" >&2;}
5159 { (exit 1); exit 1; }; }
5162 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5164 for ac_header in $cf_cv_ncurses_header
5166 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5167 echo "$as_me:5167: checking for $ac_header" >&5
5168 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5169 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5170 echo $ECHO_N "(cached) $ECHO_C" >&6
5172 cat >"conftest.$ac_ext" <<_ACEOF
5173 #line 5173 "configure"
5174 #include "confdefs.h"
5175 #include <$ac_header>
5177 if { (eval echo "$as_me:5177: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5178 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5180 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5182 cat conftest.err >&5
5183 echo "$as_me:5183: \$? = $ac_status" >&5
5184 (exit "$ac_status"); } >/dev/null; then
5185 if test -s conftest.err; then
5186 ac_cpp_err=$ac_c_preproc_warn_flag
5193 if test -z "$ac_cpp_err"; then
5194 eval "$as_ac_Header=yes"
5196 echo "$as_me: failed program was:" >&5
5197 cat "conftest.$ac_ext" >&5
5198 eval "$as_ac_Header=no"
5200 rm -f conftest.err "conftest.$ac_ext"
5202 echo "$as_me:5202: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5203 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5204 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5205 cat >>confdefs.h <<EOF
5206 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5212 cat >>confdefs.h <<\EOF
5216 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5218 cat >>confdefs.h <<EOF
5219 #define $cf_nculib_ROOT 1
5222 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
5226 cf_ncuhdr_root=ncurses
5228 test -n "$cf_cv_curses_dir" && \
5229 test "$cf_cv_curses_dir" != "no" && { \
5231 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5232 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5234 while test "$cf_add_incdir" != /usr/include
5236 if test -d "$cf_add_incdir"
5239 if test -n "$CFLAGS$CPPFLAGS" ; then
5240 # a loop is needed to ensure we can add subdirs of existing dirs
5241 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5242 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5243 cf_have_incdir=yes; break
5248 if test "$cf_have_incdir" = no ; then
5249 if test "$cf_add_incdir" = /usr/local/include ; then
5250 if test "$GCC" = yes
5252 cf_save_CPPFLAGS=$CPPFLAGS
5254 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5255 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5257 cat >"conftest.$ac_ext" <<_ACEOF
5258 #line 5258 "configure"
5259 #include "confdefs.h"
5269 rm -f "conftest.$ac_objext"
5270 if { (eval echo "$as_me:5270: \"$ac_compile\"") >&5
5271 (eval $ac_compile) 2>&5
5273 echo "$as_me:5273: \$? = $ac_status" >&5
5274 (exit "$ac_status"); } &&
5275 { ac_try='test -s "conftest.$ac_objext"'
5276 { (eval echo "$as_me:5276: \"$ac_try\"") >&5
5279 echo "$as_me:5279: \$? = $ac_status" >&5
5280 (exit "$ac_status"); }; }; then
5283 echo "$as_me: failed program was:" >&5
5284 cat "conftest.$ac_ext" >&5
5287 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5288 CPPFLAGS=$cf_save_CPPFLAGS
5293 if test "$cf_have_incdir" = no ; then
5294 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5296 echo "${as_me:-configure}:5296: testing adding $cf_add_incdir to include-path ..." 1>&5
5298 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5300 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5301 test "$cf_top_incdir" = "$cf_add_incdir" && break
5302 cf_add_incdir="$cf_top_incdir"
5315 echo "$as_me:5315: checking for $cf_ncuhdr_root header in include-path" >&5
5316 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5317 if test "${cf_cv_ncurses_h+set}" = set; then
5318 echo $ECHO_N "(cached) $ECHO_C" >&6
5321 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5322 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
5323 for cf_header in $cf_header_list
5326 cat >"conftest.$ac_ext" <<_ACEOF
5327 #line 5327 "configure"
5328 #include "confdefs.h"
5330 #include <$cf_header>
5335 #ifdef NCURSES_VERSION
5337 printf("%s\\n", NCURSES_VERSION);
5350 rm -f "conftest.$ac_objext"
5351 if { (eval echo "$as_me:5351: \"$ac_compile\"") >&5
5352 (eval $ac_compile) 2>&5
5354 echo "$as_me:5354: \$? = $ac_status" >&5
5355 (exit "$ac_status"); } &&
5356 { ac_try='test -s "conftest.$ac_objext"'
5357 { (eval echo "$as_me:5357: \"$ac_try\"") >&5
5360 echo "$as_me:5360: \$? = $ac_status" >&5
5361 (exit "$ac_status"); }; }; then
5362 cf_cv_ncurses_h=$cf_header
5365 echo "$as_me: failed program was:" >&5
5366 cat "conftest.$ac_ext" >&5
5369 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5371 test "$cf_cv_ncurses_h" != no && break
5375 echo "$as_me:5375: result: $cf_cv_ncurses_h" >&5
5376 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5378 if test "$cf_cv_ncurses_h" != no ; then
5379 cf_cv_ncurses_header=$cf_cv_ncurses_h
5382 echo "$as_me:5382: checking for $cf_ncuhdr_root include-path" >&5
5383 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5384 if test "${cf_cv_ncurses_h2+set}" = set; then
5385 echo $ECHO_N "(cached) $ECHO_C" >&6
5388 test -n "$verbose" && echo
5392 # collect the current set of include-directories from compiler flags
5393 cf_header_path_list=""
5394 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5395 for cf_header_path in $CPPFLAGS $CFLAGS
5397 case "$cf_header_path" in
5399 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5401 test "x$cf_header_path" != "xNONE" && \
5402 test -d "$cf_header_path" && \
5404 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5405 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
5406 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5407 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5408 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5409 test -d "$cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5412 cf_header_path_list="$cf_header_path_list $cf_search"
5418 # add the variations for the package we are looking for
5422 test "x$prefix" != "xNONE" && \
5423 test -d "$prefix" && \
5425 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5426 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
5427 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5428 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5429 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5430 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5433 for cf_subdir_prefix in \
5442 test "x$cf_subdir_prefix" != "x$prefix" && \
5443 test -d "$cf_subdir_prefix" && \
5444 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
5445 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5446 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
5447 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
5448 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
5449 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
5450 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5455 test "$includedir" != NONE && \
5456 test "$includedir" != "/usr/include" && \
5457 test -d "$includedir" && {
5458 test -d "$includedir" && cf_search="$cf_search $includedir"
5459 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5462 test "$oldincludedir" != NONE && \
5463 test "$oldincludedir" != "/usr/include" && \
5464 test -d "$oldincludedir" && {
5465 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
5466 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5469 cf_search="$cf_search $cf_header_path_list"
5471 test -n "$verbose" && echo "search path $cf_search"
5472 cf_save2_CPPFLAGS="$CPPFLAGS"
5473 for cf_incdir in $cf_search
5476 if test -n "$cf_incdir" ; then
5477 for cf_add_incdir in $cf_incdir
5479 while test "$cf_add_incdir" != /usr/include
5481 if test -d "$cf_add_incdir"
5484 if test -n "$CFLAGS$CPPFLAGS" ; then
5485 # a loop is needed to ensure we can add subdirs of existing dirs
5486 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5487 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5488 cf_have_incdir=yes; break
5493 if test "$cf_have_incdir" = no ; then
5494 if test "$cf_add_incdir" = /usr/local/include ; then
5495 if test "$GCC" = yes
5497 cf_save_CPPFLAGS=$CPPFLAGS
5499 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5500 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5502 cat >"conftest.$ac_ext" <<_ACEOF
5503 #line 5503 "configure"
5504 #include "confdefs.h"
5514 rm -f "conftest.$ac_objext"
5515 if { (eval echo "$as_me:5515: \"$ac_compile\"") >&5
5516 (eval $ac_compile) 2>&5
5518 echo "$as_me:5518: \$? = $ac_status" >&5
5519 (exit "$ac_status"); } &&
5520 { ac_try='test -s "conftest.$ac_objext"'
5521 { (eval echo "$as_me:5521: \"$ac_try\"") >&5
5524 echo "$as_me:5524: \$? = $ac_status" >&5
5525 (exit "$ac_status"); }; }; then
5528 echo "$as_me: failed program was:" >&5
5529 cat "conftest.$ac_ext" >&5
5532 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5533 CPPFLAGS=$cf_save_CPPFLAGS
5538 if test "$cf_have_incdir" = no ; then
5539 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5541 echo "${as_me:-configure}:5541: testing adding $cf_add_incdir to include-path ..." 1>&5
5543 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5545 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5546 test "$cf_top_incdir" = "$cf_add_incdir" && break
5547 cf_add_incdir="$cf_top_incdir"
5563 cat >"conftest.$ac_ext" <<_ACEOF
5564 #line 5564 "configure"
5565 #include "confdefs.h"
5567 #include <$cf_header>
5572 #ifdef NCURSES_VERSION
5574 printf("%s\\n", NCURSES_VERSION);
5587 rm -f "conftest.$ac_objext"
5588 if { (eval echo "$as_me:5588: \"$ac_compile\"") >&5
5589 (eval $ac_compile) 2>&5
5591 echo "$as_me:5591: \$? = $ac_status" >&5
5592 (exit "$ac_status"); } &&
5593 { ac_try='test -s "conftest.$ac_objext"'
5594 { (eval echo "$as_me:5594: \"$ac_try\"") >&5
5597 echo "$as_me:5597: \$? = $ac_status" >&5
5598 (exit "$ac_status"); }; }; then
5599 cf_cv_ncurses_h2=$cf_header
5602 echo "$as_me: failed program was:" >&5
5603 cat "conftest.$ac_ext" >&5
5606 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5608 if test "$cf_cv_ncurses_h2" != no ; then
5609 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5610 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
5613 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5615 CPPFLAGS="$cf_save2_CPPFLAGS"
5616 test "$cf_cv_ncurses_h2" != no && break
5618 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5618: error: not found" >&5
5619 echo "$as_me: error: not found" >&2;}
5620 { (exit 1); exit 1; }; }
5623 echo "$as_me:5623: result: $cf_cv_ncurses_h2" >&5
5624 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5626 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
5627 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
5628 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
5629 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
5632 if test -n "$cf_1st_incdir" ; then
5633 for cf_add_incdir in $cf_1st_incdir
5635 while test "$cf_add_incdir" != /usr/include
5637 if test -d "$cf_add_incdir"
5640 if test -n "$CFLAGS$CPPFLAGS" ; then
5641 # a loop is needed to ensure we can add subdirs of existing dirs
5642 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5643 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5644 cf_have_incdir=yes; break
5649 if test "$cf_have_incdir" = no ; then
5650 if test "$cf_add_incdir" = /usr/local/include ; then
5651 if test "$GCC" = yes
5653 cf_save_CPPFLAGS=$CPPFLAGS
5655 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5656 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5658 cat >"conftest.$ac_ext" <<_ACEOF
5659 #line 5659 "configure"
5660 #include "confdefs.h"
5670 rm -f "conftest.$ac_objext"
5671 if { (eval echo "$as_me:5671: \"$ac_compile\"") >&5
5672 (eval $ac_compile) 2>&5
5674 echo "$as_me:5674: \$? = $ac_status" >&5
5675 (exit "$ac_status"); } &&
5676 { ac_try='test -s "conftest.$ac_objext"'
5677 { (eval echo "$as_me:5677: \"$ac_try\"") >&5
5680 echo "$as_me:5680: \$? = $ac_status" >&5
5681 (exit "$ac_status"); }; }; then
5684 echo "$as_me: failed program was:" >&5
5685 cat "conftest.$ac_ext" >&5
5688 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5689 CPPFLAGS=$cf_save_CPPFLAGS
5694 if test "$cf_have_incdir" = no ; then
5695 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5697 echo "${as_me:-configure}:5697: testing adding $cf_add_incdir to include-path ..." 1>&5
5699 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5701 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5702 test "$cf_top_incdir" = "$cf_add_incdir" && break
5703 cf_add_incdir="$cf_top_incdir"
5716 # Set definitions to allow ifdef'ing for ncurses.h
5718 case "$cf_cv_ncurses_header" in
5721 cat >>confdefs.h <<\EOF
5722 #define HAVE_NCURSES_H 1
5728 case "$cf_cv_ncurses_header" in
5729 (ncurses/curses.h|ncurses/ncurses.h)
5731 cat >>confdefs.h <<\EOF
5732 #define HAVE_NCURSES_NCURSES_H 1
5736 (ncursesw/curses.h|ncursesw/ncurses.h)
5738 cat >>confdefs.h <<\EOF
5739 #define HAVE_NCURSESW_NCURSES_H 1
5745 echo "$as_me:5745: checking for terminfo header" >&5
5746 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5747 if test "${cf_cv_term_header+set}" = set; then
5748 echo $ECHO_N "(cached) $ECHO_C" >&6
5751 case "${cf_cv_ncurses_header}" in
5752 (*/ncurses.h|*/ncursesw.h)
5753 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5756 cf_term_header=term.h
5760 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5762 cat >"conftest.$ac_ext" <<_ACEOF
5763 #line 5763 "configure"
5764 #include "confdefs.h"
5766 #include <${cf_cv_ncurses_header:-curses.h}>
5772 int x = auto_left_margin; (void)x
5777 rm -f "conftest.$ac_objext"
5778 if { (eval echo "$as_me:5778: \"$ac_compile\"") >&5
5779 (eval $ac_compile) 2>&5
5781 echo "$as_me:5781: \$? = $ac_status" >&5
5782 (exit "$ac_status"); } &&
5783 { ac_try='test -s "conftest.$ac_objext"'
5784 { (eval echo "$as_me:5784: \"$ac_try\"") >&5
5787 echo "$as_me:5787: \$? = $ac_status" >&5
5788 (exit "$ac_status"); }; }; then
5790 cf_cv_term_header="$cf_test"
5792 echo "$as_me: failed program was:" >&5
5793 cat "conftest.$ac_ext" >&5
5795 cf_cv_term_header=unknown
5798 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5799 test "$cf_cv_term_header" != unknown && break
5803 echo "$as_me:5803: result: $cf_cv_term_header" >&5
5804 echo "${ECHO_T}$cf_cv_term_header" >&6
5806 # Set definitions to allow ifdef'ing to accommodate subdirectories
5808 case "$cf_cv_term_header" in
5811 cat >>confdefs.h <<\EOF
5812 #define HAVE_TERM_H 1
5818 case "$cf_cv_term_header" in
5821 cat >>confdefs.h <<\EOF
5822 #define HAVE_NCURSES_TERM_H 1
5828 cat >>confdefs.h <<\EOF
5829 #define HAVE_NCURSESW_TERM_H 1
5835 # some applications need this, but should check for NCURSES_VERSION
5837 cat >>confdefs.h <<\EOF
5841 echo "$as_me:5841: checking for ncurses version" >&5
5842 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5843 if test "${cf_cv_ncurses_version+set}" = set; then
5844 echo $ECHO_N "(cached) $ECHO_C" >&6
5847 cf_cv_ncurses_version=no
5849 rm -f "$cf_tempfile"
5850 if test "$cross_compiling" = yes; then
5852 # This will not work if the preprocessor splits the line after the
5853 # Autoconf token. The 'unproto' program does that.
5854 cat > "conftest.$ac_ext" <<EOF
5855 #include <${cf_cv_ncurses_header:-curses.h}>
5857 #ifdef NCURSES_VERSION
5858 Autoconf NCURSES_VERSION
5866 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5867 { (eval echo "$as_me:5867: \"$cf_try\"") >&5
5870 echo "$as_me:5870: \$? = $ac_status" >&5
5871 (exit "$ac_status"); }
5872 if test -f conftest.out ; then
5873 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
5874 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5879 cat >"conftest.$ac_ext" <<_ACEOF
5880 #line 5880 "configure"
5881 #include "confdefs.h"
5883 #include <${cf_cv_ncurses_header:-curses.h}>
5887 FILE *fp = fopen("$cf_tempfile", "w");
5888 #ifdef NCURSES_VERSION
5889 # ifdef NCURSES_VERSION_PATCH
5890 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5892 fprintf(fp, "%s\\n", NCURSES_VERSION);
5896 fprintf(fp, "old\\n");
5901 ${cf_cv_main_return:-return}(0);
5904 rm -f "conftest$ac_exeext"
5905 if { (eval echo "$as_me:5905: \"$ac_link\"") >&5
5906 (eval $ac_link) 2>&5
5908 echo "$as_me:5908: \$? = $ac_status" >&5
5909 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5910 { (eval echo "$as_me:5910: \"$ac_try\"") >&5
5913 echo "$as_me:5913: \$? = $ac_status" >&5
5914 (exit "$ac_status"); }; }; then
5916 cf_cv_ncurses_version=`cat $cf_tempfile`
5918 echo "$as_me: program exited with status $ac_status" >&5
5919 echo "$as_me: failed program was:" >&5
5920 cat "conftest.$ac_ext" >&5
5922 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5924 rm -f "$cf_tempfile"
5927 echo "$as_me:5927: result: $cf_cv_ncurses_version" >&5
5928 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5929 test "$cf_cv_ncurses_version" = no ||
5930 cat >>confdefs.h <<\EOF
5934 cf_nculib_root=ncurses
5935 # This works, except for the special case where we find gpm, but
5936 # ncurses is in a nonstandard location via $LIBS, and we really want
5939 cf_ncurses_SAVE="$LIBS"
5940 echo "$as_me:5940: checking for Gpm_Open in -lgpm" >&5
5941 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5942 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5943 echo $ECHO_N "(cached) $ECHO_C" >&6
5945 ac_check_lib_save_LIBS=$LIBS
5947 cat >"conftest.$ac_ext" <<_ACEOF
5948 #line 5948 "configure"
5949 #include "confdefs.h"
5951 /* Override any gcc2 internal prototype to avoid an error. */
5955 /* We use char because int might match the return type of a gcc2
5956 builtin and then its argument prototype would still apply. */
5966 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5967 if { (eval echo "$as_me:5967: \"$ac_link\"") >&5
5968 (eval $ac_link) 2>&5
5970 echo "$as_me:5970: \$? = $ac_status" >&5
5971 (exit "$ac_status"); } &&
5972 { ac_try='test -s "conftest$ac_exeext"'
5973 { (eval echo "$as_me:5973: \"$ac_try\"") >&5
5976 echo "$as_me:5976: \$? = $ac_status" >&5
5977 (exit "$ac_status"); }; }; then
5978 ac_cv_lib_gpm_Gpm_Open=yes
5980 echo "$as_me: failed program was:" >&5
5981 cat "conftest.$ac_ext" >&5
5982 ac_cv_lib_gpm_Gpm_Open=no
5984 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5985 LIBS=$ac_check_lib_save_LIBS
5987 echo "$as_me:5987: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5988 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5989 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
5990 echo "$as_me:5990: checking for initscr in -lgpm" >&5
5991 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5992 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5993 echo $ECHO_N "(cached) $ECHO_C" >&6
5995 ac_check_lib_save_LIBS=$LIBS
5997 cat >"conftest.$ac_ext" <<_ACEOF
5998 #line 5998 "configure"
5999 #include "confdefs.h"
6001 /* Override any gcc2 internal prototype to avoid an error. */
6005 /* We use char because int might match the return type of a gcc2
6006 builtin and then its argument prototype would still apply. */
6016 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6017 if { (eval echo "$as_me:6017: \"$ac_link\"") >&5
6018 (eval $ac_link) 2>&5
6020 echo "$as_me:6020: \$? = $ac_status" >&5
6021 (exit "$ac_status"); } &&
6022 { ac_try='test -s "conftest$ac_exeext"'
6023 { (eval echo "$as_me:6023: \"$ac_try\"") >&5
6026 echo "$as_me:6026: \$? = $ac_status" >&5
6027 (exit "$ac_status"); }; }; then
6028 ac_cv_lib_gpm_initscr=yes
6030 echo "$as_me: failed program was:" >&5
6031 cat "conftest.$ac_ext" >&5
6032 ac_cv_lib_gpm_initscr=no
6034 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6035 LIBS=$ac_check_lib_save_LIBS
6037 echo "$as_me:6037: result: $ac_cv_lib_gpm_initscr" >&5
6038 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6039 if test "$ac_cv_lib_gpm_initscr" = yes; then
6040 LIBS="$cf_ncurses_SAVE"
6042 cf_ncurses_LIBS="-lgpm"
6049 # This is only necessary if you are linking against an obsolete
6050 # version of ncurses (but it should do no harm, since it's static).
6051 if test "$cf_nculib_root" = ncurses ; then
6052 echo "$as_me:6052: checking for tgoto in -lmytinfo" >&5
6053 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6054 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6055 echo $ECHO_N "(cached) $ECHO_C" >&6
6057 ac_check_lib_save_LIBS=$LIBS
6058 LIBS="-lmytinfo $LIBS"
6059 cat >"conftest.$ac_ext" <<_ACEOF
6060 #line 6060 "configure"
6061 #include "confdefs.h"
6063 /* Override any gcc2 internal prototype to avoid an error. */
6067 /* We use char because int might match the return type of a gcc2
6068 builtin and then its argument prototype would still apply. */
6078 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6079 if { (eval echo "$as_me:6079: \"$ac_link\"") >&5
6080 (eval $ac_link) 2>&5
6082 echo "$as_me:6082: \$? = $ac_status" >&5
6083 (exit "$ac_status"); } &&
6084 { ac_try='test -s "conftest$ac_exeext"'
6085 { (eval echo "$as_me:6085: \"$ac_try\"") >&5
6088 echo "$as_me:6088: \$? = $ac_status" >&5
6089 (exit "$ac_status"); }; }; then
6090 ac_cv_lib_mytinfo_tgoto=yes
6092 echo "$as_me: failed program was:" >&5
6093 cat "conftest.$ac_ext" >&5
6094 ac_cv_lib_mytinfo_tgoto=no
6096 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6097 LIBS=$ac_check_lib_save_LIBS
6099 echo "$as_me:6099: result: $ac_cv_lib_mytinfo_tgoto" >&5
6100 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6101 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6102 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6112 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6114 for cf_add_1lib in $cf_add_0lib; do
6115 for cf_add_2lib in $cf_add_libs; do
6116 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6121 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6125 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6131 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6133 for cf_add_1lib in $cf_add_0lib; do
6134 for cf_add_2lib in $cf_add_libs; do
6135 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6140 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6146 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
6148 echo "$as_me:6148: checking for initscr" >&5
6149 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6150 if test "${ac_cv_func_initscr+set}" = set; then
6151 echo $ECHO_N "(cached) $ECHO_C" >&6
6153 cat >"conftest.$ac_ext" <<_ACEOF
6154 #line 6154 "configure"
6155 #include "confdefs.h"
6156 #define initscr autoconf_temporary
6157 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6164 /* We use char because int might match the return type of a gcc2
6165 builtin and then its argument prototype would still apply. */
6166 char initscr (void);
6172 /* The GNU C library defines stubs for functions which it implements
6173 to always fail with ENOSYS. Some functions are actually named
6174 something starting with __ and the normal name is an alias. */
6175 #if defined (__stub_initscr) || defined (__stub___initscr)
6176 #error found stub for initscr
6184 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6185 if { (eval echo "$as_me:6185: \"$ac_link\"") >&5
6186 (eval $ac_link) 2>&5
6188 echo "$as_me:6188: \$? = $ac_status" >&5
6189 (exit "$ac_status"); } &&
6190 { ac_try='test -s "conftest$ac_exeext"'
6191 { (eval echo "$as_me:6191: \"$ac_try\"") >&5
6194 echo "$as_me:6194: \$? = $ac_status" >&5
6195 (exit "$ac_status"); }; }; then
6196 ac_cv_func_initscr=yes
6198 echo "$as_me: failed program was:" >&5
6199 cat "conftest.$ac_ext" >&5
6200 ac_cv_func_initscr=no
6202 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6204 echo "$as_me:6204: result: $ac_cv_func_initscr" >&5
6205 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6206 if test "$ac_cv_func_initscr" = yes; then
6207 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6210 cf_save_LIBS="$LIBS"
6211 echo "$as_me:6211: checking for initscr in -l$cf_nculib_root" >&5
6212 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6213 LIBS="-l$cf_nculib_root $LIBS"
6214 cat >"conftest.$ac_ext" <<_ACEOF
6215 #line 6215 "configure"
6216 #include "confdefs.h"
6217 #include <${cf_cv_ncurses_header:-curses.h}>
6226 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6227 if { (eval echo "$as_me:6227: \"$ac_link\"") >&5
6228 (eval $ac_link) 2>&5
6230 echo "$as_me:6230: \$? = $ac_status" >&5
6231 (exit "$ac_status"); } &&
6232 { ac_try='test -s "conftest$ac_exeext"'
6233 { (eval echo "$as_me:6233: \"$ac_try\"") >&5
6236 echo "$as_me:6236: \$? = $ac_status" >&5
6237 (exit "$ac_status"); }; }; then
6238 echo "$as_me:6238: result: yes" >&5
6239 echo "${ECHO_T}yes" >&6
6240 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6243 echo "$as_me: failed program was:" >&5
6244 cat "conftest.$ac_ext" >&5
6245 echo "$as_me:6245: result: no" >&5
6246 echo "${ECHO_T}no" >&6
6249 cf_library_path_list=""
6250 if test -n "${LDFLAGS}${LIBS}" ; then
6251 for cf_library_path in $LDFLAGS $LIBS
6253 case "$cf_library_path" in
6255 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6257 test "x$cf_library_path" != "xNONE" && \
6258 test -d "$cf_library_path" && \
6260 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6261 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6262 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6263 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6264 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6265 test -d "$cf_library_path/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
6268 cf_library_path_list="$cf_library_path_list $cf_search"
6276 test "x$prefix" != "xNONE" && \
6277 test -d "$prefix" && \
6279 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6280 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6281 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6282 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6283 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6284 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6287 for cf_subdir_prefix in \
6296 test "x$cf_subdir_prefix" != "x$prefix" && \
6297 test -d "$cf_subdir_prefix" && \
6298 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6299 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6300 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6301 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
6302 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
6303 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
6304 test -d "$cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
6309 cf_search="$cf_library_path_list $cf_search"
6311 for cf_libdir in $cf_search
6313 echo "$as_me:6313: checking for -l$cf_nculib_root in $cf_libdir" >&5
6314 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6315 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6316 cat >"conftest.$ac_ext" <<_ACEOF
6317 #line 6317 "configure"
6318 #include "confdefs.h"
6319 #include <${cf_cv_ncurses_header:-curses.h}>
6328 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6329 if { (eval echo "$as_me:6329: \"$ac_link\"") >&5
6330 (eval $ac_link) 2>&5
6332 echo "$as_me:6332: \$? = $ac_status" >&5
6333 (exit "$ac_status"); } &&
6334 { ac_try='test -s "conftest$ac_exeext"'
6335 { (eval echo "$as_me:6335: \"$ac_try\"") >&5
6338 echo "$as_me:6338: \$? = $ac_status" >&5
6339 (exit "$ac_status"); }; }; then
6340 echo "$as_me:6340: result: yes" >&5
6341 echo "${ECHO_T}yes" >&6
6342 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6345 echo "$as_me: failed program was:" >&5
6346 cat "conftest.$ac_ext" >&5
6347 echo "$as_me:6347: result: no" >&5
6348 echo "${ECHO_T}no" >&6
6349 LIBS="$cf_save_LIBS"
6351 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6355 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6359 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
6361 if test "$cf_found_library" = no ; then
6362 { { echo "$as_me:6362: error: Cannot link $cf_nculib_root library" >&5
6363 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6364 { (exit 1); exit 1; }; }
6369 if test -n "$cf_ncurses_LIBS" ; then
6370 echo "$as_me:6370: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6371 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6372 cf_ncurses_SAVE="$LIBS"
6373 for p in $cf_ncurses_LIBS ; do
6374 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
6375 if test "$q" != "$LIBS" ; then
6379 cat >"conftest.$ac_ext" <<_ACEOF
6380 #line 6380 "configure"
6381 #include "confdefs.h"
6382 #include <${cf_cv_ncurses_header:-curses.h}>
6386 initscr(); mousemask(0,0); tigetstr((char *)0);
6391 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6392 if { (eval echo "$as_me:6392: \"$ac_link\"") >&5
6393 (eval $ac_link) 2>&5
6395 echo "$as_me:6395: \$? = $ac_status" >&5
6396 (exit "$ac_status"); } &&
6397 { ac_try='test -s "conftest$ac_exeext"'
6398 { (eval echo "$as_me:6398: \"$ac_try\"") >&5
6401 echo "$as_me:6401: \$? = $ac_status" >&5
6402 (exit "$ac_status"); }; }; then
6403 echo "$as_me:6403: result: yes" >&5
6404 echo "${ECHO_T}yes" >&6
6406 echo "$as_me: failed program was:" >&5
6407 cat "conftest.$ac_ext" >&5
6408 echo "$as_me:6408: result: no" >&5
6409 echo "${ECHO_T}no" >&6
6410 LIBS="$cf_ncurses_SAVE"
6412 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6415 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6417 cat >>confdefs.h <<EOF
6418 #define $cf_nculib_ROOT 1
6426 echo "$as_me:6426: checking if you want wide-character code" >&5
6427 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6429 # Check whether --enable-widec or --disable-widec was given.
6430 if test "${enable_widec+set}" = set; then
6431 enableval="$enable_widec"
6432 with_widec=$enableval
6436 echo "$as_me:6436: result: $with_widec" >&5
6437 echo "${ECHO_T}$with_widec" >&6
6438 if test "$with_widec" = yes ; then
6440 echo "$as_me:6440: checking for multibyte character support" >&5
6441 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6442 if test "${cf_cv_utf8_lib+set}" = set; then
6443 echo $ECHO_N "(cached) $ECHO_C" >&6
6446 cf_save_LIBS="$LIBS"
6447 cat >"conftest.$ac_ext" <<_ACEOF
6448 #line 6448 "configure"
6449 #include "confdefs.h"
6460 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6461 if { (eval echo "$as_me:6461: \"$ac_link\"") >&5
6462 (eval $ac_link) 2>&5
6464 echo "$as_me:6464: \$? = $ac_status" >&5
6465 (exit "$ac_status"); } &&
6466 { ac_try='test -s "conftest$ac_exeext"'
6467 { (eval echo "$as_me:6467: \"$ac_try\"") >&5
6470 echo "$as_me:6470: \$? = $ac_status" >&5
6471 (exit "$ac_status"); }; }; then
6474 echo "$as_me: failed program was:" >&5
6475 cat "conftest.$ac_ext" >&5
6477 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6478 # will be set on completion of the AC_TRY_LINK below.
6479 cf_cv_header_path_utf8=
6480 cf_cv_library_path_utf8=
6482 echo "${as_me:-configure}:6482: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6484 cf_save_LIBS="$LIBS"
6486 cat >"conftest.$ac_ext" <<_ACEOF
6487 #line 6487 "configure"
6488 #include "confdefs.h"
6490 #include <libutf8.h>
6499 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6500 if { (eval echo "$as_me:6500: \"$ac_link\"") >&5
6501 (eval $ac_link) 2>&5
6503 echo "$as_me:6503: \$? = $ac_status" >&5
6504 (exit "$ac_status"); } &&
6505 { ac_try='test -s "conftest$ac_exeext"'
6506 { (eval echo "$as_me:6506: \"$ac_try\"") >&5
6509 echo "$as_me:6509: \$? = $ac_status" >&5
6510 (exit "$ac_status"); }; }; then
6512 cf_cv_find_linkage_utf8=yes
6513 cf_cv_header_path_utf8=/usr/include
6514 cf_cv_library_path_utf8=/usr/lib
6517 echo "$as_me: failed program was:" >&5
6518 cat "conftest.$ac_ext" >&5
6520 LIBS="-lutf8 $cf_save_LIBS"
6522 cat >"conftest.$ac_ext" <<_ACEOF
6523 #line 6523 "configure"
6524 #include "confdefs.h"
6526 #include <libutf8.h>
6535 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6536 if { (eval echo "$as_me:6536: \"$ac_link\"") >&5
6537 (eval $ac_link) 2>&5
6539 echo "$as_me:6539: \$? = $ac_status" >&5
6540 (exit "$ac_status"); } &&
6541 { ac_try='test -s "conftest$ac_exeext"'
6542 { (eval echo "$as_me:6542: \"$ac_try\"") >&5
6545 echo "$as_me:6545: \$? = $ac_status" >&5
6546 (exit "$ac_status"); }; }; then
6548 cf_cv_find_linkage_utf8=yes
6549 cf_cv_header_path_utf8=/usr/include
6550 cf_cv_library_path_utf8=/usr/lib
6551 cf_cv_library_file_utf8="-lutf8"
6554 echo "$as_me: failed program was:" >&5
6555 cat "conftest.$ac_ext" >&5
6557 cf_cv_find_linkage_utf8=no
6558 LIBS="$cf_save_LIBS"
6560 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6562 echo "${as_me:-configure}:6562: testing find linkage for utf8 library ..." 1>&5
6564 echo "${as_me:-configure}:6564: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6566 cf_save_CPPFLAGS="$CPPFLAGS"
6567 cf_test_CPPFLAGS="$CPPFLAGS"
6571 # collect the current set of include-directories from compiler flags
6572 cf_header_path_list=""
6573 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6574 for cf_header_path in $CPPFLAGS $CFLAGS
6576 case "$cf_header_path" in
6578 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6580 test "x$cf_header_path" != "xNONE" && \
6581 test -d "$cf_header_path" && \
6583 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6584 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
6585 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
6586 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
6587 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
6588 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6591 cf_header_path_list="$cf_header_path_list $cf_search"
6597 # add the variations for the package we are looking for
6601 test "x$prefix" != "xNONE" && \
6602 test -d "$prefix" && \
6604 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6605 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
6606 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
6607 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
6608 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
6609 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
6612 for cf_subdir_prefix in \
6621 test "x$cf_subdir_prefix" != "x$prefix" && \
6622 test -d "$cf_subdir_prefix" && \
6623 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6624 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6625 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
6626 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6627 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6628 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6629 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6634 test "$includedir" != NONE && \
6635 test "$includedir" != "/usr/include" && \
6636 test -d "$includedir" && {
6637 test -d "$includedir" && cf_search="$cf_search $includedir"
6638 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
6641 test "$oldincludedir" != NONE && \
6642 test "$oldincludedir" != "/usr/include" && \
6643 test -d "$oldincludedir" && {
6644 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
6645 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
6648 cf_search="$cf_search $cf_header_path_list"
6650 for cf_cv_header_path_utf8 in $cf_search
6652 if test -d "$cf_cv_header_path_utf8" ; then
6653 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6655 echo "${as_me:-configure}:6655: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6657 CPPFLAGS="$cf_save_CPPFLAGS"
6659 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6660 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
6662 cat >"conftest.$ac_ext" <<_ACEOF
6663 #line 6663 "configure"
6664 #include "confdefs.h"
6666 #include <libutf8.h>
6675 rm -f "conftest.$ac_objext"
6676 if { (eval echo "$as_me:6676: \"$ac_compile\"") >&5
6677 (eval $ac_compile) 2>&5
6679 echo "$as_me:6679: \$? = $ac_status" >&5
6680 (exit "$ac_status"); } &&
6681 { ac_try='test -s "conftest.$ac_objext"'
6682 { (eval echo "$as_me:6682: \"$ac_try\"") >&5
6685 echo "$as_me:6685: \$? = $ac_status" >&5
6686 (exit "$ac_status"); }; }; then
6688 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6690 echo "${as_me:-configure}:6690: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6692 cf_cv_find_linkage_utf8=maybe
6693 cf_test_CPPFLAGS="$CPPFLAGS"
6696 echo "$as_me: failed program was:" >&5
6697 cat "conftest.$ac_ext" >&5
6699 CPPFLAGS="$cf_save_CPPFLAGS"
6702 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6706 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6708 echo "${as_me:-configure}:6708: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6710 cf_save_LIBS="$LIBS"
6711 cf_save_LDFLAGS="$LDFLAGS"
6713 if test "$cf_cv_find_linkage_utf8" != yes ; then
6716 cf_library_path_list=""
6717 if test -n "${LDFLAGS}${LIBS}" ; then
6718 for cf_library_path in $LDFLAGS $LIBS
6720 case "$cf_library_path" in
6722 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6724 test "x$cf_library_path" != "xNONE" && \
6725 test -d "$cf_library_path" && \
6727 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6728 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6729 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
6730 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6731 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
6732 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6735 cf_library_path_list="$cf_library_path_list $cf_search"
6743 test "x$prefix" != "xNONE" && \
6744 test -d "$prefix" && \
6746 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6747 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6748 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
6749 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
6750 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
6751 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
6754 for cf_subdir_prefix in \
6763 test "x$cf_subdir_prefix" != "x$prefix" && \
6764 test -d "$cf_subdir_prefix" && \
6765 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6766 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6767 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6768 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6769 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6770 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6771 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6776 cf_search="$cf_library_path_list $cf_search"
6778 for cf_cv_library_path_utf8 in $cf_search
6780 if test -d "$cf_cv_library_path_utf8" ; then
6781 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6783 echo "${as_me:-configure}:6783: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6785 CPPFLAGS="$cf_test_CPPFLAGS"
6786 LIBS="-lutf8 $cf_save_LIBS"
6787 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6788 cat >"conftest.$ac_ext" <<_ACEOF
6789 #line 6789 "configure"
6790 #include "confdefs.h"
6792 #include <libutf8.h>
6801 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6802 if { (eval echo "$as_me:6802: \"$ac_link\"") >&5
6803 (eval $ac_link) 2>&5
6805 echo "$as_me:6805: \$? = $ac_status" >&5
6806 (exit "$ac_status"); } &&
6807 { ac_try='test -s "conftest$ac_exeext"'
6808 { (eval echo "$as_me:6808: \"$ac_try\"") >&5
6811 echo "$as_me:6811: \$? = $ac_status" >&5
6812 (exit "$ac_status"); }; }; then
6814 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
6816 echo "${as_me:-configure}:6816: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
6818 cf_cv_find_linkage_utf8=yes
6819 cf_cv_library_file_utf8="-lutf8"
6822 echo "$as_me: failed program was:" >&5
6823 cat "conftest.$ac_ext" >&5
6825 CPPFLAGS="$cf_save_CPPFLAGS"
6826 LIBS="$cf_save_LIBS"
6827 LDFLAGS="$cf_save_LDFLAGS"
6830 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6833 CPPFLAGS="$cf_save_CPPFLAGS"
6834 LDFLAGS="$cf_save_LDFLAGS"
6838 cf_cv_find_linkage_utf8=no
6842 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6845 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6847 LIBS="$cf_save_LIBS"
6849 if test "$cf_cv_find_linkage_utf8" = yes ; then
6850 cf_cv_utf8_lib=add-on
6856 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6858 echo "$as_me:6858: result: $cf_cv_utf8_lib" >&5
6859 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
6861 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
6863 if test "$cf_cv_utf8_lib" = "add-on" ; then
6865 cat >>confdefs.h <<\EOF
6866 #define HAVE_LIBUTF8_H 1
6869 if test -n "$cf_cv_header_path_utf8" ; then
6870 for cf_add_incdir in $cf_cv_header_path_utf8
6872 while test "$cf_add_incdir" != /usr/include
6874 if test -d "$cf_add_incdir"
6877 if test -n "$CFLAGS$CPPFLAGS" ; then
6878 # a loop is needed to ensure we can add subdirs of existing dirs
6879 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6880 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6881 cf_have_incdir=yes; break
6886 if test "$cf_have_incdir" = no ; then
6887 if test "$cf_add_incdir" = /usr/local/include ; then
6888 if test "$GCC" = yes
6890 cf_save_CPPFLAGS=$CPPFLAGS
6892 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6893 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6895 cat >"conftest.$ac_ext" <<_ACEOF
6896 #line 6896 "configure"
6897 #include "confdefs.h"
6907 rm -f "conftest.$ac_objext"
6908 if { (eval echo "$as_me:6908: \"$ac_compile\"") >&5
6909 (eval $ac_compile) 2>&5
6911 echo "$as_me:6911: \$? = $ac_status" >&5
6912 (exit "$ac_status"); } &&
6913 { ac_try='test -s "conftest.$ac_objext"'
6914 { (eval echo "$as_me:6914: \"$ac_try\"") >&5
6917 echo "$as_me:6917: \$? = $ac_status" >&5
6918 (exit "$ac_status"); }; }; then
6921 echo "$as_me: failed program was:" >&5
6922 cat "conftest.$ac_ext" >&5
6925 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6926 CPPFLAGS=$cf_save_CPPFLAGS
6931 if test "$cf_have_incdir" = no ; then
6932 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6934 echo "${as_me:-configure}:6934: testing adding $cf_add_incdir to include-path ..." 1>&5
6936 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6938 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
6939 test "$cf_top_incdir" = "$cf_add_incdir" && break
6940 cf_add_incdir="$cf_top_incdir"
6951 if test -n "$cf_cv_library_path_utf8" ; then
6952 for cf_add_libdir in $cf_cv_library_path_utf8
6954 if test "$cf_add_libdir" = /usr/lib ; then
6956 elif test -d "$cf_add_libdir"
6959 if test -n "$LDFLAGS$LIBS" ; then
6960 # a loop is needed to ensure we can add subdirs of existing dirs
6961 for cf_test_libdir in $LDFLAGS $LIBS ; do
6962 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6963 cf_have_libdir=yes; break
6967 if test "$cf_have_libdir" = no ; then
6968 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6970 echo "${as_me:-configure}:6970: testing adding $cf_add_libdir to library-path ..." 1>&5
6972 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6981 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6983 for cf_add_1lib in $cf_add_0lib; do
6984 for cf_add_2lib in $cf_add_libs; do
6985 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6990 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6996 cf_ncuconfig_root=ncursesw
6997 cf_have_ncuconfig=no
6999 if test "x${PKG_CONFIG:=none}" != xnone; then
7000 echo "$as_me:7000: checking pkg-config for $cf_ncuconfig_root" >&5
7001 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7002 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7003 echo "$as_me:7003: result: yes" >&5
7004 echo "${ECHO_T}yes" >&6
7006 echo "$as_me:7006: checking if the $cf_ncuconfig_root package files work" >&5
7007 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7008 cf_have_ncuconfig=unknown
7010 cf_save_CFLAGS="$CFLAGS"
7011 cf_save_CPPFLAGS="$CPPFLAGS"
7012 cf_save_LIBS="$LIBS"
7014 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7015 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7017 # while -W for passing linker flags is prevalent, it is not "standard".
7018 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7019 # incompatible _and_ non-standard -W option which gives an error. Work
7020 # around that pitfall.
7021 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7027 cf_new_extra_cppflags=
7029 for cf_add_cflags in $cf_pkg_cflags
7031 case "$cf_fix_cppflags" in
7033 case "$cf_add_cflags" in
7034 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7035 case "$cf_add_cflags" in
7037 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7039 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7040 && test -z "${cf_tst_cflags}" \
7041 && cf_fix_cppflags=yes
7043 if test "$cf_fix_cppflags" = yes ; then
7045 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7046 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7049 elif test "${cf_tst_cflags}" = "\"'" ; then
7051 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7052 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7062 case "$cf_add_cflags" in
7064 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7066 CPPFLAGS=`echo "$CPPFLAGS" | \
7067 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7068 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7073 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7074 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7081 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7082 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7089 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7090 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7092 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7094 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7095 && test -z "${cf_tst_cflags}" \
7096 && cf_fix_cppflags=no
7101 if test -n "$cf_new_cflags" ; then
7103 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7104 CFLAGS="${CFLAGS}$cf_new_cflags"
7108 if test -n "$cf_new_cppflags" ; then
7110 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7111 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7115 if test -n "$cf_new_extra_cppflags" ; then
7117 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7118 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7125 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7127 for cf_add_1lib in $cf_add_0lib; do
7128 for cf_add_2lib in $cf_add_libs; do
7129 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7134 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7138 cat >"conftest.$ac_ext" <<_ACEOF
7139 #line 7139 "configure"
7140 #include "confdefs.h"
7141 #include <${cf_cv_ncurses_header:-curses.h}>
7145 initscr(); mousemask(0,0); tigetstr((char *)0);
7150 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7151 if { (eval echo "$as_me:7151: \"$ac_link\"") >&5
7152 (eval $ac_link) 2>&5
7154 echo "$as_me:7154: \$? = $ac_status" >&5
7155 (exit "$ac_status"); } &&
7156 { ac_try='test -s "conftest$ac_exeext"'
7157 { (eval echo "$as_me:7157: \"$ac_try\"") >&5
7160 echo "$as_me:7160: \$? = $ac_status" >&5
7161 (exit "$ac_status"); }; }; then
7162 if test "$cross_compiling" = yes; then
7163 cf_test_ncuconfig=maybe
7165 cat >"conftest.$ac_ext" <<_ACEOF
7166 #line 7166 "configure"
7167 #include "confdefs.h"
7168 #include <${cf_cv_ncurses_header:-curses.h}>
7170 { char *xx = curses_version(); return (xx == 0); }
7172 rm -f "conftest$ac_exeext"
7173 if { (eval echo "$as_me:7173: \"$ac_link\"") >&5
7174 (eval $ac_link) 2>&5
7176 echo "$as_me:7176: \$? = $ac_status" >&5
7177 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7178 { (eval echo "$as_me:7178: \"$ac_try\"") >&5
7181 echo "$as_me:7181: \$? = $ac_status" >&5
7182 (exit "$ac_status"); }; }; then
7183 cf_test_ncuconfig=yes
7185 echo "$as_me: program exited with status $ac_status" >&5
7186 echo "$as_me: failed program was:" >&5
7187 cat "conftest.$ac_ext" >&5
7188 cf_test_ncuconfig=no
7190 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7193 echo "$as_me: failed program was:" >&5
7194 cat "conftest.$ac_ext" >&5
7195 cf_test_ncuconfig=no
7197 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7199 CFLAGS="$cf_save_CFLAGS"
7200 CPPFLAGS="$cf_save_CPPFLAGS"
7201 LIBS="$cf_save_LIBS"
7203 if test "x$cf_test_ncuconfig" != xyes; then
7204 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7205 cf_pkg_cflags="$cf_temp"
7206 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7207 cf_pkg_libs="$cf_temp"
7215 cf_new_extra_cppflags=
7217 for cf_add_cflags in $cf_pkg_cflags
7219 case "$cf_fix_cppflags" in
7221 case "$cf_add_cflags" in
7222 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7223 case "$cf_add_cflags" in
7225 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7227 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7228 && test -z "${cf_tst_cflags}" \
7229 && cf_fix_cppflags=yes
7231 if test "$cf_fix_cppflags" = yes ; then
7233 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7234 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7237 elif test "${cf_tst_cflags}" = "\"'" ; then
7239 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7240 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7250 case "$cf_add_cflags" in
7252 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7254 CPPFLAGS=`echo "$CPPFLAGS" | \
7255 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7256 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7261 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7262 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7269 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7270 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7277 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7278 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7280 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7282 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7283 && test -z "${cf_tst_cflags}" \
7284 && cf_fix_cppflags=no
7289 if test -n "$cf_new_cflags" ; then
7291 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7292 CFLAGS="${CFLAGS}$cf_new_cflags"
7296 if test -n "$cf_new_cppflags" ; then
7298 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7299 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7303 if test -n "$cf_new_extra_cppflags" ; then
7305 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7306 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7313 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7315 for cf_add_1lib in $cf_add_0lib; do
7316 for cf_add_2lib in $cf_add_libs; do
7317 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7322 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7326 cat >"conftest.$ac_ext" <<_ACEOF
7327 #line 7327 "configure"
7328 #include "confdefs.h"
7329 #include <${cf_cv_ncurses_header:-curses.h}>
7333 initscr(); mousemask(0,0); tigetstr((char *)0);
7338 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7339 if { (eval echo "$as_me:7339: \"$ac_link\"") >&5
7340 (eval $ac_link) 2>&5
7342 echo "$as_me:7342: \$? = $ac_status" >&5
7343 (exit "$ac_status"); } &&
7344 { ac_try='test -s "conftest$ac_exeext"'
7345 { (eval echo "$as_me:7345: \"$ac_try\"") >&5
7348 echo "$as_me:7348: \$? = $ac_status" >&5
7349 (exit "$ac_status"); }; }; then
7350 if test "$cross_compiling" = yes; then
7351 cf_have_ncuconfig=maybe
7353 cat >"conftest.$ac_ext" <<_ACEOF
7354 #line 7354 "configure"
7355 #include "confdefs.h"
7356 #include <${cf_cv_ncurses_header:-curses.h}>
7358 { char *xx = curses_version(); return (xx == 0); }
7360 rm -f "conftest$ac_exeext"
7361 if { (eval echo "$as_me:7361: \"$ac_link\"") >&5
7362 (eval $ac_link) 2>&5
7364 echo "$as_me:7364: \$? = $ac_status" >&5
7365 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7366 { (eval echo "$as_me:7366: \"$ac_try\"") >&5
7369 echo "$as_me:7369: \$? = $ac_status" >&5
7370 (exit "$ac_status"); }; }; then
7371 cf_have_ncuconfig=yes
7373 echo "$as_me: program exited with status $ac_status" >&5
7374 echo "$as_me: failed program was:" >&5
7375 cat "conftest.$ac_ext" >&5
7376 cf_have_ncuconfig=no
7378 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7381 echo "$as_me: failed program was:" >&5
7382 cat "conftest.$ac_ext" >&5
7383 cf_have_ncuconfig=no
7385 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7386 echo "$as_me:7386: result: $cf_have_ncuconfig" >&5
7387 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7388 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7389 if test "$cf_have_ncuconfig" != "yes"
7391 CPPFLAGS="$cf_save_CPPFLAGS"
7392 LIBS="$cf_save_LIBS"
7393 NCURSES_CONFIG_PKG=none
7396 cat >>confdefs.h <<\EOF
7400 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7402 echo "$as_me:7402: checking for terminfo header" >&5
7403 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7404 if test "${cf_cv_term_header+set}" = set; then
7405 echo $ECHO_N "(cached) $ECHO_C" >&6
7408 case "${cf_cv_ncurses_header}" in
7409 (*/ncurses.h|*/ncursesw.h)
7410 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7413 cf_term_header=term.h
7417 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7419 cat >"conftest.$ac_ext" <<_ACEOF
7420 #line 7420 "configure"
7421 #include "confdefs.h"
7423 #include <${cf_cv_ncurses_header:-curses.h}>
7429 int x = auto_left_margin; (void)x
7434 rm -f "conftest.$ac_objext"
7435 if { (eval echo "$as_me:7435: \"$ac_compile\"") >&5
7436 (eval $ac_compile) 2>&5
7438 echo "$as_me:7438: \$? = $ac_status" >&5
7439 (exit "$ac_status"); } &&
7440 { ac_try='test -s "conftest.$ac_objext"'
7441 { (eval echo "$as_me:7441: \"$ac_try\"") >&5
7444 echo "$as_me:7444: \$? = $ac_status" >&5
7445 (exit "$ac_status"); }; }; then
7447 cf_cv_term_header="$cf_test"
7449 echo "$as_me: failed program was:" >&5
7450 cat "conftest.$ac_ext" >&5
7452 cf_cv_term_header=unknown
7455 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7456 test "$cf_cv_term_header" != unknown && break
7460 echo "$as_me:7460: result: $cf_cv_term_header" >&5
7461 echo "${ECHO_T}$cf_cv_term_header" >&6
7463 # Set definitions to allow ifdef'ing to accommodate subdirectories
7465 case "$cf_cv_term_header" in
7468 cat >>confdefs.h <<\EOF
7469 #define HAVE_TERM_H 1
7475 case "$cf_cv_term_header" in
7478 cat >>confdefs.h <<\EOF
7479 #define HAVE_NCURSES_TERM_H 1
7485 cat >>confdefs.h <<\EOF
7486 #define HAVE_NCURSESW_TERM_H 1
7495 echo "$as_me:7495: result: no" >&5
7496 echo "${ECHO_T}no" >&6
7497 NCURSES_CONFIG_PKG=none
7500 NCURSES_CONFIG_PKG=none
7503 if test "x$cf_have_ncuconfig" = "xno"; then
7504 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7506 if test -n "$ac_tool_prefix"; then
7507 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7509 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7510 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7511 echo "$as_me:7511: checking for $ac_word" >&5
7512 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7513 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7514 echo $ECHO_N "(cached) $ECHO_C" >&6
7516 if test -n "$NCURSES_CONFIG"; then
7517 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7519 ac_save_IFS=$IFS; IFS=$ac_path_separator
7521 for ac_dir in $ac_dummy; do
7523 test -z "$ac_dir" && ac_dir=.
7524 $as_executable_p "$ac_dir/$ac_word" || continue
7525 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7526 echo "$as_me:7526: found $ac_dir/$ac_word" >&5
7532 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7533 if test -n "$NCURSES_CONFIG"; then
7534 echo "$as_me:7534: result: $NCURSES_CONFIG" >&5
7535 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7537 echo "$as_me:7537: result: no" >&5
7538 echo "${ECHO_T}no" >&6
7541 test -n "$NCURSES_CONFIG" && break
7544 if test -z "$NCURSES_CONFIG"; then
7545 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7546 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7548 # Extract the first word of "$ac_prog", so it can be a program name with args.
7549 set dummy $ac_prog; ac_word=$2
7550 echo "$as_me:7550: checking for $ac_word" >&5
7551 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7552 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7553 echo $ECHO_N "(cached) $ECHO_C" >&6
7555 if test -n "$ac_ct_NCURSES_CONFIG"; then
7556 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7558 ac_save_IFS=$IFS; IFS=$ac_path_separator
7560 for ac_dir in $ac_dummy; do
7562 test -z "$ac_dir" && ac_dir=.
7563 $as_executable_p "$ac_dir/$ac_word" || continue
7564 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7565 echo "$as_me:7565: found $ac_dir/$ac_word" >&5
7571 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7572 if test -n "$ac_ct_NCURSES_CONFIG"; then
7573 echo "$as_me:7573: result: $ac_ct_NCURSES_CONFIG" >&5
7574 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7576 echo "$as_me:7576: result: no" >&5
7577 echo "${ECHO_T}no" >&6
7580 test -n "$ac_ct_NCURSES_CONFIG" && break
7582 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7584 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7587 if test "$NCURSES_CONFIG" != none ; then
7592 cf_new_extra_cppflags=
7594 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7596 case "$cf_fix_cppflags" in
7598 case "$cf_add_cflags" in
7599 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7600 case "$cf_add_cflags" in
7602 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7604 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7605 && test -z "${cf_tst_cflags}" \
7606 && cf_fix_cppflags=yes
7608 if test "$cf_fix_cppflags" = yes ; then
7610 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7611 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7614 elif test "${cf_tst_cflags}" = "\"'" ; then
7616 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7617 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7627 case "$cf_add_cflags" in
7629 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7631 CPPFLAGS=`echo "$CPPFLAGS" | \
7632 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7633 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7638 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7639 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7646 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7647 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7654 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7655 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7657 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7659 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7660 && test -z "${cf_tst_cflags}" \
7661 && cf_fix_cppflags=no
7666 if test -n "$cf_new_cflags" ; then
7668 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7669 CFLAGS="${CFLAGS}$cf_new_cflags"
7673 if test -n "$cf_new_cppflags" ; then
7675 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7676 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7680 if test -n "$cf_new_extra_cppflags" ; then
7682 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7683 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7690 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7692 for cf_add_1lib in $cf_add_0lib; do
7693 for cf_add_2lib in $cf_add_libs; do
7694 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7699 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7703 # even with config script, some packages use no-override for curses.h
7705 echo "$as_me:7705: checking if we have identified curses headers" >&5
7706 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7707 if test "${cf_cv_ncurses_header+set}" = set; then
7708 echo $ECHO_N "(cached) $ECHO_C" >&6
7711 cf_cv_ncurses_header=none
7713 ncurses.h ncursesw/ncurses.h \
7714 curses.h ncursesw/curses.h
7716 cat >"conftest.$ac_ext" <<_ACEOF
7717 #line 7717 "configure"
7718 #include "confdefs.h"
7719 #include <${cf_header}>
7723 initscr(); tgoto("?", 0,0)
7728 rm -f "conftest.$ac_objext"
7729 if { (eval echo "$as_me:7729: \"$ac_compile\"") >&5
7730 (eval $ac_compile) 2>&5
7732 echo "$as_me:7732: \$? = $ac_status" >&5
7733 (exit "$ac_status"); } &&
7734 { ac_try='test -s "conftest.$ac_objext"'
7735 { (eval echo "$as_me:7735: \"$ac_try\"") >&5
7738 echo "$as_me:7738: \$? = $ac_status" >&5
7739 (exit "$ac_status"); }; }; then
7740 cf_cv_ncurses_header=$cf_header; break
7742 echo "$as_me: failed program was:" >&5
7743 cat "conftest.$ac_ext" >&5
7745 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7749 echo "$as_me:7749: result: $cf_cv_ncurses_header" >&5
7750 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7752 if test "$cf_cv_ncurses_header" = none ; then
7753 { { echo "$as_me:7753: error: No curses header-files found" >&5
7754 echo "$as_me: error: No curses header-files found" >&2;}
7755 { (exit 1); exit 1; }; }
7758 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7760 for ac_header in $cf_cv_ncurses_header
7762 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7763 echo "$as_me:7763: checking for $ac_header" >&5
7764 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7765 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7766 echo $ECHO_N "(cached) $ECHO_C" >&6
7768 cat >"conftest.$ac_ext" <<_ACEOF
7769 #line 7769 "configure"
7770 #include "confdefs.h"
7771 #include <$ac_header>
7773 if { (eval echo "$as_me:7773: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7774 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7776 $EGREP -v '^ *\+' conftest.er1 >conftest.err
7778 cat conftest.err >&5
7779 echo "$as_me:7779: \$? = $ac_status" >&5
7780 (exit "$ac_status"); } >/dev/null; then
7781 if test -s conftest.err; then
7782 ac_cpp_err=$ac_c_preproc_warn_flag
7789 if test -z "$ac_cpp_err"; then
7790 eval "$as_ac_Header=yes"
7792 echo "$as_me: failed program was:" >&5
7793 cat "conftest.$ac_ext" >&5
7794 eval "$as_ac_Header=no"
7796 rm -f conftest.err "conftest.$ac_ext"
7798 echo "$as_me:7798: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7799 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7800 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7801 cat >>confdefs.h <<EOF
7802 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7808 cat >>confdefs.h <<\EOF
7812 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7814 cat >>confdefs.h <<EOF
7815 #define $cf_nculib_ROOT 1
7818 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
7822 cf_ncuhdr_root=ncursesw
7824 test -n "$cf_cv_curses_dir" && \
7825 test "$cf_cv_curses_dir" != "no" && { \
7827 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7828 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7830 while test "$cf_add_incdir" != /usr/include
7832 if test -d "$cf_add_incdir"
7835 if test -n "$CFLAGS$CPPFLAGS" ; then
7836 # a loop is needed to ensure we can add subdirs of existing dirs
7837 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7838 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7839 cf_have_incdir=yes; break
7844 if test "$cf_have_incdir" = no ; then
7845 if test "$cf_add_incdir" = /usr/local/include ; then
7846 if test "$GCC" = yes
7848 cf_save_CPPFLAGS=$CPPFLAGS
7850 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7851 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7853 cat >"conftest.$ac_ext" <<_ACEOF
7854 #line 7854 "configure"
7855 #include "confdefs.h"
7865 rm -f "conftest.$ac_objext"
7866 if { (eval echo "$as_me:7866: \"$ac_compile\"") >&5
7867 (eval $ac_compile) 2>&5
7869 echo "$as_me:7869: \$? = $ac_status" >&5
7870 (exit "$ac_status"); } &&
7871 { ac_try='test -s "conftest.$ac_objext"'
7872 { (eval echo "$as_me:7872: \"$ac_try\"") >&5
7875 echo "$as_me:7875: \$? = $ac_status" >&5
7876 (exit "$ac_status"); }; }; then
7879 echo "$as_me: failed program was:" >&5
7880 cat "conftest.$ac_ext" >&5
7883 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7884 CPPFLAGS=$cf_save_CPPFLAGS
7889 if test "$cf_have_incdir" = no ; then
7890 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7892 echo "${as_me:-configure}:7892: testing adding $cf_add_incdir to include-path ..." 1>&5
7894 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7896 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7897 test "$cf_top_incdir" = "$cf_add_incdir" && break
7898 cf_add_incdir="$cf_top_incdir"
7911 echo "$as_me:7911: checking for $cf_ncuhdr_root header in include-path" >&5
7912 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
7913 if test "${cf_cv_ncurses_h+set}" = set; then
7914 echo $ECHO_N "(cached) $ECHO_C" >&6
7917 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
7918 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
7919 for cf_header in $cf_header_list
7922 cat >"conftest.$ac_ext" <<_ACEOF
7923 #line 7923 "configure"
7924 #include "confdefs.h"
7926 #define _XOPEN_SOURCE_EXTENDED
7927 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
7928 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
7930 #include <$cf_header>
7935 #ifdef NCURSES_VERSION
7941 printf("%s\\n", NCURSES_VERSION);
7954 rm -f "conftest.$ac_objext"
7955 if { (eval echo "$as_me:7955: \"$ac_compile\"") >&5
7956 (eval $ac_compile) 2>&5
7958 echo "$as_me:7958: \$? = $ac_status" >&5
7959 (exit "$ac_status"); } &&
7960 { ac_try='test -s "conftest.$ac_objext"'
7961 { (eval echo "$as_me:7961: \"$ac_try\"") >&5
7964 echo "$as_me:7964: \$? = $ac_status" >&5
7965 (exit "$ac_status"); }; }; then
7966 cf_cv_ncurses_h=$cf_header
7969 echo "$as_me: failed program was:" >&5
7970 cat "conftest.$ac_ext" >&5
7973 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7975 test "$cf_cv_ncurses_h" != no && break
7979 echo "$as_me:7979: result: $cf_cv_ncurses_h" >&5
7980 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
7982 if test "$cf_cv_ncurses_h" != no ; then
7983 cf_cv_ncurses_header=$cf_cv_ncurses_h
7986 echo "$as_me:7986: checking for $cf_ncuhdr_root include-path" >&5
7987 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
7988 if test "${cf_cv_ncurses_h2+set}" = set; then
7989 echo $ECHO_N "(cached) $ECHO_C" >&6
7992 test -n "$verbose" && echo
7996 # collect the current set of include-directories from compiler flags
7997 cf_header_path_list=""
7998 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7999 for cf_header_path in $CPPFLAGS $CFLAGS
8001 case "$cf_header_path" in
8003 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8005 test "x$cf_header_path" != "xNONE" && \
8006 test -d "$cf_header_path" && \
8008 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8009 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8010 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8011 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8012 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8013 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"
8016 cf_header_path_list="$cf_header_path_list $cf_search"
8022 # add the variations for the package we are looking for
8026 test "x$prefix" != "xNONE" && \
8027 test -d "$prefix" && \
8029 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8030 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8031 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8032 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8033 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8034 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8037 for cf_subdir_prefix in \
8046 test "x$cf_subdir_prefix" != "x$prefix" && \
8047 test -d "$cf_subdir_prefix" && \
8048 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8049 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8050 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8051 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8052 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8053 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8054 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"
8059 test "$includedir" != NONE && \
8060 test "$includedir" != "/usr/include" && \
8061 test -d "$includedir" && {
8062 test -d "$includedir" && cf_search="$cf_search $includedir"
8063 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8066 test "$oldincludedir" != NONE && \
8067 test "$oldincludedir" != "/usr/include" && \
8068 test -d "$oldincludedir" && {
8069 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8070 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8073 cf_search="$cf_search $cf_header_path_list"
8075 test -n "$verbose" && echo "search path $cf_search"
8076 cf_save2_CPPFLAGS="$CPPFLAGS"
8077 for cf_incdir in $cf_search
8080 if test -n "$cf_incdir" ; then
8081 for cf_add_incdir in $cf_incdir
8083 while test "$cf_add_incdir" != /usr/include
8085 if test -d "$cf_add_incdir"
8088 if test -n "$CFLAGS$CPPFLAGS" ; then
8089 # a loop is needed to ensure we can add subdirs of existing dirs
8090 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8091 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8092 cf_have_incdir=yes; break
8097 if test "$cf_have_incdir" = no ; then
8098 if test "$cf_add_incdir" = /usr/local/include ; then
8099 if test "$GCC" = yes
8101 cf_save_CPPFLAGS=$CPPFLAGS
8103 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8104 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8106 cat >"conftest.$ac_ext" <<_ACEOF
8107 #line 8107 "configure"
8108 #include "confdefs.h"
8118 rm -f "conftest.$ac_objext"
8119 if { (eval echo "$as_me:8119: \"$ac_compile\"") >&5
8120 (eval $ac_compile) 2>&5
8122 echo "$as_me:8122: \$? = $ac_status" >&5
8123 (exit "$ac_status"); } &&
8124 { ac_try='test -s "conftest.$ac_objext"'
8125 { (eval echo "$as_me:8125: \"$ac_try\"") >&5
8128 echo "$as_me:8128: \$? = $ac_status" >&5
8129 (exit "$ac_status"); }; }; then
8132 echo "$as_me: failed program was:" >&5
8133 cat "conftest.$ac_ext" >&5
8136 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8137 CPPFLAGS=$cf_save_CPPFLAGS
8142 if test "$cf_have_incdir" = no ; then
8143 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8145 echo "${as_me:-configure}:8145: testing adding $cf_add_incdir to include-path ..." 1>&5
8147 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8149 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8150 test "$cf_top_incdir" = "$cf_add_incdir" && break
8151 cf_add_incdir="$cf_top_incdir"
8167 cat >"conftest.$ac_ext" <<_ACEOF
8168 #line 8168 "configure"
8169 #include "confdefs.h"
8171 #include <$cf_header>
8176 #ifdef NCURSES_VERSION
8178 printf("%s\\n", NCURSES_VERSION);
8191 rm -f "conftest.$ac_objext"
8192 if { (eval echo "$as_me:8192: \"$ac_compile\"") >&5
8193 (eval $ac_compile) 2>&5
8195 echo "$as_me:8195: \$? = $ac_status" >&5
8196 (exit "$ac_status"); } &&
8197 { ac_try='test -s "conftest.$ac_objext"'
8198 { (eval echo "$as_me:8198: \"$ac_try\"") >&5
8201 echo "$as_me:8201: \$? = $ac_status" >&5
8202 (exit "$ac_status"); }; }; then
8203 cf_cv_ncurses_h2=$cf_header
8206 echo "$as_me: failed program was:" >&5
8207 cat "conftest.$ac_ext" >&5
8210 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8212 if test "$cf_cv_ncurses_h2" != no ; then
8213 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8214 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
8217 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8219 CPPFLAGS="$cf_save2_CPPFLAGS"
8220 test "$cf_cv_ncurses_h2" != no && break
8222 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8222: error: not found" >&5
8223 echo "$as_me: error: not found" >&2;}
8224 { (exit 1); exit 1; }; }
8227 echo "$as_me:8227: result: $cf_cv_ncurses_h2" >&5
8228 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8230 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
8231 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
8232 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
8233 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
8236 if test -n "$cf_1st_incdir" ; then
8237 for cf_add_incdir in $cf_1st_incdir
8239 while test "$cf_add_incdir" != /usr/include
8241 if test -d "$cf_add_incdir"
8244 if test -n "$CFLAGS$CPPFLAGS" ; then
8245 # a loop is needed to ensure we can add subdirs of existing dirs
8246 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8247 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8248 cf_have_incdir=yes; break
8253 if test "$cf_have_incdir" = no ; then
8254 if test "$cf_add_incdir" = /usr/local/include ; then
8255 if test "$GCC" = yes
8257 cf_save_CPPFLAGS=$CPPFLAGS
8259 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8260 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8262 cat >"conftest.$ac_ext" <<_ACEOF
8263 #line 8263 "configure"
8264 #include "confdefs.h"
8274 rm -f "conftest.$ac_objext"
8275 if { (eval echo "$as_me:8275: \"$ac_compile\"") >&5
8276 (eval $ac_compile) 2>&5
8278 echo "$as_me:8278: \$? = $ac_status" >&5
8279 (exit "$ac_status"); } &&
8280 { ac_try='test -s "conftest.$ac_objext"'
8281 { (eval echo "$as_me:8281: \"$ac_try\"") >&5
8284 echo "$as_me:8284: \$? = $ac_status" >&5
8285 (exit "$ac_status"); }; }; then
8288 echo "$as_me: failed program was:" >&5
8289 cat "conftest.$ac_ext" >&5
8292 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8293 CPPFLAGS=$cf_save_CPPFLAGS
8298 if test "$cf_have_incdir" = no ; then
8299 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8301 echo "${as_me:-configure}:8301: testing adding $cf_add_incdir to include-path ..." 1>&5
8303 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8305 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8306 test "$cf_top_incdir" = "$cf_add_incdir" && break
8307 cf_add_incdir="$cf_top_incdir"
8320 # Set definitions to allow ifdef'ing for ncurses.h
8322 case "$cf_cv_ncurses_header" in
8325 cat >>confdefs.h <<\EOF
8326 #define HAVE_NCURSES_H 1
8332 case "$cf_cv_ncurses_header" in
8333 (ncurses/curses.h|ncurses/ncurses.h)
8335 cat >>confdefs.h <<\EOF
8336 #define HAVE_NCURSES_NCURSES_H 1
8340 (ncursesw/curses.h|ncursesw/ncurses.h)
8342 cat >>confdefs.h <<\EOF
8343 #define HAVE_NCURSESW_NCURSES_H 1
8349 echo "$as_me:8349: checking for terminfo header" >&5
8350 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8351 if test "${cf_cv_term_header+set}" = set; then
8352 echo $ECHO_N "(cached) $ECHO_C" >&6
8355 case "${cf_cv_ncurses_header}" in
8356 (*/ncurses.h|*/ncursesw.h)
8357 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8360 cf_term_header=term.h
8364 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8366 cat >"conftest.$ac_ext" <<_ACEOF
8367 #line 8367 "configure"
8368 #include "confdefs.h"
8370 #include <${cf_cv_ncurses_header:-curses.h}>
8376 int x = auto_left_margin; (void)x
8381 rm -f "conftest.$ac_objext"
8382 if { (eval echo "$as_me:8382: \"$ac_compile\"") >&5
8383 (eval $ac_compile) 2>&5
8385 echo "$as_me:8385: \$? = $ac_status" >&5
8386 (exit "$ac_status"); } &&
8387 { ac_try='test -s "conftest.$ac_objext"'
8388 { (eval echo "$as_me:8388: \"$ac_try\"") >&5
8391 echo "$as_me:8391: \$? = $ac_status" >&5
8392 (exit "$ac_status"); }; }; then
8394 cf_cv_term_header="$cf_test"
8396 echo "$as_me: failed program was:" >&5
8397 cat "conftest.$ac_ext" >&5
8399 cf_cv_term_header=unknown
8402 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8403 test "$cf_cv_term_header" != unknown && break
8407 echo "$as_me:8407: result: $cf_cv_term_header" >&5
8408 echo "${ECHO_T}$cf_cv_term_header" >&6
8410 # Set definitions to allow ifdef'ing to accommodate subdirectories
8412 case "$cf_cv_term_header" in
8415 cat >>confdefs.h <<\EOF
8416 #define HAVE_TERM_H 1
8422 case "$cf_cv_term_header" in
8425 cat >>confdefs.h <<\EOF
8426 #define HAVE_NCURSES_TERM_H 1
8432 cat >>confdefs.h <<\EOF
8433 #define HAVE_NCURSESW_TERM_H 1
8439 # some applications need this, but should check for NCURSES_VERSION
8441 cat >>confdefs.h <<\EOF
8445 echo "$as_me:8445: checking for ncurses version" >&5
8446 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8447 if test "${cf_cv_ncurses_version+set}" = set; then
8448 echo $ECHO_N "(cached) $ECHO_C" >&6
8451 cf_cv_ncurses_version=no
8453 rm -f "$cf_tempfile"
8454 if test "$cross_compiling" = yes; then
8456 # This will not work if the preprocessor splits the line after the
8457 # Autoconf token. The 'unproto' program does that.
8458 cat > "conftest.$ac_ext" <<EOF
8459 #include <${cf_cv_ncurses_header:-curses.h}>
8461 #ifdef NCURSES_VERSION
8462 Autoconf NCURSES_VERSION
8470 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8471 { (eval echo "$as_me:8471: \"$cf_try\"") >&5
8474 echo "$as_me:8474: \$? = $ac_status" >&5
8475 (exit "$ac_status"); }
8476 if test -f conftest.out ; then
8477 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
8478 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8483 cat >"conftest.$ac_ext" <<_ACEOF
8484 #line 8484 "configure"
8485 #include "confdefs.h"
8487 #include <${cf_cv_ncurses_header:-curses.h}>
8491 FILE *fp = fopen("$cf_tempfile", "w");
8492 #ifdef NCURSES_VERSION
8493 # ifdef NCURSES_VERSION_PATCH
8494 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8496 fprintf(fp, "%s\\n", NCURSES_VERSION);
8500 fprintf(fp, "old\\n");
8505 ${cf_cv_main_return:-return}(0);
8508 rm -f "conftest$ac_exeext"
8509 if { (eval echo "$as_me:8509: \"$ac_link\"") >&5
8510 (eval $ac_link) 2>&5
8512 echo "$as_me:8512: \$? = $ac_status" >&5
8513 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8514 { (eval echo "$as_me:8514: \"$ac_try\"") >&5
8517 echo "$as_me:8517: \$? = $ac_status" >&5
8518 (exit "$ac_status"); }; }; then
8520 cf_cv_ncurses_version=`cat $cf_tempfile`
8522 echo "$as_me: program exited with status $ac_status" >&5
8523 echo "$as_me: failed program was:" >&5
8524 cat "conftest.$ac_ext" >&5
8526 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8528 rm -f "$cf_tempfile"
8531 echo "$as_me:8531: result: $cf_cv_ncurses_version" >&5
8532 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8533 test "$cf_cv_ncurses_version" = no ||
8534 cat >>confdefs.h <<\EOF
8538 cf_nculib_root=ncursesw
8539 # This works, except for the special case where we find gpm, but
8540 # ncurses is in a nonstandard location via $LIBS, and we really want
8543 cf_ncurses_SAVE="$LIBS"
8544 echo "$as_me:8544: checking for Gpm_Open in -lgpm" >&5
8545 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8546 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8547 echo $ECHO_N "(cached) $ECHO_C" >&6
8549 ac_check_lib_save_LIBS=$LIBS
8551 cat >"conftest.$ac_ext" <<_ACEOF
8552 #line 8552 "configure"
8553 #include "confdefs.h"
8555 /* Override any gcc2 internal prototype to avoid an error. */
8559 /* We use char because int might match the return type of a gcc2
8560 builtin and then its argument prototype would still apply. */
8570 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8571 if { (eval echo "$as_me:8571: \"$ac_link\"") >&5
8572 (eval $ac_link) 2>&5
8574 echo "$as_me:8574: \$? = $ac_status" >&5
8575 (exit "$ac_status"); } &&
8576 { ac_try='test -s "conftest$ac_exeext"'
8577 { (eval echo "$as_me:8577: \"$ac_try\"") >&5
8580 echo "$as_me:8580: \$? = $ac_status" >&5
8581 (exit "$ac_status"); }; }; then
8582 ac_cv_lib_gpm_Gpm_Open=yes
8584 echo "$as_me: failed program was:" >&5
8585 cat "conftest.$ac_ext" >&5
8586 ac_cv_lib_gpm_Gpm_Open=no
8588 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8589 LIBS=$ac_check_lib_save_LIBS
8591 echo "$as_me:8591: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8592 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8593 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
8594 echo "$as_me:8594: checking for initscr in -lgpm" >&5
8595 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8596 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8597 echo $ECHO_N "(cached) $ECHO_C" >&6
8599 ac_check_lib_save_LIBS=$LIBS
8601 cat >"conftest.$ac_ext" <<_ACEOF
8602 #line 8602 "configure"
8603 #include "confdefs.h"
8605 /* Override any gcc2 internal prototype to avoid an error. */
8609 /* We use char because int might match the return type of a gcc2
8610 builtin and then its argument prototype would still apply. */
8620 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8621 if { (eval echo "$as_me:8621: \"$ac_link\"") >&5
8622 (eval $ac_link) 2>&5
8624 echo "$as_me:8624: \$? = $ac_status" >&5
8625 (exit "$ac_status"); } &&
8626 { ac_try='test -s "conftest$ac_exeext"'
8627 { (eval echo "$as_me:8627: \"$ac_try\"") >&5
8630 echo "$as_me:8630: \$? = $ac_status" >&5
8631 (exit "$ac_status"); }; }; then
8632 ac_cv_lib_gpm_initscr=yes
8634 echo "$as_me: failed program was:" >&5
8635 cat "conftest.$ac_ext" >&5
8636 ac_cv_lib_gpm_initscr=no
8638 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8639 LIBS=$ac_check_lib_save_LIBS
8641 echo "$as_me:8641: result: $ac_cv_lib_gpm_initscr" >&5
8642 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8643 if test "$ac_cv_lib_gpm_initscr" = yes; then
8644 LIBS="$cf_ncurses_SAVE"
8646 cf_ncurses_LIBS="-lgpm"
8653 # This is only necessary if you are linking against an obsolete
8654 # version of ncurses (but it should do no harm, since it's static).
8655 if test "$cf_nculib_root" = ncurses ; then
8656 echo "$as_me:8656: checking for tgoto in -lmytinfo" >&5
8657 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8658 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8659 echo $ECHO_N "(cached) $ECHO_C" >&6
8661 ac_check_lib_save_LIBS=$LIBS
8662 LIBS="-lmytinfo $LIBS"
8663 cat >"conftest.$ac_ext" <<_ACEOF
8664 #line 8664 "configure"
8665 #include "confdefs.h"
8667 /* Override any gcc2 internal prototype to avoid an error. */
8671 /* We use char because int might match the return type of a gcc2
8672 builtin and then its argument prototype would still apply. */
8682 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8683 if { (eval echo "$as_me:8683: \"$ac_link\"") >&5
8684 (eval $ac_link) 2>&5
8686 echo "$as_me:8686: \$? = $ac_status" >&5
8687 (exit "$ac_status"); } &&
8688 { ac_try='test -s "conftest$ac_exeext"'
8689 { (eval echo "$as_me:8689: \"$ac_try\"") >&5
8692 echo "$as_me:8692: \$? = $ac_status" >&5
8693 (exit "$ac_status"); }; }; then
8694 ac_cv_lib_mytinfo_tgoto=yes
8696 echo "$as_me: failed program was:" >&5
8697 cat "conftest.$ac_ext" >&5
8698 ac_cv_lib_mytinfo_tgoto=no
8700 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8701 LIBS=$ac_check_lib_save_LIBS
8703 echo "$as_me:8703: result: $ac_cv_lib_mytinfo_tgoto" >&5
8704 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8705 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
8706 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8716 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8718 for cf_add_1lib in $cf_add_0lib; do
8719 for cf_add_2lib in $cf_add_libs; do
8720 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8725 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8729 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
8735 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8737 for cf_add_1lib in $cf_add_0lib; do
8738 for cf_add_2lib in $cf_add_libs; do
8739 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8744 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8750 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
8752 echo "$as_me:8752: checking for initscr" >&5
8753 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8754 if test "${ac_cv_func_initscr+set}" = set; then
8755 echo $ECHO_N "(cached) $ECHO_C" >&6
8757 cat >"conftest.$ac_ext" <<_ACEOF
8758 #line 8758 "configure"
8759 #include "confdefs.h"
8760 #define initscr autoconf_temporary
8761 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
8768 /* We use char because int might match the return type of a gcc2
8769 builtin and then its argument prototype would still apply. */
8770 char initscr (void);
8776 /* The GNU C library defines stubs for functions which it implements
8777 to always fail with ENOSYS. Some functions are actually named
8778 something starting with __ and the normal name is an alias. */
8779 #if defined (__stub_initscr) || defined (__stub___initscr)
8780 #error found stub for initscr
8788 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8789 if { (eval echo "$as_me:8789: \"$ac_link\"") >&5
8790 (eval $ac_link) 2>&5
8792 echo "$as_me:8792: \$? = $ac_status" >&5
8793 (exit "$ac_status"); } &&
8794 { ac_try='test -s "conftest$ac_exeext"'
8795 { (eval echo "$as_me:8795: \"$ac_try\"") >&5
8798 echo "$as_me:8798: \$? = $ac_status" >&5
8799 (exit "$ac_status"); }; }; then
8800 ac_cv_func_initscr=yes
8802 echo "$as_me: failed program was:" >&5
8803 cat "conftest.$ac_ext" >&5
8804 ac_cv_func_initscr=no
8806 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8808 echo "$as_me:8808: result: $ac_cv_func_initscr" >&5
8809 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8810 if test "$ac_cv_func_initscr" = yes; then
8811 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
8814 cf_save_LIBS="$LIBS"
8815 echo "$as_me:8815: checking for initscr in -l$cf_nculib_root" >&5
8816 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8817 LIBS="-l$cf_nculib_root $LIBS"
8818 cat >"conftest.$ac_ext" <<_ACEOF
8819 #line 8819 "configure"
8820 #include "confdefs.h"
8821 #include <${cf_cv_ncurses_header:-curses.h}>
8830 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8831 if { (eval echo "$as_me:8831: \"$ac_link\"") >&5
8832 (eval $ac_link) 2>&5
8834 echo "$as_me:8834: \$? = $ac_status" >&5
8835 (exit "$ac_status"); } &&
8836 { ac_try='test -s "conftest$ac_exeext"'
8837 { (eval echo "$as_me:8837: \"$ac_try\"") >&5
8840 echo "$as_me:8840: \$? = $ac_status" >&5
8841 (exit "$ac_status"); }; }; then
8842 echo "$as_me:8842: result: yes" >&5
8843 echo "${ECHO_T}yes" >&6
8844 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
8847 echo "$as_me: failed program was:" >&5
8848 cat "conftest.$ac_ext" >&5
8849 echo "$as_me:8849: result: no" >&5
8850 echo "${ECHO_T}no" >&6
8853 cf_library_path_list=""
8854 if test -n "${LDFLAGS}${LIBS}" ; then
8855 for cf_library_path in $LDFLAGS $LIBS
8857 case "$cf_library_path" in
8859 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8861 test "x$cf_library_path" != "xNONE" && \
8862 test -d "$cf_library_path" && \
8864 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8865 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
8866 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
8867 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
8868 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
8869 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"
8872 cf_library_path_list="$cf_library_path_list $cf_search"
8880 test "x$prefix" != "xNONE" && \
8881 test -d "$prefix" && \
8883 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8884 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
8885 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
8886 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
8887 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
8888 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
8891 for cf_subdir_prefix in \
8900 test "x$cf_subdir_prefix" != "x$prefix" && \
8901 test -d "$cf_subdir_prefix" && \
8902 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8903 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
8904 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
8905 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
8906 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
8907 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
8908 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"
8913 cf_search="$cf_library_path_list $cf_search"
8915 for cf_libdir in $cf_search
8917 echo "$as_me:8917: checking for -l$cf_nculib_root in $cf_libdir" >&5
8918 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
8919 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
8920 cat >"conftest.$ac_ext" <<_ACEOF
8921 #line 8921 "configure"
8922 #include "confdefs.h"
8923 #include <${cf_cv_ncurses_header:-curses.h}>
8932 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8933 if { (eval echo "$as_me:8933: \"$ac_link\"") >&5
8934 (eval $ac_link) 2>&5
8936 echo "$as_me:8936: \$? = $ac_status" >&5
8937 (exit "$ac_status"); } &&
8938 { ac_try='test -s "conftest$ac_exeext"'
8939 { (eval echo "$as_me:8939: \"$ac_try\"") >&5
8942 echo "$as_me:8942: \$? = $ac_status" >&5
8943 (exit "$ac_status"); }; }; then
8944 echo "$as_me:8944: result: yes" >&5
8945 echo "${ECHO_T}yes" >&6
8946 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
8949 echo "$as_me: failed program was:" >&5
8950 cat "conftest.$ac_ext" >&5
8951 echo "$as_me:8951: result: no" >&5
8952 echo "${ECHO_T}no" >&6
8953 LIBS="$cf_save_LIBS"
8955 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8959 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8963 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
8965 if test "$cf_found_library" = no ; then
8966 { { echo "$as_me:8966: error: Cannot link $cf_nculib_root library" >&5
8967 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
8968 { (exit 1); exit 1; }; }
8973 if test -n "$cf_ncurses_LIBS" ; then
8974 echo "$as_me:8974: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
8975 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
8976 cf_ncurses_SAVE="$LIBS"
8977 for p in $cf_ncurses_LIBS ; do
8978 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
8979 if test "$q" != "$LIBS" ; then
8983 cat >"conftest.$ac_ext" <<_ACEOF
8984 #line 8984 "configure"
8985 #include "confdefs.h"
8986 #include <${cf_cv_ncurses_header:-curses.h}>
8990 initscr(); mousemask(0,0); tigetstr((char *)0);
8995 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8996 if { (eval echo "$as_me:8996: \"$ac_link\"") >&5
8997 (eval $ac_link) 2>&5
8999 echo "$as_me:8999: \$? = $ac_status" >&5
9000 (exit "$ac_status"); } &&
9001 { ac_try='test -s "conftest$ac_exeext"'
9002 { (eval echo "$as_me:9002: \"$ac_try\"") >&5
9005 echo "$as_me:9005: \$? = $ac_status" >&5
9006 (exit "$ac_status"); }; }; then
9007 echo "$as_me:9007: result: yes" >&5
9008 echo "${ECHO_T}yes" >&6
9010 echo "$as_me: failed program was:" >&5
9011 cat "conftest.$ac_ext" >&5
9012 echo "$as_me:9012: result: no" >&5
9013 echo "${ECHO_T}no" >&6
9014 LIBS="$cf_ncurses_SAVE"
9016 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9019 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9021 cat >>confdefs.h <<EOF
9022 #define $cf_nculib_ROOT 1
9032 cf_ncuconfig_root=ncurses
9033 cf_have_ncuconfig=no
9035 if test "x${PKG_CONFIG:=none}" != xnone; then
9036 echo "$as_me:9036: checking pkg-config for $cf_ncuconfig_root" >&5
9037 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9038 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9039 echo "$as_me:9039: result: yes" >&5
9040 echo "${ECHO_T}yes" >&6
9042 echo "$as_me:9042: checking if the $cf_ncuconfig_root package files work" >&5
9043 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9044 cf_have_ncuconfig=unknown
9046 cf_save_CFLAGS="$CFLAGS"
9047 cf_save_CPPFLAGS="$CPPFLAGS"
9048 cf_save_LIBS="$LIBS"
9050 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
9051 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9053 # while -W for passing linker flags is prevalent, it is not "standard".
9054 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9055 # incompatible _and_ non-standard -W option which gives an error. Work
9056 # around that pitfall.
9057 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9063 cf_new_extra_cppflags=
9065 for cf_add_cflags in $cf_pkg_cflags
9067 case "$cf_fix_cppflags" in
9069 case "$cf_add_cflags" in
9070 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9071 case "$cf_add_cflags" in
9073 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9075 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9076 && test -z "${cf_tst_cflags}" \
9077 && cf_fix_cppflags=yes
9079 if test "$cf_fix_cppflags" = yes ; then
9081 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9082 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9085 elif test "${cf_tst_cflags}" = "\"'" ; then
9087 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9088 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9098 case "$cf_add_cflags" in
9100 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9102 CPPFLAGS=`echo "$CPPFLAGS" | \
9103 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9104 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9109 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9110 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9117 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9118 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9125 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9126 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9128 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9130 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9131 && test -z "${cf_tst_cflags}" \
9132 && cf_fix_cppflags=no
9137 if test -n "$cf_new_cflags" ; then
9139 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9140 CFLAGS="${CFLAGS}$cf_new_cflags"
9144 if test -n "$cf_new_cppflags" ; then
9146 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9147 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9151 if test -n "$cf_new_extra_cppflags" ; then
9153 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9154 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9161 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9163 for cf_add_1lib in $cf_add_0lib; do
9164 for cf_add_2lib in $cf_add_libs; do
9165 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9170 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9174 cat >"conftest.$ac_ext" <<_ACEOF
9175 #line 9175 "configure"
9176 #include "confdefs.h"
9177 #include <${cf_cv_ncurses_header:-curses.h}>
9181 initscr(); mousemask(0,0); tigetstr((char *)0);
9186 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9187 if { (eval echo "$as_me:9187: \"$ac_link\"") >&5
9188 (eval $ac_link) 2>&5
9190 echo "$as_me:9190: \$? = $ac_status" >&5
9191 (exit "$ac_status"); } &&
9192 { ac_try='test -s "conftest$ac_exeext"'
9193 { (eval echo "$as_me:9193: \"$ac_try\"") >&5
9196 echo "$as_me:9196: \$? = $ac_status" >&5
9197 (exit "$ac_status"); }; }; then
9198 if test "$cross_compiling" = yes; then
9199 cf_test_ncuconfig=maybe
9201 cat >"conftest.$ac_ext" <<_ACEOF
9202 #line 9202 "configure"
9203 #include "confdefs.h"
9204 #include <${cf_cv_ncurses_header:-curses.h}>
9206 { char *xx = curses_version(); return (xx == 0); }
9208 rm -f "conftest$ac_exeext"
9209 if { (eval echo "$as_me:9209: \"$ac_link\"") >&5
9210 (eval $ac_link) 2>&5
9212 echo "$as_me:9212: \$? = $ac_status" >&5
9213 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9214 { (eval echo "$as_me:9214: \"$ac_try\"") >&5
9217 echo "$as_me:9217: \$? = $ac_status" >&5
9218 (exit "$ac_status"); }; }; then
9219 cf_test_ncuconfig=yes
9221 echo "$as_me: program exited with status $ac_status" >&5
9222 echo "$as_me: failed program was:" >&5
9223 cat "conftest.$ac_ext" >&5
9224 cf_test_ncuconfig=no
9226 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9229 echo "$as_me: failed program was:" >&5
9230 cat "conftest.$ac_ext" >&5
9231 cf_test_ncuconfig=no
9233 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9235 CFLAGS="$cf_save_CFLAGS"
9236 CPPFLAGS="$cf_save_CPPFLAGS"
9237 LIBS="$cf_save_LIBS"
9239 if test "x$cf_test_ncuconfig" != xyes; then
9240 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9241 cf_pkg_cflags="$cf_temp"
9242 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9243 cf_pkg_libs="$cf_temp"
9251 cf_new_extra_cppflags=
9253 for cf_add_cflags in $cf_pkg_cflags
9255 case "$cf_fix_cppflags" in
9257 case "$cf_add_cflags" in
9258 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9259 case "$cf_add_cflags" in
9261 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9263 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9264 && test -z "${cf_tst_cflags}" \
9265 && cf_fix_cppflags=yes
9267 if test "$cf_fix_cppflags" = yes ; then
9269 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9270 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9273 elif test "${cf_tst_cflags}" = "\"'" ; then
9275 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9276 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9286 case "$cf_add_cflags" in
9288 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9290 CPPFLAGS=`echo "$CPPFLAGS" | \
9291 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9292 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9297 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9298 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9305 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9306 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9313 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9314 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9316 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9318 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9319 && test -z "${cf_tst_cflags}" \
9320 && cf_fix_cppflags=no
9325 if test -n "$cf_new_cflags" ; then
9327 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9328 CFLAGS="${CFLAGS}$cf_new_cflags"
9332 if test -n "$cf_new_cppflags" ; then
9334 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9335 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9339 if test -n "$cf_new_extra_cppflags" ; then
9341 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9342 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9349 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9351 for cf_add_1lib in $cf_add_0lib; do
9352 for cf_add_2lib in $cf_add_libs; do
9353 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9358 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9362 cat >"conftest.$ac_ext" <<_ACEOF
9363 #line 9363 "configure"
9364 #include "confdefs.h"
9365 #include <${cf_cv_ncurses_header:-curses.h}>
9369 initscr(); mousemask(0,0); tigetstr((char *)0);
9374 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9375 if { (eval echo "$as_me:9375: \"$ac_link\"") >&5
9376 (eval $ac_link) 2>&5
9378 echo "$as_me:9378: \$? = $ac_status" >&5
9379 (exit "$ac_status"); } &&
9380 { ac_try='test -s "conftest$ac_exeext"'
9381 { (eval echo "$as_me:9381: \"$ac_try\"") >&5
9384 echo "$as_me:9384: \$? = $ac_status" >&5
9385 (exit "$ac_status"); }; }; then
9386 if test "$cross_compiling" = yes; then
9387 cf_have_ncuconfig=maybe
9389 cat >"conftest.$ac_ext" <<_ACEOF
9390 #line 9390 "configure"
9391 #include "confdefs.h"
9392 #include <${cf_cv_ncurses_header:-curses.h}>
9394 { char *xx = curses_version(); return (xx == 0); }
9396 rm -f "conftest$ac_exeext"
9397 if { (eval echo "$as_me:9397: \"$ac_link\"") >&5
9398 (eval $ac_link) 2>&5
9400 echo "$as_me:9400: \$? = $ac_status" >&5
9401 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9402 { (eval echo "$as_me:9402: \"$ac_try\"") >&5
9405 echo "$as_me:9405: \$? = $ac_status" >&5
9406 (exit "$ac_status"); }; }; then
9407 cf_have_ncuconfig=yes
9409 echo "$as_me: program exited with status $ac_status" >&5
9410 echo "$as_me: failed program was:" >&5
9411 cat "conftest.$ac_ext" >&5
9412 cf_have_ncuconfig=no
9414 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9417 echo "$as_me: failed program was:" >&5
9418 cat "conftest.$ac_ext" >&5
9419 cf_have_ncuconfig=no
9421 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9422 echo "$as_me:9422: result: $cf_have_ncuconfig" >&5
9423 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9424 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9425 if test "$cf_have_ncuconfig" != "yes"
9427 CPPFLAGS="$cf_save_CPPFLAGS"
9428 LIBS="$cf_save_LIBS"
9429 NCURSES_CONFIG_PKG=none
9432 cat >>confdefs.h <<\EOF
9436 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9438 echo "$as_me:9438: checking for terminfo header" >&5
9439 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9440 if test "${cf_cv_term_header+set}" = set; then
9441 echo $ECHO_N "(cached) $ECHO_C" >&6
9444 case "${cf_cv_ncurses_header}" in
9445 (*/ncurses.h|*/ncursesw.h)
9446 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9449 cf_term_header=term.h
9453 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9455 cat >"conftest.$ac_ext" <<_ACEOF
9456 #line 9456 "configure"
9457 #include "confdefs.h"
9459 #include <${cf_cv_ncurses_header:-curses.h}>
9465 int x = auto_left_margin; (void)x
9470 rm -f "conftest.$ac_objext"
9471 if { (eval echo "$as_me:9471: \"$ac_compile\"") >&5
9472 (eval $ac_compile) 2>&5
9474 echo "$as_me:9474: \$? = $ac_status" >&5
9475 (exit "$ac_status"); } &&
9476 { ac_try='test -s "conftest.$ac_objext"'
9477 { (eval echo "$as_me:9477: \"$ac_try\"") >&5
9480 echo "$as_me:9480: \$? = $ac_status" >&5
9481 (exit "$ac_status"); }; }; then
9483 cf_cv_term_header="$cf_test"
9485 echo "$as_me: failed program was:" >&5
9486 cat "conftest.$ac_ext" >&5
9488 cf_cv_term_header=unknown
9491 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9492 test "$cf_cv_term_header" != unknown && break
9496 echo "$as_me:9496: result: $cf_cv_term_header" >&5
9497 echo "${ECHO_T}$cf_cv_term_header" >&6
9499 # Set definitions to allow ifdef'ing to accommodate subdirectories
9501 case "$cf_cv_term_header" in
9504 cat >>confdefs.h <<\EOF
9505 #define HAVE_TERM_H 1
9511 case "$cf_cv_term_header" in
9514 cat >>confdefs.h <<\EOF
9515 #define HAVE_NCURSES_TERM_H 1
9521 cat >>confdefs.h <<\EOF
9522 #define HAVE_NCURSESW_TERM_H 1
9531 echo "$as_me:9531: result: no" >&5
9532 echo "${ECHO_T}no" >&6
9533 NCURSES_CONFIG_PKG=none
9536 NCURSES_CONFIG_PKG=none
9539 if test "x$cf_have_ncuconfig" = "xno"; then
9540 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9542 if test -n "$ac_tool_prefix"; then
9543 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9545 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9546 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9547 echo "$as_me:9547: checking for $ac_word" >&5
9548 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9549 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9550 echo $ECHO_N "(cached) $ECHO_C" >&6
9552 if test -n "$NCURSES_CONFIG"; then
9553 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9555 ac_save_IFS=$IFS; IFS=$ac_path_separator
9557 for ac_dir in $ac_dummy; do
9559 test -z "$ac_dir" && ac_dir=.
9560 $as_executable_p "$ac_dir/$ac_word" || continue
9561 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9562 echo "$as_me:9562: found $ac_dir/$ac_word" >&5
9568 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9569 if test -n "$NCURSES_CONFIG"; then
9570 echo "$as_me:9570: result: $NCURSES_CONFIG" >&5
9571 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9573 echo "$as_me:9573: result: no" >&5
9574 echo "${ECHO_T}no" >&6
9577 test -n "$NCURSES_CONFIG" && break
9580 if test -z "$NCURSES_CONFIG"; then
9581 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9582 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9584 # Extract the first word of "$ac_prog", so it can be a program name with args.
9585 set dummy $ac_prog; ac_word=$2
9586 echo "$as_me:9586: checking for $ac_word" >&5
9587 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9588 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9589 echo $ECHO_N "(cached) $ECHO_C" >&6
9591 if test -n "$ac_ct_NCURSES_CONFIG"; then
9592 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9594 ac_save_IFS=$IFS; IFS=$ac_path_separator
9596 for ac_dir in $ac_dummy; do
9598 test -z "$ac_dir" && ac_dir=.
9599 $as_executable_p "$ac_dir/$ac_word" || continue
9600 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9601 echo "$as_me:9601: found $ac_dir/$ac_word" >&5
9607 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9608 if test -n "$ac_ct_NCURSES_CONFIG"; then
9609 echo "$as_me:9609: result: $ac_ct_NCURSES_CONFIG" >&5
9610 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9612 echo "$as_me:9612: result: no" >&5
9613 echo "${ECHO_T}no" >&6
9616 test -n "$ac_ct_NCURSES_CONFIG" && break
9618 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9620 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9623 if test "$NCURSES_CONFIG" != none ; then
9628 cf_new_extra_cppflags=
9630 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9632 case "$cf_fix_cppflags" in
9634 case "$cf_add_cflags" in
9635 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9636 case "$cf_add_cflags" in
9638 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9640 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9641 && test -z "${cf_tst_cflags}" \
9642 && cf_fix_cppflags=yes
9644 if test "$cf_fix_cppflags" = yes ; then
9646 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9647 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9650 elif test "${cf_tst_cflags}" = "\"'" ; then
9652 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9653 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9663 case "$cf_add_cflags" in
9665 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9667 CPPFLAGS=`echo "$CPPFLAGS" | \
9668 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9669 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9674 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9675 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9682 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9683 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9690 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9691 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9693 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9695 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9696 && test -z "${cf_tst_cflags}" \
9697 && cf_fix_cppflags=no
9702 if test -n "$cf_new_cflags" ; then
9704 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9705 CFLAGS="${CFLAGS}$cf_new_cflags"
9709 if test -n "$cf_new_cppflags" ; then
9711 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9712 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9716 if test -n "$cf_new_extra_cppflags" ; then
9718 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9719 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9726 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9728 for cf_add_1lib in $cf_add_0lib; do
9729 for cf_add_2lib in $cf_add_libs; do
9730 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9735 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9739 # even with config script, some packages use no-override for curses.h
9741 echo "$as_me:9741: checking if we have identified curses headers" >&5
9742 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
9743 if test "${cf_cv_ncurses_header+set}" = set; then
9744 echo $ECHO_N "(cached) $ECHO_C" >&6
9747 cf_cv_ncurses_header=none
9749 ncurses.h ncurses/ncurses.h \
9750 curses.h ncurses/curses.h
9752 cat >"conftest.$ac_ext" <<_ACEOF
9753 #line 9753 "configure"
9754 #include "confdefs.h"
9755 #include <${cf_header}>
9759 initscr(); tgoto("?", 0,0)
9764 rm -f "conftest.$ac_objext"
9765 if { (eval echo "$as_me:9765: \"$ac_compile\"") >&5
9766 (eval $ac_compile) 2>&5
9768 echo "$as_me:9768: \$? = $ac_status" >&5
9769 (exit "$ac_status"); } &&
9770 { ac_try='test -s "conftest.$ac_objext"'
9771 { (eval echo "$as_me:9771: \"$ac_try\"") >&5
9774 echo "$as_me:9774: \$? = $ac_status" >&5
9775 (exit "$ac_status"); }; }; then
9776 cf_cv_ncurses_header=$cf_header; break
9778 echo "$as_me: failed program was:" >&5
9779 cat "conftest.$ac_ext" >&5
9781 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9785 echo "$as_me:9785: result: $cf_cv_ncurses_header" >&5
9786 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
9788 if test "$cf_cv_ncurses_header" = none ; then
9789 { { echo "$as_me:9789: error: No curses header-files found" >&5
9790 echo "$as_me: error: No curses header-files found" >&2;}
9791 { (exit 1); exit 1; }; }
9794 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
9796 for ac_header in $cf_cv_ncurses_header
9798 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9799 echo "$as_me:9799: checking for $ac_header" >&5
9800 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9801 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9802 echo $ECHO_N "(cached) $ECHO_C" >&6
9804 cat >"conftest.$ac_ext" <<_ACEOF
9805 #line 9805 "configure"
9806 #include "confdefs.h"
9807 #include <$ac_header>
9809 if { (eval echo "$as_me:9809: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9810 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9812 $EGREP -v '^ *\+' conftest.er1 >conftest.err
9814 cat conftest.err >&5
9815 echo "$as_me:9815: \$? = $ac_status" >&5
9816 (exit "$ac_status"); } >/dev/null; then
9817 if test -s conftest.err; then
9818 ac_cpp_err=$ac_c_preproc_warn_flag
9825 if test -z "$ac_cpp_err"; then
9826 eval "$as_ac_Header=yes"
9828 echo "$as_me: failed program was:" >&5
9829 cat "conftest.$ac_ext" >&5
9830 eval "$as_ac_Header=no"
9832 rm -f conftest.err "conftest.$ac_ext"
9834 echo "$as_me:9834: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9835 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9836 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9837 cat >>confdefs.h <<EOF
9838 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9844 cat >>confdefs.h <<\EOF
9848 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9850 cat >>confdefs.h <<EOF
9851 #define $cf_nculib_ROOT 1
9854 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
9858 cf_ncuhdr_root=ncurses
9860 test -n "$cf_cv_curses_dir" && \
9861 test "$cf_cv_curses_dir" != "no" && { \
9863 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
9864 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
9866 while test "$cf_add_incdir" != /usr/include
9868 if test -d "$cf_add_incdir"
9871 if test -n "$CFLAGS$CPPFLAGS" ; then
9872 # a loop is needed to ensure we can add subdirs of existing dirs
9873 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9874 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9875 cf_have_incdir=yes; break
9880 if test "$cf_have_incdir" = no ; then
9881 if test "$cf_add_incdir" = /usr/local/include ; then
9882 if test "$GCC" = yes
9884 cf_save_CPPFLAGS=$CPPFLAGS
9886 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9887 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9889 cat >"conftest.$ac_ext" <<_ACEOF
9890 #line 9890 "configure"
9891 #include "confdefs.h"
9901 rm -f "conftest.$ac_objext"
9902 if { (eval echo "$as_me:9902: \"$ac_compile\"") >&5
9903 (eval $ac_compile) 2>&5
9905 echo "$as_me:9905: \$? = $ac_status" >&5
9906 (exit "$ac_status"); } &&
9907 { ac_try='test -s "conftest.$ac_objext"'
9908 { (eval echo "$as_me:9908: \"$ac_try\"") >&5
9911 echo "$as_me:9911: \$? = $ac_status" >&5
9912 (exit "$ac_status"); }; }; then
9915 echo "$as_me: failed program was:" >&5
9916 cat "conftest.$ac_ext" >&5
9919 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9920 CPPFLAGS=$cf_save_CPPFLAGS
9925 if test "$cf_have_incdir" = no ; then
9926 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9928 echo "${as_me:-configure}:9928: testing adding $cf_add_incdir to include-path ..." 1>&5
9930 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9932 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9933 test "$cf_top_incdir" = "$cf_add_incdir" && break
9934 cf_add_incdir="$cf_top_incdir"
9947 echo "$as_me:9947: checking for $cf_ncuhdr_root header in include-path" >&5
9948 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
9949 if test "${cf_cv_ncurses_h+set}" = set; then
9950 echo $ECHO_N "(cached) $ECHO_C" >&6
9953 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
9954 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
9955 for cf_header in $cf_header_list
9958 cat >"conftest.$ac_ext" <<_ACEOF
9959 #line 9959 "configure"
9960 #include "confdefs.h"
9962 #include <$cf_header>
9967 #ifdef NCURSES_VERSION
9969 printf("%s\\n", NCURSES_VERSION);
9982 rm -f "conftest.$ac_objext"
9983 if { (eval echo "$as_me:9983: \"$ac_compile\"") >&5
9984 (eval $ac_compile) 2>&5
9986 echo "$as_me:9986: \$? = $ac_status" >&5
9987 (exit "$ac_status"); } &&
9988 { ac_try='test -s "conftest.$ac_objext"'
9989 { (eval echo "$as_me:9989: \"$ac_try\"") >&5
9992 echo "$as_me:9992: \$? = $ac_status" >&5
9993 (exit "$ac_status"); }; }; then
9994 cf_cv_ncurses_h=$cf_header
9997 echo "$as_me: failed program was:" >&5
9998 cat "conftest.$ac_ext" >&5
10001 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10003 test "$cf_cv_ncurses_h" != no && break
10007 echo "$as_me:10007: result: $cf_cv_ncurses_h" >&5
10008 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10010 if test "$cf_cv_ncurses_h" != no ; then
10011 cf_cv_ncurses_header=$cf_cv_ncurses_h
10014 echo "$as_me:10014: checking for $cf_ncuhdr_root include-path" >&5
10015 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10016 if test "${cf_cv_ncurses_h2+set}" = set; then
10017 echo $ECHO_N "(cached) $ECHO_C" >&6
10020 test -n "$verbose" && echo
10024 # collect the current set of include-directories from compiler flags
10025 cf_header_path_list=""
10026 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10027 for cf_header_path in $CPPFLAGS $CFLAGS
10029 case "$cf_header_path" in
10031 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10033 test "x$cf_header_path" != "xNONE" && \
10034 test -d "$cf_header_path" && \
10036 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10037 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
10038 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10039 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10040 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10041 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"
10044 cf_header_path_list="$cf_header_path_list $cf_search"
10050 # add the variations for the package we are looking for
10054 test "x$prefix" != "xNONE" && \
10055 test -d "$prefix" && \
10057 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10058 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
10059 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10060 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10061 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10062 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10065 for cf_subdir_prefix in \
10074 test "x$cf_subdir_prefix" != "x$prefix" && \
10075 test -d "$cf_subdir_prefix" && \
10076 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10077 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10078 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
10079 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10080 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10081 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10082 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"
10087 test "$includedir" != NONE && \
10088 test "$includedir" != "/usr/include" && \
10089 test -d "$includedir" && {
10090 test -d "$includedir" && cf_search="$cf_search $includedir"
10091 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10094 test "$oldincludedir" != NONE && \
10095 test "$oldincludedir" != "/usr/include" && \
10096 test -d "$oldincludedir" && {
10097 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
10098 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10101 cf_search="$cf_search $cf_header_path_list"
10103 test -n "$verbose" && echo "search path $cf_search"
10104 cf_save2_CPPFLAGS="$CPPFLAGS"
10105 for cf_incdir in $cf_search
10108 if test -n "$cf_incdir" ; then
10109 for cf_add_incdir in $cf_incdir
10111 while test "$cf_add_incdir" != /usr/include
10113 if test -d "$cf_add_incdir"
10116 if test -n "$CFLAGS$CPPFLAGS" ; then
10117 # a loop is needed to ensure we can add subdirs of existing dirs
10118 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10119 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10120 cf_have_incdir=yes; break
10125 if test "$cf_have_incdir" = no ; then
10126 if test "$cf_add_incdir" = /usr/local/include ; then
10127 if test "$GCC" = yes
10129 cf_save_CPPFLAGS=$CPPFLAGS
10131 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10132 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10134 cat >"conftest.$ac_ext" <<_ACEOF
10135 #line 10135 "configure"
10136 #include "confdefs.h"
10146 rm -f "conftest.$ac_objext"
10147 if { (eval echo "$as_me:10147: \"$ac_compile\"") >&5
10148 (eval $ac_compile) 2>&5
10150 echo "$as_me:10150: \$? = $ac_status" >&5
10151 (exit "$ac_status"); } &&
10152 { ac_try='test -s "conftest.$ac_objext"'
10153 { (eval echo "$as_me:10153: \"$ac_try\"") >&5
10154 (eval $ac_try) 2>&5
10156 echo "$as_me:10156: \$? = $ac_status" >&5
10157 (exit "$ac_status"); }; }; then
10160 echo "$as_me: failed program was:" >&5
10161 cat "conftest.$ac_ext" >&5
10164 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10165 CPPFLAGS=$cf_save_CPPFLAGS
10170 if test "$cf_have_incdir" = no ; then
10171 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10173 echo "${as_me:-configure}:10173: testing adding $cf_add_incdir to include-path ..." 1>&5
10175 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10177 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10178 test "$cf_top_incdir" = "$cf_add_incdir" && break
10179 cf_add_incdir="$cf_top_incdir"
10195 cat >"conftest.$ac_ext" <<_ACEOF
10196 #line 10196 "configure"
10197 #include "confdefs.h"
10199 #include <$cf_header>
10204 #ifdef NCURSES_VERSION
10206 printf("%s\\n", NCURSES_VERSION);
10219 rm -f "conftest.$ac_objext"
10220 if { (eval echo "$as_me:10220: \"$ac_compile\"") >&5
10221 (eval $ac_compile) 2>&5
10223 echo "$as_me:10223: \$? = $ac_status" >&5
10224 (exit "$ac_status"); } &&
10225 { ac_try='test -s "conftest.$ac_objext"'
10226 { (eval echo "$as_me:10226: \"$ac_try\"") >&5
10227 (eval $ac_try) 2>&5
10229 echo "$as_me:10229: \$? = $ac_status" >&5
10230 (exit "$ac_status"); }; }; then
10231 cf_cv_ncurses_h2=$cf_header
10234 echo "$as_me: failed program was:" >&5
10235 cat "conftest.$ac_ext" >&5
10236 cf_cv_ncurses_h2=no
10238 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10240 if test "$cf_cv_ncurses_h2" != no ; then
10241 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10242 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
10245 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10247 CPPFLAGS="$cf_save2_CPPFLAGS"
10248 test "$cf_cv_ncurses_h2" != no && break
10250 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10250: error: not found" >&5
10251 echo "$as_me: error: not found" >&2;}
10252 { (exit 1); exit 1; }; }
10255 echo "$as_me:10255: result: $cf_cv_ncurses_h2" >&5
10256 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10258 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
10259 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
10260 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
10261 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
10264 if test -n "$cf_1st_incdir" ; then
10265 for cf_add_incdir in $cf_1st_incdir
10267 while test "$cf_add_incdir" != /usr/include
10269 if test -d "$cf_add_incdir"
10272 if test -n "$CFLAGS$CPPFLAGS" ; then
10273 # a loop is needed to ensure we can add subdirs of existing dirs
10274 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10275 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10276 cf_have_incdir=yes; break
10281 if test "$cf_have_incdir" = no ; then
10282 if test "$cf_add_incdir" = /usr/local/include ; then
10283 if test "$GCC" = yes
10285 cf_save_CPPFLAGS=$CPPFLAGS
10287 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10288 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10290 cat >"conftest.$ac_ext" <<_ACEOF
10291 #line 10291 "configure"
10292 #include "confdefs.h"
10302 rm -f "conftest.$ac_objext"
10303 if { (eval echo "$as_me:10303: \"$ac_compile\"") >&5
10304 (eval $ac_compile) 2>&5
10306 echo "$as_me:10306: \$? = $ac_status" >&5
10307 (exit "$ac_status"); } &&
10308 { ac_try='test -s "conftest.$ac_objext"'
10309 { (eval echo "$as_me:10309: \"$ac_try\"") >&5
10310 (eval $ac_try) 2>&5
10312 echo "$as_me:10312: \$? = $ac_status" >&5
10313 (exit "$ac_status"); }; }; then
10316 echo "$as_me: failed program was:" >&5
10317 cat "conftest.$ac_ext" >&5
10320 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10321 CPPFLAGS=$cf_save_CPPFLAGS
10326 if test "$cf_have_incdir" = no ; then
10327 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10329 echo "${as_me:-configure}:10329: testing adding $cf_add_incdir to include-path ..." 1>&5
10331 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10333 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10334 test "$cf_top_incdir" = "$cf_add_incdir" && break
10335 cf_add_incdir="$cf_top_incdir"
10348 # Set definitions to allow ifdef'ing for ncurses.h
10350 case "$cf_cv_ncurses_header" in
10353 cat >>confdefs.h <<\EOF
10354 #define HAVE_NCURSES_H 1
10360 case "$cf_cv_ncurses_header" in
10361 (ncurses/curses.h|ncurses/ncurses.h)
10363 cat >>confdefs.h <<\EOF
10364 #define HAVE_NCURSES_NCURSES_H 1
10368 (ncursesw/curses.h|ncursesw/ncurses.h)
10370 cat >>confdefs.h <<\EOF
10371 #define HAVE_NCURSESW_NCURSES_H 1
10377 echo "$as_me:10377: checking for terminfo header" >&5
10378 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10379 if test "${cf_cv_term_header+set}" = set; then
10380 echo $ECHO_N "(cached) $ECHO_C" >&6
10383 case "${cf_cv_ncurses_header}" in
10384 (*/ncurses.h|*/ncursesw.h)
10385 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10388 cf_term_header=term.h
10392 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10394 cat >"conftest.$ac_ext" <<_ACEOF
10395 #line 10395 "configure"
10396 #include "confdefs.h"
10398 #include <${cf_cv_ncurses_header:-curses.h}>
10399 #include <$cf_test>
10404 int x = auto_left_margin; (void)x
10409 rm -f "conftest.$ac_objext"
10410 if { (eval echo "$as_me:10410: \"$ac_compile\"") >&5
10411 (eval $ac_compile) 2>&5
10413 echo "$as_me:10413: \$? = $ac_status" >&5
10414 (exit "$ac_status"); } &&
10415 { ac_try='test -s "conftest.$ac_objext"'
10416 { (eval echo "$as_me:10416: \"$ac_try\"") >&5
10417 (eval $ac_try) 2>&5
10419 echo "$as_me:10419: \$? = $ac_status" >&5
10420 (exit "$ac_status"); }; }; then
10422 cf_cv_term_header="$cf_test"
10424 echo "$as_me: failed program was:" >&5
10425 cat "conftest.$ac_ext" >&5
10427 cf_cv_term_header=unknown
10430 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10431 test "$cf_cv_term_header" != unknown && break
10435 echo "$as_me:10435: result: $cf_cv_term_header" >&5
10436 echo "${ECHO_T}$cf_cv_term_header" >&6
10438 # Set definitions to allow ifdef'ing to accommodate subdirectories
10440 case "$cf_cv_term_header" in
10443 cat >>confdefs.h <<\EOF
10444 #define HAVE_TERM_H 1
10450 case "$cf_cv_term_header" in
10453 cat >>confdefs.h <<\EOF
10454 #define HAVE_NCURSES_TERM_H 1
10460 cat >>confdefs.h <<\EOF
10461 #define HAVE_NCURSESW_TERM_H 1
10467 # some applications need this, but should check for NCURSES_VERSION
10469 cat >>confdefs.h <<\EOF
10473 echo "$as_me:10473: checking for ncurses version" >&5
10474 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10475 if test "${cf_cv_ncurses_version+set}" = set; then
10476 echo $ECHO_N "(cached) $ECHO_C" >&6
10479 cf_cv_ncurses_version=no
10481 rm -f "$cf_tempfile"
10482 if test "$cross_compiling" = yes; then
10484 # This will not work if the preprocessor splits the line after the
10485 # Autoconf token. The 'unproto' program does that.
10486 cat > "conftest.$ac_ext" <<EOF
10487 #include <${cf_cv_ncurses_header:-curses.h}>
10489 #ifdef NCURSES_VERSION
10490 Autoconf NCURSES_VERSION
10498 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10499 { (eval echo "$as_me:10499: \"$cf_try\"") >&5
10500 (eval $cf_try) 2>&5
10502 echo "$as_me:10502: \$? = $ac_status" >&5
10503 (exit "$ac_status"); }
10504 if test -f conftest.out ; then
10505 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
10506 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10511 cat >"conftest.$ac_ext" <<_ACEOF
10512 #line 10512 "configure"
10513 #include "confdefs.h"
10515 #include <${cf_cv_ncurses_header:-curses.h}>
10519 FILE *fp = fopen("$cf_tempfile", "w");
10520 #ifdef NCURSES_VERSION
10521 # ifdef NCURSES_VERSION_PATCH
10522 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10524 fprintf(fp, "%s\\n", NCURSES_VERSION);
10527 # ifdef __NCURSES_H
10528 fprintf(fp, "old\\n");
10533 ${cf_cv_main_return:-return}(0);
10536 rm -f "conftest$ac_exeext"
10537 if { (eval echo "$as_me:10537: \"$ac_link\"") >&5
10538 (eval $ac_link) 2>&5
10540 echo "$as_me:10540: \$? = $ac_status" >&5
10541 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10542 { (eval echo "$as_me:10542: \"$ac_try\"") >&5
10543 (eval $ac_try) 2>&5
10545 echo "$as_me:10545: \$? = $ac_status" >&5
10546 (exit "$ac_status"); }; }; then
10548 cf_cv_ncurses_version=`cat $cf_tempfile`
10550 echo "$as_me: program exited with status $ac_status" >&5
10551 echo "$as_me: failed program was:" >&5
10552 cat "conftest.$ac_ext" >&5
10554 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10556 rm -f "$cf_tempfile"
10559 echo "$as_me:10559: result: $cf_cv_ncurses_version" >&5
10560 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10561 test "$cf_cv_ncurses_version" = no ||
10562 cat >>confdefs.h <<\EOF
10566 cf_nculib_root=ncurses
10567 # This works, except for the special case where we find gpm, but
10568 # ncurses is in a nonstandard location via $LIBS, and we really want
10571 cf_ncurses_SAVE="$LIBS"
10572 echo "$as_me:10572: checking for Gpm_Open in -lgpm" >&5
10573 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10574 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10575 echo $ECHO_N "(cached) $ECHO_C" >&6
10577 ac_check_lib_save_LIBS=$LIBS
10579 cat >"conftest.$ac_ext" <<_ACEOF
10580 #line 10580 "configure"
10581 #include "confdefs.h"
10583 /* Override any gcc2 internal prototype to avoid an error. */
10587 /* We use char because int might match the return type of a gcc2
10588 builtin and then its argument prototype would still apply. */
10598 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10599 if { (eval echo "$as_me:10599: \"$ac_link\"") >&5
10600 (eval $ac_link) 2>&5
10602 echo "$as_me:10602: \$? = $ac_status" >&5
10603 (exit "$ac_status"); } &&
10604 { ac_try='test -s "conftest$ac_exeext"'
10605 { (eval echo "$as_me:10605: \"$ac_try\"") >&5
10606 (eval $ac_try) 2>&5
10608 echo "$as_me:10608: \$? = $ac_status" >&5
10609 (exit "$ac_status"); }; }; then
10610 ac_cv_lib_gpm_Gpm_Open=yes
10612 echo "$as_me: failed program was:" >&5
10613 cat "conftest.$ac_ext" >&5
10614 ac_cv_lib_gpm_Gpm_Open=no
10616 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10617 LIBS=$ac_check_lib_save_LIBS
10619 echo "$as_me:10619: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10620 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
10621 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
10622 echo "$as_me:10622: checking for initscr in -lgpm" >&5
10623 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
10624 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
10625 echo $ECHO_N "(cached) $ECHO_C" >&6
10627 ac_check_lib_save_LIBS=$LIBS
10629 cat >"conftest.$ac_ext" <<_ACEOF
10630 #line 10630 "configure"
10631 #include "confdefs.h"
10633 /* Override any gcc2 internal prototype to avoid an error. */
10637 /* We use char because int might match the return type of a gcc2
10638 builtin and then its argument prototype would still apply. */
10648 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10649 if { (eval echo "$as_me:10649: \"$ac_link\"") >&5
10650 (eval $ac_link) 2>&5
10652 echo "$as_me:10652: \$? = $ac_status" >&5
10653 (exit "$ac_status"); } &&
10654 { ac_try='test -s "conftest$ac_exeext"'
10655 { (eval echo "$as_me:10655: \"$ac_try\"") >&5
10656 (eval $ac_try) 2>&5
10658 echo "$as_me:10658: \$? = $ac_status" >&5
10659 (exit "$ac_status"); }; }; then
10660 ac_cv_lib_gpm_initscr=yes
10662 echo "$as_me: failed program was:" >&5
10663 cat "conftest.$ac_ext" >&5
10664 ac_cv_lib_gpm_initscr=no
10666 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10667 LIBS=$ac_check_lib_save_LIBS
10669 echo "$as_me:10669: result: $ac_cv_lib_gpm_initscr" >&5
10670 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
10671 if test "$ac_cv_lib_gpm_initscr" = yes; then
10672 LIBS="$cf_ncurses_SAVE"
10674 cf_ncurses_LIBS="-lgpm"
10681 # This is only necessary if you are linking against an obsolete
10682 # version of ncurses (but it should do no harm, since it's static).
10683 if test "$cf_nculib_root" = ncurses ; then
10684 echo "$as_me:10684: checking for tgoto in -lmytinfo" >&5
10685 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
10686 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
10687 echo $ECHO_N "(cached) $ECHO_C" >&6
10689 ac_check_lib_save_LIBS=$LIBS
10690 LIBS="-lmytinfo $LIBS"
10691 cat >"conftest.$ac_ext" <<_ACEOF
10692 #line 10692 "configure"
10693 #include "confdefs.h"
10695 /* Override any gcc2 internal prototype to avoid an error. */
10699 /* We use char because int might match the return type of a gcc2
10700 builtin and then its argument prototype would still apply. */
10710 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10711 if { (eval echo "$as_me:10711: \"$ac_link\"") >&5
10712 (eval $ac_link) 2>&5
10714 echo "$as_me:10714: \$? = $ac_status" >&5
10715 (exit "$ac_status"); } &&
10716 { ac_try='test -s "conftest$ac_exeext"'
10717 { (eval echo "$as_me:10717: \"$ac_try\"") >&5
10718 (eval $ac_try) 2>&5
10720 echo "$as_me:10720: \$? = $ac_status" >&5
10721 (exit "$ac_status"); }; }; then
10722 ac_cv_lib_mytinfo_tgoto=yes
10724 echo "$as_me: failed program was:" >&5
10725 cat "conftest.$ac_ext" >&5
10726 ac_cv_lib_mytinfo_tgoto=no
10728 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10729 LIBS=$ac_check_lib_save_LIBS
10731 echo "$as_me:10731: result: $ac_cv_lib_mytinfo_tgoto" >&5
10732 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
10733 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
10734 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
10741 cf_add_libs="$LIBS"
10744 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10745 # filter duplicates
10746 for cf_add_1lib in $cf_add_0lib; do
10747 for cf_add_2lib in $cf_add_libs; do
10748 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10753 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10755 LIBS="$cf_add_libs"
10757 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
10760 cf_add_libs="$LIBS"
10763 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10764 # filter duplicates
10765 for cf_add_1lib in $cf_add_0lib; do
10766 for cf_add_2lib in $cf_add_libs; do
10767 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10772 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10774 LIBS="$cf_add_libs"
10778 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
10780 echo "$as_me:10780: checking for initscr" >&5
10781 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
10782 if test "${ac_cv_func_initscr+set}" = set; then
10783 echo $ECHO_N "(cached) $ECHO_C" >&6
10785 cat >"conftest.$ac_ext" <<_ACEOF
10786 #line 10786 "configure"
10787 #include "confdefs.h"
10788 #define initscr autoconf_temporary
10789 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
10796 /* We use char because int might match the return type of a gcc2
10797 builtin and then its argument prototype would still apply. */
10798 char initscr (void);
10804 /* The GNU C library defines stubs for functions which it implements
10805 to always fail with ENOSYS. Some functions are actually named
10806 something starting with __ and the normal name is an alias. */
10807 #if defined (__stub_initscr) || defined (__stub___initscr)
10808 #error found stub for initscr
10816 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10817 if { (eval echo "$as_me:10817: \"$ac_link\"") >&5
10818 (eval $ac_link) 2>&5
10820 echo "$as_me:10820: \$? = $ac_status" >&5
10821 (exit "$ac_status"); } &&
10822 { ac_try='test -s "conftest$ac_exeext"'
10823 { (eval echo "$as_me:10823: \"$ac_try\"") >&5
10824 (eval $ac_try) 2>&5
10826 echo "$as_me:10826: \$? = $ac_status" >&5
10827 (exit "$ac_status"); }; }; then
10828 ac_cv_func_initscr=yes
10830 echo "$as_me: failed program was:" >&5
10831 cat "conftest.$ac_ext" >&5
10832 ac_cv_func_initscr=no
10834 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10836 echo "$as_me:10836: result: $ac_cv_func_initscr" >&5
10837 echo "${ECHO_T}$ac_cv_func_initscr" >&6
10838 if test "$ac_cv_func_initscr" = yes; then
10839 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10842 cf_save_LIBS="$LIBS"
10843 echo "$as_me:10843: checking for initscr in -l$cf_nculib_root" >&5
10844 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
10845 LIBS="-l$cf_nculib_root $LIBS"
10846 cat >"conftest.$ac_ext" <<_ACEOF
10847 #line 10847 "configure"
10848 #include "confdefs.h"
10849 #include <${cf_cv_ncurses_header:-curses.h}>
10858 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10859 if { (eval echo "$as_me:10859: \"$ac_link\"") >&5
10860 (eval $ac_link) 2>&5
10862 echo "$as_me:10862: \$? = $ac_status" >&5
10863 (exit "$ac_status"); } &&
10864 { ac_try='test -s "conftest$ac_exeext"'
10865 { (eval echo "$as_me:10865: \"$ac_try\"") >&5
10866 (eval $ac_try) 2>&5
10868 echo "$as_me:10868: \$? = $ac_status" >&5
10869 (exit "$ac_status"); }; }; then
10870 echo "$as_me:10870: result: yes" >&5
10871 echo "${ECHO_T}yes" >&6
10872 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10875 echo "$as_me: failed program was:" >&5
10876 cat "conftest.$ac_ext" >&5
10877 echo "$as_me:10877: result: no" >&5
10878 echo "${ECHO_T}no" >&6
10881 cf_library_path_list=""
10882 if test -n "${LDFLAGS}${LIBS}" ; then
10883 for cf_library_path in $LDFLAGS $LIBS
10885 case "$cf_library_path" in
10887 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10889 test "x$cf_library_path" != "xNONE" && \
10890 test -d "$cf_library_path" && \
10892 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
10893 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
10894 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
10895 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
10896 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
10897 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"
10900 cf_library_path_list="$cf_library_path_list $cf_search"
10908 test "x$prefix" != "xNONE" && \
10909 test -d "$prefix" && \
10911 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
10912 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
10913 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
10914 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
10915 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
10916 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
10919 for cf_subdir_prefix in \
10928 test "x$cf_subdir_prefix" != "x$prefix" && \
10929 test -d "$cf_subdir_prefix" && \
10930 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10931 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
10932 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
10933 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
10934 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
10935 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
10936 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"
10941 cf_search="$cf_library_path_list $cf_search"
10943 for cf_libdir in $cf_search
10945 echo "$as_me:10945: checking for -l$cf_nculib_root in $cf_libdir" >&5
10946 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
10947 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
10948 cat >"conftest.$ac_ext" <<_ACEOF
10949 #line 10949 "configure"
10950 #include "confdefs.h"
10951 #include <${cf_cv_ncurses_header:-curses.h}>
10960 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10961 if { (eval echo "$as_me:10961: \"$ac_link\"") >&5
10962 (eval $ac_link) 2>&5
10964 echo "$as_me:10964: \$? = $ac_status" >&5
10965 (exit "$ac_status"); } &&
10966 { ac_try='test -s "conftest$ac_exeext"'
10967 { (eval echo "$as_me:10967: \"$ac_try\"") >&5
10968 (eval $ac_try) 2>&5
10970 echo "$as_me:10970: \$? = $ac_status" >&5
10971 (exit "$ac_status"); }; }; then
10972 echo "$as_me:10972: result: yes" >&5
10973 echo "${ECHO_T}yes" >&6
10974 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10977 echo "$as_me: failed program was:" >&5
10978 cat "conftest.$ac_ext" >&5
10979 echo "$as_me:10979: result: no" >&5
10980 echo "${ECHO_T}no" >&6
10981 LIBS="$cf_save_LIBS"
10983 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10987 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10991 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
10993 if test "$cf_found_library" = no ; then
10994 { { echo "$as_me:10994: error: Cannot link $cf_nculib_root library" >&5
10995 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
10996 { (exit 1); exit 1; }; }
11001 if test -n "$cf_ncurses_LIBS" ; then
11002 echo "$as_me:11002: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11003 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11004 cf_ncurses_SAVE="$LIBS"
11005 for p in $cf_ncurses_LIBS ; do
11006 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
11007 if test "$q" != "$LIBS" ; then
11011 cat >"conftest.$ac_ext" <<_ACEOF
11012 #line 11012 "configure"
11013 #include "confdefs.h"
11014 #include <${cf_cv_ncurses_header:-curses.h}>
11018 initscr(); mousemask(0,0); tigetstr((char *)0);
11023 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11024 if { (eval echo "$as_me:11024: \"$ac_link\"") >&5
11025 (eval $ac_link) 2>&5
11027 echo "$as_me:11027: \$? = $ac_status" >&5
11028 (exit "$ac_status"); } &&
11029 { ac_try='test -s "conftest$ac_exeext"'
11030 { (eval echo "$as_me:11030: \"$ac_try\"") >&5
11031 (eval $ac_try) 2>&5
11033 echo "$as_me:11033: \$? = $ac_status" >&5
11034 (exit "$ac_status"); }; }; then
11035 echo "$as_me:11035: result: yes" >&5
11036 echo "${ECHO_T}yes" >&6
11038 echo "$as_me: failed program was:" >&5
11039 cat "conftest.$ac_ext" >&5
11040 echo "$as_me:11040: result: no" >&5
11041 echo "${ECHO_T}no" >&6
11042 LIBS="$cf_ncurses_SAVE"
11044 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11047 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11049 cat >>confdefs.h <<EOF
11050 #define $cf_nculib_ROOT 1
11055 NCURSES_CONFIG=none
11060 if test "$NCURSES_CONFIG_PKG" != none ; then
11061 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
11063 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11064 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11065 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11067 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
11068 if test -z "$cf_cv_abi_version"
11070 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
11073 elif test "$NCURSES_CONFIG" != none ; then
11075 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
11077 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11078 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11079 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11081 # ABI version is not available from headers
11082 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
11086 for cf_name in MAJOR MINOR PATCH
11088 cat >conftest.$ac_ext <<CF_EOF
11089 #include <${cf_cv_ncurses_header:-curses.h}>
11090 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
11092 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
11093 { (eval echo "$as_me:11093: \"$cf_try\"") >&5
11094 (eval $cf_try) 2>&5
11096 echo "$as_me:11096: \$? = $ac_status" >&5
11097 (exit "$ac_status"); }
11098 if test -f conftest.out ; then
11099 cf_result=`sed -e "s/^.*AUTOCONF_${cf_name}[ ][ ]*//" conftest.out`
11100 eval NCURSES_$cf_name=\"$cf_result\"
11101 # cat conftest.$ac_ext
11106 cf_cv_abi_version=${NCURSES_MAJOR}
11110 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
11112 cf_cv_timestamp=`date`
11114 echo "$as_me:11114: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
11115 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
11117 echo "$as_me:11117: checking if you want to have a library-prefix" >&5
11118 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
11120 # Check whether --with-lib-prefix or --without-lib-prefix was given.
11121 if test "${with_lib_prefix+set}" = set; then
11122 withval="$with_lib_prefix"
11123 with_lib_prefix=$withval
11125 with_lib_prefix=auto
11127 echo "$as_me:11127: result: $with_lib_prefix" >&5
11128 echo "${ECHO_T}$with_lib_prefix" >&6
11130 if test "$with_lib_prefix" = auto
11133 case "$cf_cv_system_name" in
11135 if test "$DFT_LWR_MODEL" = libtool; then
11144 (*) LIB_PREFIX='lib'
11147 cf_prefix=$LIB_PREFIX
11149 elif test "$with_lib_prefix" = no
11153 LIB_PREFIX=$with_lib_prefix
11158 ###############################################################################
11160 if test X"$CC_G_OPT" = X"" ; then
11162 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
11165 echo "$as_me:11165: checking for default loader flags" >&5
11166 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
11167 case $DFT_LWR_MODEL in
11168 (normal) LD_MODEL='' ;;
11169 (debug) LD_MODEL=$CC_G_OPT ;;
11170 (profile) LD_MODEL='-pg';;
11171 (shared) LD_MODEL='' ;;
11173 echo "$as_me:11173: result: $LD_MODEL" >&5
11174 echo "${ECHO_T}$LD_MODEL" >&6
11177 if test "x$cf_cv_enable_rpath" != xno
11179 echo "$as_me:11179: checking for an rpath option" >&5
11180 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
11181 case "$cf_cv_system_name" in
11183 if test "$GCC" = yes; then
11184 LD_RPATH_OPT="-Wl,-rpath,"
11186 LD_RPATH_OPT="-rpath "
11189 (linux*|gnu*|k*bsd*-gnu|freebsd*)
11190 LD_RPATH_OPT="-Wl,-rpath,"
11192 (openbsd[2-9].*|mirbsd*)
11193 LD_RPATH_OPT="-Wl,-rpath,"
11196 LD_RPATH_OPT="-rpath "
11199 LD_RPATH_OPT="-Wl,-rpath,"
11202 LD_RPATH_OPT="-rpath "
11210 echo "$as_me:11210: result: $LD_RPATH_OPT" >&5
11211 echo "${ECHO_T}$LD_RPATH_OPT" >&6
11213 case "x$LD_RPATH_OPT" in
11215 echo "$as_me:11215: checking if we need a space after rpath option" >&5
11216 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
11217 cf_save_LIBS="$LIBS"
11219 cf_add_libs="$LIBS"
11222 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11223 # filter duplicates
11224 for cf_add_1lib in $cf_add_0lib; do
11225 for cf_add_2lib in $cf_add_libs; do
11226 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11231 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11233 LIBS="$cf_add_libs"
11235 cat >"conftest.$ac_ext" <<_ACEOF
11236 #line 11236 "configure"
11237 #include "confdefs.h"
11247 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11248 if { (eval echo "$as_me:11248: \"$ac_link\"") >&5
11249 (eval $ac_link) 2>&5
11251 echo "$as_me:11251: \$? = $ac_status" >&5
11252 (exit "$ac_status"); } &&
11253 { ac_try='test -s "conftest$ac_exeext"'
11254 { (eval echo "$as_me:11254: \"$ac_try\"") >&5
11255 (eval $ac_try) 2>&5
11257 echo "$as_me:11257: \$? = $ac_status" >&5
11258 (exit "$ac_status"); }; }; then
11261 echo "$as_me: failed program was:" >&5
11262 cat "conftest.$ac_ext" >&5
11265 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11266 LIBS="$cf_save_LIBS"
11267 echo "$as_me:11267: result: $cf_rpath_space" >&5
11268 echo "${ECHO_T}$cf_rpath_space" >&6
11269 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
11278 INSTALL_LIB="-m 644"
11279 : ${rel_builddir:=.}
11285 cf_cv_do_symlinks=no
11287 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
11289 echo "$as_me:11289: checking if release/abi version should be used for shared libs" >&5
11290 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
11292 # Check whether --with-shlib-version or --without-shlib-version was given.
11293 if test "${with_shlib_version+set}" = set; then
11294 withval="$with_shlib_version"
11295 test -z "$withval" && withval=auto
11298 cf_cv_shlib_version=auto
11301 cf_cv_shlib_version=$withval
11304 echo "$as_me:11304: result: $withval" >&5
11305 echo "${ECHO_T}$withval" >&6
11306 { { echo "$as_me:11306: error: option value must be one of: rel, abi, or auto" >&5
11307 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
11308 { (exit 1); exit 1; }; }
11313 cf_cv_shlib_version=auto
11315 echo "$as_me:11315: result: $cf_cv_shlib_version" >&5
11316 echo "${ECHO_T}$cf_cv_shlib_version" >&6
11318 cf_cv_rm_so_locs=no
11321 # Some less-capable ports of gcc support only -fpic
11325 if test "$GCC" = yes
11329 case "$cf_cv_system_name" in
11330 (*linux*) # e.g., PGI compiler
11336 if test "$cf_try_fPIC" = yes
11338 echo "$as_me:11338: checking which $CC option to use" >&5
11339 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
11340 cf_save_CFLAGS="$CFLAGS"
11341 for CC_SHARED_OPTS in -fPIC -fpic ''
11343 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
11344 cat >"conftest.$ac_ext" <<_ACEOF
11345 #line 11345 "configure"
11346 #include "confdefs.h"
11356 rm -f "conftest.$ac_objext"
11357 if { (eval echo "$as_me:11357: \"$ac_compile\"") >&5
11358 (eval $ac_compile) 2>&5
11360 echo "$as_me:11360: \$? = $ac_status" >&5
11361 (exit "$ac_status"); } &&
11362 { ac_try='test -s "conftest.$ac_objext"'
11363 { (eval echo "$as_me:11363: \"$ac_try\"") >&5
11364 (eval $ac_try) 2>&5
11366 echo "$as_me:11366: \$? = $ac_status" >&5
11367 (exit "$ac_status"); }; }; then
11370 echo "$as_me: failed program was:" >&5
11371 cat "conftest.$ac_ext" >&5
11373 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11375 echo "$as_me:11375: result: $CC_SHARED_OPTS" >&5
11376 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
11377 CFLAGS="$cf_save_CFLAGS"
11380 cf_cv_shlib_version_infix=no
11382 case "$cf_cv_system_name" in
11383 (aix4.3-9*|aix[5-7]*)
11384 if test "$GCC" = yes; then
11385 CC_SHARED_OPTS='-Wl,-brtl'
11386 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11388 CC_SHARED_OPTS='-brtl'
11389 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
11390 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11394 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
11398 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11399 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11400 cf_cv_shlib_version=cygdll
11401 cf_cv_shlib_version_infix=cygdll
11404 cat >mk_shared_lib.sh <<-CF_EOF
11407 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11410 Linking shared library
11411 ** SHARED_LIB \$SHARED_LIB
11412 ** IMPORT_LIB \$IMPORT_LIB
11414 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11416 chmod +x mk_shared_lib.sh
11420 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11421 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11422 cf_cv_shlib_version=msysdll
11423 cf_cv_shlib_version_infix=msysdll
11426 cat >mk_shared_lib.sh <<-CF_EOF
11429 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11432 Linking shared library
11433 ** SHARED_LIB \$SHARED_LIB
11434 ** IMPORT_LIB \$IMPORT_LIB
11436 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11438 chmod +x mk_shared_lib.sh
11441 cf_try_cflags="no-cpp-precomp"
11442 CC_SHARED_OPTS="-dynamic"
11443 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
11444 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
11445 cf_cv_shlib_version_infix=yes
11446 echo "$as_me:11446: checking if ld -search_paths_first works" >&5
11447 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
11448 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
11449 echo $ECHO_N "(cached) $ECHO_C" >&6
11452 cf_save_LDFLAGS=$LDFLAGS
11453 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11454 cat >"conftest.$ac_ext" <<_ACEOF
11455 #line 11455 "configure"
11456 #include "confdefs.h"
11466 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11467 if { (eval echo "$as_me:11467: \"$ac_link\"") >&5
11468 (eval $ac_link) 2>&5
11470 echo "$as_me:11470: \$? = $ac_status" >&5
11471 (exit "$ac_status"); } &&
11472 { ac_try='test -s "conftest$ac_exeext"'
11473 { (eval echo "$as_me:11473: \"$ac_try\"") >&5
11474 (eval $ac_try) 2>&5
11476 echo "$as_me:11476: \$? = $ac_status" >&5
11477 (exit "$ac_status"); }; }; then
11478 cf_cv_ldflags_search_paths_first=yes
11480 echo "$as_me: failed program was:" >&5
11481 cat "conftest.$ac_ext" >&5
11482 cf_cv_ldflags_search_paths_first=no
11484 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11485 LDFLAGS=$cf_save_LDFLAGS
11487 echo "$as_me:11487: result: $cf_cv_ldflags_search_paths_first" >&5
11488 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
11489 if test "$cf_cv_ldflags_search_paths_first" = yes; then
11490 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11494 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
11495 if test "$GCC" != yes; then
11496 CC_SHARED_OPTS='+Z'
11498 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
11499 INSTALL_LIB="-m 555"
11502 # (tested with gcc 2.7.2 -- I don't have c89)
11503 if test "$GCC" = yes; then
11504 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
11506 CC_SHARED_OPTS='+Z'
11507 LD_SHARED_OPTS='-Wl,+b,${libdir}'
11509 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
11510 # HP-UX shared libraries must be executable, and should be
11511 # readonly to exploit a quirk in the memory manager.
11512 INSTALL_LIB="-m 555"
11515 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11516 if test "$cf_cv_shlib_version" = rel; then
11517 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11519 cf_shared_soname='`basename $@`'
11522 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
11525 if test "$cf_cv_enable_rpath" = yes ; then
11526 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11528 # tested with IRIX 5.2 and 'cc'.
11529 if test "$GCC" != yes; then
11530 CC_SHARED_OPTS='-KPIC'
11531 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
11533 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
11535 cf_cv_rm_so_locs=yes
11537 (linux*|gnu*|k*bsd*-gnu)
11538 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11539 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11540 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11542 if test "$cf_cv_enable_rpath" = yes ; then
11543 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11546 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11547 if test "$cf_cv_shlib_version" = rel; then
11548 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11550 cf_cv_shared_soname='`basename $@`'
11553 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11556 cf_cv_shlib_version=msvcdll
11557 cf_cv_shlib_version_infix=msvcdll
11560 if test "$DFT_LWR_MODEL" = "shared" ; then
11561 LOCAL_LDFLAGS="-link -dll"
11562 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11563 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
11566 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
11567 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
11568 cat >mk_shared_lib.sh <<-CF_EOF
11571 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
11576 Linking shared library
11577 ** SHARED LIB \$SHARED_LIB
11578 ** IMPORT_LIB \$IMPORT_LIB
11580 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
11581 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
11582 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
11584 chmod +x mk_shared_lib.sh
11585 cat >mk_prog.sh <<-CF_EOF
11588 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
11591 ldopts=("/subsystem:console")
11594 while test \$# -gt 0; do
11597 # ignore -link argument
11600 # ignore runtime-library option
11615 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
11618 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
11624 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
11625 ldopts+=("\${linkarg}")
11633 ldopts+=("-out:\$1")
11642 if [ "\$isdll" -ne 0 ]; then
11643 for lib in \${libs[*]}; do
11644 ldopts+=("\$lib.dll.lib")
11647 for lib in \${libs[*]}; do
11648 ldopts+=("\$lib.lib")
11653 ** ld options: "\${ldopts[@]}"
11655 exec \$LD \${ldopts[@]}
11657 chmod +x mk_prog.sh
11658 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
11659 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
11662 cf_cv_shlib_version=mingw
11663 cf_cv_shlib_version_infix=mingw
11666 if test "$DFT_LWR_MODEL" = "shared" ; then
11667 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
11668 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11669 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
11672 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11673 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11674 cat >mk_shared_lib.sh <<-CF_EOF
11677 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
11680 Linking shared library
11681 ** SHARED_LIB \$SHARED_LIB
11682 ** IMPORT_LIB \$IMPORT_LIB
11684 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11686 chmod +x mk_shared_lib.sh
11688 (openbsd[2-9].*|mirbsd*)
11689 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11690 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11691 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11693 if test "$cf_cv_enable_rpath" = yes ; then
11694 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11696 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11698 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11699 if test "$cf_cv_shlib_version" = rel; then
11700 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11702 cf_cv_shared_soname='`basename $@`'
11705 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11709 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
11713 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
11715 (nto-qnx*|openbsd*|freebsd[12].*)
11716 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11717 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
11718 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11720 (dragonfly*|freebsd*)
11721 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11722 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
11723 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
11724 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
11725 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11728 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11729 if test "$cf_cv_shlib_version" = rel; then
11730 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11732 cf_cv_shared_soname='`basename $@`'
11735 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11738 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11739 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
11740 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
11741 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11742 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11743 if test "$cf_cv_shlib_version" = auto; then
11744 if test -f /usr/libexec/ld.elf_so; then
11745 cf_cv_shlib_version=abi
11747 cf_cv_shlib_version=rel
11751 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11752 if test "$cf_cv_shlib_version" = rel; then
11753 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11755 cf_cv_shared_soname='`basename $@`'
11758 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
11760 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
11764 # tested with OSF/1 V3.2 and 'cc'
11765 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
11766 # link with shared libs).
11767 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
11770 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
11773 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
11774 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11775 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11776 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11778 cf_cv_rm_so_locs=yes
11780 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
11781 # tested with osr5.0.5
11782 if test "$GCC" != yes; then
11783 CC_SHARED_OPTS='-belf -KPIC'
11785 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
11786 if test "$cf_cv_enable_rpath" = yes ; then
11787 # only way is to set LD_RUN_PATH but no switch for it
11790 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11791 LINK_PROGS='LD_RUN_PATH=${libdir}'
11792 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
11795 # tested with SunOS 4.1.1 and gcc 2.7.0
11796 if test "$GCC" != yes; then
11797 CC_SHARED_OPTS='-KPIC'
11799 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
11800 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11803 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
11804 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
11805 if test "$DFT_LWR_MODEL" = "shared" ; then
11806 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
11807 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11809 if test "$cf_cv_enable_rpath" = yes ; then
11810 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
11813 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11814 if test "$cf_cv_shlib_version" = rel; then
11815 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11817 cf_cv_shared_soname='`basename $@`'
11820 if test "$GCC" != yes; then
11821 cf_save_CFLAGS="$CFLAGS"
11822 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
11824 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
11825 cat >"conftest.$ac_ext" <<_ACEOF
11826 #line 11826 "configure"
11827 #include "confdefs.h"
11832 printf("Hello\\n");
11837 rm -f "conftest.$ac_objext"
11838 if { (eval echo "$as_me:11838: \"$ac_compile\"") >&5
11839 (eval $ac_compile) 2>&5
11841 echo "$as_me:11841: \$? = $ac_status" >&5
11842 (exit "$ac_status"); } &&
11843 { ac_try='test -s "conftest.$ac_objext"'
11844 { (eval echo "$as_me:11844: \"$ac_try\"") >&5
11845 (eval $ac_try) 2>&5
11847 echo "$as_me:11847: \$? = $ac_status" >&5
11848 (exit "$ac_status"); }; }; then
11851 echo "$as_me: failed program was:" >&5
11852 cat "conftest.$ac_ext" >&5
11854 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11856 CFLAGS="$cf_save_CFLAGS"
11857 CC_SHARED_OPTS=$cf_shared_opts
11858 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
11860 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
11863 (sysv5uw7*|unix_sv*)
11864 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
11865 if test "$GCC" != yes; then
11866 CC_SHARED_OPTS='-KPIC'
11868 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
11871 CC_SHARED_OPTS='unknown'
11872 MK_SHARED_LIB='echo unknown'
11876 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
11877 case "$cf_cv_shlib_version" in
11879 case "$MK_SHARED_LIB" in
11881 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
11884 { echo "$as_me:11884: WARNING: ignored --with-shlib-version" >&5
11885 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
11891 if test -n "$cf_try_cflags"
11893 cat > conftest.$ac_ext <<EOF
11894 #line 11894 "${as_me:-configure}"
11896 int main(int argc, char *argv[])
11898 printf("hello\\n");
11899 return (argv[argc-1] == 0) ;
11902 cf_save_CFLAGS="$CFLAGS"
11903 for cf_opt in $cf_try_cflags
11905 CFLAGS="$cf_save_CFLAGS -$cf_opt"
11906 echo "$as_me:11906: checking if CFLAGS option -$cf_opt works" >&5
11907 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
11908 if { (eval echo "$as_me:11908: \"$ac_compile\"") >&5
11909 (eval $ac_compile) 2>&5
11911 echo "$as_me:11911: \$? = $ac_status" >&5
11912 (exit "$ac_status"); }; then
11913 echo "$as_me:11913: result: yes" >&5
11914 echo "${ECHO_T}yes" >&6
11915 cf_save_CFLAGS="$CFLAGS"
11917 echo "$as_me:11917: result: no" >&5
11918 echo "${ECHO_T}no" >&6
11921 CFLAGS="$cf_save_CFLAGS"
11924 # RPATH_LIST is a colon-separated list of directories
11925 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
11926 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
11928 test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
11930 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
11932 echo "${as_me:-configure}:11932: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
11934 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
11936 echo "${as_me:-configure}:11936: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
11938 # The test/sample programs in the original tree link using rpath option.
11939 # Make it optional for packagers.
11940 if test -n "$LOCAL_LDFLAGS"
11942 echo "$as_me:11942: checking if you want to link sample programs with rpath option" >&5
11943 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
11945 # Check whether --enable-rpath-link or --disable-rpath-link was given.
11946 if test "${enable_rpath_link+set}" = set; then
11947 enableval="$enable_rpath_link"
11948 with_rpath_link=$enableval
11950 with_rpath_link=yes
11952 echo "$as_me:11952: result: $with_rpath_link" >&5
11953 echo "${ECHO_T}$with_rpath_link" >&6
11954 if test "$with_rpath_link" = no
11961 ###############################################################################
11963 ### use option --enable-broken-linker to force on use of broken-linker support
11965 echo "$as_me:11965: checking if you want broken-linker support code" >&5
11966 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
11968 # Check whether --enable-broken_linker or --disable-broken_linker was given.
11969 if test "${enable_broken_linker+set}" = set; then
11970 enableval="$enable_broken_linker"
11971 with_broken_linker=$enableval
11973 with_broken_linker=no
11975 echo "$as_me:11975: result: $with_broken_linker" >&5
11976 echo "${ECHO_T}$with_broken_linker" >&6
11978 : "${BROKEN_LINKER:=0}"
11979 if test "x$with_broken_linker" = xyes ; then
11981 cat >>confdefs.h <<\EOF
11982 #define BROKEN_LINKER 1
11988 # Check to define _XOPEN_SOURCE "automatically"
11990 echo "$as_me:11990: checking if the POSIX test-macros are already defined" >&5
11991 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
11992 if test "${cf_cv_posix_visible+set}" = set; then
11993 echo $ECHO_N "(cached) $ECHO_C" >&6
11996 cat >"conftest.$ac_ext" <<_ACEOF
11997 #line 11997 "configure"
11998 #include "confdefs.h"
12004 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
12005 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
12006 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
12007 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
12008 #error conflicting symbols found
12015 rm -f "conftest.$ac_objext"
12016 if { (eval echo "$as_me:12016: \"$ac_compile\"") >&5
12017 (eval $ac_compile) 2>&5
12019 echo "$as_me:12019: \$? = $ac_status" >&5
12020 (exit "$ac_status"); } &&
12021 { ac_try='test -s "conftest.$ac_objext"'
12022 { (eval echo "$as_me:12022: \"$ac_try\"") >&5
12023 (eval $ac_try) 2>&5
12025 echo "$as_me:12025: \$? = $ac_status" >&5
12026 (exit "$ac_status"); }; }; then
12027 cf_cv_posix_visible=no
12029 echo "$as_me: failed program was:" >&5
12030 cat "conftest.$ac_ext" >&5
12031 cf_cv_posix_visible=yes
12033 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12036 echo "$as_me:12036: result: $cf_cv_posix_visible" >&5
12037 echo "${ECHO_T}$cf_cv_posix_visible" >&6
12039 if test "$cf_cv_posix_visible" = no; then
12041 cf_XOPEN_SOURCE=600
12042 cf_POSIX_C_SOURCE=199506L
12047 cf_xopen_source="-D_ALL_SOURCE"
12050 cf_XOPEN_SOURCE=600
12053 cf_xopen_source="-D_APPLE_C_SOURCE"
12056 cf_xopen_source="-D_DARWIN_C_SOURCE"
12059 (freebsd*|dragonfly*|midnightbsd*)
12060 # 5.x headers associate
12061 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
12062 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
12063 cf_POSIX_C_SOURCE=200112L
12064 cf_XOPEN_SOURCE=600
12065 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12068 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
12071 cf_xopen_source="-D_HPUX_SOURCE"
12074 cf_xopen_source="-D_SGI_SOURCE"
12077 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
12079 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
12081 echo "$as_me:12081: checking if this is the GNU C library" >&5
12082 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
12083 if test "${cf_cv_gnu_library+set}" = set; then
12084 echo $ECHO_N "(cached) $ECHO_C" >&6
12087 cat >"conftest.$ac_ext" <<_ACEOF
12088 #line 12088 "configure"
12089 #include "confdefs.h"
12090 #include <sys/types.h>
12095 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
12097 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
12100 # error not GNU C library
12106 rm -f "conftest.$ac_objext"
12107 if { (eval echo "$as_me:12107: \"$ac_compile\"") >&5
12108 (eval $ac_compile) 2>&5
12110 echo "$as_me:12110: \$? = $ac_status" >&5
12111 (exit "$ac_status"); } &&
12112 { ac_try='test -s "conftest.$ac_objext"'
12113 { (eval echo "$as_me:12113: \"$ac_try\"") >&5
12114 (eval $ac_try) 2>&5
12116 echo "$as_me:12116: \$? = $ac_status" >&5
12117 (exit "$ac_status"); }; }; then
12118 cf_cv_gnu_library=yes
12120 echo "$as_me: failed program was:" >&5
12121 cat "conftest.$ac_ext" >&5
12122 cf_cv_gnu_library=no
12124 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12127 echo "$as_me:12127: result: $cf_cv_gnu_library" >&5
12128 echo "${ECHO_T}$cf_cv_gnu_library" >&6
12130 if test x$cf_cv_gnu_library = xyes; then
12132 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
12133 # was changed to help a little. newlib incorporated the change about 4
12135 echo "$as_me:12135: checking if _DEFAULT_SOURCE can be used as a basis" >&5
12136 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
12137 if test "${cf_cv_gnu_library_219+set}" = set; then
12138 echo $ECHO_N "(cached) $ECHO_C" >&6
12141 cf_save="$CPPFLAGS"
12143 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12144 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12146 cat >"conftest.$ac_ext" <<_ACEOF
12147 #line 12147 "configure"
12148 #include "confdefs.h"
12149 #include <sys/types.h>
12154 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
12156 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
12159 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
12165 rm -f "conftest.$ac_objext"
12166 if { (eval echo "$as_me:12166: \"$ac_compile\"") >&5
12167 (eval $ac_compile) 2>&5
12169 echo "$as_me:12169: \$? = $ac_status" >&5
12170 (exit "$ac_status"); } &&
12171 { ac_try='test -s "conftest.$ac_objext"'
12172 { (eval echo "$as_me:12172: \"$ac_try\"") >&5
12173 (eval $ac_try) 2>&5
12175 echo "$as_me:12175: \$? = $ac_status" >&5
12176 (exit "$ac_status"); }; }; then
12177 cf_cv_gnu_library_219=yes
12179 echo "$as_me: failed program was:" >&5
12180 cat "conftest.$ac_ext" >&5
12181 cf_cv_gnu_library_219=no
12183 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12184 CPPFLAGS="$cf_save"
12187 echo "$as_me:12187: result: $cf_cv_gnu_library_219" >&5
12188 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
12190 if test "x$cf_cv_gnu_library_219" = xyes; then
12191 cf_save="$CPPFLAGS"
12192 echo "$as_me:12192: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
12193 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
12194 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
12195 echo $ECHO_N "(cached) $ECHO_C" >&6
12201 cf_new_extra_cppflags=
12203 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
12205 case "$cf_fix_cppflags" in
12207 case "$cf_add_cflags" in
12208 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12209 case "$cf_add_cflags" in
12211 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12213 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12214 && test -z "${cf_tst_cflags}" \
12215 && cf_fix_cppflags=yes
12217 if test "$cf_fix_cppflags" = yes ; then
12219 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12220 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12223 elif test "${cf_tst_cflags}" = "\"'" ; then
12225 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12226 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12232 case "$CPPFLAGS" in
12236 case "$cf_add_cflags" in
12238 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12240 CPPFLAGS=`echo "$CPPFLAGS" | \
12241 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12242 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12247 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12248 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12255 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12256 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12263 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12264 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12266 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12268 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12269 && test -z "${cf_tst_cflags}" \
12270 && cf_fix_cppflags=no
12275 if test -n "$cf_new_cflags" ; then
12277 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12278 CFLAGS="${CFLAGS}$cf_new_cflags"
12282 if test -n "$cf_new_cppflags" ; then
12284 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12285 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12289 if test -n "$cf_new_extra_cppflags" ; then
12291 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12292 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12296 cat >"conftest.$ac_ext" <<_ACEOF
12297 #line 12297 "configure"
12298 #include "confdefs.h"
12300 #include <limits.h>
12301 #include <sys/types.h>
12307 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
12310 # error GNU C library is too old
12316 rm -f "conftest.$ac_objext"
12317 if { (eval echo "$as_me:12317: \"$ac_compile\"") >&5
12318 (eval $ac_compile) 2>&5
12320 echo "$as_me:12320: \$? = $ac_status" >&5
12321 (exit "$ac_status"); } &&
12322 { ac_try='test -s "conftest.$ac_objext"'
12323 { (eval echo "$as_me:12323: \"$ac_try\"") >&5
12324 (eval $ac_try) 2>&5
12326 echo "$as_me:12326: \$? = $ac_status" >&5
12327 (exit "$ac_status"); }; }; then
12328 cf_cv_gnu_dftsrc_219=yes
12330 echo "$as_me: failed program was:" >&5
12331 cat "conftest.$ac_ext" >&5
12332 cf_cv_gnu_dftsrc_219=no
12334 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12337 echo "$as_me:12337: result: $cf_cv_gnu_dftsrc_219" >&5
12338 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
12339 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
12341 cf_cv_gnu_dftsrc_219=maybe
12344 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
12346 echo "$as_me:12346: checking if we must define _GNU_SOURCE" >&5
12347 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
12348 if test "${cf_cv_gnu_source+set}" = set; then
12349 echo $ECHO_N "(cached) $ECHO_C" >&6
12352 cat >"conftest.$ac_ext" <<_ACEOF
12353 #line 12353 "configure"
12354 #include "confdefs.h"
12355 #include <sys/types.h>
12360 #ifndef _XOPEN_SOURCE
12361 #error expected _XOPEN_SOURCE to be defined
12367 rm -f "conftest.$ac_objext"
12368 if { (eval echo "$as_me:12368: \"$ac_compile\"") >&5
12369 (eval $ac_compile) 2>&5
12371 echo "$as_me:12371: \$? = $ac_status" >&5
12372 (exit "$ac_status"); } &&
12373 { ac_try='test -s "conftest.$ac_objext"'
12374 { (eval echo "$as_me:12374: \"$ac_try\"") >&5
12375 (eval $ac_try) 2>&5
12377 echo "$as_me:12377: \$? = $ac_status" >&5
12378 (exit "$ac_status"); }; }; then
12379 cf_cv_gnu_source=no
12381 echo "$as_me: failed program was:" >&5
12382 cat "conftest.$ac_ext" >&5
12383 cf_save="$CPPFLAGS"
12388 cf_new_extra_cppflags=
12390 for cf_add_cflags in -D_GNU_SOURCE
12392 case "$cf_fix_cppflags" in
12394 case "$cf_add_cflags" in
12395 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12396 case "$cf_add_cflags" in
12398 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12400 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12401 && test -z "${cf_tst_cflags}" \
12402 && cf_fix_cppflags=yes
12404 if test "$cf_fix_cppflags" = yes ; then
12406 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12407 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12410 elif test "${cf_tst_cflags}" = "\"'" ; then
12412 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12413 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12419 case "$CPPFLAGS" in
12423 case "$cf_add_cflags" in
12425 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12427 CPPFLAGS=`echo "$CPPFLAGS" | \
12428 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12429 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12434 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12435 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12442 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12443 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12450 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12451 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12453 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12455 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12456 && test -z "${cf_tst_cflags}" \
12457 && cf_fix_cppflags=no
12462 if test -n "$cf_new_cflags" ; then
12464 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12465 CFLAGS="${CFLAGS}$cf_new_cflags"
12469 if test -n "$cf_new_cppflags" ; then
12471 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12472 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12476 if test -n "$cf_new_extra_cppflags" ; then
12478 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12479 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12483 cat >"conftest.$ac_ext" <<_ACEOF
12484 #line 12484 "configure"
12485 #include "confdefs.h"
12486 #include <sys/types.h>
12491 #ifdef _XOPEN_SOURCE
12492 #error expected _XOPEN_SOURCE to be undefined
12498 rm -f "conftest.$ac_objext"
12499 if { (eval echo "$as_me:12499: \"$ac_compile\"") >&5
12500 (eval $ac_compile) 2>&5
12502 echo "$as_me:12502: \$? = $ac_status" >&5
12503 (exit "$ac_status"); } &&
12504 { ac_try='test -s "conftest.$ac_objext"'
12505 { (eval echo "$as_me:12505: \"$ac_try\"") >&5
12506 (eval $ac_try) 2>&5
12508 echo "$as_me:12508: \$? = $ac_status" >&5
12509 (exit "$ac_status"); }; }; then
12510 cf_cv_gnu_source=no
12512 echo "$as_me: failed program was:" >&5
12513 cat "conftest.$ac_ext" >&5
12514 cf_cv_gnu_source=yes
12516 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12517 CPPFLAGS="$cf_save"
12520 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12523 echo "$as_me:12523: result: $cf_cv_gnu_source" >&5
12524 echo "${ECHO_T}$cf_cv_gnu_source" >&6
12526 if test "$cf_cv_gnu_source" = yes
12528 echo "$as_me:12528: checking if we should also define _DEFAULT_SOURCE" >&5
12529 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
12530 if test "${cf_cv_default_source+set}" = set; then
12531 echo $ECHO_N "(cached) $ECHO_C" >&6
12534 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12535 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
12537 cat >"conftest.$ac_ext" <<_ACEOF
12538 #line 12538 "configure"
12539 #include "confdefs.h"
12540 #include <sys/types.h>
12545 #ifdef _DEFAULT_SOURCE
12546 #error expected _DEFAULT_SOURCE to be undefined
12552 rm -f "conftest.$ac_objext"
12553 if { (eval echo "$as_me:12553: \"$ac_compile\"") >&5
12554 (eval $ac_compile) 2>&5
12556 echo "$as_me:12556: \$? = $ac_status" >&5
12557 (exit "$ac_status"); } &&
12558 { ac_try='test -s "conftest.$ac_objext"'
12559 { (eval echo "$as_me:12559: \"$ac_try\"") >&5
12560 (eval $ac_try) 2>&5
12562 echo "$as_me:12562: \$? = $ac_status" >&5
12563 (exit "$ac_status"); }; }; then
12564 cf_cv_default_source=no
12566 echo "$as_me: failed program was:" >&5
12567 cat "conftest.$ac_ext" >&5
12568 cf_cv_default_source=yes
12570 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12573 echo "$as_me:12573: result: $cf_cv_default_source" >&5
12574 echo "${ECHO_T}$cf_cv_default_source" >&6
12575 if test "$cf_cv_default_source" = yes
12578 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12579 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12589 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
12592 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
12595 if test "$cf_cv_posix_visible" = no; then
12597 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
12599 cf_save_CFLAGS="$CFLAGS"
12600 cf_save_CPPFLAGS="$CPPFLAGS"
12602 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
12603 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12604 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12606 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
12607 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12608 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12610 echo "$as_me:12610: checking if we should define _POSIX_C_SOURCE" >&5
12611 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
12612 if test "${cf_cv_posix_c_source+set}" = set; then
12613 echo $ECHO_N "(cached) $ECHO_C" >&6
12616 echo "${as_me:-configure}:12616: testing if the symbol is already defined go no further ..." 1>&5
12618 cat >"conftest.$ac_ext" <<_ACEOF
12619 #line 12619 "configure"
12620 #include "confdefs.h"
12621 #include <sys/types.h>
12626 #ifndef _POSIX_C_SOURCE
12633 rm -f "conftest.$ac_objext"
12634 if { (eval echo "$as_me:12634: \"$ac_compile\"") >&5
12635 (eval $ac_compile) 2>&5
12637 echo "$as_me:12637: \$? = $ac_status" >&5
12638 (exit "$ac_status"); } &&
12639 { ac_try='test -s "conftest.$ac_objext"'
12640 { (eval echo "$as_me:12640: \"$ac_try\"") >&5
12641 (eval $ac_try) 2>&5
12643 echo "$as_me:12643: \$? = $ac_status" >&5
12644 (exit "$ac_status"); }; }; then
12645 cf_cv_posix_c_source=no
12647 echo "$as_me: failed program was:" >&5
12648 cat "conftest.$ac_ext" >&5
12649 cf_want_posix_source=no
12650 case .$cf_POSIX_C_SOURCE in
12652 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12655 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12656 cf_want_posix_source=yes
12659 cf_want_posix_source=yes
12662 if test "$cf_want_posix_source" = yes ; then
12663 cat >"conftest.$ac_ext" <<_ACEOF
12664 #line 12664 "configure"
12665 #include "confdefs.h"
12666 #include <sys/types.h>
12671 #ifdef _POSIX_SOURCE
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
12692 echo "$as_me: failed program was:" >&5
12693 cat "conftest.$ac_ext" >&5
12694 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
12696 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12699 echo "${as_me:-configure}:12699: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
12701 CFLAGS="$cf_trim_CFLAGS"
12702 CPPFLAGS="$cf_trim_CPPFLAGS"
12704 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12705 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
12707 echo "${as_me:-configure}:12707: testing if the second compile does not leave our definition intact error ..." 1>&5
12709 cat >"conftest.$ac_ext" <<_ACEOF
12710 #line 12710 "configure"
12711 #include "confdefs.h"
12712 #include <sys/types.h>
12717 #ifndef _POSIX_C_SOURCE
12724 rm -f "conftest.$ac_objext"
12725 if { (eval echo "$as_me:12725: \"$ac_compile\"") >&5
12726 (eval $ac_compile) 2>&5
12728 echo "$as_me:12728: \$? = $ac_status" >&5
12729 (exit "$ac_status"); } &&
12730 { ac_try='test -s "conftest.$ac_objext"'
12731 { (eval echo "$as_me:12731: \"$ac_try\"") >&5
12732 (eval $ac_try) 2>&5
12734 echo "$as_me:12734: \$? = $ac_status" >&5
12735 (exit "$ac_status"); }; }; then
12738 echo "$as_me: failed program was:" >&5
12739 cat "conftest.$ac_ext" >&5
12740 cf_cv_posix_c_source=no
12742 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12743 CFLAGS="$cf_save_CFLAGS"
12744 CPPFLAGS="$cf_save_CPPFLAGS"
12747 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12750 echo "$as_me:12750: result: $cf_cv_posix_c_source" >&5
12751 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
12753 if test "$cf_cv_posix_c_source" != no ; then
12754 CFLAGS="$cf_trim_CFLAGS"
12755 CPPFLAGS="$cf_trim_CPPFLAGS"
12760 cf_new_extra_cppflags=
12762 for cf_add_cflags in $cf_cv_posix_c_source
12764 case "$cf_fix_cppflags" in
12766 case "$cf_add_cflags" in
12767 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12768 case "$cf_add_cflags" in
12770 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12772 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12773 && test -z "${cf_tst_cflags}" \
12774 && cf_fix_cppflags=yes
12776 if test "$cf_fix_cppflags" = yes ; then
12778 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12779 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12782 elif test "${cf_tst_cflags}" = "\"'" ; then
12784 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12785 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12791 case "$CPPFLAGS" in
12795 case "$cf_add_cflags" in
12797 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12799 CPPFLAGS=`echo "$CPPFLAGS" | \
12800 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12801 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12806 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12807 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12814 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12815 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12822 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12823 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12825 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12827 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12828 && test -z "${cf_tst_cflags}" \
12829 && cf_fix_cppflags=no
12834 if test -n "$cf_new_cflags" ; then
12836 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12837 CFLAGS="${CFLAGS}$cf_new_cflags"
12841 if test -n "$cf_new_cppflags" ; then
12843 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12844 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12848 if test -n "$cf_new_extra_cppflags" ; then
12850 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12851 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12857 fi # cf_cv_posix_visible
12861 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
12864 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
12865 cf_xopen_source="-D_BSD_SOURCE"
12866 cf_XOPEN_SOURCE=600
12869 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
12872 cf_xopen_source="-D_OSF_SOURCE"
12875 cf_xopen_source="-D_QNX_SOURCE"
12878 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
12881 cf_xopen_source="-D__EXTENSIONS__"
12882 cf_cv_xopen_source=broken
12884 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
12890 echo "$as_me:12890: checking if we should define _XOPEN_SOURCE" >&5
12891 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12892 if test "${cf_cv_xopen_source+set}" = set; then
12893 echo $ECHO_N "(cached) $ECHO_C" >&6
12896 cat >"conftest.$ac_ext" <<_ACEOF
12897 #line 12897 "configure"
12898 #include "confdefs.h"
12900 #include <stdlib.h>
12901 #include <string.h>
12902 #include <sys/types.h>
12908 #ifndef _XOPEN_SOURCE
12915 rm -f "conftest.$ac_objext"
12916 if { (eval echo "$as_me:12916: \"$ac_compile\"") >&5
12917 (eval $ac_compile) 2>&5
12919 echo "$as_me:12919: \$? = $ac_status" >&5
12920 (exit "$ac_status"); } &&
12921 { ac_try='test -s "conftest.$ac_objext"'
12922 { (eval echo "$as_me:12922: \"$ac_try\"") >&5
12923 (eval $ac_try) 2>&5
12925 echo "$as_me:12925: \$? = $ac_status" >&5
12926 (exit "$ac_status"); }; }; then
12927 cf_cv_xopen_source=no
12929 echo "$as_me: failed program was:" >&5
12930 cat "conftest.$ac_ext" >&5
12931 cf_save="$CPPFLAGS"
12933 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12934 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12936 cat >"conftest.$ac_ext" <<_ACEOF
12937 #line 12937 "configure"
12938 #include "confdefs.h"
12940 #include <stdlib.h>
12941 #include <string.h>
12942 #include <sys/types.h>
12948 #ifdef _XOPEN_SOURCE
12955 rm -f "conftest.$ac_objext"
12956 if { (eval echo "$as_me:12956: \"$ac_compile\"") >&5
12957 (eval $ac_compile) 2>&5
12959 echo "$as_me:12959: \$? = $ac_status" >&5
12960 (exit "$ac_status"); } &&
12961 { ac_try='test -s "conftest.$ac_objext"'
12962 { (eval echo "$as_me:12962: \"$ac_try\"") >&5
12963 (eval $ac_try) 2>&5
12965 echo "$as_me:12965: \$? = $ac_status" >&5
12966 (exit "$ac_status"); }; }; then
12967 cf_cv_xopen_source=no
12969 echo "$as_me: failed program was:" >&5
12970 cat "conftest.$ac_ext" >&5
12971 cf_cv_xopen_source=$cf_XOPEN_SOURCE
12973 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12974 CPPFLAGS="$cf_save"
12977 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12980 echo "$as_me:12980: result: $cf_cv_xopen_source" >&5
12981 echo "${ECHO_T}$cf_cv_xopen_source" >&6
12983 if test "$cf_cv_xopen_source" != no ; then
12985 CFLAGS=`echo "$CFLAGS" | \
12986 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12987 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
12989 CPPFLAGS=`echo "$CPPFLAGS" | \
12990 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12991 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
12993 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12998 cf_new_extra_cppflags=
13000 for cf_add_cflags in $cf_temp_xopen_source
13002 case "$cf_fix_cppflags" in
13004 case "$cf_add_cflags" in
13005 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13006 case "$cf_add_cflags" in
13008 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13010 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13011 && test -z "${cf_tst_cflags}" \
13012 && cf_fix_cppflags=yes
13014 if test "$cf_fix_cppflags" = yes ; then
13016 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13017 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13020 elif test "${cf_tst_cflags}" = "\"'" ; then
13022 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13023 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13029 case "$CPPFLAGS" in
13033 case "$cf_add_cflags" in
13035 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13037 CPPFLAGS=`echo "$CPPFLAGS" | \
13038 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13039 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13044 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13045 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13052 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13053 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13060 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13061 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13063 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13065 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13066 && test -z "${cf_tst_cflags}" \
13067 && cf_fix_cppflags=no
13072 if test -n "$cf_new_cflags" ; then
13074 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13075 CFLAGS="${CFLAGS}$cf_new_cflags"
13079 if test -n "$cf_new_cppflags" ; then
13081 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13082 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13086 if test -n "$cf_new_extra_cppflags" ; then
13088 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13089 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13095 if test "$cf_cv_posix_visible" = no; then
13097 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
13099 cf_save_CFLAGS="$CFLAGS"
13100 cf_save_CPPFLAGS="$CPPFLAGS"
13102 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13103 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13104 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13106 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13107 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13108 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13110 echo "$as_me:13110: checking if we should define _POSIX_C_SOURCE" >&5
13111 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13112 if test "${cf_cv_posix_c_source+set}" = set; then
13113 echo $ECHO_N "(cached) $ECHO_C" >&6
13116 echo "${as_me:-configure}:13116: testing if the symbol is already defined go no further ..." 1>&5
13118 cat >"conftest.$ac_ext" <<_ACEOF
13119 #line 13119 "configure"
13120 #include "confdefs.h"
13121 #include <sys/types.h>
13126 #ifndef _POSIX_C_SOURCE
13133 rm -f "conftest.$ac_objext"
13134 if { (eval echo "$as_me:13134: \"$ac_compile\"") >&5
13135 (eval $ac_compile) 2>&5
13137 echo "$as_me:13137: \$? = $ac_status" >&5
13138 (exit "$ac_status"); } &&
13139 { ac_try='test -s "conftest.$ac_objext"'
13140 { (eval echo "$as_me:13140: \"$ac_try\"") >&5
13141 (eval $ac_try) 2>&5
13143 echo "$as_me:13143: \$? = $ac_status" >&5
13144 (exit "$ac_status"); }; }; then
13145 cf_cv_posix_c_source=no
13147 echo "$as_me: failed program was:" >&5
13148 cat "conftest.$ac_ext" >&5
13149 cf_want_posix_source=no
13150 case .$cf_POSIX_C_SOURCE in
13152 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13155 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13156 cf_want_posix_source=yes
13159 cf_want_posix_source=yes
13162 if test "$cf_want_posix_source" = yes ; then
13163 cat >"conftest.$ac_ext" <<_ACEOF
13164 #line 13164 "configure"
13165 #include "confdefs.h"
13166 #include <sys/types.h>
13171 #ifdef _POSIX_SOURCE
13178 rm -f "conftest.$ac_objext"
13179 if { (eval echo "$as_me:13179: \"$ac_compile\"") >&5
13180 (eval $ac_compile) 2>&5
13182 echo "$as_me:13182: \$? = $ac_status" >&5
13183 (exit "$ac_status"); } &&
13184 { ac_try='test -s "conftest.$ac_objext"'
13185 { (eval echo "$as_me:13185: \"$ac_try\"") >&5
13186 (eval $ac_try) 2>&5
13188 echo "$as_me:13188: \$? = $ac_status" >&5
13189 (exit "$ac_status"); }; }; then
13192 echo "$as_me: failed program was:" >&5
13193 cat "conftest.$ac_ext" >&5
13194 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13196 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13199 echo "${as_me:-configure}:13199: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13201 CFLAGS="$cf_trim_CFLAGS"
13202 CPPFLAGS="$cf_trim_CPPFLAGS"
13204 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13205 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13207 echo "${as_me:-configure}:13207: testing if the second compile does not leave our definition intact error ..." 1>&5
13209 cat >"conftest.$ac_ext" <<_ACEOF
13210 #line 13210 "configure"
13211 #include "confdefs.h"
13212 #include <sys/types.h>
13217 #ifndef _POSIX_C_SOURCE
13224 rm -f "conftest.$ac_objext"
13225 if { (eval echo "$as_me:13225: \"$ac_compile\"") >&5
13226 (eval $ac_compile) 2>&5
13228 echo "$as_me:13228: \$? = $ac_status" >&5
13229 (exit "$ac_status"); } &&
13230 { ac_try='test -s "conftest.$ac_objext"'
13231 { (eval echo "$as_me:13231: \"$ac_try\"") >&5
13232 (eval $ac_try) 2>&5
13234 echo "$as_me:13234: \$? = $ac_status" >&5
13235 (exit "$ac_status"); }; }; then
13238 echo "$as_me: failed program was:" >&5
13239 cat "conftest.$ac_ext" >&5
13240 cf_cv_posix_c_source=no
13242 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13243 CFLAGS="$cf_save_CFLAGS"
13244 CPPFLAGS="$cf_save_CPPFLAGS"
13247 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13250 echo "$as_me:13250: result: $cf_cv_posix_c_source" >&5
13251 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13253 if test "$cf_cv_posix_c_source" != no ; then
13254 CFLAGS="$cf_trim_CFLAGS"
13255 CPPFLAGS="$cf_trim_CPPFLAGS"
13260 cf_new_extra_cppflags=
13262 for cf_add_cflags in $cf_cv_posix_c_source
13264 case "$cf_fix_cppflags" in
13266 case "$cf_add_cflags" in
13267 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13268 case "$cf_add_cflags" in
13270 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13272 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13273 && test -z "${cf_tst_cflags}" \
13274 && cf_fix_cppflags=yes
13276 if test "$cf_fix_cppflags" = yes ; then
13278 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13279 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13282 elif test "${cf_tst_cflags}" = "\"'" ; then
13284 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13285 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13291 case "$CPPFLAGS" in
13295 case "$cf_add_cflags" in
13297 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13299 CPPFLAGS=`echo "$CPPFLAGS" | \
13300 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13301 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13306 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13307 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13314 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13315 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13322 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13323 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13325 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13327 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13328 && test -z "${cf_tst_cflags}" \
13329 && cf_fix_cppflags=no
13334 if test -n "$cf_new_cflags" ; then
13336 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13337 CFLAGS="${CFLAGS}$cf_new_cflags"
13341 if test -n "$cf_new_cppflags" ; then
13343 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13344 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13348 if test -n "$cf_new_extra_cppflags" ; then
13350 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13351 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13357 fi # cf_cv_posix_visible
13362 if test -n "$cf_xopen_source" ; then
13367 cf_new_extra_cppflags=
13369 for cf_add_cflags in $cf_xopen_source
13371 case "$cf_fix_cppflags" in
13373 case "$cf_add_cflags" in
13374 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13375 case "$cf_add_cflags" in
13377 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13379 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13380 && test -z "${cf_tst_cflags}" \
13381 && cf_fix_cppflags=yes
13383 if test "$cf_fix_cppflags" = yes ; then
13385 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13386 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13389 elif test "${cf_tst_cflags}" = "\"'" ; then
13391 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13392 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13398 case "$CPPFLAGS" in
13402 case "$cf_add_cflags" in
13404 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13406 CPPFLAGS=`echo "$CPPFLAGS" | \
13407 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13408 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13413 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13414 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13421 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13422 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13429 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13430 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13432 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13434 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13435 && test -z "${cf_tst_cflags}" \
13436 && cf_fix_cppflags=no
13441 if test -n "$cf_new_cflags" ; then
13442 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13444 echo "${as_me:-configure}:13444: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13446 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13447 CFLAGS="${CFLAGS}$cf_new_cflags"
13451 if test -n "$cf_new_cppflags" ; then
13452 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13454 echo "${as_me:-configure}:13454: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13456 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13457 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13461 if test -n "$cf_new_extra_cppflags" ; then
13462 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13464 echo "${as_me:-configure}:13464: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13466 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13467 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13473 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
13474 echo "$as_me:13474: checking if _XOPEN_SOURCE really is set" >&5
13475 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
13476 cat >"conftest.$ac_ext" <<_ACEOF
13477 #line 13477 "configure"
13478 #include "confdefs.h"
13479 #include <stdlib.h>
13484 #ifndef _XOPEN_SOURCE
13491 rm -f "conftest.$ac_objext"
13492 if { (eval echo "$as_me:13492: \"$ac_compile\"") >&5
13493 (eval $ac_compile) 2>&5
13495 echo "$as_me:13495: \$? = $ac_status" >&5
13496 (exit "$ac_status"); } &&
13497 { ac_try='test -s "conftest.$ac_objext"'
13498 { (eval echo "$as_me:13498: \"$ac_try\"") >&5
13499 (eval $ac_try) 2>&5
13501 echo "$as_me:13501: \$? = $ac_status" >&5
13502 (exit "$ac_status"); }; }; then
13503 cf_XOPEN_SOURCE_set=yes
13505 echo "$as_me: failed program was:" >&5
13506 cat "conftest.$ac_ext" >&5
13507 cf_XOPEN_SOURCE_set=no
13509 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13510 echo "$as_me:13510: result: $cf_XOPEN_SOURCE_set" >&5
13511 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
13512 if test "$cf_XOPEN_SOURCE_set" = yes
13514 cat >"conftest.$ac_ext" <<_ACEOF
13515 #line 13515 "configure"
13516 #include "confdefs.h"
13517 #include <stdlib.h>
13522 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
13529 rm -f "conftest.$ac_objext"
13530 if { (eval echo "$as_me:13530: \"$ac_compile\"") >&5
13531 (eval $ac_compile) 2>&5
13533 echo "$as_me:13533: \$? = $ac_status" >&5
13534 (exit "$ac_status"); } &&
13535 { ac_try='test -s "conftest.$ac_objext"'
13536 { (eval echo "$as_me:13536: \"$ac_try\"") >&5
13537 (eval $ac_try) 2>&5
13539 echo "$as_me:13539: \$? = $ac_status" >&5
13540 (exit "$ac_status"); }; }; then
13541 cf_XOPEN_SOURCE_set_ok=yes
13543 echo "$as_me: failed program was:" >&5
13544 cat "conftest.$ac_ext" >&5
13545 cf_XOPEN_SOURCE_set_ok=no
13547 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13548 if test "$cf_XOPEN_SOURCE_set_ok" = no
13550 { echo "$as_me:13550: WARNING: _XOPEN_SOURCE is lower than requested" >&5
13551 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
13555 echo "$as_me:13555: checking if we should define _XOPEN_SOURCE" >&5
13556 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13557 if test "${cf_cv_xopen_source+set}" = set; then
13558 echo $ECHO_N "(cached) $ECHO_C" >&6
13561 cat >"conftest.$ac_ext" <<_ACEOF
13562 #line 13562 "configure"
13563 #include "confdefs.h"
13565 #include <stdlib.h>
13566 #include <string.h>
13567 #include <sys/types.h>
13573 #ifndef _XOPEN_SOURCE
13580 rm -f "conftest.$ac_objext"
13581 if { (eval echo "$as_me:13581: \"$ac_compile\"") >&5
13582 (eval $ac_compile) 2>&5
13584 echo "$as_me:13584: \$? = $ac_status" >&5
13585 (exit "$ac_status"); } &&
13586 { ac_try='test -s "conftest.$ac_objext"'
13587 { (eval echo "$as_me:13587: \"$ac_try\"") >&5
13588 (eval $ac_try) 2>&5
13590 echo "$as_me:13590: \$? = $ac_status" >&5
13591 (exit "$ac_status"); }; }; then
13592 cf_cv_xopen_source=no
13594 echo "$as_me: failed program was:" >&5
13595 cat "conftest.$ac_ext" >&5
13596 cf_save="$CPPFLAGS"
13598 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13599 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13601 cat >"conftest.$ac_ext" <<_ACEOF
13602 #line 13602 "configure"
13603 #include "confdefs.h"
13605 #include <stdlib.h>
13606 #include <string.h>
13607 #include <sys/types.h>
13613 #ifdef _XOPEN_SOURCE
13620 rm -f "conftest.$ac_objext"
13621 if { (eval echo "$as_me:13621: \"$ac_compile\"") >&5
13622 (eval $ac_compile) 2>&5
13624 echo "$as_me:13624: \$? = $ac_status" >&5
13625 (exit "$ac_status"); } &&
13626 { ac_try='test -s "conftest.$ac_objext"'
13627 { (eval echo "$as_me:13627: \"$ac_try\"") >&5
13628 (eval $ac_try) 2>&5
13630 echo "$as_me:13630: \$? = $ac_status" >&5
13631 (exit "$ac_status"); }; }; then
13632 cf_cv_xopen_source=no
13634 echo "$as_me: failed program was:" >&5
13635 cat "conftest.$ac_ext" >&5
13636 cf_cv_xopen_source=$cf_XOPEN_SOURCE
13638 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13639 CPPFLAGS="$cf_save"
13642 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13645 echo "$as_me:13645: result: $cf_cv_xopen_source" >&5
13646 echo "${ECHO_T}$cf_cv_xopen_source" >&6
13648 if test "$cf_cv_xopen_source" != no ; then
13650 CFLAGS=`echo "$CFLAGS" | \
13651 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13652 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13654 CPPFLAGS=`echo "$CPPFLAGS" | \
13655 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13656 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13658 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13663 cf_new_extra_cppflags=
13665 for cf_add_cflags in $cf_temp_xopen_source
13667 case "$cf_fix_cppflags" in
13669 case "$cf_add_cflags" in
13670 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13671 case "$cf_add_cflags" in
13673 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13675 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13676 && test -z "${cf_tst_cflags}" \
13677 && cf_fix_cppflags=yes
13679 if test "$cf_fix_cppflags" = yes ; then
13681 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13682 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13685 elif test "${cf_tst_cflags}" = "\"'" ; then
13687 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13688 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13694 case "$CPPFLAGS" in
13698 case "$cf_add_cflags" in
13700 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13702 CPPFLAGS=`echo "$CPPFLAGS" | \
13703 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13704 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13709 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13710 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13717 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13718 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13725 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13726 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13728 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13730 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13731 && test -z "${cf_tst_cflags}" \
13732 && cf_fix_cppflags=no
13737 if test -n "$cf_new_cflags" ; then
13739 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13740 CFLAGS="${CFLAGS}$cf_new_cflags"
13744 if test -n "$cf_new_cppflags" ; then
13746 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13747 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13751 if test -n "$cf_new_extra_cppflags" ; then
13753 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13754 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13762 fi # cf_cv_posix_visible
13764 # Check whether --enable-largefile or --disable-largefile was given.
13765 if test "${enable_largefile+set}" = set; then
13766 enableval="$enable_largefile"
13769 if test "$enable_largefile" != no; then
13771 echo "$as_me:13771: checking for special C compiler options needed for large files" >&5
13772 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13773 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13774 echo $ECHO_N "(cached) $ECHO_C" >&6
13776 ac_cv_sys_largefile_CC=no
13777 if test "$GCC" != yes; then
13780 # IRIX 6.2 and later do not support large files by default,
13781 # so use the C compiler's -n32 option if that helps.
13782 cat >"conftest.$ac_ext" <<_ACEOF
13783 #line 13783 "configure"
13784 #include "confdefs.h"
13785 #include <sys/types.h>
13786 /* Check that off_t can represent 2**63 - 1 correctly.
13787 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13788 since some C++ compilers masquerading as C compilers
13789 incorrectly reject 9223372036854775807. */
13790 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13791 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13792 && LARGE_OFF_T % 2147483647 == 1)
13802 rm -f "conftest.$ac_objext"
13803 if { (eval echo "$as_me:13803: \"$ac_compile\"") >&5
13804 (eval $ac_compile) 2>&5
13806 echo "$as_me:13806: \$? = $ac_status" >&5
13807 (exit "$ac_status"); } &&
13808 { ac_try='test -s "conftest.$ac_objext"'
13809 { (eval echo "$as_me:13809: \"$ac_try\"") >&5
13810 (eval $ac_try) 2>&5
13812 echo "$as_me:13812: \$? = $ac_status" >&5
13813 (exit "$ac_status"); }; }; then
13816 echo "$as_me: failed program was:" >&5
13817 cat "conftest.$ac_ext" >&5
13819 rm -f "conftest.$ac_objext"
13821 rm -f "conftest.$ac_objext"
13822 if { (eval echo "$as_me:13822: \"$ac_compile\"") >&5
13823 (eval $ac_compile) 2>&5
13825 echo "$as_me:13825: \$? = $ac_status" >&5
13826 (exit "$ac_status"); } &&
13827 { ac_try='test -s "conftest.$ac_objext"'
13828 { (eval echo "$as_me:13828: \"$ac_try\"") >&5
13829 (eval $ac_try) 2>&5
13831 echo "$as_me:13831: \$? = $ac_status" >&5
13832 (exit "$ac_status"); }; }; then
13833 ac_cv_sys_largefile_CC=' -n32'; break
13835 echo "$as_me: failed program was:" >&5
13836 cat "conftest.$ac_ext" >&5
13838 rm -f "conftest.$ac_objext"
13842 rm -f "conftest.$ac_ext"
13845 echo "$as_me:13845: result: $ac_cv_sys_largefile_CC" >&5
13846 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13847 if test "$ac_cv_sys_largefile_CC" != no; then
13848 CC=$CC$ac_cv_sys_largefile_CC
13851 echo "$as_me:13851: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13852 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13853 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13854 echo $ECHO_N "(cached) $ECHO_C" >&6
13857 ac_cv_sys_file_offset_bits=no
13858 cat >"conftest.$ac_ext" <<_ACEOF
13859 #line 13859 "configure"
13860 #include "confdefs.h"
13861 #include <sys/types.h>
13862 /* Check that off_t can represent 2**63 - 1 correctly.
13863 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13864 since some C++ compilers masquerading as C compilers
13865 incorrectly reject 9223372036854775807. */
13866 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13867 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13868 && LARGE_OFF_T % 2147483647 == 1)
13878 rm -f "conftest.$ac_objext"
13879 if { (eval echo "$as_me:13879: \"$ac_compile\"") >&5
13880 (eval $ac_compile) 2>&5
13882 echo "$as_me:13882: \$? = $ac_status" >&5
13883 (exit "$ac_status"); } &&
13884 { ac_try='test -s "conftest.$ac_objext"'
13885 { (eval echo "$as_me:13885: \"$ac_try\"") >&5
13886 (eval $ac_try) 2>&5
13888 echo "$as_me:13888: \$? = $ac_status" >&5
13889 (exit "$ac_status"); }; }; then
13892 echo "$as_me: failed program was:" >&5
13893 cat "conftest.$ac_ext" >&5
13895 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13896 cat >"conftest.$ac_ext" <<_ACEOF
13897 #line 13897 "configure"
13898 #include "confdefs.h"
13899 #define _FILE_OFFSET_BITS 64
13900 #include <sys/types.h>
13901 /* Check that off_t can represent 2**63 - 1 correctly.
13902 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13903 since some C++ compilers masquerading as C compilers
13904 incorrectly reject 9223372036854775807. */
13905 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13906 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13907 && LARGE_OFF_T % 2147483647 == 1)
13917 rm -f "conftest.$ac_objext"
13918 if { (eval echo "$as_me:13918: \"$ac_compile\"") >&5
13919 (eval $ac_compile) 2>&5
13921 echo "$as_me:13921: \$? = $ac_status" >&5
13922 (exit "$ac_status"); } &&
13923 { ac_try='test -s "conftest.$ac_objext"'
13924 { (eval echo "$as_me:13924: \"$ac_try\"") >&5
13925 (eval $ac_try) 2>&5
13927 echo "$as_me:13927: \$? = $ac_status" >&5
13928 (exit "$ac_status"); }; }; then
13929 ac_cv_sys_file_offset_bits=64; break
13931 echo "$as_me: failed program was:" >&5
13932 cat "conftest.$ac_ext" >&5
13934 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13938 echo "$as_me:13938: result: $ac_cv_sys_file_offset_bits" >&5
13939 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13940 if test "$ac_cv_sys_file_offset_bits" != no; then
13942 cat >>confdefs.h <<EOF
13943 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13948 echo "$as_me:13948: checking for _LARGE_FILES value needed for large files" >&5
13949 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13950 if test "${ac_cv_sys_large_files+set}" = set; then
13951 echo $ECHO_N "(cached) $ECHO_C" >&6
13954 ac_cv_sys_large_files=no
13955 cat >"conftest.$ac_ext" <<_ACEOF
13956 #line 13956 "configure"
13957 #include "confdefs.h"
13958 #include <sys/types.h>
13959 /* Check that off_t can represent 2**63 - 1 correctly.
13960 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13961 since some C++ compilers masquerading as C compilers
13962 incorrectly reject 9223372036854775807. */
13963 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13964 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13965 && LARGE_OFF_T % 2147483647 == 1)
13975 rm -f "conftest.$ac_objext"
13976 if { (eval echo "$as_me:13976: \"$ac_compile\"") >&5
13977 (eval $ac_compile) 2>&5
13979 echo "$as_me:13979: \$? = $ac_status" >&5
13980 (exit "$ac_status"); } &&
13981 { ac_try='test -s "conftest.$ac_objext"'
13982 { (eval echo "$as_me:13982: \"$ac_try\"") >&5
13983 (eval $ac_try) 2>&5
13985 echo "$as_me:13985: \$? = $ac_status" >&5
13986 (exit "$ac_status"); }; }; then
13989 echo "$as_me: failed program was:" >&5
13990 cat "conftest.$ac_ext" >&5
13992 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13993 cat >"conftest.$ac_ext" <<_ACEOF
13994 #line 13994 "configure"
13995 #include "confdefs.h"
13996 #define _LARGE_FILES 1
13997 #include <sys/types.h>
13998 /* Check that off_t can represent 2**63 - 1 correctly.
13999 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14000 since some C++ compilers masquerading as C compilers
14001 incorrectly reject 9223372036854775807. */
14002 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14003 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14004 && LARGE_OFF_T % 2147483647 == 1)
14014 rm -f "conftest.$ac_objext"
14015 if { (eval echo "$as_me:14015: \"$ac_compile\"") >&5
14016 (eval $ac_compile) 2>&5
14018 echo "$as_me:14018: \$? = $ac_status" >&5
14019 (exit "$ac_status"); } &&
14020 { ac_try='test -s "conftest.$ac_objext"'
14021 { (eval echo "$as_me:14021: \"$ac_try\"") >&5
14022 (eval $ac_try) 2>&5
14024 echo "$as_me:14024: \$? = $ac_status" >&5
14025 (exit "$ac_status"); }; }; then
14026 ac_cv_sys_large_files=1; break
14028 echo "$as_me: failed program was:" >&5
14029 cat "conftest.$ac_ext" >&5
14031 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14035 echo "$as_me:14035: result: $ac_cv_sys_large_files" >&5
14036 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14037 if test "$ac_cv_sys_large_files" != no; then
14039 cat >>confdefs.h <<EOF
14040 #define _LARGE_FILES $ac_cv_sys_large_files
14047 if test "$enable_largefile" != no ; then
14048 echo "$as_me:14048: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14049 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14050 if test "${ac_cv_sys_largefile_source+set}" = set; then
14051 echo $ECHO_N "(cached) $ECHO_C" >&6
14054 ac_cv_sys_largefile_source=no
14055 cat >"conftest.$ac_ext" <<_ACEOF
14056 #line 14056 "configure"
14057 #include "confdefs.h"
14067 rm -f "conftest.$ac_objext"
14068 if { (eval echo "$as_me:14068: \"$ac_compile\"") >&5
14069 (eval $ac_compile) 2>&5
14071 echo "$as_me:14071: \$? = $ac_status" >&5
14072 (exit "$ac_status"); } &&
14073 { ac_try='test -s "conftest.$ac_objext"'
14074 { (eval echo "$as_me:14074: \"$ac_try\"") >&5
14075 (eval $ac_try) 2>&5
14077 echo "$as_me:14077: \$? = $ac_status" >&5
14078 (exit "$ac_status"); }; }; then
14081 echo "$as_me: failed program was:" >&5
14082 cat "conftest.$ac_ext" >&5
14084 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14085 cat >"conftest.$ac_ext" <<_ACEOF
14086 #line 14086 "configure"
14087 #include "confdefs.h"
14088 #define _LARGEFILE_SOURCE 1
14098 rm -f "conftest.$ac_objext"
14099 if { (eval echo "$as_me:14099: \"$ac_compile\"") >&5
14100 (eval $ac_compile) 2>&5
14102 echo "$as_me:14102: \$? = $ac_status" >&5
14103 (exit "$ac_status"); } &&
14104 { ac_try='test -s "conftest.$ac_objext"'
14105 { (eval echo "$as_me:14105: \"$ac_try\"") >&5
14106 (eval $ac_try) 2>&5
14108 echo "$as_me:14108: \$? = $ac_status" >&5
14109 (exit "$ac_status"); }; }; then
14110 ac_cv_sys_largefile_source=1; break
14112 echo "$as_me: failed program was:" >&5
14113 cat "conftest.$ac_ext" >&5
14115 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14119 echo "$as_me:14119: result: $ac_cv_sys_largefile_source" >&5
14120 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14121 if test "$ac_cv_sys_largefile_source" != no; then
14123 cat >>confdefs.h <<EOF
14124 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14130 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14131 # in glibc 2.1.3, but that breaks too many other things.
14132 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14133 echo "$as_me:14133: checking for fseeko" >&5
14134 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14135 if test "${ac_cv_func_fseeko+set}" = set; then
14136 echo $ECHO_N "(cached) $ECHO_C" >&6
14138 cat >"conftest.$ac_ext" <<_ACEOF
14139 #line 14139 "configure"
14140 #include "confdefs.h"
14145 return fseeko && fseeko (stdin, 0, 0);
14150 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14151 if { (eval echo "$as_me:14151: \"$ac_link\"") >&5
14152 (eval $ac_link) 2>&5
14154 echo "$as_me:14154: \$? = $ac_status" >&5
14155 (exit "$ac_status"); } &&
14156 { ac_try='test -s "conftest$ac_exeext"'
14157 { (eval echo "$as_me:14157: \"$ac_try\"") >&5
14158 (eval $ac_try) 2>&5
14160 echo "$as_me:14160: \$? = $ac_status" >&5
14161 (exit "$ac_status"); }; }; then
14162 ac_cv_func_fseeko=yes
14164 echo "$as_me: failed program was:" >&5
14165 cat "conftest.$ac_ext" >&5
14166 ac_cv_func_fseeko=no
14168 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14170 echo "$as_me:14170: result: $ac_cv_func_fseeko" >&5
14171 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14172 if test $ac_cv_func_fseeko = yes; then
14174 cat >>confdefs.h <<\EOF
14175 #define HAVE_FSEEKO 1
14180 # Normally we would collect these definitions in the config.h,
14181 # but (like _XOPEN_SOURCE), some environments rely on having these
14182 # defined before any of the system headers are included. Another
14183 # case comes up with C++, e.g., on AIX the compiler compiles the
14184 # header files by themselves before looking at the body files it is
14185 # told to compile. For ncurses, those header files do not include
14187 if test "$ac_cv_sys_large_files" != no
14190 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14191 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14194 if test "$ac_cv_sys_largefile_source" != no
14197 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14198 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14201 if test "$ac_cv_sys_file_offset_bits" != no
14204 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14205 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14209 echo "$as_me:14209: checking whether to use struct dirent64" >&5
14210 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14211 if test "${cf_cv_struct_dirent64+set}" = set; then
14212 echo $ECHO_N "(cached) $ECHO_C" >&6
14215 cat >"conftest.$ac_ext" <<_ACEOF
14216 #line 14216 "configure"
14217 #include "confdefs.h"
14219 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14220 #include <sys/types.h>
14221 #include <dirent.h>
14227 /* if transitional largefile support is setup, this is true */
14228 extern struct dirent64 * readdir(DIR *);
14229 struct dirent64 *x = readdir((DIR *)0);
14230 struct dirent *y = readdir((DIR *)0);
14238 rm -f "conftest.$ac_objext"
14239 if { (eval echo "$as_me:14239: \"$ac_compile\"") >&5
14240 (eval $ac_compile) 2>&5
14242 echo "$as_me:14242: \$? = $ac_status" >&5
14243 (exit "$ac_status"); } &&
14244 { ac_try='test -s "conftest.$ac_objext"'
14245 { (eval echo "$as_me:14245: \"$ac_try\"") >&5
14246 (eval $ac_try) 2>&5
14248 echo "$as_me:14248: \$? = $ac_status" >&5
14249 (exit "$ac_status"); }; }; then
14250 cf_cv_struct_dirent64=yes
14252 echo "$as_me: failed program was:" >&5
14253 cat "conftest.$ac_ext" >&5
14254 cf_cv_struct_dirent64=no
14256 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14259 echo "$as_me:14259: result: $cf_cv_struct_dirent64" >&5
14260 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14261 test "$cf_cv_struct_dirent64" = yes &&
14262 cat >>confdefs.h <<\EOF
14263 #define HAVE_STRUCT_DIRENT64 1
14268 ### Enable compiling-in rcs id's
14269 echo "$as_me:14269: checking if RCS identifiers should be compiled-in" >&5
14270 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14272 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14273 if test "${with_rcs_ids+set}" = set; then
14274 withval="$with_rcs_ids"
14275 with_rcs_ids=$withval
14279 echo "$as_me:14279: result: $with_rcs_ids" >&5
14280 echo "${ECHO_T}$with_rcs_ids" >&6
14281 test "$with_rcs_ids" = yes &&
14282 cat >>confdefs.h <<\EOF
14283 #define USE_RCS_IDS 1
14286 ###############################################################################
14288 ### Note that some functions (such as const) are normally disabled anyway.
14289 echo "$as_me:14289: checking if you want to build with function extensions" >&5
14290 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14292 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14293 if test "${enable_ext_funcs+set}" = set; then
14294 enableval="$enable_ext_funcs"
14295 with_ext_funcs=$enableval
14299 echo "$as_me:14299: result: $with_ext_funcs" >&5
14300 echo "${ECHO_T}$with_ext_funcs" >&6
14301 if test "$with_ext_funcs" = yes ; then
14302 NCURSES_EXT_FUNCS=1
14304 cat >>confdefs.h <<\EOF
14305 #define HAVE_USE_DEFAULT_COLORS 1
14308 cat >>confdefs.h <<\EOF
14309 #define NCURSES_EXT_FUNCS 1
14313 NCURSES_EXT_FUNCS=0
14316 ### use option --enable-const to turn on use of const beyond that in XSI.
14317 echo "$as_me:14317: checking for extended use of const keyword" >&5
14318 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14320 # Check whether --enable-const or --disable-const was given.
14321 if test "${enable_const+set}" = set; then
14322 enableval="$enable_const"
14323 with_ext_const=$enableval
14327 echo "$as_me:14327: result: $with_ext_const" >&5
14328 echo "${ECHO_T}$with_ext_const" >&6
14329 NCURSES_CONST='/*nothing*/'
14330 if test "$with_ext_const" = yes ; then
14331 NCURSES_CONST=const
14334 ###############################################################################
14335 # These options are relatively safe to experiment with.
14337 echo "$as_me:14337: checking if you want all development code" >&5
14338 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14340 # Check whether --with-develop or --without-develop was given.
14341 if test "${with_develop+set}" = set; then
14342 withval="$with_develop"
14343 with_develop=$withval
14347 echo "$as_me:14347: result: $with_develop" >&5
14348 echo "${ECHO_T}$with_develop" >&6
14350 ###############################################################################
14351 # These are just experimental, probably should not be in a package:
14353 # This is still experimental (20080329), but should ultimately be moved to
14354 # the script-block --with-normal, etc.
14356 echo "$as_me:14356: checking if you want to link with the pthread library" >&5
14357 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14359 # Check whether --with-pthread or --without-pthread was given.
14360 if test "${with_pthread+set}" = set; then
14361 withval="$with_pthread"
14362 with_pthread=$withval
14366 echo "$as_me:14366: result: $with_pthread" >&5
14367 echo "${ECHO_T}$with_pthread" >&6
14369 if test "$with_pthread" != no ; then
14370 echo "$as_me:14370: checking for pthread.h" >&5
14371 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14372 if test "${ac_cv_header_pthread_h+set}" = set; then
14373 echo $ECHO_N "(cached) $ECHO_C" >&6
14375 cat >"conftest.$ac_ext" <<_ACEOF
14376 #line 14376 "configure"
14377 #include "confdefs.h"
14378 #include <pthread.h>
14380 if { (eval echo "$as_me:14380: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14381 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14383 $EGREP -v '^ *\+' conftest.er1 >conftest.err
14385 cat conftest.err >&5
14386 echo "$as_me:14386: \$? = $ac_status" >&5
14387 (exit "$ac_status"); } >/dev/null; then
14388 if test -s conftest.err; then
14389 ac_cpp_err=$ac_c_preproc_warn_flag
14396 if test -z "$ac_cpp_err"; then
14397 ac_cv_header_pthread_h=yes
14399 echo "$as_me: failed program was:" >&5
14400 cat "conftest.$ac_ext" >&5
14401 ac_cv_header_pthread_h=no
14403 rm -f conftest.err "conftest.$ac_ext"
14405 echo "$as_me:14405: result: $ac_cv_header_pthread_h" >&5
14406 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14407 if test "$ac_cv_header_pthread_h" = yes; then
14409 cat >>confdefs.h <<\EOF
14410 #define HAVE_PTHREADS_H 1
14413 for cf_lib_pthread in pthread c_r
14415 echo "$as_me:14415: checking if we can link with the $cf_lib_pthread library" >&5
14416 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14417 cf_save_LIBS="$LIBS"
14419 cf_add_libs="$LIBS"
14422 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14423 # filter duplicates
14424 for cf_add_1lib in $cf_add_0lib; do
14425 for cf_add_2lib in $cf_add_libs; do
14426 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14431 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14433 LIBS="$cf_add_libs"
14435 cat >"conftest.$ac_ext" <<_ACEOF
14436 #line 14436 "configure"
14437 #include "confdefs.h"
14439 #include <pthread.h>
14445 int rc = pthread_create(0,0,0,0);
14446 int r2 = pthread_mutexattr_settype(0, 0);
14452 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14453 if { (eval echo "$as_me:14453: \"$ac_link\"") >&5
14454 (eval $ac_link) 2>&5
14456 echo "$as_me:14456: \$? = $ac_status" >&5
14457 (exit "$ac_status"); } &&
14458 { ac_try='test -s "conftest$ac_exeext"'
14459 { (eval echo "$as_me:14459: \"$ac_try\"") >&5
14460 (eval $ac_try) 2>&5
14462 echo "$as_me:14462: \$? = $ac_status" >&5
14463 (exit "$ac_status"); }; }; then
14466 echo "$as_me: failed program was:" >&5
14467 cat "conftest.$ac_ext" >&5
14470 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14471 LIBS="$cf_save_LIBS"
14472 echo "$as_me:14472: result: $with_pthread" >&5
14473 echo "${ECHO_T}$with_pthread" >&6
14474 test "$with_pthread" = yes && break
14477 if test "$with_pthread" = yes ; then
14479 cf_add_libs="$LIBS"
14482 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14483 # filter duplicates
14484 for cf_add_1lib in $cf_add_0lib; do
14485 for cf_add_2lib in $cf_add_libs; do
14486 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14491 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14493 LIBS="$cf_add_libs"
14495 cat >>confdefs.h <<\EOF
14496 #define HAVE_LIBPTHREADS 1
14500 { { echo "$as_me:14500: error: Cannot link with pthread library" >&5
14501 echo "$as_me: error: Cannot link with pthread library" >&2;}
14502 { (exit 1); exit 1; }; }
14509 echo "$as_me:14509: checking if you want to use weak-symbols for pthreads" >&5
14510 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14512 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14513 if test "${enable_weak_symbols+set}" = set; then
14514 enableval="$enable_weak_symbols"
14515 use_weak_symbols=$withval
14517 use_weak_symbols=no
14519 echo "$as_me:14519: result: $use_weak_symbols" >&5
14520 echo "${ECHO_T}$use_weak_symbols" >&6
14521 if test "$use_weak_symbols" = yes ; then
14523 echo "$as_me:14523: checking if $CC supports weak symbols" >&5
14524 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14525 if test "${cf_cv_weak_symbols+set}" = set; then
14526 echo $ECHO_N "(cached) $ECHO_C" >&6
14529 cat >"conftest.$ac_ext" <<_ACEOF
14530 #line 14530 "configure"
14531 #include "confdefs.h"
14538 #if defined(__GNUC__)
14539 # if defined __USE_ISOC99
14540 # define _cat_pragma(exp) _Pragma(#exp)
14541 # define _weak_pragma(exp) _cat_pragma(weak name)
14543 # define _weak_pragma(exp)
14545 # define _declare(name) __extension__ extern __typeof__(name) name
14546 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
14549 weak_symbol(fopen);
14555 rm -f "conftest.$ac_objext"
14556 if { (eval echo "$as_me:14556: \"$ac_compile\"") >&5
14557 (eval $ac_compile) 2>&5
14559 echo "$as_me:14559: \$? = $ac_status" >&5
14560 (exit "$ac_status"); } &&
14561 { ac_try='test -s "conftest.$ac_objext"'
14562 { (eval echo "$as_me:14562: \"$ac_try\"") >&5
14563 (eval $ac_try) 2>&5
14565 echo "$as_me:14565: \$? = $ac_status" >&5
14566 (exit "$ac_status"); }; }; then
14567 cf_cv_weak_symbols=yes
14569 echo "$as_me: failed program was:" >&5
14570 cat "conftest.$ac_ext" >&5
14571 cf_cv_weak_symbols=no
14573 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14576 echo "$as_me:14576: result: $cf_cv_weak_symbols" >&5
14577 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14580 cf_cv_weak_symbols=no
14583 if test $cf_cv_weak_symbols = yes ; then
14585 cat >>confdefs.h <<\EOF
14586 #define USE_WEAK_SYMBOLS 1
14592 if test "$with_pthread" = "yes" ; then
14594 cat >>confdefs.h <<\EOF
14595 #define USE_PTHREADS 1
14598 enable_reentrant=yes
14599 if test $cf_cv_weak_symbols = yes ; then
14604 # OpenSUSE is installing ncurses6, using reentrant option.
14605 echo "$as_me:14605: checking for _nc_TABSIZE" >&5
14606 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
14607 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
14608 echo $ECHO_N "(cached) $ECHO_C" >&6
14610 cat >"conftest.$ac_ext" <<_ACEOF
14611 #line 14611 "configure"
14612 #include "confdefs.h"
14613 #define _nc_TABSIZE autoconf_temporary
14614 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14621 /* We use char because int might match the return type of a gcc2
14622 builtin and then its argument prototype would still apply. */
14623 char _nc_TABSIZE (void);
14629 /* The GNU C library defines stubs for functions which it implements
14630 to always fail with ENOSYS. Some functions are actually named
14631 something starting with __ and the normal name is an alias. */
14632 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
14633 #error found stub for _nc_TABSIZE
14636 return _nc_TABSIZE ();
14641 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14642 if { (eval echo "$as_me:14642: \"$ac_link\"") >&5
14643 (eval $ac_link) 2>&5
14645 echo "$as_me:14645: \$? = $ac_status" >&5
14646 (exit "$ac_status"); } &&
14647 { ac_try='test -s "conftest$ac_exeext"'
14648 { (eval echo "$as_me:14648: \"$ac_try\"") >&5
14649 (eval $ac_try) 2>&5
14651 echo "$as_me:14651: \$? = $ac_status" >&5
14652 (exit "$ac_status"); }; }; then
14653 ac_cv_func__nc_TABSIZE=yes
14655 echo "$as_me: failed program was:" >&5
14656 cat "conftest.$ac_ext" >&5
14657 ac_cv_func__nc_TABSIZE=no
14659 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14661 echo "$as_me:14661: result: $ac_cv_func__nc_TABSIZE" >&5
14662 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
14663 if test "$ac_cv_func__nc_TABSIZE" = yes; then
14664 assume_reentrant=yes
14666 assume_reentrant=no
14669 # Reentrant code has to be opaque; there's little advantage to making ncurses
14670 # opaque outside of that, so there is no --enable-opaque option. We can use
14671 # this option without --with-pthreads, but this will be always set for
14673 echo "$as_me:14673: checking if you want experimental reentrant code" >&5
14674 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
14676 # Check whether --enable-reentrant or --disable-reentrant was given.
14677 if test "${enable_reentrant+set}" = set; then
14678 enableval="$enable_reentrant"
14679 with_reentrant=$enableval
14681 with_reentrant=$assume_reentrant
14683 echo "$as_me:14683: result: $with_reentrant" >&5
14684 echo "${ECHO_T}$with_reentrant" >&6
14685 if test "$with_reentrant" = yes ; then
14686 cf_cv_enable_reentrant=1
14687 if test $cf_cv_weak_symbols = yes ; then
14689 # remove pthread library from $LIBS
14690 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
14692 elif test "$assume_reentrant" = no ; then
14693 LIB_SUFFIX="t${LIB_SUFFIX}"
14696 cat >>confdefs.h <<\EOF
14697 #define USE_REENTRANT 1
14701 cf_cv_enable_reentrant=0
14704 ### Allow using a different wrap-prefix
14705 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
14706 echo "$as_me:14706: checking for prefix used to wrap public variables" >&5
14707 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
14709 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
14710 if test "${with_wrap_prefix+set}" = set; then
14711 withval="$with_wrap_prefix"
14712 NCURSES_WRAP_PREFIX=$withval
14714 NCURSES_WRAP_PREFIX=_nc_
14716 echo "$as_me:14716: result: $NCURSES_WRAP_PREFIX" >&5
14717 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
14719 NCURSES_WRAP_PREFIX=_nc_
14722 cat >>confdefs.h <<EOF
14723 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
14726 ###############################################################################
14728 ### use option --disable-echo to suppress full display compiling commands
14730 echo "$as_me:14730: checking if you want to see long compiling messages" >&5
14731 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
14733 # Check whether --enable-echo or --disable-echo was given.
14734 if test "${enable_echo+set}" = set; then
14735 enableval="$enable_echo"
14736 test "$enableval" != no && enableval=yes
14737 if test "$enableval" != "yes" ; then
14740 ECHO_LD='@echo linking $@;'
14741 RULE_CC='@echo compiling $<'
14742 SHOW_CC='@echo compiling $@'
14764 echo "$as_me:14764: result: $enableval" >&5
14765 echo "${ECHO_T}$enableval" >&6
14767 echo "$as_me:14767: checking if you want to use C11 _Noreturn feature" >&5
14768 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
14770 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
14771 if test "${enable_stdnoreturn+set}" = set; then
14772 enableval="$enable_stdnoreturn"
14773 test "$enableval" != yes && enableval=no
14774 if test "$enableval" != "no" ; then
14775 enable_stdnoreturn=yes
14777 enable_stdnoreturn=no
14781 enable_stdnoreturn=no
14784 echo "$as_me:14784: result: $enable_stdnoreturn" >&5
14785 echo "${ECHO_T}$enable_stdnoreturn" >&6
14787 if test $enable_stdnoreturn = yes; then
14788 echo "$as_me:14788: checking for C11 _Noreturn feature" >&5
14789 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
14790 if test "${cf_cv_c11_noreturn+set}" = set; then
14791 echo $ECHO_N "(cached) $ECHO_C" >&6
14793 cat >"conftest.$ac_ext" <<_ACEOF
14794 #line 14794 "configure"
14795 #include "confdefs.h"
14798 #include <stdlib.h>
14799 #include <stdnoreturn.h>
14800 static void giveup(void) { exit(0); }
14805 if (feof(stdin)) giveup()
14810 rm -f "conftest.$ac_objext"
14811 if { (eval echo "$as_me:14811: \"$ac_compile\"") >&5
14812 (eval $ac_compile) 2>&5
14814 echo "$as_me:14814: \$? = $ac_status" >&5
14815 (exit "$ac_status"); } &&
14816 { ac_try='test -s "conftest.$ac_objext"'
14817 { (eval echo "$as_me:14817: \"$ac_try\"") >&5
14818 (eval $ac_try) 2>&5
14820 echo "$as_me:14820: \$? = $ac_status" >&5
14821 (exit "$ac_status"); }; }; then
14822 cf_cv_c11_noreturn=yes
14824 echo "$as_me: failed program was:" >&5
14825 cat "conftest.$ac_ext" >&5
14826 cf_cv_c11_noreturn=no
14828 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14831 echo "$as_me:14831: result: $cf_cv_c11_noreturn" >&5
14832 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
14834 cf_cv_c11_noreturn=no,
14837 if test "$cf_cv_c11_noreturn" = yes; then
14838 cat >>confdefs.h <<\EOF
14839 #define HAVE_STDNORETURN_H 1
14842 cat >>confdefs.h <<EOF
14843 #define STDC_NORETURN _Noreturn
14846 HAVE_STDNORETURN_H=1
14848 HAVE_STDNORETURN_H=0
14851 if test "$GCC" = yes || test "$GXX" = yes
14854 if test "$GCC" = yes || test "$GXX" = yes
14858 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
14860 echo "${as_me:-configure}:14860: testing repairing CFLAGS: $CFLAGS ..." 1>&5
14863 for cf_temp_scan in $CFLAGS
14865 case "x$cf_temp_scan" in
14868 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
14869 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
14874 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
14875 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
14880 CFLAGS="$cf_temp_flags"
14881 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
14883 echo "${as_me:-configure}:14883: testing ... fixed $CFLAGS ..." 1>&5
14885 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
14887 echo "${as_me:-configure}:14887: testing ... extra $EXTRA_CFLAGS ..." 1>&5
14893 if test "$GCC" = yes || test "$GXX" = yes
14897 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
14899 echo "${as_me:-configure}:14899: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
14902 for cf_temp_scan in $CPPFLAGS
14904 case "x$cf_temp_scan" in
14907 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
14908 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
14913 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
14914 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
14919 CPPFLAGS="$cf_temp_flags"
14920 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
14922 echo "${as_me:-configure}:14922: testing ... fixed $CPPFLAGS ..." 1>&5
14924 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
14926 echo "${as_me:-configure}:14926: testing ... extra $EXTRA_CFLAGS ..." 1>&5
14932 if test "$GCC" = yes || test "$GXX" = yes
14936 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
14938 echo "${as_me:-configure}:14938: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
14941 for cf_temp_scan in $LDFLAGS
14943 case "x$cf_temp_scan" in
14946 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
14947 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
14952 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
14953 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
14958 LDFLAGS="$cf_temp_flags"
14959 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
14961 echo "${as_me:-configure}:14961: testing ... fixed $LDFLAGS ..." 1>&5
14963 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
14965 echo "${as_me:-configure}:14965: testing ... extra $EXTRA_CFLAGS ..." 1>&5
14971 echo "$as_me:14971: checking if you want to turn on gcc warnings" >&5
14972 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
14974 # Check whether --enable-warnings or --disable-warnings was given.
14975 if test "${enable_warnings+set}" = set; then
14976 enableval="$enable_warnings"
14977 test "$enableval" != yes && enableval=no
14978 if test "$enableval" != "no" ; then
14979 enable_warnings=yes
14988 echo "$as_me:14988: result: $enable_warnings" >&5
14989 echo "${ECHO_T}$enable_warnings" >&6
14990 if test "$enable_warnings" = "yes"
14993 if test "x$have_x" = xyes; then
14995 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
14996 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
14997 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
14998 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
14999 for cf_X_CFLAGS in $X_CFLAGS
15001 case "x$cf_X_CFLAGS" in
15003 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15006 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15011 cat >"conftest.$ac_ext" <<_ACEOF
15012 #line 15012 "configure"
15013 #include "confdefs.h"
15015 #include <stdlib.h>
15016 #include <X11/Intrinsic.h>
15021 String foo = malloc(1); (void)foo
15026 rm -f "conftest.$ac_objext"
15027 if { (eval echo "$as_me:15027: \"$ac_compile\"") >&5
15028 (eval $ac_compile) 2>&5
15030 echo "$as_me:15030: \$? = $ac_status" >&5
15031 (exit "$ac_status"); } &&
15032 { ac_try='test -s "conftest.$ac_objext"'
15033 { (eval echo "$as_me:15033: \"$ac_try\"") >&5
15034 (eval $ac_try) 2>&5
15036 echo "$as_me:15036: \$? = $ac_status" >&5
15037 (exit "$ac_status"); }; }; then
15039 echo "$as_me:15039: checking for X11/Xt const-feature" >&5
15040 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15041 if test "${cf_cv_const_x_string+set}" = set; then
15042 echo $ECHO_N "(cached) $ECHO_C" >&6
15045 cat >"conftest.$ac_ext" <<_ACEOF
15046 #line 15046 "configure"
15047 #include "confdefs.h"
15049 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15050 #undef XTSTRINGDEFINES /* X11R5 and later */
15051 #include <stdlib.h>
15052 #include <X11/Intrinsic.h>
15057 String foo = malloc(1); *foo = 0
15062 rm -f "conftest.$ac_objext"
15063 if { (eval echo "$as_me:15063: \"$ac_compile\"") >&5
15064 (eval $ac_compile) 2>&5
15066 echo "$as_me:15066: \$? = $ac_status" >&5
15067 (exit "$ac_status"); } &&
15068 { ac_try='test -s "conftest.$ac_objext"'
15069 { (eval echo "$as_me:15069: \"$ac_try\"") >&5
15070 (eval $ac_try) 2>&5
15072 echo "$as_me:15072: \$? = $ac_status" >&5
15073 (exit "$ac_status"); }; }; then
15075 cf_cv_const_x_string=no
15078 echo "$as_me: failed program was:" >&5
15079 cat "conftest.$ac_ext" >&5
15081 cf_cv_const_x_string=yes
15084 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15087 echo "$as_me:15087: result: $cf_cv_const_x_string" >&5
15088 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15090 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
15091 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
15092 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
15094 case "$cf_cv_const_x_string" in
15097 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15098 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15103 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15104 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15110 echo "$as_me: failed program was:" >&5
15111 cat "conftest.$ac_ext" >&5
15113 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15115 cat > "conftest.$ac_ext" <<EOF
15116 #line 15116 "${as_me:-configure}"
15117 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15119 if test "$INTEL_COMPILER" = yes
15121 # The "-wdXXX" options suppress warnings:
15122 # remark #1419: external declaration in primary source file
15123 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15124 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15125 # remark #193: zero used for undefined preprocessing identifier
15126 # remark #593: variable "curs_sb_left_arrow" was set but never used
15127 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15128 # remark #869: parameter "tw" was never referenced
15129 # remark #981: operands are evaluated in unspecified order
15130 # warning #279: controlling expression is constant
15132 { echo "$as_me:15132: checking for $CC warning options..." >&5
15133 echo "$as_me: checking for $CC warning options..." >&6;}
15134 cf_save_CFLAGS="$CFLAGS"
15135 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
15147 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15148 if { (eval echo "$as_me:15148: \"$ac_compile\"") >&5
15149 (eval $ac_compile) 2>&5
15151 echo "$as_me:15151: \$? = $ac_status" >&5
15152 (exit "$ac_status"); }; then
15153 test -n "$verbose" && echo "$as_me:15153: result: ... -$cf_opt" >&5
15154 echo "${ECHO_T}... -$cf_opt" >&6
15155 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15158 CFLAGS="$cf_save_CFLAGS"
15159 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
15161 { echo "$as_me:15161: checking for $CC warning options..." >&5
15162 echo "$as_me: checking for $CC warning options..." >&6;}
15163 cf_save_CFLAGS="$CFLAGS"
15165 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15166 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15167 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15168 for cf_opt in W Wall \
15169 Wbad-function-cast \
15172 Wdeclaration-after-statement \
15175 Wmissing-declarations \
15176 Wmissing-prototypes \
15180 Wstrict-prototypes \
15181 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15183 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15184 if { (eval echo "$as_me:15184: \"$ac_compile\"") >&5
15185 (eval $ac_compile) 2>&5
15187 echo "$as_me:15187: \$? = $ac_status" >&5
15188 (exit "$ac_status"); }; then
15189 test -n "$verbose" && echo "$as_me:15189: result: ... -$cf_opt" >&5
15190 echo "${ECHO_T}... -$cf_opt" >&6
15193 case "$GCC_VERSION" in
15195 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15197 echo "${as_me:-configure}:15197: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15203 case "$GCC_VERSION" in
15205 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15207 echo "${as_me:-configure}:15207: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15213 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15216 CFLAGS="$cf_save_CFLAGS"
15222 if test "$GCC" = yes || test "$GXX" = yes
15224 cat > conftest.i <<EOF
15226 #define GCC_PRINTF 0
15229 #define GCC_SCANF 0
15231 #ifndef GCC_NORETURN
15232 #define GCC_NORETURN /* nothing */
15235 #define GCC_UNUSED /* nothing */
15238 if test "$GCC" = yes
15240 { echo "$as_me:15240: checking for $CC __attribute__ directives..." >&5
15241 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15242 cat > "conftest.$ac_ext" <<EOF
15243 #line 15243 "${as_me:-configure}"
15244 #include "confdefs.h"
15245 #include "conftest.h"
15246 #include "conftest.i"
15248 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15250 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15253 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
15255 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
15257 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15258 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
15259 extern GCC_NORETURN void foo(void);
15260 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
15262 cf_printf_attribute=no
15263 cf_scanf_attribute=no
15264 for cf_attribute in scanf printf unused noreturn
15267 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15269 cf_directive="__attribute__(($cf_attribute))"
15270 echo "checking for $CC $cf_directive" 1>&5
15272 case "$cf_attribute" in
15274 cf_printf_attribute=yes
15275 cat >conftest.h <<EOF
15276 #define GCC_$cf_ATTRIBUTE 1
15280 cf_scanf_attribute=yes
15281 cat >conftest.h <<EOF
15282 #define GCC_$cf_ATTRIBUTE 1
15286 cat >conftest.h <<EOF
15287 #define GCC_$cf_ATTRIBUTE $cf_directive
15292 if { (eval echo "$as_me:15292: \"$ac_compile\"") >&5
15293 (eval $ac_compile) 2>&5
15295 echo "$as_me:15295: \$? = $ac_status" >&5
15296 (exit "$ac_status"); }; then
15297 test -n "$verbose" && echo "$as_me:15297: result: ... $cf_attribute" >&5
15298 echo "${ECHO_T}... $cf_attribute" >&6
15299 cat conftest.h >>confdefs.h
15300 case "$cf_attribute" in
15303 cat >>confdefs.h <<EOF
15304 #define GCC_NORETURN $cf_directive
15309 cf_value='/* nothing */'
15310 if test "$cf_printf_attribute" != no ; then
15311 cf_value='__attribute__((format(printf,fmt,var)))'
15313 cat >>confdefs.h <<\EOF
15314 #define GCC_PRINTF 1
15319 cat >>confdefs.h <<EOF
15320 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15325 cf_value='/* nothing */'
15326 if test "$cf_scanf_attribute" != no ; then
15327 cf_value='__attribute__((format(scanf,fmt,var)))'
15329 cat >>confdefs.h <<\EOF
15330 #define GCC_SCANF 1
15335 cat >>confdefs.h <<EOF
15336 #define GCC_SCANFLIKE(fmt,var) $cf_value
15342 cat >>confdefs.h <<EOF
15343 #define GCC_UNUSED $cf_directive
15351 ${FGREP-fgrep} define conftest.i >>confdefs.h
15358 if test "x$enable_warnings" = "xyes"; then
15360 ADAFLAGS="$ADAFLAGS -gnatg"
15364 ### use option --enable-assertions to turn on generation of assertion code
15365 echo "$as_me:15365: checking if you want to enable runtime assertions" >&5
15366 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15368 # Check whether --enable-assertions or --disable-assertions was given.
15369 if test "${enable_assertions+set}" = set; then
15370 enableval="$enable_assertions"
15371 with_assertions=$enableval
15375 echo "$as_me:15375: result: $with_assertions" >&5
15376 echo "${ECHO_T}$with_assertions" >&6
15379 if test "$with_assertions" = no
15381 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15384 ADAFLAGS="$ADAFLAGS -gnata"
15389 ### use option --disable-leaks to suppress "permanent" leaks, for testing
15391 cat >>confdefs.h <<\EOF
15392 #define HAVE_NC_ALLOC_H 1
15395 ### use option --enable-expanded to generate certain macros as functions
15397 # Check whether --enable-expanded or --disable-expanded was given.
15398 if test "${enable_expanded+set}" = set; then
15399 enableval="$enable_expanded"
15400 test "$enableval" = yes &&
15401 cat >>confdefs.h <<\EOF
15402 #define NCURSES_EXPANDED 1
15407 ### use option --disable-macros to suppress macros in favor of functions
15409 # Check whether --enable-macros or --disable-macros was given.
15410 if test "${enable_macros+set}" = set; then
15411 enableval="$enable_macros"
15412 test "$enableval" = no &&
15413 cat >>confdefs.h <<\EOF
15414 #define NCURSES_NOMACROS 1
15419 # Normally we only add trace() to the debug-library. Allow this to be
15420 # extended to all models of the ncurses library:
15422 case "$CFLAGS $CPPFLAGS" in
15428 echo "$as_me:15428: checking whether to add trace feature to all models" >&5
15429 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
15431 # Check whether --with-trace or --without-trace was given.
15432 if test "${with_trace+set}" = set; then
15433 withval="$with_trace"
15434 cf_with_trace=$withval
15436 cf_with_trace=$cf_all_traces
15438 echo "$as_me:15438: result: $cf_with_trace" >&5
15439 echo "${ECHO_T}$cf_with_trace" >&6
15441 if test "$cf_with_trace" = yes ; then
15447 cf_new_extra_cppflags=
15449 for cf_add_cflags in -DTRACE
15451 case "$cf_fix_cppflags" in
15453 case "$cf_add_cflags" in
15454 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15455 case "$cf_add_cflags" in
15457 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15459 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15460 && test -z "${cf_tst_cflags}" \
15461 && cf_fix_cppflags=yes
15463 if test "$cf_fix_cppflags" = yes ; then
15465 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15466 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15469 elif test "${cf_tst_cflags}" = "\"'" ; then
15471 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15472 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15478 case "$CPPFLAGS" in
15482 case "$cf_add_cflags" in
15484 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15486 CPPFLAGS=`echo "$CPPFLAGS" | \
15487 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15488 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15493 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15494 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15501 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15502 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15509 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15510 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15512 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15514 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15515 && test -z "${cf_tst_cflags}" \
15516 && cf_fix_cppflags=no
15521 if test -n "$cf_new_cflags" ; then
15523 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15524 CFLAGS="${CFLAGS}$cf_new_cflags"
15528 if test -n "$cf_new_cppflags" ; then
15530 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15531 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15535 if test -n "$cf_new_extra_cppflags" ; then
15537 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15538 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15546 echo "$as_me:15546: checking if we want to use GNAT projects" >&5
15547 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
15549 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
15550 if test "${enable_gnat_projects+set}" = set; then
15551 enableval="$enable_gnat_projects"
15552 test "$enableval" != no && enableval=yes
15553 if test "$enableval" != "yes" ; then
15554 enable_gnat_projects=no
15556 enable_gnat_projects=yes
15560 enable_gnat_projects=yes
15563 echo "$as_me:15563: result: $enable_gnat_projects" >&5
15564 echo "${ECHO_T}$enable_gnat_projects" >&6
15566 ### Checks for libraries.
15567 case $cf_cv_system_name in
15571 echo "$as_me:15571: checking for gettimeofday" >&5
15572 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
15573 if test "${ac_cv_func_gettimeofday+set}" = set; then
15574 echo $ECHO_N "(cached) $ECHO_C" >&6
15576 cat >"conftest.$ac_ext" <<_ACEOF
15577 #line 15577 "configure"
15578 #include "confdefs.h"
15579 #define gettimeofday autoconf_temporary
15580 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15581 #undef gettimeofday
15587 /* We use char because int might match the return type of a gcc2
15588 builtin and then its argument prototype would still apply. */
15589 char gettimeofday (void);
15595 /* The GNU C library defines stubs for functions which it implements
15596 to always fail with ENOSYS. Some functions are actually named
15597 something starting with __ and the normal name is an alias. */
15598 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
15599 #error found stub for gettimeofday
15602 return gettimeofday ();
15607 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15608 if { (eval echo "$as_me:15608: \"$ac_link\"") >&5
15609 (eval $ac_link) 2>&5
15611 echo "$as_me:15611: \$? = $ac_status" >&5
15612 (exit "$ac_status"); } &&
15613 { ac_try='test -s "conftest$ac_exeext"'
15614 { (eval echo "$as_me:15614: \"$ac_try\"") >&5
15615 (eval $ac_try) 2>&5
15617 echo "$as_me:15617: \$? = $ac_status" >&5
15618 (exit "$ac_status"); }; }; then
15619 ac_cv_func_gettimeofday=yes
15621 echo "$as_me: failed program was:" >&5
15622 cat "conftest.$ac_ext" >&5
15623 ac_cv_func_gettimeofday=no
15625 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15627 echo "$as_me:15627: result: $ac_cv_func_gettimeofday" >&5
15628 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
15629 if test "$ac_cv_func_gettimeofday" = yes; then
15630 cat >>confdefs.h <<\EOF
15631 #define HAVE_GETTIMEOFDAY 1
15636 echo "$as_me:15636: checking for gettimeofday in -lbsd" >&5
15637 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
15638 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
15639 echo $ECHO_N "(cached) $ECHO_C" >&6
15641 ac_check_lib_save_LIBS=$LIBS
15643 cat >"conftest.$ac_ext" <<_ACEOF
15644 #line 15644 "configure"
15645 #include "confdefs.h"
15647 /* Override any gcc2 internal prototype to avoid an error. */
15651 /* We use char because int might match the return type of a gcc2
15652 builtin and then its argument prototype would still apply. */
15653 char gettimeofday ();
15662 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15663 if { (eval echo "$as_me:15663: \"$ac_link\"") >&5
15664 (eval $ac_link) 2>&5
15666 echo "$as_me:15666: \$? = $ac_status" >&5
15667 (exit "$ac_status"); } &&
15668 { ac_try='test -s "conftest$ac_exeext"'
15669 { (eval echo "$as_me:15669: \"$ac_try\"") >&5
15670 (eval $ac_try) 2>&5
15672 echo "$as_me:15672: \$? = $ac_status" >&5
15673 (exit "$ac_status"); }; }; then
15674 ac_cv_lib_bsd_gettimeofday=yes
15676 echo "$as_me: failed program was:" >&5
15677 cat "conftest.$ac_ext" >&5
15678 ac_cv_lib_bsd_gettimeofday=no
15680 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15681 LIBS=$ac_check_lib_save_LIBS
15683 echo "$as_me:15683: result: $ac_cv_lib_bsd_gettimeofday" >&5
15684 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
15685 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
15687 cat >>confdefs.h <<\EOF
15688 #define HAVE_GETTIMEOFDAY 1
15698 ### Checks for header files.
15699 echo "$as_me:15699: checking for ANSI C header files" >&5
15700 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15701 if test "${ac_cv_header_stdc+set}" = set; then
15702 echo $ECHO_N "(cached) $ECHO_C" >&6
15704 cat >"conftest.$ac_ext" <<_ACEOF
15705 #line 15705 "configure"
15706 #include "confdefs.h"
15707 #include <stdlib.h>
15708 #include <stdarg.h>
15709 #include <string.h>
15713 if { (eval echo "$as_me:15713: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15714 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15716 $EGREP -v '^ *\+' conftest.er1 >conftest.err
15718 cat conftest.err >&5
15719 echo "$as_me:15719: \$? = $ac_status" >&5
15720 (exit "$ac_status"); } >/dev/null; then
15721 if test -s conftest.err; then
15722 ac_cpp_err=$ac_c_preproc_warn_flag
15729 if test -z "$ac_cpp_err"; then
15730 ac_cv_header_stdc=yes
15732 echo "$as_me: failed program was:" >&5
15733 cat "conftest.$ac_ext" >&5
15734 ac_cv_header_stdc=no
15736 rm -f conftest.err "conftest.$ac_ext"
15738 if test $ac_cv_header_stdc = yes; then
15739 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15740 cat >"conftest.$ac_ext" <<_ACEOF
15741 #line 15741 "configure"
15742 #include "confdefs.h"
15743 #include <string.h>
15746 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15747 $EGREP "memchr" >/dev/null 2>&1; then
15750 ac_cv_header_stdc=no
15756 if test $ac_cv_header_stdc = yes; then
15757 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15758 cat >"conftest.$ac_ext" <<_ACEOF
15759 #line 15759 "configure"
15760 #include "confdefs.h"
15761 #include <stdlib.h>
15764 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15765 $EGREP "free" >/dev/null 2>&1; then
15768 ac_cv_header_stdc=no
15774 if test $ac_cv_header_stdc = yes; then
15775 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15776 if test "$cross_compiling" = yes; then
15779 cat >"conftest.$ac_ext" <<_ACEOF
15780 #line 15780 "configure"
15781 #include "confdefs.h"
15783 #if ((' ' & 0x0FF) == 0x020)
15784 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15785 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15787 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15788 || ('j' <= (c) && (c) <= 'r') \
15789 || ('s' <= (c) && (c) <= 'z'))
15790 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15793 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15798 for (i = 0; i < 256; i++)
15799 if (XOR (islower (i), ISLOWER (i))
15800 || toupper (i) != TOUPPER (i))
15801 $ac_main_return(2);
15802 $ac_main_return (0);
15805 rm -f "conftest$ac_exeext"
15806 if { (eval echo "$as_me:15806: \"$ac_link\"") >&5
15807 (eval $ac_link) 2>&5
15809 echo "$as_me:15809: \$? = $ac_status" >&5
15810 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
15811 { (eval echo "$as_me:15811: \"$ac_try\"") >&5
15812 (eval $ac_try) 2>&5
15814 echo "$as_me:15814: \$? = $ac_status" >&5
15815 (exit "$ac_status"); }; }; then
15818 echo "$as_me: program exited with status $ac_status" >&5
15819 echo "$as_me: failed program was:" >&5
15820 cat "conftest.$ac_ext" >&5
15821 ac_cv_header_stdc=no
15823 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
15827 echo "$as_me:15827: result: $ac_cv_header_stdc" >&5
15828 echo "${ECHO_T}$ac_cv_header_stdc" >&6
15829 if test $ac_cv_header_stdc = yes; then
15831 cat >>confdefs.h <<\EOF
15832 #define STDC_HEADERS 1
15837 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
15839 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
15840 inttypes.h stdint.h unistd.h
15842 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15843 echo "$as_me:15843: checking for $ac_header" >&5
15844 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15845 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15846 echo $ECHO_N "(cached) $ECHO_C" >&6
15848 cat >"conftest.$ac_ext" <<_ACEOF
15849 #line 15849 "configure"
15850 #include "confdefs.h"
15851 $ac_includes_default
15852 #include <$ac_header>
15854 rm -f "conftest.$ac_objext"
15855 if { (eval echo "$as_me:15855: \"$ac_compile\"") >&5
15856 (eval $ac_compile) 2>&5
15858 echo "$as_me:15858: \$? = $ac_status" >&5
15859 (exit "$ac_status"); } &&
15860 { ac_try='test -s "conftest.$ac_objext"'
15861 { (eval echo "$as_me:15861: \"$ac_try\"") >&5
15862 (eval $ac_try) 2>&5
15864 echo "$as_me:15864: \$? = $ac_status" >&5
15865 (exit "$ac_status"); }; }; then
15866 eval "$as_ac_Header=yes"
15868 echo "$as_me: failed program was:" >&5
15869 cat "conftest.$ac_ext" >&5
15870 eval "$as_ac_Header=no"
15872 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15874 echo "$as_me:15874: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
15875 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
15876 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
15877 cat >>confdefs.h <<EOF
15878 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15884 echo "$as_me:15884: checking for signed char" >&5
15885 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
15886 if test "${ac_cv_type_signed_char+set}" = set; then
15887 echo $ECHO_N "(cached) $ECHO_C" >&6
15889 cat >"conftest.$ac_ext" <<_ACEOF
15890 #line 15890 "configure"
15891 #include "confdefs.h"
15892 $ac_includes_default
15896 if ((signed char *) 0)
15898 if (sizeof (signed char))
15904 rm -f "conftest.$ac_objext"
15905 if { (eval echo "$as_me:15905: \"$ac_compile\"") >&5
15906 (eval $ac_compile) 2>&5
15908 echo "$as_me:15908: \$? = $ac_status" >&5
15909 (exit "$ac_status"); } &&
15910 { ac_try='test -s "conftest.$ac_objext"'
15911 { (eval echo "$as_me:15911: \"$ac_try\"") >&5
15912 (eval $ac_try) 2>&5
15914 echo "$as_me:15914: \$? = $ac_status" >&5
15915 (exit "$ac_status"); }; }; then
15916 ac_cv_type_signed_char=yes
15918 echo "$as_me: failed program was:" >&5
15919 cat "conftest.$ac_ext" >&5
15920 ac_cv_type_signed_char=no
15922 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15924 echo "$as_me:15924: result: $ac_cv_type_signed_char" >&5
15925 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
15927 echo "$as_me:15927: checking size of signed char" >&5
15928 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
15929 if test "${ac_cv_sizeof_signed_char+set}" = set; then
15930 echo $ECHO_N "(cached) $ECHO_C" >&6
15932 if test "$ac_cv_type_signed_char" = yes; then
15933 if test "$cross_compiling" = yes; then
15934 # Depending upon the size, compute the lo and hi bounds.
15935 cat >"conftest.$ac_ext" <<_ACEOF
15936 #line 15936 "configure"
15937 #include "confdefs.h"
15938 $ac_includes_default
15942 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
15947 rm -f "conftest.$ac_objext"
15948 if { (eval echo "$as_me:15948: \"$ac_compile\"") >&5
15949 (eval $ac_compile) 2>&5
15951 echo "$as_me:15951: \$? = $ac_status" >&5
15952 (exit "$ac_status"); } &&
15953 { ac_try='test -s "conftest.$ac_objext"'
15954 { (eval echo "$as_me:15954: \"$ac_try\"") >&5
15955 (eval $ac_try) 2>&5
15957 echo "$as_me:15957: \$? = $ac_status" >&5
15958 (exit "$ac_status"); }; }; then
15961 cat >"conftest.$ac_ext" <<_ACEOF
15962 #line 15962 "configure"
15963 #include "confdefs.h"
15964 $ac_includes_default
15968 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
15973 rm -f "conftest.$ac_objext"
15974 if { (eval echo "$as_me:15974: \"$ac_compile\"") >&5
15975 (eval $ac_compile) 2>&5
15977 echo "$as_me:15977: \$? = $ac_status" >&5
15978 (exit "$ac_status"); } &&
15979 { ac_try='test -s "conftest.$ac_objext"'
15980 { (eval echo "$as_me:15980: \"$ac_try\"") >&5
15981 (eval $ac_try) 2>&5
15983 echo "$as_me:15983: \$? = $ac_status" >&5
15984 (exit "$ac_status"); }; }; then
15985 ac_hi=$ac_mid; break
15987 echo "$as_me: failed program was:" >&5
15988 cat "conftest.$ac_ext" >&5
15989 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
15991 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15994 echo "$as_me: failed program was:" >&5
15995 cat "conftest.$ac_ext" >&5
15998 cat >"conftest.$ac_ext" <<_ACEOF
15999 #line 15999 "configure"
16000 #include "confdefs.h"
16001 $ac_includes_default
16005 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
16010 rm -f "conftest.$ac_objext"
16011 if { (eval echo "$as_me:16011: \"$ac_compile\"") >&5
16012 (eval $ac_compile) 2>&5
16014 echo "$as_me:16014: \$? = $ac_status" >&5
16015 (exit "$ac_status"); } &&
16016 { ac_try='test -s "conftest.$ac_objext"'
16017 { (eval echo "$as_me:16017: \"$ac_try\"") >&5
16018 (eval $ac_try) 2>&5
16020 echo "$as_me:16020: \$? = $ac_status" >&5
16021 (exit "$ac_status"); }; }; then
16022 ac_lo=$ac_mid; break
16024 echo "$as_me: failed program was:" >&5
16025 cat "conftest.$ac_ext" >&5
16026 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
16028 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16031 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16032 # Binary search between lo and hi bounds.
16033 while test "x$ac_lo" != "x$ac_hi"; do
16034 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
16035 cat >"conftest.$ac_ext" <<_ACEOF
16036 #line 16036 "configure"
16037 #include "confdefs.h"
16038 $ac_includes_default
16042 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16047 rm -f "conftest.$ac_objext"
16048 if { (eval echo "$as_me:16048: \"$ac_compile\"") >&5
16049 (eval $ac_compile) 2>&5
16051 echo "$as_me:16051: \$? = $ac_status" >&5
16052 (exit "$ac_status"); } &&
16053 { ac_try='test -s "conftest.$ac_objext"'
16054 { (eval echo "$as_me:16054: \"$ac_try\"") >&5
16055 (eval $ac_try) 2>&5
16057 echo "$as_me:16057: \$? = $ac_status" >&5
16058 (exit "$ac_status"); }; }; then
16061 echo "$as_me: failed program was:" >&5
16062 cat "conftest.$ac_ext" >&5
16063 ac_lo=`expr "$ac_mid" + 1`
16065 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16067 ac_cv_sizeof_signed_char=$ac_lo
16069 if test "$cross_compiling" = yes; then
16070 { { echo "$as_me:16070: error: cannot run test program while cross compiling" >&5
16071 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16072 { (exit 1); exit 1; }; }
16074 cat >"conftest.$ac_ext" <<_ACEOF
16075 #line 16075 "configure"
16076 #include "confdefs.h"
16077 $ac_includes_default
16081 FILE *f = fopen ("conftest.val", "w");
16083 $ac_main_return (1);
16084 fprintf (f, "%d", (sizeof (signed char)));
16090 rm -f "conftest$ac_exeext"
16091 if { (eval echo "$as_me:16091: \"$ac_link\"") >&5
16092 (eval $ac_link) 2>&5
16094 echo "$as_me:16094: \$? = $ac_status" >&5
16095 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16096 { (eval echo "$as_me:16096: \"$ac_try\"") >&5
16097 (eval $ac_try) 2>&5
16099 echo "$as_me:16099: \$? = $ac_status" >&5
16100 (exit "$ac_status"); }; }; then
16101 ac_cv_sizeof_signed_char=`cat conftest.val`
16103 echo "$as_me: program exited with status $ac_status" >&5
16104 echo "$as_me: failed program was:" >&5
16105 cat "conftest.$ac_ext" >&5
16107 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16112 ac_cv_sizeof_signed_char=0
16115 echo "$as_me:16115: result: $ac_cv_sizeof_signed_char" >&5
16116 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
16117 cat >>confdefs.h <<EOF
16118 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
16121 echo "$as_me:16121: checking for ANSI C header files" >&5
16122 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16123 if test "${ac_cv_header_stdc+set}" = set; then
16124 echo $ECHO_N "(cached) $ECHO_C" >&6
16126 cat >"conftest.$ac_ext" <<_ACEOF
16127 #line 16127 "configure"
16128 #include "confdefs.h"
16129 #include <stdlib.h>
16130 #include <stdarg.h>
16131 #include <string.h>
16135 if { (eval echo "$as_me:16135: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16136 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16138 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16140 cat conftest.err >&5
16141 echo "$as_me:16141: \$? = $ac_status" >&5
16142 (exit "$ac_status"); } >/dev/null; then
16143 if test -s conftest.err; then
16144 ac_cpp_err=$ac_c_preproc_warn_flag
16151 if test -z "$ac_cpp_err"; then
16152 ac_cv_header_stdc=yes
16154 echo "$as_me: failed program was:" >&5
16155 cat "conftest.$ac_ext" >&5
16156 ac_cv_header_stdc=no
16158 rm -f conftest.err "conftest.$ac_ext"
16160 if test $ac_cv_header_stdc = yes; then
16161 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16162 cat >"conftest.$ac_ext" <<_ACEOF
16163 #line 16163 "configure"
16164 #include "confdefs.h"
16165 #include <string.h>
16168 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16169 $EGREP "memchr" >/dev/null 2>&1; then
16172 ac_cv_header_stdc=no
16178 if test $ac_cv_header_stdc = yes; then
16179 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16180 cat >"conftest.$ac_ext" <<_ACEOF
16181 #line 16181 "configure"
16182 #include "confdefs.h"
16183 #include <stdlib.h>
16186 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16187 $EGREP "free" >/dev/null 2>&1; then
16190 ac_cv_header_stdc=no
16196 if test $ac_cv_header_stdc = yes; then
16197 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16198 if test "$cross_compiling" = yes; then
16201 cat >"conftest.$ac_ext" <<_ACEOF
16202 #line 16202 "configure"
16203 #include "confdefs.h"
16205 #if ((' ' & 0x0FF) == 0x020)
16206 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16207 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16209 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16210 || ('j' <= (c) && (c) <= 'r') \
16211 || ('s' <= (c) && (c) <= 'z'))
16212 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16215 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16220 for (i = 0; i < 256; i++)
16221 if (XOR (islower (i), ISLOWER (i))
16222 || toupper (i) != TOUPPER (i))
16223 $ac_main_return(2);
16224 $ac_main_return (0);
16227 rm -f "conftest$ac_exeext"
16228 if { (eval echo "$as_me:16228: \"$ac_link\"") >&5
16229 (eval $ac_link) 2>&5
16231 echo "$as_me:16231: \$? = $ac_status" >&5
16232 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16233 { (eval echo "$as_me:16233: \"$ac_try\"") >&5
16234 (eval $ac_try) 2>&5
16236 echo "$as_me:16236: \$? = $ac_status" >&5
16237 (exit "$ac_status"); }; }; then
16240 echo "$as_me: program exited with status $ac_status" >&5
16241 echo "$as_me: failed program was:" >&5
16242 cat "conftest.$ac_ext" >&5
16243 ac_cv_header_stdc=no
16245 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16249 echo "$as_me:16249: result: $ac_cv_header_stdc" >&5
16250 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16251 if test $ac_cv_header_stdc = yes; then
16253 cat >>confdefs.h <<\EOF
16254 #define STDC_HEADERS 1
16259 ac_header_dirent=no
16260 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16261 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16262 echo "$as_me:16262: checking for $ac_hdr that defines DIR" >&5
16263 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16264 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16265 echo $ECHO_N "(cached) $ECHO_C" >&6
16267 cat >"conftest.$ac_ext" <<_ACEOF
16268 #line 16268 "configure"
16269 #include "confdefs.h"
16270 #include <sys/types.h>
16282 rm -f "conftest.$ac_objext"
16283 if { (eval echo "$as_me:16283: \"$ac_compile\"") >&5
16284 (eval $ac_compile) 2>&5
16286 echo "$as_me:16286: \$? = $ac_status" >&5
16287 (exit "$ac_status"); } &&
16288 { ac_try='test -s "conftest.$ac_objext"'
16289 { (eval echo "$as_me:16289: \"$ac_try\"") >&5
16290 (eval $ac_try) 2>&5
16292 echo "$as_me:16292: \$? = $ac_status" >&5
16293 (exit "$ac_status"); }; }; then
16294 eval "$as_ac_Header=yes"
16296 echo "$as_me: failed program was:" >&5
16297 cat "conftest.$ac_ext" >&5
16298 eval "$as_ac_Header=no"
16300 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16302 echo "$as_me:16302: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16303 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16304 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16305 cat >>confdefs.h <<EOF
16306 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16309 ac_header_dirent=$ac_hdr; break
16313 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
16314 if test $ac_header_dirent = dirent.h; then
16315 echo "$as_me:16315: checking for opendir in -ldir" >&5
16316 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
16317 if test "${ac_cv_lib_dir_opendir+set}" = set; then
16318 echo $ECHO_N "(cached) $ECHO_C" >&6
16320 ac_check_lib_save_LIBS=$LIBS
16322 cat >"conftest.$ac_ext" <<_ACEOF
16323 #line 16323 "configure"
16324 #include "confdefs.h"
16326 /* Override any gcc2 internal prototype to avoid an error. */
16330 /* We use char because int might match the return type of a gcc2
16331 builtin and then its argument prototype would still apply. */
16341 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16342 if { (eval echo "$as_me:16342: \"$ac_link\"") >&5
16343 (eval $ac_link) 2>&5
16345 echo "$as_me:16345: \$? = $ac_status" >&5
16346 (exit "$ac_status"); } &&
16347 { ac_try='test -s "conftest$ac_exeext"'
16348 { (eval echo "$as_me:16348: \"$ac_try\"") >&5
16349 (eval $ac_try) 2>&5
16351 echo "$as_me:16351: \$? = $ac_status" >&5
16352 (exit "$ac_status"); }; }; then
16353 ac_cv_lib_dir_opendir=yes
16355 echo "$as_me: failed program was:" >&5
16356 cat "conftest.$ac_ext" >&5
16357 ac_cv_lib_dir_opendir=no
16359 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16360 LIBS=$ac_check_lib_save_LIBS
16362 echo "$as_me:16362: result: $ac_cv_lib_dir_opendir" >&5
16363 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
16364 if test "$ac_cv_lib_dir_opendir" = yes; then
16369 echo "$as_me:16369: checking for opendir in -lx" >&5
16370 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
16371 if test "${ac_cv_lib_x_opendir+set}" = set; then
16372 echo $ECHO_N "(cached) $ECHO_C" >&6
16374 ac_check_lib_save_LIBS=$LIBS
16376 cat >"conftest.$ac_ext" <<_ACEOF
16377 #line 16377 "configure"
16378 #include "confdefs.h"
16380 /* Override any gcc2 internal prototype to avoid an error. */
16384 /* We use char because int might match the return type of a gcc2
16385 builtin and then its argument prototype would still apply. */
16395 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16396 if { (eval echo "$as_me:16396: \"$ac_link\"") >&5
16397 (eval $ac_link) 2>&5
16399 echo "$as_me:16399: \$? = $ac_status" >&5
16400 (exit "$ac_status"); } &&
16401 { ac_try='test -s "conftest$ac_exeext"'
16402 { (eval echo "$as_me:16402: \"$ac_try\"") >&5
16403 (eval $ac_try) 2>&5
16405 echo "$as_me:16405: \$? = $ac_status" >&5
16406 (exit "$ac_status"); }; }; then
16407 ac_cv_lib_x_opendir=yes
16409 echo "$as_me: failed program was:" >&5
16410 cat "conftest.$ac_ext" >&5
16411 ac_cv_lib_x_opendir=no
16413 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16414 LIBS=$ac_check_lib_save_LIBS
16416 echo "$as_me:16416: result: $ac_cv_lib_x_opendir" >&5
16417 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
16418 if test "$ac_cv_lib_x_opendir" = yes; then
16424 echo "$as_me:16424: checking whether time.h and sys/time.h may both be included" >&5
16425 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16426 if test "${ac_cv_header_time+set}" = set; then
16427 echo $ECHO_N "(cached) $ECHO_C" >&6
16429 cat >"conftest.$ac_ext" <<_ACEOF
16430 #line 16430 "configure"
16431 #include "confdefs.h"
16432 #include <sys/types.h>
16433 #include <sys/time.h>
16439 if ((struct tm *) 0)
16445 rm -f "conftest.$ac_objext"
16446 if { (eval echo "$as_me:16446: \"$ac_compile\"") >&5
16447 (eval $ac_compile) 2>&5
16449 echo "$as_me:16449: \$? = $ac_status" >&5
16450 (exit "$ac_status"); } &&
16451 { ac_try='test -s "conftest.$ac_objext"'
16452 { (eval echo "$as_me:16452: \"$ac_try\"") >&5
16453 (eval $ac_try) 2>&5
16455 echo "$as_me:16455: \$? = $ac_status" >&5
16456 (exit "$ac_status"); }; }; then
16457 ac_cv_header_time=yes
16459 echo "$as_me: failed program was:" >&5
16460 cat "conftest.$ac_ext" >&5
16461 ac_cv_header_time=no
16463 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16465 echo "$as_me:16465: result: $ac_cv_header_time" >&5
16466 echo "${ECHO_T}$ac_cv_header_time" >&6
16467 if test $ac_cv_header_time = yes; then
16469 cat >>confdefs.h <<\EOF
16470 #define TIME_WITH_SYS_TIME 1
16475 ### checks for compiler characteristics
16477 ac_cpp='$CPP $CPPFLAGS'
16478 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16479 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16480 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16481 ac_main_return="return"
16483 echo "$as_me:16483: checking for an ANSI C-conforming const" >&5
16484 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16485 if test "${ac_cv_c_const+set}" = set; then
16486 echo $ECHO_N "(cached) $ECHO_C" >&6
16488 cat >"conftest.$ac_ext" <<_ACEOF
16489 #line 16489 "configure"
16490 #include "confdefs.h"
16495 /* FIXME: Include the comments suggested by Paul. */
16496 #ifndef __cplusplus
16497 /* Ultrix mips cc rejects this. */
16498 typedef int charset[2];
16500 /* SunOS 4.1.1 cc rejects this. */
16501 char const *const *ccp;
16503 /* NEC SVR4.0.2 mips cc rejects this. */
16504 struct point {int x, y;};
16505 static struct point const zero = {0,0};
16506 /* AIX XL C 1.02.0.0 rejects this.
16507 It does not let you subtract one const X* pointer from another in
16508 an arm of an if-expression whose if-part is not a constant
16510 const char *g = "string";
16511 ccp = &g + (g ? g-g : 0);
16512 /* HPUX 7.0 cc rejects these. */
16515 ccp = (char const *const *) p;
16516 { /* SCO 3.2v4 cc rejects this. */
16518 char const *s = 0 ? (char *) 0 : (char const *) 0;
16522 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
16523 int x[] = {25, 17};
16524 const int *foo = &x[0];
16527 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16528 typedef const int *iptr;
16532 { /* AIX XL C 1.02.0.0 rejects this saying
16533 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16534 struct s { int j; const int *ap[3]; };
16535 struct s *b; b->j = 5;
16537 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16538 const int foo = 10;
16546 rm -f "conftest.$ac_objext"
16547 if { (eval echo "$as_me:16547: \"$ac_compile\"") >&5
16548 (eval $ac_compile) 2>&5
16550 echo "$as_me:16550: \$? = $ac_status" >&5
16551 (exit "$ac_status"); } &&
16552 { ac_try='test -s "conftest.$ac_objext"'
16553 { (eval echo "$as_me:16553: \"$ac_try\"") >&5
16554 (eval $ac_try) 2>&5
16556 echo "$as_me:16556: \$? = $ac_status" >&5
16557 (exit "$ac_status"); }; }; then
16560 echo "$as_me: failed program was:" >&5
16561 cat "conftest.$ac_ext" >&5
16564 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16566 echo "$as_me:16566: result: $ac_cv_c_const" >&5
16567 echo "${ECHO_T}$ac_cv_c_const" >&6
16568 if test $ac_cv_c_const = no; then
16570 cat >>confdefs.h <<\EOF
16576 ### Checks for external-data
16578 echo "$as_me:16578: checking if data-only library module links" >&5
16579 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16580 if test "${cf_cv_link_dataonly+set}" = set; then
16581 echo $ECHO_N "(cached) $ECHO_C" >&6
16585 cat >conftest.$ac_ext <<EOF
16586 #line 16586 "configure"
16587 int testdata[3] = { 123, 456, 789 };
16589 if { (eval echo "$as_me:16589: \"$ac_compile\"") >&5
16590 (eval $ac_compile) 2>&5
16592 echo "$as_me:16592: \$? = $ac_status" >&5
16593 (exit "$ac_status"); } ; then
16594 mv conftest.o data.o && \
16595 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16597 rm -f conftest.$ac_ext data.o
16598 cat >conftest.$ac_ext <<EOF
16599 #line 16599 "configure"
16603 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
16605 extern int testdata[3];
16606 return testdata[0] == 123
16607 && testdata[1] == 456
16608 && testdata[2] == 789;
16612 if { (eval echo "$as_me:16612: \"$ac_compile\"") >&5
16613 (eval $ac_compile) 2>&5
16615 echo "$as_me:16615: \$? = $ac_status" >&5
16616 (exit "$ac_status"); }; then
16617 mv conftest.o func.o && \
16618 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16620 rm -f conftest.$ac_ext func.o
16621 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16622 cf_saveLIBS="$LIBS"
16623 LIBS="conftest.a $LIBS"
16624 if test "$cross_compiling" = yes; then
16625 cf_cv_link_dataonly=unknown
16627 cat >"conftest.$ac_ext" <<_ACEOF
16628 #line 16628 "configure"
16629 #include "confdefs.h"
16633 extern int testfunc();
16634 ${cf_cv_main_return:-return} (!testfunc());
16638 rm -f "conftest$ac_exeext"
16639 if { (eval echo "$as_me:16639: \"$ac_link\"") >&5
16640 (eval $ac_link) 2>&5
16642 echo "$as_me:16642: \$? = $ac_status" >&5
16643 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16644 { (eval echo "$as_me:16644: \"$ac_try\"") >&5
16645 (eval $ac_try) 2>&5
16647 echo "$as_me:16647: \$? = $ac_status" >&5
16648 (exit "$ac_status"); }; }; then
16649 cf_cv_link_dataonly=yes
16651 echo "$as_me: program exited with status $ac_status" >&5
16652 echo "$as_me: failed program was:" >&5
16653 cat "conftest.$ac_ext" >&5
16654 cf_cv_link_dataonly=no
16656 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16658 LIBS="$cf_saveLIBS"
16662 echo "$as_me:16662: result: $cf_cv_link_dataonly" >&5
16663 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16665 if test "$cf_cv_link_dataonly" = no ; then
16667 cat >>confdefs.h <<\EOF
16668 #define BROKEN_LINKER 1
16674 ### Checks for library functions.
16680 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16681 echo "$as_me:16681: checking for $ac_header" >&5
16682 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16683 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16684 echo $ECHO_N "(cached) $ECHO_C" >&6
16686 cat >"conftest.$ac_ext" <<_ACEOF
16687 #line 16687 "configure"
16688 #include "confdefs.h"
16689 #include <$ac_header>
16691 if { (eval echo "$as_me:16691: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16692 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16694 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16696 cat conftest.err >&5
16697 echo "$as_me:16697: \$? = $ac_status" >&5
16698 (exit "$ac_status"); } >/dev/null; then
16699 if test -s conftest.err; then
16700 ac_cpp_err=$ac_c_preproc_warn_flag
16707 if test -z "$ac_cpp_err"; then
16708 eval "$as_ac_Header=yes"
16710 echo "$as_me: failed program was:" >&5
16711 cat "conftest.$ac_ext" >&5
16712 eval "$as_ac_Header=no"
16714 rm -f conftest.err "conftest.$ac_ext"
16716 echo "$as_me:16716: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16717 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16718 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16719 cat >>confdefs.h <<EOF
16720 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16726 echo "$as_me:16726: checking for working mkstemp" >&5
16727 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16728 if test "${cf_cv_func_mkstemp+set}" = set; then
16729 echo $ECHO_N "(cached) $ECHO_C" >&6
16733 if test "$cross_compiling" = yes; then
16734 cf_cv_func_mkstemp=maybe
16736 cat >"conftest.$ac_ext" <<_ACEOF
16737 #line 16737 "configure"
16738 #include "confdefs.h"
16740 #include <sys/types.h>
16741 #ifdef HAVE_UNISTD_H
16742 #include <unistd.h>
16744 #include <stdlib.h>
16746 #include <string.h>
16747 #include <sys/stat.h>
16750 char *tmpl = "conftestXXXXXX";
16758 for (n = 0; n < 2; ++n) {
16759 strcpy(name[n], tmpl);
16760 if ((fd = mkstemp(name[n])) >= 0) {
16761 if (!strcmp(name[n], tmpl)
16762 || stat(name[n], &sb) != 0
16763 || (sb.st_mode & S_IFMT) != S_IFREG
16764 || (sb.st_mode & 077) != 0) {
16771 && !strcmp(name[0], name[1]))
16773 ${cf_cv_main_return:-return}(result);
16777 rm -f "conftest$ac_exeext"
16778 if { (eval echo "$as_me:16778: \"$ac_link\"") >&5
16779 (eval $ac_link) 2>&5
16781 echo "$as_me:16781: \$? = $ac_status" >&5
16782 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16783 { (eval echo "$as_me:16783: \"$ac_try\"") >&5
16784 (eval $ac_try) 2>&5
16786 echo "$as_me:16786: \$? = $ac_status" >&5
16787 (exit "$ac_status"); }; }; then
16788 cf_cv_func_mkstemp=yes
16791 echo "$as_me: program exited with status $ac_status" >&5
16792 echo "$as_me: failed program was:" >&5
16793 cat "conftest.$ac_ext" >&5
16794 cf_cv_func_mkstemp=no
16797 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16801 echo "$as_me:16801: result: $cf_cv_func_mkstemp" >&5
16802 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16803 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16804 echo "$as_me:16804: checking for mkstemp" >&5
16805 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16806 if test "${ac_cv_func_mkstemp+set}" = set; then
16807 echo $ECHO_N "(cached) $ECHO_C" >&6
16809 cat >"conftest.$ac_ext" <<_ACEOF
16810 #line 16810 "configure"
16811 #include "confdefs.h"
16812 #define mkstemp autoconf_temporary
16813 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16820 /* We use char because int might match the return type of a gcc2
16821 builtin and then its argument prototype would still apply. */
16822 char mkstemp (void);
16828 /* The GNU C library defines stubs for functions which it implements
16829 to always fail with ENOSYS. Some functions are actually named
16830 something starting with __ and the normal name is an alias. */
16831 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16832 #error found stub for mkstemp
16840 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16841 if { (eval echo "$as_me:16841: \"$ac_link\"") >&5
16842 (eval $ac_link) 2>&5
16844 echo "$as_me:16844: \$? = $ac_status" >&5
16845 (exit "$ac_status"); } &&
16846 { ac_try='test -s "conftest$ac_exeext"'
16847 { (eval echo "$as_me:16847: \"$ac_try\"") >&5
16848 (eval $ac_try) 2>&5
16850 echo "$as_me:16850: \$? = $ac_status" >&5
16851 (exit "$ac_status"); }; }; then
16852 ac_cv_func_mkstemp=yes
16854 echo "$as_me: failed program was:" >&5
16855 cat "conftest.$ac_ext" >&5
16856 ac_cv_func_mkstemp=no
16858 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16860 echo "$as_me:16860: result: $ac_cv_func_mkstemp" >&5
16861 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16864 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16866 cat >>confdefs.h <<\EOF
16867 #define HAVE_MKSTEMP 1
16872 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
16873 CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
16874 CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
16878 if test "$cf_with_ada" != "no" ; then
16880 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
16883 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16885 unset ac_cv_path_cf_TEMP_gnat
16887 # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
16888 set dummy $cf_prog_gnat; ac_word=$2
16889 echo "$as_me:16889: checking for $ac_word" >&5
16890 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16891 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
16892 echo $ECHO_N "(cached) $ECHO_C" >&6
16894 case $cf_TEMP_gnat in
16896 ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
16899 ac_save_IFS=$IFS; IFS=$ac_path_separator
16901 for ac_dir in $ac_dummy; do
16903 test -z "$ac_dir" && ac_dir=.
16904 if $as_executable_p "$ac_dir/$ac_word"; then
16905 ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
16906 echo "$as_me:16906: found $ac_dir/$ac_word" >&5
16911 test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
16915 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
16917 if test -n "$cf_TEMP_gnat"; then
16918 echo "$as_me:16918: result: $cf_TEMP_gnat" >&5
16919 echo "${ECHO_T}$cf_TEMP_gnat" >&6
16921 echo "$as_me:16921: result: no" >&5
16922 echo "${ECHO_T}no" >&6
16925 eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
16927 if test "x$cf_TEMP_gnat" != xno; then
16928 unset cf_cv_gnat_version
16931 echo "$as_me:16931: checking for $cf_prog_gnat version" >&5
16932 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
16933 if test "${cf_cv_gnat_version+set}" = set; then
16934 echo $ECHO_N "(cached) $ECHO_C" >&6
16937 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
16938 grep '[0-9].[0-9][0-9]*' |\
16939 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
16942 echo "$as_me:16942: result: $cf_cv_gnat_version" >&5
16943 echo "${ECHO_T}$cf_cv_gnat_version" >&6
16944 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
16945 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
16948 eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
16951 unset cf_cv_gnat_version
16952 unset ac_cv_path_cf_TEMP_gnat
16955 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
16957 cf_cv_prog_gnat_correct=no
16959 cf_ada_make=gnatmake
16960 if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
16961 # gprconfig is newer than gnatmake; we can continue...
16964 rm -rf ./conftest* ./*~conftest*
16965 if mkdir conftest.src
16969 for cf_gprconfig in Ada C
16971 echo "$as_me:16971: checking for gprconfig name for $cf_gprconfig" >&5
16972 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
16973 if test "$cf_gprconfig" = C
16975 for cf_gprconfig_param in \
16976 "$cf_gprconfig,,,,GNATGCC" \
16977 "$cf_gprconfig,,,,GCC" \
16980 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
16981 test -n "$cf_gprconfig_value" && break
16984 cf_gprconfig_param=$cf_gprconfig
16985 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
16987 if test -n "$cf_gprconfig_value"
16989 eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
16990 echo "$as_me:16990: result: $cf_gprconfig_value" >&5
16991 echo "${ECHO_T}$cf_gprconfig_value" >&6
16993 echo "$as_me:16993: result: missing" >&5
16994 echo "${ECHO_T}missing" >&6
17000 rm -rf ./conftest* ./*~conftest*
17003 if test "x$cf_ada_config" != "x#"
17006 echo "$as_me:17006: checking for gnat version" >&5
17007 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17008 if test "${cf_cv_gnat_version+set}" = set; then
17009 echo $ECHO_N "(cached) $ECHO_C" >&6
17012 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
17013 grep '[0-9].[0-9][0-9]*' |\
17014 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17017 echo "$as_me:17017: result: $cf_cv_gnat_version" >&5
17018 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17019 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17021 case "$cf_cv_gnat_version" in
17022 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17023 cf_cv_prog_gnat_correct=yes
17026 { echo "$as_me:17026: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
17027 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
17028 cf_cv_prog_gnat_correct=no
17032 # Extract the first word of "m4", so it can be a program name with args.
17033 set dummy m4; ac_word=$2
17034 echo "$as_me:17034: checking for $ac_word" >&5
17035 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17036 if test "${ac_cv_prog_M4_exists+set}" = set; then
17037 echo $ECHO_N "(cached) $ECHO_C" >&6
17039 if test -n "$M4_exists"; then
17040 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17042 ac_save_IFS=$IFS; IFS=$ac_path_separator
17044 for ac_dir in $ac_dummy; do
17046 test -z "$ac_dir" && ac_dir=.
17047 $as_executable_p "$ac_dir/$ac_word" || continue
17048 ac_cv_prog_M4_exists="yes"
17049 echo "$as_me:17049: found $ac_dir/$ac_word" >&5
17053 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17056 M4_exists=$ac_cv_prog_M4_exists
17057 if test -n "$M4_exists"; then
17058 echo "$as_me:17058: result: $M4_exists" >&5
17059 echo "${ECHO_T}$M4_exists" >&6
17061 echo "$as_me:17061: result: no" >&5
17062 echo "${ECHO_T}no" >&6
17065 if test "$ac_cv_prog_M4_exists" = no; then
17066 cf_cv_prog_gnat_correct=no
17067 { echo "$as_me:17067: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
17068 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
17070 if test "$cf_cv_prog_gnat_correct" = yes; then
17071 echo "$as_me:17071: checking if GNAT works" >&5
17072 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17074 rm -rf ./conftest* ./*~conftest*
17075 cat >>conftest.ads <<CF_EOF
17076 procedure conftest;
17078 cat >>conftest.adb <<CF_EOF
17081 procedure conftest is
17083 Text_IO.Put ("Hello World");
17085 GNAT.OS_Lib.OS_Exit (0);
17088 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17089 if ( ./conftest 1>&5 2>&1 ) ; then
17090 cf_cv_prog_gnat_correct=yes
17092 cf_cv_prog_gnat_correct=no
17095 cf_cv_prog_gnat_correct=no
17097 rm -rf ./conftest* ./*~conftest*
17099 echo "$as_me:17099: result: $cf_cv_prog_gnat_correct" >&5
17100 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17103 cf_cv_prog_gnat_correct=no
17107 if test "$cf_cv_prog_gnat_correct" = yes; then
17109 echo "$as_me:17109: checking optimization options for ADAFLAGS" >&5
17110 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
17114 ADAFLAGS="$ADAFLAGS -g"
17120 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
17122 ADAFLAGS="$ADAFLAGS $cf_O_flag"
17126 echo "$as_me:17126: result: $ADAFLAGS" >&5
17127 echo "${ECHO_T}$ADAFLAGS" >&6
17129 echo "$as_me:17129: checking if GNATPREP supports -T option" >&5
17130 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
17131 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
17132 echo $ECHO_N "(cached) $ECHO_C" >&6
17135 cf_cv_gnatprep_opt_t=no
17136 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
17139 echo "$as_me:17139: result: $cf_cv_gnatprep_opt_t" >&5
17140 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
17141 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
17143 echo "$as_me:17143: checking if GNAT supports generics" >&5
17144 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
17145 case "$cf_cv_gnat_version" in
17146 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17147 cf_gnat_generics=yes
17150 cf_gnat_generics=no
17153 echo "$as_me:17153: result: $cf_gnat_generics" >&5
17154 echo "${ECHO_T}$cf_gnat_generics" >&6
17156 if test "$cf_gnat_generics" = yes
17158 cf_compile_generics=generics
17159 cf_generic_objects="\${GENOBJS}"
17161 cf_compile_generics=
17162 cf_generic_objects=
17165 echo "$as_me:17165: checking if GNAT supports SIGINT" >&5
17166 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
17167 if test "${cf_cv_gnat_sigint+set}" = set; then
17168 echo $ECHO_N "(cached) $ECHO_C" >&6
17171 rm -rf ./conftest* ./*~conftest*
17172 cat >>conftest.ads <<CF_EOF
17173 with Ada.Interrupts.Names;
17175 package ConfTest is
17177 pragma Warnings (Off); -- the next pragma exists since 3.11p
17178 pragma Unreserve_All_Interrupts;
17179 pragma Warnings (On);
17181 protected Process is
17183 function Continue return Boolean;
17184 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
17186 Done : Boolean := False;
17191 cat >>conftest.adb <<CF_EOF
17192 package body ConfTest is
17193 protected body Process is
17198 function Continue return Boolean is
17205 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17206 cf_cv_gnat_sigint=yes
17208 cf_cv_gnat_sigint=no
17210 rm -rf ./conftest* ./*~conftest*
17213 echo "$as_me:17213: result: $cf_cv_gnat_sigint" >&5
17214 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
17216 if test "$cf_cv_gnat_sigint" = yes ; then
17219 USE_GNAT_SIGINT="#"
17222 cf_gnat_libraries=no
17223 cf_gnat_projects=no
17225 if test "$enable_gnat_projects" != no ; then
17226 echo "$as_me:17226: checking if GNAT supports project files" >&5
17227 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
17228 case "$cf_cv_gnat_version" in
17232 case "$cf_cv_system_name" in
17236 rm -rf ./conftest* ./*~conftest*
17237 if mkdir conftest.src conftest.bin conftest.lib
17240 rm -rf ./conftest* ./*~conftest*
17241 cat >>library.gpr <<CF_EOF
17243 Kind := External ("LIB_KIND");
17244 for Library_Name use "ConfTest";
17245 for Object_Dir use ".";
17246 for Library_ALI_Dir use External("LIBRARY_DIR");
17247 for Library_Version use External ("SONAME");
17248 for Library_Kind use Kind;
17249 for Library_Dir use External("BUILD_DIR");
17250 Source_Dir := External ("SOURCE_DIR");
17251 for Source_Dirs use (Source_Dir);
17254 cat >>confpackage.ads <<CF_EOF
17255 package ConfPackage is
17256 procedure conftest;
17259 cat >>confpackage.adb <<CF_EOF
17261 package body ConfPackage is
17262 procedure conftest is
17264 Text_IO.Put ("Hello World");
17269 if ( "$cf_ada_make" $ADAFLAGS \
17271 -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
17272 -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
17273 -XSOURCE_DIR="`pwd`" \
17274 -XSONAME=libConfTest.so.1 \
17275 -XLIB_KIND=static 1>&5 2>&1 ) ; then
17276 cf_gnat_projects=yes
17280 if test -f conftest.lib/confpackage.ali
17282 cf_gnat_libraries=yes
17284 rm -rf ./conftest* ./*~conftest*
17289 echo "$as_me:17289: result: $cf_gnat_projects" >&5
17290 echo "${ECHO_T}$cf_gnat_projects" >&6
17291 fi # enable_gnat_projects
17293 if test "$cf_gnat_projects" = yes
17295 echo "$as_me:17295: checking if GNAT supports libraries" >&5
17296 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
17297 echo "$as_me:17297: result: $cf_gnat_libraries" >&5
17298 echo "${ECHO_T}$cf_gnat_libraries" >&6
17301 USE_OLD_MAKERULES=""
17302 USE_GNAT_PROJECTS="#"
17303 USE_GNAT_MAKE_GPR="#"
17304 USE_GNAT_GPRBUILD="#"
17306 if test "$cf_gnat_projects" = yes
17308 USE_OLD_MAKERULES="#"
17309 USE_GNAT_PROJECTS=""
17310 if test "$cf_cv_VERSION_GPRBUILD" != no
17312 USE_GNAT_GPRBUILD=""
17313 elif test "$cf_cv_VERSION_GNATMAKE" != no
17315 USE_GNAT_MAKE_GPR=""
17317 { echo "$as_me:17317: WARNING: use old makefile rules since tools are missing" >&5
17318 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
17322 if test "$cf_gnat_libraries" = yes
17324 USE_GNAT_LIBRARIES=""
17326 USE_GNAT_LIBRARIES="#"
17329 echo "$as_me:17329: checking for ada-compiler" >&5
17330 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
17332 # Check whether --with-ada-compiler or --without-ada-compiler was given.
17333 if test "${with_ada_compiler+set}" = set; then
17334 withval="$with_ada_compiler"
17335 cf_ada_compiler=$withval
17337 cf_ada_compiler=gnatmake
17340 echo "$as_me:17340: result: $cf_ada_compiler" >&5
17341 echo "${ECHO_T}$cf_ada_compiler" >&6
17343 cf_ada_package=terminal_interface
17345 echo "$as_me:17345: checking for ada-include" >&5
17346 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
17348 # Check whether --with-ada-include or --without-ada-include was given.
17349 if test "${with_ada_include+set}" = set; then
17350 withval="$with_ada_include"
17353 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
17354 fi; if test -n "$prefix/share/ada/adainclude" ; then
17356 if test "x$prefix" != xNONE; then
17357 cf_path_syntax="$prefix"
17359 cf_path_syntax="$ac_default_prefix"
17362 case ".$withval" in
17363 (.\$\(*\)*|.\'*\'*)
17367 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17369 (.\$\{*prefix\}*|.\$\{*dir\}*)
17370 eval withval="$withval"
17371 case ".$withval" in
17373 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17378 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17381 { { echo "$as_me:17381: error: expected a pathname, not \"$withval\"" >&5
17382 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17383 { (exit 1); exit 1; }; }
17388 eval ADA_INCLUDE="$withval"
17390 echo "$as_me:17390: result: $ADA_INCLUDE" >&5
17391 echo "${ECHO_T}$ADA_INCLUDE" >&6
17393 echo "$as_me:17393: checking for ada-objects" >&5
17394 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
17396 # Check whether --with-ada-objects or --without-ada-objects was given.
17397 if test "${with_ada_objects+set}" = set; then
17398 withval="$with_ada_objects"
17401 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
17402 fi; if test -n "$prefix/lib/ada/adalib" ; then
17404 if test "x$prefix" != xNONE; then
17405 cf_path_syntax="$prefix"
17407 cf_path_syntax="$ac_default_prefix"
17410 case ".$withval" in
17411 (.\$\(*\)*|.\'*\'*)
17415 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17417 (.\$\{*prefix\}*|.\$\{*dir\}*)
17418 eval withval="$withval"
17419 case ".$withval" in
17421 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17426 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17429 { { echo "$as_me:17429: error: expected a pathname, not \"$withval\"" >&5
17430 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17431 { (exit 1); exit 1; }; }
17436 eval ADA_OBJECTS="$withval"
17438 echo "$as_me:17438: result: $ADA_OBJECTS" >&5
17439 echo "${ECHO_T}$ADA_OBJECTS" >&6
17441 echo "$as_me:17441: checking if an Ada95 shared-library should be built" >&5
17442 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
17444 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
17445 if test "${with_ada_sharedlib+set}" = set; then
17446 withval="$with_ada_sharedlib"
17447 with_ada_sharedlib=$withval
17449 with_ada_sharedlib=no
17451 echo "$as_me:17451: result: $with_ada_sharedlib" >&5
17452 echo "${ECHO_T}$with_ada_sharedlib" >&6
17454 if test "x$with_ada_sharedlib" != xno
17456 if test "x$cf_gnat_projects" != xyes
17458 { echo "$as_me:17458: WARNING: disabling shared-library since GNAT projects are not supported" >&5
17459 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
17460 with_ada_sharedlib=no
17464 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
17465 MAKE_ADA_SHAREDLIB="#"
17467 if test "x$with_ada_sharedlib" != xno
17469 MAKE_ADA_SHAREDLIB=
17470 if test "x$with_ada_sharedlib" != xyes
17472 ADA_SHAREDLIB="$with_ada_sharedlib"
17476 # allow the Ada binding to be renamed
17478 echo "$as_me:17478: checking for ada-libname" >&5
17479 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
17481 # Check whether --with-ada-libname or --without-ada-libname was given.
17482 if test "${with_ada_libname+set}" = set; then
17483 withval="$with_ada_libname"
17484 ADA_LIBNAME=$withval
17486 ADA_LIBNAME=AdaCurses
17488 case "x$ADA_LIBNAME" in
17490 ADA_LIBNAME=AdaCurses
17494 echo "$as_me:17494: result: $ADA_LIBNAME" >&5
17495 echo "${ECHO_T}$ADA_LIBNAME" >&6
17498 { { echo "$as_me:17498: error: No usable Ada compiler found" >&5
17499 echo "$as_me: error: No usable Ada compiler found" >&2;}
17500 { (exit 1); exit 1; }; }
17503 { { echo "$as_me:17503: error: The Ada compiler is needed for this package" >&5
17504 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
17505 { (exit 1); exit 1; }; }
17508 ################################################################################
17515 ### Construct the list of include-directories to be generated
17517 if test "$srcdir" != "."; then
17518 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
17520 CPPFLAGS="-I../include $CPPFLAGS"
17521 if test "$srcdir" != "."; then
17522 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
17524 CPPFLAGS="-I. $CPPFLAGS"
17526 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
17527 if test "$srcdir" != "."; then
17528 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
17530 if test "$GCC" != yes; then
17531 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17532 elif test "$includedir" != "/usr/include"; then
17533 if test "$includedir" = '${prefix}/include' ; then
17534 if test x$prefix != x/usr ; then
17535 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17538 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17542 ### Build up pieces for makefile rules
17543 echo "$as_me:17543: checking default library suffix" >&5
17544 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
17546 case $DFT_LWR_MODEL in
17547 (libtool) DFT_ARG_SUFFIX='' ;;
17548 (normal) DFT_ARG_SUFFIX='' ;;
17549 (debug) DFT_ARG_SUFFIX='_g' ;;
17550 (profile) DFT_ARG_SUFFIX='_p' ;;
17551 (shared) DFT_ARG_SUFFIX='' ;;
17553 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
17554 echo "$as_me:17554: result: $DFT_ARG_SUFFIX" >&5
17555 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
17557 echo "$as_me:17557: checking default library-dependency suffix" >&5
17558 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
17560 case X$DFT_LWR_MODEL in
17562 DFT_LIB_SUFFIX='.la'
17563 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17566 case "$cf_cv_system_name" in
17568 DFT_LIB_SUFFIX='_g.lib'
17571 DFT_LIB_SUFFIX='_g.a'
17574 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17577 case "$cf_cv_system_name" in
17579 DFT_LIB_SUFFIX='_p.lib'
17582 DFT_LIB_SUFFIX='_p.a'
17585 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17588 case "$cf_cv_system_name" in
17590 DFT_LIB_SUFFIX='.so'
17591 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17594 DFT_LIB_SUFFIX='.dll'
17595 DFT_DEP_SUFFIX='.dll.lib'
17597 (cygwin*|msys*|mingw*)
17598 DFT_LIB_SUFFIX='.dll'
17599 DFT_DEP_SUFFIX='.dll.a'
17602 DFT_LIB_SUFFIX='.dylib'
17603 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17608 DFT_LIB_SUFFIX='.so'
17609 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17612 DFT_LIB_SUFFIX='.sl'
17613 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17618 DFT_LIB_SUFFIX='.so'
17619 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17626 DFT_LIB_SUFFIX='.lib'
17629 DFT_LIB_SUFFIX='.a'
17632 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17635 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
17637 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
17638 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
17640 echo "$as_me:17640: result: $DFT_DEP_SUFFIX" >&5
17641 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
17643 echo "$as_me:17643: checking default object directory" >&5
17644 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
17646 case $DFT_LWR_MODEL in
17647 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
17648 (normal) DFT_OBJ_SUBDIR='objects' ;;
17649 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
17650 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
17652 case "$cf_cv_system_name" in
17654 DFT_OBJ_SUBDIR='objects' ;;
17656 DFT_OBJ_SUBDIR='obj_s' ;;
17659 echo "$as_me:17659: result: $DFT_OBJ_SUBDIR" >&5
17660 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
17662 ### Set up low-level terminfo dependencies for makefiles.
17664 if test "$DFT_LWR_MODEL" = shared ; then
17665 case $cf_cv_system_name in
17667 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
17670 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
17675 USE_ARG_SUFFIX=${DFT_ARG_SUFFIX}
17677 USE_LIB_SUFFIX=${DFT_ARG_SUFFIX}
17679 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
17681 ### Construct the list of subdirectories for which we'll customize makefiles
17682 ### with the appropriate compile-rules.
17684 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
17686 cat >>confdefs.h <<EOF
17687 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
17690 ################################################################################
17696 NCURSES_SHLIB2="sh -c"
17698 ADA_SUBDIRS="include gen src doc"
17699 if test "x$cf_with_tests" != "xno" ; then
17700 ADA_SUBDIRS="$ADA_SUBDIRS samples"
17702 for cf_dir in $ADA_SUBDIRS
17704 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
17711 # match layout used by make-tar.sh
17712 ADAHTML_DIR=../doc/ada
17714 if test "x$cross_compiling" = xyes ; then
17715 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
17717 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
17720 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"
17721 ac_config_commands="$ac_config_commands default"
17722 cat >confcache <<\_ACEOF
17723 # This file is a shell script that caches the results of configure
17724 # tests run on this system so they can be shared between configure
17725 # scripts and configure runs, see configure's option --config-cache.
17726 # It is not useful on other systems. If it contains results you don't
17727 # want to keep, you may remove or edit it.
17729 # config.status only pays attention to the cache file if you give it
17730 # the --recheck option to rerun configure.
17732 # `ac_cv_env_foo' variables (set or unset) will be overriden when
17733 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17734 # following values.
17738 # The following way of writing the cache mishandles newlines in values,
17739 # but we know of no workaround that is simple, portable, and efficient.
17740 # So, don't put newlines in cache variables' values.
17741 # Ultrix sh set writes to stderr and can't be redirected directly,
17742 # and sets the high bit in the cache file unless we assign to the vars.
17745 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17747 # `set' does not quote correctly, so add quotes (double-quote
17748 # substitution turns \\\\ into \\, and sed turns \\ into \).
17751 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17754 # `set' quotes correctly as required by POSIX, so do not add quotes.
17756 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17763 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17765 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17767 if cmp -s $cache_file confcache; then :; else
17768 if test -w $cache_file; then
17769 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17770 cat confcache >$cache_file
17772 echo "not updating unwritable cache $cache_file"
17777 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17778 # Let make expand exec_prefix.
17779 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17781 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17782 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17783 # trailing colons and then remove the whole line if VPATH becomes empty
17784 # (actually we leave an empty line to preserve line numbers).
17785 if test "x$srcdir" = x.; then
17786 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17787 s/:*\$(srcdir):*/:/;
17788 s/:*\${srcdir}:*/:/;
17790 s/^\([^=]*=[ ]*\):*/\1/;
17796 DEFS=-DHAVE_CONFIG_H
17798 : "${CONFIG_STATUS=./config.status}"
17799 ac_clean_files_save=$ac_clean_files
17800 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17801 { echo "$as_me:17801: creating $CONFIG_STATUS" >&5
17802 echo "$as_me: creating $CONFIG_STATUS" >&6;}
17803 cat >"$CONFIG_STATUS" <<_ACEOF
17805 # Generated automatically by configure.
17806 # Run this file to recreate the current configuration.
17807 # Compiler output produced by configure, useful for debugging
17808 # configure, is in config.log if it exists.
17811 SHELL=\${CONFIG_SHELL-$SHELL}
17812 ac_cs_invocation="\$0 \$@"
17814 CLICOLOR_FORCE= GREP_OPTIONS=
17815 unset CLICOLOR_FORCE GREP_OPTIONS
17818 cat >>"$CONFIG_STATUS" <<\_ACEOF
17819 # Be Bourne compatible
17820 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17823 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17827 # Name of the executable.
17828 as_me=`echo "$0" |sed 's,.*[\\/],,'`
17830 if expr a : '\(a\)' >/dev/null 2>&1; then
17836 rm -f conf$$ conf$$.exe conf$$.file
17838 if ln -s conf$$.file conf$$ 2>/dev/null; then
17839 # We could just check for DJGPP; but this test a) works b) is more generic
17840 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17841 if test -f conf$$.exe; then
17842 # Don't use ln at all; we don't have any links
17847 elif ln conf$$.file conf$$ 2>/dev/null; then
17852 rm -f conf$$ conf$$.exe conf$$.file
17854 as_executable_p="test -f"
17856 # Support unset when possible.
17857 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17864 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
17865 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
17866 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
17867 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
17868 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
17869 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
17870 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
17871 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
17874 # We need space, tab and new line, in precisely that order.
17880 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
17886 # Files that config.status was made for.
17887 if test -n "$ac_config_files"; then
17888 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
17891 if test -n "$ac_config_headers"; then
17892 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
17895 if test -n "$ac_config_links"; then
17896 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
17899 if test -n "$ac_config_commands"; then
17900 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
17903 cat >>"$CONFIG_STATUS" <<\EOF
17906 \`$as_me' instantiates files from templates according to the
17907 current configuration.
17909 Usage: $0 [OPTIONS] [FILE]...
17911 -h, --help print this help, then exit
17912 -V, --version print version number, then exit
17913 -d, --debug don't remove temporary files
17914 --recheck update $as_me by reconfiguring in the same conditions
17915 --file=FILE[:TEMPLATE]
17916 instantiate the configuration file FILE
17917 --header=FILE[:TEMPLATE]
17918 instantiate the configuration header FILE
17920 Configuration files:
17923 Configuration headers:
17926 Configuration commands:
17929 Report bugs to <dickey@invisible-island.net>."
17932 cat >>"$CONFIG_STATUS" <<EOF
17935 configured by $0, generated by GNU Autoconf 2.52.20210105,
17936 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17938 Copyright 2003-2020,2021 Thomas E. Dickey
17939 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17940 Free Software Foundation, Inc.
17941 This config.status script is free software; the Free Software Foundation
17942 gives unlimited permission to copy, distribute and modify it."
17947 cat >>"$CONFIG_STATUS" <<\EOF
17948 # If no file are specified by the user, then we need to provide default
17949 # value. By we need to know if files were specified by the user.
17955 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17956 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17958 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17962 *) # This is not an option, so the user has probably given explicit
17964 ac_need_defaults=false;;
17968 # Handling of the options.
17970 cat >>"$CONFIG_STATUS" <<EOF
17971 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17972 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17973 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17975 cat >>"$CONFIG_STATUS" <<\EOF
17976 --version | --vers* | -V )
17977 echo "$ac_cs_version"; exit 0 ;;
17979 # Conflict between --help and --header
17980 { { echo "$as_me:17980: error: ambiguous option: $1
17981 Try \`$0 --help' for more information." >&5
17982 echo "$as_me: error: ambiguous option: $1
17983 Try \`$0 --help' for more information." >&2;}
17984 { (exit 1); exit 1; }; };;
17985 --help | --hel | -h )
17986 echo "$ac_cs_usage"; exit 0 ;;
17987 --debug | --d* | -d )
17989 --file | --fil | --fi | --f )
17991 CONFIG_FILES="$CONFIG_FILES $1"
17992 ac_need_defaults=false;;
17993 --header | --heade | --head | --hea )
17995 CONFIG_HEADERS="$CONFIG_HEADERS $1"
17996 ac_need_defaults=false;;
17998 # This is an error.
17999 -*) { { echo "$as_me:17999: error: unrecognized option: $1
18000 Try \`$0 --help' for more information." >&5
18001 echo "$as_me: error: unrecognized option: $1
18002 Try \`$0 --help' for more information." >&2;}
18003 { (exit 1); exit 1; }; } ;;
18005 *) ac_config_targets="$ac_config_targets $1" ;;
18014 ## ----------------------- ##
18015 ## Running config.status. ##
18016 ## ----------------------- ##
18018 This file was extended by $as_me 2.52.20210105, executed with
18019 CONFIG_FILES = $CONFIG_FILES
18020 CONFIG_HEADERS = $CONFIG_HEADERS
18021 CONFIG_LINKS = $CONFIG_LINKS
18022 CONFIG_COMMANDS = $CONFIG_COMMANDS
18023 > "$ac_cs_invocation"
18024 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18029 cat >>"$CONFIG_STATUS" <<EOF
18031 # INIT-COMMANDS section.
18034 ### Special initialization commands, used to pass information from the
18035 ### configuration-run into config.status
18038 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
18039 DFT_LWR_MODEL="$DFT_LWR_MODEL"
18040 LIB_NAME="$LIB_NAME"
18041 LIB_PREFIX="$LIB_PREFIX"
18042 LIB_SUFFIX="$LIB_SUFFIX"
18044 NCURSES_MAJOR="$NCURSES_MAJOR"
18045 NCURSES_MINOR="$NCURSES_MINOR"
18046 NCURSES_PATCH="$NCURSES_PATCH"
18047 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
18048 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
18049 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
18050 cf_cv_abi_version="$cf_cv_abi_version"
18051 cf_cv_rel_version="$cf_cv_rel_version"
18052 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
18053 cf_cv_shared_soname='$cf_cv_shared_soname'
18054 cf_cv_shlib_version="$cf_cv_shlib_version"
18055 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
18056 cf_cv_system_name="$cf_cv_system_name"
18062 cat >>"$CONFIG_STATUS" <<\EOF
18063 for ac_config_target in $ac_config_targets
18065 case "$ac_config_target" in
18066 # Handling of arguments.
18067 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
18068 "src/library.gpr" ) CONFIG_FILES="$CONFIG_FILES src/library.gpr:src/library.gpr.in" ;;
18069 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
18070 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18071 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18072 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
18073 *) { { echo "$as_me:18073: error: invalid argument: $ac_config_target" >&5
18074 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18075 { (exit 1); exit 1; }; };;
18079 # If the user did not use the arguments to specify the items to instantiate,
18080 # then the envvar interface is used. Set only those that are not.
18081 # We use the long form for the default assignment because of an extremely
18082 # bizarre bug on SunOS 4.1.3.
18083 if "$ac_need_defaults"; then
18084 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18085 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18086 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18089 # Create a temporary directory, and hook for its removal unless debugging.
18092 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18093 trap '{ (exit 1); exit 1; }' 1 2 13 15
18096 # Create a (secure) tmp directory for tmp files.
18099 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18100 test -n "$tmp" && test -d "$tmp"
18103 tmp=$TMPDIR/cs$$-$RANDOM
18104 (umask 077 && mkdir $tmp)
18107 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18108 { (exit 1); exit 1; }
18113 cat >>"$CONFIG_STATUS" <<EOF
18116 # CONFIG_FILES section.
18119 # No need to generate the scripts if there are no CONFIG_FILES.
18120 # This happens for instance when ./config.status config.h
18121 if test -n "\$CONFIG_FILES"; then
18122 # Protect against being on the right side of a sed subst in config.status.
18123 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18124 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18125 s,@SHELL@,$SHELL,;t t
18126 s,@exec_prefix@,$exec_prefix,;t t
18127 s,@prefix@,$prefix,;t t
18128 s,@program_transform_name@,$program_transform_name,;t t
18129 s,@bindir@,$bindir,;t t
18130 s,@sbindir@,$sbindir,;t t
18131 s,@libexecdir@,$libexecdir,;t t
18132 s,@datarootdir@,$datarootdir,;t t
18133 s,@datadir@,$datadir,;t t
18134 s,@sysconfdir@,$sysconfdir,;t t
18135 s,@sharedstatedir@,$sharedstatedir,;t t
18136 s,@localstatedir@,$localstatedir,;t t
18137 s,@runstatedir@,$runstatedir,;t t
18138 s,@libdir@,$libdir,;t t
18139 s,@includedir@,$includedir,;t t
18140 s,@oldincludedir@,$oldincludedir,;t t
18141 s,@infodir@,$infodir,;t t
18142 s,@mandir@,$mandir,;t t
18143 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18144 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18145 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18146 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18147 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18148 s,@build_alias@,$build_alias,;t t
18149 s,@host_alias@,$host_alias,;t t
18150 s,@target_alias@,$target_alias,;t t
18151 s,@ECHO_C@,$ECHO_C,;t t
18152 s,@ECHO_N@,$ECHO_N,;t t
18153 s,@ECHO_T@,$ECHO_T,;t t
18154 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18155 s,@DEFS@,$DEFS,;t t
18156 s,@LIBS@,$LIBS,;t t
18157 s,@top_builddir@,$top_builddir,;t t
18158 s,@build@,$build,;t t
18159 s,@build_cpu@,$build_cpu,;t t
18160 s,@build_vendor@,$build_vendor,;t t
18161 s,@build_os@,$build_os,;t t
18162 s,@host@,$host,;t t
18163 s,@host_cpu@,$host_cpu,;t t
18164 s,@host_vendor@,$host_vendor,;t t
18165 s,@host_os@,$host_os,;t t
18166 s,@target@,$target,;t t
18167 s,@target_cpu@,$target_cpu,;t t
18168 s,@target_vendor@,$target_vendor,;t t
18169 s,@target_os@,$target_os,;t t
18170 s,@GREP@,$GREP,;t t
18171 s,@FGREP@,$FGREP,;t t
18173 s,@CFLAGS@,$CFLAGS,;t t
18174 s,@LDFLAGS@,$LDFLAGS,;t t
18175 s,@CPPFLAGS@,$CPPFLAGS,;t t
18176 s,@ac_ct_CC@,$ac_ct_CC,;t t
18177 s,@EXEEXT@,$EXEEXT,;t t
18178 s,@OBJEXT@,$OBJEXT,;t t
18179 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18181 s,@EGREP@,$EGREP,;t t
18183 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18184 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18185 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18186 s,@LN_S@,$LN_S,;t t
18187 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
18188 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
18189 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18190 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
18191 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
18192 s,@SET_MAKE@,$SET_MAKE,;t t
18193 s,@CTAGS@,$CTAGS,;t t
18194 s,@ETAGS@,$ETAGS,;t t
18195 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18196 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18197 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
18198 s,@RANLIB@,$RANLIB,;t t
18199 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18201 s,@ac_ct_LD@,$ac_ct_LD,;t t
18203 s,@ac_ct_AR@,$ac_ct_AR,;t t
18204 s,@ARFLAGS@,$ARFLAGS,;t t
18205 s,@DESTDIR@,$DESTDIR,;t t
18206 s,@BUILD_CC@,$BUILD_CC,;t t
18207 s,@BUILD_CPP@,$BUILD_CPP,;t t
18208 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
18209 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
18210 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
18211 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
18212 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
18213 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
18214 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
18215 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
18216 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
18217 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
18218 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
18219 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
18220 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
18221 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18222 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18223 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
18224 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
18225 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
18226 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
18227 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
18228 s,@CC_G_OPT@,$CC_G_OPT,;t t
18229 s,@LD_MODEL@,$LD_MODEL,;t t
18230 s,@shlibdir@,$shlibdir,;t t
18231 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
18232 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
18233 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
18234 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
18235 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
18236 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
18237 s,@LINK_PROGS@,$LINK_PROGS,;t t
18238 s,@LINK_TESTS@,$LINK_TESTS,;t t
18239 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
18240 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
18241 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
18242 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
18243 s,@RPATH_LIST@,$RPATH_LIST,;t t
18244 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
18245 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
18246 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
18247 s,@PTHREAD@,$PTHREAD,;t t
18248 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
18249 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18250 s,@ECHO_LT@,$ECHO_LT,;t t
18251 s,@ECHO_LD@,$ECHO_LD,;t t
18252 s,@RULE_CC@,$RULE_CC,;t t
18253 s,@SHOW_CC@,$SHOW_CC,;t t
18254 s,@ECHO_CC@,$ECHO_CC,;t t
18255 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18256 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
18257 s,@ADAFLAGS@,$ADAFLAGS,;t t
18258 s,@ADA_TRACE@,$ADA_TRACE,;t t
18259 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
18260 s,@M4_exists@,$M4_exists,;t t
18261 s,@cf_ada_make@,$cf_ada_make,;t t
18262 s,@cf_ada_config@,$cf_ada_config,;t t
18263 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
18264 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
18265 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
18266 s,@cf_compile_generics@,$cf_compile_generics,;t t
18267 s,@cf_generic_objects@,$cf_generic_objects,;t t
18268 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
18269 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
18270 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
18271 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
18272 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
18273 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
18274 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
18275 s,@cf_ada_package@,$cf_ada_package,;t t
18276 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
18277 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
18278 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
18279 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
18280 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
18281 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
18282 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
18283 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
18284 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
18285 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18286 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18287 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
18288 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
18289 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
18290 s,@TEST_ARG2@,$TEST_ARG2,;t t
18291 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
18292 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
18293 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
18294 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
18295 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
18296 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
18297 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
18302 cat >>"$CONFIG_STATUS" <<\EOF
18303 # Split the substitutions into bite-sized pieces for seds with
18304 # small command number limits, like on Digital OSF/1 and HP-UX.
18305 ac_max_sed_lines=48
18306 ac_sed_frag=1 # Number of current file.
18307 ac_beg=1 # First line for current file.
18308 ac_end=$ac_max_sed_lines # Line after last line for current file.
18311 while "$ac_more_lines"; do
18312 if test "$ac_beg" -gt 1; then
18313 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18315 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18317 if test ! -s $tmp/subs.frag; then
18318 ac_more_lines=false
18320 # The purpose of the label and of the branching condition is to
18321 # speed up the sed processing (if there are no `@' at all, there
18322 # is no need to browse any of the substitutions).
18323 # These are the two extra sed commands mentioned above.
18325 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18326 # It is possible to make a multiline substitution using escaped newlines.
18327 # Ensure that we do not split the substitution between script fragments.
18329 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
18330 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
18331 if test -s $tmp/subs.next; then
18332 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
18333 if test ! -s $tmp/subs.edit; then
18334 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
18335 if test ! -s $tmp/subs.edit; then
18336 if test "$ac_beg" -gt 1; then
18337 ac_end=`expr "$ac_end" - 1`
18344 if test -z "$ac_sed_cmds"; then
18345 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18347 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18349 ac_sed_frag=`expr "$ac_sed_frag" + 1`
18351 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
18354 if test -z "$ac_sed_cmds"; then
18357 fi # test -n "$CONFIG_FILES"
18360 cat >>"$CONFIG_STATUS" <<\EOF
18361 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18362 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18364 - | *:- | *:-:* ) # input from stdin
18366 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18367 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18368 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18369 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18370 * ) ac_file_in=$ac_file.in ;;
18373 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18374 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18375 X"$ac_file" : 'X\(//\)[^/]' \| \
18376 X"$ac_file" : 'X\(//\)$' \| \
18377 X"$ac_file" : 'X\(/\)' \| \
18378 . : '\(.\)' 2>/dev/null ||
18380 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18381 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18382 /^X\(\/\/\)$/{ s//\1/; q; }
18383 /^X\(\/\).*/{ s//\1/; q; }
18385 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18386 { case "$ac_dir" in
18387 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18391 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18392 case $as_mkdir_dir in
18393 # Skip DOS drivespec
18394 ?:) as_incr_dir=$as_mkdir_dir ;;
18396 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18397 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18402 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18403 # A "../" for each directory in $ac_dir_suffix.
18404 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18406 ac_dir_suffix= ac_dots=
18411 if test -z "$ac_dots"; then
18414 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
18416 [\\/]* | ?:[\\/]* )
18417 ac_srcdir="$srcdir$ac_dir_suffix";
18418 ac_top_srcdir="$srcdir" ;;
18419 *) # Relative path.
18420 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
18421 ac_top_srcdir="$ac_dots$srcdir" ;;
18425 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18426 *) ac_INSTALL=$ac_dots$INSTALL ;;
18429 if test x"$ac_file" != x-; then
18430 { echo "$as_me:18430: creating $ac_file" >&5
18431 echo "$as_me: creating $ac_file" >&6;}
18434 # Let's still pretend it is `configure' which instantiates (i.e., don't
18435 # use $as_me), people would be surprised to read:
18436 # /* config.h. Generated automatically by config.status. */
18437 configure_input="Generated automatically from `echo $ac_file_in |
18438 sed 's,.*/,,'` by configure."
18440 # First look for the input files in the build tree, otherwise in the
18442 ac_file_inputs=`IFS=:
18443 for f in $ac_file_in; do
18445 -) echo $tmp/stdin ;;
18447 # Absolute (can't be DOS-style, as IFS=:)
18448 test -f "$f" || { { echo "$as_me:18448: error: cannot find input file: $f" >&5
18449 echo "$as_me: error: cannot find input file: $f" >&2;}
18450 { (exit 1); exit 1; }; }
18453 if test -f "$f"; then
18456 elif test -f "$srcdir/$f"; then
18461 { { echo "$as_me:18461: error: cannot find input file: $f" >&5
18462 echo "$as_me: error: cannot find input file: $f" >&2;}
18463 { (exit 1); exit 1; }; }
18466 done` || { (exit 1); exit 1; }
18468 cat >>"$CONFIG_STATUS" <<\EOF
18469 ac_warn_datarootdir=no
18470 if test x"$ac_file" != x-; then
18471 for ac_item in $ac_file_inputs
18473 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
18474 if test -n "$ac_seen"; then
18475 ac_used=`grep '@datarootdir@' "$ac_item"`
18476 if test -z "$ac_used"; then
18477 { echo "$as_me:18477: WARNING: datarootdir was used implicitly but not set:
18479 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
18481 ac_warn_datarootdir=yes
18484 ac_seen=`grep '${datarootdir}' "$ac_item"`
18485 if test -n "$ac_seen"; then
18486 { echo "$as_me:18486: WARNING: datarootdir was used explicitly but not set:
18488 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
18490 ac_warn_datarootdir=yes
18495 if test "x$ac_warn_datarootdir" = xyes; then
18496 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
18500 cat >>"$CONFIG_STATUS" <<EOF
18504 cat >>"$CONFIG_STATUS" <<\EOF
18506 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18507 s,@configure_input@,$configure_input,;t t
18508 s,@srcdir@,$ac_srcdir,;t t
18509 s,@top_srcdir@,$ac_top_srcdir,;t t
18510 s,@INSTALL@,$ac_INSTALL,;t t
18511 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18513 if test x"$ac_file" != x-; then
18514 cp "$tmp/out" "$ac_file"
18516 for ac_name in prefix exec_prefix datarootdir
18518 ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
18519 if test -n "$ac_seen"; then
18520 ac_init=`${EGREP-egrep} '[ ]*'$ac_name'[ ]*=' "$ac_file"`
18521 if test -z "$ac_init"; then
18522 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
18523 { echo "$as_me:18523: WARNING: Variable $ac_name is used but was not set:
18525 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
18530 ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
18531 ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
18532 if test -s $tmp/out; then
18533 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
18534 { echo "$as_me:18534: WARNING: Some variables may not be substituted:
18536 echo "$as_me: WARNING: Some variables may not be substituted:
18546 cat >>"$CONFIG_STATUS" <<\EOF
18549 # CONFIG_HEADER section.
18552 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18553 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18555 # ac_d sets the value in "#define NAME VALUE" lines.
18556 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18557 ac_dB='[ ].*$,\1#\2'
18560 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18561 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18562 ac_iB='\([ ]\),\1#\2define\3'
18565 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18566 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18567 ac_uB='$,\1#\2define\3'
18571 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18572 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18574 - | *:- | *:-:* ) # input from stdin
18576 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18577 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18578 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18579 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18580 * ) ac_file_in=$ac_file.in ;;
18583 test x"$ac_file" != x- && { echo "$as_me:18583: creating $ac_file" >&5
18584 echo "$as_me: creating $ac_file" >&6;}
18586 # First look for the input files in the build tree, otherwise in the
18588 ac_file_inputs=`IFS=:
18589 for f in $ac_file_in; do
18591 -) echo $tmp/stdin ;;
18593 # Absolute (can't be DOS-style, as IFS=:)
18594 test -f "$f" || { { echo "$as_me:18594: error: cannot find input file: $f" >&5
18595 echo "$as_me: error: cannot find input file: $f" >&2;}
18596 { (exit 1); exit 1; }; }
18599 if test -f "$f"; then
18602 elif test -f "$srcdir/$f"; then
18607 { { echo "$as_me:18607: error: cannot find input file: $f" >&5
18608 echo "$as_me: error: cannot find input file: $f" >&2;}
18609 { (exit 1); exit 1; }; }
18612 done` || { (exit 1); exit 1; }
18613 # Remove the trailing spaces.
18614 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
18618 # Transform confdefs.h into a list of #define's. We won't use it as a sed
18619 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
18620 # be either 'cat' or 'sort'.
18621 cat confdefs.h | uniq >conftest.vals
18623 # Break up conftest.vals because some shells have a limit on
18624 # the size of here documents, and old seds have small limits too.
18626 rm -f conftest.tail
18627 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
18628 while grep . conftest.vals >/dev/null
18630 # Write chunks of a limited-size here document to conftest.frag.
18631 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
18632 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
18633 echo 'CEOF' >> "$CONFIG_STATUS"
18634 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
18635 rm -f conftest.vals
18636 mv conftest.tail conftest.vals
18638 rm -f conftest.vals
18640 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
18642 echo ' cat >> conftest.edit <<CEOF
18643 /@DEFS@/r conftest.frag
18646 sed -f conftest.edit $tmp/in > $tmp/out
18648 mv $tmp/out $tmp/in
18649 rm -f conftest.edit conftest.frag
18650 ' >> "$CONFIG_STATUS"
18652 cat >>"$CONFIG_STATUS" <<\EOF
18653 # Let's still pretend it is `configure' which instantiates (i.e., don't
18654 # use $as_me), people would be surprised to read:
18655 # /* config.h. Generated automatically by config.status. */
18656 if test x"$ac_file" = x-; then
18657 echo "/* Generated automatically by configure. */" >$tmp/config.h
18659 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
18661 cat $tmp/in >>$tmp/config.h
18663 if test x"$ac_file" != x-; then
18664 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
18665 { echo "$as_me:18665: $ac_file is unchanged" >&5
18666 echo "$as_me: $ac_file is unchanged" >&6;}
18668 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18669 X"$ac_file" : 'X\(//\)[^/]' \| \
18670 X"$ac_file" : 'X\(//\)$' \| \
18671 X"$ac_file" : 'X\(/\)' \| \
18672 . : '\(.\)' 2>/dev/null ||
18674 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18675 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18676 /^X\(\/\/\)$/{ s//\1/; q; }
18677 /^X\(\/\).*/{ s//\1/; q; }
18679 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18680 { case "$ac_dir" in
18681 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18685 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18686 case $as_mkdir_dir in
18687 # Skip DOS drivespec
18688 ?:) as_incr_dir=$as_mkdir_dir ;;
18690 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18691 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18698 mv "$tmp/config.h" "$ac_file"
18702 rm -f $tmp/config.h
18706 cat >>"$CONFIG_STATUS" <<\EOF
18708 # CONFIG_COMMANDS section.
18710 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
18711 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
18712 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
18716 if test -z "$USE_OLD_MAKERULES" ; then
18717 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
18724 cat >>"$CONFIG_STATUS" <<\EOF
18726 { (exit 0); exit 0; }
18728 chmod +x "$CONFIG_STATUS"
18729 ac_clean_files=$ac_clean_files_save
18731 # configure is writing to config.log, and then calls config.status.
18732 # config.status does its own redirection, appending to config.log.
18733 # Unfortunately, on DOS this fails, as config.log is still kept open
18734 # by configure, so config.status won't be able to write to it; its
18735 # output is simply discarded. So we exec the FD to /dev/null,
18736 # effectively closing config.log, so it can be properly (re)opened and
18737 # appended to by config.status. When coming back to configure, we
18738 # need to make the FD available again.
18739 if test "$no_create" != yes; then
18742 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
18744 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18745 # would make configure fail if this is the last instruction.
18746 "$ac_cs_success" || { (exit 1); exit 1; }
18748 ${MAKE:-make} preinstall