2 # From configure.in Revision: 1.68 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20181006.
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35 if expr a : '\(a\)' >/dev/null 2>&1; then
41 rm -f conf$$ conf$$.exe conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44 # We could just check for DJGPP; but this test a) works b) is more generic
45 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46 if test -f conf$$.exe; then
47 # Don't use ln at all; we don't have any links
52 elif ln conf$$.file conf$$ 2>/dev/null; then
57 rm -f conf$$ conf$$.exe conf$$.file
59 as_executable_p="test -f"
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
79 # We need space, tab and new line, in precisely that order.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
97 ac_default_prefix=/usr/local
101 SHELL=${CONFIG_SHELL-/bin/sh}
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete. It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
108 ac_unique_file="gen/gen.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
113 # include <sys/types.h>
116 # include <sys/stat.h>
127 # if !STDC_HEADERS && HAVE_MEMORY_H
133 # include <strings.h>
136 # include <inttypes.h>
146 # Initialize some variables set by options.
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
158 program_transform_name=s,x,x,
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 runstatedir='${localstatedir}/run'
180 libdir='${exec_prefix}/lib'
181 includedir='${prefix}/include'
182 oldincludedir='/usr/include'
183 infodir='${datarootdir}/info'
184 mandir='${datarootdir}/man'
186 # Identity of this package.
196 # If the previous option needs an argument, assign it.
197 if test -n "$ac_prev"; then
198 eval "$ac_prev=\$ac_option"
203 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
205 # Accept the important Cygnus configure options, so we can diagnose typos.
209 -bindir | --bindir | --bindi | --bind | --bin | --bi)
211 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
214 -build | --build | --buil | --bui | --bu)
215 ac_prev=build_alias ;;
216 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
217 build_alias=$ac_optarg ;;
219 -cache-file | --cache-file | --cache-fil | --cache-fi \
220 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
221 ac_prev=cache_file ;;
222 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
223 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
224 cache_file=$ac_optarg ;;
227 cache_file=config.cache ;;
229 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
231 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
233 datadir=$ac_optarg ;;
235 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
236 | --dataroo | --dataro | --datar)
237 ac_prev=datarootdir ;;
238 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
239 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
240 datarootdir=$ac_optarg ;;
242 -disable-* | --disable-*)
243 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
244 # Reject names that are not valid shell variable names.
245 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247 { (exit 1); exit 1; }; }
248 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249 eval "enable_$ac_feature=no" ;;
251 -enable-* | --enable-*)
252 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
253 # Reject names that are not valid shell variable names.
254 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
255 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
256 { (exit 1); exit 1; }; }
257 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
259 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
262 eval "enable_$ac_feature='$ac_optarg'" ;;
264 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
265 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
266 | --exec | --exe | --ex)
267 ac_prev=exec_prefix ;;
268 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
269 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
270 | --exec=* | --exe=* | --ex=*)
271 exec_prefix=$ac_optarg ;;
273 -gas | --gas | --ga | --g)
274 # Obsolete; use --with-gas.
277 -help | --help | --hel | --he | -h)
279 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
280 ac_init_help=recursive ;;
281 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
282 ac_init_help=short ;;
284 -host | --host | --hos | --ho)
285 ac_prev=host_alias ;;
286 -host=* | --host=* | --hos=* | --ho=*)
287 host_alias=$ac_optarg ;;
289 -includedir | --includedir | --includedi | --included | --include \
290 | --includ | --inclu | --incl | --inc)
291 ac_prev=includedir ;;
292 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
293 | --includ=* | --inclu=* | --incl=* | --inc=*)
294 includedir=$ac_optarg ;;
296 -infodir | --infodir | --infodi | --infod | --info | --inf)
298 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
299 infodir=$ac_optarg ;;
301 -libdir | --libdir | --libdi | --libd)
303 -libdir=* | --libdir=* | --libdi=* | --libd=*)
306 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
307 | --libexe | --libex | --libe)
308 ac_prev=libexecdir ;;
309 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
310 | --libexe=* | --libex=* | --libe=*)
311 libexecdir=$ac_optarg ;;
313 -localstatedir | --localstatedir | --localstatedi | --localstated \
314 | --localstate | --localstat | --localsta | --localst \
315 | --locals | --local | --loca | --loc | --lo)
316 ac_prev=localstatedir ;;
317 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
318 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
319 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
320 localstatedir=$ac_optarg ;;
322 -runstatedir | --runstatedir | --runstatedi | --runstated \
323 | --runstate | --runstat | --runsta | --runst \
324 | --runs | --run | --ru)
325 ac_prev=runstatedir ;;
326 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
327 | --runstate=* | --runstat=* | --runsta=* | --runst=* \
328 | --runs=* | --run=* | --ru=*)
329 runstatedir=$ac_optarg ;;
331 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
333 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
337 # Obsolete; use --without-fp.
340 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
344 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
345 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
348 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
349 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
350 | --oldin | --oldi | --old | --ol | --o)
351 ac_prev=oldincludedir ;;
352 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
353 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
354 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
355 oldincludedir=$ac_optarg ;;
357 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
359 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
362 -program-prefix | --program-prefix | --program-prefi | --program-pref \
363 | --program-pre | --program-pr | --program-p)
364 ac_prev=program_prefix ;;
365 -program-prefix=* | --program-prefix=* | --program-prefi=* \
366 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
367 program_prefix=$ac_optarg ;;
369 -program-suffix | --program-suffix | --program-suffi | --program-suff \
370 | --program-suf | --program-su | --program-s)
371 ac_prev=program_suffix ;;
372 -program-suffix=* | --program-suffix=* | --program-suffi=* \
373 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
374 program_suffix=$ac_optarg ;;
376 -program-transform-name | --program-transform-name \
377 | --program-transform-nam | --program-transform-na \
378 | --program-transform-n | --program-transform- \
379 | --program-transform | --program-transfor \
380 | --program-transfo | --program-transf \
381 | --program-trans | --program-tran \
382 | --progr-tra | --program-tr | --program-t)
383 ac_prev=program_transform_name ;;
384 -program-transform-name=* | --program-transform-name=* \
385 | --program-transform-nam=* | --program-transform-na=* \
386 | --program-transform-n=* | --program-transform-=* \
387 | --program-transform=* | --program-transfor=* \
388 | --program-transfo=* | --program-transf=* \
389 | --program-trans=* | --program-tran=* \
390 | --progr-tra=* | --program-tr=* | --program-t=*)
391 program_transform_name=$ac_optarg ;;
393 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
394 | -silent | --silent | --silen | --sile | --sil)
397 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
399 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
401 sbindir=$ac_optarg ;;
403 -sharedstatedir | --sharedstatedir | --sharedstatedi \
404 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
405 | --sharedst | --shareds | --shared | --share | --shar \
407 ac_prev=sharedstatedir ;;
408 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
409 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
410 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
412 sharedstatedir=$ac_optarg ;;
414 -site | --site | --sit)
416 -site=* | --site=* | --sit=*)
419 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
421 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
424 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
425 | --syscon | --sysco | --sysc | --sys | --sy)
426 ac_prev=sysconfdir ;;
427 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
428 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
429 sysconfdir=$ac_optarg ;;
431 -target | --target | --targe | --targ | --tar | --ta | --t)
432 ac_prev=target_alias ;;
433 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
434 target_alias=$ac_optarg ;;
436 -v | -verbose | --verbose | --verbos | --verbo | --verb)
439 -version | --version | --versio | --versi | --vers | -V)
443 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
444 # Reject names that are not valid shell variable names.
445 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
446 { echo "$as_me: error: invalid package name: $ac_package" >&2
447 { (exit 1); exit 1; }; }
448 ac_package=`echo $ac_package| sed 's/-/_/g'`
450 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
453 eval "with_$ac_package='$ac_optarg'" ;;
455 -without-* | --without-*)
456 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
457 # Reject names that are not valid shell variable names.
458 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
459 { echo "$as_me: error: invalid package name: $ac_package" >&2
460 { (exit 1); exit 1; }; }
461 ac_package=`echo $ac_package | sed 's/-/_/g'`
462 eval "with_$ac_package=no" ;;
465 # Obsolete; use --with-x.
468 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
469 | --x-incl | --x-inc | --x-in | --x-i)
470 ac_prev=x_includes ;;
471 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
472 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
473 x_includes=$ac_optarg ;;
475 -x-libraries | --x-libraries | --x-librarie | --x-librari \
476 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
477 ac_prev=x_libraries ;;
478 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
479 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
480 x_libraries=$ac_optarg ;;
482 -*) { echo "$as_me: error: unrecognized option: $ac_option
483 Try \`$0 --help' for more information." >&2
484 { (exit 1); exit 1; }; }
488 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
489 # Reject names that are not valid shell variable names.
490 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
491 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
492 { (exit 1); exit 1; }; }
493 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
494 eval "$ac_envvar='$ac_optarg'"
498 # FIXME: should be removed in autoconf 3.0.
499 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
500 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
501 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
502 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
508 if test -n "$ac_prev"; then
509 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
510 { echo "$as_me: error: missing argument to $ac_option" >&2
511 { (exit 1); exit 1; }; }
514 # Be sure to have absolute paths.
515 for ac_var in exec_prefix prefix
517 eval ac_val=$`echo $ac_var`
519 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
520 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
521 { (exit 1); exit 1; }; };;
525 # Be sure to have absolute paths.
526 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
527 localstatedir libdir includedir oldincludedir infodir mandir
529 eval ac_val=$`echo $ac_var`
531 [\\/$]* | ?:[\\/]* ) ;;
532 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
533 { (exit 1); exit 1; }; };;
537 # There might be people who depend on the old broken behavior: `$host'
538 # used to hold the argument of --host etc.
543 # FIXME: should be removed in autoconf 3.0.
544 if test "x$host_alias" != x; then
545 if test "x$build_alias" = x; then
546 cross_compiling=maybe
547 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
548 If a cross compiler is detected then cross compile mode will be used." >&2
549 elif test "x$build_alias" != "x$host_alias"; then
555 test -n "$host_alias" && ac_tool_prefix=$host_alias-
557 test "$silent" = yes && exec 6>/dev/null
559 # Find the source files, if location was not specified.
560 if test -z "$srcdir"; then
561 ac_srcdir_defaulted=yes
562 # Try the directory containing this script, then its parent.
564 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
565 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
567 if test ! -r $srcdir/$ac_unique_file; then
571 ac_srcdir_defaulted=no
573 if test ! -r $srcdir/$ac_unique_file; then
574 if test "$ac_srcdir_defaulted" = yes; then
575 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
576 { (exit 1); exit 1; }; }
578 { echo "$as_me: error: cannot find sources in $srcdir" >&2
579 { (exit 1); exit 1; }; }
582 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
583 ac_env_build_alias_set=${build_alias+set}
584 ac_env_build_alias_value=$build_alias
585 ac_cv_env_build_alias_set=${build_alias+set}
586 ac_cv_env_build_alias_value=$build_alias
587 ac_env_host_alias_set=${host_alias+set}
588 ac_env_host_alias_value=$host_alias
589 ac_cv_env_host_alias_set=${host_alias+set}
590 ac_cv_env_host_alias_value=$host_alias
591 ac_env_target_alias_set=${target_alias+set}
592 ac_env_target_alias_value=$target_alias
593 ac_cv_env_target_alias_set=${target_alias+set}
594 ac_cv_env_target_alias_value=$target_alias
595 ac_env_CC_set=${CC+set}
597 ac_cv_env_CC_set=${CC+set}
598 ac_cv_env_CC_value=$CC
599 ac_env_CFLAGS_set=${CFLAGS+set}
600 ac_env_CFLAGS_value=$CFLAGS
601 ac_cv_env_CFLAGS_set=${CFLAGS+set}
602 ac_cv_env_CFLAGS_value=$CFLAGS
603 ac_env_LDFLAGS_set=${LDFLAGS+set}
604 ac_env_LDFLAGS_value=$LDFLAGS
605 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_cv_env_LDFLAGS_value=$LDFLAGS
607 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
608 ac_env_CPPFLAGS_value=$CPPFLAGS
609 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
611 ac_env_CPP_set=${CPP+set}
612 ac_env_CPP_value=$CPP
613 ac_cv_env_CPP_set=${CPP+set}
614 ac_cv_env_CPP_value=$CPP
617 # Report the --help message.
619 if test "$ac_init_help" = "long"; then
620 # Omit some internal or obsolete options to make the list less imposing.
621 # This message is too long to be a string in the A/UX 3.1 sh.
623 \`configure' configures this package to adapt to many kinds of systems.
625 Usage: $0 [OPTION]... [VAR=VALUE]...
627 To assign environment variables (e.g., CC, CFLAGS...), specify them as
628 VAR=VALUE. See below for descriptions of some of the useful variables.
630 Defaults for the options are specified in brackets.
633 -h, --help display this help and exit
634 --help=short display options specific to this package
635 --help=recursive display the short help of all the included packages
636 -V, --version display version information and exit
637 -q, --quiet, --silent do not print \`checking...' messages
638 --cache-file=FILE cache test results in FILE [disabled]
639 -C, --config-cache alias for \`--cache-file=config.cache'
640 -n, --no-create do not create output files
641 --srcdir=DIR find the sources in DIR [configure dir or \`..']
646 Installation directories:
647 --prefix=PREFIX install architecture-independent files in PREFIX
649 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
652 By default, \`make install' will install all the files in
653 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
654 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
655 for instance \`--prefix=\$HOME'.
657 For better control, use the options below.
659 Fine tuning of the installation directories:
660 --bindir=DIR user executables [EPREFIX/bin]
661 --sbindir=DIR system admin executables [EPREFIX/sbin]
662 --libexecdir=DIR program executables [EPREFIX/libexec]
663 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
664 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
665 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
666 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
667 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
668 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
669 --libdir=DIR object code libraries [EPREFIX/lib]
670 --includedir=DIR C header files [PREFIX/include]
671 --oldincludedir=DIR C header files for non-gcc [/usr/include]
672 --infodir=DIR info documentation [DATAROOTDIR/info]
673 --mandir=DIR man documentation [DATAROOTDIR/man]
679 --program-prefix=PREFIX prepend PREFIX to installed program names
680 --program-suffix=SUFFIX append SUFFIX to installed program names
681 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
684 --build=BUILD configure for building on BUILD [guessed]
685 --host=HOST build programs to run on HOST [BUILD]
686 --target=TARGET configure for building compilers for TARGET [HOST]
690 if test -n "$ac_init_help"; then
695 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
696 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
699 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
700 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
703 --with-system-type=XXX test: override derived host system-type
704 --disable-stripping do not strip (debug info) installed executables
705 --with-pkg-config{=path} enable/disable use of pkg-config
706 --with-pkg-config-libdir=XXX use given directory for installing pc-files
707 --without-tests suppress build with test-programs
708 --enable-mixed-case tic should assume mixed-case filenames
709 --with-install-prefix prefixes actual install-location ($DESTDIR)
710 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
711 --with-build-cc=XXX the build C compiler ($BUILD_CC)
712 --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
713 --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
714 --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
715 --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
716 --with-build-libs=XXX the build libraries (${BUILD_LIBS})
717 Options to Specify the Libraries Built/Used:
718 --with-shared generate shared C-objects (needed for --with-ada-sharedlib)
719 --with-curses-dir=DIR directory in which (n)curses is installed
720 --enable-widec compile with wide-char/UTF-8 code
721 --with-lib-prefix override library-prefix
722 --with-shlib-version=X Specify rel or abi version for shared libs
723 --enable-rpath-link link sample programs with rpath option
724 Fine-Tuning Your Configuration:
725 --enable-broken_linker compile with broken-linker support code
726 --disable-largefile omit support for large files
727 --with-rcs-ids compile-in RCS identifiers
729 --disable-ext-funcs disable function-extensions
730 --enable-const compile with extra/non-standard const
732 --without-develop disable development options
734 --with-pthread use POSIX thread library
735 --enable-weak-symbols enable weak-symbols for pthreads
736 --enable-reentrant compile with experimental reentrant code
737 --with-wrap-prefix=XXX override prefix used for public variables
738 Testing/development Options:
739 --disable-echo do not display "compiling" commands
740 --enable-warnings build: turn on GCC compiler warnings
741 --enable-assertions test: turn on generation of assertion code
742 --enable-expanded test: generate functions for certain macros
743 --disable-macros test: use functions rather than macros
744 --with-trace test: add trace() function to all models of ncurses
745 --disable-gnat-projects test: disable GNAT projects even if usable
746 Ada95 Binding Options:
747 --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
748 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
749 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
750 --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
752 Some influential environment variables:
753 CC C compiler command
754 CFLAGS C compiler flags
755 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
756 nonstandard directory <lib dir>
757 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
758 headers in a nonstandard directory <include dir>
761 Use these variables to override the choices made by `configure' or to help
762 it to find libraries and programs with nonstandard names/locations.
767 if test "$ac_init_help" = "recursive"; then
768 # If there are subdirs, report their specific --help.
770 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
772 # A "../" for each directory in /$ac_subdir.
773 ac_dots=`echo $ac_subdir |
774 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
777 .) # No --srcdir option. We are building in place.
778 ac_sub_srcdir=$srcdir ;;
779 [\\/]* | ?:[\\/]* ) # Absolute path.
780 ac_sub_srcdir=$srcdir/$ac_subdir ;;
782 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
785 # Check for guested configure; otherwise get Cygnus style configure.
786 if test -f $ac_sub_srcdir/configure.gnu; then
788 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
789 elif test -f $ac_sub_srcdir/configure; then
791 $SHELL $ac_sub_srcdir/configure --help=recursive
792 elif test -f $ac_sub_srcdir/configure.ac ||
793 test -f $ac_sub_srcdir/configure.in; then
797 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
803 test -n "$ac_init_help" && exit 0
804 if $ac_init_version; then
807 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
808 Free Software Foundation, Inc.
809 This configure script is free software; the Free Software Foundation
810 gives unlimited permission to copy, distribute and modify it.
816 This file contains any messages produced by compilers while
817 running configure, to aid debugging if configure makes a mistake.
819 It was created by $as_me, which was
820 generated by GNU Autoconf 2.52.20181006. Invocation command line was
831 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
832 uname -m = `(uname -m) 2>/dev/null || echo unknown`
833 uname -r = `(uname -r) 2>/dev/null || echo unknown`
834 uname -s = `(uname -s) 2>/dev/null || echo unknown`
835 uname -v = `(uname -v) 2>/dev/null || echo unknown`
837 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
838 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
840 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
841 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
842 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
843 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
844 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
845 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
846 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
860 # Keep a trace of the command line.
861 # Strip out --no-create and --no-recursion so they do not pile up.
862 # Also quote any args containing shell meta-characters.
868 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
869 | --no-cr | --no-c) ;;
870 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
871 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
872 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
873 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
874 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
876 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
879 # Get rid of the leading space.
882 # When interrupted or exit'd, cleanup temporary files, and complete
883 # config.log. We remove comments because anyway the quotes in there
884 # would cause problems or look ugly.
886 # Save into config.log some information that might help in debugging.
888 echo "## ----------------- ##" >&5
889 echo "## Cache variables. ##" >&5
890 echo "## ----------------- ##" >&5
892 # The following way of writing the cache mishandles newlines in values,
895 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
898 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
899 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
903 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
907 sed "/^$/d" confdefs.h >conftest.log
908 if test -s conftest.log; then
910 echo "## ------------ ##" >&5
911 echo "## confdefs.h. ##" >&5
912 echo "## ------------ ##" >&5
917 test "$ac_signal" != 0 &&
918 echo "$as_me: caught signal $ac_signal" >&5
919 echo "$as_me: exit $exit_status" >&5
920 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
923 for ac_signal in 1 2 13 15; do
924 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
928 # confdefs.h avoids OS command line length limits that DEFS can exceed.
929 rm -rf conftest* confdefs.h
930 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
933 # Let the site file select an alternate cache file if it wants to.
934 # Prefer explicitly selected file to automatically selected ones.
935 if test -z "$CONFIG_SITE"; then
936 if test "x$prefix" != xNONE; then
937 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
939 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
942 for ac_site_file in $CONFIG_SITE; do
943 if test -r "$ac_site_file"; then
944 { echo "$as_me:944: loading site script $ac_site_file" >&5
945 echo "$as_me: loading site script $ac_site_file" >&6;}
946 cat "$ac_site_file" >&5
951 if test -r "$cache_file"; then
952 # Some versions of bash will fail to source /dev/null (special
953 # files actually), so we avoid doing that.
954 if test -f "$cache_file"; then
955 { echo "$as_me:955: loading cache $cache_file" >&5
956 echo "$as_me: loading cache $cache_file" >&6;}
958 [\\/]* | ?:[\\/]* ) . $cache_file;;
963 { echo "$as_me:963: creating cache $cache_file" >&5
964 echo "$as_me: creating cache $cache_file" >&6;}
968 # Check that the precious variables saved in the cache have kept the same
970 ac_cache_corrupted=false
971 for ac_var in `(set) 2>&1 |
972 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
973 eval ac_old_set=\$ac_cv_env_${ac_var}_set
974 eval ac_new_set=\$ac_env_${ac_var}_set
975 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
976 eval ac_new_val="\$ac_env_${ac_var}_value"
977 case $ac_old_set,$ac_new_set in
979 { echo "$as_me:979: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
980 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
981 ac_cache_corrupted=: ;;
983 { echo "$as_me:983: error: \`$ac_var' was not set in the previous run" >&5
984 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
985 ac_cache_corrupted=: ;;
988 if test "x$ac_old_val" != "x$ac_new_val"; then
989 { echo "$as_me:989: error: \`$ac_var' has changed since the previous run:" >&5
990 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
991 { echo "$as_me:991: former value: $ac_old_val" >&5
992 echo "$as_me: former value: $ac_old_val" >&2;}
993 { echo "$as_me:993: current value: $ac_new_val" >&5
994 echo "$as_me: current value: $ac_new_val" >&2;}
998 # Pass precious variables to config.status. It doesn't matter if
999 # we pass some twice (in addition to the command line arguments).
1000 if test "$ac_new_set" = set; then
1002 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1003 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1004 ac_configure_args="$ac_configure_args '$ac_arg'"
1006 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1011 if $ac_cache_corrupted; then
1012 { echo "$as_me:1012: error: changes in the environment can compromise the build" >&5
1013 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1014 { { echo "$as_me:1014: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1015 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1016 { (exit 1); exit 1; }; }
1020 ac_cpp='$CPP $CPPFLAGS'
1021 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1022 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1023 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1024 ac_main_return=return
1026 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1027 *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1029 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1030 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
1032 echo "#! $SHELL" >conftest.sh
1033 echo "exit 0" >>conftest.sh
1034 chmod +x conftest.sh
1035 if { (echo "$as_me:1035: PATH=\".;.\"; conftest.sh") >&5
1036 (PATH=".;."; conftest.sh) 2>&5
1038 echo "$as_me:1038: \$? = $ac_status" >&5
1039 (exit $ac_status); }; then
1040 ac_path_separator=';'
1044 PATH_SEPARATOR="$ac_path_separator"
1047 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1052 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1053 if test -f $ac_dir/install-sh; then
1055 ac_install_sh="$ac_aux_dir/install-sh -c"
1057 elif test -f $ac_dir/install.sh; then
1059 ac_install_sh="$ac_aux_dir/install.sh -c"
1061 elif test -f $ac_dir/shtool; then
1063 ac_install_sh="$ac_aux_dir/shtool install -c"
1067 if test -z "$ac_aux_dir"; then
1068 { { echo "$as_me:1068: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1069 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1070 { (exit 1); exit 1; }; }
1072 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1073 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1074 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1076 # Make sure we can run config.sub.
1077 $ac_config_sub sun4 >/dev/null 2>&1 ||
1078 { { echo "$as_me:1078: error: cannot run $ac_config_sub" >&5
1079 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1080 { (exit 1); exit 1; }; }
1082 echo "$as_me:1082: checking build system type" >&5
1083 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1084 if test "${ac_cv_build+set}" = set; then
1085 echo $ECHO_N "(cached) $ECHO_C" >&6
1087 ac_cv_build_alias=$build_alias
1088 test -z "$ac_cv_build_alias" &&
1089 ac_cv_build_alias=`$ac_config_guess`
1090 test -z "$ac_cv_build_alias" &&
1091 { { echo "$as_me:1091: error: cannot guess build type; you must specify one" >&5
1092 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1093 { (exit 1); exit 1; }; }
1094 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1095 { { echo "$as_me:1095: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1096 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1097 { (exit 1); exit 1; }; }
1100 echo "$as_me:1100: result: $ac_cv_build" >&5
1101 echo "${ECHO_T}$ac_cv_build" >&6
1103 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1104 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1105 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1107 echo "$as_me:1107: checking host system type" >&5
1108 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1109 if test "${ac_cv_host+set}" = set; then
1110 echo $ECHO_N "(cached) $ECHO_C" >&6
1112 ac_cv_host_alias=$host_alias
1113 test -z "$ac_cv_host_alias" &&
1114 ac_cv_host_alias=$ac_cv_build_alias
1115 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1116 { { echo "$as_me:1116: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1117 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1118 { (exit 1); exit 1; }; }
1121 echo "$as_me:1121: result: $ac_cv_host" >&5
1122 echo "${ECHO_T}$ac_cv_host" >&6
1124 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1125 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1126 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1128 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1129 echo "$as_me:1129: checking target system type" >&5
1130 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1131 if test "${ac_cv_target+set}" = set; then
1132 echo $ECHO_N "(cached) $ECHO_C" >&6
1134 ac_cv_target_alias=$target_alias
1135 test "x$ac_cv_target_alias" = "x" &&
1136 ac_cv_target_alias=$ac_cv_host_alias
1137 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1138 { { echo "$as_me:1138: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1139 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1140 { (exit 1); exit 1; }; }
1143 echo "$as_me:1143: result: $ac_cv_target" >&5
1144 echo "${ECHO_T}$ac_cv_target" >&6
1145 target=$ac_cv_target
1146 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1147 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1148 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1150 # The aliases save the names the user supplied, while $host etc.
1151 # will get canonicalized.
1152 test -n "$target_alias" &&
1153 test "$program_prefix$program_suffix$program_transform_name" = \
1155 program_prefix=${target_alias}-
1156 system_name="$host_os"
1158 system_name="`(uname -s -r) 2>/dev/null`"
1159 if test -z "$system_name" ; then
1160 system_name="`(hostname) 2>/dev/null`"
1163 test -n "$system_name" &&
1164 cat >>confdefs.h <<EOF
1165 #define SYSTEM_NAME "$system_name"
1168 if test "${cf_cv_system_name+set}" = set; then
1169 echo $ECHO_N "(cached) $ECHO_C" >&6
1171 cf_cv_system_name="$system_name"
1174 test -z "$system_name" && system_name="$cf_cv_system_name"
1175 test -n "$cf_cv_system_name" && echo "$as_me:1175: result: Configuring for $cf_cv_system_name" >&5
1176 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1178 if test ".$system_name" != ".$cf_cv_system_name" ; then
1179 echo "$as_me:1179: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1180 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1181 { { echo "$as_me:1181: error: \"Please remove config.cache and try again.\"" >&5
1182 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1183 { (exit 1); exit 1; }; }
1186 # Check whether --with-system-type or --without-system-type was given.
1187 if test "${with_system_type+set}" = set; then
1188 withval="$with_system_type"
1189 { echo "$as_me:1189: WARNING: overriding system type to $withval" >&5
1190 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1191 cf_cv_system_name=$withval
1196 ### Save the given $CFLAGS to allow user-override.
1197 cf_user_CFLAGS="$CFLAGS"
1199 ### Default install-location
1201 echo "$as_me:1201: checking for prefix" >&5
1202 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1203 if test "x$prefix" = "xNONE" ; then
1204 case "$cf_cv_system_name" in
1205 # non-vendor systems don't have a conflict
1206 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1209 (*) prefix=$ac_default_prefix
1213 echo "$as_me:1213: result: $prefix" >&5
1214 echo "${ECHO_T}$prefix" >&6
1216 if test "x$prefix" = "xNONE" ; then
1217 echo "$as_me:1217: checking for default include-directory" >&5
1218 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1219 test -n "$verbose" && echo 1>&6
1222 $includedir/ncurses \
1224 $prefix/include/ncurses \
1225 /usr/local/include \
1226 /usr/local/include/ncurses \
1228 /usr/include/ncurses
1230 cf_dir=`eval echo $cf_symbol`
1231 if test -f $cf_dir/curses.h ; then
1232 if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1233 includedir="$cf_symbol"
1234 test -n "$verbose" && echo $ac_n " found " 1>&6
1238 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1240 echo "$as_me:1240: result: $includedir" >&5
1241 echo "${ECHO_T}$includedir" >&6
1244 ### Checks for programs.
1247 ac_cpp='$CPP $CPPFLAGS'
1248 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1249 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1250 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1251 ac_main_return=return
1252 if test -n "$ac_tool_prefix"; then
1253 for ac_prog in gnatgcc gcc cc
1255 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1256 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1257 echo "$as_me:1257: checking for $ac_word" >&5
1258 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1259 if test "${ac_cv_prog_CC+set}" = set; then
1260 echo $ECHO_N "(cached) $ECHO_C" >&6
1262 if test -n "$CC"; then
1263 ac_cv_prog_CC="$CC" # Let the user override the test.
1265 ac_save_IFS=$IFS; IFS=$ac_path_separator
1267 for ac_dir in $ac_dummy; do
1269 test -z "$ac_dir" && ac_dir=.
1270 $as_executable_p "$ac_dir/$ac_word" || continue
1271 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1272 echo "$as_me:1272: found $ac_dir/$ac_word" >&5
1279 if test -n "$CC"; then
1280 echo "$as_me:1280: result: $CC" >&5
1281 echo "${ECHO_T}$CC" >&6
1283 echo "$as_me:1283: result: no" >&5
1284 echo "${ECHO_T}no" >&6
1287 test -n "$CC" && break
1290 if test -z "$CC"; then
1292 for ac_prog in gnatgcc gcc cc
1294 # Extract the first word of "$ac_prog", so it can be a program name with args.
1295 set dummy $ac_prog; ac_word=$2
1296 echo "$as_me:1296: checking for $ac_word" >&5
1297 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1298 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1299 echo $ECHO_N "(cached) $ECHO_C" >&6
1301 if test -n "$ac_ct_CC"; then
1302 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1304 ac_save_IFS=$IFS; IFS=$ac_path_separator
1306 for ac_dir in $ac_dummy; do
1308 test -z "$ac_dir" && ac_dir=.
1309 $as_executable_p "$ac_dir/$ac_word" || continue
1310 ac_cv_prog_ac_ct_CC="$ac_prog"
1311 echo "$as_me:1311: found $ac_dir/$ac_word" >&5
1317 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1318 if test -n "$ac_ct_CC"; then
1319 echo "$as_me:1319: result: $ac_ct_CC" >&5
1320 echo "${ECHO_T}$ac_ct_CC" >&6
1322 echo "$as_me:1322: result: no" >&5
1323 echo "${ECHO_T}no" >&6
1326 test -n "$ac_ct_CC" && break
1332 test -z "$CC" && { { echo "$as_me:1332: error: no acceptable cc found in \$PATH" >&5
1333 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1334 { (exit 1); exit 1; }; }
1336 # Provide some information about the compiler.
1337 echo "$as_me:1337:" \
1338 "checking for C compiler version" >&5
1339 ac_compiler=`set X $ac_compile; echo $2`
1340 { (eval echo "$as_me:1340: \"$ac_compiler --version </dev/null >&5\"") >&5
1341 (eval $ac_compiler --version </dev/null >&5) 2>&5
1343 echo "$as_me:1343: \$? = $ac_status" >&5
1344 (exit $ac_status); }
1345 { (eval echo "$as_me:1345: \"$ac_compiler -v </dev/null >&5\"") >&5
1346 (eval $ac_compiler -v </dev/null >&5) 2>&5
1348 echo "$as_me:1348: \$? = $ac_status" >&5
1349 (exit $ac_status); }
1350 { (eval echo "$as_me:1350: \"$ac_compiler -V </dev/null >&5\"") >&5
1351 (eval $ac_compiler -V </dev/null >&5) 2>&5
1353 echo "$as_me:1353: \$? = $ac_status" >&5
1354 (exit $ac_status); }
1356 cat >conftest.$ac_ext <<_ACEOF
1357 #line 1357 "configure"
1358 #include "confdefs.h"
1368 ac_clean_files_save=$ac_clean_files
1369 ac_clean_files="$ac_clean_files a.out a.exe"
1370 # Try to create an executable without -o first, disregard a.out.
1371 # It will help us diagnose broken compilers, and finding out an intuition
1373 echo "$as_me:1373: checking for C compiler default output" >&5
1374 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1375 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1376 if { (eval echo "$as_me:1376: \"$ac_link_default\"") >&5
1377 (eval $ac_link_default) 2>&5
1379 echo "$as_me:1379: \$? = $ac_status" >&5
1380 (exit $ac_status); }; then
1381 # Find the output, starting from the most likely. This scheme is
1382 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1384 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1385 ls a.out conftest 2>/dev/null;
1386 ls a.* conftest.* 2>/dev/null`; do
1388 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1389 a.out ) # We found the default executable, but exeext='' is most
1392 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1393 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1400 echo "$as_me: failed program was:" >&5
1401 cat conftest.$ac_ext >&5
1402 { { echo "$as_me:1402: error: C compiler cannot create executables" >&5
1403 echo "$as_me: error: C compiler cannot create executables" >&2;}
1404 { (exit 77); exit 77; }; }
1407 ac_exeext=$ac_cv_exeext
1408 echo "$as_me:1408: result: $ac_file" >&5
1409 echo "${ECHO_T}$ac_file" >&6
1411 # Check the compiler produces executables we can run. If not, either
1412 # the compiler is broken, or we cross compile.
1413 echo "$as_me:1413: checking whether the C compiler works" >&5
1414 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1415 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1416 # If not cross compiling, check that we can run a simple program.
1417 if test "$cross_compiling" != yes; then
1418 if { ac_try='./$ac_file'
1419 { (eval echo "$as_me:1419: \"$ac_try\"") >&5
1422 echo "$as_me:1422: \$? = $ac_status" >&5
1423 (exit $ac_status); }; }; then
1426 if test "$cross_compiling" = maybe; then
1429 { { echo "$as_me:1429: error: cannot run C compiled programs.
1430 If you meant to cross compile, use \`--host'." >&5
1431 echo "$as_me: error: cannot run C compiled programs.
1432 If you meant to cross compile, use \`--host'." >&2;}
1433 { (exit 1); exit 1; }; }
1437 echo "$as_me:1437: result: yes" >&5
1438 echo "${ECHO_T}yes" >&6
1440 rm -f a.out a.exe conftest$ac_cv_exeext
1441 ac_clean_files=$ac_clean_files_save
1442 # Check the compiler produces executables we can run. If not, either
1443 # the compiler is broken, or we cross compile.
1444 echo "$as_me:1444: checking whether we are cross compiling" >&5
1445 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1446 echo "$as_me:1446: result: $cross_compiling" >&5
1447 echo "${ECHO_T}$cross_compiling" >&6
1449 echo "$as_me:1449: checking for executable suffix" >&5
1450 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1451 if { (eval echo "$as_me:1451: \"$ac_link\"") >&5
1452 (eval $ac_link) 2>&5
1454 echo "$as_me:1454: \$? = $ac_status" >&5
1455 (exit $ac_status); }; then
1456 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1457 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1458 # work properly (i.e., refer to `conftest.exe'), while it won't with
1460 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1462 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1463 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1470 { { echo "$as_me:1470: error: cannot compute EXEEXT: cannot compile and link" >&5
1471 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1472 { (exit 1); exit 1; }; }
1475 rm -f conftest$ac_cv_exeext
1476 echo "$as_me:1476: result: $ac_cv_exeext" >&5
1477 echo "${ECHO_T}$ac_cv_exeext" >&6
1479 rm -f conftest.$ac_ext
1480 EXEEXT=$ac_cv_exeext
1482 echo "$as_me:1482: checking for object suffix" >&5
1483 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1484 if test "${ac_cv_objext+set}" = set; then
1485 echo $ECHO_N "(cached) $ECHO_C" >&6
1487 cat >conftest.$ac_ext <<_ACEOF
1488 #line 1488 "configure"
1489 #include "confdefs.h"
1499 rm -f conftest.o conftest.obj
1500 if { (eval echo "$as_me:1500: \"$ac_compile\"") >&5
1501 (eval $ac_compile) 2>&5
1503 echo "$as_me:1503: \$? = $ac_status" >&5
1504 (exit $ac_status); }; then
1505 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1507 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1508 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1513 echo "$as_me: failed program was:" >&5
1514 cat conftest.$ac_ext >&5
1515 { { echo "$as_me:1515: error: cannot compute OBJEXT: cannot compile" >&5
1516 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1517 { (exit 1); exit 1; }; }
1520 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1522 echo "$as_me:1522: result: $ac_cv_objext" >&5
1523 echo "${ECHO_T}$ac_cv_objext" >&6
1524 OBJEXT=$ac_cv_objext
1526 echo "$as_me:1526: checking whether we are using the GNU C compiler" >&5
1527 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1528 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1529 echo $ECHO_N "(cached) $ECHO_C" >&6
1531 cat >conftest.$ac_ext <<_ACEOF
1532 #line 1532 "configure"
1533 #include "confdefs.h"
1546 rm -f conftest.$ac_objext
1547 if { (eval echo "$as_me:1547: \"$ac_compile\"") >&5
1548 (eval $ac_compile) 2>&5
1550 echo "$as_me:1550: \$? = $ac_status" >&5
1551 (exit $ac_status); } &&
1552 { ac_try='test -s conftest.$ac_objext'
1553 { (eval echo "$as_me:1553: \"$ac_try\"") >&5
1556 echo "$as_me:1556: \$? = $ac_status" >&5
1557 (exit $ac_status); }; }; then
1560 echo "$as_me: failed program was:" >&5
1561 cat conftest.$ac_ext >&5
1564 rm -f conftest.$ac_objext conftest.$ac_ext
1565 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1568 echo "$as_me:1568: result: $ac_cv_c_compiler_gnu" >&5
1569 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1570 GCC=`test $ac_compiler_gnu = yes && echo yes`
1571 ac_test_CFLAGS=${CFLAGS+set}
1572 ac_save_CFLAGS=$CFLAGS
1574 echo "$as_me:1574: checking whether $CC accepts -g" >&5
1575 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1576 if test "${ac_cv_prog_cc_g+set}" = set; then
1577 echo $ECHO_N "(cached) $ECHO_C" >&6
1579 cat >conftest.$ac_ext <<_ACEOF
1580 #line 1580 "configure"
1581 #include "confdefs.h"
1591 rm -f conftest.$ac_objext
1592 if { (eval echo "$as_me:1592: \"$ac_compile\"") >&5
1593 (eval $ac_compile) 2>&5
1595 echo "$as_me:1595: \$? = $ac_status" >&5
1596 (exit $ac_status); } &&
1597 { ac_try='test -s conftest.$ac_objext'
1598 { (eval echo "$as_me:1598: \"$ac_try\"") >&5
1601 echo "$as_me:1601: \$? = $ac_status" >&5
1602 (exit $ac_status); }; }; then
1605 echo "$as_me: failed program was:" >&5
1606 cat conftest.$ac_ext >&5
1609 rm -f conftest.$ac_objext conftest.$ac_ext
1611 echo "$as_me:1611: result: $ac_cv_prog_cc_g" >&5
1612 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1613 if test "$ac_test_CFLAGS" = set; then
1614 CFLAGS=$ac_save_CFLAGS
1615 elif test $ac_cv_prog_cc_g = yes; then
1616 if test "$GCC" = yes; then
1622 if test "$GCC" = yes; then
1628 # Some people use a C++ compiler to compile C. Since we use `exit',
1629 # in C++ we need to declare it. In case someone uses the same compiler
1630 # for both compiling C and C++ we need to have the C++ compiler decide
1631 # the declaration of exit, since it's the most demanding environment.
1632 cat >conftest.$ac_ext <<_ACEOF
1637 rm -f conftest.$ac_objext
1638 if { (eval echo "$as_me:1638: \"$ac_compile\"") >&5
1639 (eval $ac_compile) 2>&5
1641 echo "$as_me:1641: \$? = $ac_status" >&5
1642 (exit $ac_status); } &&
1643 { ac_try='test -s conftest.$ac_objext'
1644 { (eval echo "$as_me:1644: \"$ac_try\"") >&5
1647 echo "$as_me:1647: \$? = $ac_status" >&5
1648 (exit $ac_status); }; }; then
1649 for ac_declaration in \
1651 '#include <stdlib.h>' \
1652 'extern "C" void std::exit (int) throw (); using std::exit;' \
1653 'extern "C" void std::exit (int); using std::exit;' \
1654 'extern "C" void exit (int) throw ();' \
1655 'extern "C" void exit (int);' \
1658 cat >conftest.$ac_ext <<_ACEOF
1659 #line 1659 "configure"
1660 #include "confdefs.h"
1671 rm -f conftest.$ac_objext
1672 if { (eval echo "$as_me:1672: \"$ac_compile\"") >&5
1673 (eval $ac_compile) 2>&5
1675 echo "$as_me:1675: \$? = $ac_status" >&5
1676 (exit $ac_status); } &&
1677 { ac_try='test -s conftest.$ac_objext'
1678 { (eval echo "$as_me:1678: \"$ac_try\"") >&5
1681 echo "$as_me:1681: \$? = $ac_status" >&5
1682 (exit $ac_status); }; }; then
1685 echo "$as_me: failed program was:" >&5
1686 cat conftest.$ac_ext >&5
1689 rm -f conftest.$ac_objext conftest.$ac_ext
1690 cat >conftest.$ac_ext <<_ACEOF
1691 #line 1691 "configure"
1692 #include "confdefs.h"
1702 rm -f conftest.$ac_objext
1703 if { (eval echo "$as_me:1703: \"$ac_compile\"") >&5
1704 (eval $ac_compile) 2>&5
1706 echo "$as_me:1706: \$? = $ac_status" >&5
1707 (exit $ac_status); } &&
1708 { ac_try='test -s conftest.$ac_objext'
1709 { (eval echo "$as_me:1709: \"$ac_try\"") >&5
1712 echo "$as_me:1712: \$? = $ac_status" >&5
1713 (exit $ac_status); }; }; then
1716 echo "$as_me: failed program was:" >&5
1717 cat conftest.$ac_ext >&5
1719 rm -f conftest.$ac_objext conftest.$ac_ext
1722 if test -n "$ac_declaration"; then
1723 echo '#ifdef __cplusplus' >>confdefs.h
1724 echo $ac_declaration >>confdefs.h
1725 echo '#endif' >>confdefs.h
1729 echo "$as_me: failed program was:" >&5
1730 cat conftest.$ac_ext >&5
1732 rm -f conftest.$ac_objext conftest.$ac_ext
1734 ac_cpp='$CPP $CPPFLAGS'
1735 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1736 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1737 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1738 ac_main_return=return
1741 if test "$GCC" = yes ; then
1742 echo "$as_me:1742: checking version of $CC" >&5
1743 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1744 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.].*//'`"
1745 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1746 echo "$as_me:1746: result: $GCC_VERSION" >&5
1747 echo "${ECHO_T}$GCC_VERSION" >&6
1750 echo "$as_me:1750: checking for $CC option to accept ANSI C" >&5
1751 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1752 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1753 echo $ECHO_N "(cached) $ECHO_C" >&6
1755 ac_cv_prog_cc_stdc=no
1757 cat >conftest.$ac_ext <<_ACEOF
1758 #line 1758 "configure"
1759 #include "confdefs.h"
1762 #include <sys/types.h>
1763 #include <sys/stat.h>
1764 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1765 struct buf { int x; };
1766 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1767 static char *e (p, i)
1773 static char *f (char * (*g) (char **, int), char **p, ...)
1778 s = g (p, va_arg (v,int));
1782 int test (int i, double x);
1783 struct s1 {int (*f) (int a);};
1784 struct s2 {int (*f) (double a);};
1785 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1791 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1796 # Don't try gcc -ansi; that turns off useful extensions and
1797 # breaks some systems' header files.
1798 # AIX -qlanglvl=ansi
1799 # Ultrix and OSF/1 -std1
1800 # HP-UX 10.20 and later -Ae
1801 # HP-UX older versions -Aa -D_HPUX_SOURCE
1802 # SVR4 -Xc -D__EXTENSIONS__
1803 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1805 CC="$ac_save_CC $ac_arg"
1806 rm -f conftest.$ac_objext
1807 if { (eval echo "$as_me:1807: \"$ac_compile\"") >&5
1808 (eval $ac_compile) 2>&5
1810 echo "$as_me:1810: \$? = $ac_status" >&5
1811 (exit $ac_status); } &&
1812 { ac_try='test -s conftest.$ac_objext'
1813 { (eval echo "$as_me:1813: \"$ac_try\"") >&5
1816 echo "$as_me:1816: \$? = $ac_status" >&5
1817 (exit $ac_status); }; }; then
1818 ac_cv_prog_cc_stdc=$ac_arg
1821 echo "$as_me: failed program was:" >&5
1822 cat conftest.$ac_ext >&5
1824 rm -f conftest.$ac_objext
1826 rm -f conftest.$ac_ext conftest.$ac_objext
1831 case "x$ac_cv_prog_cc_stdc" in
1833 echo "$as_me:1833: result: none needed" >&5
1834 echo "${ECHO_T}none needed" >&6 ;;
1836 echo "$as_me:1836: result: $ac_cv_prog_cc_stdc" >&5
1837 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1838 CC="$CC $ac_cv_prog_cc_stdc" ;;
1841 # This should have been defined by AC_PROG_CC
1844 echo "$as_me:1844: checking \$CFLAGS variable" >&5
1845 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
1848 echo "$as_me:1848: result: broken" >&5
1849 echo "${ECHO_T}broken" >&6
1850 { echo "$as_me:1850: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
1851 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
1854 for cf_arg in $cf_flags
1860 cf_new_extra_cppflags=
1862 for cf_add_cflags in $cf_arg
1864 case $cf_fix_cppflags in
1866 case $cf_add_cflags in
1867 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1868 case $cf_add_cflags in
1870 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1872 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1873 && test -z "${cf_tst_cflags}" \
1874 && cf_fix_cppflags=yes
1876 if test $cf_fix_cppflags = yes ; then
1878 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1879 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1882 elif test "${cf_tst_cflags}" = "\"'" ; then
1884 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1885 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1895 case $cf_add_cflags in
1897 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1899 CPPFLAGS=`echo "$CPPFLAGS" | \
1900 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1901 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1906 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
1907 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
1914 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
1915 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
1922 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1923 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1925 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1927 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1928 && test -z "${cf_tst_cflags}" \
1929 && cf_fix_cppflags=no
1934 if test -n "$cf_new_cflags" ; then
1936 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
1937 CFLAGS="${CFLAGS}$cf_new_cflags"
1941 if test -n "$cf_new_cppflags" ; then
1943 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
1944 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
1948 if test -n "$cf_new_extra_cppflags" ; then
1950 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
1951 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
1958 echo "$as_me:1958: result: ok" >&5
1959 echo "${ECHO_T}ok" >&6
1963 echo "$as_me:1963: checking \$CC variable" >&5
1964 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1967 echo "$as_me:1967: result: broken" >&5
1968 echo "${ECHO_T}broken" >&6
1969 { echo "$as_me:1969: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1970 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1972 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
1973 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
1975 for cf_arg in $cf_flags
1983 cf_new_extra_cppflags=
1985 for cf_add_cflags in $cf_arg
1987 case $cf_fix_cppflags in
1989 case $cf_add_cflags in
1990 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1991 case $cf_add_cflags in
1993 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1995 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1996 && test -z "${cf_tst_cflags}" \
1997 && cf_fix_cppflags=yes
1999 if test $cf_fix_cppflags = yes ; then
2001 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2002 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2005 elif test "${cf_tst_cflags}" = "\"'" ; then
2007 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2008 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2018 case $cf_add_cflags in
2020 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2022 CPPFLAGS=`echo "$CPPFLAGS" | \
2023 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2024 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2029 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2030 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2037 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2038 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2045 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2046 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2048 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2050 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2051 && test -z "${cf_tst_cflags}" \
2052 && cf_fix_cppflags=no
2057 if test -n "$cf_new_cflags" ; then
2059 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2060 CFLAGS="${CFLAGS}$cf_new_cflags"
2064 if test -n "$cf_new_cppflags" ; then
2066 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2067 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2071 if test -n "$cf_new_extra_cppflags" ; then
2073 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2074 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2084 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2086 echo "${as_me:-configure}:2086: testing resulting CC: '$CC' ..." 1>&5
2088 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2090 echo "${as_me:-configure}:2090: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2092 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2094 echo "${as_me:-configure}:2094: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2098 echo "$as_me:2098: result: ok" >&5
2099 echo "${ECHO_T}ok" >&6
2104 ac_cpp='$CPP $CPPFLAGS'
2105 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2106 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2107 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2108 ac_main_return=return
2109 echo "$as_me:2109: checking how to run the C preprocessor" >&5
2110 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2111 # On Suns, sometimes $CPP names a directory.
2112 if test -n "$CPP" && test -d "$CPP"; then
2115 if test -z "$CPP"; then
2116 if test "${ac_cv_prog_CPP+set}" = set; then
2117 echo $ECHO_N "(cached) $ECHO_C" >&6
2119 # Double quotes because CPP needs to be expanded
2120 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2123 for ac_c_preproc_warn_flag in '' yes
2125 # Use a header file that comes with gcc, so configuring glibc
2126 # with a fresh cross-compiler works.
2127 # On the NeXT, cc -E runs the code through the compiler's parser,
2128 # not just through cpp. "Syntax error" is here to catch this case.
2129 cat >conftest.$ac_ext <<_ACEOF
2130 #line 2130 "configure"
2131 #include "confdefs.h"
2135 if { (eval echo "$as_me:2135: \"$ac_cpp conftest.$ac_ext\"") >&5
2136 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2138 egrep -v '^ *\+' conftest.er1 >conftest.err
2140 cat conftest.err >&5
2141 echo "$as_me:2141: \$? = $ac_status" >&5
2142 (exit $ac_status); } >/dev/null; then
2143 if test -s conftest.err; then
2144 ac_cpp_err=$ac_c_preproc_warn_flag
2151 if test -z "$ac_cpp_err"; then
2154 echo "$as_me: failed program was:" >&5
2155 cat conftest.$ac_ext >&5
2156 # Broken: fails on valid input.
2159 rm -f conftest.err conftest.$ac_ext
2161 # OK, works on sane cases. Now check whether non-existent headers
2162 # can be detected and how.
2163 cat >conftest.$ac_ext <<_ACEOF
2164 #line 2164 "configure"
2165 #include "confdefs.h"
2166 #include <ac_nonexistent.h>
2168 if { (eval echo "$as_me:2168: \"$ac_cpp conftest.$ac_ext\"") >&5
2169 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2171 egrep -v '^ *\+' conftest.er1 >conftest.err
2173 cat conftest.err >&5
2174 echo "$as_me:2174: \$? = $ac_status" >&5
2175 (exit $ac_status); } >/dev/null; then
2176 if test -s conftest.err; then
2177 ac_cpp_err=$ac_c_preproc_warn_flag
2184 if test -z "$ac_cpp_err"; then
2185 # Broken: success on invalid input.
2188 echo "$as_me: failed program was:" >&5
2189 cat conftest.$ac_ext >&5
2190 # Passes both tests.
2194 rm -f conftest.err conftest.$ac_ext
2197 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2198 rm -f conftest.err conftest.$ac_ext
2199 if $ac_preproc_ok; then
2211 echo "$as_me:2211: result: $CPP" >&5
2212 echo "${ECHO_T}$CPP" >&6
2214 for ac_c_preproc_warn_flag in '' yes
2216 # Use a header file that comes with gcc, so configuring glibc
2217 # with a fresh cross-compiler works.
2218 # On the NeXT, cc -E runs the code through the compiler's parser,
2219 # not just through cpp. "Syntax error" is here to catch this case.
2220 cat >conftest.$ac_ext <<_ACEOF
2221 #line 2221 "configure"
2222 #include "confdefs.h"
2226 if { (eval echo "$as_me:2226: \"$ac_cpp conftest.$ac_ext\"") >&5
2227 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2229 egrep -v '^ *\+' conftest.er1 >conftest.err
2231 cat conftest.err >&5
2232 echo "$as_me:2232: \$? = $ac_status" >&5
2233 (exit $ac_status); } >/dev/null; then
2234 if test -s conftest.err; then
2235 ac_cpp_err=$ac_c_preproc_warn_flag
2242 if test -z "$ac_cpp_err"; then
2245 echo "$as_me: failed program was:" >&5
2246 cat conftest.$ac_ext >&5
2247 # Broken: fails on valid input.
2250 rm -f conftest.err conftest.$ac_ext
2252 # OK, works on sane cases. Now check whether non-existent headers
2253 # can be detected and how.
2254 cat >conftest.$ac_ext <<_ACEOF
2255 #line 2255 "configure"
2256 #include "confdefs.h"
2257 #include <ac_nonexistent.h>
2259 if { (eval echo "$as_me:2259: \"$ac_cpp conftest.$ac_ext\"") >&5
2260 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2262 egrep -v '^ *\+' conftest.er1 >conftest.err
2264 cat conftest.err >&5
2265 echo "$as_me:2265: \$? = $ac_status" >&5
2266 (exit $ac_status); } >/dev/null; then
2267 if test -s conftest.err; then
2268 ac_cpp_err=$ac_c_preproc_warn_flag
2275 if test -z "$ac_cpp_err"; then
2276 # Broken: success on invalid input.
2279 echo "$as_me: failed program was:" >&5
2280 cat conftest.$ac_ext >&5
2281 # Passes both tests.
2285 rm -f conftest.err conftest.$ac_ext
2288 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2289 rm -f conftest.err conftest.$ac_ext
2290 if $ac_preproc_ok; then
2293 { { echo "$as_me:2293: error: C preprocessor \"$CPP\" fails sanity check" >&5
2294 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2295 { (exit 1); exit 1; }; }
2299 ac_cpp='$CPP $CPPFLAGS'
2300 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2301 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2302 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2303 ac_main_return=return
2305 if test $ac_cv_c_compiler_gnu = yes; then
2306 echo "$as_me:2306: checking whether $CC needs -traditional" >&5
2307 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2308 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2309 echo $ECHO_N "(cached) $ECHO_C" >&6
2311 ac_pattern="Autoconf.*'x'"
2312 cat >conftest.$ac_ext <<_ACEOF
2313 #line 2313 "configure"
2314 #include "confdefs.h"
2316 int Autoconf = TIOCGETP;
2318 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2319 egrep "$ac_pattern" >/dev/null 2>&1; then
2320 ac_cv_prog_gcc_traditional=yes
2322 ac_cv_prog_gcc_traditional=no
2326 if test $ac_cv_prog_gcc_traditional = no; then
2327 cat >conftest.$ac_ext <<_ACEOF
2328 #line 2328 "configure"
2329 #include "confdefs.h"
2331 int Autoconf = TCGETA;
2333 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2334 egrep "$ac_pattern" >/dev/null 2>&1; then
2335 ac_cv_prog_gcc_traditional=yes
2341 echo "$as_me:2341: result: $ac_cv_prog_gcc_traditional" >&5
2342 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2343 if test $ac_cv_prog_gcc_traditional = yes; then
2344 CC="$CC -traditional"
2348 echo "$as_me:2348: checking whether $CC understands -c and -o together" >&5
2349 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2350 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2351 echo $ECHO_N "(cached) $ECHO_C" >&6
2354 cat > conftest.$ac_ext <<CF_EOF
2357 ${cf_cv_main_return:-return}(0);
2360 # We do the test twice because some compilers refuse to overwrite an
2361 # existing .o file with -o, though they will create one.
2362 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2363 if { (eval echo "$as_me:2363: \"$ac_try\"") >&5
2366 echo "$as_me:2366: \$? = $ac_status" >&5
2367 (exit $ac_status); } &&
2368 test -f conftest2.$ac_objext && { (eval echo "$as_me:2368: \"$ac_try\"") >&5
2371 echo "$as_me:2371: \$? = $ac_status" >&5
2372 (exit $ac_status); };
2374 eval cf_cv_prog_CC_c_o=yes
2376 eval cf_cv_prog_CC_c_o=no
2381 if test $cf_cv_prog_CC_c_o = yes; then
2382 echo "$as_me:2382: result: yes" >&5
2383 echo "${ECHO_T}yes" >&6
2385 echo "$as_me:2385: result: no" >&5
2386 echo "${ECHO_T}no" >&6
2389 test "$program_prefix" != NONE &&
2390 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2391 # Use a double $ so make ignores it.
2392 test "$program_suffix" != NONE &&
2393 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2394 # Double any \ or $. echo might interpret backslashes.
2395 # By default was `s,x,x', remove it if useless.
2396 cat <<\_ACEOF >conftest.sed
2397 s/[\\$]/&&/g;s/;s,x,x,$//
2399 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2402 for ac_prog in mawk gawk nawk awk
2404 # Extract the first word of "$ac_prog", so it can be a program name with args.
2405 set dummy $ac_prog; ac_word=$2
2406 echo "$as_me:2406: checking for $ac_word" >&5
2407 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2408 if test "${ac_cv_prog_AWK+set}" = set; then
2409 echo $ECHO_N "(cached) $ECHO_C" >&6
2411 if test -n "$AWK"; then
2412 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2414 ac_save_IFS=$IFS; IFS=$ac_path_separator
2416 for ac_dir in $ac_dummy; do
2418 test -z "$ac_dir" && ac_dir=.
2419 $as_executable_p "$ac_dir/$ac_word" || continue
2420 ac_cv_prog_AWK="$ac_prog"
2421 echo "$as_me:2421: found $ac_dir/$ac_word" >&5
2428 if test -n "$AWK"; then
2429 echo "$as_me:2429: result: $AWK" >&5
2430 echo "${ECHO_T}$AWK" >&6
2432 echo "$as_me:2432: result: no" >&5
2433 echo "${ECHO_T}no" >&6
2436 test -n "$AWK" && break
2439 test -z "$AWK" && { { echo "$as_me:2439: error: No awk program found" >&5
2440 echo "$as_me: error: No awk program found" >&2;}
2441 { (exit 1); exit 1; }; }
2443 echo "$as_me:2443: checking for egrep" >&5
2444 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2445 if test "${ac_cv_prog_egrep+set}" = set; then
2446 echo $ECHO_N "(cached) $ECHO_C" >&6
2448 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2449 then ac_cv_prog_egrep='grep -E'
2450 else ac_cv_prog_egrep='egrep'
2453 echo "$as_me:2453: result: $ac_cv_prog_egrep" >&5
2454 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2455 EGREP=$ac_cv_prog_egrep
2457 test -z "$EGREP" && { { echo "$as_me:2457: error: No egrep program found" >&5
2458 echo "$as_me: error: No egrep program found" >&2;}
2459 { (exit 1); exit 1; }; }
2461 # Find a good install program. We prefer a C program (faster),
2462 # so one script is as good as another. But avoid the broken or
2463 # incompatible versions:
2464 # SysV /etc/install, /usr/sbin/install
2465 # SunOS /usr/etc/install
2466 # IRIX /sbin/install
2468 # AmigaOS /C/install, which installs bootblocks on floppy discs
2469 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2470 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2471 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2472 # ./install, which can be erroneously created by make from ./install.sh.
2473 echo "$as_me:2473: checking for a BSD compatible install" >&5
2474 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2475 if test -z "$INSTALL"; then
2476 if test "${ac_cv_path_install+set}" = set; then
2477 echo $ECHO_N "(cached) $ECHO_C" >&6
2479 ac_save_IFS=$IFS; IFS=$ac_path_separator
2480 for ac_dir in $PATH; do
2482 # Account for people who put trailing slashes in PATH elements.
2484 / | ./ | .// | /cC/* \
2485 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2488 # OSF1 and SCO ODT 3.0 have their own names for install.
2489 # Don't use installbsd from OSF since it installs stuff as root
2491 for ac_prog in ginstall scoinst install; do
2492 if $as_executable_p "$ac_dir/$ac_prog"; then
2493 if test $ac_prog = install &&
2494 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2495 # AIX install. It has an incompatible calling convention.
2497 elif test $ac_prog = install &&
2498 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2499 # program-specific install script used by HP pwplus--don't use.
2502 ac_cv_path_install="$ac_dir/$ac_prog -c"
2512 if test "${ac_cv_path_install+set}" = set; then
2513 INSTALL=$ac_cv_path_install
2515 # As a last resort, use the slow shell script. We don't cache a
2516 # path for INSTALL within a source directory, because that will
2517 # break other packages using the cache if that directory is
2518 # removed, or if the path is relative.
2519 INSTALL=$ac_install_sh
2522 echo "$as_me:2522: result: $INSTALL" >&5
2523 echo "${ECHO_T}$INSTALL" >&6
2525 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2526 # It thinks the first close brace ends the variable substitution.
2527 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2529 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2531 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2533 echo "$as_me:2533: checking whether ln -s works" >&5
2534 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2536 if test "$LN_S" = "ln -s"; then
2537 echo "$as_me:2537: result: yes" >&5
2538 echo "${ECHO_T}yes" >&6
2540 echo "$as_me:2540: result: no, using $LN_S" >&5
2541 echo "${ECHO_T}no, using $LN_S" >&6
2544 echo "$as_me:2544: checking if $LN_S -f options work" >&5
2545 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2547 rm -f conf$$.src conf$$dst
2549 echo first >conf$$.src
2550 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2555 rm -f conf$$.dst conf$$src
2556 echo "$as_me:2556: result: $cf_prog_ln_sf" >&5
2557 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2559 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2561 # Find a good install program. We prefer a C program (faster),
2562 # so one script is as good as another. But avoid the broken or
2563 # incompatible versions:
2564 # SysV /etc/install, /usr/sbin/install
2565 # SunOS /usr/etc/install
2566 # IRIX /sbin/install
2568 # AmigaOS /C/install, which installs bootblocks on floppy discs
2569 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2570 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2571 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2572 # ./install, which can be erroneously created by make from ./install.sh.
2573 echo "$as_me:2573: checking for a BSD compatible install" >&5
2574 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2575 if test -z "$INSTALL"; then
2576 if test "${ac_cv_path_install+set}" = set; then
2577 echo $ECHO_N "(cached) $ECHO_C" >&6
2579 ac_save_IFS=$IFS; IFS=$ac_path_separator
2580 for ac_dir in $PATH; do
2582 # Account for people who put trailing slashes in PATH elements.
2584 / | ./ | .// | /cC/* \
2585 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2588 # OSF1 and SCO ODT 3.0 have their own names for install.
2589 # Don't use installbsd from OSF since it installs stuff as root
2591 for ac_prog in ginstall scoinst install; do
2592 if $as_executable_p "$ac_dir/$ac_prog"; then
2593 if test $ac_prog = install &&
2594 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2595 # AIX install. It has an incompatible calling convention.
2597 elif test $ac_prog = install &&
2598 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2599 # program-specific install script used by HP pwplus--don't use.
2602 ac_cv_path_install="$ac_dir/$ac_prog -c"
2612 if test "${ac_cv_path_install+set}" = set; then
2613 INSTALL=$ac_cv_path_install
2615 # As a last resort, use the slow shell script. We don't cache a
2616 # path for INSTALL within a source directory, because that will
2617 # break other packages using the cache if that directory is
2618 # removed, or if the path is relative.
2619 INSTALL=$ac_install_sh
2622 echo "$as_me:2622: result: $INSTALL" >&5
2623 echo "${ECHO_T}$INSTALL" >&6
2625 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2626 # It thinks the first close brace ends the variable substitution.
2627 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2629 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2631 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2637 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2638 test -z "$cf_dir" && cf_dir=.
2639 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2643 echo "$as_me:2643: checking if you want to install stripped executables" >&5
2644 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2646 # Check whether --enable-stripping or --disable-stripping was given.
2647 if test "${enable_stripping+set}" = set; then
2648 enableval="$enable_stripping"
2649 test "$enableval" != no && enableval=yes
2650 if test "$enableval" != "yes" ; then
2660 echo "$as_me:2660: result: $with_stripping" >&5
2661 echo "${ECHO_T}$with_stripping" >&6
2663 if test "$with_stripping" = yes
2670 : ${INSTALL:=install}
2671 echo "$as_me:2671: checking if install accepts -p option" >&5
2672 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
2673 if test "${cf_cv_install_p+set}" = set; then
2674 echo $ECHO_N "(cached) $ECHO_C" >&6
2681 if $INSTALL -p conftest.in conftest.out 2>/dev/null
2683 if test -f conftest.out/conftest.in
2685 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
2686 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
2687 if test -s conftest.err
2702 echo "$as_me:2702: result: $cf_cv_install_p" >&5
2703 echo "${ECHO_T}$cf_cv_install_p" >&6
2705 echo "$as_me:2705: checking if install needs to be told about ownership" >&5
2706 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
2707 case `$ac_config_guess` in
2716 echo "$as_me:2716: result: $with_install_o" >&5
2717 echo "${ECHO_T}$with_install_o" >&6
2718 if test "x$with_install_o" = xyes
2720 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'`
2725 echo "$as_me:2725: checking for long file names" >&5
2726 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2727 if test "${ac_cv_sys_long_file_names+set}" = set; then
2728 echo $ECHO_N "(cached) $ECHO_C" >&6
2730 ac_cv_sys_long_file_names=yes
2731 # Test for long file names in all the places we know might matter:
2732 # . the current directory, where building will happen
2733 # $prefix/lib where we will be installing things
2734 # $exec_prefix/lib likewise
2735 # eval it to expand exec_prefix.
2736 # $TMPDIR if set, where it might want to write temporary files
2737 # if $TMPDIR is not set:
2738 # /tmp where it might want to write temporary files
2741 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2744 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2746 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2747 test -d $ac_dir || continue
2748 test -w $ac_dir || continue # It is less confusing to not echo anything here.
2749 ac_xdir=$ac_dir/cf$$
2750 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2751 ac_tf1=$ac_xdir/conftest9012345
2752 ac_tf2=$ac_xdir/conftest9012346
2753 (echo 1 >$ac_tf1) 2>/dev/null
2754 (echo 2 >$ac_tf2) 2>/dev/null
2755 ac_val=`cat $ac_tf1 2>/dev/null`
2756 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2757 ac_cv_sys_long_file_names=no
2758 rm -rf $ac_xdir 2>/dev/null
2761 rm -rf $ac_xdir 2>/dev/null
2764 echo "$as_me:2764: result: $ac_cv_sys_long_file_names" >&5
2765 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2766 if test $ac_cv_sys_long_file_names = yes; then
2768 cat >>confdefs.h <<\EOF
2769 #define HAVE_LONG_FILE_NAMES 1
2774 # if we find pkg-config, check if we should install the ".pc" files.
2776 echo "$as_me:2776: checking if you want to use pkg-config" >&5
2777 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2779 # Check whether --with-pkg-config or --without-pkg-config was given.
2780 if test "${with_pkg_config+set}" = set; then
2781 withval="$with_pkg_config"
2782 cf_pkg_config=$withval
2786 echo "$as_me:2786: result: $cf_pkg_config" >&5
2787 echo "${ECHO_T}$cf_pkg_config" >&6
2789 case $cf_pkg_config in
2795 if test -n "$ac_tool_prefix"; then
2796 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
2797 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
2798 echo "$as_me:2798: checking for $ac_word" >&5
2799 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2800 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2801 echo $ECHO_N "(cached) $ECHO_C" >&6
2805 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2808 ac_save_IFS=$IFS; IFS=$ac_path_separator
2810 for ac_dir in $ac_dummy; do
2812 test -z "$ac_dir" && ac_dir=.
2813 if $as_executable_p "$ac_dir/$ac_word"; then
2814 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2815 echo "$as_me:2815: found $ac_dir/$ac_word" >&5
2823 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2825 if test -n "$PKG_CONFIG"; then
2826 echo "$as_me:2826: result: $PKG_CONFIG" >&5
2827 echo "${ECHO_T}$PKG_CONFIG" >&6
2829 echo "$as_me:2829: result: no" >&5
2830 echo "${ECHO_T}no" >&6
2834 if test -z "$ac_cv_path_PKG_CONFIG"; then
2835 ac_pt_PKG_CONFIG=$PKG_CONFIG
2836 # Extract the first word of "pkg-config", so it can be a program name with args.
2837 set dummy pkg-config; ac_word=$2
2838 echo "$as_me:2838: checking for $ac_word" >&5
2839 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2840 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
2841 echo $ECHO_N "(cached) $ECHO_C" >&6
2843 case $ac_pt_PKG_CONFIG in
2845 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
2848 ac_save_IFS=$IFS; IFS=$ac_path_separator
2850 for ac_dir in $ac_dummy; do
2852 test -z "$ac_dir" && ac_dir=.
2853 if $as_executable_p "$ac_dir/$ac_word"; then
2854 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
2855 echo "$as_me:2855: found $ac_dir/$ac_word" >&5
2860 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
2864 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
2866 if test -n "$ac_pt_PKG_CONFIG"; then
2867 echo "$as_me:2867: result: $ac_pt_PKG_CONFIG" >&5
2868 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
2870 echo "$as_me:2870: result: no" >&5
2871 echo "${ECHO_T}no" >&6
2874 PKG_CONFIG=$ac_pt_PKG_CONFIG
2876 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
2885 test -z "$PKG_CONFIG" && PKG_CONFIG=none
2886 if test "$PKG_CONFIG" != none ; then
2888 if test "x$prefix" != xNONE; then
2889 cf_path_syntax="$prefix"
2891 cf_path_syntax="$ac_default_prefix"
2894 case ".$PKG_CONFIG" in
2899 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
2901 (.\${*prefix}*|.\${*dir}*)
2902 eval PKG_CONFIG="$PKG_CONFIG"
2903 case ".$PKG_CONFIG" in
2905 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2910 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2913 { { echo "$as_me:2913: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
2914 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
2915 { (exit 1); exit 1; }; }
2919 elif test "x$cf_pkg_config" != xno ; then
2920 { echo "$as_me:2920: WARNING: pkg-config is not installed" >&5
2921 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
2926 echo "$as_me:2926: checking for pkg-config library directory" >&5
2927 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
2930 echo "$as_me:2930: checking for $PKG_CONFIG library directory" >&5
2931 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
2935 PKG_CONFIG_LIBDIR=no
2937 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
2938 if test "${with_pkg_config_libdir+set}" = set; then
2939 withval="$with_pkg_config_libdir"
2940 PKG_CONFIG_LIBDIR=$withval
2942 test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
2945 case x$PKG_CONFIG_LIBDIR in
2949 # Look for the library directory using the same prefix as the executable
2950 if test "x$PKG_CONFIG" = xnone
2954 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
2957 # If you don't like using the default architecture, you have to specify the
2958 # intended library directory and corresponding compiler/linker options.
2960 # This case allows for Debian's 2014-flavor of multiarch, along with the
2961 # most common variations before that point. Some other variants spell the
2962 # directory differently, e.g., "pkg-config", and put it in unusual places.
2963 # pkg-config has always been poorly standardized, which is ironic...
2964 case x`(arch) 2>/dev/null` in
2967 $cf_path/lib/*64-linux-gnu \
2975 $cf_path/lib/*-linux-gnu \
2983 test -n "$verbose" && echo " list..." 1>&6
2985 echo "${as_me:-configure}:2985: testing list... ..." 1>&5
2987 for cf_config in $cf_search_path
2989 test -n "$verbose" && echo " checking $cf_config/pkgconfig" 1>&6
2991 echo "${as_me:-configure}:2991: testing checking $cf_config/pkgconfig ..." 1>&5
2993 if test -d $cf_config/pkgconfig
2995 PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
2996 echo "$as_me:2996: checking done" >&5
2997 echo $ECHO_N "checking done... $ECHO_C" >&6
3006 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3007 echo "$as_me:3007: result: $PKG_CONFIG_LIBDIR" >&5
3008 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3011 echo "$as_me:3011: checking if you want to build test-programs" >&5
3012 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3014 # Check whether --with-tests or --without-tests was given.
3015 if test "${with_tests+set}" = set; then
3016 withval="$with_tests"
3017 cf_with_tests=$withval
3021 echo "$as_me:3021: result: $cf_with_tests" >&5
3022 echo "${ECHO_T}$cf_with_tests" >&6
3024 echo "$as_me:3024: checking if we should assume mixed-case filenames" >&5
3025 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3027 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3028 if test "${enable_mixed_case+set}" = set; then
3029 enableval="$enable_mixed_case"
3030 enable_mixedcase=$enableval
3032 enable_mixedcase=auto
3034 echo "$as_me:3034: result: $enable_mixedcase" >&5
3035 echo "${ECHO_T}$enable_mixedcase" >&6
3036 if test "$enable_mixedcase" = "auto" ; then
3038 echo "$as_me:3038: checking if filesystem supports mixed-case filenames" >&5
3039 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3040 if test "${cf_cv_mixedcase+set}" = set; then
3041 echo $ECHO_N "(cached) $ECHO_C" >&6
3044 if test "$cross_compiling" = yes ; then
3045 case $target_alias in
3046 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3054 rm -f conftest CONFTEST
3056 if test -f CONFTEST ; then
3061 rm -f conftest CONFTEST
3065 echo "$as_me:3065: result: $cf_cv_mixedcase" >&5
3066 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3067 test "$cf_cv_mixedcase" = yes &&
3068 cat >>confdefs.h <<\EOF
3069 #define MIXEDCASE_FILENAMES 1
3073 cf_cv_mixedcase=$enable_mixedcase
3074 if test "$enable_mixedcase" = "yes" ; then
3075 cat >>confdefs.h <<\EOF
3076 #define MIXEDCASE_FILENAMES 1
3082 # do this after mixed-case option (tags/TAGS is not as important as tic).
3083 echo "$as_me:3083: checking whether ${MAKE-make} sets \${MAKE}" >&5
3084 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3085 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3086 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3087 echo $ECHO_N "(cached) $ECHO_C" >&6
3089 cat >conftest.make <<\EOF
3091 @echo 'ac_maketemp="${MAKE}"'
3093 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3094 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3095 if test -n "$ac_maketemp"; then
3096 eval ac_cv_prog_make_${ac_make}_set=yes
3098 eval ac_cv_prog_make_${ac_make}_set=no
3102 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3103 echo "$as_me:3103: result: yes" >&5
3104 echo "${ECHO_T}yes" >&6
3107 echo "$as_me:3107: result: no" >&5
3108 echo "${ECHO_T}no" >&6
3109 SET_MAKE="MAKE=${MAKE-make}"
3112 for ac_prog in exctags ctags
3114 # Extract the first word of "$ac_prog", so it can be a program name with args.
3115 set dummy $ac_prog; ac_word=$2
3116 echo "$as_me:3116: checking for $ac_word" >&5
3117 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3118 if test "${ac_cv_prog_CTAGS+set}" = set; then
3119 echo $ECHO_N "(cached) $ECHO_C" >&6
3121 if test -n "$CTAGS"; then
3122 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3124 ac_save_IFS=$IFS; IFS=$ac_path_separator
3126 for ac_dir in $ac_dummy; do
3128 test -z "$ac_dir" && ac_dir=.
3129 $as_executable_p "$ac_dir/$ac_word" || continue
3130 ac_cv_prog_CTAGS="$ac_prog"
3131 echo "$as_me:3131: found $ac_dir/$ac_word" >&5
3137 CTAGS=$ac_cv_prog_CTAGS
3138 if test -n "$CTAGS"; then
3139 echo "$as_me:3139: result: $CTAGS" >&5
3140 echo "${ECHO_T}$CTAGS" >&6
3142 echo "$as_me:3142: result: no" >&5
3143 echo "${ECHO_T}no" >&6
3146 test -n "$CTAGS" && break
3149 for ac_prog in exetags etags
3151 # Extract the first word of "$ac_prog", so it can be a program name with args.
3152 set dummy $ac_prog; ac_word=$2
3153 echo "$as_me:3153: checking for $ac_word" >&5
3154 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3155 if test "${ac_cv_prog_ETAGS+set}" = set; then
3156 echo $ECHO_N "(cached) $ECHO_C" >&6
3158 if test -n "$ETAGS"; then
3159 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3161 ac_save_IFS=$IFS; IFS=$ac_path_separator
3163 for ac_dir in $ac_dummy; do
3165 test -z "$ac_dir" && ac_dir=.
3166 $as_executable_p "$ac_dir/$ac_word" || continue
3167 ac_cv_prog_ETAGS="$ac_prog"
3168 echo "$as_me:3168: found $ac_dir/$ac_word" >&5
3174 ETAGS=$ac_cv_prog_ETAGS
3175 if test -n "$ETAGS"; then
3176 echo "$as_me:3176: result: $ETAGS" >&5
3177 echo "${ECHO_T}$ETAGS" >&6
3179 echo "$as_me:3179: result: no" >&5
3180 echo "${ECHO_T}no" >&6
3183 test -n "$ETAGS" && break
3186 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3187 set dummy ${CTAGS:-ctags}; ac_word=$2
3188 echo "$as_me:3188: checking for $ac_word" >&5
3189 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3190 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3191 echo $ECHO_N "(cached) $ECHO_C" >&6
3193 if test -n "$MAKE_LOWER_TAGS"; then
3194 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3196 ac_save_IFS=$IFS; IFS=$ac_path_separator
3198 for ac_dir in $ac_dummy; do
3200 test -z "$ac_dir" && ac_dir=.
3201 $as_executable_p "$ac_dir/$ac_word" || continue
3202 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3203 echo "$as_me:3203: found $ac_dir/$ac_word" >&5
3207 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3210 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3211 if test -n "$MAKE_LOWER_TAGS"; then
3212 echo "$as_me:3212: result: $MAKE_LOWER_TAGS" >&5
3213 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3215 echo "$as_me:3215: result: no" >&5
3216 echo "${ECHO_T}no" >&6
3219 if test "$cf_cv_mixedcase" = yes ; then
3220 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3221 set dummy ${ETAGS:-etags}; ac_word=$2
3222 echo "$as_me:3222: checking for $ac_word" >&5
3223 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3224 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3225 echo $ECHO_N "(cached) $ECHO_C" >&6
3227 if test -n "$MAKE_UPPER_TAGS"; then
3228 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3230 ac_save_IFS=$IFS; IFS=$ac_path_separator
3232 for ac_dir in $ac_dummy; do
3234 test -z "$ac_dir" && ac_dir=.
3235 $as_executable_p "$ac_dir/$ac_word" || continue
3236 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3237 echo "$as_me:3237: found $ac_dir/$ac_word" >&5
3241 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3244 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3245 if test -n "$MAKE_UPPER_TAGS"; then
3246 echo "$as_me:3246: result: $MAKE_UPPER_TAGS" >&5
3247 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3249 echo "$as_me:3249: result: no" >&5
3250 echo "${ECHO_T}no" >&6
3257 if test "$MAKE_UPPER_TAGS" = yes ; then
3263 if test "$MAKE_LOWER_TAGS" = yes ; then
3269 echo "$as_me:3269: checking for makeflags variable" >&5
3270 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3271 if test "${cf_cv_makeflags+set}" = set; then
3272 echo $ECHO_N "(cached) $ECHO_C" >&6
3276 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3278 cat >cf_makeflags.tmp <<CF_EOF
3281 @ echo '.$cf_option'
3283 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ ]*$,,'`
3284 case "$cf_result" in
3286 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3287 case "$cf_result" in
3288 (.*CC=*) cf_cv_makeflags=
3290 (*) cf_cv_makeflags=$cf_option
3299 echo "${as_me:-configure}:3299: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3304 rm -f cf_makeflags.tmp
3307 echo "$as_me:3307: result: $cf_cv_makeflags" >&5
3308 echo "${ECHO_T}$cf_cv_makeflags" >&6
3310 if test -n "$ac_tool_prefix"; then
3311 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3312 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3313 echo "$as_me:3313: checking for $ac_word" >&5
3314 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3315 if test "${ac_cv_prog_RANLIB+set}" = set; then
3316 echo $ECHO_N "(cached) $ECHO_C" >&6
3318 if test -n "$RANLIB"; then
3319 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3321 ac_save_IFS=$IFS; IFS=$ac_path_separator
3323 for ac_dir in $ac_dummy; do
3325 test -z "$ac_dir" && ac_dir=.
3326 $as_executable_p "$ac_dir/$ac_word" || continue
3327 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3328 echo "$as_me:3328: found $ac_dir/$ac_word" >&5
3334 RANLIB=$ac_cv_prog_RANLIB
3335 if test -n "$RANLIB"; then
3336 echo "$as_me:3336: result: $RANLIB" >&5
3337 echo "${ECHO_T}$RANLIB" >&6
3339 echo "$as_me:3339: result: no" >&5
3340 echo "${ECHO_T}no" >&6
3344 if test -z "$ac_cv_prog_RANLIB"; then
3345 ac_ct_RANLIB=$RANLIB
3346 # Extract the first word of "ranlib", so it can be a program name with args.
3347 set dummy ranlib; ac_word=$2
3348 echo "$as_me:3348: checking for $ac_word" >&5
3349 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3350 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3351 echo $ECHO_N "(cached) $ECHO_C" >&6
3353 if test -n "$ac_ct_RANLIB"; then
3354 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3356 ac_save_IFS=$IFS; IFS=$ac_path_separator
3358 for ac_dir in $ac_dummy; do
3360 test -z "$ac_dir" && ac_dir=.
3361 $as_executable_p "$ac_dir/$ac_word" || continue
3362 ac_cv_prog_ac_ct_RANLIB="ranlib"
3363 echo "$as_me:3363: found $ac_dir/$ac_word" >&5
3367 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3370 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3371 if test -n "$ac_ct_RANLIB"; then
3372 echo "$as_me:3372: result: $ac_ct_RANLIB" >&5
3373 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3375 echo "$as_me:3375: result: no" >&5
3376 echo "${ECHO_T}no" >&6
3379 RANLIB=$ac_ct_RANLIB
3381 RANLIB="$ac_cv_prog_RANLIB"
3384 if test -n "$ac_tool_prefix"; then
3385 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3386 set dummy ${ac_tool_prefix}ld; ac_word=$2
3387 echo "$as_me:3387: checking for $ac_word" >&5
3388 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3389 if test "${ac_cv_prog_LD+set}" = set; then
3390 echo $ECHO_N "(cached) $ECHO_C" >&6
3392 if test -n "$LD"; then
3393 ac_cv_prog_LD="$LD" # Let the user override the test.
3395 ac_save_IFS=$IFS; IFS=$ac_path_separator
3397 for ac_dir in $ac_dummy; do
3399 test -z "$ac_dir" && ac_dir=.
3400 $as_executable_p "$ac_dir/$ac_word" || continue
3401 ac_cv_prog_LD="${ac_tool_prefix}ld"
3402 echo "$as_me:3402: found $ac_dir/$ac_word" >&5
3409 if test -n "$LD"; then
3410 echo "$as_me:3410: result: $LD" >&5
3411 echo "${ECHO_T}$LD" >&6
3413 echo "$as_me:3413: result: no" >&5
3414 echo "${ECHO_T}no" >&6
3418 if test -z "$ac_cv_prog_LD"; then
3420 # Extract the first word of "ld", so it can be a program name with args.
3421 set dummy ld; ac_word=$2
3422 echo "$as_me:3422: checking for $ac_word" >&5
3423 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3424 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3425 echo $ECHO_N "(cached) $ECHO_C" >&6
3427 if test -n "$ac_ct_LD"; then
3428 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3430 ac_save_IFS=$IFS; IFS=$ac_path_separator
3432 for ac_dir in $ac_dummy; do
3434 test -z "$ac_dir" && ac_dir=.
3435 $as_executable_p "$ac_dir/$ac_word" || continue
3436 ac_cv_prog_ac_ct_LD="ld"
3437 echo "$as_me:3437: found $ac_dir/$ac_word" >&5
3441 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3444 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3445 if test -n "$ac_ct_LD"; then
3446 echo "$as_me:3446: result: $ac_ct_LD" >&5
3447 echo "${ECHO_T}$ac_ct_LD" >&6
3449 echo "$as_me:3449: result: no" >&5
3450 echo "${ECHO_T}no" >&6
3458 if test -n "$ac_tool_prefix"; then
3459 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3460 set dummy ${ac_tool_prefix}ar; ac_word=$2
3461 echo "$as_me:3461: checking for $ac_word" >&5
3462 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3463 if test "${ac_cv_prog_AR+set}" = set; then
3464 echo $ECHO_N "(cached) $ECHO_C" >&6
3466 if test -n "$AR"; then
3467 ac_cv_prog_AR="$AR" # Let the user override the test.
3469 ac_save_IFS=$IFS; IFS=$ac_path_separator
3471 for ac_dir in $ac_dummy; do
3473 test -z "$ac_dir" && ac_dir=.
3474 $as_executable_p "$ac_dir/$ac_word" || continue
3475 ac_cv_prog_AR="${ac_tool_prefix}ar"
3476 echo "$as_me:3476: found $ac_dir/$ac_word" >&5
3483 if test -n "$AR"; then
3484 echo "$as_me:3484: result: $AR" >&5
3485 echo "${ECHO_T}$AR" >&6
3487 echo "$as_me:3487: result: no" >&5
3488 echo "${ECHO_T}no" >&6
3492 if test -z "$ac_cv_prog_AR"; then
3494 # Extract the first word of "ar", so it can be a program name with args.
3495 set dummy ar; ac_word=$2
3496 echo "$as_me:3496: checking for $ac_word" >&5
3497 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3498 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3499 echo $ECHO_N "(cached) $ECHO_C" >&6
3501 if test -n "$ac_ct_AR"; then
3502 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3504 ac_save_IFS=$IFS; IFS=$ac_path_separator
3506 for ac_dir in $ac_dummy; do
3508 test -z "$ac_dir" && ac_dir=.
3509 $as_executable_p "$ac_dir/$ac_word" || continue
3510 ac_cv_prog_ac_ct_AR="ar"
3511 echo "$as_me:3511: found $ac_dir/$ac_word" >&5
3515 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3518 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3519 if test -n "$ac_ct_AR"; then
3520 echo "$as_me:3520: result: $ac_ct_AR" >&5
3521 echo "${ECHO_T}$ac_ct_AR" >&6
3523 echo "$as_me:3523: result: no" >&5
3524 echo "${ECHO_T}no" >&6
3532 if test -n "$ac_tool_prefix"; then
3533 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3534 set dummy ${ac_tool_prefix}ar; ac_word=$2
3535 echo "$as_me:3535: checking for $ac_word" >&5
3536 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3537 if test "${ac_cv_prog_AR+set}" = set; then
3538 echo $ECHO_N "(cached) $ECHO_C" >&6
3540 if test -n "$AR"; then
3541 ac_cv_prog_AR="$AR" # Let the user override the test.
3543 ac_save_IFS=$IFS; IFS=$ac_path_separator
3545 for ac_dir in $ac_dummy; do
3547 test -z "$ac_dir" && ac_dir=.
3548 $as_executable_p "$ac_dir/$ac_word" || continue
3549 ac_cv_prog_AR="${ac_tool_prefix}ar"
3550 echo "$as_me:3550: found $ac_dir/$ac_word" >&5
3557 if test -n "$AR"; then
3558 echo "$as_me:3558: result: $AR" >&5
3559 echo "${ECHO_T}$AR" >&6
3561 echo "$as_me:3561: result: no" >&5
3562 echo "${ECHO_T}no" >&6
3566 if test -z "$ac_cv_prog_AR"; then
3568 # Extract the first word of "ar", so it can be a program name with args.
3569 set dummy ar; ac_word=$2
3570 echo "$as_me:3570: checking for $ac_word" >&5
3571 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3572 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3573 echo $ECHO_N "(cached) $ECHO_C" >&6
3575 if test -n "$ac_ct_AR"; then
3576 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3578 ac_save_IFS=$IFS; IFS=$ac_path_separator
3580 for ac_dir in $ac_dummy; do
3582 test -z "$ac_dir" && ac_dir=.
3583 $as_executable_p "$ac_dir/$ac_word" || continue
3584 ac_cv_prog_ac_ct_AR="ar"
3585 echo "$as_me:3585: found $ac_dir/$ac_word" >&5
3589 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3592 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3593 if test -n "$ac_ct_AR"; then
3594 echo "$as_me:3594: result: $ac_ct_AR" >&5
3595 echo "${ECHO_T}$ac_ct_AR" >&6
3597 echo "$as_me:3597: result: no" >&5
3598 echo "${ECHO_T}no" >&6
3606 echo "$as_me:3606: checking for options to update archives" >&5
3607 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3608 if test "${cf_cv_ar_flags+set}" = set; then
3609 echo $ECHO_N "(cached) $ECHO_C" >&6
3612 cf_cv_ar_flags=unknown
3613 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
3616 # check if $ARFLAGS already contains this choice
3617 if test "x$ARFLAGS" != "x" ; then
3618 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3619 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3625 rm -f conftest.$ac_cv_objext
3628 cat >conftest.$ac_ext <<EOF
3629 #line 3629 "configure"
3630 int testdata[3] = { 123, 456, 789 };
3632 if { (eval echo "$as_me:3632: \"$ac_compile\"") >&5
3633 (eval $ac_compile) 2>&5
3635 echo "$as_me:3635: \$? = $ac_status" >&5
3636 (exit $ac_status); } ; then
3637 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3638 $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3639 if test -f conftest.a ; then
3640 cf_cv_ar_flags=$cf_ar_flags
3644 test -n "$verbose" && echo " cannot compile test-program" 1>&6
3646 echo "${as_me:-configure}:3646: testing cannot compile test-program ..." 1>&5
3651 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3654 echo "$as_me:3654: result: $cf_cv_ar_flags" >&5
3655 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3657 if test -n "$ARFLAGS" ; then
3658 if test -n "$cf_cv_ar_flags" ; then
3659 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3662 ARFLAGS=$cf_cv_ar_flags
3665 echo "$as_me:3665: checking for PATH separator" >&5
3666 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
3667 case $cf_cv_system_name in
3668 (os2*) PATH_SEPARATOR=';' ;;
3669 (*) ${PATH_SEPARATOR:=':'} ;;
3672 echo "$as_me:3672: result: $PATH_SEPARATOR" >&5
3673 echo "${ECHO_T}$PATH_SEPARATOR" >&6
3675 echo "$as_me:3675: checking if you have specified an install-prefix" >&5
3676 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3678 # Check whether --with-install-prefix or --without-install-prefix was given.
3679 if test "${with_install_prefix+set}" = set; then
3680 withval="$with_install_prefix"
3684 (*) DESTDIR="$withval"
3688 echo "$as_me:3688: result: $DESTDIR" >&5
3689 echo "${ECHO_T}$DESTDIR" >&6
3691 ###############################################################################
3693 # If we're cross-compiling, allow the user to override the tools and their
3694 # options. The configure script is oriented toward identifying the host
3695 # compiler, etc., but we need a build compiler to generate parts of the source.
3697 if test "$cross_compiling" = yes ; then
3699 # defaults that we might want to override
3700 : ${BUILD_CFLAGS:=''}
3701 : ${BUILD_CPPFLAGS:=''}
3702 : ${BUILD_LDFLAGS:=''}
3704 : ${BUILD_EXEEXT:='$x'}
3705 : ${BUILD_OBJEXT:='o'}
3707 # Check whether --with-build-cc or --without-build-cc was given.
3708 if test "${with_build_cc+set}" = set; then
3709 withval="$with_build_cc"
3712 for ac_prog in gcc clang c99 c89 cc cl
3714 # Extract the first word of "$ac_prog", so it can be a program name with args.
3715 set dummy $ac_prog; ac_word=$2
3716 echo "$as_me:3716: checking for $ac_word" >&5
3717 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3718 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3719 echo $ECHO_N "(cached) $ECHO_C" >&6
3721 if test -n "$BUILD_CC"; then
3722 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3724 ac_save_IFS=$IFS; IFS=$ac_path_separator
3726 for ac_dir in $ac_dummy; do
3728 test -z "$ac_dir" && ac_dir=.
3729 $as_executable_p "$ac_dir/$ac_word" || continue
3730 ac_cv_prog_BUILD_CC="$ac_prog"
3731 echo "$as_me:3731: found $ac_dir/$ac_word" >&5
3737 BUILD_CC=$ac_cv_prog_BUILD_CC
3738 if test -n "$BUILD_CC"; then
3739 echo "$as_me:3739: result: $BUILD_CC" >&5
3740 echo "${ECHO_T}$BUILD_CC" >&6
3742 echo "$as_me:3742: result: no" >&5
3743 echo "${ECHO_T}no" >&6
3746 test -n "$BUILD_CC" && break
3748 test -n "$BUILD_CC" || BUILD_CC="none"
3751 echo "$as_me:3751: checking for native build C compiler" >&5
3752 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3753 echo "$as_me:3753: result: $BUILD_CC" >&5
3754 echo "${ECHO_T}$BUILD_CC" >&6
3756 echo "$as_me:3756: checking for native build C preprocessor" >&5
3757 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3759 # Check whether --with-build-cpp or --without-build-cpp was given.
3760 if test "${with_build_cpp+set}" = set; then
3761 withval="$with_build_cpp"
3762 BUILD_CPP="$withval"
3764 BUILD_CPP='${BUILD_CC} -E'
3766 echo "$as_me:3766: result: $BUILD_CPP" >&5
3767 echo "${ECHO_T}$BUILD_CPP" >&6
3769 echo "$as_me:3769: checking for native build C flags" >&5
3770 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3772 # Check whether --with-build-cflags or --without-build-cflags was given.
3773 if test "${with_build_cflags+set}" = set; then
3774 withval="$with_build_cflags"
3775 BUILD_CFLAGS="$withval"
3777 echo "$as_me:3777: result: $BUILD_CFLAGS" >&5
3778 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3780 echo "$as_me:3780: checking for native build C preprocessor-flags" >&5
3781 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3783 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3784 if test "${with_build_cppflags+set}" = set; then
3785 withval="$with_build_cppflags"
3786 BUILD_CPPFLAGS="$withval"
3788 echo "$as_me:3788: result: $BUILD_CPPFLAGS" >&5
3789 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3791 echo "$as_me:3791: checking for native build linker-flags" >&5
3792 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3794 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3795 if test "${with_build_ldflags+set}" = set; then
3796 withval="$with_build_ldflags"
3797 BUILD_LDFLAGS="$withval"
3799 echo "$as_me:3799: result: $BUILD_LDFLAGS" >&5
3800 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3802 echo "$as_me:3802: checking for native build linker-libraries" >&5
3803 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3805 # Check whether --with-build-libs or --without-build-libs was given.
3806 if test "${with_build_libs+set}" = set; then
3807 withval="$with_build_libs"
3808 BUILD_LIBS="$withval"
3810 echo "$as_me:3810: result: $BUILD_LIBS" >&5
3811 echo "${ECHO_T}$BUILD_LIBS" >&6
3813 # this assumes we're on Unix.
3817 : ${BUILD_CC:='${CC}'}
3819 if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3820 { { echo "$as_me:3820: error: Cross-build requires two compilers.
3821 Use --with-build-cc to specify the native compiler." >&5
3822 echo "$as_me: error: Cross-build requires two compilers.
3823 Use --with-build-cc to specify the native compiler." >&2;}
3824 { (exit 1); exit 1; }; }
3828 : ${BUILD_CC:='${CC}'}
3829 : ${BUILD_CPP:='${CPP}'}
3830 : ${BUILD_CFLAGS:='${CFLAGS}'}
3831 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3832 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3833 : ${BUILD_LIBS:='${LIBS}'}
3834 : ${BUILD_EXEEXT:='$x'}
3835 : ${BUILD_OBJEXT:='o'}
3838 ###############################################################################
3840 ### Options to allow the user to specify the set of libraries which are used.
3841 ### Use "--without-normal --with-shared" to allow the default model to be
3842 ### shared, for example.
3845 echo "$as_me:3845: checking if you want to build shared C-objects" >&5
3846 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
3848 # Check whether --with-shared or --without-shared was given.
3849 if test "${with_shared+set}" = set; then
3850 withval="$with_shared"
3851 with_shared=$withval
3855 echo "$as_me:3855: result: $with_shared" >&5
3856 echo "${ECHO_T}$with_shared" >&6
3857 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
3859 echo "$as_me:3859: checking for specified models" >&5
3860 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3861 test -z "$cf_list_models" && cf_list_models=normal
3862 echo "$as_me:3862: result: $cf_list_models" >&5
3863 echo "${ECHO_T}$cf_list_models" >&6
3865 ### Use the first model as the default, and save its suffix for use in building
3866 ### up test-applications.
3867 echo "$as_me:3867: checking for default model" >&5
3868 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3869 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3870 echo "$as_me:3870: result: $DFT_LWR_MODEL" >&5
3871 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3873 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3875 echo "$as_me:3875: checking for specific curses-directory" >&5
3876 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
3878 # Check whether --with-curses-dir or --without-curses-dir was given.
3879 if test "${with_curses_dir+set}" = set; then
3880 withval="$with_curses_dir"
3881 cf_cv_curses_dir=$withval
3885 echo "$as_me:3885: result: $cf_cv_curses_dir" >&5
3886 echo "${ECHO_T}$cf_cv_curses_dir" >&6
3888 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3891 if test "x$prefix" != xNONE; then
3892 cf_path_syntax="$prefix"
3894 cf_path_syntax="$ac_default_prefix"
3902 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3904 (.\${*prefix}*|.\${*dir}*)
3905 eval withval="$withval"
3908 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3913 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3916 { { echo "$as_me:3916: error: expected a pathname, not \"$withval\"" >&5
3917 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3918 { (exit 1); exit 1; }; }
3922 if test -d "$cf_cv_curses_dir"
3925 if test -n "$cf_cv_curses_dir/include" ; then
3926 for cf_add_incdir in $cf_cv_curses_dir/include
3928 while test $cf_add_incdir != /usr/include
3930 if test -d $cf_add_incdir
3933 if test -n "$CFLAGS$CPPFLAGS" ; then
3934 # a loop is needed to ensure we can add subdirs of existing dirs
3935 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3936 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3937 cf_have_incdir=yes; break
3942 if test "$cf_have_incdir" = no ; then
3943 if test "$cf_add_incdir" = /usr/local/include ; then
3944 if test "$GCC" = yes
3946 cf_save_CPPFLAGS=$CPPFLAGS
3948 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3949 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
3951 cat >conftest.$ac_ext <<_ACEOF
3952 #line 3952 "configure"
3953 #include "confdefs.h"
3963 rm -f conftest.$ac_objext
3964 if { (eval echo "$as_me:3964: \"$ac_compile\"") >&5
3965 (eval $ac_compile) 2>&5
3967 echo "$as_me:3967: \$? = $ac_status" >&5
3968 (exit $ac_status); } &&
3969 { ac_try='test -s conftest.$ac_objext'
3970 { (eval echo "$as_me:3970: \"$ac_try\"") >&5
3973 echo "$as_me:3973: \$? = $ac_status" >&5
3974 (exit $ac_status); }; }; then
3977 echo "$as_me: failed program was:" >&5
3978 cat conftest.$ac_ext >&5
3981 rm -f conftest.$ac_objext conftest.$ac_ext
3982 CPPFLAGS=$cf_save_CPPFLAGS
3987 if test "$cf_have_incdir" = no ; then
3988 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3990 echo "${as_me:-configure}:3990: testing adding $cf_add_incdir to include-path ..." 1>&5
3992 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3994 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3995 test "$cf_top_incdir" = "$cf_add_incdir" && break
3996 cf_add_incdir="$cf_top_incdir"
4007 if test -n "$cf_cv_curses_dir/lib" ; then
4008 for cf_add_libdir in $cf_cv_curses_dir/lib
4010 if test $cf_add_libdir = /usr/lib ; then
4012 elif test -d $cf_add_libdir
4015 if test -n "$LDFLAGS$LIBS" ; then
4016 # a loop is needed to ensure we can add subdirs of existing dirs
4017 for cf_test_libdir in $LDFLAGS $LIBS ; do
4018 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4019 cf_have_libdir=yes; break
4023 if test "$cf_have_libdir" = no ; then
4024 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4026 echo "${as_me:-configure}:4026: testing adding $cf_add_libdir to library-path ..." 1>&5
4028 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4037 cf_ncuconfig_root=ncurses
4038 cf_have_ncuconfig=no
4040 if test "x${PKG_CONFIG:=none}" != xnone; then
4041 echo "$as_me:4041: checking pkg-config for $cf_ncuconfig_root" >&5
4042 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
4043 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
4044 echo "$as_me:4044: result: yes" >&5
4045 echo "${ECHO_T}yes" >&6
4047 echo "$as_me:4047: checking if the $cf_ncuconfig_root package files work" >&5
4048 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
4049 cf_have_ncuconfig=unknown
4051 cf_save_CPPFLAGS="$CPPFLAGS"
4052 cf_save_LIBS="$LIBS"
4057 cf_new_extra_cppflags=
4059 for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
4061 case $cf_fix_cppflags in
4063 case $cf_add_cflags in
4064 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4065 case $cf_add_cflags in
4067 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4069 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4070 && test -z "${cf_tst_cflags}" \
4071 && cf_fix_cppflags=yes
4073 if test $cf_fix_cppflags = yes ; then
4075 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4076 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4079 elif test "${cf_tst_cflags}" = "\"'" ; then
4081 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4082 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4092 case $cf_add_cflags in
4094 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4096 CPPFLAGS=`echo "$CPPFLAGS" | \
4097 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4098 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4103 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4104 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4111 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4112 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4119 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4120 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4122 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4124 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4125 && test -z "${cf_tst_cflags}" \
4126 && cf_fix_cppflags=no
4131 if test -n "$cf_new_cflags" ; then
4133 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4134 CFLAGS="${CFLAGS}$cf_new_cflags"
4138 if test -n "$cf_new_cppflags" ; then
4140 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4141 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4145 if test -n "$cf_new_extra_cppflags" ; then
4147 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4148 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4152 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
4153 # Filter out duplicates - this happens with badly-designed ".pc" files...
4154 for cf_add_1lib in $LIBS
4156 for cf_add_2lib in $cf_add_libs
4158 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4164 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4168 cat >conftest.$ac_ext <<_ACEOF
4169 #line 4169 "configure"
4170 #include "confdefs.h"
4171 #include <${cf_cv_ncurses_header:-curses.h}>
4175 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
4180 rm -f conftest.$ac_objext conftest$ac_exeext
4181 if { (eval echo "$as_me:4181: \"$ac_link\"") >&5
4182 (eval $ac_link) 2>&5
4184 echo "$as_me:4184: \$? = $ac_status" >&5
4185 (exit $ac_status); } &&
4186 { ac_try='test -s conftest$ac_exeext'
4187 { (eval echo "$as_me:4187: \"$ac_try\"") >&5
4190 echo "$as_me:4190: \$? = $ac_status" >&5
4191 (exit $ac_status); }; }; then
4192 if test "$cross_compiling" = yes; then
4193 cf_have_ncuconfig=maybe
4195 cat >conftest.$ac_ext <<_ACEOF
4196 #line 4196 "configure"
4197 #include "confdefs.h"
4198 #include <${cf_cv_ncurses_header:-curses.h}>
4200 { char *xx = curses_version(); return (xx == 0); }
4202 rm -f conftest$ac_exeext
4203 if { (eval echo "$as_me:4203: \"$ac_link\"") >&5
4204 (eval $ac_link) 2>&5
4206 echo "$as_me:4206: \$? = $ac_status" >&5
4207 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4208 { (eval echo "$as_me:4208: \"$ac_try\"") >&5
4211 echo "$as_me:4211: \$? = $ac_status" >&5
4212 (exit $ac_status); }; }; then
4213 cf_have_ncuconfig=yes
4215 echo "$as_me: program exited with status $ac_status" >&5
4216 echo "$as_me: failed program was:" >&5
4217 cat conftest.$ac_ext >&5
4218 cf_have_ncuconfig=no
4220 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4223 echo "$as_me: failed program was:" >&5
4224 cat conftest.$ac_ext >&5
4225 cf_have_ncuconfig=no
4227 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4228 echo "$as_me:4228: result: $cf_have_ncuconfig" >&5
4229 echo "${ECHO_T}$cf_have_ncuconfig" >&6
4230 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
4231 if test "$cf_have_ncuconfig" != "yes"
4233 CPPFLAGS="$cf_save_CPPFLAGS"
4234 LIBS="$cf_save_LIBS"
4235 NCURSES_CONFIG_PKG=none
4238 cat >>confdefs.h <<\EOF
4242 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
4244 echo "$as_me:4244: checking for terminfo header" >&5
4245 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4246 if test "${cf_cv_term_header+set}" = set; then
4247 echo $ECHO_N "(cached) $ECHO_C" >&6
4250 case ${cf_cv_ncurses_header} in
4251 (*/ncurses.h|*/ncursesw.h)
4252 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4255 cf_term_header=term.h
4259 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4261 cat >conftest.$ac_ext <<_ACEOF
4262 #line 4262 "configure"
4263 #include "confdefs.h"
4265 #include <${cf_cv_ncurses_header:-curses.h}>
4271 int x = auto_left_margin
4276 rm -f conftest.$ac_objext
4277 if { (eval echo "$as_me:4277: \"$ac_compile\"") >&5
4278 (eval $ac_compile) 2>&5
4280 echo "$as_me:4280: \$? = $ac_status" >&5
4281 (exit $ac_status); } &&
4282 { ac_try='test -s conftest.$ac_objext'
4283 { (eval echo "$as_me:4283: \"$ac_try\"") >&5
4286 echo "$as_me:4286: \$? = $ac_status" >&5
4287 (exit $ac_status); }; }; then
4289 cf_cv_term_header="$cf_test"
4291 echo "$as_me: failed program was:" >&5
4292 cat conftest.$ac_ext >&5
4294 cf_cv_term_header=unknown
4297 rm -f conftest.$ac_objext conftest.$ac_ext
4298 test "$cf_cv_term_header" != unknown && break
4302 echo "$as_me:4302: result: $cf_cv_term_header" >&5
4303 echo "${ECHO_T}$cf_cv_term_header" >&6
4305 # Set definitions to allow ifdef'ing to accommodate subdirectories
4307 case $cf_cv_term_header in
4310 cat >>confdefs.h <<\EOF
4311 #define HAVE_TERM_H 1
4317 case $cf_cv_term_header in
4320 cat >>confdefs.h <<\EOF
4321 #define HAVE_NCURSES_TERM_H 1
4327 cat >>confdefs.h <<\EOF
4328 #define HAVE_NCURSESW_TERM_H 1
4337 echo "$as_me:4337: result: no" >&5
4338 echo "${ECHO_T}no" >&6
4339 NCURSES_CONFIG_PKG=none
4342 NCURSES_CONFIG_PKG=none
4345 if test "x$cf_have_ncuconfig" = "xno"; then
4346 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
4348 if test -n "$ac_tool_prefix"; then
4349 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4351 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4352 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4353 echo "$as_me:4353: checking for $ac_word" >&5
4354 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4355 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
4356 echo $ECHO_N "(cached) $ECHO_C" >&6
4358 if test -n "$NCURSES_CONFIG"; then
4359 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
4361 ac_save_IFS=$IFS; IFS=$ac_path_separator
4363 for ac_dir in $ac_dummy; do
4365 test -z "$ac_dir" && ac_dir=.
4366 $as_executable_p "$ac_dir/$ac_word" || continue
4367 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
4368 echo "$as_me:4368: found $ac_dir/$ac_word" >&5
4374 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
4375 if test -n "$NCURSES_CONFIG"; then
4376 echo "$as_me:4376: result: $NCURSES_CONFIG" >&5
4377 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4379 echo "$as_me:4379: result: no" >&5
4380 echo "${ECHO_T}no" >&6
4383 test -n "$NCURSES_CONFIG" && break
4386 if test -z "$NCURSES_CONFIG"; then
4387 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
4388 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4390 # Extract the first word of "$ac_prog", so it can be a program name with args.
4391 set dummy $ac_prog; ac_word=$2
4392 echo "$as_me:4392: checking for $ac_word" >&5
4393 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4394 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
4395 echo $ECHO_N "(cached) $ECHO_C" >&6
4397 if test -n "$ac_ct_NCURSES_CONFIG"; then
4398 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
4400 ac_save_IFS=$IFS; IFS=$ac_path_separator
4402 for ac_dir in $ac_dummy; do
4404 test -z "$ac_dir" && ac_dir=.
4405 $as_executable_p "$ac_dir/$ac_word" || continue
4406 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
4407 echo "$as_me:4407: found $ac_dir/$ac_word" >&5
4413 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
4414 if test -n "$ac_ct_NCURSES_CONFIG"; then
4415 echo "$as_me:4415: result: $ac_ct_NCURSES_CONFIG" >&5
4416 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
4418 echo "$as_me:4418: result: no" >&5
4419 echo "${ECHO_T}no" >&6
4422 test -n "$ac_ct_NCURSES_CONFIG" && break
4424 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
4426 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
4429 if test "$NCURSES_CONFIG" != none ; then
4434 cf_new_extra_cppflags=
4436 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
4438 case $cf_fix_cppflags in
4440 case $cf_add_cflags in
4441 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4442 case $cf_add_cflags in
4444 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4446 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4447 && test -z "${cf_tst_cflags}" \
4448 && cf_fix_cppflags=yes
4450 if test $cf_fix_cppflags = yes ; then
4452 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4453 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4456 elif test "${cf_tst_cflags}" = "\"'" ; then
4458 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4459 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4469 case $cf_add_cflags in
4471 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4473 CPPFLAGS=`echo "$CPPFLAGS" | \
4474 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4475 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4480 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4481 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4488 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4489 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4496 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4497 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4499 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4501 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4502 && test -z "${cf_tst_cflags}" \
4503 && cf_fix_cppflags=no
4508 if test -n "$cf_new_cflags" ; then
4510 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4511 CFLAGS="${CFLAGS}$cf_new_cflags"
4515 if test -n "$cf_new_cppflags" ; then
4517 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4518 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4522 if test -n "$cf_new_extra_cppflags" ; then
4524 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4525 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4529 cf_add_libs="`$NCURSES_CONFIG --libs`"
4530 # Filter out duplicates - this happens with badly-designed ".pc" files...
4531 for cf_add_1lib in $LIBS
4533 for cf_add_2lib in $cf_add_libs
4535 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4541 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4545 # even with config script, some packages use no-override for curses.h
4547 echo "$as_me:4547: checking if we have identified curses headers" >&5
4548 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4549 if test "${cf_cv_ncurses_header+set}" = set; then
4550 echo $ECHO_N "(cached) $ECHO_C" >&6
4553 cf_cv_ncurses_header=none
4555 ncurses.h ncurses/ncurses.h \
4556 curses.h ncurses/curses.h
4558 cat >conftest.$ac_ext <<_ACEOF
4559 #line 4559 "configure"
4560 #include "confdefs.h"
4561 #include <${cf_header}>
4565 initscr(); tgoto("?", 0,0)
4570 rm -f conftest.$ac_objext
4571 if { (eval echo "$as_me:4571: \"$ac_compile\"") >&5
4572 (eval $ac_compile) 2>&5
4574 echo "$as_me:4574: \$? = $ac_status" >&5
4575 (exit $ac_status); } &&
4576 { ac_try='test -s conftest.$ac_objext'
4577 { (eval echo "$as_me:4577: \"$ac_try\"") >&5
4580 echo "$as_me:4580: \$? = $ac_status" >&5
4581 (exit $ac_status); }; }; then
4582 cf_cv_ncurses_header=$cf_header; break
4584 echo "$as_me: failed program was:" >&5
4585 cat conftest.$ac_ext >&5
4587 rm -f conftest.$ac_objext conftest.$ac_ext
4591 echo "$as_me:4591: result: $cf_cv_ncurses_header" >&5
4592 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4594 if test "$cf_cv_ncurses_header" = none ; then
4595 { { echo "$as_me:4595: error: No curses header-files found" >&5
4596 echo "$as_me: error: No curses header-files found" >&2;}
4597 { (exit 1); exit 1; }; }
4600 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4602 for ac_header in $cf_cv_ncurses_header
4604 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4605 echo "$as_me:4605: checking for $ac_header" >&5
4606 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4607 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4608 echo $ECHO_N "(cached) $ECHO_C" >&6
4610 cat >conftest.$ac_ext <<_ACEOF
4611 #line 4611 "configure"
4612 #include "confdefs.h"
4613 #include <$ac_header>
4615 if { (eval echo "$as_me:4615: \"$ac_cpp conftest.$ac_ext\"") >&5
4616 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4618 egrep -v '^ *\+' conftest.er1 >conftest.err
4620 cat conftest.err >&5
4621 echo "$as_me:4621: \$? = $ac_status" >&5
4622 (exit $ac_status); } >/dev/null; then
4623 if test -s conftest.err; then
4624 ac_cpp_err=$ac_c_preproc_warn_flag
4631 if test -z "$ac_cpp_err"; then
4632 eval "$as_ac_Header=yes"
4634 echo "$as_me: failed program was:" >&5
4635 cat conftest.$ac_ext >&5
4636 eval "$as_ac_Header=no"
4638 rm -f conftest.err conftest.$ac_ext
4640 echo "$as_me:4640: result: `eval echo '${'$as_ac_Header'}'`" >&5
4641 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4642 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4643 cat >>confdefs.h <<EOF
4644 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4650 cat >>confdefs.h <<\EOF
4654 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4656 cat >>confdefs.h <<EOF
4657 #define $cf_nculib_ROOT 1
4660 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4664 cf_ncuhdr_root=ncurses
4666 test -n "$cf_cv_curses_dir" && \
4667 test "$cf_cv_curses_dir" != "no" && { \
4669 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4670 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4672 while test $cf_add_incdir != /usr/include
4674 if test -d $cf_add_incdir
4677 if test -n "$CFLAGS$CPPFLAGS" ; then
4678 # a loop is needed to ensure we can add subdirs of existing dirs
4679 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4680 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4681 cf_have_incdir=yes; break
4686 if test "$cf_have_incdir" = no ; then
4687 if test "$cf_add_incdir" = /usr/local/include ; then
4688 if test "$GCC" = yes
4690 cf_save_CPPFLAGS=$CPPFLAGS
4692 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4693 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4695 cat >conftest.$ac_ext <<_ACEOF
4696 #line 4696 "configure"
4697 #include "confdefs.h"
4707 rm -f conftest.$ac_objext
4708 if { (eval echo "$as_me:4708: \"$ac_compile\"") >&5
4709 (eval $ac_compile) 2>&5
4711 echo "$as_me:4711: \$? = $ac_status" >&5
4712 (exit $ac_status); } &&
4713 { ac_try='test -s conftest.$ac_objext'
4714 { (eval echo "$as_me:4714: \"$ac_try\"") >&5
4717 echo "$as_me:4717: \$? = $ac_status" >&5
4718 (exit $ac_status); }; }; then
4721 echo "$as_me: failed program was:" >&5
4722 cat conftest.$ac_ext >&5
4725 rm -f conftest.$ac_objext conftest.$ac_ext
4726 CPPFLAGS=$cf_save_CPPFLAGS
4731 if test "$cf_have_incdir" = no ; then
4732 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4734 echo "${as_me:-configure}:4734: testing adding $cf_add_incdir to include-path ..." 1>&5
4736 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4738 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4739 test "$cf_top_incdir" = "$cf_add_incdir" && break
4740 cf_add_incdir="$cf_top_incdir"
4753 echo "$as_me:4753: checking for $cf_ncuhdr_root header in include-path" >&5
4754 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4755 if test "${cf_cv_ncurses_h+set}" = set; then
4756 echo $ECHO_N "(cached) $ECHO_C" >&6
4759 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4760 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4761 for cf_header in $cf_header_list
4764 cat >conftest.$ac_ext <<_ACEOF
4765 #line 4765 "configure"
4766 #include "confdefs.h"
4768 #include <$cf_header>
4773 #ifdef NCURSES_VERSION
4775 printf("%s\n", NCURSES_VERSION);
4788 rm -f conftest.$ac_objext
4789 if { (eval echo "$as_me:4789: \"$ac_compile\"") >&5
4790 (eval $ac_compile) 2>&5
4792 echo "$as_me:4792: \$? = $ac_status" >&5
4793 (exit $ac_status); } &&
4794 { ac_try='test -s conftest.$ac_objext'
4795 { (eval echo "$as_me:4795: \"$ac_try\"") >&5
4798 echo "$as_me:4798: \$? = $ac_status" >&5
4799 (exit $ac_status); }; }; then
4800 cf_cv_ncurses_h=$cf_header
4803 echo "$as_me: failed program was:" >&5
4804 cat conftest.$ac_ext >&5
4807 rm -f conftest.$ac_objext conftest.$ac_ext
4809 test "$cf_cv_ncurses_h" != no && break
4813 echo "$as_me:4813: result: $cf_cv_ncurses_h" >&5
4814 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4816 if test "$cf_cv_ncurses_h" != no ; then
4817 cf_cv_ncurses_header=$cf_cv_ncurses_h
4820 echo "$as_me:4820: checking for $cf_ncuhdr_root include-path" >&5
4821 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4822 if test "${cf_cv_ncurses_h2+set}" = set; then
4823 echo $ECHO_N "(cached) $ECHO_C" >&6
4826 test -n "$verbose" && echo
4830 # collect the current set of include-directories from compiler flags
4831 cf_header_path_list=""
4832 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4833 for cf_header_path in $CPPFLAGS $CFLAGS
4835 case $cf_header_path in
4837 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4839 test "x$cf_header_path" != "xNONE" && \
4840 test -d "$cf_header_path" && \
4842 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
4843 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
4844 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4845 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4846 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4847 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"
4850 cf_header_path_list="$cf_header_path_list $cf_search"
4856 # add the variations for the package we are looking for
4860 test "x$prefix" != "xNONE" && \
4861 test -d "$prefix" && \
4863 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
4864 test -d $prefix/include && cf_search="$cf_search $prefix/include"
4865 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4866 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4867 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4868 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4871 for cf_subdir_prefix in \
4880 test "x$cf_subdir_prefix" != "x$prefix" && \
4881 test -d "$cf_subdir_prefix" && \
4882 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
4883 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
4884 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
4885 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
4886 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
4887 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
4888 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"
4893 test "$includedir" != NONE && \
4894 test "$includedir" != "/usr/include" && \
4895 test -d "$includedir" && {
4896 test -d $includedir && cf_search="$cf_search $includedir"
4897 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4900 test "$oldincludedir" != NONE && \
4901 test "$oldincludedir" != "/usr/include" && \
4902 test -d "$oldincludedir" && {
4903 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
4904 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4907 cf_search="$cf_search $cf_header_path_list"
4909 test -n "$verbose" && echo search path $cf_search
4910 cf_save2_CPPFLAGS="$CPPFLAGS"
4911 for cf_incdir in $cf_search
4914 if test -n "$cf_incdir" ; then
4915 for cf_add_incdir in $cf_incdir
4917 while test $cf_add_incdir != /usr/include
4919 if test -d $cf_add_incdir
4922 if test -n "$CFLAGS$CPPFLAGS" ; then
4923 # a loop is needed to ensure we can add subdirs of existing dirs
4924 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4925 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4926 cf_have_incdir=yes; break
4931 if test "$cf_have_incdir" = no ; then
4932 if test "$cf_add_incdir" = /usr/local/include ; then
4933 if test "$GCC" = yes
4935 cf_save_CPPFLAGS=$CPPFLAGS
4937 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4938 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4940 cat >conftest.$ac_ext <<_ACEOF
4941 #line 4941 "configure"
4942 #include "confdefs.h"
4952 rm -f conftest.$ac_objext
4953 if { (eval echo "$as_me:4953: \"$ac_compile\"") >&5
4954 (eval $ac_compile) 2>&5
4956 echo "$as_me:4956: \$? = $ac_status" >&5
4957 (exit $ac_status); } &&
4958 { ac_try='test -s conftest.$ac_objext'
4959 { (eval echo "$as_me:4959: \"$ac_try\"") >&5
4962 echo "$as_me:4962: \$? = $ac_status" >&5
4963 (exit $ac_status); }; }; then
4966 echo "$as_me: failed program was:" >&5
4967 cat conftest.$ac_ext >&5
4970 rm -f conftest.$ac_objext conftest.$ac_ext
4971 CPPFLAGS=$cf_save_CPPFLAGS
4976 if test "$cf_have_incdir" = no ; then
4977 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4979 echo "${as_me:-configure}:4979: testing adding $cf_add_incdir to include-path ..." 1>&5
4981 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4983 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4984 test "$cf_top_incdir" = "$cf_add_incdir" && break
4985 cf_add_incdir="$cf_top_incdir"
5001 cat >conftest.$ac_ext <<_ACEOF
5002 #line 5002 "configure"
5003 #include "confdefs.h"
5005 #include <$cf_header>
5010 #ifdef NCURSES_VERSION
5012 printf("%s\n", NCURSES_VERSION);
5025 rm -f conftest.$ac_objext
5026 if { (eval echo "$as_me:5026: \"$ac_compile\"") >&5
5027 (eval $ac_compile) 2>&5
5029 echo "$as_me:5029: \$? = $ac_status" >&5
5030 (exit $ac_status); } &&
5031 { ac_try='test -s conftest.$ac_objext'
5032 { (eval echo "$as_me:5032: \"$ac_try\"") >&5
5035 echo "$as_me:5035: \$? = $ac_status" >&5
5036 (exit $ac_status); }; }; then
5037 cf_cv_ncurses_h2=$cf_header
5040 echo "$as_me: failed program was:" >&5
5041 cat conftest.$ac_ext >&5
5044 rm -f conftest.$ac_objext conftest.$ac_ext
5046 if test "$cf_cv_ncurses_h2" != no ; then
5047 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5048 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
5051 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5053 CPPFLAGS="$cf_save2_CPPFLAGS"
5054 test "$cf_cv_ncurses_h2" != no && break
5056 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5056: error: not found" >&5
5057 echo "$as_me: error: not found" >&2;}
5058 { (exit 1); exit 1; }; }
5061 echo "$as_me:5061: result: $cf_cv_ncurses_h2" >&5
5062 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5064 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
5065 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
5066 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
5067 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
5070 if test -n "$cf_1st_incdir" ; then
5071 for cf_add_incdir in $cf_1st_incdir
5073 while test $cf_add_incdir != /usr/include
5075 if test -d $cf_add_incdir
5078 if test -n "$CFLAGS$CPPFLAGS" ; then
5079 # a loop is needed to ensure we can add subdirs of existing dirs
5080 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5081 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5082 cf_have_incdir=yes; break
5087 if test "$cf_have_incdir" = no ; then
5088 if test "$cf_add_incdir" = /usr/local/include ; then
5089 if test "$GCC" = yes
5091 cf_save_CPPFLAGS=$CPPFLAGS
5093 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5094 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5096 cat >conftest.$ac_ext <<_ACEOF
5097 #line 5097 "configure"
5098 #include "confdefs.h"
5108 rm -f conftest.$ac_objext
5109 if { (eval echo "$as_me:5109: \"$ac_compile\"") >&5
5110 (eval $ac_compile) 2>&5
5112 echo "$as_me:5112: \$? = $ac_status" >&5
5113 (exit $ac_status); } &&
5114 { ac_try='test -s conftest.$ac_objext'
5115 { (eval echo "$as_me:5115: \"$ac_try\"") >&5
5118 echo "$as_me:5118: \$? = $ac_status" >&5
5119 (exit $ac_status); }; }; then
5122 echo "$as_me: failed program was:" >&5
5123 cat conftest.$ac_ext >&5
5126 rm -f conftest.$ac_objext conftest.$ac_ext
5127 CPPFLAGS=$cf_save_CPPFLAGS
5132 if test "$cf_have_incdir" = no ; then
5133 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5135 echo "${as_me:-configure}:5135: testing adding $cf_add_incdir to include-path ..." 1>&5
5137 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5139 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5140 test "$cf_top_incdir" = "$cf_add_incdir" && break
5141 cf_add_incdir="$cf_top_incdir"
5154 # Set definitions to allow ifdef'ing for ncurses.h
5156 case $cf_cv_ncurses_header in
5159 cat >>confdefs.h <<\EOF
5160 #define HAVE_NCURSES_H 1
5166 case $cf_cv_ncurses_header in
5167 (ncurses/curses.h|ncurses/ncurses.h)
5169 cat >>confdefs.h <<\EOF
5170 #define HAVE_NCURSES_NCURSES_H 1
5174 (ncursesw/curses.h|ncursesw/ncurses.h)
5176 cat >>confdefs.h <<\EOF
5177 #define HAVE_NCURSESW_NCURSES_H 1
5183 echo "$as_me:5183: checking for terminfo header" >&5
5184 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5185 if test "${cf_cv_term_header+set}" = set; then
5186 echo $ECHO_N "(cached) $ECHO_C" >&6
5189 case ${cf_cv_ncurses_header} in
5190 (*/ncurses.h|*/ncursesw.h)
5191 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5194 cf_term_header=term.h
5198 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5200 cat >conftest.$ac_ext <<_ACEOF
5201 #line 5201 "configure"
5202 #include "confdefs.h"
5204 #include <${cf_cv_ncurses_header:-curses.h}>
5210 int x = auto_left_margin
5215 rm -f conftest.$ac_objext
5216 if { (eval echo "$as_me:5216: \"$ac_compile\"") >&5
5217 (eval $ac_compile) 2>&5
5219 echo "$as_me:5219: \$? = $ac_status" >&5
5220 (exit $ac_status); } &&
5221 { ac_try='test -s conftest.$ac_objext'
5222 { (eval echo "$as_me:5222: \"$ac_try\"") >&5
5225 echo "$as_me:5225: \$? = $ac_status" >&5
5226 (exit $ac_status); }; }; then
5228 cf_cv_term_header="$cf_test"
5230 echo "$as_me: failed program was:" >&5
5231 cat conftest.$ac_ext >&5
5233 cf_cv_term_header=unknown
5236 rm -f conftest.$ac_objext conftest.$ac_ext
5237 test "$cf_cv_term_header" != unknown && break
5241 echo "$as_me:5241: result: $cf_cv_term_header" >&5
5242 echo "${ECHO_T}$cf_cv_term_header" >&6
5244 # Set definitions to allow ifdef'ing to accommodate subdirectories
5246 case $cf_cv_term_header in
5249 cat >>confdefs.h <<\EOF
5250 #define HAVE_TERM_H 1
5256 case $cf_cv_term_header in
5259 cat >>confdefs.h <<\EOF
5260 #define HAVE_NCURSES_TERM_H 1
5266 cat >>confdefs.h <<\EOF
5267 #define HAVE_NCURSESW_TERM_H 1
5273 # some applications need this, but should check for NCURSES_VERSION
5275 cat >>confdefs.h <<\EOF
5279 echo "$as_me:5279: checking for ncurses version" >&5
5280 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5281 if test "${cf_cv_ncurses_version+set}" = set; then
5282 echo $ECHO_N "(cached) $ECHO_C" >&6
5285 cf_cv_ncurses_version=no
5288 if test "$cross_compiling" = yes; then
5290 # This will not work if the preprocessor splits the line after the
5291 # Autoconf token. The 'unproto' program does that.
5292 cat > conftest.$ac_ext <<EOF
5293 #include <${cf_cv_ncurses_header:-curses.h}>
5295 #ifdef NCURSES_VERSION
5296 Autoconf NCURSES_VERSION
5304 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5305 { (eval echo "$as_me:5305: \"$cf_try\"") >&5
5308 echo "$as_me:5308: \$? = $ac_status" >&5
5309 (exit $ac_status); }
5310 if test -f conftest.out ; then
5311 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5312 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5317 cat >conftest.$ac_ext <<_ACEOF
5318 #line 5318 "configure"
5319 #include "confdefs.h"
5321 #include <${cf_cv_ncurses_header:-curses.h}>
5325 FILE *fp = fopen("$cf_tempfile", "w");
5326 #ifdef NCURSES_VERSION
5327 # ifdef NCURSES_VERSION_PATCH
5328 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5330 fprintf(fp, "%s\n", NCURSES_VERSION);
5334 fprintf(fp, "old\n");
5339 ${cf_cv_main_return:-return}(0);
5342 rm -f conftest$ac_exeext
5343 if { (eval echo "$as_me:5343: \"$ac_link\"") >&5
5344 (eval $ac_link) 2>&5
5346 echo "$as_me:5346: \$? = $ac_status" >&5
5347 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5348 { (eval echo "$as_me:5348: \"$ac_try\"") >&5
5351 echo "$as_me:5351: \$? = $ac_status" >&5
5352 (exit $ac_status); }; }; then
5354 cf_cv_ncurses_version=`cat $cf_tempfile`
5356 echo "$as_me: program exited with status $ac_status" >&5
5357 echo "$as_me: failed program was:" >&5
5358 cat conftest.$ac_ext >&5
5360 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5365 echo "$as_me:5365: result: $cf_cv_ncurses_version" >&5
5366 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5367 test "$cf_cv_ncurses_version" = no ||
5368 cat >>confdefs.h <<\EOF
5372 cf_nculib_root=ncurses
5373 # This works, except for the special case where we find gpm, but
5374 # ncurses is in a nonstandard location via $LIBS, and we really want
5377 cf_ncurses_SAVE="$LIBS"
5378 echo "$as_me:5378: checking for Gpm_Open in -lgpm" >&5
5379 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5380 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5381 echo $ECHO_N "(cached) $ECHO_C" >&6
5383 ac_check_lib_save_LIBS=$LIBS
5385 cat >conftest.$ac_ext <<_ACEOF
5386 #line 5386 "configure"
5387 #include "confdefs.h"
5389 /* Override any gcc2 internal prototype to avoid an error. */
5393 /* We use char because int might match the return type of a gcc2
5394 builtin and then its argument prototype would still apply. */
5404 rm -f conftest.$ac_objext conftest$ac_exeext
5405 if { (eval echo "$as_me:5405: \"$ac_link\"") >&5
5406 (eval $ac_link) 2>&5
5408 echo "$as_me:5408: \$? = $ac_status" >&5
5409 (exit $ac_status); } &&
5410 { ac_try='test -s conftest$ac_exeext'
5411 { (eval echo "$as_me:5411: \"$ac_try\"") >&5
5414 echo "$as_me:5414: \$? = $ac_status" >&5
5415 (exit $ac_status); }; }; then
5416 ac_cv_lib_gpm_Gpm_Open=yes
5418 echo "$as_me: failed program was:" >&5
5419 cat conftest.$ac_ext >&5
5420 ac_cv_lib_gpm_Gpm_Open=no
5422 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5423 LIBS=$ac_check_lib_save_LIBS
5425 echo "$as_me:5425: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5426 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5427 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5428 echo "$as_me:5428: checking for initscr in -lgpm" >&5
5429 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5430 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5431 echo $ECHO_N "(cached) $ECHO_C" >&6
5433 ac_check_lib_save_LIBS=$LIBS
5435 cat >conftest.$ac_ext <<_ACEOF
5436 #line 5436 "configure"
5437 #include "confdefs.h"
5439 /* Override any gcc2 internal prototype to avoid an error. */
5443 /* We use char because int might match the return type of a gcc2
5444 builtin and then its argument prototype would still apply. */
5454 rm -f conftest.$ac_objext conftest$ac_exeext
5455 if { (eval echo "$as_me:5455: \"$ac_link\"") >&5
5456 (eval $ac_link) 2>&5
5458 echo "$as_me:5458: \$? = $ac_status" >&5
5459 (exit $ac_status); } &&
5460 { ac_try='test -s conftest$ac_exeext'
5461 { (eval echo "$as_me:5461: \"$ac_try\"") >&5
5464 echo "$as_me:5464: \$? = $ac_status" >&5
5465 (exit $ac_status); }; }; then
5466 ac_cv_lib_gpm_initscr=yes
5468 echo "$as_me: failed program was:" >&5
5469 cat conftest.$ac_ext >&5
5470 ac_cv_lib_gpm_initscr=no
5472 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5473 LIBS=$ac_check_lib_save_LIBS
5475 echo "$as_me:5475: result: $ac_cv_lib_gpm_initscr" >&5
5476 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
5477 if test $ac_cv_lib_gpm_initscr = yes; then
5478 LIBS="$cf_ncurses_SAVE"
5480 cf_ncurses_LIBS="-lgpm"
5487 # This is only necessary if you are linking against an obsolete
5488 # version of ncurses (but it should do no harm, since it's static).
5489 if test "$cf_nculib_root" = ncurses ; then
5490 echo "$as_me:5490: checking for tgoto in -lmytinfo" >&5
5491 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5492 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5493 echo $ECHO_N "(cached) $ECHO_C" >&6
5495 ac_check_lib_save_LIBS=$LIBS
5496 LIBS="-lmytinfo $LIBS"
5497 cat >conftest.$ac_ext <<_ACEOF
5498 #line 5498 "configure"
5499 #include "confdefs.h"
5501 /* Override any gcc2 internal prototype to avoid an error. */
5505 /* We use char because int might match the return type of a gcc2
5506 builtin and then its argument prototype would still apply. */
5516 rm -f conftest.$ac_objext conftest$ac_exeext
5517 if { (eval echo "$as_me:5517: \"$ac_link\"") >&5
5518 (eval $ac_link) 2>&5
5520 echo "$as_me:5520: \$? = $ac_status" >&5
5521 (exit $ac_status); } &&
5522 { ac_try='test -s conftest$ac_exeext'
5523 { (eval echo "$as_me:5523: \"$ac_try\"") >&5
5526 echo "$as_me:5526: \$? = $ac_status" >&5
5527 (exit $ac_status); }; }; then
5528 ac_cv_lib_mytinfo_tgoto=yes
5530 echo "$as_me: failed program was:" >&5
5531 cat conftest.$ac_ext >&5
5532 ac_cv_lib_mytinfo_tgoto=no
5534 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5535 LIBS=$ac_check_lib_save_LIBS
5537 echo "$as_me:5537: result: $ac_cv_lib_mytinfo_tgoto" >&5
5538 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5539 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5540 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5547 cf_add_libs="$cf_ncurses_LIBS"
5548 # Filter out duplicates - this happens with badly-designed ".pc" files...
5549 for cf_add_1lib in $LIBS
5551 for cf_add_2lib in $cf_add_libs
5553 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5559 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5563 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5566 cf_add_libs="-l$cf_nculib_root"
5567 # Filter out duplicates - this happens with badly-designed ".pc" files...
5568 for cf_add_1lib in $LIBS
5570 for cf_add_2lib in $cf_add_libs
5572 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5578 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5584 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5586 echo "$as_me:5586: checking for initscr" >&5
5587 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
5588 if test "${ac_cv_func_initscr+set}" = set; then
5589 echo $ECHO_N "(cached) $ECHO_C" >&6
5591 cat >conftest.$ac_ext <<_ACEOF
5592 #line 5592 "configure"
5593 #include "confdefs.h"
5594 #define initscr autoconf_temporary
5595 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
5602 /* We use char because int might match the return type of a gcc2
5603 builtin and then its argument prototype would still apply. */
5604 char initscr (void);
5610 /* The GNU C library defines stubs for functions which it implements
5611 to always fail with ENOSYS. Some functions are actually named
5612 something starting with __ and the normal name is an alias. */
5613 #if defined (__stub_initscr) || defined (__stub___initscr)
5614 #error found stub for initscr
5622 rm -f conftest.$ac_objext conftest$ac_exeext
5623 if { (eval echo "$as_me:5623: \"$ac_link\"") >&5
5624 (eval $ac_link) 2>&5
5626 echo "$as_me:5626: \$? = $ac_status" >&5
5627 (exit $ac_status); } &&
5628 { ac_try='test -s conftest$ac_exeext'
5629 { (eval echo "$as_me:5629: \"$ac_try\"") >&5
5632 echo "$as_me:5632: \$? = $ac_status" >&5
5633 (exit $ac_status); }; }; then
5634 ac_cv_func_initscr=yes
5636 echo "$as_me: failed program was:" >&5
5637 cat conftest.$ac_ext >&5
5638 ac_cv_func_initscr=no
5640 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5642 echo "$as_me:5642: result: $ac_cv_func_initscr" >&5
5643 echo "${ECHO_T}$ac_cv_func_initscr" >&6
5644 if test $ac_cv_func_initscr = yes; then
5645 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5648 cf_save_LIBS="$LIBS"
5649 echo "$as_me:5649: checking for initscr in -l$cf_nculib_root" >&5
5650 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
5651 LIBS="-l$cf_nculib_root $LIBS"
5652 cat >conftest.$ac_ext <<_ACEOF
5653 #line 5653 "configure"
5654 #include "confdefs.h"
5655 #include <${cf_cv_ncurses_header:-curses.h}>
5664 rm -f conftest.$ac_objext conftest$ac_exeext
5665 if { (eval echo "$as_me:5665: \"$ac_link\"") >&5
5666 (eval $ac_link) 2>&5
5668 echo "$as_me:5668: \$? = $ac_status" >&5
5669 (exit $ac_status); } &&
5670 { ac_try='test -s conftest$ac_exeext'
5671 { (eval echo "$as_me:5671: \"$ac_try\"") >&5
5674 echo "$as_me:5674: \$? = $ac_status" >&5
5675 (exit $ac_status); }; }; then
5676 echo "$as_me:5676: result: yes" >&5
5677 echo "${ECHO_T}yes" >&6
5678 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5681 echo "$as_me: failed program was:" >&5
5682 cat conftest.$ac_ext >&5
5683 echo "$as_me:5683: result: no" >&5
5684 echo "${ECHO_T}no" >&6
5687 cf_library_path_list=""
5688 if test -n "${LDFLAGS}${LIBS}" ; then
5689 for cf_library_path in $LDFLAGS $LIBS
5691 case $cf_library_path in
5693 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5695 test "x$cf_library_path" != "xNONE" && \
5696 test -d "$cf_library_path" && \
5698 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
5699 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
5700 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5701 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5702 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5703 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"
5706 cf_library_path_list="$cf_library_path_list $cf_search"
5714 test "x$prefix" != "xNONE" && \
5715 test -d "$prefix" && \
5717 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5718 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5719 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5720 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5721 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5722 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5725 for cf_subdir_prefix in \
5734 test "x$cf_subdir_prefix" != "x$prefix" && \
5735 test -d "$cf_subdir_prefix" && \
5736 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5737 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
5738 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
5739 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
5740 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
5741 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
5742 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"
5747 cf_search="$cf_library_path_list $cf_search"
5749 for cf_libdir in $cf_search
5751 echo "$as_me:5751: checking for -l$cf_nculib_root in $cf_libdir" >&5
5752 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5753 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5754 cat >conftest.$ac_ext <<_ACEOF
5755 #line 5755 "configure"
5756 #include "confdefs.h"
5757 #include <${cf_cv_ncurses_header:-curses.h}>
5766 rm -f conftest.$ac_objext conftest$ac_exeext
5767 if { (eval echo "$as_me:5767: \"$ac_link\"") >&5
5768 (eval $ac_link) 2>&5
5770 echo "$as_me:5770: \$? = $ac_status" >&5
5771 (exit $ac_status); } &&
5772 { ac_try='test -s conftest$ac_exeext'
5773 { (eval echo "$as_me:5773: \"$ac_try\"") >&5
5776 echo "$as_me:5776: \$? = $ac_status" >&5
5777 (exit $ac_status); }; }; then
5778 echo "$as_me:5778: result: yes" >&5
5779 echo "${ECHO_T}yes" >&6
5780 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5783 echo "$as_me: failed program was:" >&5
5784 cat conftest.$ac_ext >&5
5785 echo "$as_me:5785: result: no" >&5
5786 echo "${ECHO_T}no" >&6
5787 LIBS="$cf_save_LIBS"
5789 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5793 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5797 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5799 if test $cf_found_library = no ; then
5800 { { echo "$as_me:5800: error: Cannot link $cf_nculib_root library" >&5
5801 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5802 { (exit 1); exit 1; }; }
5807 if test -n "$cf_ncurses_LIBS" ; then
5808 echo "$as_me:5808: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5809 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5810 cf_ncurses_SAVE="$LIBS"
5811 for p in $cf_ncurses_LIBS ; do
5812 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5813 if test "$q" != "$LIBS" ; then
5817 cat >conftest.$ac_ext <<_ACEOF
5818 #line 5818 "configure"
5819 #include "confdefs.h"
5820 #include <${cf_cv_ncurses_header:-curses.h}>
5824 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5829 rm -f conftest.$ac_objext conftest$ac_exeext
5830 if { (eval echo "$as_me:5830: \"$ac_link\"") >&5
5831 (eval $ac_link) 2>&5
5833 echo "$as_me:5833: \$? = $ac_status" >&5
5834 (exit $ac_status); } &&
5835 { ac_try='test -s conftest$ac_exeext'
5836 { (eval echo "$as_me:5836: \"$ac_try\"") >&5
5839 echo "$as_me:5839: \$? = $ac_status" >&5
5840 (exit $ac_status); }; }; then
5841 echo "$as_me:5841: result: yes" >&5
5842 echo "${ECHO_T}yes" >&6
5844 echo "$as_me: failed program was:" >&5
5845 cat conftest.$ac_ext >&5
5846 echo "$as_me:5846: result: no" >&5
5847 echo "${ECHO_T}no" >&6
5848 LIBS="$cf_ncurses_SAVE"
5850 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5853 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5855 cat >>confdefs.h <<EOF
5856 #define $cf_nculib_ROOT 1
5864 echo "$as_me:5864: checking if you want wide-character code" >&5
5865 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
5867 # Check whether --enable-widec or --disable-widec was given.
5868 if test "${enable_widec+set}" = set; then
5869 enableval="$enable_widec"
5870 with_widec=$enableval
5874 echo "$as_me:5874: result: $with_widec" >&5
5875 echo "${ECHO_T}$with_widec" >&6
5876 if test "$with_widec" = yes ; then
5878 echo "$as_me:5878: checking for multibyte character support" >&5
5879 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
5880 if test "${cf_cv_utf8_lib+set}" = set; then
5881 echo $ECHO_N "(cached) $ECHO_C" >&6
5884 cf_save_LIBS="$LIBS"
5885 cat >conftest.$ac_ext <<_ACEOF
5886 #line 5886 "configure"
5887 #include "confdefs.h"
5898 rm -f conftest.$ac_objext conftest$ac_exeext
5899 if { (eval echo "$as_me:5899: \"$ac_link\"") >&5
5900 (eval $ac_link) 2>&5
5902 echo "$as_me:5902: \$? = $ac_status" >&5
5903 (exit $ac_status); } &&
5904 { ac_try='test -s conftest$ac_exeext'
5905 { (eval echo "$as_me:5905: \"$ac_try\"") >&5
5908 echo "$as_me:5908: \$? = $ac_status" >&5
5909 (exit $ac_status); }; }; then
5912 echo "$as_me: failed program was:" >&5
5913 cat conftest.$ac_ext >&5
5915 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
5916 # will be set on completion of the AC_TRY_LINK below.
5917 cf_cv_header_path_utf8=
5918 cf_cv_library_path_utf8=
5920 echo "${as_me:-configure}:5920: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
5922 cf_save_LIBS="$LIBS"
5924 cat >conftest.$ac_ext <<_ACEOF
5925 #line 5925 "configure"
5926 #include "confdefs.h"
5928 #include <libutf8.h>
5937 rm -f conftest.$ac_objext conftest$ac_exeext
5938 if { (eval echo "$as_me:5938: \"$ac_link\"") >&5
5939 (eval $ac_link) 2>&5
5941 echo "$as_me:5941: \$? = $ac_status" >&5
5942 (exit $ac_status); } &&
5943 { ac_try='test -s conftest$ac_exeext'
5944 { (eval echo "$as_me:5944: \"$ac_try\"") >&5
5947 echo "$as_me:5947: \$? = $ac_status" >&5
5948 (exit $ac_status); }; }; then
5950 cf_cv_find_linkage_utf8=yes
5951 cf_cv_header_path_utf8=/usr/include
5952 cf_cv_library_path_utf8=/usr/lib
5955 echo "$as_me: failed program was:" >&5
5956 cat conftest.$ac_ext >&5
5958 LIBS="-lutf8 $cf_save_LIBS"
5960 cat >conftest.$ac_ext <<_ACEOF
5961 #line 5961 "configure"
5962 #include "confdefs.h"
5964 #include <libutf8.h>
5973 rm -f conftest.$ac_objext conftest$ac_exeext
5974 if { (eval echo "$as_me:5974: \"$ac_link\"") >&5
5975 (eval $ac_link) 2>&5
5977 echo "$as_me:5977: \$? = $ac_status" >&5
5978 (exit $ac_status); } &&
5979 { ac_try='test -s conftest$ac_exeext'
5980 { (eval echo "$as_me:5980: \"$ac_try\"") >&5
5983 echo "$as_me:5983: \$? = $ac_status" >&5
5984 (exit $ac_status); }; }; then
5986 cf_cv_find_linkage_utf8=yes
5987 cf_cv_header_path_utf8=/usr/include
5988 cf_cv_library_path_utf8=/usr/lib
5989 cf_cv_library_file_utf8="-lutf8"
5992 echo "$as_me: failed program was:" >&5
5993 cat conftest.$ac_ext >&5
5995 cf_cv_find_linkage_utf8=no
5996 LIBS="$cf_save_LIBS"
5998 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6000 echo "${as_me:-configure}:6000: testing find linkage for utf8 library ..." 1>&5
6002 echo "${as_me:-configure}:6002: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6004 cf_save_CPPFLAGS="$CPPFLAGS"
6005 cf_test_CPPFLAGS="$CPPFLAGS"
6009 # collect the current set of include-directories from compiler flags
6010 cf_header_path_list=""
6011 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6012 for cf_header_path in $CPPFLAGS $CFLAGS
6014 case $cf_header_path in
6016 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6018 test "x$cf_header_path" != "xNONE" && \
6019 test -d "$cf_header_path" && \
6021 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6022 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6023 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
6024 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
6025 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
6026 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6029 cf_header_path_list="$cf_header_path_list $cf_search"
6035 # add the variations for the package we are looking for
6039 test "x$prefix" != "xNONE" && \
6040 test -d "$prefix" && \
6042 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6043 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6044 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
6045 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
6046 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
6047 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
6050 for cf_subdir_prefix in \
6059 test "x$cf_subdir_prefix" != "x$prefix" && \
6060 test -d "$cf_subdir_prefix" && \
6061 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6062 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6063 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6064 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6065 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6066 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6067 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6072 test "$includedir" != NONE && \
6073 test "$includedir" != "/usr/include" && \
6074 test -d "$includedir" && {
6075 test -d $includedir && cf_search="$cf_search $includedir"
6076 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
6079 test "$oldincludedir" != NONE && \
6080 test "$oldincludedir" != "/usr/include" && \
6081 test -d "$oldincludedir" && {
6082 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6083 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
6086 cf_search="$cf_search $cf_header_path_list"
6088 for cf_cv_header_path_utf8 in $cf_search
6090 if test -d $cf_cv_header_path_utf8 ; then
6091 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6093 echo "${as_me:-configure}:6093: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6095 CPPFLAGS="$cf_save_CPPFLAGS"
6097 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6098 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
6100 cat >conftest.$ac_ext <<_ACEOF
6101 #line 6101 "configure"
6102 #include "confdefs.h"
6104 #include <libutf8.h>
6113 rm -f conftest.$ac_objext
6114 if { (eval echo "$as_me:6114: \"$ac_compile\"") >&5
6115 (eval $ac_compile) 2>&5
6117 echo "$as_me:6117: \$? = $ac_status" >&5
6118 (exit $ac_status); } &&
6119 { ac_try='test -s conftest.$ac_objext'
6120 { (eval echo "$as_me:6120: \"$ac_try\"") >&5
6123 echo "$as_me:6123: \$? = $ac_status" >&5
6124 (exit $ac_status); }; }; then
6126 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6128 echo "${as_me:-configure}:6128: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6130 cf_cv_find_linkage_utf8=maybe
6131 cf_test_CPPFLAGS="$CPPFLAGS"
6134 echo "$as_me: failed program was:" >&5
6135 cat conftest.$ac_ext >&5
6137 CPPFLAGS="$cf_save_CPPFLAGS"
6140 rm -f conftest.$ac_objext conftest.$ac_ext
6144 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6146 echo "${as_me:-configure}:6146: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6148 cf_save_LIBS="$LIBS"
6149 cf_save_LDFLAGS="$LDFLAGS"
6151 if test "$cf_cv_find_linkage_utf8" != yes ; then
6154 cf_library_path_list=""
6155 if test -n "${LDFLAGS}${LIBS}" ; then
6156 for cf_library_path in $LDFLAGS $LIBS
6158 case $cf_library_path in
6160 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6162 test "x$cf_library_path" != "xNONE" && \
6163 test -d "$cf_library_path" && \
6165 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6166 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6167 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
6168 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6169 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
6170 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6173 cf_library_path_list="$cf_library_path_list $cf_search"
6181 test "x$prefix" != "xNONE" && \
6182 test -d "$prefix" && \
6184 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6185 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6186 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
6187 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
6188 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
6189 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
6192 for cf_subdir_prefix in \
6201 test "x$cf_subdir_prefix" != "x$prefix" && \
6202 test -d "$cf_subdir_prefix" && \
6203 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6204 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6205 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
6206 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6207 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6208 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6209 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6214 cf_search="$cf_library_path_list $cf_search"
6216 for cf_cv_library_path_utf8 in $cf_search
6218 if test -d $cf_cv_library_path_utf8 ; then
6219 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6221 echo "${as_me:-configure}:6221: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6223 CPPFLAGS="$cf_test_CPPFLAGS"
6224 LIBS="-lutf8 $cf_save_LIBS"
6225 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6226 cat >conftest.$ac_ext <<_ACEOF
6227 #line 6227 "configure"
6228 #include "confdefs.h"
6230 #include <libutf8.h>
6239 rm -f conftest.$ac_objext conftest$ac_exeext
6240 if { (eval echo "$as_me:6240: \"$ac_link\"") >&5
6241 (eval $ac_link) 2>&5
6243 echo "$as_me:6243: \$? = $ac_status" >&5
6244 (exit $ac_status); } &&
6245 { ac_try='test -s conftest$ac_exeext'
6246 { (eval echo "$as_me:6246: \"$ac_try\"") >&5
6249 echo "$as_me:6249: \$? = $ac_status" >&5
6250 (exit $ac_status); }; }; then
6252 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
6254 echo "${as_me:-configure}:6254: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
6256 cf_cv_find_linkage_utf8=yes
6257 cf_cv_library_file_utf8="-lutf8"
6260 echo "$as_me: failed program was:" >&5
6261 cat conftest.$ac_ext >&5
6263 CPPFLAGS="$cf_save_CPPFLAGS"
6264 LIBS="$cf_save_LIBS"
6265 LDFLAGS="$cf_save_LDFLAGS"
6268 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6271 CPPFLAGS="$cf_save_CPPFLAGS"
6272 LDFLAGS="$cf_save_LDFLAGS"
6276 cf_cv_find_linkage_utf8=no
6280 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6283 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6285 LIBS="$cf_save_LIBS"
6287 if test "$cf_cv_find_linkage_utf8" = yes ; then
6288 cf_cv_utf8_lib=add-on
6294 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6296 echo "$as_me:6296: result: $cf_cv_utf8_lib" >&5
6297 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
6299 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
6301 if test "$cf_cv_utf8_lib" = "add-on" ; then
6303 cat >>confdefs.h <<\EOF
6304 #define HAVE_LIBUTF8_H 1
6307 if test -n "$cf_cv_header_path_utf8" ; then
6308 for cf_add_incdir in $cf_cv_header_path_utf8
6310 while test $cf_add_incdir != /usr/include
6312 if test -d $cf_add_incdir
6315 if test -n "$CFLAGS$CPPFLAGS" ; then
6316 # a loop is needed to ensure we can add subdirs of existing dirs
6317 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6318 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6319 cf_have_incdir=yes; break
6324 if test "$cf_have_incdir" = no ; then
6325 if test "$cf_add_incdir" = /usr/local/include ; then
6326 if test "$GCC" = yes
6328 cf_save_CPPFLAGS=$CPPFLAGS
6330 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6331 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6333 cat >conftest.$ac_ext <<_ACEOF
6334 #line 6334 "configure"
6335 #include "confdefs.h"
6345 rm -f conftest.$ac_objext
6346 if { (eval echo "$as_me:6346: \"$ac_compile\"") >&5
6347 (eval $ac_compile) 2>&5
6349 echo "$as_me:6349: \$? = $ac_status" >&5
6350 (exit $ac_status); } &&
6351 { ac_try='test -s conftest.$ac_objext'
6352 { (eval echo "$as_me:6352: \"$ac_try\"") >&5
6355 echo "$as_me:6355: \$? = $ac_status" >&5
6356 (exit $ac_status); }; }; then
6359 echo "$as_me: failed program was:" >&5
6360 cat conftest.$ac_ext >&5
6363 rm -f conftest.$ac_objext conftest.$ac_ext
6364 CPPFLAGS=$cf_save_CPPFLAGS
6369 if test "$cf_have_incdir" = no ; then
6370 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6372 echo "${as_me:-configure}:6372: testing adding $cf_add_incdir to include-path ..." 1>&5
6374 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6376 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6377 test "$cf_top_incdir" = "$cf_add_incdir" && break
6378 cf_add_incdir="$cf_top_incdir"
6389 if test -n "$cf_cv_library_path_utf8" ; then
6390 for cf_add_libdir in $cf_cv_library_path_utf8
6392 if test $cf_add_libdir = /usr/lib ; then
6394 elif test -d $cf_add_libdir
6397 if test -n "$LDFLAGS$LIBS" ; then
6398 # a loop is needed to ensure we can add subdirs of existing dirs
6399 for cf_test_libdir in $LDFLAGS $LIBS ; do
6400 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6401 cf_have_libdir=yes; break
6405 if test "$cf_have_libdir" = no ; then
6406 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6408 echo "${as_me:-configure}:6408: testing adding $cf_add_libdir to library-path ..." 1>&5
6410 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6416 cf_add_libs="$cf_cv_library_file_utf8"
6417 # Filter out duplicates - this happens with badly-designed ".pc" files...
6418 for cf_add_1lib in $LIBS
6420 for cf_add_2lib in $cf_add_libs
6422 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6428 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6434 cf_ncuconfig_root=ncursesw
6435 cf_have_ncuconfig=no
6437 if test "x${PKG_CONFIG:=none}" != xnone; then
6438 echo "$as_me:6438: checking pkg-config for $cf_ncuconfig_root" >&5
6439 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
6440 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
6441 echo "$as_me:6441: result: yes" >&5
6442 echo "${ECHO_T}yes" >&6
6444 echo "$as_me:6444: checking if the $cf_ncuconfig_root package files work" >&5
6445 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
6446 cf_have_ncuconfig=unknown
6448 cf_save_CPPFLAGS="$CPPFLAGS"
6449 cf_save_LIBS="$LIBS"
6454 cf_new_extra_cppflags=
6456 for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
6458 case $cf_fix_cppflags in
6460 case $cf_add_cflags in
6461 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
6462 case $cf_add_cflags in
6464 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6466 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6467 && test -z "${cf_tst_cflags}" \
6468 && cf_fix_cppflags=yes
6470 if test $cf_fix_cppflags = yes ; then
6472 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6473 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6476 elif test "${cf_tst_cflags}" = "\"'" ; then
6478 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6479 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6489 case $cf_add_cflags in
6491 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6493 CPPFLAGS=`echo "$CPPFLAGS" | \
6494 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
6495 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
6500 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
6501 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
6508 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
6509 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
6516 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6517 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6519 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
6521 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6522 && test -z "${cf_tst_cflags}" \
6523 && cf_fix_cppflags=no
6528 if test -n "$cf_new_cflags" ; then
6530 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
6531 CFLAGS="${CFLAGS}$cf_new_cflags"
6535 if test -n "$cf_new_cppflags" ; then
6537 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6538 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
6542 if test -n "$cf_new_extra_cppflags" ; then
6544 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
6545 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
6549 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
6550 # Filter out duplicates - this happens with badly-designed ".pc" files...
6551 for cf_add_1lib in $LIBS
6553 for cf_add_2lib in $cf_add_libs
6555 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6561 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6565 cat >conftest.$ac_ext <<_ACEOF
6566 #line 6566 "configure"
6567 #include "confdefs.h"
6568 #include <${cf_cv_ncurses_header:-curses.h}>
6572 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6577 rm -f conftest.$ac_objext conftest$ac_exeext
6578 if { (eval echo "$as_me:6578: \"$ac_link\"") >&5
6579 (eval $ac_link) 2>&5
6581 echo "$as_me:6581: \$? = $ac_status" >&5
6582 (exit $ac_status); } &&
6583 { ac_try='test -s conftest$ac_exeext'
6584 { (eval echo "$as_me:6584: \"$ac_try\"") >&5
6587 echo "$as_me:6587: \$? = $ac_status" >&5
6588 (exit $ac_status); }; }; then
6589 if test "$cross_compiling" = yes; then
6590 cf_have_ncuconfig=maybe
6592 cat >conftest.$ac_ext <<_ACEOF
6593 #line 6593 "configure"
6594 #include "confdefs.h"
6595 #include <${cf_cv_ncurses_header:-curses.h}>
6597 { char *xx = curses_version(); return (xx == 0); }
6599 rm -f conftest$ac_exeext
6600 if { (eval echo "$as_me:6600: \"$ac_link\"") >&5
6601 (eval $ac_link) 2>&5
6603 echo "$as_me:6603: \$? = $ac_status" >&5
6604 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6605 { (eval echo "$as_me:6605: \"$ac_try\"") >&5
6608 echo "$as_me:6608: \$? = $ac_status" >&5
6609 (exit $ac_status); }; }; then
6610 cf_have_ncuconfig=yes
6612 echo "$as_me: program exited with status $ac_status" >&5
6613 echo "$as_me: failed program was:" >&5
6614 cat conftest.$ac_ext >&5
6615 cf_have_ncuconfig=no
6617 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6620 echo "$as_me: failed program was:" >&5
6621 cat conftest.$ac_ext >&5
6622 cf_have_ncuconfig=no
6624 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6625 echo "$as_me:6625: result: $cf_have_ncuconfig" >&5
6626 echo "${ECHO_T}$cf_have_ncuconfig" >&6
6627 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
6628 if test "$cf_have_ncuconfig" != "yes"
6630 CPPFLAGS="$cf_save_CPPFLAGS"
6631 LIBS="$cf_save_LIBS"
6632 NCURSES_CONFIG_PKG=none
6635 cat >>confdefs.h <<\EOF
6639 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
6641 echo "$as_me:6641: checking for terminfo header" >&5
6642 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6643 if test "${cf_cv_term_header+set}" = set; then
6644 echo $ECHO_N "(cached) $ECHO_C" >&6
6647 case ${cf_cv_ncurses_header} in
6648 (*/ncurses.h|*/ncursesw.h)
6649 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6652 cf_term_header=term.h
6656 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6658 cat >conftest.$ac_ext <<_ACEOF
6659 #line 6659 "configure"
6660 #include "confdefs.h"
6662 #include <${cf_cv_ncurses_header:-curses.h}>
6668 int x = auto_left_margin
6673 rm -f conftest.$ac_objext
6674 if { (eval echo "$as_me:6674: \"$ac_compile\"") >&5
6675 (eval $ac_compile) 2>&5
6677 echo "$as_me:6677: \$? = $ac_status" >&5
6678 (exit $ac_status); } &&
6679 { ac_try='test -s conftest.$ac_objext'
6680 { (eval echo "$as_me:6680: \"$ac_try\"") >&5
6683 echo "$as_me:6683: \$? = $ac_status" >&5
6684 (exit $ac_status); }; }; then
6686 cf_cv_term_header="$cf_test"
6688 echo "$as_me: failed program was:" >&5
6689 cat conftest.$ac_ext >&5
6691 cf_cv_term_header=unknown
6694 rm -f conftest.$ac_objext conftest.$ac_ext
6695 test "$cf_cv_term_header" != unknown && break
6699 echo "$as_me:6699: result: $cf_cv_term_header" >&5
6700 echo "${ECHO_T}$cf_cv_term_header" >&6
6702 # Set definitions to allow ifdef'ing to accommodate subdirectories
6704 case $cf_cv_term_header in
6707 cat >>confdefs.h <<\EOF
6708 #define HAVE_TERM_H 1
6714 case $cf_cv_term_header in
6717 cat >>confdefs.h <<\EOF
6718 #define HAVE_NCURSES_TERM_H 1
6724 cat >>confdefs.h <<\EOF
6725 #define HAVE_NCURSESW_TERM_H 1
6734 echo "$as_me:6734: result: no" >&5
6735 echo "${ECHO_T}no" >&6
6736 NCURSES_CONFIG_PKG=none
6739 NCURSES_CONFIG_PKG=none
6742 if test "x$cf_have_ncuconfig" = "xno"; then
6743 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
6745 if test -n "$ac_tool_prefix"; then
6746 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6748 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6749 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6750 echo "$as_me:6750: checking for $ac_word" >&5
6751 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6752 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
6753 echo $ECHO_N "(cached) $ECHO_C" >&6
6755 if test -n "$NCURSES_CONFIG"; then
6756 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
6758 ac_save_IFS=$IFS; IFS=$ac_path_separator
6760 for ac_dir in $ac_dummy; do
6762 test -z "$ac_dir" && ac_dir=.
6763 $as_executable_p "$ac_dir/$ac_word" || continue
6764 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
6765 echo "$as_me:6765: found $ac_dir/$ac_word" >&5
6771 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
6772 if test -n "$NCURSES_CONFIG"; then
6773 echo "$as_me:6773: result: $NCURSES_CONFIG" >&5
6774 echo "${ECHO_T}$NCURSES_CONFIG" >&6
6776 echo "$as_me:6776: result: no" >&5
6777 echo "${ECHO_T}no" >&6
6780 test -n "$NCURSES_CONFIG" && break
6783 if test -z "$NCURSES_CONFIG"; then
6784 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
6785 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6787 # Extract the first word of "$ac_prog", so it can be a program name with args.
6788 set dummy $ac_prog; ac_word=$2
6789 echo "$as_me:6789: checking for $ac_word" >&5
6790 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6791 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
6792 echo $ECHO_N "(cached) $ECHO_C" >&6
6794 if test -n "$ac_ct_NCURSES_CONFIG"; then
6795 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
6797 ac_save_IFS=$IFS; IFS=$ac_path_separator
6799 for ac_dir in $ac_dummy; do
6801 test -z "$ac_dir" && ac_dir=.
6802 $as_executable_p "$ac_dir/$ac_word" || continue
6803 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
6804 echo "$as_me:6804: found $ac_dir/$ac_word" >&5
6810 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
6811 if test -n "$ac_ct_NCURSES_CONFIG"; then
6812 echo "$as_me:6812: result: $ac_ct_NCURSES_CONFIG" >&5
6813 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
6815 echo "$as_me:6815: result: no" >&5
6816 echo "${ECHO_T}no" >&6
6819 test -n "$ac_ct_NCURSES_CONFIG" && break
6821 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
6823 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
6826 if test "$NCURSES_CONFIG" != none ; then
6831 cf_new_extra_cppflags=
6833 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
6835 case $cf_fix_cppflags in
6837 case $cf_add_cflags in
6838 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
6839 case $cf_add_cflags in
6841 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6843 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6844 && test -z "${cf_tst_cflags}" \
6845 && cf_fix_cppflags=yes
6847 if test $cf_fix_cppflags = yes ; then
6849 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6850 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6853 elif test "${cf_tst_cflags}" = "\"'" ; then
6855 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6856 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6866 case $cf_add_cflags in
6868 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6870 CPPFLAGS=`echo "$CPPFLAGS" | \
6871 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
6872 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
6877 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
6878 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
6885 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
6886 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
6893 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6894 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6896 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
6898 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6899 && test -z "${cf_tst_cflags}" \
6900 && cf_fix_cppflags=no
6905 if test -n "$cf_new_cflags" ; then
6907 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
6908 CFLAGS="${CFLAGS}$cf_new_cflags"
6912 if test -n "$cf_new_cppflags" ; then
6914 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6915 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
6919 if test -n "$cf_new_extra_cppflags" ; then
6921 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
6922 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
6926 cf_add_libs="`$NCURSES_CONFIG --libs`"
6927 # Filter out duplicates - this happens with badly-designed ".pc" files...
6928 for cf_add_1lib in $LIBS
6930 for cf_add_2lib in $cf_add_libs
6932 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6938 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6942 # even with config script, some packages use no-override for curses.h
6944 echo "$as_me:6944: checking if we have identified curses headers" >&5
6945 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6946 if test "${cf_cv_ncurses_header+set}" = set; then
6947 echo $ECHO_N "(cached) $ECHO_C" >&6
6950 cf_cv_ncurses_header=none
6952 ncurses.h ncursesw/ncurses.h \
6953 curses.h ncursesw/curses.h
6955 cat >conftest.$ac_ext <<_ACEOF
6956 #line 6956 "configure"
6957 #include "confdefs.h"
6958 #include <${cf_header}>
6962 initscr(); tgoto("?", 0,0)
6967 rm -f conftest.$ac_objext
6968 if { (eval echo "$as_me:6968: \"$ac_compile\"") >&5
6969 (eval $ac_compile) 2>&5
6971 echo "$as_me:6971: \$? = $ac_status" >&5
6972 (exit $ac_status); } &&
6973 { ac_try='test -s conftest.$ac_objext'
6974 { (eval echo "$as_me:6974: \"$ac_try\"") >&5
6977 echo "$as_me:6977: \$? = $ac_status" >&5
6978 (exit $ac_status); }; }; then
6979 cf_cv_ncurses_header=$cf_header; break
6981 echo "$as_me: failed program was:" >&5
6982 cat conftest.$ac_ext >&5
6984 rm -f conftest.$ac_objext conftest.$ac_ext
6988 echo "$as_me:6988: result: $cf_cv_ncurses_header" >&5
6989 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6991 if test "$cf_cv_ncurses_header" = none ; then
6992 { { echo "$as_me:6992: error: No curses header-files found" >&5
6993 echo "$as_me: error: No curses header-files found" >&2;}
6994 { (exit 1); exit 1; }; }
6997 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6999 for ac_header in $cf_cv_ncurses_header
7001 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7002 echo "$as_me:7002: checking for $ac_header" >&5
7003 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7004 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7005 echo $ECHO_N "(cached) $ECHO_C" >&6
7007 cat >conftest.$ac_ext <<_ACEOF
7008 #line 7008 "configure"
7009 #include "confdefs.h"
7010 #include <$ac_header>
7012 if { (eval echo "$as_me:7012: \"$ac_cpp conftest.$ac_ext\"") >&5
7013 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7015 egrep -v '^ *\+' conftest.er1 >conftest.err
7017 cat conftest.err >&5
7018 echo "$as_me:7018: \$? = $ac_status" >&5
7019 (exit $ac_status); } >/dev/null; then
7020 if test -s conftest.err; then
7021 ac_cpp_err=$ac_c_preproc_warn_flag
7028 if test -z "$ac_cpp_err"; then
7029 eval "$as_ac_Header=yes"
7031 echo "$as_me: failed program was:" >&5
7032 cat conftest.$ac_ext >&5
7033 eval "$as_ac_Header=no"
7035 rm -f conftest.err conftest.$ac_ext
7037 echo "$as_me:7037: result: `eval echo '${'$as_ac_Header'}'`" >&5
7038 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7039 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7040 cat >>confdefs.h <<EOF
7041 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7047 cat >>confdefs.h <<\EOF
7051 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7053 cat >>confdefs.h <<EOF
7054 #define $cf_nculib_ROOT 1
7057 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7061 cf_ncuhdr_root=ncursesw
7063 test -n "$cf_cv_curses_dir" && \
7064 test "$cf_cv_curses_dir" != "no" && { \
7066 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7067 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7069 while test $cf_add_incdir != /usr/include
7071 if test -d $cf_add_incdir
7074 if test -n "$CFLAGS$CPPFLAGS" ; then
7075 # a loop is needed to ensure we can add subdirs of existing dirs
7076 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7077 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7078 cf_have_incdir=yes; break
7083 if test "$cf_have_incdir" = no ; then
7084 if test "$cf_add_incdir" = /usr/local/include ; then
7085 if test "$GCC" = yes
7087 cf_save_CPPFLAGS=$CPPFLAGS
7089 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7090 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7092 cat >conftest.$ac_ext <<_ACEOF
7093 #line 7093 "configure"
7094 #include "confdefs.h"
7104 rm -f conftest.$ac_objext
7105 if { (eval echo "$as_me:7105: \"$ac_compile\"") >&5
7106 (eval $ac_compile) 2>&5
7108 echo "$as_me:7108: \$? = $ac_status" >&5
7109 (exit $ac_status); } &&
7110 { ac_try='test -s conftest.$ac_objext'
7111 { (eval echo "$as_me:7111: \"$ac_try\"") >&5
7114 echo "$as_me:7114: \$? = $ac_status" >&5
7115 (exit $ac_status); }; }; then
7118 echo "$as_me: failed program was:" >&5
7119 cat conftest.$ac_ext >&5
7122 rm -f conftest.$ac_objext conftest.$ac_ext
7123 CPPFLAGS=$cf_save_CPPFLAGS
7128 if test "$cf_have_incdir" = no ; then
7129 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7131 echo "${as_me:-configure}:7131: testing adding $cf_add_incdir to include-path ..." 1>&5
7133 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7135 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7136 test "$cf_top_incdir" = "$cf_add_incdir" && break
7137 cf_add_incdir="$cf_top_incdir"
7150 echo "$as_me:7150: checking for $cf_ncuhdr_root header in include-path" >&5
7151 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
7152 if test "${cf_cv_ncurses_h+set}" = set; then
7153 echo $ECHO_N "(cached) $ECHO_C" >&6
7156 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
7157 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
7158 for cf_header in $cf_header_list
7161 cat >conftest.$ac_ext <<_ACEOF
7162 #line 7162 "configure"
7163 #include "confdefs.h"
7165 #define _XOPEN_SOURCE_EXTENDED
7166 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
7167 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
7169 #include <$cf_header>
7174 #ifdef NCURSES_VERSION
7180 printf("%s\n", NCURSES_VERSION);
7193 rm -f conftest.$ac_objext
7194 if { (eval echo "$as_me:7194: \"$ac_compile\"") >&5
7195 (eval $ac_compile) 2>&5
7197 echo "$as_me:7197: \$? = $ac_status" >&5
7198 (exit $ac_status); } &&
7199 { ac_try='test -s conftest.$ac_objext'
7200 { (eval echo "$as_me:7200: \"$ac_try\"") >&5
7203 echo "$as_me:7203: \$? = $ac_status" >&5
7204 (exit $ac_status); }; }; then
7205 cf_cv_ncurses_h=$cf_header
7208 echo "$as_me: failed program was:" >&5
7209 cat conftest.$ac_ext >&5
7212 rm -f conftest.$ac_objext conftest.$ac_ext
7214 test "$cf_cv_ncurses_h" != no && break
7218 echo "$as_me:7218: result: $cf_cv_ncurses_h" >&5
7219 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
7221 if test "$cf_cv_ncurses_h" != no ; then
7222 cf_cv_ncurses_header=$cf_cv_ncurses_h
7225 echo "$as_me:7225: checking for $cf_ncuhdr_root include-path" >&5
7226 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
7227 if test "${cf_cv_ncurses_h2+set}" = set; then
7228 echo $ECHO_N "(cached) $ECHO_C" >&6
7231 test -n "$verbose" && echo
7235 # collect the current set of include-directories from compiler flags
7236 cf_header_path_list=""
7237 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7238 for cf_header_path in $CPPFLAGS $CFLAGS
7240 case $cf_header_path in
7242 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7244 test "x$cf_header_path" != "xNONE" && \
7245 test -d "$cf_header_path" && \
7247 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7248 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7249 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
7250 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
7251 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
7252 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"
7255 cf_header_path_list="$cf_header_path_list $cf_search"
7261 # add the variations for the package we are looking for
7265 test "x$prefix" != "xNONE" && \
7266 test -d "$prefix" && \
7268 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7269 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7270 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
7271 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
7272 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
7273 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7276 for cf_subdir_prefix in \
7285 test "x$cf_subdir_prefix" != "x$prefix" && \
7286 test -d "$cf_subdir_prefix" && \
7287 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7288 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7289 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
7290 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
7291 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
7292 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
7293 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"
7298 test "$includedir" != NONE && \
7299 test "$includedir" != "/usr/include" && \
7300 test -d "$includedir" && {
7301 test -d $includedir && cf_search="$cf_search $includedir"
7302 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
7305 test "$oldincludedir" != NONE && \
7306 test "$oldincludedir" != "/usr/include" && \
7307 test -d "$oldincludedir" && {
7308 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7309 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
7312 cf_search="$cf_search $cf_header_path_list"
7314 test -n "$verbose" && echo search path $cf_search
7315 cf_save2_CPPFLAGS="$CPPFLAGS"
7316 for cf_incdir in $cf_search
7319 if test -n "$cf_incdir" ; then
7320 for cf_add_incdir in $cf_incdir
7322 while test $cf_add_incdir != /usr/include
7324 if test -d $cf_add_incdir
7327 if test -n "$CFLAGS$CPPFLAGS" ; then
7328 # a loop is needed to ensure we can add subdirs of existing dirs
7329 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7330 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7331 cf_have_incdir=yes; break
7336 if test "$cf_have_incdir" = no ; then
7337 if test "$cf_add_incdir" = /usr/local/include ; then
7338 if test "$GCC" = yes
7340 cf_save_CPPFLAGS=$CPPFLAGS
7342 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7343 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7345 cat >conftest.$ac_ext <<_ACEOF
7346 #line 7346 "configure"
7347 #include "confdefs.h"
7357 rm -f conftest.$ac_objext
7358 if { (eval echo "$as_me:7358: \"$ac_compile\"") >&5
7359 (eval $ac_compile) 2>&5
7361 echo "$as_me:7361: \$? = $ac_status" >&5
7362 (exit $ac_status); } &&
7363 { ac_try='test -s conftest.$ac_objext'
7364 { (eval echo "$as_me:7364: \"$ac_try\"") >&5
7367 echo "$as_me:7367: \$? = $ac_status" >&5
7368 (exit $ac_status); }; }; then
7371 echo "$as_me: failed program was:" >&5
7372 cat conftest.$ac_ext >&5
7375 rm -f conftest.$ac_objext conftest.$ac_ext
7376 CPPFLAGS=$cf_save_CPPFLAGS
7381 if test "$cf_have_incdir" = no ; then
7382 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7384 echo "${as_me:-configure}:7384: testing adding $cf_add_incdir to include-path ..." 1>&5
7386 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7388 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7389 test "$cf_top_incdir" = "$cf_add_incdir" && break
7390 cf_add_incdir="$cf_top_incdir"
7406 cat >conftest.$ac_ext <<_ACEOF
7407 #line 7407 "configure"
7408 #include "confdefs.h"
7410 #include <$cf_header>
7415 #ifdef NCURSES_VERSION
7417 printf("%s\n", NCURSES_VERSION);
7430 rm -f conftest.$ac_objext
7431 if { (eval echo "$as_me:7431: \"$ac_compile\"") >&5
7432 (eval $ac_compile) 2>&5
7434 echo "$as_me:7434: \$? = $ac_status" >&5
7435 (exit $ac_status); } &&
7436 { ac_try='test -s conftest.$ac_objext'
7437 { (eval echo "$as_me:7437: \"$ac_try\"") >&5
7440 echo "$as_me:7440: \$? = $ac_status" >&5
7441 (exit $ac_status); }; }; then
7442 cf_cv_ncurses_h2=$cf_header
7445 echo "$as_me: failed program was:" >&5
7446 cat conftest.$ac_ext >&5
7449 rm -f conftest.$ac_objext conftest.$ac_ext
7451 if test "$cf_cv_ncurses_h2" != no ; then
7452 cf_cv_ncurses_h2=$cf_incdir/$cf_header
7453 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
7456 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
7458 CPPFLAGS="$cf_save2_CPPFLAGS"
7459 test "$cf_cv_ncurses_h2" != no && break
7461 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:7461: error: not found" >&5
7462 echo "$as_me: error: not found" >&2;}
7463 { (exit 1); exit 1; }; }
7466 echo "$as_me:7466: result: $cf_cv_ncurses_h2" >&5
7467 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
7469 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
7470 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
7471 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
7472 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
7475 if test -n "$cf_1st_incdir" ; then
7476 for cf_add_incdir in $cf_1st_incdir
7478 while test $cf_add_incdir != /usr/include
7480 if test -d $cf_add_incdir
7483 if test -n "$CFLAGS$CPPFLAGS" ; then
7484 # a loop is needed to ensure we can add subdirs of existing dirs
7485 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7486 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7487 cf_have_incdir=yes; break
7492 if test "$cf_have_incdir" = no ; then
7493 if test "$cf_add_incdir" = /usr/local/include ; then
7494 if test "$GCC" = yes
7496 cf_save_CPPFLAGS=$CPPFLAGS
7498 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7499 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7501 cat >conftest.$ac_ext <<_ACEOF
7502 #line 7502 "configure"
7503 #include "confdefs.h"
7513 rm -f conftest.$ac_objext
7514 if { (eval echo "$as_me:7514: \"$ac_compile\"") >&5
7515 (eval $ac_compile) 2>&5
7517 echo "$as_me:7517: \$? = $ac_status" >&5
7518 (exit $ac_status); } &&
7519 { ac_try='test -s conftest.$ac_objext'
7520 { (eval echo "$as_me:7520: \"$ac_try\"") >&5
7523 echo "$as_me:7523: \$? = $ac_status" >&5
7524 (exit $ac_status); }; }; then
7527 echo "$as_me: failed program was:" >&5
7528 cat conftest.$ac_ext >&5
7531 rm -f conftest.$ac_objext conftest.$ac_ext
7532 CPPFLAGS=$cf_save_CPPFLAGS
7537 if test "$cf_have_incdir" = no ; then
7538 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7540 echo "${as_me:-configure}:7540: testing adding $cf_add_incdir to include-path ..." 1>&5
7542 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7544 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7545 test "$cf_top_incdir" = "$cf_add_incdir" && break
7546 cf_add_incdir="$cf_top_incdir"
7559 # Set definitions to allow ifdef'ing for ncurses.h
7561 case $cf_cv_ncurses_header in
7564 cat >>confdefs.h <<\EOF
7565 #define HAVE_NCURSES_H 1
7571 case $cf_cv_ncurses_header in
7572 (ncurses/curses.h|ncurses/ncurses.h)
7574 cat >>confdefs.h <<\EOF
7575 #define HAVE_NCURSES_NCURSES_H 1
7579 (ncursesw/curses.h|ncursesw/ncurses.h)
7581 cat >>confdefs.h <<\EOF
7582 #define HAVE_NCURSESW_NCURSES_H 1
7588 echo "$as_me:7588: checking for terminfo header" >&5
7589 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7590 if test "${cf_cv_term_header+set}" = set; then
7591 echo $ECHO_N "(cached) $ECHO_C" >&6
7594 case ${cf_cv_ncurses_header} in
7595 (*/ncurses.h|*/ncursesw.h)
7596 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7599 cf_term_header=term.h
7603 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7605 cat >conftest.$ac_ext <<_ACEOF
7606 #line 7606 "configure"
7607 #include "confdefs.h"
7609 #include <${cf_cv_ncurses_header:-curses.h}>
7615 int x = auto_left_margin
7620 rm -f conftest.$ac_objext
7621 if { (eval echo "$as_me:7621: \"$ac_compile\"") >&5
7622 (eval $ac_compile) 2>&5
7624 echo "$as_me:7624: \$? = $ac_status" >&5
7625 (exit $ac_status); } &&
7626 { ac_try='test -s conftest.$ac_objext'
7627 { (eval echo "$as_me:7627: \"$ac_try\"") >&5
7630 echo "$as_me:7630: \$? = $ac_status" >&5
7631 (exit $ac_status); }; }; then
7633 cf_cv_term_header="$cf_test"
7635 echo "$as_me: failed program was:" >&5
7636 cat conftest.$ac_ext >&5
7638 cf_cv_term_header=unknown
7641 rm -f conftest.$ac_objext conftest.$ac_ext
7642 test "$cf_cv_term_header" != unknown && break
7646 echo "$as_me:7646: result: $cf_cv_term_header" >&5
7647 echo "${ECHO_T}$cf_cv_term_header" >&6
7649 # Set definitions to allow ifdef'ing to accommodate subdirectories
7651 case $cf_cv_term_header in
7654 cat >>confdefs.h <<\EOF
7655 #define HAVE_TERM_H 1
7661 case $cf_cv_term_header in
7664 cat >>confdefs.h <<\EOF
7665 #define HAVE_NCURSES_TERM_H 1
7671 cat >>confdefs.h <<\EOF
7672 #define HAVE_NCURSESW_TERM_H 1
7678 # some applications need this, but should check for NCURSES_VERSION
7680 cat >>confdefs.h <<\EOF
7684 echo "$as_me:7684: checking for ncurses version" >&5
7685 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
7686 if test "${cf_cv_ncurses_version+set}" = set; then
7687 echo $ECHO_N "(cached) $ECHO_C" >&6
7690 cf_cv_ncurses_version=no
7693 if test "$cross_compiling" = yes; then
7695 # This will not work if the preprocessor splits the line after the
7696 # Autoconf token. The 'unproto' program does that.
7697 cat > conftest.$ac_ext <<EOF
7698 #include <${cf_cv_ncurses_header:-curses.h}>
7700 #ifdef NCURSES_VERSION
7701 Autoconf NCURSES_VERSION
7709 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
7710 { (eval echo "$as_me:7710: \"$cf_try\"") >&5
7713 echo "$as_me:7713: \$? = $ac_status" >&5
7714 (exit $ac_status); }
7715 if test -f conftest.out ; then
7716 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
7717 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
7722 cat >conftest.$ac_ext <<_ACEOF
7723 #line 7723 "configure"
7724 #include "confdefs.h"
7726 #include <${cf_cv_ncurses_header:-curses.h}>
7730 FILE *fp = fopen("$cf_tempfile", "w");
7731 #ifdef NCURSES_VERSION
7732 # ifdef NCURSES_VERSION_PATCH
7733 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
7735 fprintf(fp, "%s\n", NCURSES_VERSION);
7739 fprintf(fp, "old\n");
7744 ${cf_cv_main_return:-return}(0);
7747 rm -f conftest$ac_exeext
7748 if { (eval echo "$as_me:7748: \"$ac_link\"") >&5
7749 (eval $ac_link) 2>&5
7751 echo "$as_me:7751: \$? = $ac_status" >&5
7752 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7753 { (eval echo "$as_me:7753: \"$ac_try\"") >&5
7756 echo "$as_me:7756: \$? = $ac_status" >&5
7757 (exit $ac_status); }; }; then
7759 cf_cv_ncurses_version=`cat $cf_tempfile`
7761 echo "$as_me: program exited with status $ac_status" >&5
7762 echo "$as_me: failed program was:" >&5
7763 cat conftest.$ac_ext >&5
7765 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7770 echo "$as_me:7770: result: $cf_cv_ncurses_version" >&5
7771 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
7772 test "$cf_cv_ncurses_version" = no ||
7773 cat >>confdefs.h <<\EOF
7777 cf_nculib_root=ncursesw
7778 # This works, except for the special case where we find gpm, but
7779 # ncurses is in a nonstandard location via $LIBS, and we really want
7782 cf_ncurses_SAVE="$LIBS"
7783 echo "$as_me:7783: checking for Gpm_Open in -lgpm" >&5
7784 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7785 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7786 echo $ECHO_N "(cached) $ECHO_C" >&6
7788 ac_check_lib_save_LIBS=$LIBS
7790 cat >conftest.$ac_ext <<_ACEOF
7791 #line 7791 "configure"
7792 #include "confdefs.h"
7794 /* Override any gcc2 internal prototype to avoid an error. */
7798 /* We use char because int might match the return type of a gcc2
7799 builtin and then its argument prototype would still apply. */
7809 rm -f conftest.$ac_objext conftest$ac_exeext
7810 if { (eval echo "$as_me:7810: \"$ac_link\"") >&5
7811 (eval $ac_link) 2>&5
7813 echo "$as_me:7813: \$? = $ac_status" >&5
7814 (exit $ac_status); } &&
7815 { ac_try='test -s conftest$ac_exeext'
7816 { (eval echo "$as_me:7816: \"$ac_try\"") >&5
7819 echo "$as_me:7819: \$? = $ac_status" >&5
7820 (exit $ac_status); }; }; then
7821 ac_cv_lib_gpm_Gpm_Open=yes
7823 echo "$as_me: failed program was:" >&5
7824 cat conftest.$ac_ext >&5
7825 ac_cv_lib_gpm_Gpm_Open=no
7827 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7828 LIBS=$ac_check_lib_save_LIBS
7830 echo "$as_me:7830: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7831 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7832 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
7833 echo "$as_me:7833: checking for initscr in -lgpm" >&5
7834 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
7835 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
7836 echo $ECHO_N "(cached) $ECHO_C" >&6
7838 ac_check_lib_save_LIBS=$LIBS
7840 cat >conftest.$ac_ext <<_ACEOF
7841 #line 7841 "configure"
7842 #include "confdefs.h"
7844 /* Override any gcc2 internal prototype to avoid an error. */
7848 /* We use char because int might match the return type of a gcc2
7849 builtin and then its argument prototype would still apply. */
7859 rm -f conftest.$ac_objext conftest$ac_exeext
7860 if { (eval echo "$as_me:7860: \"$ac_link\"") >&5
7861 (eval $ac_link) 2>&5
7863 echo "$as_me:7863: \$? = $ac_status" >&5
7864 (exit $ac_status); } &&
7865 { ac_try='test -s conftest$ac_exeext'
7866 { (eval echo "$as_me:7866: \"$ac_try\"") >&5
7869 echo "$as_me:7869: \$? = $ac_status" >&5
7870 (exit $ac_status); }; }; then
7871 ac_cv_lib_gpm_initscr=yes
7873 echo "$as_me: failed program was:" >&5
7874 cat conftest.$ac_ext >&5
7875 ac_cv_lib_gpm_initscr=no
7877 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7878 LIBS=$ac_check_lib_save_LIBS
7880 echo "$as_me:7880: result: $ac_cv_lib_gpm_initscr" >&5
7881 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
7882 if test $ac_cv_lib_gpm_initscr = yes; then
7883 LIBS="$cf_ncurses_SAVE"
7885 cf_ncurses_LIBS="-lgpm"
7892 # This is only necessary if you are linking against an obsolete
7893 # version of ncurses (but it should do no harm, since it's static).
7894 if test "$cf_nculib_root" = ncurses ; then
7895 echo "$as_me:7895: checking for tgoto in -lmytinfo" >&5
7896 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
7897 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
7898 echo $ECHO_N "(cached) $ECHO_C" >&6
7900 ac_check_lib_save_LIBS=$LIBS
7901 LIBS="-lmytinfo $LIBS"
7902 cat >conftest.$ac_ext <<_ACEOF
7903 #line 7903 "configure"
7904 #include "confdefs.h"
7906 /* Override any gcc2 internal prototype to avoid an error. */
7910 /* We use char because int might match the return type of a gcc2
7911 builtin and then its argument prototype would still apply. */
7921 rm -f conftest.$ac_objext conftest$ac_exeext
7922 if { (eval echo "$as_me:7922: \"$ac_link\"") >&5
7923 (eval $ac_link) 2>&5
7925 echo "$as_me:7925: \$? = $ac_status" >&5
7926 (exit $ac_status); } &&
7927 { ac_try='test -s conftest$ac_exeext'
7928 { (eval echo "$as_me:7928: \"$ac_try\"") >&5
7931 echo "$as_me:7931: \$? = $ac_status" >&5
7932 (exit $ac_status); }; }; then
7933 ac_cv_lib_mytinfo_tgoto=yes
7935 echo "$as_me: failed program was:" >&5
7936 cat conftest.$ac_ext >&5
7937 ac_cv_lib_mytinfo_tgoto=no
7939 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7940 LIBS=$ac_check_lib_save_LIBS
7942 echo "$as_me:7942: result: $ac_cv_lib_mytinfo_tgoto" >&5
7943 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7944 if test $ac_cv_lib_mytinfo_tgoto = yes; then
7945 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
7952 cf_add_libs="$cf_ncurses_LIBS"
7953 # Filter out duplicates - this happens with badly-designed ".pc" files...
7954 for cf_add_1lib in $LIBS
7956 for cf_add_2lib in $cf_add_libs
7958 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7964 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7968 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
7971 cf_add_libs="-l$cf_nculib_root"
7972 # Filter out duplicates - this happens with badly-designed ".pc" files...
7973 for cf_add_1lib in $LIBS
7975 for cf_add_2lib in $cf_add_libs
7977 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7983 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7989 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7991 echo "$as_me:7991: checking for initscr" >&5
7992 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7993 if test "${ac_cv_func_initscr+set}" = set; then
7994 echo $ECHO_N "(cached) $ECHO_C" >&6
7996 cat >conftest.$ac_ext <<_ACEOF
7997 #line 7997 "configure"
7998 #include "confdefs.h"
7999 #define initscr autoconf_temporary
8000 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
8007 /* We use char because int might match the return type of a gcc2
8008 builtin and then its argument prototype would still apply. */
8009 char initscr (void);
8015 /* The GNU C library defines stubs for functions which it implements
8016 to always fail with ENOSYS. Some functions are actually named
8017 something starting with __ and the normal name is an alias. */
8018 #if defined (__stub_initscr) || defined (__stub___initscr)
8019 #error found stub for initscr
8027 rm -f conftest.$ac_objext conftest$ac_exeext
8028 if { (eval echo "$as_me:8028: \"$ac_link\"") >&5
8029 (eval $ac_link) 2>&5
8031 echo "$as_me:8031: \$? = $ac_status" >&5
8032 (exit $ac_status); } &&
8033 { ac_try='test -s conftest$ac_exeext'
8034 { (eval echo "$as_me:8034: \"$ac_try\"") >&5
8037 echo "$as_me:8037: \$? = $ac_status" >&5
8038 (exit $ac_status); }; }; then
8039 ac_cv_func_initscr=yes
8041 echo "$as_me: failed program was:" >&5
8042 cat conftest.$ac_ext >&5
8043 ac_cv_func_initscr=no
8045 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8047 echo "$as_me:8047: result: $ac_cv_func_initscr" >&5
8048 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8049 if test $ac_cv_func_initscr = yes; then
8050 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8053 cf_save_LIBS="$LIBS"
8054 echo "$as_me:8054: checking for initscr in -l$cf_nculib_root" >&5
8055 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8056 LIBS="-l$cf_nculib_root $LIBS"
8057 cat >conftest.$ac_ext <<_ACEOF
8058 #line 8058 "configure"
8059 #include "confdefs.h"
8060 #include <${cf_cv_ncurses_header:-curses.h}>
8069 rm -f conftest.$ac_objext conftest$ac_exeext
8070 if { (eval echo "$as_me:8070: \"$ac_link\"") >&5
8071 (eval $ac_link) 2>&5
8073 echo "$as_me:8073: \$? = $ac_status" >&5
8074 (exit $ac_status); } &&
8075 { ac_try='test -s conftest$ac_exeext'
8076 { (eval echo "$as_me:8076: \"$ac_try\"") >&5
8079 echo "$as_me:8079: \$? = $ac_status" >&5
8080 (exit $ac_status); }; }; then
8081 echo "$as_me:8081: result: yes" >&5
8082 echo "${ECHO_T}yes" >&6
8083 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8086 echo "$as_me: failed program was:" >&5
8087 cat conftest.$ac_ext >&5
8088 echo "$as_me:8088: result: no" >&5
8089 echo "${ECHO_T}no" >&6
8092 cf_library_path_list=""
8093 if test -n "${LDFLAGS}${LIBS}" ; then
8094 for cf_library_path in $LDFLAGS $LIBS
8096 case $cf_library_path in
8098 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8100 test "x$cf_library_path" != "xNONE" && \
8101 test -d "$cf_library_path" && \
8103 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8104 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
8105 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
8106 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
8107 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
8108 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"
8111 cf_library_path_list="$cf_library_path_list $cf_search"
8119 test "x$prefix" != "xNONE" && \
8120 test -d "$prefix" && \
8122 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8123 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
8124 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
8125 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
8126 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
8127 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
8130 for cf_subdir_prefix in \
8139 test "x$cf_subdir_prefix" != "x$prefix" && \
8140 test -d "$cf_subdir_prefix" && \
8141 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8142 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
8143 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
8144 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
8145 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
8146 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
8147 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"
8152 cf_search="$cf_library_path_list $cf_search"
8154 for cf_libdir in $cf_search
8156 echo "$as_me:8156: checking for -l$cf_nculib_root in $cf_libdir" >&5
8157 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
8158 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
8159 cat >conftest.$ac_ext <<_ACEOF
8160 #line 8160 "configure"
8161 #include "confdefs.h"
8162 #include <${cf_cv_ncurses_header:-curses.h}>
8171 rm -f conftest.$ac_objext conftest$ac_exeext
8172 if { (eval echo "$as_me:8172: \"$ac_link\"") >&5
8173 (eval $ac_link) 2>&5
8175 echo "$as_me:8175: \$? = $ac_status" >&5
8176 (exit $ac_status); } &&
8177 { ac_try='test -s conftest$ac_exeext'
8178 { (eval echo "$as_me:8178: \"$ac_try\"") >&5
8181 echo "$as_me:8181: \$? = $ac_status" >&5
8182 (exit $ac_status); }; }; then
8183 echo "$as_me:8183: result: yes" >&5
8184 echo "${ECHO_T}yes" >&6
8185 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8188 echo "$as_me: failed program was:" >&5
8189 cat conftest.$ac_ext >&5
8190 echo "$as_me:8190: result: no" >&5
8191 echo "${ECHO_T}no" >&6
8192 LIBS="$cf_save_LIBS"
8194 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8198 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8202 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
8204 if test $cf_found_library = no ; then
8205 { { echo "$as_me:8205: error: Cannot link $cf_nculib_root library" >&5
8206 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
8207 { (exit 1); exit 1; }; }
8212 if test -n "$cf_ncurses_LIBS" ; then
8213 echo "$as_me:8213: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
8214 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
8215 cf_ncurses_SAVE="$LIBS"
8216 for p in $cf_ncurses_LIBS ; do
8217 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
8218 if test "$q" != "$LIBS" ; then
8222 cat >conftest.$ac_ext <<_ACEOF
8223 #line 8223 "configure"
8224 #include "confdefs.h"
8225 #include <${cf_cv_ncurses_header:-curses.h}>
8229 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8234 rm -f conftest.$ac_objext conftest$ac_exeext
8235 if { (eval echo "$as_me:8235: \"$ac_link\"") >&5
8236 (eval $ac_link) 2>&5
8238 echo "$as_me:8238: \$? = $ac_status" >&5
8239 (exit $ac_status); } &&
8240 { ac_try='test -s conftest$ac_exeext'
8241 { (eval echo "$as_me:8241: \"$ac_try\"") >&5
8244 echo "$as_me:8244: \$? = $ac_status" >&5
8245 (exit $ac_status); }; }; then
8246 echo "$as_me:8246: result: yes" >&5
8247 echo "${ECHO_T}yes" >&6
8249 echo "$as_me: failed program was:" >&5
8250 cat conftest.$ac_ext >&5
8251 echo "$as_me:8251: result: no" >&5
8252 echo "${ECHO_T}no" >&6
8253 LIBS="$cf_ncurses_SAVE"
8255 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8258 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8260 cat >>confdefs.h <<EOF
8261 #define $cf_nculib_ROOT 1
8271 cf_ncuconfig_root=ncurses
8272 cf_have_ncuconfig=no
8274 if test "x${PKG_CONFIG:=none}" != xnone; then
8275 echo "$as_me:8275: checking pkg-config for $cf_ncuconfig_root" >&5
8276 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
8277 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
8278 echo "$as_me:8278: result: yes" >&5
8279 echo "${ECHO_T}yes" >&6
8281 echo "$as_me:8281: checking if the $cf_ncuconfig_root package files work" >&5
8282 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
8283 cf_have_ncuconfig=unknown
8285 cf_save_CPPFLAGS="$CPPFLAGS"
8286 cf_save_LIBS="$LIBS"
8291 cf_new_extra_cppflags=
8293 for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
8295 case $cf_fix_cppflags in
8297 case $cf_add_cflags in
8298 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8299 case $cf_add_cflags in
8301 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8303 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8304 && test -z "${cf_tst_cflags}" \
8305 && cf_fix_cppflags=yes
8307 if test $cf_fix_cppflags = yes ; then
8309 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8310 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8313 elif test "${cf_tst_cflags}" = "\"'" ; then
8315 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8316 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8326 case $cf_add_cflags in
8328 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8330 CPPFLAGS=`echo "$CPPFLAGS" | \
8331 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8332 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8337 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8338 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8345 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8346 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8353 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8354 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8356 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8358 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8359 && test -z "${cf_tst_cflags}" \
8360 && cf_fix_cppflags=no
8365 if test -n "$cf_new_cflags" ; then
8367 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8368 CFLAGS="${CFLAGS}$cf_new_cflags"
8372 if test -n "$cf_new_cppflags" ; then
8374 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8375 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8379 if test -n "$cf_new_extra_cppflags" ; then
8381 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8382 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8386 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
8387 # Filter out duplicates - this happens with badly-designed ".pc" files...
8388 for cf_add_1lib in $LIBS
8390 for cf_add_2lib in $cf_add_libs
8392 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8398 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8402 cat >conftest.$ac_ext <<_ACEOF
8403 #line 8403 "configure"
8404 #include "confdefs.h"
8405 #include <${cf_cv_ncurses_header:-curses.h}>
8409 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8414 rm -f conftest.$ac_objext conftest$ac_exeext
8415 if { (eval echo "$as_me:8415: \"$ac_link\"") >&5
8416 (eval $ac_link) 2>&5
8418 echo "$as_me:8418: \$? = $ac_status" >&5
8419 (exit $ac_status); } &&
8420 { ac_try='test -s conftest$ac_exeext'
8421 { (eval echo "$as_me:8421: \"$ac_try\"") >&5
8424 echo "$as_me:8424: \$? = $ac_status" >&5
8425 (exit $ac_status); }; }; then
8426 if test "$cross_compiling" = yes; then
8427 cf_have_ncuconfig=maybe
8429 cat >conftest.$ac_ext <<_ACEOF
8430 #line 8430 "configure"
8431 #include "confdefs.h"
8432 #include <${cf_cv_ncurses_header:-curses.h}>
8434 { char *xx = curses_version(); return (xx == 0); }
8436 rm -f conftest$ac_exeext
8437 if { (eval echo "$as_me:8437: \"$ac_link\"") >&5
8438 (eval $ac_link) 2>&5
8440 echo "$as_me:8440: \$? = $ac_status" >&5
8441 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8442 { (eval echo "$as_me:8442: \"$ac_try\"") >&5
8445 echo "$as_me:8445: \$? = $ac_status" >&5
8446 (exit $ac_status); }; }; then
8447 cf_have_ncuconfig=yes
8449 echo "$as_me: program exited with status $ac_status" >&5
8450 echo "$as_me: failed program was:" >&5
8451 cat conftest.$ac_ext >&5
8452 cf_have_ncuconfig=no
8454 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8457 echo "$as_me: failed program was:" >&5
8458 cat conftest.$ac_ext >&5
8459 cf_have_ncuconfig=no
8461 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8462 echo "$as_me:8462: result: $cf_have_ncuconfig" >&5
8463 echo "${ECHO_T}$cf_have_ncuconfig" >&6
8464 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
8465 if test "$cf_have_ncuconfig" != "yes"
8467 CPPFLAGS="$cf_save_CPPFLAGS"
8468 LIBS="$cf_save_LIBS"
8469 NCURSES_CONFIG_PKG=none
8472 cat >>confdefs.h <<\EOF
8476 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
8478 echo "$as_me:8478: checking for terminfo header" >&5
8479 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8480 if test "${cf_cv_term_header+set}" = set; then
8481 echo $ECHO_N "(cached) $ECHO_C" >&6
8484 case ${cf_cv_ncurses_header} in
8485 (*/ncurses.h|*/ncursesw.h)
8486 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8489 cf_term_header=term.h
8493 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8495 cat >conftest.$ac_ext <<_ACEOF
8496 #line 8496 "configure"
8497 #include "confdefs.h"
8499 #include <${cf_cv_ncurses_header:-curses.h}>
8505 int x = auto_left_margin
8510 rm -f conftest.$ac_objext
8511 if { (eval echo "$as_me:8511: \"$ac_compile\"") >&5
8512 (eval $ac_compile) 2>&5
8514 echo "$as_me:8514: \$? = $ac_status" >&5
8515 (exit $ac_status); } &&
8516 { ac_try='test -s conftest.$ac_objext'
8517 { (eval echo "$as_me:8517: \"$ac_try\"") >&5
8520 echo "$as_me:8520: \$? = $ac_status" >&5
8521 (exit $ac_status); }; }; then
8523 cf_cv_term_header="$cf_test"
8525 echo "$as_me: failed program was:" >&5
8526 cat conftest.$ac_ext >&5
8528 cf_cv_term_header=unknown
8531 rm -f conftest.$ac_objext conftest.$ac_ext
8532 test "$cf_cv_term_header" != unknown && break
8536 echo "$as_me:8536: result: $cf_cv_term_header" >&5
8537 echo "${ECHO_T}$cf_cv_term_header" >&6
8539 # Set definitions to allow ifdef'ing to accommodate subdirectories
8541 case $cf_cv_term_header in
8544 cat >>confdefs.h <<\EOF
8545 #define HAVE_TERM_H 1
8551 case $cf_cv_term_header in
8554 cat >>confdefs.h <<\EOF
8555 #define HAVE_NCURSES_TERM_H 1
8561 cat >>confdefs.h <<\EOF
8562 #define HAVE_NCURSESW_TERM_H 1
8571 echo "$as_me:8571: result: no" >&5
8572 echo "${ECHO_T}no" >&6
8573 NCURSES_CONFIG_PKG=none
8576 NCURSES_CONFIG_PKG=none
8579 if test "x$cf_have_ncuconfig" = "xno"; then
8580 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
8582 if test -n "$ac_tool_prefix"; then
8583 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8585 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8586 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8587 echo "$as_me:8587: checking for $ac_word" >&5
8588 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8589 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8590 echo $ECHO_N "(cached) $ECHO_C" >&6
8592 if test -n "$NCURSES_CONFIG"; then
8593 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8595 ac_save_IFS=$IFS; IFS=$ac_path_separator
8597 for ac_dir in $ac_dummy; do
8599 test -z "$ac_dir" && ac_dir=.
8600 $as_executable_p "$ac_dir/$ac_word" || continue
8601 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8602 echo "$as_me:8602: found $ac_dir/$ac_word" >&5
8608 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8609 if test -n "$NCURSES_CONFIG"; then
8610 echo "$as_me:8610: result: $NCURSES_CONFIG" >&5
8611 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8613 echo "$as_me:8613: result: no" >&5
8614 echo "${ECHO_T}no" >&6
8617 test -n "$NCURSES_CONFIG" && break
8620 if test -z "$NCURSES_CONFIG"; then
8621 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8622 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8624 # Extract the first word of "$ac_prog", so it can be a program name with args.
8625 set dummy $ac_prog; ac_word=$2
8626 echo "$as_me:8626: checking for $ac_word" >&5
8627 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8628 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8629 echo $ECHO_N "(cached) $ECHO_C" >&6
8631 if test -n "$ac_ct_NCURSES_CONFIG"; then
8632 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8634 ac_save_IFS=$IFS; IFS=$ac_path_separator
8636 for ac_dir in $ac_dummy; do
8638 test -z "$ac_dir" && ac_dir=.
8639 $as_executable_p "$ac_dir/$ac_word" || continue
8640 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8641 echo "$as_me:8641: found $ac_dir/$ac_word" >&5
8647 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8648 if test -n "$ac_ct_NCURSES_CONFIG"; then
8649 echo "$as_me:8649: result: $ac_ct_NCURSES_CONFIG" >&5
8650 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8652 echo "$as_me:8652: result: no" >&5
8653 echo "${ECHO_T}no" >&6
8656 test -n "$ac_ct_NCURSES_CONFIG" && break
8658 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8660 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8663 if test "$NCURSES_CONFIG" != none ; then
8668 cf_new_extra_cppflags=
8670 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
8672 case $cf_fix_cppflags in
8674 case $cf_add_cflags in
8675 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8676 case $cf_add_cflags in
8678 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8680 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8681 && test -z "${cf_tst_cflags}" \
8682 && cf_fix_cppflags=yes
8684 if test $cf_fix_cppflags = yes ; then
8686 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8687 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8690 elif test "${cf_tst_cflags}" = "\"'" ; then
8692 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8693 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8703 case $cf_add_cflags in
8705 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8707 CPPFLAGS=`echo "$CPPFLAGS" | \
8708 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8709 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8714 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8715 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8722 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8723 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8730 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8731 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8733 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8735 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8736 && test -z "${cf_tst_cflags}" \
8737 && cf_fix_cppflags=no
8742 if test -n "$cf_new_cflags" ; then
8744 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8745 CFLAGS="${CFLAGS}$cf_new_cflags"
8749 if test -n "$cf_new_cppflags" ; then
8751 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8752 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8756 if test -n "$cf_new_extra_cppflags" ; then
8758 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8759 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8763 cf_add_libs="`$NCURSES_CONFIG --libs`"
8764 # Filter out duplicates - this happens with badly-designed ".pc" files...
8765 for cf_add_1lib in $LIBS
8767 for cf_add_2lib in $cf_add_libs
8769 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8775 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8779 # even with config script, some packages use no-override for curses.h
8781 echo "$as_me:8781: checking if we have identified curses headers" >&5
8782 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8783 if test "${cf_cv_ncurses_header+set}" = set; then
8784 echo $ECHO_N "(cached) $ECHO_C" >&6
8787 cf_cv_ncurses_header=none
8789 ncurses.h ncurses/ncurses.h \
8790 curses.h ncurses/curses.h
8792 cat >conftest.$ac_ext <<_ACEOF
8793 #line 8793 "configure"
8794 #include "confdefs.h"
8795 #include <${cf_header}>
8799 initscr(); tgoto("?", 0,0)
8804 rm -f conftest.$ac_objext
8805 if { (eval echo "$as_me:8805: \"$ac_compile\"") >&5
8806 (eval $ac_compile) 2>&5
8808 echo "$as_me:8808: \$? = $ac_status" >&5
8809 (exit $ac_status); } &&
8810 { ac_try='test -s conftest.$ac_objext'
8811 { (eval echo "$as_me:8811: \"$ac_try\"") >&5
8814 echo "$as_me:8814: \$? = $ac_status" >&5
8815 (exit $ac_status); }; }; then
8816 cf_cv_ncurses_header=$cf_header; break
8818 echo "$as_me: failed program was:" >&5
8819 cat conftest.$ac_ext >&5
8821 rm -f conftest.$ac_objext conftest.$ac_ext
8825 echo "$as_me:8825: result: $cf_cv_ncurses_header" >&5
8826 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8828 if test "$cf_cv_ncurses_header" = none ; then
8829 { { echo "$as_me:8829: error: No curses header-files found" >&5
8830 echo "$as_me: error: No curses header-files found" >&2;}
8831 { (exit 1); exit 1; }; }
8834 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8836 for ac_header in $cf_cv_ncurses_header
8838 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8839 echo "$as_me:8839: checking for $ac_header" >&5
8840 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8841 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8842 echo $ECHO_N "(cached) $ECHO_C" >&6
8844 cat >conftest.$ac_ext <<_ACEOF
8845 #line 8845 "configure"
8846 #include "confdefs.h"
8847 #include <$ac_header>
8849 if { (eval echo "$as_me:8849: \"$ac_cpp conftest.$ac_ext\"") >&5
8850 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8852 egrep -v '^ *\+' conftest.er1 >conftest.err
8854 cat conftest.err >&5
8855 echo "$as_me:8855: \$? = $ac_status" >&5
8856 (exit $ac_status); } >/dev/null; then
8857 if test -s conftest.err; then
8858 ac_cpp_err=$ac_c_preproc_warn_flag
8865 if test -z "$ac_cpp_err"; then
8866 eval "$as_ac_Header=yes"
8868 echo "$as_me: failed program was:" >&5
8869 cat conftest.$ac_ext >&5
8870 eval "$as_ac_Header=no"
8872 rm -f conftest.err conftest.$ac_ext
8874 echo "$as_me:8874: result: `eval echo '${'$as_ac_Header'}'`" >&5
8875 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8876 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8877 cat >>confdefs.h <<EOF
8878 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8884 cat >>confdefs.h <<\EOF
8888 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8890 cat >>confdefs.h <<EOF
8891 #define $cf_nculib_ROOT 1
8894 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8898 cf_ncuhdr_root=ncurses
8900 test -n "$cf_cv_curses_dir" && \
8901 test "$cf_cv_curses_dir" != "no" && { \
8903 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8904 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8906 while test $cf_add_incdir != /usr/include
8908 if test -d $cf_add_incdir
8911 if test -n "$CFLAGS$CPPFLAGS" ; then
8912 # a loop is needed to ensure we can add subdirs of existing dirs
8913 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8914 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8915 cf_have_incdir=yes; break
8920 if test "$cf_have_incdir" = no ; then
8921 if test "$cf_add_incdir" = /usr/local/include ; then
8922 if test "$GCC" = yes
8924 cf_save_CPPFLAGS=$CPPFLAGS
8926 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8927 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8929 cat >conftest.$ac_ext <<_ACEOF
8930 #line 8930 "configure"
8931 #include "confdefs.h"
8941 rm -f conftest.$ac_objext
8942 if { (eval echo "$as_me:8942: \"$ac_compile\"") >&5
8943 (eval $ac_compile) 2>&5
8945 echo "$as_me:8945: \$? = $ac_status" >&5
8946 (exit $ac_status); } &&
8947 { ac_try='test -s conftest.$ac_objext'
8948 { (eval echo "$as_me:8948: \"$ac_try\"") >&5
8951 echo "$as_me:8951: \$? = $ac_status" >&5
8952 (exit $ac_status); }; }; then
8955 echo "$as_me: failed program was:" >&5
8956 cat conftest.$ac_ext >&5
8959 rm -f conftest.$ac_objext conftest.$ac_ext
8960 CPPFLAGS=$cf_save_CPPFLAGS
8965 if test "$cf_have_incdir" = no ; then
8966 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8968 echo "${as_me:-configure}:8968: testing adding $cf_add_incdir to include-path ..." 1>&5
8970 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8972 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8973 test "$cf_top_incdir" = "$cf_add_incdir" && break
8974 cf_add_incdir="$cf_top_incdir"
8987 echo "$as_me:8987: checking for $cf_ncuhdr_root header in include-path" >&5
8988 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8989 if test "${cf_cv_ncurses_h+set}" = set; then
8990 echo $ECHO_N "(cached) $ECHO_C" >&6
8993 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8994 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8995 for cf_header in $cf_header_list
8998 cat >conftest.$ac_ext <<_ACEOF
8999 #line 8999 "configure"
9000 #include "confdefs.h"
9002 #include <$cf_header>
9007 #ifdef NCURSES_VERSION
9009 printf("%s\n", NCURSES_VERSION);
9022 rm -f conftest.$ac_objext
9023 if { (eval echo "$as_me:9023: \"$ac_compile\"") >&5
9024 (eval $ac_compile) 2>&5
9026 echo "$as_me:9026: \$? = $ac_status" >&5
9027 (exit $ac_status); } &&
9028 { ac_try='test -s conftest.$ac_objext'
9029 { (eval echo "$as_me:9029: \"$ac_try\"") >&5
9032 echo "$as_me:9032: \$? = $ac_status" >&5
9033 (exit $ac_status); }; }; then
9034 cf_cv_ncurses_h=$cf_header
9037 echo "$as_me: failed program was:" >&5
9038 cat conftest.$ac_ext >&5
9041 rm -f conftest.$ac_objext conftest.$ac_ext
9043 test "$cf_cv_ncurses_h" != no && break
9047 echo "$as_me:9047: result: $cf_cv_ncurses_h" >&5
9048 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
9050 if test "$cf_cv_ncurses_h" != no ; then
9051 cf_cv_ncurses_header=$cf_cv_ncurses_h
9054 echo "$as_me:9054: checking for $cf_ncuhdr_root include-path" >&5
9055 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
9056 if test "${cf_cv_ncurses_h2+set}" = set; then
9057 echo $ECHO_N "(cached) $ECHO_C" >&6
9060 test -n "$verbose" && echo
9064 # collect the current set of include-directories from compiler flags
9065 cf_header_path_list=""
9066 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9067 for cf_header_path in $CPPFLAGS $CFLAGS
9069 case $cf_header_path in
9071 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9073 test "x$cf_header_path" != "xNONE" && \
9074 test -d "$cf_header_path" && \
9076 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
9077 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
9078 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
9079 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
9080 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
9081 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"
9084 cf_header_path_list="$cf_header_path_list $cf_search"
9090 # add the variations for the package we are looking for
9094 test "x$prefix" != "xNONE" && \
9095 test -d "$prefix" && \
9097 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
9098 test -d $prefix/include && cf_search="$cf_search $prefix/include"
9099 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
9100 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
9101 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
9102 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9105 for cf_subdir_prefix in \
9114 test "x$cf_subdir_prefix" != "x$prefix" && \
9115 test -d "$cf_subdir_prefix" && \
9116 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9117 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
9118 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
9119 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
9120 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
9121 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
9122 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"
9127 test "$includedir" != NONE && \
9128 test "$includedir" != "/usr/include" && \
9129 test -d "$includedir" && {
9130 test -d $includedir && cf_search="$cf_search $includedir"
9131 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
9134 test "$oldincludedir" != NONE && \
9135 test "$oldincludedir" != "/usr/include" && \
9136 test -d "$oldincludedir" && {
9137 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
9138 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
9141 cf_search="$cf_search $cf_header_path_list"
9143 test -n "$verbose" && echo search path $cf_search
9144 cf_save2_CPPFLAGS="$CPPFLAGS"
9145 for cf_incdir in $cf_search
9148 if test -n "$cf_incdir" ; then
9149 for cf_add_incdir in $cf_incdir
9151 while test $cf_add_incdir != /usr/include
9153 if test -d $cf_add_incdir
9156 if test -n "$CFLAGS$CPPFLAGS" ; then
9157 # a loop is needed to ensure we can add subdirs of existing dirs
9158 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9159 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9160 cf_have_incdir=yes; break
9165 if test "$cf_have_incdir" = no ; then
9166 if test "$cf_add_incdir" = /usr/local/include ; then
9167 if test "$GCC" = yes
9169 cf_save_CPPFLAGS=$CPPFLAGS
9171 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9172 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9174 cat >conftest.$ac_ext <<_ACEOF
9175 #line 9175 "configure"
9176 #include "confdefs.h"
9186 rm -f conftest.$ac_objext
9187 if { (eval echo "$as_me:9187: \"$ac_compile\"") >&5
9188 (eval $ac_compile) 2>&5
9190 echo "$as_me:9190: \$? = $ac_status" >&5
9191 (exit $ac_status); } &&
9192 { ac_try='test -s conftest.$ac_objext'
9193 { (eval echo "$as_me:9193: \"$ac_try\"") >&5
9196 echo "$as_me:9196: \$? = $ac_status" >&5
9197 (exit $ac_status); }; }; then
9200 echo "$as_me: failed program was:" >&5
9201 cat conftest.$ac_ext >&5
9204 rm -f conftest.$ac_objext conftest.$ac_ext
9205 CPPFLAGS=$cf_save_CPPFLAGS
9210 if test "$cf_have_incdir" = no ; then
9211 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9213 echo "${as_me:-configure}:9213: testing adding $cf_add_incdir to include-path ..." 1>&5
9215 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9217 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9218 test "$cf_top_incdir" = "$cf_add_incdir" && break
9219 cf_add_incdir="$cf_top_incdir"
9235 cat >conftest.$ac_ext <<_ACEOF
9236 #line 9236 "configure"
9237 #include "confdefs.h"
9239 #include <$cf_header>
9244 #ifdef NCURSES_VERSION
9246 printf("%s\n", NCURSES_VERSION);
9259 rm -f conftest.$ac_objext
9260 if { (eval echo "$as_me:9260: \"$ac_compile\"") >&5
9261 (eval $ac_compile) 2>&5
9263 echo "$as_me:9263: \$? = $ac_status" >&5
9264 (exit $ac_status); } &&
9265 { ac_try='test -s conftest.$ac_objext'
9266 { (eval echo "$as_me:9266: \"$ac_try\"") >&5
9269 echo "$as_me:9269: \$? = $ac_status" >&5
9270 (exit $ac_status); }; }; then
9271 cf_cv_ncurses_h2=$cf_header
9274 echo "$as_me: failed program was:" >&5
9275 cat conftest.$ac_ext >&5
9278 rm -f conftest.$ac_objext conftest.$ac_ext
9280 if test "$cf_cv_ncurses_h2" != no ; then
9281 cf_cv_ncurses_h2=$cf_incdir/$cf_header
9282 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
9285 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
9287 CPPFLAGS="$cf_save2_CPPFLAGS"
9288 test "$cf_cv_ncurses_h2" != no && break
9290 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9290: error: not found" >&5
9291 echo "$as_me: error: not found" >&2;}
9292 { (exit 1); exit 1; }; }
9295 echo "$as_me:9295: result: $cf_cv_ncurses_h2" >&5
9296 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
9298 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
9299 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
9300 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
9301 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
9304 if test -n "$cf_1st_incdir" ; then
9305 for cf_add_incdir in $cf_1st_incdir
9307 while test $cf_add_incdir != /usr/include
9309 if test -d $cf_add_incdir
9312 if test -n "$CFLAGS$CPPFLAGS" ; then
9313 # a loop is needed to ensure we can add subdirs of existing dirs
9314 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9315 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9316 cf_have_incdir=yes; break
9321 if test "$cf_have_incdir" = no ; then
9322 if test "$cf_add_incdir" = /usr/local/include ; then
9323 if test "$GCC" = yes
9325 cf_save_CPPFLAGS=$CPPFLAGS
9327 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9328 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9330 cat >conftest.$ac_ext <<_ACEOF
9331 #line 9331 "configure"
9332 #include "confdefs.h"
9342 rm -f conftest.$ac_objext
9343 if { (eval echo "$as_me:9343: \"$ac_compile\"") >&5
9344 (eval $ac_compile) 2>&5
9346 echo "$as_me:9346: \$? = $ac_status" >&5
9347 (exit $ac_status); } &&
9348 { ac_try='test -s conftest.$ac_objext'
9349 { (eval echo "$as_me:9349: \"$ac_try\"") >&5
9352 echo "$as_me:9352: \$? = $ac_status" >&5
9353 (exit $ac_status); }; }; then
9356 echo "$as_me: failed program was:" >&5
9357 cat conftest.$ac_ext >&5
9360 rm -f conftest.$ac_objext conftest.$ac_ext
9361 CPPFLAGS=$cf_save_CPPFLAGS
9366 if test "$cf_have_incdir" = no ; then
9367 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9369 echo "${as_me:-configure}:9369: testing adding $cf_add_incdir to include-path ..." 1>&5
9371 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9373 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9374 test "$cf_top_incdir" = "$cf_add_incdir" && break
9375 cf_add_incdir="$cf_top_incdir"
9388 # Set definitions to allow ifdef'ing for ncurses.h
9390 case $cf_cv_ncurses_header in
9393 cat >>confdefs.h <<\EOF
9394 #define HAVE_NCURSES_H 1
9400 case $cf_cv_ncurses_header in
9401 (ncurses/curses.h|ncurses/ncurses.h)
9403 cat >>confdefs.h <<\EOF
9404 #define HAVE_NCURSES_NCURSES_H 1
9408 (ncursesw/curses.h|ncursesw/ncurses.h)
9410 cat >>confdefs.h <<\EOF
9411 #define HAVE_NCURSESW_NCURSES_H 1
9417 echo "$as_me:9417: checking for terminfo header" >&5
9418 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9419 if test "${cf_cv_term_header+set}" = set; then
9420 echo $ECHO_N "(cached) $ECHO_C" >&6
9423 case ${cf_cv_ncurses_header} in
9424 (*/ncurses.h|*/ncursesw.h)
9425 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9428 cf_term_header=term.h
9432 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9434 cat >conftest.$ac_ext <<_ACEOF
9435 #line 9435 "configure"
9436 #include "confdefs.h"
9438 #include <${cf_cv_ncurses_header:-curses.h}>
9444 int x = auto_left_margin
9449 rm -f conftest.$ac_objext
9450 if { (eval echo "$as_me:9450: \"$ac_compile\"") >&5
9451 (eval $ac_compile) 2>&5
9453 echo "$as_me:9453: \$? = $ac_status" >&5
9454 (exit $ac_status); } &&
9455 { ac_try='test -s conftest.$ac_objext'
9456 { (eval echo "$as_me:9456: \"$ac_try\"") >&5
9459 echo "$as_me:9459: \$? = $ac_status" >&5
9460 (exit $ac_status); }; }; then
9462 cf_cv_term_header="$cf_test"
9464 echo "$as_me: failed program was:" >&5
9465 cat conftest.$ac_ext >&5
9467 cf_cv_term_header=unknown
9470 rm -f conftest.$ac_objext conftest.$ac_ext
9471 test "$cf_cv_term_header" != unknown && break
9475 echo "$as_me:9475: result: $cf_cv_term_header" >&5
9476 echo "${ECHO_T}$cf_cv_term_header" >&6
9478 # Set definitions to allow ifdef'ing to accommodate subdirectories
9480 case $cf_cv_term_header in
9483 cat >>confdefs.h <<\EOF
9484 #define HAVE_TERM_H 1
9490 case $cf_cv_term_header in
9493 cat >>confdefs.h <<\EOF
9494 #define HAVE_NCURSES_TERM_H 1
9500 cat >>confdefs.h <<\EOF
9501 #define HAVE_NCURSESW_TERM_H 1
9507 # some applications need this, but should check for NCURSES_VERSION
9509 cat >>confdefs.h <<\EOF
9513 echo "$as_me:9513: checking for ncurses version" >&5
9514 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9515 if test "${cf_cv_ncurses_version+set}" = set; then
9516 echo $ECHO_N "(cached) $ECHO_C" >&6
9519 cf_cv_ncurses_version=no
9522 if test "$cross_compiling" = yes; then
9524 # This will not work if the preprocessor splits the line after the
9525 # Autoconf token. The 'unproto' program does that.
9526 cat > conftest.$ac_ext <<EOF
9527 #include <${cf_cv_ncurses_header:-curses.h}>
9529 #ifdef NCURSES_VERSION
9530 Autoconf NCURSES_VERSION
9538 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9539 { (eval echo "$as_me:9539: \"$cf_try\"") >&5
9542 echo "$as_me:9542: \$? = $ac_status" >&5
9543 (exit $ac_status); }
9544 if test -f conftest.out ; then
9545 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
9546 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9551 cat >conftest.$ac_ext <<_ACEOF
9552 #line 9552 "configure"
9553 #include "confdefs.h"
9555 #include <${cf_cv_ncurses_header:-curses.h}>
9559 FILE *fp = fopen("$cf_tempfile", "w");
9560 #ifdef NCURSES_VERSION
9561 # ifdef NCURSES_VERSION_PATCH
9562 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9564 fprintf(fp, "%s\n", NCURSES_VERSION);
9568 fprintf(fp, "old\n");
9573 ${cf_cv_main_return:-return}(0);
9576 rm -f conftest$ac_exeext
9577 if { (eval echo "$as_me:9577: \"$ac_link\"") >&5
9578 (eval $ac_link) 2>&5
9580 echo "$as_me:9580: \$? = $ac_status" >&5
9581 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9582 { (eval echo "$as_me:9582: \"$ac_try\"") >&5
9585 echo "$as_me:9585: \$? = $ac_status" >&5
9586 (exit $ac_status); }; }; then
9588 cf_cv_ncurses_version=`cat $cf_tempfile`
9590 echo "$as_me: program exited with status $ac_status" >&5
9591 echo "$as_me: failed program was:" >&5
9592 cat conftest.$ac_ext >&5
9594 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9599 echo "$as_me:9599: result: $cf_cv_ncurses_version" >&5
9600 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9601 test "$cf_cv_ncurses_version" = no ||
9602 cat >>confdefs.h <<\EOF
9606 cf_nculib_root=ncurses
9607 # This works, except for the special case where we find gpm, but
9608 # ncurses is in a nonstandard location via $LIBS, and we really want
9611 cf_ncurses_SAVE="$LIBS"
9612 echo "$as_me:9612: checking for Gpm_Open in -lgpm" >&5
9613 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9614 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9615 echo $ECHO_N "(cached) $ECHO_C" >&6
9617 ac_check_lib_save_LIBS=$LIBS
9619 cat >conftest.$ac_ext <<_ACEOF
9620 #line 9620 "configure"
9621 #include "confdefs.h"
9623 /* Override any gcc2 internal prototype to avoid an error. */
9627 /* We use char because int might match the return type of a gcc2
9628 builtin and then its argument prototype would still apply. */
9638 rm -f conftest.$ac_objext conftest$ac_exeext
9639 if { (eval echo "$as_me:9639: \"$ac_link\"") >&5
9640 (eval $ac_link) 2>&5
9642 echo "$as_me:9642: \$? = $ac_status" >&5
9643 (exit $ac_status); } &&
9644 { ac_try='test -s conftest$ac_exeext'
9645 { (eval echo "$as_me:9645: \"$ac_try\"") >&5
9648 echo "$as_me:9648: \$? = $ac_status" >&5
9649 (exit $ac_status); }; }; then
9650 ac_cv_lib_gpm_Gpm_Open=yes
9652 echo "$as_me: failed program was:" >&5
9653 cat conftest.$ac_ext >&5
9654 ac_cv_lib_gpm_Gpm_Open=no
9656 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9657 LIBS=$ac_check_lib_save_LIBS
9659 echo "$as_me:9659: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9660 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9661 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
9662 echo "$as_me:9662: checking for initscr in -lgpm" >&5
9663 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9664 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9665 echo $ECHO_N "(cached) $ECHO_C" >&6
9667 ac_check_lib_save_LIBS=$LIBS
9669 cat >conftest.$ac_ext <<_ACEOF
9670 #line 9670 "configure"
9671 #include "confdefs.h"
9673 /* Override any gcc2 internal prototype to avoid an error. */
9677 /* We use char because int might match the return type of a gcc2
9678 builtin and then its argument prototype would still apply. */
9688 rm -f conftest.$ac_objext conftest$ac_exeext
9689 if { (eval echo "$as_me:9689: \"$ac_link\"") >&5
9690 (eval $ac_link) 2>&5
9692 echo "$as_me:9692: \$? = $ac_status" >&5
9693 (exit $ac_status); } &&
9694 { ac_try='test -s conftest$ac_exeext'
9695 { (eval echo "$as_me:9695: \"$ac_try\"") >&5
9698 echo "$as_me:9698: \$? = $ac_status" >&5
9699 (exit $ac_status); }; }; then
9700 ac_cv_lib_gpm_initscr=yes
9702 echo "$as_me: failed program was:" >&5
9703 cat conftest.$ac_ext >&5
9704 ac_cv_lib_gpm_initscr=no
9706 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9707 LIBS=$ac_check_lib_save_LIBS
9709 echo "$as_me:9709: result: $ac_cv_lib_gpm_initscr" >&5
9710 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9711 if test $ac_cv_lib_gpm_initscr = yes; then
9712 LIBS="$cf_ncurses_SAVE"
9714 cf_ncurses_LIBS="-lgpm"
9721 # This is only necessary if you are linking against an obsolete
9722 # version of ncurses (but it should do no harm, since it's static).
9723 if test "$cf_nculib_root" = ncurses ; then
9724 echo "$as_me:9724: checking for tgoto in -lmytinfo" >&5
9725 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9726 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9727 echo $ECHO_N "(cached) $ECHO_C" >&6
9729 ac_check_lib_save_LIBS=$LIBS
9730 LIBS="-lmytinfo $LIBS"
9731 cat >conftest.$ac_ext <<_ACEOF
9732 #line 9732 "configure"
9733 #include "confdefs.h"
9735 /* Override any gcc2 internal prototype to avoid an error. */
9739 /* We use char because int might match the return type of a gcc2
9740 builtin and then its argument prototype would still apply. */
9750 rm -f conftest.$ac_objext conftest$ac_exeext
9751 if { (eval echo "$as_me:9751: \"$ac_link\"") >&5
9752 (eval $ac_link) 2>&5
9754 echo "$as_me:9754: \$? = $ac_status" >&5
9755 (exit $ac_status); } &&
9756 { ac_try='test -s conftest$ac_exeext'
9757 { (eval echo "$as_me:9757: \"$ac_try\"") >&5
9760 echo "$as_me:9760: \$? = $ac_status" >&5
9761 (exit $ac_status); }; }; then
9762 ac_cv_lib_mytinfo_tgoto=yes
9764 echo "$as_me: failed program was:" >&5
9765 cat conftest.$ac_ext >&5
9766 ac_cv_lib_mytinfo_tgoto=no
9768 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9769 LIBS=$ac_check_lib_save_LIBS
9771 echo "$as_me:9771: result: $ac_cv_lib_mytinfo_tgoto" >&5
9772 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9773 if test $ac_cv_lib_mytinfo_tgoto = yes; then
9774 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9781 cf_add_libs="$cf_ncurses_LIBS"
9782 # Filter out duplicates - this happens with badly-designed ".pc" files...
9783 for cf_add_1lib in $LIBS
9785 for cf_add_2lib in $cf_add_libs
9787 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9793 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9797 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
9800 cf_add_libs="-l$cf_nculib_root"
9801 # Filter out duplicates - this happens with badly-designed ".pc" files...
9802 for cf_add_1lib in $LIBS
9804 for cf_add_2lib in $cf_add_libs
9806 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9812 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9818 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9820 echo "$as_me:9820: checking for initscr" >&5
9821 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9822 if test "${ac_cv_func_initscr+set}" = set; then
9823 echo $ECHO_N "(cached) $ECHO_C" >&6
9825 cat >conftest.$ac_ext <<_ACEOF
9826 #line 9826 "configure"
9827 #include "confdefs.h"
9828 #define initscr autoconf_temporary
9829 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9836 /* We use char because int might match the return type of a gcc2
9837 builtin and then its argument prototype would still apply. */
9838 char initscr (void);
9844 /* The GNU C library defines stubs for functions which it implements
9845 to always fail with ENOSYS. Some functions are actually named
9846 something starting with __ and the normal name is an alias. */
9847 #if defined (__stub_initscr) || defined (__stub___initscr)
9848 #error found stub for initscr
9856 rm -f conftest.$ac_objext conftest$ac_exeext
9857 if { (eval echo "$as_me:9857: \"$ac_link\"") >&5
9858 (eval $ac_link) 2>&5
9860 echo "$as_me:9860: \$? = $ac_status" >&5
9861 (exit $ac_status); } &&
9862 { ac_try='test -s conftest$ac_exeext'
9863 { (eval echo "$as_me:9863: \"$ac_try\"") >&5
9866 echo "$as_me:9866: \$? = $ac_status" >&5
9867 (exit $ac_status); }; }; then
9868 ac_cv_func_initscr=yes
9870 echo "$as_me: failed program was:" >&5
9871 cat conftest.$ac_ext >&5
9872 ac_cv_func_initscr=no
9874 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9876 echo "$as_me:9876: result: $ac_cv_func_initscr" >&5
9877 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9878 if test $ac_cv_func_initscr = yes; then
9879 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9882 cf_save_LIBS="$LIBS"
9883 echo "$as_me:9883: checking for initscr in -l$cf_nculib_root" >&5
9884 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9885 LIBS="-l$cf_nculib_root $LIBS"
9886 cat >conftest.$ac_ext <<_ACEOF
9887 #line 9887 "configure"
9888 #include "confdefs.h"
9889 #include <${cf_cv_ncurses_header:-curses.h}>
9898 rm -f conftest.$ac_objext conftest$ac_exeext
9899 if { (eval echo "$as_me:9899: \"$ac_link\"") >&5
9900 (eval $ac_link) 2>&5
9902 echo "$as_me:9902: \$? = $ac_status" >&5
9903 (exit $ac_status); } &&
9904 { ac_try='test -s conftest$ac_exeext'
9905 { (eval echo "$as_me:9905: \"$ac_try\"") >&5
9908 echo "$as_me:9908: \$? = $ac_status" >&5
9909 (exit $ac_status); }; }; then
9910 echo "$as_me:9910: result: yes" >&5
9911 echo "${ECHO_T}yes" >&6
9912 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9915 echo "$as_me: failed program was:" >&5
9916 cat conftest.$ac_ext >&5
9917 echo "$as_me:9917: result: no" >&5
9918 echo "${ECHO_T}no" >&6
9921 cf_library_path_list=""
9922 if test -n "${LDFLAGS}${LIBS}" ; then
9923 for cf_library_path in $LDFLAGS $LIBS
9925 case $cf_library_path in
9927 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9929 test "x$cf_library_path" != "xNONE" && \
9930 test -d "$cf_library_path" && \
9932 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9933 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9934 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9935 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9936 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9937 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"
9940 cf_library_path_list="$cf_library_path_list $cf_search"
9948 test "x$prefix" != "xNONE" && \
9949 test -d "$prefix" && \
9951 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9952 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9953 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9954 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9955 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9956 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9959 for cf_subdir_prefix in \
9968 test "x$cf_subdir_prefix" != "x$prefix" && \
9969 test -d "$cf_subdir_prefix" && \
9970 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9971 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9972 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
9973 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9974 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9975 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9976 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"
9981 cf_search="$cf_library_path_list $cf_search"
9983 for cf_libdir in $cf_search
9985 echo "$as_me:9985: checking for -l$cf_nculib_root in $cf_libdir" >&5
9986 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9987 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9988 cat >conftest.$ac_ext <<_ACEOF
9989 #line 9989 "configure"
9990 #include "confdefs.h"
9991 #include <${cf_cv_ncurses_header:-curses.h}>
10000 rm -f conftest.$ac_objext conftest$ac_exeext
10001 if { (eval echo "$as_me:10001: \"$ac_link\"") >&5
10002 (eval $ac_link) 2>&5
10004 echo "$as_me:10004: \$? = $ac_status" >&5
10005 (exit $ac_status); } &&
10006 { ac_try='test -s conftest$ac_exeext'
10007 { (eval echo "$as_me:10007: \"$ac_try\"") >&5
10008 (eval $ac_try) 2>&5
10010 echo "$as_me:10010: \$? = $ac_status" >&5
10011 (exit $ac_status); }; }; then
10012 echo "$as_me:10012: result: yes" >&5
10013 echo "${ECHO_T}yes" >&6
10014 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10017 echo "$as_me: failed program was:" >&5
10018 cat conftest.$ac_ext >&5
10019 echo "$as_me:10019: result: no" >&5
10020 echo "${ECHO_T}no" >&6
10021 LIBS="$cf_save_LIBS"
10023 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10031 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
10033 if test $cf_found_library = no ; then
10034 { { echo "$as_me:10034: error: Cannot link $cf_nculib_root library" >&5
10035 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
10036 { (exit 1); exit 1; }; }
10041 if test -n "$cf_ncurses_LIBS" ; then
10042 echo "$as_me:10042: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
10043 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
10044 cf_ncurses_SAVE="$LIBS"
10045 for p in $cf_ncurses_LIBS ; do
10046 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
10047 if test "$q" != "$LIBS" ; then
10051 cat >conftest.$ac_ext <<_ACEOF
10052 #line 10052 "configure"
10053 #include "confdefs.h"
10054 #include <${cf_cv_ncurses_header:-curses.h}>
10058 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
10063 rm -f conftest.$ac_objext conftest$ac_exeext
10064 if { (eval echo "$as_me:10064: \"$ac_link\"") >&5
10065 (eval $ac_link) 2>&5
10067 echo "$as_me:10067: \$? = $ac_status" >&5
10068 (exit $ac_status); } &&
10069 { ac_try='test -s conftest$ac_exeext'
10070 { (eval echo "$as_me:10070: \"$ac_try\"") >&5
10071 (eval $ac_try) 2>&5
10073 echo "$as_me:10073: \$? = $ac_status" >&5
10074 (exit $ac_status); }; }; then
10075 echo "$as_me:10075: result: yes" >&5
10076 echo "${ECHO_T}yes" >&6
10078 echo "$as_me: failed program was:" >&5
10079 cat conftest.$ac_ext >&5
10080 echo "$as_me:10080: result: no" >&5
10081 echo "${ECHO_T}no" >&6
10082 LIBS="$cf_ncurses_SAVE"
10084 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10087 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10089 cat >>confdefs.h <<EOF
10090 #define $cf_nculib_ROOT 1
10095 NCURSES_CONFIG=none
10100 if test "$NCURSES_CONFIG_PKG" != none ; then
10101 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
10103 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
10104 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
10105 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
10107 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
10108 if test -z "$cf_cv_abi_version"
10110 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
10113 elif test "$NCURSES_CONFIG" != none ; then
10115 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
10117 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
10118 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
10119 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
10121 # ABI version is not available from headers
10122 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
10126 for cf_name in MAJOR MINOR PATCH
10128 cat >conftest.$ac_ext <<CF_EOF
10129 #include <${cf_cv_ncurses_header:-curses.h}>
10130 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
10132 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
10133 { (eval echo "$as_me:10133: \"$cf_try\"") >&5
10134 (eval $cf_try) 2>&5
10136 echo "$as_me:10136: \$? = $ac_status" >&5
10137 (exit $ac_status); }
10138 if test -f conftest.out ; then
10139 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[ ][ ]*//"`
10140 eval NCURSES_$cf_name=\"$cf_result\"
10141 # cat conftest.$ac_ext
10146 cf_cv_abi_version=${NCURSES_MAJOR}
10150 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
10152 cf_cv_timestamp=`date`
10154 echo "$as_me:10154: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
10155 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
10157 echo "$as_me:10157: checking if you want to have a library-prefix" >&5
10158 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
10160 # Check whether --with-lib-prefix or --without-lib-prefix was given.
10161 if test "${with_lib_prefix+set}" = set; then
10162 withval="$with_lib_prefix"
10163 with_lib_prefix=$withval
10165 with_lib_prefix=auto
10167 echo "$as_me:10167: result: $with_lib_prefix" >&5
10168 echo "${ECHO_T}$with_lib_prefix" >&6
10170 if test $with_lib_prefix = auto
10173 case $cf_cv_system_name in
10175 if test "$DFT_LWR_MODEL" = libtool; then
10181 (*) LIB_PREFIX='lib'
10184 cf_prefix=$LIB_PREFIX
10186 elif test $with_lib_prefix = no
10190 LIB_PREFIX=$with_lib_prefix
10195 ###############################################################################
10197 if test X"$CC_G_OPT" = X"" ; then
10199 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
10202 echo "$as_me:10202: checking for default loader flags" >&5
10203 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
10204 case $DFT_LWR_MODEL in
10205 (normal) LD_MODEL='' ;;
10206 (debug) LD_MODEL=$CC_G_OPT ;;
10207 (profile) LD_MODEL='-pg';;
10208 (shared) LD_MODEL='' ;;
10210 echo "$as_me:10210: result: $LD_MODEL" >&5
10211 echo "${ECHO_T}$LD_MODEL" >&6
10214 if test "x$cf_cv_enable_rpath" != xno
10216 echo "$as_me:10216: checking for an rpath option" >&5
10217 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
10218 case $cf_cv_system_name in
10220 if test "$GCC" = yes; then
10221 LD_RPATH_OPT="-Wl,-rpath,"
10223 LD_RPATH_OPT="-rpath "
10226 (linux*|gnu*|k*bsd*-gnu|freebsd*)
10227 LD_RPATH_OPT="-Wl,-rpath,"
10229 (openbsd[2-9].*|mirbsd*)
10230 LD_RPATH_OPT="-Wl,-rpath,"
10233 LD_RPATH_OPT="-rpath "
10236 LD_RPATH_OPT="-Wl,-rpath,"
10239 LD_RPATH_OPT="-rpath "
10247 echo "$as_me:10247: result: $LD_RPATH_OPT" >&5
10248 echo "${ECHO_T}$LD_RPATH_OPT" >&6
10250 case "x$LD_RPATH_OPT" in
10252 echo "$as_me:10252: checking if we need a space after rpath option" >&5
10253 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
10254 cf_save_LIBS="$LIBS"
10256 cf_add_libs="${LD_RPATH_OPT}$libdir"
10257 # Filter out duplicates - this happens with badly-designed ".pc" files...
10258 for cf_add_1lib in $LIBS
10260 for cf_add_2lib in $cf_add_libs
10262 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10268 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10270 LIBS="$cf_add_libs"
10272 cat >conftest.$ac_ext <<_ACEOF
10273 #line 10273 "configure"
10274 #include "confdefs.h"
10284 rm -f conftest.$ac_objext conftest$ac_exeext
10285 if { (eval echo "$as_me:10285: \"$ac_link\"") >&5
10286 (eval $ac_link) 2>&5
10288 echo "$as_me:10288: \$? = $ac_status" >&5
10289 (exit $ac_status); } &&
10290 { ac_try='test -s conftest$ac_exeext'
10291 { (eval echo "$as_me:10291: \"$ac_try\"") >&5
10292 (eval $ac_try) 2>&5
10294 echo "$as_me:10294: \$? = $ac_status" >&5
10295 (exit $ac_status); }; }; then
10298 echo "$as_me: failed program was:" >&5
10299 cat conftest.$ac_ext >&5
10302 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10303 LIBS="$cf_save_LIBS"
10304 echo "$as_me:10304: result: $cf_rpath_space" >&5
10305 echo "${ECHO_T}$cf_rpath_space" >&6
10306 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
10315 INSTALL_LIB="-m 644"
10316 : ${rel_builddir:=.}
10322 cf_cv_do_symlinks=no
10324 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
10326 echo "$as_me:10326: checking if release/abi version should be used for shared libs" >&5
10327 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
10329 # Check whether --with-shlib-version or --without-shlib-version was given.
10330 if test "${with_shlib_version+set}" = set; then
10331 withval="$with_shlib_version"
10332 test -z "$withval" && withval=auto
10335 cf_cv_shlib_version=auto
10338 cf_cv_shlib_version=$withval
10341 echo "$as_me:10341: result: $withval" >&5
10342 echo "${ECHO_T}$withval" >&6
10343 { { echo "$as_me:10343: error: option value must be one of: rel, abi, or auto" >&5
10344 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
10345 { (exit 1); exit 1; }; }
10350 cf_cv_shlib_version=auto
10352 echo "$as_me:10352: result: $cf_cv_shlib_version" >&5
10353 echo "${ECHO_T}$cf_cv_shlib_version" >&6
10355 cf_cv_rm_so_locs=no
10358 # Some less-capable ports of gcc support only -fpic
10362 if test "$GCC" = yes
10366 case $cf_cv_system_name in
10367 (*linux*) # e.g., PGI compiler
10373 if test "$cf_try_fPIC" = yes
10375 echo "$as_me:10375: checking which $CC option to use" >&5
10376 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
10377 cf_save_CFLAGS="$CFLAGS"
10378 for CC_SHARED_OPTS in -fPIC -fpic ''
10380 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
10381 cat >conftest.$ac_ext <<_ACEOF
10382 #line 10382 "configure"
10383 #include "confdefs.h"
10393 rm -f conftest.$ac_objext
10394 if { (eval echo "$as_me:10394: \"$ac_compile\"") >&5
10395 (eval $ac_compile) 2>&5
10397 echo "$as_me:10397: \$? = $ac_status" >&5
10398 (exit $ac_status); } &&
10399 { ac_try='test -s conftest.$ac_objext'
10400 { (eval echo "$as_me:10400: \"$ac_try\"") >&5
10401 (eval $ac_try) 2>&5
10403 echo "$as_me:10403: \$? = $ac_status" >&5
10404 (exit $ac_status); }; }; then
10407 echo "$as_me: failed program was:" >&5
10408 cat conftest.$ac_ext >&5
10410 rm -f conftest.$ac_objext conftest.$ac_ext
10412 echo "$as_me:10412: result: $CC_SHARED_OPTS" >&5
10413 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
10414 CFLAGS="$cf_save_CFLAGS"
10417 cf_cv_shlib_version_infix=no
10419 case $cf_cv_system_name in
10420 (aix4.3-9*|aix[5-7]*)
10421 if test "$GCC" = yes; then
10422 CC_SHARED_OPTS='-Wl,-brtl'
10423 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
10425 CC_SHARED_OPTS='-brtl'
10426 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
10427 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
10431 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
10435 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
10436 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
10437 cf_cv_shlib_version=cygdll
10438 cf_cv_shlib_version_infix=cygdll
10441 cat >mk_shared_lib.sh <<-CF_EOF
10444 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
10447 Linking shared library
10448 ** SHARED_LIB \$SHARED_LIB
10449 ** IMPORT_LIB \$IMPORT_LIB
10451 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
10453 chmod +x mk_shared_lib.sh
10457 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
10458 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
10459 cf_cv_shlib_version=msysdll
10460 cf_cv_shlib_version_infix=msysdll
10463 cat >mk_shared_lib.sh <<-CF_EOF
10466 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
10469 Linking shared library
10470 ** SHARED_LIB \$SHARED_LIB
10471 ** IMPORT_LIB \$IMPORT_LIB
10473 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
10475 chmod +x mk_shared_lib.sh
10478 cf_try_cflags="no-cpp-precomp"
10479 CC_SHARED_OPTS="-dynamic"
10480 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
10481 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
10482 cf_cv_shlib_version_infix=yes
10483 echo "$as_me:10483: checking if ld -search_paths_first works" >&5
10484 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
10485 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
10486 echo $ECHO_N "(cached) $ECHO_C" >&6
10489 cf_save_LDFLAGS=$LDFLAGS
10490 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
10491 cat >conftest.$ac_ext <<_ACEOF
10492 #line 10492 "configure"
10493 #include "confdefs.h"
10503 rm -f conftest.$ac_objext conftest$ac_exeext
10504 if { (eval echo "$as_me:10504: \"$ac_link\"") >&5
10505 (eval $ac_link) 2>&5
10507 echo "$as_me:10507: \$? = $ac_status" >&5
10508 (exit $ac_status); } &&
10509 { ac_try='test -s conftest$ac_exeext'
10510 { (eval echo "$as_me:10510: \"$ac_try\"") >&5
10511 (eval $ac_try) 2>&5
10513 echo "$as_me:10513: \$? = $ac_status" >&5
10514 (exit $ac_status); }; }; then
10515 cf_cv_ldflags_search_paths_first=yes
10517 echo "$as_me: failed program was:" >&5
10518 cat conftest.$ac_ext >&5
10519 cf_cv_ldflags_search_paths_first=no
10521 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10522 LDFLAGS=$cf_save_LDFLAGS
10524 echo "$as_me:10524: result: $cf_cv_ldflags_search_paths_first" >&5
10525 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
10526 if test $cf_cv_ldflags_search_paths_first = yes; then
10527 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
10531 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
10532 if test "$GCC" != yes; then
10533 CC_SHARED_OPTS='+Z'
10535 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
10536 INSTALL_LIB="-m 555"
10539 # (tested with gcc 2.7.2 -- I don't have c89)
10540 if test "$GCC" = yes; then
10541 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
10543 CC_SHARED_OPTS='+Z'
10544 LD_SHARED_OPTS='-Wl,+b,${libdir}'
10546 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
10547 # HP-UX shared libraries must be executable, and should be
10548 # readonly to exploit a quirk in the memory manager.
10549 INSTALL_LIB="-m 555"
10552 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10553 if test "$cf_cv_shlib_version" = rel; then
10554 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10556 cf_shared_soname='`basename $@`'
10559 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
10562 if test "$cf_cv_enable_rpath" = yes ; then
10563 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
10565 # tested with IRIX 5.2 and 'cc'.
10566 if test "$GCC" != yes; then
10567 CC_SHARED_OPTS='-KPIC'
10568 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
10570 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
10572 cf_cv_rm_so_locs=yes
10574 (linux*|gnu*|k*bsd*-gnu)
10575 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
10576 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
10577 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10579 if test "$cf_cv_enable_rpath" = yes ; then
10580 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
10583 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10584 if test "$cf_cv_shlib_version" = rel; then
10585 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10587 cf_cv_shared_soname='`basename $@`'
10590 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
10593 cf_cv_shlib_version=mingw
10594 cf_cv_shlib_version_infix=mingw
10597 if test "$DFT_LWR_MODEL" = "shared" ; then
10598 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
10599 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10600 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
10603 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
10604 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
10605 cat >mk_shared_lib.sh <<-CF_EOF
10608 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
10611 Linking shared library
10612 ** SHARED_LIB \$SHARED_LIB
10613 ** IMPORT_LIB \$IMPORT_LIB
10615 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
10617 chmod +x mk_shared_lib.sh
10619 (openbsd[2-9].*|mirbsd*)
10620 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
10621 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
10622 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10624 if test "$cf_cv_enable_rpath" = yes ; then
10625 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
10627 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
10629 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10630 if test "$cf_cv_shlib_version" = rel; then
10631 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10633 cf_cv_shared_soname='`basename $@`'
10636 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
10638 (nto-qnx*|openbsd*|freebsd[12].*)
10639 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
10640 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
10641 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10643 (dragonfly*|freebsd*)
10644 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
10645 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
10646 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
10647 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
10648 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
10651 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10652 if test "$cf_cv_shlib_version" = rel; then
10653 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10655 cf_cv_shared_soname='`basename $@`'
10658 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
10661 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
10662 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
10663 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
10664 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10665 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
10666 if test "$cf_cv_shlib_version" = auto; then
10667 if test -f /usr/libexec/ld.elf_so; then
10668 cf_cv_shlib_version=abi
10670 cf_cv_shlib_version=rel
10674 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10675 if test "$cf_cv_shlib_version" = rel; then
10676 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10678 cf_cv_shared_soname='`basename $@`'
10681 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
10683 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
10687 # tested with OSF/1 V3.2 and 'cc'
10688 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
10689 # link with shared libs).
10690 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
10693 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
10696 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
10697 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
10698 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
10699 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10701 cf_cv_rm_so_locs=yes
10703 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
10704 # tested with osr5.0.5
10705 if test "$GCC" != yes; then
10706 CC_SHARED_OPTS='-belf -KPIC'
10708 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
10709 if test "$cf_cv_enable_rpath" = yes ; then
10710 # only way is to set LD_RUN_PATH but no switch for it
10713 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10714 LINK_PROGS='LD_RUN_PATH=${libdir}'
10715 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
10718 # tested with SunOS 4.1.1 and gcc 2.7.0
10719 if test "$GCC" != yes; then
10720 CC_SHARED_OPTS='-KPIC'
10722 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
10723 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10726 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
10727 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
10728 if test "$DFT_LWR_MODEL" = "shared" ; then
10729 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
10730 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10732 if test "$cf_cv_enable_rpath" = yes ; then
10733 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
10736 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10737 if test "$cf_cv_shlib_version" = rel; then
10738 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10740 cf_cv_shared_soname='`basename $@`'
10743 if test "$GCC" != yes; then
10744 cf_save_CFLAGS="$CFLAGS"
10745 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
10747 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
10748 cat >conftest.$ac_ext <<_ACEOF
10749 #line 10749 "configure"
10750 #include "confdefs.h"
10760 rm -f conftest.$ac_objext
10761 if { (eval echo "$as_me:10761: \"$ac_compile\"") >&5
10762 (eval $ac_compile) 2>&5
10764 echo "$as_me:10764: \$? = $ac_status" >&5
10765 (exit $ac_status); } &&
10766 { ac_try='test -s conftest.$ac_objext'
10767 { (eval echo "$as_me:10767: \"$ac_try\"") >&5
10768 (eval $ac_try) 2>&5
10770 echo "$as_me:10770: \$? = $ac_status" >&5
10771 (exit $ac_status); }; }; then
10774 echo "$as_me: failed program was:" >&5
10775 cat conftest.$ac_ext >&5
10777 rm -f conftest.$ac_objext conftest.$ac_ext
10779 CFLAGS="$cf_save_CFLAGS"
10780 CC_SHARED_OPTS=$cf_shared_opts
10781 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
10783 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
10786 (sysv5uw7*|unix_sv*)
10787 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
10788 if test "$GCC" != yes; then
10789 CC_SHARED_OPTS='-KPIC'
10791 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
10794 CC_SHARED_OPTS='unknown'
10795 MK_SHARED_LIB='echo unknown'
10799 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
10800 case "$cf_cv_shlib_version" in
10802 case "$MK_SHARED_LIB" in
10804 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
10807 { echo "$as_me:10807: WARNING: ignored --with-shlib-version" >&5
10808 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
10814 if test -n "$cf_try_cflags"
10816 cat > conftest.$ac_ext <<EOF
10817 #line 10817 "${as_me:-configure}"
10819 int main(int argc, char *argv[])
10822 return (argv[argc-1] == 0) ;
10825 cf_save_CFLAGS="$CFLAGS"
10826 for cf_opt in $cf_try_cflags
10828 CFLAGS="$cf_save_CFLAGS -$cf_opt"
10829 echo "$as_me:10829: checking if CFLAGS option -$cf_opt works" >&5
10830 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
10831 if { (eval echo "$as_me:10831: \"$ac_compile\"") >&5
10832 (eval $ac_compile) 2>&5
10834 echo "$as_me:10834: \$? = $ac_status" >&5
10835 (exit $ac_status); }; then
10836 echo "$as_me:10836: result: yes" >&5
10837 echo "${ECHO_T}yes" >&6
10838 cf_save_CFLAGS="$CFLAGS"
10840 echo "$as_me:10840: result: no" >&5
10841 echo "${ECHO_T}no" >&6
10844 CFLAGS="$cf_save_CFLAGS"
10847 # RPATH_LIST is a colon-separated list of directories
10848 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
10849 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
10851 test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
10853 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
10855 echo "${as_me:-configure}:10855: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
10857 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
10859 echo "${as_me:-configure}:10859: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
10861 # The test/sample programs in the original tree link using rpath option.
10862 # Make it optional for packagers.
10863 if test -n "$LOCAL_LDFLAGS"
10865 echo "$as_me:10865: checking if you want to link sample programs with rpath option" >&5
10866 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
10868 # Check whether --enable-rpath-link or --disable-rpath-link was given.
10869 if test "${enable_rpath_link+set}" = set; then
10870 enableval="$enable_rpath_link"
10871 with_rpath_link=$enableval
10873 with_rpath_link=yes
10875 echo "$as_me:10875: result: $with_rpath_link" >&5
10876 echo "${ECHO_T}$with_rpath_link" >&6
10877 if test "$with_rpath_link" = no
10884 ###############################################################################
10886 ### use option --enable-broken-linker to force on use of broken-linker support
10887 echo "$as_me:10887: checking if you want broken-linker support code" >&5
10888 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
10890 # Check whether --enable-broken_linker or --disable-broken_linker was given.
10891 if test "${enable_broken_linker+set}" = set; then
10892 enableval="$enable_broken_linker"
10893 with_broken_linker=$enableval
10895 with_broken_linker=${BROKEN_LINKER:-no}
10897 echo "$as_me:10897: result: $with_broken_linker" >&5
10898 echo "${ECHO_T}$with_broken_linker" >&6
10901 if test "$with_broken_linker" = yes ; then
10902 cat >>confdefs.h <<\EOF
10903 #define BROKEN_LINKER 1
10907 elif test "$DFT_LWR_MODEL" = shared ; then
10908 case $cf_cv_system_name in
10910 cat >>confdefs.h <<\EOF
10911 #define BROKEN_LINKER 1
10915 test -n "$verbose" && echo " cygwin linker is broken anyway" 1>&6
10917 echo "${as_me:-configure}:10917: testing cygwin linker is broken anyway ..." 1>&5
10923 # Check to define _XOPEN_SOURCE "automatically"
10925 cf_XOPEN_SOURCE=600
10926 cf_POSIX_C_SOURCE=199506L
10931 cf_xopen_source="-D_ALL_SOURCE"
10934 cf_XOPEN_SOURCE=600
10937 cf_xopen_source="-D_APPLE_C_SOURCE"
10940 cf_xopen_source="-D_DARWIN_C_SOURCE"
10943 (freebsd*|dragonfly*|midnightbsd*)
10944 # 5.x headers associate
10945 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
10946 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
10947 cf_POSIX_C_SOURCE=200112L
10948 cf_XOPEN_SOURCE=600
10949 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10952 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
10955 cf_xopen_source="-D_HPUX_SOURCE"
10958 cf_xopen_source="-D_SGI_SOURCE"
10961 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
10963 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
10965 echo "$as_me:10965: checking if this is the GNU C library" >&5
10966 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
10967 if test "${cf_cv_gnu_library+set}" = set; then
10968 echo $ECHO_N "(cached) $ECHO_C" >&6
10971 cat >conftest.$ac_ext <<_ACEOF
10972 #line 10972 "configure"
10973 #include "confdefs.h"
10974 #include <sys/types.h>
10979 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
10981 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
10984 # error not GNU C library
10990 rm -f conftest.$ac_objext
10991 if { (eval echo "$as_me:10991: \"$ac_compile\"") >&5
10992 (eval $ac_compile) 2>&5
10994 echo "$as_me:10994: \$? = $ac_status" >&5
10995 (exit $ac_status); } &&
10996 { ac_try='test -s conftest.$ac_objext'
10997 { (eval echo "$as_me:10997: \"$ac_try\"") >&5
10998 (eval $ac_try) 2>&5
11000 echo "$as_me:11000: \$? = $ac_status" >&5
11001 (exit $ac_status); }; }; then
11002 cf_cv_gnu_library=yes
11004 echo "$as_me: failed program was:" >&5
11005 cat conftest.$ac_ext >&5
11006 cf_cv_gnu_library=no
11008 rm -f conftest.$ac_objext conftest.$ac_ext
11011 echo "$as_me:11011: result: $cf_cv_gnu_library" >&5
11012 echo "${ECHO_T}$cf_cv_gnu_library" >&6
11014 if test x$cf_cv_gnu_library = xyes; then
11016 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
11017 # was changed to help a little. newlib incorporated the change about 4
11019 echo "$as_me:11019: checking if _DEFAULT_SOURCE can be used as a basis" >&5
11020 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
11021 if test "${cf_cv_gnu_library_219+set}" = set; then
11022 echo $ECHO_N "(cached) $ECHO_C" >&6
11025 cf_save="$CPPFLAGS"
11027 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11028 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
11030 cat >conftest.$ac_ext <<_ACEOF
11031 #line 11031 "configure"
11032 #include "confdefs.h"
11033 #include <sys/types.h>
11038 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
11040 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
11043 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
11049 rm -f conftest.$ac_objext
11050 if { (eval echo "$as_me:11050: \"$ac_compile\"") >&5
11051 (eval $ac_compile) 2>&5
11053 echo "$as_me:11053: \$? = $ac_status" >&5
11054 (exit $ac_status); } &&
11055 { ac_try='test -s conftest.$ac_objext'
11056 { (eval echo "$as_me:11056: \"$ac_try\"") >&5
11057 (eval $ac_try) 2>&5
11059 echo "$as_me:11059: \$? = $ac_status" >&5
11060 (exit $ac_status); }; }; then
11061 cf_cv_gnu_library_219=yes
11063 echo "$as_me: failed program was:" >&5
11064 cat conftest.$ac_ext >&5
11065 cf_cv_gnu_library_219=no
11067 rm -f conftest.$ac_objext conftest.$ac_ext
11068 CPPFLAGS="$cf_save"
11071 echo "$as_me:11071: result: $cf_cv_gnu_library_219" >&5
11072 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
11074 if test "x$cf_cv_gnu_library_219" = xyes; then
11075 cf_save="$CPPFLAGS"
11076 echo "$as_me:11076: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
11077 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
11078 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
11079 echo $ECHO_N "(cached) $ECHO_C" >&6
11085 cf_new_extra_cppflags=
11087 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
11089 case $cf_fix_cppflags in
11091 case $cf_add_cflags in
11092 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11093 case $cf_add_cflags in
11095 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11097 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11098 && test -z "${cf_tst_cflags}" \
11099 && cf_fix_cppflags=yes
11101 if test $cf_fix_cppflags = yes ; then
11103 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11104 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11107 elif test "${cf_tst_cflags}" = "\"'" ; then
11109 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11110 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11116 case "$CPPFLAGS" in
11120 case $cf_add_cflags in
11122 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11124 CPPFLAGS=`echo "$CPPFLAGS" | \
11125 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11126 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11131 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11132 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11139 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11140 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11147 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11148 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11150 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11152 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11153 && test -z "${cf_tst_cflags}" \
11154 && cf_fix_cppflags=no
11159 if test -n "$cf_new_cflags" ; then
11161 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11162 CFLAGS="${CFLAGS}$cf_new_cflags"
11166 if test -n "$cf_new_cppflags" ; then
11168 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11169 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11173 if test -n "$cf_new_extra_cppflags" ; then
11175 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11176 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11180 cat >conftest.$ac_ext <<_ACEOF
11181 #line 11181 "configure"
11182 #include "confdefs.h"
11184 #include <limits.h>
11185 #include <sys/types.h>
11191 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
11194 # error GNU C library is too old
11200 rm -f conftest.$ac_objext
11201 if { (eval echo "$as_me:11201: \"$ac_compile\"") >&5
11202 (eval $ac_compile) 2>&5
11204 echo "$as_me:11204: \$? = $ac_status" >&5
11205 (exit $ac_status); } &&
11206 { ac_try='test -s conftest.$ac_objext'
11207 { (eval echo "$as_me:11207: \"$ac_try\"") >&5
11208 (eval $ac_try) 2>&5
11210 echo "$as_me:11210: \$? = $ac_status" >&5
11211 (exit $ac_status); }; }; then
11212 cf_cv_gnu_dftsrc_219=yes
11214 echo "$as_me: failed program was:" >&5
11215 cat conftest.$ac_ext >&5
11216 cf_cv_gnu_dftsrc_219=no
11218 rm -f conftest.$ac_objext conftest.$ac_ext
11221 echo "$as_me:11221: result: $cf_cv_gnu_dftsrc_219" >&5
11222 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
11223 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
11225 cf_cv_gnu_dftsrc_219=maybe
11228 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
11230 echo "$as_me:11230: checking if we must define _GNU_SOURCE" >&5
11231 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
11232 if test "${cf_cv_gnu_source+set}" = set; then
11233 echo $ECHO_N "(cached) $ECHO_C" >&6
11236 cat >conftest.$ac_ext <<_ACEOF
11237 #line 11237 "configure"
11238 #include "confdefs.h"
11239 #include <sys/types.h>
11244 #ifndef _XOPEN_SOURCE
11245 #error expected _XOPEN_SOURCE to be defined
11251 rm -f conftest.$ac_objext
11252 if { (eval echo "$as_me:11252: \"$ac_compile\"") >&5
11253 (eval $ac_compile) 2>&5
11255 echo "$as_me:11255: \$? = $ac_status" >&5
11256 (exit $ac_status); } &&
11257 { ac_try='test -s conftest.$ac_objext'
11258 { (eval echo "$as_me:11258: \"$ac_try\"") >&5
11259 (eval $ac_try) 2>&5
11261 echo "$as_me:11261: \$? = $ac_status" >&5
11262 (exit $ac_status); }; }; then
11263 cf_cv_gnu_source=no
11265 echo "$as_me: failed program was:" >&5
11266 cat conftest.$ac_ext >&5
11267 cf_save="$CPPFLAGS"
11272 cf_new_extra_cppflags=
11274 for cf_add_cflags in -D_GNU_SOURCE
11276 case $cf_fix_cppflags in
11278 case $cf_add_cflags in
11279 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11280 case $cf_add_cflags in
11282 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11284 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11285 && test -z "${cf_tst_cflags}" \
11286 && cf_fix_cppflags=yes
11288 if test $cf_fix_cppflags = yes ; then
11290 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11291 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11294 elif test "${cf_tst_cflags}" = "\"'" ; then
11296 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11297 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11303 case "$CPPFLAGS" in
11307 case $cf_add_cflags in
11309 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11311 CPPFLAGS=`echo "$CPPFLAGS" | \
11312 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11313 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11318 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11319 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11326 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11327 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11334 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11335 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11337 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11339 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11340 && test -z "${cf_tst_cflags}" \
11341 && cf_fix_cppflags=no
11346 if test -n "$cf_new_cflags" ; then
11348 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11349 CFLAGS="${CFLAGS}$cf_new_cflags"
11353 if test -n "$cf_new_cppflags" ; then
11355 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11356 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11360 if test -n "$cf_new_extra_cppflags" ; then
11362 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11363 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11367 cat >conftest.$ac_ext <<_ACEOF
11368 #line 11368 "configure"
11369 #include "confdefs.h"
11370 #include <sys/types.h>
11375 #ifdef _XOPEN_SOURCE
11376 #error expected _XOPEN_SOURCE to be undefined
11382 rm -f conftest.$ac_objext
11383 if { (eval echo "$as_me:11383: \"$ac_compile\"") >&5
11384 (eval $ac_compile) 2>&5
11386 echo "$as_me:11386: \$? = $ac_status" >&5
11387 (exit $ac_status); } &&
11388 { ac_try='test -s conftest.$ac_objext'
11389 { (eval echo "$as_me:11389: \"$ac_try\"") >&5
11390 (eval $ac_try) 2>&5
11392 echo "$as_me:11392: \$? = $ac_status" >&5
11393 (exit $ac_status); }; }; then
11394 cf_cv_gnu_source=no
11396 echo "$as_me: failed program was:" >&5
11397 cat conftest.$ac_ext >&5
11398 cf_cv_gnu_source=yes
11400 rm -f conftest.$ac_objext conftest.$ac_ext
11401 CPPFLAGS="$cf_save"
11404 rm -f conftest.$ac_objext conftest.$ac_ext
11407 echo "$as_me:11407: result: $cf_cv_gnu_source" >&5
11408 echo "${ECHO_T}$cf_cv_gnu_source" >&6
11410 if test "$cf_cv_gnu_source" = yes
11412 echo "$as_me:11412: checking if we should also define _DEFAULT_SOURCE" >&5
11413 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
11414 if test "${cf_cv_default_source+set}" = set; then
11415 echo $ECHO_N "(cached) $ECHO_C" >&6
11418 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11419 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
11421 cat >conftest.$ac_ext <<_ACEOF
11422 #line 11422 "configure"
11423 #include "confdefs.h"
11424 #include <sys/types.h>
11429 #ifdef _DEFAULT_SOURCE
11430 #error expected _DEFAULT_SOURCE to be undefined
11436 rm -f conftest.$ac_objext
11437 if { (eval echo "$as_me:11437: \"$ac_compile\"") >&5
11438 (eval $ac_compile) 2>&5
11440 echo "$as_me:11440: \$? = $ac_status" >&5
11441 (exit $ac_status); } &&
11442 { ac_try='test -s conftest.$ac_objext'
11443 { (eval echo "$as_me:11443: \"$ac_try\"") >&5
11444 (eval $ac_try) 2>&5
11446 echo "$as_me:11446: \$? = $ac_status" >&5
11447 (exit $ac_status); }; }; then
11448 cf_cv_default_source=no
11450 echo "$as_me: failed program was:" >&5
11451 cat conftest.$ac_ext >&5
11452 cf_cv_default_source=yes
11454 rm -f conftest.$ac_objext conftest.$ac_ext
11457 echo "$as_me:11457: result: $cf_cv_default_source" >&5
11458 echo "${ECHO_T}$cf_cv_default_source" >&6
11459 if test "$cf_cv_default_source" = yes
11462 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11463 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
11473 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
11476 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
11479 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11481 cf_save_CFLAGS="$CFLAGS"
11482 cf_save_CPPFLAGS="$CPPFLAGS"
11484 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11485 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11486 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
11488 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11489 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11490 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
11492 echo "$as_me:11492: checking if we should define _POSIX_C_SOURCE" >&5
11493 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11494 if test "${cf_cv_posix_c_source+set}" = set; then
11495 echo $ECHO_N "(cached) $ECHO_C" >&6
11498 echo "${as_me:-configure}:11498: testing if the symbol is already defined go no further ..." 1>&5
11500 cat >conftest.$ac_ext <<_ACEOF
11501 #line 11501 "configure"
11502 #include "confdefs.h"
11503 #include <sys/types.h>
11508 #ifndef _POSIX_C_SOURCE
11515 rm -f conftest.$ac_objext
11516 if { (eval echo "$as_me:11516: \"$ac_compile\"") >&5
11517 (eval $ac_compile) 2>&5
11519 echo "$as_me:11519: \$? = $ac_status" >&5
11520 (exit $ac_status); } &&
11521 { ac_try='test -s conftest.$ac_objext'
11522 { (eval echo "$as_me:11522: \"$ac_try\"") >&5
11523 (eval $ac_try) 2>&5
11525 echo "$as_me:11525: \$? = $ac_status" >&5
11526 (exit $ac_status); }; }; then
11527 cf_cv_posix_c_source=no
11529 echo "$as_me: failed program was:" >&5
11530 cat conftest.$ac_ext >&5
11531 cf_want_posix_source=no
11532 case .$cf_POSIX_C_SOURCE in
11534 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11537 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11538 cf_want_posix_source=yes
11541 cf_want_posix_source=yes
11544 if test "$cf_want_posix_source" = yes ; then
11545 cat >conftest.$ac_ext <<_ACEOF
11546 #line 11546 "configure"
11547 #include "confdefs.h"
11548 #include <sys/types.h>
11553 #ifdef _POSIX_SOURCE
11560 rm -f conftest.$ac_objext
11561 if { (eval echo "$as_me:11561: \"$ac_compile\"") >&5
11562 (eval $ac_compile) 2>&5
11564 echo "$as_me:11564: \$? = $ac_status" >&5
11565 (exit $ac_status); } &&
11566 { ac_try='test -s conftest.$ac_objext'
11567 { (eval echo "$as_me:11567: \"$ac_try\"") >&5
11568 (eval $ac_try) 2>&5
11570 echo "$as_me:11570: \$? = $ac_status" >&5
11571 (exit $ac_status); }; }; then
11574 echo "$as_me: failed program was:" >&5
11575 cat conftest.$ac_ext >&5
11576 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11578 rm -f conftest.$ac_objext conftest.$ac_ext
11581 echo "${as_me:-configure}:11581: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11583 CFLAGS="$cf_trim_CFLAGS"
11584 CPPFLAGS="$cf_trim_CPPFLAGS"
11586 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11587 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11589 echo "${as_me:-configure}:11589: testing if the second compile does not leave our definition intact error ..." 1>&5
11591 cat >conftest.$ac_ext <<_ACEOF
11592 #line 11592 "configure"
11593 #include "confdefs.h"
11594 #include <sys/types.h>
11599 #ifndef _POSIX_C_SOURCE
11606 rm -f conftest.$ac_objext
11607 if { (eval echo "$as_me:11607: \"$ac_compile\"") >&5
11608 (eval $ac_compile) 2>&5
11610 echo "$as_me:11610: \$? = $ac_status" >&5
11611 (exit $ac_status); } &&
11612 { ac_try='test -s conftest.$ac_objext'
11613 { (eval echo "$as_me:11613: \"$ac_try\"") >&5
11614 (eval $ac_try) 2>&5
11616 echo "$as_me:11616: \$? = $ac_status" >&5
11617 (exit $ac_status); }; }; then
11620 echo "$as_me: failed program was:" >&5
11621 cat conftest.$ac_ext >&5
11622 cf_cv_posix_c_source=no
11624 rm -f conftest.$ac_objext conftest.$ac_ext
11625 CFLAGS="$cf_save_CFLAGS"
11626 CPPFLAGS="$cf_save_CPPFLAGS"
11629 rm -f conftest.$ac_objext conftest.$ac_ext
11632 echo "$as_me:11632: result: $cf_cv_posix_c_source" >&5
11633 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11635 if test "$cf_cv_posix_c_source" != no ; then
11636 CFLAGS="$cf_trim_CFLAGS"
11637 CPPFLAGS="$cf_trim_CPPFLAGS"
11642 cf_new_extra_cppflags=
11644 for cf_add_cflags in $cf_cv_posix_c_source
11646 case $cf_fix_cppflags in
11648 case $cf_add_cflags in
11649 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11650 case $cf_add_cflags in
11652 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11654 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11655 && test -z "${cf_tst_cflags}" \
11656 && cf_fix_cppflags=yes
11658 if test $cf_fix_cppflags = yes ; then
11660 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11661 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11664 elif test "${cf_tst_cflags}" = "\"'" ; then
11666 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11667 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11673 case "$CPPFLAGS" in
11677 case $cf_add_cflags in
11679 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11681 CPPFLAGS=`echo "$CPPFLAGS" | \
11682 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11683 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11688 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11689 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11696 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11697 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11704 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11705 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11707 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11709 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11710 && test -z "${cf_tst_cflags}" \
11711 && cf_fix_cppflags=no
11716 if test -n "$cf_new_cflags" ; then
11718 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11719 CFLAGS="${CFLAGS}$cf_new_cflags"
11723 if test -n "$cf_new_cppflags" ; then
11725 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11726 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11730 if test -n "$cf_new_extra_cppflags" ; then
11732 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11733 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11741 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
11744 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
11745 cf_xopen_source="-D_BSD_SOURCE"
11746 cf_XOPEN_SOURCE=600
11749 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
11752 cf_xopen_source="-D_OSF_SOURCE"
11755 cf_xopen_source="-D_QNX_SOURCE"
11758 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
11761 cf_xopen_source="-D__EXTENSIONS__"
11762 cf_cv_xopen_source=broken
11764 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
11770 echo "$as_me:11770: checking if we should define _XOPEN_SOURCE" >&5
11771 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11772 if test "${cf_cv_xopen_source+set}" = set; then
11773 echo $ECHO_N "(cached) $ECHO_C" >&6
11776 cat >conftest.$ac_ext <<_ACEOF
11777 #line 11777 "configure"
11778 #include "confdefs.h"
11780 #include <stdlib.h>
11781 #include <string.h>
11782 #include <sys/types.h>
11788 #ifndef _XOPEN_SOURCE
11795 rm -f conftest.$ac_objext
11796 if { (eval echo "$as_me:11796: \"$ac_compile\"") >&5
11797 (eval $ac_compile) 2>&5
11799 echo "$as_me:11799: \$? = $ac_status" >&5
11800 (exit $ac_status); } &&
11801 { ac_try='test -s conftest.$ac_objext'
11802 { (eval echo "$as_me:11802: \"$ac_try\"") >&5
11803 (eval $ac_try) 2>&5
11805 echo "$as_me:11805: \$? = $ac_status" >&5
11806 (exit $ac_status); }; }; then
11807 cf_cv_xopen_source=no
11809 echo "$as_me: failed program was:" >&5
11810 cat conftest.$ac_ext >&5
11811 cf_save="$CPPFLAGS"
11813 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11814 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11816 cat >conftest.$ac_ext <<_ACEOF
11817 #line 11817 "configure"
11818 #include "confdefs.h"
11820 #include <stdlib.h>
11821 #include <string.h>
11822 #include <sys/types.h>
11828 #ifdef _XOPEN_SOURCE
11835 rm -f conftest.$ac_objext
11836 if { (eval echo "$as_me:11836: \"$ac_compile\"") >&5
11837 (eval $ac_compile) 2>&5
11839 echo "$as_me:11839: \$? = $ac_status" >&5
11840 (exit $ac_status); } &&
11841 { ac_try='test -s conftest.$ac_objext'
11842 { (eval echo "$as_me:11842: \"$ac_try\"") >&5
11843 (eval $ac_try) 2>&5
11845 echo "$as_me:11845: \$? = $ac_status" >&5
11846 (exit $ac_status); }; }; then
11847 cf_cv_xopen_source=no
11849 echo "$as_me: failed program was:" >&5
11850 cat conftest.$ac_ext >&5
11851 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11853 rm -f conftest.$ac_objext conftest.$ac_ext
11854 CPPFLAGS="$cf_save"
11857 rm -f conftest.$ac_objext conftest.$ac_ext
11860 echo "$as_me:11860: result: $cf_cv_xopen_source" >&5
11861 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11863 if test "$cf_cv_xopen_source" != no ; then
11865 CFLAGS=`echo "$CFLAGS" | \
11866 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11867 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
11869 CPPFLAGS=`echo "$CPPFLAGS" | \
11870 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11871 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
11873 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11878 cf_new_extra_cppflags=
11880 for cf_add_cflags in $cf_temp_xopen_source
11882 case $cf_fix_cppflags in
11884 case $cf_add_cflags in
11885 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11886 case $cf_add_cflags in
11888 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11890 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11891 && test -z "${cf_tst_cflags}" \
11892 && cf_fix_cppflags=yes
11894 if test $cf_fix_cppflags = yes ; then
11896 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11897 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11900 elif test "${cf_tst_cflags}" = "\"'" ; then
11902 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11903 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11909 case "$CPPFLAGS" in
11913 case $cf_add_cflags in
11915 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11917 CPPFLAGS=`echo "$CPPFLAGS" | \
11918 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11919 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11924 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11925 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11932 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11933 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11940 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11941 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11943 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11945 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11946 && test -z "${cf_tst_cflags}" \
11947 && cf_fix_cppflags=no
11952 if test -n "$cf_new_cflags" ; then
11954 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11955 CFLAGS="${CFLAGS}$cf_new_cflags"
11959 if test -n "$cf_new_cppflags" ; then
11961 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11962 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11966 if test -n "$cf_new_extra_cppflags" ; then
11968 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11969 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11975 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11977 cf_save_CFLAGS="$CFLAGS"
11978 cf_save_CPPFLAGS="$CPPFLAGS"
11980 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11981 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11982 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
11984 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11985 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11986 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
11988 echo "$as_me:11988: checking if we should define _POSIX_C_SOURCE" >&5
11989 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11990 if test "${cf_cv_posix_c_source+set}" = set; then
11991 echo $ECHO_N "(cached) $ECHO_C" >&6
11994 echo "${as_me:-configure}:11994: testing if the symbol is already defined go no further ..." 1>&5
11996 cat >conftest.$ac_ext <<_ACEOF
11997 #line 11997 "configure"
11998 #include "confdefs.h"
11999 #include <sys/types.h>
12004 #ifndef _POSIX_C_SOURCE
12011 rm -f conftest.$ac_objext
12012 if { (eval echo "$as_me:12012: \"$ac_compile\"") >&5
12013 (eval $ac_compile) 2>&5
12015 echo "$as_me:12015: \$? = $ac_status" >&5
12016 (exit $ac_status); } &&
12017 { ac_try='test -s conftest.$ac_objext'
12018 { (eval echo "$as_me:12018: \"$ac_try\"") >&5
12019 (eval $ac_try) 2>&5
12021 echo "$as_me:12021: \$? = $ac_status" >&5
12022 (exit $ac_status); }; }; then
12023 cf_cv_posix_c_source=no
12025 echo "$as_me: failed program was:" >&5
12026 cat conftest.$ac_ext >&5
12027 cf_want_posix_source=no
12028 case .$cf_POSIX_C_SOURCE in
12030 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12033 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12034 cf_want_posix_source=yes
12037 cf_want_posix_source=yes
12040 if test "$cf_want_posix_source" = yes ; then
12041 cat >conftest.$ac_ext <<_ACEOF
12042 #line 12042 "configure"
12043 #include "confdefs.h"
12044 #include <sys/types.h>
12049 #ifdef _POSIX_SOURCE
12056 rm -f conftest.$ac_objext
12057 if { (eval echo "$as_me:12057: \"$ac_compile\"") >&5
12058 (eval $ac_compile) 2>&5
12060 echo "$as_me:12060: \$? = $ac_status" >&5
12061 (exit $ac_status); } &&
12062 { ac_try='test -s conftest.$ac_objext'
12063 { (eval echo "$as_me:12063: \"$ac_try\"") >&5
12064 (eval $ac_try) 2>&5
12066 echo "$as_me:12066: \$? = $ac_status" >&5
12067 (exit $ac_status); }; }; then
12070 echo "$as_me: failed program was:" >&5
12071 cat conftest.$ac_ext >&5
12072 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
12074 rm -f conftest.$ac_objext conftest.$ac_ext
12077 echo "${as_me:-configure}:12077: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
12079 CFLAGS="$cf_trim_CFLAGS"
12080 CPPFLAGS="$cf_trim_CPPFLAGS"
12082 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12083 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
12085 echo "${as_me:-configure}:12085: testing if the second compile does not leave our definition intact error ..." 1>&5
12087 cat >conftest.$ac_ext <<_ACEOF
12088 #line 12088 "configure"
12089 #include "confdefs.h"
12090 #include <sys/types.h>
12095 #ifndef _POSIX_C_SOURCE
12102 rm -f conftest.$ac_objext
12103 if { (eval echo "$as_me:12103: \"$ac_compile\"") >&5
12104 (eval $ac_compile) 2>&5
12106 echo "$as_me:12106: \$? = $ac_status" >&5
12107 (exit $ac_status); } &&
12108 { ac_try='test -s conftest.$ac_objext'
12109 { (eval echo "$as_me:12109: \"$ac_try\"") >&5
12110 (eval $ac_try) 2>&5
12112 echo "$as_me:12112: \$? = $ac_status" >&5
12113 (exit $ac_status); }; }; then
12116 echo "$as_me: failed program was:" >&5
12117 cat conftest.$ac_ext >&5
12118 cf_cv_posix_c_source=no
12120 rm -f conftest.$ac_objext conftest.$ac_ext
12121 CFLAGS="$cf_save_CFLAGS"
12122 CPPFLAGS="$cf_save_CPPFLAGS"
12125 rm -f conftest.$ac_objext conftest.$ac_ext
12128 echo "$as_me:12128: result: $cf_cv_posix_c_source" >&5
12129 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
12131 if test "$cf_cv_posix_c_source" != no ; then
12132 CFLAGS="$cf_trim_CFLAGS"
12133 CPPFLAGS="$cf_trim_CPPFLAGS"
12138 cf_new_extra_cppflags=
12140 for cf_add_cflags in $cf_cv_posix_c_source
12142 case $cf_fix_cppflags in
12144 case $cf_add_cflags in
12145 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12146 case $cf_add_cflags in
12148 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12150 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12151 && test -z "${cf_tst_cflags}" \
12152 && cf_fix_cppflags=yes
12154 if test $cf_fix_cppflags = yes ; then
12156 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12157 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12160 elif test "${cf_tst_cflags}" = "\"'" ; then
12162 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12163 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12169 case "$CPPFLAGS" in
12173 case $cf_add_cflags in
12175 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12177 CPPFLAGS=`echo "$CPPFLAGS" | \
12178 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12179 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12184 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12185 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12192 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12193 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12200 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12201 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12203 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12205 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12206 && test -z "${cf_tst_cflags}" \
12207 && cf_fix_cppflags=no
12212 if test -n "$cf_new_cflags" ; then
12214 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12215 CFLAGS="${CFLAGS}$cf_new_cflags"
12219 if test -n "$cf_new_cppflags" ; then
12221 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12222 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12226 if test -n "$cf_new_extra_cppflags" ; then
12228 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12229 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12238 if test -n "$cf_xopen_source" ; then
12243 cf_new_extra_cppflags=
12245 for cf_add_cflags in $cf_xopen_source
12247 case $cf_fix_cppflags in
12249 case $cf_add_cflags in
12250 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12251 case $cf_add_cflags in
12253 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12255 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12256 && test -z "${cf_tst_cflags}" \
12257 && cf_fix_cppflags=yes
12259 if test $cf_fix_cppflags = yes ; then
12261 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12262 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12265 elif test "${cf_tst_cflags}" = "\"'" ; then
12267 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12268 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12274 case "$CPPFLAGS" in
12278 case $cf_add_cflags in
12280 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12282 CPPFLAGS=`echo "$CPPFLAGS" | \
12283 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12284 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12289 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12290 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12297 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12298 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12305 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12306 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12308 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12310 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12311 && test -z "${cf_tst_cflags}" \
12312 && cf_fix_cppflags=no
12317 if test -n "$cf_new_cflags" ; then
12318 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12320 echo "${as_me:-configure}:12320: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12322 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12323 CFLAGS="${CFLAGS}$cf_new_cflags"
12327 if test -n "$cf_new_cppflags" ; then
12328 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12330 echo "${as_me:-configure}:12330: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12332 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12333 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12337 if test -n "$cf_new_extra_cppflags" ; then
12338 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12340 echo "${as_me:-configure}:12340: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12342 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12343 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12349 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
12350 echo "$as_me:12350: checking if _XOPEN_SOURCE really is set" >&5
12351 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
12352 cat >conftest.$ac_ext <<_ACEOF
12353 #line 12353 "configure"
12354 #include "confdefs.h"
12355 #include <stdlib.h>
12360 #ifndef _XOPEN_SOURCE
12367 rm -f conftest.$ac_objext
12368 if { (eval echo "$as_me:12368: \"$ac_compile\"") >&5
12369 (eval $ac_compile) 2>&5
12371 echo "$as_me:12371: \$? = $ac_status" >&5
12372 (exit $ac_status); } &&
12373 { ac_try='test -s conftest.$ac_objext'
12374 { (eval echo "$as_me:12374: \"$ac_try\"") >&5
12375 (eval $ac_try) 2>&5
12377 echo "$as_me:12377: \$? = $ac_status" >&5
12378 (exit $ac_status); }; }; then
12379 cf_XOPEN_SOURCE_set=yes
12381 echo "$as_me: failed program was:" >&5
12382 cat conftest.$ac_ext >&5
12383 cf_XOPEN_SOURCE_set=no
12385 rm -f conftest.$ac_objext conftest.$ac_ext
12386 echo "$as_me:12386: result: $cf_XOPEN_SOURCE_set" >&5
12387 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
12388 if test $cf_XOPEN_SOURCE_set = yes
12390 cat >conftest.$ac_ext <<_ACEOF
12391 #line 12391 "configure"
12392 #include "confdefs.h"
12393 #include <stdlib.h>
12398 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
12405 rm -f conftest.$ac_objext
12406 if { (eval echo "$as_me:12406: \"$ac_compile\"") >&5
12407 (eval $ac_compile) 2>&5
12409 echo "$as_me:12409: \$? = $ac_status" >&5
12410 (exit $ac_status); } &&
12411 { ac_try='test -s conftest.$ac_objext'
12412 { (eval echo "$as_me:12412: \"$ac_try\"") >&5
12413 (eval $ac_try) 2>&5
12415 echo "$as_me:12415: \$? = $ac_status" >&5
12416 (exit $ac_status); }; }; then
12417 cf_XOPEN_SOURCE_set_ok=yes
12419 echo "$as_me: failed program was:" >&5
12420 cat conftest.$ac_ext >&5
12421 cf_XOPEN_SOURCE_set_ok=no
12423 rm -f conftest.$ac_objext conftest.$ac_ext
12424 if test $cf_XOPEN_SOURCE_set_ok = no
12426 { echo "$as_me:12426: WARNING: _XOPEN_SOURCE is lower than requested" >&5
12427 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
12431 echo "$as_me:12431: checking if we should define _XOPEN_SOURCE" >&5
12432 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12433 if test "${cf_cv_xopen_source+set}" = set; then
12434 echo $ECHO_N "(cached) $ECHO_C" >&6
12437 cat >conftest.$ac_ext <<_ACEOF
12438 #line 12438 "configure"
12439 #include "confdefs.h"
12441 #include <stdlib.h>
12442 #include <string.h>
12443 #include <sys/types.h>
12449 #ifndef _XOPEN_SOURCE
12456 rm -f conftest.$ac_objext
12457 if { (eval echo "$as_me:12457: \"$ac_compile\"") >&5
12458 (eval $ac_compile) 2>&5
12460 echo "$as_me:12460: \$? = $ac_status" >&5
12461 (exit $ac_status); } &&
12462 { ac_try='test -s conftest.$ac_objext'
12463 { (eval echo "$as_me:12463: \"$ac_try\"") >&5
12464 (eval $ac_try) 2>&5
12466 echo "$as_me:12466: \$? = $ac_status" >&5
12467 (exit $ac_status); }; }; then
12468 cf_cv_xopen_source=no
12470 echo "$as_me: failed program was:" >&5
12471 cat conftest.$ac_ext >&5
12472 cf_save="$CPPFLAGS"
12474 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12475 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12477 cat >conftest.$ac_ext <<_ACEOF
12478 #line 12478 "configure"
12479 #include "confdefs.h"
12481 #include <stdlib.h>
12482 #include <string.h>
12483 #include <sys/types.h>
12489 #ifdef _XOPEN_SOURCE
12496 rm -f conftest.$ac_objext
12497 if { (eval echo "$as_me:12497: \"$ac_compile\"") >&5
12498 (eval $ac_compile) 2>&5
12500 echo "$as_me:12500: \$? = $ac_status" >&5
12501 (exit $ac_status); } &&
12502 { ac_try='test -s conftest.$ac_objext'
12503 { (eval echo "$as_me:12503: \"$ac_try\"") >&5
12504 (eval $ac_try) 2>&5
12506 echo "$as_me:12506: \$? = $ac_status" >&5
12507 (exit $ac_status); }; }; then
12508 cf_cv_xopen_source=no
12510 echo "$as_me: failed program was:" >&5
12511 cat conftest.$ac_ext >&5
12512 cf_cv_xopen_source=$cf_XOPEN_SOURCE
12514 rm -f conftest.$ac_objext conftest.$ac_ext
12515 CPPFLAGS="$cf_save"
12518 rm -f conftest.$ac_objext conftest.$ac_ext
12521 echo "$as_me:12521: result: $cf_cv_xopen_source" >&5
12522 echo "${ECHO_T}$cf_cv_xopen_source" >&6
12524 if test "$cf_cv_xopen_source" != no ; then
12526 CFLAGS=`echo "$CFLAGS" | \
12527 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12528 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
12530 CPPFLAGS=`echo "$CPPFLAGS" | \
12531 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12532 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
12534 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12539 cf_new_extra_cppflags=
12541 for cf_add_cflags in $cf_temp_xopen_source
12543 case $cf_fix_cppflags in
12545 case $cf_add_cflags in
12546 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12547 case $cf_add_cflags in
12549 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12551 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12552 && test -z "${cf_tst_cflags}" \
12553 && cf_fix_cppflags=yes
12555 if test $cf_fix_cppflags = yes ; then
12557 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12558 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12561 elif test "${cf_tst_cflags}" = "\"'" ; then
12563 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12564 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12570 case "$CPPFLAGS" in
12574 case $cf_add_cflags in
12576 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12578 CPPFLAGS=`echo "$CPPFLAGS" | \
12579 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12580 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12585 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12586 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12593 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12594 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12601 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12602 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12604 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12606 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12607 && test -z "${cf_tst_cflags}" \
12608 && cf_fix_cppflags=no
12613 if test -n "$cf_new_cflags" ; then
12615 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12616 CFLAGS="${CFLAGS}$cf_new_cflags"
12620 if test -n "$cf_new_cppflags" ; then
12622 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12623 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12627 if test -n "$cf_new_extra_cppflags" ; then
12629 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12630 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12639 # Check whether --enable-largefile or --disable-largefile was given.
12640 if test "${enable_largefile+set}" = set; then
12641 enableval="$enable_largefile"
12644 if test "$enable_largefile" != no; then
12646 echo "$as_me:12646: checking for special C compiler options needed for large files" >&5
12647 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12648 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12649 echo $ECHO_N "(cached) $ECHO_C" >&6
12651 ac_cv_sys_largefile_CC=no
12652 if test "$GCC" != yes; then
12655 # IRIX 6.2 and later do not support large files by default,
12656 # so use the C compiler's -n32 option if that helps.
12657 cat >conftest.$ac_ext <<_ACEOF
12658 #line 12658 "configure"
12659 #include "confdefs.h"
12660 #include <sys/types.h>
12661 /* Check that off_t can represent 2**63 - 1 correctly.
12662 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12663 since some C++ compilers masquerading as C compilers
12664 incorrectly reject 9223372036854775807. */
12665 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12666 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12667 && LARGE_OFF_T % 2147483647 == 1)
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
12694 rm -f conftest.$ac_objext
12696 rm -f conftest.$ac_objext
12697 if { (eval echo "$as_me:12697: \"$ac_compile\"") >&5
12698 (eval $ac_compile) 2>&5
12700 echo "$as_me:12700: \$? = $ac_status" >&5
12701 (exit $ac_status); } &&
12702 { ac_try='test -s conftest.$ac_objext'
12703 { (eval echo "$as_me:12703: \"$ac_try\"") >&5
12704 (eval $ac_try) 2>&5
12706 echo "$as_me:12706: \$? = $ac_status" >&5
12707 (exit $ac_status); }; }; then
12708 ac_cv_sys_largefile_CC=' -n32'; break
12710 echo "$as_me: failed program was:" >&5
12711 cat conftest.$ac_ext >&5
12713 rm -f conftest.$ac_objext
12717 rm -f conftest.$ac_ext
12720 echo "$as_me:12720: result: $ac_cv_sys_largefile_CC" >&5
12721 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12722 if test "$ac_cv_sys_largefile_CC" != no; then
12723 CC=$CC$ac_cv_sys_largefile_CC
12726 echo "$as_me:12726: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12727 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12728 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12729 echo $ECHO_N "(cached) $ECHO_C" >&6
12732 ac_cv_sys_file_offset_bits=no
12733 cat >conftest.$ac_ext <<_ACEOF
12734 #line 12734 "configure"
12735 #include "confdefs.h"
12736 #include <sys/types.h>
12737 /* Check that off_t can represent 2**63 - 1 correctly.
12738 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12739 since some C++ compilers masquerading as C compilers
12740 incorrectly reject 9223372036854775807. */
12741 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12742 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12743 && LARGE_OFF_T % 2147483647 == 1)
12753 rm -f conftest.$ac_objext
12754 if { (eval echo "$as_me:12754: \"$ac_compile\"") >&5
12755 (eval $ac_compile) 2>&5
12757 echo "$as_me:12757: \$? = $ac_status" >&5
12758 (exit $ac_status); } &&
12759 { ac_try='test -s conftest.$ac_objext'
12760 { (eval echo "$as_me:12760: \"$ac_try\"") >&5
12761 (eval $ac_try) 2>&5
12763 echo "$as_me:12763: \$? = $ac_status" >&5
12764 (exit $ac_status); }; }; then
12767 echo "$as_me: failed program was:" >&5
12768 cat conftest.$ac_ext >&5
12770 rm -f conftest.$ac_objext conftest.$ac_ext
12771 cat >conftest.$ac_ext <<_ACEOF
12772 #line 12772 "configure"
12773 #include "confdefs.h"
12774 #define _FILE_OFFSET_BITS 64
12775 #include <sys/types.h>
12776 /* Check that off_t can represent 2**63 - 1 correctly.
12777 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12778 since some C++ compilers masquerading as C compilers
12779 incorrectly reject 9223372036854775807. */
12780 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12781 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12782 && LARGE_OFF_T % 2147483647 == 1)
12792 rm -f conftest.$ac_objext
12793 if { (eval echo "$as_me:12793: \"$ac_compile\"") >&5
12794 (eval $ac_compile) 2>&5
12796 echo "$as_me:12796: \$? = $ac_status" >&5
12797 (exit $ac_status); } &&
12798 { ac_try='test -s conftest.$ac_objext'
12799 { (eval echo "$as_me:12799: \"$ac_try\"") >&5
12800 (eval $ac_try) 2>&5
12802 echo "$as_me:12802: \$? = $ac_status" >&5
12803 (exit $ac_status); }; }; then
12804 ac_cv_sys_file_offset_bits=64; break
12806 echo "$as_me: failed program was:" >&5
12807 cat conftest.$ac_ext >&5
12809 rm -f conftest.$ac_objext conftest.$ac_ext
12813 echo "$as_me:12813: result: $ac_cv_sys_file_offset_bits" >&5
12814 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12815 if test "$ac_cv_sys_file_offset_bits" != no; then
12817 cat >>confdefs.h <<EOF
12818 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12823 echo "$as_me:12823: checking for _LARGE_FILES value needed for large files" >&5
12824 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12825 if test "${ac_cv_sys_large_files+set}" = set; then
12826 echo $ECHO_N "(cached) $ECHO_C" >&6
12829 ac_cv_sys_large_files=no
12830 cat >conftest.$ac_ext <<_ACEOF
12831 #line 12831 "configure"
12832 #include "confdefs.h"
12833 #include <sys/types.h>
12834 /* Check that off_t can represent 2**63 - 1 correctly.
12835 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12836 since some C++ compilers masquerading as C compilers
12837 incorrectly reject 9223372036854775807. */
12838 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12839 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12840 && LARGE_OFF_T % 2147483647 == 1)
12850 rm -f conftest.$ac_objext
12851 if { (eval echo "$as_me:12851: \"$ac_compile\"") >&5
12852 (eval $ac_compile) 2>&5
12854 echo "$as_me:12854: \$? = $ac_status" >&5
12855 (exit $ac_status); } &&
12856 { ac_try='test -s conftest.$ac_objext'
12857 { (eval echo "$as_me:12857: \"$ac_try\"") >&5
12858 (eval $ac_try) 2>&5
12860 echo "$as_me:12860: \$? = $ac_status" >&5
12861 (exit $ac_status); }; }; then
12864 echo "$as_me: failed program was:" >&5
12865 cat conftest.$ac_ext >&5
12867 rm -f conftest.$ac_objext conftest.$ac_ext
12868 cat >conftest.$ac_ext <<_ACEOF
12869 #line 12869 "configure"
12870 #include "confdefs.h"
12871 #define _LARGE_FILES 1
12872 #include <sys/types.h>
12873 /* Check that off_t can represent 2**63 - 1 correctly.
12874 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12875 since some C++ compilers masquerading as C compilers
12876 incorrectly reject 9223372036854775807. */
12877 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12878 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12879 && LARGE_OFF_T % 2147483647 == 1)
12889 rm -f conftest.$ac_objext
12890 if { (eval echo "$as_me:12890: \"$ac_compile\"") >&5
12891 (eval $ac_compile) 2>&5
12893 echo "$as_me:12893: \$? = $ac_status" >&5
12894 (exit $ac_status); } &&
12895 { ac_try='test -s conftest.$ac_objext'
12896 { (eval echo "$as_me:12896: \"$ac_try\"") >&5
12897 (eval $ac_try) 2>&5
12899 echo "$as_me:12899: \$? = $ac_status" >&5
12900 (exit $ac_status); }; }; then
12901 ac_cv_sys_large_files=1; break
12903 echo "$as_me: failed program was:" >&5
12904 cat conftest.$ac_ext >&5
12906 rm -f conftest.$ac_objext conftest.$ac_ext
12910 echo "$as_me:12910: result: $ac_cv_sys_large_files" >&5
12911 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
12912 if test "$ac_cv_sys_large_files" != no; then
12914 cat >>confdefs.h <<EOF
12915 #define _LARGE_FILES $ac_cv_sys_large_files
12922 if test "$enable_largefile" != no ; then
12923 echo "$as_me:12923: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12924 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12925 if test "${ac_cv_sys_largefile_source+set}" = set; then
12926 echo $ECHO_N "(cached) $ECHO_C" >&6
12929 ac_cv_sys_largefile_source=no
12930 cat >conftest.$ac_ext <<_ACEOF
12931 #line 12931 "configure"
12932 #include "confdefs.h"
12942 rm -f conftest.$ac_objext
12943 if { (eval echo "$as_me:12943: \"$ac_compile\"") >&5
12944 (eval $ac_compile) 2>&5
12946 echo "$as_me:12946: \$? = $ac_status" >&5
12947 (exit $ac_status); } &&
12948 { ac_try='test -s conftest.$ac_objext'
12949 { (eval echo "$as_me:12949: \"$ac_try\"") >&5
12950 (eval $ac_try) 2>&5
12952 echo "$as_me:12952: \$? = $ac_status" >&5
12953 (exit $ac_status); }; }; then
12956 echo "$as_me: failed program was:" >&5
12957 cat conftest.$ac_ext >&5
12959 rm -f conftest.$ac_objext conftest.$ac_ext
12960 cat >conftest.$ac_ext <<_ACEOF
12961 #line 12961 "configure"
12962 #include "confdefs.h"
12963 #define _LARGEFILE_SOURCE 1
12973 rm -f conftest.$ac_objext
12974 if { (eval echo "$as_me:12974: \"$ac_compile\"") >&5
12975 (eval $ac_compile) 2>&5
12977 echo "$as_me:12977: \$? = $ac_status" >&5
12978 (exit $ac_status); } &&
12979 { ac_try='test -s conftest.$ac_objext'
12980 { (eval echo "$as_me:12980: \"$ac_try\"") >&5
12981 (eval $ac_try) 2>&5
12983 echo "$as_me:12983: \$? = $ac_status" >&5
12984 (exit $ac_status); }; }; then
12985 ac_cv_sys_largefile_source=1; break
12987 echo "$as_me: failed program was:" >&5
12988 cat conftest.$ac_ext >&5
12990 rm -f conftest.$ac_objext conftest.$ac_ext
12994 echo "$as_me:12994: result: $ac_cv_sys_largefile_source" >&5
12995 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
12996 if test "$ac_cv_sys_largefile_source" != no; then
12998 cat >>confdefs.h <<EOF
12999 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13005 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13006 # in glibc 2.1.3, but that breaks too many other things.
13007 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13008 echo "$as_me:13008: checking for fseeko" >&5
13009 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13010 if test "${ac_cv_func_fseeko+set}" = set; then
13011 echo $ECHO_N "(cached) $ECHO_C" >&6
13013 cat >conftest.$ac_ext <<_ACEOF
13014 #line 13014 "configure"
13015 #include "confdefs.h"
13020 return fseeko && fseeko (stdin, 0, 0);
13025 rm -f conftest.$ac_objext conftest$ac_exeext
13026 if { (eval echo "$as_me:13026: \"$ac_link\"") >&5
13027 (eval $ac_link) 2>&5
13029 echo "$as_me:13029: \$? = $ac_status" >&5
13030 (exit $ac_status); } &&
13031 { ac_try='test -s conftest$ac_exeext'
13032 { (eval echo "$as_me:13032: \"$ac_try\"") >&5
13033 (eval $ac_try) 2>&5
13035 echo "$as_me:13035: \$? = $ac_status" >&5
13036 (exit $ac_status); }; }; then
13037 ac_cv_func_fseeko=yes
13039 echo "$as_me: failed program was:" >&5
13040 cat conftest.$ac_ext >&5
13041 ac_cv_func_fseeko=no
13043 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13045 echo "$as_me:13045: result: $ac_cv_func_fseeko" >&5
13046 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13047 if test $ac_cv_func_fseeko = yes; then
13049 cat >>confdefs.h <<\EOF
13050 #define HAVE_FSEEKO 1
13055 # Normally we would collect these definitions in the config.h,
13056 # but (like _XOPEN_SOURCE), some environments rely on having these
13057 # defined before any of the system headers are included. Another
13058 # case comes up with C++, e.g., on AIX the compiler compiles the
13059 # header files by themselves before looking at the body files it is
13060 # told to compile. For ncurses, those header files do not include
13062 if test "$ac_cv_sys_large_files" != no
13065 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13066 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13069 if test "$ac_cv_sys_largefile_source" != no
13072 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13073 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13076 if test "$ac_cv_sys_file_offset_bits" != no
13079 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13080 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13084 echo "$as_me:13084: checking whether to use struct dirent64" >&5
13085 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13086 if test "${cf_cv_struct_dirent64+set}" = set; then
13087 echo $ECHO_N "(cached) $ECHO_C" >&6
13090 cat >conftest.$ac_ext <<_ACEOF
13091 #line 13091 "configure"
13092 #include "confdefs.h"
13094 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13095 #include <sys/types.h>
13096 #include <dirent.h>
13102 /* if transitional largefile support is setup, this is true */
13103 extern struct dirent64 * readdir(DIR *);
13104 struct dirent64 *x = readdir((DIR *)0);
13105 struct dirent *y = readdir((DIR *)0);
13112 rm -f conftest.$ac_objext
13113 if { (eval echo "$as_me:13113: \"$ac_compile\"") >&5
13114 (eval $ac_compile) 2>&5
13116 echo "$as_me:13116: \$? = $ac_status" >&5
13117 (exit $ac_status); } &&
13118 { ac_try='test -s conftest.$ac_objext'
13119 { (eval echo "$as_me:13119: \"$ac_try\"") >&5
13120 (eval $ac_try) 2>&5
13122 echo "$as_me:13122: \$? = $ac_status" >&5
13123 (exit $ac_status); }; }; then
13124 cf_cv_struct_dirent64=yes
13126 echo "$as_me: failed program was:" >&5
13127 cat conftest.$ac_ext >&5
13128 cf_cv_struct_dirent64=no
13130 rm -f conftest.$ac_objext conftest.$ac_ext
13133 echo "$as_me:13133: result: $cf_cv_struct_dirent64" >&5
13134 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13135 test "$cf_cv_struct_dirent64" = yes &&
13136 cat >>confdefs.h <<\EOF
13137 #define HAVE_STRUCT_DIRENT64 1
13142 ### Enable compiling-in rcs id's
13143 echo "$as_me:13143: checking if RCS identifiers should be compiled-in" >&5
13144 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13146 # Check whether --with-rcs-ids or --without-rcs-ids was given.
13147 if test "${with_rcs_ids+set}" = set; then
13148 withval="$with_rcs_ids"
13149 with_rcs_ids=$withval
13153 echo "$as_me:13153: result: $with_rcs_ids" >&5
13154 echo "${ECHO_T}$with_rcs_ids" >&6
13155 test "$with_rcs_ids" = yes &&
13156 cat >>confdefs.h <<\EOF
13157 #define USE_RCS_IDS 1
13160 ###############################################################################
13162 ### Note that some functions (such as const) are normally disabled anyway.
13163 echo "$as_me:13163: checking if you want to build with function extensions" >&5
13164 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
13166 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
13167 if test "${enable_ext_funcs+set}" = set; then
13168 enableval="$enable_ext_funcs"
13169 with_ext_funcs=$enableval
13173 echo "$as_me:13173: result: $with_ext_funcs" >&5
13174 echo "${ECHO_T}$with_ext_funcs" >&6
13175 if test "$with_ext_funcs" = yes ; then
13176 NCURSES_EXT_FUNCS=1
13178 cat >>confdefs.h <<\EOF
13179 #define HAVE_USE_DEFAULT_COLORS 1
13182 cat >>confdefs.h <<\EOF
13183 #define NCURSES_EXT_FUNCS 1
13187 NCURSES_EXT_FUNCS=0
13190 ### use option --enable-const to turn on use of const beyond that in XSI.
13191 echo "$as_me:13191: checking for extended use of const keyword" >&5
13192 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
13194 # Check whether --enable-const or --disable-const was given.
13195 if test "${enable_const+set}" = set; then
13196 enableval="$enable_const"
13197 with_ext_const=$enableval
13201 echo "$as_me:13201: result: $with_ext_const" >&5
13202 echo "${ECHO_T}$with_ext_const" >&6
13203 NCURSES_CONST='/*nothing*/'
13204 if test "$with_ext_const" = yes ; then
13205 NCURSES_CONST=const
13208 ###############################################################################
13209 # These options are relatively safe to experiment with.
13211 echo "$as_me:13211: checking if you want all development code" >&5
13212 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
13214 # Check whether --with-develop or --without-develop was given.
13215 if test "${with_develop+set}" = set; then
13216 withval="$with_develop"
13217 with_develop=$withval
13221 echo "$as_me:13221: result: $with_develop" >&5
13222 echo "${ECHO_T}$with_develop" >&6
13224 ###############################################################################
13225 # These are just experimental, probably should not be in a package:
13227 # This is still experimental (20080329), but should ultimately be moved to
13228 # the script-block --with-normal, etc.
13230 echo "$as_me:13230: checking if you want to link with the pthread library" >&5
13231 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
13233 # Check whether --with-pthread or --without-pthread was given.
13234 if test "${with_pthread+set}" = set; then
13235 withval="$with_pthread"
13236 with_pthread=$withval
13240 echo "$as_me:13240: result: $with_pthread" >&5
13241 echo "${ECHO_T}$with_pthread" >&6
13243 if test "$with_pthread" != no ; then
13244 echo "$as_me:13244: checking for pthread.h" >&5
13245 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
13246 if test "${ac_cv_header_pthread_h+set}" = set; then
13247 echo $ECHO_N "(cached) $ECHO_C" >&6
13249 cat >conftest.$ac_ext <<_ACEOF
13250 #line 13250 "configure"
13251 #include "confdefs.h"
13252 #include <pthread.h>
13254 if { (eval echo "$as_me:13254: \"$ac_cpp conftest.$ac_ext\"") >&5
13255 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13257 egrep -v '^ *\+' conftest.er1 >conftest.err
13259 cat conftest.err >&5
13260 echo "$as_me:13260: \$? = $ac_status" >&5
13261 (exit $ac_status); } >/dev/null; then
13262 if test -s conftest.err; then
13263 ac_cpp_err=$ac_c_preproc_warn_flag
13270 if test -z "$ac_cpp_err"; then
13271 ac_cv_header_pthread_h=yes
13273 echo "$as_me: failed program was:" >&5
13274 cat conftest.$ac_ext >&5
13275 ac_cv_header_pthread_h=no
13277 rm -f conftest.err conftest.$ac_ext
13279 echo "$as_me:13279: result: $ac_cv_header_pthread_h" >&5
13280 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
13281 if test $ac_cv_header_pthread_h = yes; then
13283 cat >>confdefs.h <<\EOF
13284 #define HAVE_PTHREADS_H 1
13287 for cf_lib_pthread in pthread c_r
13289 echo "$as_me:13289: checking if we can link with the $cf_lib_pthread library" >&5
13290 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
13291 cf_save_LIBS="$LIBS"
13293 cf_add_libs="-l$cf_lib_pthread"
13294 # Filter out duplicates - this happens with badly-designed ".pc" files...
13295 for cf_add_1lib in $LIBS
13297 for cf_add_2lib in $cf_add_libs
13299 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13305 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13307 LIBS="$cf_add_libs"
13309 cat >conftest.$ac_ext <<_ACEOF
13310 #line 13310 "configure"
13311 #include "confdefs.h"
13313 #include <pthread.h>
13319 int rc = pthread_create(0,0,0,0);
13320 int r2 = pthread_mutexattr_settype(0, 0);
13326 rm -f conftest.$ac_objext conftest$ac_exeext
13327 if { (eval echo "$as_me:13327: \"$ac_link\"") >&5
13328 (eval $ac_link) 2>&5
13330 echo "$as_me:13330: \$? = $ac_status" >&5
13331 (exit $ac_status); } &&
13332 { ac_try='test -s conftest$ac_exeext'
13333 { (eval echo "$as_me:13333: \"$ac_try\"") >&5
13334 (eval $ac_try) 2>&5
13336 echo "$as_me:13336: \$? = $ac_status" >&5
13337 (exit $ac_status); }; }; then
13340 echo "$as_me: failed program was:" >&5
13341 cat conftest.$ac_ext >&5
13344 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13345 LIBS="$cf_save_LIBS"
13346 echo "$as_me:13346: result: $with_pthread" >&5
13347 echo "${ECHO_T}$with_pthread" >&6
13348 test "$with_pthread" = yes && break
13351 if test "$with_pthread" = yes ; then
13353 cf_add_libs="-l$cf_lib_pthread"
13354 # Filter out duplicates - this happens with badly-designed ".pc" files...
13355 for cf_add_1lib in $LIBS
13357 for cf_add_2lib in $cf_add_libs
13359 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13365 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13367 LIBS="$cf_add_libs"
13369 cat >>confdefs.h <<\EOF
13370 #define HAVE_LIBPTHREADS 1
13374 { { echo "$as_me:13374: error: Cannot link with pthread library" >&5
13375 echo "$as_me: error: Cannot link with pthread library" >&2;}
13376 { (exit 1); exit 1; }; }
13383 echo "$as_me:13383: checking if you want to use weak-symbols for pthreads" >&5
13384 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
13386 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
13387 if test "${enable_weak_symbols+set}" = set; then
13388 enableval="$enable_weak_symbols"
13389 use_weak_symbols=$withval
13391 use_weak_symbols=no
13393 echo "$as_me:13393: result: $use_weak_symbols" >&5
13394 echo "${ECHO_T}$use_weak_symbols" >&6
13395 if test "$use_weak_symbols" = yes ; then
13397 echo "$as_me:13397: checking if $CC supports weak symbols" >&5
13398 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
13399 if test "${cf_cv_weak_symbols+set}" = set; then
13400 echo $ECHO_N "(cached) $ECHO_C" >&6
13403 cat >conftest.$ac_ext <<_ACEOF
13404 #line 13404 "configure"
13405 #include "confdefs.h"
13412 #if defined(__GNUC__)
13413 # if defined __USE_ISOC99
13414 # define _cat_pragma(exp) _Pragma(#exp)
13415 # define _weak_pragma(exp) _cat_pragma(weak name)
13417 # define _weak_pragma(exp)
13419 # define _declare(name) __extension__ extern __typeof__(name) name
13420 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
13423 weak_symbol(fopen);
13429 rm -f conftest.$ac_objext
13430 if { (eval echo "$as_me:13430: \"$ac_compile\"") >&5
13431 (eval $ac_compile) 2>&5
13433 echo "$as_me:13433: \$? = $ac_status" >&5
13434 (exit $ac_status); } &&
13435 { ac_try='test -s conftest.$ac_objext'
13436 { (eval echo "$as_me:13436: \"$ac_try\"") >&5
13437 (eval $ac_try) 2>&5
13439 echo "$as_me:13439: \$? = $ac_status" >&5
13440 (exit $ac_status); }; }; then
13441 cf_cv_weak_symbols=yes
13443 echo "$as_me: failed program was:" >&5
13444 cat conftest.$ac_ext >&5
13445 cf_cv_weak_symbols=no
13447 rm -f conftest.$ac_objext conftest.$ac_ext
13450 echo "$as_me:13450: result: $cf_cv_weak_symbols" >&5
13451 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
13454 cf_cv_weak_symbols=no
13457 if test $cf_cv_weak_symbols = yes ; then
13459 cat >>confdefs.h <<\EOF
13460 #define USE_WEAK_SYMBOLS 1
13466 if test "$with_pthread" = "yes" ; then
13468 cat >>confdefs.h <<\EOF
13469 #define USE_PTHREADS 1
13472 enable_reentrant=yes
13473 if test $cf_cv_weak_symbols = yes ; then
13478 # OpenSUSE is installing ncurses6, using reentrant option.
13479 echo "$as_me:13479: checking for _nc_TABSIZE" >&5
13480 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
13481 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
13482 echo $ECHO_N "(cached) $ECHO_C" >&6
13484 cat >conftest.$ac_ext <<_ACEOF
13485 #line 13485 "configure"
13486 #include "confdefs.h"
13487 #define _nc_TABSIZE autoconf_temporary
13488 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
13495 /* We use char because int might match the return type of a gcc2
13496 builtin and then its argument prototype would still apply. */
13497 char _nc_TABSIZE (void);
13503 /* The GNU C library defines stubs for functions which it implements
13504 to always fail with ENOSYS. Some functions are actually named
13505 something starting with __ and the normal name is an alias. */
13506 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
13507 #error found stub for _nc_TABSIZE
13510 return _nc_TABSIZE ();
13515 rm -f conftest.$ac_objext conftest$ac_exeext
13516 if { (eval echo "$as_me:13516: \"$ac_link\"") >&5
13517 (eval $ac_link) 2>&5
13519 echo "$as_me:13519: \$? = $ac_status" >&5
13520 (exit $ac_status); } &&
13521 { ac_try='test -s conftest$ac_exeext'
13522 { (eval echo "$as_me:13522: \"$ac_try\"") >&5
13523 (eval $ac_try) 2>&5
13525 echo "$as_me:13525: \$? = $ac_status" >&5
13526 (exit $ac_status); }; }; then
13527 ac_cv_func__nc_TABSIZE=yes
13529 echo "$as_me: failed program was:" >&5
13530 cat conftest.$ac_ext >&5
13531 ac_cv_func__nc_TABSIZE=no
13533 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13535 echo "$as_me:13535: result: $ac_cv_func__nc_TABSIZE" >&5
13536 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
13537 if test $ac_cv_func__nc_TABSIZE = yes; then
13538 assume_reentrant=yes
13540 assume_reentrant=no
13543 # Reentrant code has to be opaque; there's little advantage to making ncurses
13544 # opaque outside of that, so there is no --enable-opaque option. We can use
13545 # this option without --with-pthreads, but this will be always set for
13547 echo "$as_me:13547: checking if you want experimental reentrant code" >&5
13548 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
13550 # Check whether --enable-reentrant or --disable-reentrant was given.
13551 if test "${enable_reentrant+set}" = set; then
13552 enableval="$enable_reentrant"
13553 with_reentrant=$enableval
13555 with_reentrant=$assume_reentrant
13557 echo "$as_me:13557: result: $with_reentrant" >&5
13558 echo "${ECHO_T}$with_reentrant" >&6
13559 if test "$with_reentrant" = yes ; then
13560 cf_cv_enable_reentrant=1
13561 if test $cf_cv_weak_symbols = yes ; then
13563 # remove pthread library from $LIBS
13564 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
13566 elif test "$assume_reentrant" = no ; then
13567 LIB_SUFFIX="t${LIB_SUFFIX}"
13570 cat >>confdefs.h <<\EOF
13571 #define USE_REENTRANT 1
13575 cf_cv_enable_reentrant=0
13578 ### Allow using a different wrap-prefix
13579 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
13580 echo "$as_me:13580: checking for prefix used to wrap public variables" >&5
13581 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
13583 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
13584 if test "${with_wrap_prefix+set}" = set; then
13585 withval="$with_wrap_prefix"
13586 NCURSES_WRAP_PREFIX=$withval
13588 NCURSES_WRAP_PREFIX=_nc_
13590 echo "$as_me:13590: result: $NCURSES_WRAP_PREFIX" >&5
13591 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
13593 NCURSES_WRAP_PREFIX=_nc_
13596 cat >>confdefs.h <<EOF
13597 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
13600 ###############################################################################
13602 ### use option --disable-echo to suppress full display compiling commands
13604 echo "$as_me:13604: checking if you want to see long compiling messages" >&5
13605 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
13607 # Check whether --enable-echo or --disable-echo was given.
13608 if test "${enable_echo+set}" = set; then
13609 enableval="$enable_echo"
13610 test "$enableval" != no && enableval=yes
13611 if test "$enableval" != "yes" ; then
13614 ECHO_LD='@echo linking $@;'
13615 RULE_CC='@echo compiling $<'
13616 SHOW_CC='@echo compiling $@'
13638 echo "$as_me:13638: result: $enableval" >&5
13639 echo "${ECHO_T}$enableval" >&6
13641 ### use option --enable-warnings to turn on all gcc warnings
13642 echo "$as_me:13642: checking if you want to see compiler warnings" >&5
13643 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
13645 # Check whether --enable-warnings or --disable-warnings was given.
13646 if test "${enable_warnings+set}" = set; then
13647 enableval="$enable_warnings"
13648 with_warnings=$enableval
13650 echo "$as_me:13650: result: $with_warnings" >&5
13651 echo "${ECHO_T}$with_warnings" >&6
13653 if test "x$with_warnings" = "xyes"; then
13655 ADAFLAGS="$ADAFLAGS -gnatg"
13659 if test "$GCC" = yes ; then
13662 echo "$as_me:13662: checking if this is really Intel C compiler" >&5
13663 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
13664 cf_save_CFLAGS="$CFLAGS"
13665 CFLAGS="$CFLAGS -no-gcc"
13666 cat >conftest.$ac_ext <<_ACEOF
13667 #line 13667 "configure"
13668 #include "confdefs.h"
13674 #ifdef __INTEL_COMPILER
13683 rm -f conftest.$ac_objext
13684 if { (eval echo "$as_me:13684: \"$ac_compile\"") >&5
13685 (eval $ac_compile) 2>&5
13687 echo "$as_me:13687: \$? = $ac_status" >&5
13688 (exit $ac_status); } &&
13689 { ac_try='test -s conftest.$ac_objext'
13690 { (eval echo "$as_me:13690: \"$ac_try\"") >&5
13691 (eval $ac_try) 2>&5
13693 echo "$as_me:13693: \$? = $ac_status" >&5
13694 (exit $ac_status); }; }; then
13696 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13699 echo "$as_me: failed program was:" >&5
13700 cat conftest.$ac_ext >&5
13702 rm -f conftest.$ac_objext conftest.$ac_ext
13703 CFLAGS="$cf_save_CFLAGS"
13704 echo "$as_me:13704: result: $INTEL_COMPILER" >&5
13705 echo "${ECHO_T}$INTEL_COMPILER" >&6
13712 if test "$GCC" = yes ; then
13713 echo "$as_me:13713: checking if this is really Clang C compiler" >&5
13714 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13715 cf_save_CFLAGS="$CFLAGS"
13716 CFLAGS="$CFLAGS -Qunused-arguments"
13717 cat >conftest.$ac_ext <<_ACEOF
13718 #line 13718 "configure"
13719 #include "confdefs.h"
13734 rm -f conftest.$ac_objext
13735 if { (eval echo "$as_me:13735: \"$ac_compile\"") >&5
13736 (eval $ac_compile) 2>&5
13738 echo "$as_me:13738: \$? = $ac_status" >&5
13739 (exit $ac_status); } &&
13740 { ac_try='test -s conftest.$ac_objext'
13741 { (eval echo "$as_me:13741: \"$ac_try\"") >&5
13742 (eval $ac_try) 2>&5
13744 echo "$as_me:13744: \$? = $ac_status" >&5
13745 (exit $ac_status); }; }; then
13747 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13750 echo "$as_me: failed program was:" >&5
13751 cat conftest.$ac_ext >&5
13753 rm -f conftest.$ac_objext conftest.$ac_ext
13754 CFLAGS="$cf_save_CFLAGS"
13755 echo "$as_me:13755: result: $CLANG_COMPILER" >&5
13756 echo "${ECHO_T}$CLANG_COMPILER" >&6
13759 cat > conftest.$ac_ext <<EOF
13760 #line 13760 "${as_me:-configure}"
13761 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13764 if test "$INTEL_COMPILER" = yes
13766 # The "-wdXXX" options suppress warnings:
13767 # remark #1419: external declaration in primary source file
13768 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13769 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13770 # remark #193: zero used for undefined preprocessing identifier
13771 # remark #593: variable "curs_sb_left_arrow" was set but never used
13772 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13773 # remark #869: parameter "tw" was never referenced
13774 # remark #981: operands are evaluated in unspecified order
13775 # warning #279: controlling expression is constant
13777 { echo "$as_me:13777: checking for $CC warning options..." >&5
13778 echo "$as_me: checking for $CC warning options..." >&6;}
13779 cf_save_CFLAGS="$CFLAGS"
13780 EXTRA_CFLAGS="-Wall"
13792 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13793 if { (eval echo "$as_me:13793: \"$ac_compile\"") >&5
13794 (eval $ac_compile) 2>&5
13796 echo "$as_me:13796: \$? = $ac_status" >&5
13797 (exit $ac_status); }; then
13798 test -n "$verbose" && echo "$as_me:13798: result: ... -$cf_opt" >&5
13799 echo "${ECHO_T}... -$cf_opt" >&6
13800 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13803 CFLAGS="$cf_save_CFLAGS"
13805 elif test "$GCC" = yes
13807 { echo "$as_me:13807: checking for $CC warning options..." >&5
13808 echo "$as_me: checking for $CC warning options..." >&6;}
13809 cf_save_CFLAGS="$CFLAGS"
13812 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13813 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13814 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13815 for cf_opt in W Wall \
13816 Wbad-function-cast \
13819 Wdeclaration-after-statement \
13822 Wmissing-declarations \
13823 Wmissing-prototypes \
13827 Wstrict-prototypes \
13828 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13830 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13831 if { (eval echo "$as_me:13831: \"$ac_compile\"") >&5
13832 (eval $ac_compile) 2>&5
13834 echo "$as_me:13834: \$? = $ac_status" >&5
13835 (exit $ac_status); }; then
13836 test -n "$verbose" && echo "$as_me:13836: result: ... -$cf_opt" >&5
13837 echo "${ECHO_T}... -$cf_opt" >&6
13841 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13842 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
13846 case $GCC_VERSION in
13848 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
13850 echo "${as_me:-configure}:13850: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13856 case $GCC_VERSION in
13858 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
13860 echo "${as_me:-configure}:13860: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13866 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13869 CFLAGS="$cf_save_CFLAGS"
13875 if test "$GCC" = yes
13877 cat > conftest.i <<EOF
13879 #define GCC_PRINTF 0
13882 #define GCC_SCANF 0
13884 #ifndef GCC_NORETURN
13885 #define GCC_NORETURN /* nothing */
13888 #define GCC_UNUSED /* nothing */
13891 if test "$GCC" = yes
13893 { echo "$as_me:13893: checking for $CC __attribute__ directives..." >&5
13894 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13895 cat > conftest.$ac_ext <<EOF
13896 #line 13896 "${as_me:-configure}"
13897 #include "confdefs.h"
13898 #include "conftest.h"
13899 #include "conftest.i"
13901 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13903 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13906 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
13908 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
13910 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13911 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13912 extern void foo(void) GCC_NORETURN;
13913 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13915 cf_printf_attribute=no
13916 cf_scanf_attribute=no
13917 for cf_attribute in scanf printf unused noreturn
13920 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13922 cf_directive="__attribute__(($cf_attribute))"
13923 echo "checking for $CC $cf_directive" 1>&5
13925 case $cf_attribute in
13927 cf_printf_attribute=yes
13928 cat >conftest.h <<EOF
13929 #define GCC_$cf_ATTRIBUTE 1
13933 cf_scanf_attribute=yes
13934 cat >conftest.h <<EOF
13935 #define GCC_$cf_ATTRIBUTE 1
13939 cat >conftest.h <<EOF
13940 #define GCC_$cf_ATTRIBUTE $cf_directive
13945 if { (eval echo "$as_me:13945: \"$ac_compile\"") >&5
13946 (eval $ac_compile) 2>&5
13948 echo "$as_me:13948: \$? = $ac_status" >&5
13949 (exit $ac_status); }; then
13950 test -n "$verbose" && echo "$as_me:13950: result: ... $cf_attribute" >&5
13951 echo "${ECHO_T}... $cf_attribute" >&6
13952 cat conftest.h >>confdefs.h
13953 case $cf_attribute in
13956 cat >>confdefs.h <<EOF
13957 #define GCC_NORETURN $cf_directive
13962 cf_value='/* nothing */'
13963 if test "$cf_printf_attribute" != no ; then
13964 cf_value='__attribute__((format(printf,fmt,var)))'
13966 cat >>confdefs.h <<\EOF
13967 #define GCC_PRINTF 1
13972 cat >>confdefs.h <<EOF
13973 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13978 cf_value='/* nothing */'
13979 if test "$cf_scanf_attribute" != no ; then
13980 cf_value='__attribute__((format(scanf,fmt,var)))'
13982 cat >>confdefs.h <<\EOF
13983 #define GCC_SCANF 1
13988 cat >>confdefs.h <<EOF
13989 #define GCC_SCANFLIKE(fmt,var) $cf_value
13995 cat >>confdefs.h <<EOF
13996 #define GCC_UNUSED $cf_directive
14004 fgrep define conftest.i >>confdefs.h
14009 ### use option --enable-assertions to turn on generation of assertion code
14010 echo "$as_me:14010: checking if you want to enable runtime assertions" >&5
14011 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
14013 # Check whether --enable-assertions or --disable-assertions was given.
14014 if test "${enable_assertions+set}" = set; then
14015 enableval="$enable_assertions"
14016 with_assertions=$enableval
14020 echo "$as_me:14020: result: $with_assertions" >&5
14021 echo "${ECHO_T}$with_assertions" >&6
14024 if test "$with_assertions" = no
14026 CPPFLAGS="$CPPFLAGS -DNDEBUG"
14029 ADAFLAGS="$ADAFLAGS -gnata"
14034 ### use option --disable-leaks to suppress "permanent" leaks, for testing
14036 cat >>confdefs.h <<\EOF
14037 #define HAVE_NC_ALLOC_H 1
14040 ### use option --enable-expanded to generate certain macros as functions
14042 # Check whether --enable-expanded or --disable-expanded was given.
14043 if test "${enable_expanded+set}" = set; then
14044 enableval="$enable_expanded"
14045 test "$enableval" = yes &&
14046 cat >>confdefs.h <<\EOF
14047 #define NCURSES_EXPANDED 1
14052 ### use option --disable-macros to suppress macros in favor of functions
14054 # Check whether --enable-macros or --disable-macros was given.
14055 if test "${enable_macros+set}" = set; then
14056 enableval="$enable_macros"
14057 test "$enableval" = no &&
14058 cat >>confdefs.h <<\EOF
14059 #define NCURSES_NOMACROS 1
14064 # Normally we only add trace() to the debug-library. Allow this to be
14065 # extended to all models of the ncurses library:
14067 case "$CFLAGS $CPPFLAGS" in
14073 echo "$as_me:14073: checking whether to add trace feature to all models" >&5
14074 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14076 # Check whether --with-trace or --without-trace was given.
14077 if test "${with_trace+set}" = set; then
14078 withval="$with_trace"
14079 cf_with_trace=$withval
14081 cf_with_trace=$cf_all_traces
14083 echo "$as_me:14083: result: $cf_with_trace" >&5
14084 echo "${ECHO_T}$cf_with_trace" >&6
14086 if test "$cf_with_trace" = yes ; then
14092 cf_new_extra_cppflags=
14094 for cf_add_cflags in -DTRACE
14096 case $cf_fix_cppflags in
14098 case $cf_add_cflags in
14099 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14100 case $cf_add_cflags in
14102 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14104 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14105 && test -z "${cf_tst_cflags}" \
14106 && cf_fix_cppflags=yes
14108 if test $cf_fix_cppflags = yes ; then
14110 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14111 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14114 elif test "${cf_tst_cflags}" = "\"'" ; then
14116 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14117 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14123 case "$CPPFLAGS" in
14127 case $cf_add_cflags in
14129 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14131 CPPFLAGS=`echo "$CPPFLAGS" | \
14132 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14133 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14138 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14139 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14146 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14147 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14154 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14155 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14157 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14159 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14160 && test -z "${cf_tst_cflags}" \
14161 && cf_fix_cppflags=no
14166 if test -n "$cf_new_cflags" ; then
14168 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14169 CFLAGS="${CFLAGS}$cf_new_cflags"
14173 if test -n "$cf_new_cppflags" ; then
14175 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14176 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14180 if test -n "$cf_new_extra_cppflags" ; then
14182 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14183 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14191 echo "$as_me:14191: checking if we want to use GNAT projects" >&5
14192 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14194 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14195 if test "${enable_gnat_projects+set}" = set; then
14196 enableval="$enable_gnat_projects"
14197 test "$enableval" != no && enableval=yes
14198 if test "$enableval" != "yes" ; then
14199 enable_gnat_projects=no
14201 enable_gnat_projects=yes
14205 enable_gnat_projects=yes
14208 echo "$as_me:14208: result: $enable_gnat_projects" >&5
14209 echo "${ECHO_T}$enable_gnat_projects" >&6
14211 ### Checks for libraries.
14212 case $cf_cv_system_name in
14216 echo "$as_me:14216: checking for gettimeofday" >&5
14217 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14218 if test "${ac_cv_func_gettimeofday+set}" = set; then
14219 echo $ECHO_N "(cached) $ECHO_C" >&6
14221 cat >conftest.$ac_ext <<_ACEOF
14222 #line 14222 "configure"
14223 #include "confdefs.h"
14224 #define gettimeofday autoconf_temporary
14225 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14226 #undef gettimeofday
14232 /* We use char because int might match the return type of a gcc2
14233 builtin and then its argument prototype would still apply. */
14234 char gettimeofday (void);
14240 /* The GNU C library defines stubs for functions which it implements
14241 to always fail with ENOSYS. Some functions are actually named
14242 something starting with __ and the normal name is an alias. */
14243 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14244 #error found stub for gettimeofday
14247 return gettimeofday ();
14252 rm -f conftest.$ac_objext conftest$ac_exeext
14253 if { (eval echo "$as_me:14253: \"$ac_link\"") >&5
14254 (eval $ac_link) 2>&5
14256 echo "$as_me:14256: \$? = $ac_status" >&5
14257 (exit $ac_status); } &&
14258 { ac_try='test -s conftest$ac_exeext'
14259 { (eval echo "$as_me:14259: \"$ac_try\"") >&5
14260 (eval $ac_try) 2>&5
14262 echo "$as_me:14262: \$? = $ac_status" >&5
14263 (exit $ac_status); }; }; then
14264 ac_cv_func_gettimeofday=yes
14266 echo "$as_me: failed program was:" >&5
14267 cat conftest.$ac_ext >&5
14268 ac_cv_func_gettimeofday=no
14270 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14272 echo "$as_me:14272: result: $ac_cv_func_gettimeofday" >&5
14273 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14274 if test $ac_cv_func_gettimeofday = yes; then
14275 cat >>confdefs.h <<\EOF
14276 #define HAVE_GETTIMEOFDAY 1
14281 echo "$as_me:14281: checking for gettimeofday in -lbsd" >&5
14282 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14283 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14284 echo $ECHO_N "(cached) $ECHO_C" >&6
14286 ac_check_lib_save_LIBS=$LIBS
14288 cat >conftest.$ac_ext <<_ACEOF
14289 #line 14289 "configure"
14290 #include "confdefs.h"
14292 /* Override any gcc2 internal prototype to avoid an error. */
14296 /* We use char because int might match the return type of a gcc2
14297 builtin and then its argument prototype would still apply. */
14298 char gettimeofday ();
14307 rm -f conftest.$ac_objext conftest$ac_exeext
14308 if { (eval echo "$as_me:14308: \"$ac_link\"") >&5
14309 (eval $ac_link) 2>&5
14311 echo "$as_me:14311: \$? = $ac_status" >&5
14312 (exit $ac_status); } &&
14313 { ac_try='test -s conftest$ac_exeext'
14314 { (eval echo "$as_me:14314: \"$ac_try\"") >&5
14315 (eval $ac_try) 2>&5
14317 echo "$as_me:14317: \$? = $ac_status" >&5
14318 (exit $ac_status); }; }; then
14319 ac_cv_lib_bsd_gettimeofday=yes
14321 echo "$as_me: failed program was:" >&5
14322 cat conftest.$ac_ext >&5
14323 ac_cv_lib_bsd_gettimeofday=no
14325 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14326 LIBS=$ac_check_lib_save_LIBS
14328 echo "$as_me:14328: result: $ac_cv_lib_bsd_gettimeofday" >&5
14329 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14330 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14332 cat >>confdefs.h <<\EOF
14333 #define HAVE_GETTIMEOFDAY 1
14343 ### Checks for header files.
14344 echo "$as_me:14344: checking for ANSI C header files" >&5
14345 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14346 if test "${ac_cv_header_stdc+set}" = set; then
14347 echo $ECHO_N "(cached) $ECHO_C" >&6
14349 cat >conftest.$ac_ext <<_ACEOF
14350 #line 14350 "configure"
14351 #include "confdefs.h"
14352 #include <stdlib.h>
14353 #include <stdarg.h>
14354 #include <string.h>
14358 if { (eval echo "$as_me:14358: \"$ac_cpp conftest.$ac_ext\"") >&5
14359 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14361 egrep -v '^ *\+' conftest.er1 >conftest.err
14363 cat conftest.err >&5
14364 echo "$as_me:14364: \$? = $ac_status" >&5
14365 (exit $ac_status); } >/dev/null; then
14366 if test -s conftest.err; then
14367 ac_cpp_err=$ac_c_preproc_warn_flag
14374 if test -z "$ac_cpp_err"; then
14375 ac_cv_header_stdc=yes
14377 echo "$as_me: failed program was:" >&5
14378 cat conftest.$ac_ext >&5
14379 ac_cv_header_stdc=no
14381 rm -f conftest.err conftest.$ac_ext
14383 if test $ac_cv_header_stdc = yes; then
14384 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14385 cat >conftest.$ac_ext <<_ACEOF
14386 #line 14386 "configure"
14387 #include "confdefs.h"
14388 #include <string.h>
14391 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14392 egrep "memchr" >/dev/null 2>&1; then
14395 ac_cv_header_stdc=no
14401 if test $ac_cv_header_stdc = yes; then
14402 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14403 cat >conftest.$ac_ext <<_ACEOF
14404 #line 14404 "configure"
14405 #include "confdefs.h"
14406 #include <stdlib.h>
14409 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14410 egrep "free" >/dev/null 2>&1; then
14413 ac_cv_header_stdc=no
14419 if test $ac_cv_header_stdc = yes; then
14420 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14421 if test "$cross_compiling" = yes; then
14424 cat >conftest.$ac_ext <<_ACEOF
14425 #line 14425 "configure"
14426 #include "confdefs.h"
14428 #if ((' ' & 0x0FF) == 0x020)
14429 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14430 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14432 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14433 || ('j' <= (c) && (c) <= 'r') \
14434 || ('s' <= (c) && (c) <= 'z'))
14435 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14438 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14443 for (i = 0; i < 256; i++)
14444 if (XOR (islower (i), ISLOWER (i))
14445 || toupper (i) != TOUPPER (i))
14446 $ac_main_return(2);
14447 $ac_main_return (0);
14450 rm -f conftest$ac_exeext
14451 if { (eval echo "$as_me:14451: \"$ac_link\"") >&5
14452 (eval $ac_link) 2>&5
14454 echo "$as_me:14454: \$? = $ac_status" >&5
14455 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14456 { (eval echo "$as_me:14456: \"$ac_try\"") >&5
14457 (eval $ac_try) 2>&5
14459 echo "$as_me:14459: \$? = $ac_status" >&5
14460 (exit $ac_status); }; }; then
14463 echo "$as_me: program exited with status $ac_status" >&5
14464 echo "$as_me: failed program was:" >&5
14465 cat conftest.$ac_ext >&5
14466 ac_cv_header_stdc=no
14468 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14472 echo "$as_me:14472: result: $ac_cv_header_stdc" >&5
14473 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14474 if test $ac_cv_header_stdc = yes; then
14476 cat >>confdefs.h <<\EOF
14477 #define STDC_HEADERS 1
14482 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
14484 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
14485 inttypes.h stdint.h unistd.h
14487 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14488 echo "$as_me:14488: checking for $ac_header" >&5
14489 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14490 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14491 echo $ECHO_N "(cached) $ECHO_C" >&6
14493 cat >conftest.$ac_ext <<_ACEOF
14494 #line 14494 "configure"
14495 #include "confdefs.h"
14496 $ac_includes_default
14497 #include <$ac_header>
14499 rm -f conftest.$ac_objext
14500 if { (eval echo "$as_me:14500: \"$ac_compile\"") >&5
14501 (eval $ac_compile) 2>&5
14503 echo "$as_me:14503: \$? = $ac_status" >&5
14504 (exit $ac_status); } &&
14505 { ac_try='test -s conftest.$ac_objext'
14506 { (eval echo "$as_me:14506: \"$ac_try\"") >&5
14507 (eval $ac_try) 2>&5
14509 echo "$as_me:14509: \$? = $ac_status" >&5
14510 (exit $ac_status); }; }; then
14511 eval "$as_ac_Header=yes"
14513 echo "$as_me: failed program was:" >&5
14514 cat conftest.$ac_ext >&5
14515 eval "$as_ac_Header=no"
14517 rm -f conftest.$ac_objext conftest.$ac_ext
14519 echo "$as_me:14519: result: `eval echo '${'$as_ac_Header'}'`" >&5
14520 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14521 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14522 cat >>confdefs.h <<EOF
14523 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14529 echo "$as_me:14529: checking for signed char" >&5
14530 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14531 if test "${ac_cv_type_signed_char+set}" = set; then
14532 echo $ECHO_N "(cached) $ECHO_C" >&6
14534 cat >conftest.$ac_ext <<_ACEOF
14535 #line 14535 "configure"
14536 #include "confdefs.h"
14537 $ac_includes_default
14541 if ((signed char *) 0)
14543 if (sizeof (signed char))
14549 rm -f conftest.$ac_objext
14550 if { (eval echo "$as_me:14550: \"$ac_compile\"") >&5
14551 (eval $ac_compile) 2>&5
14553 echo "$as_me:14553: \$? = $ac_status" >&5
14554 (exit $ac_status); } &&
14555 { ac_try='test -s conftest.$ac_objext'
14556 { (eval echo "$as_me:14556: \"$ac_try\"") >&5
14557 (eval $ac_try) 2>&5
14559 echo "$as_me:14559: \$? = $ac_status" >&5
14560 (exit $ac_status); }; }; then
14561 ac_cv_type_signed_char=yes
14563 echo "$as_me: failed program was:" >&5
14564 cat conftest.$ac_ext >&5
14565 ac_cv_type_signed_char=no
14567 rm -f conftest.$ac_objext conftest.$ac_ext
14569 echo "$as_me:14569: result: $ac_cv_type_signed_char" >&5
14570 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14572 echo "$as_me:14572: checking size of signed char" >&5
14573 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14574 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14575 echo $ECHO_N "(cached) $ECHO_C" >&6
14577 if test "$ac_cv_type_signed_char" = yes; then
14578 if test "$cross_compiling" = yes; then
14579 # Depending upon the size, compute the lo and hi bounds.
14580 cat >conftest.$ac_ext <<_ACEOF
14581 #line 14581 "configure"
14582 #include "confdefs.h"
14583 $ac_includes_default
14587 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14592 rm -f conftest.$ac_objext
14593 if { (eval echo "$as_me:14593: \"$ac_compile\"") >&5
14594 (eval $ac_compile) 2>&5
14596 echo "$as_me:14596: \$? = $ac_status" >&5
14597 (exit $ac_status); } &&
14598 { ac_try='test -s conftest.$ac_objext'
14599 { (eval echo "$as_me:14599: \"$ac_try\"") >&5
14600 (eval $ac_try) 2>&5
14602 echo "$as_me:14602: \$? = $ac_status" >&5
14603 (exit $ac_status); }; }; then
14606 cat >conftest.$ac_ext <<_ACEOF
14607 #line 14607 "configure"
14608 #include "confdefs.h"
14609 $ac_includes_default
14613 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14618 rm -f conftest.$ac_objext
14619 if { (eval echo "$as_me:14619: \"$ac_compile\"") >&5
14620 (eval $ac_compile) 2>&5
14622 echo "$as_me:14622: \$? = $ac_status" >&5
14623 (exit $ac_status); } &&
14624 { ac_try='test -s conftest.$ac_objext'
14625 { (eval echo "$as_me:14625: \"$ac_try\"") >&5
14626 (eval $ac_try) 2>&5
14628 echo "$as_me:14628: \$? = $ac_status" >&5
14629 (exit $ac_status); }; }; then
14630 ac_hi=$ac_mid; break
14632 echo "$as_me: failed program was:" >&5
14633 cat conftest.$ac_ext >&5
14634 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
14636 rm -f conftest.$ac_objext conftest.$ac_ext
14639 echo "$as_me: failed program was:" >&5
14640 cat conftest.$ac_ext >&5
14643 cat >conftest.$ac_ext <<_ACEOF
14644 #line 14644 "configure"
14645 #include "confdefs.h"
14646 $ac_includes_default
14650 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14655 rm -f conftest.$ac_objext
14656 if { (eval echo "$as_me:14656: \"$ac_compile\"") >&5
14657 (eval $ac_compile) 2>&5
14659 echo "$as_me:14659: \$? = $ac_status" >&5
14660 (exit $ac_status); } &&
14661 { ac_try='test -s conftest.$ac_objext'
14662 { (eval echo "$as_me:14662: \"$ac_try\"") >&5
14663 (eval $ac_try) 2>&5
14665 echo "$as_me:14665: \$? = $ac_status" >&5
14666 (exit $ac_status); }; }; then
14667 ac_lo=$ac_mid; break
14669 echo "$as_me: failed program was:" >&5
14670 cat conftest.$ac_ext >&5
14671 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
14673 rm -f conftest.$ac_objext conftest.$ac_ext
14676 rm -f conftest.$ac_objext conftest.$ac_ext
14677 # Binary search between lo and hi bounds.
14678 while test "x$ac_lo" != "x$ac_hi"; do
14679 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14680 cat >conftest.$ac_ext <<_ACEOF
14681 #line 14681 "configure"
14682 #include "confdefs.h"
14683 $ac_includes_default
14687 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14692 rm -f conftest.$ac_objext
14693 if { (eval echo "$as_me:14693: \"$ac_compile\"") >&5
14694 (eval $ac_compile) 2>&5
14696 echo "$as_me:14696: \$? = $ac_status" >&5
14697 (exit $ac_status); } &&
14698 { ac_try='test -s conftest.$ac_objext'
14699 { (eval echo "$as_me:14699: \"$ac_try\"") >&5
14700 (eval $ac_try) 2>&5
14702 echo "$as_me:14702: \$? = $ac_status" >&5
14703 (exit $ac_status); }; }; then
14706 echo "$as_me: failed program was:" >&5
14707 cat conftest.$ac_ext >&5
14708 ac_lo=`expr $ac_mid + 1`
14710 rm -f conftest.$ac_objext conftest.$ac_ext
14712 ac_cv_sizeof_signed_char=$ac_lo
14714 if test "$cross_compiling" = yes; then
14715 { { echo "$as_me:14715: error: cannot run test program while cross compiling" >&5
14716 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14717 { (exit 1); exit 1; }; }
14719 cat >conftest.$ac_ext <<_ACEOF
14720 #line 14720 "configure"
14721 #include "confdefs.h"
14722 $ac_includes_default
14726 FILE *f = fopen ("conftest.val", "w");
14728 $ac_main_return (1);
14729 fprintf (f, "%d", (sizeof (signed char)));
14735 rm -f conftest$ac_exeext
14736 if { (eval echo "$as_me:14736: \"$ac_link\"") >&5
14737 (eval $ac_link) 2>&5
14739 echo "$as_me:14739: \$? = $ac_status" >&5
14740 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14741 { (eval echo "$as_me:14741: \"$ac_try\"") >&5
14742 (eval $ac_try) 2>&5
14744 echo "$as_me:14744: \$? = $ac_status" >&5
14745 (exit $ac_status); }; }; then
14746 ac_cv_sizeof_signed_char=`cat conftest.val`
14748 echo "$as_me: program exited with status $ac_status" >&5
14749 echo "$as_me: failed program was:" >&5
14750 cat conftest.$ac_ext >&5
14752 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14757 ac_cv_sizeof_signed_char=0
14760 echo "$as_me:14760: result: $ac_cv_sizeof_signed_char" >&5
14761 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14762 cat >>confdefs.h <<EOF
14763 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14766 echo "$as_me:14766: checking for ANSI C header files" >&5
14767 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14768 if test "${ac_cv_header_stdc+set}" = set; then
14769 echo $ECHO_N "(cached) $ECHO_C" >&6
14771 cat >conftest.$ac_ext <<_ACEOF
14772 #line 14772 "configure"
14773 #include "confdefs.h"
14774 #include <stdlib.h>
14775 #include <stdarg.h>
14776 #include <string.h>
14780 if { (eval echo "$as_me:14780: \"$ac_cpp conftest.$ac_ext\"") >&5
14781 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14783 egrep -v '^ *\+' conftest.er1 >conftest.err
14785 cat conftest.err >&5
14786 echo "$as_me:14786: \$? = $ac_status" >&5
14787 (exit $ac_status); } >/dev/null; then
14788 if test -s conftest.err; then
14789 ac_cpp_err=$ac_c_preproc_warn_flag
14796 if test -z "$ac_cpp_err"; then
14797 ac_cv_header_stdc=yes
14799 echo "$as_me: failed program was:" >&5
14800 cat conftest.$ac_ext >&5
14801 ac_cv_header_stdc=no
14803 rm -f conftest.err conftest.$ac_ext
14805 if test $ac_cv_header_stdc = yes; then
14806 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14807 cat >conftest.$ac_ext <<_ACEOF
14808 #line 14808 "configure"
14809 #include "confdefs.h"
14810 #include <string.h>
14813 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14814 egrep "memchr" >/dev/null 2>&1; then
14817 ac_cv_header_stdc=no
14823 if test $ac_cv_header_stdc = yes; then
14824 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14825 cat >conftest.$ac_ext <<_ACEOF
14826 #line 14826 "configure"
14827 #include "confdefs.h"
14828 #include <stdlib.h>
14831 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14832 egrep "free" >/dev/null 2>&1; then
14835 ac_cv_header_stdc=no
14841 if test $ac_cv_header_stdc = yes; then
14842 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14843 if test "$cross_compiling" = yes; then
14846 cat >conftest.$ac_ext <<_ACEOF
14847 #line 14847 "configure"
14848 #include "confdefs.h"
14850 #if ((' ' & 0x0FF) == 0x020)
14851 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14852 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14854 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14855 || ('j' <= (c) && (c) <= 'r') \
14856 || ('s' <= (c) && (c) <= 'z'))
14857 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14860 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14865 for (i = 0; i < 256; i++)
14866 if (XOR (islower (i), ISLOWER (i))
14867 || toupper (i) != TOUPPER (i))
14868 $ac_main_return(2);
14869 $ac_main_return (0);
14872 rm -f conftest$ac_exeext
14873 if { (eval echo "$as_me:14873: \"$ac_link\"") >&5
14874 (eval $ac_link) 2>&5
14876 echo "$as_me:14876: \$? = $ac_status" >&5
14877 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14878 { (eval echo "$as_me:14878: \"$ac_try\"") >&5
14879 (eval $ac_try) 2>&5
14881 echo "$as_me:14881: \$? = $ac_status" >&5
14882 (exit $ac_status); }; }; then
14885 echo "$as_me: program exited with status $ac_status" >&5
14886 echo "$as_me: failed program was:" >&5
14887 cat conftest.$ac_ext >&5
14888 ac_cv_header_stdc=no
14890 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14894 echo "$as_me:14894: result: $ac_cv_header_stdc" >&5
14895 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14896 if test $ac_cv_header_stdc = yes; then
14898 cat >>confdefs.h <<\EOF
14899 #define STDC_HEADERS 1
14904 ac_header_dirent=no
14905 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14906 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14907 echo "$as_me:14907: checking for $ac_hdr that defines DIR" >&5
14908 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14909 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14910 echo $ECHO_N "(cached) $ECHO_C" >&6
14912 cat >conftest.$ac_ext <<_ACEOF
14913 #line 14913 "configure"
14914 #include "confdefs.h"
14915 #include <sys/types.h>
14927 rm -f conftest.$ac_objext
14928 if { (eval echo "$as_me:14928: \"$ac_compile\"") >&5
14929 (eval $ac_compile) 2>&5
14931 echo "$as_me:14931: \$? = $ac_status" >&5
14932 (exit $ac_status); } &&
14933 { ac_try='test -s conftest.$ac_objext'
14934 { (eval echo "$as_me:14934: \"$ac_try\"") >&5
14935 (eval $ac_try) 2>&5
14937 echo "$as_me:14937: \$? = $ac_status" >&5
14938 (exit $ac_status); }; }; then
14939 eval "$as_ac_Header=yes"
14941 echo "$as_me: failed program was:" >&5
14942 cat conftest.$ac_ext >&5
14943 eval "$as_ac_Header=no"
14945 rm -f conftest.$ac_objext conftest.$ac_ext
14947 echo "$as_me:14947: result: `eval echo '${'$as_ac_Header'}'`" >&5
14948 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14949 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14950 cat >>confdefs.h <<EOF
14951 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14954 ac_header_dirent=$ac_hdr; break
14958 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14959 if test $ac_header_dirent = dirent.h; then
14960 echo "$as_me:14960: checking for opendir in -ldir" >&5
14961 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14962 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14963 echo $ECHO_N "(cached) $ECHO_C" >&6
14965 ac_check_lib_save_LIBS=$LIBS
14967 cat >conftest.$ac_ext <<_ACEOF
14968 #line 14968 "configure"
14969 #include "confdefs.h"
14971 /* Override any gcc2 internal prototype to avoid an error. */
14975 /* We use char because int might match the return type of a gcc2
14976 builtin and then its argument prototype would still apply. */
14986 rm -f conftest.$ac_objext conftest$ac_exeext
14987 if { (eval echo "$as_me:14987: \"$ac_link\"") >&5
14988 (eval $ac_link) 2>&5
14990 echo "$as_me:14990: \$? = $ac_status" >&5
14991 (exit $ac_status); } &&
14992 { ac_try='test -s conftest$ac_exeext'
14993 { (eval echo "$as_me:14993: \"$ac_try\"") >&5
14994 (eval $ac_try) 2>&5
14996 echo "$as_me:14996: \$? = $ac_status" >&5
14997 (exit $ac_status); }; }; then
14998 ac_cv_lib_dir_opendir=yes
15000 echo "$as_me: failed program was:" >&5
15001 cat conftest.$ac_ext >&5
15002 ac_cv_lib_dir_opendir=no
15004 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15005 LIBS=$ac_check_lib_save_LIBS
15007 echo "$as_me:15007: result: $ac_cv_lib_dir_opendir" >&5
15008 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
15009 if test $ac_cv_lib_dir_opendir = yes; then
15014 echo "$as_me:15014: checking for opendir in -lx" >&5
15015 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
15016 if test "${ac_cv_lib_x_opendir+set}" = set; then
15017 echo $ECHO_N "(cached) $ECHO_C" >&6
15019 ac_check_lib_save_LIBS=$LIBS
15021 cat >conftest.$ac_ext <<_ACEOF
15022 #line 15022 "configure"
15023 #include "confdefs.h"
15025 /* Override any gcc2 internal prototype to avoid an error. */
15029 /* We use char because int might match the return type of a gcc2
15030 builtin and then its argument prototype would still apply. */
15040 rm -f conftest.$ac_objext conftest$ac_exeext
15041 if { (eval echo "$as_me:15041: \"$ac_link\"") >&5
15042 (eval $ac_link) 2>&5
15044 echo "$as_me:15044: \$? = $ac_status" >&5
15045 (exit $ac_status); } &&
15046 { ac_try='test -s conftest$ac_exeext'
15047 { (eval echo "$as_me:15047: \"$ac_try\"") >&5
15048 (eval $ac_try) 2>&5
15050 echo "$as_me:15050: \$? = $ac_status" >&5
15051 (exit $ac_status); }; }; then
15052 ac_cv_lib_x_opendir=yes
15054 echo "$as_me: failed program was:" >&5
15055 cat conftest.$ac_ext >&5
15056 ac_cv_lib_x_opendir=no
15058 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15059 LIBS=$ac_check_lib_save_LIBS
15061 echo "$as_me:15061: result: $ac_cv_lib_x_opendir" >&5
15062 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
15063 if test $ac_cv_lib_x_opendir = yes; then
15069 echo "$as_me:15069: checking whether time.h and sys/time.h may both be included" >&5
15070 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15071 if test "${ac_cv_header_time+set}" = set; then
15072 echo $ECHO_N "(cached) $ECHO_C" >&6
15074 cat >conftest.$ac_ext <<_ACEOF
15075 #line 15075 "configure"
15076 #include "confdefs.h"
15077 #include <sys/types.h>
15078 #include <sys/time.h>
15084 if ((struct tm *) 0)
15090 rm -f conftest.$ac_objext
15091 if { (eval echo "$as_me:15091: \"$ac_compile\"") >&5
15092 (eval $ac_compile) 2>&5
15094 echo "$as_me:15094: \$? = $ac_status" >&5
15095 (exit $ac_status); } &&
15096 { ac_try='test -s conftest.$ac_objext'
15097 { (eval echo "$as_me:15097: \"$ac_try\"") >&5
15098 (eval $ac_try) 2>&5
15100 echo "$as_me:15100: \$? = $ac_status" >&5
15101 (exit $ac_status); }; }; then
15102 ac_cv_header_time=yes
15104 echo "$as_me: failed program was:" >&5
15105 cat conftest.$ac_ext >&5
15106 ac_cv_header_time=no
15108 rm -f conftest.$ac_objext conftest.$ac_ext
15110 echo "$as_me:15110: result: $ac_cv_header_time" >&5
15111 echo "${ECHO_T}$ac_cv_header_time" >&6
15112 if test $ac_cv_header_time = yes; then
15114 cat >>confdefs.h <<\EOF
15115 #define TIME_WITH_SYS_TIME 1
15120 ### checks for compiler characteristics
15122 ac_cpp='$CPP $CPPFLAGS'
15123 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15124 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15125 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15126 ac_main_return=return
15128 echo "$as_me:15128: checking for an ANSI C-conforming const" >&5
15129 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15130 if test "${ac_cv_c_const+set}" = set; then
15131 echo $ECHO_N "(cached) $ECHO_C" >&6
15133 cat >conftest.$ac_ext <<_ACEOF
15134 #line 15134 "configure"
15135 #include "confdefs.h"
15140 /* FIXME: Include the comments suggested by Paul. */
15141 #ifndef __cplusplus
15142 /* Ultrix mips cc rejects this. */
15143 typedef int charset[2];
15145 /* SunOS 4.1.1 cc rejects this. */
15146 char const *const *ccp;
15148 /* NEC SVR4.0.2 mips cc rejects this. */
15149 struct point {int x, y;};
15150 static struct point const zero = {0,0};
15151 /* AIX XL C 1.02.0.0 rejects this.
15152 It does not let you subtract one const X* pointer from another in
15153 an arm of an if-expression whose if-part is not a constant
15155 const char *g = "string";
15156 ccp = &g + (g ? g-g : 0);
15157 /* HPUX 7.0 cc rejects these. */
15160 ccp = (char const *const *) p;
15161 { /* SCO 3.2v4 cc rejects this. */
15163 char const *s = 0 ? (char *) 0 : (char const *) 0;
15167 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15168 int x[] = {25, 17};
15169 const int *foo = &x[0];
15172 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15173 typedef const int *iptr;
15177 { /* AIX XL C 1.02.0.0 rejects this saying
15178 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15179 struct s { int j; const int *ap[3]; };
15180 struct s *b; b->j = 5;
15182 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15183 const int foo = 10;
15191 rm -f conftest.$ac_objext
15192 if { (eval echo "$as_me:15192: \"$ac_compile\"") >&5
15193 (eval $ac_compile) 2>&5
15195 echo "$as_me:15195: \$? = $ac_status" >&5
15196 (exit $ac_status); } &&
15197 { ac_try='test -s conftest.$ac_objext'
15198 { (eval echo "$as_me:15198: \"$ac_try\"") >&5
15199 (eval $ac_try) 2>&5
15201 echo "$as_me:15201: \$? = $ac_status" >&5
15202 (exit $ac_status); }; }; then
15205 echo "$as_me: failed program was:" >&5
15206 cat conftest.$ac_ext >&5
15209 rm -f conftest.$ac_objext conftest.$ac_ext
15211 echo "$as_me:15211: result: $ac_cv_c_const" >&5
15212 echo "${ECHO_T}$ac_cv_c_const" >&6
15213 if test $ac_cv_c_const = no; then
15215 cat >>confdefs.h <<\EOF
15221 ### Checks for external-data
15223 echo "$as_me:15223: checking if data-only library module links" >&5
15224 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15225 if test "${cf_cv_link_dataonly+set}" = set; then
15226 echo $ECHO_N "(cached) $ECHO_C" >&6
15230 cat >conftest.$ac_ext <<EOF
15231 #line 15231 "configure"
15232 int testdata[3] = { 123, 456, 789 };
15234 if { (eval echo "$as_me:15234: \"$ac_compile\"") >&5
15235 (eval $ac_compile) 2>&5
15237 echo "$as_me:15237: \$? = $ac_status" >&5
15238 (exit $ac_status); } ; then
15239 mv conftest.o data.o && \
15240 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15242 rm -f conftest.$ac_ext data.o
15243 cat >conftest.$ac_ext <<EOF
15244 #line 15244 "configure"
15248 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
15250 extern int testdata[3];
15251 return testdata[0] == 123
15252 && testdata[1] == 456
15253 && testdata[2] == 789;
15257 if { (eval echo "$as_me:15257: \"$ac_compile\"") >&5
15258 (eval $ac_compile) 2>&5
15260 echo "$as_me:15260: \$? = $ac_status" >&5
15261 (exit $ac_status); }; then
15262 mv conftest.o func.o && \
15263 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15265 rm -f conftest.$ac_ext func.o
15266 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15267 cf_saveLIBS="$LIBS"
15268 LIBS="conftest.a $LIBS"
15269 if test "$cross_compiling" = yes; then
15270 cf_cv_link_dataonly=unknown
15272 cat >conftest.$ac_ext <<_ACEOF
15273 #line 15273 "configure"
15274 #include "confdefs.h"
15278 extern int testfunc();
15279 ${cf_cv_main_return:-return} (!testfunc());
15283 rm -f conftest$ac_exeext
15284 if { (eval echo "$as_me:15284: \"$ac_link\"") >&5
15285 (eval $ac_link) 2>&5
15287 echo "$as_me:15287: \$? = $ac_status" >&5
15288 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15289 { (eval echo "$as_me:15289: \"$ac_try\"") >&5
15290 (eval $ac_try) 2>&5
15292 echo "$as_me:15292: \$? = $ac_status" >&5
15293 (exit $ac_status); }; }; then
15294 cf_cv_link_dataonly=yes
15296 echo "$as_me: program exited with status $ac_status" >&5
15297 echo "$as_me: failed program was:" >&5
15298 cat conftest.$ac_ext >&5
15299 cf_cv_link_dataonly=no
15301 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15303 LIBS="$cf_saveLIBS"
15307 echo "$as_me:15307: result: $cf_cv_link_dataonly" >&5
15308 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15310 if test "$cf_cv_link_dataonly" = no ; then
15312 cat >>confdefs.h <<\EOF
15313 #define BROKEN_LINKER 1
15319 ### Checks for library functions.
15325 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15326 echo "$as_me:15326: checking for $ac_header" >&5
15327 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15328 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15329 echo $ECHO_N "(cached) $ECHO_C" >&6
15331 cat >conftest.$ac_ext <<_ACEOF
15332 #line 15332 "configure"
15333 #include "confdefs.h"
15334 #include <$ac_header>
15336 if { (eval echo "$as_me:15336: \"$ac_cpp conftest.$ac_ext\"") >&5
15337 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15339 egrep -v '^ *\+' conftest.er1 >conftest.err
15341 cat conftest.err >&5
15342 echo "$as_me:15342: \$? = $ac_status" >&5
15343 (exit $ac_status); } >/dev/null; then
15344 if test -s conftest.err; then
15345 ac_cpp_err=$ac_c_preproc_warn_flag
15352 if test -z "$ac_cpp_err"; then
15353 eval "$as_ac_Header=yes"
15355 echo "$as_me: failed program was:" >&5
15356 cat conftest.$ac_ext >&5
15357 eval "$as_ac_Header=no"
15359 rm -f conftest.err conftest.$ac_ext
15361 echo "$as_me:15361: result: `eval echo '${'$as_ac_Header'}'`" >&5
15362 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15363 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15364 cat >>confdefs.h <<EOF
15365 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15371 echo "$as_me:15371: checking for working mkstemp" >&5
15372 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
15373 if test "${cf_cv_func_mkstemp+set}" = set; then
15374 echo $ECHO_N "(cached) $ECHO_C" >&6
15378 if test "$cross_compiling" = yes; then
15379 cf_cv_func_mkstemp=maybe
15381 cat >conftest.$ac_ext <<_ACEOF
15382 #line 15382 "configure"
15383 #include "confdefs.h"
15385 #include <sys/types.h>
15386 #ifdef HAVE_UNISTD_H
15387 #include <unistd.h>
15389 #include <stdlib.h>
15391 #include <string.h>
15392 #include <sys/stat.h>
15395 char *tmpl = "conftestXXXXXX";
15403 for (n = 0; n < 2; ++n) {
15404 strcpy(name[n], tmpl);
15405 if ((fd = mkstemp(name[n])) >= 0) {
15406 if (!strcmp(name[n], tmpl)
15407 || stat(name[n], &sb) != 0
15408 || (sb.st_mode & S_IFMT) != S_IFREG
15409 || (sb.st_mode & 077) != 0) {
15416 && !strcmp(name[0], name[1]))
15418 ${cf_cv_main_return:-return}(result);
15422 rm -f conftest$ac_exeext
15423 if { (eval echo "$as_me:15423: \"$ac_link\"") >&5
15424 (eval $ac_link) 2>&5
15426 echo "$as_me:15426: \$? = $ac_status" >&5
15427 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15428 { (eval echo "$as_me:15428: \"$ac_try\"") >&5
15429 (eval $ac_try) 2>&5
15431 echo "$as_me:15431: \$? = $ac_status" >&5
15432 (exit $ac_status); }; }; then
15433 cf_cv_func_mkstemp=yes
15436 echo "$as_me: program exited with status $ac_status" >&5
15437 echo "$as_me: failed program was:" >&5
15438 cat conftest.$ac_ext >&5
15439 cf_cv_func_mkstemp=no
15442 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15446 echo "$as_me:15446: result: $cf_cv_func_mkstemp" >&5
15447 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
15448 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
15449 echo "$as_me:15449: checking for mkstemp" >&5
15450 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
15451 if test "${ac_cv_func_mkstemp+set}" = set; then
15452 echo $ECHO_N "(cached) $ECHO_C" >&6
15454 cat >conftest.$ac_ext <<_ACEOF
15455 #line 15455 "configure"
15456 #include "confdefs.h"
15457 #define mkstemp autoconf_temporary
15458 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15465 /* We use char because int might match the return type of a gcc2
15466 builtin and then its argument prototype would still apply. */
15467 char mkstemp (void);
15473 /* The GNU C library defines stubs for functions which it implements
15474 to always fail with ENOSYS. Some functions are actually named
15475 something starting with __ and the normal name is an alias. */
15476 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
15477 #error found stub for mkstemp
15485 rm -f conftest.$ac_objext conftest$ac_exeext
15486 if { (eval echo "$as_me:15486: \"$ac_link\"") >&5
15487 (eval $ac_link) 2>&5
15489 echo "$as_me:15489: \$? = $ac_status" >&5
15490 (exit $ac_status); } &&
15491 { ac_try='test -s conftest$ac_exeext'
15492 { (eval echo "$as_me:15492: \"$ac_try\"") >&5
15493 (eval $ac_try) 2>&5
15495 echo "$as_me:15495: \$? = $ac_status" >&5
15496 (exit $ac_status); }; }; then
15497 ac_cv_func_mkstemp=yes
15499 echo "$as_me: failed program was:" >&5
15500 cat conftest.$ac_ext >&5
15501 ac_cv_func_mkstemp=no
15503 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15505 echo "$as_me:15505: result: $ac_cv_func_mkstemp" >&5
15506 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
15509 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
15511 cat >>confdefs.h <<\EOF
15512 #define HAVE_MKSTEMP 1
15517 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
15518 CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
15519 CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
15523 if test "$cf_with_ada" != "no" ; then
15525 cf_ada_make=gnatmake
15527 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
15528 set dummy $cf_ada_make; ac_word=$2
15529 echo "$as_me:15529: checking for $ac_word" >&5
15530 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15531 if test "${ac_cv_prog_gnatmake_exists+set}" = set; then
15532 echo $ECHO_N "(cached) $ECHO_C" >&6
15534 if test -n "$gnatmake_exists"; then
15535 ac_cv_prog_gnatmake_exists="$gnatmake_exists" # Let the user override the test.
15537 ac_save_IFS=$IFS; IFS=$ac_path_separator
15539 for ac_dir in $ac_dummy; do
15541 test -z "$ac_dir" && ac_dir=.
15542 $as_executable_p "$ac_dir/$ac_word" || continue
15543 ac_cv_prog_gnatmake_exists="yes"
15544 echo "$as_me:15544: found $ac_dir/$ac_word" >&5
15548 test -z "$ac_cv_prog_gnatmake_exists" && ac_cv_prog_gnatmake_exists="no"
15551 gnatmake_exists=$ac_cv_prog_gnatmake_exists
15552 if test -n "$gnatmake_exists"; then
15553 echo "$as_me:15553: result: $gnatmake_exists" >&5
15554 echo "${ECHO_T}$gnatmake_exists" >&6
15556 echo "$as_me:15556: result: no" >&5
15557 echo "${ECHO_T}no" >&6
15560 if test "$ac_cv_prog_gnatmake_exists" = no; then
15562 cf_cv_prog_gnat_correct=no
15564 # Extract the first word of "gprconfig", so it can be a program name with args.
15565 set dummy gprconfig; ac_word=$2
15566 echo "$as_me:15566: checking for $ac_word" >&5
15567 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15568 if test "${ac_cv_prog_gprconfig_exists+set}" = set; then
15569 echo $ECHO_N "(cached) $ECHO_C" >&6
15571 if test -n "$gprconfig_exists"; then
15572 ac_cv_prog_gprconfig_exists="$gprconfig_exists" # Let the user override the test.
15574 ac_save_IFS=$IFS; IFS=$ac_path_separator
15576 for ac_dir in $ac_dummy; do
15578 test -z "$ac_dir" && ac_dir=.
15579 $as_executable_p "$ac_dir/$ac_word" || continue
15580 ac_cv_prog_gprconfig_exists="yes"
15581 echo "$as_me:15581: found $ac_dir/$ac_word" >&5
15585 test -z "$ac_cv_prog_gprconfig_exists" && ac_cv_prog_gprconfig_exists="no"
15588 gprconfig_exists=$ac_cv_prog_gprconfig_exists
15589 if test -n "$gprconfig_exists"; then
15590 echo "$as_me:15590: result: $gprconfig_exists" >&5
15591 echo "${ECHO_T}$gprconfig_exists" >&6
15593 echo "$as_me:15593: result: no" >&5
15594 echo "${ECHO_T}no" >&6
15597 if test "$ac_cv_prog_gprconfig_exists" = yes
15599 rm -rf conftest* *~conftest*
15600 if mkdir conftest.src
15604 for cf_gprconfig in Ada C
15606 echo "$as_me:15606: checking for gprconfig name for $cf_gprconfig" >&5
15607 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
15608 if test $cf_gprconfig = C
15610 for cf_gprconfig_param in \
15611 $cf_gprconfig,,,,GNATGCC \
15612 $cf_gprconfig,,,,GCC \
15615 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
15616 test -n "$cf_gprconfig_value" && break
15619 cf_gprconfig_param=$cf_gprconfig
15620 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
15622 if test -n "$cf_gprconfig_value"
15624 eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
15625 echo "$as_me:15625: result: $cf_gprconfig_value" >&5
15626 echo "${ECHO_T}$cf_gprconfig_value" >&6
15628 echo "$as_me:15628: result: missing" >&5
15629 echo "${ECHO_T}missing" >&6
15635 rm -rf conftest* *~conftest*
15638 # gprconfig is newer than gnatmake; we can continue...
15641 if test "x$cf_ada_config" != "x#"
15644 echo "$as_me:15644: checking for gnat version" >&5
15645 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
15646 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
15647 grep '[0-9].[0-9][0-9]*' |\
15648 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
15649 echo "$as_me:15649: result: $cf_gnat_version" >&5
15650 echo "${ECHO_T}$cf_gnat_version" >&6
15652 case $cf_gnat_version in
15653 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
15654 cf_cv_prog_gnat_correct=yes
15657 { echo "$as_me:15657: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
15658 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
15659 cf_cv_prog_gnat_correct=no
15663 # Extract the first word of "m4", so it can be a program name with args.
15664 set dummy m4; ac_word=$2
15665 echo "$as_me:15665: checking for $ac_word" >&5
15666 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15667 if test "${ac_cv_prog_M4_exists+set}" = set; then
15668 echo $ECHO_N "(cached) $ECHO_C" >&6
15670 if test -n "$M4_exists"; then
15671 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
15673 ac_save_IFS=$IFS; IFS=$ac_path_separator
15675 for ac_dir in $ac_dummy; do
15677 test -z "$ac_dir" && ac_dir=.
15678 $as_executable_p "$ac_dir/$ac_word" || continue
15679 ac_cv_prog_M4_exists="yes"
15680 echo "$as_me:15680: found $ac_dir/$ac_word" >&5
15684 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
15687 M4_exists=$ac_cv_prog_M4_exists
15688 if test -n "$M4_exists"; then
15689 echo "$as_me:15689: result: $M4_exists" >&5
15690 echo "${ECHO_T}$M4_exists" >&6
15692 echo "$as_me:15692: result: no" >&5
15693 echo "${ECHO_T}no" >&6
15696 if test "$ac_cv_prog_M4_exists" = no; then
15697 cf_cv_prog_gnat_correct=no
15698 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
15700 if test "$cf_cv_prog_gnat_correct" = yes; then
15701 echo "$as_me:15701: checking if GNAT works" >&5
15702 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
15704 rm -rf conftest* *~conftest*
15705 cat >>conftest.ads <<CF_EOF
15706 procedure conftest;
15708 cat >>conftest.adb <<CF_EOF
15711 procedure conftest is
15713 Text_IO.Put ("Hello World");
15715 GNAT.OS_Lib.OS_Exit (0);
15718 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15719 if ( ./conftest 1>&5 2>&1 ) ; then
15720 cf_cv_prog_gnat_correct=yes
15722 cf_cv_prog_gnat_correct=no
15725 cf_cv_prog_gnat_correct=no
15727 rm -rf conftest* *~conftest*
15729 echo "$as_me:15729: result: $cf_cv_prog_gnat_correct" >&5
15730 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
15733 cf_cv_prog_gnat_correct=no
15737 if test "$cf_cv_prog_gnat_correct" = yes; then
15739 echo "$as_me:15739: checking optimization options for ADAFLAGS" >&5
15740 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
15744 ADAFLAGS="$ADAFLAGS -g"
15750 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
15752 ADAFLAGS="$ADAFLAGS $cf_O_flag"
15756 echo "$as_me:15756: result: $ADAFLAGS" >&5
15757 echo "${ECHO_T}$ADAFLAGS" >&6
15759 echo "$as_me:15759: checking if GNATPREP supports -T option" >&5
15760 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
15761 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
15762 echo $ECHO_N "(cached) $ECHO_C" >&6
15765 cf_cv_gnatprep_opt_t=no
15766 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
15769 echo "$as_me:15769: result: $cf_cv_gnatprep_opt_t" >&5
15770 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
15771 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
15773 echo "$as_me:15773: checking if GNAT supports generics" >&5
15774 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
15775 case $cf_gnat_version in
15777 cf_gnat_generics=yes
15780 cf_gnat_generics=no
15783 echo "$as_me:15783: result: $cf_gnat_generics" >&5
15784 echo "${ECHO_T}$cf_gnat_generics" >&6
15786 if test "$cf_gnat_generics" = yes
15788 cf_compile_generics=generics
15789 cf_generic_objects="\${GENOBJS}"
15791 cf_compile_generics=
15792 cf_generic_objects=
15795 echo "$as_me:15795: checking if GNAT supports SIGINT" >&5
15796 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
15797 if test "${cf_cv_gnat_sigint+set}" = set; then
15798 echo $ECHO_N "(cached) $ECHO_C" >&6
15801 rm -rf conftest* *~conftest*
15802 cat >>conftest.ads <<CF_EOF
15803 with Ada.Interrupts.Names;
15805 package ConfTest is
15807 pragma Warnings (Off); -- the next pragma exists since 3.11p
15808 pragma Unreserve_All_Interrupts;
15809 pragma Warnings (On);
15811 protected Process is
15813 function Continue return Boolean;
15814 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
15816 Done : Boolean := False;
15821 cat >>conftest.adb <<CF_EOF
15822 package body ConfTest is
15823 protected body Process is
15828 function Continue return Boolean is
15835 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15836 cf_cv_gnat_sigint=yes
15838 cf_cv_gnat_sigint=no
15840 rm -rf conftest* *~conftest*
15843 echo "$as_me:15843: result: $cf_cv_gnat_sigint" >&5
15844 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
15846 if test $cf_cv_gnat_sigint = yes ; then
15849 USE_GNAT_SIGINT="#"
15852 cf_gnat_libraries=no
15853 cf_gnat_projects=no
15855 if test "$enable_gnat_projects" != no ; then
15856 echo "$as_me:15856: checking if GNAT supports project files" >&5
15857 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
15858 case $cf_gnat_version in
15862 case $cf_cv_system_name in
15866 rm -rf conftest* *~conftest*
15867 if mkdir conftest.src conftest.bin conftest.lib
15870 rm -rf conftest* *~conftest*
15871 cat >>library.gpr <<CF_EOF
15873 Kind := External ("LIB_KIND");
15874 for Library_Name use "ConfTest";
15875 for Object_Dir use ".";
15876 for Library_ALI_Dir use External("LIBRARY_DIR");
15877 for Library_Version use External ("SONAME");
15878 for Library_Kind use Kind;
15879 for Library_Dir use External("BUILD_DIR");
15880 Source_Dir := External ("SOURCE_DIR");
15881 for Source_Dirs use (Source_Dir);
15884 cat >>confpackage.ads <<CF_EOF
15885 package ConfPackage is
15886 procedure conftest;
15889 cat >>confpackage.adb <<CF_EOF
15891 package body ConfPackage is
15892 procedure conftest is
15894 Text_IO.Put ("Hello World");
15899 if ( $cf_ada_make $ADAFLAGS \
15901 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
15902 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
15903 -XSOURCE_DIR=`pwd` \
15904 -XSONAME=libConfTest.so.1 \
15905 -XLIB_KIND=static 1>&5 2>&1 ) ; then
15906 cf_gnat_projects=yes
15910 if test -f conftest.lib/confpackage.ali
15912 cf_gnat_libraries=yes
15914 rm -rf conftest* *~conftest*
15919 echo "$as_me:15919: result: $cf_gnat_projects" >&5
15920 echo "${ECHO_T}$cf_gnat_projects" >&6
15921 fi # enable_gnat_projects
15923 if test $cf_gnat_projects = yes
15925 echo "$as_me:15925: checking if GNAT supports libraries" >&5
15926 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
15927 echo "$as_me:15927: result: $cf_gnat_libraries" >&5
15928 echo "${ECHO_T}$cf_gnat_libraries" >&6
15931 if test "$cf_gnat_projects" = yes
15933 USE_OLD_MAKERULES="#"
15934 USE_GNAT_PROJECTS=""
15936 USE_OLD_MAKERULES=""
15937 USE_GNAT_PROJECTS="#"
15940 if test "$cf_gnat_libraries" = yes
15942 USE_GNAT_LIBRARIES=""
15944 USE_GNAT_LIBRARIES="#"
15947 echo "$as_me:15947: checking for ada-compiler" >&5
15948 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
15950 # Check whether --with-ada-compiler or --without-ada-compiler was given.
15951 if test "${with_ada_compiler+set}" = set; then
15952 withval="$with_ada_compiler"
15953 cf_ada_compiler=$withval
15955 cf_ada_compiler=gnatmake
15958 echo "$as_me:15958: result: $cf_ada_compiler" >&5
15959 echo "${ECHO_T}$cf_ada_compiler" >&6
15961 cf_ada_package=terminal_interface
15963 echo "$as_me:15963: checking for ada-include" >&5
15964 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
15966 # Check whether --with-ada-include or --without-ada-include was given.
15967 if test "${with_ada_include+set}" = set; then
15968 withval="$with_ada_include"
15971 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
15972 fi; if test -n "$prefix/share/ada/adainclude" ; then
15974 if test "x$prefix" != xNONE; then
15975 cf_path_syntax="$prefix"
15977 cf_path_syntax="$ac_default_prefix"
15980 case ".$withval" in
15981 (.\$\(*\)*|.\'*\'*)
15985 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
15987 (.\${*prefix}*|.\${*dir}*)
15988 eval withval="$withval"
15989 case ".$withval" in
15991 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15996 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15999 { { echo "$as_me:15999: error: expected a pathname, not \"$withval\"" >&5
16000 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16001 { (exit 1); exit 1; }; }
16006 eval ADA_INCLUDE="$withval"
16008 echo "$as_me:16008: result: $ADA_INCLUDE" >&5
16009 echo "${ECHO_T}$ADA_INCLUDE" >&6
16011 echo "$as_me:16011: checking for ada-objects" >&5
16012 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
16014 # Check whether --with-ada-objects or --without-ada-objects was given.
16015 if test "${with_ada_objects+set}" = set; then
16016 withval="$with_ada_objects"
16019 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
16020 fi; if test -n "$prefix/lib/ada/adalib" ; then
16022 if test "x$prefix" != xNONE; then
16023 cf_path_syntax="$prefix"
16025 cf_path_syntax="$ac_default_prefix"
16028 case ".$withval" in
16029 (.\$\(*\)*|.\'*\'*)
16033 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
16035 (.\${*prefix}*|.\${*dir}*)
16036 eval withval="$withval"
16037 case ".$withval" in
16039 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16044 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16047 { { echo "$as_me:16047: error: expected a pathname, not \"$withval\"" >&5
16048 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16049 { (exit 1); exit 1; }; }
16054 eval ADA_OBJECTS="$withval"
16056 echo "$as_me:16056: result: $ADA_OBJECTS" >&5
16057 echo "${ECHO_T}$ADA_OBJECTS" >&6
16059 echo "$as_me:16059: checking if an Ada95 shared-library should be built" >&5
16060 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
16062 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
16063 if test "${with_ada_sharedlib+set}" = set; then
16064 withval="$with_ada_sharedlib"
16065 with_ada_sharedlib=$withval
16067 with_ada_sharedlib=no
16069 echo "$as_me:16069: result: $with_ada_sharedlib" >&5
16070 echo "${ECHO_T}$with_ada_sharedlib" >&6
16072 if test "x$with_ada_sharedlib" != xno
16074 if test "x$cf_gnat_projects" != xyes
16076 { echo "$as_me:16076: WARNING: disabling shared-library since GNAT projects are not supported" >&5
16077 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
16078 with_ada_sharedlib=no
16082 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
16083 MAKE_ADA_SHAREDLIB="#"
16085 if test "x$with_ada_sharedlib" != xno
16087 MAKE_ADA_SHAREDLIB=
16088 if test "x$with_ada_sharedlib" != xyes
16090 ADA_SHAREDLIB="$with_ada_sharedlib"
16095 { { echo "$as_me:16095: error: No usable Ada compiler found" >&5
16096 echo "$as_me: error: No usable Ada compiler found" >&2;}
16097 { (exit 1); exit 1; }; }
16100 { { echo "$as_me:16100: error: The Ada compiler is needed for this package" >&5
16101 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
16102 { (exit 1); exit 1; }; }
16105 ################################################################################
16112 ### Construct the list of include-directories to be generated
16114 if test "$srcdir" != "."; then
16115 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
16117 CPPFLAGS="-I../include $CPPFLAGS"
16118 if test "$srcdir" != "."; then
16119 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
16121 CPPFLAGS="-I. $CPPFLAGS"
16123 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
16124 if test "$srcdir" != "."; then
16125 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
16127 if test "$GCC" != yes; then
16128 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16129 elif test "$includedir" != "/usr/include"; then
16130 if test "$includedir" = '${prefix}/include' ; then
16131 if test x$prefix != x/usr ; then
16132 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16135 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16139 ### Build up pieces for makefile rules
16140 echo "$as_me:16140: checking default library suffix" >&5
16141 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
16143 case $DFT_LWR_MODEL in
16144 (libtool) DFT_ARG_SUFFIX='' ;;
16145 (normal) DFT_ARG_SUFFIX='' ;;
16146 (debug) DFT_ARG_SUFFIX='_g' ;;
16147 (profile) DFT_ARG_SUFFIX='_p' ;;
16148 (shared) DFT_ARG_SUFFIX='' ;;
16150 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
16151 echo "$as_me:16151: result: $DFT_ARG_SUFFIX" >&5
16152 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
16154 echo "$as_me:16154: checking default library-dependency suffix" >&5
16155 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
16157 case X$DFT_LWR_MODEL in
16159 DFT_LIB_SUFFIX='.la'
16160 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16163 DFT_LIB_SUFFIX='_g.a'
16164 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16167 DFT_LIB_SUFFIX='_p.a'
16168 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16171 case $cf_cv_system_name in
16173 DFT_LIB_SUFFIX='.so'
16174 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16176 (cygwin*|msys*|mingw*)
16177 DFT_LIB_SUFFIX='.dll'
16178 DFT_DEP_SUFFIX='.dll.a'
16181 DFT_LIB_SUFFIX='.dylib'
16182 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16187 DFT_LIB_SUFFIX='.so'
16188 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16191 DFT_LIB_SUFFIX='.sl'
16192 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16197 DFT_LIB_SUFFIX='.so'
16198 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16203 DFT_LIB_SUFFIX='.a'
16204 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16207 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
16209 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
16210 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
16212 echo "$as_me:16212: result: $DFT_DEP_SUFFIX" >&5
16213 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
16215 echo "$as_me:16215: checking default object directory" >&5
16216 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
16218 case $DFT_LWR_MODEL in
16219 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
16220 (normal) DFT_OBJ_SUBDIR='objects' ;;
16221 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
16222 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
16224 case $cf_cv_system_name in
16226 DFT_OBJ_SUBDIR='objects' ;;
16228 DFT_OBJ_SUBDIR='obj_s' ;;
16231 echo "$as_me:16231: result: $DFT_OBJ_SUBDIR" >&5
16232 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
16234 ### Set up low-level terminfo dependencies for makefiles.
16236 if test "$DFT_LWR_MODEL" = shared ; then
16237 case $cf_cv_system_name in
16239 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
16242 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
16247 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
16249 ### Construct the list of subdirectories for which we'll customize makefiles
16250 ### with the appropriate compile-rules.
16252 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
16254 cat >>confdefs.h <<EOF
16255 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
16258 ### Now that we're done running tests, add the compiler-warnings, if any
16263 cf_new_extra_cppflags=
16265 for cf_add_cflags in $EXTRA_CFLAGS
16267 case $cf_fix_cppflags in
16269 case $cf_add_cflags in
16270 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16271 case $cf_add_cflags in
16273 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16275 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16276 && test -z "${cf_tst_cflags}" \
16277 && cf_fix_cppflags=yes
16279 if test $cf_fix_cppflags = yes ; then
16281 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16282 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16285 elif test "${cf_tst_cflags}" = "\"'" ; then
16287 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16288 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16294 case "$CPPFLAGS" in
16298 case $cf_add_cflags in
16300 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16302 CPPFLAGS=`echo "$CPPFLAGS" | \
16303 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16304 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16309 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16310 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16317 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16318 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16325 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16326 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16328 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16330 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16331 && test -z "${cf_tst_cflags}" \
16332 && cf_fix_cppflags=no
16337 if test -n "$cf_new_cflags" ; then
16339 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16340 CFLAGS="${CFLAGS}$cf_new_cflags"
16344 if test -n "$cf_new_cppflags" ; then
16346 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16347 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16351 if test -n "$cf_new_extra_cppflags" ; then
16353 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16354 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16358 ################################################################################
16364 NCURSES_SHLIB2="sh -c"
16366 ADA_SUBDIRS="include gen src doc"
16367 if test "x$cf_with_tests" != "xno" ; then
16368 ADA_SUBDIRS="$ADA_SUBDIRS samples"
16370 for cf_dir in $ADA_SUBDIRS
16372 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
16379 # match layout used by make-tar.sh
16380 ADAHTML_DIR=../doc/ada
16382 if test "x$cross_compiling" = xyes ; then
16383 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
16385 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
16388 ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
16389 ac_config_commands="$ac_config_commands default"
16390 cat >confcache <<\_ACEOF
16391 # This file is a shell script that caches the results of configure
16392 # tests run on this system so they can be shared between configure
16393 # scripts and configure runs, see configure's option --config-cache.
16394 # It is not useful on other systems. If it contains results you don't
16395 # want to keep, you may remove or edit it.
16397 # config.status only pays attention to the cache file if you give it
16398 # the --recheck option to rerun configure.
16400 # `ac_cv_env_foo' variables (set or unset) will be overriden when
16401 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16402 # following values.
16406 # The following way of writing the cache mishandles newlines in values,
16407 # but we know of no workaround that is simple, portable, and efficient.
16408 # So, don't put newlines in cache variables' values.
16409 # Ultrix sh set writes to stderr and can't be redirected directly,
16410 # and sets the high bit in the cache file unless we assign to the vars.
16413 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16415 # `set' does not quote correctly, so add quotes (double-quote
16416 # substitution turns \\\\ into \\, and sed turns \\ into \).
16419 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16422 # `set' quotes correctly as required by POSIX, so do not add quotes.
16424 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16431 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16433 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16435 if cmp -s $cache_file confcache; then :; else
16436 if test -w $cache_file; then
16437 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16438 cat confcache >$cache_file
16440 echo "not updating unwritable cache $cache_file"
16445 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16446 # Let make expand exec_prefix.
16447 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16449 # VPATH may cause trouble with some makes, so we remove $(srcdir),
16450 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16451 # trailing colons and then remove the whole line if VPATH becomes empty
16452 # (actually we leave an empty line to preserve line numbers).
16453 if test "x$srcdir" = x.; then
16454 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16455 s/:*\$(srcdir):*/:/;
16456 s/:*\${srcdir}:*/:/;
16458 s/^\([^=]*=[ ]*\):*/\1/;
16464 DEFS=-DHAVE_CONFIG_H
16466 : ${CONFIG_STATUS=./config.status}
16467 ac_clean_files_save=$ac_clean_files
16468 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16469 { echo "$as_me:16469: creating $CONFIG_STATUS" >&5
16470 echo "$as_me: creating $CONFIG_STATUS" >&6;}
16471 cat >$CONFIG_STATUS <<_ACEOF
16473 # Generated automatically by configure.
16474 # Run this file to recreate the current configuration.
16475 # Compiler output produced by configure, useful for debugging
16476 # configure, is in config.log if it exists.
16479 SHELL=\${CONFIG_SHELL-$SHELL}
16480 ac_cs_invocation="\$0 \$@"
16484 cat >>$CONFIG_STATUS <<\_ACEOF
16485 # Be Bourne compatible
16486 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16489 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16493 # Name of the executable.
16494 as_me=`echo "$0" |sed 's,.*[\\/],,'`
16496 if expr a : '\(a\)' >/dev/null 2>&1; then
16502 rm -f conf$$ conf$$.exe conf$$.file
16504 if ln -s conf$$.file conf$$ 2>/dev/null; then
16505 # We could just check for DJGPP; but this test a) works b) is more generic
16506 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16507 if test -f conf$$.exe; then
16508 # Don't use ln at all; we don't have any links
16513 elif ln conf$$.file conf$$ 2>/dev/null; then
16518 rm -f conf$$ conf$$.exe conf$$.file
16520 as_executable_p="test -f"
16522 # Support unset when possible.
16523 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16530 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
16531 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
16532 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
16533 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
16534 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
16535 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
16536 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
16537 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
16540 # We need space, tab and new line, in precisely that order.
16546 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
16552 # Files that config.status was made for.
16553 if test -n "$ac_config_files"; then
16554 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16557 if test -n "$ac_config_headers"; then
16558 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16561 if test -n "$ac_config_links"; then
16562 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16565 if test -n "$ac_config_commands"; then
16566 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16569 cat >>$CONFIG_STATUS <<\EOF
16572 \`$as_me' instantiates files from templates according to the
16573 current configuration.
16575 Usage: $0 [OPTIONS] [FILE]...
16577 -h, --help print this help, then exit
16578 -V, --version print version number, then exit
16579 -d, --debug don't remove temporary files
16580 --recheck update $as_me by reconfiguring in the same conditions
16581 --file=FILE[:TEMPLATE]
16582 instantiate the configuration file FILE
16583 --header=FILE[:TEMPLATE]
16584 instantiate the configuration header FILE
16586 Configuration files:
16589 Configuration headers:
16592 Configuration commands:
16595 Report bugs to <dickey@invisible-island.net>."
16598 cat >>$CONFIG_STATUS <<EOF
16601 configured by $0, generated by GNU Autoconf 2.52.20181006,
16602 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16604 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16605 Free Software Foundation, Inc.
16606 This config.status script is free software; the Free Software Foundation
16607 gives unlimited permission to copy, distribute and modify it."
16612 cat >>$CONFIG_STATUS <<\EOF
16613 # If no file are specified by the user, then we need to provide default
16614 # value. By we need to know if files were specified by the user.
16620 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16621 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16623 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16627 *) # This is not an option, so the user has probably given explicit
16629 ac_need_defaults=false;;
16633 # Handling of the options.
16635 cat >>$CONFIG_STATUS <<EOF
16636 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16637 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16638 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16640 cat >>$CONFIG_STATUS <<\EOF
16641 --version | --vers* | -V )
16642 echo "$ac_cs_version"; exit 0 ;;
16644 # Conflict between --help and --header
16645 { { echo "$as_me:16645: error: ambiguous option: $1
16646 Try \`$0 --help' for more information." >&5
16647 echo "$as_me: error: ambiguous option: $1
16648 Try \`$0 --help' for more information." >&2;}
16649 { (exit 1); exit 1; }; };;
16650 --help | --hel | -h )
16651 echo "$ac_cs_usage"; exit 0 ;;
16652 --debug | --d* | -d )
16654 --file | --fil | --fi | --f )
16656 CONFIG_FILES="$CONFIG_FILES $1"
16657 ac_need_defaults=false;;
16658 --header | --heade | --head | --hea )
16660 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16661 ac_need_defaults=false;;
16663 # This is an error.
16664 -*) { { echo "$as_me:16664: error: unrecognized option: $1
16665 Try \`$0 --help' for more information." >&5
16666 echo "$as_me: error: unrecognized option: $1
16667 Try \`$0 --help' for more information." >&2;}
16668 { (exit 1); exit 1; }; } ;;
16670 *) ac_config_targets="$ac_config_targets $1" ;;
16679 ## ----------------------- ##
16680 ## Running config.status. ##
16681 ## ----------------------- ##
16683 This file was extended by $as_me 2.52.20181006, executed with
16684 CONFIG_FILES = $CONFIG_FILES
16685 CONFIG_HEADERS = $CONFIG_HEADERS
16686 CONFIG_LINKS = $CONFIG_LINKS
16687 CONFIG_COMMANDS = $CONFIG_COMMANDS
16688 > $ac_cs_invocation
16689 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16694 cat >>$CONFIG_STATUS <<EOF
16696 # INIT-COMMANDS section.
16699 ### Special initialization commands, used to pass information from the
16700 ### configuration-run into config.status
16703 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
16704 DFT_LWR_MODEL="$DFT_LWR_MODEL"
16705 LIB_NAME="$LIB_NAME"
16706 LIB_PREFIX="$LIB_PREFIX"
16707 LIB_SUFFIX="$LIB_SUFFIX"
16709 NCURSES_MAJOR="$NCURSES_MAJOR"
16710 NCURSES_MINOR="$NCURSES_MINOR"
16711 NCURSES_PATCH="$NCURSES_PATCH"
16712 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
16713 cf_cv_abi_version="$cf_cv_abi_version"
16714 cf_cv_rel_version="$cf_cv_rel_version"
16715 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
16716 cf_cv_shared_soname='$cf_cv_shared_soname'
16717 cf_cv_shlib_version="$cf_cv_shlib_version"
16718 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
16719 cf_cv_system_name="$cf_cv_system_name"
16725 cat >>$CONFIG_STATUS <<\EOF
16726 for ac_config_target in $ac_config_targets
16728 case "$ac_config_target" in
16729 # Handling of arguments.
16730 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
16731 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
16732 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16733 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16734 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
16735 *) { { echo "$as_me:16735: error: invalid argument: $ac_config_target" >&5
16736 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16737 { (exit 1); exit 1; }; };;
16741 # If the user did not use the arguments to specify the items to instantiate,
16742 # then the envvar interface is used. Set only those that are not.
16743 # We use the long form for the default assignment because of an extremely
16744 # bizarre bug on SunOS 4.1.3.
16745 if $ac_need_defaults; then
16746 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16747 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16748 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16751 # Create a temporary directory, and hook for its removal unless debugging.
16754 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16755 trap '{ (exit 1); exit 1; }' 1 2 13 15
16758 # Create a (secure) tmp directory for tmp files.
16761 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16762 test -n "$tmp" && test -d "$tmp"
16765 tmp=$TMPDIR/cs$$-$RANDOM
16766 (umask 077 && mkdir $tmp)
16769 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16770 { (exit 1); exit 1; }
16775 cat >>$CONFIG_STATUS <<EOF
16778 # CONFIG_FILES section.
16781 # No need to generate the scripts if there are no CONFIG_FILES.
16782 # This happens for instance when ./config.status config.h
16783 if test -n "\$CONFIG_FILES"; then
16784 # Protect against being on the right side of a sed subst in config.status.
16785 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16786 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16787 s,@SHELL@,$SHELL,;t t
16788 s,@exec_prefix@,$exec_prefix,;t t
16789 s,@prefix@,$prefix,;t t
16790 s,@program_transform_name@,$program_transform_name,;t t
16791 s,@bindir@,$bindir,;t t
16792 s,@sbindir@,$sbindir,;t t
16793 s,@libexecdir@,$libexecdir,;t t
16794 s,@datarootdir@,$datarootdir,;t t
16795 s,@datadir@,$datadir,;t t
16796 s,@sysconfdir@,$sysconfdir,;t t
16797 s,@sharedstatedir@,$sharedstatedir,;t t
16798 s,@localstatedir@,$localstatedir,;t t
16799 s,@runstatedir@,$runstatedir,;t t
16800 s,@libdir@,$libdir,;t t
16801 s,@includedir@,$includedir,;t t
16802 s,@oldincludedir@,$oldincludedir,;t t
16803 s,@infodir@,$infodir,;t t
16804 s,@mandir@,$mandir,;t t
16805 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16806 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16807 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16808 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16809 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16810 s,@build_alias@,$build_alias,;t t
16811 s,@host_alias@,$host_alias,;t t
16812 s,@target_alias@,$target_alias,;t t
16813 s,@ECHO_C@,$ECHO_C,;t t
16814 s,@ECHO_N@,$ECHO_N,;t t
16815 s,@ECHO_T@,$ECHO_T,;t t
16816 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16817 s,@DEFS@,$DEFS,;t t
16818 s,@LIBS@,$LIBS,;t t
16819 s,@top_builddir@,$top_builddir,;t t
16820 s,@build@,$build,;t t
16821 s,@build_cpu@,$build_cpu,;t t
16822 s,@build_vendor@,$build_vendor,;t t
16823 s,@build_os@,$build_os,;t t
16824 s,@host@,$host,;t t
16825 s,@host_cpu@,$host_cpu,;t t
16826 s,@host_vendor@,$host_vendor,;t t
16827 s,@host_os@,$host_os,;t t
16828 s,@target@,$target,;t t
16829 s,@target_cpu@,$target_cpu,;t t
16830 s,@target_vendor@,$target_vendor,;t t
16831 s,@target_os@,$target_os,;t t
16833 s,@CFLAGS@,$CFLAGS,;t t
16834 s,@LDFLAGS@,$LDFLAGS,;t t
16835 s,@CPPFLAGS@,$CPPFLAGS,;t t
16836 s,@ac_ct_CC@,$ac_ct_CC,;t t
16837 s,@EXEEXT@,$EXEEXT,;t t
16838 s,@OBJEXT@,$OBJEXT,;t t
16839 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
16842 s,@EGREP@,$EGREP,;t t
16843 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16844 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16845 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16846 s,@LN_S@,$LN_S,;t t
16847 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
16848 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
16849 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
16850 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
16851 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
16852 s,@SET_MAKE@,$SET_MAKE,;t t
16853 s,@CTAGS@,$CTAGS,;t t
16854 s,@ETAGS@,$ETAGS,;t t
16855 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
16856 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
16857 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
16858 s,@RANLIB@,$RANLIB,;t t
16859 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16861 s,@ac_ct_LD@,$ac_ct_LD,;t t
16863 s,@ac_ct_AR@,$ac_ct_AR,;t t
16864 s,@ARFLAGS@,$ARFLAGS,;t t
16865 s,@DESTDIR@,$DESTDIR,;t t
16866 s,@BUILD_CC@,$BUILD_CC,;t t
16867 s,@BUILD_CPP@,$BUILD_CPP,;t t
16868 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
16869 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
16870 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
16871 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
16872 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
16873 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
16874 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
16875 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
16876 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
16877 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
16878 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
16879 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
16880 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
16881 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
16882 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
16883 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
16884 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
16885 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
16886 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
16887 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
16888 s,@CC_G_OPT@,$CC_G_OPT,;t t
16889 s,@LD_MODEL@,$LD_MODEL,;t t
16890 s,@shlibdir@,$shlibdir,;t t
16891 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
16892 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
16893 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
16894 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
16895 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
16896 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
16897 s,@LINK_PROGS@,$LINK_PROGS,;t t
16898 s,@LINK_TESTS@,$LINK_TESTS,;t t
16899 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16900 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
16901 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
16902 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
16903 s,@RPATH_LIST@,$RPATH_LIST,;t t
16904 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
16905 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
16906 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
16907 s,@PTHREAD@,$PTHREAD,;t t
16908 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
16909 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
16910 s,@ECHO_LT@,$ECHO_LT,;t t
16911 s,@ECHO_LD@,$ECHO_LD,;t t
16912 s,@RULE_CC@,$RULE_CC,;t t
16913 s,@SHOW_CC@,$SHOW_CC,;t t
16914 s,@ECHO_CC@,$ECHO_CC,;t t
16915 s,@ADAFLAGS@,$ADAFLAGS,;t t
16916 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
16917 s,@ADA_TRACE@,$ADA_TRACE,;t t
16918 s,@gnatmake_exists@,$gnatmake_exists,;t t
16919 s,@gprconfig_exists@,$gprconfig_exists,;t t
16920 s,@M4_exists@,$M4_exists,;t t
16921 s,@cf_ada_make@,$cf_ada_make,;t t
16922 s,@cf_ada_config@,$cf_ada_config,;t t
16923 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
16924 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
16925 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
16926 s,@cf_compile_generics@,$cf_compile_generics,;t t
16927 s,@cf_generic_objects@,$cf_generic_objects,;t t
16928 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
16929 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
16930 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
16931 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
16932 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
16933 s,@cf_ada_package@,$cf_ada_package,;t t
16934 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
16935 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
16936 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
16937 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
16938 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
16939 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
16940 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
16941 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
16942 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
16943 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
16944 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
16945 s,@TEST_ARG2@,$TEST_ARG2,;t t
16946 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
16947 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
16948 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
16949 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
16950 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
16951 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
16952 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
16957 cat >>$CONFIG_STATUS <<\EOF
16958 # Split the substitutions into bite-sized pieces for seds with
16959 # small command number limits, like on Digital OSF/1 and HP-UX.
16960 ac_max_sed_lines=48
16961 ac_sed_frag=1 # Number of current file.
16962 ac_beg=1 # First line for current file.
16963 ac_end=$ac_max_sed_lines # Line after last line for current file.
16966 while $ac_more_lines; do
16967 if test $ac_beg -gt 1; then
16968 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16970 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16972 if test ! -s $tmp/subs.frag; then
16973 ac_more_lines=false
16975 # The purpose of the label and of the branching condition is to
16976 # speed up the sed processing (if there are no `@' at all, there
16977 # is no need to browse any of the substitutions).
16978 # These are the two extra sed commands mentioned above.
16980 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16981 # It is possible to make a multiline substitution using escaped newlines.
16982 # Ensure that we do not split the substitution between script fragments.
16984 ac_END=`expr $ac_end + $ac_max_sed_lines`
16985 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
16986 if test -s $tmp/subs.next; then
16987 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
16988 if test ! -s $tmp/subs.edit; then
16989 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
16990 if test ! -s $tmp/subs.edit; then
16991 if test $ac_beg -gt 1; then
16992 ac_end=`expr $ac_end - 1`
16999 if test -z "$ac_sed_cmds"; then
17000 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17002 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17004 ac_sed_frag=`expr $ac_sed_frag + 1`
17006 ac_end=`expr $ac_end + $ac_max_sed_lines`
17009 if test -z "$ac_sed_cmds"; then
17012 fi # test -n "$CONFIG_FILES"
17015 cat >>$CONFIG_STATUS <<\EOF
17016 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17017 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17019 - | *:- | *:-:* ) # input from stdin
17021 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17022 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17023 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17024 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17025 * ) ac_file_in=$ac_file.in ;;
17028 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17029 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17030 X"$ac_file" : 'X\(//\)[^/]' \| \
17031 X"$ac_file" : 'X\(//\)$' \| \
17032 X"$ac_file" : 'X\(/\)' \| \
17033 . : '\(.\)' 2>/dev/null ||
17035 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17036 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17037 /^X\(\/\/\)$/{ s//\1/; q; }
17038 /^X\(\/\).*/{ s//\1/; q; }
17040 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17041 { case "$ac_dir" in
17042 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17046 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17047 case $as_mkdir_dir in
17048 # Skip DOS drivespec
17049 ?:) as_incr_dir=$as_mkdir_dir ;;
17051 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17052 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17057 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
17058 # A "../" for each directory in $ac_dir_suffix.
17059 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
17061 ac_dir_suffix= ac_dots=
17066 if test -z "$ac_dots"; then
17069 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
17071 [\\/]* | ?:[\\/]* )
17072 ac_srcdir=$srcdir$ac_dir_suffix;
17073 ac_top_srcdir=$srcdir ;;
17074 *) # Relative path.
17075 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
17076 ac_top_srcdir=$ac_dots$srcdir ;;
17080 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17081 *) ac_INSTALL=$ac_dots$INSTALL ;;
17084 if test x"$ac_file" != x-; then
17085 { echo "$as_me:17085: creating $ac_file" >&5
17086 echo "$as_me: creating $ac_file" >&6;}
17089 # Let's still pretend it is `configure' which instantiates (i.e., don't
17090 # use $as_me), people would be surprised to read:
17091 # /* config.h. Generated automatically by config.status. */
17092 configure_input="Generated automatically from `echo $ac_file_in |
17093 sed 's,.*/,,'` by configure."
17095 # First look for the input files in the build tree, otherwise in the
17097 ac_file_inputs=`IFS=:
17098 for f in $ac_file_in; do
17100 -) echo $tmp/stdin ;;
17102 # Absolute (can't be DOS-style, as IFS=:)
17103 test -f "$f" || { { echo "$as_me:17103: error: cannot find input file: $f" >&5
17104 echo "$as_me: error: cannot find input file: $f" >&2;}
17105 { (exit 1); exit 1; }; }
17108 if test -f "$f"; then
17111 elif test -f "$srcdir/$f"; then
17116 { { echo "$as_me:17116: error: cannot find input file: $f" >&5
17117 echo "$as_me: error: cannot find input file: $f" >&2;}
17118 { (exit 1); exit 1; }; }
17121 done` || { (exit 1); exit 1; }
17123 cat >>$CONFIG_STATUS <<\EOF
17124 ac_warn_datarootdir=no
17125 if test x"$ac_file" != x-; then
17126 for ac_item in $ac_file_inputs
17128 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
17129 if test -n "$ac_seen"; then
17130 ac_used=`grep '@datarootdir@' $ac_item`
17131 if test -z "$ac_used"; then
17132 { echo "$as_me:17132: WARNING: datarootdir was used implicitly but not set:
17134 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
17136 ac_warn_datarootdir=yes
17139 ac_seen=`grep '${datarootdir}' $ac_item`
17140 if test -n "$ac_seen"; then
17141 { echo "$as_me:17141: WARNING: datarootdir was used explicitly but not set:
17143 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
17145 ac_warn_datarootdir=yes
17150 if test "x$ac_warn_datarootdir" = xyes; then
17151 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
17155 cat >>$CONFIG_STATUS <<EOF
17159 cat >>$CONFIG_STATUS <<\EOF
17161 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17162 s,@configure_input@,$configure_input,;t t
17163 s,@srcdir@,$ac_srcdir,;t t
17164 s,@top_srcdir@,$ac_top_srcdir,;t t
17165 s,@INSTALL@,$ac_INSTALL,;t t
17166 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17168 if test x"$ac_file" != x-; then
17169 cp $tmp/out $ac_file
17171 for ac_name in prefix exec_prefix datarootdir
17173 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
17174 if test -n "$ac_seen"; then
17175 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
17176 if test -z "$ac_init"; then
17177 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
17178 { echo "$as_me:17178: WARNING: Variable $ac_name is used but was not set:
17180 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
17185 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
17186 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
17187 if test -s $tmp/out; then
17188 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
17189 { echo "$as_me:17189: WARNING: Some variables may not be substituted:
17191 echo "$as_me: WARNING: Some variables may not be substituted:
17201 cat >>$CONFIG_STATUS <<\EOF
17204 # CONFIG_HEADER section.
17207 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17208 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17210 # ac_d sets the value in "#define NAME VALUE" lines.
17211 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17212 ac_dB='[ ].*$,\1#\2'
17215 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17216 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17217 ac_iB='\([ ]\),\1#\2define\3'
17220 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17221 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17222 ac_uB='$,\1#\2define\3'
17226 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
17227 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17229 - | *:- | *:-:* ) # input from stdin
17231 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17232 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17233 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17234 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17235 * ) ac_file_in=$ac_file.in ;;
17238 test x"$ac_file" != x- && { echo "$as_me:17238: creating $ac_file" >&5
17239 echo "$as_me: creating $ac_file" >&6;}
17241 # First look for the input files in the build tree, otherwise in the
17243 ac_file_inputs=`IFS=:
17244 for f in $ac_file_in; do
17246 -) echo $tmp/stdin ;;
17248 # Absolute (can't be DOS-style, as IFS=:)
17249 test -f "$f" || { { echo "$as_me:17249: error: cannot find input file: $f" >&5
17250 echo "$as_me: error: cannot find input file: $f" >&2;}
17251 { (exit 1); exit 1; }; }
17254 if test -f "$f"; then
17257 elif test -f "$srcdir/$f"; then
17262 { { echo "$as_me:17262: error: cannot find input file: $f" >&5
17263 echo "$as_me: error: cannot find input file: $f" >&2;}
17264 { (exit 1); exit 1; }; }
17267 done` || { (exit 1); exit 1; }
17268 # Remove the trailing spaces.
17269 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
17273 # Transform confdefs.h into a list of #define's. We won't use it as a sed
17274 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
17275 # be either 'cat' or 'sort'.
17276 cat confdefs.h | uniq >conftest.vals
17278 # Break up conftest.vals because some shells have a limit on
17279 # the size of here documents, and old seds have small limits too.
17281 rm -f conftest.tail
17282 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
17283 while grep . conftest.vals >/dev/null
17285 # Write chunks of a limited-size here document to conftest.frag.
17286 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
17287 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
17288 echo 'CEOF' >> $CONFIG_STATUS
17289 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17290 rm -f conftest.vals
17291 mv conftest.tail conftest.vals
17293 rm -f conftest.vals
17295 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
17297 echo ' cat >> conftest.edit <<CEOF
17298 /@DEFS@/r conftest.frag
17301 sed -f conftest.edit $tmp/in > $tmp/out
17303 mv $tmp/out $tmp/in
17304 rm -f conftest.edit conftest.frag
17305 ' >> $CONFIG_STATUS
17307 cat >>$CONFIG_STATUS <<\EOF
17308 # Let's still pretend it is `configure' which instantiates (i.e., don't
17309 # use $as_me), people would be surprised to read:
17310 # /* config.h. Generated automatically by config.status. */
17311 if test x"$ac_file" = x-; then
17312 echo "/* Generated automatically by configure. */" >$tmp/config.h
17314 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
17316 cat $tmp/in >>$tmp/config.h
17318 if test x"$ac_file" != x-; then
17319 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17320 { echo "$as_me:17320: $ac_file is unchanged" >&5
17321 echo "$as_me: $ac_file is unchanged" >&6;}
17323 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17324 X"$ac_file" : 'X\(//\)[^/]' \| \
17325 X"$ac_file" : 'X\(//\)$' \| \
17326 X"$ac_file" : 'X\(/\)' \| \
17327 . : '\(.\)' 2>/dev/null ||
17329 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17330 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17331 /^X\(\/\/\)$/{ s//\1/; q; }
17332 /^X\(\/\).*/{ s//\1/; q; }
17334 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17335 { case "$ac_dir" in
17336 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17340 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17341 case $as_mkdir_dir in
17342 # Skip DOS drivespec
17343 ?:) as_incr_dir=$as_mkdir_dir ;;
17345 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17346 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17353 mv $tmp/config.h $ac_file
17357 rm -f $tmp/config.h
17361 cat >>$CONFIG_STATUS <<\EOF
17363 # CONFIG_COMMANDS section.
17365 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17366 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17367 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17371 if test -z "$USE_OLD_MAKERULES" ; then
17372 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
17379 cat >>$CONFIG_STATUS <<\EOF
17381 { (exit 0); exit 0; }
17383 chmod +x $CONFIG_STATUS
17384 ac_clean_files=$ac_clean_files_save
17386 # configure is writing to config.log, and then calls config.status.
17387 # config.status does its own redirection, appending to config.log.
17388 # Unfortunately, on DOS this fails, as config.log is still kept open
17389 # by configure, so config.status won't be able to write to it; its
17390 # output is simply discarded. So we exec the FD to /dev/null,
17391 # effectively closing config.log, so it can be properly (re)opened and
17392 # appended to by config.status. When coming back to configure, we
17393 # need to make the FD available again.
17394 if test "$no_create" != yes; then
17397 $SHELL $CONFIG_STATUS || ac_cs_success=false
17399 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17400 # would make configure fail if this is the last instruction.
17401 $ac_cs_success || { (exit 1); exit 1; }
17403 ${MAKE:-make} preinstall