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-assertions test: turn on generation of assertion code
744 --enable-expanded test: generate functions for certain macros
745 --disable-macros test: use functions rather than macros
746 --with-trace test: add trace() function to all models of ncurses
747 --disable-gnat-projects test: disable GNAT projects even if usable
748 Ada95 Binding Options:
749 --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
750 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
751 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
752 --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
753 --with-ada-libname=XXX override default Ada library-name
755 Some influential environment variables:
756 CC C compiler command
757 CFLAGS C compiler flags
758 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
759 nonstandard directory <lib dir>
760 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
761 headers in a nonstandard directory <include dir>
764 Use these variables to override the choices made by `configure' or to help
765 it to find libraries and programs with nonstandard names/locations.
770 if test "$ac_init_help" = "recursive"; then
771 # If there are subdirs, report their specific --help.
773 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
775 # A "../" for each directory in /$ac_subdir.
776 ac_dots=`echo "$ac_subdir" |
777 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
780 .) # No --srcdir option. We are building in place.
781 ac_sub_srcdir="$srcdir" ;;
782 [\\/]* | ?:[\\/]* ) # Absolute path.
783 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
785 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
788 # Check for guested configure; otherwise get Cygnus style configure.
789 if test -f "$ac_sub_srcdir/configure.gnu"; then
791 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
792 elif test -f "$ac_sub_srcdir/configure"; then
794 $SHELL "$ac_sub_srcdir/configure" --help=recursive
795 elif test -f "$ac_sub_srcdir/configure.ac" ||
796 test -f "$ac_sub_srcdir/configure.in"; then
798 "$ac_configure" --help
800 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
806 test -n "$ac_init_help" && exit 0
807 if "$ac_init_version"; then
810 Copyright 2003-2020,2021 Thomas E. Dickey
811 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
812 Free Software Foundation, Inc.
813 This configure script is free software; the Free Software Foundation
814 gives unlimited permission to copy, distribute and modify it.
820 This file contains any messages produced by compilers while
821 running configure, to aid debugging if configure makes a mistake.
823 It was created by $as_me, which was
824 generated by GNU Autoconf 2.52.20210105. Invocation command line was
835 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
836 uname -m = `(uname -m) 2>/dev/null || echo unknown`
837 uname -r = `(uname -r) 2>/dev/null || echo unknown`
838 uname -s = `(uname -s) 2>/dev/null || echo unknown`
839 uname -v = `(uname -v) 2>/dev/null || echo unknown`
841 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
842 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
844 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
845 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
846 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
847 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
848 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
849 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
850 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
864 # Keep a trace of the command line.
865 # Strip out --no-create and --no-recursion so they do not pile up.
866 # Also quote any args containing shell meta-characters.
872 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
873 | --no-cr | --no-c) ;;
874 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
875 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
876 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
877 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
878 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
880 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
883 # Get rid of the leading space.
886 # When interrupted or exit'd, cleanup temporary files, and complete
887 # config.log. We remove comments because anyway the quotes in there
888 # would cause problems or look ugly.
890 # Save into config.log some information that might help in debugging.
892 echo "## ----------------- ##" >&5
893 echo "## Cache variables. ##" >&5
894 echo "## ----------------- ##" >&5
896 # The following way of writing the cache mishandles newlines in values,
899 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
902 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
903 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
907 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
911 sed "/^$/d" confdefs.h >conftest.log
912 if test -s conftest.log; then
914 echo "## ------------ ##" >&5
915 echo "## confdefs.h. ##" >&5
916 echo "## ------------ ##" >&5
921 test "$ac_signal" != 0 &&
922 echo "$as_me: caught signal $ac_signal" >&5
923 echo "$as_me: exit $exit_status" >&5
924 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
927 for ac_signal in 1 2 13 15; do
928 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
932 # confdefs.h avoids OS command line length limits that DEFS can exceed.
933 rm -rf conftest* confdefs.h
934 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
937 # Let the site file select an alternate cache file if it wants to.
938 # Prefer explicitly selected file to automatically selected ones.
939 if test -z "$CONFIG_SITE"; then
940 if test "x$prefix" != xNONE; then
941 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
943 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
946 for ac_site_file in $CONFIG_SITE; do
947 if test -r "$ac_site_file"; then
948 { echo "$as_me:948: loading site script $ac_site_file" >&5
949 echo "$as_me: loading site script $ac_site_file" >&6;}
950 cat "$ac_site_file" >&5
955 if test -r "$cache_file"; then
956 # Some versions of bash will fail to source /dev/null (special
957 # files actually), so we avoid doing that.
958 if test -f "$cache_file"; then
959 { echo "$as_me:959: loading cache $cache_file" >&5
960 echo "$as_me: loading cache $cache_file" >&6;}
962 [\\/]* | ?:[\\/]* ) . $cache_file;;
967 { echo "$as_me:967: creating cache $cache_file" >&5
968 echo "$as_me: creating cache $cache_file" >&6;}
972 # Check that the precious variables saved in the cache have kept the same
974 ac_cache_corrupted=false
975 for ac_var in `(set) 2>&1 |
976 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
977 eval ac_old_set=\$ac_cv_env_${ac_var}_set
978 eval ac_new_set=\$ac_env_${ac_var}_set
979 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
980 eval ac_new_val="\$ac_env_${ac_var}_value"
981 case "$ac_old_set,$ac_new_set" in
983 { echo "$as_me:983: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
984 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
985 ac_cache_corrupted=: ;;
987 { echo "$as_me:987: error: \`$ac_var' was not set in the previous run" >&5
988 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
989 ac_cache_corrupted=: ;;
992 if test "x$ac_old_val" != "x$ac_new_val"; then
993 { echo "$as_me:993: error: \`$ac_var' has changed since the previous run:" >&5
994 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
995 { echo "$as_me:995: former value: $ac_old_val" >&5
996 echo "$as_me: former value: $ac_old_val" >&2;}
997 { echo "$as_me:997: current value: $ac_new_val" >&5
998 echo "$as_me: current value: $ac_new_val" >&2;}
1002 # Pass precious variables to config.status. It doesn't matter if
1003 # we pass some twice (in addition to the command line arguments).
1004 if test "$ac_new_set" = set; then
1005 case "$ac_new_val" in
1006 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1007 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1008 ac_configure_args="$ac_configure_args '$ac_arg'"
1010 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1015 if "$ac_cache_corrupted"; then
1016 { echo "$as_me:1016: error: changes in the environment can compromise the build" >&5
1017 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1018 { { echo "$as_me:1018: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1019 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1020 { (exit 1); exit 1; }; }
1024 ac_cpp='$CPP $CPPFLAGS'
1025 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1026 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1027 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1028 ac_main_return="return"
1030 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1032 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1044 echo "#! $SHELL" >conftest.sh
1045 echo "exit 0" >>conftest.sh
1046 chmod +x conftest.sh
1047 if { (echo "$as_me:1047: PATH=\".;.\"; conftest.sh") >&5
1048 (PATH=".;."; conftest.sh) 2>&5
1050 echo "$as_me:1050: \$? = $ac_status" >&5
1051 (exit "$ac_status"); }; then
1052 ac_path_separator=';'
1056 PATH_SEPARATOR="$ac_path_separator"
1059 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1064 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1065 if test -f "$ac_dir/install-sh"; then
1067 ac_install_sh="$ac_aux_dir/install-sh -c"
1069 elif test -f "$ac_dir/install.sh"; then
1071 ac_install_sh="$ac_aux_dir/install.sh -c"
1073 elif test -f "$ac_dir/shtool"; then
1075 ac_install_sh="$ac_aux_dir/shtool install -c"
1079 if test -z "$ac_aux_dir"; then
1080 { { echo "$as_me:1080: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1081 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1082 { (exit 1); exit 1; }; }
1084 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1085 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1086 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1088 # Make sure we can run config.sub.
1089 $ac_config_sub sun4 >/dev/null 2>&1 ||
1090 { { echo "$as_me:1090: error: cannot run $ac_config_sub" >&5
1091 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1092 { (exit 1); exit 1; }; }
1094 echo "$as_me:1094: checking build system type" >&5
1095 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1096 if test "${ac_cv_build+set}" = set; then
1097 echo $ECHO_N "(cached) $ECHO_C" >&6
1099 ac_cv_build_alias=$build_alias
1100 test -z "$ac_cv_build_alias" &&
1101 ac_cv_build_alias=`$ac_config_guess`
1102 test -z "$ac_cv_build_alias" &&
1103 { { echo "$as_me:1103: error: cannot guess build type; you must specify one" >&5
1104 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1105 { (exit 1); exit 1; }; }
1106 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1107 { { echo "$as_me:1107: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1108 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1109 { (exit 1); exit 1; }; }
1112 echo "$as_me:1112: result: $ac_cv_build" >&5
1113 echo "${ECHO_T}$ac_cv_build" >&6
1115 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1116 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1117 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1119 echo "$as_me:1119: checking host system type" >&5
1120 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1121 if test "${ac_cv_host+set}" = set; then
1122 echo $ECHO_N "(cached) $ECHO_C" >&6
1124 ac_cv_host_alias=$host_alias
1125 test -z "$ac_cv_host_alias" &&
1126 ac_cv_host_alias=$ac_cv_build_alias
1127 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1128 { { echo "$as_me:1128: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1129 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1130 { (exit 1); exit 1; }; }
1133 echo "$as_me:1133: result: $ac_cv_host" >&5
1134 echo "${ECHO_T}$ac_cv_host" >&6
1136 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1137 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1138 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1140 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1141 echo "$as_me:1141: checking target system type" >&5
1142 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1143 if test "${ac_cv_target+set}" = set; then
1144 echo $ECHO_N "(cached) $ECHO_C" >&6
1146 ac_cv_target_alias=$target_alias
1147 test "x$ac_cv_target_alias" = "x" &&
1148 ac_cv_target_alias=$ac_cv_host_alias
1149 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1150 { { echo "$as_me:1150: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1151 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1152 { (exit 1); exit 1; }; }
1155 echo "$as_me:1155: result: $ac_cv_target" >&5
1156 echo "${ECHO_T}$ac_cv_target" >&6
1157 target=$ac_cv_target
1158 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1159 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1160 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1162 # The aliases save the names the user supplied, while $host etc.
1163 # will get canonicalized.
1164 test -n "$target_alias" &&
1165 test "$program_prefix$program_suffix$program_transform_name" = \
1167 program_prefix=${target_alias}-
1168 system_name="$host_os"
1170 system_name="`(uname -s -r) 2>/dev/null`"
1171 if test -z "$system_name" ; then
1172 system_name="`(hostname) 2>/dev/null`"
1175 test -n "$system_name" &&
1176 cat >>confdefs.h <<EOF
1177 #define SYSTEM_NAME "$system_name"
1180 if test "${cf_cv_system_name+set}" = set; then
1181 echo $ECHO_N "(cached) $ECHO_C" >&6
1183 cf_cv_system_name="$system_name"
1186 test -z "$system_name" && system_name="$cf_cv_system_name"
1187 test -n "$cf_cv_system_name" && echo "$as_me:1187: result: Configuring for $cf_cv_system_name" >&5
1188 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1190 if test ".$system_name" != ".$cf_cv_system_name" ; then
1191 echo "$as_me:1191: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1192 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1193 { { echo "$as_me:1193: error: \"Please remove config.cache and try again.\"" >&5
1194 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1195 { (exit 1); exit 1; }; }
1198 # Check whether --with-system-type or --without-system-type was given.
1199 if test "${with_system_type+set}" = set; then
1200 withval="$with_system_type"
1201 { echo "$as_me:1201: WARNING: overriding system type to $withval" >&5
1202 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1203 cf_cv_system_name=$withval
1208 ### Save the given $CFLAGS to allow user-override.
1209 cf_user_CFLAGS="$CFLAGS"
1211 ### Default install-location
1212 for ac_prog in ggrep grep
1214 # Extract the first word of "$ac_prog", so it can be a program name with args.
1215 set dummy $ac_prog; ac_word=$2
1216 echo "$as_me:1216: checking for $ac_word" >&5
1217 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1218 if test "${ac_cv_prog_GREP+set}" = set; then
1219 echo $ECHO_N "(cached) $ECHO_C" >&6
1221 if test -n "$GREP"; then
1222 ac_cv_prog_GREP="$GREP" # Let the user override the test.
1224 ac_save_IFS=$IFS; IFS=$ac_path_separator
1226 for ac_dir in $ac_dummy; do
1228 test -z "$ac_dir" && ac_dir=.
1229 $as_executable_p "$ac_dir/$ac_word" || continue
1230 ac_cv_prog_GREP="$ac_prog"
1231 echo "$as_me:1231: found $ac_dir/$ac_word" >&5
1237 GREP=$ac_cv_prog_GREP
1238 if test -n "$GREP"; then
1239 echo "$as_me:1239: result: $GREP" >&5
1240 echo "${ECHO_T}$GREP" >&6
1242 echo "$as_me:1242: result: no" >&5
1243 echo "${ECHO_T}no" >&6
1246 test -n "$GREP" && break
1248 test -n "$GREP" || GREP=": "
1250 echo "$as_me:1250: checking for fgrep" >&5
1251 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1252 if test "${ac_cv_path_FGREP+set}" = set; then
1253 echo $ECHO_N "(cached) $ECHO_C" >&6
1255 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1256 then ac_cv_path_FGREP="$GREP -F"
1258 for ac_prog in gfgrep fgrep
1260 # Extract the first word of "$ac_prog", so it can be a program name with args.
1261 set dummy $ac_prog; ac_word=$2
1262 echo "$as_me:1262: checking for $ac_word" >&5
1263 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1264 if test "${ac_cv_path_FGREP+set}" = set; then
1265 echo $ECHO_N "(cached) $ECHO_C" >&6
1269 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1272 ac_save_IFS=$IFS; IFS=$ac_path_separator
1274 for ac_dir in $ac_dummy; do
1276 test -z "$ac_dir" && ac_dir=.
1277 if $as_executable_p "$ac_dir/$ac_word"; then
1278 ac_cv_path_FGREP="$ac_dir/$ac_word"
1279 echo "$as_me:1279: found $ac_dir/$ac_word" >&5
1287 FGREP=$ac_cv_path_FGREP
1289 if test -n "$FGREP"; then
1290 echo "$as_me:1290: result: $FGREP" >&5
1291 echo "${ECHO_T}$FGREP" >&6
1293 echo "$as_me:1293: result: no" >&5
1294 echo "${ECHO_T}no" >&6
1297 test -n "$FGREP" && break
1299 test -n "$FGREP" || FGREP=": "
1301 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1301: error: cannot find workable fgrep" >&5
1302 echo "$as_me: error: cannot find workable fgrep" >&2;}
1303 { (exit 1); exit 1; }; }
1306 echo "$as_me:1306: result: $ac_cv_path_FGREP" >&5
1307 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1308 FGREP="$ac_cv_path_FGREP"
1310 echo "$as_me:1310: checking for prefix" >&5
1311 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1312 if test "x$prefix" = "xNONE" ; then
1313 case "$cf_cv_system_name" in
1314 # non-vendor systems don't have a conflict
1315 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1318 (*) prefix=$ac_default_prefix
1322 echo "$as_me:1322: result: $prefix" >&5
1323 echo "${ECHO_T}$prefix" >&6
1325 if test "x$prefix" = "xNONE" ; then
1326 echo "$as_me:1326: checking for default include-directory" >&5
1327 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1328 test -n "$verbose" && echo 1>&6
1331 "$includedir/ncurses" \
1333 "$prefix/include/ncurses" \
1334 /usr/local/include \
1335 /usr/local/include/ncurses \
1337 /usr/include/ncurses
1339 cf_dir=`eval echo "$cf_symbol"`
1340 if test -f "$cf_dir/curses.h" ; then
1341 if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1342 includedir="$cf_symbol"
1343 test -n "$verbose" && echo $ECHO_N " found " 1>&6
1347 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1349 echo "$as_me:1349: result: $includedir" >&5
1350 echo "${ECHO_T}$includedir" >&6
1353 ### Checks for programs.
1356 ac_cpp='$CPP $CPPFLAGS'
1357 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1358 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1359 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1360 ac_main_return="return"
1361 if test -n "$ac_tool_prefix"; then
1362 for ac_prog in gnatgcc gcc cc
1364 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1365 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1366 echo "$as_me:1366: checking for $ac_word" >&5
1367 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1368 if test "${ac_cv_prog_CC+set}" = set; then
1369 echo $ECHO_N "(cached) $ECHO_C" >&6
1371 if test -n "$CC"; then
1372 ac_cv_prog_CC="$CC" # Let the user override the test.
1374 ac_save_IFS=$IFS; IFS=$ac_path_separator
1376 for ac_dir in $ac_dummy; do
1378 test -z "$ac_dir" && ac_dir=.
1379 $as_executable_p "$ac_dir/$ac_word" || continue
1380 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1381 echo "$as_me:1381: found $ac_dir/$ac_word" >&5
1388 if test -n "$CC"; then
1389 echo "$as_me:1389: result: $CC" >&5
1390 echo "${ECHO_T}$CC" >&6
1392 echo "$as_me:1392: result: no" >&5
1393 echo "${ECHO_T}no" >&6
1396 test -n "$CC" && break
1399 if test -z "$CC"; then
1401 for ac_prog in gnatgcc gcc cc
1403 # Extract the first word of "$ac_prog", so it can be a program name with args.
1404 set dummy $ac_prog; ac_word=$2
1405 echo "$as_me:1405: checking for $ac_word" >&5
1406 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1407 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1408 echo $ECHO_N "(cached) $ECHO_C" >&6
1410 if test -n "$ac_ct_CC"; then
1411 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1413 ac_save_IFS=$IFS; IFS=$ac_path_separator
1415 for ac_dir in $ac_dummy; do
1417 test -z "$ac_dir" && ac_dir=.
1418 $as_executable_p "$ac_dir/$ac_word" || continue
1419 ac_cv_prog_ac_ct_CC="$ac_prog"
1420 echo "$as_me:1420: found $ac_dir/$ac_word" >&5
1426 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1427 if test -n "$ac_ct_CC"; then
1428 echo "$as_me:1428: result: $ac_ct_CC" >&5
1429 echo "${ECHO_T}$ac_ct_CC" >&6
1431 echo "$as_me:1431: result: no" >&5
1432 echo "${ECHO_T}no" >&6
1435 test -n "$ac_ct_CC" && break
1441 test -z "$CC" && { { echo "$as_me:1441: error: no acceptable cc found in \$PATH" >&5
1442 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1443 { (exit 1); exit 1; }; }
1445 # Provide some information about the compiler.
1446 echo "$as_me:1446:" \
1447 "checking for C compiler version" >&5
1448 ac_compiler=`set X $ac_compile; echo "$2"`
1449 { (eval echo "$as_me:1449: \"$ac_compiler --version </dev/null >&5\"") >&5
1450 (eval $ac_compiler --version </dev/null >&5) 2>&5
1452 echo "$as_me:1452: \$? = $ac_status" >&5
1453 (exit "$ac_status"); }
1454 { (eval echo "$as_me:1454: \"$ac_compiler -v </dev/null >&5\"") >&5
1455 (eval $ac_compiler -v </dev/null >&5) 2>&5
1457 echo "$as_me:1457: \$? = $ac_status" >&5
1458 (exit "$ac_status"); }
1459 { (eval echo "$as_me:1459: \"$ac_compiler -V </dev/null >&5\"") >&5
1460 (eval $ac_compiler -V </dev/null >&5) 2>&5
1462 echo "$as_me:1462: \$? = $ac_status" >&5
1463 (exit "$ac_status"); }
1465 cat >"conftest.$ac_ext" <<_ACEOF
1466 #line 1466 "configure"
1467 #include "confdefs.h"
1477 ac_clean_files_save=$ac_clean_files
1478 ac_clean_files="$ac_clean_files a.out a.exe"
1479 # Try to create an executable without -o first, disregard a.out.
1480 # It will help us diagnose broken compilers, and finding out an intuition
1482 echo "$as_me:1482: checking for C compiler default output" >&5
1483 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1484 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1485 if { (eval echo "$as_me:1485: \"$ac_link_default\"") >&5
1486 (eval $ac_link_default) 2>&5
1488 echo "$as_me:1488: \$? = $ac_status" >&5
1489 (exit "$ac_status"); }; then
1490 # Find the output, starting from the most likely. This scheme is
1491 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1493 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1494 ls a.out conftest 2>/dev/null;
1495 ls a.* conftest.* 2>/dev/null`; do
1497 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1498 a.out ) # We found the default executable, but exeext='' is most
1501 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1502 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1509 echo "$as_me: failed program was:" >&5
1510 cat "conftest.$ac_ext" >&5
1511 { { echo "$as_me:1511: error: C compiler cannot create executables" >&5
1512 echo "$as_me: error: C compiler cannot create executables" >&2;}
1513 { (exit 77); exit 77; }; }
1516 ac_exeext=$ac_cv_exeext
1517 echo "$as_me:1517: result: $ac_file" >&5
1518 echo "${ECHO_T}$ac_file" >&6
1520 # Check the compiler produces executables we can run. If not, either
1521 # the compiler is broken, or we cross compile.
1522 echo "$as_me:1522: checking whether the C compiler works" >&5
1523 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1524 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1525 # If not cross compiling, check that we can run a simple program.
1526 if test "$cross_compiling" != yes; then
1527 if { ac_try='./$ac_file'
1528 { (eval echo "$as_me:1528: \"$ac_try\"") >&5
1531 echo "$as_me:1531: \$? = $ac_status" >&5
1532 (exit "$ac_status"); }; }; then
1535 if test "$cross_compiling" = maybe; then
1538 { { echo "$as_me:1538: error: cannot run C compiled programs.
1539 If you meant to cross compile, use \`--host'." >&5
1540 echo "$as_me: error: cannot run C compiled programs.
1541 If you meant to cross compile, use \`--host'." >&2;}
1542 { (exit 1); exit 1; }; }
1546 echo "$as_me:1546: result: yes" >&5
1547 echo "${ECHO_T}yes" >&6
1549 rm -f a.out a.exe "conftest$ac_cv_exeext"
1550 ac_clean_files=$ac_clean_files_save
1551 # Check the compiler produces executables we can run. If not, either
1552 # the compiler is broken, or we cross compile.
1553 echo "$as_me:1553: checking whether we are cross compiling" >&5
1554 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1555 echo "$as_me:1555: result: $cross_compiling" >&5
1556 echo "${ECHO_T}$cross_compiling" >&6
1558 echo "$as_me:1558: checking for executable suffix" >&5
1559 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1560 if { (eval echo "$as_me:1560: \"$ac_link\"") >&5
1561 (eval $ac_link) 2>&5
1563 echo "$as_me:1563: \$? = $ac_status" >&5
1564 (exit "$ac_status"); }; then
1565 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1566 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1567 # work properly (i.e., refer to `conftest.exe'), while it won't with
1569 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1571 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1572 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1579 { { echo "$as_me:1579: error: cannot compute EXEEXT: cannot compile and link" >&5
1580 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1581 { (exit 1); exit 1; }; }
1584 rm -f "conftest$ac_cv_exeext"
1585 echo "$as_me:1585: result: $ac_cv_exeext" >&5
1586 echo "${ECHO_T}$ac_cv_exeext" >&6
1588 rm -f "conftest.$ac_ext"
1589 EXEEXT=$ac_cv_exeext
1591 echo "$as_me:1591: checking for object suffix" >&5
1592 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1593 if test "${ac_cv_objext+set}" = set; then
1594 echo $ECHO_N "(cached) $ECHO_C" >&6
1596 cat >"conftest.$ac_ext" <<_ACEOF
1597 #line 1597 "configure"
1598 #include "confdefs.h"
1608 rm -f conftest.o conftest.obj
1609 if { (eval echo "$as_me:1609: \"$ac_compile\"") >&5
1610 (eval $ac_compile) 2>&5
1612 echo "$as_me:1612: \$? = $ac_status" >&5
1613 (exit "$ac_status"); }; then
1614 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1616 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1617 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1622 echo "$as_me: failed program was:" >&5
1623 cat "conftest.$ac_ext" >&5
1624 { { echo "$as_me:1624: error: cannot compute OBJEXT: cannot compile" >&5
1625 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1626 { (exit 1); exit 1; }; }
1629 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1631 echo "$as_me:1631: result: $ac_cv_objext" >&5
1632 echo "${ECHO_T}$ac_cv_objext" >&6
1633 OBJEXT=$ac_cv_objext
1635 echo "$as_me:1635: checking whether we are using the GNU C compiler" >&5
1636 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1637 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1638 echo $ECHO_N "(cached) $ECHO_C" >&6
1640 cat >"conftest.$ac_ext" <<_ACEOF
1641 #line 1641 "configure"
1642 #include "confdefs.h"
1655 rm -f "conftest.$ac_objext"
1656 if { (eval echo "$as_me:1656: \"$ac_compile\"") >&5
1657 (eval $ac_compile) 2>&5
1659 echo "$as_me:1659: \$? = $ac_status" >&5
1660 (exit "$ac_status"); } &&
1661 { ac_try='test -s "conftest.$ac_objext"'
1662 { (eval echo "$as_me:1662: \"$ac_try\"") >&5
1665 echo "$as_me:1665: \$? = $ac_status" >&5
1666 (exit "$ac_status"); }; }; then
1669 echo "$as_me: failed program was:" >&5
1670 cat "conftest.$ac_ext" >&5
1673 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1674 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1677 echo "$as_me:1677: result: $ac_cv_c_compiler_gnu" >&5
1678 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1679 GCC=`test $ac_compiler_gnu = yes && echo yes`
1680 ac_test_CFLAGS=${CFLAGS+set}
1681 ac_save_CFLAGS=$CFLAGS
1683 echo "$as_me:1683: checking whether $CC accepts -g" >&5
1684 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1685 if test "${ac_cv_prog_cc_g+set}" = set; then
1686 echo $ECHO_N "(cached) $ECHO_C" >&6
1688 cat >"conftest.$ac_ext" <<_ACEOF
1689 #line 1689 "configure"
1690 #include "confdefs.h"
1700 rm -f "conftest.$ac_objext"
1701 if { (eval echo "$as_me:1701: \"$ac_compile\"") >&5
1702 (eval $ac_compile) 2>&5
1704 echo "$as_me:1704: \$? = $ac_status" >&5
1705 (exit "$ac_status"); } &&
1706 { ac_try='test -s "conftest.$ac_objext"'
1707 { (eval echo "$as_me:1707: \"$ac_try\"") >&5
1710 echo "$as_me:1710: \$? = $ac_status" >&5
1711 (exit "$ac_status"); }; }; then
1714 echo "$as_me: failed program was:" >&5
1715 cat "conftest.$ac_ext" >&5
1718 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1720 echo "$as_me:1720: result: $ac_cv_prog_cc_g" >&5
1721 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1722 if test "$ac_test_CFLAGS" = set; then
1723 CFLAGS=$ac_save_CFLAGS
1724 elif test $ac_cv_prog_cc_g = yes; then
1725 if test "$GCC" = yes; then
1731 if test "$GCC" = yes; then
1737 # Some people use a C++ compiler to compile C. Since we use `exit',
1738 # in C++ we need to declare it. In case someone uses the same compiler
1739 # for both compiling C and C++ we need to have the C++ compiler decide
1740 # the declaration of exit, since it's the most demanding environment.
1741 cat >"conftest.$ac_ext" <<_ACEOF
1746 rm -f "conftest.$ac_objext"
1747 if { (eval echo "$as_me:1747: \"$ac_compile\"") >&5
1748 (eval $ac_compile) 2>&5
1750 echo "$as_me:1750: \$? = $ac_status" >&5
1751 (exit "$ac_status"); } &&
1752 { ac_try='test -s "conftest.$ac_objext"'
1753 { (eval echo "$as_me:1753: \"$ac_try\"") >&5
1756 echo "$as_me:1756: \$? = $ac_status" >&5
1757 (exit "$ac_status"); }; }; then
1758 for ac_declaration in \
1760 '#include <stdlib.h>' \
1761 'extern "C" void std::exit (int) throw (); using std::exit;' \
1762 'extern "C" void std::exit (int); using std::exit;' \
1763 'extern "C" void exit (int) throw ();' \
1764 'extern "C" void exit (int);' \
1767 cat >"conftest.$ac_ext" <<_ACEOF
1768 #line 1768 "configure"
1769 #include "confdefs.h"
1780 rm -f "conftest.$ac_objext"
1781 if { (eval echo "$as_me:1781: \"$ac_compile\"") >&5
1782 (eval $ac_compile) 2>&5
1784 echo "$as_me:1784: \$? = $ac_status" >&5
1785 (exit "$ac_status"); } &&
1786 { ac_try='test -s "conftest.$ac_objext"'
1787 { (eval echo "$as_me:1787: \"$ac_try\"") >&5
1790 echo "$as_me:1790: \$? = $ac_status" >&5
1791 (exit "$ac_status"); }; }; then
1794 echo "$as_me: failed program was:" >&5
1795 cat "conftest.$ac_ext" >&5
1798 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1799 cat >"conftest.$ac_ext" <<_ACEOF
1800 #line 1800 "configure"
1801 #include "confdefs.h"
1811 rm -f "conftest.$ac_objext"
1812 if { (eval echo "$as_me:1812: \"$ac_compile\"") >&5
1813 (eval $ac_compile) 2>&5
1815 echo "$as_me:1815: \$? = $ac_status" >&5
1816 (exit "$ac_status"); } &&
1817 { ac_try='test -s "conftest.$ac_objext"'
1818 { (eval echo "$as_me:1818: \"$ac_try\"") >&5
1821 echo "$as_me:1821: \$? = $ac_status" >&5
1822 (exit "$ac_status"); }; }; then
1825 echo "$as_me: failed program was:" >&5
1826 cat "conftest.$ac_ext" >&5
1828 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1831 if test -n "$ac_declaration"; then
1832 echo '#ifdef __cplusplus' >>confdefs.h
1833 echo "$ac_declaration" >>confdefs.h
1834 echo '#endif' >>confdefs.h
1838 echo "$as_me: failed program was:" >&5
1839 cat "conftest.$ac_ext" >&5
1841 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1843 ac_cpp='$CPP $CPPFLAGS'
1844 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1845 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1846 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1847 ac_main_return="return"
1850 if test "$GCC" = yes ; then
1851 echo "$as_me:1851: checking version of $CC" >&5
1852 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1853 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.].*//'`"
1854 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1855 echo "$as_me:1855: result: $GCC_VERSION" >&5
1856 echo "${ECHO_T}$GCC_VERSION" >&6
1861 if test "$GCC" = yes ; then
1864 echo "$as_me:1864: checking if this is really Intel C compiler" >&5
1865 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1866 cf_save_CFLAGS="$CFLAGS"
1867 CFLAGS="$CFLAGS -no-gcc"
1868 cat >"conftest.$ac_ext" <<_ACEOF
1869 #line 1869 "configure"
1870 #include "confdefs.h"
1876 #ifdef __INTEL_COMPILER
1885 rm -f "conftest.$ac_objext"
1886 if { (eval echo "$as_me:1886: \"$ac_compile\"") >&5
1887 (eval $ac_compile) 2>&5
1889 echo "$as_me:1889: \$? = $ac_status" >&5
1890 (exit "$ac_status"); } &&
1891 { ac_try='test -s "conftest.$ac_objext"'
1892 { (eval echo "$as_me:1892: \"$ac_try\"") >&5
1895 echo "$as_me:1895: \$? = $ac_status" >&5
1896 (exit "$ac_status"); }; }; then
1898 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1901 echo "$as_me: failed program was:" >&5
1902 cat "conftest.$ac_ext" >&5
1904 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1905 CFLAGS="$cf_save_CFLAGS"
1906 echo "$as_me:1906: result: $INTEL_COMPILER" >&5
1907 echo "${ECHO_T}$INTEL_COMPILER" >&6
1914 if test "$GCC" = yes ; then
1915 echo "$as_me:1915: checking if this is really Clang C compiler" >&5
1916 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1917 cf_save_CFLAGS="$CFLAGS"
1918 cat >"conftest.$ac_ext" <<_ACEOF
1919 #line 1919 "configure"
1920 #include "confdefs.h"
1935 rm -f "conftest.$ac_objext"
1936 if { (eval echo "$as_me:1936: \"$ac_compile\"") >&5
1937 (eval $ac_compile) 2>&5
1939 echo "$as_me:1939: \$? = $ac_status" >&5
1940 (exit "$ac_status"); } &&
1941 { ac_try='test -s "conftest.$ac_objext"'
1942 { (eval echo "$as_me:1942: \"$ac_try\"") >&5
1945 echo "$as_me:1945: \$? = $ac_status" >&5
1946 (exit "$ac_status"); }; }; then
1950 echo "$as_me: failed program was:" >&5
1951 cat "conftest.$ac_ext" >&5
1953 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1954 CFLAGS="$cf_save_CFLAGS"
1955 echo "$as_me:1955: result: $CLANG_COMPILER" >&5
1956 echo "${ECHO_T}$CLANG_COMPILER" >&6
1961 if test "x$CLANG_COMPILER" = "xyes" ; then
1963 (c[1-9][0-9]|*/c[1-9][0-9])
1964 { echo "$as_me:1964: WARNING: replacing broken compiler alias $CC" >&5
1965 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
1966 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
1971 echo "$as_me:1971: checking version of $CC" >&5
1972 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1973 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.].*//'`"
1974 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
1975 echo "$as_me:1975: result: $CLANG_VERSION" >&5
1976 echo "${ECHO_T}$CLANG_VERSION" >&6
1978 for cf_clang_opt in \
1979 -Qunused-arguments \
1980 -Wno-error=implicit-function-declaration
1982 echo "$as_me:1982: checking if option $cf_clang_opt works" >&5
1983 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
1984 cf_save_CFLAGS="$CFLAGS"
1985 CFLAGS="$CFLAGS $cf_clang_opt"
1986 cat >"conftest.$ac_ext" <<_ACEOF
1987 #line 1987 "configure"
1988 #include "confdefs.h"
1995 printf("hello!\\n");
2000 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2001 if { (eval echo "$as_me:2001: \"$ac_link\"") >&5
2002 (eval $ac_link) 2>&5
2004 echo "$as_me:2004: \$? = $ac_status" >&5
2005 (exit "$ac_status"); } &&
2006 { ac_try='test -s "conftest$ac_exeext"'
2007 { (eval echo "$as_me:2007: \"$ac_try\"") >&5
2010 echo "$as_me:2010: \$? = $ac_status" >&5
2011 (exit "$ac_status"); }; }; then
2015 echo "$as_me: failed program was:" >&5
2016 cat "conftest.$ac_ext" >&5
2020 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2021 echo "$as_me:2021: result: $cf_clang_optok" >&5
2022 echo "${ECHO_T}$cf_clang_optok" >&6
2023 CFLAGS="$cf_save_CFLAGS"
2024 if test "$cf_clang_optok" = yes; then
2025 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2027 echo "${as_me:-configure}:2027: testing adding option $cf_clang_opt ..." 1>&5
2029 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2030 CFLAGS="${CFLAGS}$cf_clang_opt"
2036 echo "$as_me:2036: checking for $CC option to accept ANSI C" >&5
2037 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2038 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2039 echo $ECHO_N "(cached) $ECHO_C" >&6
2041 ac_cv_prog_cc_stdc=no
2043 cat >"conftest.$ac_ext" <<_ACEOF
2044 #line 2044 "configure"
2045 #include "confdefs.h"
2048 #include <sys/types.h>
2049 #include <sys/stat.h>
2050 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2051 struct buf { int x; };
2052 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2053 static char *e (p, i)
2059 static char *f (char * (*g) (char **, int), char **p, ...)
2064 s = g (p, va_arg (v,int));
2068 int test (int i, double x);
2069 struct s1 {int (*f) (int a);};
2070 struct s2 {int (*f) (double a);};
2071 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2077 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2082 # Don't try gcc -ansi; that turns off useful extensions and
2083 # breaks some systems' header files.
2084 # AIX -qlanglvl=ansi
2085 # Ultrix and OSF/1 -std1
2086 # HP-UX 10.20 and later -Ae
2087 # HP-UX older versions -Aa -D_HPUX_SOURCE
2088 # SVR4 -Xc -D__EXTENSIONS__
2089 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2091 CC="$ac_save_CC $ac_arg"
2092 rm -f "conftest.$ac_objext"
2093 if { (eval echo "$as_me:2093: \"$ac_compile\"") >&5
2094 (eval $ac_compile) 2>&5
2096 echo "$as_me:2096: \$? = $ac_status" >&5
2097 (exit "$ac_status"); } &&
2098 { ac_try='test -s "conftest.$ac_objext"'
2099 { (eval echo "$as_me:2099: \"$ac_try\"") >&5
2102 echo "$as_me:2102: \$? = $ac_status" >&5
2103 (exit "$ac_status"); }; }; then
2104 ac_cv_prog_cc_stdc=$ac_arg
2107 echo "$as_me: failed program was:" >&5
2108 cat "conftest.$ac_ext" >&5
2110 rm -f "conftest.$ac_objext"
2112 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2117 case "x$ac_cv_prog_cc_stdc" in
2119 echo "$as_me:2119: result: none needed" >&5
2120 echo "${ECHO_T}none needed" >&6 ;;
2122 echo "$as_me:2122: result: $ac_cv_prog_cc_stdc" >&5
2123 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2124 CC="$CC $ac_cv_prog_cc_stdc" ;;
2127 # This should have been defined by AC_PROG_CC
2130 echo "$as_me:2130: checking \$CFLAGS variable" >&5
2131 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2134 echo "$as_me:2134: result: broken" >&5
2135 echo "${ECHO_T}broken" >&6
2136 { echo "$as_me:2136: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2137 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2140 for cf_arg in $cf_flags
2146 cf_new_extra_cppflags=
2148 for cf_add_cflags in $cf_arg
2150 case "$cf_fix_cppflags" in
2152 case "$cf_add_cflags" in
2153 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2154 case "$cf_add_cflags" in
2156 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2158 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2159 && test -z "${cf_tst_cflags}" \
2160 && cf_fix_cppflags=yes
2162 if test "$cf_fix_cppflags" = yes ; then
2164 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2165 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2168 elif test "${cf_tst_cflags}" = "\"'" ; then
2170 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2171 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2181 case "$cf_add_cflags" in
2183 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2185 CPPFLAGS=`echo "$CPPFLAGS" | \
2186 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2187 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2192 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2193 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2200 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2201 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2208 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2209 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2211 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2213 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2214 && test -z "${cf_tst_cflags}" \
2215 && cf_fix_cppflags=no
2220 if test -n "$cf_new_cflags" ; then
2222 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2223 CFLAGS="${CFLAGS}$cf_new_cflags"
2227 if test -n "$cf_new_cppflags" ; then
2229 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2230 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2234 if test -n "$cf_new_extra_cppflags" ; then
2236 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2237 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2244 echo "$as_me:2244: result: ok" >&5
2245 echo "${ECHO_T}ok" >&6
2249 echo "$as_me:2249: checking \$CC variable" >&5
2250 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2253 echo "$as_me:2253: result: broken" >&5
2254 echo "${ECHO_T}broken" >&6
2255 { echo "$as_me:2255: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2256 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2258 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2259 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2261 for cf_arg in $cf_flags
2269 cf_new_extra_cppflags=
2271 for cf_add_cflags in $cf_arg
2273 case "$cf_fix_cppflags" in
2275 case "$cf_add_cflags" in
2276 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2277 case "$cf_add_cflags" in
2279 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2281 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2282 && test -z "${cf_tst_cflags}" \
2283 && cf_fix_cppflags=yes
2285 if test "$cf_fix_cppflags" = yes ; then
2287 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2288 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2291 elif test "${cf_tst_cflags}" = "\"'" ; then
2293 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2294 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2304 case "$cf_add_cflags" in
2306 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2308 CPPFLAGS=`echo "$CPPFLAGS" | \
2309 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2310 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2315 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2316 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2323 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2324 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2331 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2332 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2334 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2336 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2337 && test -z "${cf_tst_cflags}" \
2338 && cf_fix_cppflags=no
2343 if test -n "$cf_new_cflags" ; then
2345 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2346 CFLAGS="${CFLAGS}$cf_new_cflags"
2350 if test -n "$cf_new_cppflags" ; then
2352 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2353 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2357 if test -n "$cf_new_extra_cppflags" ; then
2359 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2360 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2370 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2372 echo "${as_me:-configure}:2372: testing resulting CC: '$CC' ..." 1>&5
2374 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2376 echo "${as_me:-configure}:2376: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2378 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2380 echo "${as_me:-configure}:2380: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2384 echo "$as_me:2384: result: ok" >&5
2385 echo "${ECHO_T}ok" >&6
2389 echo "$as_me:2389: checking for egrep" >&5
2390 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2391 if test "${ac_cv_path_EGREP+set}" = set; then
2392 echo $ECHO_N "(cached) $ECHO_C" >&6
2394 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2395 then ac_cv_path_EGREP="$GREP -E"
2397 for ac_prog in gegrep egrep
2399 # Extract the first word of "$ac_prog", so it can be a program name with args.
2400 set dummy $ac_prog; ac_word=$2
2401 echo "$as_me:2401: checking for $ac_word" >&5
2402 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2403 if test "${ac_cv_path_EGREP+set}" = set; then
2404 echo $ECHO_N "(cached) $ECHO_C" >&6
2408 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2411 ac_save_IFS=$IFS; IFS=$ac_path_separator
2413 for ac_dir in $ac_dummy; do
2415 test -z "$ac_dir" && ac_dir=.
2416 if $as_executable_p "$ac_dir/$ac_word"; then
2417 ac_cv_path_EGREP="$ac_dir/$ac_word"
2418 echo "$as_me:2418: found $ac_dir/$ac_word" >&5
2426 EGREP=$ac_cv_path_EGREP
2428 if test -n "$EGREP"; then
2429 echo "$as_me:2429: result: $EGREP" >&5
2430 echo "${ECHO_T}$EGREP" >&6
2432 echo "$as_me:2432: result: no" >&5
2433 echo "${ECHO_T}no" >&6
2436 test -n "$EGREP" && break
2438 test -n "$EGREP" || EGREP=": "
2440 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2440: error: cannot find workable egrep" >&5
2441 echo "$as_me: error: cannot find workable egrep" >&2;}
2442 { (exit 1); exit 1; }; }
2445 echo "$as_me:2445: result: $ac_cv_path_EGREP" >&5
2446 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2447 EGREP="$ac_cv_path_EGREP"
2450 ac_cpp='$CPP $CPPFLAGS'
2451 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2452 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2453 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2454 ac_main_return="return"
2455 echo "$as_me:2455: checking how to run the C preprocessor" >&5
2456 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2457 # On Suns, sometimes $CPP names a directory.
2458 if test -n "$CPP" && test -d "$CPP"; then
2461 if test -z "$CPP"; then
2462 if test "${ac_cv_prog_CPP+set}" = set; then
2463 echo $ECHO_N "(cached) $ECHO_C" >&6
2465 # Double quotes because CPP needs to be expanded
2466 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2469 for ac_c_preproc_warn_flag in '' yes
2471 # Use a header file that comes with gcc, so configuring glibc
2472 # with a fresh cross-compiler works.
2473 # On the NeXT, cc -E runs the code through the compiler's parser,
2474 # not just through cpp. "Syntax error" is here to catch this case.
2475 cat >"conftest.$ac_ext" <<_ACEOF
2476 #line 2476 "configure"
2477 #include "confdefs.h"
2481 if { (eval echo "$as_me:2481: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2482 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2484 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2486 cat conftest.err >&5
2487 echo "$as_me:2487: \$? = $ac_status" >&5
2488 (exit "$ac_status"); } >/dev/null; then
2489 if test -s conftest.err; then
2490 ac_cpp_err=$ac_c_preproc_warn_flag
2497 if test -z "$ac_cpp_err"; then
2500 echo "$as_me: failed program was:" >&5
2501 cat "conftest.$ac_ext" >&5
2502 # Broken: fails on valid input.
2505 rm -f conftest.err "conftest.$ac_ext"
2507 # OK, works on sane cases. Now check whether non-existent headers
2508 # can be detected and how.
2509 cat >"conftest.$ac_ext" <<_ACEOF
2510 #line 2510 "configure"
2511 #include "confdefs.h"
2512 #include <ac_nonexistent.h>
2514 if { (eval echo "$as_me:2514: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2515 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2517 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2519 cat conftest.err >&5
2520 echo "$as_me:2520: \$? = $ac_status" >&5
2521 (exit "$ac_status"); } >/dev/null; then
2522 if test -s conftest.err; then
2523 ac_cpp_err=$ac_c_preproc_warn_flag
2530 if test -z "$ac_cpp_err"; then
2531 # Broken: success on invalid input.
2534 echo "$as_me: failed program was:" >&5
2535 cat "conftest.$ac_ext" >&5
2536 # Passes both tests.
2540 rm -f conftest.err "conftest.$ac_ext"
2543 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2544 rm -f conftest.err "conftest.$ac_ext"
2545 if $ac_preproc_ok; then
2557 echo "$as_me:2557: result: $CPP" >&5
2558 echo "${ECHO_T}$CPP" >&6
2560 for ac_c_preproc_warn_flag in '' yes
2562 # Use a header file that comes with gcc, so configuring glibc
2563 # with a fresh cross-compiler works.
2564 # On the NeXT, cc -E runs the code through the compiler's parser,
2565 # not just through cpp. "Syntax error" is here to catch this case.
2566 cat >"conftest.$ac_ext" <<_ACEOF
2567 #line 2567 "configure"
2568 #include "confdefs.h"
2572 if { (eval echo "$as_me:2572: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2573 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2575 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2577 cat conftest.err >&5
2578 echo "$as_me:2578: \$? = $ac_status" >&5
2579 (exit "$ac_status"); } >/dev/null; then
2580 if test -s conftest.err; then
2581 ac_cpp_err=$ac_c_preproc_warn_flag
2588 if test -z "$ac_cpp_err"; then
2591 echo "$as_me: failed program was:" >&5
2592 cat "conftest.$ac_ext" >&5
2593 # Broken: fails on valid input.
2596 rm -f conftest.err "conftest.$ac_ext"
2598 # OK, works on sane cases. Now check whether non-existent headers
2599 # can be detected and how.
2600 cat >"conftest.$ac_ext" <<_ACEOF
2601 #line 2601 "configure"
2602 #include "confdefs.h"
2603 #include <ac_nonexistent.h>
2605 if { (eval echo "$as_me:2605: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2606 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2608 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2610 cat conftest.err >&5
2611 echo "$as_me:2611: \$? = $ac_status" >&5
2612 (exit "$ac_status"); } >/dev/null; then
2613 if test -s conftest.err; then
2614 ac_cpp_err=$ac_c_preproc_warn_flag
2621 if test -z "$ac_cpp_err"; then
2622 # Broken: success on invalid input.
2625 echo "$as_me: failed program was:" >&5
2626 cat "conftest.$ac_ext" >&5
2627 # Passes both tests.
2631 rm -f conftest.err "conftest.$ac_ext"
2634 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2635 rm -f conftest.err "conftest.$ac_ext"
2636 if $ac_preproc_ok; then
2639 { { echo "$as_me:2639: error: C preprocessor \"$CPP\" fails sanity check" >&5
2640 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2641 { (exit 1); exit 1; }; }
2645 ac_cpp='$CPP $CPPFLAGS'
2646 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2647 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2648 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2649 ac_main_return="return"
2651 if test $ac_cv_c_compiler_gnu = yes; then
2652 echo "$as_me:2652: checking whether $CC needs -traditional" >&5
2653 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2654 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2655 echo $ECHO_N "(cached) $ECHO_C" >&6
2657 ac_pattern="Autoconf.*'x'"
2658 cat >"conftest.$ac_ext" <<_ACEOF
2659 #line 2659 "configure"
2660 #include "confdefs.h"
2662 int Autoconf = TIOCGETP;
2664 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2665 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2666 ac_cv_prog_gcc_traditional=yes
2668 ac_cv_prog_gcc_traditional=no
2672 if test $ac_cv_prog_gcc_traditional = no; then
2673 cat >"conftest.$ac_ext" <<_ACEOF
2674 #line 2674 "configure"
2675 #include "confdefs.h"
2677 int Autoconf = TCGETA;
2679 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2680 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2681 ac_cv_prog_gcc_traditional=yes
2687 echo "$as_me:2687: result: $ac_cv_prog_gcc_traditional" >&5
2688 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2689 if test $ac_cv_prog_gcc_traditional = yes; then
2690 CC="$CC -traditional"
2694 echo "$as_me:2694: checking whether $CC understands -c and -o together" >&5
2695 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2696 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2697 echo $ECHO_N "(cached) $ECHO_C" >&6
2700 cat > conftest.$ac_ext <<CF_EOF
2703 ${cf_cv_main_return:-return}(0);
2706 # We do the test twice because some compilers refuse to overwrite an
2707 # existing .o file with -o, though they will create one.
2708 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2709 if { (eval echo "$as_me:2709: \"$ac_try\"") >&5
2712 echo "$as_me:2712: \$? = $ac_status" >&5
2713 (exit "$ac_status"); } &&
2714 test -f conftest2.$ac_objext && { (eval echo "$as_me:2714: \"$ac_try\"") >&5
2717 echo "$as_me:2717: \$? = $ac_status" >&5
2718 (exit "$ac_status"); };
2720 eval cf_cv_prog_CC_c_o=yes
2722 eval cf_cv_prog_CC_c_o=no
2727 if test "$cf_cv_prog_CC_c_o" = yes; then
2728 echo "$as_me:2728: result: yes" >&5
2729 echo "${ECHO_T}yes" >&6
2731 echo "$as_me:2731: result: no" >&5
2732 echo "${ECHO_T}no" >&6
2735 test "$program_prefix" != NONE &&
2736 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2737 # Use a double $ so make ignores it.
2738 test "$program_suffix" != NONE &&
2739 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2740 # Double any \ or $. echo might interpret backslashes.
2741 # By default was `s,x,x', remove it if useless.
2742 cat <<\_ACEOF >conftest.sed
2743 s/[\\$]/&&/g;s/;s,x,x,$//
2745 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2748 for ac_prog in mawk gawk nawk awk
2750 # Extract the first word of "$ac_prog", so it can be a program name with args.
2751 set dummy $ac_prog; ac_word=$2
2752 echo "$as_me:2752: checking for $ac_word" >&5
2753 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2754 if test "${ac_cv_prog_AWK+set}" = set; then
2755 echo $ECHO_N "(cached) $ECHO_C" >&6
2757 if test -n "$AWK"; then
2758 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2760 ac_save_IFS=$IFS; IFS=$ac_path_separator
2762 for ac_dir in $ac_dummy; do
2764 test -z "$ac_dir" && ac_dir=.
2765 $as_executable_p "$ac_dir/$ac_word" || continue
2766 ac_cv_prog_AWK="$ac_prog"
2767 echo "$as_me:2767: found $ac_dir/$ac_word" >&5
2774 if test -n "$AWK"; then
2775 echo "$as_me:2775: result: $AWK" >&5
2776 echo "${ECHO_T}$AWK" >&6
2778 echo "$as_me:2778: result: no" >&5
2779 echo "${ECHO_T}no" >&6
2782 test -n "$AWK" && break
2785 test -z "$AWK" && { { echo "$as_me:2785: error: No awk program found" >&5
2786 echo "$as_me: error: No awk program found" >&2;}
2787 { (exit 1); exit 1; }; }
2789 echo "$as_me:2789: checking for egrep" >&5
2790 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2791 if test "${ac_cv_prog_egrep+set}" = set; then
2792 echo $ECHO_N "(cached) $ECHO_C" >&6
2794 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2795 then ac_cv_prog_egrep='grep -E'
2796 else ac_cv_prog_egrep='egrep'
2799 echo "$as_me:2799: result: $ac_cv_prog_egrep" >&5
2800 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2801 EGREP=$ac_cv_prog_egrep
2803 test -z "$EGREP" && { { echo "$as_me:2803: error: No egrep program found" >&5
2804 echo "$as_me: error: No egrep program found" >&2;}
2805 { (exit 1); exit 1; }; }
2807 # Find a good install program. We prefer a C program (faster),
2808 # so one script is as good as another. But avoid the broken or
2809 # incompatible versions:
2810 # SysV /etc/install, /usr/sbin/install
2811 # SunOS /usr/etc/install
2812 # IRIX /sbin/install
2814 # AmigaOS /C/install, which installs bootblocks on floppy discs
2815 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2816 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2817 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2818 # ./install, which can be erroneously created by make from ./install.sh.
2819 echo "$as_me:2819: checking for a BSD compatible install" >&5
2820 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2821 if test -z "$INSTALL"; then
2822 if test "${ac_cv_path_install+set}" = set; then
2823 echo $ECHO_N "(cached) $ECHO_C" >&6
2825 ac_save_IFS=$IFS; IFS=$ac_path_separator
2826 for ac_dir in $PATH; do
2828 # Account for people who put trailing slashes in PATH elements.
2830 / | ./ | .// | /cC/* \
2831 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2834 # OSF1 and SCO ODT 3.0 have their own names for install.
2835 # Don't use installbsd from OSF since it installs stuff as root
2837 for ac_prog in ginstall scoinst install; do
2838 if $as_executable_p "$ac_dir/$ac_prog"; then
2839 if test $ac_prog = install &&
2840 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2841 # AIX install. It has an incompatible calling convention.
2843 elif test $ac_prog = install &&
2844 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2845 # program-specific install script used by HP pwplus--don't use.
2848 ac_cv_path_install="$ac_dir/$ac_prog -c"
2858 if test "${ac_cv_path_install+set}" = set; then
2859 INSTALL=$ac_cv_path_install
2861 # As a last resort, use the slow shell script. We don't cache a
2862 # path for INSTALL within a source directory, because that will
2863 # break other packages using the cache if that directory is
2864 # removed, or if the path is relative.
2865 INSTALL=$ac_install_sh
2868 echo "$as_me:2868: result: $INSTALL" >&5
2869 echo "${ECHO_T}$INSTALL" >&6
2871 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2872 # It thinks the first close brace ends the variable substitution.
2873 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2875 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2877 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2879 echo "$as_me:2879: checking whether ln -s works" >&5
2880 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2882 if test "$LN_S" = "ln -s"; then
2883 echo "$as_me:2883: result: yes" >&5
2884 echo "${ECHO_T}yes" >&6
2886 echo "$as_me:2886: result: no, using $LN_S" >&5
2887 echo "${ECHO_T}no, using $LN_S" >&6
2890 echo "$as_me:2890: checking if $LN_S -f options work" >&5
2891 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2893 rm -f conf$$.src conf$$dst
2895 echo first >conf$$.src
2896 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2901 rm -f conf$$.dst conf$$src
2902 echo "$as_me:2902: result: $cf_prog_ln_sf" >&5
2903 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2905 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2907 # Find a good install program. We prefer a C program (faster),
2908 # so one script is as good as another. But avoid the broken or
2909 # incompatible versions:
2910 # SysV /etc/install, /usr/sbin/install
2911 # SunOS /usr/etc/install
2912 # IRIX /sbin/install
2914 # AmigaOS /C/install, which installs bootblocks on floppy discs
2915 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2916 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2917 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2918 # ./install, which can be erroneously created by make from ./install.sh.
2919 echo "$as_me:2919: checking for a BSD compatible install" >&5
2920 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2921 if test -z "$INSTALL"; then
2922 if test "${ac_cv_path_install+set}" = set; then
2923 echo $ECHO_N "(cached) $ECHO_C" >&6
2925 ac_save_IFS=$IFS; IFS=$ac_path_separator
2926 for ac_dir in $PATH; do
2928 # Account for people who put trailing slashes in PATH elements.
2930 / | ./ | .// | /cC/* \
2931 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2934 # OSF1 and SCO ODT 3.0 have their own names for install.
2935 # Don't use installbsd from OSF since it installs stuff as root
2937 for ac_prog in ginstall scoinst install; do
2938 if $as_executable_p "$ac_dir/$ac_prog"; then
2939 if test $ac_prog = install &&
2940 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2941 # AIX install. It has an incompatible calling convention.
2943 elif test $ac_prog = install &&
2944 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2945 # program-specific install script used by HP pwplus--don't use.
2948 ac_cv_path_install="$ac_dir/$ac_prog -c"
2958 if test "${ac_cv_path_install+set}" = set; then
2959 INSTALL=$ac_cv_path_install
2961 # As a last resort, use the slow shell script. We don't cache a
2962 # path for INSTALL within a source directory, because that will
2963 # break other packages using the cache if that directory is
2964 # removed, or if the path is relative.
2965 INSTALL=$ac_install_sh
2968 echo "$as_me:2968: result: $INSTALL" >&5
2969 echo "${ECHO_T}$INSTALL" >&6
2971 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2972 # It thinks the first close brace ends the variable substitution.
2973 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2975 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2977 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2983 cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
2984 test -z "$cf_dir" && cf_dir=.
2985 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
2989 echo "$as_me:2989: checking if you want to install stripped executables" >&5
2990 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2992 # Check whether --enable-stripping or --disable-stripping was given.
2993 if test "${enable_stripping+set}" = set; then
2994 enableval="$enable_stripping"
2995 test "$enableval" != no && enableval=yes
2996 if test "$enableval" != "yes" ; then
2999 enable_stripping=yes
3003 enable_stripping=yes
3006 echo "$as_me:3006: result: $enable_stripping" >&5
3007 echo "${ECHO_T}$enable_stripping" >&6
3009 if test "$enable_stripping" = yes
3016 : "${INSTALL:=install}"
3017 echo "$as_me:3017: checking if install accepts -p option" >&5
3018 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
3019 if test "${cf_cv_install_p+set}" = set; then
3020 echo $ECHO_N "(cached) $ECHO_C" >&6
3027 if $INSTALL -p conftest.in conftest.out 2>/dev/null
3029 if test -f conftest.out/conftest.in
3031 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
3032 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
3033 if test -s conftest.err
3048 echo "$as_me:3048: result: $cf_cv_install_p" >&5
3049 echo "${ECHO_T}$cf_cv_install_p" >&6
3051 echo "$as_me:3051: checking if install needs to be told about ownership" >&5
3052 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
3053 case `$ac_config_guess` in
3062 echo "$as_me:3062: result: $with_install_o" >&5
3063 echo "${ECHO_T}$with_install_o" >&6
3064 if test "x$with_install_o" = xyes
3066 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'`"
3071 echo "$as_me:3071: checking for long file names" >&5
3072 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3073 if test "${ac_cv_sys_long_file_names+set}" = set; then
3074 echo $ECHO_N "(cached) $ECHO_C" >&6
3076 ac_cv_sys_long_file_names=yes
3077 # Test for long file names in all the places we know might matter:
3078 # . the current directory, where building will happen
3079 # $prefix/lib where we will be installing things
3080 # $exec_prefix/lib likewise
3081 # eval it to expand exec_prefix.
3082 # $TMPDIR if set, where it might want to write temporary files
3083 # if $TMPDIR is not set:
3084 # /tmp where it might want to write temporary files
3087 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3090 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3092 for ac_dir in . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3093 test -d "$ac_dir" || continue
3094 test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3095 ac_xdir=$ac_dir/cf$$
3096 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3097 ac_tf1=$ac_xdir/conftest9012345
3098 ac_tf2=$ac_xdir/conftest9012346
3099 (echo 1 >"$ac_tf1") 2>/dev/null
3100 (echo 2 >"$ac_tf2") 2>/dev/null
3101 ac_val=`cat "$ac_tf1" 2>/dev/null`
3102 if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3103 ac_cv_sys_long_file_names=no
3104 rm -rf "$ac_xdir" 2>/dev/null
3107 rm -rf "$ac_xdir" 2>/dev/null
3110 echo "$as_me:3110: result: $ac_cv_sys_long_file_names" >&5
3111 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3112 if test "$ac_cv_sys_long_file_names" = yes; then
3114 cat >>confdefs.h <<\EOF
3115 #define HAVE_LONG_FILE_NAMES 1
3120 # if we find pkg-config, check if we should install the ".pc" files.
3122 echo "$as_me:3122: checking if you want to use pkg-config" >&5
3123 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3125 # Check whether --with-pkg-config or --without-pkg-config was given.
3126 if test "${with_pkg_config+set}" = set; then
3127 withval="$with_pkg_config"
3128 cf_pkg_config=$withval
3132 echo "$as_me:3132: result: $cf_pkg_config" >&5
3133 echo "${ECHO_T}$cf_pkg_config" >&6
3135 case "$cf_pkg_config" in
3141 if test -n "$ac_tool_prefix"; then
3142 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3143 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3144 echo "$as_me:3144: checking for $ac_word" >&5
3145 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3146 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3147 echo $ECHO_N "(cached) $ECHO_C" >&6
3151 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3154 ac_save_IFS=$IFS; IFS=$ac_path_separator
3156 for ac_dir in $ac_dummy; do
3158 test -z "$ac_dir" && ac_dir=.
3159 if $as_executable_p "$ac_dir/$ac_word"; then
3160 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3161 echo "$as_me:3161: found $ac_dir/$ac_word" >&5
3169 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3171 if test -n "$PKG_CONFIG"; then
3172 echo "$as_me:3172: result: $PKG_CONFIG" >&5
3173 echo "${ECHO_T}$PKG_CONFIG" >&6
3175 echo "$as_me:3175: result: no" >&5
3176 echo "${ECHO_T}no" >&6
3180 if test -z "$ac_cv_path_PKG_CONFIG"; then
3181 ac_pt_PKG_CONFIG=$PKG_CONFIG
3182 # Extract the first word of "pkg-config", so it can be a program name with args.
3183 set dummy pkg-config; ac_word=$2
3184 echo "$as_me:3184: checking for $ac_word" >&5
3185 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3186 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3187 echo $ECHO_N "(cached) $ECHO_C" >&6
3189 case $ac_pt_PKG_CONFIG in
3191 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3194 ac_save_IFS=$IFS; IFS=$ac_path_separator
3196 for ac_dir in $ac_dummy; do
3198 test -z "$ac_dir" && ac_dir=.
3199 if $as_executable_p "$ac_dir/$ac_word"; then
3200 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3201 echo "$as_me:3201: found $ac_dir/$ac_word" >&5
3206 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3210 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3212 if test -n "$ac_pt_PKG_CONFIG"; then
3213 echo "$as_me:3213: result: $ac_pt_PKG_CONFIG" >&5
3214 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3216 echo "$as_me:3216: result: no" >&5
3217 echo "${ECHO_T}no" >&6
3220 PKG_CONFIG=$ac_pt_PKG_CONFIG
3222 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3231 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3232 if test "$PKG_CONFIG" != none ; then
3234 if test "x$prefix" != xNONE; then
3235 cf_path_syntax="$prefix"
3237 cf_path_syntax="$ac_default_prefix"
3240 case ".$PKG_CONFIG" in
3245 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3247 (.\$\{*prefix\}*|.\$\{*dir\}*)
3248 eval PKG_CONFIG="$PKG_CONFIG"
3249 case ".$PKG_CONFIG" in
3251 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3256 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3259 { { echo "$as_me:3259: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3260 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3261 { (exit 1); exit 1; }; }
3265 elif test "x$cf_pkg_config" != xno ; then
3266 { echo "$as_me:3266: WARNING: pkg-config is not installed" >&5
3267 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3270 case "$PKG_CONFIG" in
3272 echo "$as_me:3272: checking for pkg-config library directory" >&5
3273 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3276 echo "$as_me:3276: checking for $PKG_CONFIG library directory" >&5
3277 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3281 PKG_CONFIG_LIBDIR=no
3283 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3284 if test "${with_pkg_config_libdir+set}" = set; then
3285 withval="$with_pkg_config_libdir"
3286 PKG_CONFIG_LIBDIR=$withval
3288 test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3291 case x$PKG_CONFIG_LIBDIR in
3295 # Look for the library directory using the same prefix as the executable
3296 if test "x$PKG_CONFIG" = xnone
3300 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3303 # If you don't like using the default architecture, you have to specify the
3304 # intended library directory and corresponding compiler/linker options.
3306 # This case allows for Debian's 2014-flavor of multiarch, along with the
3307 # most common variations before that point. Some other variants spell the
3308 # directory differently, e.g., "pkg-config", and put it in unusual places.
3309 # pkg-config has always been poorly standardized, which is ironic...
3310 case x`(arch) 2>/dev/null` in
3313 $cf_path/lib/*64-linux-gnu \
3321 $cf_path/lib/*-linux-gnu \
3329 test -n "$verbose" && echo " list..." 1>&6
3331 echo "${as_me:-configure}:3331: testing list... ..." 1>&5
3333 for cf_config in $cf_search_path
3335 test -n "$verbose" && echo " checking $cf_config/pkgconfig" 1>&6
3337 echo "${as_me:-configure}:3337: testing checking $cf_config/pkgconfig ..." 1>&5
3339 if test -d "$cf_config/pkgconfig"
3341 PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3342 echo "$as_me:3342: checking done" >&5
3343 echo $ECHO_N "checking done... $ECHO_C" >&6
3352 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3353 echo "$as_me:3353: result: $PKG_CONFIG_LIBDIR" >&5
3354 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3357 echo "$as_me:3357: checking if you want to build test-programs" >&5
3358 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3360 # Check whether --with-tests or --without-tests was given.
3361 if test "${with_tests+set}" = set; then
3362 withval="$with_tests"
3363 cf_with_tests=$withval
3367 echo "$as_me:3367: result: $cf_with_tests" >&5
3368 echo "${ECHO_T}$cf_with_tests" >&6
3370 echo "$as_me:3370: checking if we should assume mixed-case filenames" >&5
3371 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3373 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3374 if test "${enable_mixed_case+set}" = set; then
3375 enableval="$enable_mixed_case"
3376 enable_mixedcase=$enableval
3378 enable_mixedcase=auto
3380 echo "$as_me:3380: result: $enable_mixedcase" >&5
3381 echo "${ECHO_T}$enable_mixedcase" >&6
3382 if test "$enable_mixedcase" = "auto" ; then
3384 echo "$as_me:3384: checking if filesystem supports mixed-case filenames" >&5
3385 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3386 if test "${cf_cv_mixedcase+set}" = set; then
3387 echo $ECHO_N "(cached) $ECHO_C" >&6
3390 if test "$cross_compiling" = yes ; then
3391 case "$target_alias" in
3392 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3400 rm -f conftest CONFTEST
3402 if test -f CONFTEST ; then
3407 rm -f conftest CONFTEST
3411 echo "$as_me:3411: result: $cf_cv_mixedcase" >&5
3412 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3413 test "$cf_cv_mixedcase" = yes &&
3414 cat >>confdefs.h <<\EOF
3415 #define MIXEDCASE_FILENAMES 1
3419 cf_cv_mixedcase=$enable_mixedcase
3420 if test "$enable_mixedcase" = "yes" ; then
3421 cat >>confdefs.h <<\EOF
3422 #define MIXEDCASE_FILENAMES 1
3428 # do this after mixed-case option (tags/TAGS is not as important as tic).
3429 echo "$as_me:3429: checking whether ${MAKE-make} sets \${MAKE}" >&5
3430 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3431 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3432 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3433 echo $ECHO_N "(cached) $ECHO_C" >&6
3435 cat >conftest.make <<\EOF
3437 @echo 'ac_maketemp="${MAKE}"'
3439 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3440 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3441 if test -n "$ac_maketemp"; then
3442 eval ac_cv_prog_make_${ac_make}_set=yes
3444 eval ac_cv_prog_make_${ac_make}_set=no
3448 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3449 echo "$as_me:3449: result: yes" >&5
3450 echo "${ECHO_T}yes" >&6
3453 echo "$as_me:3453: result: no" >&5
3454 echo "${ECHO_T}no" >&6
3455 SET_MAKE="MAKE=${MAKE-make}"
3458 for ac_prog in exctags ctags
3460 # Extract the first word of "$ac_prog", so it can be a program name with args.
3461 set dummy $ac_prog; ac_word=$2
3462 echo "$as_me:3462: checking for $ac_word" >&5
3463 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3464 if test "${ac_cv_prog_CTAGS+set}" = set; then
3465 echo $ECHO_N "(cached) $ECHO_C" >&6
3467 if test -n "$CTAGS"; then
3468 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3470 ac_save_IFS=$IFS; IFS=$ac_path_separator
3472 for ac_dir in $ac_dummy; do
3474 test -z "$ac_dir" && ac_dir=.
3475 $as_executable_p "$ac_dir/$ac_word" || continue
3476 ac_cv_prog_CTAGS="$ac_prog"
3477 echo "$as_me:3477: found $ac_dir/$ac_word" >&5
3483 CTAGS=$ac_cv_prog_CTAGS
3484 if test -n "$CTAGS"; then
3485 echo "$as_me:3485: result: $CTAGS" >&5
3486 echo "${ECHO_T}$CTAGS" >&6
3488 echo "$as_me:3488: result: no" >&5
3489 echo "${ECHO_T}no" >&6
3492 test -n "$CTAGS" && break
3495 for ac_prog in exetags etags
3497 # Extract the first word of "$ac_prog", so it can be a program name with args.
3498 set dummy $ac_prog; ac_word=$2
3499 echo "$as_me:3499: checking for $ac_word" >&5
3500 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3501 if test "${ac_cv_prog_ETAGS+set}" = set; then
3502 echo $ECHO_N "(cached) $ECHO_C" >&6
3504 if test -n "$ETAGS"; then
3505 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3507 ac_save_IFS=$IFS; IFS=$ac_path_separator
3509 for ac_dir in $ac_dummy; do
3511 test -z "$ac_dir" && ac_dir=.
3512 $as_executable_p "$ac_dir/$ac_word" || continue
3513 ac_cv_prog_ETAGS="$ac_prog"
3514 echo "$as_me:3514: found $ac_dir/$ac_word" >&5
3520 ETAGS=$ac_cv_prog_ETAGS
3521 if test -n "$ETAGS"; then
3522 echo "$as_me:3522: result: $ETAGS" >&5
3523 echo "${ECHO_T}$ETAGS" >&6
3525 echo "$as_me:3525: result: no" >&5
3526 echo "${ECHO_T}no" >&6
3529 test -n "$ETAGS" && break
3532 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3533 set dummy ${CTAGS:-ctags}; ac_word=$2
3534 echo "$as_me:3534: checking for $ac_word" >&5
3535 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3536 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3537 echo $ECHO_N "(cached) $ECHO_C" >&6
3539 if test -n "$MAKE_LOWER_TAGS"; then
3540 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3542 ac_save_IFS=$IFS; IFS=$ac_path_separator
3544 for ac_dir in $ac_dummy; do
3546 test -z "$ac_dir" && ac_dir=.
3547 $as_executable_p "$ac_dir/$ac_word" || continue
3548 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3549 echo "$as_me:3549: found $ac_dir/$ac_word" >&5
3553 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3556 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3557 if test -n "$MAKE_LOWER_TAGS"; then
3558 echo "$as_me:3558: result: $MAKE_LOWER_TAGS" >&5
3559 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3561 echo "$as_me:3561: result: no" >&5
3562 echo "${ECHO_T}no" >&6
3565 if test "$cf_cv_mixedcase" = yes ; then
3566 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3567 set dummy ${ETAGS:-etags}; ac_word=$2
3568 echo "$as_me:3568: checking for $ac_word" >&5
3569 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3570 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3571 echo $ECHO_N "(cached) $ECHO_C" >&6
3573 if test -n "$MAKE_UPPER_TAGS"; then
3574 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3576 ac_save_IFS=$IFS; IFS=$ac_path_separator
3578 for ac_dir in $ac_dummy; do
3580 test -z "$ac_dir" && ac_dir=.
3581 $as_executable_p "$ac_dir/$ac_word" || continue
3582 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3583 echo "$as_me:3583: found $ac_dir/$ac_word" >&5
3587 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3590 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3591 if test -n "$MAKE_UPPER_TAGS"; then
3592 echo "$as_me:3592: result: $MAKE_UPPER_TAGS" >&5
3593 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3595 echo "$as_me:3595: result: no" >&5
3596 echo "${ECHO_T}no" >&6
3603 if test "$MAKE_UPPER_TAGS" = yes ; then
3609 if test "$MAKE_LOWER_TAGS" = yes ; then
3615 echo "$as_me:3615: checking for makeflags variable" >&5
3616 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3617 if test "${cf_cv_makeflags+set}" = set; then
3618 echo $ECHO_N "(cached) $ECHO_C" >&6
3622 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3624 cat >cf_makeflags.tmp <<CF_EOF
3627 @ echo '.$cf_option'
3629 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[ ]*$,,'`
3630 case "$cf_result" in
3632 cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
3633 case "$cf_result" in
3634 (.*CC=*) cf_cv_makeflags=
3636 (*) cf_cv_makeflags=$cf_option
3645 echo "${as_me:-configure}:3645: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3650 rm -f cf_makeflags.tmp
3653 echo "$as_me:3653: result: $cf_cv_makeflags" >&5
3654 echo "${ECHO_T}$cf_cv_makeflags" >&6
3656 if test -n "$ac_tool_prefix"; then
3657 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3658 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3659 echo "$as_me:3659: checking for $ac_word" >&5
3660 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3661 if test "${ac_cv_prog_RANLIB+set}" = set; then
3662 echo $ECHO_N "(cached) $ECHO_C" >&6
3664 if test -n "$RANLIB"; then
3665 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3667 ac_save_IFS=$IFS; IFS=$ac_path_separator
3669 for ac_dir in $ac_dummy; do
3671 test -z "$ac_dir" && ac_dir=.
3672 $as_executable_p "$ac_dir/$ac_word" || continue
3673 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3674 echo "$as_me:3674: found $ac_dir/$ac_word" >&5
3680 RANLIB=$ac_cv_prog_RANLIB
3681 if test -n "$RANLIB"; then
3682 echo "$as_me:3682: result: $RANLIB" >&5
3683 echo "${ECHO_T}$RANLIB" >&6
3685 echo "$as_me:3685: result: no" >&5
3686 echo "${ECHO_T}no" >&6
3690 if test -z "$ac_cv_prog_RANLIB"; then
3691 ac_ct_RANLIB=$RANLIB
3692 # Extract the first word of "ranlib", so it can be a program name with args.
3693 set dummy ranlib; ac_word=$2
3694 echo "$as_me:3694: checking for $ac_word" >&5
3695 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3696 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3697 echo $ECHO_N "(cached) $ECHO_C" >&6
3699 if test -n "$ac_ct_RANLIB"; then
3700 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3702 ac_save_IFS=$IFS; IFS=$ac_path_separator
3704 for ac_dir in $ac_dummy; do
3706 test -z "$ac_dir" && ac_dir=.
3707 $as_executable_p "$ac_dir/$ac_word" || continue
3708 ac_cv_prog_ac_ct_RANLIB="ranlib"
3709 echo "$as_me:3709: found $ac_dir/$ac_word" >&5
3713 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3716 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3717 if test -n "$ac_ct_RANLIB"; then
3718 echo "$as_me:3718: result: $ac_ct_RANLIB" >&5
3719 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3721 echo "$as_me:3721: result: no" >&5
3722 echo "${ECHO_T}no" >&6
3725 RANLIB=$ac_ct_RANLIB
3727 RANLIB="$ac_cv_prog_RANLIB"
3730 if test -n "$ac_tool_prefix"; then
3731 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3732 set dummy ${ac_tool_prefix}ld; ac_word=$2
3733 echo "$as_me:3733: checking for $ac_word" >&5
3734 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3735 if test "${ac_cv_prog_LD+set}" = set; then
3736 echo $ECHO_N "(cached) $ECHO_C" >&6
3738 if test -n "$LD"; then
3739 ac_cv_prog_LD="$LD" # Let the user override the test.
3741 ac_save_IFS=$IFS; IFS=$ac_path_separator
3743 for ac_dir in $ac_dummy; do
3745 test -z "$ac_dir" && ac_dir=.
3746 $as_executable_p "$ac_dir/$ac_word" || continue
3747 ac_cv_prog_LD="${ac_tool_prefix}ld"
3748 echo "$as_me:3748: found $ac_dir/$ac_word" >&5
3755 if test -n "$LD"; then
3756 echo "$as_me:3756: result: $LD" >&5
3757 echo "${ECHO_T}$LD" >&6
3759 echo "$as_me:3759: result: no" >&5
3760 echo "${ECHO_T}no" >&6
3764 if test -z "$ac_cv_prog_LD"; then
3766 # Extract the first word of "ld", so it can be a program name with args.
3767 set dummy ld; ac_word=$2
3768 echo "$as_me:3768: checking for $ac_word" >&5
3769 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3770 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3771 echo $ECHO_N "(cached) $ECHO_C" >&6
3773 if test -n "$ac_ct_LD"; then
3774 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3776 ac_save_IFS=$IFS; IFS=$ac_path_separator
3778 for ac_dir in $ac_dummy; do
3780 test -z "$ac_dir" && ac_dir=.
3781 $as_executable_p "$ac_dir/$ac_word" || continue
3782 ac_cv_prog_ac_ct_LD="ld"
3783 echo "$as_me:3783: found $ac_dir/$ac_word" >&5
3787 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3790 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3791 if test -n "$ac_ct_LD"; then
3792 echo "$as_me:3792: result: $ac_ct_LD" >&5
3793 echo "${ECHO_T}$ac_ct_LD" >&6
3795 echo "$as_me:3795: result: no" >&5
3796 echo "${ECHO_T}no" >&6
3804 if test -n "$ac_tool_prefix"; then
3805 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3806 set dummy ${ac_tool_prefix}ar; ac_word=$2
3807 echo "$as_me:3807: checking for $ac_word" >&5
3808 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3809 if test "${ac_cv_prog_AR+set}" = set; then
3810 echo $ECHO_N "(cached) $ECHO_C" >&6
3812 if test -n "$AR"; then
3813 ac_cv_prog_AR="$AR" # Let the user override the test.
3815 ac_save_IFS=$IFS; IFS=$ac_path_separator
3817 for ac_dir in $ac_dummy; do
3819 test -z "$ac_dir" && ac_dir=.
3820 $as_executable_p "$ac_dir/$ac_word" || continue
3821 ac_cv_prog_AR="${ac_tool_prefix}ar"
3822 echo "$as_me:3822: found $ac_dir/$ac_word" >&5
3829 if test -n "$AR"; then
3830 echo "$as_me:3830: result: $AR" >&5
3831 echo "${ECHO_T}$AR" >&6
3833 echo "$as_me:3833: result: no" >&5
3834 echo "${ECHO_T}no" >&6
3838 if test -z "$ac_cv_prog_AR"; then
3840 # Extract the first word of "ar", so it can be a program name with args.
3841 set dummy ar; ac_word=$2
3842 echo "$as_me:3842: checking for $ac_word" >&5
3843 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3844 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3845 echo $ECHO_N "(cached) $ECHO_C" >&6
3847 if test -n "$ac_ct_AR"; then
3848 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3850 ac_save_IFS=$IFS; IFS=$ac_path_separator
3852 for ac_dir in $ac_dummy; do
3854 test -z "$ac_dir" && ac_dir=.
3855 $as_executable_p "$ac_dir/$ac_word" || continue
3856 ac_cv_prog_ac_ct_AR="ar"
3857 echo "$as_me:3857: found $ac_dir/$ac_word" >&5
3861 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3864 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3865 if test -n "$ac_ct_AR"; then
3866 echo "$as_me:3866: result: $ac_ct_AR" >&5
3867 echo "${ECHO_T}$ac_ct_AR" >&6
3869 echo "$as_me:3869: result: no" >&5
3870 echo "${ECHO_T}no" >&6
3878 if test -n "$ac_tool_prefix"; then
3879 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3880 set dummy ${ac_tool_prefix}ar; ac_word=$2
3881 echo "$as_me:3881: checking for $ac_word" >&5
3882 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3883 if test "${ac_cv_prog_AR+set}" = set; then
3884 echo $ECHO_N "(cached) $ECHO_C" >&6
3886 if test -n "$AR"; then
3887 ac_cv_prog_AR="$AR" # Let the user override the test.
3889 ac_save_IFS=$IFS; IFS=$ac_path_separator
3891 for ac_dir in $ac_dummy; do
3893 test -z "$ac_dir" && ac_dir=.
3894 $as_executable_p "$ac_dir/$ac_word" || continue
3895 ac_cv_prog_AR="${ac_tool_prefix}ar"
3896 echo "$as_me:3896: found $ac_dir/$ac_word" >&5
3903 if test -n "$AR"; then
3904 echo "$as_me:3904: result: $AR" >&5
3905 echo "${ECHO_T}$AR" >&6
3907 echo "$as_me:3907: result: no" >&5
3908 echo "${ECHO_T}no" >&6
3912 if test -z "$ac_cv_prog_AR"; then
3914 # Extract the first word of "ar", so it can be a program name with args.
3915 set dummy ar; ac_word=$2
3916 echo "$as_me:3916: checking for $ac_word" >&5
3917 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3918 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3919 echo $ECHO_N "(cached) $ECHO_C" >&6
3921 if test -n "$ac_ct_AR"; then
3922 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3924 ac_save_IFS=$IFS; IFS=$ac_path_separator
3926 for ac_dir in $ac_dummy; do
3928 test -z "$ac_dir" && ac_dir=.
3929 $as_executable_p "$ac_dir/$ac_word" || continue
3930 ac_cv_prog_ac_ct_AR="ar"
3931 echo "$as_me:3931: found $ac_dir/$ac_word" >&5
3935 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3938 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3939 if test -n "$ac_ct_AR"; then
3940 echo "$as_me:3940: result: $ac_ct_AR" >&5
3941 echo "${ECHO_T}$ac_ct_AR" >&6
3943 echo "$as_me:3943: result: no" >&5
3944 echo "${ECHO_T}no" >&6
3952 echo "$as_me:3952: checking for options to update archives" >&5
3953 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3954 if test "${cf_cv_ar_flags+set}" = set; then
3955 echo $ECHO_N "(cached) $ECHO_C" >&6
3958 case "$cf_cv_system_name" in
3961 cat >mk_static_lib.sh <<-EOF
3966 exec \$MSVC_BIN -out:"\$out" \$@
3968 chmod +x mk_static_lib.sh
3969 AR=`pwd`/mk_static_lib.sh
3972 cf_cv_ar_flags=unknown
3973 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
3976 # check if $ARFLAGS already contains this choice
3977 if test "x$ARFLAGS" != "x" ; then
3978 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3979 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3985 rm -f "conftest.$ac_cv_objext"
3988 cat >"conftest.$ac_ext" <<EOF
3989 #line 3989 "configure"
3990 int testdata[3] = { 123, 456, 789 };
3992 if { (eval echo "$as_me:3992: \"$ac_compile\"") >&5
3993 (eval $ac_compile) 2>&5
3995 echo "$as_me:3995: \$? = $ac_status" >&5
3996 (exit "$ac_status"); } ; then
3997 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3998 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
3999 if test -f conftest.a ; then
4000 cf_cv_ar_flags="$cf_ar_flags"
4004 test -n "$verbose" && echo " cannot compile test-program" 1>&6
4006 echo "${as_me:-configure}:4006: testing cannot compile test-program ..." 1>&5
4011 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
4016 echo "$as_me:4016: result: $cf_cv_ar_flags" >&5
4017 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4019 if test -n "$ARFLAGS" ; then
4020 if test -n "$cf_cv_ar_flags" ; then
4021 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4024 ARFLAGS=$cf_cv_ar_flags
4027 echo "$as_me:4027: checking for PATH separator" >&5
4028 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4029 case "$cf_cv_system_name" in
4030 (os2*) PATH_SEPARATOR=';' ;;
4031 (*) ${PATH_SEPARATOR:=':'} ;;
4034 echo "$as_me:4034: result: $PATH_SEPARATOR" >&5
4035 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4037 echo "$as_me:4037: checking if you have specified an install-prefix" >&5
4038 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4040 # Check whether --with-install-prefix or --without-install-prefix was given.
4041 if test "${with_install_prefix+set}" = set; then
4042 withval="$with_install_prefix"
4046 (*) DESTDIR="$withval"
4050 echo "$as_me:4050: result: $DESTDIR" >&5
4051 echo "${ECHO_T}$DESTDIR" >&6
4053 ###############################################################################
4055 # If we're cross-compiling, allow the user to override the tools and their
4056 # options. The configure script is oriented toward identifying the host
4057 # compiler, etc., but we need a build compiler to generate parts of the source.
4059 if test "$cross_compiling" = yes ; then
4061 # defaults that we might want to override
4062 : ${BUILD_CFLAGS:=''}
4063 : ${BUILD_CPPFLAGS:=''}
4064 : ${BUILD_LDFLAGS:=''}
4066 : ${BUILD_EXEEXT:='$x'}
4067 : ${BUILD_OBJEXT:='o'}
4069 # Check whether --with-build-cc or --without-build-cc was given.
4070 if test "${with_build_cc+set}" = set; then
4071 withval="$with_build_cc"
4074 for ac_prog in gcc clang c99 c89 cc cl
4076 # Extract the first word of "$ac_prog", so it can be a program name with args.
4077 set dummy $ac_prog; ac_word=$2
4078 echo "$as_me:4078: checking for $ac_word" >&5
4079 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4080 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4081 echo $ECHO_N "(cached) $ECHO_C" >&6
4083 if test -n "$BUILD_CC"; then
4084 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4086 ac_save_IFS=$IFS; IFS=$ac_path_separator
4088 for ac_dir in $ac_dummy; do
4090 test -z "$ac_dir" && ac_dir=.
4091 $as_executable_p "$ac_dir/$ac_word" || continue
4092 ac_cv_prog_BUILD_CC="$ac_prog"
4093 echo "$as_me:4093: found $ac_dir/$ac_word" >&5
4099 BUILD_CC=$ac_cv_prog_BUILD_CC
4100 if test -n "$BUILD_CC"; then
4101 echo "$as_me:4101: result: $BUILD_CC" >&5
4102 echo "${ECHO_T}$BUILD_CC" >&6
4104 echo "$as_me:4104: result: no" >&5
4105 echo "${ECHO_T}no" >&6
4108 test -n "$BUILD_CC" && break
4110 test -n "$BUILD_CC" || BUILD_CC="none"
4113 echo "$as_me:4113: checking for native build C compiler" >&5
4114 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4115 echo "$as_me:4115: result: $BUILD_CC" >&5
4116 echo "${ECHO_T}$BUILD_CC" >&6
4118 echo "$as_me:4118: checking for native build C preprocessor" >&5
4119 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4121 # Check whether --with-build-cpp or --without-build-cpp was given.
4122 if test "${with_build_cpp+set}" = set; then
4123 withval="$with_build_cpp"
4124 BUILD_CPP="$withval"
4126 BUILD_CPP='${BUILD_CC} -E'
4128 echo "$as_me:4128: result: $BUILD_CPP" >&5
4129 echo "${ECHO_T}$BUILD_CPP" >&6
4131 echo "$as_me:4131: checking for native build C flags" >&5
4132 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4134 # Check whether --with-build-cflags or --without-build-cflags was given.
4135 if test "${with_build_cflags+set}" = set; then
4136 withval="$with_build_cflags"
4137 BUILD_CFLAGS="$withval"
4139 echo "$as_me:4139: result: $BUILD_CFLAGS" >&5
4140 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4142 echo "$as_me:4142: checking for native build C preprocessor-flags" >&5
4143 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4145 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4146 if test "${with_build_cppflags+set}" = set; then
4147 withval="$with_build_cppflags"
4148 BUILD_CPPFLAGS="$withval"
4150 echo "$as_me:4150: result: $BUILD_CPPFLAGS" >&5
4151 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4153 echo "$as_me:4153: checking for native build linker-flags" >&5
4154 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4156 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4157 if test "${with_build_ldflags+set}" = set; then
4158 withval="$with_build_ldflags"
4159 BUILD_LDFLAGS="$withval"
4161 echo "$as_me:4161: result: $BUILD_LDFLAGS" >&5
4162 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4164 echo "$as_me:4164: checking for native build linker-libraries" >&5
4165 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4167 # Check whether --with-build-libs or --without-build-libs was given.
4168 if test "${with_build_libs+set}" = set; then
4169 withval="$with_build_libs"
4170 BUILD_LIBS="$withval"
4172 echo "$as_me:4172: result: $BUILD_LIBS" >&5
4173 echo "${ECHO_T}$BUILD_LIBS" >&6
4175 # this assumes we're on Unix.
4179 : ${BUILD_CC:='${CC}'}
4181 if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
4182 { { echo "$as_me:4182: error: Cross-build requires two compilers.
4183 Use --with-build-cc to specify the native compiler." >&5
4184 echo "$as_me: error: Cross-build requires two compilers.
4185 Use --with-build-cc to specify the native compiler." >&2;}
4186 { (exit 1); exit 1; }; }
4190 : ${BUILD_CC:='${CC}'}
4191 : ${BUILD_CPP:='${CPP}'}
4192 : ${BUILD_CFLAGS:='${CFLAGS}'}
4193 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4194 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4195 : ${BUILD_LIBS:='${LIBS}'}
4196 : ${BUILD_EXEEXT:='$x'}
4197 : ${BUILD_OBJEXT:='o'}
4200 ###############################################################################
4202 ### Options to allow the user to specify the set of libraries which are used.
4203 ### Use "--without-normal --with-shared" to allow the default model to be
4204 ### shared, for example.
4207 echo "$as_me:4207: checking if you want to build shared C-objects" >&5
4208 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
4210 # Check whether --with-shared or --without-shared was given.
4211 if test "${with_shared+set}" = set; then
4212 withval="$with_shared"
4213 with_shared=$withval
4217 echo "$as_me:4217: result: $with_shared" >&5
4218 echo "${ECHO_T}$with_shared" >&6
4219 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4221 echo "$as_me:4221: checking for specified models" >&5
4222 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4223 test -z "$cf_list_models" && cf_list_models=normal
4224 echo "$as_me:4224: result: $cf_list_models" >&5
4225 echo "${ECHO_T}$cf_list_models" >&6
4227 ### Use the first model as the default, and save its suffix for use in building
4228 ### up test-applications.
4229 echo "$as_me:4229: checking for default model" >&5
4230 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4231 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4232 echo "$as_me:4232: result: $DFT_LWR_MODEL" >&5
4233 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4235 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4237 echo "$as_me:4237: checking for specific curses-directory" >&5
4238 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4240 # Check whether --with-curses-dir or --without-curses-dir was given.
4241 if test "${with_curses_dir+set}" = set; then
4242 withval="$with_curses_dir"
4243 cf_cv_curses_dir=$withval
4247 echo "$as_me:4247: result: $cf_cv_curses_dir" >&5
4248 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4250 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
4253 if test "x$prefix" != xNONE; then
4254 cf_path_syntax="$prefix"
4256 cf_path_syntax="$ac_default_prefix"
4264 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4266 (.\$\{*prefix\}*|.\$\{*dir\}*)
4267 eval withval="$withval"
4270 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4275 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4278 { { echo "$as_me:4278: error: expected a pathname, not \"$withval\"" >&5
4279 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4280 { (exit 1); exit 1; }; }
4284 if test -d "$cf_cv_curses_dir"
4287 if test -n "$cf_cv_curses_dir/include" ; then
4288 for cf_add_incdir in $cf_cv_curses_dir/include
4290 while test "$cf_add_incdir" != /usr/include
4292 if test -d "$cf_add_incdir"
4295 if test -n "$CFLAGS$CPPFLAGS" ; then
4296 # a loop is needed to ensure we can add subdirs of existing dirs
4297 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4298 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4299 cf_have_incdir=yes; break
4304 if test "$cf_have_incdir" = no ; then
4305 if test "$cf_add_incdir" = /usr/local/include ; then
4306 if test "$GCC" = yes
4308 cf_save_CPPFLAGS=$CPPFLAGS
4310 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4311 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4313 cat >"conftest.$ac_ext" <<_ACEOF
4314 #line 4314 "configure"
4315 #include "confdefs.h"
4325 rm -f "conftest.$ac_objext"
4326 if { (eval echo "$as_me:4326: \"$ac_compile\"") >&5
4327 (eval $ac_compile) 2>&5
4329 echo "$as_me:4329: \$? = $ac_status" >&5
4330 (exit "$ac_status"); } &&
4331 { ac_try='test -s "conftest.$ac_objext"'
4332 { (eval echo "$as_me:4332: \"$ac_try\"") >&5
4335 echo "$as_me:4335: \$? = $ac_status" >&5
4336 (exit "$ac_status"); }; }; then
4339 echo "$as_me: failed program was:" >&5
4340 cat "conftest.$ac_ext" >&5
4343 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4344 CPPFLAGS=$cf_save_CPPFLAGS
4349 if test "$cf_have_incdir" = no ; then
4350 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4352 echo "${as_me:-configure}:4352: testing adding $cf_add_incdir to include-path ..." 1>&5
4354 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4356 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
4357 test "$cf_top_incdir" = "$cf_add_incdir" && break
4358 cf_add_incdir="$cf_top_incdir"
4369 if test -n "$cf_cv_curses_dir/lib" ; then
4370 for cf_add_libdir in $cf_cv_curses_dir/lib
4372 if test "$cf_add_libdir" = /usr/lib ; then
4374 elif test -d "$cf_add_libdir"
4377 if test -n "$LDFLAGS$LIBS" ; then
4378 # a loop is needed to ensure we can add subdirs of existing dirs
4379 for cf_test_libdir in $LDFLAGS $LIBS ; do
4380 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4381 cf_have_libdir=yes; break
4385 if test "$cf_have_libdir" = no ; then
4386 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4388 echo "${as_me:-configure}:4388: testing adding $cf_add_libdir to library-path ..." 1>&5
4390 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4399 cf_ncuconfig_root=ncurses
4400 cf_have_ncuconfig=no
4402 if test "x${PKG_CONFIG:=none}" != xnone; then
4403 echo "$as_me:4403: checking pkg-config for $cf_ncuconfig_root" >&5
4404 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
4405 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
4406 echo "$as_me:4406: result: yes" >&5
4407 echo "${ECHO_T}yes" >&6
4409 echo "$as_me:4409: checking if the $cf_ncuconfig_root package files work" >&5
4410 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
4411 cf_have_ncuconfig=unknown
4413 cf_save_CFLAGS="$CFLAGS"
4414 cf_save_CPPFLAGS="$CPPFLAGS"
4415 cf_save_LIBS="$LIBS"
4417 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
4418 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
4420 # while -W for passing linker flags is prevalent, it is not "standard".
4421 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
4422 # incompatible _and_ non-standard -W option which gives an error. Work
4423 # around that pitfall.
4424 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
4430 cf_new_extra_cppflags=
4432 for cf_add_cflags in $cf_pkg_cflags
4434 case "$cf_fix_cppflags" in
4436 case "$cf_add_cflags" in
4437 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4438 case "$cf_add_cflags" in
4440 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4442 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4443 && test -z "${cf_tst_cflags}" \
4444 && cf_fix_cppflags=yes
4446 if test "$cf_fix_cppflags" = yes ; then
4448 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4449 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4452 elif test "${cf_tst_cflags}" = "\"'" ; then
4454 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4455 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4465 case "$cf_add_cflags" in
4467 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4469 CPPFLAGS=`echo "$CPPFLAGS" | \
4470 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4471 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4476 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4477 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4484 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4485 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4492 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4493 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4495 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4497 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4498 && test -z "${cf_tst_cflags}" \
4499 && cf_fix_cppflags=no
4504 if test -n "$cf_new_cflags" ; then
4506 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4507 CFLAGS="${CFLAGS}$cf_new_cflags"
4511 if test -n "$cf_new_cppflags" ; then
4513 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4514 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4518 if test -n "$cf_new_extra_cppflags" ; then
4520 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4521 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4528 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4530 for cf_add_1lib in $cf_add_0lib; do
4531 for cf_add_2lib in $cf_add_libs; do
4532 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4537 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4541 cat >"conftest.$ac_ext" <<_ACEOF
4542 #line 4542 "configure"
4543 #include "confdefs.h"
4544 #include <${cf_cv_ncurses_header:-curses.h}>
4548 initscr(); mousemask(0,0); tigetstr((char *)0);
4553 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4554 if { (eval echo "$as_me:4554: \"$ac_link\"") >&5
4555 (eval $ac_link) 2>&5
4557 echo "$as_me:4557: \$? = $ac_status" >&5
4558 (exit "$ac_status"); } &&
4559 { ac_try='test -s "conftest$ac_exeext"'
4560 { (eval echo "$as_me:4560: \"$ac_try\"") >&5
4563 echo "$as_me:4563: \$? = $ac_status" >&5
4564 (exit "$ac_status"); }; }; then
4565 if test "$cross_compiling" = yes; then
4566 cf_test_ncuconfig=maybe
4568 cat >"conftest.$ac_ext" <<_ACEOF
4569 #line 4569 "configure"
4570 #include "confdefs.h"
4571 #include <${cf_cv_ncurses_header:-curses.h}>
4573 { char *xx = curses_version(); return (xx == 0); }
4575 rm -f "conftest$ac_exeext"
4576 if { (eval echo "$as_me:4576: \"$ac_link\"") >&5
4577 (eval $ac_link) 2>&5
4579 echo "$as_me:4579: \$? = $ac_status" >&5
4580 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4581 { (eval echo "$as_me:4581: \"$ac_try\"") >&5
4584 echo "$as_me:4584: \$? = $ac_status" >&5
4585 (exit "$ac_status"); }; }; then
4586 cf_test_ncuconfig=yes
4588 echo "$as_me: program exited with status $ac_status" >&5
4589 echo "$as_me: failed program was:" >&5
4590 cat "conftest.$ac_ext" >&5
4591 cf_test_ncuconfig=no
4593 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4596 echo "$as_me: failed program was:" >&5
4597 cat "conftest.$ac_ext" >&5
4598 cf_test_ncuconfig=no
4600 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4602 CFLAGS="$cf_save_CFLAGS"
4603 CPPFLAGS="$cf_save_CPPFLAGS"
4604 LIBS="$cf_save_LIBS"
4606 if test "x$cf_test_ncuconfig" != xyes; then
4607 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4608 cf_pkg_cflags="$cf_temp"
4609 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4610 cf_pkg_libs="$cf_temp"
4618 cf_new_extra_cppflags=
4620 for cf_add_cflags in $cf_pkg_cflags
4622 case "$cf_fix_cppflags" in
4624 case "$cf_add_cflags" in
4625 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4626 case "$cf_add_cflags" in
4628 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4630 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4631 && test -z "${cf_tst_cflags}" \
4632 && cf_fix_cppflags=yes
4634 if test "$cf_fix_cppflags" = yes ; then
4636 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4637 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4640 elif test "${cf_tst_cflags}" = "\"'" ; then
4642 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4643 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4653 case "$cf_add_cflags" in
4655 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4657 CPPFLAGS=`echo "$CPPFLAGS" | \
4658 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4659 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4664 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4665 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4672 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4673 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4680 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4681 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4683 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4685 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4686 && test -z "${cf_tst_cflags}" \
4687 && cf_fix_cppflags=no
4692 if test -n "$cf_new_cflags" ; then
4694 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4695 CFLAGS="${CFLAGS}$cf_new_cflags"
4699 if test -n "$cf_new_cppflags" ; then
4701 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4702 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4706 if test -n "$cf_new_extra_cppflags" ; then
4708 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4709 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4716 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4718 for cf_add_1lib in $cf_add_0lib; do
4719 for cf_add_2lib in $cf_add_libs; do
4720 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4725 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4729 cat >"conftest.$ac_ext" <<_ACEOF
4730 #line 4730 "configure"
4731 #include "confdefs.h"
4732 #include <${cf_cv_ncurses_header:-curses.h}>
4736 initscr(); mousemask(0,0); tigetstr((char *)0);
4741 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4742 if { (eval echo "$as_me:4742: \"$ac_link\"") >&5
4743 (eval $ac_link) 2>&5
4745 echo "$as_me:4745: \$? = $ac_status" >&5
4746 (exit "$ac_status"); } &&
4747 { ac_try='test -s "conftest$ac_exeext"'
4748 { (eval echo "$as_me:4748: \"$ac_try\"") >&5
4751 echo "$as_me:4751: \$? = $ac_status" >&5
4752 (exit "$ac_status"); }; }; then
4753 if test "$cross_compiling" = yes; then
4754 cf_have_ncuconfig=maybe
4756 cat >"conftest.$ac_ext" <<_ACEOF
4757 #line 4757 "configure"
4758 #include "confdefs.h"
4759 #include <${cf_cv_ncurses_header:-curses.h}>
4761 { char *xx = curses_version(); return (xx == 0); }
4763 rm -f "conftest$ac_exeext"
4764 if { (eval echo "$as_me:4764: \"$ac_link\"") >&5
4765 (eval $ac_link) 2>&5
4767 echo "$as_me:4767: \$? = $ac_status" >&5
4768 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4769 { (eval echo "$as_me:4769: \"$ac_try\"") >&5
4772 echo "$as_me:4772: \$? = $ac_status" >&5
4773 (exit "$ac_status"); }; }; then
4774 cf_have_ncuconfig=yes
4776 echo "$as_me: program exited with status $ac_status" >&5
4777 echo "$as_me: failed program was:" >&5
4778 cat "conftest.$ac_ext" >&5
4779 cf_have_ncuconfig=no
4781 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4784 echo "$as_me: failed program was:" >&5
4785 cat "conftest.$ac_ext" >&5
4786 cf_have_ncuconfig=no
4788 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4789 echo "$as_me:4789: result: $cf_have_ncuconfig" >&5
4790 echo "${ECHO_T}$cf_have_ncuconfig" >&6
4791 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
4792 if test "$cf_have_ncuconfig" != "yes"
4794 CPPFLAGS="$cf_save_CPPFLAGS"
4795 LIBS="$cf_save_LIBS"
4796 NCURSES_CONFIG_PKG=none
4799 cat >>confdefs.h <<\EOF
4803 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
4805 echo "$as_me:4805: checking for terminfo header" >&5
4806 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4807 if test "${cf_cv_term_header+set}" = set; then
4808 echo $ECHO_N "(cached) $ECHO_C" >&6
4811 case "${cf_cv_ncurses_header}" in
4812 (*/ncurses.h|*/ncursesw.h)
4813 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4816 cf_term_header=term.h
4820 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4822 cat >"conftest.$ac_ext" <<_ACEOF
4823 #line 4823 "configure"
4824 #include "confdefs.h"
4826 #include <${cf_cv_ncurses_header:-curses.h}>
4832 int x = auto_left_margin; (void)x
4837 rm -f "conftest.$ac_objext"
4838 if { (eval echo "$as_me:4838: \"$ac_compile\"") >&5
4839 (eval $ac_compile) 2>&5
4841 echo "$as_me:4841: \$? = $ac_status" >&5
4842 (exit "$ac_status"); } &&
4843 { ac_try='test -s "conftest.$ac_objext"'
4844 { (eval echo "$as_me:4844: \"$ac_try\"") >&5
4847 echo "$as_me:4847: \$? = $ac_status" >&5
4848 (exit "$ac_status"); }; }; then
4850 cf_cv_term_header="$cf_test"
4852 echo "$as_me: failed program was:" >&5
4853 cat "conftest.$ac_ext" >&5
4855 cf_cv_term_header=unknown
4858 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4859 test "$cf_cv_term_header" != unknown && break
4863 echo "$as_me:4863: result: $cf_cv_term_header" >&5
4864 echo "${ECHO_T}$cf_cv_term_header" >&6
4866 # Set definitions to allow ifdef'ing to accommodate subdirectories
4868 case "$cf_cv_term_header" in
4871 cat >>confdefs.h <<\EOF
4872 #define HAVE_TERM_H 1
4878 case "$cf_cv_term_header" in
4881 cat >>confdefs.h <<\EOF
4882 #define HAVE_NCURSES_TERM_H 1
4888 cat >>confdefs.h <<\EOF
4889 #define HAVE_NCURSESW_TERM_H 1
4898 echo "$as_me:4898: result: no" >&5
4899 echo "${ECHO_T}no" >&6
4900 NCURSES_CONFIG_PKG=none
4903 NCURSES_CONFIG_PKG=none
4906 if test "x$cf_have_ncuconfig" = "xno"; then
4907 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
4909 if test -n "$ac_tool_prefix"; then
4910 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4912 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4913 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4914 echo "$as_me:4914: checking for $ac_word" >&5
4915 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4916 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
4917 echo $ECHO_N "(cached) $ECHO_C" >&6
4919 if test -n "$NCURSES_CONFIG"; then
4920 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
4922 ac_save_IFS=$IFS; IFS=$ac_path_separator
4924 for ac_dir in $ac_dummy; do
4926 test -z "$ac_dir" && ac_dir=.
4927 $as_executable_p "$ac_dir/$ac_word" || continue
4928 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
4929 echo "$as_me:4929: found $ac_dir/$ac_word" >&5
4935 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
4936 if test -n "$NCURSES_CONFIG"; then
4937 echo "$as_me:4937: result: $NCURSES_CONFIG" >&5
4938 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4940 echo "$as_me:4940: result: no" >&5
4941 echo "${ECHO_T}no" >&6
4944 test -n "$NCURSES_CONFIG" && break
4947 if test -z "$NCURSES_CONFIG"; then
4948 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
4949 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4951 # Extract the first word of "$ac_prog", so it can be a program name with args.
4952 set dummy $ac_prog; ac_word=$2
4953 echo "$as_me:4953: checking for $ac_word" >&5
4954 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4955 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
4956 echo $ECHO_N "(cached) $ECHO_C" >&6
4958 if test -n "$ac_ct_NCURSES_CONFIG"; then
4959 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
4961 ac_save_IFS=$IFS; IFS=$ac_path_separator
4963 for ac_dir in $ac_dummy; do
4965 test -z "$ac_dir" && ac_dir=.
4966 $as_executable_p "$ac_dir/$ac_word" || continue
4967 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
4968 echo "$as_me:4968: found $ac_dir/$ac_word" >&5
4974 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
4975 if test -n "$ac_ct_NCURSES_CONFIG"; then
4976 echo "$as_me:4976: result: $ac_ct_NCURSES_CONFIG" >&5
4977 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
4979 echo "$as_me:4979: result: no" >&5
4980 echo "${ECHO_T}no" >&6
4983 test -n "$ac_ct_NCURSES_CONFIG" && break
4985 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
4987 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
4990 if test "$NCURSES_CONFIG" != none ; then
4995 cf_new_extra_cppflags=
4997 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
4999 case "$cf_fix_cppflags" in
5001 case "$cf_add_cflags" in
5002 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5003 case "$cf_add_cflags" in
5005 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5007 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5008 && test -z "${cf_tst_cflags}" \
5009 && cf_fix_cppflags=yes
5011 if test "$cf_fix_cppflags" = yes ; then
5013 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5014 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5017 elif test "${cf_tst_cflags}" = "\"'" ; then
5019 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5020 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5030 case "$cf_add_cflags" in
5032 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5034 CPPFLAGS=`echo "$CPPFLAGS" | \
5035 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5036 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5041 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5042 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5049 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5050 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5057 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5058 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5060 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5062 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5063 && test -z "${cf_tst_cflags}" \
5064 && cf_fix_cppflags=no
5069 if test -n "$cf_new_cflags" ; then
5071 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5072 CFLAGS="${CFLAGS}$cf_new_cflags"
5076 if test -n "$cf_new_cppflags" ; then
5078 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5079 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5083 if test -n "$cf_new_extra_cppflags" ; then
5085 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5086 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5093 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5095 for cf_add_1lib in $cf_add_0lib; do
5096 for cf_add_2lib in $cf_add_libs; do
5097 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5102 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5106 # even with config script, some packages use no-override for curses.h
5108 echo "$as_me:5108: checking if we have identified curses headers" >&5
5109 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5110 if test "${cf_cv_ncurses_header+set}" = set; then
5111 echo $ECHO_N "(cached) $ECHO_C" >&6
5114 cf_cv_ncurses_header=none
5116 ncurses.h ncurses/ncurses.h \
5117 curses.h ncurses/curses.h
5119 cat >"conftest.$ac_ext" <<_ACEOF
5120 #line 5120 "configure"
5121 #include "confdefs.h"
5122 #include <${cf_header}>
5126 initscr(); tgoto("?", 0,0)
5131 rm -f "conftest.$ac_objext"
5132 if { (eval echo "$as_me:5132: \"$ac_compile\"") >&5
5133 (eval $ac_compile) 2>&5
5135 echo "$as_me:5135: \$? = $ac_status" >&5
5136 (exit "$ac_status"); } &&
5137 { ac_try='test -s "conftest.$ac_objext"'
5138 { (eval echo "$as_me:5138: \"$ac_try\"") >&5
5141 echo "$as_me:5141: \$? = $ac_status" >&5
5142 (exit "$ac_status"); }; }; then
5143 cf_cv_ncurses_header=$cf_header; break
5145 echo "$as_me: failed program was:" >&5
5146 cat "conftest.$ac_ext" >&5
5148 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5152 echo "$as_me:5152: result: $cf_cv_ncurses_header" >&5
5153 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5155 if test "$cf_cv_ncurses_header" = none ; then
5156 { { echo "$as_me:5156: error: No curses header-files found" >&5
5157 echo "$as_me: error: No curses header-files found" >&2;}
5158 { (exit 1); exit 1; }; }
5161 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5163 for ac_header in $cf_cv_ncurses_header
5165 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5166 echo "$as_me:5166: checking for $ac_header" >&5
5167 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5168 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5169 echo $ECHO_N "(cached) $ECHO_C" >&6
5171 cat >"conftest.$ac_ext" <<_ACEOF
5172 #line 5172 "configure"
5173 #include "confdefs.h"
5174 #include <$ac_header>
5176 if { (eval echo "$as_me:5176: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5177 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5179 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5181 cat conftest.err >&5
5182 echo "$as_me:5182: \$? = $ac_status" >&5
5183 (exit "$ac_status"); } >/dev/null; then
5184 if test -s conftest.err; then
5185 ac_cpp_err=$ac_c_preproc_warn_flag
5192 if test -z "$ac_cpp_err"; then
5193 eval "$as_ac_Header=yes"
5195 echo "$as_me: failed program was:" >&5
5196 cat "conftest.$ac_ext" >&5
5197 eval "$as_ac_Header=no"
5199 rm -f conftest.err "conftest.$ac_ext"
5201 echo "$as_me:5201: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5202 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5203 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5204 cat >>confdefs.h <<EOF
5205 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5211 cat >>confdefs.h <<\EOF
5215 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5217 cat >>confdefs.h <<EOF
5218 #define $cf_nculib_ROOT 1
5221 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
5225 cf_ncuhdr_root=ncurses
5227 test -n "$cf_cv_curses_dir" && \
5228 test "$cf_cv_curses_dir" != "no" && { \
5230 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5231 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5233 while test "$cf_add_incdir" != /usr/include
5235 if test -d "$cf_add_incdir"
5238 if test -n "$CFLAGS$CPPFLAGS" ; then
5239 # a loop is needed to ensure we can add subdirs of existing dirs
5240 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5241 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5242 cf_have_incdir=yes; break
5247 if test "$cf_have_incdir" = no ; then
5248 if test "$cf_add_incdir" = /usr/local/include ; then
5249 if test "$GCC" = yes
5251 cf_save_CPPFLAGS=$CPPFLAGS
5253 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5254 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5256 cat >"conftest.$ac_ext" <<_ACEOF
5257 #line 5257 "configure"
5258 #include "confdefs.h"
5268 rm -f "conftest.$ac_objext"
5269 if { (eval echo "$as_me:5269: \"$ac_compile\"") >&5
5270 (eval $ac_compile) 2>&5
5272 echo "$as_me:5272: \$? = $ac_status" >&5
5273 (exit "$ac_status"); } &&
5274 { ac_try='test -s "conftest.$ac_objext"'
5275 { (eval echo "$as_me:5275: \"$ac_try\"") >&5
5278 echo "$as_me:5278: \$? = $ac_status" >&5
5279 (exit "$ac_status"); }; }; then
5282 echo "$as_me: failed program was:" >&5
5283 cat "conftest.$ac_ext" >&5
5286 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5287 CPPFLAGS=$cf_save_CPPFLAGS
5292 if test "$cf_have_incdir" = no ; then
5293 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5295 echo "${as_me:-configure}:5295: testing adding $cf_add_incdir to include-path ..." 1>&5
5297 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5299 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5300 test "$cf_top_incdir" = "$cf_add_incdir" && break
5301 cf_add_incdir="$cf_top_incdir"
5314 echo "$as_me:5314: checking for $cf_ncuhdr_root header in include-path" >&5
5315 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5316 if test "${cf_cv_ncurses_h+set}" = set; then
5317 echo $ECHO_N "(cached) $ECHO_C" >&6
5320 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5321 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
5322 for cf_header in $cf_header_list
5325 cat >"conftest.$ac_ext" <<_ACEOF
5326 #line 5326 "configure"
5327 #include "confdefs.h"
5329 #include <$cf_header>
5334 #ifdef NCURSES_VERSION
5336 printf("%s\\n", NCURSES_VERSION);
5349 rm -f "conftest.$ac_objext"
5350 if { (eval echo "$as_me:5350: \"$ac_compile\"") >&5
5351 (eval $ac_compile) 2>&5
5353 echo "$as_me:5353: \$? = $ac_status" >&5
5354 (exit "$ac_status"); } &&
5355 { ac_try='test -s "conftest.$ac_objext"'
5356 { (eval echo "$as_me:5356: \"$ac_try\"") >&5
5359 echo "$as_me:5359: \$? = $ac_status" >&5
5360 (exit "$ac_status"); }; }; then
5361 cf_cv_ncurses_h=$cf_header
5364 echo "$as_me: failed program was:" >&5
5365 cat "conftest.$ac_ext" >&5
5368 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5370 test "$cf_cv_ncurses_h" != no && break
5374 echo "$as_me:5374: result: $cf_cv_ncurses_h" >&5
5375 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5377 if test "$cf_cv_ncurses_h" != no ; then
5378 cf_cv_ncurses_header=$cf_cv_ncurses_h
5381 echo "$as_me:5381: checking for $cf_ncuhdr_root include-path" >&5
5382 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5383 if test "${cf_cv_ncurses_h2+set}" = set; then
5384 echo $ECHO_N "(cached) $ECHO_C" >&6
5387 test -n "$verbose" && echo
5391 # collect the current set of include-directories from compiler flags
5392 cf_header_path_list=""
5393 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5394 for cf_header_path in $CPPFLAGS $CFLAGS
5396 case "$cf_header_path" in
5398 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5400 test "x$cf_header_path" != "xNONE" && \
5401 test -d "$cf_header_path" && \
5403 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5404 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
5405 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5406 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5407 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5408 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"
5411 cf_header_path_list="$cf_header_path_list $cf_search"
5417 # add the variations for the package we are looking for
5421 test "x$prefix" != "xNONE" && \
5422 test -d "$prefix" && \
5424 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5425 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
5426 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5427 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5428 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5429 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5432 for cf_subdir_prefix in \
5441 test "x$cf_subdir_prefix" != "x$prefix" && \
5442 test -d "$cf_subdir_prefix" && \
5443 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
5444 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5445 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
5446 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
5447 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
5448 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
5449 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"
5454 test "$includedir" != NONE && \
5455 test "$includedir" != "/usr/include" && \
5456 test -d "$includedir" && {
5457 test -d "$includedir" && cf_search="$cf_search $includedir"
5458 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5461 test "$oldincludedir" != NONE && \
5462 test "$oldincludedir" != "/usr/include" && \
5463 test -d "$oldincludedir" && {
5464 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
5465 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5468 cf_search="$cf_search $cf_header_path_list"
5470 test -n "$verbose" && echo "search path $cf_search"
5471 cf_save2_CPPFLAGS="$CPPFLAGS"
5472 for cf_incdir in $cf_search
5475 if test -n "$cf_incdir" ; then
5476 for cf_add_incdir in $cf_incdir
5478 while test "$cf_add_incdir" != /usr/include
5480 if test -d "$cf_add_incdir"
5483 if test -n "$CFLAGS$CPPFLAGS" ; then
5484 # a loop is needed to ensure we can add subdirs of existing dirs
5485 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5486 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5487 cf_have_incdir=yes; break
5492 if test "$cf_have_incdir" = no ; then
5493 if test "$cf_add_incdir" = /usr/local/include ; then
5494 if test "$GCC" = yes
5496 cf_save_CPPFLAGS=$CPPFLAGS
5498 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5499 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5501 cat >"conftest.$ac_ext" <<_ACEOF
5502 #line 5502 "configure"
5503 #include "confdefs.h"
5513 rm -f "conftest.$ac_objext"
5514 if { (eval echo "$as_me:5514: \"$ac_compile\"") >&5
5515 (eval $ac_compile) 2>&5
5517 echo "$as_me:5517: \$? = $ac_status" >&5
5518 (exit "$ac_status"); } &&
5519 { ac_try='test -s "conftest.$ac_objext"'
5520 { (eval echo "$as_me:5520: \"$ac_try\"") >&5
5523 echo "$as_me:5523: \$? = $ac_status" >&5
5524 (exit "$ac_status"); }; }; then
5527 echo "$as_me: failed program was:" >&5
5528 cat "conftest.$ac_ext" >&5
5531 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5532 CPPFLAGS=$cf_save_CPPFLAGS
5537 if test "$cf_have_incdir" = no ; then
5538 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5540 echo "${as_me:-configure}:5540: testing adding $cf_add_incdir to include-path ..." 1>&5
5542 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5544 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5545 test "$cf_top_incdir" = "$cf_add_incdir" && break
5546 cf_add_incdir="$cf_top_incdir"
5562 cat >"conftest.$ac_ext" <<_ACEOF
5563 #line 5563 "configure"
5564 #include "confdefs.h"
5566 #include <$cf_header>
5571 #ifdef NCURSES_VERSION
5573 printf("%s\\n", NCURSES_VERSION);
5586 rm -f "conftest.$ac_objext"
5587 if { (eval echo "$as_me:5587: \"$ac_compile\"") >&5
5588 (eval $ac_compile) 2>&5
5590 echo "$as_me:5590: \$? = $ac_status" >&5
5591 (exit "$ac_status"); } &&
5592 { ac_try='test -s "conftest.$ac_objext"'
5593 { (eval echo "$as_me:5593: \"$ac_try\"") >&5
5596 echo "$as_me:5596: \$? = $ac_status" >&5
5597 (exit "$ac_status"); }; }; then
5598 cf_cv_ncurses_h2=$cf_header
5601 echo "$as_me: failed program was:" >&5
5602 cat "conftest.$ac_ext" >&5
5605 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5607 if test "$cf_cv_ncurses_h2" != no ; then
5608 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5609 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
5612 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5614 CPPFLAGS="$cf_save2_CPPFLAGS"
5615 test "$cf_cv_ncurses_h2" != no && break
5617 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5617: error: not found" >&5
5618 echo "$as_me: error: not found" >&2;}
5619 { (exit 1); exit 1; }; }
5622 echo "$as_me:5622: result: $cf_cv_ncurses_h2" >&5
5623 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5625 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
5626 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
5627 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
5628 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
5631 if test -n "$cf_1st_incdir" ; then
5632 for cf_add_incdir in $cf_1st_incdir
5634 while test "$cf_add_incdir" != /usr/include
5636 if test -d "$cf_add_incdir"
5639 if test -n "$CFLAGS$CPPFLAGS" ; then
5640 # a loop is needed to ensure we can add subdirs of existing dirs
5641 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5642 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5643 cf_have_incdir=yes; break
5648 if test "$cf_have_incdir" = no ; then
5649 if test "$cf_add_incdir" = /usr/local/include ; then
5650 if test "$GCC" = yes
5652 cf_save_CPPFLAGS=$CPPFLAGS
5654 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5655 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5657 cat >"conftest.$ac_ext" <<_ACEOF
5658 #line 5658 "configure"
5659 #include "confdefs.h"
5669 rm -f "conftest.$ac_objext"
5670 if { (eval echo "$as_me:5670: \"$ac_compile\"") >&5
5671 (eval $ac_compile) 2>&5
5673 echo "$as_me:5673: \$? = $ac_status" >&5
5674 (exit "$ac_status"); } &&
5675 { ac_try='test -s "conftest.$ac_objext"'
5676 { (eval echo "$as_me:5676: \"$ac_try\"") >&5
5679 echo "$as_me:5679: \$? = $ac_status" >&5
5680 (exit "$ac_status"); }; }; then
5683 echo "$as_me: failed program was:" >&5
5684 cat "conftest.$ac_ext" >&5
5687 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5688 CPPFLAGS=$cf_save_CPPFLAGS
5693 if test "$cf_have_incdir" = no ; then
5694 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5696 echo "${as_me:-configure}:5696: testing adding $cf_add_incdir to include-path ..." 1>&5
5698 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5700 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5701 test "$cf_top_incdir" = "$cf_add_incdir" && break
5702 cf_add_incdir="$cf_top_incdir"
5715 # Set definitions to allow ifdef'ing for ncurses.h
5717 case "$cf_cv_ncurses_header" in
5720 cat >>confdefs.h <<\EOF
5721 #define HAVE_NCURSES_H 1
5727 case "$cf_cv_ncurses_header" in
5728 (ncurses/curses.h|ncurses/ncurses.h)
5730 cat >>confdefs.h <<\EOF
5731 #define HAVE_NCURSES_NCURSES_H 1
5735 (ncursesw/curses.h|ncursesw/ncurses.h)
5737 cat >>confdefs.h <<\EOF
5738 #define HAVE_NCURSESW_NCURSES_H 1
5744 echo "$as_me:5744: checking for terminfo header" >&5
5745 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5746 if test "${cf_cv_term_header+set}" = set; then
5747 echo $ECHO_N "(cached) $ECHO_C" >&6
5750 case "${cf_cv_ncurses_header}" in
5751 (*/ncurses.h|*/ncursesw.h)
5752 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5755 cf_term_header=term.h
5759 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5761 cat >"conftest.$ac_ext" <<_ACEOF
5762 #line 5762 "configure"
5763 #include "confdefs.h"
5765 #include <${cf_cv_ncurses_header:-curses.h}>
5771 int x = auto_left_margin; (void)x
5776 rm -f "conftest.$ac_objext"
5777 if { (eval echo "$as_me:5777: \"$ac_compile\"") >&5
5778 (eval $ac_compile) 2>&5
5780 echo "$as_me:5780: \$? = $ac_status" >&5
5781 (exit "$ac_status"); } &&
5782 { ac_try='test -s "conftest.$ac_objext"'
5783 { (eval echo "$as_me:5783: \"$ac_try\"") >&5
5786 echo "$as_me:5786: \$? = $ac_status" >&5
5787 (exit "$ac_status"); }; }; then
5789 cf_cv_term_header="$cf_test"
5791 echo "$as_me: failed program was:" >&5
5792 cat "conftest.$ac_ext" >&5
5794 cf_cv_term_header=unknown
5797 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5798 test "$cf_cv_term_header" != unknown && break
5802 echo "$as_me:5802: result: $cf_cv_term_header" >&5
5803 echo "${ECHO_T}$cf_cv_term_header" >&6
5805 # Set definitions to allow ifdef'ing to accommodate subdirectories
5807 case "$cf_cv_term_header" in
5810 cat >>confdefs.h <<\EOF
5811 #define HAVE_TERM_H 1
5817 case "$cf_cv_term_header" in
5820 cat >>confdefs.h <<\EOF
5821 #define HAVE_NCURSES_TERM_H 1
5827 cat >>confdefs.h <<\EOF
5828 #define HAVE_NCURSESW_TERM_H 1
5834 # some applications need this, but should check for NCURSES_VERSION
5836 cat >>confdefs.h <<\EOF
5840 echo "$as_me:5840: checking for ncurses version" >&5
5841 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5842 if test "${cf_cv_ncurses_version+set}" = set; then
5843 echo $ECHO_N "(cached) $ECHO_C" >&6
5846 cf_cv_ncurses_version=no
5848 rm -f "$cf_tempfile"
5849 if test "$cross_compiling" = yes; then
5851 # This will not work if the preprocessor splits the line after the
5852 # Autoconf token. The 'unproto' program does that.
5853 cat > "conftest.$ac_ext" <<EOF
5854 #include <${cf_cv_ncurses_header:-curses.h}>
5856 #ifdef NCURSES_VERSION
5857 Autoconf NCURSES_VERSION
5865 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5866 { (eval echo "$as_me:5866: \"$cf_try\"") >&5
5869 echo "$as_me:5869: \$? = $ac_status" >&5
5870 (exit "$ac_status"); }
5871 if test -f conftest.out ; then
5872 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
5873 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5878 cat >"conftest.$ac_ext" <<_ACEOF
5879 #line 5879 "configure"
5880 #include "confdefs.h"
5882 #include <${cf_cv_ncurses_header:-curses.h}>
5886 FILE *fp = fopen("$cf_tempfile", "w");
5887 #ifdef NCURSES_VERSION
5888 # ifdef NCURSES_VERSION_PATCH
5889 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5891 fprintf(fp, "%s\\n", NCURSES_VERSION);
5895 fprintf(fp, "old\\n");
5900 ${cf_cv_main_return:-return}(0);
5903 rm -f "conftest$ac_exeext"
5904 if { (eval echo "$as_me:5904: \"$ac_link\"") >&5
5905 (eval $ac_link) 2>&5
5907 echo "$as_me:5907: \$? = $ac_status" >&5
5908 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5909 { (eval echo "$as_me:5909: \"$ac_try\"") >&5
5912 echo "$as_me:5912: \$? = $ac_status" >&5
5913 (exit "$ac_status"); }; }; then
5915 cf_cv_ncurses_version=`cat $cf_tempfile`
5917 echo "$as_me: program exited with status $ac_status" >&5
5918 echo "$as_me: failed program was:" >&5
5919 cat "conftest.$ac_ext" >&5
5921 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5923 rm -f "$cf_tempfile"
5926 echo "$as_me:5926: result: $cf_cv_ncurses_version" >&5
5927 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5928 test "$cf_cv_ncurses_version" = no ||
5929 cat >>confdefs.h <<\EOF
5933 cf_nculib_root=ncurses
5934 # This works, except for the special case where we find gpm, but
5935 # ncurses is in a nonstandard location via $LIBS, and we really want
5938 cf_ncurses_SAVE="$LIBS"
5939 echo "$as_me:5939: checking for Gpm_Open in -lgpm" >&5
5940 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5941 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5942 echo $ECHO_N "(cached) $ECHO_C" >&6
5944 ac_check_lib_save_LIBS=$LIBS
5946 cat >"conftest.$ac_ext" <<_ACEOF
5947 #line 5947 "configure"
5948 #include "confdefs.h"
5950 /* Override any gcc2 internal prototype to avoid an error. */
5954 /* We use char because int might match the return type of a gcc2
5955 builtin and then its argument prototype would still apply. */
5965 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5966 if { (eval echo "$as_me:5966: \"$ac_link\"") >&5
5967 (eval $ac_link) 2>&5
5969 echo "$as_me:5969: \$? = $ac_status" >&5
5970 (exit "$ac_status"); } &&
5971 { ac_try='test -s "conftest$ac_exeext"'
5972 { (eval echo "$as_me:5972: \"$ac_try\"") >&5
5975 echo "$as_me:5975: \$? = $ac_status" >&5
5976 (exit "$ac_status"); }; }; then
5977 ac_cv_lib_gpm_Gpm_Open=yes
5979 echo "$as_me: failed program was:" >&5
5980 cat "conftest.$ac_ext" >&5
5981 ac_cv_lib_gpm_Gpm_Open=no
5983 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5984 LIBS=$ac_check_lib_save_LIBS
5986 echo "$as_me:5986: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5987 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5988 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
5989 echo "$as_me:5989: checking for initscr in -lgpm" >&5
5990 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5991 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5992 echo $ECHO_N "(cached) $ECHO_C" >&6
5994 ac_check_lib_save_LIBS=$LIBS
5996 cat >"conftest.$ac_ext" <<_ACEOF
5997 #line 5997 "configure"
5998 #include "confdefs.h"
6000 /* Override any gcc2 internal prototype to avoid an error. */
6004 /* We use char because int might match the return type of a gcc2
6005 builtin and then its argument prototype would still apply. */
6015 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6016 if { (eval echo "$as_me:6016: \"$ac_link\"") >&5
6017 (eval $ac_link) 2>&5
6019 echo "$as_me:6019: \$? = $ac_status" >&5
6020 (exit "$ac_status"); } &&
6021 { ac_try='test -s "conftest$ac_exeext"'
6022 { (eval echo "$as_me:6022: \"$ac_try\"") >&5
6025 echo "$as_me:6025: \$? = $ac_status" >&5
6026 (exit "$ac_status"); }; }; then
6027 ac_cv_lib_gpm_initscr=yes
6029 echo "$as_me: failed program was:" >&5
6030 cat "conftest.$ac_ext" >&5
6031 ac_cv_lib_gpm_initscr=no
6033 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6034 LIBS=$ac_check_lib_save_LIBS
6036 echo "$as_me:6036: result: $ac_cv_lib_gpm_initscr" >&5
6037 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6038 if test "$ac_cv_lib_gpm_initscr" = yes; then
6039 LIBS="$cf_ncurses_SAVE"
6041 cf_ncurses_LIBS="-lgpm"
6048 # This is only necessary if you are linking against an obsolete
6049 # version of ncurses (but it should do no harm, since it's static).
6050 if test "$cf_nculib_root" = ncurses ; then
6051 echo "$as_me:6051: checking for tgoto in -lmytinfo" >&5
6052 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6053 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6054 echo $ECHO_N "(cached) $ECHO_C" >&6
6056 ac_check_lib_save_LIBS=$LIBS
6057 LIBS="-lmytinfo $LIBS"
6058 cat >"conftest.$ac_ext" <<_ACEOF
6059 #line 6059 "configure"
6060 #include "confdefs.h"
6062 /* Override any gcc2 internal prototype to avoid an error. */
6066 /* We use char because int might match the return type of a gcc2
6067 builtin and then its argument prototype would still apply. */
6077 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6078 if { (eval echo "$as_me:6078: \"$ac_link\"") >&5
6079 (eval $ac_link) 2>&5
6081 echo "$as_me:6081: \$? = $ac_status" >&5
6082 (exit "$ac_status"); } &&
6083 { ac_try='test -s "conftest$ac_exeext"'
6084 { (eval echo "$as_me:6084: \"$ac_try\"") >&5
6087 echo "$as_me:6087: \$? = $ac_status" >&5
6088 (exit "$ac_status"); }; }; then
6089 ac_cv_lib_mytinfo_tgoto=yes
6091 echo "$as_me: failed program was:" >&5
6092 cat "conftest.$ac_ext" >&5
6093 ac_cv_lib_mytinfo_tgoto=no
6095 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6096 LIBS=$ac_check_lib_save_LIBS
6098 echo "$as_me:6098: result: $ac_cv_lib_mytinfo_tgoto" >&5
6099 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6100 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6101 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6111 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6113 for cf_add_1lib in $cf_add_0lib; do
6114 for cf_add_2lib in $cf_add_libs; do
6115 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6120 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6124 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6130 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6132 for cf_add_1lib in $cf_add_0lib; do
6133 for cf_add_2lib in $cf_add_libs; do
6134 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6139 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6145 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
6147 echo "$as_me:6147: checking for initscr" >&5
6148 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6149 if test "${ac_cv_func_initscr+set}" = set; then
6150 echo $ECHO_N "(cached) $ECHO_C" >&6
6152 cat >"conftest.$ac_ext" <<_ACEOF
6153 #line 6153 "configure"
6154 #include "confdefs.h"
6155 #define initscr autoconf_temporary
6156 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6163 /* We use char because int might match the return type of a gcc2
6164 builtin and then its argument prototype would still apply. */
6165 char initscr (void);
6171 /* The GNU C library defines stubs for functions which it implements
6172 to always fail with ENOSYS. Some functions are actually named
6173 something starting with __ and the normal name is an alias. */
6174 #if defined (__stub_initscr) || defined (__stub___initscr)
6175 #error found stub for initscr
6183 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6184 if { (eval echo "$as_me:6184: \"$ac_link\"") >&5
6185 (eval $ac_link) 2>&5
6187 echo "$as_me:6187: \$? = $ac_status" >&5
6188 (exit "$ac_status"); } &&
6189 { ac_try='test -s "conftest$ac_exeext"'
6190 { (eval echo "$as_me:6190: \"$ac_try\"") >&5
6193 echo "$as_me:6193: \$? = $ac_status" >&5
6194 (exit "$ac_status"); }; }; then
6195 ac_cv_func_initscr=yes
6197 echo "$as_me: failed program was:" >&5
6198 cat "conftest.$ac_ext" >&5
6199 ac_cv_func_initscr=no
6201 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6203 echo "$as_me:6203: result: $ac_cv_func_initscr" >&5
6204 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6205 if test "$ac_cv_func_initscr" = yes; then
6206 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6209 cf_save_LIBS="$LIBS"
6210 echo "$as_me:6210: checking for initscr in -l$cf_nculib_root" >&5
6211 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6212 LIBS="-l$cf_nculib_root $LIBS"
6213 cat >"conftest.$ac_ext" <<_ACEOF
6214 #line 6214 "configure"
6215 #include "confdefs.h"
6216 #include <${cf_cv_ncurses_header:-curses.h}>
6225 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6226 if { (eval echo "$as_me:6226: \"$ac_link\"") >&5
6227 (eval $ac_link) 2>&5
6229 echo "$as_me:6229: \$? = $ac_status" >&5
6230 (exit "$ac_status"); } &&
6231 { ac_try='test -s "conftest$ac_exeext"'
6232 { (eval echo "$as_me:6232: \"$ac_try\"") >&5
6235 echo "$as_me:6235: \$? = $ac_status" >&5
6236 (exit "$ac_status"); }; }; then
6237 echo "$as_me:6237: result: yes" >&5
6238 echo "${ECHO_T}yes" >&6
6239 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6242 echo "$as_me: failed program was:" >&5
6243 cat "conftest.$ac_ext" >&5
6244 echo "$as_me:6244: result: no" >&5
6245 echo "${ECHO_T}no" >&6
6248 cf_library_path_list=""
6249 if test -n "${LDFLAGS}${LIBS}" ; then
6250 for cf_library_path in $LDFLAGS $LIBS
6252 case "$cf_library_path" in
6254 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6256 test "x$cf_library_path" != "xNONE" && \
6257 test -d "$cf_library_path" && \
6259 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6260 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6261 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6262 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6263 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6264 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"
6267 cf_library_path_list="$cf_library_path_list $cf_search"
6275 test "x$prefix" != "xNONE" && \
6276 test -d "$prefix" && \
6278 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6279 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6280 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6281 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6282 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6283 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6286 for cf_subdir_prefix in \
6295 test "x$cf_subdir_prefix" != "x$prefix" && \
6296 test -d "$cf_subdir_prefix" && \
6297 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6298 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6299 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6300 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
6301 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
6302 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
6303 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"
6308 cf_search="$cf_library_path_list $cf_search"
6310 for cf_libdir in $cf_search
6312 echo "$as_me:6312: checking for -l$cf_nculib_root in $cf_libdir" >&5
6313 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6314 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6315 cat >"conftest.$ac_ext" <<_ACEOF
6316 #line 6316 "configure"
6317 #include "confdefs.h"
6318 #include <${cf_cv_ncurses_header:-curses.h}>
6327 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6328 if { (eval echo "$as_me:6328: \"$ac_link\"") >&5
6329 (eval $ac_link) 2>&5
6331 echo "$as_me:6331: \$? = $ac_status" >&5
6332 (exit "$ac_status"); } &&
6333 { ac_try='test -s "conftest$ac_exeext"'
6334 { (eval echo "$as_me:6334: \"$ac_try\"") >&5
6337 echo "$as_me:6337: \$? = $ac_status" >&5
6338 (exit "$ac_status"); }; }; then
6339 echo "$as_me:6339: result: yes" >&5
6340 echo "${ECHO_T}yes" >&6
6341 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6344 echo "$as_me: failed program was:" >&5
6345 cat "conftest.$ac_ext" >&5
6346 echo "$as_me:6346: result: no" >&5
6347 echo "${ECHO_T}no" >&6
6348 LIBS="$cf_save_LIBS"
6350 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6354 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6358 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
6360 if test "$cf_found_library" = no ; then
6361 { { echo "$as_me:6361: error: Cannot link $cf_nculib_root library" >&5
6362 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6363 { (exit 1); exit 1; }; }
6368 if test -n "$cf_ncurses_LIBS" ; then
6369 echo "$as_me:6369: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6370 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6371 cf_ncurses_SAVE="$LIBS"
6372 for p in $cf_ncurses_LIBS ; do
6373 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
6374 if test "$q" != "$LIBS" ; then
6378 cat >"conftest.$ac_ext" <<_ACEOF
6379 #line 6379 "configure"
6380 #include "confdefs.h"
6381 #include <${cf_cv_ncurses_header:-curses.h}>
6385 initscr(); mousemask(0,0); tigetstr((char *)0);
6390 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6391 if { (eval echo "$as_me:6391: \"$ac_link\"") >&5
6392 (eval $ac_link) 2>&5
6394 echo "$as_me:6394: \$? = $ac_status" >&5
6395 (exit "$ac_status"); } &&
6396 { ac_try='test -s "conftest$ac_exeext"'
6397 { (eval echo "$as_me:6397: \"$ac_try\"") >&5
6400 echo "$as_me:6400: \$? = $ac_status" >&5
6401 (exit "$ac_status"); }; }; then
6402 echo "$as_me:6402: result: yes" >&5
6403 echo "${ECHO_T}yes" >&6
6405 echo "$as_me: failed program was:" >&5
6406 cat "conftest.$ac_ext" >&5
6407 echo "$as_me:6407: result: no" >&5
6408 echo "${ECHO_T}no" >&6
6409 LIBS="$cf_ncurses_SAVE"
6411 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6414 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6416 cat >>confdefs.h <<EOF
6417 #define $cf_nculib_ROOT 1
6425 echo "$as_me:6425: checking if you want wide-character code" >&5
6426 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6428 # Check whether --enable-widec or --disable-widec was given.
6429 if test "${enable_widec+set}" = set; then
6430 enableval="$enable_widec"
6431 with_widec=$enableval
6435 echo "$as_me:6435: result: $with_widec" >&5
6436 echo "${ECHO_T}$with_widec" >&6
6437 if test "$with_widec" = yes ; then
6439 echo "$as_me:6439: checking for multibyte character support" >&5
6440 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6441 if test "${cf_cv_utf8_lib+set}" = set; then
6442 echo $ECHO_N "(cached) $ECHO_C" >&6
6445 cf_save_LIBS="$LIBS"
6446 cat >"conftest.$ac_ext" <<_ACEOF
6447 #line 6447 "configure"
6448 #include "confdefs.h"
6459 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6460 if { (eval echo "$as_me:6460: \"$ac_link\"") >&5
6461 (eval $ac_link) 2>&5
6463 echo "$as_me:6463: \$? = $ac_status" >&5
6464 (exit "$ac_status"); } &&
6465 { ac_try='test -s "conftest$ac_exeext"'
6466 { (eval echo "$as_me:6466: \"$ac_try\"") >&5
6469 echo "$as_me:6469: \$? = $ac_status" >&5
6470 (exit "$ac_status"); }; }; then
6473 echo "$as_me: failed program was:" >&5
6474 cat "conftest.$ac_ext" >&5
6476 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6477 # will be set on completion of the AC_TRY_LINK below.
6478 cf_cv_header_path_utf8=
6479 cf_cv_library_path_utf8=
6481 echo "${as_me:-configure}:6481: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6483 cf_save_LIBS="$LIBS"
6485 cat >"conftest.$ac_ext" <<_ACEOF
6486 #line 6486 "configure"
6487 #include "confdefs.h"
6489 #include <libutf8.h>
6498 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6499 if { (eval echo "$as_me:6499: \"$ac_link\"") >&5
6500 (eval $ac_link) 2>&5
6502 echo "$as_me:6502: \$? = $ac_status" >&5
6503 (exit "$ac_status"); } &&
6504 { ac_try='test -s "conftest$ac_exeext"'
6505 { (eval echo "$as_me:6505: \"$ac_try\"") >&5
6508 echo "$as_me:6508: \$? = $ac_status" >&5
6509 (exit "$ac_status"); }; }; then
6511 cf_cv_find_linkage_utf8=yes
6512 cf_cv_header_path_utf8=/usr/include
6513 cf_cv_library_path_utf8=/usr/lib
6516 echo "$as_me: failed program was:" >&5
6517 cat "conftest.$ac_ext" >&5
6519 LIBS="-lutf8 $cf_save_LIBS"
6521 cat >"conftest.$ac_ext" <<_ACEOF
6522 #line 6522 "configure"
6523 #include "confdefs.h"
6525 #include <libutf8.h>
6534 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6535 if { (eval echo "$as_me:6535: \"$ac_link\"") >&5
6536 (eval $ac_link) 2>&5
6538 echo "$as_me:6538: \$? = $ac_status" >&5
6539 (exit "$ac_status"); } &&
6540 { ac_try='test -s "conftest$ac_exeext"'
6541 { (eval echo "$as_me:6541: \"$ac_try\"") >&5
6544 echo "$as_me:6544: \$? = $ac_status" >&5
6545 (exit "$ac_status"); }; }; then
6547 cf_cv_find_linkage_utf8=yes
6548 cf_cv_header_path_utf8=/usr/include
6549 cf_cv_library_path_utf8=/usr/lib
6550 cf_cv_library_file_utf8="-lutf8"
6553 echo "$as_me: failed program was:" >&5
6554 cat "conftest.$ac_ext" >&5
6556 cf_cv_find_linkage_utf8=no
6557 LIBS="$cf_save_LIBS"
6559 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6561 echo "${as_me:-configure}:6561: testing find linkage for utf8 library ..." 1>&5
6563 echo "${as_me:-configure}:6563: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6565 cf_save_CPPFLAGS="$CPPFLAGS"
6566 cf_test_CPPFLAGS="$CPPFLAGS"
6570 # collect the current set of include-directories from compiler flags
6571 cf_header_path_list=""
6572 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6573 for cf_header_path in $CPPFLAGS $CFLAGS
6575 case "$cf_header_path" in
6577 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6579 test "x$cf_header_path" != "xNONE" && \
6580 test -d "$cf_header_path" && \
6582 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6583 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
6584 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
6585 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
6586 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
6587 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6590 cf_header_path_list="$cf_header_path_list $cf_search"
6596 # add the variations for the package we are looking for
6600 test "x$prefix" != "xNONE" && \
6601 test -d "$prefix" && \
6603 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6604 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
6605 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
6606 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
6607 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
6608 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
6611 for cf_subdir_prefix in \
6620 test "x$cf_subdir_prefix" != "x$prefix" && \
6621 test -d "$cf_subdir_prefix" && \
6622 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6623 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6624 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
6625 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6626 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6627 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6628 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6633 test "$includedir" != NONE && \
6634 test "$includedir" != "/usr/include" && \
6635 test -d "$includedir" && {
6636 test -d "$includedir" && cf_search="$cf_search $includedir"
6637 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
6640 test "$oldincludedir" != NONE && \
6641 test "$oldincludedir" != "/usr/include" && \
6642 test -d "$oldincludedir" && {
6643 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
6644 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
6647 cf_search="$cf_search $cf_header_path_list"
6649 for cf_cv_header_path_utf8 in $cf_search
6651 if test -d "$cf_cv_header_path_utf8" ; then
6652 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6654 echo "${as_me:-configure}:6654: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6656 CPPFLAGS="$cf_save_CPPFLAGS"
6658 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6659 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
6661 cat >"conftest.$ac_ext" <<_ACEOF
6662 #line 6662 "configure"
6663 #include "confdefs.h"
6665 #include <libutf8.h>
6674 rm -f "conftest.$ac_objext"
6675 if { (eval echo "$as_me:6675: \"$ac_compile\"") >&5
6676 (eval $ac_compile) 2>&5
6678 echo "$as_me:6678: \$? = $ac_status" >&5
6679 (exit "$ac_status"); } &&
6680 { ac_try='test -s "conftest.$ac_objext"'
6681 { (eval echo "$as_me:6681: \"$ac_try\"") >&5
6684 echo "$as_me:6684: \$? = $ac_status" >&5
6685 (exit "$ac_status"); }; }; then
6687 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6689 echo "${as_me:-configure}:6689: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6691 cf_cv_find_linkage_utf8=maybe
6692 cf_test_CPPFLAGS="$CPPFLAGS"
6695 echo "$as_me: failed program was:" >&5
6696 cat "conftest.$ac_ext" >&5
6698 CPPFLAGS="$cf_save_CPPFLAGS"
6701 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6705 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6707 echo "${as_me:-configure}:6707: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6709 cf_save_LIBS="$LIBS"
6710 cf_save_LDFLAGS="$LDFLAGS"
6712 if test "$cf_cv_find_linkage_utf8" != yes ; then
6715 cf_library_path_list=""
6716 if test -n "${LDFLAGS}${LIBS}" ; then
6717 for cf_library_path in $LDFLAGS $LIBS
6719 case "$cf_library_path" in
6721 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6723 test "x$cf_library_path" != "xNONE" && \
6724 test -d "$cf_library_path" && \
6726 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6727 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6728 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
6729 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6730 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
6731 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6734 cf_library_path_list="$cf_library_path_list $cf_search"
6742 test "x$prefix" != "xNONE" && \
6743 test -d "$prefix" && \
6745 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6746 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6747 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
6748 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
6749 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
6750 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
6753 for cf_subdir_prefix in \
6762 test "x$cf_subdir_prefix" != "x$prefix" && \
6763 test -d "$cf_subdir_prefix" && \
6764 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6765 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6766 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6767 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6768 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6769 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6770 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6775 cf_search="$cf_library_path_list $cf_search"
6777 for cf_cv_library_path_utf8 in $cf_search
6779 if test -d "$cf_cv_library_path_utf8" ; then
6780 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6782 echo "${as_me:-configure}:6782: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6784 CPPFLAGS="$cf_test_CPPFLAGS"
6785 LIBS="-lutf8 $cf_save_LIBS"
6786 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6787 cat >"conftest.$ac_ext" <<_ACEOF
6788 #line 6788 "configure"
6789 #include "confdefs.h"
6791 #include <libutf8.h>
6800 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6801 if { (eval echo "$as_me:6801: \"$ac_link\"") >&5
6802 (eval $ac_link) 2>&5
6804 echo "$as_me:6804: \$? = $ac_status" >&5
6805 (exit "$ac_status"); } &&
6806 { ac_try='test -s "conftest$ac_exeext"'
6807 { (eval echo "$as_me:6807: \"$ac_try\"") >&5
6810 echo "$as_me:6810: \$? = $ac_status" >&5
6811 (exit "$ac_status"); }; }; then
6813 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
6815 echo "${as_me:-configure}:6815: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
6817 cf_cv_find_linkage_utf8=yes
6818 cf_cv_library_file_utf8="-lutf8"
6821 echo "$as_me: failed program was:" >&5
6822 cat "conftest.$ac_ext" >&5
6824 CPPFLAGS="$cf_save_CPPFLAGS"
6825 LIBS="$cf_save_LIBS"
6826 LDFLAGS="$cf_save_LDFLAGS"
6829 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6832 CPPFLAGS="$cf_save_CPPFLAGS"
6833 LDFLAGS="$cf_save_LDFLAGS"
6837 cf_cv_find_linkage_utf8=no
6841 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6844 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6846 LIBS="$cf_save_LIBS"
6848 if test "$cf_cv_find_linkage_utf8" = yes ; then
6849 cf_cv_utf8_lib=add-on
6855 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6857 echo "$as_me:6857: result: $cf_cv_utf8_lib" >&5
6858 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
6860 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
6862 if test "$cf_cv_utf8_lib" = "add-on" ; then
6864 cat >>confdefs.h <<\EOF
6865 #define HAVE_LIBUTF8_H 1
6868 if test -n "$cf_cv_header_path_utf8" ; then
6869 for cf_add_incdir in $cf_cv_header_path_utf8
6871 while test "$cf_add_incdir" != /usr/include
6873 if test -d "$cf_add_incdir"
6876 if test -n "$CFLAGS$CPPFLAGS" ; then
6877 # a loop is needed to ensure we can add subdirs of existing dirs
6878 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6879 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6880 cf_have_incdir=yes; break
6885 if test "$cf_have_incdir" = no ; then
6886 if test "$cf_add_incdir" = /usr/local/include ; then
6887 if test "$GCC" = yes
6889 cf_save_CPPFLAGS=$CPPFLAGS
6891 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6892 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6894 cat >"conftest.$ac_ext" <<_ACEOF
6895 #line 6895 "configure"
6896 #include "confdefs.h"
6906 rm -f "conftest.$ac_objext"
6907 if { (eval echo "$as_me:6907: \"$ac_compile\"") >&5
6908 (eval $ac_compile) 2>&5
6910 echo "$as_me:6910: \$? = $ac_status" >&5
6911 (exit "$ac_status"); } &&
6912 { ac_try='test -s "conftest.$ac_objext"'
6913 { (eval echo "$as_me:6913: \"$ac_try\"") >&5
6916 echo "$as_me:6916: \$? = $ac_status" >&5
6917 (exit "$ac_status"); }; }; then
6920 echo "$as_me: failed program was:" >&5
6921 cat "conftest.$ac_ext" >&5
6924 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6925 CPPFLAGS=$cf_save_CPPFLAGS
6930 if test "$cf_have_incdir" = no ; then
6931 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6933 echo "${as_me:-configure}:6933: testing adding $cf_add_incdir to include-path ..." 1>&5
6935 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6937 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
6938 test "$cf_top_incdir" = "$cf_add_incdir" && break
6939 cf_add_incdir="$cf_top_incdir"
6950 if test -n "$cf_cv_library_path_utf8" ; then
6951 for cf_add_libdir in $cf_cv_library_path_utf8
6953 if test "$cf_add_libdir" = /usr/lib ; then
6955 elif test -d "$cf_add_libdir"
6958 if test -n "$LDFLAGS$LIBS" ; then
6959 # a loop is needed to ensure we can add subdirs of existing dirs
6960 for cf_test_libdir in $LDFLAGS $LIBS ; do
6961 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6962 cf_have_libdir=yes; break
6966 if test "$cf_have_libdir" = no ; then
6967 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6969 echo "${as_me:-configure}:6969: testing adding $cf_add_libdir to library-path ..." 1>&5
6971 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6980 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6982 for cf_add_1lib in $cf_add_0lib; do
6983 for cf_add_2lib in $cf_add_libs; do
6984 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6989 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6995 cf_ncuconfig_root=ncursesw
6996 cf_have_ncuconfig=no
6998 if test "x${PKG_CONFIG:=none}" != xnone; then
6999 echo "$as_me:6999: checking pkg-config for $cf_ncuconfig_root" >&5
7000 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7001 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7002 echo "$as_me:7002: result: yes" >&5
7003 echo "${ECHO_T}yes" >&6
7005 echo "$as_me:7005: checking if the $cf_ncuconfig_root package files work" >&5
7006 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7007 cf_have_ncuconfig=unknown
7009 cf_save_CFLAGS="$CFLAGS"
7010 cf_save_CPPFLAGS="$CPPFLAGS"
7011 cf_save_LIBS="$LIBS"
7013 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7014 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7016 # while -W for passing linker flags is prevalent, it is not "standard".
7017 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7018 # incompatible _and_ non-standard -W option which gives an error. Work
7019 # around that pitfall.
7020 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7026 cf_new_extra_cppflags=
7028 for cf_add_cflags in $cf_pkg_cflags
7030 case "$cf_fix_cppflags" in
7032 case "$cf_add_cflags" in
7033 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7034 case "$cf_add_cflags" in
7036 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7038 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7039 && test -z "${cf_tst_cflags}" \
7040 && cf_fix_cppflags=yes
7042 if test "$cf_fix_cppflags" = yes ; then
7044 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7045 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7048 elif test "${cf_tst_cflags}" = "\"'" ; then
7050 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7051 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7061 case "$cf_add_cflags" in
7063 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7065 CPPFLAGS=`echo "$CPPFLAGS" | \
7066 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7067 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7072 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7073 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7080 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7081 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7088 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7089 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7091 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7093 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7094 && test -z "${cf_tst_cflags}" \
7095 && cf_fix_cppflags=no
7100 if test -n "$cf_new_cflags" ; then
7102 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7103 CFLAGS="${CFLAGS}$cf_new_cflags"
7107 if test -n "$cf_new_cppflags" ; then
7109 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7110 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7114 if test -n "$cf_new_extra_cppflags" ; then
7116 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7117 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7124 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7126 for cf_add_1lib in $cf_add_0lib; do
7127 for cf_add_2lib in $cf_add_libs; do
7128 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7133 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7137 cat >"conftest.$ac_ext" <<_ACEOF
7138 #line 7138 "configure"
7139 #include "confdefs.h"
7140 #include <${cf_cv_ncurses_header:-curses.h}>
7144 initscr(); mousemask(0,0); tigetstr((char *)0);
7149 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7150 if { (eval echo "$as_me:7150: \"$ac_link\"") >&5
7151 (eval $ac_link) 2>&5
7153 echo "$as_me:7153: \$? = $ac_status" >&5
7154 (exit "$ac_status"); } &&
7155 { ac_try='test -s "conftest$ac_exeext"'
7156 { (eval echo "$as_me:7156: \"$ac_try\"") >&5
7159 echo "$as_me:7159: \$? = $ac_status" >&5
7160 (exit "$ac_status"); }; }; then
7161 if test "$cross_compiling" = yes; then
7162 cf_test_ncuconfig=maybe
7164 cat >"conftest.$ac_ext" <<_ACEOF
7165 #line 7165 "configure"
7166 #include "confdefs.h"
7167 #include <${cf_cv_ncurses_header:-curses.h}>
7169 { char *xx = curses_version(); return (xx == 0); }
7171 rm -f "conftest$ac_exeext"
7172 if { (eval echo "$as_me:7172: \"$ac_link\"") >&5
7173 (eval $ac_link) 2>&5
7175 echo "$as_me:7175: \$? = $ac_status" >&5
7176 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7177 { (eval echo "$as_me:7177: \"$ac_try\"") >&5
7180 echo "$as_me:7180: \$? = $ac_status" >&5
7181 (exit "$ac_status"); }; }; then
7182 cf_test_ncuconfig=yes
7184 echo "$as_me: program exited with status $ac_status" >&5
7185 echo "$as_me: failed program was:" >&5
7186 cat "conftest.$ac_ext" >&5
7187 cf_test_ncuconfig=no
7189 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7192 echo "$as_me: failed program was:" >&5
7193 cat "conftest.$ac_ext" >&5
7194 cf_test_ncuconfig=no
7196 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7198 CFLAGS="$cf_save_CFLAGS"
7199 CPPFLAGS="$cf_save_CPPFLAGS"
7200 LIBS="$cf_save_LIBS"
7202 if test "x$cf_test_ncuconfig" != xyes; then
7203 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7204 cf_pkg_cflags="$cf_temp"
7205 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7206 cf_pkg_libs="$cf_temp"
7214 cf_new_extra_cppflags=
7216 for cf_add_cflags in $cf_pkg_cflags
7218 case "$cf_fix_cppflags" in
7220 case "$cf_add_cflags" in
7221 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7222 case "$cf_add_cflags" in
7224 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7226 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7227 && test -z "${cf_tst_cflags}" \
7228 && cf_fix_cppflags=yes
7230 if test "$cf_fix_cppflags" = yes ; then
7232 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7233 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7236 elif test "${cf_tst_cflags}" = "\"'" ; then
7238 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7239 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7249 case "$cf_add_cflags" in
7251 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7253 CPPFLAGS=`echo "$CPPFLAGS" | \
7254 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7255 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7260 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7261 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7268 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7269 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7276 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7277 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7279 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7281 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7282 && test -z "${cf_tst_cflags}" \
7283 && cf_fix_cppflags=no
7288 if test -n "$cf_new_cflags" ; then
7290 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7291 CFLAGS="${CFLAGS}$cf_new_cflags"
7295 if test -n "$cf_new_cppflags" ; then
7297 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7298 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7302 if test -n "$cf_new_extra_cppflags" ; then
7304 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7305 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7312 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7314 for cf_add_1lib in $cf_add_0lib; do
7315 for cf_add_2lib in $cf_add_libs; do
7316 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7321 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7325 cat >"conftest.$ac_ext" <<_ACEOF
7326 #line 7326 "configure"
7327 #include "confdefs.h"
7328 #include <${cf_cv_ncurses_header:-curses.h}>
7332 initscr(); mousemask(0,0); tigetstr((char *)0);
7337 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7338 if { (eval echo "$as_me:7338: \"$ac_link\"") >&5
7339 (eval $ac_link) 2>&5
7341 echo "$as_me:7341: \$? = $ac_status" >&5
7342 (exit "$ac_status"); } &&
7343 { ac_try='test -s "conftest$ac_exeext"'
7344 { (eval echo "$as_me:7344: \"$ac_try\"") >&5
7347 echo "$as_me:7347: \$? = $ac_status" >&5
7348 (exit "$ac_status"); }; }; then
7349 if test "$cross_compiling" = yes; then
7350 cf_have_ncuconfig=maybe
7352 cat >"conftest.$ac_ext" <<_ACEOF
7353 #line 7353 "configure"
7354 #include "confdefs.h"
7355 #include <${cf_cv_ncurses_header:-curses.h}>
7357 { char *xx = curses_version(); return (xx == 0); }
7359 rm -f "conftest$ac_exeext"
7360 if { (eval echo "$as_me:7360: \"$ac_link\"") >&5
7361 (eval $ac_link) 2>&5
7363 echo "$as_me:7363: \$? = $ac_status" >&5
7364 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7365 { (eval echo "$as_me:7365: \"$ac_try\"") >&5
7368 echo "$as_me:7368: \$? = $ac_status" >&5
7369 (exit "$ac_status"); }; }; then
7370 cf_have_ncuconfig=yes
7372 echo "$as_me: program exited with status $ac_status" >&5
7373 echo "$as_me: failed program was:" >&5
7374 cat "conftest.$ac_ext" >&5
7375 cf_have_ncuconfig=no
7377 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7380 echo "$as_me: failed program was:" >&5
7381 cat "conftest.$ac_ext" >&5
7382 cf_have_ncuconfig=no
7384 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7385 echo "$as_me:7385: result: $cf_have_ncuconfig" >&5
7386 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7387 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7388 if test "$cf_have_ncuconfig" != "yes"
7390 CPPFLAGS="$cf_save_CPPFLAGS"
7391 LIBS="$cf_save_LIBS"
7392 NCURSES_CONFIG_PKG=none
7395 cat >>confdefs.h <<\EOF
7399 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7401 echo "$as_me:7401: checking for terminfo header" >&5
7402 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7403 if test "${cf_cv_term_header+set}" = set; then
7404 echo $ECHO_N "(cached) $ECHO_C" >&6
7407 case "${cf_cv_ncurses_header}" in
7408 (*/ncurses.h|*/ncursesw.h)
7409 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7412 cf_term_header=term.h
7416 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7418 cat >"conftest.$ac_ext" <<_ACEOF
7419 #line 7419 "configure"
7420 #include "confdefs.h"
7422 #include <${cf_cv_ncurses_header:-curses.h}>
7428 int x = auto_left_margin; (void)x
7433 rm -f "conftest.$ac_objext"
7434 if { (eval echo "$as_me:7434: \"$ac_compile\"") >&5
7435 (eval $ac_compile) 2>&5
7437 echo "$as_me:7437: \$? = $ac_status" >&5
7438 (exit "$ac_status"); } &&
7439 { ac_try='test -s "conftest.$ac_objext"'
7440 { (eval echo "$as_me:7440: \"$ac_try\"") >&5
7443 echo "$as_me:7443: \$? = $ac_status" >&5
7444 (exit "$ac_status"); }; }; then
7446 cf_cv_term_header="$cf_test"
7448 echo "$as_me: failed program was:" >&5
7449 cat "conftest.$ac_ext" >&5
7451 cf_cv_term_header=unknown
7454 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7455 test "$cf_cv_term_header" != unknown && break
7459 echo "$as_me:7459: result: $cf_cv_term_header" >&5
7460 echo "${ECHO_T}$cf_cv_term_header" >&6
7462 # Set definitions to allow ifdef'ing to accommodate subdirectories
7464 case "$cf_cv_term_header" in
7467 cat >>confdefs.h <<\EOF
7468 #define HAVE_TERM_H 1
7474 case "$cf_cv_term_header" in
7477 cat >>confdefs.h <<\EOF
7478 #define HAVE_NCURSES_TERM_H 1
7484 cat >>confdefs.h <<\EOF
7485 #define HAVE_NCURSESW_TERM_H 1
7494 echo "$as_me:7494: result: no" >&5
7495 echo "${ECHO_T}no" >&6
7496 NCURSES_CONFIG_PKG=none
7499 NCURSES_CONFIG_PKG=none
7502 if test "x$cf_have_ncuconfig" = "xno"; then
7503 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7505 if test -n "$ac_tool_prefix"; then
7506 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7508 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7509 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7510 echo "$as_me:7510: checking for $ac_word" >&5
7511 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7512 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7513 echo $ECHO_N "(cached) $ECHO_C" >&6
7515 if test -n "$NCURSES_CONFIG"; then
7516 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7518 ac_save_IFS=$IFS; IFS=$ac_path_separator
7520 for ac_dir in $ac_dummy; do
7522 test -z "$ac_dir" && ac_dir=.
7523 $as_executable_p "$ac_dir/$ac_word" || continue
7524 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7525 echo "$as_me:7525: found $ac_dir/$ac_word" >&5
7531 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7532 if test -n "$NCURSES_CONFIG"; then
7533 echo "$as_me:7533: result: $NCURSES_CONFIG" >&5
7534 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7536 echo "$as_me:7536: result: no" >&5
7537 echo "${ECHO_T}no" >&6
7540 test -n "$NCURSES_CONFIG" && break
7543 if test -z "$NCURSES_CONFIG"; then
7544 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7545 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7547 # Extract the first word of "$ac_prog", so it can be a program name with args.
7548 set dummy $ac_prog; ac_word=$2
7549 echo "$as_me:7549: checking for $ac_word" >&5
7550 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7551 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7552 echo $ECHO_N "(cached) $ECHO_C" >&6
7554 if test -n "$ac_ct_NCURSES_CONFIG"; then
7555 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7557 ac_save_IFS=$IFS; IFS=$ac_path_separator
7559 for ac_dir in $ac_dummy; do
7561 test -z "$ac_dir" && ac_dir=.
7562 $as_executable_p "$ac_dir/$ac_word" || continue
7563 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7564 echo "$as_me:7564: found $ac_dir/$ac_word" >&5
7570 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7571 if test -n "$ac_ct_NCURSES_CONFIG"; then
7572 echo "$as_me:7572: result: $ac_ct_NCURSES_CONFIG" >&5
7573 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7575 echo "$as_me:7575: result: no" >&5
7576 echo "${ECHO_T}no" >&6
7579 test -n "$ac_ct_NCURSES_CONFIG" && break
7581 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7583 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7586 if test "$NCURSES_CONFIG" != none ; then
7591 cf_new_extra_cppflags=
7593 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7595 case "$cf_fix_cppflags" in
7597 case "$cf_add_cflags" in
7598 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7599 case "$cf_add_cflags" in
7601 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7603 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7604 && test -z "${cf_tst_cflags}" \
7605 && cf_fix_cppflags=yes
7607 if test "$cf_fix_cppflags" = yes ; then
7609 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7610 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7613 elif test "${cf_tst_cflags}" = "\"'" ; then
7615 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7616 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7626 case "$cf_add_cflags" in
7628 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7630 CPPFLAGS=`echo "$CPPFLAGS" | \
7631 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7632 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7637 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7638 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7645 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7646 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7653 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7654 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7656 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7658 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7659 && test -z "${cf_tst_cflags}" \
7660 && cf_fix_cppflags=no
7665 if test -n "$cf_new_cflags" ; then
7667 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7668 CFLAGS="${CFLAGS}$cf_new_cflags"
7672 if test -n "$cf_new_cppflags" ; then
7674 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7675 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7679 if test -n "$cf_new_extra_cppflags" ; then
7681 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7682 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7689 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7691 for cf_add_1lib in $cf_add_0lib; do
7692 for cf_add_2lib in $cf_add_libs; do
7693 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7698 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7702 # even with config script, some packages use no-override for curses.h
7704 echo "$as_me:7704: checking if we have identified curses headers" >&5
7705 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7706 if test "${cf_cv_ncurses_header+set}" = set; then
7707 echo $ECHO_N "(cached) $ECHO_C" >&6
7710 cf_cv_ncurses_header=none
7712 ncurses.h ncursesw/ncurses.h \
7713 curses.h ncursesw/curses.h
7715 cat >"conftest.$ac_ext" <<_ACEOF
7716 #line 7716 "configure"
7717 #include "confdefs.h"
7718 #include <${cf_header}>
7722 initscr(); tgoto("?", 0,0)
7727 rm -f "conftest.$ac_objext"
7728 if { (eval echo "$as_me:7728: \"$ac_compile\"") >&5
7729 (eval $ac_compile) 2>&5
7731 echo "$as_me:7731: \$? = $ac_status" >&5
7732 (exit "$ac_status"); } &&
7733 { ac_try='test -s "conftest.$ac_objext"'
7734 { (eval echo "$as_me:7734: \"$ac_try\"") >&5
7737 echo "$as_me:7737: \$? = $ac_status" >&5
7738 (exit "$ac_status"); }; }; then
7739 cf_cv_ncurses_header=$cf_header; break
7741 echo "$as_me: failed program was:" >&5
7742 cat "conftest.$ac_ext" >&5
7744 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7748 echo "$as_me:7748: result: $cf_cv_ncurses_header" >&5
7749 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7751 if test "$cf_cv_ncurses_header" = none ; then
7752 { { echo "$as_me:7752: error: No curses header-files found" >&5
7753 echo "$as_me: error: No curses header-files found" >&2;}
7754 { (exit 1); exit 1; }; }
7757 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7759 for ac_header in $cf_cv_ncurses_header
7761 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7762 echo "$as_me:7762: checking for $ac_header" >&5
7763 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7764 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7765 echo $ECHO_N "(cached) $ECHO_C" >&6
7767 cat >"conftest.$ac_ext" <<_ACEOF
7768 #line 7768 "configure"
7769 #include "confdefs.h"
7770 #include <$ac_header>
7772 if { (eval echo "$as_me:7772: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7773 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7775 $EGREP -v '^ *\+' conftest.er1 >conftest.err
7777 cat conftest.err >&5
7778 echo "$as_me:7778: \$? = $ac_status" >&5
7779 (exit "$ac_status"); } >/dev/null; then
7780 if test -s conftest.err; then
7781 ac_cpp_err=$ac_c_preproc_warn_flag
7788 if test -z "$ac_cpp_err"; then
7789 eval "$as_ac_Header=yes"
7791 echo "$as_me: failed program was:" >&5
7792 cat "conftest.$ac_ext" >&5
7793 eval "$as_ac_Header=no"
7795 rm -f conftest.err "conftest.$ac_ext"
7797 echo "$as_me:7797: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7798 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7799 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7800 cat >>confdefs.h <<EOF
7801 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7807 cat >>confdefs.h <<\EOF
7811 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7813 cat >>confdefs.h <<EOF
7814 #define $cf_nculib_ROOT 1
7817 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
7821 cf_ncuhdr_root=ncursesw
7823 test -n "$cf_cv_curses_dir" && \
7824 test "$cf_cv_curses_dir" != "no" && { \
7826 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7827 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7829 while test "$cf_add_incdir" != /usr/include
7831 if test -d "$cf_add_incdir"
7834 if test -n "$CFLAGS$CPPFLAGS" ; then
7835 # a loop is needed to ensure we can add subdirs of existing dirs
7836 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7837 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7838 cf_have_incdir=yes; break
7843 if test "$cf_have_incdir" = no ; then
7844 if test "$cf_add_incdir" = /usr/local/include ; then
7845 if test "$GCC" = yes
7847 cf_save_CPPFLAGS=$CPPFLAGS
7849 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7850 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7852 cat >"conftest.$ac_ext" <<_ACEOF
7853 #line 7853 "configure"
7854 #include "confdefs.h"
7864 rm -f "conftest.$ac_objext"
7865 if { (eval echo "$as_me:7865: \"$ac_compile\"") >&5
7866 (eval $ac_compile) 2>&5
7868 echo "$as_me:7868: \$? = $ac_status" >&5
7869 (exit "$ac_status"); } &&
7870 { ac_try='test -s "conftest.$ac_objext"'
7871 { (eval echo "$as_me:7871: \"$ac_try\"") >&5
7874 echo "$as_me:7874: \$? = $ac_status" >&5
7875 (exit "$ac_status"); }; }; then
7878 echo "$as_me: failed program was:" >&5
7879 cat "conftest.$ac_ext" >&5
7882 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7883 CPPFLAGS=$cf_save_CPPFLAGS
7888 if test "$cf_have_incdir" = no ; then
7889 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7891 echo "${as_me:-configure}:7891: testing adding $cf_add_incdir to include-path ..." 1>&5
7893 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7895 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7896 test "$cf_top_incdir" = "$cf_add_incdir" && break
7897 cf_add_incdir="$cf_top_incdir"
7910 echo "$as_me:7910: checking for $cf_ncuhdr_root header in include-path" >&5
7911 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
7912 if test "${cf_cv_ncurses_h+set}" = set; then
7913 echo $ECHO_N "(cached) $ECHO_C" >&6
7916 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
7917 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
7918 for cf_header in $cf_header_list
7921 cat >"conftest.$ac_ext" <<_ACEOF
7922 #line 7922 "configure"
7923 #include "confdefs.h"
7925 #define _XOPEN_SOURCE_EXTENDED
7926 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
7927 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
7929 #include <$cf_header>
7934 #ifdef NCURSES_VERSION
7940 printf("%s\\n", NCURSES_VERSION);
7953 rm -f "conftest.$ac_objext"
7954 if { (eval echo "$as_me:7954: \"$ac_compile\"") >&5
7955 (eval $ac_compile) 2>&5
7957 echo "$as_me:7957: \$? = $ac_status" >&5
7958 (exit "$ac_status"); } &&
7959 { ac_try='test -s "conftest.$ac_objext"'
7960 { (eval echo "$as_me:7960: \"$ac_try\"") >&5
7963 echo "$as_me:7963: \$? = $ac_status" >&5
7964 (exit "$ac_status"); }; }; then
7965 cf_cv_ncurses_h=$cf_header
7968 echo "$as_me: failed program was:" >&5
7969 cat "conftest.$ac_ext" >&5
7972 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7974 test "$cf_cv_ncurses_h" != no && break
7978 echo "$as_me:7978: result: $cf_cv_ncurses_h" >&5
7979 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
7981 if test "$cf_cv_ncurses_h" != no ; then
7982 cf_cv_ncurses_header=$cf_cv_ncurses_h
7985 echo "$as_me:7985: checking for $cf_ncuhdr_root include-path" >&5
7986 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
7987 if test "${cf_cv_ncurses_h2+set}" = set; then
7988 echo $ECHO_N "(cached) $ECHO_C" >&6
7991 test -n "$verbose" && echo
7995 # collect the current set of include-directories from compiler flags
7996 cf_header_path_list=""
7997 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7998 for cf_header_path in $CPPFLAGS $CFLAGS
8000 case "$cf_header_path" in
8002 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8004 test "x$cf_header_path" != "xNONE" && \
8005 test -d "$cf_header_path" && \
8007 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8008 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8009 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8010 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8011 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8012 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"
8015 cf_header_path_list="$cf_header_path_list $cf_search"
8021 # add the variations for the package we are looking for
8025 test "x$prefix" != "xNONE" && \
8026 test -d "$prefix" && \
8028 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8029 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8030 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8031 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8032 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8033 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8036 for cf_subdir_prefix in \
8045 test "x$cf_subdir_prefix" != "x$prefix" && \
8046 test -d "$cf_subdir_prefix" && \
8047 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8048 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8049 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8050 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8051 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8052 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8053 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"
8058 test "$includedir" != NONE && \
8059 test "$includedir" != "/usr/include" && \
8060 test -d "$includedir" && {
8061 test -d "$includedir" && cf_search="$cf_search $includedir"
8062 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8065 test "$oldincludedir" != NONE && \
8066 test "$oldincludedir" != "/usr/include" && \
8067 test -d "$oldincludedir" && {
8068 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8069 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8072 cf_search="$cf_search $cf_header_path_list"
8074 test -n "$verbose" && echo "search path $cf_search"
8075 cf_save2_CPPFLAGS="$CPPFLAGS"
8076 for cf_incdir in $cf_search
8079 if test -n "$cf_incdir" ; then
8080 for cf_add_incdir in $cf_incdir
8082 while test "$cf_add_incdir" != /usr/include
8084 if test -d "$cf_add_incdir"
8087 if test -n "$CFLAGS$CPPFLAGS" ; then
8088 # a loop is needed to ensure we can add subdirs of existing dirs
8089 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8090 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8091 cf_have_incdir=yes; break
8096 if test "$cf_have_incdir" = no ; then
8097 if test "$cf_add_incdir" = /usr/local/include ; then
8098 if test "$GCC" = yes
8100 cf_save_CPPFLAGS=$CPPFLAGS
8102 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8103 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8105 cat >"conftest.$ac_ext" <<_ACEOF
8106 #line 8106 "configure"
8107 #include "confdefs.h"
8117 rm -f "conftest.$ac_objext"
8118 if { (eval echo "$as_me:8118: \"$ac_compile\"") >&5
8119 (eval $ac_compile) 2>&5
8121 echo "$as_me:8121: \$? = $ac_status" >&5
8122 (exit "$ac_status"); } &&
8123 { ac_try='test -s "conftest.$ac_objext"'
8124 { (eval echo "$as_me:8124: \"$ac_try\"") >&5
8127 echo "$as_me:8127: \$? = $ac_status" >&5
8128 (exit "$ac_status"); }; }; then
8131 echo "$as_me: failed program was:" >&5
8132 cat "conftest.$ac_ext" >&5
8135 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8136 CPPFLAGS=$cf_save_CPPFLAGS
8141 if test "$cf_have_incdir" = no ; then
8142 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8144 echo "${as_me:-configure}:8144: testing adding $cf_add_incdir to include-path ..." 1>&5
8146 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8148 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8149 test "$cf_top_incdir" = "$cf_add_incdir" && break
8150 cf_add_incdir="$cf_top_incdir"
8166 cat >"conftest.$ac_ext" <<_ACEOF
8167 #line 8167 "configure"
8168 #include "confdefs.h"
8170 #include <$cf_header>
8175 #ifdef NCURSES_VERSION
8177 printf("%s\\n", NCURSES_VERSION);
8190 rm -f "conftest.$ac_objext"
8191 if { (eval echo "$as_me:8191: \"$ac_compile\"") >&5
8192 (eval $ac_compile) 2>&5
8194 echo "$as_me:8194: \$? = $ac_status" >&5
8195 (exit "$ac_status"); } &&
8196 { ac_try='test -s "conftest.$ac_objext"'
8197 { (eval echo "$as_me:8197: \"$ac_try\"") >&5
8200 echo "$as_me:8200: \$? = $ac_status" >&5
8201 (exit "$ac_status"); }; }; then
8202 cf_cv_ncurses_h2=$cf_header
8205 echo "$as_me: failed program was:" >&5
8206 cat "conftest.$ac_ext" >&5
8209 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8211 if test "$cf_cv_ncurses_h2" != no ; then
8212 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8213 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
8216 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8218 CPPFLAGS="$cf_save2_CPPFLAGS"
8219 test "$cf_cv_ncurses_h2" != no && break
8221 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8221: error: not found" >&5
8222 echo "$as_me: error: not found" >&2;}
8223 { (exit 1); exit 1; }; }
8226 echo "$as_me:8226: result: $cf_cv_ncurses_h2" >&5
8227 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8229 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
8230 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
8231 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
8232 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
8235 if test -n "$cf_1st_incdir" ; then
8236 for cf_add_incdir in $cf_1st_incdir
8238 while test "$cf_add_incdir" != /usr/include
8240 if test -d "$cf_add_incdir"
8243 if test -n "$CFLAGS$CPPFLAGS" ; then
8244 # a loop is needed to ensure we can add subdirs of existing dirs
8245 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8246 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8247 cf_have_incdir=yes; break
8252 if test "$cf_have_incdir" = no ; then
8253 if test "$cf_add_incdir" = /usr/local/include ; then
8254 if test "$GCC" = yes
8256 cf_save_CPPFLAGS=$CPPFLAGS
8258 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8259 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8261 cat >"conftest.$ac_ext" <<_ACEOF
8262 #line 8262 "configure"
8263 #include "confdefs.h"
8273 rm -f "conftest.$ac_objext"
8274 if { (eval echo "$as_me:8274: \"$ac_compile\"") >&5
8275 (eval $ac_compile) 2>&5
8277 echo "$as_me:8277: \$? = $ac_status" >&5
8278 (exit "$ac_status"); } &&
8279 { ac_try='test -s "conftest.$ac_objext"'
8280 { (eval echo "$as_me:8280: \"$ac_try\"") >&5
8283 echo "$as_me:8283: \$? = $ac_status" >&5
8284 (exit "$ac_status"); }; }; then
8287 echo "$as_me: failed program was:" >&5
8288 cat "conftest.$ac_ext" >&5
8291 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8292 CPPFLAGS=$cf_save_CPPFLAGS
8297 if test "$cf_have_incdir" = no ; then
8298 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8300 echo "${as_me:-configure}:8300: testing adding $cf_add_incdir to include-path ..." 1>&5
8302 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8304 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8305 test "$cf_top_incdir" = "$cf_add_incdir" && break
8306 cf_add_incdir="$cf_top_incdir"
8319 # Set definitions to allow ifdef'ing for ncurses.h
8321 case "$cf_cv_ncurses_header" in
8324 cat >>confdefs.h <<\EOF
8325 #define HAVE_NCURSES_H 1
8331 case "$cf_cv_ncurses_header" in
8332 (ncurses/curses.h|ncurses/ncurses.h)
8334 cat >>confdefs.h <<\EOF
8335 #define HAVE_NCURSES_NCURSES_H 1
8339 (ncursesw/curses.h|ncursesw/ncurses.h)
8341 cat >>confdefs.h <<\EOF
8342 #define HAVE_NCURSESW_NCURSES_H 1
8348 echo "$as_me:8348: checking for terminfo header" >&5
8349 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8350 if test "${cf_cv_term_header+set}" = set; then
8351 echo $ECHO_N "(cached) $ECHO_C" >&6
8354 case "${cf_cv_ncurses_header}" in
8355 (*/ncurses.h|*/ncursesw.h)
8356 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8359 cf_term_header=term.h
8363 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8365 cat >"conftest.$ac_ext" <<_ACEOF
8366 #line 8366 "configure"
8367 #include "confdefs.h"
8369 #include <${cf_cv_ncurses_header:-curses.h}>
8375 int x = auto_left_margin; (void)x
8380 rm -f "conftest.$ac_objext"
8381 if { (eval echo "$as_me:8381: \"$ac_compile\"") >&5
8382 (eval $ac_compile) 2>&5
8384 echo "$as_me:8384: \$? = $ac_status" >&5
8385 (exit "$ac_status"); } &&
8386 { ac_try='test -s "conftest.$ac_objext"'
8387 { (eval echo "$as_me:8387: \"$ac_try\"") >&5
8390 echo "$as_me:8390: \$? = $ac_status" >&5
8391 (exit "$ac_status"); }; }; then
8393 cf_cv_term_header="$cf_test"
8395 echo "$as_me: failed program was:" >&5
8396 cat "conftest.$ac_ext" >&5
8398 cf_cv_term_header=unknown
8401 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8402 test "$cf_cv_term_header" != unknown && break
8406 echo "$as_me:8406: result: $cf_cv_term_header" >&5
8407 echo "${ECHO_T}$cf_cv_term_header" >&6
8409 # Set definitions to allow ifdef'ing to accommodate subdirectories
8411 case "$cf_cv_term_header" in
8414 cat >>confdefs.h <<\EOF
8415 #define HAVE_TERM_H 1
8421 case "$cf_cv_term_header" in
8424 cat >>confdefs.h <<\EOF
8425 #define HAVE_NCURSES_TERM_H 1
8431 cat >>confdefs.h <<\EOF
8432 #define HAVE_NCURSESW_TERM_H 1
8438 # some applications need this, but should check for NCURSES_VERSION
8440 cat >>confdefs.h <<\EOF
8444 echo "$as_me:8444: checking for ncurses version" >&5
8445 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8446 if test "${cf_cv_ncurses_version+set}" = set; then
8447 echo $ECHO_N "(cached) $ECHO_C" >&6
8450 cf_cv_ncurses_version=no
8452 rm -f "$cf_tempfile"
8453 if test "$cross_compiling" = yes; then
8455 # This will not work if the preprocessor splits the line after the
8456 # Autoconf token. The 'unproto' program does that.
8457 cat > "conftest.$ac_ext" <<EOF
8458 #include <${cf_cv_ncurses_header:-curses.h}>
8460 #ifdef NCURSES_VERSION
8461 Autoconf NCURSES_VERSION
8469 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8470 { (eval echo "$as_me:8470: \"$cf_try\"") >&5
8473 echo "$as_me:8473: \$? = $ac_status" >&5
8474 (exit "$ac_status"); }
8475 if test -f conftest.out ; then
8476 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
8477 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8482 cat >"conftest.$ac_ext" <<_ACEOF
8483 #line 8483 "configure"
8484 #include "confdefs.h"
8486 #include <${cf_cv_ncurses_header:-curses.h}>
8490 FILE *fp = fopen("$cf_tempfile", "w");
8491 #ifdef NCURSES_VERSION
8492 # ifdef NCURSES_VERSION_PATCH
8493 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8495 fprintf(fp, "%s\\n", NCURSES_VERSION);
8499 fprintf(fp, "old\\n");
8504 ${cf_cv_main_return:-return}(0);
8507 rm -f "conftest$ac_exeext"
8508 if { (eval echo "$as_me:8508: \"$ac_link\"") >&5
8509 (eval $ac_link) 2>&5
8511 echo "$as_me:8511: \$? = $ac_status" >&5
8512 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8513 { (eval echo "$as_me:8513: \"$ac_try\"") >&5
8516 echo "$as_me:8516: \$? = $ac_status" >&5
8517 (exit "$ac_status"); }; }; then
8519 cf_cv_ncurses_version=`cat $cf_tempfile`
8521 echo "$as_me: program exited with status $ac_status" >&5
8522 echo "$as_me: failed program was:" >&5
8523 cat "conftest.$ac_ext" >&5
8525 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8527 rm -f "$cf_tempfile"
8530 echo "$as_me:8530: result: $cf_cv_ncurses_version" >&5
8531 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8532 test "$cf_cv_ncurses_version" = no ||
8533 cat >>confdefs.h <<\EOF
8537 cf_nculib_root=ncursesw
8538 # This works, except for the special case where we find gpm, but
8539 # ncurses is in a nonstandard location via $LIBS, and we really want
8542 cf_ncurses_SAVE="$LIBS"
8543 echo "$as_me:8543: checking for Gpm_Open in -lgpm" >&5
8544 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8545 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8546 echo $ECHO_N "(cached) $ECHO_C" >&6
8548 ac_check_lib_save_LIBS=$LIBS
8550 cat >"conftest.$ac_ext" <<_ACEOF
8551 #line 8551 "configure"
8552 #include "confdefs.h"
8554 /* Override any gcc2 internal prototype to avoid an error. */
8558 /* We use char because int might match the return type of a gcc2
8559 builtin and then its argument prototype would still apply. */
8569 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8570 if { (eval echo "$as_me:8570: \"$ac_link\"") >&5
8571 (eval $ac_link) 2>&5
8573 echo "$as_me:8573: \$? = $ac_status" >&5
8574 (exit "$ac_status"); } &&
8575 { ac_try='test -s "conftest$ac_exeext"'
8576 { (eval echo "$as_me:8576: \"$ac_try\"") >&5
8579 echo "$as_me:8579: \$? = $ac_status" >&5
8580 (exit "$ac_status"); }; }; then
8581 ac_cv_lib_gpm_Gpm_Open=yes
8583 echo "$as_me: failed program was:" >&5
8584 cat "conftest.$ac_ext" >&5
8585 ac_cv_lib_gpm_Gpm_Open=no
8587 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8588 LIBS=$ac_check_lib_save_LIBS
8590 echo "$as_me:8590: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8591 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8592 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
8593 echo "$as_me:8593: checking for initscr in -lgpm" >&5
8594 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8595 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8596 echo $ECHO_N "(cached) $ECHO_C" >&6
8598 ac_check_lib_save_LIBS=$LIBS
8600 cat >"conftest.$ac_ext" <<_ACEOF
8601 #line 8601 "configure"
8602 #include "confdefs.h"
8604 /* Override any gcc2 internal prototype to avoid an error. */
8608 /* We use char because int might match the return type of a gcc2
8609 builtin and then its argument prototype would still apply. */
8619 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8620 if { (eval echo "$as_me:8620: \"$ac_link\"") >&5
8621 (eval $ac_link) 2>&5
8623 echo "$as_me:8623: \$? = $ac_status" >&5
8624 (exit "$ac_status"); } &&
8625 { ac_try='test -s "conftest$ac_exeext"'
8626 { (eval echo "$as_me:8626: \"$ac_try\"") >&5
8629 echo "$as_me:8629: \$? = $ac_status" >&5
8630 (exit "$ac_status"); }; }; then
8631 ac_cv_lib_gpm_initscr=yes
8633 echo "$as_me: failed program was:" >&5
8634 cat "conftest.$ac_ext" >&5
8635 ac_cv_lib_gpm_initscr=no
8637 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8638 LIBS=$ac_check_lib_save_LIBS
8640 echo "$as_me:8640: result: $ac_cv_lib_gpm_initscr" >&5
8641 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8642 if test "$ac_cv_lib_gpm_initscr" = yes; then
8643 LIBS="$cf_ncurses_SAVE"
8645 cf_ncurses_LIBS="-lgpm"
8652 # This is only necessary if you are linking against an obsolete
8653 # version of ncurses (but it should do no harm, since it's static).
8654 if test "$cf_nculib_root" = ncurses ; then
8655 echo "$as_me:8655: checking for tgoto in -lmytinfo" >&5
8656 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8657 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8658 echo $ECHO_N "(cached) $ECHO_C" >&6
8660 ac_check_lib_save_LIBS=$LIBS
8661 LIBS="-lmytinfo $LIBS"
8662 cat >"conftest.$ac_ext" <<_ACEOF
8663 #line 8663 "configure"
8664 #include "confdefs.h"
8666 /* Override any gcc2 internal prototype to avoid an error. */
8670 /* We use char because int might match the return type of a gcc2
8671 builtin and then its argument prototype would still apply. */
8681 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8682 if { (eval echo "$as_me:8682: \"$ac_link\"") >&5
8683 (eval $ac_link) 2>&5
8685 echo "$as_me:8685: \$? = $ac_status" >&5
8686 (exit "$ac_status"); } &&
8687 { ac_try='test -s "conftest$ac_exeext"'
8688 { (eval echo "$as_me:8688: \"$ac_try\"") >&5
8691 echo "$as_me:8691: \$? = $ac_status" >&5
8692 (exit "$ac_status"); }; }; then
8693 ac_cv_lib_mytinfo_tgoto=yes
8695 echo "$as_me: failed program was:" >&5
8696 cat "conftest.$ac_ext" >&5
8697 ac_cv_lib_mytinfo_tgoto=no
8699 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8700 LIBS=$ac_check_lib_save_LIBS
8702 echo "$as_me:8702: result: $ac_cv_lib_mytinfo_tgoto" >&5
8703 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8704 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
8705 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8715 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8717 for cf_add_1lib in $cf_add_0lib; do
8718 for cf_add_2lib in $cf_add_libs; do
8719 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8724 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8728 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
8734 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8736 for cf_add_1lib in $cf_add_0lib; do
8737 for cf_add_2lib in $cf_add_libs; do
8738 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8743 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8749 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
8751 echo "$as_me:8751: checking for initscr" >&5
8752 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8753 if test "${ac_cv_func_initscr+set}" = set; then
8754 echo $ECHO_N "(cached) $ECHO_C" >&6
8756 cat >"conftest.$ac_ext" <<_ACEOF
8757 #line 8757 "configure"
8758 #include "confdefs.h"
8759 #define initscr autoconf_temporary
8760 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
8767 /* We use char because int might match the return type of a gcc2
8768 builtin and then its argument prototype would still apply. */
8769 char initscr (void);
8775 /* The GNU C library defines stubs for functions which it implements
8776 to always fail with ENOSYS. Some functions are actually named
8777 something starting with __ and the normal name is an alias. */
8778 #if defined (__stub_initscr) || defined (__stub___initscr)
8779 #error found stub for initscr
8787 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8788 if { (eval echo "$as_me:8788: \"$ac_link\"") >&5
8789 (eval $ac_link) 2>&5
8791 echo "$as_me:8791: \$? = $ac_status" >&5
8792 (exit "$ac_status"); } &&
8793 { ac_try='test -s "conftest$ac_exeext"'
8794 { (eval echo "$as_me:8794: \"$ac_try\"") >&5
8797 echo "$as_me:8797: \$? = $ac_status" >&5
8798 (exit "$ac_status"); }; }; then
8799 ac_cv_func_initscr=yes
8801 echo "$as_me: failed program was:" >&5
8802 cat "conftest.$ac_ext" >&5
8803 ac_cv_func_initscr=no
8805 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8807 echo "$as_me:8807: result: $ac_cv_func_initscr" >&5
8808 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8809 if test "$ac_cv_func_initscr" = yes; then
8810 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
8813 cf_save_LIBS="$LIBS"
8814 echo "$as_me:8814: checking for initscr in -l$cf_nculib_root" >&5
8815 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8816 LIBS="-l$cf_nculib_root $LIBS"
8817 cat >"conftest.$ac_ext" <<_ACEOF
8818 #line 8818 "configure"
8819 #include "confdefs.h"
8820 #include <${cf_cv_ncurses_header:-curses.h}>
8829 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8830 if { (eval echo "$as_me:8830: \"$ac_link\"") >&5
8831 (eval $ac_link) 2>&5
8833 echo "$as_me:8833: \$? = $ac_status" >&5
8834 (exit "$ac_status"); } &&
8835 { ac_try='test -s "conftest$ac_exeext"'
8836 { (eval echo "$as_me:8836: \"$ac_try\"") >&5
8839 echo "$as_me:8839: \$? = $ac_status" >&5
8840 (exit "$ac_status"); }; }; then
8841 echo "$as_me:8841: result: yes" >&5
8842 echo "${ECHO_T}yes" >&6
8843 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
8846 echo "$as_me: failed program was:" >&5
8847 cat "conftest.$ac_ext" >&5
8848 echo "$as_me:8848: result: no" >&5
8849 echo "${ECHO_T}no" >&6
8852 cf_library_path_list=""
8853 if test -n "${LDFLAGS}${LIBS}" ; then
8854 for cf_library_path in $LDFLAGS $LIBS
8856 case "$cf_library_path" in
8858 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8860 test "x$cf_library_path" != "xNONE" && \
8861 test -d "$cf_library_path" && \
8863 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8864 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
8865 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
8866 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
8867 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
8868 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"
8871 cf_library_path_list="$cf_library_path_list $cf_search"
8879 test "x$prefix" != "xNONE" && \
8880 test -d "$prefix" && \
8882 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8883 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
8884 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
8885 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
8886 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
8887 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
8890 for cf_subdir_prefix in \
8899 test "x$cf_subdir_prefix" != "x$prefix" && \
8900 test -d "$cf_subdir_prefix" && \
8901 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8902 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
8903 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
8904 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
8905 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
8906 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
8907 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"
8912 cf_search="$cf_library_path_list $cf_search"
8914 for cf_libdir in $cf_search
8916 echo "$as_me:8916: checking for -l$cf_nculib_root in $cf_libdir" >&5
8917 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
8918 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
8919 cat >"conftest.$ac_ext" <<_ACEOF
8920 #line 8920 "configure"
8921 #include "confdefs.h"
8922 #include <${cf_cv_ncurses_header:-curses.h}>
8931 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8932 if { (eval echo "$as_me:8932: \"$ac_link\"") >&5
8933 (eval $ac_link) 2>&5
8935 echo "$as_me:8935: \$? = $ac_status" >&5
8936 (exit "$ac_status"); } &&
8937 { ac_try='test -s "conftest$ac_exeext"'
8938 { (eval echo "$as_me:8938: \"$ac_try\"") >&5
8941 echo "$as_me:8941: \$? = $ac_status" >&5
8942 (exit "$ac_status"); }; }; then
8943 echo "$as_me:8943: result: yes" >&5
8944 echo "${ECHO_T}yes" >&6
8945 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
8948 echo "$as_me: failed program was:" >&5
8949 cat "conftest.$ac_ext" >&5
8950 echo "$as_me:8950: result: no" >&5
8951 echo "${ECHO_T}no" >&6
8952 LIBS="$cf_save_LIBS"
8954 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8958 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8962 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
8964 if test "$cf_found_library" = no ; then
8965 { { echo "$as_me:8965: error: Cannot link $cf_nculib_root library" >&5
8966 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
8967 { (exit 1); exit 1; }; }
8972 if test -n "$cf_ncurses_LIBS" ; then
8973 echo "$as_me:8973: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
8974 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
8975 cf_ncurses_SAVE="$LIBS"
8976 for p in $cf_ncurses_LIBS ; do
8977 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
8978 if test "$q" != "$LIBS" ; then
8982 cat >"conftest.$ac_ext" <<_ACEOF
8983 #line 8983 "configure"
8984 #include "confdefs.h"
8985 #include <${cf_cv_ncurses_header:-curses.h}>
8989 initscr(); mousemask(0,0); tigetstr((char *)0);
8994 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8995 if { (eval echo "$as_me:8995: \"$ac_link\"") >&5
8996 (eval $ac_link) 2>&5
8998 echo "$as_me:8998: \$? = $ac_status" >&5
8999 (exit "$ac_status"); } &&
9000 { ac_try='test -s "conftest$ac_exeext"'
9001 { (eval echo "$as_me:9001: \"$ac_try\"") >&5
9004 echo "$as_me:9004: \$? = $ac_status" >&5
9005 (exit "$ac_status"); }; }; then
9006 echo "$as_me:9006: result: yes" >&5
9007 echo "${ECHO_T}yes" >&6
9009 echo "$as_me: failed program was:" >&5
9010 cat "conftest.$ac_ext" >&5
9011 echo "$as_me:9011: result: no" >&5
9012 echo "${ECHO_T}no" >&6
9013 LIBS="$cf_ncurses_SAVE"
9015 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9018 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9020 cat >>confdefs.h <<EOF
9021 #define $cf_nculib_ROOT 1
9031 cf_ncuconfig_root=ncurses
9032 cf_have_ncuconfig=no
9034 if test "x${PKG_CONFIG:=none}" != xnone; then
9035 echo "$as_me:9035: checking pkg-config for $cf_ncuconfig_root" >&5
9036 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9037 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9038 echo "$as_me:9038: result: yes" >&5
9039 echo "${ECHO_T}yes" >&6
9041 echo "$as_me:9041: checking if the $cf_ncuconfig_root package files work" >&5
9042 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9043 cf_have_ncuconfig=unknown
9045 cf_save_CFLAGS="$CFLAGS"
9046 cf_save_CPPFLAGS="$CPPFLAGS"
9047 cf_save_LIBS="$LIBS"
9049 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
9050 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9052 # while -W for passing linker flags is prevalent, it is not "standard".
9053 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9054 # incompatible _and_ non-standard -W option which gives an error. Work
9055 # around that pitfall.
9056 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9062 cf_new_extra_cppflags=
9064 for cf_add_cflags in $cf_pkg_cflags
9066 case "$cf_fix_cppflags" in
9068 case "$cf_add_cflags" in
9069 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9070 case "$cf_add_cflags" in
9072 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9074 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9075 && test -z "${cf_tst_cflags}" \
9076 && cf_fix_cppflags=yes
9078 if test "$cf_fix_cppflags" = yes ; then
9080 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9081 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9084 elif test "${cf_tst_cflags}" = "\"'" ; then
9086 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9087 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9097 case "$cf_add_cflags" in
9099 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9101 CPPFLAGS=`echo "$CPPFLAGS" | \
9102 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9103 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9108 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9109 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9116 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9117 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9124 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9125 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9127 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9129 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9130 && test -z "${cf_tst_cflags}" \
9131 && cf_fix_cppflags=no
9136 if test -n "$cf_new_cflags" ; then
9138 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9139 CFLAGS="${CFLAGS}$cf_new_cflags"
9143 if test -n "$cf_new_cppflags" ; then
9145 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9146 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9150 if test -n "$cf_new_extra_cppflags" ; then
9152 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9153 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9160 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9162 for cf_add_1lib in $cf_add_0lib; do
9163 for cf_add_2lib in $cf_add_libs; do
9164 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9169 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9173 cat >"conftest.$ac_ext" <<_ACEOF
9174 #line 9174 "configure"
9175 #include "confdefs.h"
9176 #include <${cf_cv_ncurses_header:-curses.h}>
9180 initscr(); mousemask(0,0); tigetstr((char *)0);
9185 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9186 if { (eval echo "$as_me:9186: \"$ac_link\"") >&5
9187 (eval $ac_link) 2>&5
9189 echo "$as_me:9189: \$? = $ac_status" >&5
9190 (exit "$ac_status"); } &&
9191 { ac_try='test -s "conftest$ac_exeext"'
9192 { (eval echo "$as_me:9192: \"$ac_try\"") >&5
9195 echo "$as_me:9195: \$? = $ac_status" >&5
9196 (exit "$ac_status"); }; }; then
9197 if test "$cross_compiling" = yes; then
9198 cf_test_ncuconfig=maybe
9200 cat >"conftest.$ac_ext" <<_ACEOF
9201 #line 9201 "configure"
9202 #include "confdefs.h"
9203 #include <${cf_cv_ncurses_header:-curses.h}>
9205 { char *xx = curses_version(); return (xx == 0); }
9207 rm -f "conftest$ac_exeext"
9208 if { (eval echo "$as_me:9208: \"$ac_link\"") >&5
9209 (eval $ac_link) 2>&5
9211 echo "$as_me:9211: \$? = $ac_status" >&5
9212 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9213 { (eval echo "$as_me:9213: \"$ac_try\"") >&5
9216 echo "$as_me:9216: \$? = $ac_status" >&5
9217 (exit "$ac_status"); }; }; then
9218 cf_test_ncuconfig=yes
9220 echo "$as_me: program exited with status $ac_status" >&5
9221 echo "$as_me: failed program was:" >&5
9222 cat "conftest.$ac_ext" >&5
9223 cf_test_ncuconfig=no
9225 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9228 echo "$as_me: failed program was:" >&5
9229 cat "conftest.$ac_ext" >&5
9230 cf_test_ncuconfig=no
9232 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9234 CFLAGS="$cf_save_CFLAGS"
9235 CPPFLAGS="$cf_save_CPPFLAGS"
9236 LIBS="$cf_save_LIBS"
9238 if test "x$cf_test_ncuconfig" != xyes; then
9239 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9240 cf_pkg_cflags="$cf_temp"
9241 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9242 cf_pkg_libs="$cf_temp"
9250 cf_new_extra_cppflags=
9252 for cf_add_cflags in $cf_pkg_cflags
9254 case "$cf_fix_cppflags" in
9256 case "$cf_add_cflags" in
9257 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9258 case "$cf_add_cflags" in
9260 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9262 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9263 && test -z "${cf_tst_cflags}" \
9264 && cf_fix_cppflags=yes
9266 if test "$cf_fix_cppflags" = yes ; then
9268 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9269 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9272 elif test "${cf_tst_cflags}" = "\"'" ; then
9274 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9275 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9285 case "$cf_add_cflags" in
9287 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9289 CPPFLAGS=`echo "$CPPFLAGS" | \
9290 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9291 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9296 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9297 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9304 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9305 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9312 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9313 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9315 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9317 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9318 && test -z "${cf_tst_cflags}" \
9319 && cf_fix_cppflags=no
9324 if test -n "$cf_new_cflags" ; then
9326 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9327 CFLAGS="${CFLAGS}$cf_new_cflags"
9331 if test -n "$cf_new_cppflags" ; then
9333 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9334 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9338 if test -n "$cf_new_extra_cppflags" ; then
9340 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9341 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9348 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9350 for cf_add_1lib in $cf_add_0lib; do
9351 for cf_add_2lib in $cf_add_libs; do
9352 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9357 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9361 cat >"conftest.$ac_ext" <<_ACEOF
9362 #line 9362 "configure"
9363 #include "confdefs.h"
9364 #include <${cf_cv_ncurses_header:-curses.h}>
9368 initscr(); mousemask(0,0); tigetstr((char *)0);
9373 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9374 if { (eval echo "$as_me:9374: \"$ac_link\"") >&5
9375 (eval $ac_link) 2>&5
9377 echo "$as_me:9377: \$? = $ac_status" >&5
9378 (exit "$ac_status"); } &&
9379 { ac_try='test -s "conftest$ac_exeext"'
9380 { (eval echo "$as_me:9380: \"$ac_try\"") >&5
9383 echo "$as_me:9383: \$? = $ac_status" >&5
9384 (exit "$ac_status"); }; }; then
9385 if test "$cross_compiling" = yes; then
9386 cf_have_ncuconfig=maybe
9388 cat >"conftest.$ac_ext" <<_ACEOF
9389 #line 9389 "configure"
9390 #include "confdefs.h"
9391 #include <${cf_cv_ncurses_header:-curses.h}>
9393 { char *xx = curses_version(); return (xx == 0); }
9395 rm -f "conftest$ac_exeext"
9396 if { (eval echo "$as_me:9396: \"$ac_link\"") >&5
9397 (eval $ac_link) 2>&5
9399 echo "$as_me:9399: \$? = $ac_status" >&5
9400 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9401 { (eval echo "$as_me:9401: \"$ac_try\"") >&5
9404 echo "$as_me:9404: \$? = $ac_status" >&5
9405 (exit "$ac_status"); }; }; then
9406 cf_have_ncuconfig=yes
9408 echo "$as_me: program exited with status $ac_status" >&5
9409 echo "$as_me: failed program was:" >&5
9410 cat "conftest.$ac_ext" >&5
9411 cf_have_ncuconfig=no
9413 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9416 echo "$as_me: failed program was:" >&5
9417 cat "conftest.$ac_ext" >&5
9418 cf_have_ncuconfig=no
9420 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9421 echo "$as_me:9421: result: $cf_have_ncuconfig" >&5
9422 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9423 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9424 if test "$cf_have_ncuconfig" != "yes"
9426 CPPFLAGS="$cf_save_CPPFLAGS"
9427 LIBS="$cf_save_LIBS"
9428 NCURSES_CONFIG_PKG=none
9431 cat >>confdefs.h <<\EOF
9435 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9437 echo "$as_me:9437: checking for terminfo header" >&5
9438 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9439 if test "${cf_cv_term_header+set}" = set; then
9440 echo $ECHO_N "(cached) $ECHO_C" >&6
9443 case "${cf_cv_ncurses_header}" in
9444 (*/ncurses.h|*/ncursesw.h)
9445 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9448 cf_term_header=term.h
9452 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9454 cat >"conftest.$ac_ext" <<_ACEOF
9455 #line 9455 "configure"
9456 #include "confdefs.h"
9458 #include <${cf_cv_ncurses_header:-curses.h}>
9464 int x = auto_left_margin; (void)x
9469 rm -f "conftest.$ac_objext"
9470 if { (eval echo "$as_me:9470: \"$ac_compile\"") >&5
9471 (eval $ac_compile) 2>&5
9473 echo "$as_me:9473: \$? = $ac_status" >&5
9474 (exit "$ac_status"); } &&
9475 { ac_try='test -s "conftest.$ac_objext"'
9476 { (eval echo "$as_me:9476: \"$ac_try\"") >&5
9479 echo "$as_me:9479: \$? = $ac_status" >&5
9480 (exit "$ac_status"); }; }; then
9482 cf_cv_term_header="$cf_test"
9484 echo "$as_me: failed program was:" >&5
9485 cat "conftest.$ac_ext" >&5
9487 cf_cv_term_header=unknown
9490 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9491 test "$cf_cv_term_header" != unknown && break
9495 echo "$as_me:9495: result: $cf_cv_term_header" >&5
9496 echo "${ECHO_T}$cf_cv_term_header" >&6
9498 # Set definitions to allow ifdef'ing to accommodate subdirectories
9500 case "$cf_cv_term_header" in
9503 cat >>confdefs.h <<\EOF
9504 #define HAVE_TERM_H 1
9510 case "$cf_cv_term_header" in
9513 cat >>confdefs.h <<\EOF
9514 #define HAVE_NCURSES_TERM_H 1
9520 cat >>confdefs.h <<\EOF
9521 #define HAVE_NCURSESW_TERM_H 1
9530 echo "$as_me:9530: result: no" >&5
9531 echo "${ECHO_T}no" >&6
9532 NCURSES_CONFIG_PKG=none
9535 NCURSES_CONFIG_PKG=none
9538 if test "x$cf_have_ncuconfig" = "xno"; then
9539 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9541 if test -n "$ac_tool_prefix"; then
9542 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9544 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9545 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9546 echo "$as_me:9546: checking for $ac_word" >&5
9547 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9548 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9549 echo $ECHO_N "(cached) $ECHO_C" >&6
9551 if test -n "$NCURSES_CONFIG"; then
9552 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9554 ac_save_IFS=$IFS; IFS=$ac_path_separator
9556 for ac_dir in $ac_dummy; do
9558 test -z "$ac_dir" && ac_dir=.
9559 $as_executable_p "$ac_dir/$ac_word" || continue
9560 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9561 echo "$as_me:9561: found $ac_dir/$ac_word" >&5
9567 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9568 if test -n "$NCURSES_CONFIG"; then
9569 echo "$as_me:9569: result: $NCURSES_CONFIG" >&5
9570 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9572 echo "$as_me:9572: result: no" >&5
9573 echo "${ECHO_T}no" >&6
9576 test -n "$NCURSES_CONFIG" && break
9579 if test -z "$NCURSES_CONFIG"; then
9580 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9581 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9583 # Extract the first word of "$ac_prog", so it can be a program name with args.
9584 set dummy $ac_prog; ac_word=$2
9585 echo "$as_me:9585: checking for $ac_word" >&5
9586 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9587 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9588 echo $ECHO_N "(cached) $ECHO_C" >&6
9590 if test -n "$ac_ct_NCURSES_CONFIG"; then
9591 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9593 ac_save_IFS=$IFS; IFS=$ac_path_separator
9595 for ac_dir in $ac_dummy; do
9597 test -z "$ac_dir" && ac_dir=.
9598 $as_executable_p "$ac_dir/$ac_word" || continue
9599 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9600 echo "$as_me:9600: found $ac_dir/$ac_word" >&5
9606 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9607 if test -n "$ac_ct_NCURSES_CONFIG"; then
9608 echo "$as_me:9608: result: $ac_ct_NCURSES_CONFIG" >&5
9609 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9611 echo "$as_me:9611: result: no" >&5
9612 echo "${ECHO_T}no" >&6
9615 test -n "$ac_ct_NCURSES_CONFIG" && break
9617 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9619 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9622 if test "$NCURSES_CONFIG" != none ; then
9627 cf_new_extra_cppflags=
9629 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9631 case "$cf_fix_cppflags" in
9633 case "$cf_add_cflags" in
9634 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9635 case "$cf_add_cflags" in
9637 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9639 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9640 && test -z "${cf_tst_cflags}" \
9641 && cf_fix_cppflags=yes
9643 if test "$cf_fix_cppflags" = yes ; then
9645 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9646 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9649 elif test "${cf_tst_cflags}" = "\"'" ; then
9651 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9652 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9662 case "$cf_add_cflags" in
9664 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9666 CPPFLAGS=`echo "$CPPFLAGS" | \
9667 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9668 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9673 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9674 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9681 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9682 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9689 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9690 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9692 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9694 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9695 && test -z "${cf_tst_cflags}" \
9696 && cf_fix_cppflags=no
9701 if test -n "$cf_new_cflags" ; then
9703 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9704 CFLAGS="${CFLAGS}$cf_new_cflags"
9708 if test -n "$cf_new_cppflags" ; then
9710 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9711 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9715 if test -n "$cf_new_extra_cppflags" ; then
9717 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9718 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9725 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9727 for cf_add_1lib in $cf_add_0lib; do
9728 for cf_add_2lib in $cf_add_libs; do
9729 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9734 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9738 # even with config script, some packages use no-override for curses.h
9740 echo "$as_me:9740: checking if we have identified curses headers" >&5
9741 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
9742 if test "${cf_cv_ncurses_header+set}" = set; then
9743 echo $ECHO_N "(cached) $ECHO_C" >&6
9746 cf_cv_ncurses_header=none
9748 ncurses.h ncurses/ncurses.h \
9749 curses.h ncurses/curses.h
9751 cat >"conftest.$ac_ext" <<_ACEOF
9752 #line 9752 "configure"
9753 #include "confdefs.h"
9754 #include <${cf_header}>
9758 initscr(); tgoto("?", 0,0)
9763 rm -f "conftest.$ac_objext"
9764 if { (eval echo "$as_me:9764: \"$ac_compile\"") >&5
9765 (eval $ac_compile) 2>&5
9767 echo "$as_me:9767: \$? = $ac_status" >&5
9768 (exit "$ac_status"); } &&
9769 { ac_try='test -s "conftest.$ac_objext"'
9770 { (eval echo "$as_me:9770: \"$ac_try\"") >&5
9773 echo "$as_me:9773: \$? = $ac_status" >&5
9774 (exit "$ac_status"); }; }; then
9775 cf_cv_ncurses_header=$cf_header; break
9777 echo "$as_me: failed program was:" >&5
9778 cat "conftest.$ac_ext" >&5
9780 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9784 echo "$as_me:9784: result: $cf_cv_ncurses_header" >&5
9785 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
9787 if test "$cf_cv_ncurses_header" = none ; then
9788 { { echo "$as_me:9788: error: No curses header-files found" >&5
9789 echo "$as_me: error: No curses header-files found" >&2;}
9790 { (exit 1); exit 1; }; }
9793 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
9795 for ac_header in $cf_cv_ncurses_header
9797 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9798 echo "$as_me:9798: checking for $ac_header" >&5
9799 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9800 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9801 echo $ECHO_N "(cached) $ECHO_C" >&6
9803 cat >"conftest.$ac_ext" <<_ACEOF
9804 #line 9804 "configure"
9805 #include "confdefs.h"
9806 #include <$ac_header>
9808 if { (eval echo "$as_me:9808: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9809 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9811 $EGREP -v '^ *\+' conftest.er1 >conftest.err
9813 cat conftest.err >&5
9814 echo "$as_me:9814: \$? = $ac_status" >&5
9815 (exit "$ac_status"); } >/dev/null; then
9816 if test -s conftest.err; then
9817 ac_cpp_err=$ac_c_preproc_warn_flag
9824 if test -z "$ac_cpp_err"; then
9825 eval "$as_ac_Header=yes"
9827 echo "$as_me: failed program was:" >&5
9828 cat "conftest.$ac_ext" >&5
9829 eval "$as_ac_Header=no"
9831 rm -f conftest.err "conftest.$ac_ext"
9833 echo "$as_me:9833: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9834 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9835 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9836 cat >>confdefs.h <<EOF
9837 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9843 cat >>confdefs.h <<\EOF
9847 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9849 cat >>confdefs.h <<EOF
9850 #define $cf_nculib_ROOT 1
9853 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
9857 cf_ncuhdr_root=ncurses
9859 test -n "$cf_cv_curses_dir" && \
9860 test "$cf_cv_curses_dir" != "no" && { \
9862 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
9863 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
9865 while test "$cf_add_incdir" != /usr/include
9867 if test -d "$cf_add_incdir"
9870 if test -n "$CFLAGS$CPPFLAGS" ; then
9871 # a loop is needed to ensure we can add subdirs of existing dirs
9872 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9873 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9874 cf_have_incdir=yes; break
9879 if test "$cf_have_incdir" = no ; then
9880 if test "$cf_add_incdir" = /usr/local/include ; then
9881 if test "$GCC" = yes
9883 cf_save_CPPFLAGS=$CPPFLAGS
9885 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9886 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9888 cat >"conftest.$ac_ext" <<_ACEOF
9889 #line 9889 "configure"
9890 #include "confdefs.h"
9900 rm -f "conftest.$ac_objext"
9901 if { (eval echo "$as_me:9901: \"$ac_compile\"") >&5
9902 (eval $ac_compile) 2>&5
9904 echo "$as_me:9904: \$? = $ac_status" >&5
9905 (exit "$ac_status"); } &&
9906 { ac_try='test -s "conftest.$ac_objext"'
9907 { (eval echo "$as_me:9907: \"$ac_try\"") >&5
9910 echo "$as_me:9910: \$? = $ac_status" >&5
9911 (exit "$ac_status"); }; }; then
9914 echo "$as_me: failed program was:" >&5
9915 cat "conftest.$ac_ext" >&5
9918 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9919 CPPFLAGS=$cf_save_CPPFLAGS
9924 if test "$cf_have_incdir" = no ; then
9925 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9927 echo "${as_me:-configure}:9927: testing adding $cf_add_incdir to include-path ..." 1>&5
9929 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9931 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9932 test "$cf_top_incdir" = "$cf_add_incdir" && break
9933 cf_add_incdir="$cf_top_incdir"
9946 echo "$as_me:9946: checking for $cf_ncuhdr_root header in include-path" >&5
9947 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
9948 if test "${cf_cv_ncurses_h+set}" = set; then
9949 echo $ECHO_N "(cached) $ECHO_C" >&6
9952 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
9953 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
9954 for cf_header in $cf_header_list
9957 cat >"conftest.$ac_ext" <<_ACEOF
9958 #line 9958 "configure"
9959 #include "confdefs.h"
9961 #include <$cf_header>
9966 #ifdef NCURSES_VERSION
9968 printf("%s\\n", NCURSES_VERSION);
9981 rm -f "conftest.$ac_objext"
9982 if { (eval echo "$as_me:9982: \"$ac_compile\"") >&5
9983 (eval $ac_compile) 2>&5
9985 echo "$as_me:9985: \$? = $ac_status" >&5
9986 (exit "$ac_status"); } &&
9987 { ac_try='test -s "conftest.$ac_objext"'
9988 { (eval echo "$as_me:9988: \"$ac_try\"") >&5
9991 echo "$as_me:9991: \$? = $ac_status" >&5
9992 (exit "$ac_status"); }; }; then
9993 cf_cv_ncurses_h=$cf_header
9996 echo "$as_me: failed program was:" >&5
9997 cat "conftest.$ac_ext" >&5
10000 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10002 test "$cf_cv_ncurses_h" != no && break
10006 echo "$as_me:10006: result: $cf_cv_ncurses_h" >&5
10007 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10009 if test "$cf_cv_ncurses_h" != no ; then
10010 cf_cv_ncurses_header=$cf_cv_ncurses_h
10013 echo "$as_me:10013: checking for $cf_ncuhdr_root include-path" >&5
10014 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10015 if test "${cf_cv_ncurses_h2+set}" = set; then
10016 echo $ECHO_N "(cached) $ECHO_C" >&6
10019 test -n "$verbose" && echo
10023 # collect the current set of include-directories from compiler flags
10024 cf_header_path_list=""
10025 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10026 for cf_header_path in $CPPFLAGS $CFLAGS
10028 case "$cf_header_path" in
10030 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10032 test "x$cf_header_path" != "xNONE" && \
10033 test -d "$cf_header_path" && \
10035 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10036 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
10037 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10038 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10039 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10040 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"
10043 cf_header_path_list="$cf_header_path_list $cf_search"
10049 # add the variations for the package we are looking for
10053 test "x$prefix" != "xNONE" && \
10054 test -d "$prefix" && \
10056 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10057 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
10058 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10059 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10060 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10061 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10064 for cf_subdir_prefix in \
10073 test "x$cf_subdir_prefix" != "x$prefix" && \
10074 test -d "$cf_subdir_prefix" && \
10075 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10076 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10077 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
10078 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10079 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10080 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10081 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"
10086 test "$includedir" != NONE && \
10087 test "$includedir" != "/usr/include" && \
10088 test -d "$includedir" && {
10089 test -d "$includedir" && cf_search="$cf_search $includedir"
10090 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10093 test "$oldincludedir" != NONE && \
10094 test "$oldincludedir" != "/usr/include" && \
10095 test -d "$oldincludedir" && {
10096 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
10097 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10100 cf_search="$cf_search $cf_header_path_list"
10102 test -n "$verbose" && echo "search path $cf_search"
10103 cf_save2_CPPFLAGS="$CPPFLAGS"
10104 for cf_incdir in $cf_search
10107 if test -n "$cf_incdir" ; then
10108 for cf_add_incdir in $cf_incdir
10110 while test "$cf_add_incdir" != /usr/include
10112 if test -d "$cf_add_incdir"
10115 if test -n "$CFLAGS$CPPFLAGS" ; then
10116 # a loop is needed to ensure we can add subdirs of existing dirs
10117 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10118 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10119 cf_have_incdir=yes; break
10124 if test "$cf_have_incdir" = no ; then
10125 if test "$cf_add_incdir" = /usr/local/include ; then
10126 if test "$GCC" = yes
10128 cf_save_CPPFLAGS=$CPPFLAGS
10130 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10131 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10133 cat >"conftest.$ac_ext" <<_ACEOF
10134 #line 10134 "configure"
10135 #include "confdefs.h"
10145 rm -f "conftest.$ac_objext"
10146 if { (eval echo "$as_me:10146: \"$ac_compile\"") >&5
10147 (eval $ac_compile) 2>&5
10149 echo "$as_me:10149: \$? = $ac_status" >&5
10150 (exit "$ac_status"); } &&
10151 { ac_try='test -s "conftest.$ac_objext"'
10152 { (eval echo "$as_me:10152: \"$ac_try\"") >&5
10153 (eval $ac_try) 2>&5
10155 echo "$as_me:10155: \$? = $ac_status" >&5
10156 (exit "$ac_status"); }; }; then
10159 echo "$as_me: failed program was:" >&5
10160 cat "conftest.$ac_ext" >&5
10163 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10164 CPPFLAGS=$cf_save_CPPFLAGS
10169 if test "$cf_have_incdir" = no ; then
10170 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10172 echo "${as_me:-configure}:10172: testing adding $cf_add_incdir to include-path ..." 1>&5
10174 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10176 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10177 test "$cf_top_incdir" = "$cf_add_incdir" && break
10178 cf_add_incdir="$cf_top_incdir"
10194 cat >"conftest.$ac_ext" <<_ACEOF
10195 #line 10195 "configure"
10196 #include "confdefs.h"
10198 #include <$cf_header>
10203 #ifdef NCURSES_VERSION
10205 printf("%s\\n", NCURSES_VERSION);
10218 rm -f "conftest.$ac_objext"
10219 if { (eval echo "$as_me:10219: \"$ac_compile\"") >&5
10220 (eval $ac_compile) 2>&5
10222 echo "$as_me:10222: \$? = $ac_status" >&5
10223 (exit "$ac_status"); } &&
10224 { ac_try='test -s "conftest.$ac_objext"'
10225 { (eval echo "$as_me:10225: \"$ac_try\"") >&5
10226 (eval $ac_try) 2>&5
10228 echo "$as_me:10228: \$? = $ac_status" >&5
10229 (exit "$ac_status"); }; }; then
10230 cf_cv_ncurses_h2=$cf_header
10233 echo "$as_me: failed program was:" >&5
10234 cat "conftest.$ac_ext" >&5
10235 cf_cv_ncurses_h2=no
10237 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10239 if test "$cf_cv_ncurses_h2" != no ; then
10240 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10241 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
10244 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10246 CPPFLAGS="$cf_save2_CPPFLAGS"
10247 test "$cf_cv_ncurses_h2" != no && break
10249 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10249: error: not found" >&5
10250 echo "$as_me: error: not found" >&2;}
10251 { (exit 1); exit 1; }; }
10254 echo "$as_me:10254: result: $cf_cv_ncurses_h2" >&5
10255 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10257 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
10258 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
10259 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
10260 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
10263 if test -n "$cf_1st_incdir" ; then
10264 for cf_add_incdir in $cf_1st_incdir
10266 while test "$cf_add_incdir" != /usr/include
10268 if test -d "$cf_add_incdir"
10271 if test -n "$CFLAGS$CPPFLAGS" ; then
10272 # a loop is needed to ensure we can add subdirs of existing dirs
10273 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10274 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10275 cf_have_incdir=yes; break
10280 if test "$cf_have_incdir" = no ; then
10281 if test "$cf_add_incdir" = /usr/local/include ; then
10282 if test "$GCC" = yes
10284 cf_save_CPPFLAGS=$CPPFLAGS
10286 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10287 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10289 cat >"conftest.$ac_ext" <<_ACEOF
10290 #line 10290 "configure"
10291 #include "confdefs.h"
10301 rm -f "conftest.$ac_objext"
10302 if { (eval echo "$as_me:10302: \"$ac_compile\"") >&5
10303 (eval $ac_compile) 2>&5
10305 echo "$as_me:10305: \$? = $ac_status" >&5
10306 (exit "$ac_status"); } &&
10307 { ac_try='test -s "conftest.$ac_objext"'
10308 { (eval echo "$as_me:10308: \"$ac_try\"") >&5
10309 (eval $ac_try) 2>&5
10311 echo "$as_me:10311: \$? = $ac_status" >&5
10312 (exit "$ac_status"); }; }; then
10315 echo "$as_me: failed program was:" >&5
10316 cat "conftest.$ac_ext" >&5
10319 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10320 CPPFLAGS=$cf_save_CPPFLAGS
10325 if test "$cf_have_incdir" = no ; then
10326 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10328 echo "${as_me:-configure}:10328: testing adding $cf_add_incdir to include-path ..." 1>&5
10330 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10332 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10333 test "$cf_top_incdir" = "$cf_add_incdir" && break
10334 cf_add_incdir="$cf_top_incdir"
10347 # Set definitions to allow ifdef'ing for ncurses.h
10349 case "$cf_cv_ncurses_header" in
10352 cat >>confdefs.h <<\EOF
10353 #define HAVE_NCURSES_H 1
10359 case "$cf_cv_ncurses_header" in
10360 (ncurses/curses.h|ncurses/ncurses.h)
10362 cat >>confdefs.h <<\EOF
10363 #define HAVE_NCURSES_NCURSES_H 1
10367 (ncursesw/curses.h|ncursesw/ncurses.h)
10369 cat >>confdefs.h <<\EOF
10370 #define HAVE_NCURSESW_NCURSES_H 1
10376 echo "$as_me:10376: checking for terminfo header" >&5
10377 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10378 if test "${cf_cv_term_header+set}" = set; then
10379 echo $ECHO_N "(cached) $ECHO_C" >&6
10382 case "${cf_cv_ncurses_header}" in
10383 (*/ncurses.h|*/ncursesw.h)
10384 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10387 cf_term_header=term.h
10391 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10393 cat >"conftest.$ac_ext" <<_ACEOF
10394 #line 10394 "configure"
10395 #include "confdefs.h"
10397 #include <${cf_cv_ncurses_header:-curses.h}>
10398 #include <$cf_test>
10403 int x = auto_left_margin; (void)x
10408 rm -f "conftest.$ac_objext"
10409 if { (eval echo "$as_me:10409: \"$ac_compile\"") >&5
10410 (eval $ac_compile) 2>&5
10412 echo "$as_me:10412: \$? = $ac_status" >&5
10413 (exit "$ac_status"); } &&
10414 { ac_try='test -s "conftest.$ac_objext"'
10415 { (eval echo "$as_me:10415: \"$ac_try\"") >&5
10416 (eval $ac_try) 2>&5
10418 echo "$as_me:10418: \$? = $ac_status" >&5
10419 (exit "$ac_status"); }; }; then
10421 cf_cv_term_header="$cf_test"
10423 echo "$as_me: failed program was:" >&5
10424 cat "conftest.$ac_ext" >&5
10426 cf_cv_term_header=unknown
10429 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10430 test "$cf_cv_term_header" != unknown && break
10434 echo "$as_me:10434: result: $cf_cv_term_header" >&5
10435 echo "${ECHO_T}$cf_cv_term_header" >&6
10437 # Set definitions to allow ifdef'ing to accommodate subdirectories
10439 case "$cf_cv_term_header" in
10442 cat >>confdefs.h <<\EOF
10443 #define HAVE_TERM_H 1
10449 case "$cf_cv_term_header" in
10452 cat >>confdefs.h <<\EOF
10453 #define HAVE_NCURSES_TERM_H 1
10459 cat >>confdefs.h <<\EOF
10460 #define HAVE_NCURSESW_TERM_H 1
10466 # some applications need this, but should check for NCURSES_VERSION
10468 cat >>confdefs.h <<\EOF
10472 echo "$as_me:10472: checking for ncurses version" >&5
10473 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10474 if test "${cf_cv_ncurses_version+set}" = set; then
10475 echo $ECHO_N "(cached) $ECHO_C" >&6
10478 cf_cv_ncurses_version=no
10480 rm -f "$cf_tempfile"
10481 if test "$cross_compiling" = yes; then
10483 # This will not work if the preprocessor splits the line after the
10484 # Autoconf token. The 'unproto' program does that.
10485 cat > "conftest.$ac_ext" <<EOF
10486 #include <${cf_cv_ncurses_header:-curses.h}>
10488 #ifdef NCURSES_VERSION
10489 Autoconf NCURSES_VERSION
10497 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10498 { (eval echo "$as_me:10498: \"$cf_try\"") >&5
10499 (eval $cf_try) 2>&5
10501 echo "$as_me:10501: \$? = $ac_status" >&5
10502 (exit "$ac_status"); }
10503 if test -f conftest.out ; then
10504 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
10505 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10510 cat >"conftest.$ac_ext" <<_ACEOF
10511 #line 10511 "configure"
10512 #include "confdefs.h"
10514 #include <${cf_cv_ncurses_header:-curses.h}>
10518 FILE *fp = fopen("$cf_tempfile", "w");
10519 #ifdef NCURSES_VERSION
10520 # ifdef NCURSES_VERSION_PATCH
10521 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10523 fprintf(fp, "%s\\n", NCURSES_VERSION);
10526 # ifdef __NCURSES_H
10527 fprintf(fp, "old\\n");
10532 ${cf_cv_main_return:-return}(0);
10535 rm -f "conftest$ac_exeext"
10536 if { (eval echo "$as_me:10536: \"$ac_link\"") >&5
10537 (eval $ac_link) 2>&5
10539 echo "$as_me:10539: \$? = $ac_status" >&5
10540 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10541 { (eval echo "$as_me:10541: \"$ac_try\"") >&5
10542 (eval $ac_try) 2>&5
10544 echo "$as_me:10544: \$? = $ac_status" >&5
10545 (exit "$ac_status"); }; }; then
10547 cf_cv_ncurses_version=`cat $cf_tempfile`
10549 echo "$as_me: program exited with status $ac_status" >&5
10550 echo "$as_me: failed program was:" >&5
10551 cat "conftest.$ac_ext" >&5
10553 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10555 rm -f "$cf_tempfile"
10558 echo "$as_me:10558: result: $cf_cv_ncurses_version" >&5
10559 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10560 test "$cf_cv_ncurses_version" = no ||
10561 cat >>confdefs.h <<\EOF
10565 cf_nculib_root=ncurses
10566 # This works, except for the special case where we find gpm, but
10567 # ncurses is in a nonstandard location via $LIBS, and we really want
10570 cf_ncurses_SAVE="$LIBS"
10571 echo "$as_me:10571: checking for Gpm_Open in -lgpm" >&5
10572 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10573 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10574 echo $ECHO_N "(cached) $ECHO_C" >&6
10576 ac_check_lib_save_LIBS=$LIBS
10578 cat >"conftest.$ac_ext" <<_ACEOF
10579 #line 10579 "configure"
10580 #include "confdefs.h"
10582 /* Override any gcc2 internal prototype to avoid an error. */
10586 /* We use char because int might match the return type of a gcc2
10587 builtin and then its argument prototype would still apply. */
10597 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10598 if { (eval echo "$as_me:10598: \"$ac_link\"") >&5
10599 (eval $ac_link) 2>&5
10601 echo "$as_me:10601: \$? = $ac_status" >&5
10602 (exit "$ac_status"); } &&
10603 { ac_try='test -s "conftest$ac_exeext"'
10604 { (eval echo "$as_me:10604: \"$ac_try\"") >&5
10605 (eval $ac_try) 2>&5
10607 echo "$as_me:10607: \$? = $ac_status" >&5
10608 (exit "$ac_status"); }; }; then
10609 ac_cv_lib_gpm_Gpm_Open=yes
10611 echo "$as_me: failed program was:" >&5
10612 cat "conftest.$ac_ext" >&5
10613 ac_cv_lib_gpm_Gpm_Open=no
10615 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10616 LIBS=$ac_check_lib_save_LIBS
10618 echo "$as_me:10618: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10619 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
10620 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
10621 echo "$as_me:10621: checking for initscr in -lgpm" >&5
10622 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
10623 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
10624 echo $ECHO_N "(cached) $ECHO_C" >&6
10626 ac_check_lib_save_LIBS=$LIBS
10628 cat >"conftest.$ac_ext" <<_ACEOF
10629 #line 10629 "configure"
10630 #include "confdefs.h"
10632 /* Override any gcc2 internal prototype to avoid an error. */
10636 /* We use char because int might match the return type of a gcc2
10637 builtin and then its argument prototype would still apply. */
10647 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10648 if { (eval echo "$as_me:10648: \"$ac_link\"") >&5
10649 (eval $ac_link) 2>&5
10651 echo "$as_me:10651: \$? = $ac_status" >&5
10652 (exit "$ac_status"); } &&
10653 { ac_try='test -s "conftest$ac_exeext"'
10654 { (eval echo "$as_me:10654: \"$ac_try\"") >&5
10655 (eval $ac_try) 2>&5
10657 echo "$as_me:10657: \$? = $ac_status" >&5
10658 (exit "$ac_status"); }; }; then
10659 ac_cv_lib_gpm_initscr=yes
10661 echo "$as_me: failed program was:" >&5
10662 cat "conftest.$ac_ext" >&5
10663 ac_cv_lib_gpm_initscr=no
10665 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10666 LIBS=$ac_check_lib_save_LIBS
10668 echo "$as_me:10668: result: $ac_cv_lib_gpm_initscr" >&5
10669 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
10670 if test "$ac_cv_lib_gpm_initscr" = yes; then
10671 LIBS="$cf_ncurses_SAVE"
10673 cf_ncurses_LIBS="-lgpm"
10680 # This is only necessary if you are linking against an obsolete
10681 # version of ncurses (but it should do no harm, since it's static).
10682 if test "$cf_nculib_root" = ncurses ; then
10683 echo "$as_me:10683: checking for tgoto in -lmytinfo" >&5
10684 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
10685 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
10686 echo $ECHO_N "(cached) $ECHO_C" >&6
10688 ac_check_lib_save_LIBS=$LIBS
10689 LIBS="-lmytinfo $LIBS"
10690 cat >"conftest.$ac_ext" <<_ACEOF
10691 #line 10691 "configure"
10692 #include "confdefs.h"
10694 /* Override any gcc2 internal prototype to avoid an error. */
10698 /* We use char because int might match the return type of a gcc2
10699 builtin and then its argument prototype would still apply. */
10709 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10710 if { (eval echo "$as_me:10710: \"$ac_link\"") >&5
10711 (eval $ac_link) 2>&5
10713 echo "$as_me:10713: \$? = $ac_status" >&5
10714 (exit "$ac_status"); } &&
10715 { ac_try='test -s "conftest$ac_exeext"'
10716 { (eval echo "$as_me:10716: \"$ac_try\"") >&5
10717 (eval $ac_try) 2>&5
10719 echo "$as_me:10719: \$? = $ac_status" >&5
10720 (exit "$ac_status"); }; }; then
10721 ac_cv_lib_mytinfo_tgoto=yes
10723 echo "$as_me: failed program was:" >&5
10724 cat "conftest.$ac_ext" >&5
10725 ac_cv_lib_mytinfo_tgoto=no
10727 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10728 LIBS=$ac_check_lib_save_LIBS
10730 echo "$as_me:10730: result: $ac_cv_lib_mytinfo_tgoto" >&5
10731 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
10732 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
10733 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
10740 cf_add_libs="$LIBS"
10743 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10744 # filter duplicates
10745 for cf_add_1lib in $cf_add_0lib; do
10746 for cf_add_2lib in $cf_add_libs; do
10747 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10752 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10754 LIBS="$cf_add_libs"
10756 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
10759 cf_add_libs="$LIBS"
10762 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10763 # filter duplicates
10764 for cf_add_1lib in $cf_add_0lib; do
10765 for cf_add_2lib in $cf_add_libs; do
10766 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10771 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10773 LIBS="$cf_add_libs"
10777 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
10779 echo "$as_me:10779: checking for initscr" >&5
10780 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
10781 if test "${ac_cv_func_initscr+set}" = set; then
10782 echo $ECHO_N "(cached) $ECHO_C" >&6
10784 cat >"conftest.$ac_ext" <<_ACEOF
10785 #line 10785 "configure"
10786 #include "confdefs.h"
10787 #define initscr autoconf_temporary
10788 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
10795 /* We use char because int might match the return type of a gcc2
10796 builtin and then its argument prototype would still apply. */
10797 char initscr (void);
10803 /* The GNU C library defines stubs for functions which it implements
10804 to always fail with ENOSYS. Some functions are actually named
10805 something starting with __ and the normal name is an alias. */
10806 #if defined (__stub_initscr) || defined (__stub___initscr)
10807 #error found stub for initscr
10815 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10816 if { (eval echo "$as_me:10816: \"$ac_link\"") >&5
10817 (eval $ac_link) 2>&5
10819 echo "$as_me:10819: \$? = $ac_status" >&5
10820 (exit "$ac_status"); } &&
10821 { ac_try='test -s "conftest$ac_exeext"'
10822 { (eval echo "$as_me:10822: \"$ac_try\"") >&5
10823 (eval $ac_try) 2>&5
10825 echo "$as_me:10825: \$? = $ac_status" >&5
10826 (exit "$ac_status"); }; }; then
10827 ac_cv_func_initscr=yes
10829 echo "$as_me: failed program was:" >&5
10830 cat "conftest.$ac_ext" >&5
10831 ac_cv_func_initscr=no
10833 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10835 echo "$as_me:10835: result: $ac_cv_func_initscr" >&5
10836 echo "${ECHO_T}$ac_cv_func_initscr" >&6
10837 if test "$ac_cv_func_initscr" = yes; then
10838 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10841 cf_save_LIBS="$LIBS"
10842 echo "$as_me:10842: checking for initscr in -l$cf_nculib_root" >&5
10843 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
10844 LIBS="-l$cf_nculib_root $LIBS"
10845 cat >"conftest.$ac_ext" <<_ACEOF
10846 #line 10846 "configure"
10847 #include "confdefs.h"
10848 #include <${cf_cv_ncurses_header:-curses.h}>
10857 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10858 if { (eval echo "$as_me:10858: \"$ac_link\"") >&5
10859 (eval $ac_link) 2>&5
10861 echo "$as_me:10861: \$? = $ac_status" >&5
10862 (exit "$ac_status"); } &&
10863 { ac_try='test -s "conftest$ac_exeext"'
10864 { (eval echo "$as_me:10864: \"$ac_try\"") >&5
10865 (eval $ac_try) 2>&5
10867 echo "$as_me:10867: \$? = $ac_status" >&5
10868 (exit "$ac_status"); }; }; then
10869 echo "$as_me:10869: result: yes" >&5
10870 echo "${ECHO_T}yes" >&6
10871 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10874 echo "$as_me: failed program was:" >&5
10875 cat "conftest.$ac_ext" >&5
10876 echo "$as_me:10876: result: no" >&5
10877 echo "${ECHO_T}no" >&6
10880 cf_library_path_list=""
10881 if test -n "${LDFLAGS}${LIBS}" ; then
10882 for cf_library_path in $LDFLAGS $LIBS
10884 case "$cf_library_path" in
10886 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10888 test "x$cf_library_path" != "xNONE" && \
10889 test -d "$cf_library_path" && \
10891 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
10892 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
10893 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
10894 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
10895 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
10896 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"
10899 cf_library_path_list="$cf_library_path_list $cf_search"
10907 test "x$prefix" != "xNONE" && \
10908 test -d "$prefix" && \
10910 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
10911 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
10912 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
10913 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
10914 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
10915 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
10918 for cf_subdir_prefix in \
10927 test "x$cf_subdir_prefix" != "x$prefix" && \
10928 test -d "$cf_subdir_prefix" && \
10929 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10930 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
10931 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
10932 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
10933 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
10934 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
10935 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"
10940 cf_search="$cf_library_path_list $cf_search"
10942 for cf_libdir in $cf_search
10944 echo "$as_me:10944: checking for -l$cf_nculib_root in $cf_libdir" >&5
10945 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
10946 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
10947 cat >"conftest.$ac_ext" <<_ACEOF
10948 #line 10948 "configure"
10949 #include "confdefs.h"
10950 #include <${cf_cv_ncurses_header:-curses.h}>
10959 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10960 if { (eval echo "$as_me:10960: \"$ac_link\"") >&5
10961 (eval $ac_link) 2>&5
10963 echo "$as_me:10963: \$? = $ac_status" >&5
10964 (exit "$ac_status"); } &&
10965 { ac_try='test -s "conftest$ac_exeext"'
10966 { (eval echo "$as_me:10966: \"$ac_try\"") >&5
10967 (eval $ac_try) 2>&5
10969 echo "$as_me:10969: \$? = $ac_status" >&5
10970 (exit "$ac_status"); }; }; then
10971 echo "$as_me:10971: result: yes" >&5
10972 echo "${ECHO_T}yes" >&6
10973 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10976 echo "$as_me: failed program was:" >&5
10977 cat "conftest.$ac_ext" >&5
10978 echo "$as_me:10978: result: no" >&5
10979 echo "${ECHO_T}no" >&6
10980 LIBS="$cf_save_LIBS"
10982 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10986 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10990 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
10992 if test "$cf_found_library" = no ; then
10993 { { echo "$as_me:10993: error: Cannot link $cf_nculib_root library" >&5
10994 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
10995 { (exit 1); exit 1; }; }
11000 if test -n "$cf_ncurses_LIBS" ; then
11001 echo "$as_me:11001: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11002 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11003 cf_ncurses_SAVE="$LIBS"
11004 for p in $cf_ncurses_LIBS ; do
11005 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
11006 if test "$q" != "$LIBS" ; then
11010 cat >"conftest.$ac_ext" <<_ACEOF
11011 #line 11011 "configure"
11012 #include "confdefs.h"
11013 #include <${cf_cv_ncurses_header:-curses.h}>
11017 initscr(); mousemask(0,0); tigetstr((char *)0);
11022 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11023 if { (eval echo "$as_me:11023: \"$ac_link\"") >&5
11024 (eval $ac_link) 2>&5
11026 echo "$as_me:11026: \$? = $ac_status" >&5
11027 (exit "$ac_status"); } &&
11028 { ac_try='test -s "conftest$ac_exeext"'
11029 { (eval echo "$as_me:11029: \"$ac_try\"") >&5
11030 (eval $ac_try) 2>&5
11032 echo "$as_me:11032: \$? = $ac_status" >&5
11033 (exit "$ac_status"); }; }; then
11034 echo "$as_me:11034: result: yes" >&5
11035 echo "${ECHO_T}yes" >&6
11037 echo "$as_me: failed program was:" >&5
11038 cat "conftest.$ac_ext" >&5
11039 echo "$as_me:11039: result: no" >&5
11040 echo "${ECHO_T}no" >&6
11041 LIBS="$cf_ncurses_SAVE"
11043 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11046 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11048 cat >>confdefs.h <<EOF
11049 #define $cf_nculib_ROOT 1
11054 NCURSES_CONFIG=none
11059 if test "$NCURSES_CONFIG_PKG" != none ; then
11060 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
11062 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11063 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11064 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11066 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
11067 if test -z "$cf_cv_abi_version"
11069 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
11072 elif test "$NCURSES_CONFIG" != none ; then
11074 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
11076 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11077 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11078 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11080 # ABI version is not available from headers
11081 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
11085 for cf_name in MAJOR MINOR PATCH
11087 cat >conftest.$ac_ext <<CF_EOF
11088 #include <${cf_cv_ncurses_header:-curses.h}>
11089 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
11091 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
11092 { (eval echo "$as_me:11092: \"$cf_try\"") >&5
11093 (eval $cf_try) 2>&5
11095 echo "$as_me:11095: \$? = $ac_status" >&5
11096 (exit "$ac_status"); }
11097 if test -f conftest.out ; then
11098 cf_result=`sed -e "s/^.*AUTOCONF_${cf_name}[ ][ ]*//" conftest.out`
11099 eval NCURSES_$cf_name=\"$cf_result\"
11100 # cat conftest.$ac_ext
11105 cf_cv_abi_version=${NCURSES_MAJOR}
11109 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
11111 cf_cv_timestamp=`date`
11113 echo "$as_me:11113: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
11114 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
11116 echo "$as_me:11116: checking if you want to have a library-prefix" >&5
11117 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
11119 # Check whether --with-lib-prefix or --without-lib-prefix was given.
11120 if test "${with_lib_prefix+set}" = set; then
11121 withval="$with_lib_prefix"
11122 with_lib_prefix=$withval
11124 with_lib_prefix=auto
11126 echo "$as_me:11126: result: $with_lib_prefix" >&5
11127 echo "${ECHO_T}$with_lib_prefix" >&6
11129 if test "$with_lib_prefix" = auto
11132 case "$cf_cv_system_name" in
11134 if test "$DFT_LWR_MODEL" = libtool; then
11143 (*) LIB_PREFIX='lib'
11146 cf_prefix=$LIB_PREFIX
11148 elif test "$with_lib_prefix" = no
11152 LIB_PREFIX=$with_lib_prefix
11157 ###############################################################################
11159 if test X"$CC_G_OPT" = X"" ; then
11161 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
11164 echo "$as_me:11164: checking for default loader flags" >&5
11165 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
11166 case $DFT_LWR_MODEL in
11167 (normal) LD_MODEL='' ;;
11168 (debug) LD_MODEL=$CC_G_OPT ;;
11169 (profile) LD_MODEL='-pg';;
11170 (shared) LD_MODEL='' ;;
11172 echo "$as_me:11172: result: $LD_MODEL" >&5
11173 echo "${ECHO_T}$LD_MODEL" >&6
11176 if test "x$cf_cv_enable_rpath" != xno
11178 echo "$as_me:11178: checking for an rpath option" >&5
11179 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
11180 case "$cf_cv_system_name" in
11182 if test "$GCC" = yes; then
11183 LD_RPATH_OPT="-Wl,-rpath,"
11185 LD_RPATH_OPT="-rpath "
11188 (linux*|gnu*|k*bsd*-gnu|freebsd*)
11189 LD_RPATH_OPT="-Wl,-rpath,"
11191 (openbsd[2-9].*|mirbsd*)
11192 LD_RPATH_OPT="-Wl,-rpath,"
11195 LD_RPATH_OPT="-rpath "
11198 LD_RPATH_OPT="-Wl,-rpath,"
11201 LD_RPATH_OPT="-rpath "
11209 echo "$as_me:11209: result: $LD_RPATH_OPT" >&5
11210 echo "${ECHO_T}$LD_RPATH_OPT" >&6
11212 case "x$LD_RPATH_OPT" in
11214 echo "$as_me:11214: checking if we need a space after rpath option" >&5
11215 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
11216 cf_save_LIBS="$LIBS"
11218 cf_add_libs="$LIBS"
11221 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11222 # filter duplicates
11223 for cf_add_1lib in $cf_add_0lib; do
11224 for cf_add_2lib in $cf_add_libs; do
11225 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11230 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11232 LIBS="$cf_add_libs"
11234 cat >"conftest.$ac_ext" <<_ACEOF
11235 #line 11235 "configure"
11236 #include "confdefs.h"
11246 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11247 if { (eval echo "$as_me:11247: \"$ac_link\"") >&5
11248 (eval $ac_link) 2>&5
11250 echo "$as_me:11250: \$? = $ac_status" >&5
11251 (exit "$ac_status"); } &&
11252 { ac_try='test -s "conftest$ac_exeext"'
11253 { (eval echo "$as_me:11253: \"$ac_try\"") >&5
11254 (eval $ac_try) 2>&5
11256 echo "$as_me:11256: \$? = $ac_status" >&5
11257 (exit "$ac_status"); }; }; then
11260 echo "$as_me: failed program was:" >&5
11261 cat "conftest.$ac_ext" >&5
11264 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11265 LIBS="$cf_save_LIBS"
11266 echo "$as_me:11266: result: $cf_rpath_space" >&5
11267 echo "${ECHO_T}$cf_rpath_space" >&6
11268 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
11277 INSTALL_LIB="-m 644"
11278 : ${rel_builddir:=.}
11284 cf_cv_do_symlinks=no
11286 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
11288 echo "$as_me:11288: checking if release/abi version should be used for shared libs" >&5
11289 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
11291 # Check whether --with-shlib-version or --without-shlib-version was given.
11292 if test "${with_shlib_version+set}" = set; then
11293 withval="$with_shlib_version"
11294 test -z "$withval" && withval=auto
11297 cf_cv_shlib_version=auto
11300 cf_cv_shlib_version=$withval
11303 echo "$as_me:11303: result: $withval" >&5
11304 echo "${ECHO_T}$withval" >&6
11305 { { echo "$as_me:11305: error: option value must be one of: rel, abi, or auto" >&5
11306 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
11307 { (exit 1); exit 1; }; }
11312 cf_cv_shlib_version=auto
11314 echo "$as_me:11314: result: $cf_cv_shlib_version" >&5
11315 echo "${ECHO_T}$cf_cv_shlib_version" >&6
11317 cf_cv_rm_so_locs=no
11320 # Some less-capable ports of gcc support only -fpic
11324 if test "$GCC" = yes
11328 case "$cf_cv_system_name" in
11329 (*linux*) # e.g., PGI compiler
11335 if test "$cf_try_fPIC" = yes
11337 echo "$as_me:11337: checking which $CC option to use" >&5
11338 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
11339 cf_save_CFLAGS="$CFLAGS"
11340 for CC_SHARED_OPTS in -fPIC -fpic ''
11342 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
11343 cat >"conftest.$ac_ext" <<_ACEOF
11344 #line 11344 "configure"
11345 #include "confdefs.h"
11355 rm -f "conftest.$ac_objext"
11356 if { (eval echo "$as_me:11356: \"$ac_compile\"") >&5
11357 (eval $ac_compile) 2>&5
11359 echo "$as_me:11359: \$? = $ac_status" >&5
11360 (exit "$ac_status"); } &&
11361 { ac_try='test -s "conftest.$ac_objext"'
11362 { (eval echo "$as_me:11362: \"$ac_try\"") >&5
11363 (eval $ac_try) 2>&5
11365 echo "$as_me:11365: \$? = $ac_status" >&5
11366 (exit "$ac_status"); }; }; then
11369 echo "$as_me: failed program was:" >&5
11370 cat "conftest.$ac_ext" >&5
11372 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11374 echo "$as_me:11374: result: $CC_SHARED_OPTS" >&5
11375 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
11376 CFLAGS="$cf_save_CFLAGS"
11379 cf_cv_shlib_version_infix=no
11381 case "$cf_cv_system_name" in
11382 (aix4.3-9*|aix[5-7]*)
11383 if test "$GCC" = yes; then
11384 CC_SHARED_OPTS='-Wl,-brtl'
11385 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11387 CC_SHARED_OPTS='-brtl'
11388 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
11389 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11393 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
11397 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11398 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11399 cf_cv_shlib_version=cygdll
11400 cf_cv_shlib_version_infix=cygdll
11403 cat >mk_shared_lib.sh <<-CF_EOF
11406 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11409 Linking shared library
11410 ** SHARED_LIB \$SHARED_LIB
11411 ** IMPORT_LIB \$IMPORT_LIB
11413 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11415 chmod +x mk_shared_lib.sh
11419 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11420 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11421 cf_cv_shlib_version=msysdll
11422 cf_cv_shlib_version_infix=msysdll
11425 cat >mk_shared_lib.sh <<-CF_EOF
11428 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11431 Linking shared library
11432 ** SHARED_LIB \$SHARED_LIB
11433 ** IMPORT_LIB \$IMPORT_LIB
11435 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11437 chmod +x mk_shared_lib.sh
11440 cf_try_cflags="no-cpp-precomp"
11441 CC_SHARED_OPTS="-dynamic"
11442 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
11443 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
11444 cf_cv_shlib_version_infix=yes
11445 echo "$as_me:11445: checking if ld -search_paths_first works" >&5
11446 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
11447 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
11448 echo $ECHO_N "(cached) $ECHO_C" >&6
11451 cf_save_LDFLAGS=$LDFLAGS
11452 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11453 cat >"conftest.$ac_ext" <<_ACEOF
11454 #line 11454 "configure"
11455 #include "confdefs.h"
11465 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11466 if { (eval echo "$as_me:11466: \"$ac_link\"") >&5
11467 (eval $ac_link) 2>&5
11469 echo "$as_me:11469: \$? = $ac_status" >&5
11470 (exit "$ac_status"); } &&
11471 { ac_try='test -s "conftest$ac_exeext"'
11472 { (eval echo "$as_me:11472: \"$ac_try\"") >&5
11473 (eval $ac_try) 2>&5
11475 echo "$as_me:11475: \$? = $ac_status" >&5
11476 (exit "$ac_status"); }; }; then
11477 cf_cv_ldflags_search_paths_first=yes
11479 echo "$as_me: failed program was:" >&5
11480 cat "conftest.$ac_ext" >&5
11481 cf_cv_ldflags_search_paths_first=no
11483 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11484 LDFLAGS=$cf_save_LDFLAGS
11486 echo "$as_me:11486: result: $cf_cv_ldflags_search_paths_first" >&5
11487 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
11488 if test "$cf_cv_ldflags_search_paths_first" = yes; then
11489 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11493 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
11494 if test "$GCC" != yes; then
11495 CC_SHARED_OPTS='+Z'
11497 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
11498 INSTALL_LIB="-m 555"
11501 # (tested with gcc 2.7.2 -- I don't have c89)
11502 if test "$GCC" = yes; then
11503 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
11505 CC_SHARED_OPTS='+Z'
11506 LD_SHARED_OPTS='-Wl,+b,${libdir}'
11508 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
11509 # HP-UX shared libraries must be executable, and should be
11510 # readonly to exploit a quirk in the memory manager.
11511 INSTALL_LIB="-m 555"
11514 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11515 if test "$cf_cv_shlib_version" = rel; then
11516 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11518 cf_shared_soname='`basename $@`'
11521 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
11524 if test "$cf_cv_enable_rpath" = yes ; then
11525 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11527 # tested with IRIX 5.2 and 'cc'.
11528 if test "$GCC" != yes; then
11529 CC_SHARED_OPTS='-KPIC'
11530 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
11532 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
11534 cf_cv_rm_so_locs=yes
11536 (linux*|gnu*|k*bsd*-gnu)
11537 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11538 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11539 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11541 if test "$cf_cv_enable_rpath" = yes ; then
11542 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11545 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11546 if test "$cf_cv_shlib_version" = rel; then
11547 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11549 cf_cv_shared_soname='`basename $@`'
11552 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11555 cf_cv_shlib_version=msvcdll
11556 cf_cv_shlib_version_infix=msvcdll
11559 if test "$DFT_LWR_MODEL" = "shared" ; then
11560 LOCAL_LDFLAGS="-link -dll"
11561 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11562 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
11565 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
11566 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
11567 cat >mk_shared_lib.sh <<-CF_EOF
11570 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
11575 Linking shared library
11576 ** SHARED LIB \$SHARED_LIB
11577 ** IMPORT_LIB \$IMPORT_LIB
11579 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
11580 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
11581 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
11583 chmod +x mk_shared_lib.sh
11584 cat >mk_prog.sh <<-CF_EOF
11587 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
11590 ldopts=("/subsystem:console")
11593 while test \$# -gt 0; do
11596 # ignore -link argument
11599 # ignore runtime-library option
11614 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
11617 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
11623 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
11624 ldopts+=("\${linkarg}")
11632 ldopts+=("-out:\$1")
11641 if [ "\$isdll" -ne 0 ]; then
11642 for lib in \${libs[*]}; do
11643 ldopts+=("\$lib.dll.lib")
11646 for lib in \${libs[*]}; do
11647 ldopts+=("\$lib.lib")
11652 ** ld options: "\${ldopts[@]}"
11654 exec \$LD \${ldopts[@]}
11656 chmod +x mk_prog.sh
11657 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
11658 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
11661 cf_cv_shlib_version=mingw
11662 cf_cv_shlib_version_infix=mingw
11665 if test "$DFT_LWR_MODEL" = "shared" ; then
11666 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
11667 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11668 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
11671 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11672 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11673 cat >mk_shared_lib.sh <<-CF_EOF
11676 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
11679 Linking shared library
11680 ** SHARED_LIB \$SHARED_LIB
11681 ** IMPORT_LIB \$IMPORT_LIB
11683 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11685 chmod +x mk_shared_lib.sh
11687 (openbsd[2-9].*|mirbsd*)
11688 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11689 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11690 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11692 if test "$cf_cv_enable_rpath" = yes ; then
11693 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11695 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11697 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11698 if test "$cf_cv_shlib_version" = rel; then
11699 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11701 cf_cv_shared_soname='`basename $@`'
11704 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11708 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
11712 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
11714 (nto-qnx*|openbsd*|freebsd[12].*)
11715 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11716 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
11717 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11719 (dragonfly*|freebsd*)
11720 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11721 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
11722 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
11723 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
11724 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11727 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11728 if test "$cf_cv_shlib_version" = rel; then
11729 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11731 cf_cv_shared_soname='`basename $@`'
11734 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11737 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11738 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
11739 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
11740 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11741 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11742 if test "$cf_cv_shlib_version" = auto; then
11743 if test -f /usr/libexec/ld.elf_so; then
11744 cf_cv_shlib_version=abi
11746 cf_cv_shlib_version=rel
11750 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11751 if test "$cf_cv_shlib_version" = rel; then
11752 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11754 cf_cv_shared_soname='`basename $@`'
11757 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
11759 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
11763 # tested with OSF/1 V3.2 and 'cc'
11764 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
11765 # link with shared libs).
11766 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
11769 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
11772 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
11773 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11774 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11775 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11777 cf_cv_rm_so_locs=yes
11779 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
11780 # tested with osr5.0.5
11781 if test "$GCC" != yes; then
11782 CC_SHARED_OPTS='-belf -KPIC'
11784 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
11785 if test "$cf_cv_enable_rpath" = yes ; then
11786 # only way is to set LD_RUN_PATH but no switch for it
11789 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11790 LINK_PROGS='LD_RUN_PATH=${libdir}'
11791 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
11794 # tested with SunOS 4.1.1 and gcc 2.7.0
11795 if test "$GCC" != yes; then
11796 CC_SHARED_OPTS='-KPIC'
11798 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
11799 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11802 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
11803 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
11804 if test "$DFT_LWR_MODEL" = "shared" ; then
11805 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
11806 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11808 if test "$cf_cv_enable_rpath" = yes ; then
11809 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
11812 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11813 if test "$cf_cv_shlib_version" = rel; then
11814 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11816 cf_cv_shared_soname='`basename $@`'
11819 if test "$GCC" != yes; then
11820 cf_save_CFLAGS="$CFLAGS"
11821 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
11823 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
11824 cat >"conftest.$ac_ext" <<_ACEOF
11825 #line 11825 "configure"
11826 #include "confdefs.h"
11831 printf("Hello\\n");
11836 rm -f "conftest.$ac_objext"
11837 if { (eval echo "$as_me:11837: \"$ac_compile\"") >&5
11838 (eval $ac_compile) 2>&5
11840 echo "$as_me:11840: \$? = $ac_status" >&5
11841 (exit "$ac_status"); } &&
11842 { ac_try='test -s "conftest.$ac_objext"'
11843 { (eval echo "$as_me:11843: \"$ac_try\"") >&5
11844 (eval $ac_try) 2>&5
11846 echo "$as_me:11846: \$? = $ac_status" >&5
11847 (exit "$ac_status"); }; }; then
11850 echo "$as_me: failed program was:" >&5
11851 cat "conftest.$ac_ext" >&5
11853 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11855 CFLAGS="$cf_save_CFLAGS"
11856 CC_SHARED_OPTS=$cf_shared_opts
11857 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
11859 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
11862 (sysv5uw7*|unix_sv*)
11863 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
11864 if test "$GCC" != yes; then
11865 CC_SHARED_OPTS='-KPIC'
11867 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
11870 CC_SHARED_OPTS='unknown'
11871 MK_SHARED_LIB='echo unknown'
11875 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
11876 case "$cf_cv_shlib_version" in
11878 case "$MK_SHARED_LIB" in
11880 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
11883 { echo "$as_me:11883: WARNING: ignored --with-shlib-version" >&5
11884 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
11890 if test -n "$cf_try_cflags"
11892 cat > conftest.$ac_ext <<EOF
11893 #line 11893 "${as_me:-configure}"
11895 int main(int argc, char *argv[])
11897 printf("hello\\n");
11898 return (argv[argc-1] == 0) ;
11901 cf_save_CFLAGS="$CFLAGS"
11902 for cf_opt in $cf_try_cflags
11904 CFLAGS="$cf_save_CFLAGS -$cf_opt"
11905 echo "$as_me:11905: checking if CFLAGS option -$cf_opt works" >&5
11906 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
11907 if { (eval echo "$as_me:11907: \"$ac_compile\"") >&5
11908 (eval $ac_compile) 2>&5
11910 echo "$as_me:11910: \$? = $ac_status" >&5
11911 (exit "$ac_status"); }; then
11912 echo "$as_me:11912: result: yes" >&5
11913 echo "${ECHO_T}yes" >&6
11914 cf_save_CFLAGS="$CFLAGS"
11916 echo "$as_me:11916: result: no" >&5
11917 echo "${ECHO_T}no" >&6
11920 CFLAGS="$cf_save_CFLAGS"
11923 # RPATH_LIST is a colon-separated list of directories
11924 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
11925 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
11927 test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
11929 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
11931 echo "${as_me:-configure}:11931: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
11933 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
11935 echo "${as_me:-configure}:11935: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
11937 # The test/sample programs in the original tree link using rpath option.
11938 # Make it optional for packagers.
11939 if test -n "$LOCAL_LDFLAGS"
11941 echo "$as_me:11941: checking if you want to link sample programs with rpath option" >&5
11942 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
11944 # Check whether --enable-rpath-link or --disable-rpath-link was given.
11945 if test "${enable_rpath_link+set}" = set; then
11946 enableval="$enable_rpath_link"
11947 with_rpath_link=$enableval
11949 with_rpath_link=yes
11951 echo "$as_me:11951: result: $with_rpath_link" >&5
11952 echo "${ECHO_T}$with_rpath_link" >&6
11953 if test "$with_rpath_link" = no
11960 ###############################################################################
11962 ### use option --enable-broken-linker to force on use of broken-linker support
11964 echo "$as_me:11964: checking if you want broken-linker support code" >&5
11965 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
11967 # Check whether --enable-broken_linker or --disable-broken_linker was given.
11968 if test "${enable_broken_linker+set}" = set; then
11969 enableval="$enable_broken_linker"
11970 with_broken_linker=$enableval
11972 with_broken_linker=no
11974 echo "$as_me:11974: result: $with_broken_linker" >&5
11975 echo "${ECHO_T}$with_broken_linker" >&6
11977 : "${BROKEN_LINKER:=0}"
11978 if test "x$with_broken_linker" = xyes ; then
11980 cat >>confdefs.h <<\EOF
11981 #define BROKEN_LINKER 1
11987 # Check to define _XOPEN_SOURCE "automatically"
11989 echo "$as_me:11989: checking if the POSIX test-macros are already defined" >&5
11990 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
11991 if test "${cf_cv_posix_visible+set}" = set; then
11992 echo $ECHO_N "(cached) $ECHO_C" >&6
11995 cat >"conftest.$ac_ext" <<_ACEOF
11996 #line 11996 "configure"
11997 #include "confdefs.h"
12003 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
12004 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
12005 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
12006 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
12007 #error conflicting symbols found
12014 rm -f "conftest.$ac_objext"
12015 if { (eval echo "$as_me:12015: \"$ac_compile\"") >&5
12016 (eval $ac_compile) 2>&5
12018 echo "$as_me:12018: \$? = $ac_status" >&5
12019 (exit "$ac_status"); } &&
12020 { ac_try='test -s "conftest.$ac_objext"'
12021 { (eval echo "$as_me:12021: \"$ac_try\"") >&5
12022 (eval $ac_try) 2>&5
12024 echo "$as_me:12024: \$? = $ac_status" >&5
12025 (exit "$ac_status"); }; }; then
12026 cf_cv_posix_visible=no
12028 echo "$as_me: failed program was:" >&5
12029 cat "conftest.$ac_ext" >&5
12030 cf_cv_posix_visible=yes
12032 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12035 echo "$as_me:12035: result: $cf_cv_posix_visible" >&5
12036 echo "${ECHO_T}$cf_cv_posix_visible" >&6
12038 if test "$cf_cv_posix_visible" = no; then
12040 cf_XOPEN_SOURCE=600
12041 cf_POSIX_C_SOURCE=199506L
12046 cf_xopen_source="-D_ALL_SOURCE"
12049 cf_XOPEN_SOURCE=600
12052 cf_xopen_source="-D_APPLE_C_SOURCE"
12055 cf_xopen_source="-D_DARWIN_C_SOURCE"
12058 (freebsd*|dragonfly*|midnightbsd*)
12059 # 5.x headers associate
12060 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
12061 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
12062 cf_POSIX_C_SOURCE=200112L
12063 cf_XOPEN_SOURCE=600
12064 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12067 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
12070 cf_xopen_source="-D_HPUX_SOURCE"
12073 cf_xopen_source="-D_SGI_SOURCE"
12076 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
12078 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
12080 echo "$as_me:12080: checking if this is the GNU C library" >&5
12081 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
12082 if test "${cf_cv_gnu_library+set}" = set; then
12083 echo $ECHO_N "(cached) $ECHO_C" >&6
12086 cat >"conftest.$ac_ext" <<_ACEOF
12087 #line 12087 "configure"
12088 #include "confdefs.h"
12089 #include <sys/types.h>
12094 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
12096 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
12099 # error not GNU C library
12105 rm -f "conftest.$ac_objext"
12106 if { (eval echo "$as_me:12106: \"$ac_compile\"") >&5
12107 (eval $ac_compile) 2>&5
12109 echo "$as_me:12109: \$? = $ac_status" >&5
12110 (exit "$ac_status"); } &&
12111 { ac_try='test -s "conftest.$ac_objext"'
12112 { (eval echo "$as_me:12112: \"$ac_try\"") >&5
12113 (eval $ac_try) 2>&5
12115 echo "$as_me:12115: \$? = $ac_status" >&5
12116 (exit "$ac_status"); }; }; then
12117 cf_cv_gnu_library=yes
12119 echo "$as_me: failed program was:" >&5
12120 cat "conftest.$ac_ext" >&5
12121 cf_cv_gnu_library=no
12123 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12126 echo "$as_me:12126: result: $cf_cv_gnu_library" >&5
12127 echo "${ECHO_T}$cf_cv_gnu_library" >&6
12129 if test x$cf_cv_gnu_library = xyes; then
12131 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
12132 # was changed to help a little. newlib incorporated the change about 4
12134 echo "$as_me:12134: checking if _DEFAULT_SOURCE can be used as a basis" >&5
12135 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
12136 if test "${cf_cv_gnu_library_219+set}" = set; then
12137 echo $ECHO_N "(cached) $ECHO_C" >&6
12140 cf_save="$CPPFLAGS"
12142 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12143 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12145 cat >"conftest.$ac_ext" <<_ACEOF
12146 #line 12146 "configure"
12147 #include "confdefs.h"
12148 #include <sys/types.h>
12153 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
12155 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
12158 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
12164 rm -f "conftest.$ac_objext"
12165 if { (eval echo "$as_me:12165: \"$ac_compile\"") >&5
12166 (eval $ac_compile) 2>&5
12168 echo "$as_me:12168: \$? = $ac_status" >&5
12169 (exit "$ac_status"); } &&
12170 { ac_try='test -s "conftest.$ac_objext"'
12171 { (eval echo "$as_me:12171: \"$ac_try\"") >&5
12172 (eval $ac_try) 2>&5
12174 echo "$as_me:12174: \$? = $ac_status" >&5
12175 (exit "$ac_status"); }; }; then
12176 cf_cv_gnu_library_219=yes
12178 echo "$as_me: failed program was:" >&5
12179 cat "conftest.$ac_ext" >&5
12180 cf_cv_gnu_library_219=no
12182 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12183 CPPFLAGS="$cf_save"
12186 echo "$as_me:12186: result: $cf_cv_gnu_library_219" >&5
12187 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
12189 if test "x$cf_cv_gnu_library_219" = xyes; then
12190 cf_save="$CPPFLAGS"
12191 echo "$as_me:12191: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
12192 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
12193 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
12194 echo $ECHO_N "(cached) $ECHO_C" >&6
12200 cf_new_extra_cppflags=
12202 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
12204 case "$cf_fix_cppflags" in
12206 case "$cf_add_cflags" in
12207 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12208 case "$cf_add_cflags" in
12210 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12212 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12213 && test -z "${cf_tst_cflags}" \
12214 && cf_fix_cppflags=yes
12216 if test "$cf_fix_cppflags" = yes ; then
12218 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12219 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12222 elif test "${cf_tst_cflags}" = "\"'" ; then
12224 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12225 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12231 case "$CPPFLAGS" in
12235 case "$cf_add_cflags" in
12237 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12239 CPPFLAGS=`echo "$CPPFLAGS" | \
12240 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12241 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12246 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12247 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12254 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12255 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12262 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12263 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12265 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12267 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12268 && test -z "${cf_tst_cflags}" \
12269 && cf_fix_cppflags=no
12274 if test -n "$cf_new_cflags" ; then
12276 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12277 CFLAGS="${CFLAGS}$cf_new_cflags"
12281 if test -n "$cf_new_cppflags" ; then
12283 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12284 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12288 if test -n "$cf_new_extra_cppflags" ; then
12290 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12291 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12295 cat >"conftest.$ac_ext" <<_ACEOF
12296 #line 12296 "configure"
12297 #include "confdefs.h"
12299 #include <limits.h>
12300 #include <sys/types.h>
12306 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
12309 # error GNU C library is too old
12315 rm -f "conftest.$ac_objext"
12316 if { (eval echo "$as_me:12316: \"$ac_compile\"") >&5
12317 (eval $ac_compile) 2>&5
12319 echo "$as_me:12319: \$? = $ac_status" >&5
12320 (exit "$ac_status"); } &&
12321 { ac_try='test -s "conftest.$ac_objext"'
12322 { (eval echo "$as_me:12322: \"$ac_try\"") >&5
12323 (eval $ac_try) 2>&5
12325 echo "$as_me:12325: \$? = $ac_status" >&5
12326 (exit "$ac_status"); }; }; then
12327 cf_cv_gnu_dftsrc_219=yes
12329 echo "$as_me: failed program was:" >&5
12330 cat "conftest.$ac_ext" >&5
12331 cf_cv_gnu_dftsrc_219=no
12333 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12336 echo "$as_me:12336: result: $cf_cv_gnu_dftsrc_219" >&5
12337 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
12338 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
12340 cf_cv_gnu_dftsrc_219=maybe
12343 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
12345 echo "$as_me:12345: checking if we must define _GNU_SOURCE" >&5
12346 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
12347 if test "${cf_cv_gnu_source+set}" = set; then
12348 echo $ECHO_N "(cached) $ECHO_C" >&6
12351 cat >"conftest.$ac_ext" <<_ACEOF
12352 #line 12352 "configure"
12353 #include "confdefs.h"
12354 #include <sys/types.h>
12359 #ifndef _XOPEN_SOURCE
12360 #error expected _XOPEN_SOURCE to be defined
12366 rm -f "conftest.$ac_objext"
12367 if { (eval echo "$as_me:12367: \"$ac_compile\"") >&5
12368 (eval $ac_compile) 2>&5
12370 echo "$as_me:12370: \$? = $ac_status" >&5
12371 (exit "$ac_status"); } &&
12372 { ac_try='test -s "conftest.$ac_objext"'
12373 { (eval echo "$as_me:12373: \"$ac_try\"") >&5
12374 (eval $ac_try) 2>&5
12376 echo "$as_me:12376: \$? = $ac_status" >&5
12377 (exit "$ac_status"); }; }; then
12378 cf_cv_gnu_source=no
12380 echo "$as_me: failed program was:" >&5
12381 cat "conftest.$ac_ext" >&5
12382 cf_save="$CPPFLAGS"
12387 cf_new_extra_cppflags=
12389 for cf_add_cflags in -D_GNU_SOURCE
12391 case "$cf_fix_cppflags" in
12393 case "$cf_add_cflags" in
12394 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12395 case "$cf_add_cflags" in
12397 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12399 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12400 && test -z "${cf_tst_cflags}" \
12401 && cf_fix_cppflags=yes
12403 if test "$cf_fix_cppflags" = yes ; then
12405 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12406 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12409 elif test "${cf_tst_cflags}" = "\"'" ; then
12411 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12412 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12418 case "$CPPFLAGS" in
12422 case "$cf_add_cflags" in
12424 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12426 CPPFLAGS=`echo "$CPPFLAGS" | \
12427 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12428 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12433 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12434 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12441 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12442 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12449 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12450 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12452 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12454 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12455 && test -z "${cf_tst_cflags}" \
12456 && cf_fix_cppflags=no
12461 if test -n "$cf_new_cflags" ; then
12463 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12464 CFLAGS="${CFLAGS}$cf_new_cflags"
12468 if test -n "$cf_new_cppflags" ; then
12470 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12471 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12475 if test -n "$cf_new_extra_cppflags" ; then
12477 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12478 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12482 cat >"conftest.$ac_ext" <<_ACEOF
12483 #line 12483 "configure"
12484 #include "confdefs.h"
12485 #include <sys/types.h>
12490 #ifdef _XOPEN_SOURCE
12491 #error expected _XOPEN_SOURCE to be undefined
12497 rm -f "conftest.$ac_objext"
12498 if { (eval echo "$as_me:12498: \"$ac_compile\"") >&5
12499 (eval $ac_compile) 2>&5
12501 echo "$as_me:12501: \$? = $ac_status" >&5
12502 (exit "$ac_status"); } &&
12503 { ac_try='test -s "conftest.$ac_objext"'
12504 { (eval echo "$as_me:12504: \"$ac_try\"") >&5
12505 (eval $ac_try) 2>&5
12507 echo "$as_me:12507: \$? = $ac_status" >&5
12508 (exit "$ac_status"); }; }; then
12509 cf_cv_gnu_source=no
12511 echo "$as_me: failed program was:" >&5
12512 cat "conftest.$ac_ext" >&5
12513 cf_cv_gnu_source=yes
12515 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12516 CPPFLAGS="$cf_save"
12519 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12522 echo "$as_me:12522: result: $cf_cv_gnu_source" >&5
12523 echo "${ECHO_T}$cf_cv_gnu_source" >&6
12525 if test "$cf_cv_gnu_source" = yes
12527 echo "$as_me:12527: checking if we should also define _DEFAULT_SOURCE" >&5
12528 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
12529 if test "${cf_cv_default_source+set}" = set; then
12530 echo $ECHO_N "(cached) $ECHO_C" >&6
12533 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12534 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
12536 cat >"conftest.$ac_ext" <<_ACEOF
12537 #line 12537 "configure"
12538 #include "confdefs.h"
12539 #include <sys/types.h>
12544 #ifdef _DEFAULT_SOURCE
12545 #error expected _DEFAULT_SOURCE to be undefined
12551 rm -f "conftest.$ac_objext"
12552 if { (eval echo "$as_me:12552: \"$ac_compile\"") >&5
12553 (eval $ac_compile) 2>&5
12555 echo "$as_me:12555: \$? = $ac_status" >&5
12556 (exit "$ac_status"); } &&
12557 { ac_try='test -s "conftest.$ac_objext"'
12558 { (eval echo "$as_me:12558: \"$ac_try\"") >&5
12559 (eval $ac_try) 2>&5
12561 echo "$as_me:12561: \$? = $ac_status" >&5
12562 (exit "$ac_status"); }; }; then
12563 cf_cv_default_source=no
12565 echo "$as_me: failed program was:" >&5
12566 cat "conftest.$ac_ext" >&5
12567 cf_cv_default_source=yes
12569 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12572 echo "$as_me:12572: result: $cf_cv_default_source" >&5
12573 echo "${ECHO_T}$cf_cv_default_source" >&6
12574 if test "$cf_cv_default_source" = yes
12577 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12578 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12588 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
12591 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
12594 if test "$cf_cv_posix_visible" = no; then
12596 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
12598 cf_save_CFLAGS="$CFLAGS"
12599 cf_save_CPPFLAGS="$CPPFLAGS"
12601 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
12602 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12603 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12605 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
12606 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12607 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12609 echo "$as_me:12609: checking if we should define _POSIX_C_SOURCE" >&5
12610 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
12611 if test "${cf_cv_posix_c_source+set}" = set; then
12612 echo $ECHO_N "(cached) $ECHO_C" >&6
12615 echo "${as_me:-configure}:12615: testing if the symbol is already defined go no further ..." 1>&5
12617 cat >"conftest.$ac_ext" <<_ACEOF
12618 #line 12618 "configure"
12619 #include "confdefs.h"
12620 #include <sys/types.h>
12625 #ifndef _POSIX_C_SOURCE
12632 rm -f "conftest.$ac_objext"
12633 if { (eval echo "$as_me:12633: \"$ac_compile\"") >&5
12634 (eval $ac_compile) 2>&5
12636 echo "$as_me:12636: \$? = $ac_status" >&5
12637 (exit "$ac_status"); } &&
12638 { ac_try='test -s "conftest.$ac_objext"'
12639 { (eval echo "$as_me:12639: \"$ac_try\"") >&5
12640 (eval $ac_try) 2>&5
12642 echo "$as_me:12642: \$? = $ac_status" >&5
12643 (exit "$ac_status"); }; }; then
12644 cf_cv_posix_c_source=no
12646 echo "$as_me: failed program was:" >&5
12647 cat "conftest.$ac_ext" >&5
12648 cf_want_posix_source=no
12649 case .$cf_POSIX_C_SOURCE in
12651 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12654 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12655 cf_want_posix_source=yes
12658 cf_want_posix_source=yes
12661 if test "$cf_want_posix_source" = yes ; then
12662 cat >"conftest.$ac_ext" <<_ACEOF
12663 #line 12663 "configure"
12664 #include "confdefs.h"
12665 #include <sys/types.h>
12670 #ifdef _POSIX_SOURCE
12677 rm -f "conftest.$ac_objext"
12678 if { (eval echo "$as_me:12678: \"$ac_compile\"") >&5
12679 (eval $ac_compile) 2>&5
12681 echo "$as_me:12681: \$? = $ac_status" >&5
12682 (exit "$ac_status"); } &&
12683 { ac_try='test -s "conftest.$ac_objext"'
12684 { (eval echo "$as_me:12684: \"$ac_try\"") >&5
12685 (eval $ac_try) 2>&5
12687 echo "$as_me:12687: \$? = $ac_status" >&5
12688 (exit "$ac_status"); }; }; then
12691 echo "$as_me: failed program was:" >&5
12692 cat "conftest.$ac_ext" >&5
12693 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
12695 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12698 echo "${as_me:-configure}:12698: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
12700 CFLAGS="$cf_trim_CFLAGS"
12701 CPPFLAGS="$cf_trim_CPPFLAGS"
12703 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12704 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
12706 echo "${as_me:-configure}:12706: testing if the second compile does not leave our definition intact error ..." 1>&5
12708 cat >"conftest.$ac_ext" <<_ACEOF
12709 #line 12709 "configure"
12710 #include "confdefs.h"
12711 #include <sys/types.h>
12716 #ifndef _POSIX_C_SOURCE
12723 rm -f "conftest.$ac_objext"
12724 if { (eval echo "$as_me:12724: \"$ac_compile\"") >&5
12725 (eval $ac_compile) 2>&5
12727 echo "$as_me:12727: \$? = $ac_status" >&5
12728 (exit "$ac_status"); } &&
12729 { ac_try='test -s "conftest.$ac_objext"'
12730 { (eval echo "$as_me:12730: \"$ac_try\"") >&5
12731 (eval $ac_try) 2>&5
12733 echo "$as_me:12733: \$? = $ac_status" >&5
12734 (exit "$ac_status"); }; }; then
12737 echo "$as_me: failed program was:" >&5
12738 cat "conftest.$ac_ext" >&5
12739 cf_cv_posix_c_source=no
12741 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12742 CFLAGS="$cf_save_CFLAGS"
12743 CPPFLAGS="$cf_save_CPPFLAGS"
12746 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12749 echo "$as_me:12749: result: $cf_cv_posix_c_source" >&5
12750 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
12752 if test "$cf_cv_posix_c_source" != no ; then
12753 CFLAGS="$cf_trim_CFLAGS"
12754 CPPFLAGS="$cf_trim_CPPFLAGS"
12759 cf_new_extra_cppflags=
12761 for cf_add_cflags in $cf_cv_posix_c_source
12763 case "$cf_fix_cppflags" in
12765 case "$cf_add_cflags" in
12766 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12767 case "$cf_add_cflags" in
12769 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12771 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12772 && test -z "${cf_tst_cflags}" \
12773 && cf_fix_cppflags=yes
12775 if test "$cf_fix_cppflags" = yes ; then
12777 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12778 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12781 elif test "${cf_tst_cflags}" = "\"'" ; then
12783 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12784 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12790 case "$CPPFLAGS" in
12794 case "$cf_add_cflags" in
12796 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12798 CPPFLAGS=`echo "$CPPFLAGS" | \
12799 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12800 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12805 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12806 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12813 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12814 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12821 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12822 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12824 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12826 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12827 && test -z "${cf_tst_cflags}" \
12828 && cf_fix_cppflags=no
12833 if test -n "$cf_new_cflags" ; then
12835 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12836 CFLAGS="${CFLAGS}$cf_new_cflags"
12840 if test -n "$cf_new_cppflags" ; then
12842 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12843 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12847 if test -n "$cf_new_extra_cppflags" ; then
12849 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12850 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12856 fi # cf_cv_posix_visible
12860 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
12863 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
12864 cf_xopen_source="-D_BSD_SOURCE"
12865 cf_XOPEN_SOURCE=600
12868 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
12871 cf_xopen_source="-D_OSF_SOURCE"
12874 cf_xopen_source="-D_QNX_SOURCE"
12877 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
12880 cf_xopen_source="-D__EXTENSIONS__"
12881 cf_cv_xopen_source=broken
12883 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
12889 echo "$as_me:12889: checking if we should define _XOPEN_SOURCE" >&5
12890 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12891 if test "${cf_cv_xopen_source+set}" = set; then
12892 echo $ECHO_N "(cached) $ECHO_C" >&6
12895 cat >"conftest.$ac_ext" <<_ACEOF
12896 #line 12896 "configure"
12897 #include "confdefs.h"
12899 #include <stdlib.h>
12900 #include <string.h>
12901 #include <sys/types.h>
12907 #ifndef _XOPEN_SOURCE
12914 rm -f "conftest.$ac_objext"
12915 if { (eval echo "$as_me:12915: \"$ac_compile\"") >&5
12916 (eval $ac_compile) 2>&5
12918 echo "$as_me:12918: \$? = $ac_status" >&5
12919 (exit "$ac_status"); } &&
12920 { ac_try='test -s "conftest.$ac_objext"'
12921 { (eval echo "$as_me:12921: \"$ac_try\"") >&5
12922 (eval $ac_try) 2>&5
12924 echo "$as_me:12924: \$? = $ac_status" >&5
12925 (exit "$ac_status"); }; }; then
12926 cf_cv_xopen_source=no
12928 echo "$as_me: failed program was:" >&5
12929 cat "conftest.$ac_ext" >&5
12930 cf_save="$CPPFLAGS"
12932 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12933 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12935 cat >"conftest.$ac_ext" <<_ACEOF
12936 #line 12936 "configure"
12937 #include "confdefs.h"
12939 #include <stdlib.h>
12940 #include <string.h>
12941 #include <sys/types.h>
12947 #ifdef _XOPEN_SOURCE
12954 rm -f "conftest.$ac_objext"
12955 if { (eval echo "$as_me:12955: \"$ac_compile\"") >&5
12956 (eval $ac_compile) 2>&5
12958 echo "$as_me:12958: \$? = $ac_status" >&5
12959 (exit "$ac_status"); } &&
12960 { ac_try='test -s "conftest.$ac_objext"'
12961 { (eval echo "$as_me:12961: \"$ac_try\"") >&5
12962 (eval $ac_try) 2>&5
12964 echo "$as_me:12964: \$? = $ac_status" >&5
12965 (exit "$ac_status"); }; }; then
12966 cf_cv_xopen_source=no
12968 echo "$as_me: failed program was:" >&5
12969 cat "conftest.$ac_ext" >&5
12970 cf_cv_xopen_source=$cf_XOPEN_SOURCE
12972 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12973 CPPFLAGS="$cf_save"
12976 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12979 echo "$as_me:12979: result: $cf_cv_xopen_source" >&5
12980 echo "${ECHO_T}$cf_cv_xopen_source" >&6
12982 if test "$cf_cv_xopen_source" != no ; then
12984 CFLAGS=`echo "$CFLAGS" | \
12985 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12986 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
12988 CPPFLAGS=`echo "$CPPFLAGS" | \
12989 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12990 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
12992 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12997 cf_new_extra_cppflags=
12999 for cf_add_cflags in $cf_temp_xopen_source
13001 case "$cf_fix_cppflags" in
13003 case "$cf_add_cflags" in
13004 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13005 case "$cf_add_cflags" in
13007 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13009 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13010 && test -z "${cf_tst_cflags}" \
13011 && cf_fix_cppflags=yes
13013 if test "$cf_fix_cppflags" = yes ; then
13015 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13016 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13019 elif test "${cf_tst_cflags}" = "\"'" ; then
13021 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13022 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13028 case "$CPPFLAGS" in
13032 case "$cf_add_cflags" in
13034 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13036 CPPFLAGS=`echo "$CPPFLAGS" | \
13037 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13038 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13043 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13044 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13051 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13052 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13059 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13060 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13062 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13064 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13065 && test -z "${cf_tst_cflags}" \
13066 && cf_fix_cppflags=no
13071 if test -n "$cf_new_cflags" ; then
13073 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13074 CFLAGS="${CFLAGS}$cf_new_cflags"
13078 if test -n "$cf_new_cppflags" ; then
13080 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13081 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13085 if test -n "$cf_new_extra_cppflags" ; then
13087 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13088 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13094 if test "$cf_cv_posix_visible" = no; then
13096 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
13098 cf_save_CFLAGS="$CFLAGS"
13099 cf_save_CPPFLAGS="$CPPFLAGS"
13101 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13102 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13103 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13105 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13106 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13107 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13109 echo "$as_me:13109: checking if we should define _POSIX_C_SOURCE" >&5
13110 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13111 if test "${cf_cv_posix_c_source+set}" = set; then
13112 echo $ECHO_N "(cached) $ECHO_C" >&6
13115 echo "${as_me:-configure}:13115: testing if the symbol is already defined go no further ..." 1>&5
13117 cat >"conftest.$ac_ext" <<_ACEOF
13118 #line 13118 "configure"
13119 #include "confdefs.h"
13120 #include <sys/types.h>
13125 #ifndef _POSIX_C_SOURCE
13132 rm -f "conftest.$ac_objext"
13133 if { (eval echo "$as_me:13133: \"$ac_compile\"") >&5
13134 (eval $ac_compile) 2>&5
13136 echo "$as_me:13136: \$? = $ac_status" >&5
13137 (exit "$ac_status"); } &&
13138 { ac_try='test -s "conftest.$ac_objext"'
13139 { (eval echo "$as_me:13139: \"$ac_try\"") >&5
13140 (eval $ac_try) 2>&5
13142 echo "$as_me:13142: \$? = $ac_status" >&5
13143 (exit "$ac_status"); }; }; then
13144 cf_cv_posix_c_source=no
13146 echo "$as_me: failed program was:" >&5
13147 cat "conftest.$ac_ext" >&5
13148 cf_want_posix_source=no
13149 case .$cf_POSIX_C_SOURCE in
13151 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13154 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13155 cf_want_posix_source=yes
13158 cf_want_posix_source=yes
13161 if test "$cf_want_posix_source" = yes ; then
13162 cat >"conftest.$ac_ext" <<_ACEOF
13163 #line 13163 "configure"
13164 #include "confdefs.h"
13165 #include <sys/types.h>
13170 #ifdef _POSIX_SOURCE
13177 rm -f "conftest.$ac_objext"
13178 if { (eval echo "$as_me:13178: \"$ac_compile\"") >&5
13179 (eval $ac_compile) 2>&5
13181 echo "$as_me:13181: \$? = $ac_status" >&5
13182 (exit "$ac_status"); } &&
13183 { ac_try='test -s "conftest.$ac_objext"'
13184 { (eval echo "$as_me:13184: \"$ac_try\"") >&5
13185 (eval $ac_try) 2>&5
13187 echo "$as_me:13187: \$? = $ac_status" >&5
13188 (exit "$ac_status"); }; }; then
13191 echo "$as_me: failed program was:" >&5
13192 cat "conftest.$ac_ext" >&5
13193 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13195 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13198 echo "${as_me:-configure}:13198: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13200 CFLAGS="$cf_trim_CFLAGS"
13201 CPPFLAGS="$cf_trim_CPPFLAGS"
13203 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13204 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13206 echo "${as_me:-configure}:13206: testing if the second compile does not leave our definition intact error ..." 1>&5
13208 cat >"conftest.$ac_ext" <<_ACEOF
13209 #line 13209 "configure"
13210 #include "confdefs.h"
13211 #include <sys/types.h>
13216 #ifndef _POSIX_C_SOURCE
13223 rm -f "conftest.$ac_objext"
13224 if { (eval echo "$as_me:13224: \"$ac_compile\"") >&5
13225 (eval $ac_compile) 2>&5
13227 echo "$as_me:13227: \$? = $ac_status" >&5
13228 (exit "$ac_status"); } &&
13229 { ac_try='test -s "conftest.$ac_objext"'
13230 { (eval echo "$as_me:13230: \"$ac_try\"") >&5
13231 (eval $ac_try) 2>&5
13233 echo "$as_me:13233: \$? = $ac_status" >&5
13234 (exit "$ac_status"); }; }; then
13237 echo "$as_me: failed program was:" >&5
13238 cat "conftest.$ac_ext" >&5
13239 cf_cv_posix_c_source=no
13241 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13242 CFLAGS="$cf_save_CFLAGS"
13243 CPPFLAGS="$cf_save_CPPFLAGS"
13246 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13249 echo "$as_me:13249: result: $cf_cv_posix_c_source" >&5
13250 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13252 if test "$cf_cv_posix_c_source" != no ; then
13253 CFLAGS="$cf_trim_CFLAGS"
13254 CPPFLAGS="$cf_trim_CPPFLAGS"
13259 cf_new_extra_cppflags=
13261 for cf_add_cflags in $cf_cv_posix_c_source
13263 case "$cf_fix_cppflags" in
13265 case "$cf_add_cflags" in
13266 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13267 case "$cf_add_cflags" in
13269 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13271 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13272 && test -z "${cf_tst_cflags}" \
13273 && cf_fix_cppflags=yes
13275 if test "$cf_fix_cppflags" = yes ; then
13277 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13278 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13281 elif test "${cf_tst_cflags}" = "\"'" ; then
13283 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13284 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13290 case "$CPPFLAGS" in
13294 case "$cf_add_cflags" in
13296 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13298 CPPFLAGS=`echo "$CPPFLAGS" | \
13299 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13300 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13305 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13306 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13313 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13314 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13321 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13322 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13324 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13326 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13327 && test -z "${cf_tst_cflags}" \
13328 && cf_fix_cppflags=no
13333 if test -n "$cf_new_cflags" ; then
13335 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13336 CFLAGS="${CFLAGS}$cf_new_cflags"
13340 if test -n "$cf_new_cppflags" ; then
13342 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13343 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13347 if test -n "$cf_new_extra_cppflags" ; then
13349 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13350 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13356 fi # cf_cv_posix_visible
13361 if test -n "$cf_xopen_source" ; then
13366 cf_new_extra_cppflags=
13368 for cf_add_cflags in $cf_xopen_source
13370 case "$cf_fix_cppflags" in
13372 case "$cf_add_cflags" in
13373 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13374 case "$cf_add_cflags" in
13376 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13378 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13379 && test -z "${cf_tst_cflags}" \
13380 && cf_fix_cppflags=yes
13382 if test "$cf_fix_cppflags" = yes ; then
13384 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13385 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13388 elif test "${cf_tst_cflags}" = "\"'" ; then
13390 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13391 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13397 case "$CPPFLAGS" in
13401 case "$cf_add_cflags" in
13403 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13405 CPPFLAGS=`echo "$CPPFLAGS" | \
13406 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13407 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13412 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13413 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13420 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13421 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13428 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13429 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13431 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13433 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13434 && test -z "${cf_tst_cflags}" \
13435 && cf_fix_cppflags=no
13440 if test -n "$cf_new_cflags" ; then
13441 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13443 echo "${as_me:-configure}:13443: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13445 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13446 CFLAGS="${CFLAGS}$cf_new_cflags"
13450 if test -n "$cf_new_cppflags" ; then
13451 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13453 echo "${as_me:-configure}:13453: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13455 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13456 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13460 if test -n "$cf_new_extra_cppflags" ; then
13461 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13463 echo "${as_me:-configure}:13463: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13465 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13466 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13472 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
13473 echo "$as_me:13473: checking if _XOPEN_SOURCE really is set" >&5
13474 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
13475 cat >"conftest.$ac_ext" <<_ACEOF
13476 #line 13476 "configure"
13477 #include "confdefs.h"
13478 #include <stdlib.h>
13483 #ifndef _XOPEN_SOURCE
13490 rm -f "conftest.$ac_objext"
13491 if { (eval echo "$as_me:13491: \"$ac_compile\"") >&5
13492 (eval $ac_compile) 2>&5
13494 echo "$as_me:13494: \$? = $ac_status" >&5
13495 (exit "$ac_status"); } &&
13496 { ac_try='test -s "conftest.$ac_objext"'
13497 { (eval echo "$as_me:13497: \"$ac_try\"") >&5
13498 (eval $ac_try) 2>&5
13500 echo "$as_me:13500: \$? = $ac_status" >&5
13501 (exit "$ac_status"); }; }; then
13502 cf_XOPEN_SOURCE_set=yes
13504 echo "$as_me: failed program was:" >&5
13505 cat "conftest.$ac_ext" >&5
13506 cf_XOPEN_SOURCE_set=no
13508 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13509 echo "$as_me:13509: result: $cf_XOPEN_SOURCE_set" >&5
13510 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
13511 if test "$cf_XOPEN_SOURCE_set" = yes
13513 cat >"conftest.$ac_ext" <<_ACEOF
13514 #line 13514 "configure"
13515 #include "confdefs.h"
13516 #include <stdlib.h>
13521 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
13528 rm -f "conftest.$ac_objext"
13529 if { (eval echo "$as_me:13529: \"$ac_compile\"") >&5
13530 (eval $ac_compile) 2>&5
13532 echo "$as_me:13532: \$? = $ac_status" >&5
13533 (exit "$ac_status"); } &&
13534 { ac_try='test -s "conftest.$ac_objext"'
13535 { (eval echo "$as_me:13535: \"$ac_try\"") >&5
13536 (eval $ac_try) 2>&5
13538 echo "$as_me:13538: \$? = $ac_status" >&5
13539 (exit "$ac_status"); }; }; then
13540 cf_XOPEN_SOURCE_set_ok=yes
13542 echo "$as_me: failed program was:" >&5
13543 cat "conftest.$ac_ext" >&5
13544 cf_XOPEN_SOURCE_set_ok=no
13546 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13547 if test "$cf_XOPEN_SOURCE_set_ok" = no
13549 { echo "$as_me:13549: WARNING: _XOPEN_SOURCE is lower than requested" >&5
13550 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
13554 echo "$as_me:13554: checking if we should define _XOPEN_SOURCE" >&5
13555 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13556 if test "${cf_cv_xopen_source+set}" = set; then
13557 echo $ECHO_N "(cached) $ECHO_C" >&6
13560 cat >"conftest.$ac_ext" <<_ACEOF
13561 #line 13561 "configure"
13562 #include "confdefs.h"
13564 #include <stdlib.h>
13565 #include <string.h>
13566 #include <sys/types.h>
13572 #ifndef _XOPEN_SOURCE
13579 rm -f "conftest.$ac_objext"
13580 if { (eval echo "$as_me:13580: \"$ac_compile\"") >&5
13581 (eval $ac_compile) 2>&5
13583 echo "$as_me:13583: \$? = $ac_status" >&5
13584 (exit "$ac_status"); } &&
13585 { ac_try='test -s "conftest.$ac_objext"'
13586 { (eval echo "$as_me:13586: \"$ac_try\"") >&5
13587 (eval $ac_try) 2>&5
13589 echo "$as_me:13589: \$? = $ac_status" >&5
13590 (exit "$ac_status"); }; }; then
13591 cf_cv_xopen_source=no
13593 echo "$as_me: failed program was:" >&5
13594 cat "conftest.$ac_ext" >&5
13595 cf_save="$CPPFLAGS"
13597 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13598 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13600 cat >"conftest.$ac_ext" <<_ACEOF
13601 #line 13601 "configure"
13602 #include "confdefs.h"
13604 #include <stdlib.h>
13605 #include <string.h>
13606 #include <sys/types.h>
13612 #ifdef _XOPEN_SOURCE
13619 rm -f "conftest.$ac_objext"
13620 if { (eval echo "$as_me:13620: \"$ac_compile\"") >&5
13621 (eval $ac_compile) 2>&5
13623 echo "$as_me:13623: \$? = $ac_status" >&5
13624 (exit "$ac_status"); } &&
13625 { ac_try='test -s "conftest.$ac_objext"'
13626 { (eval echo "$as_me:13626: \"$ac_try\"") >&5
13627 (eval $ac_try) 2>&5
13629 echo "$as_me:13629: \$? = $ac_status" >&5
13630 (exit "$ac_status"); }; }; then
13631 cf_cv_xopen_source=no
13633 echo "$as_me: failed program was:" >&5
13634 cat "conftest.$ac_ext" >&5
13635 cf_cv_xopen_source=$cf_XOPEN_SOURCE
13637 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13638 CPPFLAGS="$cf_save"
13641 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13644 echo "$as_me:13644: result: $cf_cv_xopen_source" >&5
13645 echo "${ECHO_T}$cf_cv_xopen_source" >&6
13647 if test "$cf_cv_xopen_source" != no ; then
13649 CFLAGS=`echo "$CFLAGS" | \
13650 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13651 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13653 CPPFLAGS=`echo "$CPPFLAGS" | \
13654 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13655 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13657 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13662 cf_new_extra_cppflags=
13664 for cf_add_cflags in $cf_temp_xopen_source
13666 case "$cf_fix_cppflags" in
13668 case "$cf_add_cflags" in
13669 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13670 case "$cf_add_cflags" in
13672 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13674 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13675 && test -z "${cf_tst_cflags}" \
13676 && cf_fix_cppflags=yes
13678 if test "$cf_fix_cppflags" = yes ; then
13680 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13681 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13684 elif test "${cf_tst_cflags}" = "\"'" ; then
13686 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13687 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13693 case "$CPPFLAGS" in
13697 case "$cf_add_cflags" in
13699 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13701 CPPFLAGS=`echo "$CPPFLAGS" | \
13702 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13703 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13708 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13709 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13716 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13717 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13724 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13725 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13727 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13729 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13730 && test -z "${cf_tst_cflags}" \
13731 && cf_fix_cppflags=no
13736 if test -n "$cf_new_cflags" ; then
13738 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13739 CFLAGS="${CFLAGS}$cf_new_cflags"
13743 if test -n "$cf_new_cppflags" ; then
13745 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13746 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13750 if test -n "$cf_new_extra_cppflags" ; then
13752 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13753 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13761 fi # cf_cv_posix_visible
13763 # Check whether --enable-largefile or --disable-largefile was given.
13764 if test "${enable_largefile+set}" = set; then
13765 enableval="$enable_largefile"
13768 if test "$enable_largefile" != no; then
13770 echo "$as_me:13770: checking for special C compiler options needed for large files" >&5
13771 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13772 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13773 echo $ECHO_N "(cached) $ECHO_C" >&6
13775 ac_cv_sys_largefile_CC=no
13776 if test "$GCC" != yes; then
13779 # IRIX 6.2 and later do not support large files by default,
13780 # so use the C compiler's -n32 option if that helps.
13781 cat >"conftest.$ac_ext" <<_ACEOF
13782 #line 13782 "configure"
13783 #include "confdefs.h"
13784 #include <sys/types.h>
13785 /* Check that off_t can represent 2**63 - 1 correctly.
13786 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13787 since some C++ compilers masquerading as C compilers
13788 incorrectly reject 9223372036854775807. */
13789 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13790 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13791 && LARGE_OFF_T % 2147483647 == 1)
13801 rm -f "conftest.$ac_objext"
13802 if { (eval echo "$as_me:13802: \"$ac_compile\"") >&5
13803 (eval $ac_compile) 2>&5
13805 echo "$as_me:13805: \$? = $ac_status" >&5
13806 (exit "$ac_status"); } &&
13807 { ac_try='test -s "conftest.$ac_objext"'
13808 { (eval echo "$as_me:13808: \"$ac_try\"") >&5
13809 (eval $ac_try) 2>&5
13811 echo "$as_me:13811: \$? = $ac_status" >&5
13812 (exit "$ac_status"); }; }; then
13815 echo "$as_me: failed program was:" >&5
13816 cat "conftest.$ac_ext" >&5
13818 rm -f "conftest.$ac_objext"
13820 rm -f "conftest.$ac_objext"
13821 if { (eval echo "$as_me:13821: \"$ac_compile\"") >&5
13822 (eval $ac_compile) 2>&5
13824 echo "$as_me:13824: \$? = $ac_status" >&5
13825 (exit "$ac_status"); } &&
13826 { ac_try='test -s "conftest.$ac_objext"'
13827 { (eval echo "$as_me:13827: \"$ac_try\"") >&5
13828 (eval $ac_try) 2>&5
13830 echo "$as_me:13830: \$? = $ac_status" >&5
13831 (exit "$ac_status"); }; }; then
13832 ac_cv_sys_largefile_CC=' -n32'; break
13834 echo "$as_me: failed program was:" >&5
13835 cat "conftest.$ac_ext" >&5
13837 rm -f "conftest.$ac_objext"
13841 rm -f "conftest.$ac_ext"
13844 echo "$as_me:13844: result: $ac_cv_sys_largefile_CC" >&5
13845 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13846 if test "$ac_cv_sys_largefile_CC" != no; then
13847 CC=$CC$ac_cv_sys_largefile_CC
13850 echo "$as_me:13850: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13851 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13852 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13853 echo $ECHO_N "(cached) $ECHO_C" >&6
13856 ac_cv_sys_file_offset_bits=no
13857 cat >"conftest.$ac_ext" <<_ACEOF
13858 #line 13858 "configure"
13859 #include "confdefs.h"
13860 #include <sys/types.h>
13861 /* Check that off_t can represent 2**63 - 1 correctly.
13862 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13863 since some C++ compilers masquerading as C compilers
13864 incorrectly reject 9223372036854775807. */
13865 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13866 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13867 && LARGE_OFF_T % 2147483647 == 1)
13877 rm -f "conftest.$ac_objext"
13878 if { (eval echo "$as_me:13878: \"$ac_compile\"") >&5
13879 (eval $ac_compile) 2>&5
13881 echo "$as_me:13881: \$? = $ac_status" >&5
13882 (exit "$ac_status"); } &&
13883 { ac_try='test -s "conftest.$ac_objext"'
13884 { (eval echo "$as_me:13884: \"$ac_try\"") >&5
13885 (eval $ac_try) 2>&5
13887 echo "$as_me:13887: \$? = $ac_status" >&5
13888 (exit "$ac_status"); }; }; then
13891 echo "$as_me: failed program was:" >&5
13892 cat "conftest.$ac_ext" >&5
13894 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13895 cat >"conftest.$ac_ext" <<_ACEOF
13896 #line 13896 "configure"
13897 #include "confdefs.h"
13898 #define _FILE_OFFSET_BITS 64
13899 #include <sys/types.h>
13900 /* Check that off_t can represent 2**63 - 1 correctly.
13901 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13902 since some C++ compilers masquerading as C compilers
13903 incorrectly reject 9223372036854775807. */
13904 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13905 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13906 && LARGE_OFF_T % 2147483647 == 1)
13916 rm -f "conftest.$ac_objext"
13917 if { (eval echo "$as_me:13917: \"$ac_compile\"") >&5
13918 (eval $ac_compile) 2>&5
13920 echo "$as_me:13920: \$? = $ac_status" >&5
13921 (exit "$ac_status"); } &&
13922 { ac_try='test -s "conftest.$ac_objext"'
13923 { (eval echo "$as_me:13923: \"$ac_try\"") >&5
13924 (eval $ac_try) 2>&5
13926 echo "$as_me:13926: \$? = $ac_status" >&5
13927 (exit "$ac_status"); }; }; then
13928 ac_cv_sys_file_offset_bits=64; break
13930 echo "$as_me: failed program was:" >&5
13931 cat "conftest.$ac_ext" >&5
13933 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13937 echo "$as_me:13937: result: $ac_cv_sys_file_offset_bits" >&5
13938 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13939 if test "$ac_cv_sys_file_offset_bits" != no; then
13941 cat >>confdefs.h <<EOF
13942 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13947 echo "$as_me:13947: checking for _LARGE_FILES value needed for large files" >&5
13948 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13949 if test "${ac_cv_sys_large_files+set}" = set; then
13950 echo $ECHO_N "(cached) $ECHO_C" >&6
13953 ac_cv_sys_large_files=no
13954 cat >"conftest.$ac_ext" <<_ACEOF
13955 #line 13955 "configure"
13956 #include "confdefs.h"
13957 #include <sys/types.h>
13958 /* Check that off_t can represent 2**63 - 1 correctly.
13959 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13960 since some C++ compilers masquerading as C compilers
13961 incorrectly reject 9223372036854775807. */
13962 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13963 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13964 && LARGE_OFF_T % 2147483647 == 1)
13974 rm -f "conftest.$ac_objext"
13975 if { (eval echo "$as_me:13975: \"$ac_compile\"") >&5
13976 (eval $ac_compile) 2>&5
13978 echo "$as_me:13978: \$? = $ac_status" >&5
13979 (exit "$ac_status"); } &&
13980 { ac_try='test -s "conftest.$ac_objext"'
13981 { (eval echo "$as_me:13981: \"$ac_try\"") >&5
13982 (eval $ac_try) 2>&5
13984 echo "$as_me:13984: \$? = $ac_status" >&5
13985 (exit "$ac_status"); }; }; then
13988 echo "$as_me: failed program was:" >&5
13989 cat "conftest.$ac_ext" >&5
13991 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13992 cat >"conftest.$ac_ext" <<_ACEOF
13993 #line 13993 "configure"
13994 #include "confdefs.h"
13995 #define _LARGE_FILES 1
13996 #include <sys/types.h>
13997 /* Check that off_t can represent 2**63 - 1 correctly.
13998 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13999 since some C++ compilers masquerading as C compilers
14000 incorrectly reject 9223372036854775807. */
14001 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14002 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14003 && LARGE_OFF_T % 2147483647 == 1)
14013 rm -f "conftest.$ac_objext"
14014 if { (eval echo "$as_me:14014: \"$ac_compile\"") >&5
14015 (eval $ac_compile) 2>&5
14017 echo "$as_me:14017: \$? = $ac_status" >&5
14018 (exit "$ac_status"); } &&
14019 { ac_try='test -s "conftest.$ac_objext"'
14020 { (eval echo "$as_me:14020: \"$ac_try\"") >&5
14021 (eval $ac_try) 2>&5
14023 echo "$as_me:14023: \$? = $ac_status" >&5
14024 (exit "$ac_status"); }; }; then
14025 ac_cv_sys_large_files=1; break
14027 echo "$as_me: failed program was:" >&5
14028 cat "conftest.$ac_ext" >&5
14030 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14034 echo "$as_me:14034: result: $ac_cv_sys_large_files" >&5
14035 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14036 if test "$ac_cv_sys_large_files" != no; then
14038 cat >>confdefs.h <<EOF
14039 #define _LARGE_FILES $ac_cv_sys_large_files
14046 if test "$enable_largefile" != no ; then
14047 echo "$as_me:14047: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14048 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14049 if test "${ac_cv_sys_largefile_source+set}" = set; then
14050 echo $ECHO_N "(cached) $ECHO_C" >&6
14053 ac_cv_sys_largefile_source=no
14054 cat >"conftest.$ac_ext" <<_ACEOF
14055 #line 14055 "configure"
14056 #include "confdefs.h"
14066 rm -f "conftest.$ac_objext"
14067 if { (eval echo "$as_me:14067: \"$ac_compile\"") >&5
14068 (eval $ac_compile) 2>&5
14070 echo "$as_me:14070: \$? = $ac_status" >&5
14071 (exit "$ac_status"); } &&
14072 { ac_try='test -s "conftest.$ac_objext"'
14073 { (eval echo "$as_me:14073: \"$ac_try\"") >&5
14074 (eval $ac_try) 2>&5
14076 echo "$as_me:14076: \$? = $ac_status" >&5
14077 (exit "$ac_status"); }; }; then
14080 echo "$as_me: failed program was:" >&5
14081 cat "conftest.$ac_ext" >&5
14083 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14084 cat >"conftest.$ac_ext" <<_ACEOF
14085 #line 14085 "configure"
14086 #include "confdefs.h"
14087 #define _LARGEFILE_SOURCE 1
14097 rm -f "conftest.$ac_objext"
14098 if { (eval echo "$as_me:14098: \"$ac_compile\"") >&5
14099 (eval $ac_compile) 2>&5
14101 echo "$as_me:14101: \$? = $ac_status" >&5
14102 (exit "$ac_status"); } &&
14103 { ac_try='test -s "conftest.$ac_objext"'
14104 { (eval echo "$as_me:14104: \"$ac_try\"") >&5
14105 (eval $ac_try) 2>&5
14107 echo "$as_me:14107: \$? = $ac_status" >&5
14108 (exit "$ac_status"); }; }; then
14109 ac_cv_sys_largefile_source=1; break
14111 echo "$as_me: failed program was:" >&5
14112 cat "conftest.$ac_ext" >&5
14114 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14118 echo "$as_me:14118: result: $ac_cv_sys_largefile_source" >&5
14119 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14120 if test "$ac_cv_sys_largefile_source" != no; then
14122 cat >>confdefs.h <<EOF
14123 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14129 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14130 # in glibc 2.1.3, but that breaks too many other things.
14131 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14132 echo "$as_me:14132: checking for fseeko" >&5
14133 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14134 if test "${ac_cv_func_fseeko+set}" = set; then
14135 echo $ECHO_N "(cached) $ECHO_C" >&6
14137 cat >"conftest.$ac_ext" <<_ACEOF
14138 #line 14138 "configure"
14139 #include "confdefs.h"
14144 return fseeko && fseeko (stdin, 0, 0);
14149 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14150 if { (eval echo "$as_me:14150: \"$ac_link\"") >&5
14151 (eval $ac_link) 2>&5
14153 echo "$as_me:14153: \$? = $ac_status" >&5
14154 (exit "$ac_status"); } &&
14155 { ac_try='test -s "conftest$ac_exeext"'
14156 { (eval echo "$as_me:14156: \"$ac_try\"") >&5
14157 (eval $ac_try) 2>&5
14159 echo "$as_me:14159: \$? = $ac_status" >&5
14160 (exit "$ac_status"); }; }; then
14161 ac_cv_func_fseeko=yes
14163 echo "$as_me: failed program was:" >&5
14164 cat "conftest.$ac_ext" >&5
14165 ac_cv_func_fseeko=no
14167 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14169 echo "$as_me:14169: result: $ac_cv_func_fseeko" >&5
14170 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14171 if test $ac_cv_func_fseeko = yes; then
14173 cat >>confdefs.h <<\EOF
14174 #define HAVE_FSEEKO 1
14179 # Normally we would collect these definitions in the config.h,
14180 # but (like _XOPEN_SOURCE), some environments rely on having these
14181 # defined before any of the system headers are included. Another
14182 # case comes up with C++, e.g., on AIX the compiler compiles the
14183 # header files by themselves before looking at the body files it is
14184 # told to compile. For ncurses, those header files do not include
14186 if test "$ac_cv_sys_large_files" != no
14189 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14190 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14193 if test "$ac_cv_sys_largefile_source" != no
14196 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14197 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14200 if test "$ac_cv_sys_file_offset_bits" != no
14203 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14204 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14208 echo "$as_me:14208: checking whether to use struct dirent64" >&5
14209 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14210 if test "${cf_cv_struct_dirent64+set}" = set; then
14211 echo $ECHO_N "(cached) $ECHO_C" >&6
14214 cat >"conftest.$ac_ext" <<_ACEOF
14215 #line 14215 "configure"
14216 #include "confdefs.h"
14218 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14219 #include <sys/types.h>
14220 #include <dirent.h>
14226 /* if transitional largefile support is setup, this is true */
14227 extern struct dirent64 * readdir(DIR *);
14228 struct dirent64 *x = readdir((DIR *)0);
14229 struct dirent *y = readdir((DIR *)0);
14237 rm -f "conftest.$ac_objext"
14238 if { (eval echo "$as_me:14238: \"$ac_compile\"") >&5
14239 (eval $ac_compile) 2>&5
14241 echo "$as_me:14241: \$? = $ac_status" >&5
14242 (exit "$ac_status"); } &&
14243 { ac_try='test -s "conftest.$ac_objext"'
14244 { (eval echo "$as_me:14244: \"$ac_try\"") >&5
14245 (eval $ac_try) 2>&5
14247 echo "$as_me:14247: \$? = $ac_status" >&5
14248 (exit "$ac_status"); }; }; then
14249 cf_cv_struct_dirent64=yes
14251 echo "$as_me: failed program was:" >&5
14252 cat "conftest.$ac_ext" >&5
14253 cf_cv_struct_dirent64=no
14255 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14258 echo "$as_me:14258: result: $cf_cv_struct_dirent64" >&5
14259 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14260 test "$cf_cv_struct_dirent64" = yes &&
14261 cat >>confdefs.h <<\EOF
14262 #define HAVE_STRUCT_DIRENT64 1
14267 ### Enable compiling-in rcs id's
14268 echo "$as_me:14268: checking if RCS identifiers should be compiled-in" >&5
14269 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14271 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14272 if test "${with_rcs_ids+set}" = set; then
14273 withval="$with_rcs_ids"
14274 with_rcs_ids=$withval
14278 echo "$as_me:14278: result: $with_rcs_ids" >&5
14279 echo "${ECHO_T}$with_rcs_ids" >&6
14280 test "$with_rcs_ids" = yes &&
14281 cat >>confdefs.h <<\EOF
14282 #define USE_RCS_IDS 1
14285 ###############################################################################
14287 ### Note that some functions (such as const) are normally disabled anyway.
14288 echo "$as_me:14288: checking if you want to build with function extensions" >&5
14289 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14291 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14292 if test "${enable_ext_funcs+set}" = set; then
14293 enableval="$enable_ext_funcs"
14294 with_ext_funcs=$enableval
14298 echo "$as_me:14298: result: $with_ext_funcs" >&5
14299 echo "${ECHO_T}$with_ext_funcs" >&6
14300 if test "$with_ext_funcs" = yes ; then
14301 NCURSES_EXT_FUNCS=1
14303 cat >>confdefs.h <<\EOF
14304 #define HAVE_USE_DEFAULT_COLORS 1
14307 cat >>confdefs.h <<\EOF
14308 #define NCURSES_EXT_FUNCS 1
14312 NCURSES_EXT_FUNCS=0
14315 ### use option --enable-const to turn on use of const beyond that in XSI.
14316 echo "$as_me:14316: checking for extended use of const keyword" >&5
14317 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14319 # Check whether --enable-const or --disable-const was given.
14320 if test "${enable_const+set}" = set; then
14321 enableval="$enable_const"
14322 with_ext_const=$enableval
14326 echo "$as_me:14326: result: $with_ext_const" >&5
14327 echo "${ECHO_T}$with_ext_const" >&6
14328 NCURSES_CONST='/*nothing*/'
14329 if test "$with_ext_const" = yes ; then
14330 NCURSES_CONST=const
14333 ###############################################################################
14334 # These options are relatively safe to experiment with.
14336 echo "$as_me:14336: checking if you want all development code" >&5
14337 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14339 # Check whether --with-develop or --without-develop was given.
14340 if test "${with_develop+set}" = set; then
14341 withval="$with_develop"
14342 with_develop=$withval
14346 echo "$as_me:14346: result: $with_develop" >&5
14347 echo "${ECHO_T}$with_develop" >&6
14349 ###############################################################################
14350 # These are just experimental, probably should not be in a package:
14352 # This is still experimental (20080329), but should ultimately be moved to
14353 # the script-block --with-normal, etc.
14355 echo "$as_me:14355: checking if you want to link with the pthread library" >&5
14356 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14358 # Check whether --with-pthread or --without-pthread was given.
14359 if test "${with_pthread+set}" = set; then
14360 withval="$with_pthread"
14361 with_pthread=$withval
14365 echo "$as_me:14365: result: $with_pthread" >&5
14366 echo "${ECHO_T}$with_pthread" >&6
14368 if test "$with_pthread" != no ; then
14369 echo "$as_me:14369: checking for pthread.h" >&5
14370 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14371 if test "${ac_cv_header_pthread_h+set}" = set; then
14372 echo $ECHO_N "(cached) $ECHO_C" >&6
14374 cat >"conftest.$ac_ext" <<_ACEOF
14375 #line 14375 "configure"
14376 #include "confdefs.h"
14377 #include <pthread.h>
14379 if { (eval echo "$as_me:14379: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14380 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14382 $EGREP -v '^ *\+' conftest.er1 >conftest.err
14384 cat conftest.err >&5
14385 echo "$as_me:14385: \$? = $ac_status" >&5
14386 (exit "$ac_status"); } >/dev/null; then
14387 if test -s conftest.err; then
14388 ac_cpp_err=$ac_c_preproc_warn_flag
14395 if test -z "$ac_cpp_err"; then
14396 ac_cv_header_pthread_h=yes
14398 echo "$as_me: failed program was:" >&5
14399 cat "conftest.$ac_ext" >&5
14400 ac_cv_header_pthread_h=no
14402 rm -f conftest.err "conftest.$ac_ext"
14404 echo "$as_me:14404: result: $ac_cv_header_pthread_h" >&5
14405 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14406 if test "$ac_cv_header_pthread_h" = yes; then
14408 cat >>confdefs.h <<\EOF
14409 #define HAVE_PTHREADS_H 1
14412 for cf_lib_pthread in pthread c_r
14414 echo "$as_me:14414: checking if we can link with the $cf_lib_pthread library" >&5
14415 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14416 cf_save_LIBS="$LIBS"
14418 cf_add_libs="$LIBS"
14421 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14422 # filter duplicates
14423 for cf_add_1lib in $cf_add_0lib; do
14424 for cf_add_2lib in $cf_add_libs; do
14425 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14430 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14432 LIBS="$cf_add_libs"
14434 cat >"conftest.$ac_ext" <<_ACEOF
14435 #line 14435 "configure"
14436 #include "confdefs.h"
14438 #include <pthread.h>
14444 int rc = pthread_create(0,0,0,0);
14445 int r2 = pthread_mutexattr_settype(0, 0);
14451 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14452 if { (eval echo "$as_me:14452: \"$ac_link\"") >&5
14453 (eval $ac_link) 2>&5
14455 echo "$as_me:14455: \$? = $ac_status" >&5
14456 (exit "$ac_status"); } &&
14457 { ac_try='test -s "conftest$ac_exeext"'
14458 { (eval echo "$as_me:14458: \"$ac_try\"") >&5
14459 (eval $ac_try) 2>&5
14461 echo "$as_me:14461: \$? = $ac_status" >&5
14462 (exit "$ac_status"); }; }; then
14465 echo "$as_me: failed program was:" >&5
14466 cat "conftest.$ac_ext" >&5
14469 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14470 LIBS="$cf_save_LIBS"
14471 echo "$as_me:14471: result: $with_pthread" >&5
14472 echo "${ECHO_T}$with_pthread" >&6
14473 test "$with_pthread" = yes && break
14476 if test "$with_pthread" = yes ; then
14478 cf_add_libs="$LIBS"
14481 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14482 # filter duplicates
14483 for cf_add_1lib in $cf_add_0lib; do
14484 for cf_add_2lib in $cf_add_libs; do
14485 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14490 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14492 LIBS="$cf_add_libs"
14494 cat >>confdefs.h <<\EOF
14495 #define HAVE_LIBPTHREADS 1
14499 { { echo "$as_me:14499: error: Cannot link with pthread library" >&5
14500 echo "$as_me: error: Cannot link with pthread library" >&2;}
14501 { (exit 1); exit 1; }; }
14508 echo "$as_me:14508: checking if you want to use weak-symbols for pthreads" >&5
14509 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14511 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14512 if test "${enable_weak_symbols+set}" = set; then
14513 enableval="$enable_weak_symbols"
14514 use_weak_symbols=$withval
14516 use_weak_symbols=no
14518 echo "$as_me:14518: result: $use_weak_symbols" >&5
14519 echo "${ECHO_T}$use_weak_symbols" >&6
14520 if test "$use_weak_symbols" = yes ; then
14522 echo "$as_me:14522: checking if $CC supports weak symbols" >&5
14523 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14524 if test "${cf_cv_weak_symbols+set}" = set; then
14525 echo $ECHO_N "(cached) $ECHO_C" >&6
14528 cat >"conftest.$ac_ext" <<_ACEOF
14529 #line 14529 "configure"
14530 #include "confdefs.h"
14537 #if defined(__GNUC__)
14538 # if defined __USE_ISOC99
14539 # define _cat_pragma(exp) _Pragma(#exp)
14540 # define _weak_pragma(exp) _cat_pragma(weak name)
14542 # define _weak_pragma(exp)
14544 # define _declare(name) __extension__ extern __typeof__(name) name
14545 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
14548 weak_symbol(fopen);
14554 rm -f "conftest.$ac_objext"
14555 if { (eval echo "$as_me:14555: \"$ac_compile\"") >&5
14556 (eval $ac_compile) 2>&5
14558 echo "$as_me:14558: \$? = $ac_status" >&5
14559 (exit "$ac_status"); } &&
14560 { ac_try='test -s "conftest.$ac_objext"'
14561 { (eval echo "$as_me:14561: \"$ac_try\"") >&5
14562 (eval $ac_try) 2>&5
14564 echo "$as_me:14564: \$? = $ac_status" >&5
14565 (exit "$ac_status"); }; }; then
14566 cf_cv_weak_symbols=yes
14568 echo "$as_me: failed program was:" >&5
14569 cat "conftest.$ac_ext" >&5
14570 cf_cv_weak_symbols=no
14572 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14575 echo "$as_me:14575: result: $cf_cv_weak_symbols" >&5
14576 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14579 cf_cv_weak_symbols=no
14582 if test $cf_cv_weak_symbols = yes ; then
14584 cat >>confdefs.h <<\EOF
14585 #define USE_WEAK_SYMBOLS 1
14591 if test "$with_pthread" = "yes" ; then
14593 cat >>confdefs.h <<\EOF
14594 #define USE_PTHREADS 1
14597 enable_reentrant=yes
14598 if test $cf_cv_weak_symbols = yes ; then
14603 # OpenSUSE is installing ncurses6, using reentrant option.
14604 echo "$as_me:14604: checking for _nc_TABSIZE" >&5
14605 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
14606 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
14607 echo $ECHO_N "(cached) $ECHO_C" >&6
14609 cat >"conftest.$ac_ext" <<_ACEOF
14610 #line 14610 "configure"
14611 #include "confdefs.h"
14612 #define _nc_TABSIZE autoconf_temporary
14613 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14620 /* We use char because int might match the return type of a gcc2
14621 builtin and then its argument prototype would still apply. */
14622 char _nc_TABSIZE (void);
14628 /* The GNU C library defines stubs for functions which it implements
14629 to always fail with ENOSYS. Some functions are actually named
14630 something starting with __ and the normal name is an alias. */
14631 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
14632 #error found stub for _nc_TABSIZE
14635 return _nc_TABSIZE ();
14640 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14641 if { (eval echo "$as_me:14641: \"$ac_link\"") >&5
14642 (eval $ac_link) 2>&5
14644 echo "$as_me:14644: \$? = $ac_status" >&5
14645 (exit "$ac_status"); } &&
14646 { ac_try='test -s "conftest$ac_exeext"'
14647 { (eval echo "$as_me:14647: \"$ac_try\"") >&5
14648 (eval $ac_try) 2>&5
14650 echo "$as_me:14650: \$? = $ac_status" >&5
14651 (exit "$ac_status"); }; }; then
14652 ac_cv_func__nc_TABSIZE=yes
14654 echo "$as_me: failed program was:" >&5
14655 cat "conftest.$ac_ext" >&5
14656 ac_cv_func__nc_TABSIZE=no
14658 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14660 echo "$as_me:14660: result: $ac_cv_func__nc_TABSIZE" >&5
14661 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
14662 if test "$ac_cv_func__nc_TABSIZE" = yes; then
14663 assume_reentrant=yes
14665 assume_reentrant=no
14668 # Reentrant code has to be opaque; there's little advantage to making ncurses
14669 # opaque outside of that, so there is no --enable-opaque option. We can use
14670 # this option without --with-pthreads, but this will be always set for
14672 echo "$as_me:14672: checking if you want experimental reentrant code" >&5
14673 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
14675 # Check whether --enable-reentrant or --disable-reentrant was given.
14676 if test "${enable_reentrant+set}" = set; then
14677 enableval="$enable_reentrant"
14678 with_reentrant=$enableval
14680 with_reentrant=$assume_reentrant
14682 echo "$as_me:14682: result: $with_reentrant" >&5
14683 echo "${ECHO_T}$with_reentrant" >&6
14684 if test "$with_reentrant" = yes ; then
14685 cf_cv_enable_reentrant=1
14686 if test $cf_cv_weak_symbols = yes ; then
14688 # remove pthread library from $LIBS
14689 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
14691 elif test "$assume_reentrant" = no ; then
14692 LIB_SUFFIX="t${LIB_SUFFIX}"
14695 cat >>confdefs.h <<\EOF
14696 #define USE_REENTRANT 1
14700 cf_cv_enable_reentrant=0
14703 ### Allow using a different wrap-prefix
14704 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
14705 echo "$as_me:14705: checking for prefix used to wrap public variables" >&5
14706 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
14708 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
14709 if test "${with_wrap_prefix+set}" = set; then
14710 withval="$with_wrap_prefix"
14711 NCURSES_WRAP_PREFIX=$withval
14713 NCURSES_WRAP_PREFIX=_nc_
14715 echo "$as_me:14715: result: $NCURSES_WRAP_PREFIX" >&5
14716 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
14718 NCURSES_WRAP_PREFIX=_nc_
14721 cat >>confdefs.h <<EOF
14722 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
14725 ###############################################################################
14727 ### use option --disable-echo to suppress full display compiling commands
14729 echo "$as_me:14729: checking if you want to see long compiling messages" >&5
14730 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
14732 # Check whether --enable-echo or --disable-echo was given.
14733 if test "${enable_echo+set}" = set; then
14734 enableval="$enable_echo"
14735 test "$enableval" != no && enableval=yes
14736 if test "$enableval" != "yes" ; then
14739 ECHO_LD='@echo linking $@;'
14740 RULE_CC='@echo compiling $<'
14741 SHOW_CC='@echo compiling $@'
14763 echo "$as_me:14763: result: $enableval" >&5
14764 echo "${ECHO_T}$enableval" >&6
14766 if test "$GCC" = yes || test "$GXX" = yes
14769 if test "$GCC" = yes || test "$GXX" = yes
14773 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
14775 echo "${as_me:-configure}:14775: testing repairing CFLAGS: $CFLAGS ..." 1>&5
14778 for cf_temp_scan in $CFLAGS
14780 case "x$cf_temp_scan" in
14783 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
14784 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
14789 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
14790 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
14795 CFLAGS="$cf_temp_flags"
14796 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
14798 echo "${as_me:-configure}:14798: testing ... fixed $CFLAGS ..." 1>&5
14800 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
14802 echo "${as_me:-configure}:14802: testing ... extra $EXTRA_CFLAGS ..." 1>&5
14808 if test "$GCC" = yes || test "$GXX" = yes
14812 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
14814 echo "${as_me:-configure}:14814: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
14817 for cf_temp_scan in $CPPFLAGS
14819 case "x$cf_temp_scan" in
14822 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
14823 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
14828 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
14829 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
14834 CPPFLAGS="$cf_temp_flags"
14835 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
14837 echo "${as_me:-configure}:14837: testing ... fixed $CPPFLAGS ..." 1>&5
14839 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
14841 echo "${as_me:-configure}:14841: testing ... extra $EXTRA_CFLAGS ..." 1>&5
14847 if test "$GCC" = yes || test "$GXX" = yes
14851 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
14853 echo "${as_me:-configure}:14853: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
14856 for cf_temp_scan in $LDFLAGS
14858 case "x$cf_temp_scan" in
14861 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
14862 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
14867 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
14868 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
14873 LDFLAGS="$cf_temp_flags"
14874 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
14876 echo "${as_me:-configure}:14876: testing ... fixed $LDFLAGS ..." 1>&5
14878 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
14880 echo "${as_me:-configure}:14880: testing ... extra $EXTRA_CFLAGS ..." 1>&5
14886 echo "$as_me:14886: checking if you want to turn on gcc warnings" >&5
14887 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
14889 # Check whether --enable-warnings or --disable-warnings was given.
14890 if test "${enable_warnings+set}" = set; then
14891 enableval="$enable_warnings"
14892 test "$enableval" != yes && enableval=no
14893 if test "$enableval" != "no" ; then
14894 enable_warnings=yes
14903 echo "$as_me:14903: result: $enable_warnings" >&5
14904 echo "${ECHO_T}$enable_warnings" >&6
14905 if test "$enable_warnings" = "yes"
14908 if test "x$have_x" = xyes; then
14910 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
14911 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
14912 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
14913 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
14914 for cf_X_CFLAGS in $X_CFLAGS
14916 case "x$cf_X_CFLAGS" in
14918 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
14921 CFLAGS="$CFLAGS $cf_X_CFLAGS"
14926 cat >"conftest.$ac_ext" <<_ACEOF
14927 #line 14927 "configure"
14928 #include "confdefs.h"
14930 #include <stdlib.h>
14931 #include <X11/Intrinsic.h>
14936 String foo = malloc(1); (void)foo
14941 rm -f "conftest.$ac_objext"
14942 if { (eval echo "$as_me:14942: \"$ac_compile\"") >&5
14943 (eval $ac_compile) 2>&5
14945 echo "$as_me:14945: \$? = $ac_status" >&5
14946 (exit "$ac_status"); } &&
14947 { ac_try='test -s "conftest.$ac_objext"'
14948 { (eval echo "$as_me:14948: \"$ac_try\"") >&5
14949 (eval $ac_try) 2>&5
14951 echo "$as_me:14951: \$? = $ac_status" >&5
14952 (exit "$ac_status"); }; }; then
14954 echo "$as_me:14954: checking for X11/Xt const-feature" >&5
14955 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
14956 if test "${cf_cv_const_x_string+set}" = set; then
14957 echo $ECHO_N "(cached) $ECHO_C" >&6
14960 cat >"conftest.$ac_ext" <<_ACEOF
14961 #line 14961 "configure"
14962 #include "confdefs.h"
14964 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
14965 #undef XTSTRINGDEFINES /* X11R5 and later */
14966 #include <stdlib.h>
14967 #include <X11/Intrinsic.h>
14972 String foo = malloc(1); *foo = 0
14977 rm -f "conftest.$ac_objext"
14978 if { (eval echo "$as_me:14978: \"$ac_compile\"") >&5
14979 (eval $ac_compile) 2>&5
14981 echo "$as_me:14981: \$? = $ac_status" >&5
14982 (exit "$ac_status"); } &&
14983 { ac_try='test -s "conftest.$ac_objext"'
14984 { (eval echo "$as_me:14984: \"$ac_try\"") >&5
14985 (eval $ac_try) 2>&5
14987 echo "$as_me:14987: \$? = $ac_status" >&5
14988 (exit "$ac_status"); }; }; then
14990 cf_cv_const_x_string=no
14993 echo "$as_me: failed program was:" >&5
14994 cat "conftest.$ac_ext" >&5
14996 cf_cv_const_x_string=yes
14999 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15002 echo "$as_me:15002: result: $cf_cv_const_x_string" >&5
15003 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15005 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
15006 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
15007 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
15009 case "$cf_cv_const_x_string" in
15012 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15013 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15018 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15019 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15025 echo "$as_me: failed program was:" >&5
15026 cat "conftest.$ac_ext" >&5
15028 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15030 cat > "conftest.$ac_ext" <<EOF
15031 #line 15031 "${as_me:-configure}"
15032 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15034 if test "$INTEL_COMPILER" = yes
15036 # The "-wdXXX" options suppress warnings:
15037 # remark #1419: external declaration in primary source file
15038 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15039 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15040 # remark #193: zero used for undefined preprocessing identifier
15041 # remark #593: variable "curs_sb_left_arrow" was set but never used
15042 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15043 # remark #869: parameter "tw" was never referenced
15044 # remark #981: operands are evaluated in unspecified order
15045 # warning #279: controlling expression is constant
15047 { echo "$as_me:15047: checking for $CC warning options..." >&5
15048 echo "$as_me: checking for $CC warning options..." >&6;}
15049 cf_save_CFLAGS="$CFLAGS"
15050 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
15062 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
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"); }; then
15068 test -n "$verbose" && echo "$as_me:15068: result: ... -$cf_opt" >&5
15069 echo "${ECHO_T}... -$cf_opt" >&6
15070 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15073 CFLAGS="$cf_save_CFLAGS"
15074 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
15076 { echo "$as_me:15076: checking for $CC warning options..." >&5
15077 echo "$as_me: checking for $CC warning options..." >&6;}
15078 cf_save_CFLAGS="$CFLAGS"
15080 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15081 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15082 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15083 for cf_opt in W Wall \
15084 Wbad-function-cast \
15087 Wdeclaration-after-statement \
15090 Wmissing-declarations \
15091 Wmissing-prototypes \
15095 Wstrict-prototypes \
15096 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15098 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15099 if { (eval echo "$as_me:15099: \"$ac_compile\"") >&5
15100 (eval $ac_compile) 2>&5
15102 echo "$as_me:15102: \$? = $ac_status" >&5
15103 (exit "$ac_status"); }; then
15104 test -n "$verbose" && echo "$as_me:15104: result: ... -$cf_opt" >&5
15105 echo "${ECHO_T}... -$cf_opt" >&6
15108 case "$GCC_VERSION" in
15110 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15112 echo "${as_me:-configure}:15112: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15118 case "$GCC_VERSION" in
15120 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15122 echo "${as_me:-configure}:15122: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15128 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15131 CFLAGS="$cf_save_CFLAGS"
15137 if test "$GCC" = yes || test "$GXX" = yes
15139 cat > conftest.i <<EOF
15141 #define GCC_PRINTF 0
15144 #define GCC_SCANF 0
15146 #ifndef GCC_NORETURN
15147 #define GCC_NORETURN /* nothing */
15150 #define GCC_UNUSED /* nothing */
15153 if test "$GCC" = yes
15155 { echo "$as_me:15155: checking for $CC __attribute__ directives..." >&5
15156 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15157 cat > "conftest.$ac_ext" <<EOF
15158 #line 15158 "${as_me:-configure}"
15159 #include "confdefs.h"
15160 #include "conftest.h"
15161 #include "conftest.i"
15163 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15165 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15168 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
15170 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
15172 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15173 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
15174 extern void foo(void) GCC_NORETURN;
15175 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
15177 cf_printf_attribute=no
15178 cf_scanf_attribute=no
15179 for cf_attribute in scanf printf unused noreturn
15182 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15184 cf_directive="__attribute__(($cf_attribute))"
15185 echo "checking for $CC $cf_directive" 1>&5
15187 case "$cf_attribute" in
15189 cf_printf_attribute=yes
15190 cat >conftest.h <<EOF
15191 #define GCC_$cf_ATTRIBUTE 1
15195 cf_scanf_attribute=yes
15196 cat >conftest.h <<EOF
15197 #define GCC_$cf_ATTRIBUTE 1
15201 cat >conftest.h <<EOF
15202 #define GCC_$cf_ATTRIBUTE $cf_directive
15207 if { (eval echo "$as_me:15207: \"$ac_compile\"") >&5
15208 (eval $ac_compile) 2>&5
15210 echo "$as_me:15210: \$? = $ac_status" >&5
15211 (exit "$ac_status"); }; then
15212 test -n "$verbose" && echo "$as_me:15212: result: ... $cf_attribute" >&5
15213 echo "${ECHO_T}... $cf_attribute" >&6
15214 cat conftest.h >>confdefs.h
15215 case "$cf_attribute" in
15218 cat >>confdefs.h <<EOF
15219 #define GCC_NORETURN $cf_directive
15224 cf_value='/* nothing */'
15225 if test "$cf_printf_attribute" != no ; then
15226 cf_value='__attribute__((format(printf,fmt,var)))'
15228 cat >>confdefs.h <<\EOF
15229 #define GCC_PRINTF 1
15234 cat >>confdefs.h <<EOF
15235 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15240 cf_value='/* nothing */'
15241 if test "$cf_scanf_attribute" != no ; then
15242 cf_value='__attribute__((format(scanf,fmt,var)))'
15244 cat >>confdefs.h <<\EOF
15245 #define GCC_SCANF 1
15250 cat >>confdefs.h <<EOF
15251 #define GCC_SCANFLIKE(fmt,var) $cf_value
15257 cat >>confdefs.h <<EOF
15258 #define GCC_UNUSED $cf_directive
15266 ${FGREP-fgrep} define conftest.i >>confdefs.h
15273 if test "x$enable_warnings" = "xyes"; then
15275 ADAFLAGS="$ADAFLAGS -gnatg"
15279 ### use option --enable-assertions to turn on generation of assertion code
15280 echo "$as_me:15280: checking if you want to enable runtime assertions" >&5
15281 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15283 # Check whether --enable-assertions or --disable-assertions was given.
15284 if test "${enable_assertions+set}" = set; then
15285 enableval="$enable_assertions"
15286 with_assertions=$enableval
15290 echo "$as_me:15290: result: $with_assertions" >&5
15291 echo "${ECHO_T}$with_assertions" >&6
15294 if test "$with_assertions" = no
15296 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15299 ADAFLAGS="$ADAFLAGS -gnata"
15304 ### use option --disable-leaks to suppress "permanent" leaks, for testing
15306 cat >>confdefs.h <<\EOF
15307 #define HAVE_NC_ALLOC_H 1
15310 ### use option --enable-expanded to generate certain macros as functions
15312 # Check whether --enable-expanded or --disable-expanded was given.
15313 if test "${enable_expanded+set}" = set; then
15314 enableval="$enable_expanded"
15315 test "$enableval" = yes &&
15316 cat >>confdefs.h <<\EOF
15317 #define NCURSES_EXPANDED 1
15322 ### use option --disable-macros to suppress macros in favor of functions
15324 # Check whether --enable-macros or --disable-macros was given.
15325 if test "${enable_macros+set}" = set; then
15326 enableval="$enable_macros"
15327 test "$enableval" = no &&
15328 cat >>confdefs.h <<\EOF
15329 #define NCURSES_NOMACROS 1
15334 # Normally we only add trace() to the debug-library. Allow this to be
15335 # extended to all models of the ncurses library:
15337 case "$CFLAGS $CPPFLAGS" in
15343 echo "$as_me:15343: checking whether to add trace feature to all models" >&5
15344 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
15346 # Check whether --with-trace or --without-trace was given.
15347 if test "${with_trace+set}" = set; then
15348 withval="$with_trace"
15349 cf_with_trace=$withval
15351 cf_with_trace=$cf_all_traces
15353 echo "$as_me:15353: result: $cf_with_trace" >&5
15354 echo "${ECHO_T}$cf_with_trace" >&6
15356 if test "$cf_with_trace" = yes ; then
15362 cf_new_extra_cppflags=
15364 for cf_add_cflags in -DTRACE
15366 case "$cf_fix_cppflags" in
15368 case "$cf_add_cflags" in
15369 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15370 case "$cf_add_cflags" in
15372 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15374 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15375 && test -z "${cf_tst_cflags}" \
15376 && cf_fix_cppflags=yes
15378 if test "$cf_fix_cppflags" = yes ; then
15380 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15381 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15384 elif test "${cf_tst_cflags}" = "\"'" ; then
15386 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15387 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15393 case "$CPPFLAGS" in
15397 case "$cf_add_cflags" in
15399 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15401 CPPFLAGS=`echo "$CPPFLAGS" | \
15402 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15403 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15408 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15409 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15416 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15417 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15424 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15425 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15427 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15429 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15430 && test -z "${cf_tst_cflags}" \
15431 && cf_fix_cppflags=no
15436 if test -n "$cf_new_cflags" ; then
15438 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15439 CFLAGS="${CFLAGS}$cf_new_cflags"
15443 if test -n "$cf_new_cppflags" ; then
15445 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15446 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15450 if test -n "$cf_new_extra_cppflags" ; then
15452 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15453 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15461 echo "$as_me:15461: checking if we want to use GNAT projects" >&5
15462 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
15464 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
15465 if test "${enable_gnat_projects+set}" = set; then
15466 enableval="$enable_gnat_projects"
15467 test "$enableval" != no && enableval=yes
15468 if test "$enableval" != "yes" ; then
15469 enable_gnat_projects=no
15471 enable_gnat_projects=yes
15475 enable_gnat_projects=yes
15478 echo "$as_me:15478: result: $enable_gnat_projects" >&5
15479 echo "${ECHO_T}$enable_gnat_projects" >&6
15481 ### Checks for libraries.
15482 case $cf_cv_system_name in
15486 echo "$as_me:15486: checking for gettimeofday" >&5
15487 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
15488 if test "${ac_cv_func_gettimeofday+set}" = set; then
15489 echo $ECHO_N "(cached) $ECHO_C" >&6
15491 cat >"conftest.$ac_ext" <<_ACEOF
15492 #line 15492 "configure"
15493 #include "confdefs.h"
15494 #define gettimeofday autoconf_temporary
15495 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15496 #undef gettimeofday
15502 /* We use char because int might match the return type of a gcc2
15503 builtin and then its argument prototype would still apply. */
15504 char gettimeofday (void);
15510 /* The GNU C library defines stubs for functions which it implements
15511 to always fail with ENOSYS. Some functions are actually named
15512 something starting with __ and the normal name is an alias. */
15513 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
15514 #error found stub for gettimeofday
15517 return gettimeofday ();
15522 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15523 if { (eval echo "$as_me:15523: \"$ac_link\"") >&5
15524 (eval $ac_link) 2>&5
15526 echo "$as_me:15526: \$? = $ac_status" >&5
15527 (exit "$ac_status"); } &&
15528 { ac_try='test -s "conftest$ac_exeext"'
15529 { (eval echo "$as_me:15529: \"$ac_try\"") >&5
15530 (eval $ac_try) 2>&5
15532 echo "$as_me:15532: \$? = $ac_status" >&5
15533 (exit "$ac_status"); }; }; then
15534 ac_cv_func_gettimeofday=yes
15536 echo "$as_me: failed program was:" >&5
15537 cat "conftest.$ac_ext" >&5
15538 ac_cv_func_gettimeofday=no
15540 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15542 echo "$as_me:15542: result: $ac_cv_func_gettimeofday" >&5
15543 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
15544 if test "$ac_cv_func_gettimeofday" = yes; then
15545 cat >>confdefs.h <<\EOF
15546 #define HAVE_GETTIMEOFDAY 1
15551 echo "$as_me:15551: checking for gettimeofday in -lbsd" >&5
15552 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
15553 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
15554 echo $ECHO_N "(cached) $ECHO_C" >&6
15556 ac_check_lib_save_LIBS=$LIBS
15558 cat >"conftest.$ac_ext" <<_ACEOF
15559 #line 15559 "configure"
15560 #include "confdefs.h"
15562 /* Override any gcc2 internal prototype to avoid an error. */
15566 /* We use char because int might match the return type of a gcc2
15567 builtin and then its argument prototype would still apply. */
15568 char gettimeofday ();
15577 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15578 if { (eval echo "$as_me:15578: \"$ac_link\"") >&5
15579 (eval $ac_link) 2>&5
15581 echo "$as_me:15581: \$? = $ac_status" >&5
15582 (exit "$ac_status"); } &&
15583 { ac_try='test -s "conftest$ac_exeext"'
15584 { (eval echo "$as_me:15584: \"$ac_try\"") >&5
15585 (eval $ac_try) 2>&5
15587 echo "$as_me:15587: \$? = $ac_status" >&5
15588 (exit "$ac_status"); }; }; then
15589 ac_cv_lib_bsd_gettimeofday=yes
15591 echo "$as_me: failed program was:" >&5
15592 cat "conftest.$ac_ext" >&5
15593 ac_cv_lib_bsd_gettimeofday=no
15595 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15596 LIBS=$ac_check_lib_save_LIBS
15598 echo "$as_me:15598: result: $ac_cv_lib_bsd_gettimeofday" >&5
15599 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
15600 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
15602 cat >>confdefs.h <<\EOF
15603 #define HAVE_GETTIMEOFDAY 1
15613 ### Checks for header files.
15614 echo "$as_me:15614: checking for ANSI C header files" >&5
15615 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15616 if test "${ac_cv_header_stdc+set}" = set; then
15617 echo $ECHO_N "(cached) $ECHO_C" >&6
15619 cat >"conftest.$ac_ext" <<_ACEOF
15620 #line 15620 "configure"
15621 #include "confdefs.h"
15622 #include <stdlib.h>
15623 #include <stdarg.h>
15624 #include <string.h>
15628 if { (eval echo "$as_me:15628: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15629 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15631 $EGREP -v '^ *\+' conftest.er1 >conftest.err
15633 cat conftest.err >&5
15634 echo "$as_me:15634: \$? = $ac_status" >&5
15635 (exit "$ac_status"); } >/dev/null; then
15636 if test -s conftest.err; then
15637 ac_cpp_err=$ac_c_preproc_warn_flag
15644 if test -z "$ac_cpp_err"; then
15645 ac_cv_header_stdc=yes
15647 echo "$as_me: failed program was:" >&5
15648 cat "conftest.$ac_ext" >&5
15649 ac_cv_header_stdc=no
15651 rm -f conftest.err "conftest.$ac_ext"
15653 if test $ac_cv_header_stdc = yes; then
15654 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15655 cat >"conftest.$ac_ext" <<_ACEOF
15656 #line 15656 "configure"
15657 #include "confdefs.h"
15658 #include <string.h>
15661 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15662 $EGREP "memchr" >/dev/null 2>&1; then
15665 ac_cv_header_stdc=no
15671 if test $ac_cv_header_stdc = yes; then
15672 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15673 cat >"conftest.$ac_ext" <<_ACEOF
15674 #line 15674 "configure"
15675 #include "confdefs.h"
15676 #include <stdlib.h>
15679 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15680 $EGREP "free" >/dev/null 2>&1; then
15683 ac_cv_header_stdc=no
15689 if test $ac_cv_header_stdc = yes; then
15690 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15691 if test "$cross_compiling" = yes; then
15694 cat >"conftest.$ac_ext" <<_ACEOF
15695 #line 15695 "configure"
15696 #include "confdefs.h"
15698 #if ((' ' & 0x0FF) == 0x020)
15699 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15700 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15702 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15703 || ('j' <= (c) && (c) <= 'r') \
15704 || ('s' <= (c) && (c) <= 'z'))
15705 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15708 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15713 for (i = 0; i < 256; i++)
15714 if (XOR (islower (i), ISLOWER (i))
15715 || toupper (i) != TOUPPER (i))
15716 $ac_main_return(2);
15717 $ac_main_return (0);
15720 rm -f "conftest$ac_exeext"
15721 if { (eval echo "$as_me:15721: \"$ac_link\"") >&5
15722 (eval $ac_link) 2>&5
15724 echo "$as_me:15724: \$? = $ac_status" >&5
15725 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
15726 { (eval echo "$as_me:15726: \"$ac_try\"") >&5
15727 (eval $ac_try) 2>&5
15729 echo "$as_me:15729: \$? = $ac_status" >&5
15730 (exit "$ac_status"); }; }; then
15733 echo "$as_me: program exited with status $ac_status" >&5
15734 echo "$as_me: failed program was:" >&5
15735 cat "conftest.$ac_ext" >&5
15736 ac_cv_header_stdc=no
15738 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
15742 echo "$as_me:15742: result: $ac_cv_header_stdc" >&5
15743 echo "${ECHO_T}$ac_cv_header_stdc" >&6
15744 if test $ac_cv_header_stdc = yes; then
15746 cat >>confdefs.h <<\EOF
15747 #define STDC_HEADERS 1
15752 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
15754 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
15755 inttypes.h stdint.h unistd.h
15757 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15758 echo "$as_me:15758: checking for $ac_header" >&5
15759 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15760 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15761 echo $ECHO_N "(cached) $ECHO_C" >&6
15763 cat >"conftest.$ac_ext" <<_ACEOF
15764 #line 15764 "configure"
15765 #include "confdefs.h"
15766 $ac_includes_default
15767 #include <$ac_header>
15769 rm -f "conftest.$ac_objext"
15770 if { (eval echo "$as_me:15770: \"$ac_compile\"") >&5
15771 (eval $ac_compile) 2>&5
15773 echo "$as_me:15773: \$? = $ac_status" >&5
15774 (exit "$ac_status"); } &&
15775 { ac_try='test -s "conftest.$ac_objext"'
15776 { (eval echo "$as_me:15776: \"$ac_try\"") >&5
15777 (eval $ac_try) 2>&5
15779 echo "$as_me:15779: \$? = $ac_status" >&5
15780 (exit "$ac_status"); }; }; then
15781 eval "$as_ac_Header=yes"
15783 echo "$as_me: failed program was:" >&5
15784 cat "conftest.$ac_ext" >&5
15785 eval "$as_ac_Header=no"
15787 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15789 echo "$as_me:15789: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
15790 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
15791 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
15792 cat >>confdefs.h <<EOF
15793 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15799 echo "$as_me:15799: checking for signed char" >&5
15800 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
15801 if test "${ac_cv_type_signed_char+set}" = set; then
15802 echo $ECHO_N "(cached) $ECHO_C" >&6
15804 cat >"conftest.$ac_ext" <<_ACEOF
15805 #line 15805 "configure"
15806 #include "confdefs.h"
15807 $ac_includes_default
15811 if ((signed char *) 0)
15813 if (sizeof (signed char))
15819 rm -f "conftest.$ac_objext"
15820 if { (eval echo "$as_me:15820: \"$ac_compile\"") >&5
15821 (eval $ac_compile) 2>&5
15823 echo "$as_me:15823: \$? = $ac_status" >&5
15824 (exit "$ac_status"); } &&
15825 { ac_try='test -s "conftest.$ac_objext"'
15826 { (eval echo "$as_me:15826: \"$ac_try\"") >&5
15827 (eval $ac_try) 2>&5
15829 echo "$as_me:15829: \$? = $ac_status" >&5
15830 (exit "$ac_status"); }; }; then
15831 ac_cv_type_signed_char=yes
15833 echo "$as_me: failed program was:" >&5
15834 cat "conftest.$ac_ext" >&5
15835 ac_cv_type_signed_char=no
15837 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15839 echo "$as_me:15839: result: $ac_cv_type_signed_char" >&5
15840 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
15842 echo "$as_me:15842: checking size of signed char" >&5
15843 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
15844 if test "${ac_cv_sizeof_signed_char+set}" = set; then
15845 echo $ECHO_N "(cached) $ECHO_C" >&6
15847 if test "$ac_cv_type_signed_char" = yes; then
15848 if test "$cross_compiling" = yes; then
15849 # Depending upon the size, compute the lo and hi bounds.
15850 cat >"conftest.$ac_ext" <<_ACEOF
15851 #line 15851 "configure"
15852 #include "confdefs.h"
15853 $ac_includes_default
15857 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
15862 rm -f "conftest.$ac_objext"
15863 if { (eval echo "$as_me:15863: \"$ac_compile\"") >&5
15864 (eval $ac_compile) 2>&5
15866 echo "$as_me:15866: \$? = $ac_status" >&5
15867 (exit "$ac_status"); } &&
15868 { ac_try='test -s "conftest.$ac_objext"'
15869 { (eval echo "$as_me:15869: \"$ac_try\"") >&5
15870 (eval $ac_try) 2>&5
15872 echo "$as_me:15872: \$? = $ac_status" >&5
15873 (exit "$ac_status"); }; }; then
15876 cat >"conftest.$ac_ext" <<_ACEOF
15877 #line 15877 "configure"
15878 #include "confdefs.h"
15879 $ac_includes_default
15883 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
15888 rm -f "conftest.$ac_objext"
15889 if { (eval echo "$as_me:15889: \"$ac_compile\"") >&5
15890 (eval $ac_compile) 2>&5
15892 echo "$as_me:15892: \$? = $ac_status" >&5
15893 (exit "$ac_status"); } &&
15894 { ac_try='test -s "conftest.$ac_objext"'
15895 { (eval echo "$as_me:15895: \"$ac_try\"") >&5
15896 (eval $ac_try) 2>&5
15898 echo "$as_me:15898: \$? = $ac_status" >&5
15899 (exit "$ac_status"); }; }; then
15900 ac_hi=$ac_mid; break
15902 echo "$as_me: failed program was:" >&5
15903 cat "conftest.$ac_ext" >&5
15904 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
15906 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15909 echo "$as_me: failed program was:" >&5
15910 cat "conftest.$ac_ext" >&5
15913 cat >"conftest.$ac_ext" <<_ACEOF
15914 #line 15914 "configure"
15915 #include "confdefs.h"
15916 $ac_includes_default
15920 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
15925 rm -f "conftest.$ac_objext"
15926 if { (eval echo "$as_me:15926: \"$ac_compile\"") >&5
15927 (eval $ac_compile) 2>&5
15929 echo "$as_me:15929: \$? = $ac_status" >&5
15930 (exit "$ac_status"); } &&
15931 { ac_try='test -s "conftest.$ac_objext"'
15932 { (eval echo "$as_me:15932: \"$ac_try\"") >&5
15933 (eval $ac_try) 2>&5
15935 echo "$as_me:15935: \$? = $ac_status" >&5
15936 (exit "$ac_status"); }; }; then
15937 ac_lo=$ac_mid; break
15939 echo "$as_me: failed program was:" >&5
15940 cat "conftest.$ac_ext" >&5
15941 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
15943 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15946 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15947 # Binary search between lo and hi bounds.
15948 while test "x$ac_lo" != "x$ac_hi"; do
15949 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
15950 cat >"conftest.$ac_ext" <<_ACEOF
15951 #line 15951 "configure"
15952 #include "confdefs.h"
15953 $ac_includes_default
15957 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
15962 rm -f "conftest.$ac_objext"
15963 if { (eval echo "$as_me:15963: \"$ac_compile\"") >&5
15964 (eval $ac_compile) 2>&5
15966 echo "$as_me:15966: \$? = $ac_status" >&5
15967 (exit "$ac_status"); } &&
15968 { ac_try='test -s "conftest.$ac_objext"'
15969 { (eval echo "$as_me:15969: \"$ac_try\"") >&5
15970 (eval $ac_try) 2>&5
15972 echo "$as_me:15972: \$? = $ac_status" >&5
15973 (exit "$ac_status"); }; }; then
15976 echo "$as_me: failed program was:" >&5
15977 cat "conftest.$ac_ext" >&5
15978 ac_lo=`expr "$ac_mid" + 1`
15980 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15982 ac_cv_sizeof_signed_char=$ac_lo
15984 if test "$cross_compiling" = yes; then
15985 { { echo "$as_me:15985: error: cannot run test program while cross compiling" >&5
15986 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15987 { (exit 1); exit 1; }; }
15989 cat >"conftest.$ac_ext" <<_ACEOF
15990 #line 15990 "configure"
15991 #include "confdefs.h"
15992 $ac_includes_default
15996 FILE *f = fopen ("conftest.val", "w");
15998 $ac_main_return (1);
15999 fprintf (f, "%d", (sizeof (signed char)));
16005 rm -f "conftest$ac_exeext"
16006 if { (eval echo "$as_me:16006: \"$ac_link\"") >&5
16007 (eval $ac_link) 2>&5
16009 echo "$as_me:16009: \$? = $ac_status" >&5
16010 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16011 { (eval echo "$as_me:16011: \"$ac_try\"") >&5
16012 (eval $ac_try) 2>&5
16014 echo "$as_me:16014: \$? = $ac_status" >&5
16015 (exit "$ac_status"); }; }; then
16016 ac_cv_sizeof_signed_char=`cat conftest.val`
16018 echo "$as_me: program exited with status $ac_status" >&5
16019 echo "$as_me: failed program was:" >&5
16020 cat "conftest.$ac_ext" >&5
16022 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16027 ac_cv_sizeof_signed_char=0
16030 echo "$as_me:16030: result: $ac_cv_sizeof_signed_char" >&5
16031 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
16032 cat >>confdefs.h <<EOF
16033 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
16036 echo "$as_me:16036: checking for ANSI C header files" >&5
16037 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16038 if test "${ac_cv_header_stdc+set}" = set; then
16039 echo $ECHO_N "(cached) $ECHO_C" >&6
16041 cat >"conftest.$ac_ext" <<_ACEOF
16042 #line 16042 "configure"
16043 #include "confdefs.h"
16044 #include <stdlib.h>
16045 #include <stdarg.h>
16046 #include <string.h>
16050 if { (eval echo "$as_me:16050: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16051 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16053 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16055 cat conftest.err >&5
16056 echo "$as_me:16056: \$? = $ac_status" >&5
16057 (exit "$ac_status"); } >/dev/null; then
16058 if test -s conftest.err; then
16059 ac_cpp_err=$ac_c_preproc_warn_flag
16066 if test -z "$ac_cpp_err"; then
16067 ac_cv_header_stdc=yes
16069 echo "$as_me: failed program was:" >&5
16070 cat "conftest.$ac_ext" >&5
16071 ac_cv_header_stdc=no
16073 rm -f conftest.err "conftest.$ac_ext"
16075 if test $ac_cv_header_stdc = yes; then
16076 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16077 cat >"conftest.$ac_ext" <<_ACEOF
16078 #line 16078 "configure"
16079 #include "confdefs.h"
16080 #include <string.h>
16083 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16084 $EGREP "memchr" >/dev/null 2>&1; then
16087 ac_cv_header_stdc=no
16093 if test $ac_cv_header_stdc = yes; then
16094 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16095 cat >"conftest.$ac_ext" <<_ACEOF
16096 #line 16096 "configure"
16097 #include "confdefs.h"
16098 #include <stdlib.h>
16101 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16102 $EGREP "free" >/dev/null 2>&1; then
16105 ac_cv_header_stdc=no
16111 if test $ac_cv_header_stdc = yes; then
16112 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16113 if test "$cross_compiling" = yes; then
16116 cat >"conftest.$ac_ext" <<_ACEOF
16117 #line 16117 "configure"
16118 #include "confdefs.h"
16120 #if ((' ' & 0x0FF) == 0x020)
16121 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16122 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16124 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16125 || ('j' <= (c) && (c) <= 'r') \
16126 || ('s' <= (c) && (c) <= 'z'))
16127 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16130 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16135 for (i = 0; i < 256; i++)
16136 if (XOR (islower (i), ISLOWER (i))
16137 || toupper (i) != TOUPPER (i))
16138 $ac_main_return(2);
16139 $ac_main_return (0);
16142 rm -f "conftest$ac_exeext"
16143 if { (eval echo "$as_me:16143: \"$ac_link\"") >&5
16144 (eval $ac_link) 2>&5
16146 echo "$as_me:16146: \$? = $ac_status" >&5
16147 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16148 { (eval echo "$as_me:16148: \"$ac_try\"") >&5
16149 (eval $ac_try) 2>&5
16151 echo "$as_me:16151: \$? = $ac_status" >&5
16152 (exit "$ac_status"); }; }; then
16155 echo "$as_me: program exited with status $ac_status" >&5
16156 echo "$as_me: failed program was:" >&5
16157 cat "conftest.$ac_ext" >&5
16158 ac_cv_header_stdc=no
16160 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16164 echo "$as_me:16164: result: $ac_cv_header_stdc" >&5
16165 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16166 if test $ac_cv_header_stdc = yes; then
16168 cat >>confdefs.h <<\EOF
16169 #define STDC_HEADERS 1
16174 ac_header_dirent=no
16175 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16176 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16177 echo "$as_me:16177: checking for $ac_hdr that defines DIR" >&5
16178 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16179 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16180 echo $ECHO_N "(cached) $ECHO_C" >&6
16182 cat >"conftest.$ac_ext" <<_ACEOF
16183 #line 16183 "configure"
16184 #include "confdefs.h"
16185 #include <sys/types.h>
16197 rm -f "conftest.$ac_objext"
16198 if { (eval echo "$as_me:16198: \"$ac_compile\"") >&5
16199 (eval $ac_compile) 2>&5
16201 echo "$as_me:16201: \$? = $ac_status" >&5
16202 (exit "$ac_status"); } &&
16203 { ac_try='test -s "conftest.$ac_objext"'
16204 { (eval echo "$as_me:16204: \"$ac_try\"") >&5
16205 (eval $ac_try) 2>&5
16207 echo "$as_me:16207: \$? = $ac_status" >&5
16208 (exit "$ac_status"); }; }; then
16209 eval "$as_ac_Header=yes"
16211 echo "$as_me: failed program was:" >&5
16212 cat "conftest.$ac_ext" >&5
16213 eval "$as_ac_Header=no"
16215 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16217 echo "$as_me:16217: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16218 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16219 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16220 cat >>confdefs.h <<EOF
16221 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16224 ac_header_dirent=$ac_hdr; break
16228 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
16229 if test $ac_header_dirent = dirent.h; then
16230 echo "$as_me:16230: checking for opendir in -ldir" >&5
16231 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
16232 if test "${ac_cv_lib_dir_opendir+set}" = set; then
16233 echo $ECHO_N "(cached) $ECHO_C" >&6
16235 ac_check_lib_save_LIBS=$LIBS
16237 cat >"conftest.$ac_ext" <<_ACEOF
16238 #line 16238 "configure"
16239 #include "confdefs.h"
16241 /* Override any gcc2 internal prototype to avoid an error. */
16245 /* We use char because int might match the return type of a gcc2
16246 builtin and then its argument prototype would still apply. */
16256 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16257 if { (eval echo "$as_me:16257: \"$ac_link\"") >&5
16258 (eval $ac_link) 2>&5
16260 echo "$as_me:16260: \$? = $ac_status" >&5
16261 (exit "$ac_status"); } &&
16262 { ac_try='test -s "conftest$ac_exeext"'
16263 { (eval echo "$as_me:16263: \"$ac_try\"") >&5
16264 (eval $ac_try) 2>&5
16266 echo "$as_me:16266: \$? = $ac_status" >&5
16267 (exit "$ac_status"); }; }; then
16268 ac_cv_lib_dir_opendir=yes
16270 echo "$as_me: failed program was:" >&5
16271 cat "conftest.$ac_ext" >&5
16272 ac_cv_lib_dir_opendir=no
16274 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16275 LIBS=$ac_check_lib_save_LIBS
16277 echo "$as_me:16277: result: $ac_cv_lib_dir_opendir" >&5
16278 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
16279 if test "$ac_cv_lib_dir_opendir" = yes; then
16284 echo "$as_me:16284: checking for opendir in -lx" >&5
16285 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
16286 if test "${ac_cv_lib_x_opendir+set}" = set; then
16287 echo $ECHO_N "(cached) $ECHO_C" >&6
16289 ac_check_lib_save_LIBS=$LIBS
16291 cat >"conftest.$ac_ext" <<_ACEOF
16292 #line 16292 "configure"
16293 #include "confdefs.h"
16295 /* Override any gcc2 internal prototype to avoid an error. */
16299 /* We use char because int might match the return type of a gcc2
16300 builtin and then its argument prototype would still apply. */
16310 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16311 if { (eval echo "$as_me:16311: \"$ac_link\"") >&5
16312 (eval $ac_link) 2>&5
16314 echo "$as_me:16314: \$? = $ac_status" >&5
16315 (exit "$ac_status"); } &&
16316 { ac_try='test -s "conftest$ac_exeext"'
16317 { (eval echo "$as_me:16317: \"$ac_try\"") >&5
16318 (eval $ac_try) 2>&5
16320 echo "$as_me:16320: \$? = $ac_status" >&5
16321 (exit "$ac_status"); }; }; then
16322 ac_cv_lib_x_opendir=yes
16324 echo "$as_me: failed program was:" >&5
16325 cat "conftest.$ac_ext" >&5
16326 ac_cv_lib_x_opendir=no
16328 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16329 LIBS=$ac_check_lib_save_LIBS
16331 echo "$as_me:16331: result: $ac_cv_lib_x_opendir" >&5
16332 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
16333 if test "$ac_cv_lib_x_opendir" = yes; then
16339 echo "$as_me:16339: checking whether time.h and sys/time.h may both be included" >&5
16340 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16341 if test "${ac_cv_header_time+set}" = set; then
16342 echo $ECHO_N "(cached) $ECHO_C" >&6
16344 cat >"conftest.$ac_ext" <<_ACEOF
16345 #line 16345 "configure"
16346 #include "confdefs.h"
16347 #include <sys/types.h>
16348 #include <sys/time.h>
16354 if ((struct tm *) 0)
16360 rm -f "conftest.$ac_objext"
16361 if { (eval echo "$as_me:16361: \"$ac_compile\"") >&5
16362 (eval $ac_compile) 2>&5
16364 echo "$as_me:16364: \$? = $ac_status" >&5
16365 (exit "$ac_status"); } &&
16366 { ac_try='test -s "conftest.$ac_objext"'
16367 { (eval echo "$as_me:16367: \"$ac_try\"") >&5
16368 (eval $ac_try) 2>&5
16370 echo "$as_me:16370: \$? = $ac_status" >&5
16371 (exit "$ac_status"); }; }; then
16372 ac_cv_header_time=yes
16374 echo "$as_me: failed program was:" >&5
16375 cat "conftest.$ac_ext" >&5
16376 ac_cv_header_time=no
16378 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16380 echo "$as_me:16380: result: $ac_cv_header_time" >&5
16381 echo "${ECHO_T}$ac_cv_header_time" >&6
16382 if test $ac_cv_header_time = yes; then
16384 cat >>confdefs.h <<\EOF
16385 #define TIME_WITH_SYS_TIME 1
16390 ### checks for compiler characteristics
16392 ac_cpp='$CPP $CPPFLAGS'
16393 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16394 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16395 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16396 ac_main_return="return"
16398 echo "$as_me:16398: checking for an ANSI C-conforming const" >&5
16399 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16400 if test "${ac_cv_c_const+set}" = set; then
16401 echo $ECHO_N "(cached) $ECHO_C" >&6
16403 cat >"conftest.$ac_ext" <<_ACEOF
16404 #line 16404 "configure"
16405 #include "confdefs.h"
16410 /* FIXME: Include the comments suggested by Paul. */
16411 #ifndef __cplusplus
16412 /* Ultrix mips cc rejects this. */
16413 typedef int charset[2];
16415 /* SunOS 4.1.1 cc rejects this. */
16416 char const *const *ccp;
16418 /* NEC SVR4.0.2 mips cc rejects this. */
16419 struct point {int x, y;};
16420 static struct point const zero = {0,0};
16421 /* AIX XL C 1.02.0.0 rejects this.
16422 It does not let you subtract one const X* pointer from another in
16423 an arm of an if-expression whose if-part is not a constant
16425 const char *g = "string";
16426 ccp = &g + (g ? g-g : 0);
16427 /* HPUX 7.0 cc rejects these. */
16430 ccp = (char const *const *) p;
16431 { /* SCO 3.2v4 cc rejects this. */
16433 char const *s = 0 ? (char *) 0 : (char const *) 0;
16437 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
16438 int x[] = {25, 17};
16439 const int *foo = &x[0];
16442 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16443 typedef const int *iptr;
16447 { /* AIX XL C 1.02.0.0 rejects this saying
16448 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16449 struct s { int j; const int *ap[3]; };
16450 struct s *b; b->j = 5;
16452 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16453 const int foo = 10;
16461 rm -f "conftest.$ac_objext"
16462 if { (eval echo "$as_me:16462: \"$ac_compile\"") >&5
16463 (eval $ac_compile) 2>&5
16465 echo "$as_me:16465: \$? = $ac_status" >&5
16466 (exit "$ac_status"); } &&
16467 { ac_try='test -s "conftest.$ac_objext"'
16468 { (eval echo "$as_me:16468: \"$ac_try\"") >&5
16469 (eval $ac_try) 2>&5
16471 echo "$as_me:16471: \$? = $ac_status" >&5
16472 (exit "$ac_status"); }; }; then
16475 echo "$as_me: failed program was:" >&5
16476 cat "conftest.$ac_ext" >&5
16479 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16481 echo "$as_me:16481: result: $ac_cv_c_const" >&5
16482 echo "${ECHO_T}$ac_cv_c_const" >&6
16483 if test $ac_cv_c_const = no; then
16485 cat >>confdefs.h <<\EOF
16491 ### Checks for external-data
16493 echo "$as_me:16493: checking if data-only library module links" >&5
16494 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16495 if test "${cf_cv_link_dataonly+set}" = set; then
16496 echo $ECHO_N "(cached) $ECHO_C" >&6
16500 cat >conftest.$ac_ext <<EOF
16501 #line 16501 "configure"
16502 int testdata[3] = { 123, 456, 789 };
16504 if { (eval echo "$as_me:16504: \"$ac_compile\"") >&5
16505 (eval $ac_compile) 2>&5
16507 echo "$as_me:16507: \$? = $ac_status" >&5
16508 (exit "$ac_status"); } ; then
16509 mv conftest.o data.o && \
16510 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16512 rm -f conftest.$ac_ext data.o
16513 cat >conftest.$ac_ext <<EOF
16514 #line 16514 "configure"
16518 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
16520 extern int testdata[3];
16521 return testdata[0] == 123
16522 && testdata[1] == 456
16523 && testdata[2] == 789;
16527 if { (eval echo "$as_me:16527: \"$ac_compile\"") >&5
16528 (eval $ac_compile) 2>&5
16530 echo "$as_me:16530: \$? = $ac_status" >&5
16531 (exit "$ac_status"); }; then
16532 mv conftest.o func.o && \
16533 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16535 rm -f conftest.$ac_ext func.o
16536 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16537 cf_saveLIBS="$LIBS"
16538 LIBS="conftest.a $LIBS"
16539 if test "$cross_compiling" = yes; then
16540 cf_cv_link_dataonly=unknown
16542 cat >"conftest.$ac_ext" <<_ACEOF
16543 #line 16543 "configure"
16544 #include "confdefs.h"
16548 extern int testfunc();
16549 ${cf_cv_main_return:-return} (!testfunc());
16553 rm -f "conftest$ac_exeext"
16554 if { (eval echo "$as_me:16554: \"$ac_link\"") >&5
16555 (eval $ac_link) 2>&5
16557 echo "$as_me:16557: \$? = $ac_status" >&5
16558 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16559 { (eval echo "$as_me:16559: \"$ac_try\"") >&5
16560 (eval $ac_try) 2>&5
16562 echo "$as_me:16562: \$? = $ac_status" >&5
16563 (exit "$ac_status"); }; }; then
16564 cf_cv_link_dataonly=yes
16566 echo "$as_me: program exited with status $ac_status" >&5
16567 echo "$as_me: failed program was:" >&5
16568 cat "conftest.$ac_ext" >&5
16569 cf_cv_link_dataonly=no
16571 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16573 LIBS="$cf_saveLIBS"
16577 echo "$as_me:16577: result: $cf_cv_link_dataonly" >&5
16578 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16580 if test "$cf_cv_link_dataonly" = no ; then
16582 cat >>confdefs.h <<\EOF
16583 #define BROKEN_LINKER 1
16589 ### Checks for library functions.
16595 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16596 echo "$as_me:16596: checking for $ac_header" >&5
16597 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16598 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16599 echo $ECHO_N "(cached) $ECHO_C" >&6
16601 cat >"conftest.$ac_ext" <<_ACEOF
16602 #line 16602 "configure"
16603 #include "confdefs.h"
16604 #include <$ac_header>
16606 if { (eval echo "$as_me:16606: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16607 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16609 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16611 cat conftest.err >&5
16612 echo "$as_me:16612: \$? = $ac_status" >&5
16613 (exit "$ac_status"); } >/dev/null; then
16614 if test -s conftest.err; then
16615 ac_cpp_err=$ac_c_preproc_warn_flag
16622 if test -z "$ac_cpp_err"; then
16623 eval "$as_ac_Header=yes"
16625 echo "$as_me: failed program was:" >&5
16626 cat "conftest.$ac_ext" >&5
16627 eval "$as_ac_Header=no"
16629 rm -f conftest.err "conftest.$ac_ext"
16631 echo "$as_me:16631: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16632 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16633 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16634 cat >>confdefs.h <<EOF
16635 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16641 echo "$as_me:16641: checking for working mkstemp" >&5
16642 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16643 if test "${cf_cv_func_mkstemp+set}" = set; then
16644 echo $ECHO_N "(cached) $ECHO_C" >&6
16648 if test "$cross_compiling" = yes; then
16649 cf_cv_func_mkstemp=maybe
16651 cat >"conftest.$ac_ext" <<_ACEOF
16652 #line 16652 "configure"
16653 #include "confdefs.h"
16655 #include <sys/types.h>
16656 #ifdef HAVE_UNISTD_H
16657 #include <unistd.h>
16659 #include <stdlib.h>
16661 #include <string.h>
16662 #include <sys/stat.h>
16665 char *tmpl = "conftestXXXXXX";
16673 for (n = 0; n < 2; ++n) {
16674 strcpy(name[n], tmpl);
16675 if ((fd = mkstemp(name[n])) >= 0) {
16676 if (!strcmp(name[n], tmpl)
16677 || stat(name[n], &sb) != 0
16678 || (sb.st_mode & S_IFMT) != S_IFREG
16679 || (sb.st_mode & 077) != 0) {
16686 && !strcmp(name[0], name[1]))
16688 ${cf_cv_main_return:-return}(result);
16692 rm -f "conftest$ac_exeext"
16693 if { (eval echo "$as_me:16693: \"$ac_link\"") >&5
16694 (eval $ac_link) 2>&5
16696 echo "$as_me:16696: \$? = $ac_status" >&5
16697 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16698 { (eval echo "$as_me:16698: \"$ac_try\"") >&5
16699 (eval $ac_try) 2>&5
16701 echo "$as_me:16701: \$? = $ac_status" >&5
16702 (exit "$ac_status"); }; }; then
16703 cf_cv_func_mkstemp=yes
16706 echo "$as_me: program exited with status $ac_status" >&5
16707 echo "$as_me: failed program was:" >&5
16708 cat "conftest.$ac_ext" >&5
16709 cf_cv_func_mkstemp=no
16712 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16716 echo "$as_me:16716: result: $cf_cv_func_mkstemp" >&5
16717 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16718 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16719 echo "$as_me:16719: checking for mkstemp" >&5
16720 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16721 if test "${ac_cv_func_mkstemp+set}" = set; then
16722 echo $ECHO_N "(cached) $ECHO_C" >&6
16724 cat >"conftest.$ac_ext" <<_ACEOF
16725 #line 16725 "configure"
16726 #include "confdefs.h"
16727 #define mkstemp autoconf_temporary
16728 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16735 /* We use char because int might match the return type of a gcc2
16736 builtin and then its argument prototype would still apply. */
16737 char mkstemp (void);
16743 /* The GNU C library defines stubs for functions which it implements
16744 to always fail with ENOSYS. Some functions are actually named
16745 something starting with __ and the normal name is an alias. */
16746 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16747 #error found stub for mkstemp
16755 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16756 if { (eval echo "$as_me:16756: \"$ac_link\"") >&5
16757 (eval $ac_link) 2>&5
16759 echo "$as_me:16759: \$? = $ac_status" >&5
16760 (exit "$ac_status"); } &&
16761 { ac_try='test -s "conftest$ac_exeext"'
16762 { (eval echo "$as_me:16762: \"$ac_try\"") >&5
16763 (eval $ac_try) 2>&5
16765 echo "$as_me:16765: \$? = $ac_status" >&5
16766 (exit "$ac_status"); }; }; then
16767 ac_cv_func_mkstemp=yes
16769 echo "$as_me: failed program was:" >&5
16770 cat "conftest.$ac_ext" >&5
16771 ac_cv_func_mkstemp=no
16773 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16775 echo "$as_me:16775: result: $ac_cv_func_mkstemp" >&5
16776 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16779 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16781 cat >>confdefs.h <<\EOF
16782 #define HAVE_MKSTEMP 1
16787 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
16788 CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
16789 CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
16793 if test "$cf_with_ada" != "no" ; then
16795 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
16798 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16800 unset ac_cv_path_cf_TEMP_gnat
16802 # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
16803 set dummy $cf_prog_gnat; ac_word=$2
16804 echo "$as_me:16804: checking for $ac_word" >&5
16805 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16806 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
16807 echo $ECHO_N "(cached) $ECHO_C" >&6
16809 case $cf_TEMP_gnat in
16811 ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
16814 ac_save_IFS=$IFS; IFS=$ac_path_separator
16816 for ac_dir in $ac_dummy; do
16818 test -z "$ac_dir" && ac_dir=.
16819 if $as_executable_p "$ac_dir/$ac_word"; then
16820 ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
16821 echo "$as_me:16821: found $ac_dir/$ac_word" >&5
16826 test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
16830 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
16832 if test -n "$cf_TEMP_gnat"; then
16833 echo "$as_me:16833: result: $cf_TEMP_gnat" >&5
16834 echo "${ECHO_T}$cf_TEMP_gnat" >&6
16836 echo "$as_me:16836: result: no" >&5
16837 echo "${ECHO_T}no" >&6
16840 eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
16842 if test "x$cf_TEMP_gnat" != xno; then
16843 unset cf_cv_gnat_version
16846 echo "$as_me:16846: checking for $cf_prog_gnat version" >&5
16847 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
16848 if test "${cf_cv_gnat_version+set}" = set; then
16849 echo $ECHO_N "(cached) $ECHO_C" >&6
16852 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
16853 grep '[0-9].[0-9][0-9]*' |\
16854 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
16857 echo "$as_me:16857: result: $cf_cv_gnat_version" >&5
16858 echo "${ECHO_T}$cf_cv_gnat_version" >&6
16859 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
16860 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
16863 eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
16866 unset cf_cv_gnat_version
16867 unset ac_cv_path_cf_TEMP_gnat
16870 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
16872 cf_cv_prog_gnat_correct=no
16874 cf_ada_make=gnatmake
16875 if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
16876 # gprconfig is newer than gnatmake; we can continue...
16879 rm -rf ./conftest* ./*~conftest*
16880 if mkdir conftest.src
16884 for cf_gprconfig in Ada C
16886 echo "$as_me:16886: checking for gprconfig name for $cf_gprconfig" >&5
16887 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
16888 if test "$cf_gprconfig" = C
16890 for cf_gprconfig_param in \
16891 "$cf_gprconfig,,,,GNATGCC" \
16892 "$cf_gprconfig,,,,GCC" \
16895 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
16896 test -n "$cf_gprconfig_value" && break
16899 cf_gprconfig_param=$cf_gprconfig
16900 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
16902 if test -n "$cf_gprconfig_value"
16904 eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
16905 echo "$as_me:16905: result: $cf_gprconfig_value" >&5
16906 echo "${ECHO_T}$cf_gprconfig_value" >&6
16908 echo "$as_me:16908: result: missing" >&5
16909 echo "${ECHO_T}missing" >&6
16915 rm -rf ./conftest* ./*~conftest*
16918 if test "x$cf_ada_config" != "x#"
16921 echo "$as_me:16921: checking for gnat version" >&5
16922 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
16923 if test "${cf_cv_gnat_version+set}" = set; then
16924 echo $ECHO_N "(cached) $ECHO_C" >&6
16927 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
16928 grep '[0-9].[0-9][0-9]*' |\
16929 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
16932 echo "$as_me:16932: result: $cf_cv_gnat_version" >&5
16933 echo "${ECHO_T}$cf_cv_gnat_version" >&6
16934 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
16936 case "$cf_cv_gnat_version" in
16937 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
16938 cf_cv_prog_gnat_correct=yes
16941 { echo "$as_me:16941: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
16942 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
16943 cf_cv_prog_gnat_correct=no
16947 # Extract the first word of "m4", so it can be a program name with args.
16948 set dummy m4; ac_word=$2
16949 echo "$as_me:16949: checking for $ac_word" >&5
16950 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16951 if test "${ac_cv_prog_M4_exists+set}" = set; then
16952 echo $ECHO_N "(cached) $ECHO_C" >&6
16954 if test -n "$M4_exists"; then
16955 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
16957 ac_save_IFS=$IFS; IFS=$ac_path_separator
16959 for ac_dir in $ac_dummy; do
16961 test -z "$ac_dir" && ac_dir=.
16962 $as_executable_p "$ac_dir/$ac_word" || continue
16963 ac_cv_prog_M4_exists="yes"
16964 echo "$as_me:16964: found $ac_dir/$ac_word" >&5
16968 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
16971 M4_exists=$ac_cv_prog_M4_exists
16972 if test -n "$M4_exists"; then
16973 echo "$as_me:16973: result: $M4_exists" >&5
16974 echo "${ECHO_T}$M4_exists" >&6
16976 echo "$as_me:16976: result: no" >&5
16977 echo "${ECHO_T}no" >&6
16980 if test "$ac_cv_prog_M4_exists" = no; then
16981 cf_cv_prog_gnat_correct=no
16982 { echo "$as_me:16982: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
16983 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
16985 if test "$cf_cv_prog_gnat_correct" = yes; then
16986 echo "$as_me:16986: checking if GNAT works" >&5
16987 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
16989 rm -rf ./conftest* ./*~conftest*
16990 cat >>conftest.ads <<CF_EOF
16991 procedure conftest;
16993 cat >>conftest.adb <<CF_EOF
16996 procedure conftest is
16998 Text_IO.Put ("Hello World");
17000 GNAT.OS_Lib.OS_Exit (0);
17003 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17004 if ( ./conftest 1>&5 2>&1 ) ; then
17005 cf_cv_prog_gnat_correct=yes
17007 cf_cv_prog_gnat_correct=no
17010 cf_cv_prog_gnat_correct=no
17012 rm -rf ./conftest* ./*~conftest*
17014 echo "$as_me:17014: result: $cf_cv_prog_gnat_correct" >&5
17015 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17018 cf_cv_prog_gnat_correct=no
17022 if test "$cf_cv_prog_gnat_correct" = yes; then
17024 echo "$as_me:17024: checking optimization options for ADAFLAGS" >&5
17025 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
17029 ADAFLAGS="$ADAFLAGS -g"
17035 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
17037 ADAFLAGS="$ADAFLAGS $cf_O_flag"
17041 echo "$as_me:17041: result: $ADAFLAGS" >&5
17042 echo "${ECHO_T}$ADAFLAGS" >&6
17044 echo "$as_me:17044: checking if GNATPREP supports -T option" >&5
17045 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
17046 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
17047 echo $ECHO_N "(cached) $ECHO_C" >&6
17050 cf_cv_gnatprep_opt_t=no
17051 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
17054 echo "$as_me:17054: result: $cf_cv_gnatprep_opt_t" >&5
17055 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
17056 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
17058 echo "$as_me:17058: checking if GNAT supports generics" >&5
17059 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
17060 case "$cf_cv_gnat_version" in
17061 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17062 cf_gnat_generics=yes
17065 cf_gnat_generics=no
17068 echo "$as_me:17068: result: $cf_gnat_generics" >&5
17069 echo "${ECHO_T}$cf_gnat_generics" >&6
17071 if test "$cf_gnat_generics" = yes
17073 cf_compile_generics=generics
17074 cf_generic_objects="\${GENOBJS}"
17076 cf_compile_generics=
17077 cf_generic_objects=
17080 echo "$as_me:17080: checking if GNAT supports SIGINT" >&5
17081 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
17082 if test "${cf_cv_gnat_sigint+set}" = set; then
17083 echo $ECHO_N "(cached) $ECHO_C" >&6
17086 rm -rf ./conftest* ./*~conftest*
17087 cat >>conftest.ads <<CF_EOF
17088 with Ada.Interrupts.Names;
17090 package ConfTest is
17092 pragma Warnings (Off); -- the next pragma exists since 3.11p
17093 pragma Unreserve_All_Interrupts;
17094 pragma Warnings (On);
17096 protected Process is
17098 function Continue return Boolean;
17099 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
17101 Done : Boolean := False;
17106 cat >>conftest.adb <<CF_EOF
17107 package body ConfTest is
17108 protected body Process is
17113 function Continue return Boolean is
17120 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17121 cf_cv_gnat_sigint=yes
17123 cf_cv_gnat_sigint=no
17125 rm -rf ./conftest* ./*~conftest*
17128 echo "$as_me:17128: result: $cf_cv_gnat_sigint" >&5
17129 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
17131 if test "$cf_cv_gnat_sigint" = yes ; then
17134 USE_GNAT_SIGINT="#"
17137 cf_gnat_libraries=no
17138 cf_gnat_projects=no
17140 if test "$enable_gnat_projects" != no ; then
17141 echo "$as_me:17141: checking if GNAT supports project files" >&5
17142 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
17143 case "$cf_cv_gnat_version" in
17147 case "$cf_cv_system_name" in
17151 rm -rf ./conftest* ./*~conftest*
17152 if mkdir conftest.src conftest.bin conftest.lib
17155 rm -rf ./conftest* ./*~conftest*
17156 cat >>library.gpr <<CF_EOF
17158 Kind := External ("LIB_KIND");
17159 for Library_Name use "ConfTest";
17160 for Object_Dir use ".";
17161 for Library_ALI_Dir use External("LIBRARY_DIR");
17162 for Library_Version use External ("SONAME");
17163 for Library_Kind use Kind;
17164 for Library_Dir use External("BUILD_DIR");
17165 Source_Dir := External ("SOURCE_DIR");
17166 for Source_Dirs use (Source_Dir);
17169 cat >>confpackage.ads <<CF_EOF
17170 package ConfPackage is
17171 procedure conftest;
17174 cat >>confpackage.adb <<CF_EOF
17176 package body ConfPackage is
17177 procedure conftest is
17179 Text_IO.Put ("Hello World");
17184 if ( "$cf_ada_make" $ADAFLAGS \
17186 -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
17187 -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
17188 -XSOURCE_DIR="`pwd`" \
17189 -XSONAME=libConfTest.so.1 \
17190 -XLIB_KIND=static 1>&5 2>&1 ) ; then
17191 cf_gnat_projects=yes
17195 if test -f conftest.lib/confpackage.ali
17197 cf_gnat_libraries=yes
17199 rm -rf ./conftest* ./*~conftest*
17204 echo "$as_me:17204: result: $cf_gnat_projects" >&5
17205 echo "${ECHO_T}$cf_gnat_projects" >&6
17206 fi # enable_gnat_projects
17208 if test "$cf_gnat_projects" = yes
17210 echo "$as_me:17210: checking if GNAT supports libraries" >&5
17211 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
17212 echo "$as_me:17212: result: $cf_gnat_libraries" >&5
17213 echo "${ECHO_T}$cf_gnat_libraries" >&6
17216 USE_OLD_MAKERULES=""
17217 USE_GNAT_PROJECTS="#"
17218 USE_GNAT_MAKE_GPR="#"
17219 USE_GNAT_GPRBUILD="#"
17221 if test "$cf_gnat_projects" = yes
17223 USE_OLD_MAKERULES="#"
17224 USE_GNAT_PROJECTS=""
17225 if test "$cf_cv_VERSION_GPRBUILD" != no
17227 USE_GNAT_GPRBUILD=""
17228 elif test "$cf_cv_VERSION_GNATMAKE" != no
17230 USE_GNAT_MAKE_GPR=""
17232 { echo "$as_me:17232: WARNING: use old makefile rules since tools are missing" >&5
17233 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
17237 if test "$cf_gnat_libraries" = yes
17239 USE_GNAT_LIBRARIES=""
17241 USE_GNAT_LIBRARIES="#"
17244 echo "$as_me:17244: checking for ada-compiler" >&5
17245 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
17247 # Check whether --with-ada-compiler or --without-ada-compiler was given.
17248 if test "${with_ada_compiler+set}" = set; then
17249 withval="$with_ada_compiler"
17250 cf_ada_compiler=$withval
17252 cf_ada_compiler=gnatmake
17255 echo "$as_me:17255: result: $cf_ada_compiler" >&5
17256 echo "${ECHO_T}$cf_ada_compiler" >&6
17258 cf_ada_package=terminal_interface
17260 echo "$as_me:17260: checking for ada-include" >&5
17261 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
17263 # Check whether --with-ada-include or --without-ada-include was given.
17264 if test "${with_ada_include+set}" = set; then
17265 withval="$with_ada_include"
17268 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
17269 fi; if test -n "$prefix/share/ada/adainclude" ; then
17271 if test "x$prefix" != xNONE; then
17272 cf_path_syntax="$prefix"
17274 cf_path_syntax="$ac_default_prefix"
17277 case ".$withval" in
17278 (.\$\(*\)*|.\'*\'*)
17282 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17284 (.\$\{*prefix\}*|.\$\{*dir\}*)
17285 eval withval="$withval"
17286 case ".$withval" in
17288 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17293 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17296 { { echo "$as_me:17296: error: expected a pathname, not \"$withval\"" >&5
17297 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17298 { (exit 1); exit 1; }; }
17303 eval ADA_INCLUDE="$withval"
17305 echo "$as_me:17305: result: $ADA_INCLUDE" >&5
17306 echo "${ECHO_T}$ADA_INCLUDE" >&6
17308 echo "$as_me:17308: checking for ada-objects" >&5
17309 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
17311 # Check whether --with-ada-objects or --without-ada-objects was given.
17312 if test "${with_ada_objects+set}" = set; then
17313 withval="$with_ada_objects"
17316 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
17317 fi; if test -n "$prefix/lib/ada/adalib" ; then
17319 if test "x$prefix" != xNONE; then
17320 cf_path_syntax="$prefix"
17322 cf_path_syntax="$ac_default_prefix"
17325 case ".$withval" in
17326 (.\$\(*\)*|.\'*\'*)
17330 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17332 (.\$\{*prefix\}*|.\$\{*dir\}*)
17333 eval withval="$withval"
17334 case ".$withval" in
17336 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17341 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17344 { { echo "$as_me:17344: error: expected a pathname, not \"$withval\"" >&5
17345 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17346 { (exit 1); exit 1; }; }
17351 eval ADA_OBJECTS="$withval"
17353 echo "$as_me:17353: result: $ADA_OBJECTS" >&5
17354 echo "${ECHO_T}$ADA_OBJECTS" >&6
17356 echo "$as_me:17356: checking if an Ada95 shared-library should be built" >&5
17357 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
17359 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
17360 if test "${with_ada_sharedlib+set}" = set; then
17361 withval="$with_ada_sharedlib"
17362 with_ada_sharedlib=$withval
17364 with_ada_sharedlib=no
17366 echo "$as_me:17366: result: $with_ada_sharedlib" >&5
17367 echo "${ECHO_T}$with_ada_sharedlib" >&6
17369 if test "x$with_ada_sharedlib" != xno
17371 if test "x$cf_gnat_projects" != xyes
17373 { echo "$as_me:17373: WARNING: disabling shared-library since GNAT projects are not supported" >&5
17374 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
17375 with_ada_sharedlib=no
17379 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
17380 MAKE_ADA_SHAREDLIB="#"
17382 if test "x$with_ada_sharedlib" != xno
17384 MAKE_ADA_SHAREDLIB=
17385 if test "x$with_ada_sharedlib" != xyes
17387 ADA_SHAREDLIB="$with_ada_sharedlib"
17391 # allow the Ada binding to be renamed
17393 echo "$as_me:17393: checking for ada-libname" >&5
17394 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
17396 # Check whether --with-ada-libname or --without-ada-libname was given.
17397 if test "${with_ada_libname+set}" = set; then
17398 withval="$with_ada_libname"
17399 ADA_LIBNAME=$withval
17401 ADA_LIBNAME=AdaCurses
17403 case "x$ADA_LIBNAME" in
17405 ADA_LIBNAME=AdaCurses
17409 echo "$as_me:17409: result: $ADA_LIBNAME" >&5
17410 echo "${ECHO_T}$ADA_LIBNAME" >&6
17413 { { echo "$as_me:17413: error: No usable Ada compiler found" >&5
17414 echo "$as_me: error: No usable Ada compiler found" >&2;}
17415 { (exit 1); exit 1; }; }
17418 { { echo "$as_me:17418: error: The Ada compiler is needed for this package" >&5
17419 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
17420 { (exit 1); exit 1; }; }
17423 ################################################################################
17430 ### Construct the list of include-directories to be generated
17432 if test "$srcdir" != "."; then
17433 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
17435 CPPFLAGS="-I../include $CPPFLAGS"
17436 if test "$srcdir" != "."; then
17437 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
17439 CPPFLAGS="-I. $CPPFLAGS"
17441 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
17442 if test "$srcdir" != "."; then
17443 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
17445 if test "$GCC" != yes; then
17446 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17447 elif test "$includedir" != "/usr/include"; then
17448 if test "$includedir" = '${prefix}/include' ; then
17449 if test x$prefix != x/usr ; then
17450 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17453 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17457 ### Build up pieces for makefile rules
17458 echo "$as_me:17458: checking default library suffix" >&5
17459 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
17461 case $DFT_LWR_MODEL in
17462 (libtool) DFT_ARG_SUFFIX='' ;;
17463 (normal) DFT_ARG_SUFFIX='' ;;
17464 (debug) DFT_ARG_SUFFIX='_g' ;;
17465 (profile) DFT_ARG_SUFFIX='_p' ;;
17466 (shared) DFT_ARG_SUFFIX='' ;;
17468 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
17469 echo "$as_me:17469: result: $DFT_ARG_SUFFIX" >&5
17470 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
17472 echo "$as_me:17472: checking default library-dependency suffix" >&5
17473 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
17475 case X$DFT_LWR_MODEL in
17477 DFT_LIB_SUFFIX='.la'
17478 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17481 case "$cf_cv_system_name" in
17483 DFT_LIB_SUFFIX='_g.lib'
17486 DFT_LIB_SUFFIX='_g.a'
17489 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17492 case "$cf_cv_system_name" in
17494 DFT_LIB_SUFFIX='_p.lib'
17497 DFT_LIB_SUFFIX='_p.a'
17500 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17503 case "$cf_cv_system_name" in
17505 DFT_LIB_SUFFIX='.so'
17506 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17509 DFT_LIB_SUFFIX='.dll'
17510 DFT_DEP_SUFFIX='.dll.lib'
17512 (cygwin*|msys*|mingw*)
17513 DFT_LIB_SUFFIX='.dll'
17514 DFT_DEP_SUFFIX='.dll.a'
17517 DFT_LIB_SUFFIX='.dylib'
17518 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17523 DFT_LIB_SUFFIX='.so'
17524 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17527 DFT_LIB_SUFFIX='.sl'
17528 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17533 DFT_LIB_SUFFIX='.so'
17534 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17541 DFT_LIB_SUFFIX='.lib'
17544 DFT_LIB_SUFFIX='.a'
17547 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17550 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
17552 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
17553 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
17555 echo "$as_me:17555: result: $DFT_DEP_SUFFIX" >&5
17556 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
17558 echo "$as_me:17558: checking default object directory" >&5
17559 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
17561 case $DFT_LWR_MODEL in
17562 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
17563 (normal) DFT_OBJ_SUBDIR='objects' ;;
17564 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
17565 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
17567 case "$cf_cv_system_name" in
17569 DFT_OBJ_SUBDIR='objects' ;;
17571 DFT_OBJ_SUBDIR='obj_s' ;;
17574 echo "$as_me:17574: result: $DFT_OBJ_SUBDIR" >&5
17575 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
17577 ### Set up low-level terminfo dependencies for makefiles.
17579 if test "$DFT_LWR_MODEL" = shared ; then
17580 case $cf_cv_system_name in
17582 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
17585 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
17590 USE_ARG_SUFFIX=${DFT_ARG_SUFFIX}
17592 USE_LIB_SUFFIX=${DFT_ARG_SUFFIX}
17594 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
17596 ### Construct the list of subdirectories for which we'll customize makefiles
17597 ### with the appropriate compile-rules.
17599 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
17601 cat >>confdefs.h <<EOF
17602 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
17605 ################################################################################
17611 NCURSES_SHLIB2="sh -c"
17613 ADA_SUBDIRS="include gen src doc"
17614 if test "x$cf_with_tests" != "xno" ; then
17615 ADA_SUBDIRS="$ADA_SUBDIRS samples"
17617 for cf_dir in $ADA_SUBDIRS
17619 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
17626 # match layout used by make-tar.sh
17627 ADAHTML_DIR=../doc/ada
17629 if test "x$cross_compiling" = xyes ; then
17630 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
17632 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
17635 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"
17636 ac_config_commands="$ac_config_commands default"
17637 cat >confcache <<\_ACEOF
17638 # This file is a shell script that caches the results of configure
17639 # tests run on this system so they can be shared between configure
17640 # scripts and configure runs, see configure's option --config-cache.
17641 # It is not useful on other systems. If it contains results you don't
17642 # want to keep, you may remove or edit it.
17644 # config.status only pays attention to the cache file if you give it
17645 # the --recheck option to rerun configure.
17647 # `ac_cv_env_foo' variables (set or unset) will be overriden when
17648 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17649 # following values.
17653 # The following way of writing the cache mishandles newlines in values,
17654 # but we know of no workaround that is simple, portable, and efficient.
17655 # So, don't put newlines in cache variables' values.
17656 # Ultrix sh set writes to stderr and can't be redirected directly,
17657 # and sets the high bit in the cache file unless we assign to the vars.
17660 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17662 # `set' does not quote correctly, so add quotes (double-quote
17663 # substitution turns \\\\ into \\, and sed turns \\ into \).
17666 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17669 # `set' quotes correctly as required by POSIX, so do not add quotes.
17671 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17678 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17680 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17682 if cmp -s $cache_file confcache; then :; else
17683 if test -w $cache_file; then
17684 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17685 cat confcache >$cache_file
17687 echo "not updating unwritable cache $cache_file"
17692 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17693 # Let make expand exec_prefix.
17694 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17696 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17697 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17698 # trailing colons and then remove the whole line if VPATH becomes empty
17699 # (actually we leave an empty line to preserve line numbers).
17700 if test "x$srcdir" = x.; then
17701 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17702 s/:*\$(srcdir):*/:/;
17703 s/:*\${srcdir}:*/:/;
17705 s/^\([^=]*=[ ]*\):*/\1/;
17711 DEFS=-DHAVE_CONFIG_H
17713 : "${CONFIG_STATUS=./config.status}"
17714 ac_clean_files_save=$ac_clean_files
17715 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17716 { echo "$as_me:17716: creating $CONFIG_STATUS" >&5
17717 echo "$as_me: creating $CONFIG_STATUS" >&6;}
17718 cat >"$CONFIG_STATUS" <<_ACEOF
17720 # Generated automatically by configure.
17721 # Run this file to recreate the current configuration.
17722 # Compiler output produced by configure, useful for debugging
17723 # configure, is in config.log if it exists.
17726 SHELL=\${CONFIG_SHELL-$SHELL}
17727 ac_cs_invocation="\$0 \$@"
17729 CLICOLOR_FORCE= GREP_OPTIONS=
17730 unset CLICOLOR_FORCE GREP_OPTIONS
17733 cat >>"$CONFIG_STATUS" <<\_ACEOF
17734 # Be Bourne compatible
17735 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17738 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17742 # Name of the executable.
17743 as_me=`echo "$0" |sed 's,.*[\\/],,'`
17745 if expr a : '\(a\)' >/dev/null 2>&1; then
17751 rm -f conf$$ conf$$.exe conf$$.file
17753 if ln -s conf$$.file conf$$ 2>/dev/null; then
17754 # We could just check for DJGPP; but this test a) works b) is more generic
17755 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17756 if test -f conf$$.exe; then
17757 # Don't use ln at all; we don't have any links
17762 elif ln conf$$.file conf$$ 2>/dev/null; then
17767 rm -f conf$$ conf$$.exe conf$$.file
17769 as_executable_p="test -f"
17771 # Support unset when possible.
17772 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17779 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
17780 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
17781 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
17782 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
17783 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
17784 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
17785 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
17786 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
17789 # We need space, tab and new line, in precisely that order.
17795 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
17801 # Files that config.status was made for.
17802 if test -n "$ac_config_files"; then
17803 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
17806 if test -n "$ac_config_headers"; then
17807 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
17810 if test -n "$ac_config_links"; then
17811 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
17814 if test -n "$ac_config_commands"; then
17815 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
17818 cat >>"$CONFIG_STATUS" <<\EOF
17821 \`$as_me' instantiates files from templates according to the
17822 current configuration.
17824 Usage: $0 [OPTIONS] [FILE]...
17826 -h, --help print this help, then exit
17827 -V, --version print version number, then exit
17828 -d, --debug don't remove temporary files
17829 --recheck update $as_me by reconfiguring in the same conditions
17830 --file=FILE[:TEMPLATE]
17831 instantiate the configuration file FILE
17832 --header=FILE[:TEMPLATE]
17833 instantiate the configuration header FILE
17835 Configuration files:
17838 Configuration headers:
17841 Configuration commands:
17844 Report bugs to <dickey@invisible-island.net>."
17847 cat >>"$CONFIG_STATUS" <<EOF
17850 configured by $0, generated by GNU Autoconf 2.52.20210105,
17851 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17853 Copyright 2003-2020,2021 Thomas E. Dickey
17854 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17855 Free Software Foundation, Inc.
17856 This config.status script is free software; the Free Software Foundation
17857 gives unlimited permission to copy, distribute and modify it."
17862 cat >>"$CONFIG_STATUS" <<\EOF
17863 # If no file are specified by the user, then we need to provide default
17864 # value. By we need to know if files were specified by the user.
17870 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17871 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17873 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17877 *) # This is not an option, so the user has probably given explicit
17879 ac_need_defaults=false;;
17883 # Handling of the options.
17885 cat >>"$CONFIG_STATUS" <<EOF
17886 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17887 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17888 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17890 cat >>"$CONFIG_STATUS" <<\EOF
17891 --version | --vers* | -V )
17892 echo "$ac_cs_version"; exit 0 ;;
17894 # Conflict between --help and --header
17895 { { echo "$as_me:17895: error: ambiguous option: $1
17896 Try \`$0 --help' for more information." >&5
17897 echo "$as_me: error: ambiguous option: $1
17898 Try \`$0 --help' for more information." >&2;}
17899 { (exit 1); exit 1; }; };;
17900 --help | --hel | -h )
17901 echo "$ac_cs_usage"; exit 0 ;;
17902 --debug | --d* | -d )
17904 --file | --fil | --fi | --f )
17906 CONFIG_FILES="$CONFIG_FILES $1"
17907 ac_need_defaults=false;;
17908 --header | --heade | --head | --hea )
17910 CONFIG_HEADERS="$CONFIG_HEADERS $1"
17911 ac_need_defaults=false;;
17913 # This is an error.
17914 -*) { { echo "$as_me:17914: error: unrecognized option: $1
17915 Try \`$0 --help' for more information." >&5
17916 echo "$as_me: error: unrecognized option: $1
17917 Try \`$0 --help' for more information." >&2;}
17918 { (exit 1); exit 1; }; } ;;
17920 *) ac_config_targets="$ac_config_targets $1" ;;
17929 ## ----------------------- ##
17930 ## Running config.status. ##
17931 ## ----------------------- ##
17933 This file was extended by $as_me 2.52.20210105, executed with
17934 CONFIG_FILES = $CONFIG_FILES
17935 CONFIG_HEADERS = $CONFIG_HEADERS
17936 CONFIG_LINKS = $CONFIG_LINKS
17937 CONFIG_COMMANDS = $CONFIG_COMMANDS
17938 > "$ac_cs_invocation"
17939 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17944 cat >>"$CONFIG_STATUS" <<EOF
17946 # INIT-COMMANDS section.
17949 ### Special initialization commands, used to pass information from the
17950 ### configuration-run into config.status
17953 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
17954 DFT_LWR_MODEL="$DFT_LWR_MODEL"
17955 LIB_NAME="$LIB_NAME"
17956 LIB_PREFIX="$LIB_PREFIX"
17957 LIB_SUFFIX="$LIB_SUFFIX"
17959 NCURSES_MAJOR="$NCURSES_MAJOR"
17960 NCURSES_MINOR="$NCURSES_MINOR"
17961 NCURSES_PATCH="$NCURSES_PATCH"
17962 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
17963 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
17964 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
17965 cf_cv_abi_version="$cf_cv_abi_version"
17966 cf_cv_rel_version="$cf_cv_rel_version"
17967 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
17968 cf_cv_shared_soname='$cf_cv_shared_soname'
17969 cf_cv_shlib_version="$cf_cv_shlib_version"
17970 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
17971 cf_cv_system_name="$cf_cv_system_name"
17977 cat >>"$CONFIG_STATUS" <<\EOF
17978 for ac_config_target in $ac_config_targets
17980 case "$ac_config_target" in
17981 # Handling of arguments.
17982 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
17983 "src/library.gpr" ) CONFIG_FILES="$CONFIG_FILES src/library.gpr:src/library.gpr.in" ;;
17984 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
17985 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17986 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17987 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
17988 *) { { echo "$as_me:17988: error: invalid argument: $ac_config_target" >&5
17989 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17990 { (exit 1); exit 1; }; };;
17994 # If the user did not use the arguments to specify the items to instantiate,
17995 # then the envvar interface is used. Set only those that are not.
17996 # We use the long form for the default assignment because of an extremely
17997 # bizarre bug on SunOS 4.1.3.
17998 if "$ac_need_defaults"; then
17999 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18000 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18001 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18004 # Create a temporary directory, and hook for its removal unless debugging.
18007 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18008 trap '{ (exit 1); exit 1; }' 1 2 13 15
18011 # Create a (secure) tmp directory for tmp files.
18014 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18015 test -n "$tmp" && test -d "$tmp"
18018 tmp=$TMPDIR/cs$$-$RANDOM
18019 (umask 077 && mkdir $tmp)
18022 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18023 { (exit 1); exit 1; }
18028 cat >>"$CONFIG_STATUS" <<EOF
18031 # CONFIG_FILES section.
18034 # No need to generate the scripts if there are no CONFIG_FILES.
18035 # This happens for instance when ./config.status config.h
18036 if test -n "\$CONFIG_FILES"; then
18037 # Protect against being on the right side of a sed subst in config.status.
18038 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18039 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18040 s,@SHELL@,$SHELL,;t t
18041 s,@exec_prefix@,$exec_prefix,;t t
18042 s,@prefix@,$prefix,;t t
18043 s,@program_transform_name@,$program_transform_name,;t t
18044 s,@bindir@,$bindir,;t t
18045 s,@sbindir@,$sbindir,;t t
18046 s,@libexecdir@,$libexecdir,;t t
18047 s,@datarootdir@,$datarootdir,;t t
18048 s,@datadir@,$datadir,;t t
18049 s,@sysconfdir@,$sysconfdir,;t t
18050 s,@sharedstatedir@,$sharedstatedir,;t t
18051 s,@localstatedir@,$localstatedir,;t t
18052 s,@runstatedir@,$runstatedir,;t t
18053 s,@libdir@,$libdir,;t t
18054 s,@includedir@,$includedir,;t t
18055 s,@oldincludedir@,$oldincludedir,;t t
18056 s,@infodir@,$infodir,;t t
18057 s,@mandir@,$mandir,;t t
18058 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18059 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18060 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18061 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18062 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18063 s,@build_alias@,$build_alias,;t t
18064 s,@host_alias@,$host_alias,;t t
18065 s,@target_alias@,$target_alias,;t t
18066 s,@ECHO_C@,$ECHO_C,;t t
18067 s,@ECHO_N@,$ECHO_N,;t t
18068 s,@ECHO_T@,$ECHO_T,;t t
18069 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18070 s,@DEFS@,$DEFS,;t t
18071 s,@LIBS@,$LIBS,;t t
18072 s,@top_builddir@,$top_builddir,;t t
18073 s,@build@,$build,;t t
18074 s,@build_cpu@,$build_cpu,;t t
18075 s,@build_vendor@,$build_vendor,;t t
18076 s,@build_os@,$build_os,;t t
18077 s,@host@,$host,;t t
18078 s,@host_cpu@,$host_cpu,;t t
18079 s,@host_vendor@,$host_vendor,;t t
18080 s,@host_os@,$host_os,;t t
18081 s,@target@,$target,;t t
18082 s,@target_cpu@,$target_cpu,;t t
18083 s,@target_vendor@,$target_vendor,;t t
18084 s,@target_os@,$target_os,;t t
18085 s,@GREP@,$GREP,;t t
18086 s,@FGREP@,$FGREP,;t t
18088 s,@CFLAGS@,$CFLAGS,;t t
18089 s,@LDFLAGS@,$LDFLAGS,;t t
18090 s,@CPPFLAGS@,$CPPFLAGS,;t t
18091 s,@ac_ct_CC@,$ac_ct_CC,;t t
18092 s,@EXEEXT@,$EXEEXT,;t t
18093 s,@OBJEXT@,$OBJEXT,;t t
18094 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18096 s,@EGREP@,$EGREP,;t t
18098 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18099 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18100 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18101 s,@LN_S@,$LN_S,;t t
18102 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
18103 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
18104 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18105 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
18106 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
18107 s,@SET_MAKE@,$SET_MAKE,;t t
18108 s,@CTAGS@,$CTAGS,;t t
18109 s,@ETAGS@,$ETAGS,;t t
18110 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18111 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18112 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
18113 s,@RANLIB@,$RANLIB,;t t
18114 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18116 s,@ac_ct_LD@,$ac_ct_LD,;t t
18118 s,@ac_ct_AR@,$ac_ct_AR,;t t
18119 s,@ARFLAGS@,$ARFLAGS,;t t
18120 s,@DESTDIR@,$DESTDIR,;t t
18121 s,@BUILD_CC@,$BUILD_CC,;t t
18122 s,@BUILD_CPP@,$BUILD_CPP,;t t
18123 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
18124 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
18125 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
18126 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
18127 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
18128 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
18129 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
18130 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
18131 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
18132 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
18133 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
18134 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
18135 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
18136 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18137 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18138 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
18139 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
18140 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
18141 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
18142 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
18143 s,@CC_G_OPT@,$CC_G_OPT,;t t
18144 s,@LD_MODEL@,$LD_MODEL,;t t
18145 s,@shlibdir@,$shlibdir,;t t
18146 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
18147 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
18148 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
18149 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
18150 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
18151 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
18152 s,@LINK_PROGS@,$LINK_PROGS,;t t
18153 s,@LINK_TESTS@,$LINK_TESTS,;t t
18154 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
18155 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
18156 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
18157 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
18158 s,@RPATH_LIST@,$RPATH_LIST,;t t
18159 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
18160 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
18161 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
18162 s,@PTHREAD@,$PTHREAD,;t t
18163 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
18164 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18165 s,@ECHO_LT@,$ECHO_LT,;t t
18166 s,@ECHO_LD@,$ECHO_LD,;t t
18167 s,@RULE_CC@,$RULE_CC,;t t
18168 s,@SHOW_CC@,$SHOW_CC,;t t
18169 s,@ECHO_CC@,$ECHO_CC,;t t
18170 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18171 s,@ADAFLAGS@,$ADAFLAGS,;t t
18172 s,@ADA_TRACE@,$ADA_TRACE,;t t
18173 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
18174 s,@M4_exists@,$M4_exists,;t t
18175 s,@cf_ada_make@,$cf_ada_make,;t t
18176 s,@cf_ada_config@,$cf_ada_config,;t t
18177 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
18178 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
18179 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
18180 s,@cf_compile_generics@,$cf_compile_generics,;t t
18181 s,@cf_generic_objects@,$cf_generic_objects,;t t
18182 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
18183 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
18184 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
18185 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
18186 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
18187 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
18188 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
18189 s,@cf_ada_package@,$cf_ada_package,;t t
18190 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
18191 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
18192 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
18193 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
18194 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
18195 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
18196 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
18197 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
18198 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
18199 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18200 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18201 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
18202 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
18203 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
18204 s,@TEST_ARG2@,$TEST_ARG2,;t t
18205 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
18206 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
18207 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
18208 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
18209 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
18210 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
18211 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
18216 cat >>"$CONFIG_STATUS" <<\EOF
18217 # Split the substitutions into bite-sized pieces for seds with
18218 # small command number limits, like on Digital OSF/1 and HP-UX.
18219 ac_max_sed_lines=48
18220 ac_sed_frag=1 # Number of current file.
18221 ac_beg=1 # First line for current file.
18222 ac_end=$ac_max_sed_lines # Line after last line for current file.
18225 while "$ac_more_lines"; do
18226 if test "$ac_beg" -gt 1; then
18227 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18229 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18231 if test ! -s $tmp/subs.frag; then
18232 ac_more_lines=false
18234 # The purpose of the label and of the branching condition is to
18235 # speed up the sed processing (if there are no `@' at all, there
18236 # is no need to browse any of the substitutions).
18237 # These are the two extra sed commands mentioned above.
18239 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18240 # It is possible to make a multiline substitution using escaped newlines.
18241 # Ensure that we do not split the substitution between script fragments.
18243 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
18244 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
18245 if test -s $tmp/subs.next; then
18246 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
18247 if test ! -s $tmp/subs.edit; then
18248 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
18249 if test ! -s $tmp/subs.edit; then
18250 if test "$ac_beg" -gt 1; then
18251 ac_end=`expr "$ac_end" - 1`
18258 if test -z "$ac_sed_cmds"; then
18259 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18261 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18263 ac_sed_frag=`expr "$ac_sed_frag" + 1`
18265 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
18268 if test -z "$ac_sed_cmds"; then
18271 fi # test -n "$CONFIG_FILES"
18274 cat >>"$CONFIG_STATUS" <<\EOF
18275 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18276 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18278 - | *:- | *:-:* ) # input from stdin
18280 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18281 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18282 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18283 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18284 * ) ac_file_in=$ac_file.in ;;
18287 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18288 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18289 X"$ac_file" : 'X\(//\)[^/]' \| \
18290 X"$ac_file" : 'X\(//\)$' \| \
18291 X"$ac_file" : 'X\(/\)' \| \
18292 . : '\(.\)' 2>/dev/null ||
18294 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18295 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18296 /^X\(\/\/\)$/{ s//\1/; q; }
18297 /^X\(\/\).*/{ s//\1/; q; }
18299 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18300 { case "$ac_dir" in
18301 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18305 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18306 case $as_mkdir_dir in
18307 # Skip DOS drivespec
18308 ?:) as_incr_dir=$as_mkdir_dir ;;
18310 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18311 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18316 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18317 # A "../" for each directory in $ac_dir_suffix.
18318 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18320 ac_dir_suffix= ac_dots=
18325 if test -z "$ac_dots"; then
18328 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
18330 [\\/]* | ?:[\\/]* )
18331 ac_srcdir="$srcdir$ac_dir_suffix";
18332 ac_top_srcdir="$srcdir" ;;
18333 *) # Relative path.
18334 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
18335 ac_top_srcdir="$ac_dots$srcdir" ;;
18339 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18340 *) ac_INSTALL=$ac_dots$INSTALL ;;
18343 if test x"$ac_file" != x-; then
18344 { echo "$as_me:18344: creating $ac_file" >&5
18345 echo "$as_me: creating $ac_file" >&6;}
18348 # Let's still pretend it is `configure' which instantiates (i.e., don't
18349 # use $as_me), people would be surprised to read:
18350 # /* config.h. Generated automatically by config.status. */
18351 configure_input="Generated automatically from `echo $ac_file_in |
18352 sed 's,.*/,,'` by configure."
18354 # First look for the input files in the build tree, otherwise in the
18356 ac_file_inputs=`IFS=:
18357 for f in $ac_file_in; do
18359 -) echo $tmp/stdin ;;
18361 # Absolute (can't be DOS-style, as IFS=:)
18362 test -f "$f" || { { echo "$as_me:18362: error: cannot find input file: $f" >&5
18363 echo "$as_me: error: cannot find input file: $f" >&2;}
18364 { (exit 1); exit 1; }; }
18367 if test -f "$f"; then
18370 elif test -f "$srcdir/$f"; then
18375 { { echo "$as_me:18375: error: cannot find input file: $f" >&5
18376 echo "$as_me: error: cannot find input file: $f" >&2;}
18377 { (exit 1); exit 1; }; }
18380 done` || { (exit 1); exit 1; }
18382 cat >>"$CONFIG_STATUS" <<\EOF
18383 ac_warn_datarootdir=no
18384 if test x"$ac_file" != x-; then
18385 for ac_item in $ac_file_inputs
18387 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
18388 if test -n "$ac_seen"; then
18389 ac_used=`grep '@datarootdir@' "$ac_item"`
18390 if test -z "$ac_used"; then
18391 { echo "$as_me:18391: WARNING: datarootdir was used implicitly but not set:
18393 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
18395 ac_warn_datarootdir=yes
18398 ac_seen=`grep '${datarootdir}' "$ac_item"`
18399 if test -n "$ac_seen"; then
18400 { echo "$as_me:18400: WARNING: datarootdir was used explicitly but not set:
18402 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
18404 ac_warn_datarootdir=yes
18409 if test "x$ac_warn_datarootdir" = xyes; then
18410 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
18414 cat >>"$CONFIG_STATUS" <<EOF
18418 cat >>"$CONFIG_STATUS" <<\EOF
18420 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18421 s,@configure_input@,$configure_input,;t t
18422 s,@srcdir@,$ac_srcdir,;t t
18423 s,@top_srcdir@,$ac_top_srcdir,;t t
18424 s,@INSTALL@,$ac_INSTALL,;t t
18425 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18427 if test x"$ac_file" != x-; then
18428 cp "$tmp/out" "$ac_file"
18430 for ac_name in prefix exec_prefix datarootdir
18432 ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
18433 if test -n "$ac_seen"; then
18434 ac_init=`${EGREP-egrep} '[ ]*'$ac_name'[ ]*=' "$ac_file"`
18435 if test -z "$ac_init"; then
18436 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
18437 { echo "$as_me:18437: WARNING: Variable $ac_name is used but was not set:
18439 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
18444 ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
18445 ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
18446 if test -s $tmp/out; then
18447 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
18448 { echo "$as_me:18448: WARNING: Some variables may not be substituted:
18450 echo "$as_me: WARNING: Some variables may not be substituted:
18460 cat >>"$CONFIG_STATUS" <<\EOF
18463 # CONFIG_HEADER section.
18466 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18467 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18469 # ac_d sets the value in "#define NAME VALUE" lines.
18470 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18471 ac_dB='[ ].*$,\1#\2'
18474 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18475 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18476 ac_iB='\([ ]\),\1#\2define\3'
18479 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18480 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18481 ac_uB='$,\1#\2define\3'
18485 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18486 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18488 - | *:- | *:-:* ) # input from stdin
18490 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18491 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18492 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18493 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18494 * ) ac_file_in=$ac_file.in ;;
18497 test x"$ac_file" != x- && { echo "$as_me:18497: creating $ac_file" >&5
18498 echo "$as_me: creating $ac_file" >&6;}
18500 # First look for the input files in the build tree, otherwise in the
18502 ac_file_inputs=`IFS=:
18503 for f in $ac_file_in; do
18505 -) echo $tmp/stdin ;;
18507 # Absolute (can't be DOS-style, as IFS=:)
18508 test -f "$f" || { { echo "$as_me:18508: error: cannot find input file: $f" >&5
18509 echo "$as_me: error: cannot find input file: $f" >&2;}
18510 { (exit 1); exit 1; }; }
18513 if test -f "$f"; then
18516 elif test -f "$srcdir/$f"; then
18521 { { echo "$as_me:18521: error: cannot find input file: $f" >&5
18522 echo "$as_me: error: cannot find input file: $f" >&2;}
18523 { (exit 1); exit 1; }; }
18526 done` || { (exit 1); exit 1; }
18527 # Remove the trailing spaces.
18528 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
18532 # Transform confdefs.h into a list of #define's. We won't use it as a sed
18533 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
18534 # be either 'cat' or 'sort'.
18535 cat confdefs.h | uniq >conftest.vals
18537 # Break up conftest.vals because some shells have a limit on
18538 # the size of here documents, and old seds have small limits too.
18540 rm -f conftest.tail
18541 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
18542 while grep . conftest.vals >/dev/null
18544 # Write chunks of a limited-size here document to conftest.frag.
18545 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
18546 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
18547 echo 'CEOF' >> "$CONFIG_STATUS"
18548 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
18549 rm -f conftest.vals
18550 mv conftest.tail conftest.vals
18552 rm -f conftest.vals
18554 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
18556 echo ' cat >> conftest.edit <<CEOF
18557 /@DEFS@/r conftest.frag
18560 sed -f conftest.edit $tmp/in > $tmp/out
18562 mv $tmp/out $tmp/in
18563 rm -f conftest.edit conftest.frag
18564 ' >> "$CONFIG_STATUS"
18566 cat >>"$CONFIG_STATUS" <<\EOF
18567 # Let's still pretend it is `configure' which instantiates (i.e., don't
18568 # use $as_me), people would be surprised to read:
18569 # /* config.h. Generated automatically by config.status. */
18570 if test x"$ac_file" = x-; then
18571 echo "/* Generated automatically by configure. */" >$tmp/config.h
18573 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
18575 cat $tmp/in >>$tmp/config.h
18577 if test x"$ac_file" != x-; then
18578 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
18579 { echo "$as_me:18579: $ac_file is unchanged" >&5
18580 echo "$as_me: $ac_file is unchanged" >&6;}
18582 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18583 X"$ac_file" : 'X\(//\)[^/]' \| \
18584 X"$ac_file" : 'X\(//\)$' \| \
18585 X"$ac_file" : 'X\(/\)' \| \
18586 . : '\(.\)' 2>/dev/null ||
18588 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18589 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18590 /^X\(\/\/\)$/{ s//\1/; q; }
18591 /^X\(\/\).*/{ s//\1/; q; }
18593 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18594 { case "$ac_dir" in
18595 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18599 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18600 case $as_mkdir_dir in
18601 # Skip DOS drivespec
18602 ?:) as_incr_dir=$as_mkdir_dir ;;
18604 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18605 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18612 mv "$tmp/config.h" "$ac_file"
18616 rm -f $tmp/config.h
18620 cat >>"$CONFIG_STATUS" <<\EOF
18622 # CONFIG_COMMANDS section.
18624 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
18625 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
18626 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
18630 if test -z "$USE_OLD_MAKERULES" ; then
18631 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
18638 cat >>"$CONFIG_STATUS" <<\EOF
18640 { (exit 0); exit 0; }
18642 chmod +x "$CONFIG_STATUS"
18643 ac_clean_files=$ac_clean_files_save
18645 # configure is writing to config.log, and then calls config.status.
18646 # config.status does its own redirection, appending to config.log.
18647 # Unfortunately, on DOS this fails, as config.log is still kept open
18648 # by configure, so config.status won't be able to write to it; its
18649 # output is simply discarded. So we exec the FD to /dev/null,
18650 # effectively closing config.log, so it can be properly (re)opened and
18651 # appended to by config.status. When coming back to configure, we
18652 # need to make the FD available again.
18653 if test "$no_create" != yes; then
18656 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
18658 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18659 # would make configure fail if this is the last instruction.
18660 "$ac_cs_success" || { (exit 1); exit 1; }
18662 ${MAKE:-make} preinstall