2 # From configure.in Revision: 1.66 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20180819.
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.20180819. 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 /* System header to define __stub macros and hopefully few prototypes,
5595 which can conflict with char initscr (); below. */
5597 /* Override any gcc2 internal prototype to avoid an error. */
5601 /* We use char because int might match the return type of a gcc2
5602 builtin and then its argument prototype would still apply. */
5609 /* The GNU C library defines this for functions which it implements
5610 to always fail with ENOSYS. Some functions are actually named
5611 something starting with __ and the normal name is an alias. */
5612 #if defined (__stub_initscr) || defined (__stub___initscr)
5615 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
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 /* System header to define __stub macros and hopefully few prototypes,
8000 which can conflict with char initscr (); below. */
8002 /* Override any gcc2 internal prototype to avoid an error. */
8006 /* We use char because int might match the return type of a gcc2
8007 builtin and then its argument prototype would still apply. */
8014 /* The GNU C library defines this for functions which it implements
8015 to always fail with ENOSYS. Some functions are actually named
8016 something starting with __ and the normal name is an alias. */
8017 #if defined (__stub_initscr) || defined (__stub___initscr)
8020 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
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 /* System header to define __stub macros and hopefully few prototypes,
9829 which can conflict with char initscr (); below. */
9831 /* Override any gcc2 internal prototype to avoid an error. */
9835 /* We use char because int might match the return type of a gcc2
9836 builtin and then its argument prototype would still apply. */
9843 /* The GNU C library defines this for functions which it implements
9844 to always fail with ENOSYS. Some functions are actually named
9845 something starting with __ and the normal name is an alias. */
9846 #if defined (__stub_initscr) || defined (__stub___initscr)
9849 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
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*)
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
10982 # error not GNU C library
10988 rm -f conftest.$ac_objext
10989 if { (eval echo "$as_me:10989: \"$ac_compile\"") >&5
10990 (eval $ac_compile) 2>&5
10992 echo "$as_me:10992: \$? = $ac_status" >&5
10993 (exit $ac_status); } &&
10994 { ac_try='test -s conftest.$ac_objext'
10995 { (eval echo "$as_me:10995: \"$ac_try\"") >&5
10996 (eval $ac_try) 2>&5
10998 echo "$as_me:10998: \$? = $ac_status" >&5
10999 (exit $ac_status); }; }; then
11000 cf_cv_gnu_library=yes
11002 echo "$as_me: failed program was:" >&5
11003 cat conftest.$ac_ext >&5
11004 cf_cv_gnu_library=no
11006 rm -f conftest.$ac_objext conftest.$ac_ext
11009 echo "$as_me:11009: result: $cf_cv_gnu_library" >&5
11010 echo "${ECHO_T}$cf_cv_gnu_library" >&6
11012 if test x$cf_cv_gnu_library = xyes; then
11014 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
11015 # was changed to help a little...
11016 echo "$as_me:11016: checking if _DEFAULT_SOURCE can be used as a basis" >&5
11017 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
11018 if test "${cf_cv_gnu_library_219+set}" = set; then
11019 echo $ECHO_N "(cached) $ECHO_C" >&6
11022 cf_save="$CPPFLAGS"
11024 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11025 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
11027 cat >conftest.$ac_ext <<_ACEOF
11028 #line 11028 "configure"
11029 #include "confdefs.h"
11030 #include <sys/types.h>
11035 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
11038 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
11044 rm -f conftest.$ac_objext
11045 if { (eval echo "$as_me:11045: \"$ac_compile\"") >&5
11046 (eval $ac_compile) 2>&5
11048 echo "$as_me:11048: \$? = $ac_status" >&5
11049 (exit $ac_status); } &&
11050 { ac_try='test -s conftest.$ac_objext'
11051 { (eval echo "$as_me:11051: \"$ac_try\"") >&5
11052 (eval $ac_try) 2>&5
11054 echo "$as_me:11054: \$? = $ac_status" >&5
11055 (exit $ac_status); }; }; then
11056 cf_cv_gnu_library_219=yes
11058 echo "$as_me: failed program was:" >&5
11059 cat conftest.$ac_ext >&5
11060 cf_cv_gnu_library_219=no
11062 rm -f conftest.$ac_objext conftest.$ac_ext
11063 CPPFLAGS="$cf_save"
11066 echo "$as_me:11066: result: $cf_cv_gnu_library_219" >&5
11067 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
11069 if test "x$cf_cv_gnu_library_219" = xyes; then
11070 cf_save="$CPPFLAGS"
11071 echo "$as_me:11071: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
11072 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
11073 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
11074 echo $ECHO_N "(cached) $ECHO_C" >&6
11080 cf_new_extra_cppflags=
11082 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
11084 case $cf_fix_cppflags in
11086 case $cf_add_cflags in
11087 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11088 case $cf_add_cflags in
11090 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11092 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11093 && test -z "${cf_tst_cflags}" \
11094 && cf_fix_cppflags=yes
11096 if test $cf_fix_cppflags = yes ; then
11098 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11099 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11102 elif test "${cf_tst_cflags}" = "\"'" ; then
11104 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11105 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11111 case "$CPPFLAGS" in
11115 case $cf_add_cflags in
11117 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11119 CPPFLAGS=`echo "$CPPFLAGS" | \
11120 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11121 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11126 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11127 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11134 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11135 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11142 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11143 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11145 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11147 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11148 && test -z "${cf_tst_cflags}" \
11149 && cf_fix_cppflags=no
11154 if test -n "$cf_new_cflags" ; then
11156 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11157 CFLAGS="${CFLAGS}$cf_new_cflags"
11161 if test -n "$cf_new_cppflags" ; then
11163 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11164 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11168 if test -n "$cf_new_extra_cppflags" ; then
11170 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11171 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11175 cat >conftest.$ac_ext <<_ACEOF
11176 #line 11176 "configure"
11177 #include "confdefs.h"
11179 #include <limits.h>
11180 #include <sys/types.h>
11186 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
11189 # error GNU C library is too old
11195 rm -f conftest.$ac_objext
11196 if { (eval echo "$as_me:11196: \"$ac_compile\"") >&5
11197 (eval $ac_compile) 2>&5
11199 echo "$as_me:11199: \$? = $ac_status" >&5
11200 (exit $ac_status); } &&
11201 { ac_try='test -s conftest.$ac_objext'
11202 { (eval echo "$as_me:11202: \"$ac_try\"") >&5
11203 (eval $ac_try) 2>&5
11205 echo "$as_me:11205: \$? = $ac_status" >&5
11206 (exit $ac_status); }; }; then
11207 cf_cv_gnu_dftsrc_219=yes
11209 echo "$as_me: failed program was:" >&5
11210 cat conftest.$ac_ext >&5
11211 cf_cv_gnu_dftsrc_219=no
11213 rm -f conftest.$ac_objext conftest.$ac_ext
11216 echo "$as_me:11216: result: $cf_cv_gnu_dftsrc_219" >&5
11217 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
11218 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
11220 cf_cv_gnu_dftsrc_219=maybe
11223 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
11225 echo "$as_me:11225: checking if we must define _GNU_SOURCE" >&5
11226 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
11227 if test "${cf_cv_gnu_source+set}" = set; then
11228 echo $ECHO_N "(cached) $ECHO_C" >&6
11231 cat >conftest.$ac_ext <<_ACEOF
11232 #line 11232 "configure"
11233 #include "confdefs.h"
11234 #include <sys/types.h>
11239 #ifndef _XOPEN_SOURCE
11240 #error expected _XOPEN_SOURCE to be defined
11246 rm -f conftest.$ac_objext
11247 if { (eval echo "$as_me:11247: \"$ac_compile\"") >&5
11248 (eval $ac_compile) 2>&5
11250 echo "$as_me:11250: \$? = $ac_status" >&5
11251 (exit $ac_status); } &&
11252 { ac_try='test -s conftest.$ac_objext'
11253 { (eval echo "$as_me:11253: \"$ac_try\"") >&5
11254 (eval $ac_try) 2>&5
11256 echo "$as_me:11256: \$? = $ac_status" >&5
11257 (exit $ac_status); }; }; then
11258 cf_cv_gnu_source=no
11260 echo "$as_me: failed program was:" >&5
11261 cat conftest.$ac_ext >&5
11262 cf_save="$CPPFLAGS"
11267 cf_new_extra_cppflags=
11269 for cf_add_cflags in -D_GNU_SOURCE
11271 case $cf_fix_cppflags in
11273 case $cf_add_cflags in
11274 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11275 case $cf_add_cflags in
11277 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11279 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11280 && test -z "${cf_tst_cflags}" \
11281 && cf_fix_cppflags=yes
11283 if test $cf_fix_cppflags = yes ; then
11285 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11286 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11289 elif test "${cf_tst_cflags}" = "\"'" ; then
11291 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11292 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11298 case "$CPPFLAGS" in
11302 case $cf_add_cflags in
11304 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11306 CPPFLAGS=`echo "$CPPFLAGS" | \
11307 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11308 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11313 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11314 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11321 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11322 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11329 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11330 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11332 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11334 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11335 && test -z "${cf_tst_cflags}" \
11336 && cf_fix_cppflags=no
11341 if test -n "$cf_new_cflags" ; then
11343 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11344 CFLAGS="${CFLAGS}$cf_new_cflags"
11348 if test -n "$cf_new_cppflags" ; then
11350 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11351 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11355 if test -n "$cf_new_extra_cppflags" ; then
11357 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11358 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11362 cat >conftest.$ac_ext <<_ACEOF
11363 #line 11363 "configure"
11364 #include "confdefs.h"
11365 #include <sys/types.h>
11370 #ifdef _XOPEN_SOURCE
11371 #error expected _XOPEN_SOURCE to be undefined
11377 rm -f conftest.$ac_objext
11378 if { (eval echo "$as_me:11378: \"$ac_compile\"") >&5
11379 (eval $ac_compile) 2>&5
11381 echo "$as_me:11381: \$? = $ac_status" >&5
11382 (exit $ac_status); } &&
11383 { ac_try='test -s conftest.$ac_objext'
11384 { (eval echo "$as_me:11384: \"$ac_try\"") >&5
11385 (eval $ac_try) 2>&5
11387 echo "$as_me:11387: \$? = $ac_status" >&5
11388 (exit $ac_status); }; }; then
11389 cf_cv_gnu_source=no
11391 echo "$as_me: failed program was:" >&5
11392 cat conftest.$ac_ext >&5
11393 cf_cv_gnu_source=yes
11395 rm -f conftest.$ac_objext conftest.$ac_ext
11396 CPPFLAGS="$cf_save"
11399 rm -f conftest.$ac_objext conftest.$ac_ext
11402 echo "$as_me:11402: result: $cf_cv_gnu_source" >&5
11403 echo "${ECHO_T}$cf_cv_gnu_source" >&6
11405 if test "$cf_cv_gnu_source" = yes
11407 echo "$as_me:11407: checking if we should also define _DEFAULT_SOURCE" >&5
11408 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
11409 if test "${cf_cv_default_source+set}" = set; then
11410 echo $ECHO_N "(cached) $ECHO_C" >&6
11413 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11414 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
11416 cat >conftest.$ac_ext <<_ACEOF
11417 #line 11417 "configure"
11418 #include "confdefs.h"
11419 #include <sys/types.h>
11424 #ifdef _DEFAULT_SOURCE
11425 #error expected _DEFAULT_SOURCE to be undefined
11431 rm -f conftest.$ac_objext
11432 if { (eval echo "$as_me:11432: \"$ac_compile\"") >&5
11433 (eval $ac_compile) 2>&5
11435 echo "$as_me:11435: \$? = $ac_status" >&5
11436 (exit $ac_status); } &&
11437 { ac_try='test -s conftest.$ac_objext'
11438 { (eval echo "$as_me:11438: \"$ac_try\"") >&5
11439 (eval $ac_try) 2>&5
11441 echo "$as_me:11441: \$? = $ac_status" >&5
11442 (exit $ac_status); }; }; then
11443 cf_cv_default_source=no
11445 echo "$as_me: failed program was:" >&5
11446 cat conftest.$ac_ext >&5
11447 cf_cv_default_source=yes
11449 rm -f conftest.$ac_objext conftest.$ac_ext
11452 echo "$as_me:11452: result: $cf_cv_default_source" >&5
11453 echo "${ECHO_T}$cf_cv_default_source" >&6
11454 if test "$cf_cv_default_source" = yes
11457 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11458 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
11468 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
11471 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
11474 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11476 cf_save_CFLAGS="$CFLAGS"
11477 cf_save_CPPFLAGS="$CPPFLAGS"
11479 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11480 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11481 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
11483 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11484 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11485 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
11487 echo "$as_me:11487: checking if we should define _POSIX_C_SOURCE" >&5
11488 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11489 if test "${cf_cv_posix_c_source+set}" = set; then
11490 echo $ECHO_N "(cached) $ECHO_C" >&6
11493 echo "${as_me:-configure}:11493: testing if the symbol is already defined go no further ..." 1>&5
11495 cat >conftest.$ac_ext <<_ACEOF
11496 #line 11496 "configure"
11497 #include "confdefs.h"
11498 #include <sys/types.h>
11503 #ifndef _POSIX_C_SOURCE
11510 rm -f conftest.$ac_objext
11511 if { (eval echo "$as_me:11511: \"$ac_compile\"") >&5
11512 (eval $ac_compile) 2>&5
11514 echo "$as_me:11514: \$? = $ac_status" >&5
11515 (exit $ac_status); } &&
11516 { ac_try='test -s conftest.$ac_objext'
11517 { (eval echo "$as_me:11517: \"$ac_try\"") >&5
11518 (eval $ac_try) 2>&5
11520 echo "$as_me:11520: \$? = $ac_status" >&5
11521 (exit $ac_status); }; }; then
11522 cf_cv_posix_c_source=no
11524 echo "$as_me: failed program was:" >&5
11525 cat conftest.$ac_ext >&5
11526 cf_want_posix_source=no
11527 case .$cf_POSIX_C_SOURCE in
11529 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11532 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11533 cf_want_posix_source=yes
11536 cf_want_posix_source=yes
11539 if test "$cf_want_posix_source" = yes ; then
11540 cat >conftest.$ac_ext <<_ACEOF
11541 #line 11541 "configure"
11542 #include "confdefs.h"
11543 #include <sys/types.h>
11548 #ifdef _POSIX_SOURCE
11555 rm -f conftest.$ac_objext
11556 if { (eval echo "$as_me:11556: \"$ac_compile\"") >&5
11557 (eval $ac_compile) 2>&5
11559 echo "$as_me:11559: \$? = $ac_status" >&5
11560 (exit $ac_status); } &&
11561 { ac_try='test -s conftest.$ac_objext'
11562 { (eval echo "$as_me:11562: \"$ac_try\"") >&5
11563 (eval $ac_try) 2>&5
11565 echo "$as_me:11565: \$? = $ac_status" >&5
11566 (exit $ac_status); }; }; then
11569 echo "$as_me: failed program was:" >&5
11570 cat conftest.$ac_ext >&5
11571 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11573 rm -f conftest.$ac_objext conftest.$ac_ext
11576 echo "${as_me:-configure}:11576: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11578 CFLAGS="$cf_trim_CFLAGS"
11579 CPPFLAGS="$cf_trim_CPPFLAGS"
11581 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11582 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11584 echo "${as_me:-configure}:11584: testing if the second compile does not leave our definition intact error ..." 1>&5
11586 cat >conftest.$ac_ext <<_ACEOF
11587 #line 11587 "configure"
11588 #include "confdefs.h"
11589 #include <sys/types.h>
11594 #ifndef _POSIX_C_SOURCE
11601 rm -f conftest.$ac_objext
11602 if { (eval echo "$as_me:11602: \"$ac_compile\"") >&5
11603 (eval $ac_compile) 2>&5
11605 echo "$as_me:11605: \$? = $ac_status" >&5
11606 (exit $ac_status); } &&
11607 { ac_try='test -s conftest.$ac_objext'
11608 { (eval echo "$as_me:11608: \"$ac_try\"") >&5
11609 (eval $ac_try) 2>&5
11611 echo "$as_me:11611: \$? = $ac_status" >&5
11612 (exit $ac_status); }; }; then
11615 echo "$as_me: failed program was:" >&5
11616 cat conftest.$ac_ext >&5
11617 cf_cv_posix_c_source=no
11619 rm -f conftest.$ac_objext conftest.$ac_ext
11620 CFLAGS="$cf_save_CFLAGS"
11621 CPPFLAGS="$cf_save_CPPFLAGS"
11624 rm -f conftest.$ac_objext conftest.$ac_ext
11627 echo "$as_me:11627: result: $cf_cv_posix_c_source" >&5
11628 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11630 if test "$cf_cv_posix_c_source" != no ; then
11631 CFLAGS="$cf_trim_CFLAGS"
11632 CPPFLAGS="$cf_trim_CPPFLAGS"
11637 cf_new_extra_cppflags=
11639 for cf_add_cflags in $cf_cv_posix_c_source
11641 case $cf_fix_cppflags in
11643 case $cf_add_cflags in
11644 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11645 case $cf_add_cflags in
11647 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11649 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11650 && test -z "${cf_tst_cflags}" \
11651 && cf_fix_cppflags=yes
11653 if test $cf_fix_cppflags = yes ; then
11655 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11656 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11659 elif test "${cf_tst_cflags}" = "\"'" ; then
11661 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11662 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11668 case "$CPPFLAGS" in
11672 case $cf_add_cflags in
11674 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11676 CPPFLAGS=`echo "$CPPFLAGS" | \
11677 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11678 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11683 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11684 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11691 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11692 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11699 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11700 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11702 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11704 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11705 && test -z "${cf_tst_cflags}" \
11706 && cf_fix_cppflags=no
11711 if test -n "$cf_new_cflags" ; then
11713 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11714 CFLAGS="${CFLAGS}$cf_new_cflags"
11718 if test -n "$cf_new_cppflags" ; then
11720 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11721 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11725 if test -n "$cf_new_extra_cppflags" ; then
11727 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11728 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11736 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
11739 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
11740 cf_xopen_source="-D_BSD_SOURCE"
11741 cf_XOPEN_SOURCE=600
11744 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
11747 cf_xopen_source="-D_OSF_SOURCE"
11750 cf_xopen_source="-D_QNX_SOURCE"
11753 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
11756 cf_xopen_source="-D__EXTENSIONS__"
11757 cf_cv_xopen_source=broken
11759 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
11765 echo "$as_me:11765: checking if we should define _XOPEN_SOURCE" >&5
11766 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11767 if test "${cf_cv_xopen_source+set}" = set; then
11768 echo $ECHO_N "(cached) $ECHO_C" >&6
11771 cat >conftest.$ac_ext <<_ACEOF
11772 #line 11772 "configure"
11773 #include "confdefs.h"
11775 #include <stdlib.h>
11776 #include <string.h>
11777 #include <sys/types.h>
11783 #ifndef _XOPEN_SOURCE
11790 rm -f conftest.$ac_objext
11791 if { (eval echo "$as_me:11791: \"$ac_compile\"") >&5
11792 (eval $ac_compile) 2>&5
11794 echo "$as_me:11794: \$? = $ac_status" >&5
11795 (exit $ac_status); } &&
11796 { ac_try='test -s conftest.$ac_objext'
11797 { (eval echo "$as_me:11797: \"$ac_try\"") >&5
11798 (eval $ac_try) 2>&5
11800 echo "$as_me:11800: \$? = $ac_status" >&5
11801 (exit $ac_status); }; }; then
11802 cf_cv_xopen_source=no
11804 echo "$as_me: failed program was:" >&5
11805 cat conftest.$ac_ext >&5
11806 cf_save="$CPPFLAGS"
11808 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11809 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11811 cat >conftest.$ac_ext <<_ACEOF
11812 #line 11812 "configure"
11813 #include "confdefs.h"
11815 #include <stdlib.h>
11816 #include <string.h>
11817 #include <sys/types.h>
11823 #ifdef _XOPEN_SOURCE
11830 rm -f conftest.$ac_objext
11831 if { (eval echo "$as_me:11831: \"$ac_compile\"") >&5
11832 (eval $ac_compile) 2>&5
11834 echo "$as_me:11834: \$? = $ac_status" >&5
11835 (exit $ac_status); } &&
11836 { ac_try='test -s conftest.$ac_objext'
11837 { (eval echo "$as_me:11837: \"$ac_try\"") >&5
11838 (eval $ac_try) 2>&5
11840 echo "$as_me:11840: \$? = $ac_status" >&5
11841 (exit $ac_status); }; }; then
11842 cf_cv_xopen_source=no
11844 echo "$as_me: failed program was:" >&5
11845 cat conftest.$ac_ext >&5
11846 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11848 rm -f conftest.$ac_objext conftest.$ac_ext
11849 CPPFLAGS="$cf_save"
11852 rm -f conftest.$ac_objext conftest.$ac_ext
11855 echo "$as_me:11855: result: $cf_cv_xopen_source" >&5
11856 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11858 if test "$cf_cv_xopen_source" != no ; then
11860 CFLAGS=`echo "$CFLAGS" | \
11861 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11862 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
11864 CPPFLAGS=`echo "$CPPFLAGS" | \
11865 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11866 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
11868 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11873 cf_new_extra_cppflags=
11875 for cf_add_cflags in $cf_temp_xopen_source
11877 case $cf_fix_cppflags in
11879 case $cf_add_cflags in
11880 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11881 case $cf_add_cflags in
11883 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11885 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11886 && test -z "${cf_tst_cflags}" \
11887 && cf_fix_cppflags=yes
11889 if test $cf_fix_cppflags = yes ; then
11891 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11892 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11895 elif test "${cf_tst_cflags}" = "\"'" ; then
11897 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11898 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11904 case "$CPPFLAGS" in
11908 case $cf_add_cflags in
11910 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11912 CPPFLAGS=`echo "$CPPFLAGS" | \
11913 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11914 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11919 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11920 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11927 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11928 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11935 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11936 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11938 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11940 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11941 && test -z "${cf_tst_cflags}" \
11942 && cf_fix_cppflags=no
11947 if test -n "$cf_new_cflags" ; then
11949 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11950 CFLAGS="${CFLAGS}$cf_new_cflags"
11954 if test -n "$cf_new_cppflags" ; then
11956 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11957 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11961 if test -n "$cf_new_extra_cppflags" ; then
11963 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11964 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11970 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11972 cf_save_CFLAGS="$CFLAGS"
11973 cf_save_CPPFLAGS="$CPPFLAGS"
11975 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11976 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11977 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
11979 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11980 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11981 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
11983 echo "$as_me:11983: checking if we should define _POSIX_C_SOURCE" >&5
11984 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11985 if test "${cf_cv_posix_c_source+set}" = set; then
11986 echo $ECHO_N "(cached) $ECHO_C" >&6
11989 echo "${as_me:-configure}:11989: testing if the symbol is already defined go no further ..." 1>&5
11991 cat >conftest.$ac_ext <<_ACEOF
11992 #line 11992 "configure"
11993 #include "confdefs.h"
11994 #include <sys/types.h>
11999 #ifndef _POSIX_C_SOURCE
12006 rm -f conftest.$ac_objext
12007 if { (eval echo "$as_me:12007: \"$ac_compile\"") >&5
12008 (eval $ac_compile) 2>&5
12010 echo "$as_me:12010: \$? = $ac_status" >&5
12011 (exit $ac_status); } &&
12012 { ac_try='test -s conftest.$ac_objext'
12013 { (eval echo "$as_me:12013: \"$ac_try\"") >&5
12014 (eval $ac_try) 2>&5
12016 echo "$as_me:12016: \$? = $ac_status" >&5
12017 (exit $ac_status); }; }; then
12018 cf_cv_posix_c_source=no
12020 echo "$as_me: failed program was:" >&5
12021 cat conftest.$ac_ext >&5
12022 cf_want_posix_source=no
12023 case .$cf_POSIX_C_SOURCE in
12025 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12028 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12029 cf_want_posix_source=yes
12032 cf_want_posix_source=yes
12035 if test "$cf_want_posix_source" = yes ; then
12036 cat >conftest.$ac_ext <<_ACEOF
12037 #line 12037 "configure"
12038 #include "confdefs.h"
12039 #include <sys/types.h>
12044 #ifdef _POSIX_SOURCE
12051 rm -f conftest.$ac_objext
12052 if { (eval echo "$as_me:12052: \"$ac_compile\"") >&5
12053 (eval $ac_compile) 2>&5
12055 echo "$as_me:12055: \$? = $ac_status" >&5
12056 (exit $ac_status); } &&
12057 { ac_try='test -s conftest.$ac_objext'
12058 { (eval echo "$as_me:12058: \"$ac_try\"") >&5
12059 (eval $ac_try) 2>&5
12061 echo "$as_me:12061: \$? = $ac_status" >&5
12062 (exit $ac_status); }; }; then
12065 echo "$as_me: failed program was:" >&5
12066 cat conftest.$ac_ext >&5
12067 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
12069 rm -f conftest.$ac_objext conftest.$ac_ext
12072 echo "${as_me:-configure}:12072: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
12074 CFLAGS="$cf_trim_CFLAGS"
12075 CPPFLAGS="$cf_trim_CPPFLAGS"
12077 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12078 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
12080 echo "${as_me:-configure}:12080: testing if the second compile does not leave our definition intact error ..." 1>&5
12082 cat >conftest.$ac_ext <<_ACEOF
12083 #line 12083 "configure"
12084 #include "confdefs.h"
12085 #include <sys/types.h>
12090 #ifndef _POSIX_C_SOURCE
12097 rm -f conftest.$ac_objext
12098 if { (eval echo "$as_me:12098: \"$ac_compile\"") >&5
12099 (eval $ac_compile) 2>&5
12101 echo "$as_me:12101: \$? = $ac_status" >&5
12102 (exit $ac_status); } &&
12103 { ac_try='test -s conftest.$ac_objext'
12104 { (eval echo "$as_me:12104: \"$ac_try\"") >&5
12105 (eval $ac_try) 2>&5
12107 echo "$as_me:12107: \$? = $ac_status" >&5
12108 (exit $ac_status); }; }; then
12111 echo "$as_me: failed program was:" >&5
12112 cat conftest.$ac_ext >&5
12113 cf_cv_posix_c_source=no
12115 rm -f conftest.$ac_objext conftest.$ac_ext
12116 CFLAGS="$cf_save_CFLAGS"
12117 CPPFLAGS="$cf_save_CPPFLAGS"
12120 rm -f conftest.$ac_objext conftest.$ac_ext
12123 echo "$as_me:12123: result: $cf_cv_posix_c_source" >&5
12124 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
12126 if test "$cf_cv_posix_c_source" != no ; then
12127 CFLAGS="$cf_trim_CFLAGS"
12128 CPPFLAGS="$cf_trim_CPPFLAGS"
12133 cf_new_extra_cppflags=
12135 for cf_add_cflags in $cf_cv_posix_c_source
12137 case $cf_fix_cppflags in
12139 case $cf_add_cflags in
12140 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12141 case $cf_add_cflags in
12143 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12145 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12146 && test -z "${cf_tst_cflags}" \
12147 && cf_fix_cppflags=yes
12149 if test $cf_fix_cppflags = yes ; then
12151 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12152 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12155 elif test "${cf_tst_cflags}" = "\"'" ; then
12157 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12158 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12164 case "$CPPFLAGS" in
12168 case $cf_add_cflags in
12170 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12172 CPPFLAGS=`echo "$CPPFLAGS" | \
12173 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12174 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12179 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12180 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12187 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12188 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12195 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12196 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12198 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12200 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12201 && test -z "${cf_tst_cflags}" \
12202 && cf_fix_cppflags=no
12207 if test -n "$cf_new_cflags" ; then
12209 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12210 CFLAGS="${CFLAGS}$cf_new_cflags"
12214 if test -n "$cf_new_cppflags" ; then
12216 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12217 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12221 if test -n "$cf_new_extra_cppflags" ; then
12223 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12224 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12233 if test -n "$cf_xopen_source" ; then
12238 cf_new_extra_cppflags=
12240 for cf_add_cflags in $cf_xopen_source
12242 case $cf_fix_cppflags in
12244 case $cf_add_cflags in
12245 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12246 case $cf_add_cflags in
12248 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12250 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12251 && test -z "${cf_tst_cflags}" \
12252 && cf_fix_cppflags=yes
12254 if test $cf_fix_cppflags = yes ; then
12256 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12257 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12260 elif test "${cf_tst_cflags}" = "\"'" ; then
12262 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12263 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12269 case "$CPPFLAGS" in
12273 case $cf_add_cflags in
12275 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12277 CPPFLAGS=`echo "$CPPFLAGS" | \
12278 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12279 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12284 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12285 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12292 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12293 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12300 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12301 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12303 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12305 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12306 && test -z "${cf_tst_cflags}" \
12307 && cf_fix_cppflags=no
12312 if test -n "$cf_new_cflags" ; then
12313 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12315 echo "${as_me:-configure}:12315: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12317 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12318 CFLAGS="${CFLAGS}$cf_new_cflags"
12322 if test -n "$cf_new_cppflags" ; then
12323 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12325 echo "${as_me:-configure}:12325: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12327 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12328 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12332 if test -n "$cf_new_extra_cppflags" ; then
12333 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12335 echo "${as_me:-configure}:12335: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12337 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12338 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12344 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
12345 echo "$as_me:12345: checking if _XOPEN_SOURCE really is set" >&5
12346 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
12347 cat >conftest.$ac_ext <<_ACEOF
12348 #line 12348 "configure"
12349 #include "confdefs.h"
12350 #include <stdlib.h>
12355 #ifndef _XOPEN_SOURCE
12362 rm -f conftest.$ac_objext
12363 if { (eval echo "$as_me:12363: \"$ac_compile\"") >&5
12364 (eval $ac_compile) 2>&5
12366 echo "$as_me:12366: \$? = $ac_status" >&5
12367 (exit $ac_status); } &&
12368 { ac_try='test -s conftest.$ac_objext'
12369 { (eval echo "$as_me:12369: \"$ac_try\"") >&5
12370 (eval $ac_try) 2>&5
12372 echo "$as_me:12372: \$? = $ac_status" >&5
12373 (exit $ac_status); }; }; then
12374 cf_XOPEN_SOURCE_set=yes
12376 echo "$as_me: failed program was:" >&5
12377 cat conftest.$ac_ext >&5
12378 cf_XOPEN_SOURCE_set=no
12380 rm -f conftest.$ac_objext conftest.$ac_ext
12381 echo "$as_me:12381: result: $cf_XOPEN_SOURCE_set" >&5
12382 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
12383 if test $cf_XOPEN_SOURCE_set = yes
12385 cat >conftest.$ac_ext <<_ACEOF
12386 #line 12386 "configure"
12387 #include "confdefs.h"
12388 #include <stdlib.h>
12393 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
12400 rm -f conftest.$ac_objext
12401 if { (eval echo "$as_me:12401: \"$ac_compile\"") >&5
12402 (eval $ac_compile) 2>&5
12404 echo "$as_me:12404: \$? = $ac_status" >&5
12405 (exit $ac_status); } &&
12406 { ac_try='test -s conftest.$ac_objext'
12407 { (eval echo "$as_me:12407: \"$ac_try\"") >&5
12408 (eval $ac_try) 2>&5
12410 echo "$as_me:12410: \$? = $ac_status" >&5
12411 (exit $ac_status); }; }; then
12412 cf_XOPEN_SOURCE_set_ok=yes
12414 echo "$as_me: failed program was:" >&5
12415 cat conftest.$ac_ext >&5
12416 cf_XOPEN_SOURCE_set_ok=no
12418 rm -f conftest.$ac_objext conftest.$ac_ext
12419 if test $cf_XOPEN_SOURCE_set_ok = no
12421 { echo "$as_me:12421: WARNING: _XOPEN_SOURCE is lower than requested" >&5
12422 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
12426 echo "$as_me:12426: checking if we should define _XOPEN_SOURCE" >&5
12427 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12428 if test "${cf_cv_xopen_source+set}" = set; then
12429 echo $ECHO_N "(cached) $ECHO_C" >&6
12432 cat >conftest.$ac_ext <<_ACEOF
12433 #line 12433 "configure"
12434 #include "confdefs.h"
12436 #include <stdlib.h>
12437 #include <string.h>
12438 #include <sys/types.h>
12444 #ifndef _XOPEN_SOURCE
12451 rm -f conftest.$ac_objext
12452 if { (eval echo "$as_me:12452: \"$ac_compile\"") >&5
12453 (eval $ac_compile) 2>&5
12455 echo "$as_me:12455: \$? = $ac_status" >&5
12456 (exit $ac_status); } &&
12457 { ac_try='test -s conftest.$ac_objext'
12458 { (eval echo "$as_me:12458: \"$ac_try\"") >&5
12459 (eval $ac_try) 2>&5
12461 echo "$as_me:12461: \$? = $ac_status" >&5
12462 (exit $ac_status); }; }; then
12463 cf_cv_xopen_source=no
12465 echo "$as_me: failed program was:" >&5
12466 cat conftest.$ac_ext >&5
12467 cf_save="$CPPFLAGS"
12469 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12470 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12472 cat >conftest.$ac_ext <<_ACEOF
12473 #line 12473 "configure"
12474 #include "confdefs.h"
12476 #include <stdlib.h>
12477 #include <string.h>
12478 #include <sys/types.h>
12484 #ifdef _XOPEN_SOURCE
12491 rm -f conftest.$ac_objext
12492 if { (eval echo "$as_me:12492: \"$ac_compile\"") >&5
12493 (eval $ac_compile) 2>&5
12495 echo "$as_me:12495: \$? = $ac_status" >&5
12496 (exit $ac_status); } &&
12497 { ac_try='test -s conftest.$ac_objext'
12498 { (eval echo "$as_me:12498: \"$ac_try\"") >&5
12499 (eval $ac_try) 2>&5
12501 echo "$as_me:12501: \$? = $ac_status" >&5
12502 (exit $ac_status); }; }; then
12503 cf_cv_xopen_source=no
12505 echo "$as_me: failed program was:" >&5
12506 cat conftest.$ac_ext >&5
12507 cf_cv_xopen_source=$cf_XOPEN_SOURCE
12509 rm -f conftest.$ac_objext conftest.$ac_ext
12510 CPPFLAGS="$cf_save"
12513 rm -f conftest.$ac_objext conftest.$ac_ext
12516 echo "$as_me:12516: result: $cf_cv_xopen_source" >&5
12517 echo "${ECHO_T}$cf_cv_xopen_source" >&6
12519 if test "$cf_cv_xopen_source" != no ; then
12521 CFLAGS=`echo "$CFLAGS" | \
12522 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12523 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
12525 CPPFLAGS=`echo "$CPPFLAGS" | \
12526 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12527 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
12529 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12534 cf_new_extra_cppflags=
12536 for cf_add_cflags in $cf_temp_xopen_source
12538 case $cf_fix_cppflags in
12540 case $cf_add_cflags in
12541 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12542 case $cf_add_cflags in
12544 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12546 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12547 && test -z "${cf_tst_cflags}" \
12548 && cf_fix_cppflags=yes
12550 if test $cf_fix_cppflags = yes ; then
12552 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12553 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12556 elif test "${cf_tst_cflags}" = "\"'" ; then
12558 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12559 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12565 case "$CPPFLAGS" in
12569 case $cf_add_cflags in
12571 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12573 CPPFLAGS=`echo "$CPPFLAGS" | \
12574 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12575 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12580 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12581 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12588 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12589 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12596 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12597 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12599 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12601 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12602 && test -z "${cf_tst_cflags}" \
12603 && cf_fix_cppflags=no
12608 if test -n "$cf_new_cflags" ; then
12610 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12611 CFLAGS="${CFLAGS}$cf_new_cflags"
12615 if test -n "$cf_new_cppflags" ; then
12617 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12618 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12622 if test -n "$cf_new_extra_cppflags" ; then
12624 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12625 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12634 # Check whether --enable-largefile or --disable-largefile was given.
12635 if test "${enable_largefile+set}" = set; then
12636 enableval="$enable_largefile"
12639 if test "$enable_largefile" != no; then
12641 echo "$as_me:12641: checking for special C compiler options needed for large files" >&5
12642 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12643 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12644 echo $ECHO_N "(cached) $ECHO_C" >&6
12646 ac_cv_sys_largefile_CC=no
12647 if test "$GCC" != yes; then
12650 # IRIX 6.2 and later do not support large files by default,
12651 # so use the C compiler's -n32 option if that helps.
12652 cat >conftest.$ac_ext <<_ACEOF
12653 #line 12653 "configure"
12654 #include "confdefs.h"
12655 #include <sys/types.h>
12656 /* Check that off_t can represent 2**63 - 1 correctly.
12657 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12658 since some C++ compilers masquerading as C compilers
12659 incorrectly reject 9223372036854775807. */
12660 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12661 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12662 && LARGE_OFF_T % 2147483647 == 1)
12672 rm -f conftest.$ac_objext
12673 if { (eval echo "$as_me:12673: \"$ac_compile\"") >&5
12674 (eval $ac_compile) 2>&5
12676 echo "$as_me:12676: \$? = $ac_status" >&5
12677 (exit $ac_status); } &&
12678 { ac_try='test -s conftest.$ac_objext'
12679 { (eval echo "$as_me:12679: \"$ac_try\"") >&5
12680 (eval $ac_try) 2>&5
12682 echo "$as_me:12682: \$? = $ac_status" >&5
12683 (exit $ac_status); }; }; then
12686 echo "$as_me: failed program was:" >&5
12687 cat conftest.$ac_ext >&5
12689 rm -f conftest.$ac_objext
12691 rm -f conftest.$ac_objext
12692 if { (eval echo "$as_me:12692: \"$ac_compile\"") >&5
12693 (eval $ac_compile) 2>&5
12695 echo "$as_me:12695: \$? = $ac_status" >&5
12696 (exit $ac_status); } &&
12697 { ac_try='test -s conftest.$ac_objext'
12698 { (eval echo "$as_me:12698: \"$ac_try\"") >&5
12699 (eval $ac_try) 2>&5
12701 echo "$as_me:12701: \$? = $ac_status" >&5
12702 (exit $ac_status); }; }; then
12703 ac_cv_sys_largefile_CC=' -n32'; break
12705 echo "$as_me: failed program was:" >&5
12706 cat conftest.$ac_ext >&5
12708 rm -f conftest.$ac_objext
12712 rm -f conftest.$ac_ext
12715 echo "$as_me:12715: result: $ac_cv_sys_largefile_CC" >&5
12716 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12717 if test "$ac_cv_sys_largefile_CC" != no; then
12718 CC=$CC$ac_cv_sys_largefile_CC
12721 echo "$as_me:12721: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12722 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12723 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12724 echo $ECHO_N "(cached) $ECHO_C" >&6
12727 ac_cv_sys_file_offset_bits=no
12728 cat >conftest.$ac_ext <<_ACEOF
12729 #line 12729 "configure"
12730 #include "confdefs.h"
12731 #include <sys/types.h>
12732 /* Check that off_t can represent 2**63 - 1 correctly.
12733 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12734 since some C++ compilers masquerading as C compilers
12735 incorrectly reject 9223372036854775807. */
12736 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12737 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12738 && LARGE_OFF_T % 2147483647 == 1)
12748 rm -f conftest.$ac_objext
12749 if { (eval echo "$as_me:12749: \"$ac_compile\"") >&5
12750 (eval $ac_compile) 2>&5
12752 echo "$as_me:12752: \$? = $ac_status" >&5
12753 (exit $ac_status); } &&
12754 { ac_try='test -s conftest.$ac_objext'
12755 { (eval echo "$as_me:12755: \"$ac_try\"") >&5
12756 (eval $ac_try) 2>&5
12758 echo "$as_me:12758: \$? = $ac_status" >&5
12759 (exit $ac_status); }; }; then
12762 echo "$as_me: failed program was:" >&5
12763 cat conftest.$ac_ext >&5
12765 rm -f conftest.$ac_objext conftest.$ac_ext
12766 cat >conftest.$ac_ext <<_ACEOF
12767 #line 12767 "configure"
12768 #include "confdefs.h"
12769 #define _FILE_OFFSET_BITS 64
12770 #include <sys/types.h>
12771 /* Check that off_t can represent 2**63 - 1 correctly.
12772 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12773 since some C++ compilers masquerading as C compilers
12774 incorrectly reject 9223372036854775807. */
12775 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12776 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12777 && LARGE_OFF_T % 2147483647 == 1)
12787 rm -f conftest.$ac_objext
12788 if { (eval echo "$as_me:12788: \"$ac_compile\"") >&5
12789 (eval $ac_compile) 2>&5
12791 echo "$as_me:12791: \$? = $ac_status" >&5
12792 (exit $ac_status); } &&
12793 { ac_try='test -s conftest.$ac_objext'
12794 { (eval echo "$as_me:12794: \"$ac_try\"") >&5
12795 (eval $ac_try) 2>&5
12797 echo "$as_me:12797: \$? = $ac_status" >&5
12798 (exit $ac_status); }; }; then
12799 ac_cv_sys_file_offset_bits=64; break
12801 echo "$as_me: failed program was:" >&5
12802 cat conftest.$ac_ext >&5
12804 rm -f conftest.$ac_objext conftest.$ac_ext
12808 echo "$as_me:12808: result: $ac_cv_sys_file_offset_bits" >&5
12809 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12810 if test "$ac_cv_sys_file_offset_bits" != no; then
12812 cat >>confdefs.h <<EOF
12813 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12818 echo "$as_me:12818: checking for _LARGE_FILES value needed for large files" >&5
12819 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12820 if test "${ac_cv_sys_large_files+set}" = set; then
12821 echo $ECHO_N "(cached) $ECHO_C" >&6
12824 ac_cv_sys_large_files=no
12825 cat >conftest.$ac_ext <<_ACEOF
12826 #line 12826 "configure"
12827 #include "confdefs.h"
12828 #include <sys/types.h>
12829 /* Check that off_t can represent 2**63 - 1 correctly.
12830 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12831 since some C++ compilers masquerading as C compilers
12832 incorrectly reject 9223372036854775807. */
12833 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12834 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12835 && LARGE_OFF_T % 2147483647 == 1)
12845 rm -f conftest.$ac_objext
12846 if { (eval echo "$as_me:12846: \"$ac_compile\"") >&5
12847 (eval $ac_compile) 2>&5
12849 echo "$as_me:12849: \$? = $ac_status" >&5
12850 (exit $ac_status); } &&
12851 { ac_try='test -s conftest.$ac_objext'
12852 { (eval echo "$as_me:12852: \"$ac_try\"") >&5
12853 (eval $ac_try) 2>&5
12855 echo "$as_me:12855: \$? = $ac_status" >&5
12856 (exit $ac_status); }; }; then
12859 echo "$as_me: failed program was:" >&5
12860 cat conftest.$ac_ext >&5
12862 rm -f conftest.$ac_objext conftest.$ac_ext
12863 cat >conftest.$ac_ext <<_ACEOF
12864 #line 12864 "configure"
12865 #include "confdefs.h"
12866 #define _LARGE_FILES 1
12867 #include <sys/types.h>
12868 /* Check that off_t can represent 2**63 - 1 correctly.
12869 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12870 since some C++ compilers masquerading as C compilers
12871 incorrectly reject 9223372036854775807. */
12872 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12873 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12874 && LARGE_OFF_T % 2147483647 == 1)
12884 rm -f conftest.$ac_objext
12885 if { (eval echo "$as_me:12885: \"$ac_compile\"") >&5
12886 (eval $ac_compile) 2>&5
12888 echo "$as_me:12888: \$? = $ac_status" >&5
12889 (exit $ac_status); } &&
12890 { ac_try='test -s conftest.$ac_objext'
12891 { (eval echo "$as_me:12891: \"$ac_try\"") >&5
12892 (eval $ac_try) 2>&5
12894 echo "$as_me:12894: \$? = $ac_status" >&5
12895 (exit $ac_status); }; }; then
12896 ac_cv_sys_large_files=1; break
12898 echo "$as_me: failed program was:" >&5
12899 cat conftest.$ac_ext >&5
12901 rm -f conftest.$ac_objext conftest.$ac_ext
12905 echo "$as_me:12905: result: $ac_cv_sys_large_files" >&5
12906 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
12907 if test "$ac_cv_sys_large_files" != no; then
12909 cat >>confdefs.h <<EOF
12910 #define _LARGE_FILES $ac_cv_sys_large_files
12917 if test "$enable_largefile" != no ; then
12918 echo "$as_me:12918: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12919 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12920 if test "${ac_cv_sys_largefile_source+set}" = set; then
12921 echo $ECHO_N "(cached) $ECHO_C" >&6
12924 ac_cv_sys_largefile_source=no
12925 cat >conftest.$ac_ext <<_ACEOF
12926 #line 12926 "configure"
12927 #include "confdefs.h"
12937 rm -f conftest.$ac_objext
12938 if { (eval echo "$as_me:12938: \"$ac_compile\"") >&5
12939 (eval $ac_compile) 2>&5
12941 echo "$as_me:12941: \$? = $ac_status" >&5
12942 (exit $ac_status); } &&
12943 { ac_try='test -s conftest.$ac_objext'
12944 { (eval echo "$as_me:12944: \"$ac_try\"") >&5
12945 (eval $ac_try) 2>&5
12947 echo "$as_me:12947: \$? = $ac_status" >&5
12948 (exit $ac_status); }; }; then
12951 echo "$as_me: failed program was:" >&5
12952 cat conftest.$ac_ext >&5
12954 rm -f conftest.$ac_objext conftest.$ac_ext
12955 cat >conftest.$ac_ext <<_ACEOF
12956 #line 12956 "configure"
12957 #include "confdefs.h"
12958 #define _LARGEFILE_SOURCE 1
12968 rm -f conftest.$ac_objext
12969 if { (eval echo "$as_me:12969: \"$ac_compile\"") >&5
12970 (eval $ac_compile) 2>&5
12972 echo "$as_me:12972: \$? = $ac_status" >&5
12973 (exit $ac_status); } &&
12974 { ac_try='test -s conftest.$ac_objext'
12975 { (eval echo "$as_me:12975: \"$ac_try\"") >&5
12976 (eval $ac_try) 2>&5
12978 echo "$as_me:12978: \$? = $ac_status" >&5
12979 (exit $ac_status); }; }; then
12980 ac_cv_sys_largefile_source=1; break
12982 echo "$as_me: failed program was:" >&5
12983 cat conftest.$ac_ext >&5
12985 rm -f conftest.$ac_objext conftest.$ac_ext
12989 echo "$as_me:12989: result: $ac_cv_sys_largefile_source" >&5
12990 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
12991 if test "$ac_cv_sys_largefile_source" != no; then
12993 cat >>confdefs.h <<EOF
12994 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13000 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13001 # in glibc 2.1.3, but that breaks too many other things.
13002 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13003 echo "$as_me:13003: checking for fseeko" >&5
13004 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13005 if test "${ac_cv_func_fseeko+set}" = set; then
13006 echo $ECHO_N "(cached) $ECHO_C" >&6
13008 cat >conftest.$ac_ext <<_ACEOF
13009 #line 13009 "configure"
13010 #include "confdefs.h"
13015 return fseeko && fseeko (stdin, 0, 0);
13020 rm -f conftest.$ac_objext conftest$ac_exeext
13021 if { (eval echo "$as_me:13021: \"$ac_link\"") >&5
13022 (eval $ac_link) 2>&5
13024 echo "$as_me:13024: \$? = $ac_status" >&5
13025 (exit $ac_status); } &&
13026 { ac_try='test -s conftest$ac_exeext'
13027 { (eval echo "$as_me:13027: \"$ac_try\"") >&5
13028 (eval $ac_try) 2>&5
13030 echo "$as_me:13030: \$? = $ac_status" >&5
13031 (exit $ac_status); }; }; then
13032 ac_cv_func_fseeko=yes
13034 echo "$as_me: failed program was:" >&5
13035 cat conftest.$ac_ext >&5
13036 ac_cv_func_fseeko=no
13038 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13040 echo "$as_me:13040: result: $ac_cv_func_fseeko" >&5
13041 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13042 if test $ac_cv_func_fseeko = yes; then
13044 cat >>confdefs.h <<\EOF
13045 #define HAVE_FSEEKO 1
13050 # Normally we would collect these definitions in the config.h,
13051 # but (like _XOPEN_SOURCE), some environments rely on having these
13052 # defined before any of the system headers are included. Another
13053 # case comes up with C++, e.g., on AIX the compiler compiles the
13054 # header files by themselves before looking at the body files it is
13055 # told to compile. For ncurses, those header files do not include
13057 if test "$ac_cv_sys_large_files" != no
13060 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13061 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13064 if test "$ac_cv_sys_largefile_source" != no
13067 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13068 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13071 if test "$ac_cv_sys_file_offset_bits" != no
13074 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13075 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13079 echo "$as_me:13079: checking whether to use struct dirent64" >&5
13080 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13081 if test "${cf_cv_struct_dirent64+set}" = set; then
13082 echo $ECHO_N "(cached) $ECHO_C" >&6
13085 cat >conftest.$ac_ext <<_ACEOF
13086 #line 13086 "configure"
13087 #include "confdefs.h"
13089 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13090 #include <sys/types.h>
13091 #include <dirent.h>
13097 /* if transitional largefile support is setup, this is true */
13098 extern struct dirent64 * readdir(DIR *);
13099 struct dirent64 *x = readdir((DIR *)0);
13100 struct dirent *y = readdir((DIR *)0);
13107 rm -f conftest.$ac_objext
13108 if { (eval echo "$as_me:13108: \"$ac_compile\"") >&5
13109 (eval $ac_compile) 2>&5
13111 echo "$as_me:13111: \$? = $ac_status" >&5
13112 (exit $ac_status); } &&
13113 { ac_try='test -s conftest.$ac_objext'
13114 { (eval echo "$as_me:13114: \"$ac_try\"") >&5
13115 (eval $ac_try) 2>&5
13117 echo "$as_me:13117: \$? = $ac_status" >&5
13118 (exit $ac_status); }; }; then
13119 cf_cv_struct_dirent64=yes
13121 echo "$as_me: failed program was:" >&5
13122 cat conftest.$ac_ext >&5
13123 cf_cv_struct_dirent64=no
13125 rm -f conftest.$ac_objext conftest.$ac_ext
13128 echo "$as_me:13128: result: $cf_cv_struct_dirent64" >&5
13129 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13130 test "$cf_cv_struct_dirent64" = yes &&
13131 cat >>confdefs.h <<\EOF
13132 #define HAVE_STRUCT_DIRENT64 1
13137 ### Enable compiling-in rcs id's
13138 echo "$as_me:13138: checking if RCS identifiers should be compiled-in" >&5
13139 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13141 # Check whether --with-rcs-ids or --without-rcs-ids was given.
13142 if test "${with_rcs_ids+set}" = set; then
13143 withval="$with_rcs_ids"
13144 with_rcs_ids=$withval
13148 echo "$as_me:13148: result: $with_rcs_ids" >&5
13149 echo "${ECHO_T}$with_rcs_ids" >&6
13150 test "$with_rcs_ids" = yes &&
13151 cat >>confdefs.h <<\EOF
13152 #define USE_RCS_IDS 1
13155 ###############################################################################
13157 ### Note that some functions (such as const) are normally disabled anyway.
13158 echo "$as_me:13158: checking if you want to build with function extensions" >&5
13159 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
13161 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
13162 if test "${enable_ext_funcs+set}" = set; then
13163 enableval="$enable_ext_funcs"
13164 with_ext_funcs=$enableval
13168 echo "$as_me:13168: result: $with_ext_funcs" >&5
13169 echo "${ECHO_T}$with_ext_funcs" >&6
13170 if test "$with_ext_funcs" = yes ; then
13171 NCURSES_EXT_FUNCS=1
13173 cat >>confdefs.h <<\EOF
13174 #define HAVE_USE_DEFAULT_COLORS 1
13177 cat >>confdefs.h <<\EOF
13178 #define NCURSES_EXT_FUNCS 1
13182 NCURSES_EXT_FUNCS=0
13185 ### use option --enable-const to turn on use of const beyond that in XSI.
13186 echo "$as_me:13186: checking for extended use of const keyword" >&5
13187 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
13189 # Check whether --enable-const or --disable-const was given.
13190 if test "${enable_const+set}" = set; then
13191 enableval="$enable_const"
13192 with_ext_const=$enableval
13196 echo "$as_me:13196: result: $with_ext_const" >&5
13197 echo "${ECHO_T}$with_ext_const" >&6
13198 NCURSES_CONST='/*nothing*/'
13199 if test "$with_ext_const" = yes ; then
13200 NCURSES_CONST=const
13203 ###############################################################################
13204 # These options are relatively safe to experiment with.
13206 echo "$as_me:13206: checking if you want all development code" >&5
13207 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
13209 # Check whether --with-develop or --without-develop was given.
13210 if test "${with_develop+set}" = set; then
13211 withval="$with_develop"
13212 with_develop=$withval
13216 echo "$as_me:13216: result: $with_develop" >&5
13217 echo "${ECHO_T}$with_develop" >&6
13219 ###############################################################################
13220 # These are just experimental, probably should not be in a package:
13222 # This is still experimental (20080329), but should ultimately be moved to
13223 # the script-block --with-normal, etc.
13225 echo "$as_me:13225: checking if you want to link with the pthread library" >&5
13226 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
13228 # Check whether --with-pthread or --without-pthread was given.
13229 if test "${with_pthread+set}" = set; then
13230 withval="$with_pthread"
13231 with_pthread=$withval
13235 echo "$as_me:13235: result: $with_pthread" >&5
13236 echo "${ECHO_T}$with_pthread" >&6
13238 if test "$with_pthread" != no ; then
13239 echo "$as_me:13239: checking for pthread.h" >&5
13240 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
13241 if test "${ac_cv_header_pthread_h+set}" = set; then
13242 echo $ECHO_N "(cached) $ECHO_C" >&6
13244 cat >conftest.$ac_ext <<_ACEOF
13245 #line 13245 "configure"
13246 #include "confdefs.h"
13247 #include <pthread.h>
13249 if { (eval echo "$as_me:13249: \"$ac_cpp conftest.$ac_ext\"") >&5
13250 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13252 egrep -v '^ *\+' conftest.er1 >conftest.err
13254 cat conftest.err >&5
13255 echo "$as_me:13255: \$? = $ac_status" >&5
13256 (exit $ac_status); } >/dev/null; then
13257 if test -s conftest.err; then
13258 ac_cpp_err=$ac_c_preproc_warn_flag
13265 if test -z "$ac_cpp_err"; then
13266 ac_cv_header_pthread_h=yes
13268 echo "$as_me: failed program was:" >&5
13269 cat conftest.$ac_ext >&5
13270 ac_cv_header_pthread_h=no
13272 rm -f conftest.err conftest.$ac_ext
13274 echo "$as_me:13274: result: $ac_cv_header_pthread_h" >&5
13275 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
13276 if test $ac_cv_header_pthread_h = yes; then
13278 cat >>confdefs.h <<\EOF
13279 #define HAVE_PTHREADS_H 1
13282 for cf_lib_pthread in pthread c_r
13284 echo "$as_me:13284: checking if we can link with the $cf_lib_pthread library" >&5
13285 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
13286 cf_save_LIBS="$LIBS"
13288 cf_add_libs="-l$cf_lib_pthread"
13289 # Filter out duplicates - this happens with badly-designed ".pc" files...
13290 for cf_add_1lib in $LIBS
13292 for cf_add_2lib in $cf_add_libs
13294 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13300 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13302 LIBS="$cf_add_libs"
13304 cat >conftest.$ac_ext <<_ACEOF
13305 #line 13305 "configure"
13306 #include "confdefs.h"
13308 #include <pthread.h>
13314 int rc = pthread_create(0,0,0,0);
13315 int r2 = pthread_mutexattr_settype(0, 0);
13321 rm -f conftest.$ac_objext conftest$ac_exeext
13322 if { (eval echo "$as_me:13322: \"$ac_link\"") >&5
13323 (eval $ac_link) 2>&5
13325 echo "$as_me:13325: \$? = $ac_status" >&5
13326 (exit $ac_status); } &&
13327 { ac_try='test -s conftest$ac_exeext'
13328 { (eval echo "$as_me:13328: \"$ac_try\"") >&5
13329 (eval $ac_try) 2>&5
13331 echo "$as_me:13331: \$? = $ac_status" >&5
13332 (exit $ac_status); }; }; then
13335 echo "$as_me: failed program was:" >&5
13336 cat conftest.$ac_ext >&5
13339 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13340 LIBS="$cf_save_LIBS"
13341 echo "$as_me:13341: result: $with_pthread" >&5
13342 echo "${ECHO_T}$with_pthread" >&6
13343 test "$with_pthread" = yes && break
13346 if test "$with_pthread" = yes ; then
13348 cf_add_libs="-l$cf_lib_pthread"
13349 # Filter out duplicates - this happens with badly-designed ".pc" files...
13350 for cf_add_1lib in $LIBS
13352 for cf_add_2lib in $cf_add_libs
13354 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13360 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13362 LIBS="$cf_add_libs"
13364 cat >>confdefs.h <<\EOF
13365 #define HAVE_LIBPTHREADS 1
13369 { { echo "$as_me:13369: error: Cannot link with pthread library" >&5
13370 echo "$as_me: error: Cannot link with pthread library" >&2;}
13371 { (exit 1); exit 1; }; }
13378 echo "$as_me:13378: checking if you want to use weak-symbols for pthreads" >&5
13379 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
13381 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
13382 if test "${enable_weak_symbols+set}" = set; then
13383 enableval="$enable_weak_symbols"
13384 use_weak_symbols=$withval
13386 use_weak_symbols=no
13388 echo "$as_me:13388: result: $use_weak_symbols" >&5
13389 echo "${ECHO_T}$use_weak_symbols" >&6
13390 if test "$use_weak_symbols" = yes ; then
13392 echo "$as_me:13392: checking if $CC supports weak symbols" >&5
13393 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
13394 if test "${cf_cv_weak_symbols+set}" = set; then
13395 echo $ECHO_N "(cached) $ECHO_C" >&6
13398 cat >conftest.$ac_ext <<_ACEOF
13399 #line 13399 "configure"
13400 #include "confdefs.h"
13407 #if defined(__GNUC__)
13408 # if defined __USE_ISOC99
13409 # define _cat_pragma(exp) _Pragma(#exp)
13410 # define _weak_pragma(exp) _cat_pragma(weak name)
13412 # define _weak_pragma(exp)
13414 # define _declare(name) __extension__ extern __typeof__(name) name
13415 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
13418 weak_symbol(fopen);
13424 rm -f conftest.$ac_objext
13425 if { (eval echo "$as_me:13425: \"$ac_compile\"") >&5
13426 (eval $ac_compile) 2>&5
13428 echo "$as_me:13428: \$? = $ac_status" >&5
13429 (exit $ac_status); } &&
13430 { ac_try='test -s conftest.$ac_objext'
13431 { (eval echo "$as_me:13431: \"$ac_try\"") >&5
13432 (eval $ac_try) 2>&5
13434 echo "$as_me:13434: \$? = $ac_status" >&5
13435 (exit $ac_status); }; }; then
13436 cf_cv_weak_symbols=yes
13438 echo "$as_me: failed program was:" >&5
13439 cat conftest.$ac_ext >&5
13440 cf_cv_weak_symbols=no
13442 rm -f conftest.$ac_objext conftest.$ac_ext
13445 echo "$as_me:13445: result: $cf_cv_weak_symbols" >&5
13446 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
13449 cf_cv_weak_symbols=no
13452 if test $cf_cv_weak_symbols = yes ; then
13454 cat >>confdefs.h <<\EOF
13455 #define USE_WEAK_SYMBOLS 1
13461 if test "$with_pthread" = "yes" ; then
13463 cat >>confdefs.h <<\EOF
13464 #define USE_PTHREADS 1
13467 enable_reentrant=yes
13468 if test $cf_cv_weak_symbols = yes ; then
13473 # OpenSUSE is installing ncurses6, using reentrant option.
13474 echo "$as_me:13474: checking for _nc_TABSIZE" >&5
13475 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
13476 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
13477 echo $ECHO_N "(cached) $ECHO_C" >&6
13479 cat >conftest.$ac_ext <<_ACEOF
13480 #line 13480 "configure"
13481 #include "confdefs.h"
13482 /* System header to define __stub macros and hopefully few prototypes,
13483 which can conflict with char _nc_TABSIZE (); below. */
13484 #include <assert.h>
13485 /* Override any gcc2 internal prototype to avoid an error. */
13489 /* We use char because int might match the return type of a gcc2
13490 builtin and then its argument prototype would still apply. */
13491 char _nc_TABSIZE ();
13497 /* The GNU C library defines this for functions which it implements
13498 to always fail with ENOSYS. Some functions are actually named
13499 something starting with __ and the normal name is an alias. */
13500 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
13503 f = _nc_TABSIZE; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13510 rm -f conftest.$ac_objext conftest$ac_exeext
13511 if { (eval echo "$as_me:13511: \"$ac_link\"") >&5
13512 (eval $ac_link) 2>&5
13514 echo "$as_me:13514: \$? = $ac_status" >&5
13515 (exit $ac_status); } &&
13516 { ac_try='test -s conftest$ac_exeext'
13517 { (eval echo "$as_me:13517: \"$ac_try\"") >&5
13518 (eval $ac_try) 2>&5
13520 echo "$as_me:13520: \$? = $ac_status" >&5
13521 (exit $ac_status); }; }; then
13522 ac_cv_func__nc_TABSIZE=yes
13524 echo "$as_me: failed program was:" >&5
13525 cat conftest.$ac_ext >&5
13526 ac_cv_func__nc_TABSIZE=no
13528 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13530 echo "$as_me:13530: result: $ac_cv_func__nc_TABSIZE" >&5
13531 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
13532 if test $ac_cv_func__nc_TABSIZE = yes; then
13533 assume_reentrant=yes
13535 assume_reentrant=no
13538 # Reentrant code has to be opaque; there's little advantage to making ncurses
13539 # opaque outside of that, so there is no --enable-opaque option. We can use
13540 # this option without --with-pthreads, but this will be always set for
13542 echo "$as_me:13542: checking if you want experimental reentrant code" >&5
13543 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
13545 # Check whether --enable-reentrant or --disable-reentrant was given.
13546 if test "${enable_reentrant+set}" = set; then
13547 enableval="$enable_reentrant"
13548 with_reentrant=$enableval
13550 with_reentrant=$assume_reentrant
13552 echo "$as_me:13552: result: $with_reentrant" >&5
13553 echo "${ECHO_T}$with_reentrant" >&6
13554 if test "$with_reentrant" = yes ; then
13555 cf_cv_enable_reentrant=1
13556 if test $cf_cv_weak_symbols = yes ; then
13558 # remove pthread library from $LIBS
13559 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
13561 elif test "$assume_reentrant" = no ; then
13562 LIB_SUFFIX="t${LIB_SUFFIX}"
13565 cat >>confdefs.h <<\EOF
13566 #define USE_REENTRANT 1
13570 cf_cv_enable_reentrant=0
13573 ### Allow using a different wrap-prefix
13574 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
13575 echo "$as_me:13575: checking for prefix used to wrap public variables" >&5
13576 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
13578 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
13579 if test "${with_wrap_prefix+set}" = set; then
13580 withval="$with_wrap_prefix"
13581 NCURSES_WRAP_PREFIX=$withval
13583 NCURSES_WRAP_PREFIX=_nc_
13585 echo "$as_me:13585: result: $NCURSES_WRAP_PREFIX" >&5
13586 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
13588 NCURSES_WRAP_PREFIX=_nc_
13591 cat >>confdefs.h <<EOF
13592 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
13595 ###############################################################################
13597 ### use option --disable-echo to suppress full display compiling commands
13599 echo "$as_me:13599: checking if you want to see long compiling messages" >&5
13600 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
13602 # Check whether --enable-echo or --disable-echo was given.
13603 if test "${enable_echo+set}" = set; then
13604 enableval="$enable_echo"
13605 test "$enableval" != no && enableval=yes
13606 if test "$enableval" != "yes" ; then
13609 ECHO_LD='@echo linking $@;'
13610 RULE_CC='@echo compiling $<'
13611 SHOW_CC='@echo compiling $@'
13633 echo "$as_me:13633: result: $enableval" >&5
13634 echo "${ECHO_T}$enableval" >&6
13636 ### use option --enable-warnings to turn on all gcc warnings
13637 echo "$as_me:13637: checking if you want to see compiler warnings" >&5
13638 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
13640 # Check whether --enable-warnings or --disable-warnings was given.
13641 if test "${enable_warnings+set}" = set; then
13642 enableval="$enable_warnings"
13643 with_warnings=$enableval
13645 echo "$as_me:13645: result: $with_warnings" >&5
13646 echo "${ECHO_T}$with_warnings" >&6
13648 if test "x$with_warnings" = "xyes"; then
13650 ADAFLAGS="$ADAFLAGS -gnatg"
13654 if test "$GCC" = yes ; then
13657 echo "$as_me:13657: checking if this is really Intel C compiler" >&5
13658 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
13659 cf_save_CFLAGS="$CFLAGS"
13660 CFLAGS="$CFLAGS -no-gcc"
13661 cat >conftest.$ac_ext <<_ACEOF
13662 #line 13662 "configure"
13663 #include "confdefs.h"
13669 #ifdef __INTEL_COMPILER
13678 rm -f conftest.$ac_objext
13679 if { (eval echo "$as_me:13679: \"$ac_compile\"") >&5
13680 (eval $ac_compile) 2>&5
13682 echo "$as_me:13682: \$? = $ac_status" >&5
13683 (exit $ac_status); } &&
13684 { ac_try='test -s conftest.$ac_objext'
13685 { (eval echo "$as_me:13685: \"$ac_try\"") >&5
13686 (eval $ac_try) 2>&5
13688 echo "$as_me:13688: \$? = $ac_status" >&5
13689 (exit $ac_status); }; }; then
13691 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13694 echo "$as_me: failed program was:" >&5
13695 cat conftest.$ac_ext >&5
13697 rm -f conftest.$ac_objext conftest.$ac_ext
13698 CFLAGS="$cf_save_CFLAGS"
13699 echo "$as_me:13699: result: $INTEL_COMPILER" >&5
13700 echo "${ECHO_T}$INTEL_COMPILER" >&6
13707 if test "$GCC" = yes ; then
13708 echo "$as_me:13708: checking if this is really Clang C compiler" >&5
13709 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13710 cf_save_CFLAGS="$CFLAGS"
13711 CFLAGS="$CFLAGS -Qunused-arguments"
13712 cat >conftest.$ac_ext <<_ACEOF
13713 #line 13713 "configure"
13714 #include "confdefs.h"
13729 rm -f conftest.$ac_objext
13730 if { (eval echo "$as_me:13730: \"$ac_compile\"") >&5
13731 (eval $ac_compile) 2>&5
13733 echo "$as_me:13733: \$? = $ac_status" >&5
13734 (exit $ac_status); } &&
13735 { ac_try='test -s conftest.$ac_objext'
13736 { (eval echo "$as_me:13736: \"$ac_try\"") >&5
13737 (eval $ac_try) 2>&5
13739 echo "$as_me:13739: \$? = $ac_status" >&5
13740 (exit $ac_status); }; }; then
13742 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13745 echo "$as_me: failed program was:" >&5
13746 cat conftest.$ac_ext >&5
13748 rm -f conftest.$ac_objext conftest.$ac_ext
13749 CFLAGS="$cf_save_CFLAGS"
13750 echo "$as_me:13750: result: $CLANG_COMPILER" >&5
13751 echo "${ECHO_T}$CLANG_COMPILER" >&6
13754 cat > conftest.$ac_ext <<EOF
13755 #line 13755 "${as_me:-configure}"
13756 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13759 if test "$INTEL_COMPILER" = yes
13761 # The "-wdXXX" options suppress warnings:
13762 # remark #1419: external declaration in primary source file
13763 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13764 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13765 # remark #193: zero used for undefined preprocessing identifier
13766 # remark #593: variable "curs_sb_left_arrow" was set but never used
13767 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13768 # remark #869: parameter "tw" was never referenced
13769 # remark #981: operands are evaluated in unspecified order
13770 # warning #279: controlling expression is constant
13772 { echo "$as_me:13772: checking for $CC warning options..." >&5
13773 echo "$as_me: checking for $CC warning options..." >&6;}
13774 cf_save_CFLAGS="$CFLAGS"
13775 EXTRA_CFLAGS="-Wall"
13787 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13788 if { (eval echo "$as_me:13788: \"$ac_compile\"") >&5
13789 (eval $ac_compile) 2>&5
13791 echo "$as_me:13791: \$? = $ac_status" >&5
13792 (exit $ac_status); }; then
13793 test -n "$verbose" && echo "$as_me:13793: result: ... -$cf_opt" >&5
13794 echo "${ECHO_T}... -$cf_opt" >&6
13795 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13798 CFLAGS="$cf_save_CFLAGS"
13800 elif test "$GCC" = yes
13802 { echo "$as_me:13802: checking for $CC warning options..." >&5
13803 echo "$as_me: checking for $CC warning options..." >&6;}
13804 cf_save_CFLAGS="$CFLAGS"
13807 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13808 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13809 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13810 for cf_opt in W Wall \
13811 Wbad-function-cast \
13814 Wdeclaration-after-statement \
13817 Wmissing-declarations \
13818 Wmissing-prototypes \
13822 Wstrict-prototypes \
13823 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13825 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13826 if { (eval echo "$as_me:13826: \"$ac_compile\"") >&5
13827 (eval $ac_compile) 2>&5
13829 echo "$as_me:13829: \$? = $ac_status" >&5
13830 (exit $ac_status); }; then
13831 test -n "$verbose" && echo "$as_me:13831: result: ... -$cf_opt" >&5
13832 echo "${ECHO_T}... -$cf_opt" >&6
13836 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13837 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
13841 case $GCC_VERSION in
13843 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
13845 echo "${as_me:-configure}:13845: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13851 case $GCC_VERSION in
13853 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
13855 echo "${as_me:-configure}:13855: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13861 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13864 CFLAGS="$cf_save_CFLAGS"
13870 if test "$GCC" = yes
13872 cat > conftest.i <<EOF
13874 #define GCC_PRINTF 0
13877 #define GCC_SCANF 0
13879 #ifndef GCC_NORETURN
13880 #define GCC_NORETURN /* nothing */
13883 #define GCC_UNUSED /* nothing */
13886 if test "$GCC" = yes
13888 { echo "$as_me:13888: checking for $CC __attribute__ directives..." >&5
13889 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13890 cat > conftest.$ac_ext <<EOF
13891 #line 13891 "${as_me:-configure}"
13892 #include "confdefs.h"
13893 #include "conftest.h"
13894 #include "conftest.i"
13896 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13898 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13901 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
13903 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
13905 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13906 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13907 extern void foo(void) GCC_NORETURN;
13908 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13910 cf_printf_attribute=no
13911 cf_scanf_attribute=no
13912 for cf_attribute in scanf printf unused noreturn
13915 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13917 cf_directive="__attribute__(($cf_attribute))"
13918 echo "checking for $CC $cf_directive" 1>&5
13920 case $cf_attribute in
13922 cf_printf_attribute=yes
13923 cat >conftest.h <<EOF
13924 #define GCC_$cf_ATTRIBUTE 1
13928 cf_scanf_attribute=yes
13929 cat >conftest.h <<EOF
13930 #define GCC_$cf_ATTRIBUTE 1
13934 cat >conftest.h <<EOF
13935 #define GCC_$cf_ATTRIBUTE $cf_directive
13940 if { (eval echo "$as_me:13940: \"$ac_compile\"") >&5
13941 (eval $ac_compile) 2>&5
13943 echo "$as_me:13943: \$? = $ac_status" >&5
13944 (exit $ac_status); }; then
13945 test -n "$verbose" && echo "$as_me:13945: result: ... $cf_attribute" >&5
13946 echo "${ECHO_T}... $cf_attribute" >&6
13947 cat conftest.h >>confdefs.h
13948 case $cf_attribute in
13951 cat >>confdefs.h <<EOF
13952 #define GCC_NORETURN $cf_directive
13957 cf_value='/* nothing */'
13958 if test "$cf_printf_attribute" != no ; then
13959 cf_value='__attribute__((format(printf,fmt,var)))'
13961 cat >>confdefs.h <<\EOF
13962 #define GCC_PRINTF 1
13967 cat >>confdefs.h <<EOF
13968 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13973 cf_value='/* nothing */'
13974 if test "$cf_scanf_attribute" != no ; then
13975 cf_value='__attribute__((format(scanf,fmt,var)))'
13977 cat >>confdefs.h <<\EOF
13978 #define GCC_SCANF 1
13983 cat >>confdefs.h <<EOF
13984 #define GCC_SCANFLIKE(fmt,var) $cf_value
13990 cat >>confdefs.h <<EOF
13991 #define GCC_UNUSED $cf_directive
13999 fgrep define conftest.i >>confdefs.h
14004 ### use option --enable-assertions to turn on generation of assertion code
14005 echo "$as_me:14005: checking if you want to enable runtime assertions" >&5
14006 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
14008 # Check whether --enable-assertions or --disable-assertions was given.
14009 if test "${enable_assertions+set}" = set; then
14010 enableval="$enable_assertions"
14011 with_assertions=$enableval
14015 echo "$as_me:14015: result: $with_assertions" >&5
14016 echo "${ECHO_T}$with_assertions" >&6
14019 if test "$with_assertions" = no
14021 CPPFLAGS="$CPPFLAGS -DNDEBUG"
14024 ADAFLAGS="$ADAFLAGS -gnata"
14029 ### use option --disable-leaks to suppress "permanent" leaks, for testing
14031 cat >>confdefs.h <<\EOF
14032 #define HAVE_NC_ALLOC_H 1
14035 ### use option --enable-expanded to generate certain macros as functions
14037 # Check whether --enable-expanded or --disable-expanded was given.
14038 if test "${enable_expanded+set}" = set; then
14039 enableval="$enable_expanded"
14040 test "$enableval" = yes &&
14041 cat >>confdefs.h <<\EOF
14042 #define NCURSES_EXPANDED 1
14047 ### use option --disable-macros to suppress macros in favor of functions
14049 # Check whether --enable-macros or --disable-macros was given.
14050 if test "${enable_macros+set}" = set; then
14051 enableval="$enable_macros"
14052 test "$enableval" = no &&
14053 cat >>confdefs.h <<\EOF
14054 #define NCURSES_NOMACROS 1
14059 # Normally we only add trace() to the debug-library. Allow this to be
14060 # extended to all models of the ncurses library:
14062 case "$CFLAGS $CPPFLAGS" in
14068 echo "$as_me:14068: checking whether to add trace feature to all models" >&5
14069 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14071 # Check whether --with-trace or --without-trace was given.
14072 if test "${with_trace+set}" = set; then
14073 withval="$with_trace"
14074 cf_with_trace=$withval
14076 cf_with_trace=$cf_all_traces
14078 echo "$as_me:14078: result: $cf_with_trace" >&5
14079 echo "${ECHO_T}$cf_with_trace" >&6
14081 if test "$cf_with_trace" = yes ; then
14087 cf_new_extra_cppflags=
14089 for cf_add_cflags in -DTRACE
14091 case $cf_fix_cppflags in
14093 case $cf_add_cflags in
14094 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14095 case $cf_add_cflags in
14097 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14099 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14100 && test -z "${cf_tst_cflags}" \
14101 && cf_fix_cppflags=yes
14103 if test $cf_fix_cppflags = yes ; then
14105 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14106 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14109 elif test "${cf_tst_cflags}" = "\"'" ; then
14111 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14112 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14118 case "$CPPFLAGS" in
14122 case $cf_add_cflags in
14124 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14126 CPPFLAGS=`echo "$CPPFLAGS" | \
14127 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14128 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14133 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14134 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14141 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14142 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14149 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14150 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14152 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14154 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14155 && test -z "${cf_tst_cflags}" \
14156 && cf_fix_cppflags=no
14161 if test -n "$cf_new_cflags" ; then
14163 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14164 CFLAGS="${CFLAGS}$cf_new_cflags"
14168 if test -n "$cf_new_cppflags" ; then
14170 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14171 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14175 if test -n "$cf_new_extra_cppflags" ; then
14177 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14178 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14186 echo "$as_me:14186: checking if we want to use GNAT projects" >&5
14187 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14189 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14190 if test "${enable_gnat_projects+set}" = set; then
14191 enableval="$enable_gnat_projects"
14192 test "$enableval" != no && enableval=yes
14193 if test "$enableval" != "yes" ; then
14194 enable_gnat_projects=no
14196 enable_gnat_projects=yes
14200 enable_gnat_projects=yes
14203 echo "$as_me:14203: result: $enable_gnat_projects" >&5
14204 echo "${ECHO_T}$enable_gnat_projects" >&6
14206 ### Checks for libraries.
14207 case $cf_cv_system_name in
14211 echo "$as_me:14211: checking for gettimeofday" >&5
14212 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14213 if test "${ac_cv_func_gettimeofday+set}" = set; then
14214 echo $ECHO_N "(cached) $ECHO_C" >&6
14216 cat >conftest.$ac_ext <<_ACEOF
14217 #line 14217 "configure"
14218 #include "confdefs.h"
14219 /* System header to define __stub macros and hopefully few prototypes,
14220 which can conflict with char gettimeofday (); below. */
14221 #include <assert.h>
14222 /* Override any gcc2 internal prototype to avoid an error. */
14226 /* We use char because int might match the return type of a gcc2
14227 builtin and then its argument prototype would still apply. */
14228 char gettimeofday ();
14234 /* The GNU C library defines this for functions which it implements
14235 to always fail with ENOSYS. Some functions are actually named
14236 something starting with __ and the normal name is an alias. */
14237 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14240 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14247 rm -f conftest.$ac_objext conftest$ac_exeext
14248 if { (eval echo "$as_me:14248: \"$ac_link\"") >&5
14249 (eval $ac_link) 2>&5
14251 echo "$as_me:14251: \$? = $ac_status" >&5
14252 (exit $ac_status); } &&
14253 { ac_try='test -s conftest$ac_exeext'
14254 { (eval echo "$as_me:14254: \"$ac_try\"") >&5
14255 (eval $ac_try) 2>&5
14257 echo "$as_me:14257: \$? = $ac_status" >&5
14258 (exit $ac_status); }; }; then
14259 ac_cv_func_gettimeofday=yes
14261 echo "$as_me: failed program was:" >&5
14262 cat conftest.$ac_ext >&5
14263 ac_cv_func_gettimeofday=no
14265 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14267 echo "$as_me:14267: result: $ac_cv_func_gettimeofday" >&5
14268 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14269 if test $ac_cv_func_gettimeofday = yes; then
14270 cat >>confdefs.h <<\EOF
14271 #define HAVE_GETTIMEOFDAY 1
14276 echo "$as_me:14276: checking for gettimeofday in -lbsd" >&5
14277 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14278 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14279 echo $ECHO_N "(cached) $ECHO_C" >&6
14281 ac_check_lib_save_LIBS=$LIBS
14283 cat >conftest.$ac_ext <<_ACEOF
14284 #line 14284 "configure"
14285 #include "confdefs.h"
14287 /* Override any gcc2 internal prototype to avoid an error. */
14291 /* We use char because int might match the return type of a gcc2
14292 builtin and then its argument prototype would still apply. */
14293 char gettimeofday ();
14302 rm -f conftest.$ac_objext conftest$ac_exeext
14303 if { (eval echo "$as_me:14303: \"$ac_link\"") >&5
14304 (eval $ac_link) 2>&5
14306 echo "$as_me:14306: \$? = $ac_status" >&5
14307 (exit $ac_status); } &&
14308 { ac_try='test -s conftest$ac_exeext'
14309 { (eval echo "$as_me:14309: \"$ac_try\"") >&5
14310 (eval $ac_try) 2>&5
14312 echo "$as_me:14312: \$? = $ac_status" >&5
14313 (exit $ac_status); }; }; then
14314 ac_cv_lib_bsd_gettimeofday=yes
14316 echo "$as_me: failed program was:" >&5
14317 cat conftest.$ac_ext >&5
14318 ac_cv_lib_bsd_gettimeofday=no
14320 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14321 LIBS=$ac_check_lib_save_LIBS
14323 echo "$as_me:14323: result: $ac_cv_lib_bsd_gettimeofday" >&5
14324 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14325 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14327 cat >>confdefs.h <<\EOF
14328 #define HAVE_GETTIMEOFDAY 1
14338 ### Checks for header files.
14339 echo "$as_me:14339: checking for ANSI C header files" >&5
14340 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14341 if test "${ac_cv_header_stdc+set}" = set; then
14342 echo $ECHO_N "(cached) $ECHO_C" >&6
14344 cat >conftest.$ac_ext <<_ACEOF
14345 #line 14345 "configure"
14346 #include "confdefs.h"
14347 #include <stdlib.h>
14348 #include <stdarg.h>
14349 #include <string.h>
14353 if { (eval echo "$as_me:14353: \"$ac_cpp conftest.$ac_ext\"") >&5
14354 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14356 egrep -v '^ *\+' conftest.er1 >conftest.err
14358 cat conftest.err >&5
14359 echo "$as_me:14359: \$? = $ac_status" >&5
14360 (exit $ac_status); } >/dev/null; then
14361 if test -s conftest.err; then
14362 ac_cpp_err=$ac_c_preproc_warn_flag
14369 if test -z "$ac_cpp_err"; then
14370 ac_cv_header_stdc=yes
14372 echo "$as_me: failed program was:" >&5
14373 cat conftest.$ac_ext >&5
14374 ac_cv_header_stdc=no
14376 rm -f conftest.err conftest.$ac_ext
14378 if test $ac_cv_header_stdc = yes; then
14379 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14380 cat >conftest.$ac_ext <<_ACEOF
14381 #line 14381 "configure"
14382 #include "confdefs.h"
14383 #include <string.h>
14386 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14387 egrep "memchr" >/dev/null 2>&1; then
14390 ac_cv_header_stdc=no
14396 if test $ac_cv_header_stdc = yes; then
14397 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14398 cat >conftest.$ac_ext <<_ACEOF
14399 #line 14399 "configure"
14400 #include "confdefs.h"
14401 #include <stdlib.h>
14404 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14405 egrep "free" >/dev/null 2>&1; then
14408 ac_cv_header_stdc=no
14414 if test $ac_cv_header_stdc = yes; then
14415 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14416 if test "$cross_compiling" = yes; then
14419 cat >conftest.$ac_ext <<_ACEOF
14420 #line 14420 "configure"
14421 #include "confdefs.h"
14423 #if ((' ' & 0x0FF) == 0x020)
14424 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14425 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14427 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14428 || ('j' <= (c) && (c) <= 'r') \
14429 || ('s' <= (c) && (c) <= 'z'))
14430 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14433 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14438 for (i = 0; i < 256; i++)
14439 if (XOR (islower (i), ISLOWER (i))
14440 || toupper (i) != TOUPPER (i))
14441 $ac_main_return(2);
14442 $ac_main_return (0);
14445 rm -f conftest$ac_exeext
14446 if { (eval echo "$as_me:14446: \"$ac_link\"") >&5
14447 (eval $ac_link) 2>&5
14449 echo "$as_me:14449: \$? = $ac_status" >&5
14450 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14451 { (eval echo "$as_me:14451: \"$ac_try\"") >&5
14452 (eval $ac_try) 2>&5
14454 echo "$as_me:14454: \$? = $ac_status" >&5
14455 (exit $ac_status); }; }; then
14458 echo "$as_me: program exited with status $ac_status" >&5
14459 echo "$as_me: failed program was:" >&5
14460 cat conftest.$ac_ext >&5
14461 ac_cv_header_stdc=no
14463 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14467 echo "$as_me:14467: result: $ac_cv_header_stdc" >&5
14468 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14469 if test $ac_cv_header_stdc = yes; then
14471 cat >>confdefs.h <<\EOF
14472 #define STDC_HEADERS 1
14477 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
14479 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
14480 inttypes.h stdint.h unistd.h
14482 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14483 echo "$as_me:14483: checking for $ac_header" >&5
14484 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14485 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14486 echo $ECHO_N "(cached) $ECHO_C" >&6
14488 cat >conftest.$ac_ext <<_ACEOF
14489 #line 14489 "configure"
14490 #include "confdefs.h"
14491 $ac_includes_default
14492 #include <$ac_header>
14494 rm -f conftest.$ac_objext
14495 if { (eval echo "$as_me:14495: \"$ac_compile\"") >&5
14496 (eval $ac_compile) 2>&5
14498 echo "$as_me:14498: \$? = $ac_status" >&5
14499 (exit $ac_status); } &&
14500 { ac_try='test -s conftest.$ac_objext'
14501 { (eval echo "$as_me:14501: \"$ac_try\"") >&5
14502 (eval $ac_try) 2>&5
14504 echo "$as_me:14504: \$? = $ac_status" >&5
14505 (exit $ac_status); }; }; then
14506 eval "$as_ac_Header=yes"
14508 echo "$as_me: failed program was:" >&5
14509 cat conftest.$ac_ext >&5
14510 eval "$as_ac_Header=no"
14512 rm -f conftest.$ac_objext conftest.$ac_ext
14514 echo "$as_me:14514: result: `eval echo '${'$as_ac_Header'}'`" >&5
14515 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14516 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14517 cat >>confdefs.h <<EOF
14518 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14524 echo "$as_me:14524: checking for signed char" >&5
14525 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14526 if test "${ac_cv_type_signed_char+set}" = set; then
14527 echo $ECHO_N "(cached) $ECHO_C" >&6
14529 cat >conftest.$ac_ext <<_ACEOF
14530 #line 14530 "configure"
14531 #include "confdefs.h"
14532 $ac_includes_default
14536 if ((signed char *) 0)
14538 if (sizeof (signed char))
14544 rm -f conftest.$ac_objext
14545 if { (eval echo "$as_me:14545: \"$ac_compile\"") >&5
14546 (eval $ac_compile) 2>&5
14548 echo "$as_me:14548: \$? = $ac_status" >&5
14549 (exit $ac_status); } &&
14550 { ac_try='test -s conftest.$ac_objext'
14551 { (eval echo "$as_me:14551: \"$ac_try\"") >&5
14552 (eval $ac_try) 2>&5
14554 echo "$as_me:14554: \$? = $ac_status" >&5
14555 (exit $ac_status); }; }; then
14556 ac_cv_type_signed_char=yes
14558 echo "$as_me: failed program was:" >&5
14559 cat conftest.$ac_ext >&5
14560 ac_cv_type_signed_char=no
14562 rm -f conftest.$ac_objext conftest.$ac_ext
14564 echo "$as_me:14564: result: $ac_cv_type_signed_char" >&5
14565 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14567 echo "$as_me:14567: checking size of signed char" >&5
14568 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14569 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14570 echo $ECHO_N "(cached) $ECHO_C" >&6
14572 if test "$ac_cv_type_signed_char" = yes; then
14573 if test "$cross_compiling" = yes; then
14574 # Depending upon the size, compute the lo and hi bounds.
14575 cat >conftest.$ac_ext <<_ACEOF
14576 #line 14576 "configure"
14577 #include "confdefs.h"
14578 $ac_includes_default
14582 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14587 rm -f conftest.$ac_objext
14588 if { (eval echo "$as_me:14588: \"$ac_compile\"") >&5
14589 (eval $ac_compile) 2>&5
14591 echo "$as_me:14591: \$? = $ac_status" >&5
14592 (exit $ac_status); } &&
14593 { ac_try='test -s conftest.$ac_objext'
14594 { (eval echo "$as_me:14594: \"$ac_try\"") >&5
14595 (eval $ac_try) 2>&5
14597 echo "$as_me:14597: \$? = $ac_status" >&5
14598 (exit $ac_status); }; }; then
14601 cat >conftest.$ac_ext <<_ACEOF
14602 #line 14602 "configure"
14603 #include "confdefs.h"
14604 $ac_includes_default
14608 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14613 rm -f conftest.$ac_objext
14614 if { (eval echo "$as_me:14614: \"$ac_compile\"") >&5
14615 (eval $ac_compile) 2>&5
14617 echo "$as_me:14617: \$? = $ac_status" >&5
14618 (exit $ac_status); } &&
14619 { ac_try='test -s conftest.$ac_objext'
14620 { (eval echo "$as_me:14620: \"$ac_try\"") >&5
14621 (eval $ac_try) 2>&5
14623 echo "$as_me:14623: \$? = $ac_status" >&5
14624 (exit $ac_status); }; }; then
14625 ac_hi=$ac_mid; break
14627 echo "$as_me: failed program was:" >&5
14628 cat conftest.$ac_ext >&5
14629 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
14631 rm -f conftest.$ac_objext conftest.$ac_ext
14634 echo "$as_me: failed program was:" >&5
14635 cat conftest.$ac_ext >&5
14638 cat >conftest.$ac_ext <<_ACEOF
14639 #line 14639 "configure"
14640 #include "confdefs.h"
14641 $ac_includes_default
14645 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14650 rm -f conftest.$ac_objext
14651 if { (eval echo "$as_me:14651: \"$ac_compile\"") >&5
14652 (eval $ac_compile) 2>&5
14654 echo "$as_me:14654: \$? = $ac_status" >&5
14655 (exit $ac_status); } &&
14656 { ac_try='test -s conftest.$ac_objext'
14657 { (eval echo "$as_me:14657: \"$ac_try\"") >&5
14658 (eval $ac_try) 2>&5
14660 echo "$as_me:14660: \$? = $ac_status" >&5
14661 (exit $ac_status); }; }; then
14662 ac_lo=$ac_mid; break
14664 echo "$as_me: failed program was:" >&5
14665 cat conftest.$ac_ext >&5
14666 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
14668 rm -f conftest.$ac_objext conftest.$ac_ext
14671 rm -f conftest.$ac_objext conftest.$ac_ext
14672 # Binary search between lo and hi bounds.
14673 while test "x$ac_lo" != "x$ac_hi"; do
14674 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14675 cat >conftest.$ac_ext <<_ACEOF
14676 #line 14676 "configure"
14677 #include "confdefs.h"
14678 $ac_includes_default
14682 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14687 rm -f conftest.$ac_objext
14688 if { (eval echo "$as_me:14688: \"$ac_compile\"") >&5
14689 (eval $ac_compile) 2>&5
14691 echo "$as_me:14691: \$? = $ac_status" >&5
14692 (exit $ac_status); } &&
14693 { ac_try='test -s conftest.$ac_objext'
14694 { (eval echo "$as_me:14694: \"$ac_try\"") >&5
14695 (eval $ac_try) 2>&5
14697 echo "$as_me:14697: \$? = $ac_status" >&5
14698 (exit $ac_status); }; }; then
14701 echo "$as_me: failed program was:" >&5
14702 cat conftest.$ac_ext >&5
14703 ac_lo=`expr $ac_mid + 1`
14705 rm -f conftest.$ac_objext conftest.$ac_ext
14707 ac_cv_sizeof_signed_char=$ac_lo
14709 if test "$cross_compiling" = yes; then
14710 { { echo "$as_me:14710: error: cannot run test program while cross compiling" >&5
14711 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14712 { (exit 1); exit 1; }; }
14714 cat >conftest.$ac_ext <<_ACEOF
14715 #line 14715 "configure"
14716 #include "confdefs.h"
14717 $ac_includes_default
14721 FILE *f = fopen ("conftest.val", "w");
14723 $ac_main_return (1);
14724 fprintf (f, "%d", (sizeof (signed char)));
14730 rm -f conftest$ac_exeext
14731 if { (eval echo "$as_me:14731: \"$ac_link\"") >&5
14732 (eval $ac_link) 2>&5
14734 echo "$as_me:14734: \$? = $ac_status" >&5
14735 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14736 { (eval echo "$as_me:14736: \"$ac_try\"") >&5
14737 (eval $ac_try) 2>&5
14739 echo "$as_me:14739: \$? = $ac_status" >&5
14740 (exit $ac_status); }; }; then
14741 ac_cv_sizeof_signed_char=`cat conftest.val`
14743 echo "$as_me: program exited with status $ac_status" >&5
14744 echo "$as_me: failed program was:" >&5
14745 cat conftest.$ac_ext >&5
14747 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14752 ac_cv_sizeof_signed_char=0
14755 echo "$as_me:14755: result: $ac_cv_sizeof_signed_char" >&5
14756 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14757 cat >>confdefs.h <<EOF
14758 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14761 echo "$as_me:14761: checking for ANSI C header files" >&5
14762 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14763 if test "${ac_cv_header_stdc+set}" = set; then
14764 echo $ECHO_N "(cached) $ECHO_C" >&6
14766 cat >conftest.$ac_ext <<_ACEOF
14767 #line 14767 "configure"
14768 #include "confdefs.h"
14769 #include <stdlib.h>
14770 #include <stdarg.h>
14771 #include <string.h>
14775 if { (eval echo "$as_me:14775: \"$ac_cpp conftest.$ac_ext\"") >&5
14776 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14778 egrep -v '^ *\+' conftest.er1 >conftest.err
14780 cat conftest.err >&5
14781 echo "$as_me:14781: \$? = $ac_status" >&5
14782 (exit $ac_status); } >/dev/null; then
14783 if test -s conftest.err; then
14784 ac_cpp_err=$ac_c_preproc_warn_flag
14791 if test -z "$ac_cpp_err"; then
14792 ac_cv_header_stdc=yes
14794 echo "$as_me: failed program was:" >&5
14795 cat conftest.$ac_ext >&5
14796 ac_cv_header_stdc=no
14798 rm -f conftest.err conftest.$ac_ext
14800 if test $ac_cv_header_stdc = yes; then
14801 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14802 cat >conftest.$ac_ext <<_ACEOF
14803 #line 14803 "configure"
14804 #include "confdefs.h"
14805 #include <string.h>
14808 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14809 egrep "memchr" >/dev/null 2>&1; then
14812 ac_cv_header_stdc=no
14818 if test $ac_cv_header_stdc = yes; then
14819 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14820 cat >conftest.$ac_ext <<_ACEOF
14821 #line 14821 "configure"
14822 #include "confdefs.h"
14823 #include <stdlib.h>
14826 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14827 egrep "free" >/dev/null 2>&1; then
14830 ac_cv_header_stdc=no
14836 if test $ac_cv_header_stdc = yes; then
14837 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14838 if test "$cross_compiling" = yes; then
14841 cat >conftest.$ac_ext <<_ACEOF
14842 #line 14842 "configure"
14843 #include "confdefs.h"
14845 #if ((' ' & 0x0FF) == 0x020)
14846 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14847 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14849 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14850 || ('j' <= (c) && (c) <= 'r') \
14851 || ('s' <= (c) && (c) <= 'z'))
14852 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14855 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14860 for (i = 0; i < 256; i++)
14861 if (XOR (islower (i), ISLOWER (i))
14862 || toupper (i) != TOUPPER (i))
14863 $ac_main_return(2);
14864 $ac_main_return (0);
14867 rm -f conftest$ac_exeext
14868 if { (eval echo "$as_me:14868: \"$ac_link\"") >&5
14869 (eval $ac_link) 2>&5
14871 echo "$as_me:14871: \$? = $ac_status" >&5
14872 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14873 { (eval echo "$as_me:14873: \"$ac_try\"") >&5
14874 (eval $ac_try) 2>&5
14876 echo "$as_me:14876: \$? = $ac_status" >&5
14877 (exit $ac_status); }; }; then
14880 echo "$as_me: program exited with status $ac_status" >&5
14881 echo "$as_me: failed program was:" >&5
14882 cat conftest.$ac_ext >&5
14883 ac_cv_header_stdc=no
14885 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14889 echo "$as_me:14889: result: $ac_cv_header_stdc" >&5
14890 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14891 if test $ac_cv_header_stdc = yes; then
14893 cat >>confdefs.h <<\EOF
14894 #define STDC_HEADERS 1
14899 ac_header_dirent=no
14900 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14901 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14902 echo "$as_me:14902: checking for $ac_hdr that defines DIR" >&5
14903 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14904 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14905 echo $ECHO_N "(cached) $ECHO_C" >&6
14907 cat >conftest.$ac_ext <<_ACEOF
14908 #line 14908 "configure"
14909 #include "confdefs.h"
14910 #include <sys/types.h>
14922 rm -f conftest.$ac_objext
14923 if { (eval echo "$as_me:14923: \"$ac_compile\"") >&5
14924 (eval $ac_compile) 2>&5
14926 echo "$as_me:14926: \$? = $ac_status" >&5
14927 (exit $ac_status); } &&
14928 { ac_try='test -s conftest.$ac_objext'
14929 { (eval echo "$as_me:14929: \"$ac_try\"") >&5
14930 (eval $ac_try) 2>&5
14932 echo "$as_me:14932: \$? = $ac_status" >&5
14933 (exit $ac_status); }; }; then
14934 eval "$as_ac_Header=yes"
14936 echo "$as_me: failed program was:" >&5
14937 cat conftest.$ac_ext >&5
14938 eval "$as_ac_Header=no"
14940 rm -f conftest.$ac_objext conftest.$ac_ext
14942 echo "$as_me:14942: result: `eval echo '${'$as_ac_Header'}'`" >&5
14943 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14944 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14945 cat >>confdefs.h <<EOF
14946 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14949 ac_header_dirent=$ac_hdr; break
14953 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14954 if test $ac_header_dirent = dirent.h; then
14955 echo "$as_me:14955: checking for opendir in -ldir" >&5
14956 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14957 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14958 echo $ECHO_N "(cached) $ECHO_C" >&6
14960 ac_check_lib_save_LIBS=$LIBS
14962 cat >conftest.$ac_ext <<_ACEOF
14963 #line 14963 "configure"
14964 #include "confdefs.h"
14966 /* Override any gcc2 internal prototype to avoid an error. */
14970 /* We use char because int might match the return type of a gcc2
14971 builtin and then its argument prototype would still apply. */
14981 rm -f conftest.$ac_objext conftest$ac_exeext
14982 if { (eval echo "$as_me:14982: \"$ac_link\"") >&5
14983 (eval $ac_link) 2>&5
14985 echo "$as_me:14985: \$? = $ac_status" >&5
14986 (exit $ac_status); } &&
14987 { ac_try='test -s conftest$ac_exeext'
14988 { (eval echo "$as_me:14988: \"$ac_try\"") >&5
14989 (eval $ac_try) 2>&5
14991 echo "$as_me:14991: \$? = $ac_status" >&5
14992 (exit $ac_status); }; }; then
14993 ac_cv_lib_dir_opendir=yes
14995 echo "$as_me: failed program was:" >&5
14996 cat conftest.$ac_ext >&5
14997 ac_cv_lib_dir_opendir=no
14999 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15000 LIBS=$ac_check_lib_save_LIBS
15002 echo "$as_me:15002: result: $ac_cv_lib_dir_opendir" >&5
15003 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
15004 if test $ac_cv_lib_dir_opendir = yes; then
15009 echo "$as_me:15009: checking for opendir in -lx" >&5
15010 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
15011 if test "${ac_cv_lib_x_opendir+set}" = set; then
15012 echo $ECHO_N "(cached) $ECHO_C" >&6
15014 ac_check_lib_save_LIBS=$LIBS
15016 cat >conftest.$ac_ext <<_ACEOF
15017 #line 15017 "configure"
15018 #include "confdefs.h"
15020 /* Override any gcc2 internal prototype to avoid an error. */
15024 /* We use char because int might match the return type of a gcc2
15025 builtin and then its argument prototype would still apply. */
15035 rm -f conftest.$ac_objext conftest$ac_exeext
15036 if { (eval echo "$as_me:15036: \"$ac_link\"") >&5
15037 (eval $ac_link) 2>&5
15039 echo "$as_me:15039: \$? = $ac_status" >&5
15040 (exit $ac_status); } &&
15041 { ac_try='test -s conftest$ac_exeext'
15042 { (eval echo "$as_me:15042: \"$ac_try\"") >&5
15043 (eval $ac_try) 2>&5
15045 echo "$as_me:15045: \$? = $ac_status" >&5
15046 (exit $ac_status); }; }; then
15047 ac_cv_lib_x_opendir=yes
15049 echo "$as_me: failed program was:" >&5
15050 cat conftest.$ac_ext >&5
15051 ac_cv_lib_x_opendir=no
15053 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15054 LIBS=$ac_check_lib_save_LIBS
15056 echo "$as_me:15056: result: $ac_cv_lib_x_opendir" >&5
15057 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
15058 if test $ac_cv_lib_x_opendir = yes; then
15064 echo "$as_me:15064: checking whether time.h and sys/time.h may both be included" >&5
15065 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15066 if test "${ac_cv_header_time+set}" = set; then
15067 echo $ECHO_N "(cached) $ECHO_C" >&6
15069 cat >conftest.$ac_ext <<_ACEOF
15070 #line 15070 "configure"
15071 #include "confdefs.h"
15072 #include <sys/types.h>
15073 #include <sys/time.h>
15079 if ((struct tm *) 0)
15085 rm -f conftest.$ac_objext
15086 if { (eval echo "$as_me:15086: \"$ac_compile\"") >&5
15087 (eval $ac_compile) 2>&5
15089 echo "$as_me:15089: \$? = $ac_status" >&5
15090 (exit $ac_status); } &&
15091 { ac_try='test -s conftest.$ac_objext'
15092 { (eval echo "$as_me:15092: \"$ac_try\"") >&5
15093 (eval $ac_try) 2>&5
15095 echo "$as_me:15095: \$? = $ac_status" >&5
15096 (exit $ac_status); }; }; then
15097 ac_cv_header_time=yes
15099 echo "$as_me: failed program was:" >&5
15100 cat conftest.$ac_ext >&5
15101 ac_cv_header_time=no
15103 rm -f conftest.$ac_objext conftest.$ac_ext
15105 echo "$as_me:15105: result: $ac_cv_header_time" >&5
15106 echo "${ECHO_T}$ac_cv_header_time" >&6
15107 if test $ac_cv_header_time = yes; then
15109 cat >>confdefs.h <<\EOF
15110 #define TIME_WITH_SYS_TIME 1
15115 ### checks for compiler characteristics
15117 ac_cpp='$CPP $CPPFLAGS'
15118 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15119 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15120 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15121 ac_main_return=return
15123 echo "$as_me:15123: checking for an ANSI C-conforming const" >&5
15124 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15125 if test "${ac_cv_c_const+set}" = set; then
15126 echo $ECHO_N "(cached) $ECHO_C" >&6
15128 cat >conftest.$ac_ext <<_ACEOF
15129 #line 15129 "configure"
15130 #include "confdefs.h"
15135 /* FIXME: Include the comments suggested by Paul. */
15136 #ifndef __cplusplus
15137 /* Ultrix mips cc rejects this. */
15138 typedef int charset[2];
15140 /* SunOS 4.1.1 cc rejects this. */
15141 char const *const *ccp;
15143 /* NEC SVR4.0.2 mips cc rejects this. */
15144 struct point {int x, y;};
15145 static struct point const zero = {0,0};
15146 /* AIX XL C 1.02.0.0 rejects this.
15147 It does not let you subtract one const X* pointer from another in
15148 an arm of an if-expression whose if-part is not a constant
15150 const char *g = "string";
15151 ccp = &g + (g ? g-g : 0);
15152 /* HPUX 7.0 cc rejects these. */
15155 ccp = (char const *const *) p;
15156 { /* SCO 3.2v4 cc rejects this. */
15158 char const *s = 0 ? (char *) 0 : (char const *) 0;
15162 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15163 int x[] = {25, 17};
15164 const int *foo = &x[0];
15167 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15168 typedef const int *iptr;
15172 { /* AIX XL C 1.02.0.0 rejects this saying
15173 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15174 struct s { int j; const int *ap[3]; };
15175 struct s *b; b->j = 5;
15177 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15178 const int foo = 10;
15186 rm -f conftest.$ac_objext
15187 if { (eval echo "$as_me:15187: \"$ac_compile\"") >&5
15188 (eval $ac_compile) 2>&5
15190 echo "$as_me:15190: \$? = $ac_status" >&5
15191 (exit $ac_status); } &&
15192 { ac_try='test -s conftest.$ac_objext'
15193 { (eval echo "$as_me:15193: \"$ac_try\"") >&5
15194 (eval $ac_try) 2>&5
15196 echo "$as_me:15196: \$? = $ac_status" >&5
15197 (exit $ac_status); }; }; then
15200 echo "$as_me: failed program was:" >&5
15201 cat conftest.$ac_ext >&5
15204 rm -f conftest.$ac_objext conftest.$ac_ext
15206 echo "$as_me:15206: result: $ac_cv_c_const" >&5
15207 echo "${ECHO_T}$ac_cv_c_const" >&6
15208 if test $ac_cv_c_const = no; then
15210 cat >>confdefs.h <<\EOF
15216 ### Checks for external-data
15218 echo "$as_me:15218: checking if data-only library module links" >&5
15219 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15220 if test "${cf_cv_link_dataonly+set}" = set; then
15221 echo $ECHO_N "(cached) $ECHO_C" >&6
15225 cat >conftest.$ac_ext <<EOF
15226 #line 15226 "configure"
15227 int testdata[3] = { 123, 456, 789 };
15229 if { (eval echo "$as_me:15229: \"$ac_compile\"") >&5
15230 (eval $ac_compile) 2>&5
15232 echo "$as_me:15232: \$? = $ac_status" >&5
15233 (exit $ac_status); } ; then
15234 mv conftest.o data.o && \
15235 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15237 rm -f conftest.$ac_ext data.o
15238 cat >conftest.$ac_ext <<EOF
15239 #line 15239 "configure"
15243 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
15245 extern int testdata[3];
15246 return testdata[0] == 123
15247 && testdata[1] == 456
15248 && testdata[2] == 789;
15252 if { (eval echo "$as_me:15252: \"$ac_compile\"") >&5
15253 (eval $ac_compile) 2>&5
15255 echo "$as_me:15255: \$? = $ac_status" >&5
15256 (exit $ac_status); }; then
15257 mv conftest.o func.o && \
15258 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15260 rm -f conftest.$ac_ext func.o
15261 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15262 cf_saveLIBS="$LIBS"
15263 LIBS="conftest.a $LIBS"
15264 if test "$cross_compiling" = yes; then
15265 cf_cv_link_dataonly=unknown
15267 cat >conftest.$ac_ext <<_ACEOF
15268 #line 15268 "configure"
15269 #include "confdefs.h"
15273 extern int testfunc();
15274 ${cf_cv_main_return:-return} (!testfunc());
15278 rm -f conftest$ac_exeext
15279 if { (eval echo "$as_me:15279: \"$ac_link\"") >&5
15280 (eval $ac_link) 2>&5
15282 echo "$as_me:15282: \$? = $ac_status" >&5
15283 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15284 { (eval echo "$as_me:15284: \"$ac_try\"") >&5
15285 (eval $ac_try) 2>&5
15287 echo "$as_me:15287: \$? = $ac_status" >&5
15288 (exit $ac_status); }; }; then
15289 cf_cv_link_dataonly=yes
15291 echo "$as_me: program exited with status $ac_status" >&5
15292 echo "$as_me: failed program was:" >&5
15293 cat conftest.$ac_ext >&5
15294 cf_cv_link_dataonly=no
15296 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15298 LIBS="$cf_saveLIBS"
15302 echo "$as_me:15302: result: $cf_cv_link_dataonly" >&5
15303 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15305 if test "$cf_cv_link_dataonly" = no ; then
15307 cat >>confdefs.h <<\EOF
15308 #define BROKEN_LINKER 1
15314 ### Checks for library functions.
15320 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15321 echo "$as_me:15321: checking for $ac_header" >&5
15322 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15323 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15324 echo $ECHO_N "(cached) $ECHO_C" >&6
15326 cat >conftest.$ac_ext <<_ACEOF
15327 #line 15327 "configure"
15328 #include "confdefs.h"
15329 #include <$ac_header>
15331 if { (eval echo "$as_me:15331: \"$ac_cpp conftest.$ac_ext\"") >&5
15332 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15334 egrep -v '^ *\+' conftest.er1 >conftest.err
15336 cat conftest.err >&5
15337 echo "$as_me:15337: \$? = $ac_status" >&5
15338 (exit $ac_status); } >/dev/null; then
15339 if test -s conftest.err; then
15340 ac_cpp_err=$ac_c_preproc_warn_flag
15347 if test -z "$ac_cpp_err"; then
15348 eval "$as_ac_Header=yes"
15350 echo "$as_me: failed program was:" >&5
15351 cat conftest.$ac_ext >&5
15352 eval "$as_ac_Header=no"
15354 rm -f conftest.err conftest.$ac_ext
15356 echo "$as_me:15356: result: `eval echo '${'$as_ac_Header'}'`" >&5
15357 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15358 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15359 cat >>confdefs.h <<EOF
15360 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15366 echo "$as_me:15366: checking for working mkstemp" >&5
15367 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
15368 if test "${cf_cv_func_mkstemp+set}" = set; then
15369 echo $ECHO_N "(cached) $ECHO_C" >&6
15373 if test "$cross_compiling" = yes; then
15374 cf_cv_func_mkstemp=maybe
15376 cat >conftest.$ac_ext <<_ACEOF
15377 #line 15377 "configure"
15378 #include "confdefs.h"
15380 #include <sys/types.h>
15381 #ifdef HAVE_UNISTD_H
15382 #include <unistd.h>
15384 #include <stdlib.h>
15386 #include <string.h>
15387 #include <sys/stat.h>
15390 char *tmpl = "conftestXXXXXX";
15398 for (n = 0; n < 2; ++n) {
15399 strcpy(name[n], tmpl);
15400 if ((fd = mkstemp(name[n])) >= 0) {
15401 if (!strcmp(name[n], tmpl)
15402 || stat(name[n], &sb) != 0
15403 || (sb.st_mode & S_IFMT) != S_IFREG
15404 || (sb.st_mode & 077) != 0) {
15411 && !strcmp(name[0], name[1]))
15413 ${cf_cv_main_return:-return}(result);
15417 rm -f conftest$ac_exeext
15418 if { (eval echo "$as_me:15418: \"$ac_link\"") >&5
15419 (eval $ac_link) 2>&5
15421 echo "$as_me:15421: \$? = $ac_status" >&5
15422 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15423 { (eval echo "$as_me:15423: \"$ac_try\"") >&5
15424 (eval $ac_try) 2>&5
15426 echo "$as_me:15426: \$? = $ac_status" >&5
15427 (exit $ac_status); }; }; then
15428 cf_cv_func_mkstemp=yes
15431 echo "$as_me: program exited with status $ac_status" >&5
15432 echo "$as_me: failed program was:" >&5
15433 cat conftest.$ac_ext >&5
15434 cf_cv_func_mkstemp=no
15437 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15441 echo "$as_me:15441: result: $cf_cv_func_mkstemp" >&5
15442 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
15443 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
15444 echo "$as_me:15444: checking for mkstemp" >&5
15445 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
15446 if test "${ac_cv_func_mkstemp+set}" = set; then
15447 echo $ECHO_N "(cached) $ECHO_C" >&6
15449 cat >conftest.$ac_ext <<_ACEOF
15450 #line 15450 "configure"
15451 #include "confdefs.h"
15452 /* System header to define __stub macros and hopefully few prototypes,
15453 which can conflict with char mkstemp (); below. */
15454 #include <assert.h>
15455 /* Override any gcc2 internal prototype to avoid an error. */
15459 /* We use char because int might match the return type of a gcc2
15460 builtin and then its argument prototype would still apply. */
15467 /* The GNU C library defines this for functions which it implements
15468 to always fail with ENOSYS. Some functions are actually named
15469 something starting with __ and the normal name is an alias. */
15470 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
15473 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15480 rm -f conftest.$ac_objext conftest$ac_exeext
15481 if { (eval echo "$as_me:15481: \"$ac_link\"") >&5
15482 (eval $ac_link) 2>&5
15484 echo "$as_me:15484: \$? = $ac_status" >&5
15485 (exit $ac_status); } &&
15486 { ac_try='test -s conftest$ac_exeext'
15487 { (eval echo "$as_me:15487: \"$ac_try\"") >&5
15488 (eval $ac_try) 2>&5
15490 echo "$as_me:15490: \$? = $ac_status" >&5
15491 (exit $ac_status); }; }; then
15492 ac_cv_func_mkstemp=yes
15494 echo "$as_me: failed program was:" >&5
15495 cat conftest.$ac_ext >&5
15496 ac_cv_func_mkstemp=no
15498 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15500 echo "$as_me:15500: result: $ac_cv_func_mkstemp" >&5
15501 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
15504 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
15506 cat >>confdefs.h <<\EOF
15507 #define HAVE_MKSTEMP 1
15512 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
15513 CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
15514 CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
15518 if test "$cf_with_ada" != "no" ; then
15520 cf_ada_make=gnatmake
15522 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
15523 set dummy $cf_ada_make; ac_word=$2
15524 echo "$as_me:15524: checking for $ac_word" >&5
15525 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15526 if test "${ac_cv_prog_gnatmake_exists+set}" = set; then
15527 echo $ECHO_N "(cached) $ECHO_C" >&6
15529 if test -n "$gnatmake_exists"; then
15530 ac_cv_prog_gnatmake_exists="$gnatmake_exists" # Let the user override the test.
15532 ac_save_IFS=$IFS; IFS=$ac_path_separator
15534 for ac_dir in $ac_dummy; do
15536 test -z "$ac_dir" && ac_dir=.
15537 $as_executable_p "$ac_dir/$ac_word" || continue
15538 ac_cv_prog_gnatmake_exists="yes"
15539 echo "$as_me:15539: found $ac_dir/$ac_word" >&5
15543 test -z "$ac_cv_prog_gnatmake_exists" && ac_cv_prog_gnatmake_exists="no"
15546 gnatmake_exists=$ac_cv_prog_gnatmake_exists
15547 if test -n "$gnatmake_exists"; then
15548 echo "$as_me:15548: result: $gnatmake_exists" >&5
15549 echo "${ECHO_T}$gnatmake_exists" >&6
15551 echo "$as_me:15551: result: no" >&5
15552 echo "${ECHO_T}no" >&6
15555 if test "$ac_cv_prog_gnatmake_exists" = no; then
15557 cf_cv_prog_gnat_correct=no
15559 # Extract the first word of "gprconfig", so it can be a program name with args.
15560 set dummy gprconfig; ac_word=$2
15561 echo "$as_me:15561: checking for $ac_word" >&5
15562 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15563 if test "${ac_cv_prog_gprconfig_exists+set}" = set; then
15564 echo $ECHO_N "(cached) $ECHO_C" >&6
15566 if test -n "$gprconfig_exists"; then
15567 ac_cv_prog_gprconfig_exists="$gprconfig_exists" # Let the user override the test.
15569 ac_save_IFS=$IFS; IFS=$ac_path_separator
15571 for ac_dir in $ac_dummy; do
15573 test -z "$ac_dir" && ac_dir=.
15574 $as_executable_p "$ac_dir/$ac_word" || continue
15575 ac_cv_prog_gprconfig_exists="yes"
15576 echo "$as_me:15576: found $ac_dir/$ac_word" >&5
15580 test -z "$ac_cv_prog_gprconfig_exists" && ac_cv_prog_gprconfig_exists="no"
15583 gprconfig_exists=$ac_cv_prog_gprconfig_exists
15584 if test -n "$gprconfig_exists"; then
15585 echo "$as_me:15585: result: $gprconfig_exists" >&5
15586 echo "${ECHO_T}$gprconfig_exists" >&6
15588 echo "$as_me:15588: result: no" >&5
15589 echo "${ECHO_T}no" >&6
15592 if test "$ac_cv_prog_gprconfig_exists" = yes
15594 rm -rf conftest* *~conftest*
15595 if mkdir conftest.src
15599 for cf_gprconfig in Ada C
15601 echo "$as_me:15601: checking for gprconfig name for $cf_gprconfig" >&5
15602 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
15603 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
15604 if test -n "$cf_gprconfig_value"
15606 eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
15607 echo "$as_me:15607: result: $cf_gprconfig_value" >&5
15608 echo "${ECHO_T}$cf_gprconfig_value" >&6
15610 echo "$as_me:15610: result: missing" >&5
15611 echo "${ECHO_T}missing" >&6
15617 rm -rf conftest* *~conftest*
15620 # gprconfig is newer than gnatmake; we can continue...
15623 if test "x$cf_ada_config" != "x#"
15626 echo "$as_me:15626: checking for gnat version" >&5
15627 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
15628 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
15629 grep '[0-9].[0-9][0-9]*' |\
15630 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
15631 echo "$as_me:15631: result: $cf_gnat_version" >&5
15632 echo "${ECHO_T}$cf_gnat_version" >&6
15634 case $cf_gnat_version in
15635 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
15636 cf_cv_prog_gnat_correct=yes
15639 { echo "$as_me:15639: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
15640 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
15641 cf_cv_prog_gnat_correct=no
15645 # Extract the first word of "m4", so it can be a program name with args.
15646 set dummy m4; ac_word=$2
15647 echo "$as_me:15647: checking for $ac_word" >&5
15648 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15649 if test "${ac_cv_prog_M4_exists+set}" = set; then
15650 echo $ECHO_N "(cached) $ECHO_C" >&6
15652 if test -n "$M4_exists"; then
15653 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
15655 ac_save_IFS=$IFS; IFS=$ac_path_separator
15657 for ac_dir in $ac_dummy; do
15659 test -z "$ac_dir" && ac_dir=.
15660 $as_executable_p "$ac_dir/$ac_word" || continue
15661 ac_cv_prog_M4_exists="yes"
15662 echo "$as_me:15662: found $ac_dir/$ac_word" >&5
15666 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
15669 M4_exists=$ac_cv_prog_M4_exists
15670 if test -n "$M4_exists"; then
15671 echo "$as_me:15671: result: $M4_exists" >&5
15672 echo "${ECHO_T}$M4_exists" >&6
15674 echo "$as_me:15674: result: no" >&5
15675 echo "${ECHO_T}no" >&6
15678 if test "$ac_cv_prog_M4_exists" = no; then
15679 cf_cv_prog_gnat_correct=no
15680 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
15682 if test "$cf_cv_prog_gnat_correct" = yes; then
15683 echo "$as_me:15683: checking if GNAT works" >&5
15684 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
15686 rm -rf conftest* *~conftest*
15687 cat >>conftest.ads <<CF_EOF
15688 procedure conftest;
15690 cat >>conftest.adb <<CF_EOF
15693 procedure conftest is
15695 Text_IO.Put ("Hello World");
15697 GNAT.OS_Lib.OS_Exit (0);
15700 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15701 if ( ./conftest 1>&5 2>&1 ) ; then
15702 cf_cv_prog_gnat_correct=yes
15704 cf_cv_prog_gnat_correct=no
15707 cf_cv_prog_gnat_correct=no
15709 rm -rf conftest* *~conftest*
15711 echo "$as_me:15711: result: $cf_cv_prog_gnat_correct" >&5
15712 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
15715 cf_cv_prog_gnat_correct=no
15719 if test "$cf_cv_prog_gnat_correct" = yes; then
15721 echo "$as_me:15721: checking optimization options for ADAFLAGS" >&5
15722 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
15726 ADAFLAGS="$ADAFLAGS -g"
15732 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
15734 ADAFLAGS="$ADAFLAGS $cf_O_flag"
15738 echo "$as_me:15738: result: $ADAFLAGS" >&5
15739 echo "${ECHO_T}$ADAFLAGS" >&6
15741 echo "$as_me:15741: checking if GNATPREP supports -T option" >&5
15742 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
15743 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
15744 echo $ECHO_N "(cached) $ECHO_C" >&6
15747 cf_cv_gnatprep_opt_t=no
15748 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
15751 echo "$as_me:15751: result: $cf_cv_gnatprep_opt_t" >&5
15752 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
15753 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
15755 echo "$as_me:15755: checking if GNAT supports generics" >&5
15756 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
15757 case $cf_gnat_version in
15759 cf_gnat_generics=yes
15762 cf_gnat_generics=no
15765 echo "$as_me:15765: result: $cf_gnat_generics" >&5
15766 echo "${ECHO_T}$cf_gnat_generics" >&6
15768 if test "$cf_gnat_generics" = yes
15770 cf_compile_generics=generics
15771 cf_generic_objects="\${GENOBJS}"
15773 cf_compile_generics=
15774 cf_generic_objects=
15777 echo "$as_me:15777: checking if GNAT supports SIGINT" >&5
15778 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
15779 if test "${cf_cv_gnat_sigint+set}" = set; then
15780 echo $ECHO_N "(cached) $ECHO_C" >&6
15783 rm -rf conftest* *~conftest*
15784 cat >>conftest.ads <<CF_EOF
15785 with Ada.Interrupts.Names;
15787 package ConfTest is
15789 pragma Warnings (Off); -- the next pragma exists since 3.11p
15790 pragma Unreserve_All_Interrupts;
15791 pragma Warnings (On);
15793 protected Process is
15795 function Continue return Boolean;
15796 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
15798 Done : Boolean := False;
15803 cat >>conftest.adb <<CF_EOF
15804 package body ConfTest is
15805 protected body Process is
15810 function Continue return Boolean is
15817 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15818 cf_cv_gnat_sigint=yes
15820 cf_cv_gnat_sigint=no
15822 rm -rf conftest* *~conftest*
15825 echo "$as_me:15825: result: $cf_cv_gnat_sigint" >&5
15826 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
15828 if test $cf_cv_gnat_sigint = yes ; then
15831 USE_GNAT_SIGINT="#"
15834 cf_gnat_libraries=no
15835 cf_gnat_projects=no
15837 if test "$enable_gnat_projects" != no ; then
15838 echo "$as_me:15838: checking if GNAT supports project files" >&5
15839 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
15840 case $cf_gnat_version in
15844 case $cf_cv_system_name in
15848 rm -rf conftest* *~conftest*
15849 if mkdir conftest.src conftest.bin conftest.lib
15852 rm -rf conftest* *~conftest*
15853 cat >>library.gpr <<CF_EOF
15855 Kind := External ("LIB_KIND");
15856 for Library_Name use "ConfTest";
15857 for Object_Dir use ".";
15858 for Library_ALI_Dir use External("LIBRARY_DIR");
15859 for Library_Version use External ("SONAME");
15860 for Library_Kind use Kind;
15861 for Library_Dir use External("BUILD_DIR");
15862 Source_Dir := External ("SOURCE_DIR");
15863 for Source_Dirs use (Source_Dir);
15866 cat >>confpackage.ads <<CF_EOF
15867 package ConfPackage is
15868 procedure conftest;
15871 cat >>confpackage.adb <<CF_EOF
15873 package body ConfPackage is
15874 procedure conftest is
15876 Text_IO.Put ("Hello World");
15881 if ( $cf_ada_make $ADAFLAGS \
15883 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
15884 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
15885 -XSOURCE_DIR=`pwd` \
15886 -XSONAME=libConfTest.so.1 \
15887 -XLIB_KIND=static 1>&5 2>&1 ) ; then
15888 cf_gnat_projects=yes
15892 if test -f conftest.lib/confpackage.ali
15894 cf_gnat_libraries=yes
15896 rm -rf conftest* *~conftest*
15901 echo "$as_me:15901: result: $cf_gnat_projects" >&5
15902 echo "${ECHO_T}$cf_gnat_projects" >&6
15903 fi # enable_gnat_projects
15905 if test $cf_gnat_projects = yes
15907 echo "$as_me:15907: checking if GNAT supports libraries" >&5
15908 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
15909 echo "$as_me:15909: result: $cf_gnat_libraries" >&5
15910 echo "${ECHO_T}$cf_gnat_libraries" >&6
15913 if test "$cf_gnat_projects" = yes
15915 USE_OLD_MAKERULES="#"
15916 USE_GNAT_PROJECTS=""
15918 USE_OLD_MAKERULES=""
15919 USE_GNAT_PROJECTS="#"
15922 if test "$cf_gnat_libraries" = yes
15924 USE_GNAT_LIBRARIES=""
15926 USE_GNAT_LIBRARIES="#"
15929 echo "$as_me:15929: checking for ada-compiler" >&5
15930 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
15932 # Check whether --with-ada-compiler or --without-ada-compiler was given.
15933 if test "${with_ada_compiler+set}" = set; then
15934 withval="$with_ada_compiler"
15935 cf_ada_compiler=$withval
15937 cf_ada_compiler=gnatmake
15940 echo "$as_me:15940: result: $cf_ada_compiler" >&5
15941 echo "${ECHO_T}$cf_ada_compiler" >&6
15943 cf_ada_package=terminal_interface
15945 echo "$as_me:15945: checking for ada-include" >&5
15946 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
15948 # Check whether --with-ada-include or --without-ada-include was given.
15949 if test "${with_ada_include+set}" = set; then
15950 withval="$with_ada_include"
15953 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
15954 fi; if test -n "$prefix/share/ada/adainclude" ; then
15956 if test "x$prefix" != xNONE; then
15957 cf_path_syntax="$prefix"
15959 cf_path_syntax="$ac_default_prefix"
15962 case ".$withval" in
15963 (.\$\(*\)*|.\'*\'*)
15967 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
15969 (.\${*prefix}*|.\${*dir}*)
15970 eval withval="$withval"
15971 case ".$withval" in
15973 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15978 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15981 { { echo "$as_me:15981: error: expected a pathname, not \"$withval\"" >&5
15982 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15983 { (exit 1); exit 1; }; }
15988 eval ADA_INCLUDE="$withval"
15990 echo "$as_me:15990: result: $ADA_INCLUDE" >&5
15991 echo "${ECHO_T}$ADA_INCLUDE" >&6
15993 echo "$as_me:15993: checking for ada-objects" >&5
15994 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
15996 # Check whether --with-ada-objects or --without-ada-objects was given.
15997 if test "${with_ada_objects+set}" = set; then
15998 withval="$with_ada_objects"
16001 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
16002 fi; if test -n "$prefix/lib/ada/adalib" ; then
16004 if test "x$prefix" != xNONE; then
16005 cf_path_syntax="$prefix"
16007 cf_path_syntax="$ac_default_prefix"
16010 case ".$withval" in
16011 (.\$\(*\)*|.\'*\'*)
16015 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
16017 (.\${*prefix}*|.\${*dir}*)
16018 eval withval="$withval"
16019 case ".$withval" in
16021 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16026 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16029 { { echo "$as_me:16029: error: expected a pathname, not \"$withval\"" >&5
16030 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16031 { (exit 1); exit 1; }; }
16036 eval ADA_OBJECTS="$withval"
16038 echo "$as_me:16038: result: $ADA_OBJECTS" >&5
16039 echo "${ECHO_T}$ADA_OBJECTS" >&6
16041 echo "$as_me:16041: checking if an Ada95 shared-library should be built" >&5
16042 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
16044 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
16045 if test "${with_ada_sharedlib+set}" = set; then
16046 withval="$with_ada_sharedlib"
16047 with_ada_sharedlib=$withval
16049 with_ada_sharedlib=no
16051 echo "$as_me:16051: result: $with_ada_sharedlib" >&5
16052 echo "${ECHO_T}$with_ada_sharedlib" >&6
16054 if test "x$with_ada_sharedlib" != xno
16056 if test "x$cf_gnat_projects" != xyes
16058 { echo "$as_me:16058: WARNING: disabling shared-library since GNAT projects are not supported" >&5
16059 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
16060 with_ada_sharedlib=no
16064 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
16065 MAKE_ADA_SHAREDLIB="#"
16067 if test "x$with_ada_sharedlib" != xno
16069 MAKE_ADA_SHAREDLIB=
16070 if test "x$with_ada_sharedlib" != xyes
16072 ADA_SHAREDLIB="$with_ada_sharedlib"
16077 { { echo "$as_me:16077: error: No usable Ada compiler found" >&5
16078 echo "$as_me: error: No usable Ada compiler found" >&2;}
16079 { (exit 1); exit 1; }; }
16082 { { echo "$as_me:16082: error: The Ada compiler is needed for this package" >&5
16083 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
16084 { (exit 1); exit 1; }; }
16087 ################################################################################
16094 ### Construct the list of include-directories to be generated
16096 if test "$srcdir" != "."; then
16097 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
16099 CPPFLAGS="-I../include $CPPFLAGS"
16100 if test "$srcdir" != "."; then
16101 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
16103 CPPFLAGS="-I. $CPPFLAGS"
16105 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
16106 if test "$srcdir" != "."; then
16107 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
16109 if test "$GCC" != yes; then
16110 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16111 elif test "$includedir" != "/usr/include"; then
16112 if test "$includedir" = '${prefix}/include' ; then
16113 if test x$prefix != x/usr ; then
16114 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16117 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16121 ### Build up pieces for makefile rules
16122 echo "$as_me:16122: checking default library suffix" >&5
16123 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
16125 case $DFT_LWR_MODEL in
16126 (libtool) DFT_ARG_SUFFIX='' ;;
16127 (normal) DFT_ARG_SUFFIX='' ;;
16128 (debug) DFT_ARG_SUFFIX='_g' ;;
16129 (profile) DFT_ARG_SUFFIX='_p' ;;
16130 (shared) DFT_ARG_SUFFIX='' ;;
16132 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
16133 echo "$as_me:16133: result: $DFT_ARG_SUFFIX" >&5
16134 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
16136 echo "$as_me:16136: checking default library-dependency suffix" >&5
16137 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
16139 case X$DFT_LWR_MODEL in
16141 DFT_LIB_SUFFIX='.la'
16142 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16145 DFT_LIB_SUFFIX='_g.a'
16146 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16149 DFT_LIB_SUFFIX='_p.a'
16150 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16153 case $cf_cv_system_name in
16155 DFT_LIB_SUFFIX='.so'
16156 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16158 (cygwin*|msys*|mingw*)
16159 DFT_LIB_SUFFIX='.dll'
16160 DFT_DEP_SUFFIX='.dll.a'
16163 DFT_LIB_SUFFIX='.dylib'
16164 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16169 DFT_LIB_SUFFIX='.so'
16170 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16173 DFT_LIB_SUFFIX='.sl'
16174 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16179 DFT_LIB_SUFFIX='.so'
16180 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16185 DFT_LIB_SUFFIX='.a'
16186 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16189 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
16191 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
16192 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
16194 echo "$as_me:16194: result: $DFT_DEP_SUFFIX" >&5
16195 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
16197 echo "$as_me:16197: checking default object directory" >&5
16198 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
16200 case $DFT_LWR_MODEL in
16201 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
16202 (normal) DFT_OBJ_SUBDIR='objects' ;;
16203 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
16204 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
16206 case $cf_cv_system_name in
16208 DFT_OBJ_SUBDIR='objects' ;;
16210 DFT_OBJ_SUBDIR='obj_s' ;;
16213 echo "$as_me:16213: result: $DFT_OBJ_SUBDIR" >&5
16214 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
16216 ### Set up low-level terminfo dependencies for makefiles.
16218 if test "$DFT_LWR_MODEL" = shared ; then
16219 case $cf_cv_system_name in
16221 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
16224 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
16229 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
16231 ### Construct the list of subdirectories for which we'll customize makefiles
16232 ### with the appropriate compile-rules.
16234 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
16236 cat >>confdefs.h <<EOF
16237 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
16240 ### Now that we're done running tests, add the compiler-warnings, if any
16245 cf_new_extra_cppflags=
16247 for cf_add_cflags in $EXTRA_CFLAGS
16249 case $cf_fix_cppflags in
16251 case $cf_add_cflags in
16252 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16253 case $cf_add_cflags in
16255 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16257 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16258 && test -z "${cf_tst_cflags}" \
16259 && cf_fix_cppflags=yes
16261 if test $cf_fix_cppflags = yes ; then
16263 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16264 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16267 elif test "${cf_tst_cflags}" = "\"'" ; then
16269 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16270 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16276 case "$CPPFLAGS" in
16280 case $cf_add_cflags in
16282 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16284 CPPFLAGS=`echo "$CPPFLAGS" | \
16285 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16286 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16291 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16292 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16299 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16300 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16307 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16308 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16310 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16312 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16313 && test -z "${cf_tst_cflags}" \
16314 && cf_fix_cppflags=no
16319 if test -n "$cf_new_cflags" ; then
16321 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16322 CFLAGS="${CFLAGS}$cf_new_cflags"
16326 if test -n "$cf_new_cppflags" ; then
16328 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16329 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16333 if test -n "$cf_new_extra_cppflags" ; then
16335 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16336 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16340 ################################################################################
16346 NCURSES_SHLIB2="sh -c"
16348 ADA_SUBDIRS="include gen src doc"
16349 if test "x$cf_with_tests" != "xno" ; then
16350 ADA_SUBDIRS="$ADA_SUBDIRS samples"
16352 for cf_dir in $ADA_SUBDIRS
16354 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
16361 # match layout used by make-tar.sh
16362 ADAHTML_DIR=../doc/ada
16364 if test "x$cross_compiling" = xyes ; then
16365 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
16367 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
16370 ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
16371 ac_config_commands="$ac_config_commands default"
16372 cat >confcache <<\_ACEOF
16373 # This file is a shell script that caches the results of configure
16374 # tests run on this system so they can be shared between configure
16375 # scripts and configure runs, see configure's option --config-cache.
16376 # It is not useful on other systems. If it contains results you don't
16377 # want to keep, you may remove or edit it.
16379 # config.status only pays attention to the cache file if you give it
16380 # the --recheck option to rerun configure.
16382 # `ac_cv_env_foo' variables (set or unset) will be overriden when
16383 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16384 # following values.
16388 # The following way of writing the cache mishandles newlines in values,
16389 # but we know of no workaround that is simple, portable, and efficient.
16390 # So, don't put newlines in cache variables' values.
16391 # Ultrix sh set writes to stderr and can't be redirected directly,
16392 # and sets the high bit in the cache file unless we assign to the vars.
16395 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16397 # `set' does not quote correctly, so add quotes (double-quote
16398 # substitution turns \\\\ into \\, and sed turns \\ into \).
16401 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16404 # `set' quotes correctly as required by POSIX, so do not add quotes.
16406 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16413 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16415 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16417 if cmp -s $cache_file confcache; then :; else
16418 if test -w $cache_file; then
16419 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16420 cat confcache >$cache_file
16422 echo "not updating unwritable cache $cache_file"
16427 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16428 # Let make expand exec_prefix.
16429 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16431 # VPATH may cause trouble with some makes, so we remove $(srcdir),
16432 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16433 # trailing colons and then remove the whole line if VPATH becomes empty
16434 # (actually we leave an empty line to preserve line numbers).
16435 if test "x$srcdir" = x.; then
16436 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16437 s/:*\$(srcdir):*/:/;
16438 s/:*\${srcdir}:*/:/;
16440 s/^\([^=]*=[ ]*\):*/\1/;
16446 DEFS=-DHAVE_CONFIG_H
16448 : ${CONFIG_STATUS=./config.status}
16449 ac_clean_files_save=$ac_clean_files
16450 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16451 { echo "$as_me:16451: creating $CONFIG_STATUS" >&5
16452 echo "$as_me: creating $CONFIG_STATUS" >&6;}
16453 cat >$CONFIG_STATUS <<_ACEOF
16455 # Generated automatically by configure.
16456 # Run this file to recreate the current configuration.
16457 # Compiler output produced by configure, useful for debugging
16458 # configure, is in config.log if it exists.
16461 SHELL=\${CONFIG_SHELL-$SHELL}
16462 ac_cs_invocation="\$0 \$@"
16466 cat >>$CONFIG_STATUS <<\_ACEOF
16467 # Be Bourne compatible
16468 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16471 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16475 # Name of the executable.
16476 as_me=`echo "$0" |sed 's,.*[\\/],,'`
16478 if expr a : '\(a\)' >/dev/null 2>&1; then
16484 rm -f conf$$ conf$$.exe conf$$.file
16486 if ln -s conf$$.file conf$$ 2>/dev/null; then
16487 # We could just check for DJGPP; but this test a) works b) is more generic
16488 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16489 if test -f conf$$.exe; then
16490 # Don't use ln at all; we don't have any links
16495 elif ln conf$$.file conf$$ 2>/dev/null; then
16500 rm -f conf$$ conf$$.exe conf$$.file
16502 as_executable_p="test -f"
16504 # Support unset when possible.
16505 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16512 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
16513 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
16514 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
16515 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
16516 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
16517 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
16518 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
16519 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
16522 # We need space, tab and new line, in precisely that order.
16528 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
16534 # Files that config.status was made for.
16535 if test -n "$ac_config_files"; then
16536 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16539 if test -n "$ac_config_headers"; then
16540 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16543 if test -n "$ac_config_links"; then
16544 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16547 if test -n "$ac_config_commands"; then
16548 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16551 cat >>$CONFIG_STATUS <<\EOF
16554 \`$as_me' instantiates files from templates according to the
16555 current configuration.
16557 Usage: $0 [OPTIONS] [FILE]...
16559 -h, --help print this help, then exit
16560 -V, --version print version number, then exit
16561 -d, --debug don't remove temporary files
16562 --recheck update $as_me by reconfiguring in the same conditions
16563 --file=FILE[:TEMPLATE]
16564 instantiate the configuration file FILE
16565 --header=FILE[:TEMPLATE]
16566 instantiate the configuration header FILE
16568 Configuration files:
16571 Configuration headers:
16574 Configuration commands:
16577 Report bugs to <dickey@invisible-island.net>."
16580 cat >>$CONFIG_STATUS <<EOF
16583 configured by $0, generated by GNU Autoconf 2.52.20180819,
16584 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16586 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16587 Free Software Foundation, Inc.
16588 This config.status script is free software; the Free Software Foundation
16589 gives unlimited permission to copy, distribute and modify it."
16594 cat >>$CONFIG_STATUS <<\EOF
16595 # If no file are specified by the user, then we need to provide default
16596 # value. By we need to know if files were specified by the user.
16602 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16603 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16605 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16609 *) # This is not an option, so the user has probably given explicit
16611 ac_need_defaults=false;;
16615 # Handling of the options.
16617 cat >>$CONFIG_STATUS <<EOF
16618 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16619 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16620 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16622 cat >>$CONFIG_STATUS <<\EOF
16623 --version | --vers* | -V )
16624 echo "$ac_cs_version"; exit 0 ;;
16626 # Conflict between --help and --header
16627 { { echo "$as_me:16627: error: ambiguous option: $1
16628 Try \`$0 --help' for more information." >&5
16629 echo "$as_me: error: ambiguous option: $1
16630 Try \`$0 --help' for more information." >&2;}
16631 { (exit 1); exit 1; }; };;
16632 --help | --hel | -h )
16633 echo "$ac_cs_usage"; exit 0 ;;
16634 --debug | --d* | -d )
16636 --file | --fil | --fi | --f )
16638 CONFIG_FILES="$CONFIG_FILES $1"
16639 ac_need_defaults=false;;
16640 --header | --heade | --head | --hea )
16642 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16643 ac_need_defaults=false;;
16645 # This is an error.
16646 -*) { { echo "$as_me:16646: error: unrecognized option: $1
16647 Try \`$0 --help' for more information." >&5
16648 echo "$as_me: error: unrecognized option: $1
16649 Try \`$0 --help' for more information." >&2;}
16650 { (exit 1); exit 1; }; } ;;
16652 *) ac_config_targets="$ac_config_targets $1" ;;
16661 ## ----------------------- ##
16662 ## Running config.status. ##
16663 ## ----------------------- ##
16665 This file was extended by $as_me 2.52.20180819, executed with
16666 CONFIG_FILES = $CONFIG_FILES
16667 CONFIG_HEADERS = $CONFIG_HEADERS
16668 CONFIG_LINKS = $CONFIG_LINKS
16669 CONFIG_COMMANDS = $CONFIG_COMMANDS
16670 > $ac_cs_invocation
16671 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16676 cat >>$CONFIG_STATUS <<EOF
16678 # INIT-COMMANDS section.
16681 ### Special initialization commands, used to pass information from the
16682 ### configuration-run into config.status
16685 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
16686 DFT_LWR_MODEL="$DFT_LWR_MODEL"
16687 LIB_NAME="$LIB_NAME"
16688 LIB_PREFIX="$LIB_PREFIX"
16689 LIB_SUFFIX="$LIB_SUFFIX"
16691 NCURSES_MAJOR="$NCURSES_MAJOR"
16692 NCURSES_MINOR="$NCURSES_MINOR"
16693 NCURSES_PATCH="$NCURSES_PATCH"
16694 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
16695 cf_cv_abi_version="$cf_cv_abi_version"
16696 cf_cv_rel_version="$cf_cv_rel_version"
16697 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
16698 cf_cv_shared_soname='$cf_cv_shared_soname'
16699 cf_cv_shlib_version="$cf_cv_shlib_version"
16700 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
16701 cf_cv_system_name="$cf_cv_system_name"
16707 cat >>$CONFIG_STATUS <<\EOF
16708 for ac_config_target in $ac_config_targets
16710 case "$ac_config_target" in
16711 # Handling of arguments.
16712 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
16713 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
16714 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16715 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16716 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
16717 *) { { echo "$as_me:16717: error: invalid argument: $ac_config_target" >&5
16718 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16719 { (exit 1); exit 1; }; };;
16723 # If the user did not use the arguments to specify the items to instantiate,
16724 # then the envvar interface is used. Set only those that are not.
16725 # We use the long form for the default assignment because of an extremely
16726 # bizarre bug on SunOS 4.1.3.
16727 if $ac_need_defaults; then
16728 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16729 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16730 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16733 # Create a temporary directory, and hook for its removal unless debugging.
16736 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16737 trap '{ (exit 1); exit 1; }' 1 2 13 15
16740 # Create a (secure) tmp directory for tmp files.
16743 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16744 test -n "$tmp" && test -d "$tmp"
16747 tmp=$TMPDIR/cs$$-$RANDOM
16748 (umask 077 && mkdir $tmp)
16751 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16752 { (exit 1); exit 1; }
16757 cat >>$CONFIG_STATUS <<EOF
16760 # CONFIG_FILES section.
16763 # No need to generate the scripts if there are no CONFIG_FILES.
16764 # This happens for instance when ./config.status config.h
16765 if test -n "\$CONFIG_FILES"; then
16766 # Protect against being on the right side of a sed subst in config.status.
16767 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16768 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16769 s,@SHELL@,$SHELL,;t t
16770 s,@exec_prefix@,$exec_prefix,;t t
16771 s,@prefix@,$prefix,;t t
16772 s,@program_transform_name@,$program_transform_name,;t t
16773 s,@bindir@,$bindir,;t t
16774 s,@sbindir@,$sbindir,;t t
16775 s,@libexecdir@,$libexecdir,;t t
16776 s,@datarootdir@,$datarootdir,;t t
16777 s,@datadir@,$datadir,;t t
16778 s,@sysconfdir@,$sysconfdir,;t t
16779 s,@sharedstatedir@,$sharedstatedir,;t t
16780 s,@localstatedir@,$localstatedir,;t t
16781 s,@runstatedir@,$runstatedir,;t t
16782 s,@libdir@,$libdir,;t t
16783 s,@includedir@,$includedir,;t t
16784 s,@oldincludedir@,$oldincludedir,;t t
16785 s,@infodir@,$infodir,;t t
16786 s,@mandir@,$mandir,;t t
16787 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16788 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16789 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16790 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16791 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16792 s,@build_alias@,$build_alias,;t t
16793 s,@host_alias@,$host_alias,;t t
16794 s,@target_alias@,$target_alias,;t t
16795 s,@ECHO_C@,$ECHO_C,;t t
16796 s,@ECHO_N@,$ECHO_N,;t t
16797 s,@ECHO_T@,$ECHO_T,;t t
16798 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16799 s,@DEFS@,$DEFS,;t t
16800 s,@LIBS@,$LIBS,;t t
16801 s,@top_builddir@,$top_builddir,;t t
16802 s,@build@,$build,;t t
16803 s,@build_cpu@,$build_cpu,;t t
16804 s,@build_vendor@,$build_vendor,;t t
16805 s,@build_os@,$build_os,;t t
16806 s,@host@,$host,;t t
16807 s,@host_cpu@,$host_cpu,;t t
16808 s,@host_vendor@,$host_vendor,;t t
16809 s,@host_os@,$host_os,;t t
16810 s,@target@,$target,;t t
16811 s,@target_cpu@,$target_cpu,;t t
16812 s,@target_vendor@,$target_vendor,;t t
16813 s,@target_os@,$target_os,;t t
16815 s,@CFLAGS@,$CFLAGS,;t t
16816 s,@LDFLAGS@,$LDFLAGS,;t t
16817 s,@CPPFLAGS@,$CPPFLAGS,;t t
16818 s,@ac_ct_CC@,$ac_ct_CC,;t t
16819 s,@EXEEXT@,$EXEEXT,;t t
16820 s,@OBJEXT@,$OBJEXT,;t t
16821 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
16824 s,@EGREP@,$EGREP,;t t
16825 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16826 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16827 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16828 s,@LN_S@,$LN_S,;t t
16829 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
16830 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
16831 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
16832 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
16833 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
16834 s,@SET_MAKE@,$SET_MAKE,;t t
16835 s,@CTAGS@,$CTAGS,;t t
16836 s,@ETAGS@,$ETAGS,;t t
16837 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
16838 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
16839 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
16840 s,@RANLIB@,$RANLIB,;t t
16841 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16843 s,@ac_ct_LD@,$ac_ct_LD,;t t
16845 s,@ac_ct_AR@,$ac_ct_AR,;t t
16846 s,@ARFLAGS@,$ARFLAGS,;t t
16847 s,@DESTDIR@,$DESTDIR,;t t
16848 s,@BUILD_CC@,$BUILD_CC,;t t
16849 s,@BUILD_CPP@,$BUILD_CPP,;t t
16850 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
16851 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
16852 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
16853 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
16854 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
16855 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
16856 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
16857 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
16858 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
16859 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
16860 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
16861 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
16862 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
16863 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
16864 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
16865 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
16866 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
16867 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
16868 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
16869 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
16870 s,@CC_G_OPT@,$CC_G_OPT,;t t
16871 s,@LD_MODEL@,$LD_MODEL,;t t
16872 s,@shlibdir@,$shlibdir,;t t
16873 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
16874 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
16875 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
16876 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
16877 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
16878 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
16879 s,@LINK_PROGS@,$LINK_PROGS,;t t
16880 s,@LINK_TESTS@,$LINK_TESTS,;t t
16881 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16882 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
16883 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
16884 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
16885 s,@RPATH_LIST@,$RPATH_LIST,;t t
16886 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
16887 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
16888 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
16889 s,@PTHREAD@,$PTHREAD,;t t
16890 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
16891 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
16892 s,@ECHO_LT@,$ECHO_LT,;t t
16893 s,@ECHO_LD@,$ECHO_LD,;t t
16894 s,@RULE_CC@,$RULE_CC,;t t
16895 s,@SHOW_CC@,$SHOW_CC,;t t
16896 s,@ECHO_CC@,$ECHO_CC,;t t
16897 s,@ADAFLAGS@,$ADAFLAGS,;t t
16898 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
16899 s,@ADA_TRACE@,$ADA_TRACE,;t t
16900 s,@gnatmake_exists@,$gnatmake_exists,;t t
16901 s,@gprconfig_exists@,$gprconfig_exists,;t t
16902 s,@M4_exists@,$M4_exists,;t t
16903 s,@cf_ada_make@,$cf_ada_make,;t t
16904 s,@cf_ada_config@,$cf_ada_config,;t t
16905 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
16906 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
16907 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
16908 s,@cf_compile_generics@,$cf_compile_generics,;t t
16909 s,@cf_generic_objects@,$cf_generic_objects,;t t
16910 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
16911 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
16912 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
16913 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
16914 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
16915 s,@cf_ada_package@,$cf_ada_package,;t t
16916 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
16917 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
16918 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
16919 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
16920 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
16921 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
16922 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
16923 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
16924 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
16925 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
16926 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
16927 s,@TEST_ARG2@,$TEST_ARG2,;t t
16928 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
16929 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
16930 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
16931 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
16932 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
16933 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
16934 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
16939 cat >>$CONFIG_STATUS <<\EOF
16940 # Split the substitutions into bite-sized pieces for seds with
16941 # small command number limits, like on Digital OSF/1 and HP-UX.
16942 ac_max_sed_lines=48
16943 ac_sed_frag=1 # Number of current file.
16944 ac_beg=1 # First line for current file.
16945 ac_end=$ac_max_sed_lines # Line after last line for current file.
16948 while $ac_more_lines; do
16949 if test $ac_beg -gt 1; then
16950 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16952 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16954 if test ! -s $tmp/subs.frag; then
16955 ac_more_lines=false
16957 # The purpose of the label and of the branching condition is to
16958 # speed up the sed processing (if there are no `@' at all, there
16959 # is no need to browse any of the substitutions).
16960 # These are the two extra sed commands mentioned above.
16962 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16963 # It is possible to make a multiline substitution using escaped newlines.
16964 # Ensure that we do not split the substitution between script fragments.
16966 ac_END=`expr $ac_end + $ac_max_sed_lines`
16967 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
16968 if test -s $tmp/subs.next; then
16969 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
16970 if test ! -s $tmp/subs.edit; then
16971 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
16972 if test ! -s $tmp/subs.edit; then
16973 if test $ac_beg -gt 1; then
16974 ac_end=`expr $ac_end - 1`
16981 if test -z "$ac_sed_cmds"; then
16982 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16984 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16986 ac_sed_frag=`expr $ac_sed_frag + 1`
16988 ac_end=`expr $ac_end + $ac_max_sed_lines`
16991 if test -z "$ac_sed_cmds"; then
16994 fi # test -n "$CONFIG_FILES"
16997 cat >>$CONFIG_STATUS <<\EOF
16998 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16999 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17001 - | *:- | *:-:* ) # input from stdin
17003 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17004 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17005 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17006 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17007 * ) ac_file_in=$ac_file.in ;;
17010 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17011 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17012 X"$ac_file" : 'X\(//\)[^/]' \| \
17013 X"$ac_file" : 'X\(//\)$' \| \
17014 X"$ac_file" : 'X\(/\)' \| \
17015 . : '\(.\)' 2>/dev/null ||
17017 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17018 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17019 /^X\(\/\/\)$/{ s//\1/; q; }
17020 /^X\(\/\).*/{ s//\1/; q; }
17022 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17023 { case "$ac_dir" in
17024 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17028 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17029 case $as_mkdir_dir in
17030 # Skip DOS drivespec
17031 ?:) as_incr_dir=$as_mkdir_dir ;;
17033 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17034 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17039 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
17040 # A "../" for each directory in $ac_dir_suffix.
17041 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
17043 ac_dir_suffix= ac_dots=
17048 if test -z "$ac_dots"; then
17051 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
17053 [\\/]* | ?:[\\/]* )
17054 ac_srcdir=$srcdir$ac_dir_suffix;
17055 ac_top_srcdir=$srcdir ;;
17056 *) # Relative path.
17057 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
17058 ac_top_srcdir=$ac_dots$srcdir ;;
17062 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17063 *) ac_INSTALL=$ac_dots$INSTALL ;;
17066 if test x"$ac_file" != x-; then
17067 { echo "$as_me:17067: creating $ac_file" >&5
17068 echo "$as_me: creating $ac_file" >&6;}
17071 # Let's still pretend it is `configure' which instantiates (i.e., don't
17072 # use $as_me), people would be surprised to read:
17073 # /* config.h. Generated automatically by config.status. */
17074 configure_input="Generated automatically from `echo $ac_file_in |
17075 sed 's,.*/,,'` by configure."
17077 # First look for the input files in the build tree, otherwise in the
17079 ac_file_inputs=`IFS=:
17080 for f in $ac_file_in; do
17082 -) echo $tmp/stdin ;;
17084 # Absolute (can't be DOS-style, as IFS=:)
17085 test -f "$f" || { { echo "$as_me:17085: error: cannot find input file: $f" >&5
17086 echo "$as_me: error: cannot find input file: $f" >&2;}
17087 { (exit 1); exit 1; }; }
17090 if test -f "$f"; then
17093 elif test -f "$srcdir/$f"; then
17098 { { echo "$as_me:17098: error: cannot find input file: $f" >&5
17099 echo "$as_me: error: cannot find input file: $f" >&2;}
17100 { (exit 1); exit 1; }; }
17103 done` || { (exit 1); exit 1; }
17105 cat >>$CONFIG_STATUS <<\EOF
17106 ac_warn_datarootdir=no
17107 if test x"$ac_file" != x-; then
17108 for ac_item in $ac_file_inputs
17110 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
17111 if test -n "$ac_seen"; then
17112 ac_used=`grep '@datarootdir@' $ac_item`
17113 if test -z "$ac_used"; then
17114 { echo "$as_me:17114: WARNING: datarootdir was used implicitly but not set:
17116 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
17118 ac_warn_datarootdir=yes
17121 ac_seen=`grep '${datarootdir}' $ac_item`
17122 if test -n "$ac_seen"; then
17123 { echo "$as_me:17123: WARNING: datarootdir was used explicitly but not set:
17125 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
17127 ac_warn_datarootdir=yes
17132 if test "x$ac_warn_datarootdir" = xyes; then
17133 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
17137 cat >>$CONFIG_STATUS <<EOF
17141 cat >>$CONFIG_STATUS <<\EOF
17143 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17144 s,@configure_input@,$configure_input,;t t
17145 s,@srcdir@,$ac_srcdir,;t t
17146 s,@top_srcdir@,$ac_top_srcdir,;t t
17147 s,@INSTALL@,$ac_INSTALL,;t t
17148 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17150 if test x"$ac_file" != x-; then
17151 cp $tmp/out $ac_file
17153 for ac_name in prefix exec_prefix datarootdir
17155 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
17156 if test -n "$ac_seen"; then
17157 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
17158 if test -z "$ac_init"; then
17159 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
17160 { echo "$as_me:17160: WARNING: Variable $ac_name is used but was not set:
17162 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
17167 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
17168 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
17169 if test -s $tmp/out; then
17170 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
17171 { echo "$as_me:17171: WARNING: Some variables may not be substituted:
17173 echo "$as_me: WARNING: Some variables may not be substituted:
17183 cat >>$CONFIG_STATUS <<\EOF
17186 # CONFIG_HEADER section.
17189 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17190 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17192 # ac_d sets the value in "#define NAME VALUE" lines.
17193 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17194 ac_dB='[ ].*$,\1#\2'
17197 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17198 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17199 ac_iB='\([ ]\),\1#\2define\3'
17202 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17203 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17204 ac_uB='$,\1#\2define\3'
17208 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
17209 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17211 - | *:- | *:-:* ) # input from stdin
17213 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17214 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17215 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17216 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17217 * ) ac_file_in=$ac_file.in ;;
17220 test x"$ac_file" != x- && { echo "$as_me:17220: creating $ac_file" >&5
17221 echo "$as_me: creating $ac_file" >&6;}
17223 # First look for the input files in the build tree, otherwise in the
17225 ac_file_inputs=`IFS=:
17226 for f in $ac_file_in; do
17228 -) echo $tmp/stdin ;;
17230 # Absolute (can't be DOS-style, as IFS=:)
17231 test -f "$f" || { { echo "$as_me:17231: error: cannot find input file: $f" >&5
17232 echo "$as_me: error: cannot find input file: $f" >&2;}
17233 { (exit 1); exit 1; }; }
17236 if test -f "$f"; then
17239 elif test -f "$srcdir/$f"; then
17244 { { echo "$as_me:17244: error: cannot find input file: $f" >&5
17245 echo "$as_me: error: cannot find input file: $f" >&2;}
17246 { (exit 1); exit 1; }; }
17249 done` || { (exit 1); exit 1; }
17250 # Remove the trailing spaces.
17251 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
17255 # Transform confdefs.h into a list of #define's. We won't use it as a sed
17256 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
17257 # be either 'cat' or 'sort'.
17258 cat confdefs.h | uniq >conftest.vals
17260 # Break up conftest.vals because some shells have a limit on
17261 # the size of here documents, and old seds have small limits too.
17263 rm -f conftest.tail
17264 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
17265 while grep . conftest.vals >/dev/null
17267 # Write chunks of a limited-size here document to conftest.frag.
17268 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
17269 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
17270 echo 'CEOF' >> $CONFIG_STATUS
17271 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17272 rm -f conftest.vals
17273 mv conftest.tail conftest.vals
17275 rm -f conftest.vals
17277 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
17279 echo ' cat >> conftest.edit <<CEOF
17280 /@DEFS@/r conftest.frag
17283 sed -f conftest.edit $tmp/in > $tmp/out
17285 mv $tmp/out $tmp/in
17286 rm -f conftest.edit conftest.frag
17287 ' >> $CONFIG_STATUS
17289 cat >>$CONFIG_STATUS <<\EOF
17290 # Let's still pretend it is `configure' which instantiates (i.e., don't
17291 # use $as_me), people would be surprised to read:
17292 # /* config.h. Generated automatically by config.status. */
17293 if test x"$ac_file" = x-; then
17294 echo "/* Generated automatically by configure. */" >$tmp/config.h
17296 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
17298 cat $tmp/in >>$tmp/config.h
17300 if test x"$ac_file" != x-; then
17301 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17302 { echo "$as_me:17302: $ac_file is unchanged" >&5
17303 echo "$as_me: $ac_file is unchanged" >&6;}
17305 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17306 X"$ac_file" : 'X\(//\)[^/]' \| \
17307 X"$ac_file" : 'X\(//\)$' \| \
17308 X"$ac_file" : 'X\(/\)' \| \
17309 . : '\(.\)' 2>/dev/null ||
17311 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17312 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17313 /^X\(\/\/\)$/{ s//\1/; q; }
17314 /^X\(\/\).*/{ s//\1/; q; }
17316 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17317 { case "$ac_dir" in
17318 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17322 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17323 case $as_mkdir_dir in
17324 # Skip DOS drivespec
17325 ?:) as_incr_dir=$as_mkdir_dir ;;
17327 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17328 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17335 mv $tmp/config.h $ac_file
17339 rm -f $tmp/config.h
17343 cat >>$CONFIG_STATUS <<\EOF
17345 # CONFIG_COMMANDS section.
17347 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17348 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17349 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17353 if test -z "$USE_OLD_MAKERULES" ; then
17354 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
17361 cat >>$CONFIG_STATUS <<\EOF
17363 { (exit 0); exit 0; }
17365 chmod +x $CONFIG_STATUS
17366 ac_clean_files=$ac_clean_files_save
17368 # configure is writing to config.log, and then calls config.status.
17369 # config.status does its own redirection, appending to config.log.
17370 # Unfortunately, on DOS this fails, as config.log is still kept open
17371 # by configure, so config.status won't be able to write to it; its
17372 # output is simply discarded. So we exec the FD to /dev/null,
17373 # effectively closing config.log, so it can be properly (re)opened and
17374 # appended to by config.status. When coming back to configure, we
17375 # need to make the FD available again.
17376 if test "$no_create" != yes; then
17379 $SHELL $CONFIG_STATUS || ac_cs_success=false
17381 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17382 # would make configure fail if this is the last instruction.
17383 $ac_cs_success || { (exit 1); exit 1; }
17385 ${MAKE:-make} preinstall