2 # From configure.in Revision: 1.78 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20200802.
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-warnings test: turn on gcc compiler warnings
742 --enable-assertions test: turn on generation of assertion code
743 --enable-expanded test: generate functions for certain macros
744 --disable-macros test: use functions rather than macros
745 --with-trace test: add trace() function to all models of ncurses
746 --disable-gnat-projects test: disable GNAT projects even if usable
747 Ada95 Binding Options:
748 --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
749 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
750 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
751 --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
752 --with-ada-libname=XXX override default Ada library-name
754 Some influential environment variables:
755 CC C compiler command
756 CFLAGS C compiler flags
757 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
758 nonstandard directory <lib dir>
759 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
760 headers in a nonstandard directory <include dir>
763 Use these variables to override the choices made by `configure' or to help
764 it to find libraries and programs with nonstandard names/locations.
769 if test "$ac_init_help" = "recursive"; then
770 # If there are subdirs, report their specific --help.
772 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
774 # A "../" for each directory in /$ac_subdir.
775 ac_dots=`echo $ac_subdir |
776 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
779 .) # No --srcdir option. We are building in place.
780 ac_sub_srcdir=$srcdir ;;
781 [\\/]* | ?:[\\/]* ) # Absolute path.
782 ac_sub_srcdir=$srcdir/$ac_subdir ;;
784 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
787 # Check for guested configure; otherwise get Cygnus style configure.
788 if test -f $ac_sub_srcdir/configure.gnu; then
790 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
791 elif test -f $ac_sub_srcdir/configure; then
793 $SHELL $ac_sub_srcdir/configure --help=recursive
794 elif test -f $ac_sub_srcdir/configure.ac ||
795 test -f $ac_sub_srcdir/configure.in; then
799 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
805 test -n "$ac_init_help" && exit 0
806 if $ac_init_version; then
809 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
810 Free Software Foundation, Inc.
811 This configure script is free software; the Free Software Foundation
812 gives unlimited permission to copy, distribute and modify it.
818 This file contains any messages produced by compilers while
819 running configure, to aid debugging if configure makes a mistake.
821 It was created by $as_me, which was
822 generated by GNU Autoconf 2.52.20200802. Invocation command line was
833 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
834 uname -m = `(uname -m) 2>/dev/null || echo unknown`
835 uname -r = `(uname -r) 2>/dev/null || echo unknown`
836 uname -s = `(uname -s) 2>/dev/null || echo unknown`
837 uname -v = `(uname -v) 2>/dev/null || echo unknown`
839 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
840 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
842 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
843 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
844 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
845 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
846 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
847 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
848 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
862 # Keep a trace of the command line.
863 # Strip out --no-create and --no-recursion so they do not pile up.
864 # Also quote any args containing shell meta-characters.
870 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
871 | --no-cr | --no-c) ;;
872 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
873 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
874 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
875 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
876 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
878 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
881 # Get rid of the leading space.
884 # When interrupted or exit'd, cleanup temporary files, and complete
885 # config.log. We remove comments because anyway the quotes in there
886 # would cause problems or look ugly.
888 # Save into config.log some information that might help in debugging.
890 echo "## ----------------- ##" >&5
891 echo "## Cache variables. ##" >&5
892 echo "## ----------------- ##" >&5
894 # The following way of writing the cache mishandles newlines in values,
897 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
900 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
901 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
905 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
909 sed "/^$/d" confdefs.h >conftest.log
910 if test -s conftest.log; then
912 echo "## ------------ ##" >&5
913 echo "## confdefs.h. ##" >&5
914 echo "## ------------ ##" >&5
919 test "$ac_signal" != 0 &&
920 echo "$as_me: caught signal $ac_signal" >&5
921 echo "$as_me: exit $exit_status" >&5
922 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
925 for ac_signal in 1 2 13 15; do
926 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
930 # confdefs.h avoids OS command line length limits that DEFS can exceed.
931 rm -rf conftest* confdefs.h
932 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
935 # Let the site file select an alternate cache file if it wants to.
936 # Prefer explicitly selected file to automatically selected ones.
937 if test -z "$CONFIG_SITE"; then
938 if test "x$prefix" != xNONE; then
939 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
941 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
944 for ac_site_file in $CONFIG_SITE; do
945 if test -r "$ac_site_file"; then
946 { echo "$as_me:946: loading site script $ac_site_file" >&5
947 echo "$as_me: loading site script $ac_site_file" >&6;}
948 cat "$ac_site_file" >&5
953 if test -r "$cache_file"; then
954 # Some versions of bash will fail to source /dev/null (special
955 # files actually), so we avoid doing that.
956 if test -f "$cache_file"; then
957 { echo "$as_me:957: loading cache $cache_file" >&5
958 echo "$as_me: loading cache $cache_file" >&6;}
960 [\\/]* | ?:[\\/]* ) . $cache_file;;
965 { echo "$as_me:965: creating cache $cache_file" >&5
966 echo "$as_me: creating cache $cache_file" >&6;}
970 # Check that the precious variables saved in the cache have kept the same
972 ac_cache_corrupted=false
973 for ac_var in `(set) 2>&1 |
974 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
975 eval ac_old_set=\$ac_cv_env_${ac_var}_set
976 eval ac_new_set=\$ac_env_${ac_var}_set
977 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
978 eval ac_new_val="\$ac_env_${ac_var}_value"
979 case $ac_old_set,$ac_new_set in
981 { echo "$as_me:981: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
982 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
983 ac_cache_corrupted=: ;;
985 { echo "$as_me:985: error: \`$ac_var' was not set in the previous run" >&5
986 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
987 ac_cache_corrupted=: ;;
990 if test "x$ac_old_val" != "x$ac_new_val"; then
991 { echo "$as_me:991: error: \`$ac_var' has changed since the previous run:" >&5
992 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
993 { echo "$as_me:993: former value: $ac_old_val" >&5
994 echo "$as_me: former value: $ac_old_val" >&2;}
995 { echo "$as_me:995: current value: $ac_new_val" >&5
996 echo "$as_me: current value: $ac_new_val" >&2;}
1000 # Pass precious variables to config.status. It doesn't matter if
1001 # we pass some twice (in addition to the command line arguments).
1002 if test "$ac_new_set" = set; then
1004 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1005 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1006 ac_configure_args="$ac_configure_args '$ac_arg'"
1008 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1013 if $ac_cache_corrupted; then
1014 { echo "$as_me:1014: error: changes in the environment can compromise the build" >&5
1015 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1016 { { echo "$as_me:1016: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1017 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1018 { (exit 1); exit 1; }; }
1022 ac_cpp='$CPP $CPPFLAGS'
1023 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1024 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1025 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1026 ac_main_return=return
1028 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1029 *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1031 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1032 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
1034 echo "#! $SHELL" >conftest.sh
1035 echo "exit 0" >>conftest.sh
1036 chmod +x conftest.sh
1037 if { (echo "$as_me:1037: PATH=\".;.\"; conftest.sh") >&5
1038 (PATH=".;."; conftest.sh) 2>&5
1040 echo "$as_me:1040: \$? = $ac_status" >&5
1041 (exit $ac_status); }; then
1042 ac_path_separator=';'
1046 PATH_SEPARATOR="$ac_path_separator"
1049 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1054 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1055 if test -f $ac_dir/install-sh; then
1057 ac_install_sh="$ac_aux_dir/install-sh -c"
1059 elif test -f $ac_dir/install.sh; then
1061 ac_install_sh="$ac_aux_dir/install.sh -c"
1063 elif test -f $ac_dir/shtool; then
1065 ac_install_sh="$ac_aux_dir/shtool install -c"
1069 if test -z "$ac_aux_dir"; then
1070 { { echo "$as_me:1070: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1071 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1072 { (exit 1); exit 1; }; }
1074 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1075 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1076 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1078 # Make sure we can run config.sub.
1079 $ac_config_sub sun4 >/dev/null 2>&1 ||
1080 { { echo "$as_me:1080: error: cannot run $ac_config_sub" >&5
1081 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1082 { (exit 1); exit 1; }; }
1084 echo "$as_me:1084: checking build system type" >&5
1085 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1086 if test "${ac_cv_build+set}" = set; then
1087 echo $ECHO_N "(cached) $ECHO_C" >&6
1089 ac_cv_build_alias=$build_alias
1090 test -z "$ac_cv_build_alias" &&
1091 ac_cv_build_alias=`$ac_config_guess`
1092 test -z "$ac_cv_build_alias" &&
1093 { { echo "$as_me:1093: error: cannot guess build type; you must specify one" >&5
1094 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1095 { (exit 1); exit 1; }; }
1096 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1097 { { echo "$as_me:1097: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1098 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1099 { (exit 1); exit 1; }; }
1102 echo "$as_me:1102: result: $ac_cv_build" >&5
1103 echo "${ECHO_T}$ac_cv_build" >&6
1105 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1106 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1107 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1109 echo "$as_me:1109: checking host system type" >&5
1110 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1111 if test "${ac_cv_host+set}" = set; then
1112 echo $ECHO_N "(cached) $ECHO_C" >&6
1114 ac_cv_host_alias=$host_alias
1115 test -z "$ac_cv_host_alias" &&
1116 ac_cv_host_alias=$ac_cv_build_alias
1117 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1118 { { echo "$as_me:1118: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1119 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1120 { (exit 1); exit 1; }; }
1123 echo "$as_me:1123: result: $ac_cv_host" >&5
1124 echo "${ECHO_T}$ac_cv_host" >&6
1126 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1127 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1128 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1130 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1131 echo "$as_me:1131: checking target system type" >&5
1132 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1133 if test "${ac_cv_target+set}" = set; then
1134 echo $ECHO_N "(cached) $ECHO_C" >&6
1136 ac_cv_target_alias=$target_alias
1137 test "x$ac_cv_target_alias" = "x" &&
1138 ac_cv_target_alias=$ac_cv_host_alias
1139 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1140 { { echo "$as_me:1140: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1141 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1142 { (exit 1); exit 1; }; }
1145 echo "$as_me:1145: result: $ac_cv_target" >&5
1146 echo "${ECHO_T}$ac_cv_target" >&6
1147 target=$ac_cv_target
1148 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1149 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1150 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1152 # The aliases save the names the user supplied, while $host etc.
1153 # will get canonicalized.
1154 test -n "$target_alias" &&
1155 test "$program_prefix$program_suffix$program_transform_name" = \
1157 program_prefix=${target_alias}-
1158 system_name="$host_os"
1160 system_name="`(uname -s -r) 2>/dev/null`"
1161 if test -z "$system_name" ; then
1162 system_name="`(hostname) 2>/dev/null`"
1165 test -n "$system_name" &&
1166 cat >>confdefs.h <<EOF
1167 #define SYSTEM_NAME "$system_name"
1170 if test "${cf_cv_system_name+set}" = set; then
1171 echo $ECHO_N "(cached) $ECHO_C" >&6
1173 cf_cv_system_name="$system_name"
1176 test -z "$system_name" && system_name="$cf_cv_system_name"
1177 test -n "$cf_cv_system_name" && echo "$as_me:1177: result: Configuring for $cf_cv_system_name" >&5
1178 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1180 if test ".$system_name" != ".$cf_cv_system_name" ; then
1181 echo "$as_me:1181: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1182 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1183 { { echo "$as_me:1183: error: \"Please remove config.cache and try again.\"" >&5
1184 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1185 { (exit 1); exit 1; }; }
1188 # Check whether --with-system-type or --without-system-type was given.
1189 if test "${with_system_type+set}" = set; then
1190 withval="$with_system_type"
1191 { echo "$as_me:1191: WARNING: overriding system type to $withval" >&5
1192 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1193 cf_cv_system_name=$withval
1198 ### Save the given $CFLAGS to allow user-override.
1199 cf_user_CFLAGS="$CFLAGS"
1201 ### Default install-location
1203 echo "$as_me:1203: checking for prefix" >&5
1204 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1205 if test "x$prefix" = "xNONE" ; then
1206 case "$cf_cv_system_name" in
1207 # non-vendor systems don't have a conflict
1208 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1211 (*) prefix=$ac_default_prefix
1215 echo "$as_me:1215: result: $prefix" >&5
1216 echo "${ECHO_T}$prefix" >&6
1218 if test "x$prefix" = "xNONE" ; then
1219 echo "$as_me:1219: checking for default include-directory" >&5
1220 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1221 test -n "$verbose" && echo 1>&6
1224 $includedir/ncurses \
1226 $prefix/include/ncurses \
1227 /usr/local/include \
1228 /usr/local/include/ncurses \
1230 /usr/include/ncurses
1232 cf_dir=`eval echo $cf_symbol`
1233 if test -f $cf_dir/curses.h ; then
1234 if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1235 includedir="$cf_symbol"
1236 test -n "$verbose" && echo $ac_n " found " 1>&6
1240 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1242 echo "$as_me:1242: result: $includedir" >&5
1243 echo "${ECHO_T}$includedir" >&6
1246 ### Checks for programs.
1249 ac_cpp='$CPP $CPPFLAGS'
1250 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1251 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1252 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1253 ac_main_return=return
1254 if test -n "$ac_tool_prefix"; then
1255 for ac_prog in gnatgcc gcc cc
1257 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1258 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1259 echo "$as_me:1259: checking for $ac_word" >&5
1260 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1261 if test "${ac_cv_prog_CC+set}" = set; then
1262 echo $ECHO_N "(cached) $ECHO_C" >&6
1264 if test -n "$CC"; then
1265 ac_cv_prog_CC="$CC" # Let the user override the test.
1267 ac_save_IFS=$IFS; IFS=$ac_path_separator
1269 for ac_dir in $ac_dummy; do
1271 test -z "$ac_dir" && ac_dir=.
1272 $as_executable_p "$ac_dir/$ac_word" || continue
1273 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1274 echo "$as_me:1274: found $ac_dir/$ac_word" >&5
1281 if test -n "$CC"; then
1282 echo "$as_me:1282: result: $CC" >&5
1283 echo "${ECHO_T}$CC" >&6
1285 echo "$as_me:1285: result: no" >&5
1286 echo "${ECHO_T}no" >&6
1289 test -n "$CC" && break
1292 if test -z "$CC"; then
1294 for ac_prog in gnatgcc gcc cc
1296 # Extract the first word of "$ac_prog", so it can be a program name with args.
1297 set dummy $ac_prog; ac_word=$2
1298 echo "$as_me:1298: checking for $ac_word" >&5
1299 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1300 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1301 echo $ECHO_N "(cached) $ECHO_C" >&6
1303 if test -n "$ac_ct_CC"; then
1304 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1306 ac_save_IFS=$IFS; IFS=$ac_path_separator
1308 for ac_dir in $ac_dummy; do
1310 test -z "$ac_dir" && ac_dir=.
1311 $as_executable_p "$ac_dir/$ac_word" || continue
1312 ac_cv_prog_ac_ct_CC="$ac_prog"
1313 echo "$as_me:1313: found $ac_dir/$ac_word" >&5
1319 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1320 if test -n "$ac_ct_CC"; then
1321 echo "$as_me:1321: result: $ac_ct_CC" >&5
1322 echo "${ECHO_T}$ac_ct_CC" >&6
1324 echo "$as_me:1324: result: no" >&5
1325 echo "${ECHO_T}no" >&6
1328 test -n "$ac_ct_CC" && break
1334 test -z "$CC" && { { echo "$as_me:1334: error: no acceptable cc found in \$PATH" >&5
1335 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1336 { (exit 1); exit 1; }; }
1338 # Provide some information about the compiler.
1339 echo "$as_me:1339:" \
1340 "checking for C compiler version" >&5
1341 ac_compiler=`set X $ac_compile; echo $2`
1342 { (eval echo "$as_me:1342: \"$ac_compiler --version </dev/null >&5\"") >&5
1343 (eval $ac_compiler --version </dev/null >&5) 2>&5
1345 echo "$as_me:1345: \$? = $ac_status" >&5
1346 (exit $ac_status); }
1347 { (eval echo "$as_me:1347: \"$ac_compiler -v </dev/null >&5\"") >&5
1348 (eval $ac_compiler -v </dev/null >&5) 2>&5
1350 echo "$as_me:1350: \$? = $ac_status" >&5
1351 (exit $ac_status); }
1352 { (eval echo "$as_me:1352: \"$ac_compiler -V </dev/null >&5\"") >&5
1353 (eval $ac_compiler -V </dev/null >&5) 2>&5
1355 echo "$as_me:1355: \$? = $ac_status" >&5
1356 (exit $ac_status); }
1358 cat >conftest.$ac_ext <<_ACEOF
1359 #line 1359 "configure"
1360 #include "confdefs.h"
1370 ac_clean_files_save=$ac_clean_files
1371 ac_clean_files="$ac_clean_files a.out a.exe"
1372 # Try to create an executable without -o first, disregard a.out.
1373 # It will help us diagnose broken compilers, and finding out an intuition
1375 echo "$as_me:1375: checking for C compiler default output" >&5
1376 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1377 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1378 if { (eval echo "$as_me:1378: \"$ac_link_default\"") >&5
1379 (eval $ac_link_default) 2>&5
1381 echo "$as_me:1381: \$? = $ac_status" >&5
1382 (exit $ac_status); }; then
1383 # Find the output, starting from the most likely. This scheme is
1384 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1386 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1387 ls a.out conftest 2>/dev/null;
1388 ls a.* conftest.* 2>/dev/null`; do
1390 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1391 a.out ) # We found the default executable, but exeext='' is most
1394 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1395 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1402 echo "$as_me: failed program was:" >&5
1403 cat conftest.$ac_ext >&5
1404 { { echo "$as_me:1404: error: C compiler cannot create executables" >&5
1405 echo "$as_me: error: C compiler cannot create executables" >&2;}
1406 { (exit 77); exit 77; }; }
1409 ac_exeext=$ac_cv_exeext
1410 echo "$as_me:1410: result: $ac_file" >&5
1411 echo "${ECHO_T}$ac_file" >&6
1413 # Check the compiler produces executables we can run. If not, either
1414 # the compiler is broken, or we cross compile.
1415 echo "$as_me:1415: checking whether the C compiler works" >&5
1416 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1417 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1418 # If not cross compiling, check that we can run a simple program.
1419 if test "$cross_compiling" != yes; then
1420 if { ac_try='./$ac_file'
1421 { (eval echo "$as_me:1421: \"$ac_try\"") >&5
1424 echo "$as_me:1424: \$? = $ac_status" >&5
1425 (exit $ac_status); }; }; then
1428 if test "$cross_compiling" = maybe; then
1431 { { echo "$as_me:1431: error: cannot run C compiled programs.
1432 If you meant to cross compile, use \`--host'." >&5
1433 echo "$as_me: error: cannot run C compiled programs.
1434 If you meant to cross compile, use \`--host'." >&2;}
1435 { (exit 1); exit 1; }; }
1439 echo "$as_me:1439: result: yes" >&5
1440 echo "${ECHO_T}yes" >&6
1442 rm -f a.out a.exe conftest$ac_cv_exeext
1443 ac_clean_files=$ac_clean_files_save
1444 # Check the compiler produces executables we can run. If not, either
1445 # the compiler is broken, or we cross compile.
1446 echo "$as_me:1446: checking whether we are cross compiling" >&5
1447 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1448 echo "$as_me:1448: result: $cross_compiling" >&5
1449 echo "${ECHO_T}$cross_compiling" >&6
1451 echo "$as_me:1451: checking for executable suffix" >&5
1452 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1453 if { (eval echo "$as_me:1453: \"$ac_link\"") >&5
1454 (eval $ac_link) 2>&5
1456 echo "$as_me:1456: \$? = $ac_status" >&5
1457 (exit $ac_status); }; then
1458 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1459 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1460 # work properly (i.e., refer to `conftest.exe'), while it won't with
1462 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1464 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1465 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1472 { { echo "$as_me:1472: error: cannot compute EXEEXT: cannot compile and link" >&5
1473 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1474 { (exit 1); exit 1; }; }
1477 rm -f conftest$ac_cv_exeext
1478 echo "$as_me:1478: result: $ac_cv_exeext" >&5
1479 echo "${ECHO_T}$ac_cv_exeext" >&6
1481 rm -f conftest.$ac_ext
1482 EXEEXT=$ac_cv_exeext
1484 echo "$as_me:1484: checking for object suffix" >&5
1485 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1486 if test "${ac_cv_objext+set}" = set; then
1487 echo $ECHO_N "(cached) $ECHO_C" >&6
1489 cat >conftest.$ac_ext <<_ACEOF
1490 #line 1490 "configure"
1491 #include "confdefs.h"
1501 rm -f conftest.o conftest.obj
1502 if { (eval echo "$as_me:1502: \"$ac_compile\"") >&5
1503 (eval $ac_compile) 2>&5
1505 echo "$as_me:1505: \$? = $ac_status" >&5
1506 (exit $ac_status); }; then
1507 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1509 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1510 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1515 echo "$as_me: failed program was:" >&5
1516 cat conftest.$ac_ext >&5
1517 { { echo "$as_me:1517: error: cannot compute OBJEXT: cannot compile" >&5
1518 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1519 { (exit 1); exit 1; }; }
1522 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1524 echo "$as_me:1524: result: $ac_cv_objext" >&5
1525 echo "${ECHO_T}$ac_cv_objext" >&6
1526 OBJEXT=$ac_cv_objext
1528 echo "$as_me:1528: checking whether we are using the GNU C compiler" >&5
1529 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1530 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1531 echo $ECHO_N "(cached) $ECHO_C" >&6
1533 cat >conftest.$ac_ext <<_ACEOF
1534 #line 1534 "configure"
1535 #include "confdefs.h"
1548 rm -f conftest.$ac_objext
1549 if { (eval echo "$as_me:1549: \"$ac_compile\"") >&5
1550 (eval $ac_compile) 2>&5
1552 echo "$as_me:1552: \$? = $ac_status" >&5
1553 (exit $ac_status); } &&
1554 { ac_try='test -s conftest.$ac_objext'
1555 { (eval echo "$as_me:1555: \"$ac_try\"") >&5
1558 echo "$as_me:1558: \$? = $ac_status" >&5
1559 (exit $ac_status); }; }; then
1562 echo "$as_me: failed program was:" >&5
1563 cat conftest.$ac_ext >&5
1566 rm -f conftest.$ac_objext conftest.$ac_ext
1567 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1570 echo "$as_me:1570: result: $ac_cv_c_compiler_gnu" >&5
1571 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1572 GCC=`test $ac_compiler_gnu = yes && echo yes`
1573 ac_test_CFLAGS=${CFLAGS+set}
1574 ac_save_CFLAGS=$CFLAGS
1576 echo "$as_me:1576: checking whether $CC accepts -g" >&5
1577 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1578 if test "${ac_cv_prog_cc_g+set}" = set; then
1579 echo $ECHO_N "(cached) $ECHO_C" >&6
1581 cat >conftest.$ac_ext <<_ACEOF
1582 #line 1582 "configure"
1583 #include "confdefs.h"
1593 rm -f conftest.$ac_objext
1594 if { (eval echo "$as_me:1594: \"$ac_compile\"") >&5
1595 (eval $ac_compile) 2>&5
1597 echo "$as_me:1597: \$? = $ac_status" >&5
1598 (exit $ac_status); } &&
1599 { ac_try='test -s conftest.$ac_objext'
1600 { (eval echo "$as_me:1600: \"$ac_try\"") >&5
1603 echo "$as_me:1603: \$? = $ac_status" >&5
1604 (exit $ac_status); }; }; then
1607 echo "$as_me: failed program was:" >&5
1608 cat conftest.$ac_ext >&5
1611 rm -f conftest.$ac_objext conftest.$ac_ext
1613 echo "$as_me:1613: result: $ac_cv_prog_cc_g" >&5
1614 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1615 if test "$ac_test_CFLAGS" = set; then
1616 CFLAGS=$ac_save_CFLAGS
1617 elif test $ac_cv_prog_cc_g = yes; then
1618 if test "$GCC" = yes; then
1624 if test "$GCC" = yes; then
1630 # Some people use a C++ compiler to compile C. Since we use `exit',
1631 # in C++ we need to declare it. In case someone uses the same compiler
1632 # for both compiling C and C++ we need to have the C++ compiler decide
1633 # the declaration of exit, since it's the most demanding environment.
1634 cat >conftest.$ac_ext <<_ACEOF
1639 rm -f conftest.$ac_objext
1640 if { (eval echo "$as_me:1640: \"$ac_compile\"") >&5
1641 (eval $ac_compile) 2>&5
1643 echo "$as_me:1643: \$? = $ac_status" >&5
1644 (exit $ac_status); } &&
1645 { ac_try='test -s conftest.$ac_objext'
1646 { (eval echo "$as_me:1646: \"$ac_try\"") >&5
1649 echo "$as_me:1649: \$? = $ac_status" >&5
1650 (exit $ac_status); }; }; then
1651 for ac_declaration in \
1653 '#include <stdlib.h>' \
1654 'extern "C" void std::exit (int) throw (); using std::exit;' \
1655 'extern "C" void std::exit (int); using std::exit;' \
1656 'extern "C" void exit (int) throw ();' \
1657 'extern "C" void exit (int);' \
1660 cat >conftest.$ac_ext <<_ACEOF
1661 #line 1661 "configure"
1662 #include "confdefs.h"
1673 rm -f conftest.$ac_objext
1674 if { (eval echo "$as_me:1674: \"$ac_compile\"") >&5
1675 (eval $ac_compile) 2>&5
1677 echo "$as_me:1677: \$? = $ac_status" >&5
1678 (exit $ac_status); } &&
1679 { ac_try='test -s conftest.$ac_objext'
1680 { (eval echo "$as_me:1680: \"$ac_try\"") >&5
1683 echo "$as_me:1683: \$? = $ac_status" >&5
1684 (exit $ac_status); }; }; then
1687 echo "$as_me: failed program was:" >&5
1688 cat conftest.$ac_ext >&5
1691 rm -f conftest.$ac_objext conftest.$ac_ext
1692 cat >conftest.$ac_ext <<_ACEOF
1693 #line 1693 "configure"
1694 #include "confdefs.h"
1704 rm -f conftest.$ac_objext
1705 if { (eval echo "$as_me:1705: \"$ac_compile\"") >&5
1706 (eval $ac_compile) 2>&5
1708 echo "$as_me:1708: \$? = $ac_status" >&5
1709 (exit $ac_status); } &&
1710 { ac_try='test -s conftest.$ac_objext'
1711 { (eval echo "$as_me:1711: \"$ac_try\"") >&5
1714 echo "$as_me:1714: \$? = $ac_status" >&5
1715 (exit $ac_status); }; }; then
1718 echo "$as_me: failed program was:" >&5
1719 cat conftest.$ac_ext >&5
1721 rm -f conftest.$ac_objext conftest.$ac_ext
1724 if test -n "$ac_declaration"; then
1725 echo '#ifdef __cplusplus' >>confdefs.h
1726 echo $ac_declaration >>confdefs.h
1727 echo '#endif' >>confdefs.h
1731 echo "$as_me: failed program was:" >&5
1732 cat conftest.$ac_ext >&5
1734 rm -f conftest.$ac_objext conftest.$ac_ext
1736 ac_cpp='$CPP $CPPFLAGS'
1737 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1738 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1739 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1740 ac_main_return=return
1743 if test "$GCC" = yes ; then
1744 echo "$as_me:1744: checking version of $CC" >&5
1745 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1746 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.].*//'`"
1747 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1748 echo "$as_me:1748: result: $GCC_VERSION" >&5
1749 echo "${ECHO_T}$GCC_VERSION" >&6
1754 if test "$GCC" = yes ; then
1757 echo "$as_me:1757: checking if this is really Intel C compiler" >&5
1758 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1759 cf_save_CFLAGS="$CFLAGS"
1760 CFLAGS="$CFLAGS -no-gcc"
1761 cat >conftest.$ac_ext <<_ACEOF
1762 #line 1762 "configure"
1763 #include "confdefs.h"
1769 #ifdef __INTEL_COMPILER
1778 rm -f conftest.$ac_objext
1779 if { (eval echo "$as_me:1779: \"$ac_compile\"") >&5
1780 (eval $ac_compile) 2>&5
1782 echo "$as_me:1782: \$? = $ac_status" >&5
1783 (exit $ac_status); } &&
1784 { ac_try='test -s conftest.$ac_objext'
1785 { (eval echo "$as_me:1785: \"$ac_try\"") >&5
1788 echo "$as_me:1788: \$? = $ac_status" >&5
1789 (exit $ac_status); }; }; then
1791 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1794 echo "$as_me: failed program was:" >&5
1795 cat conftest.$ac_ext >&5
1797 rm -f conftest.$ac_objext conftest.$ac_ext
1798 CFLAGS="$cf_save_CFLAGS"
1799 echo "$as_me:1799: result: $INTEL_COMPILER" >&5
1800 echo "${ECHO_T}$INTEL_COMPILER" >&6
1807 if test "$GCC" = yes ; then
1808 echo "$as_me:1808: checking if this is really Clang C compiler" >&5
1809 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1810 cf_save_CFLAGS="$CFLAGS"
1811 CFLAGS="$CFLAGS -Qunused-arguments"
1812 cat >conftest.$ac_ext <<_ACEOF
1813 #line 1813 "configure"
1814 #include "confdefs.h"
1829 rm -f conftest.$ac_objext
1830 if { (eval echo "$as_me:1830: \"$ac_compile\"") >&5
1831 (eval $ac_compile) 2>&5
1833 echo "$as_me:1833: \$? = $ac_status" >&5
1834 (exit $ac_status); } &&
1835 { ac_try='test -s conftest.$ac_objext'
1836 { (eval echo "$as_me:1836: \"$ac_try\"") >&5
1839 echo "$as_me:1839: \$? = $ac_status" >&5
1840 (exit $ac_status); }; }; then
1842 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
1845 echo "$as_me: failed program was:" >&5
1846 cat conftest.$ac_ext >&5
1848 rm -f conftest.$ac_objext conftest.$ac_ext
1849 CFLAGS="$cf_save_CFLAGS"
1850 echo "$as_me:1850: result: $CLANG_COMPILER" >&5
1851 echo "${ECHO_T}$CLANG_COMPILER" >&6
1854 if test "x$CLANG_COMPILER" = "xyes" ; then
1856 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
1857 CFLAGS="${CFLAGS}-Wno-error=implicit-function-declaration"
1861 echo "$as_me:1861: checking for $CC option to accept ANSI C" >&5
1862 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1863 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1864 echo $ECHO_N "(cached) $ECHO_C" >&6
1866 ac_cv_prog_cc_stdc=no
1868 cat >conftest.$ac_ext <<_ACEOF
1869 #line 1869 "configure"
1870 #include "confdefs.h"
1873 #include <sys/types.h>
1874 #include <sys/stat.h>
1875 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1876 struct buf { int x; };
1877 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1878 static char *e (p, i)
1884 static char *f (char * (*g) (char **, int), char **p, ...)
1889 s = g (p, va_arg (v,int));
1893 int test (int i, double x);
1894 struct s1 {int (*f) (int a);};
1895 struct s2 {int (*f) (double a);};
1896 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1902 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1907 # Don't try gcc -ansi; that turns off useful extensions and
1908 # breaks some systems' header files.
1909 # AIX -qlanglvl=ansi
1910 # Ultrix and OSF/1 -std1
1911 # HP-UX 10.20 and later -Ae
1912 # HP-UX older versions -Aa -D_HPUX_SOURCE
1913 # SVR4 -Xc -D__EXTENSIONS__
1914 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1916 CC="$ac_save_CC $ac_arg"
1917 rm -f conftest.$ac_objext
1918 if { (eval echo "$as_me:1918: \"$ac_compile\"") >&5
1919 (eval $ac_compile) 2>&5
1921 echo "$as_me:1921: \$? = $ac_status" >&5
1922 (exit $ac_status); } &&
1923 { ac_try='test -s conftest.$ac_objext'
1924 { (eval echo "$as_me:1924: \"$ac_try\"") >&5
1927 echo "$as_me:1927: \$? = $ac_status" >&5
1928 (exit $ac_status); }; }; then
1929 ac_cv_prog_cc_stdc=$ac_arg
1932 echo "$as_me: failed program was:" >&5
1933 cat conftest.$ac_ext >&5
1935 rm -f conftest.$ac_objext
1937 rm -f conftest.$ac_ext conftest.$ac_objext
1942 case "x$ac_cv_prog_cc_stdc" in
1944 echo "$as_me:1944: result: none needed" >&5
1945 echo "${ECHO_T}none needed" >&6 ;;
1947 echo "$as_me:1947: result: $ac_cv_prog_cc_stdc" >&5
1948 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1949 CC="$CC $ac_cv_prog_cc_stdc" ;;
1952 # This should have been defined by AC_PROG_CC
1955 echo "$as_me:1955: checking \$CFLAGS variable" >&5
1956 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
1959 echo "$as_me:1959: result: broken" >&5
1960 echo "${ECHO_T}broken" >&6
1961 { echo "$as_me:1961: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
1962 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
1965 for cf_arg in $cf_flags
1971 cf_new_extra_cppflags=
1973 for cf_add_cflags in $cf_arg
1975 case $cf_fix_cppflags in
1977 case $cf_add_cflags in
1978 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1979 case $cf_add_cflags in
1981 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1983 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1984 && test -z "${cf_tst_cflags}" \
1985 && cf_fix_cppflags=yes
1987 if test $cf_fix_cppflags = yes ; then
1989 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1990 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1993 elif test "${cf_tst_cflags}" = "\"'" ; then
1995 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1996 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2006 case $cf_add_cflags in
2008 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2010 CPPFLAGS=`echo "$CPPFLAGS" | \
2011 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2012 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2017 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2018 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2025 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2026 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2033 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2034 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2036 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2038 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2039 && test -z "${cf_tst_cflags}" \
2040 && cf_fix_cppflags=no
2045 if test -n "$cf_new_cflags" ; then
2047 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2048 CFLAGS="${CFLAGS}$cf_new_cflags"
2052 if test -n "$cf_new_cppflags" ; then
2054 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2055 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2059 if test -n "$cf_new_extra_cppflags" ; then
2061 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2062 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2069 echo "$as_me:2069: result: ok" >&5
2070 echo "${ECHO_T}ok" >&6
2074 echo "$as_me:2074: checking \$CC variable" >&5
2075 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2078 echo "$as_me:2078: result: broken" >&5
2079 echo "${ECHO_T}broken" >&6
2080 { echo "$as_me:2080: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2081 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2083 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2084 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2086 for cf_arg in $cf_flags
2094 cf_new_extra_cppflags=
2096 for cf_add_cflags in $cf_arg
2098 case $cf_fix_cppflags in
2100 case $cf_add_cflags in
2101 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2102 case $cf_add_cflags in
2104 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2106 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2107 && test -z "${cf_tst_cflags}" \
2108 && cf_fix_cppflags=yes
2110 if test $cf_fix_cppflags = yes ; then
2112 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2113 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2116 elif test "${cf_tst_cflags}" = "\"'" ; then
2118 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2119 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2129 case $cf_add_cflags in
2131 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2133 CPPFLAGS=`echo "$CPPFLAGS" | \
2134 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2135 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2140 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2141 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2148 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2149 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2156 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2157 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2159 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2161 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2162 && test -z "${cf_tst_cflags}" \
2163 && cf_fix_cppflags=no
2168 if test -n "$cf_new_cflags" ; then
2170 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2171 CFLAGS="${CFLAGS}$cf_new_cflags"
2175 if test -n "$cf_new_cppflags" ; then
2177 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2178 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2182 if test -n "$cf_new_extra_cppflags" ; then
2184 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2185 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2195 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2197 echo "${as_me:-configure}:2197: testing resulting CC: '$CC' ..." 1>&5
2199 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2201 echo "${as_me:-configure}:2201: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2203 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2205 echo "${as_me:-configure}:2205: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2209 echo "$as_me:2209: result: ok" >&5
2210 echo "${ECHO_T}ok" >&6
2215 ac_cpp='$CPP $CPPFLAGS'
2216 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2217 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2218 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2219 ac_main_return=return
2220 echo "$as_me:2220: checking how to run the C preprocessor" >&5
2221 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2222 # On Suns, sometimes $CPP names a directory.
2223 if test -n "$CPP" && test -d "$CPP"; then
2226 if test -z "$CPP"; then
2227 if test "${ac_cv_prog_CPP+set}" = set; then
2228 echo $ECHO_N "(cached) $ECHO_C" >&6
2230 # Double quotes because CPP needs to be expanded
2231 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2234 for ac_c_preproc_warn_flag in '' yes
2236 # Use a header file that comes with gcc, so configuring glibc
2237 # with a fresh cross-compiler works.
2238 # On the NeXT, cc -E runs the code through the compiler's parser,
2239 # not just through cpp. "Syntax error" is here to catch this case.
2240 cat >conftest.$ac_ext <<_ACEOF
2241 #line 2241 "configure"
2242 #include "confdefs.h"
2246 if { (eval echo "$as_me:2246: \"$ac_cpp conftest.$ac_ext\"") >&5
2247 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2249 egrep -v '^ *\+' conftest.er1 >conftest.err
2251 cat conftest.err >&5
2252 echo "$as_me:2252: \$? = $ac_status" >&5
2253 (exit $ac_status); } >/dev/null; then
2254 if test -s conftest.err; then
2255 ac_cpp_err=$ac_c_preproc_warn_flag
2262 if test -z "$ac_cpp_err"; then
2265 echo "$as_me: failed program was:" >&5
2266 cat conftest.$ac_ext >&5
2267 # Broken: fails on valid input.
2270 rm -f conftest.err conftest.$ac_ext
2272 # OK, works on sane cases. Now check whether non-existent headers
2273 # can be detected and how.
2274 cat >conftest.$ac_ext <<_ACEOF
2275 #line 2275 "configure"
2276 #include "confdefs.h"
2277 #include <ac_nonexistent.h>
2279 if { (eval echo "$as_me:2279: \"$ac_cpp conftest.$ac_ext\"") >&5
2280 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2282 egrep -v '^ *\+' conftest.er1 >conftest.err
2284 cat conftest.err >&5
2285 echo "$as_me:2285: \$? = $ac_status" >&5
2286 (exit $ac_status); } >/dev/null; then
2287 if test -s conftest.err; then
2288 ac_cpp_err=$ac_c_preproc_warn_flag
2295 if test -z "$ac_cpp_err"; then
2296 # Broken: success on invalid input.
2299 echo "$as_me: failed program was:" >&5
2300 cat conftest.$ac_ext >&5
2301 # Passes both tests.
2305 rm -f conftest.err conftest.$ac_ext
2308 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2309 rm -f conftest.err conftest.$ac_ext
2310 if $ac_preproc_ok; then
2322 echo "$as_me:2322: result: $CPP" >&5
2323 echo "${ECHO_T}$CPP" >&6
2325 for ac_c_preproc_warn_flag in '' yes
2327 # Use a header file that comes with gcc, so configuring glibc
2328 # with a fresh cross-compiler works.
2329 # On the NeXT, cc -E runs the code through the compiler's parser,
2330 # not just through cpp. "Syntax error" is here to catch this case.
2331 cat >conftest.$ac_ext <<_ACEOF
2332 #line 2332 "configure"
2333 #include "confdefs.h"
2337 if { (eval echo "$as_me:2337: \"$ac_cpp conftest.$ac_ext\"") >&5
2338 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2340 egrep -v '^ *\+' conftest.er1 >conftest.err
2342 cat conftest.err >&5
2343 echo "$as_me:2343: \$? = $ac_status" >&5
2344 (exit $ac_status); } >/dev/null; then
2345 if test -s conftest.err; then
2346 ac_cpp_err=$ac_c_preproc_warn_flag
2353 if test -z "$ac_cpp_err"; then
2356 echo "$as_me: failed program was:" >&5
2357 cat conftest.$ac_ext >&5
2358 # Broken: fails on valid input.
2361 rm -f conftest.err conftest.$ac_ext
2363 # OK, works on sane cases. Now check whether non-existent headers
2364 # can be detected and how.
2365 cat >conftest.$ac_ext <<_ACEOF
2366 #line 2366 "configure"
2367 #include "confdefs.h"
2368 #include <ac_nonexistent.h>
2370 if { (eval echo "$as_me:2370: \"$ac_cpp conftest.$ac_ext\"") >&5
2371 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2373 egrep -v '^ *\+' conftest.er1 >conftest.err
2375 cat conftest.err >&5
2376 echo "$as_me:2376: \$? = $ac_status" >&5
2377 (exit $ac_status); } >/dev/null; then
2378 if test -s conftest.err; then
2379 ac_cpp_err=$ac_c_preproc_warn_flag
2386 if test -z "$ac_cpp_err"; then
2387 # Broken: success on invalid input.
2390 echo "$as_me: failed program was:" >&5
2391 cat conftest.$ac_ext >&5
2392 # Passes both tests.
2396 rm -f conftest.err conftest.$ac_ext
2399 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2400 rm -f conftest.err conftest.$ac_ext
2401 if $ac_preproc_ok; then
2404 { { echo "$as_me:2404: error: C preprocessor \"$CPP\" fails sanity check" >&5
2405 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2406 { (exit 1); exit 1; }; }
2410 ac_cpp='$CPP $CPPFLAGS'
2411 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2412 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2413 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2414 ac_main_return=return
2416 if test $ac_cv_c_compiler_gnu = yes; then
2417 echo "$as_me:2417: checking whether $CC needs -traditional" >&5
2418 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2419 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2420 echo $ECHO_N "(cached) $ECHO_C" >&6
2422 ac_pattern="Autoconf.*'x'"
2423 cat >conftest.$ac_ext <<_ACEOF
2424 #line 2424 "configure"
2425 #include "confdefs.h"
2427 int Autoconf = TIOCGETP;
2429 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2430 egrep "$ac_pattern" >/dev/null 2>&1; then
2431 ac_cv_prog_gcc_traditional=yes
2433 ac_cv_prog_gcc_traditional=no
2437 if test $ac_cv_prog_gcc_traditional = no; then
2438 cat >conftest.$ac_ext <<_ACEOF
2439 #line 2439 "configure"
2440 #include "confdefs.h"
2442 int Autoconf = TCGETA;
2444 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2445 egrep "$ac_pattern" >/dev/null 2>&1; then
2446 ac_cv_prog_gcc_traditional=yes
2452 echo "$as_me:2452: result: $ac_cv_prog_gcc_traditional" >&5
2453 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2454 if test $ac_cv_prog_gcc_traditional = yes; then
2455 CC="$CC -traditional"
2459 echo "$as_me:2459: checking whether $CC understands -c and -o together" >&5
2460 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2461 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2462 echo $ECHO_N "(cached) $ECHO_C" >&6
2465 cat > conftest.$ac_ext <<CF_EOF
2468 ${cf_cv_main_return:-return}(0);
2471 # We do the test twice because some compilers refuse to overwrite an
2472 # existing .o file with -o, though they will create one.
2473 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2474 if { (eval echo "$as_me:2474: \"$ac_try\"") >&5
2477 echo "$as_me:2477: \$? = $ac_status" >&5
2478 (exit $ac_status); } &&
2479 test -f conftest2.$ac_objext && { (eval echo "$as_me:2479: \"$ac_try\"") >&5
2482 echo "$as_me:2482: \$? = $ac_status" >&5
2483 (exit $ac_status); };
2485 eval cf_cv_prog_CC_c_o=yes
2487 eval cf_cv_prog_CC_c_o=no
2492 if test $cf_cv_prog_CC_c_o = yes; then
2493 echo "$as_me:2493: result: yes" >&5
2494 echo "${ECHO_T}yes" >&6
2496 echo "$as_me:2496: result: no" >&5
2497 echo "${ECHO_T}no" >&6
2500 test "$program_prefix" != NONE &&
2501 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2502 # Use a double $ so make ignores it.
2503 test "$program_suffix" != NONE &&
2504 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2505 # Double any \ or $. echo might interpret backslashes.
2506 # By default was `s,x,x', remove it if useless.
2507 cat <<\_ACEOF >conftest.sed
2508 s/[\\$]/&&/g;s/;s,x,x,$//
2510 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2513 for ac_prog in mawk gawk nawk awk
2515 # Extract the first word of "$ac_prog", so it can be a program name with args.
2516 set dummy $ac_prog; ac_word=$2
2517 echo "$as_me:2517: checking for $ac_word" >&5
2518 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2519 if test "${ac_cv_prog_AWK+set}" = set; then
2520 echo $ECHO_N "(cached) $ECHO_C" >&6
2522 if test -n "$AWK"; then
2523 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2525 ac_save_IFS=$IFS; IFS=$ac_path_separator
2527 for ac_dir in $ac_dummy; do
2529 test -z "$ac_dir" && ac_dir=.
2530 $as_executable_p "$ac_dir/$ac_word" || continue
2531 ac_cv_prog_AWK="$ac_prog"
2532 echo "$as_me:2532: found $ac_dir/$ac_word" >&5
2539 if test -n "$AWK"; then
2540 echo "$as_me:2540: result: $AWK" >&5
2541 echo "${ECHO_T}$AWK" >&6
2543 echo "$as_me:2543: result: no" >&5
2544 echo "${ECHO_T}no" >&6
2547 test -n "$AWK" && break
2550 test -z "$AWK" && { { echo "$as_me:2550: error: No awk program found" >&5
2551 echo "$as_me: error: No awk program found" >&2;}
2552 { (exit 1); exit 1; }; }
2554 echo "$as_me:2554: checking for egrep" >&5
2555 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2556 if test "${ac_cv_prog_egrep+set}" = set; then
2557 echo $ECHO_N "(cached) $ECHO_C" >&6
2559 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2560 then ac_cv_prog_egrep='grep -E'
2561 else ac_cv_prog_egrep='egrep'
2564 echo "$as_me:2564: result: $ac_cv_prog_egrep" >&5
2565 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2566 EGREP=$ac_cv_prog_egrep
2568 test -z "$EGREP" && { { echo "$as_me:2568: error: No egrep program found" >&5
2569 echo "$as_me: error: No egrep program found" >&2;}
2570 { (exit 1); exit 1; }; }
2572 # Find a good install program. We prefer a C program (faster),
2573 # so one script is as good as another. But avoid the broken or
2574 # incompatible versions:
2575 # SysV /etc/install, /usr/sbin/install
2576 # SunOS /usr/etc/install
2577 # IRIX /sbin/install
2579 # AmigaOS /C/install, which installs bootblocks on floppy discs
2580 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2581 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2582 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2583 # ./install, which can be erroneously created by make from ./install.sh.
2584 echo "$as_me:2584: checking for a BSD compatible install" >&5
2585 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2586 if test -z "$INSTALL"; then
2587 if test "${ac_cv_path_install+set}" = set; then
2588 echo $ECHO_N "(cached) $ECHO_C" >&6
2590 ac_save_IFS=$IFS; IFS=$ac_path_separator
2591 for ac_dir in $PATH; do
2593 # Account for people who put trailing slashes in PATH elements.
2595 / | ./ | .// | /cC/* \
2596 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2599 # OSF1 and SCO ODT 3.0 have their own names for install.
2600 # Don't use installbsd from OSF since it installs stuff as root
2602 for ac_prog in ginstall scoinst install; do
2603 if $as_executable_p "$ac_dir/$ac_prog"; then
2604 if test $ac_prog = install &&
2605 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2606 # AIX install. It has an incompatible calling convention.
2608 elif test $ac_prog = install &&
2609 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2610 # program-specific install script used by HP pwplus--don't use.
2613 ac_cv_path_install="$ac_dir/$ac_prog -c"
2623 if test "${ac_cv_path_install+set}" = set; then
2624 INSTALL=$ac_cv_path_install
2626 # As a last resort, use the slow shell script. We don't cache a
2627 # path for INSTALL within a source directory, because that will
2628 # break other packages using the cache if that directory is
2629 # removed, or if the path is relative.
2630 INSTALL=$ac_install_sh
2633 echo "$as_me:2633: result: $INSTALL" >&5
2634 echo "${ECHO_T}$INSTALL" >&6
2636 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2637 # It thinks the first close brace ends the variable substitution.
2638 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2640 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2642 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2644 echo "$as_me:2644: checking whether ln -s works" >&5
2645 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2647 if test "$LN_S" = "ln -s"; then
2648 echo "$as_me:2648: result: yes" >&5
2649 echo "${ECHO_T}yes" >&6
2651 echo "$as_me:2651: result: no, using $LN_S" >&5
2652 echo "${ECHO_T}no, using $LN_S" >&6
2655 echo "$as_me:2655: checking if $LN_S -f options work" >&5
2656 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2658 rm -f conf$$.src conf$$dst
2660 echo first >conf$$.src
2661 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2666 rm -f conf$$.dst conf$$src
2667 echo "$as_me:2667: result: $cf_prog_ln_sf" >&5
2668 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2670 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2672 # Find a good install program. We prefer a C program (faster),
2673 # so one script is as good as another. But avoid the broken or
2674 # incompatible versions:
2675 # SysV /etc/install, /usr/sbin/install
2676 # SunOS /usr/etc/install
2677 # IRIX /sbin/install
2679 # AmigaOS /C/install, which installs bootblocks on floppy discs
2680 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2681 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2682 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2683 # ./install, which can be erroneously created by make from ./install.sh.
2684 echo "$as_me:2684: checking for a BSD compatible install" >&5
2685 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2686 if test -z "$INSTALL"; then
2687 if test "${ac_cv_path_install+set}" = set; then
2688 echo $ECHO_N "(cached) $ECHO_C" >&6
2690 ac_save_IFS=$IFS; IFS=$ac_path_separator
2691 for ac_dir in $PATH; do
2693 # Account for people who put trailing slashes in PATH elements.
2695 / | ./ | .// | /cC/* \
2696 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2699 # OSF1 and SCO ODT 3.0 have their own names for install.
2700 # Don't use installbsd from OSF since it installs stuff as root
2702 for ac_prog in ginstall scoinst install; do
2703 if $as_executable_p "$ac_dir/$ac_prog"; then
2704 if test $ac_prog = install &&
2705 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2706 # AIX install. It has an incompatible calling convention.
2708 elif test $ac_prog = install &&
2709 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2710 # program-specific install script used by HP pwplus--don't use.
2713 ac_cv_path_install="$ac_dir/$ac_prog -c"
2723 if test "${ac_cv_path_install+set}" = set; then
2724 INSTALL=$ac_cv_path_install
2726 # As a last resort, use the slow shell script. We don't cache a
2727 # path for INSTALL within a source directory, because that will
2728 # break other packages using the cache if that directory is
2729 # removed, or if the path is relative.
2730 INSTALL=$ac_install_sh
2733 echo "$as_me:2733: result: $INSTALL" >&5
2734 echo "${ECHO_T}$INSTALL" >&6
2736 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2737 # It thinks the first close brace ends the variable substitution.
2738 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2740 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2742 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2748 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2749 test -z "$cf_dir" && cf_dir=.
2750 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2754 echo "$as_me:2754: checking if you want to install stripped executables" >&5
2755 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2757 # Check whether --enable-stripping or --disable-stripping was given.
2758 if test "${enable_stripping+set}" = set; then
2759 enableval="$enable_stripping"
2760 test "$enableval" != no && enableval=yes
2761 if test "$enableval" != "yes" ; then
2771 echo "$as_me:2771: result: $with_stripping" >&5
2772 echo "${ECHO_T}$with_stripping" >&6
2774 if test "$with_stripping" = yes
2781 : ${INSTALL:=install}
2782 echo "$as_me:2782: checking if install accepts -p option" >&5
2783 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
2784 if test "${cf_cv_install_p+set}" = set; then
2785 echo $ECHO_N "(cached) $ECHO_C" >&6
2792 if $INSTALL -p conftest.in conftest.out 2>/dev/null
2794 if test -f conftest.out/conftest.in
2796 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
2797 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
2798 if test -s conftest.err
2813 echo "$as_me:2813: result: $cf_cv_install_p" >&5
2814 echo "${ECHO_T}$cf_cv_install_p" >&6
2816 echo "$as_me:2816: checking if install needs to be told about ownership" >&5
2817 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
2818 case `$ac_config_guess` in
2827 echo "$as_me:2827: result: $with_install_o" >&5
2828 echo "${ECHO_T}$with_install_o" >&6
2829 if test "x$with_install_o" = xyes
2831 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'`
2836 echo "$as_me:2836: checking for long file names" >&5
2837 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2838 if test "${ac_cv_sys_long_file_names+set}" = set; then
2839 echo $ECHO_N "(cached) $ECHO_C" >&6
2841 ac_cv_sys_long_file_names=yes
2842 # Test for long file names in all the places we know might matter:
2843 # . the current directory, where building will happen
2844 # $prefix/lib where we will be installing things
2845 # $exec_prefix/lib likewise
2846 # eval it to expand exec_prefix.
2847 # $TMPDIR if set, where it might want to write temporary files
2848 # if $TMPDIR is not set:
2849 # /tmp where it might want to write temporary files
2852 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2855 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2857 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2858 test -d $ac_dir || continue
2859 test -w $ac_dir || continue # It is less confusing to not echo anything here.
2860 ac_xdir=$ac_dir/cf$$
2861 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2862 ac_tf1=$ac_xdir/conftest9012345
2863 ac_tf2=$ac_xdir/conftest9012346
2864 (echo 1 >$ac_tf1) 2>/dev/null
2865 (echo 2 >$ac_tf2) 2>/dev/null
2866 ac_val=`cat $ac_tf1 2>/dev/null`
2867 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2868 ac_cv_sys_long_file_names=no
2869 rm -rf $ac_xdir 2>/dev/null
2872 rm -rf $ac_xdir 2>/dev/null
2875 echo "$as_me:2875: result: $ac_cv_sys_long_file_names" >&5
2876 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2877 if test $ac_cv_sys_long_file_names = yes; then
2879 cat >>confdefs.h <<\EOF
2880 #define HAVE_LONG_FILE_NAMES 1
2885 # if we find pkg-config, check if we should install the ".pc" files.
2887 echo "$as_me:2887: checking if you want to use pkg-config" >&5
2888 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2890 # Check whether --with-pkg-config or --without-pkg-config was given.
2891 if test "${with_pkg_config+set}" = set; then
2892 withval="$with_pkg_config"
2893 cf_pkg_config=$withval
2897 echo "$as_me:2897: result: $cf_pkg_config" >&5
2898 echo "${ECHO_T}$cf_pkg_config" >&6
2900 case $cf_pkg_config in
2906 if test -n "$ac_tool_prefix"; then
2907 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
2908 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
2909 echo "$as_me:2909: checking for $ac_word" >&5
2910 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2911 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2912 echo $ECHO_N "(cached) $ECHO_C" >&6
2916 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2919 ac_save_IFS=$IFS; IFS=$ac_path_separator
2921 for ac_dir in $ac_dummy; do
2923 test -z "$ac_dir" && ac_dir=.
2924 if $as_executable_p "$ac_dir/$ac_word"; then
2925 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2926 echo "$as_me:2926: found $ac_dir/$ac_word" >&5
2934 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2936 if test -n "$PKG_CONFIG"; then
2937 echo "$as_me:2937: result: $PKG_CONFIG" >&5
2938 echo "${ECHO_T}$PKG_CONFIG" >&6
2940 echo "$as_me:2940: result: no" >&5
2941 echo "${ECHO_T}no" >&6
2945 if test -z "$ac_cv_path_PKG_CONFIG"; then
2946 ac_pt_PKG_CONFIG=$PKG_CONFIG
2947 # Extract the first word of "pkg-config", so it can be a program name with args.
2948 set dummy pkg-config; ac_word=$2
2949 echo "$as_me:2949: checking for $ac_word" >&5
2950 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2951 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
2952 echo $ECHO_N "(cached) $ECHO_C" >&6
2954 case $ac_pt_PKG_CONFIG in
2956 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
2959 ac_save_IFS=$IFS; IFS=$ac_path_separator
2961 for ac_dir in $ac_dummy; do
2963 test -z "$ac_dir" && ac_dir=.
2964 if $as_executable_p "$ac_dir/$ac_word"; then
2965 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
2966 echo "$as_me:2966: found $ac_dir/$ac_word" >&5
2971 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
2975 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
2977 if test -n "$ac_pt_PKG_CONFIG"; then
2978 echo "$as_me:2978: result: $ac_pt_PKG_CONFIG" >&5
2979 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
2981 echo "$as_me:2981: result: no" >&5
2982 echo "${ECHO_T}no" >&6
2985 PKG_CONFIG=$ac_pt_PKG_CONFIG
2987 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
2996 test -z "$PKG_CONFIG" && PKG_CONFIG=none
2997 if test "$PKG_CONFIG" != none ; then
2999 if test "x$prefix" != xNONE; then
3000 cf_path_syntax="$prefix"
3002 cf_path_syntax="$ac_default_prefix"
3005 case ".$PKG_CONFIG" in
3010 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3012 (.\${*prefix}*|.\${*dir}*)
3013 eval PKG_CONFIG="$PKG_CONFIG"
3014 case ".$PKG_CONFIG" in
3016 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3021 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3024 { { echo "$as_me:3024: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3025 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3026 { (exit 1); exit 1; }; }
3030 elif test "x$cf_pkg_config" != xno ; then
3031 { echo "$as_me:3031: WARNING: pkg-config is not installed" >&5
3032 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3037 echo "$as_me:3037: checking for pkg-config library directory" >&5
3038 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3041 echo "$as_me:3041: checking for $PKG_CONFIG library directory" >&5
3042 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3046 PKG_CONFIG_LIBDIR=no
3048 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3049 if test "${with_pkg_config_libdir+set}" = set; then
3050 withval="$with_pkg_config_libdir"
3051 PKG_CONFIG_LIBDIR=$withval
3053 test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3056 case x$PKG_CONFIG_LIBDIR in
3060 # Look for the library directory using the same prefix as the executable
3061 if test "x$PKG_CONFIG" = xnone
3065 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3068 # If you don't like using the default architecture, you have to specify the
3069 # intended library directory and corresponding compiler/linker options.
3071 # This case allows for Debian's 2014-flavor of multiarch, along with the
3072 # most common variations before that point. Some other variants spell the
3073 # directory differently, e.g., "pkg-config", and put it in unusual places.
3074 # pkg-config has always been poorly standardized, which is ironic...
3075 case x`(arch) 2>/dev/null` in
3078 $cf_path/lib/*64-linux-gnu \
3086 $cf_path/lib/*-linux-gnu \
3094 test -n "$verbose" && echo " list..." 1>&6
3096 echo "${as_me:-configure}:3096: testing list... ..." 1>&5
3098 for cf_config in $cf_search_path
3100 test -n "$verbose" && echo " checking $cf_config/pkgconfig" 1>&6
3102 echo "${as_me:-configure}:3102: testing checking $cf_config/pkgconfig ..." 1>&5
3104 if test -d $cf_config/pkgconfig
3106 PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3107 echo "$as_me:3107: checking done" >&5
3108 echo $ECHO_N "checking done... $ECHO_C" >&6
3117 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3118 echo "$as_me:3118: result: $PKG_CONFIG_LIBDIR" >&5
3119 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3122 echo "$as_me:3122: checking if you want to build test-programs" >&5
3123 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3125 # Check whether --with-tests or --without-tests was given.
3126 if test "${with_tests+set}" = set; then
3127 withval="$with_tests"
3128 cf_with_tests=$withval
3132 echo "$as_me:3132: result: $cf_with_tests" >&5
3133 echo "${ECHO_T}$cf_with_tests" >&6
3135 echo "$as_me:3135: checking if we should assume mixed-case filenames" >&5
3136 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3138 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3139 if test "${enable_mixed_case+set}" = set; then
3140 enableval="$enable_mixed_case"
3141 enable_mixedcase=$enableval
3143 enable_mixedcase=auto
3145 echo "$as_me:3145: result: $enable_mixedcase" >&5
3146 echo "${ECHO_T}$enable_mixedcase" >&6
3147 if test "$enable_mixedcase" = "auto" ; then
3149 echo "$as_me:3149: checking if filesystem supports mixed-case filenames" >&5
3150 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3151 if test "${cf_cv_mixedcase+set}" = set; then
3152 echo $ECHO_N "(cached) $ECHO_C" >&6
3155 if test "$cross_compiling" = yes ; then
3156 case $target_alias in
3157 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3165 rm -f conftest CONFTEST
3167 if test -f CONFTEST ; then
3172 rm -f conftest CONFTEST
3176 echo "$as_me:3176: result: $cf_cv_mixedcase" >&5
3177 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3178 test "$cf_cv_mixedcase" = yes &&
3179 cat >>confdefs.h <<\EOF
3180 #define MIXEDCASE_FILENAMES 1
3184 cf_cv_mixedcase=$enable_mixedcase
3185 if test "$enable_mixedcase" = "yes" ; then
3186 cat >>confdefs.h <<\EOF
3187 #define MIXEDCASE_FILENAMES 1
3193 # do this after mixed-case option (tags/TAGS is not as important as tic).
3194 echo "$as_me:3194: checking whether ${MAKE-make} sets \${MAKE}" >&5
3195 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3196 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3197 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3198 echo $ECHO_N "(cached) $ECHO_C" >&6
3200 cat >conftest.make <<\EOF
3202 @echo 'ac_maketemp="${MAKE}"'
3204 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3205 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3206 if test -n "$ac_maketemp"; then
3207 eval ac_cv_prog_make_${ac_make}_set=yes
3209 eval ac_cv_prog_make_${ac_make}_set=no
3213 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3214 echo "$as_me:3214: result: yes" >&5
3215 echo "${ECHO_T}yes" >&6
3218 echo "$as_me:3218: result: no" >&5
3219 echo "${ECHO_T}no" >&6
3220 SET_MAKE="MAKE=${MAKE-make}"
3223 for ac_prog in exctags ctags
3225 # Extract the first word of "$ac_prog", so it can be a program name with args.
3226 set dummy $ac_prog; ac_word=$2
3227 echo "$as_me:3227: checking for $ac_word" >&5
3228 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3229 if test "${ac_cv_prog_CTAGS+set}" = set; then
3230 echo $ECHO_N "(cached) $ECHO_C" >&6
3232 if test -n "$CTAGS"; then
3233 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3235 ac_save_IFS=$IFS; IFS=$ac_path_separator
3237 for ac_dir in $ac_dummy; do
3239 test -z "$ac_dir" && ac_dir=.
3240 $as_executable_p "$ac_dir/$ac_word" || continue
3241 ac_cv_prog_CTAGS="$ac_prog"
3242 echo "$as_me:3242: found $ac_dir/$ac_word" >&5
3248 CTAGS=$ac_cv_prog_CTAGS
3249 if test -n "$CTAGS"; then
3250 echo "$as_me:3250: result: $CTAGS" >&5
3251 echo "${ECHO_T}$CTAGS" >&6
3253 echo "$as_me:3253: result: no" >&5
3254 echo "${ECHO_T}no" >&6
3257 test -n "$CTAGS" && break
3260 for ac_prog in exetags etags
3262 # Extract the first word of "$ac_prog", so it can be a program name with args.
3263 set dummy $ac_prog; ac_word=$2
3264 echo "$as_me:3264: checking for $ac_word" >&5
3265 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3266 if test "${ac_cv_prog_ETAGS+set}" = set; then
3267 echo $ECHO_N "(cached) $ECHO_C" >&6
3269 if test -n "$ETAGS"; then
3270 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3272 ac_save_IFS=$IFS; IFS=$ac_path_separator
3274 for ac_dir in $ac_dummy; do
3276 test -z "$ac_dir" && ac_dir=.
3277 $as_executable_p "$ac_dir/$ac_word" || continue
3278 ac_cv_prog_ETAGS="$ac_prog"
3279 echo "$as_me:3279: found $ac_dir/$ac_word" >&5
3285 ETAGS=$ac_cv_prog_ETAGS
3286 if test -n "$ETAGS"; then
3287 echo "$as_me:3287: result: $ETAGS" >&5
3288 echo "${ECHO_T}$ETAGS" >&6
3290 echo "$as_me:3290: result: no" >&5
3291 echo "${ECHO_T}no" >&6
3294 test -n "$ETAGS" && break
3297 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3298 set dummy ${CTAGS:-ctags}; ac_word=$2
3299 echo "$as_me:3299: checking for $ac_word" >&5
3300 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3301 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3302 echo $ECHO_N "(cached) $ECHO_C" >&6
3304 if test -n "$MAKE_LOWER_TAGS"; then
3305 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3307 ac_save_IFS=$IFS; IFS=$ac_path_separator
3309 for ac_dir in $ac_dummy; do
3311 test -z "$ac_dir" && ac_dir=.
3312 $as_executable_p "$ac_dir/$ac_word" || continue
3313 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3314 echo "$as_me:3314: found $ac_dir/$ac_word" >&5
3318 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3321 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3322 if test -n "$MAKE_LOWER_TAGS"; then
3323 echo "$as_me:3323: result: $MAKE_LOWER_TAGS" >&5
3324 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3326 echo "$as_me:3326: result: no" >&5
3327 echo "${ECHO_T}no" >&6
3330 if test "$cf_cv_mixedcase" = yes ; then
3331 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3332 set dummy ${ETAGS:-etags}; ac_word=$2
3333 echo "$as_me:3333: checking for $ac_word" >&5
3334 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3335 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3336 echo $ECHO_N "(cached) $ECHO_C" >&6
3338 if test -n "$MAKE_UPPER_TAGS"; then
3339 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3341 ac_save_IFS=$IFS; IFS=$ac_path_separator
3343 for ac_dir in $ac_dummy; do
3345 test -z "$ac_dir" && ac_dir=.
3346 $as_executable_p "$ac_dir/$ac_word" || continue
3347 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3348 echo "$as_me:3348: found $ac_dir/$ac_word" >&5
3352 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3355 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3356 if test -n "$MAKE_UPPER_TAGS"; then
3357 echo "$as_me:3357: result: $MAKE_UPPER_TAGS" >&5
3358 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3360 echo "$as_me:3360: result: no" >&5
3361 echo "${ECHO_T}no" >&6
3368 if test "$MAKE_UPPER_TAGS" = yes ; then
3374 if test "$MAKE_LOWER_TAGS" = yes ; then
3380 echo "$as_me:3380: checking for makeflags variable" >&5
3381 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3382 if test "${cf_cv_makeflags+set}" = set; then
3383 echo $ECHO_N "(cached) $ECHO_C" >&6
3387 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3389 cat >cf_makeflags.tmp <<CF_EOF
3392 @ echo '.$cf_option'
3394 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ ]*$,,'`
3395 case "$cf_result" in
3397 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3398 case "$cf_result" in
3399 (.*CC=*) cf_cv_makeflags=
3401 (*) cf_cv_makeflags=$cf_option
3410 echo "${as_me:-configure}:3410: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3415 rm -f cf_makeflags.tmp
3418 echo "$as_me:3418: result: $cf_cv_makeflags" >&5
3419 echo "${ECHO_T}$cf_cv_makeflags" >&6
3421 if test -n "$ac_tool_prefix"; then
3422 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3423 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3424 echo "$as_me:3424: checking for $ac_word" >&5
3425 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3426 if test "${ac_cv_prog_RANLIB+set}" = set; then
3427 echo $ECHO_N "(cached) $ECHO_C" >&6
3429 if test -n "$RANLIB"; then
3430 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3432 ac_save_IFS=$IFS; IFS=$ac_path_separator
3434 for ac_dir in $ac_dummy; do
3436 test -z "$ac_dir" && ac_dir=.
3437 $as_executable_p "$ac_dir/$ac_word" || continue
3438 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3439 echo "$as_me:3439: found $ac_dir/$ac_word" >&5
3445 RANLIB=$ac_cv_prog_RANLIB
3446 if test -n "$RANLIB"; then
3447 echo "$as_me:3447: result: $RANLIB" >&5
3448 echo "${ECHO_T}$RANLIB" >&6
3450 echo "$as_me:3450: result: no" >&5
3451 echo "${ECHO_T}no" >&6
3455 if test -z "$ac_cv_prog_RANLIB"; then
3456 ac_ct_RANLIB=$RANLIB
3457 # Extract the first word of "ranlib", so it can be a program name with args.
3458 set dummy ranlib; ac_word=$2
3459 echo "$as_me:3459: checking for $ac_word" >&5
3460 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3461 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3462 echo $ECHO_N "(cached) $ECHO_C" >&6
3464 if test -n "$ac_ct_RANLIB"; then
3465 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3467 ac_save_IFS=$IFS; IFS=$ac_path_separator
3469 for ac_dir in $ac_dummy; do
3471 test -z "$ac_dir" && ac_dir=.
3472 $as_executable_p "$ac_dir/$ac_word" || continue
3473 ac_cv_prog_ac_ct_RANLIB="ranlib"
3474 echo "$as_me:3474: found $ac_dir/$ac_word" >&5
3478 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3481 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3482 if test -n "$ac_ct_RANLIB"; then
3483 echo "$as_me:3483: result: $ac_ct_RANLIB" >&5
3484 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3486 echo "$as_me:3486: result: no" >&5
3487 echo "${ECHO_T}no" >&6
3490 RANLIB=$ac_ct_RANLIB
3492 RANLIB="$ac_cv_prog_RANLIB"
3495 if test -n "$ac_tool_prefix"; then
3496 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3497 set dummy ${ac_tool_prefix}ld; ac_word=$2
3498 echo "$as_me:3498: checking for $ac_word" >&5
3499 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3500 if test "${ac_cv_prog_LD+set}" = set; then
3501 echo $ECHO_N "(cached) $ECHO_C" >&6
3503 if test -n "$LD"; then
3504 ac_cv_prog_LD="$LD" # Let the user override the test.
3506 ac_save_IFS=$IFS; IFS=$ac_path_separator
3508 for ac_dir in $ac_dummy; do
3510 test -z "$ac_dir" && ac_dir=.
3511 $as_executable_p "$ac_dir/$ac_word" || continue
3512 ac_cv_prog_LD="${ac_tool_prefix}ld"
3513 echo "$as_me:3513: found $ac_dir/$ac_word" >&5
3520 if test -n "$LD"; then
3521 echo "$as_me:3521: result: $LD" >&5
3522 echo "${ECHO_T}$LD" >&6
3524 echo "$as_me:3524: result: no" >&5
3525 echo "${ECHO_T}no" >&6
3529 if test -z "$ac_cv_prog_LD"; then
3531 # Extract the first word of "ld", so it can be a program name with args.
3532 set dummy ld; ac_word=$2
3533 echo "$as_me:3533: checking for $ac_word" >&5
3534 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3535 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3536 echo $ECHO_N "(cached) $ECHO_C" >&6
3538 if test -n "$ac_ct_LD"; then
3539 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3541 ac_save_IFS=$IFS; IFS=$ac_path_separator
3543 for ac_dir in $ac_dummy; do
3545 test -z "$ac_dir" && ac_dir=.
3546 $as_executable_p "$ac_dir/$ac_word" || continue
3547 ac_cv_prog_ac_ct_LD="ld"
3548 echo "$as_me:3548: found $ac_dir/$ac_word" >&5
3552 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3555 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3556 if test -n "$ac_ct_LD"; then
3557 echo "$as_me:3557: result: $ac_ct_LD" >&5
3558 echo "${ECHO_T}$ac_ct_LD" >&6
3560 echo "$as_me:3560: result: no" >&5
3561 echo "${ECHO_T}no" >&6
3569 if test -n "$ac_tool_prefix"; then
3570 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3571 set dummy ${ac_tool_prefix}ar; ac_word=$2
3572 echo "$as_me:3572: checking for $ac_word" >&5
3573 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3574 if test "${ac_cv_prog_AR+set}" = set; then
3575 echo $ECHO_N "(cached) $ECHO_C" >&6
3577 if test -n "$AR"; then
3578 ac_cv_prog_AR="$AR" # Let the user override the test.
3580 ac_save_IFS=$IFS; IFS=$ac_path_separator
3582 for ac_dir in $ac_dummy; do
3584 test -z "$ac_dir" && ac_dir=.
3585 $as_executable_p "$ac_dir/$ac_word" || continue
3586 ac_cv_prog_AR="${ac_tool_prefix}ar"
3587 echo "$as_me:3587: found $ac_dir/$ac_word" >&5
3594 if test -n "$AR"; then
3595 echo "$as_me:3595: result: $AR" >&5
3596 echo "${ECHO_T}$AR" >&6
3598 echo "$as_me:3598: result: no" >&5
3599 echo "${ECHO_T}no" >&6
3603 if test -z "$ac_cv_prog_AR"; then
3605 # Extract the first word of "ar", so it can be a program name with args.
3606 set dummy ar; ac_word=$2
3607 echo "$as_me:3607: checking for $ac_word" >&5
3608 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3609 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3610 echo $ECHO_N "(cached) $ECHO_C" >&6
3612 if test -n "$ac_ct_AR"; then
3613 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3615 ac_save_IFS=$IFS; IFS=$ac_path_separator
3617 for ac_dir in $ac_dummy; do
3619 test -z "$ac_dir" && ac_dir=.
3620 $as_executable_p "$ac_dir/$ac_word" || continue
3621 ac_cv_prog_ac_ct_AR="ar"
3622 echo "$as_me:3622: found $ac_dir/$ac_word" >&5
3626 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3629 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3630 if test -n "$ac_ct_AR"; then
3631 echo "$as_me:3631: result: $ac_ct_AR" >&5
3632 echo "${ECHO_T}$ac_ct_AR" >&6
3634 echo "$as_me:3634: result: no" >&5
3635 echo "${ECHO_T}no" >&6
3643 if test -n "$ac_tool_prefix"; then
3644 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3645 set dummy ${ac_tool_prefix}ar; ac_word=$2
3646 echo "$as_me:3646: checking for $ac_word" >&5
3647 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3648 if test "${ac_cv_prog_AR+set}" = set; then
3649 echo $ECHO_N "(cached) $ECHO_C" >&6
3651 if test -n "$AR"; then
3652 ac_cv_prog_AR="$AR" # Let the user override the test.
3654 ac_save_IFS=$IFS; IFS=$ac_path_separator
3656 for ac_dir in $ac_dummy; do
3658 test -z "$ac_dir" && ac_dir=.
3659 $as_executable_p "$ac_dir/$ac_word" || continue
3660 ac_cv_prog_AR="${ac_tool_prefix}ar"
3661 echo "$as_me:3661: found $ac_dir/$ac_word" >&5
3668 if test -n "$AR"; then
3669 echo "$as_me:3669: result: $AR" >&5
3670 echo "${ECHO_T}$AR" >&6
3672 echo "$as_me:3672: result: no" >&5
3673 echo "${ECHO_T}no" >&6
3677 if test -z "$ac_cv_prog_AR"; then
3679 # Extract the first word of "ar", so it can be a program name with args.
3680 set dummy ar; ac_word=$2
3681 echo "$as_me:3681: checking for $ac_word" >&5
3682 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3683 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3684 echo $ECHO_N "(cached) $ECHO_C" >&6
3686 if test -n "$ac_ct_AR"; then
3687 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3689 ac_save_IFS=$IFS; IFS=$ac_path_separator
3691 for ac_dir in $ac_dummy; do
3693 test -z "$ac_dir" && ac_dir=.
3694 $as_executable_p "$ac_dir/$ac_word" || continue
3695 ac_cv_prog_ac_ct_AR="ar"
3696 echo "$as_me:3696: found $ac_dir/$ac_word" >&5
3700 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3703 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3704 if test -n "$ac_ct_AR"; then
3705 echo "$as_me:3705: result: $ac_ct_AR" >&5
3706 echo "${ECHO_T}$ac_ct_AR" >&6
3708 echo "$as_me:3708: result: no" >&5
3709 echo "${ECHO_T}no" >&6
3717 echo "$as_me:3717: checking for options to update archives" >&5
3718 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3719 if test "${cf_cv_ar_flags+set}" = set; then
3720 echo $ECHO_N "(cached) $ECHO_C" >&6
3723 case $cf_cv_system_name in
3726 cat >mk_static_lib.sh <<-EOF
3731 exec \$MSVC_BIN -out:"\$out" \$@
3733 chmod +x mk_static_lib.sh
3734 AR=`pwd`/mk_static_lib.sh
3737 cf_cv_ar_flags=unknown
3738 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
3741 # check if $ARFLAGS already contains this choice
3742 if test "x$ARFLAGS" != "x" ; then
3743 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3744 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3750 rm -f conftest.$ac_cv_objext
3753 cat >conftest.$ac_ext <<EOF
3754 #line 3754 "configure"
3755 int testdata[3] = { 123, 456, 789 };
3757 if { (eval echo "$as_me:3757: \"$ac_compile\"") >&5
3758 (eval $ac_compile) 2>&5
3760 echo "$as_me:3760: \$? = $ac_status" >&5
3761 (exit $ac_status); } ; then
3762 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3763 $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3764 if test -f conftest.a ; then
3765 cf_cv_ar_flags=$cf_ar_flags
3769 test -n "$verbose" && echo " cannot compile test-program" 1>&6
3771 echo "${as_me:-configure}:3771: testing cannot compile test-program ..." 1>&5
3776 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3781 echo "$as_me:3781: result: $cf_cv_ar_flags" >&5
3782 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3784 if test -n "$ARFLAGS" ; then
3785 if test -n "$cf_cv_ar_flags" ; then
3786 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3789 ARFLAGS=$cf_cv_ar_flags
3792 echo "$as_me:3792: checking for PATH separator" >&5
3793 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
3794 case $cf_cv_system_name in
3795 (os2*) PATH_SEPARATOR=';' ;;
3796 (*) ${PATH_SEPARATOR:=':'} ;;
3799 echo "$as_me:3799: result: $PATH_SEPARATOR" >&5
3800 echo "${ECHO_T}$PATH_SEPARATOR" >&6
3802 echo "$as_me:3802: checking if you have specified an install-prefix" >&5
3803 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3805 # Check whether --with-install-prefix or --without-install-prefix was given.
3806 if test "${with_install_prefix+set}" = set; then
3807 withval="$with_install_prefix"
3811 (*) DESTDIR="$withval"
3815 echo "$as_me:3815: result: $DESTDIR" >&5
3816 echo "${ECHO_T}$DESTDIR" >&6
3818 ###############################################################################
3820 # If we're cross-compiling, allow the user to override the tools and their
3821 # options. The configure script is oriented toward identifying the host
3822 # compiler, etc., but we need a build compiler to generate parts of the source.
3824 if test "$cross_compiling" = yes ; then
3826 # defaults that we might want to override
3827 : ${BUILD_CFLAGS:=''}
3828 : ${BUILD_CPPFLAGS:=''}
3829 : ${BUILD_LDFLAGS:=''}
3831 : ${BUILD_EXEEXT:='$x'}
3832 : ${BUILD_OBJEXT:='o'}
3834 # Check whether --with-build-cc or --without-build-cc was given.
3835 if test "${with_build_cc+set}" = set; then
3836 withval="$with_build_cc"
3839 for ac_prog in gcc clang c99 c89 cc cl
3841 # Extract the first word of "$ac_prog", so it can be a program name with args.
3842 set dummy $ac_prog; ac_word=$2
3843 echo "$as_me:3843: checking for $ac_word" >&5
3844 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3845 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3846 echo $ECHO_N "(cached) $ECHO_C" >&6
3848 if test -n "$BUILD_CC"; then
3849 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3851 ac_save_IFS=$IFS; IFS=$ac_path_separator
3853 for ac_dir in $ac_dummy; do
3855 test -z "$ac_dir" && ac_dir=.
3856 $as_executable_p "$ac_dir/$ac_word" || continue
3857 ac_cv_prog_BUILD_CC="$ac_prog"
3858 echo "$as_me:3858: found $ac_dir/$ac_word" >&5
3864 BUILD_CC=$ac_cv_prog_BUILD_CC
3865 if test -n "$BUILD_CC"; then
3866 echo "$as_me:3866: result: $BUILD_CC" >&5
3867 echo "${ECHO_T}$BUILD_CC" >&6
3869 echo "$as_me:3869: result: no" >&5
3870 echo "${ECHO_T}no" >&6
3873 test -n "$BUILD_CC" && break
3875 test -n "$BUILD_CC" || BUILD_CC="none"
3878 echo "$as_me:3878: checking for native build C compiler" >&5
3879 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3880 echo "$as_me:3880: result: $BUILD_CC" >&5
3881 echo "${ECHO_T}$BUILD_CC" >&6
3883 echo "$as_me:3883: checking for native build C preprocessor" >&5
3884 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3886 # Check whether --with-build-cpp or --without-build-cpp was given.
3887 if test "${with_build_cpp+set}" = set; then
3888 withval="$with_build_cpp"
3889 BUILD_CPP="$withval"
3891 BUILD_CPP='${BUILD_CC} -E'
3893 echo "$as_me:3893: result: $BUILD_CPP" >&5
3894 echo "${ECHO_T}$BUILD_CPP" >&6
3896 echo "$as_me:3896: checking for native build C flags" >&5
3897 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3899 # Check whether --with-build-cflags or --without-build-cflags was given.
3900 if test "${with_build_cflags+set}" = set; then
3901 withval="$with_build_cflags"
3902 BUILD_CFLAGS="$withval"
3904 echo "$as_me:3904: result: $BUILD_CFLAGS" >&5
3905 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3907 echo "$as_me:3907: checking for native build C preprocessor-flags" >&5
3908 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3910 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3911 if test "${with_build_cppflags+set}" = set; then
3912 withval="$with_build_cppflags"
3913 BUILD_CPPFLAGS="$withval"
3915 echo "$as_me:3915: result: $BUILD_CPPFLAGS" >&5
3916 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3918 echo "$as_me:3918: checking for native build linker-flags" >&5
3919 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3921 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3922 if test "${with_build_ldflags+set}" = set; then
3923 withval="$with_build_ldflags"
3924 BUILD_LDFLAGS="$withval"
3926 echo "$as_me:3926: result: $BUILD_LDFLAGS" >&5
3927 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3929 echo "$as_me:3929: checking for native build linker-libraries" >&5
3930 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3932 # Check whether --with-build-libs or --without-build-libs was given.
3933 if test "${with_build_libs+set}" = set; then
3934 withval="$with_build_libs"
3935 BUILD_LIBS="$withval"
3937 echo "$as_me:3937: result: $BUILD_LIBS" >&5
3938 echo "${ECHO_T}$BUILD_LIBS" >&6
3940 # this assumes we're on Unix.
3944 : ${BUILD_CC:='${CC}'}
3946 if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3947 { { echo "$as_me:3947: error: Cross-build requires two compilers.
3948 Use --with-build-cc to specify the native compiler." >&5
3949 echo "$as_me: error: Cross-build requires two compilers.
3950 Use --with-build-cc to specify the native compiler." >&2;}
3951 { (exit 1); exit 1; }; }
3955 : ${BUILD_CC:='${CC}'}
3956 : ${BUILD_CPP:='${CPP}'}
3957 : ${BUILD_CFLAGS:='${CFLAGS}'}
3958 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3959 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3960 : ${BUILD_LIBS:='${LIBS}'}
3961 : ${BUILD_EXEEXT:='$x'}
3962 : ${BUILD_OBJEXT:='o'}
3965 ###############################################################################
3967 ### Options to allow the user to specify the set of libraries which are used.
3968 ### Use "--without-normal --with-shared" to allow the default model to be
3969 ### shared, for example.
3972 echo "$as_me:3972: checking if you want to build shared C-objects" >&5
3973 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
3975 # Check whether --with-shared or --without-shared was given.
3976 if test "${with_shared+set}" = set; then
3977 withval="$with_shared"
3978 with_shared=$withval
3982 echo "$as_me:3982: result: $with_shared" >&5
3983 echo "${ECHO_T}$with_shared" >&6
3984 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
3986 echo "$as_me:3986: checking for specified models" >&5
3987 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3988 test -z "$cf_list_models" && cf_list_models=normal
3989 echo "$as_me:3989: result: $cf_list_models" >&5
3990 echo "${ECHO_T}$cf_list_models" >&6
3992 ### Use the first model as the default, and save its suffix for use in building
3993 ### up test-applications.
3994 echo "$as_me:3994: checking for default model" >&5
3995 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3996 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3997 echo "$as_me:3997: result: $DFT_LWR_MODEL" >&5
3998 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4000 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4002 echo "$as_me:4002: checking for specific curses-directory" >&5
4003 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4005 # Check whether --with-curses-dir or --without-curses-dir was given.
4006 if test "${with_curses_dir+set}" = set; then
4007 withval="$with_curses_dir"
4008 cf_cv_curses_dir=$withval
4012 echo "$as_me:4012: result: $cf_cv_curses_dir" >&5
4013 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4015 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4018 if test "x$prefix" != xNONE; then
4019 cf_path_syntax="$prefix"
4021 cf_path_syntax="$ac_default_prefix"
4029 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4031 (.\${*prefix}*|.\${*dir}*)
4032 eval withval="$withval"
4035 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4040 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4043 { { echo "$as_me:4043: error: expected a pathname, not \"$withval\"" >&5
4044 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4045 { (exit 1); exit 1; }; }
4049 if test -d "$cf_cv_curses_dir"
4052 if test -n "$cf_cv_curses_dir/include" ; then
4053 for cf_add_incdir in $cf_cv_curses_dir/include
4055 while test $cf_add_incdir != /usr/include
4057 if test -d $cf_add_incdir
4060 if test -n "$CFLAGS$CPPFLAGS" ; then
4061 # a loop is needed to ensure we can add subdirs of existing dirs
4062 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4063 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4064 cf_have_incdir=yes; break
4069 if test "$cf_have_incdir" = no ; then
4070 if test "$cf_add_incdir" = /usr/local/include ; then
4071 if test "$GCC" = yes
4073 cf_save_CPPFLAGS=$CPPFLAGS
4075 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4076 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4078 cat >conftest.$ac_ext <<_ACEOF
4079 #line 4079 "configure"
4080 #include "confdefs.h"
4090 rm -f conftest.$ac_objext
4091 if { (eval echo "$as_me:4091: \"$ac_compile\"") >&5
4092 (eval $ac_compile) 2>&5
4094 echo "$as_me:4094: \$? = $ac_status" >&5
4095 (exit $ac_status); } &&
4096 { ac_try='test -s conftest.$ac_objext'
4097 { (eval echo "$as_me:4097: \"$ac_try\"") >&5
4100 echo "$as_me:4100: \$? = $ac_status" >&5
4101 (exit $ac_status); }; }; then
4104 echo "$as_me: failed program was:" >&5
4105 cat conftest.$ac_ext >&5
4108 rm -f conftest.$ac_objext conftest.$ac_ext
4109 CPPFLAGS=$cf_save_CPPFLAGS
4114 if test "$cf_have_incdir" = no ; then
4115 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4117 echo "${as_me:-configure}:4117: testing adding $cf_add_incdir to include-path ..." 1>&5
4119 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4121 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4122 test "$cf_top_incdir" = "$cf_add_incdir" && break
4123 cf_add_incdir="$cf_top_incdir"
4134 if test -n "$cf_cv_curses_dir/lib" ; then
4135 for cf_add_libdir in $cf_cv_curses_dir/lib
4137 if test $cf_add_libdir = /usr/lib ; then
4139 elif test -d $cf_add_libdir
4142 if test -n "$LDFLAGS$LIBS" ; then
4143 # a loop is needed to ensure we can add subdirs of existing dirs
4144 for cf_test_libdir in $LDFLAGS $LIBS ; do
4145 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4146 cf_have_libdir=yes; break
4150 if test "$cf_have_libdir" = no ; then
4151 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4153 echo "${as_me:-configure}:4153: testing adding $cf_add_libdir to library-path ..." 1>&5
4155 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4164 cf_ncuconfig_root=ncurses
4165 cf_have_ncuconfig=no
4167 if test "x${PKG_CONFIG:=none}" != xnone; then
4168 echo "$as_me:4168: checking pkg-config for $cf_ncuconfig_root" >&5
4169 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
4170 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
4171 echo "$as_me:4171: result: yes" >&5
4172 echo "${ECHO_T}yes" >&6
4174 echo "$as_me:4174: checking if the $cf_ncuconfig_root package files work" >&5
4175 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
4176 cf_have_ncuconfig=unknown
4178 cf_save_CFLAGS="$CFLAGS"
4179 cf_save_CPPFLAGS="$CPPFLAGS"
4180 cf_save_LIBS="$LIBS"
4182 cf_pkg_cflags=`$PKG_CONFIG --cflags $cf_ncuconfig_root`
4183 cf_pkg_libs=`$PKG_CONFIG --libs $cf_ncuconfig_root`
4185 # while -W for passing linker flags is prevalent, it is not "standard".
4186 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
4187 # incompatible _and_ non-standard -W option which gives an error. Work
4188 # around that pitfall.
4189 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
4195 cf_new_extra_cppflags=
4197 for cf_add_cflags in $cf_pkg_cflags
4199 case $cf_fix_cppflags in
4201 case $cf_add_cflags in
4202 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4203 case $cf_add_cflags in
4205 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4207 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4208 && test -z "${cf_tst_cflags}" \
4209 && cf_fix_cppflags=yes
4211 if test $cf_fix_cppflags = yes ; then
4213 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4214 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4217 elif test "${cf_tst_cflags}" = "\"'" ; then
4219 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4220 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4230 case $cf_add_cflags in
4232 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4234 CPPFLAGS=`echo "$CPPFLAGS" | \
4235 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4236 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4241 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4242 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4249 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4250 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4257 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4258 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4260 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4262 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4263 && test -z "${cf_tst_cflags}" \
4264 && cf_fix_cppflags=no
4269 if test -n "$cf_new_cflags" ; then
4271 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4272 CFLAGS="${CFLAGS}$cf_new_cflags"
4276 if test -n "$cf_new_cppflags" ; then
4278 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4279 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4283 if test -n "$cf_new_extra_cppflags" ; then
4285 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4286 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4293 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4295 for cf_add_1lib in $cf_add_0lib; do
4296 for cf_add_2lib in $cf_add_libs; do
4297 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4302 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4306 cat >conftest.$ac_ext <<_ACEOF
4307 #line 4307 "configure"
4308 #include "confdefs.h"
4309 #include <${cf_cv_ncurses_header:-curses.h}>
4313 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
4318 rm -f conftest.$ac_objext conftest$ac_exeext
4319 if { (eval echo "$as_me:4319: \"$ac_link\"") >&5
4320 (eval $ac_link) 2>&5
4322 echo "$as_me:4322: \$? = $ac_status" >&5
4323 (exit $ac_status); } &&
4324 { ac_try='test -s conftest$ac_exeext'
4325 { (eval echo "$as_me:4325: \"$ac_try\"") >&5
4328 echo "$as_me:4328: \$? = $ac_status" >&5
4329 (exit $ac_status); }; }; then
4330 if test "$cross_compiling" = yes; then
4331 cf_test_ncuconfig=maybe
4333 cat >conftest.$ac_ext <<_ACEOF
4334 #line 4334 "configure"
4335 #include "confdefs.h"
4336 #include <${cf_cv_ncurses_header:-curses.h}>
4338 { char *xx = curses_version(); return (xx == 0); }
4340 rm -f conftest$ac_exeext
4341 if { (eval echo "$as_me:4341: \"$ac_link\"") >&5
4342 (eval $ac_link) 2>&5
4344 echo "$as_me:4344: \$? = $ac_status" >&5
4345 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4346 { (eval echo "$as_me:4346: \"$ac_try\"") >&5
4349 echo "$as_me:4349: \$? = $ac_status" >&5
4350 (exit $ac_status); }; }; then
4351 cf_test_ncuconfig=yes
4353 echo "$as_me: program exited with status $ac_status" >&5
4354 echo "$as_me: failed program was:" >&5
4355 cat conftest.$ac_ext >&5
4356 cf_test_ncuconfig=no
4358 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4361 echo "$as_me: failed program was:" >&5
4362 cat conftest.$ac_ext >&5
4363 cf_test_ncuconfig=no
4365 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4367 CFLAGS="$cf_save_CFLAGS"
4368 CPPFLAGS="$cf_save_CPPFLAGS"
4369 LIBS="$cf_save_LIBS"
4371 if test "x$cf_test_ncuconfig" != xyes; then
4372 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4373 cf_pkg_cflags="$cf_temp"
4374 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4375 cf_pkg_libs="$cf_temp"
4383 cf_new_extra_cppflags=
4385 for cf_add_cflags in $cf_pkg_cflags
4387 case $cf_fix_cppflags in
4389 case $cf_add_cflags in
4390 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4391 case $cf_add_cflags in
4393 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4395 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4396 && test -z "${cf_tst_cflags}" \
4397 && cf_fix_cppflags=yes
4399 if test $cf_fix_cppflags = yes ; then
4401 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4402 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4405 elif test "${cf_tst_cflags}" = "\"'" ; then
4407 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4408 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4418 case $cf_add_cflags in
4420 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4422 CPPFLAGS=`echo "$CPPFLAGS" | \
4423 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4424 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4429 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4430 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4437 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4438 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4445 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4446 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4448 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4450 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4451 && test -z "${cf_tst_cflags}" \
4452 && cf_fix_cppflags=no
4457 if test -n "$cf_new_cflags" ; then
4459 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4460 CFLAGS="${CFLAGS}$cf_new_cflags"
4464 if test -n "$cf_new_cppflags" ; then
4466 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4467 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4471 if test -n "$cf_new_extra_cppflags" ; then
4473 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4474 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4481 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4483 for cf_add_1lib in $cf_add_0lib; do
4484 for cf_add_2lib in $cf_add_libs; do
4485 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4490 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4494 cat >conftest.$ac_ext <<_ACEOF
4495 #line 4495 "configure"
4496 #include "confdefs.h"
4497 #include <${cf_cv_ncurses_header:-curses.h}>
4501 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
4506 rm -f conftest.$ac_objext conftest$ac_exeext
4507 if { (eval echo "$as_me:4507: \"$ac_link\"") >&5
4508 (eval $ac_link) 2>&5
4510 echo "$as_me:4510: \$? = $ac_status" >&5
4511 (exit $ac_status); } &&
4512 { ac_try='test -s conftest$ac_exeext'
4513 { (eval echo "$as_me:4513: \"$ac_try\"") >&5
4516 echo "$as_me:4516: \$? = $ac_status" >&5
4517 (exit $ac_status); }; }; then
4518 if test "$cross_compiling" = yes; then
4519 cf_have_ncuconfig=maybe
4521 cat >conftest.$ac_ext <<_ACEOF
4522 #line 4522 "configure"
4523 #include "confdefs.h"
4524 #include <${cf_cv_ncurses_header:-curses.h}>
4526 { char *xx = curses_version(); return (xx == 0); }
4528 rm -f conftest$ac_exeext
4529 if { (eval echo "$as_me:4529: \"$ac_link\"") >&5
4530 (eval $ac_link) 2>&5
4532 echo "$as_me:4532: \$? = $ac_status" >&5
4533 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4534 { (eval echo "$as_me:4534: \"$ac_try\"") >&5
4537 echo "$as_me:4537: \$? = $ac_status" >&5
4538 (exit $ac_status); }; }; then
4539 cf_have_ncuconfig=yes
4541 echo "$as_me: program exited with status $ac_status" >&5
4542 echo "$as_me: failed program was:" >&5
4543 cat conftest.$ac_ext >&5
4544 cf_have_ncuconfig=no
4546 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4549 echo "$as_me: failed program was:" >&5
4550 cat conftest.$ac_ext >&5
4551 cf_have_ncuconfig=no
4553 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4554 echo "$as_me:4554: result: $cf_have_ncuconfig" >&5
4555 echo "${ECHO_T}$cf_have_ncuconfig" >&6
4556 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
4557 if test "$cf_have_ncuconfig" != "yes"
4559 CPPFLAGS="$cf_save_CPPFLAGS"
4560 LIBS="$cf_save_LIBS"
4561 NCURSES_CONFIG_PKG=none
4564 cat >>confdefs.h <<\EOF
4568 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
4570 echo "$as_me:4570: checking for terminfo header" >&5
4571 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4572 if test "${cf_cv_term_header+set}" = set; then
4573 echo $ECHO_N "(cached) $ECHO_C" >&6
4576 case ${cf_cv_ncurses_header} in
4577 (*/ncurses.h|*/ncursesw.h)
4578 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4581 cf_term_header=term.h
4585 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4587 cat >conftest.$ac_ext <<_ACEOF
4588 #line 4588 "configure"
4589 #include "confdefs.h"
4591 #include <${cf_cv_ncurses_header:-curses.h}>
4597 int x = auto_left_margin; (void)x
4602 rm -f conftest.$ac_objext
4603 if { (eval echo "$as_me:4603: \"$ac_compile\"") >&5
4604 (eval $ac_compile) 2>&5
4606 echo "$as_me:4606: \$? = $ac_status" >&5
4607 (exit $ac_status); } &&
4608 { ac_try='test -s conftest.$ac_objext'
4609 { (eval echo "$as_me:4609: \"$ac_try\"") >&5
4612 echo "$as_me:4612: \$? = $ac_status" >&5
4613 (exit $ac_status); }; }; then
4615 cf_cv_term_header="$cf_test"
4617 echo "$as_me: failed program was:" >&5
4618 cat conftest.$ac_ext >&5
4620 cf_cv_term_header=unknown
4623 rm -f conftest.$ac_objext conftest.$ac_ext
4624 test "$cf_cv_term_header" != unknown && break
4628 echo "$as_me:4628: result: $cf_cv_term_header" >&5
4629 echo "${ECHO_T}$cf_cv_term_header" >&6
4631 # Set definitions to allow ifdef'ing to accommodate subdirectories
4633 case $cf_cv_term_header in
4636 cat >>confdefs.h <<\EOF
4637 #define HAVE_TERM_H 1
4643 case $cf_cv_term_header in
4646 cat >>confdefs.h <<\EOF
4647 #define HAVE_NCURSES_TERM_H 1
4653 cat >>confdefs.h <<\EOF
4654 #define HAVE_NCURSESW_TERM_H 1
4663 echo "$as_me:4663: result: no" >&5
4664 echo "${ECHO_T}no" >&6
4665 NCURSES_CONFIG_PKG=none
4668 NCURSES_CONFIG_PKG=none
4671 if test "x$cf_have_ncuconfig" = "xno"; then
4672 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
4674 if test -n "$ac_tool_prefix"; then
4675 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4677 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4678 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4679 echo "$as_me:4679: checking for $ac_word" >&5
4680 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4681 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
4682 echo $ECHO_N "(cached) $ECHO_C" >&6
4684 if test -n "$NCURSES_CONFIG"; then
4685 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
4687 ac_save_IFS=$IFS; IFS=$ac_path_separator
4689 for ac_dir in $ac_dummy; do
4691 test -z "$ac_dir" && ac_dir=.
4692 $as_executable_p "$ac_dir/$ac_word" || continue
4693 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
4694 echo "$as_me:4694: found $ac_dir/$ac_word" >&5
4700 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
4701 if test -n "$NCURSES_CONFIG"; then
4702 echo "$as_me:4702: result: $NCURSES_CONFIG" >&5
4703 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4705 echo "$as_me:4705: result: no" >&5
4706 echo "${ECHO_T}no" >&6
4709 test -n "$NCURSES_CONFIG" && break
4712 if test -z "$NCURSES_CONFIG"; then
4713 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
4714 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4716 # Extract the first word of "$ac_prog", so it can be a program name with args.
4717 set dummy $ac_prog; ac_word=$2
4718 echo "$as_me:4718: checking for $ac_word" >&5
4719 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4720 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
4721 echo $ECHO_N "(cached) $ECHO_C" >&6
4723 if test -n "$ac_ct_NCURSES_CONFIG"; then
4724 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
4726 ac_save_IFS=$IFS; IFS=$ac_path_separator
4728 for ac_dir in $ac_dummy; do
4730 test -z "$ac_dir" && ac_dir=.
4731 $as_executable_p "$ac_dir/$ac_word" || continue
4732 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
4733 echo "$as_me:4733: found $ac_dir/$ac_word" >&5
4739 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
4740 if test -n "$ac_ct_NCURSES_CONFIG"; then
4741 echo "$as_me:4741: result: $ac_ct_NCURSES_CONFIG" >&5
4742 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
4744 echo "$as_me:4744: result: no" >&5
4745 echo "${ECHO_T}no" >&6
4748 test -n "$ac_ct_NCURSES_CONFIG" && break
4750 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
4752 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
4755 if test "$NCURSES_CONFIG" != none ; then
4760 cf_new_extra_cppflags=
4762 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
4764 case $cf_fix_cppflags in
4766 case $cf_add_cflags in
4767 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4768 case $cf_add_cflags in
4770 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4772 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4773 && test -z "${cf_tst_cflags}" \
4774 && cf_fix_cppflags=yes
4776 if test $cf_fix_cppflags = yes ; then
4778 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4779 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4782 elif test "${cf_tst_cflags}" = "\"'" ; then
4784 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4785 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4795 case $cf_add_cflags in
4797 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4799 CPPFLAGS=`echo "$CPPFLAGS" | \
4800 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4801 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4806 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4807 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4814 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4815 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4822 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4823 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4825 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4827 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4828 && test -z "${cf_tst_cflags}" \
4829 && cf_fix_cppflags=no
4834 if test -n "$cf_new_cflags" ; then
4836 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4837 CFLAGS="${CFLAGS}$cf_new_cflags"
4841 if test -n "$cf_new_cppflags" ; then
4843 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4844 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4848 if test -n "$cf_new_extra_cppflags" ; then
4850 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4851 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4858 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4860 for cf_add_1lib in $cf_add_0lib; do
4861 for cf_add_2lib in $cf_add_libs; do
4862 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4867 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4871 # even with config script, some packages use no-override for curses.h
4873 echo "$as_me:4873: checking if we have identified curses headers" >&5
4874 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4875 if test "${cf_cv_ncurses_header+set}" = set; then
4876 echo $ECHO_N "(cached) $ECHO_C" >&6
4879 cf_cv_ncurses_header=none
4881 ncurses.h ncurses/ncurses.h \
4882 curses.h ncurses/curses.h
4884 cat >conftest.$ac_ext <<_ACEOF
4885 #line 4885 "configure"
4886 #include "confdefs.h"
4887 #include <${cf_header}>
4891 initscr(); tgoto("?", 0,0)
4896 rm -f conftest.$ac_objext
4897 if { (eval echo "$as_me:4897: \"$ac_compile\"") >&5
4898 (eval $ac_compile) 2>&5
4900 echo "$as_me:4900: \$? = $ac_status" >&5
4901 (exit $ac_status); } &&
4902 { ac_try='test -s conftest.$ac_objext'
4903 { (eval echo "$as_me:4903: \"$ac_try\"") >&5
4906 echo "$as_me:4906: \$? = $ac_status" >&5
4907 (exit $ac_status); }; }; then
4908 cf_cv_ncurses_header=$cf_header; break
4910 echo "$as_me: failed program was:" >&5
4911 cat conftest.$ac_ext >&5
4913 rm -f conftest.$ac_objext conftest.$ac_ext
4917 echo "$as_me:4917: result: $cf_cv_ncurses_header" >&5
4918 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4920 if test "$cf_cv_ncurses_header" = none ; then
4921 { { echo "$as_me:4921: error: No curses header-files found" >&5
4922 echo "$as_me: error: No curses header-files found" >&2;}
4923 { (exit 1); exit 1; }; }
4926 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4928 for ac_header in $cf_cv_ncurses_header
4930 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4931 echo "$as_me:4931: checking for $ac_header" >&5
4932 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4933 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4934 echo $ECHO_N "(cached) $ECHO_C" >&6
4936 cat >conftest.$ac_ext <<_ACEOF
4937 #line 4937 "configure"
4938 #include "confdefs.h"
4939 #include <$ac_header>
4941 if { (eval echo "$as_me:4941: \"$ac_cpp conftest.$ac_ext\"") >&5
4942 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4944 egrep -v '^ *\+' conftest.er1 >conftest.err
4946 cat conftest.err >&5
4947 echo "$as_me:4947: \$? = $ac_status" >&5
4948 (exit $ac_status); } >/dev/null; then
4949 if test -s conftest.err; then
4950 ac_cpp_err=$ac_c_preproc_warn_flag
4957 if test -z "$ac_cpp_err"; then
4958 eval "$as_ac_Header=yes"
4960 echo "$as_me: failed program was:" >&5
4961 cat conftest.$ac_ext >&5
4962 eval "$as_ac_Header=no"
4964 rm -f conftest.err conftest.$ac_ext
4966 echo "$as_me:4966: result: `eval echo '${'$as_ac_Header'}'`" >&5
4967 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4968 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4969 cat >>confdefs.h <<EOF
4970 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4976 cat >>confdefs.h <<\EOF
4980 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4982 cat >>confdefs.h <<EOF
4983 #define $cf_nculib_ROOT 1
4986 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4990 cf_ncuhdr_root=ncurses
4992 test -n "$cf_cv_curses_dir" && \
4993 test "$cf_cv_curses_dir" != "no" && { \
4995 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4996 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4998 while test $cf_add_incdir != /usr/include
5000 if test -d $cf_add_incdir
5003 if test -n "$CFLAGS$CPPFLAGS" ; then
5004 # a loop is needed to ensure we can add subdirs of existing dirs
5005 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5006 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5007 cf_have_incdir=yes; break
5012 if test "$cf_have_incdir" = no ; then
5013 if test "$cf_add_incdir" = /usr/local/include ; then
5014 if test "$GCC" = yes
5016 cf_save_CPPFLAGS=$CPPFLAGS
5018 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5019 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5021 cat >conftest.$ac_ext <<_ACEOF
5022 #line 5022 "configure"
5023 #include "confdefs.h"
5033 rm -f conftest.$ac_objext
5034 if { (eval echo "$as_me:5034: \"$ac_compile\"") >&5
5035 (eval $ac_compile) 2>&5
5037 echo "$as_me:5037: \$? = $ac_status" >&5
5038 (exit $ac_status); } &&
5039 { ac_try='test -s conftest.$ac_objext'
5040 { (eval echo "$as_me:5040: \"$ac_try\"") >&5
5043 echo "$as_me:5043: \$? = $ac_status" >&5
5044 (exit $ac_status); }; }; then
5047 echo "$as_me: failed program was:" >&5
5048 cat conftest.$ac_ext >&5
5051 rm -f conftest.$ac_objext conftest.$ac_ext
5052 CPPFLAGS=$cf_save_CPPFLAGS
5057 if test "$cf_have_incdir" = no ; then
5058 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5060 echo "${as_me:-configure}:5060: testing adding $cf_add_incdir to include-path ..." 1>&5
5062 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5064 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5065 test "$cf_top_incdir" = "$cf_add_incdir" && break
5066 cf_add_incdir="$cf_top_incdir"
5079 echo "$as_me:5079: checking for $cf_ncuhdr_root header in include-path" >&5
5080 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5081 if test "${cf_cv_ncurses_h+set}" = set; then
5082 echo $ECHO_N "(cached) $ECHO_C" >&6
5085 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5086 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
5087 for cf_header in $cf_header_list
5090 cat >conftest.$ac_ext <<_ACEOF
5091 #line 5091 "configure"
5092 #include "confdefs.h"
5094 #include <$cf_header>
5099 #ifdef NCURSES_VERSION
5101 printf("%s\n", NCURSES_VERSION);
5114 rm -f conftest.$ac_objext
5115 if { (eval echo "$as_me:5115: \"$ac_compile\"") >&5
5116 (eval $ac_compile) 2>&5
5118 echo "$as_me:5118: \$? = $ac_status" >&5
5119 (exit $ac_status); } &&
5120 { ac_try='test -s conftest.$ac_objext'
5121 { (eval echo "$as_me:5121: \"$ac_try\"") >&5
5124 echo "$as_me:5124: \$? = $ac_status" >&5
5125 (exit $ac_status); }; }; then
5126 cf_cv_ncurses_h=$cf_header
5129 echo "$as_me: failed program was:" >&5
5130 cat conftest.$ac_ext >&5
5133 rm -f conftest.$ac_objext conftest.$ac_ext
5135 test "$cf_cv_ncurses_h" != no && break
5139 echo "$as_me:5139: result: $cf_cv_ncurses_h" >&5
5140 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5142 if test "$cf_cv_ncurses_h" != no ; then
5143 cf_cv_ncurses_header=$cf_cv_ncurses_h
5146 echo "$as_me:5146: checking for $cf_ncuhdr_root include-path" >&5
5147 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5148 if test "${cf_cv_ncurses_h2+set}" = set; then
5149 echo $ECHO_N "(cached) $ECHO_C" >&6
5152 test -n "$verbose" && echo
5156 # collect the current set of include-directories from compiler flags
5157 cf_header_path_list=""
5158 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5159 for cf_header_path in $CPPFLAGS $CFLAGS
5161 case $cf_header_path in
5163 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5165 test "x$cf_header_path" != "xNONE" && \
5166 test -d "$cf_header_path" && \
5168 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5169 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5170 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5171 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5172 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5173 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"
5176 cf_header_path_list="$cf_header_path_list $cf_search"
5182 # add the variations for the package we are looking for
5186 test "x$prefix" != "xNONE" && \
5187 test -d "$prefix" && \
5189 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5190 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5191 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5192 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5193 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5194 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5197 for cf_subdir_prefix in \
5206 test "x$cf_subdir_prefix" != "x$prefix" && \
5207 test -d "$cf_subdir_prefix" && \
5208 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5209 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5210 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
5211 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
5212 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
5213 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
5214 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"
5219 test "$includedir" != NONE && \
5220 test "$includedir" != "/usr/include" && \
5221 test -d "$includedir" && {
5222 test -d $includedir && cf_search="$cf_search $includedir"
5223 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5226 test "$oldincludedir" != NONE && \
5227 test "$oldincludedir" != "/usr/include" && \
5228 test -d "$oldincludedir" && {
5229 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5230 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5233 cf_search="$cf_search $cf_header_path_list"
5235 test -n "$verbose" && echo search path $cf_search
5236 cf_save2_CPPFLAGS="$CPPFLAGS"
5237 for cf_incdir in $cf_search
5240 if test -n "$cf_incdir" ; then
5241 for cf_add_incdir in $cf_incdir
5243 while test $cf_add_incdir != /usr/include
5245 if test -d $cf_add_incdir
5248 if test -n "$CFLAGS$CPPFLAGS" ; then
5249 # a loop is needed to ensure we can add subdirs of existing dirs
5250 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5251 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5252 cf_have_incdir=yes; break
5257 if test "$cf_have_incdir" = no ; then
5258 if test "$cf_add_incdir" = /usr/local/include ; then
5259 if test "$GCC" = yes
5261 cf_save_CPPFLAGS=$CPPFLAGS
5263 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5264 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5266 cat >conftest.$ac_ext <<_ACEOF
5267 #line 5267 "configure"
5268 #include "confdefs.h"
5278 rm -f conftest.$ac_objext
5279 if { (eval echo "$as_me:5279: \"$ac_compile\"") >&5
5280 (eval $ac_compile) 2>&5
5282 echo "$as_me:5282: \$? = $ac_status" >&5
5283 (exit $ac_status); } &&
5284 { ac_try='test -s conftest.$ac_objext'
5285 { (eval echo "$as_me:5285: \"$ac_try\"") >&5
5288 echo "$as_me:5288: \$? = $ac_status" >&5
5289 (exit $ac_status); }; }; then
5292 echo "$as_me: failed program was:" >&5
5293 cat conftest.$ac_ext >&5
5296 rm -f conftest.$ac_objext conftest.$ac_ext
5297 CPPFLAGS=$cf_save_CPPFLAGS
5302 if test "$cf_have_incdir" = no ; then
5303 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5305 echo "${as_me:-configure}:5305: testing adding $cf_add_incdir to include-path ..." 1>&5
5307 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5309 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5310 test "$cf_top_incdir" = "$cf_add_incdir" && break
5311 cf_add_incdir="$cf_top_incdir"
5327 cat >conftest.$ac_ext <<_ACEOF
5328 #line 5328 "configure"
5329 #include "confdefs.h"
5331 #include <$cf_header>
5336 #ifdef NCURSES_VERSION
5338 printf("%s\n", NCURSES_VERSION);
5351 rm -f conftest.$ac_objext
5352 if { (eval echo "$as_me:5352: \"$ac_compile\"") >&5
5353 (eval $ac_compile) 2>&5
5355 echo "$as_me:5355: \$? = $ac_status" >&5
5356 (exit $ac_status); } &&
5357 { ac_try='test -s conftest.$ac_objext'
5358 { (eval echo "$as_me:5358: \"$ac_try\"") >&5
5361 echo "$as_me:5361: \$? = $ac_status" >&5
5362 (exit $ac_status); }; }; then
5363 cf_cv_ncurses_h2=$cf_header
5366 echo "$as_me: failed program was:" >&5
5367 cat conftest.$ac_ext >&5
5370 rm -f conftest.$ac_objext conftest.$ac_ext
5372 if test "$cf_cv_ncurses_h2" != no ; then
5373 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5374 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
5377 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5379 CPPFLAGS="$cf_save2_CPPFLAGS"
5380 test "$cf_cv_ncurses_h2" != no && break
5382 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5382: error: not found" >&5
5383 echo "$as_me: error: not found" >&2;}
5384 { (exit 1); exit 1; }; }
5387 echo "$as_me:5387: result: $cf_cv_ncurses_h2" >&5
5388 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5390 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
5391 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
5392 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
5393 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
5396 if test -n "$cf_1st_incdir" ; then
5397 for cf_add_incdir in $cf_1st_incdir
5399 while test $cf_add_incdir != /usr/include
5401 if test -d $cf_add_incdir
5404 if test -n "$CFLAGS$CPPFLAGS" ; then
5405 # a loop is needed to ensure we can add subdirs of existing dirs
5406 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5407 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5408 cf_have_incdir=yes; break
5413 if test "$cf_have_incdir" = no ; then
5414 if test "$cf_add_incdir" = /usr/local/include ; then
5415 if test "$GCC" = yes
5417 cf_save_CPPFLAGS=$CPPFLAGS
5419 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5420 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5422 cat >conftest.$ac_ext <<_ACEOF
5423 #line 5423 "configure"
5424 #include "confdefs.h"
5434 rm -f conftest.$ac_objext
5435 if { (eval echo "$as_me:5435: \"$ac_compile\"") >&5
5436 (eval $ac_compile) 2>&5
5438 echo "$as_me:5438: \$? = $ac_status" >&5
5439 (exit $ac_status); } &&
5440 { ac_try='test -s conftest.$ac_objext'
5441 { (eval echo "$as_me:5441: \"$ac_try\"") >&5
5444 echo "$as_me:5444: \$? = $ac_status" >&5
5445 (exit $ac_status); }; }; then
5448 echo "$as_me: failed program was:" >&5
5449 cat conftest.$ac_ext >&5
5452 rm -f conftest.$ac_objext conftest.$ac_ext
5453 CPPFLAGS=$cf_save_CPPFLAGS
5458 if test "$cf_have_incdir" = no ; then
5459 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5461 echo "${as_me:-configure}:5461: testing adding $cf_add_incdir to include-path ..." 1>&5
5463 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5465 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5466 test "$cf_top_incdir" = "$cf_add_incdir" && break
5467 cf_add_incdir="$cf_top_incdir"
5480 # Set definitions to allow ifdef'ing for ncurses.h
5482 case $cf_cv_ncurses_header in
5485 cat >>confdefs.h <<\EOF
5486 #define HAVE_NCURSES_H 1
5492 case $cf_cv_ncurses_header in
5493 (ncurses/curses.h|ncurses/ncurses.h)
5495 cat >>confdefs.h <<\EOF
5496 #define HAVE_NCURSES_NCURSES_H 1
5500 (ncursesw/curses.h|ncursesw/ncurses.h)
5502 cat >>confdefs.h <<\EOF
5503 #define HAVE_NCURSESW_NCURSES_H 1
5509 echo "$as_me:5509: checking for terminfo header" >&5
5510 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5511 if test "${cf_cv_term_header+set}" = set; then
5512 echo $ECHO_N "(cached) $ECHO_C" >&6
5515 case ${cf_cv_ncurses_header} in
5516 (*/ncurses.h|*/ncursesw.h)
5517 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5520 cf_term_header=term.h
5524 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5526 cat >conftest.$ac_ext <<_ACEOF
5527 #line 5527 "configure"
5528 #include "confdefs.h"
5530 #include <${cf_cv_ncurses_header:-curses.h}>
5536 int x = auto_left_margin; (void)x
5541 rm -f conftest.$ac_objext
5542 if { (eval echo "$as_me:5542: \"$ac_compile\"") >&5
5543 (eval $ac_compile) 2>&5
5545 echo "$as_me:5545: \$? = $ac_status" >&5
5546 (exit $ac_status); } &&
5547 { ac_try='test -s conftest.$ac_objext'
5548 { (eval echo "$as_me:5548: \"$ac_try\"") >&5
5551 echo "$as_me:5551: \$? = $ac_status" >&5
5552 (exit $ac_status); }; }; then
5554 cf_cv_term_header="$cf_test"
5556 echo "$as_me: failed program was:" >&5
5557 cat conftest.$ac_ext >&5
5559 cf_cv_term_header=unknown
5562 rm -f conftest.$ac_objext conftest.$ac_ext
5563 test "$cf_cv_term_header" != unknown && break
5567 echo "$as_me:5567: result: $cf_cv_term_header" >&5
5568 echo "${ECHO_T}$cf_cv_term_header" >&6
5570 # Set definitions to allow ifdef'ing to accommodate subdirectories
5572 case $cf_cv_term_header in
5575 cat >>confdefs.h <<\EOF
5576 #define HAVE_TERM_H 1
5582 case $cf_cv_term_header in
5585 cat >>confdefs.h <<\EOF
5586 #define HAVE_NCURSES_TERM_H 1
5592 cat >>confdefs.h <<\EOF
5593 #define HAVE_NCURSESW_TERM_H 1
5599 # some applications need this, but should check for NCURSES_VERSION
5601 cat >>confdefs.h <<\EOF
5605 echo "$as_me:5605: checking for ncurses version" >&5
5606 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5607 if test "${cf_cv_ncurses_version+set}" = set; then
5608 echo $ECHO_N "(cached) $ECHO_C" >&6
5611 cf_cv_ncurses_version=no
5614 if test "$cross_compiling" = yes; then
5616 # This will not work if the preprocessor splits the line after the
5617 # Autoconf token. The 'unproto' program does that.
5618 cat > conftest.$ac_ext <<EOF
5619 #include <${cf_cv_ncurses_header:-curses.h}>
5621 #ifdef NCURSES_VERSION
5622 Autoconf NCURSES_VERSION
5630 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5631 { (eval echo "$as_me:5631: \"$cf_try\"") >&5
5634 echo "$as_me:5634: \$? = $ac_status" >&5
5635 (exit $ac_status); }
5636 if test -f conftest.out ; then
5637 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5638 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5643 cat >conftest.$ac_ext <<_ACEOF
5644 #line 5644 "configure"
5645 #include "confdefs.h"
5647 #include <${cf_cv_ncurses_header:-curses.h}>
5651 FILE *fp = fopen("$cf_tempfile", "w");
5652 #ifdef NCURSES_VERSION
5653 # ifdef NCURSES_VERSION_PATCH
5654 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5656 fprintf(fp, "%s\n", NCURSES_VERSION);
5660 fprintf(fp, "old\n");
5665 ${cf_cv_main_return:-return}(0);
5668 rm -f conftest$ac_exeext
5669 if { (eval echo "$as_me:5669: \"$ac_link\"") >&5
5670 (eval $ac_link) 2>&5
5672 echo "$as_me:5672: \$? = $ac_status" >&5
5673 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5674 { (eval echo "$as_me:5674: \"$ac_try\"") >&5
5677 echo "$as_me:5677: \$? = $ac_status" >&5
5678 (exit $ac_status); }; }; then
5680 cf_cv_ncurses_version=`cat $cf_tempfile`
5682 echo "$as_me: program exited with status $ac_status" >&5
5683 echo "$as_me: failed program was:" >&5
5684 cat conftest.$ac_ext >&5
5686 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5691 echo "$as_me:5691: result: $cf_cv_ncurses_version" >&5
5692 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5693 test "$cf_cv_ncurses_version" = no ||
5694 cat >>confdefs.h <<\EOF
5698 cf_nculib_root=ncurses
5699 # This works, except for the special case where we find gpm, but
5700 # ncurses is in a nonstandard location via $LIBS, and we really want
5703 cf_ncurses_SAVE="$LIBS"
5704 echo "$as_me:5704: checking for Gpm_Open in -lgpm" >&5
5705 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5706 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5707 echo $ECHO_N "(cached) $ECHO_C" >&6
5709 ac_check_lib_save_LIBS=$LIBS
5711 cat >conftest.$ac_ext <<_ACEOF
5712 #line 5712 "configure"
5713 #include "confdefs.h"
5715 /* Override any gcc2 internal prototype to avoid an error. */
5719 /* We use char because int might match the return type of a gcc2
5720 builtin and then its argument prototype would still apply. */
5730 rm -f conftest.$ac_objext conftest$ac_exeext
5731 if { (eval echo "$as_me:5731: \"$ac_link\"") >&5
5732 (eval $ac_link) 2>&5
5734 echo "$as_me:5734: \$? = $ac_status" >&5
5735 (exit $ac_status); } &&
5736 { ac_try='test -s conftest$ac_exeext'
5737 { (eval echo "$as_me:5737: \"$ac_try\"") >&5
5740 echo "$as_me:5740: \$? = $ac_status" >&5
5741 (exit $ac_status); }; }; then
5742 ac_cv_lib_gpm_Gpm_Open=yes
5744 echo "$as_me: failed program was:" >&5
5745 cat conftest.$ac_ext >&5
5746 ac_cv_lib_gpm_Gpm_Open=no
5748 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5749 LIBS=$ac_check_lib_save_LIBS
5751 echo "$as_me:5751: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5752 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5753 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5754 echo "$as_me:5754: checking for initscr in -lgpm" >&5
5755 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5756 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5757 echo $ECHO_N "(cached) $ECHO_C" >&6
5759 ac_check_lib_save_LIBS=$LIBS
5761 cat >conftest.$ac_ext <<_ACEOF
5762 #line 5762 "configure"
5763 #include "confdefs.h"
5765 /* Override any gcc2 internal prototype to avoid an error. */
5769 /* We use char because int might match the return type of a gcc2
5770 builtin and then its argument prototype would still apply. */
5780 rm -f conftest.$ac_objext conftest$ac_exeext
5781 if { (eval echo "$as_me:5781: \"$ac_link\"") >&5
5782 (eval $ac_link) 2>&5
5784 echo "$as_me:5784: \$? = $ac_status" >&5
5785 (exit $ac_status); } &&
5786 { ac_try='test -s conftest$ac_exeext'
5787 { (eval echo "$as_me:5787: \"$ac_try\"") >&5
5790 echo "$as_me:5790: \$? = $ac_status" >&5
5791 (exit $ac_status); }; }; then
5792 ac_cv_lib_gpm_initscr=yes
5794 echo "$as_me: failed program was:" >&5
5795 cat conftest.$ac_ext >&5
5796 ac_cv_lib_gpm_initscr=no
5798 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5799 LIBS=$ac_check_lib_save_LIBS
5801 echo "$as_me:5801: result: $ac_cv_lib_gpm_initscr" >&5
5802 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
5803 if test $ac_cv_lib_gpm_initscr = yes; then
5804 LIBS="$cf_ncurses_SAVE"
5806 cf_ncurses_LIBS="-lgpm"
5813 # This is only necessary if you are linking against an obsolete
5814 # version of ncurses (but it should do no harm, since it's static).
5815 if test "$cf_nculib_root" = ncurses ; then
5816 echo "$as_me:5816: checking for tgoto in -lmytinfo" >&5
5817 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5818 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5819 echo $ECHO_N "(cached) $ECHO_C" >&6
5821 ac_check_lib_save_LIBS=$LIBS
5822 LIBS="-lmytinfo $LIBS"
5823 cat >conftest.$ac_ext <<_ACEOF
5824 #line 5824 "configure"
5825 #include "confdefs.h"
5827 /* Override any gcc2 internal prototype to avoid an error. */
5831 /* We use char because int might match the return type of a gcc2
5832 builtin and then its argument prototype would still apply. */
5842 rm -f conftest.$ac_objext conftest$ac_exeext
5843 if { (eval echo "$as_me:5843: \"$ac_link\"") >&5
5844 (eval $ac_link) 2>&5
5846 echo "$as_me:5846: \$? = $ac_status" >&5
5847 (exit $ac_status); } &&
5848 { ac_try='test -s conftest$ac_exeext'
5849 { (eval echo "$as_me:5849: \"$ac_try\"") >&5
5852 echo "$as_me:5852: \$? = $ac_status" >&5
5853 (exit $ac_status); }; }; then
5854 ac_cv_lib_mytinfo_tgoto=yes
5856 echo "$as_me: failed program was:" >&5
5857 cat conftest.$ac_ext >&5
5858 ac_cv_lib_mytinfo_tgoto=no
5860 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5861 LIBS=$ac_check_lib_save_LIBS
5863 echo "$as_me:5863: result: $ac_cv_lib_mytinfo_tgoto" >&5
5864 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5865 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5866 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5876 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5878 for cf_add_1lib in $cf_add_0lib; do
5879 for cf_add_2lib in $cf_add_libs; do
5880 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5885 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5889 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5895 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5897 for cf_add_1lib in $cf_add_0lib; do
5898 for cf_add_2lib in $cf_add_libs; do
5899 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5904 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5910 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5912 echo "$as_me:5912: checking for initscr" >&5
5913 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
5914 if test "${ac_cv_func_initscr+set}" = set; then
5915 echo $ECHO_N "(cached) $ECHO_C" >&6
5917 cat >conftest.$ac_ext <<_ACEOF
5918 #line 5918 "configure"
5919 #include "confdefs.h"
5920 #define initscr autoconf_temporary
5921 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
5928 /* We use char because int might match the return type of a gcc2
5929 builtin and then its argument prototype would still apply. */
5930 char initscr (void);
5936 /* The GNU C library defines stubs for functions which it implements
5937 to always fail with ENOSYS. Some functions are actually named
5938 something starting with __ and the normal name is an alias. */
5939 #if defined (__stub_initscr) || defined (__stub___initscr)
5940 #error found stub for initscr
5948 rm -f conftest.$ac_objext conftest$ac_exeext
5949 if { (eval echo "$as_me:5949: \"$ac_link\"") >&5
5950 (eval $ac_link) 2>&5
5952 echo "$as_me:5952: \$? = $ac_status" >&5
5953 (exit $ac_status); } &&
5954 { ac_try='test -s conftest$ac_exeext'
5955 { (eval echo "$as_me:5955: \"$ac_try\"") >&5
5958 echo "$as_me:5958: \$? = $ac_status" >&5
5959 (exit $ac_status); }; }; then
5960 ac_cv_func_initscr=yes
5962 echo "$as_me: failed program was:" >&5
5963 cat conftest.$ac_ext >&5
5964 ac_cv_func_initscr=no
5966 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5968 echo "$as_me:5968: result: $ac_cv_func_initscr" >&5
5969 echo "${ECHO_T}$ac_cv_func_initscr" >&6
5970 if test $ac_cv_func_initscr = yes; then
5971 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5974 cf_save_LIBS="$LIBS"
5975 echo "$as_me:5975: checking for initscr in -l$cf_nculib_root" >&5
5976 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
5977 LIBS="-l$cf_nculib_root $LIBS"
5978 cat >conftest.$ac_ext <<_ACEOF
5979 #line 5979 "configure"
5980 #include "confdefs.h"
5981 #include <${cf_cv_ncurses_header:-curses.h}>
5990 rm -f conftest.$ac_objext conftest$ac_exeext
5991 if { (eval echo "$as_me:5991: \"$ac_link\"") >&5
5992 (eval $ac_link) 2>&5
5994 echo "$as_me:5994: \$? = $ac_status" >&5
5995 (exit $ac_status); } &&
5996 { ac_try='test -s conftest$ac_exeext'
5997 { (eval echo "$as_me:5997: \"$ac_try\"") >&5
6000 echo "$as_me:6000: \$? = $ac_status" >&5
6001 (exit $ac_status); }; }; then
6002 echo "$as_me:6002: result: yes" >&5
6003 echo "${ECHO_T}yes" >&6
6004 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6007 echo "$as_me: failed program was:" >&5
6008 cat conftest.$ac_ext >&5
6009 echo "$as_me:6009: result: no" >&5
6010 echo "${ECHO_T}no" >&6
6013 cf_library_path_list=""
6014 if test -n "${LDFLAGS}${LIBS}" ; then
6015 for cf_library_path in $LDFLAGS $LIBS
6017 case $cf_library_path in
6019 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6021 test "x$cf_library_path" != "xNONE" && \
6022 test -d "$cf_library_path" && \
6024 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6025 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6026 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6027 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6028 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6029 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"
6032 cf_library_path_list="$cf_library_path_list $cf_search"
6040 test "x$prefix" != "xNONE" && \
6041 test -d "$prefix" && \
6043 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6044 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6045 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6046 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6047 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6048 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6051 for cf_subdir_prefix in \
6060 test "x$cf_subdir_prefix" != "x$prefix" && \
6061 test -d "$cf_subdir_prefix" && \
6062 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6063 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6064 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
6065 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
6066 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
6067 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
6068 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"
6073 cf_search="$cf_library_path_list $cf_search"
6075 for cf_libdir in $cf_search
6077 echo "$as_me:6077: checking for -l$cf_nculib_root in $cf_libdir" >&5
6078 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6079 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6080 cat >conftest.$ac_ext <<_ACEOF
6081 #line 6081 "configure"
6082 #include "confdefs.h"
6083 #include <${cf_cv_ncurses_header:-curses.h}>
6092 rm -f conftest.$ac_objext conftest$ac_exeext
6093 if { (eval echo "$as_me:6093: \"$ac_link\"") >&5
6094 (eval $ac_link) 2>&5
6096 echo "$as_me:6096: \$? = $ac_status" >&5
6097 (exit $ac_status); } &&
6098 { ac_try='test -s conftest$ac_exeext'
6099 { (eval echo "$as_me:6099: \"$ac_try\"") >&5
6102 echo "$as_me:6102: \$? = $ac_status" >&5
6103 (exit $ac_status); }; }; then
6104 echo "$as_me:6104: result: yes" >&5
6105 echo "${ECHO_T}yes" >&6
6106 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6109 echo "$as_me: failed program was:" >&5
6110 cat conftest.$ac_ext >&5
6111 echo "$as_me:6111: result: no" >&5
6112 echo "${ECHO_T}no" >&6
6113 LIBS="$cf_save_LIBS"
6115 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6119 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6123 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
6125 if test $cf_found_library = no ; then
6126 { { echo "$as_me:6126: error: Cannot link $cf_nculib_root library" >&5
6127 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6128 { (exit 1); exit 1; }; }
6133 if test -n "$cf_ncurses_LIBS" ; then
6134 echo "$as_me:6134: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6135 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6136 cf_ncurses_SAVE="$LIBS"
6137 for p in $cf_ncurses_LIBS ; do
6138 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
6139 if test "$q" != "$LIBS" ; then
6143 cat >conftest.$ac_ext <<_ACEOF
6144 #line 6144 "configure"
6145 #include "confdefs.h"
6146 #include <${cf_cv_ncurses_header:-curses.h}>
6150 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6155 rm -f conftest.$ac_objext conftest$ac_exeext
6156 if { (eval echo "$as_me:6156: \"$ac_link\"") >&5
6157 (eval $ac_link) 2>&5
6159 echo "$as_me:6159: \$? = $ac_status" >&5
6160 (exit $ac_status); } &&
6161 { ac_try='test -s conftest$ac_exeext'
6162 { (eval echo "$as_me:6162: \"$ac_try\"") >&5
6165 echo "$as_me:6165: \$? = $ac_status" >&5
6166 (exit $ac_status); }; }; then
6167 echo "$as_me:6167: result: yes" >&5
6168 echo "${ECHO_T}yes" >&6
6170 echo "$as_me: failed program was:" >&5
6171 cat conftest.$ac_ext >&5
6172 echo "$as_me:6172: result: no" >&5
6173 echo "${ECHO_T}no" >&6
6174 LIBS="$cf_ncurses_SAVE"
6176 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6179 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6181 cat >>confdefs.h <<EOF
6182 #define $cf_nculib_ROOT 1
6190 echo "$as_me:6190: checking if you want wide-character code" >&5
6191 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6193 # Check whether --enable-widec or --disable-widec was given.
6194 if test "${enable_widec+set}" = set; then
6195 enableval="$enable_widec"
6196 with_widec=$enableval
6200 echo "$as_me:6200: result: $with_widec" >&5
6201 echo "${ECHO_T}$with_widec" >&6
6202 if test "$with_widec" = yes ; then
6204 echo "$as_me:6204: checking for multibyte character support" >&5
6205 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6206 if test "${cf_cv_utf8_lib+set}" = set; then
6207 echo $ECHO_N "(cached) $ECHO_C" >&6
6210 cf_save_LIBS="$LIBS"
6211 cat >conftest.$ac_ext <<_ACEOF
6212 #line 6212 "configure"
6213 #include "confdefs.h"
6224 rm -f conftest.$ac_objext conftest$ac_exeext
6225 if { (eval echo "$as_me:6225: \"$ac_link\"") >&5
6226 (eval $ac_link) 2>&5
6228 echo "$as_me:6228: \$? = $ac_status" >&5
6229 (exit $ac_status); } &&
6230 { ac_try='test -s conftest$ac_exeext'
6231 { (eval echo "$as_me:6231: \"$ac_try\"") >&5
6234 echo "$as_me:6234: \$? = $ac_status" >&5
6235 (exit $ac_status); }; }; then
6238 echo "$as_me: failed program was:" >&5
6239 cat conftest.$ac_ext >&5
6241 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6242 # will be set on completion of the AC_TRY_LINK below.
6243 cf_cv_header_path_utf8=
6244 cf_cv_library_path_utf8=
6246 echo "${as_me:-configure}:6246: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6248 cf_save_LIBS="$LIBS"
6250 cat >conftest.$ac_ext <<_ACEOF
6251 #line 6251 "configure"
6252 #include "confdefs.h"
6254 #include <libutf8.h>
6263 rm -f conftest.$ac_objext conftest$ac_exeext
6264 if { (eval echo "$as_me:6264: \"$ac_link\"") >&5
6265 (eval $ac_link) 2>&5
6267 echo "$as_me:6267: \$? = $ac_status" >&5
6268 (exit $ac_status); } &&
6269 { ac_try='test -s conftest$ac_exeext'
6270 { (eval echo "$as_me:6270: \"$ac_try\"") >&5
6273 echo "$as_me:6273: \$? = $ac_status" >&5
6274 (exit $ac_status); }; }; then
6276 cf_cv_find_linkage_utf8=yes
6277 cf_cv_header_path_utf8=/usr/include
6278 cf_cv_library_path_utf8=/usr/lib
6281 echo "$as_me: failed program was:" >&5
6282 cat conftest.$ac_ext >&5
6284 LIBS="-lutf8 $cf_save_LIBS"
6286 cat >conftest.$ac_ext <<_ACEOF
6287 #line 6287 "configure"
6288 #include "confdefs.h"
6290 #include <libutf8.h>
6299 rm -f conftest.$ac_objext conftest$ac_exeext
6300 if { (eval echo "$as_me:6300: \"$ac_link\"") >&5
6301 (eval $ac_link) 2>&5
6303 echo "$as_me:6303: \$? = $ac_status" >&5
6304 (exit $ac_status); } &&
6305 { ac_try='test -s conftest$ac_exeext'
6306 { (eval echo "$as_me:6306: \"$ac_try\"") >&5
6309 echo "$as_me:6309: \$? = $ac_status" >&5
6310 (exit $ac_status); }; }; then
6312 cf_cv_find_linkage_utf8=yes
6313 cf_cv_header_path_utf8=/usr/include
6314 cf_cv_library_path_utf8=/usr/lib
6315 cf_cv_library_file_utf8="-lutf8"
6318 echo "$as_me: failed program was:" >&5
6319 cat conftest.$ac_ext >&5
6321 cf_cv_find_linkage_utf8=no
6322 LIBS="$cf_save_LIBS"
6324 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6326 echo "${as_me:-configure}:6326: testing find linkage for utf8 library ..." 1>&5
6328 echo "${as_me:-configure}:6328: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6330 cf_save_CPPFLAGS="$CPPFLAGS"
6331 cf_test_CPPFLAGS="$CPPFLAGS"
6335 # collect the current set of include-directories from compiler flags
6336 cf_header_path_list=""
6337 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6338 for cf_header_path in $CPPFLAGS $CFLAGS
6340 case $cf_header_path in
6342 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6344 test "x$cf_header_path" != "xNONE" && \
6345 test -d "$cf_header_path" && \
6347 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6348 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6349 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
6350 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
6351 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
6352 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6355 cf_header_path_list="$cf_header_path_list $cf_search"
6361 # add the variations for the package we are looking for
6365 test "x$prefix" != "xNONE" && \
6366 test -d "$prefix" && \
6368 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6369 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6370 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
6371 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
6372 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
6373 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
6376 for cf_subdir_prefix in \
6385 test "x$cf_subdir_prefix" != "x$prefix" && \
6386 test -d "$cf_subdir_prefix" && \
6387 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6388 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6389 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6390 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6391 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6392 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6393 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6398 test "$includedir" != NONE && \
6399 test "$includedir" != "/usr/include" && \
6400 test -d "$includedir" && {
6401 test -d $includedir && cf_search="$cf_search $includedir"
6402 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
6405 test "$oldincludedir" != NONE && \
6406 test "$oldincludedir" != "/usr/include" && \
6407 test -d "$oldincludedir" && {
6408 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6409 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
6412 cf_search="$cf_search $cf_header_path_list"
6414 for cf_cv_header_path_utf8 in $cf_search
6416 if test -d $cf_cv_header_path_utf8 ; then
6417 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6419 echo "${as_me:-configure}:6419: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6421 CPPFLAGS="$cf_save_CPPFLAGS"
6423 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6424 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
6426 cat >conftest.$ac_ext <<_ACEOF
6427 #line 6427 "configure"
6428 #include "confdefs.h"
6430 #include <libutf8.h>
6439 rm -f conftest.$ac_objext
6440 if { (eval echo "$as_me:6440: \"$ac_compile\"") >&5
6441 (eval $ac_compile) 2>&5
6443 echo "$as_me:6443: \$? = $ac_status" >&5
6444 (exit $ac_status); } &&
6445 { ac_try='test -s conftest.$ac_objext'
6446 { (eval echo "$as_me:6446: \"$ac_try\"") >&5
6449 echo "$as_me:6449: \$? = $ac_status" >&5
6450 (exit $ac_status); }; }; then
6452 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6454 echo "${as_me:-configure}:6454: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6456 cf_cv_find_linkage_utf8=maybe
6457 cf_test_CPPFLAGS="$CPPFLAGS"
6460 echo "$as_me: failed program was:" >&5
6461 cat conftest.$ac_ext >&5
6463 CPPFLAGS="$cf_save_CPPFLAGS"
6466 rm -f conftest.$ac_objext conftest.$ac_ext
6470 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6472 echo "${as_me:-configure}:6472: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6474 cf_save_LIBS="$LIBS"
6475 cf_save_LDFLAGS="$LDFLAGS"
6477 if test "$cf_cv_find_linkage_utf8" != yes ; then
6480 cf_library_path_list=""
6481 if test -n "${LDFLAGS}${LIBS}" ; then
6482 for cf_library_path in $LDFLAGS $LIBS
6484 case $cf_library_path in
6486 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6488 test "x$cf_library_path" != "xNONE" && \
6489 test -d "$cf_library_path" && \
6491 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6492 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6493 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
6494 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6495 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
6496 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6499 cf_library_path_list="$cf_library_path_list $cf_search"
6507 test "x$prefix" != "xNONE" && \
6508 test -d "$prefix" && \
6510 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6511 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6512 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
6513 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
6514 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
6515 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
6518 for cf_subdir_prefix in \
6527 test "x$cf_subdir_prefix" != "x$prefix" && \
6528 test -d "$cf_subdir_prefix" && \
6529 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6530 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6531 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
6532 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6533 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6534 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6535 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6540 cf_search="$cf_library_path_list $cf_search"
6542 for cf_cv_library_path_utf8 in $cf_search
6544 if test -d $cf_cv_library_path_utf8 ; then
6545 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6547 echo "${as_me:-configure}:6547: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6549 CPPFLAGS="$cf_test_CPPFLAGS"
6550 LIBS="-lutf8 $cf_save_LIBS"
6551 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6552 cat >conftest.$ac_ext <<_ACEOF
6553 #line 6553 "configure"
6554 #include "confdefs.h"
6556 #include <libutf8.h>
6565 rm -f conftest.$ac_objext conftest$ac_exeext
6566 if { (eval echo "$as_me:6566: \"$ac_link\"") >&5
6567 (eval $ac_link) 2>&5
6569 echo "$as_me:6569: \$? = $ac_status" >&5
6570 (exit $ac_status); } &&
6571 { ac_try='test -s conftest$ac_exeext'
6572 { (eval echo "$as_me:6572: \"$ac_try\"") >&5
6575 echo "$as_me:6575: \$? = $ac_status" >&5
6576 (exit $ac_status); }; }; then
6578 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
6580 echo "${as_me:-configure}:6580: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
6582 cf_cv_find_linkage_utf8=yes
6583 cf_cv_library_file_utf8="-lutf8"
6586 echo "$as_me: failed program was:" >&5
6587 cat conftest.$ac_ext >&5
6589 CPPFLAGS="$cf_save_CPPFLAGS"
6590 LIBS="$cf_save_LIBS"
6591 LDFLAGS="$cf_save_LDFLAGS"
6594 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6597 CPPFLAGS="$cf_save_CPPFLAGS"
6598 LDFLAGS="$cf_save_LDFLAGS"
6602 cf_cv_find_linkage_utf8=no
6606 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6609 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6611 LIBS="$cf_save_LIBS"
6613 if test "$cf_cv_find_linkage_utf8" = yes ; then
6614 cf_cv_utf8_lib=add-on
6620 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6622 echo "$as_me:6622: result: $cf_cv_utf8_lib" >&5
6623 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
6625 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
6627 if test "$cf_cv_utf8_lib" = "add-on" ; then
6629 cat >>confdefs.h <<\EOF
6630 #define HAVE_LIBUTF8_H 1
6633 if test -n "$cf_cv_header_path_utf8" ; then
6634 for cf_add_incdir in $cf_cv_header_path_utf8
6636 while test $cf_add_incdir != /usr/include
6638 if test -d $cf_add_incdir
6641 if test -n "$CFLAGS$CPPFLAGS" ; then
6642 # a loop is needed to ensure we can add subdirs of existing dirs
6643 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6644 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6645 cf_have_incdir=yes; break
6650 if test "$cf_have_incdir" = no ; then
6651 if test "$cf_add_incdir" = /usr/local/include ; then
6652 if test "$GCC" = yes
6654 cf_save_CPPFLAGS=$CPPFLAGS
6656 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6657 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6659 cat >conftest.$ac_ext <<_ACEOF
6660 #line 6660 "configure"
6661 #include "confdefs.h"
6671 rm -f conftest.$ac_objext
6672 if { (eval echo "$as_me:6672: \"$ac_compile\"") >&5
6673 (eval $ac_compile) 2>&5
6675 echo "$as_me:6675: \$? = $ac_status" >&5
6676 (exit $ac_status); } &&
6677 { ac_try='test -s conftest.$ac_objext'
6678 { (eval echo "$as_me:6678: \"$ac_try\"") >&5
6681 echo "$as_me:6681: \$? = $ac_status" >&5
6682 (exit $ac_status); }; }; then
6685 echo "$as_me: failed program was:" >&5
6686 cat conftest.$ac_ext >&5
6689 rm -f conftest.$ac_objext conftest.$ac_ext
6690 CPPFLAGS=$cf_save_CPPFLAGS
6695 if test "$cf_have_incdir" = no ; then
6696 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6698 echo "${as_me:-configure}:6698: testing adding $cf_add_incdir to include-path ..." 1>&5
6700 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6702 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6703 test "$cf_top_incdir" = "$cf_add_incdir" && break
6704 cf_add_incdir="$cf_top_incdir"
6715 if test -n "$cf_cv_library_path_utf8" ; then
6716 for cf_add_libdir in $cf_cv_library_path_utf8
6718 if test $cf_add_libdir = /usr/lib ; then
6720 elif test -d $cf_add_libdir
6723 if test -n "$LDFLAGS$LIBS" ; then
6724 # a loop is needed to ensure we can add subdirs of existing dirs
6725 for cf_test_libdir in $LDFLAGS $LIBS ; do
6726 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6727 cf_have_libdir=yes; break
6731 if test "$cf_have_libdir" = no ; then
6732 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6734 echo "${as_me:-configure}:6734: testing adding $cf_add_libdir to library-path ..." 1>&5
6736 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6745 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6747 for cf_add_1lib in $cf_add_0lib; do
6748 for cf_add_2lib in $cf_add_libs; do
6749 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6754 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6760 cf_ncuconfig_root=ncursesw
6761 cf_have_ncuconfig=no
6763 if test "x${PKG_CONFIG:=none}" != xnone; then
6764 echo "$as_me:6764: checking pkg-config for $cf_ncuconfig_root" >&5
6765 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
6766 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
6767 echo "$as_me:6767: result: yes" >&5
6768 echo "${ECHO_T}yes" >&6
6770 echo "$as_me:6770: checking if the $cf_ncuconfig_root package files work" >&5
6771 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
6772 cf_have_ncuconfig=unknown
6774 cf_save_CFLAGS="$CFLAGS"
6775 cf_save_CPPFLAGS="$CPPFLAGS"
6776 cf_save_LIBS="$LIBS"
6778 cf_pkg_cflags=`$PKG_CONFIG --cflags $cf_ncuconfig_root`
6779 cf_pkg_libs=`$PKG_CONFIG --libs $cf_ncuconfig_root`
6781 # while -W for passing linker flags is prevalent, it is not "standard".
6782 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
6783 # incompatible _and_ non-standard -W option which gives an error. Work
6784 # around that pitfall.
6785 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
6791 cf_new_extra_cppflags=
6793 for cf_add_cflags in $cf_pkg_cflags
6795 case $cf_fix_cppflags in
6797 case $cf_add_cflags in
6798 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
6799 case $cf_add_cflags in
6801 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6803 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6804 && test -z "${cf_tst_cflags}" \
6805 && cf_fix_cppflags=yes
6807 if test $cf_fix_cppflags = yes ; then
6809 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6810 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6813 elif test "${cf_tst_cflags}" = "\"'" ; then
6815 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6816 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6826 case $cf_add_cflags in
6828 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6830 CPPFLAGS=`echo "$CPPFLAGS" | \
6831 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
6832 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
6837 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
6838 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
6845 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
6846 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
6853 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6854 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6856 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
6858 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6859 && test -z "${cf_tst_cflags}" \
6860 && cf_fix_cppflags=no
6865 if test -n "$cf_new_cflags" ; then
6867 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
6868 CFLAGS="${CFLAGS}$cf_new_cflags"
6872 if test -n "$cf_new_cppflags" ; then
6874 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6875 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
6879 if test -n "$cf_new_extra_cppflags" ; then
6881 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
6882 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
6889 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6891 for cf_add_1lib in $cf_add_0lib; do
6892 for cf_add_2lib in $cf_add_libs; do
6893 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6898 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6902 cat >conftest.$ac_ext <<_ACEOF
6903 #line 6903 "configure"
6904 #include "confdefs.h"
6905 #include <${cf_cv_ncurses_header:-curses.h}>
6909 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6914 rm -f conftest.$ac_objext conftest$ac_exeext
6915 if { (eval echo "$as_me:6915: \"$ac_link\"") >&5
6916 (eval $ac_link) 2>&5
6918 echo "$as_me:6918: \$? = $ac_status" >&5
6919 (exit $ac_status); } &&
6920 { ac_try='test -s conftest$ac_exeext'
6921 { (eval echo "$as_me:6921: \"$ac_try\"") >&5
6924 echo "$as_me:6924: \$? = $ac_status" >&5
6925 (exit $ac_status); }; }; then
6926 if test "$cross_compiling" = yes; then
6927 cf_test_ncuconfig=maybe
6929 cat >conftest.$ac_ext <<_ACEOF
6930 #line 6930 "configure"
6931 #include "confdefs.h"
6932 #include <${cf_cv_ncurses_header:-curses.h}>
6934 { char *xx = curses_version(); return (xx == 0); }
6936 rm -f conftest$ac_exeext
6937 if { (eval echo "$as_me:6937: \"$ac_link\"") >&5
6938 (eval $ac_link) 2>&5
6940 echo "$as_me:6940: \$? = $ac_status" >&5
6941 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6942 { (eval echo "$as_me:6942: \"$ac_try\"") >&5
6945 echo "$as_me:6945: \$? = $ac_status" >&5
6946 (exit $ac_status); }; }; then
6947 cf_test_ncuconfig=yes
6949 echo "$as_me: program exited with status $ac_status" >&5
6950 echo "$as_me: failed program was:" >&5
6951 cat conftest.$ac_ext >&5
6952 cf_test_ncuconfig=no
6954 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6957 echo "$as_me: failed program was:" >&5
6958 cat conftest.$ac_ext >&5
6959 cf_test_ncuconfig=no
6961 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6963 CFLAGS="$cf_save_CFLAGS"
6964 CPPFLAGS="$cf_save_CPPFLAGS"
6965 LIBS="$cf_save_LIBS"
6967 if test "x$cf_test_ncuconfig" != xyes; then
6968 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
6969 cf_pkg_cflags="$cf_temp"
6970 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
6971 cf_pkg_libs="$cf_temp"
6979 cf_new_extra_cppflags=
6981 for cf_add_cflags in $cf_pkg_cflags
6983 case $cf_fix_cppflags in
6985 case $cf_add_cflags in
6986 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
6987 case $cf_add_cflags in
6989 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6991 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6992 && test -z "${cf_tst_cflags}" \
6993 && cf_fix_cppflags=yes
6995 if test $cf_fix_cppflags = yes ; then
6997 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6998 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7001 elif test "${cf_tst_cflags}" = "\"'" ; then
7003 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7004 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7014 case $cf_add_cflags in
7016 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7018 CPPFLAGS=`echo "$CPPFLAGS" | \
7019 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7020 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7025 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7026 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7033 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7034 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7041 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7042 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7044 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7046 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7047 && test -z "${cf_tst_cflags}" \
7048 && cf_fix_cppflags=no
7053 if test -n "$cf_new_cflags" ; then
7055 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7056 CFLAGS="${CFLAGS}$cf_new_cflags"
7060 if test -n "$cf_new_cppflags" ; then
7062 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7063 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7067 if test -n "$cf_new_extra_cppflags" ; then
7069 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7070 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7077 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7079 for cf_add_1lib in $cf_add_0lib; do
7080 for cf_add_2lib in $cf_add_libs; do
7081 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7086 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7090 cat >conftest.$ac_ext <<_ACEOF
7091 #line 7091 "configure"
7092 #include "confdefs.h"
7093 #include <${cf_cv_ncurses_header:-curses.h}>
7097 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7102 rm -f conftest.$ac_objext conftest$ac_exeext
7103 if { (eval echo "$as_me:7103: \"$ac_link\"") >&5
7104 (eval $ac_link) 2>&5
7106 echo "$as_me:7106: \$? = $ac_status" >&5
7107 (exit $ac_status); } &&
7108 { ac_try='test -s conftest$ac_exeext'
7109 { (eval echo "$as_me:7109: \"$ac_try\"") >&5
7112 echo "$as_me:7112: \$? = $ac_status" >&5
7113 (exit $ac_status); }; }; then
7114 if test "$cross_compiling" = yes; then
7115 cf_have_ncuconfig=maybe
7117 cat >conftest.$ac_ext <<_ACEOF
7118 #line 7118 "configure"
7119 #include "confdefs.h"
7120 #include <${cf_cv_ncurses_header:-curses.h}>
7122 { char *xx = curses_version(); return (xx == 0); }
7124 rm -f conftest$ac_exeext
7125 if { (eval echo "$as_me:7125: \"$ac_link\"") >&5
7126 (eval $ac_link) 2>&5
7128 echo "$as_me:7128: \$? = $ac_status" >&5
7129 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7130 { (eval echo "$as_me:7130: \"$ac_try\"") >&5
7133 echo "$as_me:7133: \$? = $ac_status" >&5
7134 (exit $ac_status); }; }; then
7135 cf_have_ncuconfig=yes
7137 echo "$as_me: program exited with status $ac_status" >&5
7138 echo "$as_me: failed program was:" >&5
7139 cat conftest.$ac_ext >&5
7140 cf_have_ncuconfig=no
7142 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7145 echo "$as_me: failed program was:" >&5
7146 cat conftest.$ac_ext >&5
7147 cf_have_ncuconfig=no
7149 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7150 echo "$as_me:7150: result: $cf_have_ncuconfig" >&5
7151 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7152 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7153 if test "$cf_have_ncuconfig" != "yes"
7155 CPPFLAGS="$cf_save_CPPFLAGS"
7156 LIBS="$cf_save_LIBS"
7157 NCURSES_CONFIG_PKG=none
7160 cat >>confdefs.h <<\EOF
7164 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7166 echo "$as_me:7166: checking for terminfo header" >&5
7167 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7168 if test "${cf_cv_term_header+set}" = set; then
7169 echo $ECHO_N "(cached) $ECHO_C" >&6
7172 case ${cf_cv_ncurses_header} in
7173 (*/ncurses.h|*/ncursesw.h)
7174 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7177 cf_term_header=term.h
7181 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7183 cat >conftest.$ac_ext <<_ACEOF
7184 #line 7184 "configure"
7185 #include "confdefs.h"
7187 #include <${cf_cv_ncurses_header:-curses.h}>
7193 int x = auto_left_margin; (void)x
7198 rm -f conftest.$ac_objext
7199 if { (eval echo "$as_me:7199: \"$ac_compile\"") >&5
7200 (eval $ac_compile) 2>&5
7202 echo "$as_me:7202: \$? = $ac_status" >&5
7203 (exit $ac_status); } &&
7204 { ac_try='test -s conftest.$ac_objext'
7205 { (eval echo "$as_me:7205: \"$ac_try\"") >&5
7208 echo "$as_me:7208: \$? = $ac_status" >&5
7209 (exit $ac_status); }; }; then
7211 cf_cv_term_header="$cf_test"
7213 echo "$as_me: failed program was:" >&5
7214 cat conftest.$ac_ext >&5
7216 cf_cv_term_header=unknown
7219 rm -f conftest.$ac_objext conftest.$ac_ext
7220 test "$cf_cv_term_header" != unknown && break
7224 echo "$as_me:7224: result: $cf_cv_term_header" >&5
7225 echo "${ECHO_T}$cf_cv_term_header" >&6
7227 # Set definitions to allow ifdef'ing to accommodate subdirectories
7229 case $cf_cv_term_header in
7232 cat >>confdefs.h <<\EOF
7233 #define HAVE_TERM_H 1
7239 case $cf_cv_term_header in
7242 cat >>confdefs.h <<\EOF
7243 #define HAVE_NCURSES_TERM_H 1
7249 cat >>confdefs.h <<\EOF
7250 #define HAVE_NCURSESW_TERM_H 1
7259 echo "$as_me:7259: result: no" >&5
7260 echo "${ECHO_T}no" >&6
7261 NCURSES_CONFIG_PKG=none
7264 NCURSES_CONFIG_PKG=none
7267 if test "x$cf_have_ncuconfig" = "xno"; then
7268 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7270 if test -n "$ac_tool_prefix"; then
7271 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7273 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7274 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7275 echo "$as_me:7275: checking for $ac_word" >&5
7276 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7277 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7278 echo $ECHO_N "(cached) $ECHO_C" >&6
7280 if test -n "$NCURSES_CONFIG"; then
7281 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7283 ac_save_IFS=$IFS; IFS=$ac_path_separator
7285 for ac_dir in $ac_dummy; do
7287 test -z "$ac_dir" && ac_dir=.
7288 $as_executable_p "$ac_dir/$ac_word" || continue
7289 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7290 echo "$as_me:7290: found $ac_dir/$ac_word" >&5
7296 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7297 if test -n "$NCURSES_CONFIG"; then
7298 echo "$as_me:7298: result: $NCURSES_CONFIG" >&5
7299 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7301 echo "$as_me:7301: result: no" >&5
7302 echo "${ECHO_T}no" >&6
7305 test -n "$NCURSES_CONFIG" && break
7308 if test -z "$NCURSES_CONFIG"; then
7309 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7310 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7312 # Extract the first word of "$ac_prog", so it can be a program name with args.
7313 set dummy $ac_prog; ac_word=$2
7314 echo "$as_me:7314: checking for $ac_word" >&5
7315 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7316 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7317 echo $ECHO_N "(cached) $ECHO_C" >&6
7319 if test -n "$ac_ct_NCURSES_CONFIG"; then
7320 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7322 ac_save_IFS=$IFS; IFS=$ac_path_separator
7324 for ac_dir in $ac_dummy; do
7326 test -z "$ac_dir" && ac_dir=.
7327 $as_executable_p "$ac_dir/$ac_word" || continue
7328 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7329 echo "$as_me:7329: found $ac_dir/$ac_word" >&5
7335 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7336 if test -n "$ac_ct_NCURSES_CONFIG"; then
7337 echo "$as_me:7337: result: $ac_ct_NCURSES_CONFIG" >&5
7338 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7340 echo "$as_me:7340: result: no" >&5
7341 echo "${ECHO_T}no" >&6
7344 test -n "$ac_ct_NCURSES_CONFIG" && break
7346 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7348 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7351 if test "$NCURSES_CONFIG" != none ; then
7356 cf_new_extra_cppflags=
7358 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7360 case $cf_fix_cppflags in
7362 case $cf_add_cflags in
7363 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7364 case $cf_add_cflags in
7366 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7368 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7369 && test -z "${cf_tst_cflags}" \
7370 && cf_fix_cppflags=yes
7372 if test $cf_fix_cppflags = yes ; then
7374 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7375 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7378 elif test "${cf_tst_cflags}" = "\"'" ; then
7380 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7381 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7391 case $cf_add_cflags in
7393 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7395 CPPFLAGS=`echo "$CPPFLAGS" | \
7396 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7397 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7402 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7403 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7410 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7411 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7418 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7419 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7421 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7423 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7424 && test -z "${cf_tst_cflags}" \
7425 && cf_fix_cppflags=no
7430 if test -n "$cf_new_cflags" ; then
7432 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7433 CFLAGS="${CFLAGS}$cf_new_cflags"
7437 if test -n "$cf_new_cppflags" ; then
7439 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7440 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7444 if test -n "$cf_new_extra_cppflags" ; then
7446 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7447 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7454 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7456 for cf_add_1lib in $cf_add_0lib; do
7457 for cf_add_2lib in $cf_add_libs; do
7458 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7463 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7467 # even with config script, some packages use no-override for curses.h
7469 echo "$as_me:7469: checking if we have identified curses headers" >&5
7470 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7471 if test "${cf_cv_ncurses_header+set}" = set; then
7472 echo $ECHO_N "(cached) $ECHO_C" >&6
7475 cf_cv_ncurses_header=none
7477 ncurses.h ncursesw/ncurses.h \
7478 curses.h ncursesw/curses.h
7480 cat >conftest.$ac_ext <<_ACEOF
7481 #line 7481 "configure"
7482 #include "confdefs.h"
7483 #include <${cf_header}>
7487 initscr(); tgoto("?", 0,0)
7492 rm -f conftest.$ac_objext
7493 if { (eval echo "$as_me:7493: \"$ac_compile\"") >&5
7494 (eval $ac_compile) 2>&5
7496 echo "$as_me:7496: \$? = $ac_status" >&5
7497 (exit $ac_status); } &&
7498 { ac_try='test -s conftest.$ac_objext'
7499 { (eval echo "$as_me:7499: \"$ac_try\"") >&5
7502 echo "$as_me:7502: \$? = $ac_status" >&5
7503 (exit $ac_status); }; }; then
7504 cf_cv_ncurses_header=$cf_header; break
7506 echo "$as_me: failed program was:" >&5
7507 cat conftest.$ac_ext >&5
7509 rm -f conftest.$ac_objext conftest.$ac_ext
7513 echo "$as_me:7513: result: $cf_cv_ncurses_header" >&5
7514 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7516 if test "$cf_cv_ncurses_header" = none ; then
7517 { { echo "$as_me:7517: error: No curses header-files found" >&5
7518 echo "$as_me: error: No curses header-files found" >&2;}
7519 { (exit 1); exit 1; }; }
7522 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7524 for ac_header in $cf_cv_ncurses_header
7526 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7527 echo "$as_me:7527: checking for $ac_header" >&5
7528 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7529 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7530 echo $ECHO_N "(cached) $ECHO_C" >&6
7532 cat >conftest.$ac_ext <<_ACEOF
7533 #line 7533 "configure"
7534 #include "confdefs.h"
7535 #include <$ac_header>
7537 if { (eval echo "$as_me:7537: \"$ac_cpp conftest.$ac_ext\"") >&5
7538 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7540 egrep -v '^ *\+' conftest.er1 >conftest.err
7542 cat conftest.err >&5
7543 echo "$as_me:7543: \$? = $ac_status" >&5
7544 (exit $ac_status); } >/dev/null; then
7545 if test -s conftest.err; then
7546 ac_cpp_err=$ac_c_preproc_warn_flag
7553 if test -z "$ac_cpp_err"; then
7554 eval "$as_ac_Header=yes"
7556 echo "$as_me: failed program was:" >&5
7557 cat conftest.$ac_ext >&5
7558 eval "$as_ac_Header=no"
7560 rm -f conftest.err conftest.$ac_ext
7562 echo "$as_me:7562: result: `eval echo '${'$as_ac_Header'}'`" >&5
7563 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7564 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7565 cat >>confdefs.h <<EOF
7566 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7572 cat >>confdefs.h <<\EOF
7576 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7578 cat >>confdefs.h <<EOF
7579 #define $cf_nculib_ROOT 1
7582 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7586 cf_ncuhdr_root=ncursesw
7588 test -n "$cf_cv_curses_dir" && \
7589 test "$cf_cv_curses_dir" != "no" && { \
7591 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7592 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7594 while test $cf_add_incdir != /usr/include
7596 if test -d $cf_add_incdir
7599 if test -n "$CFLAGS$CPPFLAGS" ; then
7600 # a loop is needed to ensure we can add subdirs of existing dirs
7601 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7602 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7603 cf_have_incdir=yes; break
7608 if test "$cf_have_incdir" = no ; then
7609 if test "$cf_add_incdir" = /usr/local/include ; then
7610 if test "$GCC" = yes
7612 cf_save_CPPFLAGS=$CPPFLAGS
7614 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7615 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7617 cat >conftest.$ac_ext <<_ACEOF
7618 #line 7618 "configure"
7619 #include "confdefs.h"
7629 rm -f conftest.$ac_objext
7630 if { (eval echo "$as_me:7630: \"$ac_compile\"") >&5
7631 (eval $ac_compile) 2>&5
7633 echo "$as_me:7633: \$? = $ac_status" >&5
7634 (exit $ac_status); } &&
7635 { ac_try='test -s conftest.$ac_objext'
7636 { (eval echo "$as_me:7636: \"$ac_try\"") >&5
7639 echo "$as_me:7639: \$? = $ac_status" >&5
7640 (exit $ac_status); }; }; then
7643 echo "$as_me: failed program was:" >&5
7644 cat conftest.$ac_ext >&5
7647 rm -f conftest.$ac_objext conftest.$ac_ext
7648 CPPFLAGS=$cf_save_CPPFLAGS
7653 if test "$cf_have_incdir" = no ; then
7654 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7656 echo "${as_me:-configure}:7656: testing adding $cf_add_incdir to include-path ..." 1>&5
7658 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7660 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7661 test "$cf_top_incdir" = "$cf_add_incdir" && break
7662 cf_add_incdir="$cf_top_incdir"
7675 echo "$as_me:7675: checking for $cf_ncuhdr_root header in include-path" >&5
7676 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
7677 if test "${cf_cv_ncurses_h+set}" = set; then
7678 echo $ECHO_N "(cached) $ECHO_C" >&6
7681 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
7682 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
7683 for cf_header in $cf_header_list
7686 cat >conftest.$ac_ext <<_ACEOF
7687 #line 7687 "configure"
7688 #include "confdefs.h"
7690 #define _XOPEN_SOURCE_EXTENDED
7691 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
7692 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
7694 #include <$cf_header>
7699 #ifdef NCURSES_VERSION
7705 printf("%s\n", NCURSES_VERSION);
7718 rm -f conftest.$ac_objext
7719 if { (eval echo "$as_me:7719: \"$ac_compile\"") >&5
7720 (eval $ac_compile) 2>&5
7722 echo "$as_me:7722: \$? = $ac_status" >&5
7723 (exit $ac_status); } &&
7724 { ac_try='test -s conftest.$ac_objext'
7725 { (eval echo "$as_me:7725: \"$ac_try\"") >&5
7728 echo "$as_me:7728: \$? = $ac_status" >&5
7729 (exit $ac_status); }; }; then
7730 cf_cv_ncurses_h=$cf_header
7733 echo "$as_me: failed program was:" >&5
7734 cat conftest.$ac_ext >&5
7737 rm -f conftest.$ac_objext conftest.$ac_ext
7739 test "$cf_cv_ncurses_h" != no && break
7743 echo "$as_me:7743: result: $cf_cv_ncurses_h" >&5
7744 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
7746 if test "$cf_cv_ncurses_h" != no ; then
7747 cf_cv_ncurses_header=$cf_cv_ncurses_h
7750 echo "$as_me:7750: checking for $cf_ncuhdr_root include-path" >&5
7751 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
7752 if test "${cf_cv_ncurses_h2+set}" = set; then
7753 echo $ECHO_N "(cached) $ECHO_C" >&6
7756 test -n "$verbose" && echo
7760 # collect the current set of include-directories from compiler flags
7761 cf_header_path_list=""
7762 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7763 for cf_header_path in $CPPFLAGS $CFLAGS
7765 case $cf_header_path in
7767 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7769 test "x$cf_header_path" != "xNONE" && \
7770 test -d "$cf_header_path" && \
7772 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7773 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7774 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
7775 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
7776 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
7777 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"
7780 cf_header_path_list="$cf_header_path_list $cf_search"
7786 # add the variations for the package we are looking for
7790 test "x$prefix" != "xNONE" && \
7791 test -d "$prefix" && \
7793 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7794 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7795 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
7796 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
7797 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
7798 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7801 for cf_subdir_prefix in \
7810 test "x$cf_subdir_prefix" != "x$prefix" && \
7811 test -d "$cf_subdir_prefix" && \
7812 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7813 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7814 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
7815 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
7816 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
7817 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
7818 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"
7823 test "$includedir" != NONE && \
7824 test "$includedir" != "/usr/include" && \
7825 test -d "$includedir" && {
7826 test -d $includedir && cf_search="$cf_search $includedir"
7827 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
7830 test "$oldincludedir" != NONE && \
7831 test "$oldincludedir" != "/usr/include" && \
7832 test -d "$oldincludedir" && {
7833 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7834 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
7837 cf_search="$cf_search $cf_header_path_list"
7839 test -n "$verbose" && echo search path $cf_search
7840 cf_save2_CPPFLAGS="$CPPFLAGS"
7841 for cf_incdir in $cf_search
7844 if test -n "$cf_incdir" ; then
7845 for cf_add_incdir in $cf_incdir
7847 while test $cf_add_incdir != /usr/include
7849 if test -d $cf_add_incdir
7852 if test -n "$CFLAGS$CPPFLAGS" ; then
7853 # a loop is needed to ensure we can add subdirs of existing dirs
7854 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7855 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7856 cf_have_incdir=yes; break
7861 if test "$cf_have_incdir" = no ; then
7862 if test "$cf_add_incdir" = /usr/local/include ; then
7863 if test "$GCC" = yes
7865 cf_save_CPPFLAGS=$CPPFLAGS
7867 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7868 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7870 cat >conftest.$ac_ext <<_ACEOF
7871 #line 7871 "configure"
7872 #include "confdefs.h"
7882 rm -f conftest.$ac_objext
7883 if { (eval echo "$as_me:7883: \"$ac_compile\"") >&5
7884 (eval $ac_compile) 2>&5
7886 echo "$as_me:7886: \$? = $ac_status" >&5
7887 (exit $ac_status); } &&
7888 { ac_try='test -s conftest.$ac_objext'
7889 { (eval echo "$as_me:7889: \"$ac_try\"") >&5
7892 echo "$as_me:7892: \$? = $ac_status" >&5
7893 (exit $ac_status); }; }; then
7896 echo "$as_me: failed program was:" >&5
7897 cat conftest.$ac_ext >&5
7900 rm -f conftest.$ac_objext conftest.$ac_ext
7901 CPPFLAGS=$cf_save_CPPFLAGS
7906 if test "$cf_have_incdir" = no ; then
7907 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7909 echo "${as_me:-configure}:7909: testing adding $cf_add_incdir to include-path ..." 1>&5
7911 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7913 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7914 test "$cf_top_incdir" = "$cf_add_incdir" && break
7915 cf_add_incdir="$cf_top_incdir"
7931 cat >conftest.$ac_ext <<_ACEOF
7932 #line 7932 "configure"
7933 #include "confdefs.h"
7935 #include <$cf_header>
7940 #ifdef NCURSES_VERSION
7942 printf("%s\n", NCURSES_VERSION);
7955 rm -f conftest.$ac_objext
7956 if { (eval echo "$as_me:7956: \"$ac_compile\"") >&5
7957 (eval $ac_compile) 2>&5
7959 echo "$as_me:7959: \$? = $ac_status" >&5
7960 (exit $ac_status); } &&
7961 { ac_try='test -s conftest.$ac_objext'
7962 { (eval echo "$as_me:7962: \"$ac_try\"") >&5
7965 echo "$as_me:7965: \$? = $ac_status" >&5
7966 (exit $ac_status); }; }; then
7967 cf_cv_ncurses_h2=$cf_header
7970 echo "$as_me: failed program was:" >&5
7971 cat conftest.$ac_ext >&5
7974 rm -f conftest.$ac_objext conftest.$ac_ext
7976 if test "$cf_cv_ncurses_h2" != no ; then
7977 cf_cv_ncurses_h2=$cf_incdir/$cf_header
7978 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
7981 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
7983 CPPFLAGS="$cf_save2_CPPFLAGS"
7984 test "$cf_cv_ncurses_h2" != no && break
7986 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:7986: error: not found" >&5
7987 echo "$as_me: error: not found" >&2;}
7988 { (exit 1); exit 1; }; }
7991 echo "$as_me:7991: result: $cf_cv_ncurses_h2" >&5
7992 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
7994 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
7995 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
7996 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
7997 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8000 if test -n "$cf_1st_incdir" ; then
8001 for cf_add_incdir in $cf_1st_incdir
8003 while test $cf_add_incdir != /usr/include
8005 if test -d $cf_add_incdir
8008 if test -n "$CFLAGS$CPPFLAGS" ; then
8009 # a loop is needed to ensure we can add subdirs of existing dirs
8010 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8011 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8012 cf_have_incdir=yes; break
8017 if test "$cf_have_incdir" = no ; then
8018 if test "$cf_add_incdir" = /usr/local/include ; then
8019 if test "$GCC" = yes
8021 cf_save_CPPFLAGS=$CPPFLAGS
8023 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8024 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8026 cat >conftest.$ac_ext <<_ACEOF
8027 #line 8027 "configure"
8028 #include "confdefs.h"
8038 rm -f conftest.$ac_objext
8039 if { (eval echo "$as_me:8039: \"$ac_compile\"") >&5
8040 (eval $ac_compile) 2>&5
8042 echo "$as_me:8042: \$? = $ac_status" >&5
8043 (exit $ac_status); } &&
8044 { ac_try='test -s conftest.$ac_objext'
8045 { (eval echo "$as_me:8045: \"$ac_try\"") >&5
8048 echo "$as_me:8048: \$? = $ac_status" >&5
8049 (exit $ac_status); }; }; then
8052 echo "$as_me: failed program was:" >&5
8053 cat conftest.$ac_ext >&5
8056 rm -f conftest.$ac_objext conftest.$ac_ext
8057 CPPFLAGS=$cf_save_CPPFLAGS
8062 if test "$cf_have_incdir" = no ; then
8063 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8065 echo "${as_me:-configure}:8065: testing adding $cf_add_incdir to include-path ..." 1>&5
8067 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8069 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8070 test "$cf_top_incdir" = "$cf_add_incdir" && break
8071 cf_add_incdir="$cf_top_incdir"
8084 # Set definitions to allow ifdef'ing for ncurses.h
8086 case $cf_cv_ncurses_header in
8089 cat >>confdefs.h <<\EOF
8090 #define HAVE_NCURSES_H 1
8096 case $cf_cv_ncurses_header in
8097 (ncurses/curses.h|ncurses/ncurses.h)
8099 cat >>confdefs.h <<\EOF
8100 #define HAVE_NCURSES_NCURSES_H 1
8104 (ncursesw/curses.h|ncursesw/ncurses.h)
8106 cat >>confdefs.h <<\EOF
8107 #define HAVE_NCURSESW_NCURSES_H 1
8113 echo "$as_me:8113: checking for terminfo header" >&5
8114 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8115 if test "${cf_cv_term_header+set}" = set; then
8116 echo $ECHO_N "(cached) $ECHO_C" >&6
8119 case ${cf_cv_ncurses_header} in
8120 (*/ncurses.h|*/ncursesw.h)
8121 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8124 cf_term_header=term.h
8128 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8130 cat >conftest.$ac_ext <<_ACEOF
8131 #line 8131 "configure"
8132 #include "confdefs.h"
8134 #include <${cf_cv_ncurses_header:-curses.h}>
8140 int x = auto_left_margin; (void)x
8145 rm -f conftest.$ac_objext
8146 if { (eval echo "$as_me:8146: \"$ac_compile\"") >&5
8147 (eval $ac_compile) 2>&5
8149 echo "$as_me:8149: \$? = $ac_status" >&5
8150 (exit $ac_status); } &&
8151 { ac_try='test -s conftest.$ac_objext'
8152 { (eval echo "$as_me:8152: \"$ac_try\"") >&5
8155 echo "$as_me:8155: \$? = $ac_status" >&5
8156 (exit $ac_status); }; }; then
8158 cf_cv_term_header="$cf_test"
8160 echo "$as_me: failed program was:" >&5
8161 cat conftest.$ac_ext >&5
8163 cf_cv_term_header=unknown
8166 rm -f conftest.$ac_objext conftest.$ac_ext
8167 test "$cf_cv_term_header" != unknown && break
8171 echo "$as_me:8171: result: $cf_cv_term_header" >&5
8172 echo "${ECHO_T}$cf_cv_term_header" >&6
8174 # Set definitions to allow ifdef'ing to accommodate subdirectories
8176 case $cf_cv_term_header in
8179 cat >>confdefs.h <<\EOF
8180 #define HAVE_TERM_H 1
8186 case $cf_cv_term_header in
8189 cat >>confdefs.h <<\EOF
8190 #define HAVE_NCURSES_TERM_H 1
8196 cat >>confdefs.h <<\EOF
8197 #define HAVE_NCURSESW_TERM_H 1
8203 # some applications need this, but should check for NCURSES_VERSION
8205 cat >>confdefs.h <<\EOF
8209 echo "$as_me:8209: checking for ncurses version" >&5
8210 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8211 if test "${cf_cv_ncurses_version+set}" = set; then
8212 echo $ECHO_N "(cached) $ECHO_C" >&6
8215 cf_cv_ncurses_version=no
8218 if test "$cross_compiling" = yes; then
8220 # This will not work if the preprocessor splits the line after the
8221 # Autoconf token. The 'unproto' program does that.
8222 cat > conftest.$ac_ext <<EOF
8223 #include <${cf_cv_ncurses_header:-curses.h}>
8225 #ifdef NCURSES_VERSION
8226 Autoconf NCURSES_VERSION
8234 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8235 { (eval echo "$as_me:8235: \"$cf_try\"") >&5
8238 echo "$as_me:8238: \$? = $ac_status" >&5
8239 (exit $ac_status); }
8240 if test -f conftest.out ; then
8241 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8242 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8247 cat >conftest.$ac_ext <<_ACEOF
8248 #line 8248 "configure"
8249 #include "confdefs.h"
8251 #include <${cf_cv_ncurses_header:-curses.h}>
8255 FILE *fp = fopen("$cf_tempfile", "w");
8256 #ifdef NCURSES_VERSION
8257 # ifdef NCURSES_VERSION_PATCH
8258 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8260 fprintf(fp, "%s\n", NCURSES_VERSION);
8264 fprintf(fp, "old\n");
8269 ${cf_cv_main_return:-return}(0);
8272 rm -f conftest$ac_exeext
8273 if { (eval echo "$as_me:8273: \"$ac_link\"") >&5
8274 (eval $ac_link) 2>&5
8276 echo "$as_me:8276: \$? = $ac_status" >&5
8277 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8278 { (eval echo "$as_me:8278: \"$ac_try\"") >&5
8281 echo "$as_me:8281: \$? = $ac_status" >&5
8282 (exit $ac_status); }; }; then
8284 cf_cv_ncurses_version=`cat $cf_tempfile`
8286 echo "$as_me: program exited with status $ac_status" >&5
8287 echo "$as_me: failed program was:" >&5
8288 cat conftest.$ac_ext >&5
8290 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8295 echo "$as_me:8295: result: $cf_cv_ncurses_version" >&5
8296 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8297 test "$cf_cv_ncurses_version" = no ||
8298 cat >>confdefs.h <<\EOF
8302 cf_nculib_root=ncursesw
8303 # This works, except for the special case where we find gpm, but
8304 # ncurses is in a nonstandard location via $LIBS, and we really want
8307 cf_ncurses_SAVE="$LIBS"
8308 echo "$as_me:8308: checking for Gpm_Open in -lgpm" >&5
8309 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8310 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8311 echo $ECHO_N "(cached) $ECHO_C" >&6
8313 ac_check_lib_save_LIBS=$LIBS
8315 cat >conftest.$ac_ext <<_ACEOF
8316 #line 8316 "configure"
8317 #include "confdefs.h"
8319 /* Override any gcc2 internal prototype to avoid an error. */
8323 /* We use char because int might match the return type of a gcc2
8324 builtin and then its argument prototype would still apply. */
8334 rm -f conftest.$ac_objext conftest$ac_exeext
8335 if { (eval echo "$as_me:8335: \"$ac_link\"") >&5
8336 (eval $ac_link) 2>&5
8338 echo "$as_me:8338: \$? = $ac_status" >&5
8339 (exit $ac_status); } &&
8340 { ac_try='test -s conftest$ac_exeext'
8341 { (eval echo "$as_me:8341: \"$ac_try\"") >&5
8344 echo "$as_me:8344: \$? = $ac_status" >&5
8345 (exit $ac_status); }; }; then
8346 ac_cv_lib_gpm_Gpm_Open=yes
8348 echo "$as_me: failed program was:" >&5
8349 cat conftest.$ac_ext >&5
8350 ac_cv_lib_gpm_Gpm_Open=no
8352 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8353 LIBS=$ac_check_lib_save_LIBS
8355 echo "$as_me:8355: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8356 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8357 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8358 echo "$as_me:8358: checking for initscr in -lgpm" >&5
8359 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8360 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8361 echo $ECHO_N "(cached) $ECHO_C" >&6
8363 ac_check_lib_save_LIBS=$LIBS
8365 cat >conftest.$ac_ext <<_ACEOF
8366 #line 8366 "configure"
8367 #include "confdefs.h"
8369 /* Override any gcc2 internal prototype to avoid an error. */
8373 /* We use char because int might match the return type of a gcc2
8374 builtin and then its argument prototype would still apply. */
8384 rm -f conftest.$ac_objext conftest$ac_exeext
8385 if { (eval echo "$as_me:8385: \"$ac_link\"") >&5
8386 (eval $ac_link) 2>&5
8388 echo "$as_me:8388: \$? = $ac_status" >&5
8389 (exit $ac_status); } &&
8390 { ac_try='test -s conftest$ac_exeext'
8391 { (eval echo "$as_me:8391: \"$ac_try\"") >&5
8394 echo "$as_me:8394: \$? = $ac_status" >&5
8395 (exit $ac_status); }; }; then
8396 ac_cv_lib_gpm_initscr=yes
8398 echo "$as_me: failed program was:" >&5
8399 cat conftest.$ac_ext >&5
8400 ac_cv_lib_gpm_initscr=no
8402 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8403 LIBS=$ac_check_lib_save_LIBS
8405 echo "$as_me:8405: result: $ac_cv_lib_gpm_initscr" >&5
8406 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8407 if test $ac_cv_lib_gpm_initscr = yes; then
8408 LIBS="$cf_ncurses_SAVE"
8410 cf_ncurses_LIBS="-lgpm"
8417 # This is only necessary if you are linking against an obsolete
8418 # version of ncurses (but it should do no harm, since it's static).
8419 if test "$cf_nculib_root" = ncurses ; then
8420 echo "$as_me:8420: checking for tgoto in -lmytinfo" >&5
8421 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8422 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8423 echo $ECHO_N "(cached) $ECHO_C" >&6
8425 ac_check_lib_save_LIBS=$LIBS
8426 LIBS="-lmytinfo $LIBS"
8427 cat >conftest.$ac_ext <<_ACEOF
8428 #line 8428 "configure"
8429 #include "confdefs.h"
8431 /* Override any gcc2 internal prototype to avoid an error. */
8435 /* We use char because int might match the return type of a gcc2
8436 builtin and then its argument prototype would still apply. */
8446 rm -f conftest.$ac_objext conftest$ac_exeext
8447 if { (eval echo "$as_me:8447: \"$ac_link\"") >&5
8448 (eval $ac_link) 2>&5
8450 echo "$as_me:8450: \$? = $ac_status" >&5
8451 (exit $ac_status); } &&
8452 { ac_try='test -s conftest$ac_exeext'
8453 { (eval echo "$as_me:8453: \"$ac_try\"") >&5
8456 echo "$as_me:8456: \$? = $ac_status" >&5
8457 (exit $ac_status); }; }; then
8458 ac_cv_lib_mytinfo_tgoto=yes
8460 echo "$as_me: failed program was:" >&5
8461 cat conftest.$ac_ext >&5
8462 ac_cv_lib_mytinfo_tgoto=no
8464 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8465 LIBS=$ac_check_lib_save_LIBS
8467 echo "$as_me:8467: result: $ac_cv_lib_mytinfo_tgoto" >&5
8468 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8469 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8470 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8480 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8482 for cf_add_1lib in $cf_add_0lib; do
8483 for cf_add_2lib in $cf_add_libs; do
8484 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8489 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8493 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8499 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8501 for cf_add_1lib in $cf_add_0lib; do
8502 for cf_add_2lib in $cf_add_libs; do
8503 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8508 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8514 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
8516 echo "$as_me:8516: checking for initscr" >&5
8517 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8518 if test "${ac_cv_func_initscr+set}" = set; then
8519 echo $ECHO_N "(cached) $ECHO_C" >&6
8521 cat >conftest.$ac_ext <<_ACEOF
8522 #line 8522 "configure"
8523 #include "confdefs.h"
8524 #define initscr autoconf_temporary
8525 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
8532 /* We use char because int might match the return type of a gcc2
8533 builtin and then its argument prototype would still apply. */
8534 char initscr (void);
8540 /* The GNU C library defines stubs for functions which it implements
8541 to always fail with ENOSYS. Some functions are actually named
8542 something starting with __ and the normal name is an alias. */
8543 #if defined (__stub_initscr) || defined (__stub___initscr)
8544 #error found stub for initscr
8552 rm -f conftest.$ac_objext conftest$ac_exeext
8553 if { (eval echo "$as_me:8553: \"$ac_link\"") >&5
8554 (eval $ac_link) 2>&5
8556 echo "$as_me:8556: \$? = $ac_status" >&5
8557 (exit $ac_status); } &&
8558 { ac_try='test -s conftest$ac_exeext'
8559 { (eval echo "$as_me:8559: \"$ac_try\"") >&5
8562 echo "$as_me:8562: \$? = $ac_status" >&5
8563 (exit $ac_status); }; }; then
8564 ac_cv_func_initscr=yes
8566 echo "$as_me: failed program was:" >&5
8567 cat conftest.$ac_ext >&5
8568 ac_cv_func_initscr=no
8570 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8572 echo "$as_me:8572: result: $ac_cv_func_initscr" >&5
8573 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8574 if test $ac_cv_func_initscr = yes; then
8575 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8578 cf_save_LIBS="$LIBS"
8579 echo "$as_me:8579: checking for initscr in -l$cf_nculib_root" >&5
8580 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8581 LIBS="-l$cf_nculib_root $LIBS"
8582 cat >conftest.$ac_ext <<_ACEOF
8583 #line 8583 "configure"
8584 #include "confdefs.h"
8585 #include <${cf_cv_ncurses_header:-curses.h}>
8594 rm -f conftest.$ac_objext conftest$ac_exeext
8595 if { (eval echo "$as_me:8595: \"$ac_link\"") >&5
8596 (eval $ac_link) 2>&5
8598 echo "$as_me:8598: \$? = $ac_status" >&5
8599 (exit $ac_status); } &&
8600 { ac_try='test -s conftest$ac_exeext'
8601 { (eval echo "$as_me:8601: \"$ac_try\"") >&5
8604 echo "$as_me:8604: \$? = $ac_status" >&5
8605 (exit $ac_status); }; }; then
8606 echo "$as_me:8606: result: yes" >&5
8607 echo "${ECHO_T}yes" >&6
8608 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8611 echo "$as_me: failed program was:" >&5
8612 cat conftest.$ac_ext >&5
8613 echo "$as_me:8613: result: no" >&5
8614 echo "${ECHO_T}no" >&6
8617 cf_library_path_list=""
8618 if test -n "${LDFLAGS}${LIBS}" ; then
8619 for cf_library_path in $LDFLAGS $LIBS
8621 case $cf_library_path in
8623 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8625 test "x$cf_library_path" != "xNONE" && \
8626 test -d "$cf_library_path" && \
8628 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8629 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
8630 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
8631 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
8632 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
8633 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"
8636 cf_library_path_list="$cf_library_path_list $cf_search"
8644 test "x$prefix" != "xNONE" && \
8645 test -d "$prefix" && \
8647 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8648 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
8649 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
8650 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
8651 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
8652 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
8655 for cf_subdir_prefix in \
8664 test "x$cf_subdir_prefix" != "x$prefix" && \
8665 test -d "$cf_subdir_prefix" && \
8666 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8667 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
8668 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
8669 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
8670 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
8671 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
8672 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"
8677 cf_search="$cf_library_path_list $cf_search"
8679 for cf_libdir in $cf_search
8681 echo "$as_me:8681: checking for -l$cf_nculib_root in $cf_libdir" >&5
8682 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
8683 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
8684 cat >conftest.$ac_ext <<_ACEOF
8685 #line 8685 "configure"
8686 #include "confdefs.h"
8687 #include <${cf_cv_ncurses_header:-curses.h}>
8696 rm -f conftest.$ac_objext conftest$ac_exeext
8697 if { (eval echo "$as_me:8697: \"$ac_link\"") >&5
8698 (eval $ac_link) 2>&5
8700 echo "$as_me:8700: \$? = $ac_status" >&5
8701 (exit $ac_status); } &&
8702 { ac_try='test -s conftest$ac_exeext'
8703 { (eval echo "$as_me:8703: \"$ac_try\"") >&5
8706 echo "$as_me:8706: \$? = $ac_status" >&5
8707 (exit $ac_status); }; }; then
8708 echo "$as_me:8708: result: yes" >&5
8709 echo "${ECHO_T}yes" >&6
8710 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8713 echo "$as_me: failed program was:" >&5
8714 cat conftest.$ac_ext >&5
8715 echo "$as_me:8715: result: no" >&5
8716 echo "${ECHO_T}no" >&6
8717 LIBS="$cf_save_LIBS"
8719 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8723 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8727 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
8729 if test $cf_found_library = no ; then
8730 { { echo "$as_me:8730: error: Cannot link $cf_nculib_root library" >&5
8731 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
8732 { (exit 1); exit 1; }; }
8737 if test -n "$cf_ncurses_LIBS" ; then
8738 echo "$as_me:8738: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
8739 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
8740 cf_ncurses_SAVE="$LIBS"
8741 for p in $cf_ncurses_LIBS ; do
8742 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
8743 if test "$q" != "$LIBS" ; then
8747 cat >conftest.$ac_ext <<_ACEOF
8748 #line 8748 "configure"
8749 #include "confdefs.h"
8750 #include <${cf_cv_ncurses_header:-curses.h}>
8754 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8759 rm -f conftest.$ac_objext conftest$ac_exeext
8760 if { (eval echo "$as_me:8760: \"$ac_link\"") >&5
8761 (eval $ac_link) 2>&5
8763 echo "$as_me:8763: \$? = $ac_status" >&5
8764 (exit $ac_status); } &&
8765 { ac_try='test -s conftest$ac_exeext'
8766 { (eval echo "$as_me:8766: \"$ac_try\"") >&5
8769 echo "$as_me:8769: \$? = $ac_status" >&5
8770 (exit $ac_status); }; }; then
8771 echo "$as_me:8771: result: yes" >&5
8772 echo "${ECHO_T}yes" >&6
8774 echo "$as_me: failed program was:" >&5
8775 cat conftest.$ac_ext >&5
8776 echo "$as_me:8776: result: no" >&5
8777 echo "${ECHO_T}no" >&6
8778 LIBS="$cf_ncurses_SAVE"
8780 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8783 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8785 cat >>confdefs.h <<EOF
8786 #define $cf_nculib_ROOT 1
8796 cf_ncuconfig_root=ncurses
8797 cf_have_ncuconfig=no
8799 if test "x${PKG_CONFIG:=none}" != xnone; then
8800 echo "$as_me:8800: checking pkg-config for $cf_ncuconfig_root" >&5
8801 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
8802 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
8803 echo "$as_me:8803: result: yes" >&5
8804 echo "${ECHO_T}yes" >&6
8806 echo "$as_me:8806: checking if the $cf_ncuconfig_root package files work" >&5
8807 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
8808 cf_have_ncuconfig=unknown
8810 cf_save_CFLAGS="$CFLAGS"
8811 cf_save_CPPFLAGS="$CPPFLAGS"
8812 cf_save_LIBS="$LIBS"
8814 cf_pkg_cflags=`$PKG_CONFIG --cflags $cf_ncuconfig_root`
8815 cf_pkg_libs=`$PKG_CONFIG --libs $cf_ncuconfig_root`
8817 # while -W for passing linker flags is prevalent, it is not "standard".
8818 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
8819 # incompatible _and_ non-standard -W option which gives an error. Work
8820 # around that pitfall.
8821 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
8827 cf_new_extra_cppflags=
8829 for cf_add_cflags in $cf_pkg_cflags
8831 case $cf_fix_cppflags in
8833 case $cf_add_cflags in
8834 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8835 case $cf_add_cflags in
8837 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8839 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8840 && test -z "${cf_tst_cflags}" \
8841 && cf_fix_cppflags=yes
8843 if test $cf_fix_cppflags = yes ; then
8845 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8846 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8849 elif test "${cf_tst_cflags}" = "\"'" ; then
8851 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8852 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8862 case $cf_add_cflags in
8864 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8866 CPPFLAGS=`echo "$CPPFLAGS" | \
8867 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8868 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8873 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8874 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8881 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8882 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8889 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8890 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8892 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8894 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8895 && test -z "${cf_tst_cflags}" \
8896 && cf_fix_cppflags=no
8901 if test -n "$cf_new_cflags" ; then
8903 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8904 CFLAGS="${CFLAGS}$cf_new_cflags"
8908 if test -n "$cf_new_cppflags" ; then
8910 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8911 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8915 if test -n "$cf_new_extra_cppflags" ; then
8917 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8918 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8925 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8927 for cf_add_1lib in $cf_add_0lib; do
8928 for cf_add_2lib in $cf_add_libs; do
8929 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8934 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8938 cat >conftest.$ac_ext <<_ACEOF
8939 #line 8939 "configure"
8940 #include "confdefs.h"
8941 #include <${cf_cv_ncurses_header:-curses.h}>
8945 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8950 rm -f conftest.$ac_objext conftest$ac_exeext
8951 if { (eval echo "$as_me:8951: \"$ac_link\"") >&5
8952 (eval $ac_link) 2>&5
8954 echo "$as_me:8954: \$? = $ac_status" >&5
8955 (exit $ac_status); } &&
8956 { ac_try='test -s conftest$ac_exeext'
8957 { (eval echo "$as_me:8957: \"$ac_try\"") >&5
8960 echo "$as_me:8960: \$? = $ac_status" >&5
8961 (exit $ac_status); }; }; then
8962 if test "$cross_compiling" = yes; then
8963 cf_test_ncuconfig=maybe
8965 cat >conftest.$ac_ext <<_ACEOF
8966 #line 8966 "configure"
8967 #include "confdefs.h"
8968 #include <${cf_cv_ncurses_header:-curses.h}>
8970 { char *xx = curses_version(); return (xx == 0); }
8972 rm -f conftest$ac_exeext
8973 if { (eval echo "$as_me:8973: \"$ac_link\"") >&5
8974 (eval $ac_link) 2>&5
8976 echo "$as_me:8976: \$? = $ac_status" >&5
8977 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8978 { (eval echo "$as_me:8978: \"$ac_try\"") >&5
8981 echo "$as_me:8981: \$? = $ac_status" >&5
8982 (exit $ac_status); }; }; then
8983 cf_test_ncuconfig=yes
8985 echo "$as_me: program exited with status $ac_status" >&5
8986 echo "$as_me: failed program was:" >&5
8987 cat conftest.$ac_ext >&5
8988 cf_test_ncuconfig=no
8990 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8993 echo "$as_me: failed program was:" >&5
8994 cat conftest.$ac_ext >&5
8995 cf_test_ncuconfig=no
8997 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8999 CFLAGS="$cf_save_CFLAGS"
9000 CPPFLAGS="$cf_save_CPPFLAGS"
9001 LIBS="$cf_save_LIBS"
9003 if test "x$cf_test_ncuconfig" != xyes; then
9004 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9005 cf_pkg_cflags="$cf_temp"
9006 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9007 cf_pkg_libs="$cf_temp"
9015 cf_new_extra_cppflags=
9017 for cf_add_cflags in $cf_pkg_cflags
9019 case $cf_fix_cppflags in
9021 case $cf_add_cflags in
9022 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9023 case $cf_add_cflags in
9025 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9027 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9028 && test -z "${cf_tst_cflags}" \
9029 && cf_fix_cppflags=yes
9031 if test $cf_fix_cppflags = yes ; then
9033 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9034 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9037 elif test "${cf_tst_cflags}" = "\"'" ; then
9039 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9040 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9050 case $cf_add_cflags in
9052 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9054 CPPFLAGS=`echo "$CPPFLAGS" | \
9055 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9056 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9061 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9062 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9069 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9070 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9077 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9078 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9080 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9082 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9083 && test -z "${cf_tst_cflags}" \
9084 && cf_fix_cppflags=no
9089 if test -n "$cf_new_cflags" ; then
9091 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9092 CFLAGS="${CFLAGS}$cf_new_cflags"
9096 if test -n "$cf_new_cppflags" ; then
9098 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9099 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9103 if test -n "$cf_new_extra_cppflags" ; then
9105 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9106 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9113 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9115 for cf_add_1lib in $cf_add_0lib; do
9116 for cf_add_2lib in $cf_add_libs; do
9117 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9122 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9126 cat >conftest.$ac_ext <<_ACEOF
9127 #line 9127 "configure"
9128 #include "confdefs.h"
9129 #include <${cf_cv_ncurses_header:-curses.h}>
9133 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9138 rm -f conftest.$ac_objext conftest$ac_exeext
9139 if { (eval echo "$as_me:9139: \"$ac_link\"") >&5
9140 (eval $ac_link) 2>&5
9142 echo "$as_me:9142: \$? = $ac_status" >&5
9143 (exit $ac_status); } &&
9144 { ac_try='test -s conftest$ac_exeext'
9145 { (eval echo "$as_me:9145: \"$ac_try\"") >&5
9148 echo "$as_me:9148: \$? = $ac_status" >&5
9149 (exit $ac_status); }; }; then
9150 if test "$cross_compiling" = yes; then
9151 cf_have_ncuconfig=maybe
9153 cat >conftest.$ac_ext <<_ACEOF
9154 #line 9154 "configure"
9155 #include "confdefs.h"
9156 #include <${cf_cv_ncurses_header:-curses.h}>
9158 { char *xx = curses_version(); return (xx == 0); }
9160 rm -f conftest$ac_exeext
9161 if { (eval echo "$as_me:9161: \"$ac_link\"") >&5
9162 (eval $ac_link) 2>&5
9164 echo "$as_me:9164: \$? = $ac_status" >&5
9165 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9166 { (eval echo "$as_me:9166: \"$ac_try\"") >&5
9169 echo "$as_me:9169: \$? = $ac_status" >&5
9170 (exit $ac_status); }; }; then
9171 cf_have_ncuconfig=yes
9173 echo "$as_me: program exited with status $ac_status" >&5
9174 echo "$as_me: failed program was:" >&5
9175 cat conftest.$ac_ext >&5
9176 cf_have_ncuconfig=no
9178 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9181 echo "$as_me: failed program was:" >&5
9182 cat conftest.$ac_ext >&5
9183 cf_have_ncuconfig=no
9185 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9186 echo "$as_me:9186: result: $cf_have_ncuconfig" >&5
9187 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9188 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9189 if test "$cf_have_ncuconfig" != "yes"
9191 CPPFLAGS="$cf_save_CPPFLAGS"
9192 LIBS="$cf_save_LIBS"
9193 NCURSES_CONFIG_PKG=none
9196 cat >>confdefs.h <<\EOF
9200 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9202 echo "$as_me:9202: checking for terminfo header" >&5
9203 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9204 if test "${cf_cv_term_header+set}" = set; then
9205 echo $ECHO_N "(cached) $ECHO_C" >&6
9208 case ${cf_cv_ncurses_header} in
9209 (*/ncurses.h|*/ncursesw.h)
9210 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9213 cf_term_header=term.h
9217 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9219 cat >conftest.$ac_ext <<_ACEOF
9220 #line 9220 "configure"
9221 #include "confdefs.h"
9223 #include <${cf_cv_ncurses_header:-curses.h}>
9229 int x = auto_left_margin; (void)x
9234 rm -f conftest.$ac_objext
9235 if { (eval echo "$as_me:9235: \"$ac_compile\"") >&5
9236 (eval $ac_compile) 2>&5
9238 echo "$as_me:9238: \$? = $ac_status" >&5
9239 (exit $ac_status); } &&
9240 { ac_try='test -s conftest.$ac_objext'
9241 { (eval echo "$as_me:9241: \"$ac_try\"") >&5
9244 echo "$as_me:9244: \$? = $ac_status" >&5
9245 (exit $ac_status); }; }; then
9247 cf_cv_term_header="$cf_test"
9249 echo "$as_me: failed program was:" >&5
9250 cat conftest.$ac_ext >&5
9252 cf_cv_term_header=unknown
9255 rm -f conftest.$ac_objext conftest.$ac_ext
9256 test "$cf_cv_term_header" != unknown && break
9260 echo "$as_me:9260: result: $cf_cv_term_header" >&5
9261 echo "${ECHO_T}$cf_cv_term_header" >&6
9263 # Set definitions to allow ifdef'ing to accommodate subdirectories
9265 case $cf_cv_term_header in
9268 cat >>confdefs.h <<\EOF
9269 #define HAVE_TERM_H 1
9275 case $cf_cv_term_header in
9278 cat >>confdefs.h <<\EOF
9279 #define HAVE_NCURSES_TERM_H 1
9285 cat >>confdefs.h <<\EOF
9286 #define HAVE_NCURSESW_TERM_H 1
9295 echo "$as_me:9295: result: no" >&5
9296 echo "${ECHO_T}no" >&6
9297 NCURSES_CONFIG_PKG=none
9300 NCURSES_CONFIG_PKG=none
9303 if test "x$cf_have_ncuconfig" = "xno"; then
9304 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9306 if test -n "$ac_tool_prefix"; then
9307 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9309 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9310 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9311 echo "$as_me:9311: checking for $ac_word" >&5
9312 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9313 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9314 echo $ECHO_N "(cached) $ECHO_C" >&6
9316 if test -n "$NCURSES_CONFIG"; then
9317 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9319 ac_save_IFS=$IFS; IFS=$ac_path_separator
9321 for ac_dir in $ac_dummy; do
9323 test -z "$ac_dir" && ac_dir=.
9324 $as_executable_p "$ac_dir/$ac_word" || continue
9325 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9326 echo "$as_me:9326: found $ac_dir/$ac_word" >&5
9332 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9333 if test -n "$NCURSES_CONFIG"; then
9334 echo "$as_me:9334: result: $NCURSES_CONFIG" >&5
9335 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9337 echo "$as_me:9337: result: no" >&5
9338 echo "${ECHO_T}no" >&6
9341 test -n "$NCURSES_CONFIG" && break
9344 if test -z "$NCURSES_CONFIG"; then
9345 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9346 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9348 # Extract the first word of "$ac_prog", so it can be a program name with args.
9349 set dummy $ac_prog; ac_word=$2
9350 echo "$as_me:9350: checking for $ac_word" >&5
9351 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9352 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9353 echo $ECHO_N "(cached) $ECHO_C" >&6
9355 if test -n "$ac_ct_NCURSES_CONFIG"; then
9356 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9358 ac_save_IFS=$IFS; IFS=$ac_path_separator
9360 for ac_dir in $ac_dummy; do
9362 test -z "$ac_dir" && ac_dir=.
9363 $as_executable_p "$ac_dir/$ac_word" || continue
9364 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9365 echo "$as_me:9365: found $ac_dir/$ac_word" >&5
9371 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9372 if test -n "$ac_ct_NCURSES_CONFIG"; then
9373 echo "$as_me:9373: result: $ac_ct_NCURSES_CONFIG" >&5
9374 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9376 echo "$as_me:9376: result: no" >&5
9377 echo "${ECHO_T}no" >&6
9380 test -n "$ac_ct_NCURSES_CONFIG" && break
9382 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9384 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9387 if test "$NCURSES_CONFIG" != none ; then
9392 cf_new_extra_cppflags=
9394 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9396 case $cf_fix_cppflags in
9398 case $cf_add_cflags in
9399 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9400 case $cf_add_cflags in
9402 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9404 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9405 && test -z "${cf_tst_cflags}" \
9406 && cf_fix_cppflags=yes
9408 if test $cf_fix_cppflags = yes ; then
9410 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9411 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9414 elif test "${cf_tst_cflags}" = "\"'" ; then
9416 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9417 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9427 case $cf_add_cflags in
9429 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9431 CPPFLAGS=`echo "$CPPFLAGS" | \
9432 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9433 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9438 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9439 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9446 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9447 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9454 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9455 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9457 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9459 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9460 && test -z "${cf_tst_cflags}" \
9461 && cf_fix_cppflags=no
9466 if test -n "$cf_new_cflags" ; then
9468 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9469 CFLAGS="${CFLAGS}$cf_new_cflags"
9473 if test -n "$cf_new_cppflags" ; then
9475 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9476 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9480 if test -n "$cf_new_extra_cppflags" ; then
9482 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9483 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9490 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9492 for cf_add_1lib in $cf_add_0lib; do
9493 for cf_add_2lib in $cf_add_libs; do
9494 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9499 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9503 # even with config script, some packages use no-override for curses.h
9505 echo "$as_me:9505: checking if we have identified curses headers" >&5
9506 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
9507 if test "${cf_cv_ncurses_header+set}" = set; then
9508 echo $ECHO_N "(cached) $ECHO_C" >&6
9511 cf_cv_ncurses_header=none
9513 ncurses.h ncurses/ncurses.h \
9514 curses.h ncurses/curses.h
9516 cat >conftest.$ac_ext <<_ACEOF
9517 #line 9517 "configure"
9518 #include "confdefs.h"
9519 #include <${cf_header}>
9523 initscr(); tgoto("?", 0,0)
9528 rm -f conftest.$ac_objext
9529 if { (eval echo "$as_me:9529: \"$ac_compile\"") >&5
9530 (eval $ac_compile) 2>&5
9532 echo "$as_me:9532: \$? = $ac_status" >&5
9533 (exit $ac_status); } &&
9534 { ac_try='test -s conftest.$ac_objext'
9535 { (eval echo "$as_me:9535: \"$ac_try\"") >&5
9538 echo "$as_me:9538: \$? = $ac_status" >&5
9539 (exit $ac_status); }; }; then
9540 cf_cv_ncurses_header=$cf_header; break
9542 echo "$as_me: failed program was:" >&5
9543 cat conftest.$ac_ext >&5
9545 rm -f conftest.$ac_objext conftest.$ac_ext
9549 echo "$as_me:9549: result: $cf_cv_ncurses_header" >&5
9550 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
9552 if test "$cf_cv_ncurses_header" = none ; then
9553 { { echo "$as_me:9553: error: No curses header-files found" >&5
9554 echo "$as_me: error: No curses header-files found" >&2;}
9555 { (exit 1); exit 1; }; }
9558 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
9560 for ac_header in $cf_cv_ncurses_header
9562 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9563 echo "$as_me:9563: checking for $ac_header" >&5
9564 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9565 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9566 echo $ECHO_N "(cached) $ECHO_C" >&6
9568 cat >conftest.$ac_ext <<_ACEOF
9569 #line 9569 "configure"
9570 #include "confdefs.h"
9571 #include <$ac_header>
9573 if { (eval echo "$as_me:9573: \"$ac_cpp conftest.$ac_ext\"") >&5
9574 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9576 egrep -v '^ *\+' conftest.er1 >conftest.err
9578 cat conftest.err >&5
9579 echo "$as_me:9579: \$? = $ac_status" >&5
9580 (exit $ac_status); } >/dev/null; then
9581 if test -s conftest.err; then
9582 ac_cpp_err=$ac_c_preproc_warn_flag
9589 if test -z "$ac_cpp_err"; then
9590 eval "$as_ac_Header=yes"
9592 echo "$as_me: failed program was:" >&5
9593 cat conftest.$ac_ext >&5
9594 eval "$as_ac_Header=no"
9596 rm -f conftest.err conftest.$ac_ext
9598 echo "$as_me:9598: result: `eval echo '${'$as_ac_Header'}'`" >&5
9599 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9600 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9601 cat >>confdefs.h <<EOF
9602 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9608 cat >>confdefs.h <<\EOF
9612 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9614 cat >>confdefs.h <<EOF
9615 #define $cf_nculib_ROOT 1
9618 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
9622 cf_ncuhdr_root=ncurses
9624 test -n "$cf_cv_curses_dir" && \
9625 test "$cf_cv_curses_dir" != "no" && { \
9627 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
9628 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
9630 while test $cf_add_incdir != /usr/include
9632 if test -d $cf_add_incdir
9635 if test -n "$CFLAGS$CPPFLAGS" ; then
9636 # a loop is needed to ensure we can add subdirs of existing dirs
9637 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9638 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9639 cf_have_incdir=yes; break
9644 if test "$cf_have_incdir" = no ; then
9645 if test "$cf_add_incdir" = /usr/local/include ; then
9646 if test "$GCC" = yes
9648 cf_save_CPPFLAGS=$CPPFLAGS
9650 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9651 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9653 cat >conftest.$ac_ext <<_ACEOF
9654 #line 9654 "configure"
9655 #include "confdefs.h"
9665 rm -f conftest.$ac_objext
9666 if { (eval echo "$as_me:9666: \"$ac_compile\"") >&5
9667 (eval $ac_compile) 2>&5
9669 echo "$as_me:9669: \$? = $ac_status" >&5
9670 (exit $ac_status); } &&
9671 { ac_try='test -s conftest.$ac_objext'
9672 { (eval echo "$as_me:9672: \"$ac_try\"") >&5
9675 echo "$as_me:9675: \$? = $ac_status" >&5
9676 (exit $ac_status); }; }; then
9679 echo "$as_me: failed program was:" >&5
9680 cat conftest.$ac_ext >&5
9683 rm -f conftest.$ac_objext conftest.$ac_ext
9684 CPPFLAGS=$cf_save_CPPFLAGS
9689 if test "$cf_have_incdir" = no ; then
9690 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9692 echo "${as_me:-configure}:9692: testing adding $cf_add_incdir to include-path ..." 1>&5
9694 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9696 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9697 test "$cf_top_incdir" = "$cf_add_incdir" && break
9698 cf_add_incdir="$cf_top_incdir"
9711 echo "$as_me:9711: checking for $cf_ncuhdr_root header in include-path" >&5
9712 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
9713 if test "${cf_cv_ncurses_h+set}" = set; then
9714 echo $ECHO_N "(cached) $ECHO_C" >&6
9717 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
9718 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
9719 for cf_header in $cf_header_list
9722 cat >conftest.$ac_ext <<_ACEOF
9723 #line 9723 "configure"
9724 #include "confdefs.h"
9726 #include <$cf_header>
9731 #ifdef NCURSES_VERSION
9733 printf("%s\n", NCURSES_VERSION);
9746 rm -f conftest.$ac_objext
9747 if { (eval echo "$as_me:9747: \"$ac_compile\"") >&5
9748 (eval $ac_compile) 2>&5
9750 echo "$as_me:9750: \$? = $ac_status" >&5
9751 (exit $ac_status); } &&
9752 { ac_try='test -s conftest.$ac_objext'
9753 { (eval echo "$as_me:9753: \"$ac_try\"") >&5
9756 echo "$as_me:9756: \$? = $ac_status" >&5
9757 (exit $ac_status); }; }; then
9758 cf_cv_ncurses_h=$cf_header
9761 echo "$as_me: failed program was:" >&5
9762 cat conftest.$ac_ext >&5
9765 rm -f conftest.$ac_objext conftest.$ac_ext
9767 test "$cf_cv_ncurses_h" != no && break
9771 echo "$as_me:9771: result: $cf_cv_ncurses_h" >&5
9772 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
9774 if test "$cf_cv_ncurses_h" != no ; then
9775 cf_cv_ncurses_header=$cf_cv_ncurses_h
9778 echo "$as_me:9778: checking for $cf_ncuhdr_root include-path" >&5
9779 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
9780 if test "${cf_cv_ncurses_h2+set}" = set; then
9781 echo $ECHO_N "(cached) $ECHO_C" >&6
9784 test -n "$verbose" && echo
9788 # collect the current set of include-directories from compiler flags
9789 cf_header_path_list=""
9790 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9791 for cf_header_path in $CPPFLAGS $CFLAGS
9793 case $cf_header_path in
9795 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9797 test "x$cf_header_path" != "xNONE" && \
9798 test -d "$cf_header_path" && \
9800 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
9801 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
9802 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
9803 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
9804 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
9805 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"
9808 cf_header_path_list="$cf_header_path_list $cf_search"
9814 # add the variations for the package we are looking for
9818 test "x$prefix" != "xNONE" && \
9819 test -d "$prefix" && \
9821 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
9822 test -d $prefix/include && cf_search="$cf_search $prefix/include"
9823 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
9824 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
9825 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
9826 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9829 for cf_subdir_prefix in \
9838 test "x$cf_subdir_prefix" != "x$prefix" && \
9839 test -d "$cf_subdir_prefix" && \
9840 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9841 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
9842 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
9843 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
9844 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
9845 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
9846 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"
9851 test "$includedir" != NONE && \
9852 test "$includedir" != "/usr/include" && \
9853 test -d "$includedir" && {
9854 test -d $includedir && cf_search="$cf_search $includedir"
9855 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
9858 test "$oldincludedir" != NONE && \
9859 test "$oldincludedir" != "/usr/include" && \
9860 test -d "$oldincludedir" && {
9861 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
9862 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
9865 cf_search="$cf_search $cf_header_path_list"
9867 test -n "$verbose" && echo search path $cf_search
9868 cf_save2_CPPFLAGS="$CPPFLAGS"
9869 for cf_incdir in $cf_search
9872 if test -n "$cf_incdir" ; then
9873 for cf_add_incdir in $cf_incdir
9875 while test $cf_add_incdir != /usr/include
9877 if test -d $cf_add_incdir
9880 if test -n "$CFLAGS$CPPFLAGS" ; then
9881 # a loop is needed to ensure we can add subdirs of existing dirs
9882 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9883 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9884 cf_have_incdir=yes; break
9889 if test "$cf_have_incdir" = no ; then
9890 if test "$cf_add_incdir" = /usr/local/include ; then
9891 if test "$GCC" = yes
9893 cf_save_CPPFLAGS=$CPPFLAGS
9895 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9896 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9898 cat >conftest.$ac_ext <<_ACEOF
9899 #line 9899 "configure"
9900 #include "confdefs.h"
9910 rm -f conftest.$ac_objext
9911 if { (eval echo "$as_me:9911: \"$ac_compile\"") >&5
9912 (eval $ac_compile) 2>&5
9914 echo "$as_me:9914: \$? = $ac_status" >&5
9915 (exit $ac_status); } &&
9916 { ac_try='test -s conftest.$ac_objext'
9917 { (eval echo "$as_me:9917: \"$ac_try\"") >&5
9920 echo "$as_me:9920: \$? = $ac_status" >&5
9921 (exit $ac_status); }; }; then
9924 echo "$as_me: failed program was:" >&5
9925 cat conftest.$ac_ext >&5
9928 rm -f conftest.$ac_objext conftest.$ac_ext
9929 CPPFLAGS=$cf_save_CPPFLAGS
9934 if test "$cf_have_incdir" = no ; then
9935 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9937 echo "${as_me:-configure}:9937: testing adding $cf_add_incdir to include-path ..." 1>&5
9939 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9941 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9942 test "$cf_top_incdir" = "$cf_add_incdir" && break
9943 cf_add_incdir="$cf_top_incdir"
9959 cat >conftest.$ac_ext <<_ACEOF
9960 #line 9960 "configure"
9961 #include "confdefs.h"
9963 #include <$cf_header>
9968 #ifdef NCURSES_VERSION
9970 printf("%s\n", NCURSES_VERSION);
9983 rm -f conftest.$ac_objext
9984 if { (eval echo "$as_me:9984: \"$ac_compile\"") >&5
9985 (eval $ac_compile) 2>&5
9987 echo "$as_me:9987: \$? = $ac_status" >&5
9988 (exit $ac_status); } &&
9989 { ac_try='test -s conftest.$ac_objext'
9990 { (eval echo "$as_me:9990: \"$ac_try\"") >&5
9993 echo "$as_me:9993: \$? = $ac_status" >&5
9994 (exit $ac_status); }; }; then
9995 cf_cv_ncurses_h2=$cf_header
9998 echo "$as_me: failed program was:" >&5
9999 cat conftest.$ac_ext >&5
10000 cf_cv_ncurses_h2=no
10002 rm -f conftest.$ac_objext conftest.$ac_ext
10004 if test "$cf_cv_ncurses_h2" != no ; then
10005 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10006 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
10009 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10011 CPPFLAGS="$cf_save2_CPPFLAGS"
10012 test "$cf_cv_ncurses_h2" != no && break
10014 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10014: error: not found" >&5
10015 echo "$as_me: error: not found" >&2;}
10016 { (exit 1); exit 1; }; }
10019 echo "$as_me:10019: result: $cf_cv_ncurses_h2" >&5
10020 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10022 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
10023 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
10024 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
10025 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
10028 if test -n "$cf_1st_incdir" ; then
10029 for cf_add_incdir in $cf_1st_incdir
10031 while test $cf_add_incdir != /usr/include
10033 if test -d $cf_add_incdir
10036 if test -n "$CFLAGS$CPPFLAGS" ; then
10037 # a loop is needed to ensure we can add subdirs of existing dirs
10038 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10039 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10040 cf_have_incdir=yes; break
10045 if test "$cf_have_incdir" = no ; then
10046 if test "$cf_add_incdir" = /usr/local/include ; then
10047 if test "$GCC" = yes
10049 cf_save_CPPFLAGS=$CPPFLAGS
10051 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10052 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10054 cat >conftest.$ac_ext <<_ACEOF
10055 #line 10055 "configure"
10056 #include "confdefs.h"
10066 rm -f conftest.$ac_objext
10067 if { (eval echo "$as_me:10067: \"$ac_compile\"") >&5
10068 (eval $ac_compile) 2>&5
10070 echo "$as_me:10070: \$? = $ac_status" >&5
10071 (exit $ac_status); } &&
10072 { ac_try='test -s conftest.$ac_objext'
10073 { (eval echo "$as_me:10073: \"$ac_try\"") >&5
10074 (eval $ac_try) 2>&5
10076 echo "$as_me:10076: \$? = $ac_status" >&5
10077 (exit $ac_status); }; }; then
10080 echo "$as_me: failed program was:" >&5
10081 cat conftest.$ac_ext >&5
10084 rm -f conftest.$ac_objext conftest.$ac_ext
10085 CPPFLAGS=$cf_save_CPPFLAGS
10090 if test "$cf_have_incdir" = no ; then
10091 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10093 echo "${as_me:-configure}:10093: testing adding $cf_add_incdir to include-path ..." 1>&5
10095 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10097 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10098 test "$cf_top_incdir" = "$cf_add_incdir" && break
10099 cf_add_incdir="$cf_top_incdir"
10112 # Set definitions to allow ifdef'ing for ncurses.h
10114 case $cf_cv_ncurses_header in
10117 cat >>confdefs.h <<\EOF
10118 #define HAVE_NCURSES_H 1
10124 case $cf_cv_ncurses_header in
10125 (ncurses/curses.h|ncurses/ncurses.h)
10127 cat >>confdefs.h <<\EOF
10128 #define HAVE_NCURSES_NCURSES_H 1
10132 (ncursesw/curses.h|ncursesw/ncurses.h)
10134 cat >>confdefs.h <<\EOF
10135 #define HAVE_NCURSESW_NCURSES_H 1
10141 echo "$as_me:10141: checking for terminfo header" >&5
10142 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10143 if test "${cf_cv_term_header+set}" = set; then
10144 echo $ECHO_N "(cached) $ECHO_C" >&6
10147 case ${cf_cv_ncurses_header} in
10148 (*/ncurses.h|*/ncursesw.h)
10149 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10152 cf_term_header=term.h
10156 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10158 cat >conftest.$ac_ext <<_ACEOF
10159 #line 10159 "configure"
10160 #include "confdefs.h"
10162 #include <${cf_cv_ncurses_header:-curses.h}>
10163 #include <$cf_test>
10168 int x = auto_left_margin; (void)x
10173 rm -f conftest.$ac_objext
10174 if { (eval echo "$as_me:10174: \"$ac_compile\"") >&5
10175 (eval $ac_compile) 2>&5
10177 echo "$as_me:10177: \$? = $ac_status" >&5
10178 (exit $ac_status); } &&
10179 { ac_try='test -s conftest.$ac_objext'
10180 { (eval echo "$as_me:10180: \"$ac_try\"") >&5
10181 (eval $ac_try) 2>&5
10183 echo "$as_me:10183: \$? = $ac_status" >&5
10184 (exit $ac_status); }; }; then
10186 cf_cv_term_header="$cf_test"
10188 echo "$as_me: failed program was:" >&5
10189 cat conftest.$ac_ext >&5
10191 cf_cv_term_header=unknown
10194 rm -f conftest.$ac_objext conftest.$ac_ext
10195 test "$cf_cv_term_header" != unknown && break
10199 echo "$as_me:10199: result: $cf_cv_term_header" >&5
10200 echo "${ECHO_T}$cf_cv_term_header" >&6
10202 # Set definitions to allow ifdef'ing to accommodate subdirectories
10204 case $cf_cv_term_header in
10207 cat >>confdefs.h <<\EOF
10208 #define HAVE_TERM_H 1
10214 case $cf_cv_term_header in
10217 cat >>confdefs.h <<\EOF
10218 #define HAVE_NCURSES_TERM_H 1
10224 cat >>confdefs.h <<\EOF
10225 #define HAVE_NCURSESW_TERM_H 1
10231 # some applications need this, but should check for NCURSES_VERSION
10233 cat >>confdefs.h <<\EOF
10237 echo "$as_me:10237: checking for ncurses version" >&5
10238 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10239 if test "${cf_cv_ncurses_version+set}" = set; then
10240 echo $ECHO_N "(cached) $ECHO_C" >&6
10243 cf_cv_ncurses_version=no
10246 if test "$cross_compiling" = yes; then
10248 # This will not work if the preprocessor splits the line after the
10249 # Autoconf token. The 'unproto' program does that.
10250 cat > conftest.$ac_ext <<EOF
10251 #include <${cf_cv_ncurses_header:-curses.h}>
10253 #ifdef NCURSES_VERSION
10254 Autoconf NCURSES_VERSION
10262 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10263 { (eval echo "$as_me:10263: \"$cf_try\"") >&5
10264 (eval $cf_try) 2>&5
10266 echo "$as_me:10266: \$? = $ac_status" >&5
10267 (exit $ac_status); }
10268 if test -f conftest.out ; then
10269 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
10270 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10275 cat >conftest.$ac_ext <<_ACEOF
10276 #line 10276 "configure"
10277 #include "confdefs.h"
10279 #include <${cf_cv_ncurses_header:-curses.h}>
10283 FILE *fp = fopen("$cf_tempfile", "w");
10284 #ifdef NCURSES_VERSION
10285 # ifdef NCURSES_VERSION_PATCH
10286 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10288 fprintf(fp, "%s\n", NCURSES_VERSION);
10291 # ifdef __NCURSES_H
10292 fprintf(fp, "old\n");
10297 ${cf_cv_main_return:-return}(0);
10300 rm -f conftest$ac_exeext
10301 if { (eval echo "$as_me:10301: \"$ac_link\"") >&5
10302 (eval $ac_link) 2>&5
10304 echo "$as_me:10304: \$? = $ac_status" >&5
10305 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10306 { (eval echo "$as_me:10306: \"$ac_try\"") >&5
10307 (eval $ac_try) 2>&5
10309 echo "$as_me:10309: \$? = $ac_status" >&5
10310 (exit $ac_status); }; }; then
10312 cf_cv_ncurses_version=`cat $cf_tempfile`
10314 echo "$as_me: program exited with status $ac_status" >&5
10315 echo "$as_me: failed program was:" >&5
10316 cat conftest.$ac_ext >&5
10318 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10323 echo "$as_me:10323: result: $cf_cv_ncurses_version" >&5
10324 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10325 test "$cf_cv_ncurses_version" = no ||
10326 cat >>confdefs.h <<\EOF
10330 cf_nculib_root=ncurses
10331 # This works, except for the special case where we find gpm, but
10332 # ncurses is in a nonstandard location via $LIBS, and we really want
10335 cf_ncurses_SAVE="$LIBS"
10336 echo "$as_me:10336: checking for Gpm_Open in -lgpm" >&5
10337 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10338 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10339 echo $ECHO_N "(cached) $ECHO_C" >&6
10341 ac_check_lib_save_LIBS=$LIBS
10343 cat >conftest.$ac_ext <<_ACEOF
10344 #line 10344 "configure"
10345 #include "confdefs.h"
10347 /* Override any gcc2 internal prototype to avoid an error. */
10351 /* We use char because int might match the return type of a gcc2
10352 builtin and then its argument prototype would still apply. */
10362 rm -f conftest.$ac_objext conftest$ac_exeext
10363 if { (eval echo "$as_me:10363: \"$ac_link\"") >&5
10364 (eval $ac_link) 2>&5
10366 echo "$as_me:10366: \$? = $ac_status" >&5
10367 (exit $ac_status); } &&
10368 { ac_try='test -s conftest$ac_exeext'
10369 { (eval echo "$as_me:10369: \"$ac_try\"") >&5
10370 (eval $ac_try) 2>&5
10372 echo "$as_me:10372: \$? = $ac_status" >&5
10373 (exit $ac_status); }; }; then
10374 ac_cv_lib_gpm_Gpm_Open=yes
10376 echo "$as_me: failed program was:" >&5
10377 cat conftest.$ac_ext >&5
10378 ac_cv_lib_gpm_Gpm_Open=no
10380 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10381 LIBS=$ac_check_lib_save_LIBS
10383 echo "$as_me:10383: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10384 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
10385 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
10386 echo "$as_me:10386: checking for initscr in -lgpm" >&5
10387 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
10388 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
10389 echo $ECHO_N "(cached) $ECHO_C" >&6
10391 ac_check_lib_save_LIBS=$LIBS
10393 cat >conftest.$ac_ext <<_ACEOF
10394 #line 10394 "configure"
10395 #include "confdefs.h"
10397 /* Override any gcc2 internal prototype to avoid an error. */
10401 /* We use char because int might match the return type of a gcc2
10402 builtin and then its argument prototype would still apply. */
10412 rm -f conftest.$ac_objext conftest$ac_exeext
10413 if { (eval echo "$as_me:10413: \"$ac_link\"") >&5
10414 (eval $ac_link) 2>&5
10416 echo "$as_me:10416: \$? = $ac_status" >&5
10417 (exit $ac_status); } &&
10418 { ac_try='test -s conftest$ac_exeext'
10419 { (eval echo "$as_me:10419: \"$ac_try\"") >&5
10420 (eval $ac_try) 2>&5
10422 echo "$as_me:10422: \$? = $ac_status" >&5
10423 (exit $ac_status); }; }; then
10424 ac_cv_lib_gpm_initscr=yes
10426 echo "$as_me: failed program was:" >&5
10427 cat conftest.$ac_ext >&5
10428 ac_cv_lib_gpm_initscr=no
10430 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10431 LIBS=$ac_check_lib_save_LIBS
10433 echo "$as_me:10433: result: $ac_cv_lib_gpm_initscr" >&5
10434 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
10435 if test $ac_cv_lib_gpm_initscr = yes; then
10436 LIBS="$cf_ncurses_SAVE"
10438 cf_ncurses_LIBS="-lgpm"
10445 # This is only necessary if you are linking against an obsolete
10446 # version of ncurses (but it should do no harm, since it's static).
10447 if test "$cf_nculib_root" = ncurses ; then
10448 echo "$as_me:10448: checking for tgoto in -lmytinfo" >&5
10449 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
10450 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
10451 echo $ECHO_N "(cached) $ECHO_C" >&6
10453 ac_check_lib_save_LIBS=$LIBS
10454 LIBS="-lmytinfo $LIBS"
10455 cat >conftest.$ac_ext <<_ACEOF
10456 #line 10456 "configure"
10457 #include "confdefs.h"
10459 /* Override any gcc2 internal prototype to avoid an error. */
10463 /* We use char because int might match the return type of a gcc2
10464 builtin and then its argument prototype would still apply. */
10474 rm -f conftest.$ac_objext conftest$ac_exeext
10475 if { (eval echo "$as_me:10475: \"$ac_link\"") >&5
10476 (eval $ac_link) 2>&5
10478 echo "$as_me:10478: \$? = $ac_status" >&5
10479 (exit $ac_status); } &&
10480 { ac_try='test -s conftest$ac_exeext'
10481 { (eval echo "$as_me:10481: \"$ac_try\"") >&5
10482 (eval $ac_try) 2>&5
10484 echo "$as_me:10484: \$? = $ac_status" >&5
10485 (exit $ac_status); }; }; then
10486 ac_cv_lib_mytinfo_tgoto=yes
10488 echo "$as_me: failed program was:" >&5
10489 cat conftest.$ac_ext >&5
10490 ac_cv_lib_mytinfo_tgoto=no
10492 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10493 LIBS=$ac_check_lib_save_LIBS
10495 echo "$as_me:10495: result: $ac_cv_lib_mytinfo_tgoto" >&5
10496 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
10497 if test $ac_cv_lib_mytinfo_tgoto = yes; then
10498 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
10505 cf_add_libs="$LIBS"
10508 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10509 # filter duplicates
10510 for cf_add_1lib in $cf_add_0lib; do
10511 for cf_add_2lib in $cf_add_libs; do
10512 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10517 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10519 LIBS="$cf_add_libs"
10521 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
10524 cf_add_libs="$LIBS"
10527 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10528 # filter duplicates
10529 for cf_add_1lib in $cf_add_0lib; do
10530 for cf_add_2lib in $cf_add_libs; do
10531 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10536 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10538 LIBS="$cf_add_libs"
10542 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
10544 echo "$as_me:10544: checking for initscr" >&5
10545 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
10546 if test "${ac_cv_func_initscr+set}" = set; then
10547 echo $ECHO_N "(cached) $ECHO_C" >&6
10549 cat >conftest.$ac_ext <<_ACEOF
10550 #line 10550 "configure"
10551 #include "confdefs.h"
10552 #define initscr autoconf_temporary
10553 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
10560 /* We use char because int might match the return type of a gcc2
10561 builtin and then its argument prototype would still apply. */
10562 char initscr (void);
10568 /* The GNU C library defines stubs for functions which it implements
10569 to always fail with ENOSYS. Some functions are actually named
10570 something starting with __ and the normal name is an alias. */
10571 #if defined (__stub_initscr) || defined (__stub___initscr)
10572 #error found stub for initscr
10580 rm -f conftest.$ac_objext conftest$ac_exeext
10581 if { (eval echo "$as_me:10581: \"$ac_link\"") >&5
10582 (eval $ac_link) 2>&5
10584 echo "$as_me:10584: \$? = $ac_status" >&5
10585 (exit $ac_status); } &&
10586 { ac_try='test -s conftest$ac_exeext'
10587 { (eval echo "$as_me:10587: \"$ac_try\"") >&5
10588 (eval $ac_try) 2>&5
10590 echo "$as_me:10590: \$? = $ac_status" >&5
10591 (exit $ac_status); }; }; then
10592 ac_cv_func_initscr=yes
10594 echo "$as_me: failed program was:" >&5
10595 cat conftest.$ac_ext >&5
10596 ac_cv_func_initscr=no
10598 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10600 echo "$as_me:10600: result: $ac_cv_func_initscr" >&5
10601 echo "${ECHO_T}$ac_cv_func_initscr" >&6
10602 if test $ac_cv_func_initscr = yes; then
10603 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10606 cf_save_LIBS="$LIBS"
10607 echo "$as_me:10607: checking for initscr in -l$cf_nculib_root" >&5
10608 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
10609 LIBS="-l$cf_nculib_root $LIBS"
10610 cat >conftest.$ac_ext <<_ACEOF
10611 #line 10611 "configure"
10612 #include "confdefs.h"
10613 #include <${cf_cv_ncurses_header:-curses.h}>
10622 rm -f conftest.$ac_objext conftest$ac_exeext
10623 if { (eval echo "$as_me:10623: \"$ac_link\"") >&5
10624 (eval $ac_link) 2>&5
10626 echo "$as_me:10626: \$? = $ac_status" >&5
10627 (exit $ac_status); } &&
10628 { ac_try='test -s conftest$ac_exeext'
10629 { (eval echo "$as_me:10629: \"$ac_try\"") >&5
10630 (eval $ac_try) 2>&5
10632 echo "$as_me:10632: \$? = $ac_status" >&5
10633 (exit $ac_status); }; }; then
10634 echo "$as_me:10634: result: yes" >&5
10635 echo "${ECHO_T}yes" >&6
10636 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10639 echo "$as_me: failed program was:" >&5
10640 cat conftest.$ac_ext >&5
10641 echo "$as_me:10641: result: no" >&5
10642 echo "${ECHO_T}no" >&6
10645 cf_library_path_list=""
10646 if test -n "${LDFLAGS}${LIBS}" ; then
10647 for cf_library_path in $LDFLAGS $LIBS
10649 case $cf_library_path in
10651 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10653 test "x$cf_library_path" != "xNONE" && \
10654 test -d "$cf_library_path" && \
10656 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
10657 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
10658 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
10659 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
10660 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
10661 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"
10664 cf_library_path_list="$cf_library_path_list $cf_search"
10672 test "x$prefix" != "xNONE" && \
10673 test -d "$prefix" && \
10675 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
10676 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
10677 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
10678 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
10679 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
10680 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
10683 for cf_subdir_prefix in \
10692 test "x$cf_subdir_prefix" != "x$prefix" && \
10693 test -d "$cf_subdir_prefix" && \
10694 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10695 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
10696 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
10697 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
10698 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
10699 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
10700 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"
10705 cf_search="$cf_library_path_list $cf_search"
10707 for cf_libdir in $cf_search
10709 echo "$as_me:10709: checking for -l$cf_nculib_root in $cf_libdir" >&5
10710 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
10711 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
10712 cat >conftest.$ac_ext <<_ACEOF
10713 #line 10713 "configure"
10714 #include "confdefs.h"
10715 #include <${cf_cv_ncurses_header:-curses.h}>
10724 rm -f conftest.$ac_objext conftest$ac_exeext
10725 if { (eval echo "$as_me:10725: \"$ac_link\"") >&5
10726 (eval $ac_link) 2>&5
10728 echo "$as_me:10728: \$? = $ac_status" >&5
10729 (exit $ac_status); } &&
10730 { ac_try='test -s conftest$ac_exeext'
10731 { (eval echo "$as_me:10731: \"$ac_try\"") >&5
10732 (eval $ac_try) 2>&5
10734 echo "$as_me:10734: \$? = $ac_status" >&5
10735 (exit $ac_status); }; }; then
10736 echo "$as_me:10736: result: yes" >&5
10737 echo "${ECHO_T}yes" >&6
10738 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10741 echo "$as_me: failed program was:" >&5
10742 cat conftest.$ac_ext >&5
10743 echo "$as_me:10743: result: no" >&5
10744 echo "${ECHO_T}no" >&6
10745 LIBS="$cf_save_LIBS"
10747 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10751 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10755 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
10757 if test $cf_found_library = no ; then
10758 { { echo "$as_me:10758: error: Cannot link $cf_nculib_root library" >&5
10759 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
10760 { (exit 1); exit 1; }; }
10765 if test -n "$cf_ncurses_LIBS" ; then
10766 echo "$as_me:10766: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
10767 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
10768 cf_ncurses_SAVE="$LIBS"
10769 for p in $cf_ncurses_LIBS ; do
10770 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
10771 if test "$q" != "$LIBS" ; then
10775 cat >conftest.$ac_ext <<_ACEOF
10776 #line 10776 "configure"
10777 #include "confdefs.h"
10778 #include <${cf_cv_ncurses_header:-curses.h}>
10782 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
10787 rm -f conftest.$ac_objext conftest$ac_exeext
10788 if { (eval echo "$as_me:10788: \"$ac_link\"") >&5
10789 (eval $ac_link) 2>&5
10791 echo "$as_me:10791: \$? = $ac_status" >&5
10792 (exit $ac_status); } &&
10793 { ac_try='test -s conftest$ac_exeext'
10794 { (eval echo "$as_me:10794: \"$ac_try\"") >&5
10795 (eval $ac_try) 2>&5
10797 echo "$as_me:10797: \$? = $ac_status" >&5
10798 (exit $ac_status); }; }; then
10799 echo "$as_me:10799: result: yes" >&5
10800 echo "${ECHO_T}yes" >&6
10802 echo "$as_me: failed program was:" >&5
10803 cat conftest.$ac_ext >&5
10804 echo "$as_me:10804: result: no" >&5
10805 echo "${ECHO_T}no" >&6
10806 LIBS="$cf_ncurses_SAVE"
10808 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10811 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10813 cat >>confdefs.h <<EOF
10814 #define $cf_nculib_ROOT 1
10819 NCURSES_CONFIG=none
10824 if test "$NCURSES_CONFIG_PKG" != none ; then
10825 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
10827 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
10828 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
10829 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
10831 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
10832 if test -z "$cf_cv_abi_version"
10834 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
10837 elif test "$NCURSES_CONFIG" != none ; then
10839 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
10841 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
10842 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
10843 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
10845 # ABI version is not available from headers
10846 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
10850 for cf_name in MAJOR MINOR PATCH
10852 cat >conftest.$ac_ext <<CF_EOF
10853 #include <${cf_cv_ncurses_header:-curses.h}>
10854 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
10856 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
10857 { (eval echo "$as_me:10857: \"$cf_try\"") >&5
10858 (eval $cf_try) 2>&5
10860 echo "$as_me:10860: \$? = $ac_status" >&5
10861 (exit $ac_status); }
10862 if test -f conftest.out ; then
10863 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[ ][ ]*//"`
10864 eval NCURSES_$cf_name=\"$cf_result\"
10865 # cat conftest.$ac_ext
10870 cf_cv_abi_version=${NCURSES_MAJOR}
10874 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
10876 cf_cv_timestamp=`date`
10878 echo "$as_me:10878: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
10879 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
10881 echo "$as_me:10881: checking if you want to have a library-prefix" >&5
10882 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
10884 # Check whether --with-lib-prefix or --without-lib-prefix was given.
10885 if test "${with_lib_prefix+set}" = set; then
10886 withval="$with_lib_prefix"
10887 with_lib_prefix=$withval
10889 with_lib_prefix=auto
10891 echo "$as_me:10891: result: $with_lib_prefix" >&5
10892 echo "${ECHO_T}$with_lib_prefix" >&6
10894 if test $with_lib_prefix = auto
10897 case $cf_cv_system_name in
10899 if test "$DFT_LWR_MODEL" = libtool; then
10908 (*) LIB_PREFIX='lib'
10911 cf_prefix=$LIB_PREFIX
10913 elif test $with_lib_prefix = no
10917 LIB_PREFIX=$with_lib_prefix
10922 ###############################################################################
10924 if test X"$CC_G_OPT" = X"" ; then
10926 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
10929 echo "$as_me:10929: checking for default loader flags" >&5
10930 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
10931 case $DFT_LWR_MODEL in
10932 (normal) LD_MODEL='' ;;
10933 (debug) LD_MODEL=$CC_G_OPT ;;
10934 (profile) LD_MODEL='-pg';;
10935 (shared) LD_MODEL='' ;;
10937 echo "$as_me:10937: result: $LD_MODEL" >&5
10938 echo "${ECHO_T}$LD_MODEL" >&6
10941 if test "x$cf_cv_enable_rpath" != xno
10943 echo "$as_me:10943: checking for an rpath option" >&5
10944 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
10945 case $cf_cv_system_name in
10947 if test "$GCC" = yes; then
10948 LD_RPATH_OPT="-Wl,-rpath,"
10950 LD_RPATH_OPT="-rpath "
10953 (linux*|gnu*|k*bsd*-gnu|freebsd*)
10954 LD_RPATH_OPT="-Wl,-rpath,"
10956 (openbsd[2-9].*|mirbsd*)
10957 LD_RPATH_OPT="-Wl,-rpath,"
10960 LD_RPATH_OPT="-rpath "
10963 LD_RPATH_OPT="-Wl,-rpath,"
10966 LD_RPATH_OPT="-rpath "
10974 echo "$as_me:10974: result: $LD_RPATH_OPT" >&5
10975 echo "${ECHO_T}$LD_RPATH_OPT" >&6
10977 case "x$LD_RPATH_OPT" in
10979 echo "$as_me:10979: checking if we need a space after rpath option" >&5
10980 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
10981 cf_save_LIBS="$LIBS"
10983 cf_add_libs="$LIBS"
10986 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10987 # filter duplicates
10988 for cf_add_1lib in $cf_add_0lib; do
10989 for cf_add_2lib in $cf_add_libs; do
10990 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10995 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10997 LIBS="$cf_add_libs"
10999 cat >conftest.$ac_ext <<_ACEOF
11000 #line 11000 "configure"
11001 #include "confdefs.h"
11011 rm -f conftest.$ac_objext conftest$ac_exeext
11012 if { (eval echo "$as_me:11012: \"$ac_link\"") >&5
11013 (eval $ac_link) 2>&5
11015 echo "$as_me:11015: \$? = $ac_status" >&5
11016 (exit $ac_status); } &&
11017 { ac_try='test -s conftest$ac_exeext'
11018 { (eval echo "$as_me:11018: \"$ac_try\"") >&5
11019 (eval $ac_try) 2>&5
11021 echo "$as_me:11021: \$? = $ac_status" >&5
11022 (exit $ac_status); }; }; then
11025 echo "$as_me: failed program was:" >&5
11026 cat conftest.$ac_ext >&5
11029 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11030 LIBS="$cf_save_LIBS"
11031 echo "$as_me:11031: result: $cf_rpath_space" >&5
11032 echo "${ECHO_T}$cf_rpath_space" >&6
11033 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
11042 INSTALL_LIB="-m 644"
11043 : ${rel_builddir:=.}
11049 cf_cv_do_symlinks=no
11051 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
11053 echo "$as_me:11053: checking if release/abi version should be used for shared libs" >&5
11054 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
11056 # Check whether --with-shlib-version or --without-shlib-version was given.
11057 if test "${with_shlib_version+set}" = set; then
11058 withval="$with_shlib_version"
11059 test -z "$withval" && withval=auto
11062 cf_cv_shlib_version=auto
11065 cf_cv_shlib_version=$withval
11068 echo "$as_me:11068: result: $withval" >&5
11069 echo "${ECHO_T}$withval" >&6
11070 { { echo "$as_me:11070: error: option value must be one of: rel, abi, or auto" >&5
11071 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
11072 { (exit 1); exit 1; }; }
11077 cf_cv_shlib_version=auto
11079 echo "$as_me:11079: result: $cf_cv_shlib_version" >&5
11080 echo "${ECHO_T}$cf_cv_shlib_version" >&6
11082 cf_cv_rm_so_locs=no
11085 # Some less-capable ports of gcc support only -fpic
11089 if test "$GCC" = yes
11093 case $cf_cv_system_name in
11094 (*linux*) # e.g., PGI compiler
11100 if test "$cf_try_fPIC" = yes
11102 echo "$as_me:11102: checking which $CC option to use" >&5
11103 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
11104 cf_save_CFLAGS="$CFLAGS"
11105 for CC_SHARED_OPTS in -fPIC -fpic ''
11107 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
11108 cat >conftest.$ac_ext <<_ACEOF
11109 #line 11109 "configure"
11110 #include "confdefs.h"
11120 rm -f conftest.$ac_objext
11121 if { (eval echo "$as_me:11121: \"$ac_compile\"") >&5
11122 (eval $ac_compile) 2>&5
11124 echo "$as_me:11124: \$? = $ac_status" >&5
11125 (exit $ac_status); } &&
11126 { ac_try='test -s conftest.$ac_objext'
11127 { (eval echo "$as_me:11127: \"$ac_try\"") >&5
11128 (eval $ac_try) 2>&5
11130 echo "$as_me:11130: \$? = $ac_status" >&5
11131 (exit $ac_status); }; }; then
11134 echo "$as_me: failed program was:" >&5
11135 cat conftest.$ac_ext >&5
11137 rm -f conftest.$ac_objext conftest.$ac_ext
11139 echo "$as_me:11139: result: $CC_SHARED_OPTS" >&5
11140 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
11141 CFLAGS="$cf_save_CFLAGS"
11144 cf_cv_shlib_version_infix=no
11146 case $cf_cv_system_name in
11147 (aix4.3-9*|aix[5-7]*)
11148 if test "$GCC" = yes; then
11149 CC_SHARED_OPTS='-Wl,-brtl'
11150 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11152 CC_SHARED_OPTS='-brtl'
11153 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
11154 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11158 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
11162 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11163 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11164 cf_cv_shlib_version=cygdll
11165 cf_cv_shlib_version_infix=cygdll
11168 cat >mk_shared_lib.sh <<-CF_EOF
11171 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11174 Linking shared library
11175 ** SHARED_LIB \$SHARED_LIB
11176 ** IMPORT_LIB \$IMPORT_LIB
11178 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11180 chmod +x mk_shared_lib.sh
11184 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11185 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11186 cf_cv_shlib_version=msysdll
11187 cf_cv_shlib_version_infix=msysdll
11190 cat >mk_shared_lib.sh <<-CF_EOF
11193 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11196 Linking shared library
11197 ** SHARED_LIB \$SHARED_LIB
11198 ** IMPORT_LIB \$IMPORT_LIB
11200 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11202 chmod +x mk_shared_lib.sh
11205 cf_try_cflags="no-cpp-precomp"
11206 CC_SHARED_OPTS="-dynamic"
11207 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
11208 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
11209 cf_cv_shlib_version_infix=yes
11210 echo "$as_me:11210: checking if ld -search_paths_first works" >&5
11211 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
11212 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
11213 echo $ECHO_N "(cached) $ECHO_C" >&6
11216 cf_save_LDFLAGS=$LDFLAGS
11217 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11218 cat >conftest.$ac_ext <<_ACEOF
11219 #line 11219 "configure"
11220 #include "confdefs.h"
11230 rm -f conftest.$ac_objext conftest$ac_exeext
11231 if { (eval echo "$as_me:11231: \"$ac_link\"") >&5
11232 (eval $ac_link) 2>&5
11234 echo "$as_me:11234: \$? = $ac_status" >&5
11235 (exit $ac_status); } &&
11236 { ac_try='test -s conftest$ac_exeext'
11237 { (eval echo "$as_me:11237: \"$ac_try\"") >&5
11238 (eval $ac_try) 2>&5
11240 echo "$as_me:11240: \$? = $ac_status" >&5
11241 (exit $ac_status); }; }; then
11242 cf_cv_ldflags_search_paths_first=yes
11244 echo "$as_me: failed program was:" >&5
11245 cat conftest.$ac_ext >&5
11246 cf_cv_ldflags_search_paths_first=no
11248 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11249 LDFLAGS=$cf_save_LDFLAGS
11251 echo "$as_me:11251: result: $cf_cv_ldflags_search_paths_first" >&5
11252 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
11253 if test $cf_cv_ldflags_search_paths_first = yes; then
11254 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11258 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
11259 if test "$GCC" != yes; then
11260 CC_SHARED_OPTS='+Z'
11262 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
11263 INSTALL_LIB="-m 555"
11266 # (tested with gcc 2.7.2 -- I don't have c89)
11267 if test "$GCC" = yes; then
11268 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
11270 CC_SHARED_OPTS='+Z'
11271 LD_SHARED_OPTS='-Wl,+b,${libdir}'
11273 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
11274 # HP-UX shared libraries must be executable, and should be
11275 # readonly to exploit a quirk in the memory manager.
11276 INSTALL_LIB="-m 555"
11279 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11280 if test "$cf_cv_shlib_version" = rel; then
11281 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11283 cf_shared_soname='`basename $@`'
11286 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
11289 if test "$cf_cv_enable_rpath" = yes ; then
11290 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11292 # tested with IRIX 5.2 and 'cc'.
11293 if test "$GCC" != yes; then
11294 CC_SHARED_OPTS='-KPIC'
11295 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
11297 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
11299 cf_cv_rm_so_locs=yes
11301 (linux*|gnu*|k*bsd*-gnu)
11302 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11303 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11304 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11306 if test "$cf_cv_enable_rpath" = yes ; then
11307 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11310 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11311 if test "$cf_cv_shlib_version" = rel; then
11312 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11314 cf_cv_shared_soname='`basename $@`'
11317 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11320 cf_cv_shlib_version=msvcdll
11321 cf_cv_shlib_version_infix=msvcdll
11324 if test "$DFT_LWR_MODEL" = "shared" ; then
11325 LOCAL_LDFLAGS="-link -dll"
11326 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11327 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
11330 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
11331 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
11332 cat >mk_shared_lib.sh <<-CF_EOF
11335 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
11340 Linking shared library
11341 ** SHARED LIB \$SHARED_LIB
11342 ** IMPORT_LIB \$IMPORT_LIB
11344 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
11345 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
11346 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
11348 chmod +x mk_shared_lib.sh
11349 cat >mk_prog.sh <<-CF_EOF
11352 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
11355 ldopts=("/subsystem:console")
11358 while test \$# -gt 0; do
11361 # ignore -link argument
11364 # ignore runtime-library option
11379 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
11382 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
11388 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
11389 ldopts+=("\${linkarg}")
11397 ldopts+=("-out:\$1")
11406 if [ "\$isdll" -ne 0 ]; then
11407 for lib in \${libs[*]}; do
11408 ldopts+=("\$lib.dll.lib")
11411 for lib in \${libs[*]}; do
11412 ldopts+=("\$lib.lib")
11417 ** ld options: "\${ldopts[@]}"
11419 exec \$LD \${ldopts[@]}
11421 chmod +x mk_prog.sh
11422 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
11423 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
11426 cf_cv_shlib_version=mingw
11427 cf_cv_shlib_version_infix=mingw
11430 if test "$DFT_LWR_MODEL" = "shared" ; then
11431 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
11432 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11433 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
11436 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11437 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11438 cat >mk_shared_lib.sh <<-CF_EOF
11441 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
11444 Linking shared library
11445 ** SHARED_LIB \$SHARED_LIB
11446 ** IMPORT_LIB \$IMPORT_LIB
11448 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11450 chmod +x mk_shared_lib.sh
11452 (openbsd[2-9].*|mirbsd*)
11453 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11454 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11455 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11457 if test "$cf_cv_enable_rpath" = yes ; then
11458 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11460 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11462 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11463 if test "$cf_cv_shlib_version" = rel; then
11464 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11466 cf_cv_shared_soname='`basename $@`'
11469 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11473 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
11477 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
11479 (nto-qnx*|openbsd*|freebsd[12].*)
11480 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11481 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
11482 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11484 (dragonfly*|freebsd*)
11485 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11486 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
11487 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
11488 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
11489 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11492 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11493 if test "$cf_cv_shlib_version" = rel; then
11494 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11496 cf_cv_shared_soname='`basename $@`'
11499 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11502 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11503 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
11504 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
11505 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11506 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11507 if test "$cf_cv_shlib_version" = auto; then
11508 if test -f /usr/libexec/ld.elf_so; then
11509 cf_cv_shlib_version=abi
11511 cf_cv_shlib_version=rel
11515 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11516 if test "$cf_cv_shlib_version" = rel; then
11517 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11519 cf_cv_shared_soname='`basename $@`'
11522 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
11524 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
11528 # tested with OSF/1 V3.2 and 'cc'
11529 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
11530 # link with shared libs).
11531 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
11534 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
11537 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
11538 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11539 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11540 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11542 cf_cv_rm_so_locs=yes
11544 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
11545 # tested with osr5.0.5
11546 if test "$GCC" != yes; then
11547 CC_SHARED_OPTS='-belf -KPIC'
11549 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
11550 if test "$cf_cv_enable_rpath" = yes ; then
11551 # only way is to set LD_RUN_PATH but no switch for it
11554 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11555 LINK_PROGS='LD_RUN_PATH=${libdir}'
11556 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
11559 # tested with SunOS 4.1.1 and gcc 2.7.0
11560 if test "$GCC" != yes; then
11561 CC_SHARED_OPTS='-KPIC'
11563 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
11564 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11567 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
11568 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
11569 if test "$DFT_LWR_MODEL" = "shared" ; then
11570 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
11571 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11573 if test "$cf_cv_enable_rpath" = yes ; then
11574 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
11577 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11578 if test "$cf_cv_shlib_version" = rel; then
11579 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11581 cf_cv_shared_soname='`basename $@`'
11584 if test "$GCC" != yes; then
11585 cf_save_CFLAGS="$CFLAGS"
11586 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
11588 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
11589 cat >conftest.$ac_ext <<_ACEOF
11590 #line 11590 "configure"
11591 #include "confdefs.h"
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
11618 rm -f conftest.$ac_objext conftest.$ac_ext
11620 CFLAGS="$cf_save_CFLAGS"
11621 CC_SHARED_OPTS=$cf_shared_opts
11622 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
11624 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
11627 (sysv5uw7*|unix_sv*)
11628 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
11629 if test "$GCC" != yes; then
11630 CC_SHARED_OPTS='-KPIC'
11632 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
11635 CC_SHARED_OPTS='unknown'
11636 MK_SHARED_LIB='echo unknown'
11640 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
11641 case "$cf_cv_shlib_version" in
11643 case "$MK_SHARED_LIB" in
11645 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
11648 { echo "$as_me:11648: WARNING: ignored --with-shlib-version" >&5
11649 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
11655 if test -n "$cf_try_cflags"
11657 cat > conftest.$ac_ext <<EOF
11658 #line 11658 "${as_me:-configure}"
11660 int main(int argc, char *argv[])
11663 return (argv[argc-1] == 0) ;
11666 cf_save_CFLAGS="$CFLAGS"
11667 for cf_opt in $cf_try_cflags
11669 CFLAGS="$cf_save_CFLAGS -$cf_opt"
11670 echo "$as_me:11670: checking if CFLAGS option -$cf_opt works" >&5
11671 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
11672 if { (eval echo "$as_me:11672: \"$ac_compile\"") >&5
11673 (eval $ac_compile) 2>&5
11675 echo "$as_me:11675: \$? = $ac_status" >&5
11676 (exit $ac_status); }; then
11677 echo "$as_me:11677: result: yes" >&5
11678 echo "${ECHO_T}yes" >&6
11679 cf_save_CFLAGS="$CFLAGS"
11681 echo "$as_me:11681: result: no" >&5
11682 echo "${ECHO_T}no" >&6
11685 CFLAGS="$cf_save_CFLAGS"
11688 # RPATH_LIST is a colon-separated list of directories
11689 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
11690 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
11692 test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
11694 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
11696 echo "${as_me:-configure}:11696: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
11698 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
11700 echo "${as_me:-configure}:11700: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
11702 # The test/sample programs in the original tree link using rpath option.
11703 # Make it optional for packagers.
11704 if test -n "$LOCAL_LDFLAGS"
11706 echo "$as_me:11706: checking if you want to link sample programs with rpath option" >&5
11707 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
11709 # Check whether --enable-rpath-link or --disable-rpath-link was given.
11710 if test "${enable_rpath_link+set}" = set; then
11711 enableval="$enable_rpath_link"
11712 with_rpath_link=$enableval
11714 with_rpath_link=yes
11716 echo "$as_me:11716: result: $with_rpath_link" >&5
11717 echo "${ECHO_T}$with_rpath_link" >&6
11718 if test "$with_rpath_link" = no
11725 ###############################################################################
11727 ### use option --enable-broken-linker to force on use of broken-linker support
11729 echo "$as_me:11729: checking if you want broken-linker support code" >&5
11730 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
11732 # Check whether --enable-broken_linker or --disable-broken_linker was given.
11733 if test "${enable_broken_linker+set}" = set; then
11734 enableval="$enable_broken_linker"
11735 with_broken_linker=$enableval
11737 with_broken_linker=no
11739 echo "$as_me:11739: result: $with_broken_linker" >&5
11740 echo "${ECHO_T}$with_broken_linker" >&6
11742 : ${BROKEN_LINKER:=0}
11743 if test "x$with_broken_linker" = xyes ; then
11745 cat >>confdefs.h <<\EOF
11746 #define BROKEN_LINKER 1
11752 # Check to define _XOPEN_SOURCE "automatically"
11754 echo "$as_me:11754: checking if the POSIX test-macros are already defined" >&5
11755 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
11756 if test "${cf_cv_posix_visible+set}" = set; then
11757 echo $ECHO_N "(cached) $ECHO_C" >&6
11760 cat >conftest.$ac_ext <<_ACEOF
11761 #line 11761 "configure"
11762 #include "confdefs.h"
11768 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
11769 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
11770 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
11771 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
11772 #error conflicting symbols found
11779 rm -f conftest.$ac_objext
11780 if { (eval echo "$as_me:11780: \"$ac_compile\"") >&5
11781 (eval $ac_compile) 2>&5
11783 echo "$as_me:11783: \$? = $ac_status" >&5
11784 (exit $ac_status); } &&
11785 { ac_try='test -s conftest.$ac_objext'
11786 { (eval echo "$as_me:11786: \"$ac_try\"") >&5
11787 (eval $ac_try) 2>&5
11789 echo "$as_me:11789: \$? = $ac_status" >&5
11790 (exit $ac_status); }; }; then
11791 cf_cv_posix_visible=no
11793 echo "$as_me: failed program was:" >&5
11794 cat conftest.$ac_ext >&5
11795 cf_cv_posix_visible=yes
11797 rm -f conftest.$ac_objext conftest.$ac_ext
11800 echo "$as_me:11800: result: $cf_cv_posix_visible" >&5
11801 echo "${ECHO_T}$cf_cv_posix_visible" >&6
11803 if test "$cf_cv_posix_visible" = no; then
11805 cf_XOPEN_SOURCE=600
11806 cf_POSIX_C_SOURCE=199506L
11811 cf_xopen_source="-D_ALL_SOURCE"
11814 cf_XOPEN_SOURCE=600
11817 cf_xopen_source="-D_APPLE_C_SOURCE"
11820 cf_xopen_source="-D_DARWIN_C_SOURCE"
11823 (freebsd*|dragonfly*|midnightbsd*)
11824 # 5.x headers associate
11825 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
11826 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
11827 cf_POSIX_C_SOURCE=200112L
11828 cf_XOPEN_SOURCE=600
11829 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11832 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
11835 cf_xopen_source="-D_HPUX_SOURCE"
11838 cf_xopen_source="-D_SGI_SOURCE"
11841 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
11843 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
11845 echo "$as_me:11845: checking if this is the GNU C library" >&5
11846 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
11847 if test "${cf_cv_gnu_library+set}" = set; then
11848 echo $ECHO_N "(cached) $ECHO_C" >&6
11851 cat >conftest.$ac_ext <<_ACEOF
11852 #line 11852 "configure"
11853 #include "confdefs.h"
11854 #include <sys/types.h>
11859 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
11861 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
11864 # error not GNU C library
11870 rm -f conftest.$ac_objext
11871 if { (eval echo "$as_me:11871: \"$ac_compile\"") >&5
11872 (eval $ac_compile) 2>&5
11874 echo "$as_me:11874: \$? = $ac_status" >&5
11875 (exit $ac_status); } &&
11876 { ac_try='test -s conftest.$ac_objext'
11877 { (eval echo "$as_me:11877: \"$ac_try\"") >&5
11878 (eval $ac_try) 2>&5
11880 echo "$as_me:11880: \$? = $ac_status" >&5
11881 (exit $ac_status); }; }; then
11882 cf_cv_gnu_library=yes
11884 echo "$as_me: failed program was:" >&5
11885 cat conftest.$ac_ext >&5
11886 cf_cv_gnu_library=no
11888 rm -f conftest.$ac_objext conftest.$ac_ext
11891 echo "$as_me:11891: result: $cf_cv_gnu_library" >&5
11892 echo "${ECHO_T}$cf_cv_gnu_library" >&6
11894 if test x$cf_cv_gnu_library = xyes; then
11896 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
11897 # was changed to help a little. newlib incorporated the change about 4
11899 echo "$as_me:11899: checking if _DEFAULT_SOURCE can be used as a basis" >&5
11900 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
11901 if test "${cf_cv_gnu_library_219+set}" = set; then
11902 echo $ECHO_N "(cached) $ECHO_C" >&6
11905 cf_save="$CPPFLAGS"
11907 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11908 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
11910 cat >conftest.$ac_ext <<_ACEOF
11911 #line 11911 "configure"
11912 #include "confdefs.h"
11913 #include <sys/types.h>
11918 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
11920 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
11923 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
11929 rm -f conftest.$ac_objext
11930 if { (eval echo "$as_me:11930: \"$ac_compile\"") >&5
11931 (eval $ac_compile) 2>&5
11933 echo "$as_me:11933: \$? = $ac_status" >&5
11934 (exit $ac_status); } &&
11935 { ac_try='test -s conftest.$ac_objext'
11936 { (eval echo "$as_me:11936: \"$ac_try\"") >&5
11937 (eval $ac_try) 2>&5
11939 echo "$as_me:11939: \$? = $ac_status" >&5
11940 (exit $ac_status); }; }; then
11941 cf_cv_gnu_library_219=yes
11943 echo "$as_me: failed program was:" >&5
11944 cat conftest.$ac_ext >&5
11945 cf_cv_gnu_library_219=no
11947 rm -f conftest.$ac_objext conftest.$ac_ext
11948 CPPFLAGS="$cf_save"
11951 echo "$as_me:11951: result: $cf_cv_gnu_library_219" >&5
11952 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
11954 if test "x$cf_cv_gnu_library_219" = xyes; then
11955 cf_save="$CPPFLAGS"
11956 echo "$as_me:11956: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
11957 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
11958 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
11959 echo $ECHO_N "(cached) $ECHO_C" >&6
11965 cf_new_extra_cppflags=
11967 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
11969 case $cf_fix_cppflags in
11971 case $cf_add_cflags in
11972 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11973 case $cf_add_cflags in
11975 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11977 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11978 && test -z "${cf_tst_cflags}" \
11979 && cf_fix_cppflags=yes
11981 if test $cf_fix_cppflags = yes ; then
11983 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11984 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11987 elif test "${cf_tst_cflags}" = "\"'" ; then
11989 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11990 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11996 case "$CPPFLAGS" in
12000 case $cf_add_cflags in
12002 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12004 CPPFLAGS=`echo "$CPPFLAGS" | \
12005 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12006 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12011 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12012 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12019 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12020 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12027 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12028 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12030 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12032 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12033 && test -z "${cf_tst_cflags}" \
12034 && cf_fix_cppflags=no
12039 if test -n "$cf_new_cflags" ; then
12041 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12042 CFLAGS="${CFLAGS}$cf_new_cflags"
12046 if test -n "$cf_new_cppflags" ; then
12048 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12049 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12053 if test -n "$cf_new_extra_cppflags" ; then
12055 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12056 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12060 cat >conftest.$ac_ext <<_ACEOF
12061 #line 12061 "configure"
12062 #include "confdefs.h"
12064 #include <limits.h>
12065 #include <sys/types.h>
12071 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
12074 # error GNU C library is too old
12080 rm -f conftest.$ac_objext
12081 if { (eval echo "$as_me:12081: \"$ac_compile\"") >&5
12082 (eval $ac_compile) 2>&5
12084 echo "$as_me:12084: \$? = $ac_status" >&5
12085 (exit $ac_status); } &&
12086 { ac_try='test -s conftest.$ac_objext'
12087 { (eval echo "$as_me:12087: \"$ac_try\"") >&5
12088 (eval $ac_try) 2>&5
12090 echo "$as_me:12090: \$? = $ac_status" >&5
12091 (exit $ac_status); }; }; then
12092 cf_cv_gnu_dftsrc_219=yes
12094 echo "$as_me: failed program was:" >&5
12095 cat conftest.$ac_ext >&5
12096 cf_cv_gnu_dftsrc_219=no
12098 rm -f conftest.$ac_objext conftest.$ac_ext
12101 echo "$as_me:12101: result: $cf_cv_gnu_dftsrc_219" >&5
12102 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
12103 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
12105 cf_cv_gnu_dftsrc_219=maybe
12108 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
12110 echo "$as_me:12110: checking if we must define _GNU_SOURCE" >&5
12111 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
12112 if test "${cf_cv_gnu_source+set}" = set; then
12113 echo $ECHO_N "(cached) $ECHO_C" >&6
12116 cat >conftest.$ac_ext <<_ACEOF
12117 #line 12117 "configure"
12118 #include "confdefs.h"
12119 #include <sys/types.h>
12124 #ifndef _XOPEN_SOURCE
12125 #error expected _XOPEN_SOURCE to be defined
12131 rm -f conftest.$ac_objext
12132 if { (eval echo "$as_me:12132: \"$ac_compile\"") >&5
12133 (eval $ac_compile) 2>&5
12135 echo "$as_me:12135: \$? = $ac_status" >&5
12136 (exit $ac_status); } &&
12137 { ac_try='test -s conftest.$ac_objext'
12138 { (eval echo "$as_me:12138: \"$ac_try\"") >&5
12139 (eval $ac_try) 2>&5
12141 echo "$as_me:12141: \$? = $ac_status" >&5
12142 (exit $ac_status); }; }; then
12143 cf_cv_gnu_source=no
12145 echo "$as_me: failed program was:" >&5
12146 cat conftest.$ac_ext >&5
12147 cf_save="$CPPFLAGS"
12152 cf_new_extra_cppflags=
12154 for cf_add_cflags in -D_GNU_SOURCE
12156 case $cf_fix_cppflags in
12158 case $cf_add_cflags in
12159 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12160 case $cf_add_cflags in
12162 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12164 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12165 && test -z "${cf_tst_cflags}" \
12166 && cf_fix_cppflags=yes
12168 if test $cf_fix_cppflags = yes ; then
12170 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12171 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12174 elif test "${cf_tst_cflags}" = "\"'" ; then
12176 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12177 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12183 case "$CPPFLAGS" in
12187 case $cf_add_cflags in
12189 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12191 CPPFLAGS=`echo "$CPPFLAGS" | \
12192 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12193 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12198 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12199 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12206 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12207 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12214 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12215 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12217 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12219 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12220 && test -z "${cf_tst_cflags}" \
12221 && cf_fix_cppflags=no
12226 if test -n "$cf_new_cflags" ; then
12228 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12229 CFLAGS="${CFLAGS}$cf_new_cflags"
12233 if test -n "$cf_new_cppflags" ; then
12235 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12236 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12240 if test -n "$cf_new_extra_cppflags" ; then
12242 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12243 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12247 cat >conftest.$ac_ext <<_ACEOF
12248 #line 12248 "configure"
12249 #include "confdefs.h"
12250 #include <sys/types.h>
12255 #ifdef _XOPEN_SOURCE
12256 #error expected _XOPEN_SOURCE to be undefined
12262 rm -f conftest.$ac_objext
12263 if { (eval echo "$as_me:12263: \"$ac_compile\"") >&5
12264 (eval $ac_compile) 2>&5
12266 echo "$as_me:12266: \$? = $ac_status" >&5
12267 (exit $ac_status); } &&
12268 { ac_try='test -s conftest.$ac_objext'
12269 { (eval echo "$as_me:12269: \"$ac_try\"") >&5
12270 (eval $ac_try) 2>&5
12272 echo "$as_me:12272: \$? = $ac_status" >&5
12273 (exit $ac_status); }; }; then
12274 cf_cv_gnu_source=no
12276 echo "$as_me: failed program was:" >&5
12277 cat conftest.$ac_ext >&5
12278 cf_cv_gnu_source=yes
12280 rm -f conftest.$ac_objext conftest.$ac_ext
12281 CPPFLAGS="$cf_save"
12284 rm -f conftest.$ac_objext conftest.$ac_ext
12287 echo "$as_me:12287: result: $cf_cv_gnu_source" >&5
12288 echo "${ECHO_T}$cf_cv_gnu_source" >&6
12290 if test "$cf_cv_gnu_source" = yes
12292 echo "$as_me:12292: checking if we should also define _DEFAULT_SOURCE" >&5
12293 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
12294 if test "${cf_cv_default_source+set}" = set; then
12295 echo $ECHO_N "(cached) $ECHO_C" >&6
12298 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12299 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
12301 cat >conftest.$ac_ext <<_ACEOF
12302 #line 12302 "configure"
12303 #include "confdefs.h"
12304 #include <sys/types.h>
12309 #ifdef _DEFAULT_SOURCE
12310 #error expected _DEFAULT_SOURCE to be undefined
12316 rm -f conftest.$ac_objext
12317 if { (eval echo "$as_me:12317: \"$ac_compile\"") >&5
12318 (eval $ac_compile) 2>&5
12320 echo "$as_me:12320: \$? = $ac_status" >&5
12321 (exit $ac_status); } &&
12322 { ac_try='test -s conftest.$ac_objext'
12323 { (eval echo "$as_me:12323: \"$ac_try\"") >&5
12324 (eval $ac_try) 2>&5
12326 echo "$as_me:12326: \$? = $ac_status" >&5
12327 (exit $ac_status); }; }; then
12328 cf_cv_default_source=no
12330 echo "$as_me: failed program was:" >&5
12331 cat conftest.$ac_ext >&5
12332 cf_cv_default_source=yes
12334 rm -f conftest.$ac_objext conftest.$ac_ext
12337 echo "$as_me:12337: result: $cf_cv_default_source" >&5
12338 echo "${ECHO_T}$cf_cv_default_source" >&6
12339 if test "$cf_cv_default_source" = yes
12342 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12343 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12353 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
12356 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
12359 if test "$cf_cv_posix_visible" = no; then
12361 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
12363 cf_save_CFLAGS="$CFLAGS"
12364 cf_save_CPPFLAGS="$CPPFLAGS"
12366 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
12367 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12368 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12370 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
12371 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12372 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12374 echo "$as_me:12374: checking if we should define _POSIX_C_SOURCE" >&5
12375 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
12376 if test "${cf_cv_posix_c_source+set}" = set; then
12377 echo $ECHO_N "(cached) $ECHO_C" >&6
12380 echo "${as_me:-configure}:12380: testing if the symbol is already defined go no further ..." 1>&5
12382 cat >conftest.$ac_ext <<_ACEOF
12383 #line 12383 "configure"
12384 #include "confdefs.h"
12385 #include <sys/types.h>
12390 #ifndef _POSIX_C_SOURCE
12397 rm -f conftest.$ac_objext
12398 if { (eval echo "$as_me:12398: \"$ac_compile\"") >&5
12399 (eval $ac_compile) 2>&5
12401 echo "$as_me:12401: \$? = $ac_status" >&5
12402 (exit $ac_status); } &&
12403 { ac_try='test -s conftest.$ac_objext'
12404 { (eval echo "$as_me:12404: \"$ac_try\"") >&5
12405 (eval $ac_try) 2>&5
12407 echo "$as_me:12407: \$? = $ac_status" >&5
12408 (exit $ac_status); }; }; then
12409 cf_cv_posix_c_source=no
12411 echo "$as_me: failed program was:" >&5
12412 cat conftest.$ac_ext >&5
12413 cf_want_posix_source=no
12414 case .$cf_POSIX_C_SOURCE in
12416 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12419 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12420 cf_want_posix_source=yes
12423 cf_want_posix_source=yes
12426 if test "$cf_want_posix_source" = yes ; then
12427 cat >conftest.$ac_ext <<_ACEOF
12428 #line 12428 "configure"
12429 #include "confdefs.h"
12430 #include <sys/types.h>
12435 #ifdef _POSIX_SOURCE
12442 rm -f conftest.$ac_objext
12443 if { (eval echo "$as_me:12443: \"$ac_compile\"") >&5
12444 (eval $ac_compile) 2>&5
12446 echo "$as_me:12446: \$? = $ac_status" >&5
12447 (exit $ac_status); } &&
12448 { ac_try='test -s conftest.$ac_objext'
12449 { (eval echo "$as_me:12449: \"$ac_try\"") >&5
12450 (eval $ac_try) 2>&5
12452 echo "$as_me:12452: \$? = $ac_status" >&5
12453 (exit $ac_status); }; }; then
12456 echo "$as_me: failed program was:" >&5
12457 cat conftest.$ac_ext >&5
12458 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
12460 rm -f conftest.$ac_objext conftest.$ac_ext
12463 echo "${as_me:-configure}:12463: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
12465 CFLAGS="$cf_trim_CFLAGS"
12466 CPPFLAGS="$cf_trim_CPPFLAGS"
12468 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12469 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
12471 echo "${as_me:-configure}:12471: testing if the second compile does not leave our definition intact error ..." 1>&5
12473 cat >conftest.$ac_ext <<_ACEOF
12474 #line 12474 "configure"
12475 #include "confdefs.h"
12476 #include <sys/types.h>
12481 #ifndef _POSIX_C_SOURCE
12488 rm -f conftest.$ac_objext
12489 if { (eval echo "$as_me:12489: \"$ac_compile\"") >&5
12490 (eval $ac_compile) 2>&5
12492 echo "$as_me:12492: \$? = $ac_status" >&5
12493 (exit $ac_status); } &&
12494 { ac_try='test -s conftest.$ac_objext'
12495 { (eval echo "$as_me:12495: \"$ac_try\"") >&5
12496 (eval $ac_try) 2>&5
12498 echo "$as_me:12498: \$? = $ac_status" >&5
12499 (exit $ac_status); }; }; then
12502 echo "$as_me: failed program was:" >&5
12503 cat conftest.$ac_ext >&5
12504 cf_cv_posix_c_source=no
12506 rm -f conftest.$ac_objext conftest.$ac_ext
12507 CFLAGS="$cf_save_CFLAGS"
12508 CPPFLAGS="$cf_save_CPPFLAGS"
12511 rm -f conftest.$ac_objext conftest.$ac_ext
12514 echo "$as_me:12514: result: $cf_cv_posix_c_source" >&5
12515 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
12517 if test "$cf_cv_posix_c_source" != no ; then
12518 CFLAGS="$cf_trim_CFLAGS"
12519 CPPFLAGS="$cf_trim_CPPFLAGS"
12524 cf_new_extra_cppflags=
12526 for cf_add_cflags in $cf_cv_posix_c_source
12528 case $cf_fix_cppflags in
12530 case $cf_add_cflags in
12531 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12532 case $cf_add_cflags in
12534 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12536 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12537 && test -z "${cf_tst_cflags}" \
12538 && cf_fix_cppflags=yes
12540 if test $cf_fix_cppflags = yes ; then
12542 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12543 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12546 elif test "${cf_tst_cflags}" = "\"'" ; then
12548 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12549 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12555 case "$CPPFLAGS" in
12559 case $cf_add_cflags in
12561 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12563 CPPFLAGS=`echo "$CPPFLAGS" | \
12564 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12565 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12570 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12571 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12578 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12579 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12586 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12587 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12589 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12591 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12592 && test -z "${cf_tst_cflags}" \
12593 && cf_fix_cppflags=no
12598 if test -n "$cf_new_cflags" ; then
12600 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12601 CFLAGS="${CFLAGS}$cf_new_cflags"
12605 if test -n "$cf_new_cppflags" ; then
12607 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12608 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12612 if test -n "$cf_new_extra_cppflags" ; then
12614 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12615 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12621 fi # cf_cv_posix_visible
12625 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
12628 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
12629 cf_xopen_source="-D_BSD_SOURCE"
12630 cf_XOPEN_SOURCE=600
12633 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
12636 cf_xopen_source="-D_OSF_SOURCE"
12639 cf_xopen_source="-D_QNX_SOURCE"
12642 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
12645 cf_xopen_source="-D__EXTENSIONS__"
12646 cf_cv_xopen_source=broken
12648 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
12654 echo "$as_me:12654: checking if we should define _XOPEN_SOURCE" >&5
12655 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12656 if test "${cf_cv_xopen_source+set}" = set; then
12657 echo $ECHO_N "(cached) $ECHO_C" >&6
12660 cat >conftest.$ac_ext <<_ACEOF
12661 #line 12661 "configure"
12662 #include "confdefs.h"
12664 #include <stdlib.h>
12665 #include <string.h>
12666 #include <sys/types.h>
12672 #ifndef _XOPEN_SOURCE
12679 rm -f conftest.$ac_objext
12680 if { (eval echo "$as_me:12680: \"$ac_compile\"") >&5
12681 (eval $ac_compile) 2>&5
12683 echo "$as_me:12683: \$? = $ac_status" >&5
12684 (exit $ac_status); } &&
12685 { ac_try='test -s conftest.$ac_objext'
12686 { (eval echo "$as_me:12686: \"$ac_try\"") >&5
12687 (eval $ac_try) 2>&5
12689 echo "$as_me:12689: \$? = $ac_status" >&5
12690 (exit $ac_status); }; }; then
12691 cf_cv_xopen_source=no
12693 echo "$as_me: failed program was:" >&5
12694 cat conftest.$ac_ext >&5
12695 cf_save="$CPPFLAGS"
12697 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12698 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12700 cat >conftest.$ac_ext <<_ACEOF
12701 #line 12701 "configure"
12702 #include "confdefs.h"
12704 #include <stdlib.h>
12705 #include <string.h>
12706 #include <sys/types.h>
12712 #ifdef _XOPEN_SOURCE
12719 rm -f conftest.$ac_objext
12720 if { (eval echo "$as_me:12720: \"$ac_compile\"") >&5
12721 (eval $ac_compile) 2>&5
12723 echo "$as_me:12723: \$? = $ac_status" >&5
12724 (exit $ac_status); } &&
12725 { ac_try='test -s conftest.$ac_objext'
12726 { (eval echo "$as_me:12726: \"$ac_try\"") >&5
12727 (eval $ac_try) 2>&5
12729 echo "$as_me:12729: \$? = $ac_status" >&5
12730 (exit $ac_status); }; }; then
12731 cf_cv_xopen_source=no
12733 echo "$as_me: failed program was:" >&5
12734 cat conftest.$ac_ext >&5
12735 cf_cv_xopen_source=$cf_XOPEN_SOURCE
12737 rm -f conftest.$ac_objext conftest.$ac_ext
12738 CPPFLAGS="$cf_save"
12741 rm -f conftest.$ac_objext conftest.$ac_ext
12744 echo "$as_me:12744: result: $cf_cv_xopen_source" >&5
12745 echo "${ECHO_T}$cf_cv_xopen_source" >&6
12747 if test "$cf_cv_xopen_source" != no ; then
12749 CFLAGS=`echo "$CFLAGS" | \
12750 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12751 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
12753 CPPFLAGS=`echo "$CPPFLAGS" | \
12754 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12755 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
12757 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12762 cf_new_extra_cppflags=
12764 for cf_add_cflags in $cf_temp_xopen_source
12766 case $cf_fix_cppflags in
12768 case $cf_add_cflags in
12769 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12770 case $cf_add_cflags in
12772 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12774 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12775 && test -z "${cf_tst_cflags}" \
12776 && cf_fix_cppflags=yes
12778 if test $cf_fix_cppflags = yes ; then
12780 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12781 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12784 elif test "${cf_tst_cflags}" = "\"'" ; then
12786 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12787 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12793 case "$CPPFLAGS" in
12797 case $cf_add_cflags in
12799 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12801 CPPFLAGS=`echo "$CPPFLAGS" | \
12802 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12803 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12808 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12809 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12816 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12817 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12824 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12825 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12827 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12829 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12830 && test -z "${cf_tst_cflags}" \
12831 && cf_fix_cppflags=no
12836 if test -n "$cf_new_cflags" ; then
12838 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12839 CFLAGS="${CFLAGS}$cf_new_cflags"
12843 if test -n "$cf_new_cppflags" ; then
12845 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12846 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12850 if test -n "$cf_new_extra_cppflags" ; then
12852 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12853 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12859 if test "$cf_cv_posix_visible" = no; then
12861 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
12863 cf_save_CFLAGS="$CFLAGS"
12864 cf_save_CPPFLAGS="$CPPFLAGS"
12866 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
12867 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12868 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12870 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
12871 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12872 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12874 echo "$as_me:12874: checking if we should define _POSIX_C_SOURCE" >&5
12875 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
12876 if test "${cf_cv_posix_c_source+set}" = set; then
12877 echo $ECHO_N "(cached) $ECHO_C" >&6
12880 echo "${as_me:-configure}:12880: testing if the symbol is already defined go no further ..." 1>&5
12882 cat >conftest.$ac_ext <<_ACEOF
12883 #line 12883 "configure"
12884 #include "confdefs.h"
12885 #include <sys/types.h>
12890 #ifndef _POSIX_C_SOURCE
12897 rm -f conftest.$ac_objext
12898 if { (eval echo "$as_me:12898: \"$ac_compile\"") >&5
12899 (eval $ac_compile) 2>&5
12901 echo "$as_me:12901: \$? = $ac_status" >&5
12902 (exit $ac_status); } &&
12903 { ac_try='test -s conftest.$ac_objext'
12904 { (eval echo "$as_me:12904: \"$ac_try\"") >&5
12905 (eval $ac_try) 2>&5
12907 echo "$as_me:12907: \$? = $ac_status" >&5
12908 (exit $ac_status); }; }; then
12909 cf_cv_posix_c_source=no
12911 echo "$as_me: failed program was:" >&5
12912 cat conftest.$ac_ext >&5
12913 cf_want_posix_source=no
12914 case .$cf_POSIX_C_SOURCE in
12916 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12919 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12920 cf_want_posix_source=yes
12923 cf_want_posix_source=yes
12926 if test "$cf_want_posix_source" = yes ; then
12927 cat >conftest.$ac_ext <<_ACEOF
12928 #line 12928 "configure"
12929 #include "confdefs.h"
12930 #include <sys/types.h>
12935 #ifdef _POSIX_SOURCE
12942 rm -f conftest.$ac_objext
12943 if { (eval echo "$as_me:12943: \"$ac_compile\"") >&5
12944 (eval $ac_compile) 2>&5
12946 echo "$as_me:12946: \$? = $ac_status" >&5
12947 (exit $ac_status); } &&
12948 { ac_try='test -s conftest.$ac_objext'
12949 { (eval echo "$as_me:12949: \"$ac_try\"") >&5
12950 (eval $ac_try) 2>&5
12952 echo "$as_me:12952: \$? = $ac_status" >&5
12953 (exit $ac_status); }; }; then
12956 echo "$as_me: failed program was:" >&5
12957 cat conftest.$ac_ext >&5
12958 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
12960 rm -f conftest.$ac_objext conftest.$ac_ext
12963 echo "${as_me:-configure}:12963: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
12965 CFLAGS="$cf_trim_CFLAGS"
12966 CPPFLAGS="$cf_trim_CPPFLAGS"
12968 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12969 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
12971 echo "${as_me:-configure}:12971: testing if the second compile does not leave our definition intact error ..." 1>&5
12973 cat >conftest.$ac_ext <<_ACEOF
12974 #line 12974 "configure"
12975 #include "confdefs.h"
12976 #include <sys/types.h>
12981 #ifndef _POSIX_C_SOURCE
12988 rm -f conftest.$ac_objext
12989 if { (eval echo "$as_me:12989: \"$ac_compile\"") >&5
12990 (eval $ac_compile) 2>&5
12992 echo "$as_me:12992: \$? = $ac_status" >&5
12993 (exit $ac_status); } &&
12994 { ac_try='test -s conftest.$ac_objext'
12995 { (eval echo "$as_me:12995: \"$ac_try\"") >&5
12996 (eval $ac_try) 2>&5
12998 echo "$as_me:12998: \$? = $ac_status" >&5
12999 (exit $ac_status); }; }; then
13002 echo "$as_me: failed program was:" >&5
13003 cat conftest.$ac_ext >&5
13004 cf_cv_posix_c_source=no
13006 rm -f conftest.$ac_objext conftest.$ac_ext
13007 CFLAGS="$cf_save_CFLAGS"
13008 CPPFLAGS="$cf_save_CPPFLAGS"
13011 rm -f conftest.$ac_objext conftest.$ac_ext
13014 echo "$as_me:13014: result: $cf_cv_posix_c_source" >&5
13015 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13017 if test "$cf_cv_posix_c_source" != no ; then
13018 CFLAGS="$cf_trim_CFLAGS"
13019 CPPFLAGS="$cf_trim_CPPFLAGS"
13024 cf_new_extra_cppflags=
13026 for cf_add_cflags in $cf_cv_posix_c_source
13028 case $cf_fix_cppflags in
13030 case $cf_add_cflags in
13031 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13032 case $cf_add_cflags in
13034 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13036 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13037 && test -z "${cf_tst_cflags}" \
13038 && cf_fix_cppflags=yes
13040 if test $cf_fix_cppflags = yes ; then
13042 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13043 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13046 elif test "${cf_tst_cflags}" = "\"'" ; then
13048 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13049 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13055 case "$CPPFLAGS" in
13059 case $cf_add_cflags in
13061 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13063 CPPFLAGS=`echo "$CPPFLAGS" | \
13064 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13065 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13070 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13071 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13078 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13079 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13086 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13087 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13089 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13091 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13092 && test -z "${cf_tst_cflags}" \
13093 && cf_fix_cppflags=no
13098 if test -n "$cf_new_cflags" ; then
13100 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13101 CFLAGS="${CFLAGS}$cf_new_cflags"
13105 if test -n "$cf_new_cppflags" ; then
13107 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13108 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13112 if test -n "$cf_new_extra_cppflags" ; then
13114 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13115 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13121 fi # cf_cv_posix_visible
13126 if test -n "$cf_xopen_source" ; then
13131 cf_new_extra_cppflags=
13133 for cf_add_cflags in $cf_xopen_source
13135 case $cf_fix_cppflags in
13137 case $cf_add_cflags in
13138 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13139 case $cf_add_cflags in
13141 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13143 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13144 && test -z "${cf_tst_cflags}" \
13145 && cf_fix_cppflags=yes
13147 if test $cf_fix_cppflags = yes ; then
13149 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13150 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13153 elif test "${cf_tst_cflags}" = "\"'" ; then
13155 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13156 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13162 case "$CPPFLAGS" in
13166 case $cf_add_cflags in
13168 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13170 CPPFLAGS=`echo "$CPPFLAGS" | \
13171 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13172 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13177 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13178 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13185 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13186 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13193 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13194 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13196 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13198 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13199 && test -z "${cf_tst_cflags}" \
13200 && cf_fix_cppflags=no
13205 if test -n "$cf_new_cflags" ; then
13206 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13208 echo "${as_me:-configure}:13208: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13210 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13211 CFLAGS="${CFLAGS}$cf_new_cflags"
13215 if test -n "$cf_new_cppflags" ; then
13216 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13218 echo "${as_me:-configure}:13218: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13220 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13221 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13225 if test -n "$cf_new_extra_cppflags" ; then
13226 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13228 echo "${as_me:-configure}:13228: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13230 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13231 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13237 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
13238 echo "$as_me:13238: checking if _XOPEN_SOURCE really is set" >&5
13239 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
13240 cat >conftest.$ac_ext <<_ACEOF
13241 #line 13241 "configure"
13242 #include "confdefs.h"
13243 #include <stdlib.h>
13248 #ifndef _XOPEN_SOURCE
13255 rm -f conftest.$ac_objext
13256 if { (eval echo "$as_me:13256: \"$ac_compile\"") >&5
13257 (eval $ac_compile) 2>&5
13259 echo "$as_me:13259: \$? = $ac_status" >&5
13260 (exit $ac_status); } &&
13261 { ac_try='test -s conftest.$ac_objext'
13262 { (eval echo "$as_me:13262: \"$ac_try\"") >&5
13263 (eval $ac_try) 2>&5
13265 echo "$as_me:13265: \$? = $ac_status" >&5
13266 (exit $ac_status); }; }; then
13267 cf_XOPEN_SOURCE_set=yes
13269 echo "$as_me: failed program was:" >&5
13270 cat conftest.$ac_ext >&5
13271 cf_XOPEN_SOURCE_set=no
13273 rm -f conftest.$ac_objext conftest.$ac_ext
13274 echo "$as_me:13274: result: $cf_XOPEN_SOURCE_set" >&5
13275 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
13276 if test $cf_XOPEN_SOURCE_set = yes
13278 cat >conftest.$ac_ext <<_ACEOF
13279 #line 13279 "configure"
13280 #include "confdefs.h"
13281 #include <stdlib.h>
13286 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
13293 rm -f conftest.$ac_objext
13294 if { (eval echo "$as_me:13294: \"$ac_compile\"") >&5
13295 (eval $ac_compile) 2>&5
13297 echo "$as_me:13297: \$? = $ac_status" >&5
13298 (exit $ac_status); } &&
13299 { ac_try='test -s conftest.$ac_objext'
13300 { (eval echo "$as_me:13300: \"$ac_try\"") >&5
13301 (eval $ac_try) 2>&5
13303 echo "$as_me:13303: \$? = $ac_status" >&5
13304 (exit $ac_status); }; }; then
13305 cf_XOPEN_SOURCE_set_ok=yes
13307 echo "$as_me: failed program was:" >&5
13308 cat conftest.$ac_ext >&5
13309 cf_XOPEN_SOURCE_set_ok=no
13311 rm -f conftest.$ac_objext conftest.$ac_ext
13312 if test $cf_XOPEN_SOURCE_set_ok = no
13314 { echo "$as_me:13314: WARNING: _XOPEN_SOURCE is lower than requested" >&5
13315 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
13319 echo "$as_me:13319: checking if we should define _XOPEN_SOURCE" >&5
13320 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13321 if test "${cf_cv_xopen_source+set}" = set; then
13322 echo $ECHO_N "(cached) $ECHO_C" >&6
13325 cat >conftest.$ac_ext <<_ACEOF
13326 #line 13326 "configure"
13327 #include "confdefs.h"
13329 #include <stdlib.h>
13330 #include <string.h>
13331 #include <sys/types.h>
13337 #ifndef _XOPEN_SOURCE
13344 rm -f conftest.$ac_objext
13345 if { (eval echo "$as_me:13345: \"$ac_compile\"") >&5
13346 (eval $ac_compile) 2>&5
13348 echo "$as_me:13348: \$? = $ac_status" >&5
13349 (exit $ac_status); } &&
13350 { ac_try='test -s conftest.$ac_objext'
13351 { (eval echo "$as_me:13351: \"$ac_try\"") >&5
13352 (eval $ac_try) 2>&5
13354 echo "$as_me:13354: \$? = $ac_status" >&5
13355 (exit $ac_status); }; }; then
13356 cf_cv_xopen_source=no
13358 echo "$as_me: failed program was:" >&5
13359 cat conftest.$ac_ext >&5
13360 cf_save="$CPPFLAGS"
13362 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13363 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13365 cat >conftest.$ac_ext <<_ACEOF
13366 #line 13366 "configure"
13367 #include "confdefs.h"
13369 #include <stdlib.h>
13370 #include <string.h>
13371 #include <sys/types.h>
13377 #ifdef _XOPEN_SOURCE
13384 rm -f conftest.$ac_objext
13385 if { (eval echo "$as_me:13385: \"$ac_compile\"") >&5
13386 (eval $ac_compile) 2>&5
13388 echo "$as_me:13388: \$? = $ac_status" >&5
13389 (exit $ac_status); } &&
13390 { ac_try='test -s conftest.$ac_objext'
13391 { (eval echo "$as_me:13391: \"$ac_try\"") >&5
13392 (eval $ac_try) 2>&5
13394 echo "$as_me:13394: \$? = $ac_status" >&5
13395 (exit $ac_status); }; }; then
13396 cf_cv_xopen_source=no
13398 echo "$as_me: failed program was:" >&5
13399 cat conftest.$ac_ext >&5
13400 cf_cv_xopen_source=$cf_XOPEN_SOURCE
13402 rm -f conftest.$ac_objext conftest.$ac_ext
13403 CPPFLAGS="$cf_save"
13406 rm -f conftest.$ac_objext conftest.$ac_ext
13409 echo "$as_me:13409: result: $cf_cv_xopen_source" >&5
13410 echo "${ECHO_T}$cf_cv_xopen_source" >&6
13412 if test "$cf_cv_xopen_source" != no ; then
13414 CFLAGS=`echo "$CFLAGS" | \
13415 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13416 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13418 CPPFLAGS=`echo "$CPPFLAGS" | \
13419 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13420 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13422 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13427 cf_new_extra_cppflags=
13429 for cf_add_cflags in $cf_temp_xopen_source
13431 case $cf_fix_cppflags in
13433 case $cf_add_cflags in
13434 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13435 case $cf_add_cflags in
13437 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13439 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13440 && test -z "${cf_tst_cflags}" \
13441 && cf_fix_cppflags=yes
13443 if test $cf_fix_cppflags = yes ; then
13445 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13446 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13449 elif test "${cf_tst_cflags}" = "\"'" ; then
13451 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13452 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13458 case "$CPPFLAGS" in
13462 case $cf_add_cflags in
13464 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13466 CPPFLAGS=`echo "$CPPFLAGS" | \
13467 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13468 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13473 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13474 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13481 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13482 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13489 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13490 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13492 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13494 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13495 && test -z "${cf_tst_cflags}" \
13496 && cf_fix_cppflags=no
13501 if test -n "$cf_new_cflags" ; then
13503 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13504 CFLAGS="${CFLAGS}$cf_new_cflags"
13508 if test -n "$cf_new_cppflags" ; then
13510 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13511 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13515 if test -n "$cf_new_extra_cppflags" ; then
13517 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13518 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13526 fi # cf_cv_posix_visible
13528 # Check whether --enable-largefile or --disable-largefile was given.
13529 if test "${enable_largefile+set}" = set; then
13530 enableval="$enable_largefile"
13533 if test "$enable_largefile" != no; then
13535 echo "$as_me:13535: checking for special C compiler options needed for large files" >&5
13536 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13537 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13538 echo $ECHO_N "(cached) $ECHO_C" >&6
13540 ac_cv_sys_largefile_CC=no
13541 if test "$GCC" != yes; then
13544 # IRIX 6.2 and later do not support large files by default,
13545 # so use the C compiler's -n32 option if that helps.
13546 cat >conftest.$ac_ext <<_ACEOF
13547 #line 13547 "configure"
13548 #include "confdefs.h"
13549 #include <sys/types.h>
13550 /* Check that off_t can represent 2**63 - 1 correctly.
13551 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13552 since some C++ compilers masquerading as C compilers
13553 incorrectly reject 9223372036854775807. */
13554 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13555 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13556 && LARGE_OFF_T % 2147483647 == 1)
13566 rm -f conftest.$ac_objext
13567 if { (eval echo "$as_me:13567: \"$ac_compile\"") >&5
13568 (eval $ac_compile) 2>&5
13570 echo "$as_me:13570: \$? = $ac_status" >&5
13571 (exit $ac_status); } &&
13572 { ac_try='test -s conftest.$ac_objext'
13573 { (eval echo "$as_me:13573: \"$ac_try\"") >&5
13574 (eval $ac_try) 2>&5
13576 echo "$as_me:13576: \$? = $ac_status" >&5
13577 (exit $ac_status); }; }; then
13580 echo "$as_me: failed program was:" >&5
13581 cat conftest.$ac_ext >&5
13583 rm -f conftest.$ac_objext
13585 rm -f conftest.$ac_objext
13586 if { (eval echo "$as_me:13586: \"$ac_compile\"") >&5
13587 (eval $ac_compile) 2>&5
13589 echo "$as_me:13589: \$? = $ac_status" >&5
13590 (exit $ac_status); } &&
13591 { ac_try='test -s conftest.$ac_objext'
13592 { (eval echo "$as_me:13592: \"$ac_try\"") >&5
13593 (eval $ac_try) 2>&5
13595 echo "$as_me:13595: \$? = $ac_status" >&5
13596 (exit $ac_status); }; }; then
13597 ac_cv_sys_largefile_CC=' -n32'; break
13599 echo "$as_me: failed program was:" >&5
13600 cat conftest.$ac_ext >&5
13602 rm -f conftest.$ac_objext
13606 rm -f conftest.$ac_ext
13609 echo "$as_me:13609: result: $ac_cv_sys_largefile_CC" >&5
13610 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13611 if test "$ac_cv_sys_largefile_CC" != no; then
13612 CC=$CC$ac_cv_sys_largefile_CC
13615 echo "$as_me:13615: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13616 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13617 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13618 echo $ECHO_N "(cached) $ECHO_C" >&6
13621 ac_cv_sys_file_offset_bits=no
13622 cat >conftest.$ac_ext <<_ACEOF
13623 #line 13623 "configure"
13624 #include "confdefs.h"
13625 #include <sys/types.h>
13626 /* Check that off_t can represent 2**63 - 1 correctly.
13627 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13628 since some C++ compilers masquerading as C compilers
13629 incorrectly reject 9223372036854775807. */
13630 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13631 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13632 && LARGE_OFF_T % 2147483647 == 1)
13642 rm -f conftest.$ac_objext
13643 if { (eval echo "$as_me:13643: \"$ac_compile\"") >&5
13644 (eval $ac_compile) 2>&5
13646 echo "$as_me:13646: \$? = $ac_status" >&5
13647 (exit $ac_status); } &&
13648 { ac_try='test -s conftest.$ac_objext'
13649 { (eval echo "$as_me:13649: \"$ac_try\"") >&5
13650 (eval $ac_try) 2>&5
13652 echo "$as_me:13652: \$? = $ac_status" >&5
13653 (exit $ac_status); }; }; then
13656 echo "$as_me: failed program was:" >&5
13657 cat conftest.$ac_ext >&5
13659 rm -f conftest.$ac_objext conftest.$ac_ext
13660 cat >conftest.$ac_ext <<_ACEOF
13661 #line 13661 "configure"
13662 #include "confdefs.h"
13663 #define _FILE_OFFSET_BITS 64
13664 #include <sys/types.h>
13665 /* Check that off_t can represent 2**63 - 1 correctly.
13666 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13667 since some C++ compilers masquerading as C compilers
13668 incorrectly reject 9223372036854775807. */
13669 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13670 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13671 && LARGE_OFF_T % 2147483647 == 1)
13681 rm -f conftest.$ac_objext
13682 if { (eval echo "$as_me:13682: \"$ac_compile\"") >&5
13683 (eval $ac_compile) 2>&5
13685 echo "$as_me:13685: \$? = $ac_status" >&5
13686 (exit $ac_status); } &&
13687 { ac_try='test -s conftest.$ac_objext'
13688 { (eval echo "$as_me:13688: \"$ac_try\"") >&5
13689 (eval $ac_try) 2>&5
13691 echo "$as_me:13691: \$? = $ac_status" >&5
13692 (exit $ac_status); }; }; then
13693 ac_cv_sys_file_offset_bits=64; break
13695 echo "$as_me: failed program was:" >&5
13696 cat conftest.$ac_ext >&5
13698 rm -f conftest.$ac_objext conftest.$ac_ext
13702 echo "$as_me:13702: result: $ac_cv_sys_file_offset_bits" >&5
13703 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13704 if test "$ac_cv_sys_file_offset_bits" != no; then
13706 cat >>confdefs.h <<EOF
13707 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13712 echo "$as_me:13712: checking for _LARGE_FILES value needed for large files" >&5
13713 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13714 if test "${ac_cv_sys_large_files+set}" = set; then
13715 echo $ECHO_N "(cached) $ECHO_C" >&6
13718 ac_cv_sys_large_files=no
13719 cat >conftest.$ac_ext <<_ACEOF
13720 #line 13720 "configure"
13721 #include "confdefs.h"
13722 #include <sys/types.h>
13723 /* Check that off_t can represent 2**63 - 1 correctly.
13724 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13725 since some C++ compilers masquerading as C compilers
13726 incorrectly reject 9223372036854775807. */
13727 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13728 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13729 && LARGE_OFF_T % 2147483647 == 1)
13739 rm -f conftest.$ac_objext
13740 if { (eval echo "$as_me:13740: \"$ac_compile\"") >&5
13741 (eval $ac_compile) 2>&5
13743 echo "$as_me:13743: \$? = $ac_status" >&5
13744 (exit $ac_status); } &&
13745 { ac_try='test -s conftest.$ac_objext'
13746 { (eval echo "$as_me:13746: \"$ac_try\"") >&5
13747 (eval $ac_try) 2>&5
13749 echo "$as_me:13749: \$? = $ac_status" >&5
13750 (exit $ac_status); }; }; then
13753 echo "$as_me: failed program was:" >&5
13754 cat conftest.$ac_ext >&5
13756 rm -f conftest.$ac_objext conftest.$ac_ext
13757 cat >conftest.$ac_ext <<_ACEOF
13758 #line 13758 "configure"
13759 #include "confdefs.h"
13760 #define _LARGE_FILES 1
13761 #include <sys/types.h>
13762 /* Check that off_t can represent 2**63 - 1 correctly.
13763 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13764 since some C++ compilers masquerading as C compilers
13765 incorrectly reject 9223372036854775807. */
13766 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13767 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13768 && LARGE_OFF_T % 2147483647 == 1)
13778 rm -f conftest.$ac_objext
13779 if { (eval echo "$as_me:13779: \"$ac_compile\"") >&5
13780 (eval $ac_compile) 2>&5
13782 echo "$as_me:13782: \$? = $ac_status" >&5
13783 (exit $ac_status); } &&
13784 { ac_try='test -s conftest.$ac_objext'
13785 { (eval echo "$as_me:13785: \"$ac_try\"") >&5
13786 (eval $ac_try) 2>&5
13788 echo "$as_me:13788: \$? = $ac_status" >&5
13789 (exit $ac_status); }; }; then
13790 ac_cv_sys_large_files=1; break
13792 echo "$as_me: failed program was:" >&5
13793 cat conftest.$ac_ext >&5
13795 rm -f conftest.$ac_objext conftest.$ac_ext
13799 echo "$as_me:13799: result: $ac_cv_sys_large_files" >&5
13800 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13801 if test "$ac_cv_sys_large_files" != no; then
13803 cat >>confdefs.h <<EOF
13804 #define _LARGE_FILES $ac_cv_sys_large_files
13811 if test "$enable_largefile" != no ; then
13812 echo "$as_me:13812: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13813 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13814 if test "${ac_cv_sys_largefile_source+set}" = set; then
13815 echo $ECHO_N "(cached) $ECHO_C" >&6
13818 ac_cv_sys_largefile_source=no
13819 cat >conftest.$ac_ext <<_ACEOF
13820 #line 13820 "configure"
13821 #include "confdefs.h"
13831 rm -f conftest.$ac_objext
13832 if { (eval echo "$as_me:13832: \"$ac_compile\"") >&5
13833 (eval $ac_compile) 2>&5
13835 echo "$as_me:13835: \$? = $ac_status" >&5
13836 (exit $ac_status); } &&
13837 { ac_try='test -s conftest.$ac_objext'
13838 { (eval echo "$as_me:13838: \"$ac_try\"") >&5
13839 (eval $ac_try) 2>&5
13841 echo "$as_me:13841: \$? = $ac_status" >&5
13842 (exit $ac_status); }; }; then
13845 echo "$as_me: failed program was:" >&5
13846 cat conftest.$ac_ext >&5
13848 rm -f conftest.$ac_objext conftest.$ac_ext
13849 cat >conftest.$ac_ext <<_ACEOF
13850 #line 13850 "configure"
13851 #include "confdefs.h"
13852 #define _LARGEFILE_SOURCE 1
13862 rm -f conftest.$ac_objext
13863 if { (eval echo "$as_me:13863: \"$ac_compile\"") >&5
13864 (eval $ac_compile) 2>&5
13866 echo "$as_me:13866: \$? = $ac_status" >&5
13867 (exit $ac_status); } &&
13868 { ac_try='test -s conftest.$ac_objext'
13869 { (eval echo "$as_me:13869: \"$ac_try\"") >&5
13870 (eval $ac_try) 2>&5
13872 echo "$as_me:13872: \$? = $ac_status" >&5
13873 (exit $ac_status); }; }; then
13874 ac_cv_sys_largefile_source=1; break
13876 echo "$as_me: failed program was:" >&5
13877 cat conftest.$ac_ext >&5
13879 rm -f conftest.$ac_objext conftest.$ac_ext
13883 echo "$as_me:13883: result: $ac_cv_sys_largefile_source" >&5
13884 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13885 if test "$ac_cv_sys_largefile_source" != no; then
13887 cat >>confdefs.h <<EOF
13888 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13894 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13895 # in glibc 2.1.3, but that breaks too many other things.
13896 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13897 echo "$as_me:13897: checking for fseeko" >&5
13898 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13899 if test "${ac_cv_func_fseeko+set}" = set; then
13900 echo $ECHO_N "(cached) $ECHO_C" >&6
13902 cat >conftest.$ac_ext <<_ACEOF
13903 #line 13903 "configure"
13904 #include "confdefs.h"
13909 return fseeko && fseeko (stdin, 0, 0);
13914 rm -f conftest.$ac_objext conftest$ac_exeext
13915 if { (eval echo "$as_me:13915: \"$ac_link\"") >&5
13916 (eval $ac_link) 2>&5
13918 echo "$as_me:13918: \$? = $ac_status" >&5
13919 (exit $ac_status); } &&
13920 { ac_try='test -s conftest$ac_exeext'
13921 { (eval echo "$as_me:13921: \"$ac_try\"") >&5
13922 (eval $ac_try) 2>&5
13924 echo "$as_me:13924: \$? = $ac_status" >&5
13925 (exit $ac_status); }; }; then
13926 ac_cv_func_fseeko=yes
13928 echo "$as_me: failed program was:" >&5
13929 cat conftest.$ac_ext >&5
13930 ac_cv_func_fseeko=no
13932 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13934 echo "$as_me:13934: result: $ac_cv_func_fseeko" >&5
13935 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13936 if test $ac_cv_func_fseeko = yes; then
13938 cat >>confdefs.h <<\EOF
13939 #define HAVE_FSEEKO 1
13944 # Normally we would collect these definitions in the config.h,
13945 # but (like _XOPEN_SOURCE), some environments rely on having these
13946 # defined before any of the system headers are included. Another
13947 # case comes up with C++, e.g., on AIX the compiler compiles the
13948 # header files by themselves before looking at the body files it is
13949 # told to compile. For ncurses, those header files do not include
13951 if test "$ac_cv_sys_large_files" != no
13954 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13955 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13958 if test "$ac_cv_sys_largefile_source" != no
13961 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13962 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13965 if test "$ac_cv_sys_file_offset_bits" != no
13968 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13969 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13973 echo "$as_me:13973: checking whether to use struct dirent64" >&5
13974 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13975 if test "${cf_cv_struct_dirent64+set}" = set; then
13976 echo $ECHO_N "(cached) $ECHO_C" >&6
13979 cat >conftest.$ac_ext <<_ACEOF
13980 #line 13980 "configure"
13981 #include "confdefs.h"
13983 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13984 #include <sys/types.h>
13985 #include <dirent.h>
13991 /* if transitional largefile support is setup, this is true */
13992 extern struct dirent64 * readdir(DIR *);
13993 struct dirent64 *x = readdir((DIR *)0);
13994 struct dirent *y = readdir((DIR *)0);
14002 rm -f conftest.$ac_objext
14003 if { (eval echo "$as_me:14003: \"$ac_compile\"") >&5
14004 (eval $ac_compile) 2>&5
14006 echo "$as_me:14006: \$? = $ac_status" >&5
14007 (exit $ac_status); } &&
14008 { ac_try='test -s conftest.$ac_objext'
14009 { (eval echo "$as_me:14009: \"$ac_try\"") >&5
14010 (eval $ac_try) 2>&5
14012 echo "$as_me:14012: \$? = $ac_status" >&5
14013 (exit $ac_status); }; }; then
14014 cf_cv_struct_dirent64=yes
14016 echo "$as_me: failed program was:" >&5
14017 cat conftest.$ac_ext >&5
14018 cf_cv_struct_dirent64=no
14020 rm -f conftest.$ac_objext conftest.$ac_ext
14023 echo "$as_me:14023: result: $cf_cv_struct_dirent64" >&5
14024 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14025 test "$cf_cv_struct_dirent64" = yes &&
14026 cat >>confdefs.h <<\EOF
14027 #define HAVE_STRUCT_DIRENT64 1
14032 ### Enable compiling-in rcs id's
14033 echo "$as_me:14033: checking if RCS identifiers should be compiled-in" >&5
14034 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14036 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14037 if test "${with_rcs_ids+set}" = set; then
14038 withval="$with_rcs_ids"
14039 with_rcs_ids=$withval
14043 echo "$as_me:14043: result: $with_rcs_ids" >&5
14044 echo "${ECHO_T}$with_rcs_ids" >&6
14045 test "$with_rcs_ids" = yes &&
14046 cat >>confdefs.h <<\EOF
14047 #define USE_RCS_IDS 1
14050 ###############################################################################
14052 ### Note that some functions (such as const) are normally disabled anyway.
14053 echo "$as_me:14053: checking if you want to build with function extensions" >&5
14054 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14056 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14057 if test "${enable_ext_funcs+set}" = set; then
14058 enableval="$enable_ext_funcs"
14059 with_ext_funcs=$enableval
14063 echo "$as_me:14063: result: $with_ext_funcs" >&5
14064 echo "${ECHO_T}$with_ext_funcs" >&6
14065 if test "$with_ext_funcs" = yes ; then
14066 NCURSES_EXT_FUNCS=1
14068 cat >>confdefs.h <<\EOF
14069 #define HAVE_USE_DEFAULT_COLORS 1
14072 cat >>confdefs.h <<\EOF
14073 #define NCURSES_EXT_FUNCS 1
14077 NCURSES_EXT_FUNCS=0
14080 ### use option --enable-const to turn on use of const beyond that in XSI.
14081 echo "$as_me:14081: checking for extended use of const keyword" >&5
14082 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14084 # Check whether --enable-const or --disable-const was given.
14085 if test "${enable_const+set}" = set; then
14086 enableval="$enable_const"
14087 with_ext_const=$enableval
14091 echo "$as_me:14091: result: $with_ext_const" >&5
14092 echo "${ECHO_T}$with_ext_const" >&6
14093 NCURSES_CONST='/*nothing*/'
14094 if test "$with_ext_const" = yes ; then
14095 NCURSES_CONST=const
14098 ###############################################################################
14099 # These options are relatively safe to experiment with.
14101 echo "$as_me:14101: checking if you want all development code" >&5
14102 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14104 # Check whether --with-develop or --without-develop was given.
14105 if test "${with_develop+set}" = set; then
14106 withval="$with_develop"
14107 with_develop=$withval
14111 echo "$as_me:14111: result: $with_develop" >&5
14112 echo "${ECHO_T}$with_develop" >&6
14114 ###############################################################################
14115 # These are just experimental, probably should not be in a package:
14117 # This is still experimental (20080329), but should ultimately be moved to
14118 # the script-block --with-normal, etc.
14120 echo "$as_me:14120: checking if you want to link with the pthread library" >&5
14121 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14123 # Check whether --with-pthread or --without-pthread was given.
14124 if test "${with_pthread+set}" = set; then
14125 withval="$with_pthread"
14126 with_pthread=$withval
14130 echo "$as_me:14130: result: $with_pthread" >&5
14131 echo "${ECHO_T}$with_pthread" >&6
14133 if test "$with_pthread" != no ; then
14134 echo "$as_me:14134: checking for pthread.h" >&5
14135 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14136 if test "${ac_cv_header_pthread_h+set}" = set; then
14137 echo $ECHO_N "(cached) $ECHO_C" >&6
14139 cat >conftest.$ac_ext <<_ACEOF
14140 #line 14140 "configure"
14141 #include "confdefs.h"
14142 #include <pthread.h>
14144 if { (eval echo "$as_me:14144: \"$ac_cpp conftest.$ac_ext\"") >&5
14145 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14147 egrep -v '^ *\+' conftest.er1 >conftest.err
14149 cat conftest.err >&5
14150 echo "$as_me:14150: \$? = $ac_status" >&5
14151 (exit $ac_status); } >/dev/null; then
14152 if test -s conftest.err; then
14153 ac_cpp_err=$ac_c_preproc_warn_flag
14160 if test -z "$ac_cpp_err"; then
14161 ac_cv_header_pthread_h=yes
14163 echo "$as_me: failed program was:" >&5
14164 cat conftest.$ac_ext >&5
14165 ac_cv_header_pthread_h=no
14167 rm -f conftest.err conftest.$ac_ext
14169 echo "$as_me:14169: result: $ac_cv_header_pthread_h" >&5
14170 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14171 if test $ac_cv_header_pthread_h = yes; then
14173 cat >>confdefs.h <<\EOF
14174 #define HAVE_PTHREADS_H 1
14177 for cf_lib_pthread in pthread c_r
14179 echo "$as_me:14179: checking if we can link with the $cf_lib_pthread library" >&5
14180 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14181 cf_save_LIBS="$LIBS"
14183 cf_add_libs="$LIBS"
14186 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14187 # filter duplicates
14188 for cf_add_1lib in $cf_add_0lib; do
14189 for cf_add_2lib in $cf_add_libs; do
14190 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14195 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14197 LIBS="$cf_add_libs"
14199 cat >conftest.$ac_ext <<_ACEOF
14200 #line 14200 "configure"
14201 #include "confdefs.h"
14203 #include <pthread.h>
14209 int rc = pthread_create(0,0,0,0);
14210 int r2 = pthread_mutexattr_settype(0, 0);
14216 rm -f conftest.$ac_objext conftest$ac_exeext
14217 if { (eval echo "$as_me:14217: \"$ac_link\"") >&5
14218 (eval $ac_link) 2>&5
14220 echo "$as_me:14220: \$? = $ac_status" >&5
14221 (exit $ac_status); } &&
14222 { ac_try='test -s conftest$ac_exeext'
14223 { (eval echo "$as_me:14223: \"$ac_try\"") >&5
14224 (eval $ac_try) 2>&5
14226 echo "$as_me:14226: \$? = $ac_status" >&5
14227 (exit $ac_status); }; }; then
14230 echo "$as_me: failed program was:" >&5
14231 cat conftest.$ac_ext >&5
14234 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14235 LIBS="$cf_save_LIBS"
14236 echo "$as_me:14236: result: $with_pthread" >&5
14237 echo "${ECHO_T}$with_pthread" >&6
14238 test "$with_pthread" = yes && break
14241 if test "$with_pthread" = yes ; then
14243 cf_add_libs="$LIBS"
14246 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14247 # filter duplicates
14248 for cf_add_1lib in $cf_add_0lib; do
14249 for cf_add_2lib in $cf_add_libs; do
14250 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14255 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14257 LIBS="$cf_add_libs"
14259 cat >>confdefs.h <<\EOF
14260 #define HAVE_LIBPTHREADS 1
14264 { { echo "$as_me:14264: error: Cannot link with pthread library" >&5
14265 echo "$as_me: error: Cannot link with pthread library" >&2;}
14266 { (exit 1); exit 1; }; }
14273 echo "$as_me:14273: checking if you want to use weak-symbols for pthreads" >&5
14274 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14276 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14277 if test "${enable_weak_symbols+set}" = set; then
14278 enableval="$enable_weak_symbols"
14279 use_weak_symbols=$withval
14281 use_weak_symbols=no
14283 echo "$as_me:14283: result: $use_weak_symbols" >&5
14284 echo "${ECHO_T}$use_weak_symbols" >&6
14285 if test "$use_weak_symbols" = yes ; then
14287 echo "$as_me:14287: checking if $CC supports weak symbols" >&5
14288 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14289 if test "${cf_cv_weak_symbols+set}" = set; then
14290 echo $ECHO_N "(cached) $ECHO_C" >&6
14293 cat >conftest.$ac_ext <<_ACEOF
14294 #line 14294 "configure"
14295 #include "confdefs.h"
14302 #if defined(__GNUC__)
14303 # if defined __USE_ISOC99
14304 # define _cat_pragma(exp) _Pragma(#exp)
14305 # define _weak_pragma(exp) _cat_pragma(weak name)
14307 # define _weak_pragma(exp)
14309 # define _declare(name) __extension__ extern __typeof__(name) name
14310 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
14313 weak_symbol(fopen);
14319 rm -f conftest.$ac_objext
14320 if { (eval echo "$as_me:14320: \"$ac_compile\"") >&5
14321 (eval $ac_compile) 2>&5
14323 echo "$as_me:14323: \$? = $ac_status" >&5
14324 (exit $ac_status); } &&
14325 { ac_try='test -s conftest.$ac_objext'
14326 { (eval echo "$as_me:14326: \"$ac_try\"") >&5
14327 (eval $ac_try) 2>&5
14329 echo "$as_me:14329: \$? = $ac_status" >&5
14330 (exit $ac_status); }; }; then
14331 cf_cv_weak_symbols=yes
14333 echo "$as_me: failed program was:" >&5
14334 cat conftest.$ac_ext >&5
14335 cf_cv_weak_symbols=no
14337 rm -f conftest.$ac_objext conftest.$ac_ext
14340 echo "$as_me:14340: result: $cf_cv_weak_symbols" >&5
14341 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14344 cf_cv_weak_symbols=no
14347 if test $cf_cv_weak_symbols = yes ; then
14349 cat >>confdefs.h <<\EOF
14350 #define USE_WEAK_SYMBOLS 1
14356 if test "$with_pthread" = "yes" ; then
14358 cat >>confdefs.h <<\EOF
14359 #define USE_PTHREADS 1
14362 enable_reentrant=yes
14363 if test $cf_cv_weak_symbols = yes ; then
14368 # OpenSUSE is installing ncurses6, using reentrant option.
14369 echo "$as_me:14369: checking for _nc_TABSIZE" >&5
14370 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
14371 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
14372 echo $ECHO_N "(cached) $ECHO_C" >&6
14374 cat >conftest.$ac_ext <<_ACEOF
14375 #line 14375 "configure"
14376 #include "confdefs.h"
14377 #define _nc_TABSIZE autoconf_temporary
14378 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14385 /* We use char because int might match the return type of a gcc2
14386 builtin and then its argument prototype would still apply. */
14387 char _nc_TABSIZE (void);
14393 /* The GNU C library defines stubs for functions which it implements
14394 to always fail with ENOSYS. Some functions are actually named
14395 something starting with __ and the normal name is an alias. */
14396 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
14397 #error found stub for _nc_TABSIZE
14400 return _nc_TABSIZE ();
14405 rm -f conftest.$ac_objext conftest$ac_exeext
14406 if { (eval echo "$as_me:14406: \"$ac_link\"") >&5
14407 (eval $ac_link) 2>&5
14409 echo "$as_me:14409: \$? = $ac_status" >&5
14410 (exit $ac_status); } &&
14411 { ac_try='test -s conftest$ac_exeext'
14412 { (eval echo "$as_me:14412: \"$ac_try\"") >&5
14413 (eval $ac_try) 2>&5
14415 echo "$as_me:14415: \$? = $ac_status" >&5
14416 (exit $ac_status); }; }; then
14417 ac_cv_func__nc_TABSIZE=yes
14419 echo "$as_me: failed program was:" >&5
14420 cat conftest.$ac_ext >&5
14421 ac_cv_func__nc_TABSIZE=no
14423 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14425 echo "$as_me:14425: result: $ac_cv_func__nc_TABSIZE" >&5
14426 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
14427 if test $ac_cv_func__nc_TABSIZE = yes; then
14428 assume_reentrant=yes
14430 assume_reentrant=no
14433 # Reentrant code has to be opaque; there's little advantage to making ncurses
14434 # opaque outside of that, so there is no --enable-opaque option. We can use
14435 # this option without --with-pthreads, but this will be always set for
14437 echo "$as_me:14437: checking if you want experimental reentrant code" >&5
14438 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
14440 # Check whether --enable-reentrant or --disable-reentrant was given.
14441 if test "${enable_reentrant+set}" = set; then
14442 enableval="$enable_reentrant"
14443 with_reentrant=$enableval
14445 with_reentrant=$assume_reentrant
14447 echo "$as_me:14447: result: $with_reentrant" >&5
14448 echo "${ECHO_T}$with_reentrant" >&6
14449 if test "$with_reentrant" = yes ; then
14450 cf_cv_enable_reentrant=1
14451 if test $cf_cv_weak_symbols = yes ; then
14453 # remove pthread library from $LIBS
14454 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
14456 elif test "$assume_reentrant" = no ; then
14457 LIB_SUFFIX="t${LIB_SUFFIX}"
14460 cat >>confdefs.h <<\EOF
14461 #define USE_REENTRANT 1
14465 cf_cv_enable_reentrant=0
14468 ### Allow using a different wrap-prefix
14469 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
14470 echo "$as_me:14470: checking for prefix used to wrap public variables" >&5
14471 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
14473 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
14474 if test "${with_wrap_prefix+set}" = set; then
14475 withval="$with_wrap_prefix"
14476 NCURSES_WRAP_PREFIX=$withval
14478 NCURSES_WRAP_PREFIX=_nc_
14480 echo "$as_me:14480: result: $NCURSES_WRAP_PREFIX" >&5
14481 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
14483 NCURSES_WRAP_PREFIX=_nc_
14486 cat >>confdefs.h <<EOF
14487 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
14490 ###############################################################################
14492 ### use option --disable-echo to suppress full display compiling commands
14494 echo "$as_me:14494: checking if you want to see long compiling messages" >&5
14495 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
14497 # Check whether --enable-echo or --disable-echo was given.
14498 if test "${enable_echo+set}" = set; then
14499 enableval="$enable_echo"
14500 test "$enableval" != no && enableval=yes
14501 if test "$enableval" != "yes" ; then
14504 ECHO_LD='@echo linking $@;'
14505 RULE_CC='@echo compiling $<'
14506 SHOW_CC='@echo compiling $@'
14528 echo "$as_me:14528: result: $enableval" >&5
14529 echo "${ECHO_T}$enableval" >&6
14531 ### use option --enable-warnings to turn on all gcc warnings
14532 echo "$as_me:14532: checking if you want to see compiler warnings" >&5
14533 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
14535 # Check whether --enable-warnings or --disable-warnings was given.
14536 if test "${enable_warnings+set}" = set; then
14537 enableval="$enable_warnings"
14538 with_warnings=$enableval
14540 echo "$as_me:14540: result: $with_warnings" >&5
14541 echo "${ECHO_T}$with_warnings" >&6
14543 if ( test "$GCC" = yes || test "$GXX" = yes )
14546 if ( test "$GCC" = yes || test "$GXX" = yes )
14550 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
14552 echo "${as_me:-configure}:14552: testing repairing CFLAGS: $CFLAGS ..." 1>&5
14555 for cf_temp_scan in $CFLAGS
14557 case "x$cf_temp_scan" in
14560 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
14561 EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
14566 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
14567 cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
14572 CFLAGS="$cf_temp_flags"
14573 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
14575 echo "${as_me:-configure}:14575: testing ... fixed $CFLAGS ..." 1>&5
14577 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
14579 echo "${as_me:-configure}:14579: testing ... extra $EXTRA_CFLAGS ..." 1>&5
14585 if ( test "$GCC" = yes || test "$GXX" = yes )
14589 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
14591 echo "${as_me:-configure}:14591: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
14594 for cf_temp_scan in $CPPFLAGS
14596 case "x$cf_temp_scan" in
14599 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
14600 EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
14605 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
14606 cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
14611 CPPFLAGS="$cf_temp_flags"
14612 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
14614 echo "${as_me:-configure}:14614: testing ... fixed $CPPFLAGS ..." 1>&5
14616 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
14618 echo "${as_me:-configure}:14618: testing ... extra $EXTRA_CFLAGS ..." 1>&5
14624 if ( test "$GCC" = yes || test "$GXX" = yes )
14628 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
14630 echo "${as_me:-configure}:14630: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
14633 for cf_temp_scan in $LDFLAGS
14635 case "x$cf_temp_scan" in
14638 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
14639 EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
14644 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
14645 cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
14650 LDFLAGS="$cf_temp_flags"
14651 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
14653 echo "${as_me:-configure}:14653: testing ... fixed $LDFLAGS ..." 1>&5
14655 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
14657 echo "${as_me:-configure}:14657: testing ... extra $EXTRA_CFLAGS ..." 1>&5
14663 echo "$as_me:14663: checking if you want to turn on gcc warnings" >&5
14664 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
14666 # Check whether --enable-warnings or --disable-warnings was given.
14667 if test "${enable_warnings+set}" = set; then
14668 enableval="$enable_warnings"
14669 test "$enableval" != yes && enableval=no
14670 if test "$enableval" != "no" ; then
14680 echo "$as_me:14680: result: $with_warnings" >&5
14681 echo "${ECHO_T}$with_warnings" >&6
14682 if test "$with_warnings" = "yes"
14685 if test "$GCC" = yes
14687 cat > conftest.i <<EOF
14689 #define GCC_PRINTF 0
14692 #define GCC_SCANF 0
14694 #ifndef GCC_NORETURN
14695 #define GCC_NORETURN /* nothing */
14698 #define GCC_UNUSED /* nothing */
14701 if test "$GCC" = yes
14703 { echo "$as_me:14703: checking for $CC __attribute__ directives..." >&5
14704 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
14705 cat > conftest.$ac_ext <<EOF
14706 #line 14706 "${as_me:-configure}"
14707 #include "confdefs.h"
14708 #include "conftest.h"
14709 #include "conftest.i"
14711 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
14713 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
14716 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
14718 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
14720 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
14721 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
14722 extern void foo(void) GCC_NORETURN;
14723 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
14725 cf_printf_attribute=no
14726 cf_scanf_attribute=no
14727 for cf_attribute in scanf printf unused noreturn
14730 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14732 cf_directive="__attribute__(($cf_attribute))"
14733 echo "checking for $CC $cf_directive" 1>&5
14735 case $cf_attribute in
14737 cf_printf_attribute=yes
14738 cat >conftest.h <<EOF
14739 #define GCC_$cf_ATTRIBUTE 1
14743 cf_scanf_attribute=yes
14744 cat >conftest.h <<EOF
14745 #define GCC_$cf_ATTRIBUTE 1
14749 cat >conftest.h <<EOF
14750 #define GCC_$cf_ATTRIBUTE $cf_directive
14755 if { (eval echo "$as_me:14755: \"$ac_compile\"") >&5
14756 (eval $ac_compile) 2>&5
14758 echo "$as_me:14758: \$? = $ac_status" >&5
14759 (exit $ac_status); }; then
14760 test -n "$verbose" && echo "$as_me:14760: result: ... $cf_attribute" >&5
14761 echo "${ECHO_T}... $cf_attribute" >&6
14762 cat conftest.h >>confdefs.h
14763 case $cf_attribute in
14766 cat >>confdefs.h <<EOF
14767 #define GCC_NORETURN $cf_directive
14772 cf_value='/* nothing */'
14773 if test "$cf_printf_attribute" != no ; then
14774 cf_value='__attribute__((format(printf,fmt,var)))'
14776 cat >>confdefs.h <<\EOF
14777 #define GCC_PRINTF 1
14782 cat >>confdefs.h <<EOF
14783 #define GCC_PRINTFLIKE(fmt,var) $cf_value
14788 cf_value='/* nothing */'
14789 if test "$cf_scanf_attribute" != no ; then
14790 cf_value='__attribute__((format(scanf,fmt,var)))'
14792 cat >>confdefs.h <<\EOF
14793 #define GCC_SCANF 1
14798 cat >>confdefs.h <<EOF
14799 #define GCC_SCANFLIKE(fmt,var) $cf_value
14805 cat >>confdefs.h <<EOF
14806 #define GCC_UNUSED $cf_directive
14814 fgrep define conftest.i >>confdefs.h
14819 if test "x$have_x" = xyes; then
14821 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
14822 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
14823 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
14824 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
14825 for cf_X_CFLAGS in $X_CFLAGS
14827 case "x$cf_X_CFLAGS" in
14829 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
14832 CFLAGS="$CFLAGS $cf_X_CFLAGS"
14837 cat >conftest.$ac_ext <<_ACEOF
14838 #line 14838 "configure"
14839 #include "confdefs.h"
14841 #include <stdlib.h>
14842 #include <X11/Intrinsic.h>
14847 String foo = malloc(1); (void)foo
14852 rm -f conftest.$ac_objext
14853 if { (eval echo "$as_me:14853: \"$ac_compile\"") >&5
14854 (eval $ac_compile) 2>&5
14856 echo "$as_me:14856: \$? = $ac_status" >&5
14857 (exit $ac_status); } &&
14858 { ac_try='test -s conftest.$ac_objext'
14859 { (eval echo "$as_me:14859: \"$ac_try\"") >&5
14860 (eval $ac_try) 2>&5
14862 echo "$as_me:14862: \$? = $ac_status" >&5
14863 (exit $ac_status); }; }; then
14865 echo "$as_me:14865: checking for X11/Xt const-feature" >&5
14866 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
14867 if test "${cf_cv_const_x_string+set}" = set; then
14868 echo $ECHO_N "(cached) $ECHO_C" >&6
14871 cat >conftest.$ac_ext <<_ACEOF
14872 #line 14872 "configure"
14873 #include "confdefs.h"
14875 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
14876 #undef XTSTRINGDEFINES /* X11R5 and later */
14877 #include <stdlib.h>
14878 #include <X11/Intrinsic.h>
14883 String foo = malloc(1); *foo = 0
14888 rm -f conftest.$ac_objext
14889 if { (eval echo "$as_me:14889: \"$ac_compile\"") >&5
14890 (eval $ac_compile) 2>&5
14892 echo "$as_me:14892: \$? = $ac_status" >&5
14893 (exit $ac_status); } &&
14894 { ac_try='test -s conftest.$ac_objext'
14895 { (eval echo "$as_me:14895: \"$ac_try\"") >&5
14896 (eval $ac_try) 2>&5
14898 echo "$as_me:14898: \$? = $ac_status" >&5
14899 (exit $ac_status); }; }; then
14901 cf_cv_const_x_string=no
14904 echo "$as_me: failed program was:" >&5
14905 cat conftest.$ac_ext >&5
14907 cf_cv_const_x_string=yes
14910 rm -f conftest.$ac_objext conftest.$ac_ext
14913 echo "$as_me:14913: result: $cf_cv_const_x_string" >&5
14914 echo "${ECHO_T}$cf_cv_const_x_string" >&6
14916 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
14917 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
14918 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
14920 case $cf_cv_const_x_string in
14923 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14924 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
14929 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14930 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
14936 echo "$as_me: failed program was:" >&5
14937 cat conftest.$ac_ext >&5
14939 rm -f conftest.$ac_objext conftest.$ac_ext
14941 cat > conftest.$ac_ext <<EOF
14942 #line 14942 "${as_me:-configure}"
14943 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
14945 if test "$INTEL_COMPILER" = yes
14947 # The "-wdXXX" options suppress warnings:
14948 # remark #1419: external declaration in primary source file
14949 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
14950 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
14951 # remark #193: zero used for undefined preprocessing identifier
14952 # remark #593: variable "curs_sb_left_arrow" was set but never used
14953 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
14954 # remark #869: parameter "tw" was never referenced
14955 # remark #981: operands are evaluated in unspecified order
14956 # warning #279: controlling expression is constant
14958 { echo "$as_me:14958: checking for $CC warning options..." >&5
14959 echo "$as_me: checking for $CC warning options..." >&6;}
14960 cf_save_CFLAGS="$CFLAGS"
14961 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
14973 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
14974 if { (eval echo "$as_me:14974: \"$ac_compile\"") >&5
14975 (eval $ac_compile) 2>&5
14977 echo "$as_me:14977: \$? = $ac_status" >&5
14978 (exit $ac_status); }; then
14979 test -n "$verbose" && echo "$as_me:14979: result: ... -$cf_opt" >&5
14980 echo "${ECHO_T}... -$cf_opt" >&6
14981 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
14984 CFLAGS="$cf_save_CFLAGS"
14985 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
14987 { echo "$as_me:14987: checking for $CC warning options..." >&5
14988 echo "$as_me: checking for $CC warning options..." >&6;}
14989 cf_save_CFLAGS="$CFLAGS"
14991 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
14992 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
14993 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
14994 for cf_opt in W Wall \
14995 Wbad-function-cast \
14998 Wdeclaration-after-statement \
15001 Wmissing-declarations \
15002 Wmissing-prototypes \
15006 Wstrict-prototypes \
15007 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15009 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15010 if { (eval echo "$as_me:15010: \"$ac_compile\"") >&5
15011 (eval $ac_compile) 2>&5
15013 echo "$as_me:15013: \$? = $ac_status" >&5
15014 (exit $ac_status); }; then
15015 test -n "$verbose" && echo "$as_me:15015: result: ... -$cf_opt" >&5
15016 echo "${ECHO_T}... -$cf_opt" >&6
15019 case $GCC_VERSION in
15021 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15023 echo "${as_me:-configure}:15023: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15029 case $GCC_VERSION in
15031 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15033 echo "${as_me:-configure}:15033: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15039 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15042 CFLAGS="$cf_save_CFLAGS"
15049 if test "x$with_warnings" = "xyes"; then
15051 ADAFLAGS="$ADAFLAGS -gnatg"
15055 ### use option --enable-assertions to turn on generation of assertion code
15056 echo "$as_me:15056: checking if you want to enable runtime assertions" >&5
15057 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15059 # Check whether --enable-assertions or --disable-assertions was given.
15060 if test "${enable_assertions+set}" = set; then
15061 enableval="$enable_assertions"
15062 with_assertions=$enableval
15066 echo "$as_me:15066: result: $with_assertions" >&5
15067 echo "${ECHO_T}$with_assertions" >&6
15070 if test "$with_assertions" = no
15072 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15075 ADAFLAGS="$ADAFLAGS -gnata"
15080 ### use option --disable-leaks to suppress "permanent" leaks, for testing
15082 cat >>confdefs.h <<\EOF
15083 #define HAVE_NC_ALLOC_H 1
15086 ### use option --enable-expanded to generate certain macros as functions
15088 # Check whether --enable-expanded or --disable-expanded was given.
15089 if test "${enable_expanded+set}" = set; then
15090 enableval="$enable_expanded"
15091 test "$enableval" = yes &&
15092 cat >>confdefs.h <<\EOF
15093 #define NCURSES_EXPANDED 1
15098 ### use option --disable-macros to suppress macros in favor of functions
15100 # Check whether --enable-macros or --disable-macros was given.
15101 if test "${enable_macros+set}" = set; then
15102 enableval="$enable_macros"
15103 test "$enableval" = no &&
15104 cat >>confdefs.h <<\EOF
15105 #define NCURSES_NOMACROS 1
15110 # Normally we only add trace() to the debug-library. Allow this to be
15111 # extended to all models of the ncurses library:
15113 case "$CFLAGS $CPPFLAGS" in
15119 echo "$as_me:15119: checking whether to add trace feature to all models" >&5
15120 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
15122 # Check whether --with-trace or --without-trace was given.
15123 if test "${with_trace+set}" = set; then
15124 withval="$with_trace"
15125 cf_with_trace=$withval
15127 cf_with_trace=$cf_all_traces
15129 echo "$as_me:15129: result: $cf_with_trace" >&5
15130 echo "${ECHO_T}$cf_with_trace" >&6
15132 if test "$cf_with_trace" = yes ; then
15138 cf_new_extra_cppflags=
15140 for cf_add_cflags in -DTRACE
15142 case $cf_fix_cppflags in
15144 case $cf_add_cflags in
15145 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15146 case $cf_add_cflags in
15148 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15150 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15151 && test -z "${cf_tst_cflags}" \
15152 && cf_fix_cppflags=yes
15154 if test $cf_fix_cppflags = yes ; then
15156 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15157 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15160 elif test "${cf_tst_cflags}" = "\"'" ; then
15162 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15163 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15169 case "$CPPFLAGS" in
15173 case $cf_add_cflags in
15175 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15177 CPPFLAGS=`echo "$CPPFLAGS" | \
15178 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15179 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15184 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15185 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15192 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15193 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15200 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15201 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15203 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15205 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15206 && test -z "${cf_tst_cflags}" \
15207 && cf_fix_cppflags=no
15212 if test -n "$cf_new_cflags" ; then
15214 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15215 CFLAGS="${CFLAGS}$cf_new_cflags"
15219 if test -n "$cf_new_cppflags" ; then
15221 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15222 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15226 if test -n "$cf_new_extra_cppflags" ; then
15228 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15229 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15237 echo "$as_me:15237: checking if we want to use GNAT projects" >&5
15238 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
15240 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
15241 if test "${enable_gnat_projects+set}" = set; then
15242 enableval="$enable_gnat_projects"
15243 test "$enableval" != no && enableval=yes
15244 if test "$enableval" != "yes" ; then
15245 enable_gnat_projects=no
15247 enable_gnat_projects=yes
15251 enable_gnat_projects=yes
15254 echo "$as_me:15254: result: $enable_gnat_projects" >&5
15255 echo "${ECHO_T}$enable_gnat_projects" >&6
15257 ### Checks for libraries.
15258 case $cf_cv_system_name in
15262 echo "$as_me:15262: checking for gettimeofday" >&5
15263 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
15264 if test "${ac_cv_func_gettimeofday+set}" = set; then
15265 echo $ECHO_N "(cached) $ECHO_C" >&6
15267 cat >conftest.$ac_ext <<_ACEOF
15268 #line 15268 "configure"
15269 #include "confdefs.h"
15270 #define gettimeofday autoconf_temporary
15271 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15272 #undef gettimeofday
15278 /* We use char because int might match the return type of a gcc2
15279 builtin and then its argument prototype would still apply. */
15280 char gettimeofday (void);
15286 /* The GNU C library defines stubs for functions which it implements
15287 to always fail with ENOSYS. Some functions are actually named
15288 something starting with __ and the normal name is an alias. */
15289 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
15290 #error found stub for gettimeofday
15293 return gettimeofday ();
15298 rm -f conftest.$ac_objext conftest$ac_exeext
15299 if { (eval echo "$as_me:15299: \"$ac_link\"") >&5
15300 (eval $ac_link) 2>&5
15302 echo "$as_me:15302: \$? = $ac_status" >&5
15303 (exit $ac_status); } &&
15304 { ac_try='test -s conftest$ac_exeext'
15305 { (eval echo "$as_me:15305: \"$ac_try\"") >&5
15306 (eval $ac_try) 2>&5
15308 echo "$as_me:15308: \$? = $ac_status" >&5
15309 (exit $ac_status); }; }; then
15310 ac_cv_func_gettimeofday=yes
15312 echo "$as_me: failed program was:" >&5
15313 cat conftest.$ac_ext >&5
15314 ac_cv_func_gettimeofday=no
15316 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15318 echo "$as_me:15318: result: $ac_cv_func_gettimeofday" >&5
15319 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
15320 if test $ac_cv_func_gettimeofday = yes; then
15321 cat >>confdefs.h <<\EOF
15322 #define HAVE_GETTIMEOFDAY 1
15327 echo "$as_me:15327: checking for gettimeofday in -lbsd" >&5
15328 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
15329 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
15330 echo $ECHO_N "(cached) $ECHO_C" >&6
15332 ac_check_lib_save_LIBS=$LIBS
15334 cat >conftest.$ac_ext <<_ACEOF
15335 #line 15335 "configure"
15336 #include "confdefs.h"
15338 /* Override any gcc2 internal prototype to avoid an error. */
15342 /* We use char because int might match the return type of a gcc2
15343 builtin and then its argument prototype would still apply. */
15344 char gettimeofday ();
15353 rm -f conftest.$ac_objext conftest$ac_exeext
15354 if { (eval echo "$as_me:15354: \"$ac_link\"") >&5
15355 (eval $ac_link) 2>&5
15357 echo "$as_me:15357: \$? = $ac_status" >&5
15358 (exit $ac_status); } &&
15359 { ac_try='test -s conftest$ac_exeext'
15360 { (eval echo "$as_me:15360: \"$ac_try\"") >&5
15361 (eval $ac_try) 2>&5
15363 echo "$as_me:15363: \$? = $ac_status" >&5
15364 (exit $ac_status); }; }; then
15365 ac_cv_lib_bsd_gettimeofday=yes
15367 echo "$as_me: failed program was:" >&5
15368 cat conftest.$ac_ext >&5
15369 ac_cv_lib_bsd_gettimeofday=no
15371 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15372 LIBS=$ac_check_lib_save_LIBS
15374 echo "$as_me:15374: result: $ac_cv_lib_bsd_gettimeofday" >&5
15375 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
15376 if test $ac_cv_lib_bsd_gettimeofday = yes; then
15378 cat >>confdefs.h <<\EOF
15379 #define HAVE_GETTIMEOFDAY 1
15389 ### Checks for header files.
15390 echo "$as_me:15390: checking for ANSI C header files" >&5
15391 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15392 if test "${ac_cv_header_stdc+set}" = set; then
15393 echo $ECHO_N "(cached) $ECHO_C" >&6
15395 cat >conftest.$ac_ext <<_ACEOF
15396 #line 15396 "configure"
15397 #include "confdefs.h"
15398 #include <stdlib.h>
15399 #include <stdarg.h>
15400 #include <string.h>
15404 if { (eval echo "$as_me:15404: \"$ac_cpp conftest.$ac_ext\"") >&5
15405 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15407 egrep -v '^ *\+' conftest.er1 >conftest.err
15409 cat conftest.err >&5
15410 echo "$as_me:15410: \$? = $ac_status" >&5
15411 (exit $ac_status); } >/dev/null; then
15412 if test -s conftest.err; then
15413 ac_cpp_err=$ac_c_preproc_warn_flag
15420 if test -z "$ac_cpp_err"; then
15421 ac_cv_header_stdc=yes
15423 echo "$as_me: failed program was:" >&5
15424 cat conftest.$ac_ext >&5
15425 ac_cv_header_stdc=no
15427 rm -f conftest.err conftest.$ac_ext
15429 if test $ac_cv_header_stdc = yes; then
15430 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15431 cat >conftest.$ac_ext <<_ACEOF
15432 #line 15432 "configure"
15433 #include "confdefs.h"
15434 #include <string.h>
15437 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15438 egrep "memchr" >/dev/null 2>&1; then
15441 ac_cv_header_stdc=no
15447 if test $ac_cv_header_stdc = yes; then
15448 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15449 cat >conftest.$ac_ext <<_ACEOF
15450 #line 15450 "configure"
15451 #include "confdefs.h"
15452 #include <stdlib.h>
15455 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15456 egrep "free" >/dev/null 2>&1; then
15459 ac_cv_header_stdc=no
15465 if test $ac_cv_header_stdc = yes; then
15466 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15467 if test "$cross_compiling" = yes; then
15470 cat >conftest.$ac_ext <<_ACEOF
15471 #line 15471 "configure"
15472 #include "confdefs.h"
15474 #if ((' ' & 0x0FF) == 0x020)
15475 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15476 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15478 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15479 || ('j' <= (c) && (c) <= 'r') \
15480 || ('s' <= (c) && (c) <= 'z'))
15481 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15484 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15489 for (i = 0; i < 256; i++)
15490 if (XOR (islower (i), ISLOWER (i))
15491 || toupper (i) != TOUPPER (i))
15492 $ac_main_return(2);
15493 $ac_main_return (0);
15496 rm -f conftest$ac_exeext
15497 if { (eval echo "$as_me:15497: \"$ac_link\"") >&5
15498 (eval $ac_link) 2>&5
15500 echo "$as_me:15500: \$? = $ac_status" >&5
15501 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15502 { (eval echo "$as_me:15502: \"$ac_try\"") >&5
15503 (eval $ac_try) 2>&5
15505 echo "$as_me:15505: \$? = $ac_status" >&5
15506 (exit $ac_status); }; }; then
15509 echo "$as_me: program exited with status $ac_status" >&5
15510 echo "$as_me: failed program was:" >&5
15511 cat conftest.$ac_ext >&5
15512 ac_cv_header_stdc=no
15514 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15518 echo "$as_me:15518: result: $ac_cv_header_stdc" >&5
15519 echo "${ECHO_T}$ac_cv_header_stdc" >&6
15520 if test $ac_cv_header_stdc = yes; then
15522 cat >>confdefs.h <<\EOF
15523 #define STDC_HEADERS 1
15528 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
15530 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
15531 inttypes.h stdint.h unistd.h
15533 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15534 echo "$as_me:15534: checking for $ac_header" >&5
15535 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15536 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15537 echo $ECHO_N "(cached) $ECHO_C" >&6
15539 cat >conftest.$ac_ext <<_ACEOF
15540 #line 15540 "configure"
15541 #include "confdefs.h"
15542 $ac_includes_default
15543 #include <$ac_header>
15545 rm -f conftest.$ac_objext
15546 if { (eval echo "$as_me:15546: \"$ac_compile\"") >&5
15547 (eval $ac_compile) 2>&5
15549 echo "$as_me:15549: \$? = $ac_status" >&5
15550 (exit $ac_status); } &&
15551 { ac_try='test -s conftest.$ac_objext'
15552 { (eval echo "$as_me:15552: \"$ac_try\"") >&5
15553 (eval $ac_try) 2>&5
15555 echo "$as_me:15555: \$? = $ac_status" >&5
15556 (exit $ac_status); }; }; then
15557 eval "$as_ac_Header=yes"
15559 echo "$as_me: failed program was:" >&5
15560 cat conftest.$ac_ext >&5
15561 eval "$as_ac_Header=no"
15563 rm -f conftest.$ac_objext conftest.$ac_ext
15565 echo "$as_me:15565: result: `eval echo '${'$as_ac_Header'}'`" >&5
15566 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15567 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15568 cat >>confdefs.h <<EOF
15569 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15575 echo "$as_me:15575: checking for signed char" >&5
15576 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
15577 if test "${ac_cv_type_signed_char+set}" = set; then
15578 echo $ECHO_N "(cached) $ECHO_C" >&6
15580 cat >conftest.$ac_ext <<_ACEOF
15581 #line 15581 "configure"
15582 #include "confdefs.h"
15583 $ac_includes_default
15587 if ((signed char *) 0)
15589 if (sizeof (signed char))
15595 rm -f conftest.$ac_objext
15596 if { (eval echo "$as_me:15596: \"$ac_compile\"") >&5
15597 (eval $ac_compile) 2>&5
15599 echo "$as_me:15599: \$? = $ac_status" >&5
15600 (exit $ac_status); } &&
15601 { ac_try='test -s conftest.$ac_objext'
15602 { (eval echo "$as_me:15602: \"$ac_try\"") >&5
15603 (eval $ac_try) 2>&5
15605 echo "$as_me:15605: \$? = $ac_status" >&5
15606 (exit $ac_status); }; }; then
15607 ac_cv_type_signed_char=yes
15609 echo "$as_me: failed program was:" >&5
15610 cat conftest.$ac_ext >&5
15611 ac_cv_type_signed_char=no
15613 rm -f conftest.$ac_objext conftest.$ac_ext
15615 echo "$as_me:15615: result: $ac_cv_type_signed_char" >&5
15616 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
15618 echo "$as_me:15618: checking size of signed char" >&5
15619 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
15620 if test "${ac_cv_sizeof_signed_char+set}" = set; then
15621 echo $ECHO_N "(cached) $ECHO_C" >&6
15623 if test "$ac_cv_type_signed_char" = yes; then
15624 if test "$cross_compiling" = yes; then
15625 # Depending upon the size, compute the lo and hi bounds.
15626 cat >conftest.$ac_ext <<_ACEOF
15627 #line 15627 "configure"
15628 #include "confdefs.h"
15629 $ac_includes_default
15633 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
15638 rm -f conftest.$ac_objext
15639 if { (eval echo "$as_me:15639: \"$ac_compile\"") >&5
15640 (eval $ac_compile) 2>&5
15642 echo "$as_me:15642: \$? = $ac_status" >&5
15643 (exit $ac_status); } &&
15644 { ac_try='test -s conftest.$ac_objext'
15645 { (eval echo "$as_me:15645: \"$ac_try\"") >&5
15646 (eval $ac_try) 2>&5
15648 echo "$as_me:15648: \$? = $ac_status" >&5
15649 (exit $ac_status); }; }; then
15652 cat >conftest.$ac_ext <<_ACEOF
15653 #line 15653 "configure"
15654 #include "confdefs.h"
15655 $ac_includes_default
15659 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
15664 rm -f conftest.$ac_objext
15665 if { (eval echo "$as_me:15665: \"$ac_compile\"") >&5
15666 (eval $ac_compile) 2>&5
15668 echo "$as_me:15668: \$? = $ac_status" >&5
15669 (exit $ac_status); } &&
15670 { ac_try='test -s conftest.$ac_objext'
15671 { (eval echo "$as_me:15671: \"$ac_try\"") >&5
15672 (eval $ac_try) 2>&5
15674 echo "$as_me:15674: \$? = $ac_status" >&5
15675 (exit $ac_status); }; }; then
15676 ac_hi=$ac_mid; break
15678 echo "$as_me: failed program was:" >&5
15679 cat conftest.$ac_ext >&5
15680 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
15682 rm -f conftest.$ac_objext conftest.$ac_ext
15685 echo "$as_me: failed program was:" >&5
15686 cat conftest.$ac_ext >&5
15689 cat >conftest.$ac_ext <<_ACEOF
15690 #line 15690 "configure"
15691 #include "confdefs.h"
15692 $ac_includes_default
15696 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
15701 rm -f conftest.$ac_objext
15702 if { (eval echo "$as_me:15702: \"$ac_compile\"") >&5
15703 (eval $ac_compile) 2>&5
15705 echo "$as_me:15705: \$? = $ac_status" >&5
15706 (exit $ac_status); } &&
15707 { ac_try='test -s conftest.$ac_objext'
15708 { (eval echo "$as_me:15708: \"$ac_try\"") >&5
15709 (eval $ac_try) 2>&5
15711 echo "$as_me:15711: \$? = $ac_status" >&5
15712 (exit $ac_status); }; }; then
15713 ac_lo=$ac_mid; break
15715 echo "$as_me: failed program was:" >&5
15716 cat conftest.$ac_ext >&5
15717 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
15719 rm -f conftest.$ac_objext conftest.$ac_ext
15722 rm -f conftest.$ac_objext conftest.$ac_ext
15723 # Binary search between lo and hi bounds.
15724 while test "x$ac_lo" != "x$ac_hi"; do
15725 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15726 cat >conftest.$ac_ext <<_ACEOF
15727 #line 15727 "configure"
15728 #include "confdefs.h"
15729 $ac_includes_default
15733 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
15738 rm -f conftest.$ac_objext
15739 if { (eval echo "$as_me:15739: \"$ac_compile\"") >&5
15740 (eval $ac_compile) 2>&5
15742 echo "$as_me:15742: \$? = $ac_status" >&5
15743 (exit $ac_status); } &&
15744 { ac_try='test -s conftest.$ac_objext'
15745 { (eval echo "$as_me:15745: \"$ac_try\"") >&5
15746 (eval $ac_try) 2>&5
15748 echo "$as_me:15748: \$? = $ac_status" >&5
15749 (exit $ac_status); }; }; then
15752 echo "$as_me: failed program was:" >&5
15753 cat conftest.$ac_ext >&5
15754 ac_lo=`expr $ac_mid + 1`
15756 rm -f conftest.$ac_objext conftest.$ac_ext
15758 ac_cv_sizeof_signed_char=$ac_lo
15760 if test "$cross_compiling" = yes; then
15761 { { echo "$as_me:15761: error: cannot run test program while cross compiling" >&5
15762 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15763 { (exit 1); exit 1; }; }
15765 cat >conftest.$ac_ext <<_ACEOF
15766 #line 15766 "configure"
15767 #include "confdefs.h"
15768 $ac_includes_default
15772 FILE *f = fopen ("conftest.val", "w");
15774 $ac_main_return (1);
15775 fprintf (f, "%d", (sizeof (signed char)));
15781 rm -f conftest$ac_exeext
15782 if { (eval echo "$as_me:15782: \"$ac_link\"") >&5
15783 (eval $ac_link) 2>&5
15785 echo "$as_me:15785: \$? = $ac_status" >&5
15786 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15787 { (eval echo "$as_me:15787: \"$ac_try\"") >&5
15788 (eval $ac_try) 2>&5
15790 echo "$as_me:15790: \$? = $ac_status" >&5
15791 (exit $ac_status); }; }; then
15792 ac_cv_sizeof_signed_char=`cat conftest.val`
15794 echo "$as_me: program exited with status $ac_status" >&5
15795 echo "$as_me: failed program was:" >&5
15796 cat conftest.$ac_ext >&5
15798 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15803 ac_cv_sizeof_signed_char=0
15806 echo "$as_me:15806: result: $ac_cv_sizeof_signed_char" >&5
15807 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
15808 cat >>confdefs.h <<EOF
15809 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
15812 echo "$as_me:15812: checking for ANSI C header files" >&5
15813 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15814 if test "${ac_cv_header_stdc+set}" = set; then
15815 echo $ECHO_N "(cached) $ECHO_C" >&6
15817 cat >conftest.$ac_ext <<_ACEOF
15818 #line 15818 "configure"
15819 #include "confdefs.h"
15820 #include <stdlib.h>
15821 #include <stdarg.h>
15822 #include <string.h>
15826 if { (eval echo "$as_me:15826: \"$ac_cpp conftest.$ac_ext\"") >&5
15827 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15829 egrep -v '^ *\+' conftest.er1 >conftest.err
15831 cat conftest.err >&5
15832 echo "$as_me:15832: \$? = $ac_status" >&5
15833 (exit $ac_status); } >/dev/null; then
15834 if test -s conftest.err; then
15835 ac_cpp_err=$ac_c_preproc_warn_flag
15842 if test -z "$ac_cpp_err"; then
15843 ac_cv_header_stdc=yes
15845 echo "$as_me: failed program was:" >&5
15846 cat conftest.$ac_ext >&5
15847 ac_cv_header_stdc=no
15849 rm -f conftest.err conftest.$ac_ext
15851 if test $ac_cv_header_stdc = yes; then
15852 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15853 cat >conftest.$ac_ext <<_ACEOF
15854 #line 15854 "configure"
15855 #include "confdefs.h"
15856 #include <string.h>
15859 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15860 egrep "memchr" >/dev/null 2>&1; then
15863 ac_cv_header_stdc=no
15869 if test $ac_cv_header_stdc = yes; then
15870 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15871 cat >conftest.$ac_ext <<_ACEOF
15872 #line 15872 "configure"
15873 #include "confdefs.h"
15874 #include <stdlib.h>
15877 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15878 egrep "free" >/dev/null 2>&1; then
15881 ac_cv_header_stdc=no
15887 if test $ac_cv_header_stdc = yes; then
15888 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15889 if test "$cross_compiling" = yes; then
15892 cat >conftest.$ac_ext <<_ACEOF
15893 #line 15893 "configure"
15894 #include "confdefs.h"
15896 #if ((' ' & 0x0FF) == 0x020)
15897 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15898 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15900 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15901 || ('j' <= (c) && (c) <= 'r') \
15902 || ('s' <= (c) && (c) <= 'z'))
15903 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15906 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15911 for (i = 0; i < 256; i++)
15912 if (XOR (islower (i), ISLOWER (i))
15913 || toupper (i) != TOUPPER (i))
15914 $ac_main_return(2);
15915 $ac_main_return (0);
15918 rm -f conftest$ac_exeext
15919 if { (eval echo "$as_me:15919: \"$ac_link\"") >&5
15920 (eval $ac_link) 2>&5
15922 echo "$as_me:15922: \$? = $ac_status" >&5
15923 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15924 { (eval echo "$as_me:15924: \"$ac_try\"") >&5
15925 (eval $ac_try) 2>&5
15927 echo "$as_me:15927: \$? = $ac_status" >&5
15928 (exit $ac_status); }; }; then
15931 echo "$as_me: program exited with status $ac_status" >&5
15932 echo "$as_me: failed program was:" >&5
15933 cat conftest.$ac_ext >&5
15934 ac_cv_header_stdc=no
15936 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15940 echo "$as_me:15940: result: $ac_cv_header_stdc" >&5
15941 echo "${ECHO_T}$ac_cv_header_stdc" >&6
15942 if test $ac_cv_header_stdc = yes; then
15944 cat >>confdefs.h <<\EOF
15945 #define STDC_HEADERS 1
15950 ac_header_dirent=no
15951 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
15952 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
15953 echo "$as_me:15953: checking for $ac_hdr that defines DIR" >&5
15954 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
15955 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15956 echo $ECHO_N "(cached) $ECHO_C" >&6
15958 cat >conftest.$ac_ext <<_ACEOF
15959 #line 15959 "configure"
15960 #include "confdefs.h"
15961 #include <sys/types.h>
15973 rm -f conftest.$ac_objext
15974 if { (eval echo "$as_me:15974: \"$ac_compile\"") >&5
15975 (eval $ac_compile) 2>&5
15977 echo "$as_me:15977: \$? = $ac_status" >&5
15978 (exit $ac_status); } &&
15979 { ac_try='test -s conftest.$ac_objext'
15980 { (eval echo "$as_me:15980: \"$ac_try\"") >&5
15981 (eval $ac_try) 2>&5
15983 echo "$as_me:15983: \$? = $ac_status" >&5
15984 (exit $ac_status); }; }; then
15985 eval "$as_ac_Header=yes"
15987 echo "$as_me: failed program was:" >&5
15988 cat conftest.$ac_ext >&5
15989 eval "$as_ac_Header=no"
15991 rm -f conftest.$ac_objext conftest.$ac_ext
15993 echo "$as_me:15993: result: `eval echo '${'$as_ac_Header'}'`" >&5
15994 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15995 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15996 cat >>confdefs.h <<EOF
15997 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16000 ac_header_dirent=$ac_hdr; break
16004 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
16005 if test $ac_header_dirent = dirent.h; then
16006 echo "$as_me:16006: checking for opendir in -ldir" >&5
16007 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
16008 if test "${ac_cv_lib_dir_opendir+set}" = set; then
16009 echo $ECHO_N "(cached) $ECHO_C" >&6
16011 ac_check_lib_save_LIBS=$LIBS
16013 cat >conftest.$ac_ext <<_ACEOF
16014 #line 16014 "configure"
16015 #include "confdefs.h"
16017 /* Override any gcc2 internal prototype to avoid an error. */
16021 /* We use char because int might match the return type of a gcc2
16022 builtin and then its argument prototype would still apply. */
16032 rm -f conftest.$ac_objext conftest$ac_exeext
16033 if { (eval echo "$as_me:16033: \"$ac_link\"") >&5
16034 (eval $ac_link) 2>&5
16036 echo "$as_me:16036: \$? = $ac_status" >&5
16037 (exit $ac_status); } &&
16038 { ac_try='test -s conftest$ac_exeext'
16039 { (eval echo "$as_me:16039: \"$ac_try\"") >&5
16040 (eval $ac_try) 2>&5
16042 echo "$as_me:16042: \$? = $ac_status" >&5
16043 (exit $ac_status); }; }; then
16044 ac_cv_lib_dir_opendir=yes
16046 echo "$as_me: failed program was:" >&5
16047 cat conftest.$ac_ext >&5
16048 ac_cv_lib_dir_opendir=no
16050 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16051 LIBS=$ac_check_lib_save_LIBS
16053 echo "$as_me:16053: result: $ac_cv_lib_dir_opendir" >&5
16054 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
16055 if test $ac_cv_lib_dir_opendir = yes; then
16060 echo "$as_me:16060: checking for opendir in -lx" >&5
16061 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
16062 if test "${ac_cv_lib_x_opendir+set}" = set; then
16063 echo $ECHO_N "(cached) $ECHO_C" >&6
16065 ac_check_lib_save_LIBS=$LIBS
16067 cat >conftest.$ac_ext <<_ACEOF
16068 #line 16068 "configure"
16069 #include "confdefs.h"
16071 /* Override any gcc2 internal prototype to avoid an error. */
16075 /* We use char because int might match the return type of a gcc2
16076 builtin and then its argument prototype would still apply. */
16086 rm -f conftest.$ac_objext conftest$ac_exeext
16087 if { (eval echo "$as_me:16087: \"$ac_link\"") >&5
16088 (eval $ac_link) 2>&5
16090 echo "$as_me:16090: \$? = $ac_status" >&5
16091 (exit $ac_status); } &&
16092 { ac_try='test -s conftest$ac_exeext'
16093 { (eval echo "$as_me:16093: \"$ac_try\"") >&5
16094 (eval $ac_try) 2>&5
16096 echo "$as_me:16096: \$? = $ac_status" >&5
16097 (exit $ac_status); }; }; then
16098 ac_cv_lib_x_opendir=yes
16100 echo "$as_me: failed program was:" >&5
16101 cat conftest.$ac_ext >&5
16102 ac_cv_lib_x_opendir=no
16104 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16105 LIBS=$ac_check_lib_save_LIBS
16107 echo "$as_me:16107: result: $ac_cv_lib_x_opendir" >&5
16108 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
16109 if test $ac_cv_lib_x_opendir = yes; then
16115 echo "$as_me:16115: checking whether time.h and sys/time.h may both be included" >&5
16116 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16117 if test "${ac_cv_header_time+set}" = set; then
16118 echo $ECHO_N "(cached) $ECHO_C" >&6
16120 cat >conftest.$ac_ext <<_ACEOF
16121 #line 16121 "configure"
16122 #include "confdefs.h"
16123 #include <sys/types.h>
16124 #include <sys/time.h>
16130 if ((struct tm *) 0)
16136 rm -f conftest.$ac_objext
16137 if { (eval echo "$as_me:16137: \"$ac_compile\"") >&5
16138 (eval $ac_compile) 2>&5
16140 echo "$as_me:16140: \$? = $ac_status" >&5
16141 (exit $ac_status); } &&
16142 { ac_try='test -s conftest.$ac_objext'
16143 { (eval echo "$as_me:16143: \"$ac_try\"") >&5
16144 (eval $ac_try) 2>&5
16146 echo "$as_me:16146: \$? = $ac_status" >&5
16147 (exit $ac_status); }; }; then
16148 ac_cv_header_time=yes
16150 echo "$as_me: failed program was:" >&5
16151 cat conftest.$ac_ext >&5
16152 ac_cv_header_time=no
16154 rm -f conftest.$ac_objext conftest.$ac_ext
16156 echo "$as_me:16156: result: $ac_cv_header_time" >&5
16157 echo "${ECHO_T}$ac_cv_header_time" >&6
16158 if test $ac_cv_header_time = yes; then
16160 cat >>confdefs.h <<\EOF
16161 #define TIME_WITH_SYS_TIME 1
16166 ### checks for compiler characteristics
16168 ac_cpp='$CPP $CPPFLAGS'
16169 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16170 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16171 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16172 ac_main_return=return
16174 echo "$as_me:16174: checking for an ANSI C-conforming const" >&5
16175 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16176 if test "${ac_cv_c_const+set}" = set; then
16177 echo $ECHO_N "(cached) $ECHO_C" >&6
16179 cat >conftest.$ac_ext <<_ACEOF
16180 #line 16180 "configure"
16181 #include "confdefs.h"
16186 /* FIXME: Include the comments suggested by Paul. */
16187 #ifndef __cplusplus
16188 /* Ultrix mips cc rejects this. */
16189 typedef int charset[2];
16191 /* SunOS 4.1.1 cc rejects this. */
16192 char const *const *ccp;
16194 /* NEC SVR4.0.2 mips cc rejects this. */
16195 struct point {int x, y;};
16196 static struct point const zero = {0,0};
16197 /* AIX XL C 1.02.0.0 rejects this.
16198 It does not let you subtract one const X* pointer from another in
16199 an arm of an if-expression whose if-part is not a constant
16201 const char *g = "string";
16202 ccp = &g + (g ? g-g : 0);
16203 /* HPUX 7.0 cc rejects these. */
16206 ccp = (char const *const *) p;
16207 { /* SCO 3.2v4 cc rejects this. */
16209 char const *s = 0 ? (char *) 0 : (char const *) 0;
16213 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
16214 int x[] = {25, 17};
16215 const int *foo = &x[0];
16218 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16219 typedef const int *iptr;
16223 { /* AIX XL C 1.02.0.0 rejects this saying
16224 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16225 struct s { int j; const int *ap[3]; };
16226 struct s *b; b->j = 5;
16228 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16229 const int foo = 10;
16237 rm -f conftest.$ac_objext
16238 if { (eval echo "$as_me:16238: \"$ac_compile\"") >&5
16239 (eval $ac_compile) 2>&5
16241 echo "$as_me:16241: \$? = $ac_status" >&5
16242 (exit $ac_status); } &&
16243 { ac_try='test -s conftest.$ac_objext'
16244 { (eval echo "$as_me:16244: \"$ac_try\"") >&5
16245 (eval $ac_try) 2>&5
16247 echo "$as_me:16247: \$? = $ac_status" >&5
16248 (exit $ac_status); }; }; then
16251 echo "$as_me: failed program was:" >&5
16252 cat conftest.$ac_ext >&5
16255 rm -f conftest.$ac_objext conftest.$ac_ext
16257 echo "$as_me:16257: result: $ac_cv_c_const" >&5
16258 echo "${ECHO_T}$ac_cv_c_const" >&6
16259 if test $ac_cv_c_const = no; then
16261 cat >>confdefs.h <<\EOF
16267 ### Checks for external-data
16269 echo "$as_me:16269: checking if data-only library module links" >&5
16270 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16271 if test "${cf_cv_link_dataonly+set}" = set; then
16272 echo $ECHO_N "(cached) $ECHO_C" >&6
16276 cat >conftest.$ac_ext <<EOF
16277 #line 16277 "configure"
16278 int testdata[3] = { 123, 456, 789 };
16280 if { (eval echo "$as_me:16280: \"$ac_compile\"") >&5
16281 (eval $ac_compile) 2>&5
16283 echo "$as_me:16283: \$? = $ac_status" >&5
16284 (exit $ac_status); } ; then
16285 mv conftest.o data.o && \
16286 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16288 rm -f conftest.$ac_ext data.o
16289 cat >conftest.$ac_ext <<EOF
16290 #line 16290 "configure"
16294 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
16296 extern int testdata[3];
16297 return testdata[0] == 123
16298 && testdata[1] == 456
16299 && testdata[2] == 789;
16303 if { (eval echo "$as_me:16303: \"$ac_compile\"") >&5
16304 (eval $ac_compile) 2>&5
16306 echo "$as_me:16306: \$? = $ac_status" >&5
16307 (exit $ac_status); }; then
16308 mv conftest.o func.o && \
16309 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16311 rm -f conftest.$ac_ext func.o
16312 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16313 cf_saveLIBS="$LIBS"
16314 LIBS="conftest.a $LIBS"
16315 if test "$cross_compiling" = yes; then
16316 cf_cv_link_dataonly=unknown
16318 cat >conftest.$ac_ext <<_ACEOF
16319 #line 16319 "configure"
16320 #include "confdefs.h"
16324 extern int testfunc();
16325 ${cf_cv_main_return:-return} (!testfunc());
16329 rm -f conftest$ac_exeext
16330 if { (eval echo "$as_me:16330: \"$ac_link\"") >&5
16331 (eval $ac_link) 2>&5
16333 echo "$as_me:16333: \$? = $ac_status" >&5
16334 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16335 { (eval echo "$as_me:16335: \"$ac_try\"") >&5
16336 (eval $ac_try) 2>&5
16338 echo "$as_me:16338: \$? = $ac_status" >&5
16339 (exit $ac_status); }; }; then
16340 cf_cv_link_dataonly=yes
16342 echo "$as_me: program exited with status $ac_status" >&5
16343 echo "$as_me: failed program was:" >&5
16344 cat conftest.$ac_ext >&5
16345 cf_cv_link_dataonly=no
16347 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16349 LIBS="$cf_saveLIBS"
16353 echo "$as_me:16353: result: $cf_cv_link_dataonly" >&5
16354 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16356 if test "$cf_cv_link_dataonly" = no ; then
16358 cat >>confdefs.h <<\EOF
16359 #define BROKEN_LINKER 1
16365 ### Checks for library functions.
16371 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16372 echo "$as_me:16372: checking for $ac_header" >&5
16373 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16374 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16375 echo $ECHO_N "(cached) $ECHO_C" >&6
16377 cat >conftest.$ac_ext <<_ACEOF
16378 #line 16378 "configure"
16379 #include "confdefs.h"
16380 #include <$ac_header>
16382 if { (eval echo "$as_me:16382: \"$ac_cpp conftest.$ac_ext\"") >&5
16383 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16385 egrep -v '^ *\+' conftest.er1 >conftest.err
16387 cat conftest.err >&5
16388 echo "$as_me:16388: \$? = $ac_status" >&5
16389 (exit $ac_status); } >/dev/null; then
16390 if test -s conftest.err; then
16391 ac_cpp_err=$ac_c_preproc_warn_flag
16398 if test -z "$ac_cpp_err"; then
16399 eval "$as_ac_Header=yes"
16401 echo "$as_me: failed program was:" >&5
16402 cat conftest.$ac_ext >&5
16403 eval "$as_ac_Header=no"
16405 rm -f conftest.err conftest.$ac_ext
16407 echo "$as_me:16407: result: `eval echo '${'$as_ac_Header'}'`" >&5
16408 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16409 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16410 cat >>confdefs.h <<EOF
16411 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16417 echo "$as_me:16417: checking for working mkstemp" >&5
16418 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16419 if test "${cf_cv_func_mkstemp+set}" = set; then
16420 echo $ECHO_N "(cached) $ECHO_C" >&6
16424 if test "$cross_compiling" = yes; then
16425 cf_cv_func_mkstemp=maybe
16427 cat >conftest.$ac_ext <<_ACEOF
16428 #line 16428 "configure"
16429 #include "confdefs.h"
16431 #include <sys/types.h>
16432 #ifdef HAVE_UNISTD_H
16433 #include <unistd.h>
16435 #include <stdlib.h>
16437 #include <string.h>
16438 #include <sys/stat.h>
16441 char *tmpl = "conftestXXXXXX";
16449 for (n = 0; n < 2; ++n) {
16450 strcpy(name[n], tmpl);
16451 if ((fd = mkstemp(name[n])) >= 0) {
16452 if (!strcmp(name[n], tmpl)
16453 || stat(name[n], &sb) != 0
16454 || (sb.st_mode & S_IFMT) != S_IFREG
16455 || (sb.st_mode & 077) != 0) {
16462 && !strcmp(name[0], name[1]))
16464 ${cf_cv_main_return:-return}(result);
16468 rm -f conftest$ac_exeext
16469 if { (eval echo "$as_me:16469: \"$ac_link\"") >&5
16470 (eval $ac_link) 2>&5
16472 echo "$as_me:16472: \$? = $ac_status" >&5
16473 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16474 { (eval echo "$as_me:16474: \"$ac_try\"") >&5
16475 (eval $ac_try) 2>&5
16477 echo "$as_me:16477: \$? = $ac_status" >&5
16478 (exit $ac_status); }; }; then
16479 cf_cv_func_mkstemp=yes
16482 echo "$as_me: program exited with status $ac_status" >&5
16483 echo "$as_me: failed program was:" >&5
16484 cat conftest.$ac_ext >&5
16485 cf_cv_func_mkstemp=no
16488 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16492 echo "$as_me:16492: result: $cf_cv_func_mkstemp" >&5
16493 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16494 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16495 echo "$as_me:16495: checking for mkstemp" >&5
16496 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16497 if test "${ac_cv_func_mkstemp+set}" = set; then
16498 echo $ECHO_N "(cached) $ECHO_C" >&6
16500 cat >conftest.$ac_ext <<_ACEOF
16501 #line 16501 "configure"
16502 #include "confdefs.h"
16503 #define mkstemp autoconf_temporary
16504 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16511 /* We use char because int might match the return type of a gcc2
16512 builtin and then its argument prototype would still apply. */
16513 char mkstemp (void);
16519 /* The GNU C library defines stubs for functions which it implements
16520 to always fail with ENOSYS. Some functions are actually named
16521 something starting with __ and the normal name is an alias. */
16522 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16523 #error found stub for mkstemp
16531 rm -f conftest.$ac_objext conftest$ac_exeext
16532 if { (eval echo "$as_me:16532: \"$ac_link\"") >&5
16533 (eval $ac_link) 2>&5
16535 echo "$as_me:16535: \$? = $ac_status" >&5
16536 (exit $ac_status); } &&
16537 { ac_try='test -s conftest$ac_exeext'
16538 { (eval echo "$as_me:16538: \"$ac_try\"") >&5
16539 (eval $ac_try) 2>&5
16541 echo "$as_me:16541: \$? = $ac_status" >&5
16542 (exit $ac_status); }; }; then
16543 ac_cv_func_mkstemp=yes
16545 echo "$as_me: failed program was:" >&5
16546 cat conftest.$ac_ext >&5
16547 ac_cv_func_mkstemp=no
16549 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16551 echo "$as_me:16551: result: $ac_cv_func_mkstemp" >&5
16552 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16555 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16557 cat >>confdefs.h <<\EOF
16558 #define HAVE_MKSTEMP 1
16563 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
16564 CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16565 CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16569 if test "$cf_with_ada" != "no" ; then
16571 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
16574 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16576 unset ac_cv_path_cf_TEMP_gnat
16578 # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
16579 set dummy $cf_prog_gnat; ac_word=$2
16580 echo "$as_me:16580: checking for $ac_word" >&5
16581 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16582 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
16583 echo $ECHO_N "(cached) $ECHO_C" >&6
16585 case $cf_TEMP_gnat in
16587 ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
16590 ac_save_IFS=$IFS; IFS=$ac_path_separator
16592 for ac_dir in $ac_dummy; do
16594 test -z "$ac_dir" && ac_dir=.
16595 if $as_executable_p "$ac_dir/$ac_word"; then
16596 ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
16597 echo "$as_me:16597: found $ac_dir/$ac_word" >&5
16602 test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
16606 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
16608 if test -n "$cf_TEMP_gnat"; then
16609 echo "$as_me:16609: result: $cf_TEMP_gnat" >&5
16610 echo "${ECHO_T}$cf_TEMP_gnat" >&6
16612 echo "$as_me:16612: result: no" >&5
16613 echo "${ECHO_T}no" >&6
16616 eval cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat
16618 if test "x$cf_TEMP_gnat" != xno; then
16619 unset cf_cv_gnat_version
16622 echo "$as_me:16622: checking for $cf_prog_gnat version" >&5
16623 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
16624 if test "${cf_cv_gnat_version+set}" = set; then
16625 echo $ECHO_N "(cached) $ECHO_C" >&6
16628 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
16629 grep '[0-9].[0-9][0-9]*' |\
16630 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
16633 echo "$as_me:16633: result: $cf_cv_gnat_version" >&5
16634 echo "${ECHO_T}$cf_cv_gnat_version" >&6
16635 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
16636 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
16639 eval cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat
16642 unset cf_cv_gnat_version
16643 unset ac_cv_path_cf_TEMP_gnat
16646 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
16648 cf_cv_prog_gnat_correct=no
16650 cf_ada_make=gnatmake
16651 if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
16652 # gprconfig is newer than gnatmake; we can continue...
16655 rm -rf conftest* *~conftest*
16656 if mkdir conftest.src
16660 for cf_gprconfig in Ada C
16662 echo "$as_me:16662: checking for gprconfig name for $cf_gprconfig" >&5
16663 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
16664 if test $cf_gprconfig = C
16666 for cf_gprconfig_param in \
16667 $cf_gprconfig,,,,GNATGCC \
16668 $cf_gprconfig,,,,GCC \
16671 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
16672 test -n "$cf_gprconfig_value" && break
16675 cf_gprconfig_param=$cf_gprconfig
16676 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
16678 if test -n "$cf_gprconfig_value"
16680 eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
16681 echo "$as_me:16681: result: $cf_gprconfig_value" >&5
16682 echo "${ECHO_T}$cf_gprconfig_value" >&6
16684 echo "$as_me:16684: result: missing" >&5
16685 echo "${ECHO_T}missing" >&6
16691 rm -rf conftest* *~conftest*
16694 if test "x$cf_ada_config" != "x#"
16697 echo "$as_me:16697: checking for gnat version" >&5
16698 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
16699 if test "${cf_cv_gnat_version+set}" = set; then
16700 echo $ECHO_N "(cached) $ECHO_C" >&6
16703 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
16704 grep '[0-9].[0-9][0-9]*' |\
16705 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
16708 echo "$as_me:16708: result: $cf_cv_gnat_version" >&5
16709 echo "${ECHO_T}$cf_cv_gnat_version" >&6
16710 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
16712 case $cf_cv_gnat_version in
16713 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
16714 cf_cv_prog_gnat_correct=yes
16717 { echo "$as_me:16717: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
16718 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
16719 cf_cv_prog_gnat_correct=no
16723 # Extract the first word of "m4", so it can be a program name with args.
16724 set dummy m4; ac_word=$2
16725 echo "$as_me:16725: checking for $ac_word" >&5
16726 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16727 if test "${ac_cv_prog_M4_exists+set}" = set; then
16728 echo $ECHO_N "(cached) $ECHO_C" >&6
16730 if test -n "$M4_exists"; then
16731 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
16733 ac_save_IFS=$IFS; IFS=$ac_path_separator
16735 for ac_dir in $ac_dummy; do
16737 test -z "$ac_dir" && ac_dir=.
16738 $as_executable_p "$ac_dir/$ac_word" || continue
16739 ac_cv_prog_M4_exists="yes"
16740 echo "$as_me:16740: found $ac_dir/$ac_word" >&5
16744 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
16747 M4_exists=$ac_cv_prog_M4_exists
16748 if test -n "$M4_exists"; then
16749 echo "$as_me:16749: result: $M4_exists" >&5
16750 echo "${ECHO_T}$M4_exists" >&6
16752 echo "$as_me:16752: result: no" >&5
16753 echo "${ECHO_T}no" >&6
16756 if test "$ac_cv_prog_M4_exists" = no; then
16757 cf_cv_prog_gnat_correct=no
16758 { echo "$as_me:16758: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
16759 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
16761 if test "$cf_cv_prog_gnat_correct" = yes; then
16762 echo "$as_me:16762: checking if GNAT works" >&5
16763 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
16765 rm -rf conftest* *~conftest*
16766 cat >>conftest.ads <<CF_EOF
16767 procedure conftest;
16769 cat >>conftest.adb <<CF_EOF
16772 procedure conftest is
16774 Text_IO.Put ("Hello World");
16776 GNAT.OS_Lib.OS_Exit (0);
16779 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16780 if ( ./conftest 1>&5 2>&1 ) ; then
16781 cf_cv_prog_gnat_correct=yes
16783 cf_cv_prog_gnat_correct=no
16786 cf_cv_prog_gnat_correct=no
16788 rm -rf conftest* *~conftest*
16790 echo "$as_me:16790: result: $cf_cv_prog_gnat_correct" >&5
16791 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
16794 cf_cv_prog_gnat_correct=no
16798 if test "$cf_cv_prog_gnat_correct" = yes; then
16800 echo "$as_me:16800: checking optimization options for ADAFLAGS" >&5
16801 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
16805 ADAFLAGS="$ADAFLAGS -g"
16811 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
16813 ADAFLAGS="$ADAFLAGS $cf_O_flag"
16817 echo "$as_me:16817: result: $ADAFLAGS" >&5
16818 echo "${ECHO_T}$ADAFLAGS" >&6
16820 echo "$as_me:16820: checking if GNATPREP supports -T option" >&5
16821 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
16822 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
16823 echo $ECHO_N "(cached) $ECHO_C" >&6
16826 cf_cv_gnatprep_opt_t=no
16827 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
16830 echo "$as_me:16830: result: $cf_cv_gnatprep_opt_t" >&5
16831 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
16832 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
16834 echo "$as_me:16834: checking if GNAT supports generics" >&5
16835 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
16836 case $cf_cv_gnat_version in
16837 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
16838 cf_gnat_generics=yes
16841 cf_gnat_generics=no
16844 echo "$as_me:16844: result: $cf_gnat_generics" >&5
16845 echo "${ECHO_T}$cf_gnat_generics" >&6
16847 if test "$cf_gnat_generics" = yes
16849 cf_compile_generics=generics
16850 cf_generic_objects="\${GENOBJS}"
16852 cf_compile_generics=
16853 cf_generic_objects=
16856 echo "$as_me:16856: checking if GNAT supports SIGINT" >&5
16857 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
16858 if test "${cf_cv_gnat_sigint+set}" = set; then
16859 echo $ECHO_N "(cached) $ECHO_C" >&6
16862 rm -rf conftest* *~conftest*
16863 cat >>conftest.ads <<CF_EOF
16864 with Ada.Interrupts.Names;
16866 package ConfTest is
16868 pragma Warnings (Off); -- the next pragma exists since 3.11p
16869 pragma Unreserve_All_Interrupts;
16870 pragma Warnings (On);
16872 protected Process is
16874 function Continue return Boolean;
16875 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
16877 Done : Boolean := False;
16882 cat >>conftest.adb <<CF_EOF
16883 package body ConfTest is
16884 protected body Process is
16889 function Continue return Boolean is
16896 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16897 cf_cv_gnat_sigint=yes
16899 cf_cv_gnat_sigint=no
16901 rm -rf conftest* *~conftest*
16904 echo "$as_me:16904: result: $cf_cv_gnat_sigint" >&5
16905 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
16907 if test $cf_cv_gnat_sigint = yes ; then
16910 USE_GNAT_SIGINT="#"
16913 cf_gnat_libraries=no
16914 cf_gnat_projects=no
16916 if test "$enable_gnat_projects" != no ; then
16917 echo "$as_me:16917: checking if GNAT supports project files" >&5
16918 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
16919 case $cf_cv_gnat_version in
16923 case $cf_cv_system_name in
16927 rm -rf conftest* *~conftest*
16928 if mkdir conftest.src conftest.bin conftest.lib
16931 rm -rf conftest* *~conftest*
16932 cat >>library.gpr <<CF_EOF
16934 Kind := External ("LIB_KIND");
16935 for Library_Name use "ConfTest";
16936 for Object_Dir use ".";
16937 for Library_ALI_Dir use External("LIBRARY_DIR");
16938 for Library_Version use External ("SONAME");
16939 for Library_Kind use Kind;
16940 for Library_Dir use External("BUILD_DIR");
16941 Source_Dir := External ("SOURCE_DIR");
16942 for Source_Dirs use (Source_Dir);
16945 cat >>confpackage.ads <<CF_EOF
16946 package ConfPackage is
16947 procedure conftest;
16950 cat >>confpackage.adb <<CF_EOF
16952 package body ConfPackage is
16953 procedure conftest is
16955 Text_IO.Put ("Hello World");
16960 if ( $cf_ada_make $ADAFLAGS \
16962 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
16963 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
16964 -XSOURCE_DIR=`pwd` \
16965 -XSONAME=libConfTest.so.1 \
16966 -XLIB_KIND=static 1>&5 2>&1 ) ; then
16967 cf_gnat_projects=yes
16971 if test -f conftest.lib/confpackage.ali
16973 cf_gnat_libraries=yes
16975 rm -rf conftest* *~conftest*
16980 echo "$as_me:16980: result: $cf_gnat_projects" >&5
16981 echo "${ECHO_T}$cf_gnat_projects" >&6
16982 fi # enable_gnat_projects
16984 if test $cf_gnat_projects = yes
16986 echo "$as_me:16986: checking if GNAT supports libraries" >&5
16987 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
16988 echo "$as_me:16988: result: $cf_gnat_libraries" >&5
16989 echo "${ECHO_T}$cf_gnat_libraries" >&6
16992 if test "$cf_gnat_projects" = yes
16994 USE_OLD_MAKERULES="#"
16995 USE_GNAT_PROJECTS=""
16997 USE_OLD_MAKERULES=""
16998 USE_GNAT_PROJECTS="#"
17001 if test "$cf_gnat_libraries" = yes
17003 USE_GNAT_LIBRARIES=""
17005 USE_GNAT_LIBRARIES="#"
17008 echo "$as_me:17008: checking for ada-compiler" >&5
17009 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
17011 # Check whether --with-ada-compiler or --without-ada-compiler was given.
17012 if test "${with_ada_compiler+set}" = set; then
17013 withval="$with_ada_compiler"
17014 cf_ada_compiler=$withval
17016 cf_ada_compiler=gnatmake
17019 echo "$as_me:17019: result: $cf_ada_compiler" >&5
17020 echo "${ECHO_T}$cf_ada_compiler" >&6
17022 cf_ada_package=terminal_interface
17024 echo "$as_me:17024: checking for ada-include" >&5
17025 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
17027 # Check whether --with-ada-include or --without-ada-include was given.
17028 if test "${with_ada_include+set}" = set; then
17029 withval="$with_ada_include"
17032 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
17033 fi; if test -n "$prefix/share/ada/adainclude" ; then
17035 if test "x$prefix" != xNONE; then
17036 cf_path_syntax="$prefix"
17038 cf_path_syntax="$ac_default_prefix"
17041 case ".$withval" in
17042 (.\$\(*\)*|.\'*\'*)
17046 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17048 (.\${*prefix}*|.\${*dir}*)
17049 eval withval="$withval"
17050 case ".$withval" in
17052 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17057 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17060 { { echo "$as_me:17060: error: expected a pathname, not \"$withval\"" >&5
17061 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17062 { (exit 1); exit 1; }; }
17067 eval ADA_INCLUDE="$withval"
17069 echo "$as_me:17069: result: $ADA_INCLUDE" >&5
17070 echo "${ECHO_T}$ADA_INCLUDE" >&6
17072 echo "$as_me:17072: checking for ada-objects" >&5
17073 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
17075 # Check whether --with-ada-objects or --without-ada-objects was given.
17076 if test "${with_ada_objects+set}" = set; then
17077 withval="$with_ada_objects"
17080 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
17081 fi; if test -n "$prefix/lib/ada/adalib" ; then
17083 if test "x$prefix" != xNONE; then
17084 cf_path_syntax="$prefix"
17086 cf_path_syntax="$ac_default_prefix"
17089 case ".$withval" in
17090 (.\$\(*\)*|.\'*\'*)
17094 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17096 (.\${*prefix}*|.\${*dir}*)
17097 eval withval="$withval"
17098 case ".$withval" in
17100 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17105 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17108 { { echo "$as_me:17108: error: expected a pathname, not \"$withval\"" >&5
17109 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17110 { (exit 1); exit 1; }; }
17115 eval ADA_OBJECTS="$withval"
17117 echo "$as_me:17117: result: $ADA_OBJECTS" >&5
17118 echo "${ECHO_T}$ADA_OBJECTS" >&6
17120 echo "$as_me:17120: checking if an Ada95 shared-library should be built" >&5
17121 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
17123 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
17124 if test "${with_ada_sharedlib+set}" = set; then
17125 withval="$with_ada_sharedlib"
17126 with_ada_sharedlib=$withval
17128 with_ada_sharedlib=no
17130 echo "$as_me:17130: result: $with_ada_sharedlib" >&5
17131 echo "${ECHO_T}$with_ada_sharedlib" >&6
17133 if test "x$with_ada_sharedlib" != xno
17135 if test "x$cf_gnat_projects" != xyes
17137 { echo "$as_me:17137: WARNING: disabling shared-library since GNAT projects are not supported" >&5
17138 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
17139 with_ada_sharedlib=no
17143 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
17144 MAKE_ADA_SHAREDLIB="#"
17146 if test "x$with_ada_sharedlib" != xno
17148 MAKE_ADA_SHAREDLIB=
17149 if test "x$with_ada_sharedlib" != xyes
17151 ADA_SHAREDLIB="$with_ada_sharedlib"
17155 # allow the Ada binding to be renamed
17157 echo "$as_me:17157: checking for ada-libname" >&5
17158 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
17160 # Check whether --with-ada-libname or --without-ada-libname was given.
17161 if test "${with_ada_libname+set}" = set; then
17162 withval="$with_ada_libname"
17163 ADA_LIBNAME=$withval
17165 ADA_LIBNAME=AdaCurses
17167 case "x$ADA_LIBNAME" in
17169 ADA_LIBNAME=AdaCurses
17173 echo "$as_me:17173: result: $ADA_LIBNAME" >&5
17174 echo "${ECHO_T}$ADA_LIBNAME" >&6
17177 { { echo "$as_me:17177: error: No usable Ada compiler found" >&5
17178 echo "$as_me: error: No usable Ada compiler found" >&2;}
17179 { (exit 1); exit 1; }; }
17182 { { echo "$as_me:17182: error: The Ada compiler is needed for this package" >&5
17183 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
17184 { (exit 1); exit 1; }; }
17187 ################################################################################
17194 ### Construct the list of include-directories to be generated
17196 if test "$srcdir" != "."; then
17197 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
17199 CPPFLAGS="-I../include $CPPFLAGS"
17200 if test "$srcdir" != "."; then
17201 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
17203 CPPFLAGS="-I. $CPPFLAGS"
17205 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
17206 if test "$srcdir" != "."; then
17207 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
17209 if test "$GCC" != yes; then
17210 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17211 elif test "$includedir" != "/usr/include"; then
17212 if test "$includedir" = '${prefix}/include' ; then
17213 if test x$prefix != x/usr ; then
17214 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17217 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17221 ### Build up pieces for makefile rules
17222 echo "$as_me:17222: checking default library suffix" >&5
17223 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
17225 case $DFT_LWR_MODEL in
17226 (libtool) DFT_ARG_SUFFIX='' ;;
17227 (normal) DFT_ARG_SUFFIX='' ;;
17228 (debug) DFT_ARG_SUFFIX='_g' ;;
17229 (profile) DFT_ARG_SUFFIX='_p' ;;
17230 (shared) DFT_ARG_SUFFIX='' ;;
17232 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
17233 echo "$as_me:17233: result: $DFT_ARG_SUFFIX" >&5
17234 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
17236 echo "$as_me:17236: checking default library-dependency suffix" >&5
17237 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
17239 case X$DFT_LWR_MODEL in
17241 DFT_LIB_SUFFIX='.la'
17242 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17245 case $cf_cv_system_name in
17247 DFT_LIB_SUFFIX='_g.lib'
17250 DFT_LIB_SUFFIX='_g.a'
17253 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17256 case $cf_cv_system_name in
17258 DFT_LIB_SUFFIX='_p.lib'
17261 DFT_LIB_SUFFIX='_p.a'
17264 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17267 case $cf_cv_system_name in
17269 DFT_LIB_SUFFIX='.so'
17270 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17273 DFT_LIB_SUFFIX='.dll'
17274 DFT_DEP_SUFFIX='.dll.lib'
17276 (cygwin*|msys*|mingw*)
17277 DFT_LIB_SUFFIX='.dll'
17278 DFT_DEP_SUFFIX='.dll.a'
17281 DFT_LIB_SUFFIX='.dylib'
17282 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17287 DFT_LIB_SUFFIX='.so'
17288 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17291 DFT_LIB_SUFFIX='.sl'
17292 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17297 DFT_LIB_SUFFIX='.so'
17298 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17305 DFT_LIB_SUFFIX='.lib'
17308 DFT_LIB_SUFFIX='.a'
17311 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17314 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
17316 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
17317 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
17319 echo "$as_me:17319: result: $DFT_DEP_SUFFIX" >&5
17320 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
17322 echo "$as_me:17322: checking default object directory" >&5
17323 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
17325 case $DFT_LWR_MODEL in
17326 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
17327 (normal) DFT_OBJ_SUBDIR='objects' ;;
17328 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
17329 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
17331 case $cf_cv_system_name in
17333 DFT_OBJ_SUBDIR='objects' ;;
17335 DFT_OBJ_SUBDIR='obj_s' ;;
17338 echo "$as_me:17338: result: $DFT_OBJ_SUBDIR" >&5
17339 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
17341 ### Set up low-level terminfo dependencies for makefiles.
17343 if test "$DFT_LWR_MODEL" = shared ; then
17344 case $cf_cv_system_name in
17346 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
17349 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
17354 USE_ARG_SUFFIX=${DFT_ARG_SUFFIX}
17356 USE_LIB_SUFFIX=${DFT_ARG_SUFFIX}
17358 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
17360 ### Construct the list of subdirectories for which we'll customize makefiles
17361 ### with the appropriate compile-rules.
17363 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
17365 cat >>confdefs.h <<EOF
17366 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
17369 ################################################################################
17375 NCURSES_SHLIB2="sh -c"
17377 ADA_SUBDIRS="include gen src doc"
17378 if test "x$cf_with_tests" != "xno" ; then
17379 ADA_SUBDIRS="$ADA_SUBDIRS samples"
17381 for cf_dir in $ADA_SUBDIRS
17383 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
17390 # match layout used by make-tar.sh
17391 ADAHTML_DIR=../doc/ada
17393 if test "x$cross_compiling" = xyes ; then
17394 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
17396 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
17399 ac_config_files="$ac_config_files $SUB_MAKEFILES src/library.gpr:src/library.gpr.in doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
17400 ac_config_commands="$ac_config_commands default"
17401 cat >confcache <<\_ACEOF
17402 # This file is a shell script that caches the results of configure
17403 # tests run on this system so they can be shared between configure
17404 # scripts and configure runs, see configure's option --config-cache.
17405 # It is not useful on other systems. If it contains results you don't
17406 # want to keep, you may remove or edit it.
17408 # config.status only pays attention to the cache file if you give it
17409 # the --recheck option to rerun configure.
17411 # `ac_cv_env_foo' variables (set or unset) will be overriden when
17412 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17413 # following values.
17417 # The following way of writing the cache mishandles newlines in values,
17418 # but we know of no workaround that is simple, portable, and efficient.
17419 # So, don't put newlines in cache variables' values.
17420 # Ultrix sh set writes to stderr and can't be redirected directly,
17421 # and sets the high bit in the cache file unless we assign to the vars.
17424 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17426 # `set' does not quote correctly, so add quotes (double-quote
17427 # substitution turns \\\\ into \\, and sed turns \\ into \).
17430 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17433 # `set' quotes correctly as required by POSIX, so do not add quotes.
17435 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17442 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17444 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17446 if cmp -s $cache_file confcache; then :; else
17447 if test -w $cache_file; then
17448 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17449 cat confcache >$cache_file
17451 echo "not updating unwritable cache $cache_file"
17456 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17457 # Let make expand exec_prefix.
17458 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17460 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17461 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17462 # trailing colons and then remove the whole line if VPATH becomes empty
17463 # (actually we leave an empty line to preserve line numbers).
17464 if test "x$srcdir" = x.; then
17465 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17466 s/:*\$(srcdir):*/:/;
17467 s/:*\${srcdir}:*/:/;
17469 s/^\([^=]*=[ ]*\):*/\1/;
17475 DEFS=-DHAVE_CONFIG_H
17477 : ${CONFIG_STATUS=./config.status}
17478 ac_clean_files_save=$ac_clean_files
17479 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17480 { echo "$as_me:17480: creating $CONFIG_STATUS" >&5
17481 echo "$as_me: creating $CONFIG_STATUS" >&6;}
17482 cat >$CONFIG_STATUS <<_ACEOF
17484 # Generated automatically by configure.
17485 # Run this file to recreate the current configuration.
17486 # Compiler output produced by configure, useful for debugging
17487 # configure, is in config.log if it exists.
17490 SHELL=\${CONFIG_SHELL-$SHELL}
17491 ac_cs_invocation="\$0 \$@"
17493 CLICOLOR_FORCE= GREP_OPTIONS=
17494 unset CLICOLOR_FORCE GREP_OPTIONS
17497 cat >>$CONFIG_STATUS <<\_ACEOF
17498 # Be Bourne compatible
17499 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17502 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17506 # Name of the executable.
17507 as_me=`echo "$0" |sed 's,.*[\\/],,'`
17509 if expr a : '\(a\)' >/dev/null 2>&1; then
17515 rm -f conf$$ conf$$.exe conf$$.file
17517 if ln -s conf$$.file conf$$ 2>/dev/null; then
17518 # We could just check for DJGPP; but this test a) works b) is more generic
17519 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17520 if test -f conf$$.exe; then
17521 # Don't use ln at all; we don't have any links
17526 elif ln conf$$.file conf$$ 2>/dev/null; then
17531 rm -f conf$$ conf$$.exe conf$$.file
17533 as_executable_p="test -f"
17535 # Support unset when possible.
17536 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17543 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
17544 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
17545 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
17546 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
17547 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
17548 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
17549 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
17550 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
17553 # We need space, tab and new line, in precisely that order.
17559 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
17565 # Files that config.status was made for.
17566 if test -n "$ac_config_files"; then
17567 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17570 if test -n "$ac_config_headers"; then
17571 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17574 if test -n "$ac_config_links"; then
17575 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17578 if test -n "$ac_config_commands"; then
17579 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17582 cat >>$CONFIG_STATUS <<\EOF
17585 \`$as_me' instantiates files from templates according to the
17586 current configuration.
17588 Usage: $0 [OPTIONS] [FILE]...
17590 -h, --help print this help, then exit
17591 -V, --version print version number, then exit
17592 -d, --debug don't remove temporary files
17593 --recheck update $as_me by reconfiguring in the same conditions
17594 --file=FILE[:TEMPLATE]
17595 instantiate the configuration file FILE
17596 --header=FILE[:TEMPLATE]
17597 instantiate the configuration header FILE
17599 Configuration files:
17602 Configuration headers:
17605 Configuration commands:
17608 Report bugs to <dickey@invisible-island.net>."
17611 cat >>$CONFIG_STATUS <<EOF
17614 configured by $0, generated by GNU Autoconf 2.52.20200802,
17615 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17617 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17618 Free Software Foundation, Inc.
17619 This config.status script is free software; the Free Software Foundation
17620 gives unlimited permission to copy, distribute and modify it."
17625 cat >>$CONFIG_STATUS <<\EOF
17626 # If no file are specified by the user, then we need to provide default
17627 # value. By we need to know if files were specified by the user.
17633 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17634 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17636 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17640 *) # This is not an option, so the user has probably given explicit
17642 ac_need_defaults=false;;
17646 # Handling of the options.
17648 cat >>$CONFIG_STATUS <<EOF
17649 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17650 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17651 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17653 cat >>$CONFIG_STATUS <<\EOF
17654 --version | --vers* | -V )
17655 echo "$ac_cs_version"; exit 0 ;;
17657 # Conflict between --help and --header
17658 { { echo "$as_me:17658: error: ambiguous option: $1
17659 Try \`$0 --help' for more information." >&5
17660 echo "$as_me: error: ambiguous option: $1
17661 Try \`$0 --help' for more information." >&2;}
17662 { (exit 1); exit 1; }; };;
17663 --help | --hel | -h )
17664 echo "$ac_cs_usage"; exit 0 ;;
17665 --debug | --d* | -d )
17667 --file | --fil | --fi | --f )
17669 CONFIG_FILES="$CONFIG_FILES $1"
17670 ac_need_defaults=false;;
17671 --header | --heade | --head | --hea )
17673 CONFIG_HEADERS="$CONFIG_HEADERS $1"
17674 ac_need_defaults=false;;
17676 # This is an error.
17677 -*) { { echo "$as_me:17677: error: unrecognized option: $1
17678 Try \`$0 --help' for more information." >&5
17679 echo "$as_me: error: unrecognized option: $1
17680 Try \`$0 --help' for more information." >&2;}
17681 { (exit 1); exit 1; }; } ;;
17683 *) ac_config_targets="$ac_config_targets $1" ;;
17692 ## ----------------------- ##
17693 ## Running config.status. ##
17694 ## ----------------------- ##
17696 This file was extended by $as_me 2.52.20200802, executed with
17697 CONFIG_FILES = $CONFIG_FILES
17698 CONFIG_HEADERS = $CONFIG_HEADERS
17699 CONFIG_LINKS = $CONFIG_LINKS
17700 CONFIG_COMMANDS = $CONFIG_COMMANDS
17701 > $ac_cs_invocation
17702 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17707 cat >>$CONFIG_STATUS <<EOF
17709 # INIT-COMMANDS section.
17712 ### Special initialization commands, used to pass information from the
17713 ### configuration-run into config.status
17716 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
17717 DFT_LWR_MODEL="$DFT_LWR_MODEL"
17718 LIB_NAME="$LIB_NAME"
17719 LIB_PREFIX="$LIB_PREFIX"
17720 LIB_SUFFIX="$LIB_SUFFIX"
17722 NCURSES_MAJOR="$NCURSES_MAJOR"
17723 NCURSES_MINOR="$NCURSES_MINOR"
17724 NCURSES_PATCH="$NCURSES_PATCH"
17725 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
17726 cf_cv_abi_version="$cf_cv_abi_version"
17727 cf_cv_rel_version="$cf_cv_rel_version"
17728 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
17729 cf_cv_shared_soname='$cf_cv_shared_soname'
17730 cf_cv_shlib_version="$cf_cv_shlib_version"
17731 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
17732 cf_cv_system_name="$cf_cv_system_name"
17738 cat >>$CONFIG_STATUS <<\EOF
17739 for ac_config_target in $ac_config_targets
17741 case "$ac_config_target" in
17742 # Handling of arguments.
17743 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
17744 "src/library.gpr" ) CONFIG_FILES="$CONFIG_FILES src/library.gpr:src/library.gpr.in" ;;
17745 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
17746 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17747 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17748 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
17749 *) { { echo "$as_me:17749: error: invalid argument: $ac_config_target" >&5
17750 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17751 { (exit 1); exit 1; }; };;
17755 # If the user did not use the arguments to specify the items to instantiate,
17756 # then the envvar interface is used. Set only those that are not.
17757 # We use the long form for the default assignment because of an extremely
17758 # bizarre bug on SunOS 4.1.3.
17759 if $ac_need_defaults; then
17760 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17761 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17762 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17765 # Create a temporary directory, and hook for its removal unless debugging.
17768 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17769 trap '{ (exit 1); exit 1; }' 1 2 13 15
17772 # Create a (secure) tmp directory for tmp files.
17775 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17776 test -n "$tmp" && test -d "$tmp"
17779 tmp=$TMPDIR/cs$$-$RANDOM
17780 (umask 077 && mkdir $tmp)
17783 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17784 { (exit 1); exit 1; }
17789 cat >>$CONFIG_STATUS <<EOF
17792 # CONFIG_FILES section.
17795 # No need to generate the scripts if there are no CONFIG_FILES.
17796 # This happens for instance when ./config.status config.h
17797 if test -n "\$CONFIG_FILES"; then
17798 # Protect against being on the right side of a sed subst in config.status.
17799 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17800 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17801 s,@SHELL@,$SHELL,;t t
17802 s,@exec_prefix@,$exec_prefix,;t t
17803 s,@prefix@,$prefix,;t t
17804 s,@program_transform_name@,$program_transform_name,;t t
17805 s,@bindir@,$bindir,;t t
17806 s,@sbindir@,$sbindir,;t t
17807 s,@libexecdir@,$libexecdir,;t t
17808 s,@datarootdir@,$datarootdir,;t t
17809 s,@datadir@,$datadir,;t t
17810 s,@sysconfdir@,$sysconfdir,;t t
17811 s,@sharedstatedir@,$sharedstatedir,;t t
17812 s,@localstatedir@,$localstatedir,;t t
17813 s,@runstatedir@,$runstatedir,;t t
17814 s,@libdir@,$libdir,;t t
17815 s,@includedir@,$includedir,;t t
17816 s,@oldincludedir@,$oldincludedir,;t t
17817 s,@infodir@,$infodir,;t t
17818 s,@mandir@,$mandir,;t t
17819 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17820 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17821 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17822 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17823 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17824 s,@build_alias@,$build_alias,;t t
17825 s,@host_alias@,$host_alias,;t t
17826 s,@target_alias@,$target_alias,;t t
17827 s,@ECHO_C@,$ECHO_C,;t t
17828 s,@ECHO_N@,$ECHO_N,;t t
17829 s,@ECHO_T@,$ECHO_T,;t t
17830 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17831 s,@DEFS@,$DEFS,;t t
17832 s,@LIBS@,$LIBS,;t t
17833 s,@top_builddir@,$top_builddir,;t t
17834 s,@build@,$build,;t t
17835 s,@build_cpu@,$build_cpu,;t t
17836 s,@build_vendor@,$build_vendor,;t t
17837 s,@build_os@,$build_os,;t t
17838 s,@host@,$host,;t t
17839 s,@host_cpu@,$host_cpu,;t t
17840 s,@host_vendor@,$host_vendor,;t t
17841 s,@host_os@,$host_os,;t t
17842 s,@target@,$target,;t t
17843 s,@target_cpu@,$target_cpu,;t t
17844 s,@target_vendor@,$target_vendor,;t t
17845 s,@target_os@,$target_os,;t t
17847 s,@CFLAGS@,$CFLAGS,;t t
17848 s,@LDFLAGS@,$LDFLAGS,;t t
17849 s,@CPPFLAGS@,$CPPFLAGS,;t t
17850 s,@ac_ct_CC@,$ac_ct_CC,;t t
17851 s,@EXEEXT@,$EXEEXT,;t t
17852 s,@OBJEXT@,$OBJEXT,;t t
17853 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
17856 s,@EGREP@,$EGREP,;t t
17857 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17858 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17859 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17860 s,@LN_S@,$LN_S,;t t
17861 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
17862 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
17863 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
17864 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
17865 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
17866 s,@SET_MAKE@,$SET_MAKE,;t t
17867 s,@CTAGS@,$CTAGS,;t t
17868 s,@ETAGS@,$ETAGS,;t t
17869 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
17870 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
17871 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
17872 s,@RANLIB@,$RANLIB,;t t
17873 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17875 s,@ac_ct_LD@,$ac_ct_LD,;t t
17877 s,@ac_ct_AR@,$ac_ct_AR,;t t
17878 s,@ARFLAGS@,$ARFLAGS,;t t
17879 s,@DESTDIR@,$DESTDIR,;t t
17880 s,@BUILD_CC@,$BUILD_CC,;t t
17881 s,@BUILD_CPP@,$BUILD_CPP,;t t
17882 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
17883 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
17884 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
17885 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
17886 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
17887 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
17888 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
17889 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
17890 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
17891 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
17892 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
17893 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
17894 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
17895 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
17896 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
17897 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
17898 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
17899 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
17900 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
17901 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
17902 s,@CC_G_OPT@,$CC_G_OPT,;t t
17903 s,@LD_MODEL@,$LD_MODEL,;t t
17904 s,@shlibdir@,$shlibdir,;t t
17905 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
17906 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
17907 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
17908 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
17909 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
17910 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
17911 s,@LINK_PROGS@,$LINK_PROGS,;t t
17912 s,@LINK_TESTS@,$LINK_TESTS,;t t
17913 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
17914 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
17915 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
17916 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
17917 s,@RPATH_LIST@,$RPATH_LIST,;t t
17918 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
17919 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
17920 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
17921 s,@PTHREAD@,$PTHREAD,;t t
17922 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
17923 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
17924 s,@ECHO_LT@,$ECHO_LT,;t t
17925 s,@ECHO_LD@,$ECHO_LD,;t t
17926 s,@RULE_CC@,$RULE_CC,;t t
17927 s,@SHOW_CC@,$SHOW_CC,;t t
17928 s,@ECHO_CC@,$ECHO_CC,;t t
17929 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
17930 s,@ADAFLAGS@,$ADAFLAGS,;t t
17931 s,@ADA_TRACE@,$ADA_TRACE,;t t
17932 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
17933 s,@M4_exists@,$M4_exists,;t t
17934 s,@cf_ada_make@,$cf_ada_make,;t t
17935 s,@cf_ada_config@,$cf_ada_config,;t t
17936 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
17937 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
17938 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
17939 s,@cf_compile_generics@,$cf_compile_generics,;t t
17940 s,@cf_generic_objects@,$cf_generic_objects,;t t
17941 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
17942 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
17943 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
17944 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
17945 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
17946 s,@cf_ada_package@,$cf_ada_package,;t t
17947 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
17948 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
17949 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
17950 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
17951 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
17952 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
17953 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
17954 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
17955 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
17956 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
17957 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
17958 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
17959 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
17960 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
17961 s,@TEST_ARG2@,$TEST_ARG2,;t t
17962 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
17963 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
17964 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
17965 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
17966 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
17967 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
17968 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
17973 cat >>$CONFIG_STATUS <<\EOF
17974 # Split the substitutions into bite-sized pieces for seds with
17975 # small command number limits, like on Digital OSF/1 and HP-UX.
17976 ac_max_sed_lines=48
17977 ac_sed_frag=1 # Number of current file.
17978 ac_beg=1 # First line for current file.
17979 ac_end=$ac_max_sed_lines # Line after last line for current file.
17982 while $ac_more_lines; do
17983 if test $ac_beg -gt 1; then
17984 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17986 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17988 if test ! -s $tmp/subs.frag; then
17989 ac_more_lines=false
17991 # The purpose of the label and of the branching condition is to
17992 # speed up the sed processing (if there are no `@' at all, there
17993 # is no need to browse any of the substitutions).
17994 # These are the two extra sed commands mentioned above.
17996 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17997 # It is possible to make a multiline substitution using escaped newlines.
17998 # Ensure that we do not split the substitution between script fragments.
18000 ac_END=`expr $ac_end + $ac_max_sed_lines`
18001 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
18002 if test -s $tmp/subs.next; then
18003 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
18004 if test ! -s $tmp/subs.edit; then
18005 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
18006 if test ! -s $tmp/subs.edit; then
18007 if test $ac_beg -gt 1; then
18008 ac_end=`expr $ac_end - 1`
18015 if test -z "$ac_sed_cmds"; then
18016 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18018 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18020 ac_sed_frag=`expr $ac_sed_frag + 1`
18022 ac_end=`expr $ac_end + $ac_max_sed_lines`
18025 if test -z "$ac_sed_cmds"; then
18028 fi # test -n "$CONFIG_FILES"
18031 cat >>$CONFIG_STATUS <<\EOF
18032 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18033 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18035 - | *:- | *:-:* ) # input from stdin
18037 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18038 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18039 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18040 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18041 * ) ac_file_in=$ac_file.in ;;
18044 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18045 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18046 X"$ac_file" : 'X\(//\)[^/]' \| \
18047 X"$ac_file" : 'X\(//\)$' \| \
18048 X"$ac_file" : 'X\(/\)' \| \
18049 . : '\(.\)' 2>/dev/null ||
18051 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18052 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18053 /^X\(\/\/\)$/{ s//\1/; q; }
18054 /^X\(\/\).*/{ s//\1/; q; }
18056 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18057 { case "$ac_dir" in
18058 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18062 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18063 case $as_mkdir_dir in
18064 # Skip DOS drivespec
18065 ?:) as_incr_dir=$as_mkdir_dir ;;
18067 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18068 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18073 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18074 # A "../" for each directory in $ac_dir_suffix.
18075 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18077 ac_dir_suffix= ac_dots=
18082 if test -z "$ac_dots"; then
18085 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
18087 [\\/]* | ?:[\\/]* )
18088 ac_srcdir=$srcdir$ac_dir_suffix;
18089 ac_top_srcdir=$srcdir ;;
18090 *) # Relative path.
18091 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
18092 ac_top_srcdir=$ac_dots$srcdir ;;
18096 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18097 *) ac_INSTALL=$ac_dots$INSTALL ;;
18100 if test x"$ac_file" != x-; then
18101 { echo "$as_me:18101: creating $ac_file" >&5
18102 echo "$as_me: creating $ac_file" >&6;}
18105 # Let's still pretend it is `configure' which instantiates (i.e., don't
18106 # use $as_me), people would be surprised to read:
18107 # /* config.h. Generated automatically by config.status. */
18108 configure_input="Generated automatically from `echo $ac_file_in |
18109 sed 's,.*/,,'` by configure."
18111 # First look for the input files in the build tree, otherwise in the
18113 ac_file_inputs=`IFS=:
18114 for f in $ac_file_in; do
18116 -) echo $tmp/stdin ;;
18118 # Absolute (can't be DOS-style, as IFS=:)
18119 test -f "$f" || { { echo "$as_me:18119: error: cannot find input file: $f" >&5
18120 echo "$as_me: error: cannot find input file: $f" >&2;}
18121 { (exit 1); exit 1; }; }
18124 if test -f "$f"; then
18127 elif test -f "$srcdir/$f"; then
18132 { { echo "$as_me:18132: error: cannot find input file: $f" >&5
18133 echo "$as_me: error: cannot find input file: $f" >&2;}
18134 { (exit 1); exit 1; }; }
18137 done` || { (exit 1); exit 1; }
18139 cat >>$CONFIG_STATUS <<\EOF
18140 ac_warn_datarootdir=no
18141 if test x"$ac_file" != x-; then
18142 for ac_item in $ac_file_inputs
18144 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
18145 if test -n "$ac_seen"; then
18146 ac_used=`grep '@datarootdir@' $ac_item`
18147 if test -z "$ac_used"; then
18148 { echo "$as_me:18148: WARNING: datarootdir was used implicitly but not set:
18150 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
18152 ac_warn_datarootdir=yes
18155 ac_seen=`grep '${datarootdir}' $ac_item`
18156 if test -n "$ac_seen"; then
18157 { echo "$as_me:18157: WARNING: datarootdir was used explicitly but not set:
18159 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
18161 ac_warn_datarootdir=yes
18166 if test "x$ac_warn_datarootdir" = xyes; then
18167 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
18171 cat >>$CONFIG_STATUS <<EOF
18175 cat >>$CONFIG_STATUS <<\EOF
18177 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18178 s,@configure_input@,$configure_input,;t t
18179 s,@srcdir@,$ac_srcdir,;t t
18180 s,@top_srcdir@,$ac_top_srcdir,;t t
18181 s,@INSTALL@,$ac_INSTALL,;t t
18182 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18184 if test x"$ac_file" != x-; then
18185 cp $tmp/out $ac_file
18187 for ac_name in prefix exec_prefix datarootdir
18189 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
18190 if test -n "$ac_seen"; then
18191 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
18192 if test -z "$ac_init"; then
18193 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
18194 { echo "$as_me:18194: WARNING: Variable $ac_name is used but was not set:
18196 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
18201 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
18202 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
18203 if test -s $tmp/out; then
18204 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
18205 { echo "$as_me:18205: WARNING: Some variables may not be substituted:
18207 echo "$as_me: WARNING: Some variables may not be substituted:
18217 cat >>$CONFIG_STATUS <<\EOF
18220 # CONFIG_HEADER section.
18223 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18224 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18226 # ac_d sets the value in "#define NAME VALUE" lines.
18227 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18228 ac_dB='[ ].*$,\1#\2'
18231 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18232 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18233 ac_iB='\([ ]\),\1#\2define\3'
18236 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18237 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18238 ac_uB='$,\1#\2define\3'
18242 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18243 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18245 - | *:- | *:-:* ) # input from stdin
18247 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18248 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18249 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18250 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18251 * ) ac_file_in=$ac_file.in ;;
18254 test x"$ac_file" != x- && { echo "$as_me:18254: creating $ac_file" >&5
18255 echo "$as_me: creating $ac_file" >&6;}
18257 # First look for the input files in the build tree, otherwise in the
18259 ac_file_inputs=`IFS=:
18260 for f in $ac_file_in; do
18262 -) echo $tmp/stdin ;;
18264 # Absolute (can't be DOS-style, as IFS=:)
18265 test -f "$f" || { { echo "$as_me:18265: error: cannot find input file: $f" >&5
18266 echo "$as_me: error: cannot find input file: $f" >&2;}
18267 { (exit 1); exit 1; }; }
18270 if test -f "$f"; then
18273 elif test -f "$srcdir/$f"; then
18278 { { echo "$as_me:18278: error: cannot find input file: $f" >&5
18279 echo "$as_me: error: cannot find input file: $f" >&2;}
18280 { (exit 1); exit 1; }; }
18283 done` || { (exit 1); exit 1; }
18284 # Remove the trailing spaces.
18285 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
18289 # Transform confdefs.h into a list of #define's. We won't use it as a sed
18290 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
18291 # be either 'cat' or 'sort'.
18292 cat confdefs.h | uniq >conftest.vals
18294 # Break up conftest.vals because some shells have a limit on
18295 # the size of here documents, and old seds have small limits too.
18297 rm -f conftest.tail
18298 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
18299 while grep . conftest.vals >/dev/null
18301 # Write chunks of a limited-size here document to conftest.frag.
18302 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
18303 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
18304 echo 'CEOF' >> $CONFIG_STATUS
18305 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
18306 rm -f conftest.vals
18307 mv conftest.tail conftest.vals
18309 rm -f conftest.vals
18311 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
18313 echo ' cat >> conftest.edit <<CEOF
18314 /@DEFS@/r conftest.frag
18317 sed -f conftest.edit $tmp/in > $tmp/out
18319 mv $tmp/out $tmp/in
18320 rm -f conftest.edit conftest.frag
18321 ' >> $CONFIG_STATUS
18323 cat >>$CONFIG_STATUS <<\EOF
18324 # Let's still pretend it is `configure' which instantiates (i.e., don't
18325 # use $as_me), people would be surprised to read:
18326 # /* config.h. Generated automatically by config.status. */
18327 if test x"$ac_file" = x-; then
18328 echo "/* Generated automatically by configure. */" >$tmp/config.h
18330 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
18332 cat $tmp/in >>$tmp/config.h
18334 if test x"$ac_file" != x-; then
18335 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18336 { echo "$as_me:18336: $ac_file is unchanged" >&5
18337 echo "$as_me: $ac_file is unchanged" >&6;}
18339 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18340 X"$ac_file" : 'X\(//\)[^/]' \| \
18341 X"$ac_file" : 'X\(//\)$' \| \
18342 X"$ac_file" : 'X\(/\)' \| \
18343 . : '\(.\)' 2>/dev/null ||
18345 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18346 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18347 /^X\(\/\/\)$/{ s//\1/; q; }
18348 /^X\(\/\).*/{ s//\1/; q; }
18350 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18351 { case "$ac_dir" in
18352 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18356 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18357 case $as_mkdir_dir in
18358 # Skip DOS drivespec
18359 ?:) as_incr_dir=$as_mkdir_dir ;;
18361 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18362 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18369 mv $tmp/config.h $ac_file
18373 rm -f $tmp/config.h
18377 cat >>$CONFIG_STATUS <<\EOF
18379 # CONFIG_COMMANDS section.
18381 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
18382 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
18383 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
18387 if test -z "$USE_OLD_MAKERULES" ; then
18388 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
18395 cat >>$CONFIG_STATUS <<\EOF
18397 { (exit 0); exit 0; }
18399 chmod +x $CONFIG_STATUS
18400 ac_clean_files=$ac_clean_files_save
18402 # configure is writing to config.log, and then calls config.status.
18403 # config.status does its own redirection, appending to config.log.
18404 # Unfortunately, on DOS this fails, as config.log is still kept open
18405 # by configure, so config.status won't be able to write to it; its
18406 # output is simply discarded. So we exec the FD to /dev/null,
18407 # effectively closing config.log, so it can be properly (re)opened and
18408 # appended to by config.status. When coming back to configure, we
18409 # need to make the FD available again.
18410 if test "$no_create" != yes; then
18413 $SHELL $CONFIG_STATUS || ac_cs_success=false
18415 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18416 # would make configure fail if this is the last instruction.
18417 $ac_cs_success || { (exit 1); exit 1; }
18419 ${MAKE:-make} preinstall