2 # From configure.in Revision: 1.66 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20170501.
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 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
185 # Identity of this package.
195 # If the previous option needs an argument, assign it.
196 if test -n "$ac_prev"; then
197 eval "$ac_prev=\$ac_option"
202 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
204 # Accept the important Cygnus configure options, so we can diagnose typos.
208 -bindir | --bindir | --bindi | --bind | --bin | --bi)
210 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
213 -build | --build | --buil | --bui | --bu)
214 ac_prev=build_alias ;;
215 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216 build_alias=$ac_optarg ;;
218 -cache-file | --cache-file | --cache-fil | --cache-fi \
219 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220 ac_prev=cache_file ;;
221 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223 cache_file=$ac_optarg ;;
226 cache_file=config.cache ;;
228 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
230 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
232 datadir=$ac_optarg ;;
234 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235 | --dataroo | --dataro | --datar)
236 ac_prev=datarootdir ;;
237 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239 datarootdir=$ac_optarg ;;
241 -disable-* | --disable-*)
242 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243 # Reject names that are not valid shell variable names.
244 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246 { (exit 1); exit 1; }; }
247 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248 eval "enable_$ac_feature=no" ;;
250 -enable-* | --enable-*)
251 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252 # Reject names that are not valid shell variable names.
253 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255 { (exit 1); exit 1; }; }
256 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
258 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
261 eval "enable_$ac_feature='$ac_optarg'" ;;
263 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265 | --exec | --exe | --ex)
266 ac_prev=exec_prefix ;;
267 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269 | --exec=* | --exe=* | --ex=*)
270 exec_prefix=$ac_optarg ;;
272 -gas | --gas | --ga | --g)
273 # Obsolete; use --with-gas.
276 -help | --help | --hel | --he | -h)
278 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279 ac_init_help=recursive ;;
280 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281 ac_init_help=short ;;
283 -host | --host | --hos | --ho)
284 ac_prev=host_alias ;;
285 -host=* | --host=* | --hos=* | --ho=*)
286 host_alias=$ac_optarg ;;
288 -includedir | --includedir | --includedi | --included | --include \
289 | --includ | --inclu | --incl | --inc)
290 ac_prev=includedir ;;
291 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292 | --includ=* | --inclu=* | --incl=* | --inc=*)
293 includedir=$ac_optarg ;;
295 -infodir | --infodir | --infodi | --infod | --info | --inf)
297 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298 infodir=$ac_optarg ;;
300 -libdir | --libdir | --libdi | --libd)
302 -libdir=* | --libdir=* | --libdi=* | --libd=*)
305 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306 | --libexe | --libex | --libe)
307 ac_prev=libexecdir ;;
308 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309 | --libexe=* | --libex=* | --libe=*)
310 libexecdir=$ac_optarg ;;
312 -localstatedir | --localstatedir | --localstatedi | --localstated \
313 | --localstate | --localstat | --localsta | --localst \
314 | --locals | --local | --loca | --loc | --lo)
315 ac_prev=localstatedir ;;
316 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319 localstatedir=$ac_optarg ;;
321 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
323 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
327 # Obsolete; use --without-fp.
330 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
334 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
338 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340 | --oldin | --oldi | --old | --ol | --o)
341 ac_prev=oldincludedir ;;
342 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345 oldincludedir=$ac_optarg ;;
347 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
349 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
352 -program-prefix | --program-prefix | --program-prefi | --program-pref \
353 | --program-pre | --program-pr | --program-p)
354 ac_prev=program_prefix ;;
355 -program-prefix=* | --program-prefix=* | --program-prefi=* \
356 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357 program_prefix=$ac_optarg ;;
359 -program-suffix | --program-suffix | --program-suffi | --program-suff \
360 | --program-suf | --program-su | --program-s)
361 ac_prev=program_suffix ;;
362 -program-suffix=* | --program-suffix=* | --program-suffi=* \
363 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364 program_suffix=$ac_optarg ;;
366 -program-transform-name | --program-transform-name \
367 | --program-transform-nam | --program-transform-na \
368 | --program-transform-n | --program-transform- \
369 | --program-transform | --program-transfor \
370 | --program-transfo | --program-transf \
371 | --program-trans | --program-tran \
372 | --progr-tra | --program-tr | --program-t)
373 ac_prev=program_transform_name ;;
374 -program-transform-name=* | --program-transform-name=* \
375 | --program-transform-nam=* | --program-transform-na=* \
376 | --program-transform-n=* | --program-transform-=* \
377 | --program-transform=* | --program-transfor=* \
378 | --program-transfo=* | --program-transf=* \
379 | --program-trans=* | --program-tran=* \
380 | --progr-tra=* | --program-tr=* | --program-t=*)
381 program_transform_name=$ac_optarg ;;
383 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384 | -silent | --silent | --silen | --sile | --sil)
387 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
389 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
391 sbindir=$ac_optarg ;;
393 -sharedstatedir | --sharedstatedir | --sharedstatedi \
394 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395 | --sharedst | --shareds | --shared | --share | --shar \
397 ac_prev=sharedstatedir ;;
398 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
402 sharedstatedir=$ac_optarg ;;
404 -site | --site | --sit)
406 -site=* | --site=* | --sit=*)
409 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
411 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
414 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415 | --syscon | --sysco | --sysc | --sys | --sy)
416 ac_prev=sysconfdir ;;
417 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419 sysconfdir=$ac_optarg ;;
421 -target | --target | --targe | --targ | --tar | --ta | --t)
422 ac_prev=target_alias ;;
423 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424 target_alias=$ac_optarg ;;
426 -v | -verbose | --verbose | --verbos | --verbo | --verb)
429 -version | --version | --versio | --versi | --vers | -V)
433 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434 # Reject names that are not valid shell variable names.
435 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436 { echo "$as_me: error: invalid package name: $ac_package" >&2
437 { (exit 1); exit 1; }; }
438 ac_package=`echo $ac_package| sed 's/-/_/g'`
440 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
443 eval "with_$ac_package='$ac_optarg'" ;;
445 -without-* | --without-*)
446 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447 # Reject names that are not valid shell variable names.
448 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449 { echo "$as_me: error: invalid package name: $ac_package" >&2
450 { (exit 1); exit 1; }; }
451 ac_package=`echo $ac_package | sed 's/-/_/g'`
452 eval "with_$ac_package=no" ;;
455 # Obsolete; use --with-x.
458 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459 | --x-incl | --x-inc | --x-in | --x-i)
460 ac_prev=x_includes ;;
461 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463 x_includes=$ac_optarg ;;
465 -x-libraries | --x-libraries | --x-librarie | --x-librari \
466 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467 ac_prev=x_libraries ;;
468 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470 x_libraries=$ac_optarg ;;
472 -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474 { (exit 1); exit 1; }; }
478 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479 # Reject names that are not valid shell variable names.
480 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482 { (exit 1); exit 1; }; }
483 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484 eval "$ac_envvar='$ac_optarg'"
488 # FIXME: should be removed in autoconf 3.0.
489 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
498 if test -n "$ac_prev"; then
499 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500 { echo "$as_me: error: missing argument to $ac_option" >&2
501 { (exit 1); exit 1; }; }
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
507 eval ac_val=$`echo $ac_var`
509 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511 { (exit 1); exit 1; }; };;
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517 localstatedir libdir includedir oldincludedir infodir mandir
519 eval ac_val=$`echo $ac_var`
521 [\\/$]* | ?:[\\/]* ) ;;
522 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523 { (exit 1); exit 1; }; };;
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535 if test "x$build_alias" = x; then
536 cross_compiling=maybe
537 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538 If a cross compiler is detected then cross compile mode will be used." >&2
539 elif test "x$build_alias" != "x$host_alias"; then
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
547 test "$silent" = yes && exec 6>/dev/null
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551 ac_srcdir_defaulted=yes
552 # Try the directory containing this script, then its parent.
554 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
557 if test ! -r $srcdir/$ac_unique_file; then
561 ac_srcdir_defaulted=no
563 if test ! -r $srcdir/$ac_unique_file; then
564 if test "$ac_srcdir_defaulted" = yes; then
565 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566 { (exit 1); exit 1; }; }
568 { echo "$as_me: error: cannot find sources in $srcdir" >&2
569 { (exit 1); exit 1; }; }
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
607 # Report the --help message.
609 if test "$ac_init_help" = "long"; then
610 # Omit some internal or obsolete options to make the list less imposing.
611 # This message is too long to be a string in the A/UX 3.1 sh.
613 \`configure' configures this package to adapt to many kinds of systems.
615 Usage: $0 [OPTION]... [VAR=VALUE]...
617 To assign environment variables (e.g., CC, CFLAGS...), specify them as
618 VAR=VALUE. See below for descriptions of some of the useful variables.
620 Defaults for the options are specified in brackets.
623 -h, --help display this help and exit
624 --help=short display options specific to this package
625 --help=recursive display the short help of all the included packages
626 -V, --version display version information and exit
627 -q, --quiet, --silent do not print \`checking...' messages
628 --cache-file=FILE cache test results in FILE [disabled]
629 -C, --config-cache alias for \`--cache-file=config.cache'
630 -n, --no-create do not create output files
631 --srcdir=DIR find the sources in DIR [configure dir or \`..']
636 Installation directories:
637 --prefix=PREFIX install architecture-independent files in PREFIX
639 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
642 By default, \`make install' will install all the files in
643 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
644 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
645 for instance \`--prefix=\$HOME'.
647 For better control, use the options below.
649 Fine tuning of the installation directories:
650 --bindir=DIR user executables [EPREFIX/bin]
651 --sbindir=DIR system admin executables [EPREFIX/sbin]
652 --libexecdir=DIR program executables [EPREFIX/libexec]
653 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
654 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
655 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
656 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
657 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
658 --libdir=DIR object code libraries [EPREFIX/lib]
659 --includedir=DIR C header files [PREFIX/include]
660 --oldincludedir=DIR C header files for non-gcc [/usr/include]
661 --infodir=DIR info documentation [DATAROOTDIR/info]
662 --mandir=DIR man documentation [DATAROOTDIR/man]
668 --program-prefix=PREFIX prepend PREFIX to installed program names
669 --program-suffix=SUFFIX append SUFFIX to installed program names
670 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
673 --build=BUILD configure for building on BUILD [guessed]
674 --host=HOST build programs to run on HOST [BUILD]
675 --target=TARGET configure for building compilers for TARGET [HOST]
679 if test -n "$ac_init_help"; then
684 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
685 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
688 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
689 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
692 --with-system-type=XXX test: override derived host system-type
693 --disable-stripping do not strip installed executables
694 --with-pkg-config{=path} enable/disable use of pkg-config
695 --with-pkg-config-libdir=XXX use given directory for installing pc-files
696 --without-tests suppress build with test-programs
697 --enable-mixed-case tic should assume mixed-case filenames
698 --with-install-prefix prefixes actual install-location ($DESTDIR)
699 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
700 --with-build-cc=XXX the build C compiler ($BUILD_CC)
701 --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
702 --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
703 --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
704 --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
705 --with-build-libs=XXX the build libraries (${BUILD_LIBS})
706 Options to Specify the Libraries Built/Used:
707 --with-shared generate shared C-objects (needed for --with-ada-sharedlib)
708 --with-curses-dir=DIR directory in which (n)curses is installed
709 --enable-widec compile with wide-char/UTF-8 code
710 --with-lib-prefix override library-prefix
711 --with-shlib-version=X Specify rel or abi version for shared libs
712 --enable-rpath-link link sample programs with rpath option
713 Fine-Tuning Your Configuration:
714 --enable-broken_linker compile with broken-linker support code
715 --disable-largefile omit support for large files
716 --with-rcs-ids compile-in RCS identifiers
718 --disable-ext-funcs disable function-extensions
719 --enable-const compile with extra/non-standard const
721 --without-develop disable development options
723 --with-pthread use POSIX thread library
724 --enable-weak-symbols enable weak-symbols for pthreads
725 --enable-reentrant compile with experimental reentrant code
726 --with-wrap-prefix=XXX override prefix used for public variables
727 Testing/development Options:
728 --disable-echo do not display "compiling" commands
729 --enable-warnings build: turn on GCC compiler warnings
730 --enable-assertions test: turn on generation of assertion code
731 --enable-expanded test: generate functions for certain macros
732 --disable-macros test: use functions rather than macros
733 --with-trace test: add trace() function to all models of ncurses
734 --disable-gnat-projects test: disable GNAT projects even if usable
735 Ada95 Binding Options:
736 --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
737 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
738 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
739 --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
741 Some influential environment variables:
742 CC C compiler command
743 CFLAGS C compiler flags
744 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
745 nonstandard directory <lib dir>
746 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
747 headers in a nonstandard directory <include dir>
750 Use these variables to override the choices made by `configure' or to help
751 it to find libraries and programs with nonstandard names/locations.
756 if test "$ac_init_help" = "recursive"; then
757 # If there are subdirs, report their specific --help.
759 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
761 # A "../" for each directory in /$ac_subdir.
762 ac_dots=`echo $ac_subdir |
763 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
766 .) # No --srcdir option. We are building in place.
767 ac_sub_srcdir=$srcdir ;;
768 [\\/]* | ?:[\\/]* ) # Absolute path.
769 ac_sub_srcdir=$srcdir/$ac_subdir ;;
771 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
774 # Check for guested configure; otherwise get Cygnus style configure.
775 if test -f $ac_sub_srcdir/configure.gnu; then
777 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
778 elif test -f $ac_sub_srcdir/configure; then
780 $SHELL $ac_sub_srcdir/configure --help=recursive
781 elif test -f $ac_sub_srcdir/configure.ac ||
782 test -f $ac_sub_srcdir/configure.in; then
786 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
792 test -n "$ac_init_help" && exit 0
793 if $ac_init_version; then
796 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
797 Free Software Foundation, Inc.
798 This configure script is free software; the Free Software Foundation
799 gives unlimited permission to copy, distribute and modify it.
805 This file contains any messages produced by compilers while
806 running configure, to aid debugging if configure makes a mistake.
808 It was created by $as_me, which was
809 generated by GNU Autoconf 2.52.20170501. Invocation command line was
820 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
821 uname -m = `(uname -m) 2>/dev/null || echo unknown`
822 uname -r = `(uname -r) 2>/dev/null || echo unknown`
823 uname -s = `(uname -s) 2>/dev/null || echo unknown`
824 uname -v = `(uname -v) 2>/dev/null || echo unknown`
826 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
827 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
829 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
830 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
831 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
832 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
833 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
834 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
835 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
849 # Keep a trace of the command line.
850 # Strip out --no-create and --no-recursion so they do not pile up.
851 # Also quote any args containing shell meta-characters.
857 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
858 | --no-cr | --no-c) ;;
859 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
860 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
861 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
862 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
863 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
865 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
868 # Get rid of the leading space.
871 # When interrupted or exit'd, cleanup temporary files, and complete
872 # config.log. We remove comments because anyway the quotes in there
873 # would cause problems or look ugly.
875 # Save into config.log some information that might help in debugging.
877 echo "## ----------------- ##" >&5
878 echo "## Cache variables. ##" >&5
879 echo "## ----------------- ##" >&5
881 # The following way of writing the cache mishandles newlines in values,
884 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
887 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
888 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
892 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
896 sed "/^$/d" confdefs.h >conftest.log
897 if test -s conftest.log; then
899 echo "## ------------ ##" >&5
900 echo "## confdefs.h. ##" >&5
901 echo "## ------------ ##" >&5
906 test "$ac_signal" != 0 &&
907 echo "$as_me: caught signal $ac_signal" >&5
908 echo "$as_me: exit $exit_status" >&5
909 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
912 for ac_signal in 1 2 13 15; do
913 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
917 # confdefs.h avoids OS command line length limits that DEFS can exceed.
918 rm -rf conftest* confdefs.h
919 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
922 # Let the site file select an alternate cache file if it wants to.
923 # Prefer explicitly selected file to automatically selected ones.
924 if test -z "$CONFIG_SITE"; then
925 if test "x$prefix" != xNONE; then
926 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
928 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
931 for ac_site_file in $CONFIG_SITE; do
932 if test -r "$ac_site_file"; then
933 { echo "$as_me:933: loading site script $ac_site_file" >&5
934 echo "$as_me: loading site script $ac_site_file" >&6;}
935 cat "$ac_site_file" >&5
940 if test -r "$cache_file"; then
941 # Some versions of bash will fail to source /dev/null (special
942 # files actually), so we avoid doing that.
943 if test -f "$cache_file"; then
944 { echo "$as_me:944: loading cache $cache_file" >&5
945 echo "$as_me: loading cache $cache_file" >&6;}
947 [\\/]* | ?:[\\/]* ) . $cache_file;;
952 { echo "$as_me:952: creating cache $cache_file" >&5
953 echo "$as_me: creating cache $cache_file" >&6;}
957 # Check that the precious variables saved in the cache have kept the same
959 ac_cache_corrupted=false
960 for ac_var in `(set) 2>&1 |
961 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
962 eval ac_old_set=\$ac_cv_env_${ac_var}_set
963 eval ac_new_set=\$ac_env_${ac_var}_set
964 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
965 eval ac_new_val="\$ac_env_${ac_var}_value"
966 case $ac_old_set,$ac_new_set in
968 { echo "$as_me:968: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
969 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
970 ac_cache_corrupted=: ;;
972 { echo "$as_me:972: error: \`$ac_var' was not set in the previous run" >&5
973 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
974 ac_cache_corrupted=: ;;
977 if test "x$ac_old_val" != "x$ac_new_val"; then
978 { echo "$as_me:978: error: \`$ac_var' has changed since the previous run:" >&5
979 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
980 { echo "$as_me:980: former value: $ac_old_val" >&5
981 echo "$as_me: former value: $ac_old_val" >&2;}
982 { echo "$as_me:982: current value: $ac_new_val" >&5
983 echo "$as_me: current value: $ac_new_val" >&2;}
987 # Pass precious variables to config.status. It doesn't matter if
988 # we pass some twice (in addition to the command line arguments).
989 if test "$ac_new_set" = set; then
991 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
992 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
993 ac_configure_args="$ac_configure_args '$ac_arg'"
995 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1000 if $ac_cache_corrupted; then
1001 { echo "$as_me:1001: error: changes in the environment can compromise the build" >&5
1002 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1003 { { echo "$as_me:1003: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1004 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1005 { (exit 1); exit 1; }; }
1009 ac_cpp='$CPP $CPPFLAGS'
1010 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1011 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1012 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1013 ac_main_return=return
1015 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1016 *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1018 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1019 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
1021 echo "#! $SHELL" >conftest.sh
1022 echo "exit 0" >>conftest.sh
1023 chmod +x conftest.sh
1024 if { (echo "$as_me:1024: PATH=\".;.\"; conftest.sh") >&5
1025 (PATH=".;."; conftest.sh) 2>&5
1027 echo "$as_me:1027: \$? = $ac_status" >&5
1028 (exit $ac_status); }; then
1029 ac_path_separator=';'
1033 PATH_SEPARATOR="$ac_path_separator"
1036 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1041 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1042 if test -f $ac_dir/install-sh; then
1044 ac_install_sh="$ac_aux_dir/install-sh -c"
1046 elif test -f $ac_dir/install.sh; then
1048 ac_install_sh="$ac_aux_dir/install.sh -c"
1050 elif test -f $ac_dir/shtool; then
1052 ac_install_sh="$ac_aux_dir/shtool install -c"
1056 if test -z "$ac_aux_dir"; then
1057 { { echo "$as_me:1057: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1058 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1059 { (exit 1); exit 1; }; }
1061 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1062 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1063 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1065 # Make sure we can run config.sub.
1066 $ac_config_sub sun4 >/dev/null 2>&1 ||
1067 { { echo "$as_me:1067: error: cannot run $ac_config_sub" >&5
1068 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1069 { (exit 1); exit 1; }; }
1071 echo "$as_me:1071: checking build system type" >&5
1072 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1073 if test "${ac_cv_build+set}" = set; then
1074 echo $ECHO_N "(cached) $ECHO_C" >&6
1076 ac_cv_build_alias=$build_alias
1077 test -z "$ac_cv_build_alias" &&
1078 ac_cv_build_alias=`$ac_config_guess`
1079 test -z "$ac_cv_build_alias" &&
1080 { { echo "$as_me:1080: error: cannot guess build type; you must specify one" >&5
1081 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1082 { (exit 1); exit 1; }; }
1083 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1084 { { echo "$as_me:1084: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1085 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1086 { (exit 1); exit 1; }; }
1089 echo "$as_me:1089: result: $ac_cv_build" >&5
1090 echo "${ECHO_T}$ac_cv_build" >&6
1092 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1093 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1094 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1096 echo "$as_me:1096: checking host system type" >&5
1097 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1098 if test "${ac_cv_host+set}" = set; then
1099 echo $ECHO_N "(cached) $ECHO_C" >&6
1101 ac_cv_host_alias=$host_alias
1102 test -z "$ac_cv_host_alias" &&
1103 ac_cv_host_alias=$ac_cv_build_alias
1104 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1105 { { echo "$as_me:1105: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1106 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1107 { (exit 1); exit 1; }; }
1110 echo "$as_me:1110: result: $ac_cv_host" >&5
1111 echo "${ECHO_T}$ac_cv_host" >&6
1113 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1114 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1115 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1117 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1118 echo "$as_me:1118: checking target system type" >&5
1119 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1120 if test "${ac_cv_target+set}" = set; then
1121 echo $ECHO_N "(cached) $ECHO_C" >&6
1123 ac_cv_target_alias=$target_alias
1124 test "x$ac_cv_target_alias" = "x" &&
1125 ac_cv_target_alias=$ac_cv_host_alias
1126 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1127 { { echo "$as_me:1127: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1128 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1129 { (exit 1); exit 1; }; }
1132 echo "$as_me:1132: result: $ac_cv_target" >&5
1133 echo "${ECHO_T}$ac_cv_target" >&6
1134 target=$ac_cv_target
1135 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1136 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1137 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1139 # The aliases save the names the user supplied, while $host etc.
1140 # will get canonicalized.
1141 test -n "$target_alias" &&
1142 test "$program_prefix$program_suffix$program_transform_name" = \
1144 program_prefix=${target_alias}-
1145 system_name="$host_os"
1147 system_name="`(uname -s -r) 2>/dev/null`"
1148 if test -z "$system_name" ; then
1149 system_name="`(hostname) 2>/dev/null`"
1152 test -n "$system_name" &&
1153 cat >>confdefs.h <<EOF
1154 #define SYSTEM_NAME "$system_name"
1157 if test "${cf_cv_system_name+set}" = set; then
1158 echo $ECHO_N "(cached) $ECHO_C" >&6
1160 cf_cv_system_name="$system_name"
1163 test -z "$system_name" && system_name="$cf_cv_system_name"
1164 test -n "$cf_cv_system_name" && echo "$as_me:1164: result: Configuring for $cf_cv_system_name" >&5
1165 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1167 if test ".$system_name" != ".$cf_cv_system_name" ; then
1168 echo "$as_me:1168: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1169 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1170 { { echo "$as_me:1170: error: \"Please remove config.cache and try again.\"" >&5
1171 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1172 { (exit 1); exit 1; }; }
1175 # Check whether --with-system-type or --without-system-type was given.
1176 if test "${with_system_type+set}" = set; then
1177 withval="$with_system_type"
1178 { echo "$as_me:1178: WARNING: overriding system type to $withval" >&5
1179 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1180 cf_cv_system_name=$withval
1185 ### Save the given $CFLAGS to allow user-override.
1186 cf_user_CFLAGS="$CFLAGS"
1188 ### Default install-location
1190 echo "$as_me:1190: checking for prefix" >&5
1191 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1192 if test "x$prefix" = "xNONE" ; then
1193 case "$cf_cv_system_name" in
1194 # non-vendor systems don't have a conflict
1195 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1198 (*) prefix=$ac_default_prefix
1202 echo "$as_me:1202: result: $prefix" >&5
1203 echo "${ECHO_T}$prefix" >&6
1205 if test "x$prefix" = "xNONE" ; then
1206 echo "$as_me:1206: checking for default include-directory" >&5
1207 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1208 test -n "$verbose" && echo 1>&6
1211 $includedir/ncurses \
1213 $prefix/include/ncurses \
1214 /usr/local/include \
1215 /usr/local/include/ncurses \
1217 /usr/include/ncurses
1219 cf_dir=`eval echo $cf_symbol`
1220 if test -f $cf_dir/curses.h ; then
1221 if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1222 includedir="$cf_symbol"
1223 test -n "$verbose" && echo $ac_n " found " 1>&6
1227 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1229 echo "$as_me:1229: result: $includedir" >&5
1230 echo "${ECHO_T}$includedir" >&6
1233 ### Checks for programs.
1236 ac_cpp='$CPP $CPPFLAGS'
1237 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1238 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1239 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1240 ac_main_return=return
1241 if test -n "$ac_tool_prefix"; then
1242 for ac_prog in gnatgcc gcc cc
1244 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1245 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1246 echo "$as_me:1246: checking for $ac_word" >&5
1247 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1248 if test "${ac_cv_prog_CC+set}" = set; then
1249 echo $ECHO_N "(cached) $ECHO_C" >&6
1251 if test -n "$CC"; then
1252 ac_cv_prog_CC="$CC" # Let the user override the test.
1254 ac_save_IFS=$IFS; IFS=$ac_path_separator
1256 for ac_dir in $ac_dummy; do
1258 test -z "$ac_dir" && ac_dir=.
1259 $as_executable_p "$ac_dir/$ac_word" || continue
1260 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1261 echo "$as_me:1261: found $ac_dir/$ac_word" >&5
1268 if test -n "$CC"; then
1269 echo "$as_me:1269: result: $CC" >&5
1270 echo "${ECHO_T}$CC" >&6
1272 echo "$as_me:1272: result: no" >&5
1273 echo "${ECHO_T}no" >&6
1276 test -n "$CC" && break
1279 if test -z "$CC"; then
1281 for ac_prog in gnatgcc gcc cc
1283 # Extract the first word of "$ac_prog", so it can be a program name with args.
1284 set dummy $ac_prog; ac_word=$2
1285 echo "$as_me:1285: checking for $ac_word" >&5
1286 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1287 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1288 echo $ECHO_N "(cached) $ECHO_C" >&6
1290 if test -n "$ac_ct_CC"; then
1291 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1293 ac_save_IFS=$IFS; IFS=$ac_path_separator
1295 for ac_dir in $ac_dummy; do
1297 test -z "$ac_dir" && ac_dir=.
1298 $as_executable_p "$ac_dir/$ac_word" || continue
1299 ac_cv_prog_ac_ct_CC="$ac_prog"
1300 echo "$as_me:1300: found $ac_dir/$ac_word" >&5
1306 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1307 if test -n "$ac_ct_CC"; then
1308 echo "$as_me:1308: result: $ac_ct_CC" >&5
1309 echo "${ECHO_T}$ac_ct_CC" >&6
1311 echo "$as_me:1311: result: no" >&5
1312 echo "${ECHO_T}no" >&6
1315 test -n "$ac_ct_CC" && break
1321 test -z "$CC" && { { echo "$as_me:1321: error: no acceptable cc found in \$PATH" >&5
1322 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1323 { (exit 1); exit 1; }; }
1325 # Provide some information about the compiler.
1326 echo "$as_me:1326:" \
1327 "checking for C compiler version" >&5
1328 ac_compiler=`set X $ac_compile; echo $2`
1329 { (eval echo "$as_me:1329: \"$ac_compiler --version </dev/null >&5\"") >&5
1330 (eval $ac_compiler --version </dev/null >&5) 2>&5
1332 echo "$as_me:1332: \$? = $ac_status" >&5
1333 (exit $ac_status); }
1334 { (eval echo "$as_me:1334: \"$ac_compiler -v </dev/null >&5\"") >&5
1335 (eval $ac_compiler -v </dev/null >&5) 2>&5
1337 echo "$as_me:1337: \$? = $ac_status" >&5
1338 (exit $ac_status); }
1339 { (eval echo "$as_me:1339: \"$ac_compiler -V </dev/null >&5\"") >&5
1340 (eval $ac_compiler -V </dev/null >&5) 2>&5
1342 echo "$as_me:1342: \$? = $ac_status" >&5
1343 (exit $ac_status); }
1345 cat >conftest.$ac_ext <<_ACEOF
1346 #line 1346 "configure"
1347 #include "confdefs.h"
1357 ac_clean_files_save=$ac_clean_files
1358 ac_clean_files="$ac_clean_files a.out a.exe"
1359 # Try to create an executable without -o first, disregard a.out.
1360 # It will help us diagnose broken compilers, and finding out an intuition
1362 echo "$as_me:1362: checking for C compiler default output" >&5
1363 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1364 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1365 if { (eval echo "$as_me:1365: \"$ac_link_default\"") >&5
1366 (eval $ac_link_default) 2>&5
1368 echo "$as_me:1368: \$? = $ac_status" >&5
1369 (exit $ac_status); }; then
1370 # Find the output, starting from the most likely. This scheme is
1371 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1373 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1374 ls a.out conftest 2>/dev/null;
1375 ls a.* conftest.* 2>/dev/null`; do
1377 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1378 a.out ) # We found the default executable, but exeext='' is most
1381 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1382 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1389 echo "$as_me: failed program was:" >&5
1390 cat conftest.$ac_ext >&5
1391 { { echo "$as_me:1391: error: C compiler cannot create executables" >&5
1392 echo "$as_me: error: C compiler cannot create executables" >&2;}
1393 { (exit 77); exit 77; }; }
1396 ac_exeext=$ac_cv_exeext
1397 echo "$as_me:1397: result: $ac_file" >&5
1398 echo "${ECHO_T}$ac_file" >&6
1400 # Check the compiler produces executables we can run. If not, either
1401 # the compiler is broken, or we cross compile.
1402 echo "$as_me:1402: checking whether the C compiler works" >&5
1403 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1404 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1405 # If not cross compiling, check that we can run a simple program.
1406 if test "$cross_compiling" != yes; then
1407 if { ac_try='./$ac_file'
1408 { (eval echo "$as_me:1408: \"$ac_try\"") >&5
1411 echo "$as_me:1411: \$? = $ac_status" >&5
1412 (exit $ac_status); }; }; then
1415 if test "$cross_compiling" = maybe; then
1418 { { echo "$as_me:1418: error: cannot run C compiled programs.
1419 If you meant to cross compile, use \`--host'." >&5
1420 echo "$as_me: error: cannot run C compiled programs.
1421 If you meant to cross compile, use \`--host'." >&2;}
1422 { (exit 1); exit 1; }; }
1426 echo "$as_me:1426: result: yes" >&5
1427 echo "${ECHO_T}yes" >&6
1429 rm -f a.out a.exe conftest$ac_cv_exeext
1430 ac_clean_files=$ac_clean_files_save
1431 # Check the compiler produces executables we can run. If not, either
1432 # the compiler is broken, or we cross compile.
1433 echo "$as_me:1433: checking whether we are cross compiling" >&5
1434 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1435 echo "$as_me:1435: result: $cross_compiling" >&5
1436 echo "${ECHO_T}$cross_compiling" >&6
1438 echo "$as_me:1438: checking for executable suffix" >&5
1439 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1440 if { (eval echo "$as_me:1440: \"$ac_link\"") >&5
1441 (eval $ac_link) 2>&5
1443 echo "$as_me:1443: \$? = $ac_status" >&5
1444 (exit $ac_status); }; then
1445 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1446 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1447 # work properly (i.e., refer to `conftest.exe'), while it won't with
1449 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1451 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1452 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1459 { { echo "$as_me:1459: error: cannot compute EXEEXT: cannot compile and link" >&5
1460 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1461 { (exit 1); exit 1; }; }
1464 rm -f conftest$ac_cv_exeext
1465 echo "$as_me:1465: result: $ac_cv_exeext" >&5
1466 echo "${ECHO_T}$ac_cv_exeext" >&6
1468 rm -f conftest.$ac_ext
1469 EXEEXT=$ac_cv_exeext
1471 echo "$as_me:1471: checking for object suffix" >&5
1472 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1473 if test "${ac_cv_objext+set}" = set; then
1474 echo $ECHO_N "(cached) $ECHO_C" >&6
1476 cat >conftest.$ac_ext <<_ACEOF
1477 #line 1477 "configure"
1478 #include "confdefs.h"
1488 rm -f conftest.o conftest.obj
1489 if { (eval echo "$as_me:1489: \"$ac_compile\"") >&5
1490 (eval $ac_compile) 2>&5
1492 echo "$as_me:1492: \$? = $ac_status" >&5
1493 (exit $ac_status); }; then
1494 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1496 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1497 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1502 echo "$as_me: failed program was:" >&5
1503 cat conftest.$ac_ext >&5
1504 { { echo "$as_me:1504: error: cannot compute OBJEXT: cannot compile" >&5
1505 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1506 { (exit 1); exit 1; }; }
1509 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1511 echo "$as_me:1511: result: $ac_cv_objext" >&5
1512 echo "${ECHO_T}$ac_cv_objext" >&6
1513 OBJEXT=$ac_cv_objext
1515 echo "$as_me:1515: checking whether we are using the GNU C compiler" >&5
1516 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1517 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1518 echo $ECHO_N "(cached) $ECHO_C" >&6
1520 cat >conftest.$ac_ext <<_ACEOF
1521 #line 1521 "configure"
1522 #include "confdefs.h"
1535 rm -f conftest.$ac_objext
1536 if { (eval echo "$as_me:1536: \"$ac_compile\"") >&5
1537 (eval $ac_compile) 2>&5
1539 echo "$as_me:1539: \$? = $ac_status" >&5
1540 (exit $ac_status); } &&
1541 { ac_try='test -s conftest.$ac_objext'
1542 { (eval echo "$as_me:1542: \"$ac_try\"") >&5
1545 echo "$as_me:1545: \$? = $ac_status" >&5
1546 (exit $ac_status); }; }; then
1549 echo "$as_me: failed program was:" >&5
1550 cat conftest.$ac_ext >&5
1553 rm -f conftest.$ac_objext conftest.$ac_ext
1554 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1557 echo "$as_me:1557: result: $ac_cv_c_compiler_gnu" >&5
1558 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1559 GCC=`test $ac_compiler_gnu = yes && echo yes`
1560 ac_test_CFLAGS=${CFLAGS+set}
1561 ac_save_CFLAGS=$CFLAGS
1563 echo "$as_me:1563: checking whether $CC accepts -g" >&5
1564 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1565 if test "${ac_cv_prog_cc_g+set}" = set; then
1566 echo $ECHO_N "(cached) $ECHO_C" >&6
1568 cat >conftest.$ac_ext <<_ACEOF
1569 #line 1569 "configure"
1570 #include "confdefs.h"
1580 rm -f conftest.$ac_objext
1581 if { (eval echo "$as_me:1581: \"$ac_compile\"") >&5
1582 (eval $ac_compile) 2>&5
1584 echo "$as_me:1584: \$? = $ac_status" >&5
1585 (exit $ac_status); } &&
1586 { ac_try='test -s conftest.$ac_objext'
1587 { (eval echo "$as_me:1587: \"$ac_try\"") >&5
1590 echo "$as_me:1590: \$? = $ac_status" >&5
1591 (exit $ac_status); }; }; then
1594 echo "$as_me: failed program was:" >&5
1595 cat conftest.$ac_ext >&5
1598 rm -f conftest.$ac_objext conftest.$ac_ext
1600 echo "$as_me:1600: result: $ac_cv_prog_cc_g" >&5
1601 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1602 if test "$ac_test_CFLAGS" = set; then
1603 CFLAGS=$ac_save_CFLAGS
1604 elif test $ac_cv_prog_cc_g = yes; then
1605 if test "$GCC" = yes; then
1611 if test "$GCC" = yes; then
1617 # Some people use a C++ compiler to compile C. Since we use `exit',
1618 # in C++ we need to declare it. In case someone uses the same compiler
1619 # for both compiling C and C++ we need to have the C++ compiler decide
1620 # the declaration of exit, since it's the most demanding environment.
1621 cat >conftest.$ac_ext <<_ACEOF
1626 rm -f conftest.$ac_objext
1627 if { (eval echo "$as_me:1627: \"$ac_compile\"") >&5
1628 (eval $ac_compile) 2>&5
1630 echo "$as_me:1630: \$? = $ac_status" >&5
1631 (exit $ac_status); } &&
1632 { ac_try='test -s conftest.$ac_objext'
1633 { (eval echo "$as_me:1633: \"$ac_try\"") >&5
1636 echo "$as_me:1636: \$? = $ac_status" >&5
1637 (exit $ac_status); }; }; then
1638 for ac_declaration in \
1640 '#include <stdlib.h>' \
1641 'extern "C" void std::exit (int) throw (); using std::exit;' \
1642 'extern "C" void std::exit (int); using std::exit;' \
1643 'extern "C" void exit (int) throw ();' \
1644 'extern "C" void exit (int);' \
1647 cat >conftest.$ac_ext <<_ACEOF
1648 #line 1648 "configure"
1649 #include "confdefs.h"
1660 rm -f conftest.$ac_objext
1661 if { (eval echo "$as_me:1661: \"$ac_compile\"") >&5
1662 (eval $ac_compile) 2>&5
1664 echo "$as_me:1664: \$? = $ac_status" >&5
1665 (exit $ac_status); } &&
1666 { ac_try='test -s conftest.$ac_objext'
1667 { (eval echo "$as_me:1667: \"$ac_try\"") >&5
1670 echo "$as_me:1670: \$? = $ac_status" >&5
1671 (exit $ac_status); }; }; then
1674 echo "$as_me: failed program was:" >&5
1675 cat conftest.$ac_ext >&5
1678 rm -f conftest.$ac_objext conftest.$ac_ext
1679 cat >conftest.$ac_ext <<_ACEOF
1680 #line 1680 "configure"
1681 #include "confdefs.h"
1691 rm -f conftest.$ac_objext
1692 if { (eval echo "$as_me:1692: \"$ac_compile\"") >&5
1693 (eval $ac_compile) 2>&5
1695 echo "$as_me:1695: \$? = $ac_status" >&5
1696 (exit $ac_status); } &&
1697 { ac_try='test -s conftest.$ac_objext'
1698 { (eval echo "$as_me:1698: \"$ac_try\"") >&5
1701 echo "$as_me:1701: \$? = $ac_status" >&5
1702 (exit $ac_status); }; }; then
1705 echo "$as_me: failed program was:" >&5
1706 cat conftest.$ac_ext >&5
1708 rm -f conftest.$ac_objext conftest.$ac_ext
1711 if test -n "$ac_declaration"; then
1712 echo '#ifdef __cplusplus' >>confdefs.h
1713 echo $ac_declaration >>confdefs.h
1714 echo '#endif' >>confdefs.h
1718 echo "$as_me: failed program was:" >&5
1719 cat conftest.$ac_ext >&5
1721 rm -f conftest.$ac_objext conftest.$ac_ext
1723 ac_cpp='$CPP $CPPFLAGS'
1724 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1725 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1726 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1727 ac_main_return=return
1730 if test "$GCC" = yes ; then
1731 echo "$as_me:1731: checking version of $CC" >&5
1732 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1733 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.].*//'`"
1734 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1735 echo "$as_me:1735: result: $GCC_VERSION" >&5
1736 echo "${ECHO_T}$GCC_VERSION" >&6
1739 echo "$as_me:1739: checking for $CC option to accept ANSI C" >&5
1740 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1741 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1742 echo $ECHO_N "(cached) $ECHO_C" >&6
1744 ac_cv_prog_cc_stdc=no
1746 cat >conftest.$ac_ext <<_ACEOF
1747 #line 1747 "configure"
1748 #include "confdefs.h"
1751 #include <sys/types.h>
1752 #include <sys/stat.h>
1753 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1754 struct buf { int x; };
1755 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1756 static char *e (p, i)
1762 static char *f (char * (*g) (char **, int), char **p, ...)
1767 s = g (p, va_arg (v,int));
1771 int test (int i, double x);
1772 struct s1 {int (*f) (int a);};
1773 struct s2 {int (*f) (double a);};
1774 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1780 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1785 # Don't try gcc -ansi; that turns off useful extensions and
1786 # breaks some systems' header files.
1787 # AIX -qlanglvl=ansi
1788 # Ultrix and OSF/1 -std1
1789 # HP-UX 10.20 and later -Ae
1790 # HP-UX older versions -Aa -D_HPUX_SOURCE
1791 # SVR4 -Xc -D__EXTENSIONS__
1792 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1794 CC="$ac_save_CC $ac_arg"
1795 rm -f conftest.$ac_objext
1796 if { (eval echo "$as_me:1796: \"$ac_compile\"") >&5
1797 (eval $ac_compile) 2>&5
1799 echo "$as_me:1799: \$? = $ac_status" >&5
1800 (exit $ac_status); } &&
1801 { ac_try='test -s conftest.$ac_objext'
1802 { (eval echo "$as_me:1802: \"$ac_try\"") >&5
1805 echo "$as_me:1805: \$? = $ac_status" >&5
1806 (exit $ac_status); }; }; then
1807 ac_cv_prog_cc_stdc=$ac_arg
1810 echo "$as_me: failed program was:" >&5
1811 cat conftest.$ac_ext >&5
1813 rm -f conftest.$ac_objext
1815 rm -f conftest.$ac_ext conftest.$ac_objext
1820 case "x$ac_cv_prog_cc_stdc" in
1822 echo "$as_me:1822: result: none needed" >&5
1823 echo "${ECHO_T}none needed" >&6 ;;
1825 echo "$as_me:1825: result: $ac_cv_prog_cc_stdc" >&5
1826 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1827 CC="$CC $ac_cv_prog_cc_stdc" ;;
1830 # This should have been defined by AC_PROG_CC
1833 echo "$as_me:1833: checking \$CC variable" >&5
1834 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1837 echo "$as_me:1837: result: broken" >&5
1838 echo "${ECHO_T}broken" >&6
1839 { echo "$as_me:1839: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1840 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1842 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
1843 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
1845 for cf_arg in $cf_flags
1853 cf_new_extra_cppflags=
1855 for cf_add_cflags in $cf_arg
1857 case $cf_fix_cppflags in
1859 case $cf_add_cflags in
1860 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1861 case $cf_add_cflags in
1863 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1865 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1866 && test -z "${cf_tst_cflags}" \
1867 && cf_fix_cppflags=yes
1869 if test $cf_fix_cppflags = yes ; then
1871 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1872 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1875 elif test "${cf_tst_cflags}" = "\"'" ; then
1877 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1878 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1888 case $cf_add_cflags in
1890 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1892 CPPFLAGS=`echo "$CPPFLAGS" | \
1893 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1894 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1899 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
1900 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
1907 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
1908 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
1915 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1916 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1918 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1920 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1921 && test -z "${cf_tst_cflags}" \
1922 && cf_fix_cppflags=no
1927 if test -n "$cf_new_cflags" ; then
1929 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
1930 CFLAGS="${CFLAGS}$cf_new_cflags"
1934 if test -n "$cf_new_cppflags" ; then
1936 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
1937 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
1941 if test -n "$cf_new_extra_cppflags" ; then
1943 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
1944 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
1954 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
1956 echo "${as_me:-configure}:1956: testing resulting CC: '$CC' ..." 1>&5
1958 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
1960 echo "${as_me:-configure}:1960: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
1962 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
1964 echo "${as_me:-configure}:1964: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
1968 echo "$as_me:1968: result: ok" >&5
1969 echo "${ECHO_T}ok" >&6
1974 ac_cpp='$CPP $CPPFLAGS'
1975 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1976 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1977 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1978 ac_main_return=return
1979 echo "$as_me:1979: checking how to run the C preprocessor" >&5
1980 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1981 # On Suns, sometimes $CPP names a directory.
1982 if test -n "$CPP" && test -d "$CPP"; then
1985 if test -z "$CPP"; then
1986 if test "${ac_cv_prog_CPP+set}" = set; then
1987 echo $ECHO_N "(cached) $ECHO_C" >&6
1989 # Double quotes because CPP needs to be expanded
1990 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1993 for ac_c_preproc_warn_flag in '' yes
1995 # Use a header file that comes with gcc, so configuring glibc
1996 # with a fresh cross-compiler works.
1997 # On the NeXT, cc -E runs the code through the compiler's parser,
1998 # not just through cpp. "Syntax error" is here to catch this case.
1999 cat >conftest.$ac_ext <<_ACEOF
2000 #line 2000 "configure"
2001 #include "confdefs.h"
2005 if { (eval echo "$as_me:2005: \"$ac_cpp conftest.$ac_ext\"") >&5
2006 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2008 egrep -v '^ *\+' conftest.er1 >conftest.err
2010 cat conftest.err >&5
2011 echo "$as_me:2011: \$? = $ac_status" >&5
2012 (exit $ac_status); } >/dev/null; then
2013 if test -s conftest.err; then
2014 ac_cpp_err=$ac_c_preproc_warn_flag
2021 if test -z "$ac_cpp_err"; then
2024 echo "$as_me: failed program was:" >&5
2025 cat conftest.$ac_ext >&5
2026 # Broken: fails on valid input.
2029 rm -f conftest.err conftest.$ac_ext
2031 # OK, works on sane cases. Now check whether non-existent headers
2032 # can be detected and how.
2033 cat >conftest.$ac_ext <<_ACEOF
2034 #line 2034 "configure"
2035 #include "confdefs.h"
2036 #include <ac_nonexistent.h>
2038 if { (eval echo "$as_me:2038: \"$ac_cpp conftest.$ac_ext\"") >&5
2039 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2041 egrep -v '^ *\+' conftest.er1 >conftest.err
2043 cat conftest.err >&5
2044 echo "$as_me:2044: \$? = $ac_status" >&5
2045 (exit $ac_status); } >/dev/null; then
2046 if test -s conftest.err; then
2047 ac_cpp_err=$ac_c_preproc_warn_flag
2054 if test -z "$ac_cpp_err"; then
2055 # Broken: success on invalid input.
2058 echo "$as_me: failed program was:" >&5
2059 cat conftest.$ac_ext >&5
2060 # Passes both tests.
2064 rm -f conftest.err conftest.$ac_ext
2067 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2068 rm -f conftest.err conftest.$ac_ext
2069 if $ac_preproc_ok; then
2081 echo "$as_me:2081: result: $CPP" >&5
2082 echo "${ECHO_T}$CPP" >&6
2084 for ac_c_preproc_warn_flag in '' yes
2086 # Use a header file that comes with gcc, so configuring glibc
2087 # with a fresh cross-compiler works.
2088 # On the NeXT, cc -E runs the code through the compiler's parser,
2089 # not just through cpp. "Syntax error" is here to catch this case.
2090 cat >conftest.$ac_ext <<_ACEOF
2091 #line 2091 "configure"
2092 #include "confdefs.h"
2096 if { (eval echo "$as_me:2096: \"$ac_cpp conftest.$ac_ext\"") >&5
2097 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2099 egrep -v '^ *\+' conftest.er1 >conftest.err
2101 cat conftest.err >&5
2102 echo "$as_me:2102: \$? = $ac_status" >&5
2103 (exit $ac_status); } >/dev/null; then
2104 if test -s conftest.err; then
2105 ac_cpp_err=$ac_c_preproc_warn_flag
2112 if test -z "$ac_cpp_err"; then
2115 echo "$as_me: failed program was:" >&5
2116 cat conftest.$ac_ext >&5
2117 # Broken: fails on valid input.
2120 rm -f conftest.err conftest.$ac_ext
2122 # OK, works on sane cases. Now check whether non-existent headers
2123 # can be detected and how.
2124 cat >conftest.$ac_ext <<_ACEOF
2125 #line 2125 "configure"
2126 #include "confdefs.h"
2127 #include <ac_nonexistent.h>
2129 if { (eval echo "$as_me:2129: \"$ac_cpp conftest.$ac_ext\"") >&5
2130 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2132 egrep -v '^ *\+' conftest.er1 >conftest.err
2134 cat conftest.err >&5
2135 echo "$as_me:2135: \$? = $ac_status" >&5
2136 (exit $ac_status); } >/dev/null; then
2137 if test -s conftest.err; then
2138 ac_cpp_err=$ac_c_preproc_warn_flag
2145 if test -z "$ac_cpp_err"; then
2146 # Broken: success on invalid input.
2149 echo "$as_me: failed program was:" >&5
2150 cat conftest.$ac_ext >&5
2151 # Passes both tests.
2155 rm -f conftest.err conftest.$ac_ext
2158 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2159 rm -f conftest.err conftest.$ac_ext
2160 if $ac_preproc_ok; then
2163 { { echo "$as_me:2163: error: C preprocessor \"$CPP\" fails sanity check" >&5
2164 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2165 { (exit 1); exit 1; }; }
2169 ac_cpp='$CPP $CPPFLAGS'
2170 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2171 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2172 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2173 ac_main_return=return
2175 if test $ac_cv_c_compiler_gnu = yes; then
2176 echo "$as_me:2176: checking whether $CC needs -traditional" >&5
2177 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2178 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2179 echo $ECHO_N "(cached) $ECHO_C" >&6
2181 ac_pattern="Autoconf.*'x'"
2182 cat >conftest.$ac_ext <<_ACEOF
2183 #line 2183 "configure"
2184 #include "confdefs.h"
2186 int Autoconf = TIOCGETP;
2188 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2189 egrep "$ac_pattern" >/dev/null 2>&1; then
2190 ac_cv_prog_gcc_traditional=yes
2192 ac_cv_prog_gcc_traditional=no
2196 if test $ac_cv_prog_gcc_traditional = no; then
2197 cat >conftest.$ac_ext <<_ACEOF
2198 #line 2198 "configure"
2199 #include "confdefs.h"
2201 int Autoconf = TCGETA;
2203 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2204 egrep "$ac_pattern" >/dev/null 2>&1; then
2205 ac_cv_prog_gcc_traditional=yes
2211 echo "$as_me:2211: result: $ac_cv_prog_gcc_traditional" >&5
2212 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2213 if test $ac_cv_prog_gcc_traditional = yes; then
2214 CC="$CC -traditional"
2218 echo "$as_me:2218: checking whether $CC understands -c and -o together" >&5
2219 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2220 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2221 echo $ECHO_N "(cached) $ECHO_C" >&6
2224 cat > conftest.$ac_ext <<CF_EOF
2227 ${cf_cv_main_return:-return}(0);
2230 # We do the test twice because some compilers refuse to overwrite an
2231 # existing .o file with -o, though they will create one.
2232 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2233 if { (eval echo "$as_me:2233: \"$ac_try\"") >&5
2236 echo "$as_me:2236: \$? = $ac_status" >&5
2237 (exit $ac_status); } &&
2238 test -f conftest2.$ac_objext && { (eval echo "$as_me:2238: \"$ac_try\"") >&5
2241 echo "$as_me:2241: \$? = $ac_status" >&5
2242 (exit $ac_status); };
2244 eval cf_cv_prog_CC_c_o=yes
2246 eval cf_cv_prog_CC_c_o=no
2251 if test $cf_cv_prog_CC_c_o = yes; then
2252 echo "$as_me:2252: result: yes" >&5
2253 echo "${ECHO_T}yes" >&6
2255 echo "$as_me:2255: result: no" >&5
2256 echo "${ECHO_T}no" >&6
2259 test "$program_prefix" != NONE &&
2260 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2261 # Use a double $ so make ignores it.
2262 test "$program_suffix" != NONE &&
2263 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2264 # Double any \ or $. echo might interpret backslashes.
2265 # By default was `s,x,x', remove it if useless.
2266 cat <<\_ACEOF >conftest.sed
2267 s/[\\$]/&&/g;s/;s,x,x,$//
2269 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2272 for ac_prog in mawk gawk nawk awk
2274 # Extract the first word of "$ac_prog", so it can be a program name with args.
2275 set dummy $ac_prog; ac_word=$2
2276 echo "$as_me:2276: checking for $ac_word" >&5
2277 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2278 if test "${ac_cv_prog_AWK+set}" = set; then
2279 echo $ECHO_N "(cached) $ECHO_C" >&6
2281 if test -n "$AWK"; then
2282 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2284 ac_save_IFS=$IFS; IFS=$ac_path_separator
2286 for ac_dir in $ac_dummy; do
2288 test -z "$ac_dir" && ac_dir=.
2289 $as_executable_p "$ac_dir/$ac_word" || continue
2290 ac_cv_prog_AWK="$ac_prog"
2291 echo "$as_me:2291: found $ac_dir/$ac_word" >&5
2298 if test -n "$AWK"; then
2299 echo "$as_me:2299: result: $AWK" >&5
2300 echo "${ECHO_T}$AWK" >&6
2302 echo "$as_me:2302: result: no" >&5
2303 echo "${ECHO_T}no" >&6
2306 test -n "$AWK" && break
2309 test -z "$AWK" && { { echo "$as_me:2309: error: No awk program found" >&5
2310 echo "$as_me: error: No awk program found" >&2;}
2311 { (exit 1); exit 1; }; }
2313 echo "$as_me:2313: checking for egrep" >&5
2314 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2315 if test "${ac_cv_prog_egrep+set}" = set; then
2316 echo $ECHO_N "(cached) $ECHO_C" >&6
2318 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2319 then ac_cv_prog_egrep='grep -E'
2320 else ac_cv_prog_egrep='egrep'
2323 echo "$as_me:2323: result: $ac_cv_prog_egrep" >&5
2324 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2325 EGREP=$ac_cv_prog_egrep
2327 test -z "$EGREP" && { { echo "$as_me:2327: error: No egrep program found" >&5
2328 echo "$as_me: error: No egrep program found" >&2;}
2329 { (exit 1); exit 1; }; }
2331 # Find a good install program. We prefer a C program (faster),
2332 # so one script is as good as another. But avoid the broken or
2333 # incompatible versions:
2334 # SysV /etc/install, /usr/sbin/install
2335 # SunOS /usr/etc/install
2336 # IRIX /sbin/install
2338 # AmigaOS /C/install, which installs bootblocks on floppy discs
2339 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2340 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2341 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2342 # ./install, which can be erroneously created by make from ./install.sh.
2343 echo "$as_me:2343: checking for a BSD compatible install" >&5
2344 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2345 if test -z "$INSTALL"; then
2346 if test "${ac_cv_path_install+set}" = set; then
2347 echo $ECHO_N "(cached) $ECHO_C" >&6
2349 ac_save_IFS=$IFS; IFS=$ac_path_separator
2350 for ac_dir in $PATH; do
2352 # Account for people who put trailing slashes in PATH elements.
2354 / | ./ | .// | /cC/* \
2355 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2358 # OSF1 and SCO ODT 3.0 have their own names for install.
2359 # Don't use installbsd from OSF since it installs stuff as root
2361 for ac_prog in ginstall scoinst install; do
2362 if $as_executable_p "$ac_dir/$ac_prog"; then
2363 if test $ac_prog = install &&
2364 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2365 # AIX install. It has an incompatible calling convention.
2367 elif test $ac_prog = install &&
2368 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2369 # program-specific install script used by HP pwplus--don't use.
2372 ac_cv_path_install="$ac_dir/$ac_prog -c"
2382 if test "${ac_cv_path_install+set}" = set; then
2383 INSTALL=$ac_cv_path_install
2385 # As a last resort, use the slow shell script. We don't cache a
2386 # path for INSTALL within a source directory, because that will
2387 # break other packages using the cache if that directory is
2388 # removed, or if the path is relative.
2389 INSTALL=$ac_install_sh
2392 echo "$as_me:2392: result: $INSTALL" >&5
2393 echo "${ECHO_T}$INSTALL" >&6
2395 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2396 # It thinks the first close brace ends the variable substitution.
2397 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2399 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2401 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2403 echo "$as_me:2403: checking whether ln -s works" >&5
2404 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2406 if test "$LN_S" = "ln -s"; then
2407 echo "$as_me:2407: result: yes" >&5
2408 echo "${ECHO_T}yes" >&6
2410 echo "$as_me:2410: result: no, using $LN_S" >&5
2411 echo "${ECHO_T}no, using $LN_S" >&6
2414 echo "$as_me:2414: checking if $LN_S -f options work" >&5
2415 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2417 rm -f conf$$.src conf$$dst
2419 echo first >conf$$.src
2420 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2425 rm -f conf$$.dst conf$$src
2426 echo "$as_me:2426: result: $cf_prog_ln_sf" >&5
2427 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2429 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2431 # Find a good install program. We prefer a C program (faster),
2432 # so one script is as good as another. But avoid the broken or
2433 # incompatible versions:
2434 # SysV /etc/install, /usr/sbin/install
2435 # SunOS /usr/etc/install
2436 # IRIX /sbin/install
2438 # AmigaOS /C/install, which installs bootblocks on floppy discs
2439 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2440 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2441 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2442 # ./install, which can be erroneously created by make from ./install.sh.
2443 echo "$as_me:2443: checking for a BSD compatible install" >&5
2444 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2445 if test -z "$INSTALL"; then
2446 if test "${ac_cv_path_install+set}" = set; then
2447 echo $ECHO_N "(cached) $ECHO_C" >&6
2449 ac_save_IFS=$IFS; IFS=$ac_path_separator
2450 for ac_dir in $PATH; do
2452 # Account for people who put trailing slashes in PATH elements.
2454 / | ./ | .// | /cC/* \
2455 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2458 # OSF1 and SCO ODT 3.0 have their own names for install.
2459 # Don't use installbsd from OSF since it installs stuff as root
2461 for ac_prog in ginstall scoinst install; do
2462 if $as_executable_p "$ac_dir/$ac_prog"; then
2463 if test $ac_prog = install &&
2464 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2465 # AIX install. It has an incompatible calling convention.
2467 elif test $ac_prog = install &&
2468 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2469 # program-specific install script used by HP pwplus--don't use.
2472 ac_cv_path_install="$ac_dir/$ac_prog -c"
2482 if test "${ac_cv_path_install+set}" = set; then
2483 INSTALL=$ac_cv_path_install
2485 # As a last resort, use the slow shell script. We don't cache a
2486 # path for INSTALL within a source directory, because that will
2487 # break other packages using the cache if that directory is
2488 # removed, or if the path is relative.
2489 INSTALL=$ac_install_sh
2492 echo "$as_me:2492: result: $INSTALL" >&5
2493 echo "${ECHO_T}$INSTALL" >&6
2495 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2496 # It thinks the first close brace ends the variable substitution.
2497 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2499 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2501 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2507 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2508 test -z "$cf_dir" && cf_dir=.
2509 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2513 echo "$as_me:2513: checking if you want to install stripped executables" >&5
2514 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2516 # Check whether --enable-stripping or --disable-stripping was given.
2517 if test "${enable_stripping+set}" = set; then
2518 enableval="$enable_stripping"
2519 test "$enableval" != no && enableval=yes
2520 if test "$enableval" != "yes" ; then
2530 echo "$as_me:2530: result: $with_stripping" >&5
2531 echo "${ECHO_T}$with_stripping" >&6
2533 if test "$with_stripping" = yes
2540 echo "$as_me:2540: checking if install needs to be told about ownership" >&5
2541 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
2542 case `$ac_config_guess` in
2551 echo "$as_me:2551: result: $with_install_o" >&5
2552 echo "${ECHO_T}$with_install_o" >&6
2553 if test "x$with_install_o" = xyes
2555 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'`
2560 echo "$as_me:2560: checking for long file names" >&5
2561 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2562 if test "${ac_cv_sys_long_file_names+set}" = set; then
2563 echo $ECHO_N "(cached) $ECHO_C" >&6
2565 ac_cv_sys_long_file_names=yes
2566 # Test for long file names in all the places we know might matter:
2567 # . the current directory, where building will happen
2568 # $prefix/lib where we will be installing things
2569 # $exec_prefix/lib likewise
2570 # eval it to expand exec_prefix.
2571 # $TMPDIR if set, where it might want to write temporary files
2572 # if $TMPDIR is not set:
2573 # /tmp where it might want to write temporary files
2576 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2579 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2581 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2582 test -d $ac_dir || continue
2583 test -w $ac_dir || continue # It is less confusing to not echo anything here.
2584 ac_xdir=$ac_dir/cf$$
2585 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2586 ac_tf1=$ac_xdir/conftest9012345
2587 ac_tf2=$ac_xdir/conftest9012346
2588 (echo 1 >$ac_tf1) 2>/dev/null
2589 (echo 2 >$ac_tf2) 2>/dev/null
2590 ac_val=`cat $ac_tf1 2>/dev/null`
2591 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2592 ac_cv_sys_long_file_names=no
2593 rm -rf $ac_xdir 2>/dev/null
2596 rm -rf $ac_xdir 2>/dev/null
2599 echo "$as_me:2599: result: $ac_cv_sys_long_file_names" >&5
2600 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2601 if test $ac_cv_sys_long_file_names = yes; then
2603 cat >>confdefs.h <<\EOF
2604 #define HAVE_LONG_FILE_NAMES 1
2609 # if we find pkg-config, check if we should install the ".pc" files.
2611 echo "$as_me:2611: checking if you want to use pkg-config" >&5
2612 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2614 # Check whether --with-pkg-config or --without-pkg-config was given.
2615 if test "${with_pkg_config+set}" = set; then
2616 withval="$with_pkg_config"
2617 cf_pkg_config=$withval
2621 echo "$as_me:2621: result: $cf_pkg_config" >&5
2622 echo "${ECHO_T}$cf_pkg_config" >&6
2624 case $cf_pkg_config in
2630 if test -n "$ac_tool_prefix"; then
2631 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
2632 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
2633 echo "$as_me:2633: checking for $ac_word" >&5
2634 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2635 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2636 echo $ECHO_N "(cached) $ECHO_C" >&6
2640 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2643 ac_save_IFS=$IFS; IFS=$ac_path_separator
2645 for ac_dir in $ac_dummy; do
2647 test -z "$ac_dir" && ac_dir=.
2648 if $as_executable_p "$ac_dir/$ac_word"; then
2649 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2650 echo "$as_me:2650: found $ac_dir/$ac_word" >&5
2658 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2660 if test -n "$PKG_CONFIG"; then
2661 echo "$as_me:2661: result: $PKG_CONFIG" >&5
2662 echo "${ECHO_T}$PKG_CONFIG" >&6
2664 echo "$as_me:2664: result: no" >&5
2665 echo "${ECHO_T}no" >&6
2669 if test -z "$ac_cv_path_PKG_CONFIG"; then
2670 ac_pt_PKG_CONFIG=$PKG_CONFIG
2671 # Extract the first word of "pkg-config", so it can be a program name with args.
2672 set dummy pkg-config; ac_word=$2
2673 echo "$as_me:2673: checking for $ac_word" >&5
2674 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2675 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
2676 echo $ECHO_N "(cached) $ECHO_C" >&6
2678 case $ac_pt_PKG_CONFIG in
2680 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
2683 ac_save_IFS=$IFS; IFS=$ac_path_separator
2685 for ac_dir in $ac_dummy; do
2687 test -z "$ac_dir" && ac_dir=.
2688 if $as_executable_p "$ac_dir/$ac_word"; then
2689 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
2690 echo "$as_me:2690: found $ac_dir/$ac_word" >&5
2695 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
2699 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
2701 if test -n "$ac_pt_PKG_CONFIG"; then
2702 echo "$as_me:2702: result: $ac_pt_PKG_CONFIG" >&5
2703 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
2705 echo "$as_me:2705: result: no" >&5
2706 echo "${ECHO_T}no" >&6
2709 PKG_CONFIG=$ac_pt_PKG_CONFIG
2711 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
2720 test -z "$PKG_CONFIG" && PKG_CONFIG=none
2721 if test "$PKG_CONFIG" != none ; then
2723 if test "x$prefix" != xNONE; then
2724 cf_path_syntax="$prefix"
2726 cf_path_syntax="$ac_default_prefix"
2729 case ".$PKG_CONFIG" in
2734 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
2736 (.\${*prefix}*|.\${*dir}*)
2737 eval PKG_CONFIG="$PKG_CONFIG"
2738 case ".$PKG_CONFIG" in
2740 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2745 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2748 { { echo "$as_me:2748: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
2749 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
2750 { (exit 1); exit 1; }; }
2754 elif test "x$cf_pkg_config" != xno ; then
2755 { echo "$as_me:2755: WARNING: pkg-config is not installed" >&5
2756 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
2761 echo "$as_me:2761: checking for pkg-config library directory" >&5
2762 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
2765 echo "$as_me:2765: checking for $PKG_CONFIG library directory" >&5
2766 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
2770 PKG_CONFIG_LIBDIR=no
2772 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
2773 if test "${with_pkg_config_libdir+set}" = set; then
2774 withval="$with_pkg_config_libdir"
2775 PKG_CONFIG_LIBDIR=$withval
2777 test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
2780 case x$PKG_CONFIG_LIBDIR in
2784 # Look for the library directory using the same prefix as the executable
2785 if test "x$PKG_CONFIG" = xnone
2789 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
2792 # If you don't like using the default architecture, you have to specify the
2793 # intended library directory and corresponding compiler/linker options.
2795 # This case allows for Debian's 2014-flavor of multiarch, along with the
2796 # most common variations before that point. Some other variants spell the
2797 # directory differently, e.g., "pkg-config", and put it in unusual places.
2798 # pkg-config has always been poorly standardized, which is ironic...
2799 case x`(arch) 2>/dev/null` in
2802 $cf_path/lib/*64-linux-gnu \
2810 $cf_path/lib/*-linux-gnu \
2818 test -n "$verbose" && echo " list..." 1>&6
2820 echo "${as_me:-configure}:2820: testing list... ..." 1>&5
2822 for cf_config in $cf_search_path
2824 test -n "$verbose" && echo " checking $cf_config/pkgconfig" 1>&6
2826 echo "${as_me:-configure}:2826: testing checking $cf_config/pkgconfig ..." 1>&5
2828 if test -d $cf_config/pkgconfig
2830 PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
2831 echo "$as_me:2831: checking done" >&5
2832 echo $ECHO_N "checking done... $ECHO_C" >&6
2841 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
2842 echo "$as_me:2842: result: $PKG_CONFIG_LIBDIR" >&5
2843 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
2846 echo "$as_me:2846: checking if you want to build test-programs" >&5
2847 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2849 # Check whether --with-tests or --without-tests was given.
2850 if test "${with_tests+set}" = set; then
2851 withval="$with_tests"
2852 cf_with_tests=$withval
2856 echo "$as_me:2856: result: $cf_with_tests" >&5
2857 echo "${ECHO_T}$cf_with_tests" >&6
2859 echo "$as_me:2859: checking if we should assume mixed-case filenames" >&5
2860 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
2862 # Check whether --enable-mixed-case or --disable-mixed-case was given.
2863 if test "${enable_mixed_case+set}" = set; then
2864 enableval="$enable_mixed_case"
2865 enable_mixedcase=$enableval
2867 enable_mixedcase=auto
2869 echo "$as_me:2869: result: $enable_mixedcase" >&5
2870 echo "${ECHO_T}$enable_mixedcase" >&6
2871 if test "$enable_mixedcase" = "auto" ; then
2873 echo "$as_me:2873: checking if filesystem supports mixed-case filenames" >&5
2874 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2875 if test "${cf_cv_mixedcase+set}" = set; then
2876 echo $ECHO_N "(cached) $ECHO_C" >&6
2879 if test "$cross_compiling" = yes ; then
2880 case $target_alias in
2881 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2889 rm -f conftest CONFTEST
2891 if test -f CONFTEST ; then
2896 rm -f conftest CONFTEST
2900 echo "$as_me:2900: result: $cf_cv_mixedcase" >&5
2901 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2902 test "$cf_cv_mixedcase" = yes &&
2903 cat >>confdefs.h <<\EOF
2904 #define MIXEDCASE_FILENAMES 1
2908 cf_cv_mixedcase=$enable_mixedcase
2909 if test "$enable_mixedcase" = "yes" ; then
2910 cat >>confdefs.h <<\EOF
2911 #define MIXEDCASE_FILENAMES 1
2917 # do this after mixed-case option (tags/TAGS is not as important as tic).
2918 echo "$as_me:2918: checking whether ${MAKE-make} sets \${MAKE}" >&5
2919 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2920 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2921 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2922 echo $ECHO_N "(cached) $ECHO_C" >&6
2924 cat >conftest.make <<\EOF
2926 @echo 'ac_maketemp="${MAKE}"'
2928 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2929 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2930 if test -n "$ac_maketemp"; then
2931 eval ac_cv_prog_make_${ac_make}_set=yes
2933 eval ac_cv_prog_make_${ac_make}_set=no
2937 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2938 echo "$as_me:2938: result: yes" >&5
2939 echo "${ECHO_T}yes" >&6
2942 echo "$as_me:2942: result: no" >&5
2943 echo "${ECHO_T}no" >&6
2944 SET_MAKE="MAKE=${MAKE-make}"
2947 for ac_prog in exctags ctags
2949 # Extract the first word of "$ac_prog", so it can be a program name with args.
2950 set dummy $ac_prog; ac_word=$2
2951 echo "$as_me:2951: checking for $ac_word" >&5
2952 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2953 if test "${ac_cv_prog_CTAGS+set}" = set; then
2954 echo $ECHO_N "(cached) $ECHO_C" >&6
2956 if test -n "$CTAGS"; then
2957 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
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 $as_executable_p "$ac_dir/$ac_word" || continue
2965 ac_cv_prog_CTAGS="$ac_prog"
2966 echo "$as_me:2966: found $ac_dir/$ac_word" >&5
2972 CTAGS=$ac_cv_prog_CTAGS
2973 if test -n "$CTAGS"; then
2974 echo "$as_me:2974: result: $CTAGS" >&5
2975 echo "${ECHO_T}$CTAGS" >&6
2977 echo "$as_me:2977: result: no" >&5
2978 echo "${ECHO_T}no" >&6
2981 test -n "$CTAGS" && break
2984 for ac_prog in exetags etags
2986 # Extract the first word of "$ac_prog", so it can be a program name with args.
2987 set dummy $ac_prog; ac_word=$2
2988 echo "$as_me:2988: checking for $ac_word" >&5
2989 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2990 if test "${ac_cv_prog_ETAGS+set}" = set; then
2991 echo $ECHO_N "(cached) $ECHO_C" >&6
2993 if test -n "$ETAGS"; then
2994 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2996 ac_save_IFS=$IFS; IFS=$ac_path_separator
2998 for ac_dir in $ac_dummy; do
3000 test -z "$ac_dir" && ac_dir=.
3001 $as_executable_p "$ac_dir/$ac_word" || continue
3002 ac_cv_prog_ETAGS="$ac_prog"
3003 echo "$as_me:3003: found $ac_dir/$ac_word" >&5
3009 ETAGS=$ac_cv_prog_ETAGS
3010 if test -n "$ETAGS"; then
3011 echo "$as_me:3011: result: $ETAGS" >&5
3012 echo "${ECHO_T}$ETAGS" >&6
3014 echo "$as_me:3014: result: no" >&5
3015 echo "${ECHO_T}no" >&6
3018 test -n "$ETAGS" && break
3021 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3022 set dummy ${CTAGS:-ctags}; ac_word=$2
3023 echo "$as_me:3023: checking for $ac_word" >&5
3024 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3025 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3026 echo $ECHO_N "(cached) $ECHO_C" >&6
3028 if test -n "$MAKE_LOWER_TAGS"; then
3029 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3031 ac_save_IFS=$IFS; IFS=$ac_path_separator
3033 for ac_dir in $ac_dummy; do
3035 test -z "$ac_dir" && ac_dir=.
3036 $as_executable_p "$ac_dir/$ac_word" || continue
3037 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3038 echo "$as_me:3038: found $ac_dir/$ac_word" >&5
3042 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3045 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3046 if test -n "$MAKE_LOWER_TAGS"; then
3047 echo "$as_me:3047: result: $MAKE_LOWER_TAGS" >&5
3048 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3050 echo "$as_me:3050: result: no" >&5
3051 echo "${ECHO_T}no" >&6
3054 if test "$cf_cv_mixedcase" = yes ; then
3055 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3056 set dummy ${ETAGS:-etags}; ac_word=$2
3057 echo "$as_me:3057: checking for $ac_word" >&5
3058 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3059 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3060 echo $ECHO_N "(cached) $ECHO_C" >&6
3062 if test -n "$MAKE_UPPER_TAGS"; then
3063 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3065 ac_save_IFS=$IFS; IFS=$ac_path_separator
3067 for ac_dir in $ac_dummy; do
3069 test -z "$ac_dir" && ac_dir=.
3070 $as_executable_p "$ac_dir/$ac_word" || continue
3071 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3072 echo "$as_me:3072: found $ac_dir/$ac_word" >&5
3076 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3079 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3080 if test -n "$MAKE_UPPER_TAGS"; then
3081 echo "$as_me:3081: result: $MAKE_UPPER_TAGS" >&5
3082 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3084 echo "$as_me:3084: result: no" >&5
3085 echo "${ECHO_T}no" >&6
3092 if test "$MAKE_UPPER_TAGS" = yes ; then
3098 if test "$MAKE_LOWER_TAGS" = yes ; then
3104 echo "$as_me:3104: checking for makeflags variable" >&5
3105 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3106 if test "${cf_cv_makeflags+set}" = set; then
3107 echo $ECHO_N "(cached) $ECHO_C" >&6
3111 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3113 cat >cf_makeflags.tmp <<CF_EOF
3116 @ echo '.$cf_option'
3118 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ ]*$,,'`
3119 case "$cf_result" in
3121 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3122 case "$cf_result" in
3123 (.*CC=*) cf_cv_makeflags=
3125 (*) cf_cv_makeflags=$cf_option
3134 echo "${as_me:-configure}:3134: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3139 rm -f cf_makeflags.tmp
3142 echo "$as_me:3142: result: $cf_cv_makeflags" >&5
3143 echo "${ECHO_T}$cf_cv_makeflags" >&6
3145 if test -n "$ac_tool_prefix"; then
3146 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3147 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3148 echo "$as_me:3148: checking for $ac_word" >&5
3149 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3150 if test "${ac_cv_prog_RANLIB+set}" = set; then
3151 echo $ECHO_N "(cached) $ECHO_C" >&6
3153 if test -n "$RANLIB"; then
3154 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3156 ac_save_IFS=$IFS; IFS=$ac_path_separator
3158 for ac_dir in $ac_dummy; do
3160 test -z "$ac_dir" && ac_dir=.
3161 $as_executable_p "$ac_dir/$ac_word" || continue
3162 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3163 echo "$as_me:3163: found $ac_dir/$ac_word" >&5
3169 RANLIB=$ac_cv_prog_RANLIB
3170 if test -n "$RANLIB"; then
3171 echo "$as_me:3171: result: $RANLIB" >&5
3172 echo "${ECHO_T}$RANLIB" >&6
3174 echo "$as_me:3174: result: no" >&5
3175 echo "${ECHO_T}no" >&6
3179 if test -z "$ac_cv_prog_RANLIB"; then
3180 ac_ct_RANLIB=$RANLIB
3181 # Extract the first word of "ranlib", so it can be a program name with args.
3182 set dummy ranlib; ac_word=$2
3183 echo "$as_me:3183: checking for $ac_word" >&5
3184 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3185 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3186 echo $ECHO_N "(cached) $ECHO_C" >&6
3188 if test -n "$ac_ct_RANLIB"; then
3189 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3191 ac_save_IFS=$IFS; IFS=$ac_path_separator
3193 for ac_dir in $ac_dummy; do
3195 test -z "$ac_dir" && ac_dir=.
3196 $as_executable_p "$ac_dir/$ac_word" || continue
3197 ac_cv_prog_ac_ct_RANLIB="ranlib"
3198 echo "$as_me:3198: found $ac_dir/$ac_word" >&5
3202 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3205 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3206 if test -n "$ac_ct_RANLIB"; then
3207 echo "$as_me:3207: result: $ac_ct_RANLIB" >&5
3208 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3210 echo "$as_me:3210: result: no" >&5
3211 echo "${ECHO_T}no" >&6
3214 RANLIB=$ac_ct_RANLIB
3216 RANLIB="$ac_cv_prog_RANLIB"
3219 if test -n "$ac_tool_prefix"; then
3220 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3221 set dummy ${ac_tool_prefix}ld; ac_word=$2
3222 echo "$as_me:3222: checking for $ac_word" >&5
3223 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3224 if test "${ac_cv_prog_LD+set}" = set; then
3225 echo $ECHO_N "(cached) $ECHO_C" >&6
3227 if test -n "$LD"; then
3228 ac_cv_prog_LD="$LD" # Let the user override the test.
3230 ac_save_IFS=$IFS; IFS=$ac_path_separator
3232 for ac_dir in $ac_dummy; do
3234 test -z "$ac_dir" && ac_dir=.
3235 $as_executable_p "$ac_dir/$ac_word" || continue
3236 ac_cv_prog_LD="${ac_tool_prefix}ld"
3237 echo "$as_me:3237: found $ac_dir/$ac_word" >&5
3244 if test -n "$LD"; then
3245 echo "$as_me:3245: result: $LD" >&5
3246 echo "${ECHO_T}$LD" >&6
3248 echo "$as_me:3248: result: no" >&5
3249 echo "${ECHO_T}no" >&6
3253 if test -z "$ac_cv_prog_LD"; then
3255 # Extract the first word of "ld", so it can be a program name with args.
3256 set dummy ld; ac_word=$2
3257 echo "$as_me:3257: checking for $ac_word" >&5
3258 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3259 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3260 echo $ECHO_N "(cached) $ECHO_C" >&6
3262 if test -n "$ac_ct_LD"; then
3263 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3265 ac_save_IFS=$IFS; IFS=$ac_path_separator
3267 for ac_dir in $ac_dummy; do
3269 test -z "$ac_dir" && ac_dir=.
3270 $as_executable_p "$ac_dir/$ac_word" || continue
3271 ac_cv_prog_ac_ct_LD="ld"
3272 echo "$as_me:3272: found $ac_dir/$ac_word" >&5
3276 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3279 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3280 if test -n "$ac_ct_LD"; then
3281 echo "$as_me:3281: result: $ac_ct_LD" >&5
3282 echo "${ECHO_T}$ac_ct_LD" >&6
3284 echo "$as_me:3284: result: no" >&5
3285 echo "${ECHO_T}no" >&6
3293 if test -n "$ac_tool_prefix"; then
3294 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3295 set dummy ${ac_tool_prefix}ar; ac_word=$2
3296 echo "$as_me:3296: checking for $ac_word" >&5
3297 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3298 if test "${ac_cv_prog_AR+set}" = set; then
3299 echo $ECHO_N "(cached) $ECHO_C" >&6
3301 if test -n "$AR"; then
3302 ac_cv_prog_AR="$AR" # Let the user override the test.
3304 ac_save_IFS=$IFS; IFS=$ac_path_separator
3306 for ac_dir in $ac_dummy; do
3308 test -z "$ac_dir" && ac_dir=.
3309 $as_executable_p "$ac_dir/$ac_word" || continue
3310 ac_cv_prog_AR="${ac_tool_prefix}ar"
3311 echo "$as_me:3311: found $ac_dir/$ac_word" >&5
3318 if test -n "$AR"; then
3319 echo "$as_me:3319: result: $AR" >&5
3320 echo "${ECHO_T}$AR" >&6
3322 echo "$as_me:3322: result: no" >&5
3323 echo "${ECHO_T}no" >&6
3327 if test -z "$ac_cv_prog_AR"; then
3329 # Extract the first word of "ar", so it can be a program name with args.
3330 set dummy ar; ac_word=$2
3331 echo "$as_me:3331: checking for $ac_word" >&5
3332 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3333 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3334 echo $ECHO_N "(cached) $ECHO_C" >&6
3336 if test -n "$ac_ct_AR"; then
3337 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3339 ac_save_IFS=$IFS; IFS=$ac_path_separator
3341 for ac_dir in $ac_dummy; do
3343 test -z "$ac_dir" && ac_dir=.
3344 $as_executable_p "$ac_dir/$ac_word" || continue
3345 ac_cv_prog_ac_ct_AR="ar"
3346 echo "$as_me:3346: found $ac_dir/$ac_word" >&5
3350 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3353 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3354 if test -n "$ac_ct_AR"; then
3355 echo "$as_me:3355: result: $ac_ct_AR" >&5
3356 echo "${ECHO_T}$ac_ct_AR" >&6
3358 echo "$as_me:3358: result: no" >&5
3359 echo "${ECHO_T}no" >&6
3367 if test -n "$ac_tool_prefix"; then
3368 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3369 set dummy ${ac_tool_prefix}ar; ac_word=$2
3370 echo "$as_me:3370: checking for $ac_word" >&5
3371 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3372 if test "${ac_cv_prog_AR+set}" = set; then
3373 echo $ECHO_N "(cached) $ECHO_C" >&6
3375 if test -n "$AR"; then
3376 ac_cv_prog_AR="$AR" # Let the user override the test.
3378 ac_save_IFS=$IFS; IFS=$ac_path_separator
3380 for ac_dir in $ac_dummy; do
3382 test -z "$ac_dir" && ac_dir=.
3383 $as_executable_p "$ac_dir/$ac_word" || continue
3384 ac_cv_prog_AR="${ac_tool_prefix}ar"
3385 echo "$as_me:3385: found $ac_dir/$ac_word" >&5
3392 if test -n "$AR"; then
3393 echo "$as_me:3393: result: $AR" >&5
3394 echo "${ECHO_T}$AR" >&6
3396 echo "$as_me:3396: result: no" >&5
3397 echo "${ECHO_T}no" >&6
3401 if test -z "$ac_cv_prog_AR"; then
3403 # Extract the first word of "ar", so it can be a program name with args.
3404 set dummy ar; ac_word=$2
3405 echo "$as_me:3405: checking for $ac_word" >&5
3406 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3407 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3408 echo $ECHO_N "(cached) $ECHO_C" >&6
3410 if test -n "$ac_ct_AR"; then
3411 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3413 ac_save_IFS=$IFS; IFS=$ac_path_separator
3415 for ac_dir in $ac_dummy; do
3417 test -z "$ac_dir" && ac_dir=.
3418 $as_executable_p "$ac_dir/$ac_word" || continue
3419 ac_cv_prog_ac_ct_AR="ar"
3420 echo "$as_me:3420: found $ac_dir/$ac_word" >&5
3424 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3427 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3428 if test -n "$ac_ct_AR"; then
3429 echo "$as_me:3429: result: $ac_ct_AR" >&5
3430 echo "${ECHO_T}$ac_ct_AR" >&6
3432 echo "$as_me:3432: result: no" >&5
3433 echo "${ECHO_T}no" >&6
3441 echo "$as_me:3441: checking for options to update archives" >&5
3442 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3443 if test "${cf_cv_ar_flags+set}" = set; then
3444 echo $ECHO_N "(cached) $ECHO_C" >&6
3447 cf_cv_ar_flags=unknown
3448 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
3451 # check if $ARFLAGS already contains this choice
3452 if test "x$ARFLAGS" != "x" ; then
3453 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3454 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3460 rm -f conftest.$ac_cv_objext
3463 cat >conftest.$ac_ext <<EOF
3464 #line 3464 "configure"
3465 int testdata[3] = { 123, 456, 789 };
3467 if { (eval echo "$as_me:3467: \"$ac_compile\"") >&5
3468 (eval $ac_compile) 2>&5
3470 echo "$as_me:3470: \$? = $ac_status" >&5
3471 (exit $ac_status); } ; then
3472 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3473 $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3474 if test -f conftest.a ; then
3475 cf_cv_ar_flags=$cf_ar_flags
3479 test -n "$verbose" && echo " cannot compile test-program" 1>&6
3481 echo "${as_me:-configure}:3481: testing cannot compile test-program ..." 1>&5
3486 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3489 echo "$as_me:3489: result: $cf_cv_ar_flags" >&5
3490 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3492 if test -n "$ARFLAGS" ; then
3493 if test -n "$cf_cv_ar_flags" ; then
3494 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3497 ARFLAGS=$cf_cv_ar_flags
3500 echo "$as_me:3500: checking for PATH separator" >&5
3501 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
3502 case $cf_cv_system_name in
3503 (os2*) PATH_SEPARATOR=';' ;;
3504 (*) ${PATH_SEPARATOR:=':'} ;;
3507 echo "$as_me:3507: result: $PATH_SEPARATOR" >&5
3508 echo "${ECHO_T}$PATH_SEPARATOR" >&6
3510 echo "$as_me:3510: checking if you have specified an install-prefix" >&5
3511 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3513 # Check whether --with-install-prefix or --without-install-prefix was given.
3514 if test "${with_install_prefix+set}" = set; then
3515 withval="$with_install_prefix"
3519 (*) DESTDIR="$withval"
3523 echo "$as_me:3523: result: $DESTDIR" >&5
3524 echo "${ECHO_T}$DESTDIR" >&6
3526 ###############################################################################
3528 # If we're cross-compiling, allow the user to override the tools and their
3529 # options. The configure script is oriented toward identifying the host
3530 # compiler, etc., but we need a build compiler to generate parts of the source.
3532 if test "$cross_compiling" = yes ; then
3534 # defaults that we might want to override
3535 : ${BUILD_CFLAGS:=''}
3536 : ${BUILD_CPPFLAGS:=''}
3537 : ${BUILD_LDFLAGS:=''}
3539 : ${BUILD_EXEEXT:='$x'}
3540 : ${BUILD_OBJEXT:='o'}
3542 # Check whether --with-build-cc or --without-build-cc was given.
3543 if test "${with_build_cc+set}" = set; then
3544 withval="$with_build_cc"
3547 for ac_prog in gcc clang c99 c89 cc cl
3549 # Extract the first word of "$ac_prog", so it can be a program name with args.
3550 set dummy $ac_prog; ac_word=$2
3551 echo "$as_me:3551: checking for $ac_word" >&5
3552 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3553 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3554 echo $ECHO_N "(cached) $ECHO_C" >&6
3556 if test -n "$BUILD_CC"; then
3557 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3559 ac_save_IFS=$IFS; IFS=$ac_path_separator
3561 for ac_dir in $ac_dummy; do
3563 test -z "$ac_dir" && ac_dir=.
3564 $as_executable_p "$ac_dir/$ac_word" || continue
3565 ac_cv_prog_BUILD_CC="$ac_prog"
3566 echo "$as_me:3566: found $ac_dir/$ac_word" >&5
3572 BUILD_CC=$ac_cv_prog_BUILD_CC
3573 if test -n "$BUILD_CC"; then
3574 echo "$as_me:3574: result: $BUILD_CC" >&5
3575 echo "${ECHO_T}$BUILD_CC" >&6
3577 echo "$as_me:3577: result: no" >&5
3578 echo "${ECHO_T}no" >&6
3581 test -n "$BUILD_CC" && break
3583 test -n "$BUILD_CC" || BUILD_CC="none"
3586 echo "$as_me:3586: checking for native build C compiler" >&5
3587 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3588 echo "$as_me:3588: result: $BUILD_CC" >&5
3589 echo "${ECHO_T}$BUILD_CC" >&6
3591 echo "$as_me:3591: checking for native build C preprocessor" >&5
3592 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3594 # Check whether --with-build-cpp or --without-build-cpp was given.
3595 if test "${with_build_cpp+set}" = set; then
3596 withval="$with_build_cpp"
3597 BUILD_CPP="$withval"
3599 BUILD_CPP='${BUILD_CC} -E'
3601 echo "$as_me:3601: result: $BUILD_CPP" >&5
3602 echo "${ECHO_T}$BUILD_CPP" >&6
3604 echo "$as_me:3604: checking for native build C flags" >&5
3605 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3607 # Check whether --with-build-cflags or --without-build-cflags was given.
3608 if test "${with_build_cflags+set}" = set; then
3609 withval="$with_build_cflags"
3610 BUILD_CFLAGS="$withval"
3612 echo "$as_me:3612: result: $BUILD_CFLAGS" >&5
3613 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3615 echo "$as_me:3615: checking for native build C preprocessor-flags" >&5
3616 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3618 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3619 if test "${with_build_cppflags+set}" = set; then
3620 withval="$with_build_cppflags"
3621 BUILD_CPPFLAGS="$withval"
3623 echo "$as_me:3623: result: $BUILD_CPPFLAGS" >&5
3624 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3626 echo "$as_me:3626: checking for native build linker-flags" >&5
3627 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3629 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3630 if test "${with_build_ldflags+set}" = set; then
3631 withval="$with_build_ldflags"
3632 BUILD_LDFLAGS="$withval"
3634 echo "$as_me:3634: result: $BUILD_LDFLAGS" >&5
3635 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3637 echo "$as_me:3637: checking for native build linker-libraries" >&5
3638 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3640 # Check whether --with-build-libs or --without-build-libs was given.
3641 if test "${with_build_libs+set}" = set; then
3642 withval="$with_build_libs"
3643 BUILD_LIBS="$withval"
3645 echo "$as_me:3645: result: $BUILD_LIBS" >&5
3646 echo "${ECHO_T}$BUILD_LIBS" >&6
3648 # this assumes we're on Unix.
3652 : ${BUILD_CC:='${CC}'}
3654 if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3655 { { echo "$as_me:3655: error: Cross-build requires two compilers.
3656 Use --with-build-cc to specify the native compiler." >&5
3657 echo "$as_me: error: Cross-build requires two compilers.
3658 Use --with-build-cc to specify the native compiler." >&2;}
3659 { (exit 1); exit 1; }; }
3663 : ${BUILD_CC:='${CC}'}
3664 : ${BUILD_CPP:='${CPP}'}
3665 : ${BUILD_CFLAGS:='${CFLAGS}'}
3666 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3667 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3668 : ${BUILD_LIBS:='${LIBS}'}
3669 : ${BUILD_EXEEXT:='$x'}
3670 : ${BUILD_OBJEXT:='o'}
3673 ###############################################################################
3675 ### Options to allow the user to specify the set of libraries which are used.
3676 ### Use "--without-normal --with-shared" to allow the default model to be
3677 ### shared, for example.
3680 echo "$as_me:3680: checking if you want to build shared C-objects" >&5
3681 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
3683 # Check whether --with-shared or --without-shared was given.
3684 if test "${with_shared+set}" = set; then
3685 withval="$with_shared"
3686 with_shared=$withval
3690 echo "$as_me:3690: result: $with_shared" >&5
3691 echo "${ECHO_T}$with_shared" >&6
3692 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
3694 echo "$as_me:3694: checking for specified models" >&5
3695 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3696 test -z "$cf_list_models" && cf_list_models=normal
3697 echo "$as_me:3697: result: $cf_list_models" >&5
3698 echo "${ECHO_T}$cf_list_models" >&6
3700 ### Use the first model as the default, and save its suffix for use in building
3701 ### up test-applications.
3702 echo "$as_me:3702: checking for default model" >&5
3703 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3704 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3705 echo "$as_me:3705: result: $DFT_LWR_MODEL" >&5
3706 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3708 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3710 echo "$as_me:3710: checking for specific curses-directory" >&5
3711 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
3713 # Check whether --with-curses-dir or --without-curses-dir was given.
3714 if test "${with_curses_dir+set}" = set; then
3715 withval="$with_curses_dir"
3716 cf_cv_curses_dir=$withval
3720 echo "$as_me:3720: result: $cf_cv_curses_dir" >&5
3721 echo "${ECHO_T}$cf_cv_curses_dir" >&6
3723 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3726 if test "x$prefix" != xNONE; then
3727 cf_path_syntax="$prefix"
3729 cf_path_syntax="$ac_default_prefix"
3737 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3739 (.\${*prefix}*|.\${*dir}*)
3740 eval withval="$withval"
3743 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3748 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3751 { { echo "$as_me:3751: error: expected a pathname, not \"$withval\"" >&5
3752 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3753 { (exit 1); exit 1; }; }
3757 if test -d "$cf_cv_curses_dir"
3760 if test -n "$cf_cv_curses_dir/include" ; then
3761 for cf_add_incdir in $cf_cv_curses_dir/include
3763 while test $cf_add_incdir != /usr/include
3765 if test -d $cf_add_incdir
3768 if test -n "$CFLAGS$CPPFLAGS" ; then
3769 # a loop is needed to ensure we can add subdirs of existing dirs
3770 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3771 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3772 cf_have_incdir=yes; break
3777 if test "$cf_have_incdir" = no ; then
3778 if test "$cf_add_incdir" = /usr/local/include ; then
3779 if test "$GCC" = yes
3781 cf_save_CPPFLAGS=$CPPFLAGS
3782 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3783 cat >conftest.$ac_ext <<_ACEOF
3784 #line 3784 "configure"
3785 #include "confdefs.h"
3795 rm -f conftest.$ac_objext
3796 if { (eval echo "$as_me:3796: \"$ac_compile\"") >&5
3797 (eval $ac_compile) 2>&5
3799 echo "$as_me:3799: \$? = $ac_status" >&5
3800 (exit $ac_status); } &&
3801 { ac_try='test -s conftest.$ac_objext'
3802 { (eval echo "$as_me:3802: \"$ac_try\"") >&5
3805 echo "$as_me:3805: \$? = $ac_status" >&5
3806 (exit $ac_status); }; }; then
3809 echo "$as_me: failed program was:" >&5
3810 cat conftest.$ac_ext >&5
3813 rm -f conftest.$ac_objext conftest.$ac_ext
3814 CPPFLAGS=$cf_save_CPPFLAGS
3819 if test "$cf_have_incdir" = no ; then
3820 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3822 echo "${as_me:-configure}:3822: testing adding $cf_add_incdir to include-path ..." 1>&5
3824 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3826 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3827 test "$cf_top_incdir" = "$cf_add_incdir" && break
3828 cf_add_incdir="$cf_top_incdir"
3839 if test -n "$cf_cv_curses_dir/lib" ; then
3840 for cf_add_libdir in $cf_cv_curses_dir/lib
3842 if test $cf_add_libdir = /usr/lib ; then
3844 elif test -d $cf_add_libdir
3847 if test -n "$LDFLAGS$LIBS" ; then
3848 # a loop is needed to ensure we can add subdirs of existing dirs
3849 for cf_test_libdir in $LDFLAGS $LIBS ; do
3850 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3851 cf_have_libdir=yes; break
3855 if test "$cf_have_libdir" = no ; then
3856 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
3858 echo "${as_me:-configure}:3858: testing adding $cf_add_libdir to library-path ..." 1>&5
3860 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3869 cf_ncuconfig_root=ncurses
3870 cf_have_ncuconfig=no
3872 if test "x${PKG_CONFIG:=none}" != xnone; then
3873 echo "$as_me:3873: checking pkg-config for $cf_ncuconfig_root" >&5
3874 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
3875 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
3876 echo "$as_me:3876: result: yes" >&5
3877 echo "${ECHO_T}yes" >&6
3879 echo "$as_me:3879: checking if the $cf_ncuconfig_root package files work" >&5
3880 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
3881 cf_have_ncuconfig=unknown
3883 cf_save_CPPFLAGS="$CPPFLAGS"
3884 cf_save_LIBS="$LIBS"
3886 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
3888 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
3889 # Filter out duplicates - this happens with badly-designed ".pc" files...
3890 for cf_add_1lib in $LIBS
3892 for cf_add_2lib in $cf_add_libs
3894 if test "x$cf_add_1lib" = "x$cf_add_2lib"
3900 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
3904 cat >conftest.$ac_ext <<_ACEOF
3905 #line 3905 "configure"
3906 #include "confdefs.h"
3907 #include <${cf_cv_ncurses_header:-curses.h}>
3911 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
3916 rm -f conftest.$ac_objext conftest$ac_exeext
3917 if { (eval echo "$as_me:3917: \"$ac_link\"") >&5
3918 (eval $ac_link) 2>&5
3920 echo "$as_me:3920: \$? = $ac_status" >&5
3921 (exit $ac_status); } &&
3922 { ac_try='test -s conftest$ac_exeext'
3923 { (eval echo "$as_me:3923: \"$ac_try\"") >&5
3926 echo "$as_me:3926: \$? = $ac_status" >&5
3927 (exit $ac_status); }; }; then
3928 if test "$cross_compiling" = yes; then
3929 cf_have_ncuconfig=maybe
3931 cat >conftest.$ac_ext <<_ACEOF
3932 #line 3932 "configure"
3933 #include "confdefs.h"
3934 #include <${cf_cv_ncurses_header:-curses.h}>
3936 { char *xx = curses_version(); return (xx == 0); }
3938 rm -f conftest$ac_exeext
3939 if { (eval echo "$as_me:3939: \"$ac_link\"") >&5
3940 (eval $ac_link) 2>&5
3942 echo "$as_me:3942: \$? = $ac_status" >&5
3943 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3944 { (eval echo "$as_me:3944: \"$ac_try\"") >&5
3947 echo "$as_me:3947: \$? = $ac_status" >&5
3948 (exit $ac_status); }; }; then
3949 cf_have_ncuconfig=yes
3951 echo "$as_me: program exited with status $ac_status" >&5
3952 echo "$as_me: failed program was:" >&5
3953 cat conftest.$ac_ext >&5
3954 cf_have_ncuconfig=no
3956 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3959 echo "$as_me: failed program was:" >&5
3960 cat conftest.$ac_ext >&5
3961 cf_have_ncuconfig=no
3963 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3964 echo "$as_me:3964: result: $cf_have_ncuconfig" >&5
3965 echo "${ECHO_T}$cf_have_ncuconfig" >&6
3966 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
3967 if test "$cf_have_ncuconfig" != "yes"
3969 CPPFLAGS="$cf_save_CPPFLAGS"
3970 LIBS="$cf_save_LIBS"
3971 NCURSES_CONFIG_PKG=none
3974 cat >>confdefs.h <<\EOF
3978 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
3980 echo "$as_me:3980: checking for terminfo header" >&5
3981 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
3982 if test "${cf_cv_term_header+set}" = set; then
3983 echo $ECHO_N "(cached) $ECHO_C" >&6
3986 case ${cf_cv_ncurses_header} in
3987 (*/ncurses.h|*/ncursesw.h)
3988 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
3991 cf_term_header=term.h
3995 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
3997 cat >conftest.$ac_ext <<_ACEOF
3998 #line 3998 "configure"
3999 #include "confdefs.h"
4001 #include <${cf_cv_ncurses_header:-curses.h}>
4007 int x = auto_left_margin
4012 rm -f conftest.$ac_objext
4013 if { (eval echo "$as_me:4013: \"$ac_compile\"") >&5
4014 (eval $ac_compile) 2>&5
4016 echo "$as_me:4016: \$? = $ac_status" >&5
4017 (exit $ac_status); } &&
4018 { ac_try='test -s conftest.$ac_objext'
4019 { (eval echo "$as_me:4019: \"$ac_try\"") >&5
4022 echo "$as_me:4022: \$? = $ac_status" >&5
4023 (exit $ac_status); }; }; then
4025 cf_cv_term_header="$cf_test"
4027 echo "$as_me: failed program was:" >&5
4028 cat conftest.$ac_ext >&5
4030 cf_cv_term_header=unknown
4033 rm -f conftest.$ac_objext conftest.$ac_ext
4034 test "$cf_cv_term_header" != unknown && break
4038 echo "$as_me:4038: result: $cf_cv_term_header" >&5
4039 echo "${ECHO_T}$cf_cv_term_header" >&6
4041 # Set definitions to allow ifdef'ing to accommodate subdirectories
4043 case $cf_cv_term_header in
4046 cat >>confdefs.h <<\EOF
4047 #define HAVE_TERM_H 1
4053 case $cf_cv_term_header in
4056 cat >>confdefs.h <<\EOF
4057 #define HAVE_NCURSES_TERM_H 1
4063 cat >>confdefs.h <<\EOF
4064 #define HAVE_NCURSESW_TERM_H 1
4073 echo "$as_me:4073: result: no" >&5
4074 echo "${ECHO_T}no" >&6
4075 NCURSES_CONFIG_PKG=none
4078 NCURSES_CONFIG_PKG=none
4081 if test "x$cf_have_ncuconfig" = "xno"; then
4082 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
4084 if test -n "$ac_tool_prefix"; then
4085 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4087 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4088 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4089 echo "$as_me:4089: checking for $ac_word" >&5
4090 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4091 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
4092 echo $ECHO_N "(cached) $ECHO_C" >&6
4094 if test -n "$NCURSES_CONFIG"; then
4095 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
4097 ac_save_IFS=$IFS; IFS=$ac_path_separator
4099 for ac_dir in $ac_dummy; do
4101 test -z "$ac_dir" && ac_dir=.
4102 $as_executable_p "$ac_dir/$ac_word" || continue
4103 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
4104 echo "$as_me:4104: found $ac_dir/$ac_word" >&5
4110 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
4111 if test -n "$NCURSES_CONFIG"; then
4112 echo "$as_me:4112: result: $NCURSES_CONFIG" >&5
4113 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4115 echo "$as_me:4115: result: no" >&5
4116 echo "${ECHO_T}no" >&6
4119 test -n "$NCURSES_CONFIG" && break
4122 if test -z "$NCURSES_CONFIG"; then
4123 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
4124 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4126 # Extract the first word of "$ac_prog", so it can be a program name with args.
4127 set dummy $ac_prog; ac_word=$2
4128 echo "$as_me:4128: checking for $ac_word" >&5
4129 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4130 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
4131 echo $ECHO_N "(cached) $ECHO_C" >&6
4133 if test -n "$ac_ct_NCURSES_CONFIG"; then
4134 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
4136 ac_save_IFS=$IFS; IFS=$ac_path_separator
4138 for ac_dir in $ac_dummy; do
4140 test -z "$ac_dir" && ac_dir=.
4141 $as_executable_p "$ac_dir/$ac_word" || continue
4142 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
4143 echo "$as_me:4143: found $ac_dir/$ac_word" >&5
4149 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
4150 if test -n "$ac_ct_NCURSES_CONFIG"; then
4151 echo "$as_me:4151: result: $ac_ct_NCURSES_CONFIG" >&5
4152 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
4154 echo "$as_me:4154: result: no" >&5
4155 echo "${ECHO_T}no" >&6
4158 test -n "$ac_ct_NCURSES_CONFIG" && break
4160 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
4162 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
4165 if test "$NCURSES_CONFIG" != none ; then
4167 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
4169 cf_add_libs="`$NCURSES_CONFIG --libs`"
4170 # Filter out duplicates - this happens with badly-designed ".pc" files...
4171 for cf_add_1lib in $LIBS
4173 for cf_add_2lib in $cf_add_libs
4175 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4181 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4185 # even with config script, some packages use no-override for curses.h
4187 echo "$as_me:4187: checking if we have identified curses headers" >&5
4188 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4189 if test "${cf_cv_ncurses_header+set}" = set; then
4190 echo $ECHO_N "(cached) $ECHO_C" >&6
4193 cf_cv_ncurses_header=none
4195 ncurses.h ncurses/ncurses.h \
4196 curses.h ncurses/curses.h
4198 cat >conftest.$ac_ext <<_ACEOF
4199 #line 4199 "configure"
4200 #include "confdefs.h"
4201 #include <${cf_header}>
4205 initscr(); tgoto("?", 0,0)
4210 rm -f conftest.$ac_objext
4211 if { (eval echo "$as_me:4211: \"$ac_compile\"") >&5
4212 (eval $ac_compile) 2>&5
4214 echo "$as_me:4214: \$? = $ac_status" >&5
4215 (exit $ac_status); } &&
4216 { ac_try='test -s conftest.$ac_objext'
4217 { (eval echo "$as_me:4217: \"$ac_try\"") >&5
4220 echo "$as_me:4220: \$? = $ac_status" >&5
4221 (exit $ac_status); }; }; then
4222 cf_cv_ncurses_header=$cf_header; break
4224 echo "$as_me: failed program was:" >&5
4225 cat conftest.$ac_ext >&5
4227 rm -f conftest.$ac_objext conftest.$ac_ext
4231 echo "$as_me:4231: result: $cf_cv_ncurses_header" >&5
4232 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4234 if test "$cf_cv_ncurses_header" = none ; then
4235 { { echo "$as_me:4235: error: No curses header-files found" >&5
4236 echo "$as_me: error: No curses header-files found" >&2;}
4237 { (exit 1); exit 1; }; }
4240 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4242 for ac_header in $cf_cv_ncurses_header
4244 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4245 echo "$as_me:4245: checking for $ac_header" >&5
4246 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4247 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4248 echo $ECHO_N "(cached) $ECHO_C" >&6
4250 cat >conftest.$ac_ext <<_ACEOF
4251 #line 4251 "configure"
4252 #include "confdefs.h"
4253 #include <$ac_header>
4255 if { (eval echo "$as_me:4255: \"$ac_cpp conftest.$ac_ext\"") >&5
4256 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4258 egrep -v '^ *\+' conftest.er1 >conftest.err
4260 cat conftest.err >&5
4261 echo "$as_me:4261: \$? = $ac_status" >&5
4262 (exit $ac_status); } >/dev/null; then
4263 if test -s conftest.err; then
4264 ac_cpp_err=$ac_c_preproc_warn_flag
4271 if test -z "$ac_cpp_err"; then
4272 eval "$as_ac_Header=yes"
4274 echo "$as_me: failed program was:" >&5
4275 cat conftest.$ac_ext >&5
4276 eval "$as_ac_Header=no"
4278 rm -f conftest.err conftest.$ac_ext
4280 echo "$as_me:4280: result: `eval echo '${'$as_ac_Header'}'`" >&5
4281 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4282 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4283 cat >>confdefs.h <<EOF
4284 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4290 cat >>confdefs.h <<\EOF
4294 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4296 cat >>confdefs.h <<EOF
4297 #define $cf_nculib_ROOT 1
4300 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4304 cf_ncuhdr_root=ncurses
4306 test -n "$cf_cv_curses_dir" && \
4307 test "$cf_cv_curses_dir" != "no" && { \
4309 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4310 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4312 while test $cf_add_incdir != /usr/include
4314 if test -d $cf_add_incdir
4317 if test -n "$CFLAGS$CPPFLAGS" ; then
4318 # a loop is needed to ensure we can add subdirs of existing dirs
4319 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4320 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4321 cf_have_incdir=yes; break
4326 if test "$cf_have_incdir" = no ; then
4327 if test "$cf_add_incdir" = /usr/local/include ; then
4328 if test "$GCC" = yes
4330 cf_save_CPPFLAGS=$CPPFLAGS
4331 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4332 cat >conftest.$ac_ext <<_ACEOF
4333 #line 4333 "configure"
4334 #include "confdefs.h"
4344 rm -f conftest.$ac_objext
4345 if { (eval echo "$as_me:4345: \"$ac_compile\"") >&5
4346 (eval $ac_compile) 2>&5
4348 echo "$as_me:4348: \$? = $ac_status" >&5
4349 (exit $ac_status); } &&
4350 { ac_try='test -s conftest.$ac_objext'
4351 { (eval echo "$as_me:4351: \"$ac_try\"") >&5
4354 echo "$as_me:4354: \$? = $ac_status" >&5
4355 (exit $ac_status); }; }; then
4358 echo "$as_me: failed program was:" >&5
4359 cat conftest.$ac_ext >&5
4362 rm -f conftest.$ac_objext conftest.$ac_ext
4363 CPPFLAGS=$cf_save_CPPFLAGS
4368 if test "$cf_have_incdir" = no ; then
4369 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4371 echo "${as_me:-configure}:4371: testing adding $cf_add_incdir to include-path ..." 1>&5
4373 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4375 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4376 test "$cf_top_incdir" = "$cf_add_incdir" && break
4377 cf_add_incdir="$cf_top_incdir"
4390 echo "$as_me:4390: checking for $cf_ncuhdr_root header in include-path" >&5
4391 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4392 if test "${cf_cv_ncurses_h+set}" = set; then
4393 echo $ECHO_N "(cached) $ECHO_C" >&6
4396 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4397 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4398 for cf_header in $cf_header_list
4401 cat >conftest.$ac_ext <<_ACEOF
4402 #line 4402 "configure"
4403 #include "confdefs.h"
4405 #include <$cf_header>
4410 #ifdef NCURSES_VERSION
4412 printf("%s\n", NCURSES_VERSION);
4425 rm -f conftest.$ac_objext
4426 if { (eval echo "$as_me:4426: \"$ac_compile\"") >&5
4427 (eval $ac_compile) 2>&5
4429 echo "$as_me:4429: \$? = $ac_status" >&5
4430 (exit $ac_status); } &&
4431 { ac_try='test -s conftest.$ac_objext'
4432 { (eval echo "$as_me:4432: \"$ac_try\"") >&5
4435 echo "$as_me:4435: \$? = $ac_status" >&5
4436 (exit $ac_status); }; }; then
4437 cf_cv_ncurses_h=$cf_header
4440 echo "$as_me: failed program was:" >&5
4441 cat conftest.$ac_ext >&5
4444 rm -f conftest.$ac_objext conftest.$ac_ext
4446 test "$cf_cv_ncurses_h" != no && break
4450 echo "$as_me:4450: result: $cf_cv_ncurses_h" >&5
4451 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4453 if test "$cf_cv_ncurses_h" != no ; then
4454 cf_cv_ncurses_header=$cf_cv_ncurses_h
4457 echo "$as_me:4457: checking for $cf_ncuhdr_root include-path" >&5
4458 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4459 if test "${cf_cv_ncurses_h2+set}" = set; then
4460 echo $ECHO_N "(cached) $ECHO_C" >&6
4463 test -n "$verbose" && echo
4467 # collect the current set of include-directories from compiler flags
4468 cf_header_path_list=""
4469 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4470 for cf_header_path in $CPPFLAGS $CFLAGS
4472 case $cf_header_path in
4474 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4476 test "x$cf_header_path" != "xNONE" && \
4477 test -d "$cf_header_path" && \
4479 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
4480 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
4481 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4482 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4483 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4484 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"
4487 cf_header_path_list="$cf_header_path_list $cf_search"
4493 # add the variations for the package we are looking for
4497 test "x$prefix" != "xNONE" && \
4498 test -d "$prefix" && \
4500 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
4501 test -d $prefix/include && cf_search="$cf_search $prefix/include"
4502 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4503 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4504 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4505 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4508 for cf_subdir_prefix in \
4517 test "x$cf_subdir_prefix" != "x$prefix" && \
4518 test -d "$cf_subdir_prefix" && \
4519 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
4520 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
4521 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
4522 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
4523 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
4524 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
4525 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"
4530 test "$includedir" != NONE && \
4531 test "$includedir" != "/usr/include" && \
4532 test -d "$includedir" && {
4533 test -d $includedir && cf_search="$cf_search $includedir"
4534 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4537 test "$oldincludedir" != NONE && \
4538 test "$oldincludedir" != "/usr/include" && \
4539 test -d "$oldincludedir" && {
4540 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
4541 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4544 cf_search="$cf_search $cf_header_path_list"
4546 test -n "$verbose" && echo search path $cf_search
4547 cf_save2_CPPFLAGS="$CPPFLAGS"
4548 for cf_incdir in $cf_search
4551 if test -n "$cf_incdir" ; then
4552 for cf_add_incdir in $cf_incdir
4554 while test $cf_add_incdir != /usr/include
4556 if test -d $cf_add_incdir
4559 if test -n "$CFLAGS$CPPFLAGS" ; then
4560 # a loop is needed to ensure we can add subdirs of existing dirs
4561 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4562 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4563 cf_have_incdir=yes; break
4568 if test "$cf_have_incdir" = no ; then
4569 if test "$cf_add_incdir" = /usr/local/include ; then
4570 if test "$GCC" = yes
4572 cf_save_CPPFLAGS=$CPPFLAGS
4573 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4574 cat >conftest.$ac_ext <<_ACEOF
4575 #line 4575 "configure"
4576 #include "confdefs.h"
4586 rm -f conftest.$ac_objext
4587 if { (eval echo "$as_me:4587: \"$ac_compile\"") >&5
4588 (eval $ac_compile) 2>&5
4590 echo "$as_me:4590: \$? = $ac_status" >&5
4591 (exit $ac_status); } &&
4592 { ac_try='test -s conftest.$ac_objext'
4593 { (eval echo "$as_me:4593: \"$ac_try\"") >&5
4596 echo "$as_me:4596: \$? = $ac_status" >&5
4597 (exit $ac_status); }; }; then
4600 echo "$as_me: failed program was:" >&5
4601 cat conftest.$ac_ext >&5
4604 rm -f conftest.$ac_objext conftest.$ac_ext
4605 CPPFLAGS=$cf_save_CPPFLAGS
4610 if test "$cf_have_incdir" = no ; then
4611 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4613 echo "${as_me:-configure}:4613: testing adding $cf_add_incdir to include-path ..." 1>&5
4615 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4617 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4618 test "$cf_top_incdir" = "$cf_add_incdir" && break
4619 cf_add_incdir="$cf_top_incdir"
4635 cat >conftest.$ac_ext <<_ACEOF
4636 #line 4636 "configure"
4637 #include "confdefs.h"
4639 #include <$cf_header>
4644 #ifdef NCURSES_VERSION
4646 printf("%s\n", NCURSES_VERSION);
4659 rm -f conftest.$ac_objext
4660 if { (eval echo "$as_me:4660: \"$ac_compile\"") >&5
4661 (eval $ac_compile) 2>&5
4663 echo "$as_me:4663: \$? = $ac_status" >&5
4664 (exit $ac_status); } &&
4665 { ac_try='test -s conftest.$ac_objext'
4666 { (eval echo "$as_me:4666: \"$ac_try\"") >&5
4669 echo "$as_me:4669: \$? = $ac_status" >&5
4670 (exit $ac_status); }; }; then
4671 cf_cv_ncurses_h2=$cf_header
4674 echo "$as_me: failed program was:" >&5
4675 cat conftest.$ac_ext >&5
4678 rm -f conftest.$ac_objext conftest.$ac_ext
4680 if test "$cf_cv_ncurses_h2" != no ; then
4681 cf_cv_ncurses_h2=$cf_incdir/$cf_header
4682 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
4685 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
4687 CPPFLAGS="$cf_save2_CPPFLAGS"
4688 test "$cf_cv_ncurses_h2" != no && break
4690 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:4690: error: not found" >&5
4691 echo "$as_me: error: not found" >&2;}
4692 { (exit 1); exit 1; }; }
4695 echo "$as_me:4695: result: $cf_cv_ncurses_h2" >&5
4696 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
4698 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
4699 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
4700 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
4701 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
4704 if test -n "$cf_1st_incdir" ; then
4705 for cf_add_incdir in $cf_1st_incdir
4707 while test $cf_add_incdir != /usr/include
4709 if test -d $cf_add_incdir
4712 if test -n "$CFLAGS$CPPFLAGS" ; then
4713 # a loop is needed to ensure we can add subdirs of existing dirs
4714 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4715 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4716 cf_have_incdir=yes; break
4721 if test "$cf_have_incdir" = no ; then
4722 if test "$cf_add_incdir" = /usr/local/include ; then
4723 if test "$GCC" = yes
4725 cf_save_CPPFLAGS=$CPPFLAGS
4726 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4727 cat >conftest.$ac_ext <<_ACEOF
4728 #line 4728 "configure"
4729 #include "confdefs.h"
4739 rm -f conftest.$ac_objext
4740 if { (eval echo "$as_me:4740: \"$ac_compile\"") >&5
4741 (eval $ac_compile) 2>&5
4743 echo "$as_me:4743: \$? = $ac_status" >&5
4744 (exit $ac_status); } &&
4745 { ac_try='test -s conftest.$ac_objext'
4746 { (eval echo "$as_me:4746: \"$ac_try\"") >&5
4749 echo "$as_me:4749: \$? = $ac_status" >&5
4750 (exit $ac_status); }; }; then
4753 echo "$as_me: failed program was:" >&5
4754 cat conftest.$ac_ext >&5
4757 rm -f conftest.$ac_objext conftest.$ac_ext
4758 CPPFLAGS=$cf_save_CPPFLAGS
4763 if test "$cf_have_incdir" = no ; then
4764 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4766 echo "${as_me:-configure}:4766: testing adding $cf_add_incdir to include-path ..." 1>&5
4768 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4770 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4771 test "$cf_top_incdir" = "$cf_add_incdir" && break
4772 cf_add_incdir="$cf_top_incdir"
4785 # Set definitions to allow ifdef'ing for ncurses.h
4787 case $cf_cv_ncurses_header in
4790 cat >>confdefs.h <<\EOF
4791 #define HAVE_NCURSES_H 1
4797 case $cf_cv_ncurses_header in
4798 (ncurses/curses.h|ncurses/ncurses.h)
4800 cat >>confdefs.h <<\EOF
4801 #define HAVE_NCURSES_NCURSES_H 1
4805 (ncursesw/curses.h|ncursesw/ncurses.h)
4807 cat >>confdefs.h <<\EOF
4808 #define HAVE_NCURSESW_NCURSES_H 1
4814 echo "$as_me:4814: checking for terminfo header" >&5
4815 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4816 if test "${cf_cv_term_header+set}" = set; then
4817 echo $ECHO_N "(cached) $ECHO_C" >&6
4820 case ${cf_cv_ncurses_header} in
4821 (*/ncurses.h|*/ncursesw.h)
4822 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4825 cf_term_header=term.h
4829 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4831 cat >conftest.$ac_ext <<_ACEOF
4832 #line 4832 "configure"
4833 #include "confdefs.h"
4835 #include <${cf_cv_ncurses_header:-curses.h}>
4841 int x = auto_left_margin
4846 rm -f conftest.$ac_objext
4847 if { (eval echo "$as_me:4847: \"$ac_compile\"") >&5
4848 (eval $ac_compile) 2>&5
4850 echo "$as_me:4850: \$? = $ac_status" >&5
4851 (exit $ac_status); } &&
4852 { ac_try='test -s conftest.$ac_objext'
4853 { (eval echo "$as_me:4853: \"$ac_try\"") >&5
4856 echo "$as_me:4856: \$? = $ac_status" >&5
4857 (exit $ac_status); }; }; then
4859 cf_cv_term_header="$cf_test"
4861 echo "$as_me: failed program was:" >&5
4862 cat conftest.$ac_ext >&5
4864 cf_cv_term_header=unknown
4867 rm -f conftest.$ac_objext conftest.$ac_ext
4868 test "$cf_cv_term_header" != unknown && break
4872 echo "$as_me:4872: result: $cf_cv_term_header" >&5
4873 echo "${ECHO_T}$cf_cv_term_header" >&6
4875 # Set definitions to allow ifdef'ing to accommodate subdirectories
4877 case $cf_cv_term_header in
4880 cat >>confdefs.h <<\EOF
4881 #define HAVE_TERM_H 1
4887 case $cf_cv_term_header in
4890 cat >>confdefs.h <<\EOF
4891 #define HAVE_NCURSES_TERM_H 1
4897 cat >>confdefs.h <<\EOF
4898 #define HAVE_NCURSESW_TERM_H 1
4904 # some applications need this, but should check for NCURSES_VERSION
4906 cat >>confdefs.h <<\EOF
4910 echo "$as_me:4910: checking for ncurses version" >&5
4911 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
4912 if test "${cf_cv_ncurses_version+set}" = set; then
4913 echo $ECHO_N "(cached) $ECHO_C" >&6
4916 cf_cv_ncurses_version=no
4919 if test "$cross_compiling" = yes; then
4921 # This will not work if the preprocessor splits the line after the
4922 # Autoconf token. The 'unproto' program does that.
4923 cat > conftest.$ac_ext <<EOF
4924 #include <${cf_cv_ncurses_header:-curses.h}>
4926 #ifdef NCURSES_VERSION
4927 Autoconf NCURSES_VERSION
4935 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4936 { (eval echo "$as_me:4936: \"$cf_try\"") >&5
4939 echo "$as_me:4939: \$? = $ac_status" >&5
4940 (exit $ac_status); }
4941 if test -f conftest.out ; then
4942 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4943 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4948 cat >conftest.$ac_ext <<_ACEOF
4949 #line 4949 "configure"
4950 #include "confdefs.h"
4952 #include <${cf_cv_ncurses_header:-curses.h}>
4956 FILE *fp = fopen("$cf_tempfile", "w");
4957 #ifdef NCURSES_VERSION
4958 # ifdef NCURSES_VERSION_PATCH
4959 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
4961 fprintf(fp, "%s\n", NCURSES_VERSION);
4965 fprintf(fp, "old\n");
4970 ${cf_cv_main_return:-return}(0);
4973 rm -f conftest$ac_exeext
4974 if { (eval echo "$as_me:4974: \"$ac_link\"") >&5
4975 (eval $ac_link) 2>&5
4977 echo "$as_me:4977: \$? = $ac_status" >&5
4978 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4979 { (eval echo "$as_me:4979: \"$ac_try\"") >&5
4982 echo "$as_me:4982: \$? = $ac_status" >&5
4983 (exit $ac_status); }; }; then
4985 cf_cv_ncurses_version=`cat $cf_tempfile`
4987 echo "$as_me: program exited with status $ac_status" >&5
4988 echo "$as_me: failed program was:" >&5
4989 cat conftest.$ac_ext >&5
4991 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4996 echo "$as_me:4996: result: $cf_cv_ncurses_version" >&5
4997 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
4998 test "$cf_cv_ncurses_version" = no ||
4999 cat >>confdefs.h <<\EOF
5003 cf_nculib_root=ncurses
5004 # This works, except for the special case where we find gpm, but
5005 # ncurses is in a nonstandard location via $LIBS, and we really want
5008 cf_ncurses_SAVE="$LIBS"
5009 echo "$as_me:5009: checking for Gpm_Open in -lgpm" >&5
5010 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5011 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5012 echo $ECHO_N "(cached) $ECHO_C" >&6
5014 ac_check_lib_save_LIBS=$LIBS
5016 cat >conftest.$ac_ext <<_ACEOF
5017 #line 5017 "configure"
5018 #include "confdefs.h"
5020 /* Override any gcc2 internal prototype to avoid an error. */
5024 /* We use char because int might match the return type of a gcc2
5025 builtin and then its argument prototype would still apply. */
5035 rm -f conftest.$ac_objext conftest$ac_exeext
5036 if { (eval echo "$as_me:5036: \"$ac_link\"") >&5
5037 (eval $ac_link) 2>&5
5039 echo "$as_me:5039: \$? = $ac_status" >&5
5040 (exit $ac_status); } &&
5041 { ac_try='test -s conftest$ac_exeext'
5042 { (eval echo "$as_me:5042: \"$ac_try\"") >&5
5045 echo "$as_me:5045: \$? = $ac_status" >&5
5046 (exit $ac_status); }; }; then
5047 ac_cv_lib_gpm_Gpm_Open=yes
5049 echo "$as_me: failed program was:" >&5
5050 cat conftest.$ac_ext >&5
5051 ac_cv_lib_gpm_Gpm_Open=no
5053 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5054 LIBS=$ac_check_lib_save_LIBS
5056 echo "$as_me:5056: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5057 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5058 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5059 echo "$as_me:5059: checking for initscr in -lgpm" >&5
5060 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5061 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5062 echo $ECHO_N "(cached) $ECHO_C" >&6
5064 ac_check_lib_save_LIBS=$LIBS
5066 cat >conftest.$ac_ext <<_ACEOF
5067 #line 5067 "configure"
5068 #include "confdefs.h"
5070 /* Override any gcc2 internal prototype to avoid an error. */
5074 /* We use char because int might match the return type of a gcc2
5075 builtin and then its argument prototype would still apply. */
5085 rm -f conftest.$ac_objext conftest$ac_exeext
5086 if { (eval echo "$as_me:5086: \"$ac_link\"") >&5
5087 (eval $ac_link) 2>&5
5089 echo "$as_me:5089: \$? = $ac_status" >&5
5090 (exit $ac_status); } &&
5091 { ac_try='test -s conftest$ac_exeext'
5092 { (eval echo "$as_me:5092: \"$ac_try\"") >&5
5095 echo "$as_me:5095: \$? = $ac_status" >&5
5096 (exit $ac_status); }; }; then
5097 ac_cv_lib_gpm_initscr=yes
5099 echo "$as_me: failed program was:" >&5
5100 cat conftest.$ac_ext >&5
5101 ac_cv_lib_gpm_initscr=no
5103 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5104 LIBS=$ac_check_lib_save_LIBS
5106 echo "$as_me:5106: result: $ac_cv_lib_gpm_initscr" >&5
5107 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
5108 if test $ac_cv_lib_gpm_initscr = yes; then
5109 LIBS="$cf_ncurses_SAVE"
5111 cf_ncurses_LIBS="-lgpm"
5118 # This is only necessary if you are linking against an obsolete
5119 # version of ncurses (but it should do no harm, since it's static).
5120 if test "$cf_nculib_root" = ncurses ; then
5121 echo "$as_me:5121: checking for tgoto in -lmytinfo" >&5
5122 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5123 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5124 echo $ECHO_N "(cached) $ECHO_C" >&6
5126 ac_check_lib_save_LIBS=$LIBS
5127 LIBS="-lmytinfo $LIBS"
5128 cat >conftest.$ac_ext <<_ACEOF
5129 #line 5129 "configure"
5130 #include "confdefs.h"
5132 /* Override any gcc2 internal prototype to avoid an error. */
5136 /* We use char because int might match the return type of a gcc2
5137 builtin and then its argument prototype would still apply. */
5147 rm -f conftest.$ac_objext conftest$ac_exeext
5148 if { (eval echo "$as_me:5148: \"$ac_link\"") >&5
5149 (eval $ac_link) 2>&5
5151 echo "$as_me:5151: \$? = $ac_status" >&5
5152 (exit $ac_status); } &&
5153 { ac_try='test -s conftest$ac_exeext'
5154 { (eval echo "$as_me:5154: \"$ac_try\"") >&5
5157 echo "$as_me:5157: \$? = $ac_status" >&5
5158 (exit $ac_status); }; }; then
5159 ac_cv_lib_mytinfo_tgoto=yes
5161 echo "$as_me: failed program was:" >&5
5162 cat conftest.$ac_ext >&5
5163 ac_cv_lib_mytinfo_tgoto=no
5165 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5166 LIBS=$ac_check_lib_save_LIBS
5168 echo "$as_me:5168: result: $ac_cv_lib_mytinfo_tgoto" >&5
5169 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5170 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5171 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5178 cf_add_libs="$cf_ncurses_LIBS"
5179 # Filter out duplicates - this happens with badly-designed ".pc" files...
5180 for cf_add_1lib in $LIBS
5182 for cf_add_2lib in $cf_add_libs
5184 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5190 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5194 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5197 cf_add_libs="-l$cf_nculib_root"
5198 # Filter out duplicates - this happens with badly-designed ".pc" files...
5199 for cf_add_1lib in $LIBS
5201 for cf_add_2lib in $cf_add_libs
5203 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5209 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5215 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5217 echo "$as_me:5217: checking for initscr" >&5
5218 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
5219 if test "${ac_cv_func_initscr+set}" = set; then
5220 echo $ECHO_N "(cached) $ECHO_C" >&6
5222 cat >conftest.$ac_ext <<_ACEOF
5223 #line 5223 "configure"
5224 #include "confdefs.h"
5225 /* System header to define __stub macros and hopefully few prototypes,
5226 which can conflict with char initscr (); below. */
5228 /* Override any gcc2 internal prototype to avoid an error. */
5232 /* We use char because int might match the return type of a gcc2
5233 builtin and then its argument prototype would still apply. */
5240 /* The GNU C library defines this for functions which it implements
5241 to always fail with ENOSYS. Some functions are actually named
5242 something starting with __ and the normal name is an alias. */
5243 #if defined (__stub_initscr) || defined (__stub___initscr)
5246 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5253 rm -f conftest.$ac_objext conftest$ac_exeext
5254 if { (eval echo "$as_me:5254: \"$ac_link\"") >&5
5255 (eval $ac_link) 2>&5
5257 echo "$as_me:5257: \$? = $ac_status" >&5
5258 (exit $ac_status); } &&
5259 { ac_try='test -s conftest$ac_exeext'
5260 { (eval echo "$as_me:5260: \"$ac_try\"") >&5
5263 echo "$as_me:5263: \$? = $ac_status" >&5
5264 (exit $ac_status); }; }; then
5265 ac_cv_func_initscr=yes
5267 echo "$as_me: failed program was:" >&5
5268 cat conftest.$ac_ext >&5
5269 ac_cv_func_initscr=no
5271 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5273 echo "$as_me:5273: result: $ac_cv_func_initscr" >&5
5274 echo "${ECHO_T}$ac_cv_func_initscr" >&6
5275 if test $ac_cv_func_initscr = yes; then
5276 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5279 cf_save_LIBS="$LIBS"
5280 echo "$as_me:5280: checking for initscr in -l$cf_nculib_root" >&5
5281 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
5282 LIBS="-l$cf_nculib_root $LIBS"
5283 cat >conftest.$ac_ext <<_ACEOF
5284 #line 5284 "configure"
5285 #include "confdefs.h"
5286 #include <${cf_cv_ncurses_header:-curses.h}>
5295 rm -f conftest.$ac_objext conftest$ac_exeext
5296 if { (eval echo "$as_me:5296: \"$ac_link\"") >&5
5297 (eval $ac_link) 2>&5
5299 echo "$as_me:5299: \$? = $ac_status" >&5
5300 (exit $ac_status); } &&
5301 { ac_try='test -s conftest$ac_exeext'
5302 { (eval echo "$as_me:5302: \"$ac_try\"") >&5
5305 echo "$as_me:5305: \$? = $ac_status" >&5
5306 (exit $ac_status); }; }; then
5307 echo "$as_me:5307: result: yes" >&5
5308 echo "${ECHO_T}yes" >&6
5309 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5312 echo "$as_me: failed program was:" >&5
5313 cat conftest.$ac_ext >&5
5314 echo "$as_me:5314: result: no" >&5
5315 echo "${ECHO_T}no" >&6
5318 cf_library_path_list=""
5319 if test -n "${LDFLAGS}${LIBS}" ; then
5320 for cf_library_path in $LDFLAGS $LIBS
5322 case $cf_library_path in
5324 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5326 test "x$cf_library_path" != "xNONE" && \
5327 test -d "$cf_library_path" && \
5329 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
5330 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
5331 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5332 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5333 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5334 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"
5337 cf_library_path_list="$cf_library_path_list $cf_search"
5345 test "x$prefix" != "xNONE" && \
5346 test -d "$prefix" && \
5348 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5349 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5350 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5351 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5352 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5353 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5356 for cf_subdir_prefix in \
5365 test "x$cf_subdir_prefix" != "x$prefix" && \
5366 test -d "$cf_subdir_prefix" && \
5367 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5368 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
5369 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
5370 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
5371 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
5372 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
5373 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"
5378 cf_search="$cf_library_path_list $cf_search"
5380 for cf_libdir in $cf_search
5382 echo "$as_me:5382: checking for -l$cf_nculib_root in $cf_libdir" >&5
5383 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5384 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5385 cat >conftest.$ac_ext <<_ACEOF
5386 #line 5386 "configure"
5387 #include "confdefs.h"
5388 #include <${cf_cv_ncurses_header:-curses.h}>
5397 rm -f conftest.$ac_objext conftest$ac_exeext
5398 if { (eval echo "$as_me:5398: \"$ac_link\"") >&5
5399 (eval $ac_link) 2>&5
5401 echo "$as_me:5401: \$? = $ac_status" >&5
5402 (exit $ac_status); } &&
5403 { ac_try='test -s conftest$ac_exeext'
5404 { (eval echo "$as_me:5404: \"$ac_try\"") >&5
5407 echo "$as_me:5407: \$? = $ac_status" >&5
5408 (exit $ac_status); }; }; then
5409 echo "$as_me:5409: result: yes" >&5
5410 echo "${ECHO_T}yes" >&6
5411 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5414 echo "$as_me: failed program was:" >&5
5415 cat conftest.$ac_ext >&5
5416 echo "$as_me:5416: result: no" >&5
5417 echo "${ECHO_T}no" >&6
5418 LIBS="$cf_save_LIBS"
5420 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5424 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5428 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5430 if test $cf_found_library = no ; then
5431 { { echo "$as_me:5431: error: Cannot link $cf_nculib_root library" >&5
5432 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5433 { (exit 1); exit 1; }; }
5438 if test -n "$cf_ncurses_LIBS" ; then
5439 echo "$as_me:5439: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5440 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5441 cf_ncurses_SAVE="$LIBS"
5442 for p in $cf_ncurses_LIBS ; do
5443 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5444 if test "$q" != "$LIBS" ; then
5448 cat >conftest.$ac_ext <<_ACEOF
5449 #line 5449 "configure"
5450 #include "confdefs.h"
5451 #include <${cf_cv_ncurses_header:-curses.h}>
5455 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5460 rm -f conftest.$ac_objext conftest$ac_exeext
5461 if { (eval echo "$as_me:5461: \"$ac_link\"") >&5
5462 (eval $ac_link) 2>&5
5464 echo "$as_me:5464: \$? = $ac_status" >&5
5465 (exit $ac_status); } &&
5466 { ac_try='test -s conftest$ac_exeext'
5467 { (eval echo "$as_me:5467: \"$ac_try\"") >&5
5470 echo "$as_me:5470: \$? = $ac_status" >&5
5471 (exit $ac_status); }; }; then
5472 echo "$as_me:5472: result: yes" >&5
5473 echo "${ECHO_T}yes" >&6
5475 echo "$as_me: failed program was:" >&5
5476 cat conftest.$ac_ext >&5
5477 echo "$as_me:5477: result: no" >&5
5478 echo "${ECHO_T}no" >&6
5479 LIBS="$cf_ncurses_SAVE"
5481 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5484 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5486 cat >>confdefs.h <<EOF
5487 #define $cf_nculib_ROOT 1
5495 echo "$as_me:5495: checking if you want wide-character code" >&5
5496 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
5498 # Check whether --enable-widec or --disable-widec was given.
5499 if test "${enable_widec+set}" = set; then
5500 enableval="$enable_widec"
5501 with_widec=$enableval
5505 echo "$as_me:5505: result: $with_widec" >&5
5506 echo "${ECHO_T}$with_widec" >&6
5507 if test "$with_widec" = yes ; then
5509 echo "$as_me:5509: checking for multibyte character support" >&5
5510 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
5511 if test "${cf_cv_utf8_lib+set}" = set; then
5512 echo $ECHO_N "(cached) $ECHO_C" >&6
5515 cf_save_LIBS="$LIBS"
5516 cat >conftest.$ac_ext <<_ACEOF
5517 #line 5517 "configure"
5518 #include "confdefs.h"
5529 rm -f conftest.$ac_objext conftest$ac_exeext
5530 if { (eval echo "$as_me:5530: \"$ac_link\"") >&5
5531 (eval $ac_link) 2>&5
5533 echo "$as_me:5533: \$? = $ac_status" >&5
5534 (exit $ac_status); } &&
5535 { ac_try='test -s conftest$ac_exeext'
5536 { (eval echo "$as_me:5536: \"$ac_try\"") >&5
5539 echo "$as_me:5539: \$? = $ac_status" >&5
5540 (exit $ac_status); }; }; then
5543 echo "$as_me: failed program was:" >&5
5544 cat conftest.$ac_ext >&5
5546 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
5547 # will be set on completion of the AC_TRY_LINK below.
5548 cf_cv_header_path_utf8=
5549 cf_cv_library_path_utf8=
5551 echo "${as_me:-configure}:5551: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
5553 cf_save_LIBS="$LIBS"
5555 cat >conftest.$ac_ext <<_ACEOF
5556 #line 5556 "configure"
5557 #include "confdefs.h"
5559 #include <libutf8.h>
5568 rm -f conftest.$ac_objext conftest$ac_exeext
5569 if { (eval echo "$as_me:5569: \"$ac_link\"") >&5
5570 (eval $ac_link) 2>&5
5572 echo "$as_me:5572: \$? = $ac_status" >&5
5573 (exit $ac_status); } &&
5574 { ac_try='test -s conftest$ac_exeext'
5575 { (eval echo "$as_me:5575: \"$ac_try\"") >&5
5578 echo "$as_me:5578: \$? = $ac_status" >&5
5579 (exit $ac_status); }; }; then
5581 cf_cv_find_linkage_utf8=yes
5582 cf_cv_header_path_utf8=/usr/include
5583 cf_cv_library_path_utf8=/usr/lib
5586 echo "$as_me: failed program was:" >&5
5587 cat conftest.$ac_ext >&5
5589 LIBS="-lutf8 $cf_save_LIBS"
5591 cat >conftest.$ac_ext <<_ACEOF
5592 #line 5592 "configure"
5593 #include "confdefs.h"
5595 #include <libutf8.h>
5604 rm -f conftest.$ac_objext conftest$ac_exeext
5605 if { (eval echo "$as_me:5605: \"$ac_link\"") >&5
5606 (eval $ac_link) 2>&5
5608 echo "$as_me:5608: \$? = $ac_status" >&5
5609 (exit $ac_status); } &&
5610 { ac_try='test -s conftest$ac_exeext'
5611 { (eval echo "$as_me:5611: \"$ac_try\"") >&5
5614 echo "$as_me:5614: \$? = $ac_status" >&5
5615 (exit $ac_status); }; }; then
5617 cf_cv_find_linkage_utf8=yes
5618 cf_cv_header_path_utf8=/usr/include
5619 cf_cv_library_path_utf8=/usr/lib
5620 cf_cv_library_file_utf8="-lutf8"
5623 echo "$as_me: failed program was:" >&5
5624 cat conftest.$ac_ext >&5
5626 cf_cv_find_linkage_utf8=no
5627 LIBS="$cf_save_LIBS"
5629 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
5631 echo "${as_me:-configure}:5631: testing find linkage for utf8 library ..." 1>&5
5633 echo "${as_me:-configure}:5633: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
5635 cf_save_CPPFLAGS="$CPPFLAGS"
5636 cf_test_CPPFLAGS="$CPPFLAGS"
5640 # collect the current set of include-directories from compiler flags
5641 cf_header_path_list=""
5642 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5643 for cf_header_path in $CPPFLAGS $CFLAGS
5645 case $cf_header_path in
5647 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5649 test "x$cf_header_path" != "xNONE" && \
5650 test -d "$cf_header_path" && \
5652 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5653 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5654 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
5655 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
5656 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
5657 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
5660 cf_header_path_list="$cf_header_path_list $cf_search"
5666 # add the variations for the package we are looking for
5670 test "x$prefix" != "xNONE" && \
5671 test -d "$prefix" && \
5673 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5674 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5675 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
5676 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
5677 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
5678 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
5681 for cf_subdir_prefix in \
5690 test "x$cf_subdir_prefix" != "x$prefix" && \
5691 test -d "$cf_subdir_prefix" && \
5692 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5693 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5694 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
5695 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
5696 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
5697 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
5698 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
5703 test "$includedir" != NONE && \
5704 test "$includedir" != "/usr/include" && \
5705 test -d "$includedir" && {
5706 test -d $includedir && cf_search="$cf_search $includedir"
5707 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
5710 test "$oldincludedir" != NONE && \
5711 test "$oldincludedir" != "/usr/include" && \
5712 test -d "$oldincludedir" && {
5713 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5714 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
5717 cf_search="$cf_search $cf_header_path_list"
5719 for cf_cv_header_path_utf8 in $cf_search
5721 if test -d $cf_cv_header_path_utf8 ; then
5722 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
5724 echo "${as_me:-configure}:5724: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
5726 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
5727 cat >conftest.$ac_ext <<_ACEOF
5728 #line 5728 "configure"
5729 #include "confdefs.h"
5731 #include <libutf8.h>
5740 rm -f conftest.$ac_objext
5741 if { (eval echo "$as_me:5741: \"$ac_compile\"") >&5
5742 (eval $ac_compile) 2>&5
5744 echo "$as_me:5744: \$? = $ac_status" >&5
5745 (exit $ac_status); } &&
5746 { ac_try='test -s conftest.$ac_objext'
5747 { (eval echo "$as_me:5747: \"$ac_try\"") >&5
5750 echo "$as_me:5750: \$? = $ac_status" >&5
5751 (exit $ac_status); }; }; then
5753 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
5755 echo "${as_me:-configure}:5755: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
5757 cf_cv_find_linkage_utf8=maybe
5758 cf_test_CPPFLAGS="$CPPFLAGS"
5761 echo "$as_me: failed program was:" >&5
5762 cat conftest.$ac_ext >&5
5764 CPPFLAGS="$cf_save_CPPFLAGS"
5767 rm -f conftest.$ac_objext conftest.$ac_ext
5771 if test "$cf_cv_find_linkage_utf8" = maybe ; then
5773 echo "${as_me:-configure}:5773: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
5775 cf_save_LIBS="$LIBS"
5776 cf_save_LDFLAGS="$LDFLAGS"
5778 if test "$cf_cv_find_linkage_utf8" != yes ; then
5781 cf_library_path_list=""
5782 if test -n "${LDFLAGS}${LIBS}" ; then
5783 for cf_library_path in $LDFLAGS $LIBS
5785 case $cf_library_path in
5787 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5789 test "x$cf_library_path" != "xNONE" && \
5790 test -d "$cf_library_path" && \
5792 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
5793 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
5794 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
5795 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
5796 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
5797 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
5800 cf_library_path_list="$cf_library_path_list $cf_search"
5808 test "x$prefix" != "xNONE" && \
5809 test -d "$prefix" && \
5811 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5812 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5813 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
5814 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
5815 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
5816 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
5819 for cf_subdir_prefix in \
5828 test "x$cf_subdir_prefix" != "x$prefix" && \
5829 test -d "$cf_subdir_prefix" && \
5830 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5831 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
5832 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
5833 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
5834 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
5835 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
5836 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
5841 cf_search="$cf_library_path_list $cf_search"
5843 for cf_cv_library_path_utf8 in $cf_search
5845 if test -d $cf_cv_library_path_utf8 ; then
5846 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
5848 echo "${as_me:-configure}:5848: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
5850 CPPFLAGS="$cf_test_CPPFLAGS"
5851 LIBS="-lutf8 $cf_save_LIBS"
5852 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
5853 cat >conftest.$ac_ext <<_ACEOF
5854 #line 5854 "configure"
5855 #include "confdefs.h"
5857 #include <libutf8.h>
5866 rm -f conftest.$ac_objext conftest$ac_exeext
5867 if { (eval echo "$as_me:5867: \"$ac_link\"") >&5
5868 (eval $ac_link) 2>&5
5870 echo "$as_me:5870: \$? = $ac_status" >&5
5871 (exit $ac_status); } &&
5872 { ac_try='test -s conftest$ac_exeext'
5873 { (eval echo "$as_me:5873: \"$ac_try\"") >&5
5876 echo "$as_me:5876: \$? = $ac_status" >&5
5877 (exit $ac_status); }; }; then
5879 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
5881 echo "${as_me:-configure}:5881: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
5883 cf_cv_find_linkage_utf8=yes
5884 cf_cv_library_file_utf8="-lutf8"
5887 echo "$as_me: failed program was:" >&5
5888 cat conftest.$ac_ext >&5
5890 CPPFLAGS="$cf_save_CPPFLAGS"
5891 LIBS="$cf_save_LIBS"
5892 LDFLAGS="$cf_save_LDFLAGS"
5895 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5898 CPPFLAGS="$cf_save_CPPFLAGS"
5899 LDFLAGS="$cf_save_LDFLAGS"
5903 cf_cv_find_linkage_utf8=no
5907 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5910 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5912 LIBS="$cf_save_LIBS"
5914 if test "$cf_cv_find_linkage_utf8" = yes ; then
5915 cf_cv_utf8_lib=add-on
5921 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5923 echo "$as_me:5923: result: $cf_cv_utf8_lib" >&5
5924 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
5926 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
5928 if test "$cf_cv_utf8_lib" = "add-on" ; then
5930 cat >>confdefs.h <<\EOF
5931 #define HAVE_LIBUTF8_H 1
5934 if test -n "$cf_cv_header_path_utf8" ; then
5935 for cf_add_incdir in $cf_cv_header_path_utf8
5937 while test $cf_add_incdir != /usr/include
5939 if test -d $cf_add_incdir
5942 if test -n "$CFLAGS$CPPFLAGS" ; then
5943 # a loop is needed to ensure we can add subdirs of existing dirs
5944 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5945 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5946 cf_have_incdir=yes; break
5951 if test "$cf_have_incdir" = no ; then
5952 if test "$cf_add_incdir" = /usr/local/include ; then
5953 if test "$GCC" = yes
5955 cf_save_CPPFLAGS=$CPPFLAGS
5956 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5957 cat >conftest.$ac_ext <<_ACEOF
5958 #line 5958 "configure"
5959 #include "confdefs.h"
5969 rm -f conftest.$ac_objext
5970 if { (eval echo "$as_me:5970: \"$ac_compile\"") >&5
5971 (eval $ac_compile) 2>&5
5973 echo "$as_me:5973: \$? = $ac_status" >&5
5974 (exit $ac_status); } &&
5975 { ac_try='test -s conftest.$ac_objext'
5976 { (eval echo "$as_me:5976: \"$ac_try\"") >&5
5979 echo "$as_me:5979: \$? = $ac_status" >&5
5980 (exit $ac_status); }; }; then
5983 echo "$as_me: failed program was:" >&5
5984 cat conftest.$ac_ext >&5
5987 rm -f conftest.$ac_objext conftest.$ac_ext
5988 CPPFLAGS=$cf_save_CPPFLAGS
5993 if test "$cf_have_incdir" = no ; then
5994 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5996 echo "${as_me:-configure}:5996: testing adding $cf_add_incdir to include-path ..." 1>&5
5998 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6000 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6001 test "$cf_top_incdir" = "$cf_add_incdir" && break
6002 cf_add_incdir="$cf_top_incdir"
6013 if test -n "$cf_cv_library_path_utf8" ; then
6014 for cf_add_libdir in $cf_cv_library_path_utf8
6016 if test $cf_add_libdir = /usr/lib ; then
6018 elif test -d $cf_add_libdir
6021 if test -n "$LDFLAGS$LIBS" ; then
6022 # a loop is needed to ensure we can add subdirs of existing dirs
6023 for cf_test_libdir in $LDFLAGS $LIBS ; do
6024 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6025 cf_have_libdir=yes; break
6029 if test "$cf_have_libdir" = no ; then
6030 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6032 echo "${as_me:-configure}:6032: testing adding $cf_add_libdir to library-path ..." 1>&5
6034 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6040 cf_add_libs="$cf_cv_library_file_utf8"
6041 # Filter out duplicates - this happens with badly-designed ".pc" files...
6042 for cf_add_1lib in $LIBS
6044 for cf_add_2lib in $cf_add_libs
6046 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6052 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6058 cf_ncuconfig_root=ncursesw
6059 cf_have_ncuconfig=no
6061 if test "x${PKG_CONFIG:=none}" != xnone; then
6062 echo "$as_me:6062: checking pkg-config for $cf_ncuconfig_root" >&5
6063 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
6064 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
6065 echo "$as_me:6065: result: yes" >&5
6066 echo "${ECHO_T}yes" >&6
6068 echo "$as_me:6068: checking if the $cf_ncuconfig_root package files work" >&5
6069 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
6070 cf_have_ncuconfig=unknown
6072 cf_save_CPPFLAGS="$CPPFLAGS"
6073 cf_save_LIBS="$LIBS"
6075 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
6077 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
6078 # Filter out duplicates - this happens with badly-designed ".pc" files...
6079 for cf_add_1lib in $LIBS
6081 for cf_add_2lib in $cf_add_libs
6083 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6089 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6093 cat >conftest.$ac_ext <<_ACEOF
6094 #line 6094 "configure"
6095 #include "confdefs.h"
6096 #include <${cf_cv_ncurses_header:-curses.h}>
6100 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6105 rm -f conftest.$ac_objext conftest$ac_exeext
6106 if { (eval echo "$as_me:6106: \"$ac_link\"") >&5
6107 (eval $ac_link) 2>&5
6109 echo "$as_me:6109: \$? = $ac_status" >&5
6110 (exit $ac_status); } &&
6111 { ac_try='test -s conftest$ac_exeext'
6112 { (eval echo "$as_me:6112: \"$ac_try\"") >&5
6115 echo "$as_me:6115: \$? = $ac_status" >&5
6116 (exit $ac_status); }; }; then
6117 if test "$cross_compiling" = yes; then
6118 cf_have_ncuconfig=maybe
6120 cat >conftest.$ac_ext <<_ACEOF
6121 #line 6121 "configure"
6122 #include "confdefs.h"
6123 #include <${cf_cv_ncurses_header:-curses.h}>
6125 { char *xx = curses_version(); return (xx == 0); }
6127 rm -f conftest$ac_exeext
6128 if { (eval echo "$as_me:6128: \"$ac_link\"") >&5
6129 (eval $ac_link) 2>&5
6131 echo "$as_me:6131: \$? = $ac_status" >&5
6132 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6133 { (eval echo "$as_me:6133: \"$ac_try\"") >&5
6136 echo "$as_me:6136: \$? = $ac_status" >&5
6137 (exit $ac_status); }; }; then
6138 cf_have_ncuconfig=yes
6140 echo "$as_me: program exited with status $ac_status" >&5
6141 echo "$as_me: failed program was:" >&5
6142 cat conftest.$ac_ext >&5
6143 cf_have_ncuconfig=no
6145 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6148 echo "$as_me: failed program was:" >&5
6149 cat conftest.$ac_ext >&5
6150 cf_have_ncuconfig=no
6152 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6153 echo "$as_me:6153: result: $cf_have_ncuconfig" >&5
6154 echo "${ECHO_T}$cf_have_ncuconfig" >&6
6155 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
6156 if test "$cf_have_ncuconfig" != "yes"
6158 CPPFLAGS="$cf_save_CPPFLAGS"
6159 LIBS="$cf_save_LIBS"
6160 NCURSES_CONFIG_PKG=none
6163 cat >>confdefs.h <<\EOF
6167 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
6169 echo "$as_me:6169: checking for terminfo header" >&5
6170 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6171 if test "${cf_cv_term_header+set}" = set; then
6172 echo $ECHO_N "(cached) $ECHO_C" >&6
6175 case ${cf_cv_ncurses_header} in
6176 (*/ncurses.h|*/ncursesw.h)
6177 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6180 cf_term_header=term.h
6184 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6186 cat >conftest.$ac_ext <<_ACEOF
6187 #line 6187 "configure"
6188 #include "confdefs.h"
6190 #include <${cf_cv_ncurses_header:-curses.h}>
6196 int x = auto_left_margin
6201 rm -f conftest.$ac_objext
6202 if { (eval echo "$as_me:6202: \"$ac_compile\"") >&5
6203 (eval $ac_compile) 2>&5
6205 echo "$as_me:6205: \$? = $ac_status" >&5
6206 (exit $ac_status); } &&
6207 { ac_try='test -s conftest.$ac_objext'
6208 { (eval echo "$as_me:6208: \"$ac_try\"") >&5
6211 echo "$as_me:6211: \$? = $ac_status" >&5
6212 (exit $ac_status); }; }; then
6214 cf_cv_term_header="$cf_test"
6216 echo "$as_me: failed program was:" >&5
6217 cat conftest.$ac_ext >&5
6219 cf_cv_term_header=unknown
6222 rm -f conftest.$ac_objext conftest.$ac_ext
6223 test "$cf_cv_term_header" != unknown && break
6227 echo "$as_me:6227: result: $cf_cv_term_header" >&5
6228 echo "${ECHO_T}$cf_cv_term_header" >&6
6230 # Set definitions to allow ifdef'ing to accommodate subdirectories
6232 case $cf_cv_term_header in
6235 cat >>confdefs.h <<\EOF
6236 #define HAVE_TERM_H 1
6242 case $cf_cv_term_header in
6245 cat >>confdefs.h <<\EOF
6246 #define HAVE_NCURSES_TERM_H 1
6252 cat >>confdefs.h <<\EOF
6253 #define HAVE_NCURSESW_TERM_H 1
6262 echo "$as_me:6262: result: no" >&5
6263 echo "${ECHO_T}no" >&6
6264 NCURSES_CONFIG_PKG=none
6267 NCURSES_CONFIG_PKG=none
6270 if test "x$cf_have_ncuconfig" = "xno"; then
6271 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
6273 if test -n "$ac_tool_prefix"; then
6274 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6276 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6277 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6278 echo "$as_me:6278: checking for $ac_word" >&5
6279 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6280 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
6281 echo $ECHO_N "(cached) $ECHO_C" >&6
6283 if test -n "$NCURSES_CONFIG"; then
6284 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
6286 ac_save_IFS=$IFS; IFS=$ac_path_separator
6288 for ac_dir in $ac_dummy; do
6290 test -z "$ac_dir" && ac_dir=.
6291 $as_executable_p "$ac_dir/$ac_word" || continue
6292 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
6293 echo "$as_me:6293: found $ac_dir/$ac_word" >&5
6299 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
6300 if test -n "$NCURSES_CONFIG"; then
6301 echo "$as_me:6301: result: $NCURSES_CONFIG" >&5
6302 echo "${ECHO_T}$NCURSES_CONFIG" >&6
6304 echo "$as_me:6304: result: no" >&5
6305 echo "${ECHO_T}no" >&6
6308 test -n "$NCURSES_CONFIG" && break
6311 if test -z "$NCURSES_CONFIG"; then
6312 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
6313 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6315 # Extract the first word of "$ac_prog", so it can be a program name with args.
6316 set dummy $ac_prog; ac_word=$2
6317 echo "$as_me:6317: checking for $ac_word" >&5
6318 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6319 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
6320 echo $ECHO_N "(cached) $ECHO_C" >&6
6322 if test -n "$ac_ct_NCURSES_CONFIG"; then
6323 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
6325 ac_save_IFS=$IFS; IFS=$ac_path_separator
6327 for ac_dir in $ac_dummy; do
6329 test -z "$ac_dir" && ac_dir=.
6330 $as_executable_p "$ac_dir/$ac_word" || continue
6331 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
6332 echo "$as_me:6332: found $ac_dir/$ac_word" >&5
6338 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
6339 if test -n "$ac_ct_NCURSES_CONFIG"; then
6340 echo "$as_me:6340: result: $ac_ct_NCURSES_CONFIG" >&5
6341 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
6343 echo "$as_me:6343: result: no" >&5
6344 echo "${ECHO_T}no" >&6
6347 test -n "$ac_ct_NCURSES_CONFIG" && break
6349 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
6351 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
6354 if test "$NCURSES_CONFIG" != none ; then
6356 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
6358 cf_add_libs="`$NCURSES_CONFIG --libs`"
6359 # Filter out duplicates - this happens with badly-designed ".pc" files...
6360 for cf_add_1lib in $LIBS
6362 for cf_add_2lib in $cf_add_libs
6364 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6370 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6374 # even with config script, some packages use no-override for curses.h
6376 echo "$as_me:6376: checking if we have identified curses headers" >&5
6377 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6378 if test "${cf_cv_ncurses_header+set}" = set; then
6379 echo $ECHO_N "(cached) $ECHO_C" >&6
6382 cf_cv_ncurses_header=none
6384 ncurses.h ncursesw/ncurses.h \
6385 curses.h ncursesw/curses.h
6387 cat >conftest.$ac_ext <<_ACEOF
6388 #line 6388 "configure"
6389 #include "confdefs.h"
6390 #include <${cf_header}>
6394 initscr(); tgoto("?", 0,0)
6399 rm -f conftest.$ac_objext
6400 if { (eval echo "$as_me:6400: \"$ac_compile\"") >&5
6401 (eval $ac_compile) 2>&5
6403 echo "$as_me:6403: \$? = $ac_status" >&5
6404 (exit $ac_status); } &&
6405 { ac_try='test -s conftest.$ac_objext'
6406 { (eval echo "$as_me:6406: \"$ac_try\"") >&5
6409 echo "$as_me:6409: \$? = $ac_status" >&5
6410 (exit $ac_status); }; }; then
6411 cf_cv_ncurses_header=$cf_header; break
6413 echo "$as_me: failed program was:" >&5
6414 cat conftest.$ac_ext >&5
6416 rm -f conftest.$ac_objext conftest.$ac_ext
6420 echo "$as_me:6420: result: $cf_cv_ncurses_header" >&5
6421 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6423 if test "$cf_cv_ncurses_header" = none ; then
6424 { { echo "$as_me:6424: error: No curses header-files found" >&5
6425 echo "$as_me: error: No curses header-files found" >&2;}
6426 { (exit 1); exit 1; }; }
6429 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6431 for ac_header in $cf_cv_ncurses_header
6433 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6434 echo "$as_me:6434: checking for $ac_header" >&5
6435 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6436 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6437 echo $ECHO_N "(cached) $ECHO_C" >&6
6439 cat >conftest.$ac_ext <<_ACEOF
6440 #line 6440 "configure"
6441 #include "confdefs.h"
6442 #include <$ac_header>
6444 if { (eval echo "$as_me:6444: \"$ac_cpp conftest.$ac_ext\"") >&5
6445 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6447 egrep -v '^ *\+' conftest.er1 >conftest.err
6449 cat conftest.err >&5
6450 echo "$as_me:6450: \$? = $ac_status" >&5
6451 (exit $ac_status); } >/dev/null; then
6452 if test -s conftest.err; then
6453 ac_cpp_err=$ac_c_preproc_warn_flag
6460 if test -z "$ac_cpp_err"; then
6461 eval "$as_ac_Header=yes"
6463 echo "$as_me: failed program was:" >&5
6464 cat conftest.$ac_ext >&5
6465 eval "$as_ac_Header=no"
6467 rm -f conftest.err conftest.$ac_ext
6469 echo "$as_me:6469: result: `eval echo '${'$as_ac_Header'}'`" >&5
6470 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6471 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6472 cat >>confdefs.h <<EOF
6473 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6479 cat >>confdefs.h <<\EOF
6483 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6485 cat >>confdefs.h <<EOF
6486 #define $cf_nculib_ROOT 1
6489 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6493 cf_ncuhdr_root=ncursesw
6495 test -n "$cf_cv_curses_dir" && \
6496 test "$cf_cv_curses_dir" != "no" && { \
6498 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6499 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6501 while test $cf_add_incdir != /usr/include
6503 if test -d $cf_add_incdir
6506 if test -n "$CFLAGS$CPPFLAGS" ; then
6507 # a loop is needed to ensure we can add subdirs of existing dirs
6508 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6509 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6510 cf_have_incdir=yes; break
6515 if test "$cf_have_incdir" = no ; then
6516 if test "$cf_add_incdir" = /usr/local/include ; then
6517 if test "$GCC" = yes
6519 cf_save_CPPFLAGS=$CPPFLAGS
6520 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6521 cat >conftest.$ac_ext <<_ACEOF
6522 #line 6522 "configure"
6523 #include "confdefs.h"
6533 rm -f conftest.$ac_objext
6534 if { (eval echo "$as_me:6534: \"$ac_compile\"") >&5
6535 (eval $ac_compile) 2>&5
6537 echo "$as_me:6537: \$? = $ac_status" >&5
6538 (exit $ac_status); } &&
6539 { ac_try='test -s conftest.$ac_objext'
6540 { (eval echo "$as_me:6540: \"$ac_try\"") >&5
6543 echo "$as_me:6543: \$? = $ac_status" >&5
6544 (exit $ac_status); }; }; then
6547 echo "$as_me: failed program was:" >&5
6548 cat conftest.$ac_ext >&5
6551 rm -f conftest.$ac_objext conftest.$ac_ext
6552 CPPFLAGS=$cf_save_CPPFLAGS
6557 if test "$cf_have_incdir" = no ; then
6558 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6560 echo "${as_me:-configure}:6560: testing adding $cf_add_incdir to include-path ..." 1>&5
6562 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6564 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6565 test "$cf_top_incdir" = "$cf_add_incdir" && break
6566 cf_add_incdir="$cf_top_incdir"
6579 echo "$as_me:6579: checking for $cf_ncuhdr_root header in include-path" >&5
6580 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6581 if test "${cf_cv_ncurses_h+set}" = set; then
6582 echo $ECHO_N "(cached) $ECHO_C" >&6
6585 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6586 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6587 for cf_header in $cf_header_list
6590 cat >conftest.$ac_ext <<_ACEOF
6591 #line 6591 "configure"
6592 #include "confdefs.h"
6594 #define _XOPEN_SOURCE_EXTENDED
6595 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
6596 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
6598 #include <$cf_header>
6603 #ifdef NCURSES_VERSION
6609 printf("%s\n", NCURSES_VERSION);
6622 rm -f conftest.$ac_objext
6623 if { (eval echo "$as_me:6623: \"$ac_compile\"") >&5
6624 (eval $ac_compile) 2>&5
6626 echo "$as_me:6626: \$? = $ac_status" >&5
6627 (exit $ac_status); } &&
6628 { ac_try='test -s conftest.$ac_objext'
6629 { (eval echo "$as_me:6629: \"$ac_try\"") >&5
6632 echo "$as_me:6632: \$? = $ac_status" >&5
6633 (exit $ac_status); }; }; then
6634 cf_cv_ncurses_h=$cf_header
6637 echo "$as_me: failed program was:" >&5
6638 cat conftest.$ac_ext >&5
6641 rm -f conftest.$ac_objext conftest.$ac_ext
6643 test "$cf_cv_ncurses_h" != no && break
6647 echo "$as_me:6647: result: $cf_cv_ncurses_h" >&5
6648 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6650 if test "$cf_cv_ncurses_h" != no ; then
6651 cf_cv_ncurses_header=$cf_cv_ncurses_h
6654 echo "$as_me:6654: checking for $cf_ncuhdr_root include-path" >&5
6655 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6656 if test "${cf_cv_ncurses_h2+set}" = set; then
6657 echo $ECHO_N "(cached) $ECHO_C" >&6
6660 test -n "$verbose" && echo
6664 # collect the current set of include-directories from compiler flags
6665 cf_header_path_list=""
6666 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6667 for cf_header_path in $CPPFLAGS $CFLAGS
6669 case $cf_header_path in
6671 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6673 test "x$cf_header_path" != "xNONE" && \
6674 test -d "$cf_header_path" && \
6676 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6677 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6678 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6679 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6680 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6681 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"
6684 cf_header_path_list="$cf_header_path_list $cf_search"
6690 # add the variations for the package we are looking for
6694 test "x$prefix" != "xNONE" && \
6695 test -d "$prefix" && \
6697 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6698 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6699 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6700 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6701 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6702 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6705 for cf_subdir_prefix in \
6714 test "x$cf_subdir_prefix" != "x$prefix" && \
6715 test -d "$cf_subdir_prefix" && \
6716 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6717 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6718 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6719 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
6720 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
6721 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
6722 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"
6727 test "$includedir" != NONE && \
6728 test "$includedir" != "/usr/include" && \
6729 test -d "$includedir" && {
6730 test -d $includedir && cf_search="$cf_search $includedir"
6731 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6734 test "$oldincludedir" != NONE && \
6735 test "$oldincludedir" != "/usr/include" && \
6736 test -d "$oldincludedir" && {
6737 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6738 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6741 cf_search="$cf_search $cf_header_path_list"
6743 test -n "$verbose" && echo search path $cf_search
6744 cf_save2_CPPFLAGS="$CPPFLAGS"
6745 for cf_incdir in $cf_search
6748 if test -n "$cf_incdir" ; then
6749 for cf_add_incdir in $cf_incdir
6751 while test $cf_add_incdir != /usr/include
6753 if test -d $cf_add_incdir
6756 if test -n "$CFLAGS$CPPFLAGS" ; then
6757 # a loop is needed to ensure we can add subdirs of existing dirs
6758 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6759 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6760 cf_have_incdir=yes; break
6765 if test "$cf_have_incdir" = no ; then
6766 if test "$cf_add_incdir" = /usr/local/include ; then
6767 if test "$GCC" = yes
6769 cf_save_CPPFLAGS=$CPPFLAGS
6770 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6771 cat >conftest.$ac_ext <<_ACEOF
6772 #line 6772 "configure"
6773 #include "confdefs.h"
6783 rm -f conftest.$ac_objext
6784 if { (eval echo "$as_me:6784: \"$ac_compile\"") >&5
6785 (eval $ac_compile) 2>&5
6787 echo "$as_me:6787: \$? = $ac_status" >&5
6788 (exit $ac_status); } &&
6789 { ac_try='test -s conftest.$ac_objext'
6790 { (eval echo "$as_me:6790: \"$ac_try\"") >&5
6793 echo "$as_me:6793: \$? = $ac_status" >&5
6794 (exit $ac_status); }; }; then
6797 echo "$as_me: failed program was:" >&5
6798 cat conftest.$ac_ext >&5
6801 rm -f conftest.$ac_objext conftest.$ac_ext
6802 CPPFLAGS=$cf_save_CPPFLAGS
6807 if test "$cf_have_incdir" = no ; then
6808 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6810 echo "${as_me:-configure}:6810: testing adding $cf_add_incdir to include-path ..." 1>&5
6812 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6814 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6815 test "$cf_top_incdir" = "$cf_add_incdir" && break
6816 cf_add_incdir="$cf_top_incdir"
6832 cat >conftest.$ac_ext <<_ACEOF
6833 #line 6833 "configure"
6834 #include "confdefs.h"
6836 #include <$cf_header>
6841 #ifdef NCURSES_VERSION
6843 printf("%s\n", NCURSES_VERSION);
6856 rm -f conftest.$ac_objext
6857 if { (eval echo "$as_me:6857: \"$ac_compile\"") >&5
6858 (eval $ac_compile) 2>&5
6860 echo "$as_me:6860: \$? = $ac_status" >&5
6861 (exit $ac_status); } &&
6862 { ac_try='test -s conftest.$ac_objext'
6863 { (eval echo "$as_me:6863: \"$ac_try\"") >&5
6866 echo "$as_me:6866: \$? = $ac_status" >&5
6867 (exit $ac_status); }; }; then
6868 cf_cv_ncurses_h2=$cf_header
6871 echo "$as_me: failed program was:" >&5
6872 cat conftest.$ac_ext >&5
6875 rm -f conftest.$ac_objext conftest.$ac_ext
6877 if test "$cf_cv_ncurses_h2" != no ; then
6878 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6879 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
6882 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
6884 CPPFLAGS="$cf_save2_CPPFLAGS"
6885 test "$cf_cv_ncurses_h2" != no && break
6887 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6887: error: not found" >&5
6888 echo "$as_me: error: not found" >&2;}
6889 { (exit 1); exit 1; }; }
6892 echo "$as_me:6892: result: $cf_cv_ncurses_h2" >&5
6893 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6895 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6896 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6897 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6898 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6901 if test -n "$cf_1st_incdir" ; then
6902 for cf_add_incdir in $cf_1st_incdir
6904 while test $cf_add_incdir != /usr/include
6906 if test -d $cf_add_incdir
6909 if test -n "$CFLAGS$CPPFLAGS" ; then
6910 # a loop is needed to ensure we can add subdirs of existing dirs
6911 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6912 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6913 cf_have_incdir=yes; break
6918 if test "$cf_have_incdir" = no ; then
6919 if test "$cf_add_incdir" = /usr/local/include ; then
6920 if test "$GCC" = yes
6922 cf_save_CPPFLAGS=$CPPFLAGS
6923 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6924 cat >conftest.$ac_ext <<_ACEOF
6925 #line 6925 "configure"
6926 #include "confdefs.h"
6936 rm -f conftest.$ac_objext
6937 if { (eval echo "$as_me:6937: \"$ac_compile\"") >&5
6938 (eval $ac_compile) 2>&5
6940 echo "$as_me:6940: \$? = $ac_status" >&5
6941 (exit $ac_status); } &&
6942 { ac_try='test -s conftest.$ac_objext'
6943 { (eval echo "$as_me:6943: \"$ac_try\"") >&5
6946 echo "$as_me:6946: \$? = $ac_status" >&5
6947 (exit $ac_status); }; }; then
6950 echo "$as_me: failed program was:" >&5
6951 cat conftest.$ac_ext >&5
6954 rm -f conftest.$ac_objext conftest.$ac_ext
6955 CPPFLAGS=$cf_save_CPPFLAGS
6960 if test "$cf_have_incdir" = no ; then
6961 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6963 echo "${as_me:-configure}:6963: testing adding $cf_add_incdir to include-path ..." 1>&5
6965 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6967 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6968 test "$cf_top_incdir" = "$cf_add_incdir" && break
6969 cf_add_incdir="$cf_top_incdir"
6982 # Set definitions to allow ifdef'ing for ncurses.h
6984 case $cf_cv_ncurses_header in
6987 cat >>confdefs.h <<\EOF
6988 #define HAVE_NCURSES_H 1
6994 case $cf_cv_ncurses_header in
6995 (ncurses/curses.h|ncurses/ncurses.h)
6997 cat >>confdefs.h <<\EOF
6998 #define HAVE_NCURSES_NCURSES_H 1
7002 (ncursesw/curses.h|ncursesw/ncurses.h)
7004 cat >>confdefs.h <<\EOF
7005 #define HAVE_NCURSESW_NCURSES_H 1
7011 echo "$as_me:7011: checking for terminfo header" >&5
7012 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7013 if test "${cf_cv_term_header+set}" = set; then
7014 echo $ECHO_N "(cached) $ECHO_C" >&6
7017 case ${cf_cv_ncurses_header} in
7018 (*/ncurses.h|*/ncursesw.h)
7019 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7022 cf_term_header=term.h
7026 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7028 cat >conftest.$ac_ext <<_ACEOF
7029 #line 7029 "configure"
7030 #include "confdefs.h"
7032 #include <${cf_cv_ncurses_header:-curses.h}>
7038 int x = auto_left_margin
7043 rm -f conftest.$ac_objext
7044 if { (eval echo "$as_me:7044: \"$ac_compile\"") >&5
7045 (eval $ac_compile) 2>&5
7047 echo "$as_me:7047: \$? = $ac_status" >&5
7048 (exit $ac_status); } &&
7049 { ac_try='test -s conftest.$ac_objext'
7050 { (eval echo "$as_me:7050: \"$ac_try\"") >&5
7053 echo "$as_me:7053: \$? = $ac_status" >&5
7054 (exit $ac_status); }; }; then
7056 cf_cv_term_header="$cf_test"
7058 echo "$as_me: failed program was:" >&5
7059 cat conftest.$ac_ext >&5
7061 cf_cv_term_header=unknown
7064 rm -f conftest.$ac_objext conftest.$ac_ext
7065 test "$cf_cv_term_header" != unknown && break
7069 echo "$as_me:7069: result: $cf_cv_term_header" >&5
7070 echo "${ECHO_T}$cf_cv_term_header" >&6
7072 # Set definitions to allow ifdef'ing to accommodate subdirectories
7074 case $cf_cv_term_header in
7077 cat >>confdefs.h <<\EOF
7078 #define HAVE_TERM_H 1
7084 case $cf_cv_term_header in
7087 cat >>confdefs.h <<\EOF
7088 #define HAVE_NCURSES_TERM_H 1
7094 cat >>confdefs.h <<\EOF
7095 #define HAVE_NCURSESW_TERM_H 1
7101 # some applications need this, but should check for NCURSES_VERSION
7103 cat >>confdefs.h <<\EOF
7107 echo "$as_me:7107: checking for ncurses version" >&5
7108 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
7109 if test "${cf_cv_ncurses_version+set}" = set; then
7110 echo $ECHO_N "(cached) $ECHO_C" >&6
7113 cf_cv_ncurses_version=no
7116 if test "$cross_compiling" = yes; then
7118 # This will not work if the preprocessor splits the line after the
7119 # Autoconf token. The 'unproto' program does that.
7120 cat > conftest.$ac_ext <<EOF
7121 #include <${cf_cv_ncurses_header:-curses.h}>
7123 #ifdef NCURSES_VERSION
7124 Autoconf NCURSES_VERSION
7132 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
7133 { (eval echo "$as_me:7133: \"$cf_try\"") >&5
7136 echo "$as_me:7136: \$? = $ac_status" >&5
7137 (exit $ac_status); }
7138 if test -f conftest.out ; then
7139 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
7140 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
7145 cat >conftest.$ac_ext <<_ACEOF
7146 #line 7146 "configure"
7147 #include "confdefs.h"
7149 #include <${cf_cv_ncurses_header:-curses.h}>
7153 FILE *fp = fopen("$cf_tempfile", "w");
7154 #ifdef NCURSES_VERSION
7155 # ifdef NCURSES_VERSION_PATCH
7156 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
7158 fprintf(fp, "%s\n", NCURSES_VERSION);
7162 fprintf(fp, "old\n");
7167 ${cf_cv_main_return:-return}(0);
7170 rm -f conftest$ac_exeext
7171 if { (eval echo "$as_me:7171: \"$ac_link\"") >&5
7172 (eval $ac_link) 2>&5
7174 echo "$as_me:7174: \$? = $ac_status" >&5
7175 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7176 { (eval echo "$as_me:7176: \"$ac_try\"") >&5
7179 echo "$as_me:7179: \$? = $ac_status" >&5
7180 (exit $ac_status); }; }; then
7182 cf_cv_ncurses_version=`cat $cf_tempfile`
7184 echo "$as_me: program exited with status $ac_status" >&5
7185 echo "$as_me: failed program was:" >&5
7186 cat conftest.$ac_ext >&5
7188 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7193 echo "$as_me:7193: result: $cf_cv_ncurses_version" >&5
7194 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
7195 test "$cf_cv_ncurses_version" = no ||
7196 cat >>confdefs.h <<\EOF
7200 cf_nculib_root=ncursesw
7201 # This works, except for the special case where we find gpm, but
7202 # ncurses is in a nonstandard location via $LIBS, and we really want
7205 cf_ncurses_SAVE="$LIBS"
7206 echo "$as_me:7206: checking for Gpm_Open in -lgpm" >&5
7207 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7208 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7209 echo $ECHO_N "(cached) $ECHO_C" >&6
7211 ac_check_lib_save_LIBS=$LIBS
7213 cat >conftest.$ac_ext <<_ACEOF
7214 #line 7214 "configure"
7215 #include "confdefs.h"
7217 /* Override any gcc2 internal prototype to avoid an error. */
7221 /* We use char because int might match the return type of a gcc2
7222 builtin and then its argument prototype would still apply. */
7232 rm -f conftest.$ac_objext conftest$ac_exeext
7233 if { (eval echo "$as_me:7233: \"$ac_link\"") >&5
7234 (eval $ac_link) 2>&5
7236 echo "$as_me:7236: \$? = $ac_status" >&5
7237 (exit $ac_status); } &&
7238 { ac_try='test -s conftest$ac_exeext'
7239 { (eval echo "$as_me:7239: \"$ac_try\"") >&5
7242 echo "$as_me:7242: \$? = $ac_status" >&5
7243 (exit $ac_status); }; }; then
7244 ac_cv_lib_gpm_Gpm_Open=yes
7246 echo "$as_me: failed program was:" >&5
7247 cat conftest.$ac_ext >&5
7248 ac_cv_lib_gpm_Gpm_Open=no
7250 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7251 LIBS=$ac_check_lib_save_LIBS
7253 echo "$as_me:7253: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7254 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7255 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
7256 echo "$as_me:7256: checking for initscr in -lgpm" >&5
7257 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
7258 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
7259 echo $ECHO_N "(cached) $ECHO_C" >&6
7261 ac_check_lib_save_LIBS=$LIBS
7263 cat >conftest.$ac_ext <<_ACEOF
7264 #line 7264 "configure"
7265 #include "confdefs.h"
7267 /* Override any gcc2 internal prototype to avoid an error. */
7271 /* We use char because int might match the return type of a gcc2
7272 builtin and then its argument prototype would still apply. */
7282 rm -f conftest.$ac_objext conftest$ac_exeext
7283 if { (eval echo "$as_me:7283: \"$ac_link\"") >&5
7284 (eval $ac_link) 2>&5
7286 echo "$as_me:7286: \$? = $ac_status" >&5
7287 (exit $ac_status); } &&
7288 { ac_try='test -s conftest$ac_exeext'
7289 { (eval echo "$as_me:7289: \"$ac_try\"") >&5
7292 echo "$as_me:7292: \$? = $ac_status" >&5
7293 (exit $ac_status); }; }; then
7294 ac_cv_lib_gpm_initscr=yes
7296 echo "$as_me: failed program was:" >&5
7297 cat conftest.$ac_ext >&5
7298 ac_cv_lib_gpm_initscr=no
7300 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7301 LIBS=$ac_check_lib_save_LIBS
7303 echo "$as_me:7303: result: $ac_cv_lib_gpm_initscr" >&5
7304 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
7305 if test $ac_cv_lib_gpm_initscr = yes; then
7306 LIBS="$cf_ncurses_SAVE"
7308 cf_ncurses_LIBS="-lgpm"
7315 # This is only necessary if you are linking against an obsolete
7316 # version of ncurses (but it should do no harm, since it's static).
7317 if test "$cf_nculib_root" = ncurses ; then
7318 echo "$as_me:7318: checking for tgoto in -lmytinfo" >&5
7319 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
7320 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
7321 echo $ECHO_N "(cached) $ECHO_C" >&6
7323 ac_check_lib_save_LIBS=$LIBS
7324 LIBS="-lmytinfo $LIBS"
7325 cat >conftest.$ac_ext <<_ACEOF
7326 #line 7326 "configure"
7327 #include "confdefs.h"
7329 /* Override any gcc2 internal prototype to avoid an error. */
7333 /* We use char because int might match the return type of a gcc2
7334 builtin and then its argument prototype would still apply. */
7344 rm -f conftest.$ac_objext conftest$ac_exeext
7345 if { (eval echo "$as_me:7345: \"$ac_link\"") >&5
7346 (eval $ac_link) 2>&5
7348 echo "$as_me:7348: \$? = $ac_status" >&5
7349 (exit $ac_status); } &&
7350 { ac_try='test -s conftest$ac_exeext'
7351 { (eval echo "$as_me:7351: \"$ac_try\"") >&5
7354 echo "$as_me:7354: \$? = $ac_status" >&5
7355 (exit $ac_status); }; }; then
7356 ac_cv_lib_mytinfo_tgoto=yes
7358 echo "$as_me: failed program was:" >&5
7359 cat conftest.$ac_ext >&5
7360 ac_cv_lib_mytinfo_tgoto=no
7362 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7363 LIBS=$ac_check_lib_save_LIBS
7365 echo "$as_me:7365: result: $ac_cv_lib_mytinfo_tgoto" >&5
7366 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7367 if test $ac_cv_lib_mytinfo_tgoto = yes; then
7368 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
7375 cf_add_libs="$cf_ncurses_LIBS"
7376 # Filter out duplicates - this happens with badly-designed ".pc" files...
7377 for cf_add_1lib in $LIBS
7379 for cf_add_2lib in $cf_add_libs
7381 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7387 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7391 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
7394 cf_add_libs="-l$cf_nculib_root"
7395 # Filter out duplicates - this happens with badly-designed ".pc" files...
7396 for cf_add_1lib in $LIBS
7398 for cf_add_2lib in $cf_add_libs
7400 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7406 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7412 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7414 echo "$as_me:7414: checking for initscr" >&5
7415 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7416 if test "${ac_cv_func_initscr+set}" = set; then
7417 echo $ECHO_N "(cached) $ECHO_C" >&6
7419 cat >conftest.$ac_ext <<_ACEOF
7420 #line 7420 "configure"
7421 #include "confdefs.h"
7422 /* System header to define __stub macros and hopefully few prototypes,
7423 which can conflict with char initscr (); below. */
7425 /* Override any gcc2 internal prototype to avoid an error. */
7429 /* We use char because int might match the return type of a gcc2
7430 builtin and then its argument prototype would still apply. */
7437 /* The GNU C library defines this for functions which it implements
7438 to always fail with ENOSYS. Some functions are actually named
7439 something starting with __ and the normal name is an alias. */
7440 #if defined (__stub_initscr) || defined (__stub___initscr)
7443 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7450 rm -f conftest.$ac_objext conftest$ac_exeext
7451 if { (eval echo "$as_me:7451: \"$ac_link\"") >&5
7452 (eval $ac_link) 2>&5
7454 echo "$as_me:7454: \$? = $ac_status" >&5
7455 (exit $ac_status); } &&
7456 { ac_try='test -s conftest$ac_exeext'
7457 { (eval echo "$as_me:7457: \"$ac_try\"") >&5
7460 echo "$as_me:7460: \$? = $ac_status" >&5
7461 (exit $ac_status); }; }; then
7462 ac_cv_func_initscr=yes
7464 echo "$as_me: failed program was:" >&5
7465 cat conftest.$ac_ext >&5
7466 ac_cv_func_initscr=no
7468 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7470 echo "$as_me:7470: result: $ac_cv_func_initscr" >&5
7471 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7472 if test $ac_cv_func_initscr = yes; then
7473 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7476 cf_save_LIBS="$LIBS"
7477 echo "$as_me:7477: checking for initscr in -l$cf_nculib_root" >&5
7478 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7479 LIBS="-l$cf_nculib_root $LIBS"
7480 cat >conftest.$ac_ext <<_ACEOF
7481 #line 7481 "configure"
7482 #include "confdefs.h"
7483 #include <${cf_cv_ncurses_header:-curses.h}>
7492 rm -f conftest.$ac_objext conftest$ac_exeext
7493 if { (eval echo "$as_me:7493: \"$ac_link\"") >&5
7494 (eval $ac_link) 2>&5
7496 echo "$as_me:7496: \$? = $ac_status" >&5
7497 (exit $ac_status); } &&
7498 { ac_try='test -s conftest$ac_exeext'
7499 { (eval echo "$as_me:7499: \"$ac_try\"") >&5
7502 echo "$as_me:7502: \$? = $ac_status" >&5
7503 (exit $ac_status); }; }; then
7504 echo "$as_me:7504: result: yes" >&5
7505 echo "${ECHO_T}yes" >&6
7506 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7509 echo "$as_me: failed program was:" >&5
7510 cat conftest.$ac_ext >&5
7511 echo "$as_me:7511: result: no" >&5
7512 echo "${ECHO_T}no" >&6
7515 cf_library_path_list=""
7516 if test -n "${LDFLAGS}${LIBS}" ; then
7517 for cf_library_path in $LDFLAGS $LIBS
7519 case $cf_library_path in
7521 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7523 test "x$cf_library_path" != "xNONE" && \
7524 test -d "$cf_library_path" && \
7526 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7527 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7528 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7529 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7530 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7531 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"
7534 cf_library_path_list="$cf_library_path_list $cf_search"
7542 test "x$prefix" != "xNONE" && \
7543 test -d "$prefix" && \
7545 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7546 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7547 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7548 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7549 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7550 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7553 for cf_subdir_prefix in \
7562 test "x$cf_subdir_prefix" != "x$prefix" && \
7563 test -d "$cf_subdir_prefix" && \
7564 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7565 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7566 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
7567 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
7568 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
7569 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
7570 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"
7575 cf_search="$cf_library_path_list $cf_search"
7577 for cf_libdir in $cf_search
7579 echo "$as_me:7579: checking for -l$cf_nculib_root in $cf_libdir" >&5
7580 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7581 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7582 cat >conftest.$ac_ext <<_ACEOF
7583 #line 7583 "configure"
7584 #include "confdefs.h"
7585 #include <${cf_cv_ncurses_header:-curses.h}>
7594 rm -f conftest.$ac_objext conftest$ac_exeext
7595 if { (eval echo "$as_me:7595: \"$ac_link\"") >&5
7596 (eval $ac_link) 2>&5
7598 echo "$as_me:7598: \$? = $ac_status" >&5
7599 (exit $ac_status); } &&
7600 { ac_try='test -s conftest$ac_exeext'
7601 { (eval echo "$as_me:7601: \"$ac_try\"") >&5
7604 echo "$as_me:7604: \$? = $ac_status" >&5
7605 (exit $ac_status); }; }; then
7606 echo "$as_me:7606: result: yes" >&5
7607 echo "${ECHO_T}yes" >&6
7608 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7611 echo "$as_me: failed program was:" >&5
7612 cat conftest.$ac_ext >&5
7613 echo "$as_me:7613: result: no" >&5
7614 echo "${ECHO_T}no" >&6
7615 LIBS="$cf_save_LIBS"
7617 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7621 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7625 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7627 if test $cf_found_library = no ; then
7628 { { echo "$as_me:7628: error: Cannot link $cf_nculib_root library" >&5
7629 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7630 { (exit 1); exit 1; }; }
7635 if test -n "$cf_ncurses_LIBS" ; then
7636 echo "$as_me:7636: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7637 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7638 cf_ncurses_SAVE="$LIBS"
7639 for p in $cf_ncurses_LIBS ; do
7640 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7641 if test "$q" != "$LIBS" ; then
7645 cat >conftest.$ac_ext <<_ACEOF
7646 #line 7646 "configure"
7647 #include "confdefs.h"
7648 #include <${cf_cv_ncurses_header:-curses.h}>
7652 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7657 rm -f conftest.$ac_objext conftest$ac_exeext
7658 if { (eval echo "$as_me:7658: \"$ac_link\"") >&5
7659 (eval $ac_link) 2>&5
7661 echo "$as_me:7661: \$? = $ac_status" >&5
7662 (exit $ac_status); } &&
7663 { ac_try='test -s conftest$ac_exeext'
7664 { (eval echo "$as_me:7664: \"$ac_try\"") >&5
7667 echo "$as_me:7667: \$? = $ac_status" >&5
7668 (exit $ac_status); }; }; then
7669 echo "$as_me:7669: result: yes" >&5
7670 echo "${ECHO_T}yes" >&6
7672 echo "$as_me: failed program was:" >&5
7673 cat conftest.$ac_ext >&5
7674 echo "$as_me:7674: result: no" >&5
7675 echo "${ECHO_T}no" >&6
7676 LIBS="$cf_ncurses_SAVE"
7678 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7681 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7683 cat >>confdefs.h <<EOF
7684 #define $cf_nculib_ROOT 1
7694 cf_ncuconfig_root=ncurses
7695 cf_have_ncuconfig=no
7697 if test "x${PKG_CONFIG:=none}" != xnone; then
7698 echo "$as_me:7698: checking pkg-config for $cf_ncuconfig_root" >&5
7699 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7700 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7701 echo "$as_me:7701: result: yes" >&5
7702 echo "${ECHO_T}yes" >&6
7704 echo "$as_me:7704: checking if the $cf_ncuconfig_root package files work" >&5
7705 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7706 cf_have_ncuconfig=unknown
7708 cf_save_CPPFLAGS="$CPPFLAGS"
7709 cf_save_LIBS="$LIBS"
7711 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7713 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7714 # Filter out duplicates - this happens with badly-designed ".pc" files...
7715 for cf_add_1lib in $LIBS
7717 for cf_add_2lib in $cf_add_libs
7719 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7725 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7729 cat >conftest.$ac_ext <<_ACEOF
7730 #line 7730 "configure"
7731 #include "confdefs.h"
7732 #include <${cf_cv_ncurses_header:-curses.h}>
7736 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7741 rm -f conftest.$ac_objext conftest$ac_exeext
7742 if { (eval echo "$as_me:7742: \"$ac_link\"") >&5
7743 (eval $ac_link) 2>&5
7745 echo "$as_me:7745: \$? = $ac_status" >&5
7746 (exit $ac_status); } &&
7747 { ac_try='test -s conftest$ac_exeext'
7748 { (eval echo "$as_me:7748: \"$ac_try\"") >&5
7751 echo "$as_me:7751: \$? = $ac_status" >&5
7752 (exit $ac_status); }; }; then
7753 if test "$cross_compiling" = yes; then
7754 cf_have_ncuconfig=maybe
7756 cat >conftest.$ac_ext <<_ACEOF
7757 #line 7757 "configure"
7758 #include "confdefs.h"
7759 #include <${cf_cv_ncurses_header:-curses.h}>
7761 { char *xx = curses_version(); return (xx == 0); }
7763 rm -f conftest$ac_exeext
7764 if { (eval echo "$as_me:7764: \"$ac_link\"") >&5
7765 (eval $ac_link) 2>&5
7767 echo "$as_me:7767: \$? = $ac_status" >&5
7768 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7769 { (eval echo "$as_me:7769: \"$ac_try\"") >&5
7772 echo "$as_me:7772: \$? = $ac_status" >&5
7773 (exit $ac_status); }; }; then
7774 cf_have_ncuconfig=yes
7776 echo "$as_me: program exited with status $ac_status" >&5
7777 echo "$as_me: failed program was:" >&5
7778 cat conftest.$ac_ext >&5
7779 cf_have_ncuconfig=no
7781 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7784 echo "$as_me: failed program was:" >&5
7785 cat conftest.$ac_ext >&5
7786 cf_have_ncuconfig=no
7788 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7789 echo "$as_me:7789: result: $cf_have_ncuconfig" >&5
7790 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7791 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7792 if test "$cf_have_ncuconfig" != "yes"
7794 CPPFLAGS="$cf_save_CPPFLAGS"
7795 LIBS="$cf_save_LIBS"
7796 NCURSES_CONFIG_PKG=none
7799 cat >>confdefs.h <<\EOF
7803 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7805 echo "$as_me:7805: checking for terminfo header" >&5
7806 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7807 if test "${cf_cv_term_header+set}" = set; then
7808 echo $ECHO_N "(cached) $ECHO_C" >&6
7811 case ${cf_cv_ncurses_header} in
7812 (*/ncurses.h|*/ncursesw.h)
7813 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7816 cf_term_header=term.h
7820 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7822 cat >conftest.$ac_ext <<_ACEOF
7823 #line 7823 "configure"
7824 #include "confdefs.h"
7826 #include <${cf_cv_ncurses_header:-curses.h}>
7832 int x = auto_left_margin
7837 rm -f conftest.$ac_objext
7838 if { (eval echo "$as_me:7838: \"$ac_compile\"") >&5
7839 (eval $ac_compile) 2>&5
7841 echo "$as_me:7841: \$? = $ac_status" >&5
7842 (exit $ac_status); } &&
7843 { ac_try='test -s conftest.$ac_objext'
7844 { (eval echo "$as_me:7844: \"$ac_try\"") >&5
7847 echo "$as_me:7847: \$? = $ac_status" >&5
7848 (exit $ac_status); }; }; then
7850 cf_cv_term_header="$cf_test"
7852 echo "$as_me: failed program was:" >&5
7853 cat conftest.$ac_ext >&5
7855 cf_cv_term_header=unknown
7858 rm -f conftest.$ac_objext conftest.$ac_ext
7859 test "$cf_cv_term_header" != unknown && break
7863 echo "$as_me:7863: result: $cf_cv_term_header" >&5
7864 echo "${ECHO_T}$cf_cv_term_header" >&6
7866 # Set definitions to allow ifdef'ing to accommodate subdirectories
7868 case $cf_cv_term_header in
7871 cat >>confdefs.h <<\EOF
7872 #define HAVE_TERM_H 1
7878 case $cf_cv_term_header in
7881 cat >>confdefs.h <<\EOF
7882 #define HAVE_NCURSES_TERM_H 1
7888 cat >>confdefs.h <<\EOF
7889 #define HAVE_NCURSESW_TERM_H 1
7898 echo "$as_me:7898: result: no" >&5
7899 echo "${ECHO_T}no" >&6
7900 NCURSES_CONFIG_PKG=none
7903 NCURSES_CONFIG_PKG=none
7906 if test "x$cf_have_ncuconfig" = "xno"; then
7907 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7909 if test -n "$ac_tool_prefix"; then
7910 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7912 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7913 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7914 echo "$as_me:7914: checking for $ac_word" >&5
7915 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7916 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7917 echo $ECHO_N "(cached) $ECHO_C" >&6
7919 if test -n "$NCURSES_CONFIG"; then
7920 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7922 ac_save_IFS=$IFS; IFS=$ac_path_separator
7924 for ac_dir in $ac_dummy; do
7926 test -z "$ac_dir" && ac_dir=.
7927 $as_executable_p "$ac_dir/$ac_word" || continue
7928 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7929 echo "$as_me:7929: found $ac_dir/$ac_word" >&5
7935 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7936 if test -n "$NCURSES_CONFIG"; then
7937 echo "$as_me:7937: result: $NCURSES_CONFIG" >&5
7938 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7940 echo "$as_me:7940: result: no" >&5
7941 echo "${ECHO_T}no" >&6
7944 test -n "$NCURSES_CONFIG" && break
7947 if test -z "$NCURSES_CONFIG"; then
7948 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7949 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7951 # Extract the first word of "$ac_prog", so it can be a program name with args.
7952 set dummy $ac_prog; ac_word=$2
7953 echo "$as_me:7953: checking for $ac_word" >&5
7954 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7955 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7956 echo $ECHO_N "(cached) $ECHO_C" >&6
7958 if test -n "$ac_ct_NCURSES_CONFIG"; then
7959 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7961 ac_save_IFS=$IFS; IFS=$ac_path_separator
7963 for ac_dir in $ac_dummy; do
7965 test -z "$ac_dir" && ac_dir=.
7966 $as_executable_p "$ac_dir/$ac_word" || continue
7967 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7968 echo "$as_me:7968: found $ac_dir/$ac_word" >&5
7974 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7975 if test -n "$ac_ct_NCURSES_CONFIG"; then
7976 echo "$as_me:7976: result: $ac_ct_NCURSES_CONFIG" >&5
7977 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7979 echo "$as_me:7979: result: no" >&5
7980 echo "${ECHO_T}no" >&6
7983 test -n "$ac_ct_NCURSES_CONFIG" && break
7985 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7987 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7990 if test "$NCURSES_CONFIG" != none ; then
7992 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
7994 cf_add_libs="`$NCURSES_CONFIG --libs`"
7995 # Filter out duplicates - this happens with badly-designed ".pc" files...
7996 for cf_add_1lib in $LIBS
7998 for cf_add_2lib in $cf_add_libs
8000 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8006 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8010 # even with config script, some packages use no-override for curses.h
8012 echo "$as_me:8012: checking if we have identified curses headers" >&5
8013 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8014 if test "${cf_cv_ncurses_header+set}" = set; then
8015 echo $ECHO_N "(cached) $ECHO_C" >&6
8018 cf_cv_ncurses_header=none
8020 ncurses.h ncurses/ncurses.h \
8021 curses.h ncurses/curses.h
8023 cat >conftest.$ac_ext <<_ACEOF
8024 #line 8024 "configure"
8025 #include "confdefs.h"
8026 #include <${cf_header}>
8030 initscr(); tgoto("?", 0,0)
8035 rm -f conftest.$ac_objext
8036 if { (eval echo "$as_me:8036: \"$ac_compile\"") >&5
8037 (eval $ac_compile) 2>&5
8039 echo "$as_me:8039: \$? = $ac_status" >&5
8040 (exit $ac_status); } &&
8041 { ac_try='test -s conftest.$ac_objext'
8042 { (eval echo "$as_me:8042: \"$ac_try\"") >&5
8045 echo "$as_me:8045: \$? = $ac_status" >&5
8046 (exit $ac_status); }; }; then
8047 cf_cv_ncurses_header=$cf_header; break
8049 echo "$as_me: failed program was:" >&5
8050 cat conftest.$ac_ext >&5
8052 rm -f conftest.$ac_objext conftest.$ac_ext
8056 echo "$as_me:8056: result: $cf_cv_ncurses_header" >&5
8057 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8059 if test "$cf_cv_ncurses_header" = none ; then
8060 { { echo "$as_me:8060: error: No curses header-files found" >&5
8061 echo "$as_me: error: No curses header-files found" >&2;}
8062 { (exit 1); exit 1; }; }
8065 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8067 for ac_header in $cf_cv_ncurses_header
8069 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8070 echo "$as_me:8070: checking for $ac_header" >&5
8071 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8072 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8073 echo $ECHO_N "(cached) $ECHO_C" >&6
8075 cat >conftest.$ac_ext <<_ACEOF
8076 #line 8076 "configure"
8077 #include "confdefs.h"
8078 #include <$ac_header>
8080 if { (eval echo "$as_me:8080: \"$ac_cpp conftest.$ac_ext\"") >&5
8081 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8083 egrep -v '^ *\+' conftest.er1 >conftest.err
8085 cat conftest.err >&5
8086 echo "$as_me:8086: \$? = $ac_status" >&5
8087 (exit $ac_status); } >/dev/null; then
8088 if test -s conftest.err; then
8089 ac_cpp_err=$ac_c_preproc_warn_flag
8096 if test -z "$ac_cpp_err"; then
8097 eval "$as_ac_Header=yes"
8099 echo "$as_me: failed program was:" >&5
8100 cat conftest.$ac_ext >&5
8101 eval "$as_ac_Header=no"
8103 rm -f conftest.err conftest.$ac_ext
8105 echo "$as_me:8105: result: `eval echo '${'$as_ac_Header'}'`" >&5
8106 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8107 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8108 cat >>confdefs.h <<EOF
8109 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8115 cat >>confdefs.h <<\EOF
8119 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8121 cat >>confdefs.h <<EOF
8122 #define $cf_nculib_ROOT 1
8125 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8129 cf_ncuhdr_root=ncurses
8131 test -n "$cf_cv_curses_dir" && \
8132 test "$cf_cv_curses_dir" != "no" && { \
8134 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8135 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8137 while test $cf_add_incdir != /usr/include
8139 if test -d $cf_add_incdir
8142 if test -n "$CFLAGS$CPPFLAGS" ; then
8143 # a loop is needed to ensure we can add subdirs of existing dirs
8144 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8145 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8146 cf_have_incdir=yes; break
8151 if test "$cf_have_incdir" = no ; then
8152 if test "$cf_add_incdir" = /usr/local/include ; then
8153 if test "$GCC" = yes
8155 cf_save_CPPFLAGS=$CPPFLAGS
8156 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8157 cat >conftest.$ac_ext <<_ACEOF
8158 #line 8158 "configure"
8159 #include "confdefs.h"
8169 rm -f conftest.$ac_objext
8170 if { (eval echo "$as_me:8170: \"$ac_compile\"") >&5
8171 (eval $ac_compile) 2>&5
8173 echo "$as_me:8173: \$? = $ac_status" >&5
8174 (exit $ac_status); } &&
8175 { ac_try='test -s conftest.$ac_objext'
8176 { (eval echo "$as_me:8176: \"$ac_try\"") >&5
8179 echo "$as_me:8179: \$? = $ac_status" >&5
8180 (exit $ac_status); }; }; then
8183 echo "$as_me: failed program was:" >&5
8184 cat conftest.$ac_ext >&5
8187 rm -f conftest.$ac_objext conftest.$ac_ext
8188 CPPFLAGS=$cf_save_CPPFLAGS
8193 if test "$cf_have_incdir" = no ; then
8194 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8196 echo "${as_me:-configure}:8196: testing adding $cf_add_incdir to include-path ..." 1>&5
8198 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8200 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8201 test "$cf_top_incdir" = "$cf_add_incdir" && break
8202 cf_add_incdir="$cf_top_incdir"
8215 echo "$as_me:8215: checking for $cf_ncuhdr_root header in include-path" >&5
8216 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8217 if test "${cf_cv_ncurses_h+set}" = set; then
8218 echo $ECHO_N "(cached) $ECHO_C" >&6
8221 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8222 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8223 for cf_header in $cf_header_list
8226 cat >conftest.$ac_ext <<_ACEOF
8227 #line 8227 "configure"
8228 #include "confdefs.h"
8230 #include <$cf_header>
8235 #ifdef NCURSES_VERSION
8237 printf("%s\n", NCURSES_VERSION);
8250 rm -f conftest.$ac_objext
8251 if { (eval echo "$as_me:8251: \"$ac_compile\"") >&5
8252 (eval $ac_compile) 2>&5
8254 echo "$as_me:8254: \$? = $ac_status" >&5
8255 (exit $ac_status); } &&
8256 { ac_try='test -s conftest.$ac_objext'
8257 { (eval echo "$as_me:8257: \"$ac_try\"") >&5
8260 echo "$as_me:8260: \$? = $ac_status" >&5
8261 (exit $ac_status); }; }; then
8262 cf_cv_ncurses_h=$cf_header
8265 echo "$as_me: failed program was:" >&5
8266 cat conftest.$ac_ext >&5
8269 rm -f conftest.$ac_objext conftest.$ac_ext
8271 test "$cf_cv_ncurses_h" != no && break
8275 echo "$as_me:8275: result: $cf_cv_ncurses_h" >&5
8276 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8278 if test "$cf_cv_ncurses_h" != no ; then
8279 cf_cv_ncurses_header=$cf_cv_ncurses_h
8282 echo "$as_me:8282: checking for $cf_ncuhdr_root include-path" >&5
8283 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8284 if test "${cf_cv_ncurses_h2+set}" = set; then
8285 echo $ECHO_N "(cached) $ECHO_C" >&6
8288 test -n "$verbose" && echo
8292 # collect the current set of include-directories from compiler flags
8293 cf_header_path_list=""
8294 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8295 for cf_header_path in $CPPFLAGS $CFLAGS
8297 case $cf_header_path in
8299 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8301 test "x$cf_header_path" != "xNONE" && \
8302 test -d "$cf_header_path" && \
8304 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8305 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
8306 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8307 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8308 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8309 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"
8312 cf_header_path_list="$cf_header_path_list $cf_search"
8318 # add the variations for the package we are looking for
8322 test "x$prefix" != "xNONE" && \
8323 test -d "$prefix" && \
8325 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8326 test -d $prefix/include && cf_search="$cf_search $prefix/include"
8327 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8328 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8329 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8330 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8333 for cf_subdir_prefix in \
8342 test "x$cf_subdir_prefix" != "x$prefix" && \
8343 test -d "$cf_subdir_prefix" && \
8344 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8345 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8346 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
8347 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8348 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8349 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8350 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"
8355 test "$includedir" != NONE && \
8356 test "$includedir" != "/usr/include" && \
8357 test -d "$includedir" && {
8358 test -d $includedir && cf_search="$cf_search $includedir"
8359 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8362 test "$oldincludedir" != NONE && \
8363 test "$oldincludedir" != "/usr/include" && \
8364 test -d "$oldincludedir" && {
8365 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8366 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8369 cf_search="$cf_search $cf_header_path_list"
8371 test -n "$verbose" && echo search path $cf_search
8372 cf_save2_CPPFLAGS="$CPPFLAGS"
8373 for cf_incdir in $cf_search
8376 if test -n "$cf_incdir" ; then
8377 for cf_add_incdir in $cf_incdir
8379 while test $cf_add_incdir != /usr/include
8381 if test -d $cf_add_incdir
8384 if test -n "$CFLAGS$CPPFLAGS" ; then
8385 # a loop is needed to ensure we can add subdirs of existing dirs
8386 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8387 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8388 cf_have_incdir=yes; break
8393 if test "$cf_have_incdir" = no ; then
8394 if test "$cf_add_incdir" = /usr/local/include ; then
8395 if test "$GCC" = yes
8397 cf_save_CPPFLAGS=$CPPFLAGS
8398 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8399 cat >conftest.$ac_ext <<_ACEOF
8400 #line 8400 "configure"
8401 #include "confdefs.h"
8411 rm -f conftest.$ac_objext
8412 if { (eval echo "$as_me:8412: \"$ac_compile\"") >&5
8413 (eval $ac_compile) 2>&5
8415 echo "$as_me:8415: \$? = $ac_status" >&5
8416 (exit $ac_status); } &&
8417 { ac_try='test -s conftest.$ac_objext'
8418 { (eval echo "$as_me:8418: \"$ac_try\"") >&5
8421 echo "$as_me:8421: \$? = $ac_status" >&5
8422 (exit $ac_status); }; }; then
8425 echo "$as_me: failed program was:" >&5
8426 cat conftest.$ac_ext >&5
8429 rm -f conftest.$ac_objext conftest.$ac_ext
8430 CPPFLAGS=$cf_save_CPPFLAGS
8435 if test "$cf_have_incdir" = no ; then
8436 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8438 echo "${as_me:-configure}:8438: testing adding $cf_add_incdir to include-path ..." 1>&5
8440 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8442 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8443 test "$cf_top_incdir" = "$cf_add_incdir" && break
8444 cf_add_incdir="$cf_top_incdir"
8460 cat >conftest.$ac_ext <<_ACEOF
8461 #line 8461 "configure"
8462 #include "confdefs.h"
8464 #include <$cf_header>
8469 #ifdef NCURSES_VERSION
8471 printf("%s\n", NCURSES_VERSION);
8484 rm -f conftest.$ac_objext
8485 if { (eval echo "$as_me:8485: \"$ac_compile\"") >&5
8486 (eval $ac_compile) 2>&5
8488 echo "$as_me:8488: \$? = $ac_status" >&5
8489 (exit $ac_status); } &&
8490 { ac_try='test -s conftest.$ac_objext'
8491 { (eval echo "$as_me:8491: \"$ac_try\"") >&5
8494 echo "$as_me:8494: \$? = $ac_status" >&5
8495 (exit $ac_status); }; }; then
8496 cf_cv_ncurses_h2=$cf_header
8499 echo "$as_me: failed program was:" >&5
8500 cat conftest.$ac_ext >&5
8503 rm -f conftest.$ac_objext conftest.$ac_ext
8505 if test "$cf_cv_ncurses_h2" != no ; then
8506 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8507 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8510 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8512 CPPFLAGS="$cf_save2_CPPFLAGS"
8513 test "$cf_cv_ncurses_h2" != no && break
8515 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8515: error: not found" >&5
8516 echo "$as_me: error: not found" >&2;}
8517 { (exit 1); exit 1; }; }
8520 echo "$as_me:8520: result: $cf_cv_ncurses_h2" >&5
8521 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8523 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8524 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8525 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8526 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8529 if test -n "$cf_1st_incdir" ; then
8530 for cf_add_incdir in $cf_1st_incdir
8532 while test $cf_add_incdir != /usr/include
8534 if test -d $cf_add_incdir
8537 if test -n "$CFLAGS$CPPFLAGS" ; then
8538 # a loop is needed to ensure we can add subdirs of existing dirs
8539 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8540 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8541 cf_have_incdir=yes; break
8546 if test "$cf_have_incdir" = no ; then
8547 if test "$cf_add_incdir" = /usr/local/include ; then
8548 if test "$GCC" = yes
8550 cf_save_CPPFLAGS=$CPPFLAGS
8551 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8552 cat >conftest.$ac_ext <<_ACEOF
8553 #line 8553 "configure"
8554 #include "confdefs.h"
8564 rm -f conftest.$ac_objext
8565 if { (eval echo "$as_me:8565: \"$ac_compile\"") >&5
8566 (eval $ac_compile) 2>&5
8568 echo "$as_me:8568: \$? = $ac_status" >&5
8569 (exit $ac_status); } &&
8570 { ac_try='test -s conftest.$ac_objext'
8571 { (eval echo "$as_me:8571: \"$ac_try\"") >&5
8574 echo "$as_me:8574: \$? = $ac_status" >&5
8575 (exit $ac_status); }; }; then
8578 echo "$as_me: failed program was:" >&5
8579 cat conftest.$ac_ext >&5
8582 rm -f conftest.$ac_objext conftest.$ac_ext
8583 CPPFLAGS=$cf_save_CPPFLAGS
8588 if test "$cf_have_incdir" = no ; then
8589 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8591 echo "${as_me:-configure}:8591: testing adding $cf_add_incdir to include-path ..." 1>&5
8593 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8595 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8596 test "$cf_top_incdir" = "$cf_add_incdir" && break
8597 cf_add_incdir="$cf_top_incdir"
8610 # Set definitions to allow ifdef'ing for ncurses.h
8612 case $cf_cv_ncurses_header in
8615 cat >>confdefs.h <<\EOF
8616 #define HAVE_NCURSES_H 1
8622 case $cf_cv_ncurses_header in
8623 (ncurses/curses.h|ncurses/ncurses.h)
8625 cat >>confdefs.h <<\EOF
8626 #define HAVE_NCURSES_NCURSES_H 1
8630 (ncursesw/curses.h|ncursesw/ncurses.h)
8632 cat >>confdefs.h <<\EOF
8633 #define HAVE_NCURSESW_NCURSES_H 1
8639 echo "$as_me:8639: checking for terminfo header" >&5
8640 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8641 if test "${cf_cv_term_header+set}" = set; then
8642 echo $ECHO_N "(cached) $ECHO_C" >&6
8645 case ${cf_cv_ncurses_header} in
8646 (*/ncurses.h|*/ncursesw.h)
8647 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8650 cf_term_header=term.h
8654 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8656 cat >conftest.$ac_ext <<_ACEOF
8657 #line 8657 "configure"
8658 #include "confdefs.h"
8660 #include <${cf_cv_ncurses_header:-curses.h}>
8666 int x = auto_left_margin
8671 rm -f conftest.$ac_objext
8672 if { (eval echo "$as_me:8672: \"$ac_compile\"") >&5
8673 (eval $ac_compile) 2>&5
8675 echo "$as_me:8675: \$? = $ac_status" >&5
8676 (exit $ac_status); } &&
8677 { ac_try='test -s conftest.$ac_objext'
8678 { (eval echo "$as_me:8678: \"$ac_try\"") >&5
8681 echo "$as_me:8681: \$? = $ac_status" >&5
8682 (exit $ac_status); }; }; then
8684 cf_cv_term_header="$cf_test"
8686 echo "$as_me: failed program was:" >&5
8687 cat conftest.$ac_ext >&5
8689 cf_cv_term_header=unknown
8692 rm -f conftest.$ac_objext conftest.$ac_ext
8693 test "$cf_cv_term_header" != unknown && break
8697 echo "$as_me:8697: result: $cf_cv_term_header" >&5
8698 echo "${ECHO_T}$cf_cv_term_header" >&6
8700 # Set definitions to allow ifdef'ing to accommodate subdirectories
8702 case $cf_cv_term_header in
8705 cat >>confdefs.h <<\EOF
8706 #define HAVE_TERM_H 1
8712 case $cf_cv_term_header in
8715 cat >>confdefs.h <<\EOF
8716 #define HAVE_NCURSES_TERM_H 1
8722 cat >>confdefs.h <<\EOF
8723 #define HAVE_NCURSESW_TERM_H 1
8729 # some applications need this, but should check for NCURSES_VERSION
8731 cat >>confdefs.h <<\EOF
8735 echo "$as_me:8735: checking for ncurses version" >&5
8736 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8737 if test "${cf_cv_ncurses_version+set}" = set; then
8738 echo $ECHO_N "(cached) $ECHO_C" >&6
8741 cf_cv_ncurses_version=no
8744 if test "$cross_compiling" = yes; then
8746 # This will not work if the preprocessor splits the line after the
8747 # Autoconf token. The 'unproto' program does that.
8748 cat > conftest.$ac_ext <<EOF
8749 #include <${cf_cv_ncurses_header:-curses.h}>
8751 #ifdef NCURSES_VERSION
8752 Autoconf NCURSES_VERSION
8760 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8761 { (eval echo "$as_me:8761: \"$cf_try\"") >&5
8764 echo "$as_me:8764: \$? = $ac_status" >&5
8765 (exit $ac_status); }
8766 if test -f conftest.out ; then
8767 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8768 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8773 cat >conftest.$ac_ext <<_ACEOF
8774 #line 8774 "configure"
8775 #include "confdefs.h"
8777 #include <${cf_cv_ncurses_header:-curses.h}>
8781 FILE *fp = fopen("$cf_tempfile", "w");
8782 #ifdef NCURSES_VERSION
8783 # ifdef NCURSES_VERSION_PATCH
8784 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8786 fprintf(fp, "%s\n", NCURSES_VERSION);
8790 fprintf(fp, "old\n");
8795 ${cf_cv_main_return:-return}(0);
8798 rm -f conftest$ac_exeext
8799 if { (eval echo "$as_me:8799: \"$ac_link\"") >&5
8800 (eval $ac_link) 2>&5
8802 echo "$as_me:8802: \$? = $ac_status" >&5
8803 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8804 { (eval echo "$as_me:8804: \"$ac_try\"") >&5
8807 echo "$as_me:8807: \$? = $ac_status" >&5
8808 (exit $ac_status); }; }; then
8810 cf_cv_ncurses_version=`cat $cf_tempfile`
8812 echo "$as_me: program exited with status $ac_status" >&5
8813 echo "$as_me: failed program was:" >&5
8814 cat conftest.$ac_ext >&5
8816 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8821 echo "$as_me:8821: result: $cf_cv_ncurses_version" >&5
8822 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8823 test "$cf_cv_ncurses_version" = no ||
8824 cat >>confdefs.h <<\EOF
8828 cf_nculib_root=ncurses
8829 # This works, except for the special case where we find gpm, but
8830 # ncurses is in a nonstandard location via $LIBS, and we really want
8833 cf_ncurses_SAVE="$LIBS"
8834 echo "$as_me:8834: checking for Gpm_Open in -lgpm" >&5
8835 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8836 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8837 echo $ECHO_N "(cached) $ECHO_C" >&6
8839 ac_check_lib_save_LIBS=$LIBS
8841 cat >conftest.$ac_ext <<_ACEOF
8842 #line 8842 "configure"
8843 #include "confdefs.h"
8845 /* Override any gcc2 internal prototype to avoid an error. */
8849 /* We use char because int might match the return type of a gcc2
8850 builtin and then its argument prototype would still apply. */
8860 rm -f conftest.$ac_objext conftest$ac_exeext
8861 if { (eval echo "$as_me:8861: \"$ac_link\"") >&5
8862 (eval $ac_link) 2>&5
8864 echo "$as_me:8864: \$? = $ac_status" >&5
8865 (exit $ac_status); } &&
8866 { ac_try='test -s conftest$ac_exeext'
8867 { (eval echo "$as_me:8867: \"$ac_try\"") >&5
8870 echo "$as_me:8870: \$? = $ac_status" >&5
8871 (exit $ac_status); }; }; then
8872 ac_cv_lib_gpm_Gpm_Open=yes
8874 echo "$as_me: failed program was:" >&5
8875 cat conftest.$ac_ext >&5
8876 ac_cv_lib_gpm_Gpm_Open=no
8878 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8879 LIBS=$ac_check_lib_save_LIBS
8881 echo "$as_me:8881: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8882 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8883 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8884 echo "$as_me:8884: checking for initscr in -lgpm" >&5
8885 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8886 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8887 echo $ECHO_N "(cached) $ECHO_C" >&6
8889 ac_check_lib_save_LIBS=$LIBS
8891 cat >conftest.$ac_ext <<_ACEOF
8892 #line 8892 "configure"
8893 #include "confdefs.h"
8895 /* Override any gcc2 internal prototype to avoid an error. */
8899 /* We use char because int might match the return type of a gcc2
8900 builtin and then its argument prototype would still apply. */
8910 rm -f conftest.$ac_objext conftest$ac_exeext
8911 if { (eval echo "$as_me:8911: \"$ac_link\"") >&5
8912 (eval $ac_link) 2>&5
8914 echo "$as_me:8914: \$? = $ac_status" >&5
8915 (exit $ac_status); } &&
8916 { ac_try='test -s conftest$ac_exeext'
8917 { (eval echo "$as_me:8917: \"$ac_try\"") >&5
8920 echo "$as_me:8920: \$? = $ac_status" >&5
8921 (exit $ac_status); }; }; then
8922 ac_cv_lib_gpm_initscr=yes
8924 echo "$as_me: failed program was:" >&5
8925 cat conftest.$ac_ext >&5
8926 ac_cv_lib_gpm_initscr=no
8928 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8929 LIBS=$ac_check_lib_save_LIBS
8931 echo "$as_me:8931: result: $ac_cv_lib_gpm_initscr" >&5
8932 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8933 if test $ac_cv_lib_gpm_initscr = yes; then
8934 LIBS="$cf_ncurses_SAVE"
8936 cf_ncurses_LIBS="-lgpm"
8943 # This is only necessary if you are linking against an obsolete
8944 # version of ncurses (but it should do no harm, since it's static).
8945 if test "$cf_nculib_root" = ncurses ; then
8946 echo "$as_me:8946: checking for tgoto in -lmytinfo" >&5
8947 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8948 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8949 echo $ECHO_N "(cached) $ECHO_C" >&6
8951 ac_check_lib_save_LIBS=$LIBS
8952 LIBS="-lmytinfo $LIBS"
8953 cat >conftest.$ac_ext <<_ACEOF
8954 #line 8954 "configure"
8955 #include "confdefs.h"
8957 /* Override any gcc2 internal prototype to avoid an error. */
8961 /* We use char because int might match the return type of a gcc2
8962 builtin and then its argument prototype would still apply. */
8972 rm -f conftest.$ac_objext 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); } &&
8978 { ac_try='test -s conftest$ac_exeext'
8979 { (eval echo "$as_me:8979: \"$ac_try\"") >&5
8982 echo "$as_me:8982: \$? = $ac_status" >&5
8983 (exit $ac_status); }; }; then
8984 ac_cv_lib_mytinfo_tgoto=yes
8986 echo "$as_me: failed program was:" >&5
8987 cat conftest.$ac_ext >&5
8988 ac_cv_lib_mytinfo_tgoto=no
8990 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8991 LIBS=$ac_check_lib_save_LIBS
8993 echo "$as_me:8993: result: $ac_cv_lib_mytinfo_tgoto" >&5
8994 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8995 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8996 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9003 cf_add_libs="$cf_ncurses_LIBS"
9004 # Filter out duplicates - this happens with badly-designed ".pc" files...
9005 for cf_add_1lib in $LIBS
9007 for cf_add_2lib in $cf_add_libs
9009 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9015 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9019 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
9022 cf_add_libs="-l$cf_nculib_root"
9023 # Filter out duplicates - this happens with badly-designed ".pc" files...
9024 for cf_add_1lib in $LIBS
9026 for cf_add_2lib in $cf_add_libs
9028 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9034 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9040 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9042 echo "$as_me:9042: checking for initscr" >&5
9043 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9044 if test "${ac_cv_func_initscr+set}" = set; then
9045 echo $ECHO_N "(cached) $ECHO_C" >&6
9047 cat >conftest.$ac_ext <<_ACEOF
9048 #line 9048 "configure"
9049 #include "confdefs.h"
9050 /* System header to define __stub macros and hopefully few prototypes,
9051 which can conflict with char initscr (); below. */
9053 /* Override any gcc2 internal prototype to avoid an error. */
9057 /* We use char because int might match the return type of a gcc2
9058 builtin and then its argument prototype would still apply. */
9065 /* The GNU C library defines this for functions which it implements
9066 to always fail with ENOSYS. Some functions are actually named
9067 something starting with __ and the normal name is an alias. */
9068 #if defined (__stub_initscr) || defined (__stub___initscr)
9071 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9078 rm -f conftest.$ac_objext conftest$ac_exeext
9079 if { (eval echo "$as_me:9079: \"$ac_link\"") >&5
9080 (eval $ac_link) 2>&5
9082 echo "$as_me:9082: \$? = $ac_status" >&5
9083 (exit $ac_status); } &&
9084 { ac_try='test -s conftest$ac_exeext'
9085 { (eval echo "$as_me:9085: \"$ac_try\"") >&5
9088 echo "$as_me:9088: \$? = $ac_status" >&5
9089 (exit $ac_status); }; }; then
9090 ac_cv_func_initscr=yes
9092 echo "$as_me: failed program was:" >&5
9093 cat conftest.$ac_ext >&5
9094 ac_cv_func_initscr=no
9096 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9098 echo "$as_me:9098: result: $ac_cv_func_initscr" >&5
9099 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9100 if test $ac_cv_func_initscr = yes; then
9101 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9104 cf_save_LIBS="$LIBS"
9105 echo "$as_me:9105: checking for initscr in -l$cf_nculib_root" >&5
9106 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9107 LIBS="-l$cf_nculib_root $LIBS"
9108 cat >conftest.$ac_ext <<_ACEOF
9109 #line 9109 "configure"
9110 #include "confdefs.h"
9111 #include <${cf_cv_ncurses_header:-curses.h}>
9120 rm -f conftest.$ac_objext conftest$ac_exeext
9121 if { (eval echo "$as_me:9121: \"$ac_link\"") >&5
9122 (eval $ac_link) 2>&5
9124 echo "$as_me:9124: \$? = $ac_status" >&5
9125 (exit $ac_status); } &&
9126 { ac_try='test -s conftest$ac_exeext'
9127 { (eval echo "$as_me:9127: \"$ac_try\"") >&5
9130 echo "$as_me:9130: \$? = $ac_status" >&5
9131 (exit $ac_status); }; }; then
9132 echo "$as_me:9132: result: yes" >&5
9133 echo "${ECHO_T}yes" >&6
9134 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9137 echo "$as_me: failed program was:" >&5
9138 cat conftest.$ac_ext >&5
9139 echo "$as_me:9139: result: no" >&5
9140 echo "${ECHO_T}no" >&6
9143 cf_library_path_list=""
9144 if test -n "${LDFLAGS}${LIBS}" ; then
9145 for cf_library_path in $LDFLAGS $LIBS
9147 case $cf_library_path in
9149 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9151 test "x$cf_library_path" != "xNONE" && \
9152 test -d "$cf_library_path" && \
9154 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9155 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9156 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9157 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9158 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9159 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"
9162 cf_library_path_list="$cf_library_path_list $cf_search"
9170 test "x$prefix" != "xNONE" && \
9171 test -d "$prefix" && \
9173 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9174 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9175 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9176 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9177 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9178 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9181 for cf_subdir_prefix in \
9190 test "x$cf_subdir_prefix" != "x$prefix" && \
9191 test -d "$cf_subdir_prefix" && \
9192 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9193 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9194 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
9195 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9196 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9197 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9198 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"
9203 cf_search="$cf_library_path_list $cf_search"
9205 for cf_libdir in $cf_search
9207 echo "$as_me:9207: checking for -l$cf_nculib_root in $cf_libdir" >&5
9208 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9209 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9210 cat >conftest.$ac_ext <<_ACEOF
9211 #line 9211 "configure"
9212 #include "confdefs.h"
9213 #include <${cf_cv_ncurses_header:-curses.h}>
9222 rm -f conftest.$ac_objext conftest$ac_exeext
9223 if { (eval echo "$as_me:9223: \"$ac_link\"") >&5
9224 (eval $ac_link) 2>&5
9226 echo "$as_me:9226: \$? = $ac_status" >&5
9227 (exit $ac_status); } &&
9228 { ac_try='test -s conftest$ac_exeext'
9229 { (eval echo "$as_me:9229: \"$ac_try\"") >&5
9232 echo "$as_me:9232: \$? = $ac_status" >&5
9233 (exit $ac_status); }; }; then
9234 echo "$as_me:9234: result: yes" >&5
9235 echo "${ECHO_T}yes" >&6
9236 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9239 echo "$as_me: failed program was:" >&5
9240 cat conftest.$ac_ext >&5
9241 echo "$as_me:9241: result: no" >&5
9242 echo "${ECHO_T}no" >&6
9243 LIBS="$cf_save_LIBS"
9245 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9249 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9253 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9255 if test $cf_found_library = no ; then
9256 { { echo "$as_me:9256: error: Cannot link $cf_nculib_root library" >&5
9257 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9258 { (exit 1); exit 1; }; }
9263 if test -n "$cf_ncurses_LIBS" ; then
9264 echo "$as_me:9264: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9265 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9266 cf_ncurses_SAVE="$LIBS"
9267 for p in $cf_ncurses_LIBS ; do
9268 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9269 if test "$q" != "$LIBS" ; then
9273 cat >conftest.$ac_ext <<_ACEOF
9274 #line 9274 "configure"
9275 #include "confdefs.h"
9276 #include <${cf_cv_ncurses_header:-curses.h}>
9280 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9285 rm -f conftest.$ac_objext conftest$ac_exeext
9286 if { (eval echo "$as_me:9286: \"$ac_link\"") >&5
9287 (eval $ac_link) 2>&5
9289 echo "$as_me:9289: \$? = $ac_status" >&5
9290 (exit $ac_status); } &&
9291 { ac_try='test -s conftest$ac_exeext'
9292 { (eval echo "$as_me:9292: \"$ac_try\"") >&5
9295 echo "$as_me:9295: \$? = $ac_status" >&5
9296 (exit $ac_status); }; }; then
9297 echo "$as_me:9297: result: yes" >&5
9298 echo "${ECHO_T}yes" >&6
9300 echo "$as_me: failed program was:" >&5
9301 cat conftest.$ac_ext >&5
9302 echo "$as_me:9302: result: no" >&5
9303 echo "${ECHO_T}no" >&6
9304 LIBS="$cf_ncurses_SAVE"
9306 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9309 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9311 cat >>confdefs.h <<EOF
9312 #define $cf_nculib_ROOT 1
9322 if test "$NCURSES_CONFIG_PKG" != none ; then
9323 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
9325 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
9326 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
9327 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
9329 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
9330 if test -z "$cf_cv_abi_version"
9332 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
9335 elif test "$NCURSES_CONFIG" != none ; then
9337 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
9339 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
9340 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
9341 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
9343 # ABI version is not available from headers
9344 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
9348 for cf_name in MAJOR MINOR PATCH
9350 cat >conftest.$ac_ext <<CF_EOF
9351 #include <${cf_cv_ncurses_header:-curses.h}>
9352 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
9354 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
9355 { (eval echo "$as_me:9355: \"$cf_try\"") >&5
9358 echo "$as_me:9358: \$? = $ac_status" >&5
9359 (exit $ac_status); }
9360 if test -f conftest.out ; then
9361 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[ ][ ]*//"`
9362 eval NCURSES_$cf_name=\"$cf_result\"
9363 # cat conftest.$ac_ext
9368 cf_cv_abi_version=${NCURSES_MAJOR}
9372 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
9374 cf_cv_timestamp=`date`
9376 echo "$as_me:9376: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
9377 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
9379 echo "$as_me:9379: checking if you want to have a library-prefix" >&5
9380 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
9382 # Check whether --with-lib-prefix or --without-lib-prefix was given.
9383 if test "${with_lib_prefix+set}" = set; then
9384 withval="$with_lib_prefix"
9385 with_lib_prefix=$withval
9387 with_lib_prefix=auto
9389 echo "$as_me:9389: result: $with_lib_prefix" >&5
9390 echo "${ECHO_T}$with_lib_prefix" >&6
9392 if test $with_lib_prefix = auto
9395 case $cf_cv_system_name in
9397 if test "$DFT_LWR_MODEL" = libtool; then
9403 (*) LIB_PREFIX='lib'
9406 cf_prefix=$LIB_PREFIX
9408 elif test $with_lib_prefix = no
9412 LIB_PREFIX=$with_lib_prefix
9417 ###############################################################################
9419 if test X"$CC_G_OPT" = X"" ; then
9421 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
9424 echo "$as_me:9424: checking for default loader flags" >&5
9425 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
9426 case $DFT_LWR_MODEL in
9427 (normal) LD_MODEL='' ;;
9428 (debug) LD_MODEL=$CC_G_OPT ;;
9429 (profile) LD_MODEL='-pg';;
9430 (shared) LD_MODEL='' ;;
9432 echo "$as_me:9432: result: $LD_MODEL" >&5
9433 echo "${ECHO_T}$LD_MODEL" >&6
9436 echo "$as_me:9436: checking for an rpath option" >&5
9437 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
9438 case $cf_cv_system_name in
9440 if test "$GCC" = yes; then
9441 LD_RPATH_OPT="-Wl,-rpath,"
9443 LD_RPATH_OPT="-rpath "
9446 (linux*|gnu*|k*bsd*-gnu|freebsd*)
9447 LD_RPATH_OPT="-Wl,-rpath,"
9449 (openbsd[2-9].*|mirbsd*)
9450 LD_RPATH_OPT="-Wl,-rpath,"
9453 LD_RPATH_OPT="-rpath "
9456 LD_RPATH_OPT="-Wl,-rpath,"
9459 LD_RPATH_OPT="-rpath "
9467 echo "$as_me:9467: result: $LD_RPATH_OPT" >&5
9468 echo "${ECHO_T}$LD_RPATH_OPT" >&6
9470 case "x$LD_RPATH_OPT" in
9472 echo "$as_me:9472: checking if we need a space after rpath option" >&5
9473 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
9474 cf_save_LIBS="$LIBS"
9476 cf_add_libs="${LD_RPATH_OPT}$libdir"
9477 # Filter out duplicates - this happens with badly-designed ".pc" files...
9478 for cf_add_1lib in $LIBS
9480 for cf_add_2lib in $cf_add_libs
9482 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9488 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9492 cat >conftest.$ac_ext <<_ACEOF
9493 #line 9493 "configure"
9494 #include "confdefs.h"
9504 rm -f conftest.$ac_objext conftest$ac_exeext
9505 if { (eval echo "$as_me:9505: \"$ac_link\"") >&5
9506 (eval $ac_link) 2>&5
9508 echo "$as_me:9508: \$? = $ac_status" >&5
9509 (exit $ac_status); } &&
9510 { ac_try='test -s conftest$ac_exeext'
9511 { (eval echo "$as_me:9511: \"$ac_try\"") >&5
9514 echo "$as_me:9514: \$? = $ac_status" >&5
9515 (exit $ac_status); }; }; then
9518 echo "$as_me: failed program was:" >&5
9519 cat conftest.$ac_ext >&5
9522 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9523 LIBS="$cf_save_LIBS"
9524 echo "$as_me:9524: result: $cf_rpath_space" >&5
9525 echo "${ECHO_T}$cf_rpath_space" >&6
9526 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
9534 INSTALL_LIB="-m 644"
9535 : ${rel_builddir:=.}
9541 cf_cv_do_symlinks=no
9543 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
9545 echo "$as_me:9545: checking if release/abi version should be used for shared libs" >&5
9546 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
9548 # Check whether --with-shlib-version or --without-shlib-version was given.
9549 if test "${with_shlib_version+set}" = set; then
9550 withval="$with_shlib_version"
9551 test -z "$withval" && withval=auto
9554 cf_cv_shlib_version=auto
9557 cf_cv_shlib_version=$withval
9560 echo "$as_me:9560: result: $withval" >&5
9561 echo "${ECHO_T}$withval" >&6
9562 { { echo "$as_me:9562: error: option value must be one of: rel, abi, or auto" >&5
9563 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
9564 { (exit 1); exit 1; }; }
9569 cf_cv_shlib_version=auto
9571 echo "$as_me:9571: result: $cf_cv_shlib_version" >&5
9572 echo "${ECHO_T}$cf_cv_shlib_version" >&6
9577 # Some less-capable ports of gcc support only -fpic
9581 if test "$GCC" = yes
9585 case $cf_cv_system_name in
9586 (*linux*) # e.g., PGI compiler
9592 if test "$cf_try_fPIC" = yes
9594 echo "$as_me:9594: checking which $CC option to use" >&5
9595 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
9596 cf_save_CFLAGS="$CFLAGS"
9597 for CC_SHARED_OPTS in -fPIC -fpic ''
9599 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
9600 cat >conftest.$ac_ext <<_ACEOF
9601 #line 9601 "configure"
9602 #include "confdefs.h"
9612 rm -f conftest.$ac_objext
9613 if { (eval echo "$as_me:9613: \"$ac_compile\"") >&5
9614 (eval $ac_compile) 2>&5
9616 echo "$as_me:9616: \$? = $ac_status" >&5
9617 (exit $ac_status); } &&
9618 { ac_try='test -s conftest.$ac_objext'
9619 { (eval echo "$as_me:9619: \"$ac_try\"") >&5
9622 echo "$as_me:9622: \$? = $ac_status" >&5
9623 (exit $ac_status); }; }; then
9626 echo "$as_me: failed program was:" >&5
9627 cat conftest.$ac_ext >&5
9629 rm -f conftest.$ac_objext conftest.$ac_ext
9631 echo "$as_me:9631: result: $CC_SHARED_OPTS" >&5
9632 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
9633 CFLAGS="$cf_save_CFLAGS"
9636 cf_cv_shlib_version_infix=no
9638 case $cf_cv_system_name in
9639 (aix4.3-9*|aix[5-7]*)
9640 if test "$GCC" = yes; then
9641 CC_SHARED_OPTS='-Wl,-brtl'
9642 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
9644 CC_SHARED_OPTS='-brtl'
9645 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
9646 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
9650 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
9654 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9655 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9656 cf_cv_shlib_version=cygdll
9657 cf_cv_shlib_version_infix=cygdll
9660 cat >mk_shared_lib.sh <<-CF_EOF
9663 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
9666 Linking shared library
9667 ** SHARED_LIB \$SHARED_LIB
9668 ** IMPORT_LIB \$IMPORT_LIB
9670 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9672 chmod +x mk_shared_lib.sh
9676 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9677 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9678 cf_cv_shlib_version=msysdll
9679 cf_cv_shlib_version_infix=msysdll
9682 cat >mk_shared_lib.sh <<-CF_EOF
9685 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
9688 Linking shared library
9689 ** SHARED_LIB \$SHARED_LIB
9690 ** IMPORT_LIB \$IMPORT_LIB
9692 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9694 chmod +x mk_shared_lib.sh
9697 cf_try_cflags="no-cpp-precomp"
9698 CC_SHARED_OPTS="-dynamic"
9699 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
9700 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
9701 cf_cv_shlib_version_infix=yes
9702 echo "$as_me:9702: checking if ld -search_paths_first works" >&5
9703 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
9704 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
9705 echo $ECHO_N "(cached) $ECHO_C" >&6
9708 cf_save_LDFLAGS=$LDFLAGS
9709 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9710 cat >conftest.$ac_ext <<_ACEOF
9711 #line 9711 "configure"
9712 #include "confdefs.h"
9722 rm -f conftest.$ac_objext conftest$ac_exeext
9723 if { (eval echo "$as_me:9723: \"$ac_link\"") >&5
9724 (eval $ac_link) 2>&5
9726 echo "$as_me:9726: \$? = $ac_status" >&5
9727 (exit $ac_status); } &&
9728 { ac_try='test -s conftest$ac_exeext'
9729 { (eval echo "$as_me:9729: \"$ac_try\"") >&5
9732 echo "$as_me:9732: \$? = $ac_status" >&5
9733 (exit $ac_status); }; }; then
9734 cf_cv_ldflags_search_paths_first=yes
9736 echo "$as_me: failed program was:" >&5
9737 cat conftest.$ac_ext >&5
9738 cf_cv_ldflags_search_paths_first=no
9740 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9741 LDFLAGS=$cf_save_LDFLAGS
9743 echo "$as_me:9743: result: $cf_cv_ldflags_search_paths_first" >&5
9744 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
9745 if test $cf_cv_ldflags_search_paths_first = yes; then
9746 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9750 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
9751 if test "$GCC" != yes; then
9754 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
9755 INSTALL_LIB="-m 555"
9758 # (tested with gcc 2.7.2 -- I don't have c89)
9759 if test "$GCC" = yes; then
9760 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
9763 LD_SHARED_OPTS='-Wl,+b,${libdir}'
9765 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
9766 # HP-UX shared libraries must be executable, and should be
9767 # readonly to exploit a quirk in the memory manager.
9768 INSTALL_LIB="-m 555"
9771 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9772 if test "$cf_cv_shlib_version" = rel; then
9773 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9775 cf_shared_soname='`basename $@`'
9778 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
9781 if test "$cf_cv_enable_rpath" = yes ; then
9782 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9784 # tested with IRIX 5.2 and 'cc'.
9785 if test "$GCC" != yes; then
9786 CC_SHARED_OPTS='-KPIC'
9787 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
9789 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
9791 cf_cv_rm_so_locs=yes
9793 (linux*|gnu*|k*bsd*-gnu)
9794 if test "$DFT_LWR_MODEL" = "shared" ; then
9795 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9796 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9798 if test "$cf_cv_enable_rpath" = yes ; then
9799 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9802 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9803 if test "$cf_cv_shlib_version" = rel; then
9804 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9806 cf_cv_shared_soname='`basename $@`'
9809 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9812 cf_cv_shlib_version=mingw
9813 cf_cv_shlib_version_infix=mingw
9816 if test "$DFT_LWR_MODEL" = "shared" ; then
9817 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
9818 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9819 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
9822 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9823 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9824 cat >mk_shared_lib.sh <<-CF_EOF
9827 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
9830 Linking shared library
9831 ** SHARED_LIB \$SHARED_LIB
9832 ** IMPORT_LIB \$IMPORT_LIB
9834 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9836 chmod +x mk_shared_lib.sh
9838 (openbsd[2-9].*|mirbsd*)
9839 if test "$DFT_LWR_MODEL" = "shared" ; then
9840 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9841 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9843 if test "$cf_cv_enable_rpath" = yes ; then
9844 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9846 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9848 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9849 if test "$cf_cv_shlib_version" = rel; then
9850 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9852 cf_cv_shared_soname='`basename $@`'
9855 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9857 (nto-qnx*|openbsd*|freebsd[12].*)
9858 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9859 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
9860 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9862 (dragonfly*|freebsd*)
9863 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9864 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
9865 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
9866 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
9867 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9870 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9871 if test "$cf_cv_shlib_version" = rel; then
9872 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9874 cf_cv_shared_soname='`basename $@`'
9877 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9880 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9881 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
9882 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
9883 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9884 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9885 if test "$cf_cv_shlib_version" = auto; then
9886 if test -f /usr/libexec/ld.elf_so; then
9887 cf_cv_shlib_version=abi
9889 cf_cv_shlib_version=rel
9893 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9894 if test "$cf_cv_shlib_version" = rel; then
9895 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9897 cf_cv_shared_soname='`basename $@`'
9900 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
9902 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
9906 # tested with OSF/1 V3.2 and 'cc'
9907 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
9908 # link with shared libs).
9909 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
9912 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
9915 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
9916 if test "$DFT_LWR_MODEL" = "shared" ; then
9917 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9918 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9920 cf_cv_rm_so_locs=yes
9922 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
9923 # tested with osr5.0.5
9924 if test "$GCC" != yes; then
9925 CC_SHARED_OPTS='-belf -KPIC'
9927 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
9928 if test "$cf_cv_enable_rpath" = yes ; then
9929 # only way is to set LD_RUN_PATH but no switch for it
9932 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9933 LINK_PROGS='LD_RUN_PATH=${libdir}'
9934 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
9937 # tested with SunOS 4.1.1 and gcc 2.7.0
9938 if test "$GCC" != yes; then
9939 CC_SHARED_OPTS='-KPIC'
9941 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
9942 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9945 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
9946 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
9947 if test "$DFT_LWR_MODEL" = "shared" ; then
9948 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
9949 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9951 if test "$cf_cv_enable_rpath" = yes ; then
9952 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
9955 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9956 if test "$cf_cv_shlib_version" = rel; then
9957 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9959 cf_cv_shared_soname='`basename $@`'
9962 if test "$GCC" != yes; then
9963 cf_save_CFLAGS="$CFLAGS"
9964 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
9966 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
9967 cat >conftest.$ac_ext <<_ACEOF
9968 #line 9968 "configure"
9969 #include "confdefs.h"
9979 rm -f conftest.$ac_objext
9980 if { (eval echo "$as_me:9980: \"$ac_compile\"") >&5
9981 (eval $ac_compile) 2>&5
9983 echo "$as_me:9983: \$? = $ac_status" >&5
9984 (exit $ac_status); } &&
9985 { ac_try='test -s conftest.$ac_objext'
9986 { (eval echo "$as_me:9986: \"$ac_try\"") >&5
9989 echo "$as_me:9989: \$? = $ac_status" >&5
9990 (exit $ac_status); }; }; then
9993 echo "$as_me: failed program was:" >&5
9994 cat conftest.$ac_ext >&5
9996 rm -f conftest.$ac_objext conftest.$ac_ext
9998 CFLAGS="$cf_save_CFLAGS"
9999 CC_SHARED_OPTS=$cf_shared_opts
10000 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
10002 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
10005 (sysv5uw7*|unix_sv*)
10006 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
10007 if test "$GCC" != yes; then
10008 CC_SHARED_OPTS='-KPIC'
10010 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
10013 CC_SHARED_OPTS='unknown'
10014 MK_SHARED_LIB='echo unknown'
10018 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
10019 case "$cf_cv_shlib_version" in
10021 case "$MK_SHARED_LIB" in
10023 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
10026 { echo "$as_me:10026: WARNING: ignored --with-shlib-version" >&5
10027 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
10033 if test -n "$cf_try_cflags"
10035 cat > conftest.$ac_ext <<EOF
10036 #line 10036 "${as_me:-configure}"
10038 int main(int argc, char *argv[])
10041 return (argv[argc-1] == 0) ;
10044 cf_save_CFLAGS="$CFLAGS"
10045 for cf_opt in $cf_try_cflags
10047 CFLAGS="$cf_save_CFLAGS -$cf_opt"
10048 echo "$as_me:10048: checking if CFLAGS option -$cf_opt works" >&5
10049 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
10050 if { (eval echo "$as_me:10050: \"$ac_compile\"") >&5
10051 (eval $ac_compile) 2>&5
10053 echo "$as_me:10053: \$? = $ac_status" >&5
10054 (exit $ac_status); }; then
10055 echo "$as_me:10055: result: yes" >&5
10056 echo "${ECHO_T}yes" >&6
10057 cf_save_CFLAGS="$CFLAGS"
10059 echo "$as_me:10059: result: no" >&5
10060 echo "${ECHO_T}no" >&6
10063 CFLAGS="$cf_save_CFLAGS"
10066 # RPATH_LIST is a colon-separated list of directories
10067 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
10068 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
10070 test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
10072 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
10074 echo "${as_me:-configure}:10074: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
10076 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
10078 echo "${as_me:-configure}:10078: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
10080 # The test/sample programs in the original tree link using rpath option.
10081 # Make it optional for packagers.
10082 if test -n "$LOCAL_LDFLAGS"
10084 echo "$as_me:10084: checking if you want to link sample programs with rpath option" >&5
10085 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
10087 # Check whether --enable-rpath-link or --disable-rpath-link was given.
10088 if test "${enable_rpath_link+set}" = set; then
10089 enableval="$enable_rpath_link"
10090 with_rpath_link=$enableval
10092 with_rpath_link=yes
10094 echo "$as_me:10094: result: $with_rpath_link" >&5
10095 echo "${ECHO_T}$with_rpath_link" >&6
10096 if test "$with_rpath_link" = no
10103 ###############################################################################
10105 ### use option --enable-broken-linker to force on use of broken-linker support
10106 echo "$as_me:10106: checking if you want broken-linker support code" >&5
10107 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
10109 # Check whether --enable-broken_linker or --disable-broken_linker was given.
10110 if test "${enable_broken_linker+set}" = set; then
10111 enableval="$enable_broken_linker"
10112 with_broken_linker=$enableval
10114 with_broken_linker=${BROKEN_LINKER:-no}
10116 echo "$as_me:10116: result: $with_broken_linker" >&5
10117 echo "${ECHO_T}$with_broken_linker" >&6
10120 if test "$with_broken_linker" = yes ; then
10121 cat >>confdefs.h <<\EOF
10122 #define BROKEN_LINKER 1
10126 elif test "$DFT_LWR_MODEL" = shared ; then
10127 case $cf_cv_system_name in
10129 cat >>confdefs.h <<\EOF
10130 #define BROKEN_LINKER 1
10134 test -n "$verbose" && echo " cygwin linker is broken anyway" 1>&6
10136 echo "${as_me:-configure}:10136: testing cygwin linker is broken anyway ..." 1>&5
10142 # Check to define _XOPEN_SOURCE "automatically"
10144 cf_XOPEN_SOURCE=600
10145 cf_POSIX_C_SOURCE=199506L
10150 cf_xopen_source="-D_ALL_SOURCE"
10153 cf_XOPEN_SOURCE=600
10156 cf_xopen_source="-D_APPLE_C_SOURCE"
10159 cf_xopen_source="-D_DARWIN_C_SOURCE"
10162 (freebsd*|dragonfly*)
10163 # 5.x headers associate
10164 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
10165 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
10166 cf_POSIX_C_SOURCE=200112L
10167 cf_XOPEN_SOURCE=600
10168 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10171 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
10174 cf_xopen_source="-D_HPUX_SOURCE"
10177 cf_xopen_source="-D_SGI_SOURCE"
10180 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
10182 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
10184 echo "$as_me:10184: checking if this is the GNU C library" >&5
10185 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
10186 if test "${cf_cv_gnu_library+set}" = set; then
10187 echo $ECHO_N "(cached) $ECHO_C" >&6
10190 cat >conftest.$ac_ext <<_ACEOF
10191 #line 10191 "configure"
10192 #include "confdefs.h"
10193 #include <sys/types.h>
10198 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
10201 # error not GNU C library
10207 rm -f conftest.$ac_objext
10208 if { (eval echo "$as_me:10208: \"$ac_compile\"") >&5
10209 (eval $ac_compile) 2>&5
10211 echo "$as_me:10211: \$? = $ac_status" >&5
10212 (exit $ac_status); } &&
10213 { ac_try='test -s conftest.$ac_objext'
10214 { (eval echo "$as_me:10214: \"$ac_try\"") >&5
10215 (eval $ac_try) 2>&5
10217 echo "$as_me:10217: \$? = $ac_status" >&5
10218 (exit $ac_status); }; }; then
10219 cf_cv_gnu_library=yes
10221 echo "$as_me: failed program was:" >&5
10222 cat conftest.$ac_ext >&5
10223 cf_cv_gnu_library=no
10225 rm -f conftest.$ac_objext conftest.$ac_ext
10228 echo "$as_me:10228: result: $cf_cv_gnu_library" >&5
10229 echo "${ECHO_T}$cf_cv_gnu_library" >&6
10231 if test x$cf_cv_gnu_library = xyes; then
10233 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
10234 # was changed to help a little...
10235 echo "$as_me:10235: checking if _DEFAULT_SOURCE can be used as a basis" >&5
10236 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
10237 if test "${cf_cv_gnu_library_219+set}" = set; then
10238 echo $ECHO_N "(cached) $ECHO_C" >&6
10241 cf_save="$CPPFLAGS"
10242 CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
10243 cat >conftest.$ac_ext <<_ACEOF
10244 #line 10244 "configure"
10245 #include "confdefs.h"
10246 #include <sys/types.h>
10251 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
10254 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
10260 rm -f conftest.$ac_objext
10261 if { (eval echo "$as_me:10261: \"$ac_compile\"") >&5
10262 (eval $ac_compile) 2>&5
10264 echo "$as_me:10264: \$? = $ac_status" >&5
10265 (exit $ac_status); } &&
10266 { ac_try='test -s conftest.$ac_objext'
10267 { (eval echo "$as_me:10267: \"$ac_try\"") >&5
10268 (eval $ac_try) 2>&5
10270 echo "$as_me:10270: \$? = $ac_status" >&5
10271 (exit $ac_status); }; }; then
10272 cf_cv_gnu_library_219=yes
10274 echo "$as_me: failed program was:" >&5
10275 cat conftest.$ac_ext >&5
10276 cf_cv_gnu_library_219=no
10278 rm -f conftest.$ac_objext conftest.$ac_ext
10279 CPPFLAGS="$cf_save"
10282 echo "$as_me:10282: result: $cf_cv_gnu_library_219" >&5
10283 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10285 if test "x$cf_cv_gnu_library_219" = xyes; then
10286 echo "$as_me:10286: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10287 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10288 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10289 echo $ECHO_N "(cached) $ECHO_C" >&6
10292 cf_save="$CPPFLAGS"
10293 CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source"
10294 cat >conftest.$ac_ext <<_ACEOF
10295 #line 10295 "configure"
10296 #include "confdefs.h"
10298 #include <limits.h>
10299 #include <sys/types.h>
10305 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10308 # error GNU C library is too old
10314 rm -f conftest.$ac_objext
10315 if { (eval echo "$as_me:10315: \"$ac_compile\"") >&5
10316 (eval $ac_compile) 2>&5
10318 echo "$as_me:10318: \$? = $ac_status" >&5
10319 (exit $ac_status); } &&
10320 { ac_try='test -s conftest.$ac_objext'
10321 { (eval echo "$as_me:10321: \"$ac_try\"") >&5
10322 (eval $ac_try) 2>&5
10324 echo "$as_me:10324: \$? = $ac_status" >&5
10325 (exit $ac_status); }; }; then
10326 cf_cv_gnu_dftsrc_219=yes
10328 echo "$as_me: failed program was:" >&5
10329 cat conftest.$ac_ext >&5
10330 cf_cv_gnu_dftsrc_219=no
10332 rm -f conftest.$ac_objext conftest.$ac_ext
10335 echo "$as_me:10335: result: $cf_cv_gnu_dftsrc_219" >&5
10336 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10337 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10339 cf_cv_gnu_dftsrc_219=maybe
10342 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10344 echo "$as_me:10344: checking if we must define _GNU_SOURCE" >&5
10345 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10346 if test "${cf_cv_gnu_source+set}" = set; then
10347 echo $ECHO_N "(cached) $ECHO_C" >&6
10350 cat >conftest.$ac_ext <<_ACEOF
10351 #line 10351 "configure"
10352 #include "confdefs.h"
10353 #include <sys/types.h>
10358 #ifndef _XOPEN_SOURCE
10359 #error expected _XOPEN_SOURCE to be defined
10365 rm -f conftest.$ac_objext
10366 if { (eval echo "$as_me:10366: \"$ac_compile\"") >&5
10367 (eval $ac_compile) 2>&5
10369 echo "$as_me:10369: \$? = $ac_status" >&5
10370 (exit $ac_status); } &&
10371 { ac_try='test -s conftest.$ac_objext'
10372 { (eval echo "$as_me:10372: \"$ac_try\"") >&5
10373 (eval $ac_try) 2>&5
10375 echo "$as_me:10375: \$? = $ac_status" >&5
10376 (exit $ac_status); }; }; then
10377 cf_cv_gnu_source=no
10379 echo "$as_me: failed program was:" >&5
10380 cat conftest.$ac_ext >&5
10381 cf_save="$CPPFLAGS"
10382 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
10383 cat >conftest.$ac_ext <<_ACEOF
10384 #line 10384 "configure"
10385 #include "confdefs.h"
10386 #include <sys/types.h>
10391 #ifdef _XOPEN_SOURCE
10392 #error expected _XOPEN_SOURCE to be undefined
10398 rm -f conftest.$ac_objext
10399 if { (eval echo "$as_me:10399: \"$ac_compile\"") >&5
10400 (eval $ac_compile) 2>&5
10402 echo "$as_me:10402: \$? = $ac_status" >&5
10403 (exit $ac_status); } &&
10404 { ac_try='test -s conftest.$ac_objext'
10405 { (eval echo "$as_me:10405: \"$ac_try\"") >&5
10406 (eval $ac_try) 2>&5
10408 echo "$as_me:10408: \$? = $ac_status" >&5
10409 (exit $ac_status); }; }; then
10410 cf_cv_gnu_source=no
10412 echo "$as_me: failed program was:" >&5
10413 cat conftest.$ac_ext >&5
10414 cf_cv_gnu_source=yes
10416 rm -f conftest.$ac_objext conftest.$ac_ext
10417 CPPFLAGS="$cf_save"
10420 rm -f conftest.$ac_objext conftest.$ac_ext
10423 echo "$as_me:10423: result: $cf_cv_gnu_source" >&5
10424 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10426 if test "$cf_cv_gnu_source" = yes
10428 echo "$as_me:10428: checking if we should also define _DEFAULT_SOURCE" >&5
10429 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10430 if test "${cf_cv_default_source+set}" = set; then
10431 echo $ECHO_N "(cached) $ECHO_C" >&6
10434 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
10435 cat >conftest.$ac_ext <<_ACEOF
10436 #line 10436 "configure"
10437 #include "confdefs.h"
10438 #include <sys/types.h>
10443 #ifdef _DEFAULT_SOURCE
10444 #error expected _DEFAULT_SOURCE to be undefined
10450 rm -f conftest.$ac_objext
10451 if { (eval echo "$as_me:10451: \"$ac_compile\"") >&5
10452 (eval $ac_compile) 2>&5
10454 echo "$as_me:10454: \$? = $ac_status" >&5
10455 (exit $ac_status); } &&
10456 { ac_try='test -s conftest.$ac_objext'
10457 { (eval echo "$as_me:10457: \"$ac_try\"") >&5
10458 (eval $ac_try) 2>&5
10460 echo "$as_me:10460: \$? = $ac_status" >&5
10461 (exit $ac_status); }; }; then
10462 cf_cv_default_source=no
10464 echo "$as_me: failed program was:" >&5
10465 cat conftest.$ac_ext >&5
10466 cf_cv_default_source=yes
10468 rm -f conftest.$ac_objext conftest.$ac_ext
10471 echo "$as_me:10471: result: $cf_cv_default_source" >&5
10472 echo "${ECHO_T}$cf_cv_default_source" >&6
10473 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
10481 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10484 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10487 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10489 cf_save_CFLAGS="$CFLAGS"
10490 cf_save_CPPFLAGS="$CPPFLAGS"
10492 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10493 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10494 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10496 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10497 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10498 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10500 echo "$as_me:10500: checking if we should define _POSIX_C_SOURCE" >&5
10501 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10502 if test "${cf_cv_posix_c_source+set}" = set; then
10503 echo $ECHO_N "(cached) $ECHO_C" >&6
10506 echo "${as_me:-configure}:10506: testing if the symbol is already defined go no further ..." 1>&5
10508 cat >conftest.$ac_ext <<_ACEOF
10509 #line 10509 "configure"
10510 #include "confdefs.h"
10511 #include <sys/types.h>
10516 #ifndef _POSIX_C_SOURCE
10523 rm -f conftest.$ac_objext
10524 if { (eval echo "$as_me:10524: \"$ac_compile\"") >&5
10525 (eval $ac_compile) 2>&5
10527 echo "$as_me:10527: \$? = $ac_status" >&5
10528 (exit $ac_status); } &&
10529 { ac_try='test -s conftest.$ac_objext'
10530 { (eval echo "$as_me:10530: \"$ac_try\"") >&5
10531 (eval $ac_try) 2>&5
10533 echo "$as_me:10533: \$? = $ac_status" >&5
10534 (exit $ac_status); }; }; then
10535 cf_cv_posix_c_source=no
10537 echo "$as_me: failed program was:" >&5
10538 cat conftest.$ac_ext >&5
10539 cf_want_posix_source=no
10540 case .$cf_POSIX_C_SOURCE in
10542 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10545 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10546 cf_want_posix_source=yes
10549 cf_want_posix_source=yes
10552 if test "$cf_want_posix_source" = yes ; then
10553 cat >conftest.$ac_ext <<_ACEOF
10554 #line 10554 "configure"
10555 #include "confdefs.h"
10556 #include <sys/types.h>
10561 #ifdef _POSIX_SOURCE
10568 rm -f conftest.$ac_objext
10569 if { (eval echo "$as_me:10569: \"$ac_compile\"") >&5
10570 (eval $ac_compile) 2>&5
10572 echo "$as_me:10572: \$? = $ac_status" >&5
10573 (exit $ac_status); } &&
10574 { ac_try='test -s conftest.$ac_objext'
10575 { (eval echo "$as_me:10575: \"$ac_try\"") >&5
10576 (eval $ac_try) 2>&5
10578 echo "$as_me:10578: \$? = $ac_status" >&5
10579 (exit $ac_status); }; }; then
10582 echo "$as_me: failed program was:" >&5
10583 cat conftest.$ac_ext >&5
10584 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10586 rm -f conftest.$ac_objext conftest.$ac_ext
10589 echo "${as_me:-configure}:10589: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10591 CFLAGS="$cf_trim_CFLAGS"
10592 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
10594 echo "${as_me:-configure}:10594: testing if the second compile does not leave our definition intact error ..." 1>&5
10596 cat >conftest.$ac_ext <<_ACEOF
10597 #line 10597 "configure"
10598 #include "confdefs.h"
10599 #include <sys/types.h>
10604 #ifndef _POSIX_C_SOURCE
10611 rm -f conftest.$ac_objext
10612 if { (eval echo "$as_me:10612: \"$ac_compile\"") >&5
10613 (eval $ac_compile) 2>&5
10615 echo "$as_me:10615: \$? = $ac_status" >&5
10616 (exit $ac_status); } &&
10617 { ac_try='test -s conftest.$ac_objext'
10618 { (eval echo "$as_me:10618: \"$ac_try\"") >&5
10619 (eval $ac_try) 2>&5
10621 echo "$as_me:10621: \$? = $ac_status" >&5
10622 (exit $ac_status); }; }; then
10625 echo "$as_me: failed program was:" >&5
10626 cat conftest.$ac_ext >&5
10627 cf_cv_posix_c_source=no
10629 rm -f conftest.$ac_objext conftest.$ac_ext
10630 CFLAGS="$cf_save_CFLAGS"
10631 CPPFLAGS="$cf_save_CPPFLAGS"
10634 rm -f conftest.$ac_objext conftest.$ac_ext
10637 echo "$as_me:10637: result: $cf_cv_posix_c_source" >&5
10638 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10640 if test "$cf_cv_posix_c_source" != no ; then
10641 CFLAGS="$cf_trim_CFLAGS"
10642 CPPFLAGS="$cf_trim_CPPFLAGS"
10647 cf_new_extra_cppflags=
10649 for cf_add_cflags in $cf_cv_posix_c_source
10651 case $cf_fix_cppflags in
10653 case $cf_add_cflags in
10654 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10655 case $cf_add_cflags in
10657 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10659 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10660 && test -z "${cf_tst_cflags}" \
10661 && cf_fix_cppflags=yes
10663 if test $cf_fix_cppflags = yes ; then
10665 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10666 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10669 elif test "${cf_tst_cflags}" = "\"'" ; then
10671 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10672 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10678 case "$CPPFLAGS" in
10682 case $cf_add_cflags in
10684 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10686 CPPFLAGS=`echo "$CPPFLAGS" | \
10687 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10688 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10693 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10694 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10701 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10702 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10709 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10710 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10712 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10714 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10715 && test -z "${cf_tst_cflags}" \
10716 && cf_fix_cppflags=no
10721 if test -n "$cf_new_cflags" ; then
10723 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10724 CFLAGS="${CFLAGS}$cf_new_cflags"
10728 if test -n "$cf_new_cppflags" ; then
10730 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10731 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10735 if test -n "$cf_new_extra_cppflags" ; then
10737 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10738 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10746 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10749 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10750 cf_xopen_source="-D_BSD_SOURCE"
10751 cf_XOPEN_SOURCE=600
10754 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10757 cf_xopen_source="-D_OSF_SOURCE"
10760 cf_xopen_source="-D_QNX_SOURCE"
10763 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10766 cf_xopen_source="-D__EXTENSIONS__"
10767 cf_cv_xopen_source=broken
10769 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10775 echo "$as_me:10775: checking if we should define _XOPEN_SOURCE" >&5
10776 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10777 if test "${cf_cv_xopen_source+set}" = set; then
10778 echo $ECHO_N "(cached) $ECHO_C" >&6
10781 cat >conftest.$ac_ext <<_ACEOF
10782 #line 10782 "configure"
10783 #include "confdefs.h"
10785 #include <stdlib.h>
10786 #include <string.h>
10787 #include <sys/types.h>
10793 #ifndef _XOPEN_SOURCE
10800 rm -f conftest.$ac_objext
10801 if { (eval echo "$as_me:10801: \"$ac_compile\"") >&5
10802 (eval $ac_compile) 2>&5
10804 echo "$as_me:10804: \$? = $ac_status" >&5
10805 (exit $ac_status); } &&
10806 { ac_try='test -s conftest.$ac_objext'
10807 { (eval echo "$as_me:10807: \"$ac_try\"") >&5
10808 (eval $ac_try) 2>&5
10810 echo "$as_me:10810: \$? = $ac_status" >&5
10811 (exit $ac_status); }; }; then
10812 cf_cv_xopen_source=no
10814 echo "$as_me: failed program was:" >&5
10815 cat conftest.$ac_ext >&5
10816 cf_save="$CPPFLAGS"
10817 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10818 cat >conftest.$ac_ext <<_ACEOF
10819 #line 10819 "configure"
10820 #include "confdefs.h"
10822 #include <stdlib.h>
10823 #include <string.h>
10824 #include <sys/types.h>
10830 #ifdef _XOPEN_SOURCE
10837 rm -f conftest.$ac_objext
10838 if { (eval echo "$as_me:10838: \"$ac_compile\"") >&5
10839 (eval $ac_compile) 2>&5
10841 echo "$as_me:10841: \$? = $ac_status" >&5
10842 (exit $ac_status); } &&
10843 { ac_try='test -s conftest.$ac_objext'
10844 { (eval echo "$as_me:10844: \"$ac_try\"") >&5
10845 (eval $ac_try) 2>&5
10847 echo "$as_me:10847: \$? = $ac_status" >&5
10848 (exit $ac_status); }; }; then
10849 cf_cv_xopen_source=no
10851 echo "$as_me: failed program was:" >&5
10852 cat conftest.$ac_ext >&5
10853 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10855 rm -f conftest.$ac_objext conftest.$ac_ext
10856 CPPFLAGS="$cf_save"
10859 rm -f conftest.$ac_objext conftest.$ac_ext
10862 echo "$as_me:10862: result: $cf_cv_xopen_source" >&5
10863 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10865 if test "$cf_cv_xopen_source" != no ; then
10867 CFLAGS=`echo "$CFLAGS" | \
10868 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10869 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10871 CPPFLAGS=`echo "$CPPFLAGS" | \
10872 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10873 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10875 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10880 cf_new_extra_cppflags=
10882 for cf_add_cflags in $cf_temp_xopen_source
10884 case $cf_fix_cppflags in
10886 case $cf_add_cflags in
10887 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10888 case $cf_add_cflags in
10890 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10892 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10893 && test -z "${cf_tst_cflags}" \
10894 && cf_fix_cppflags=yes
10896 if test $cf_fix_cppflags = yes ; then
10898 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10899 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10902 elif test "${cf_tst_cflags}" = "\"'" ; then
10904 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10905 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10911 case "$CPPFLAGS" in
10915 case $cf_add_cflags in
10917 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10919 CPPFLAGS=`echo "$CPPFLAGS" | \
10920 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10921 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10926 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10927 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10934 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10935 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10942 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10943 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10945 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10947 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10948 && test -z "${cf_tst_cflags}" \
10949 && cf_fix_cppflags=no
10954 if test -n "$cf_new_cflags" ; then
10956 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10957 CFLAGS="${CFLAGS}$cf_new_cflags"
10961 if test -n "$cf_new_cppflags" ; then
10963 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10964 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10968 if test -n "$cf_new_extra_cppflags" ; then
10970 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10971 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10977 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10979 cf_save_CFLAGS="$CFLAGS"
10980 cf_save_CPPFLAGS="$CPPFLAGS"
10982 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10983 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10984 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10986 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10987 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10988 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10990 echo "$as_me:10990: checking if we should define _POSIX_C_SOURCE" >&5
10991 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10992 if test "${cf_cv_posix_c_source+set}" = set; then
10993 echo $ECHO_N "(cached) $ECHO_C" >&6
10996 echo "${as_me:-configure}:10996: testing if the symbol is already defined go no further ..." 1>&5
10998 cat >conftest.$ac_ext <<_ACEOF
10999 #line 10999 "configure"
11000 #include "confdefs.h"
11001 #include <sys/types.h>
11006 #ifndef _POSIX_C_SOURCE
11013 rm -f conftest.$ac_objext
11014 if { (eval echo "$as_me:11014: \"$ac_compile\"") >&5
11015 (eval $ac_compile) 2>&5
11017 echo "$as_me:11017: \$? = $ac_status" >&5
11018 (exit $ac_status); } &&
11019 { ac_try='test -s conftest.$ac_objext'
11020 { (eval echo "$as_me:11020: \"$ac_try\"") >&5
11021 (eval $ac_try) 2>&5
11023 echo "$as_me:11023: \$? = $ac_status" >&5
11024 (exit $ac_status); }; }; then
11025 cf_cv_posix_c_source=no
11027 echo "$as_me: failed program was:" >&5
11028 cat conftest.$ac_ext >&5
11029 cf_want_posix_source=no
11030 case .$cf_POSIX_C_SOURCE in
11032 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11035 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11036 cf_want_posix_source=yes
11039 cf_want_posix_source=yes
11042 if test "$cf_want_posix_source" = yes ; then
11043 cat >conftest.$ac_ext <<_ACEOF
11044 #line 11044 "configure"
11045 #include "confdefs.h"
11046 #include <sys/types.h>
11051 #ifdef _POSIX_SOURCE
11058 rm -f conftest.$ac_objext
11059 if { (eval echo "$as_me:11059: \"$ac_compile\"") >&5
11060 (eval $ac_compile) 2>&5
11062 echo "$as_me:11062: \$? = $ac_status" >&5
11063 (exit $ac_status); } &&
11064 { ac_try='test -s conftest.$ac_objext'
11065 { (eval echo "$as_me:11065: \"$ac_try\"") >&5
11066 (eval $ac_try) 2>&5
11068 echo "$as_me:11068: \$? = $ac_status" >&5
11069 (exit $ac_status); }; }; then
11072 echo "$as_me: failed program was:" >&5
11073 cat conftest.$ac_ext >&5
11074 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11076 rm -f conftest.$ac_objext conftest.$ac_ext
11079 echo "${as_me:-configure}:11079: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11081 CFLAGS="$cf_trim_CFLAGS"
11082 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
11084 echo "${as_me:-configure}:11084: testing if the second compile does not leave our definition intact error ..." 1>&5
11086 cat >conftest.$ac_ext <<_ACEOF
11087 #line 11087 "configure"
11088 #include "confdefs.h"
11089 #include <sys/types.h>
11094 #ifndef _POSIX_C_SOURCE
11101 rm -f conftest.$ac_objext
11102 if { (eval echo "$as_me:11102: \"$ac_compile\"") >&5
11103 (eval $ac_compile) 2>&5
11105 echo "$as_me:11105: \$? = $ac_status" >&5
11106 (exit $ac_status); } &&
11107 { ac_try='test -s conftest.$ac_objext'
11108 { (eval echo "$as_me:11108: \"$ac_try\"") >&5
11109 (eval $ac_try) 2>&5
11111 echo "$as_me:11111: \$? = $ac_status" >&5
11112 (exit $ac_status); }; }; then
11115 echo "$as_me: failed program was:" >&5
11116 cat conftest.$ac_ext >&5
11117 cf_cv_posix_c_source=no
11119 rm -f conftest.$ac_objext conftest.$ac_ext
11120 CFLAGS="$cf_save_CFLAGS"
11121 CPPFLAGS="$cf_save_CPPFLAGS"
11124 rm -f conftest.$ac_objext conftest.$ac_ext
11127 echo "$as_me:11127: result: $cf_cv_posix_c_source" >&5
11128 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11130 if test "$cf_cv_posix_c_source" != no ; then
11131 CFLAGS="$cf_trim_CFLAGS"
11132 CPPFLAGS="$cf_trim_CPPFLAGS"
11137 cf_new_extra_cppflags=
11139 for cf_add_cflags in $cf_cv_posix_c_source
11141 case $cf_fix_cppflags in
11143 case $cf_add_cflags in
11144 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11145 case $cf_add_cflags in
11147 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11149 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11150 && test -z "${cf_tst_cflags}" \
11151 && cf_fix_cppflags=yes
11153 if test $cf_fix_cppflags = yes ; then
11155 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11156 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11159 elif test "${cf_tst_cflags}" = "\"'" ; then
11161 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11162 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11168 case "$CPPFLAGS" in
11172 case $cf_add_cflags in
11174 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11176 CPPFLAGS=`echo "$CPPFLAGS" | \
11177 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11178 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11183 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11184 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11191 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11192 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11199 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11200 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11202 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11204 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11205 && test -z "${cf_tst_cflags}" \
11206 && cf_fix_cppflags=no
11211 if test -n "$cf_new_cflags" ; then
11213 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11214 CFLAGS="${CFLAGS}$cf_new_cflags"
11218 if test -n "$cf_new_cppflags" ; then
11220 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11221 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11225 if test -n "$cf_new_extra_cppflags" ; then
11227 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11228 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11237 if test -n "$cf_xopen_source" ; then
11242 cf_new_extra_cppflags=
11244 for cf_add_cflags in $cf_xopen_source
11246 case $cf_fix_cppflags in
11248 case $cf_add_cflags in
11249 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11250 case $cf_add_cflags in
11252 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11254 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11255 && test -z "${cf_tst_cflags}" \
11256 && cf_fix_cppflags=yes
11258 if test $cf_fix_cppflags = yes ; then
11260 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11261 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11264 elif test "${cf_tst_cflags}" = "\"'" ; then
11266 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11267 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11273 case "$CPPFLAGS" in
11277 case $cf_add_cflags in
11279 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11281 CPPFLAGS=`echo "$CPPFLAGS" | \
11282 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11283 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11288 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11289 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11296 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11297 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11304 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11305 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11307 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11309 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11310 && test -z "${cf_tst_cflags}" \
11311 && cf_fix_cppflags=no
11316 if test -n "$cf_new_cflags" ; then
11317 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
11319 echo "${as_me:-configure}:11319: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11321 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11322 CFLAGS="${CFLAGS}$cf_new_cflags"
11326 if test -n "$cf_new_cppflags" ; then
11327 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11329 echo "${as_me:-configure}:11329: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11331 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11332 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11336 if test -n "$cf_new_extra_cppflags" ; then
11337 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11339 echo "${as_me:-configure}:11339: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11341 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11342 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11348 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11349 echo "$as_me:11349: checking if _XOPEN_SOURCE really is set" >&5
11350 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11351 cat >conftest.$ac_ext <<_ACEOF
11352 #line 11352 "configure"
11353 #include "confdefs.h"
11354 #include <stdlib.h>
11359 #ifndef _XOPEN_SOURCE
11366 rm -f conftest.$ac_objext
11367 if { (eval echo "$as_me:11367: \"$ac_compile\"") >&5
11368 (eval $ac_compile) 2>&5
11370 echo "$as_me:11370: \$? = $ac_status" >&5
11371 (exit $ac_status); } &&
11372 { ac_try='test -s conftest.$ac_objext'
11373 { (eval echo "$as_me:11373: \"$ac_try\"") >&5
11374 (eval $ac_try) 2>&5
11376 echo "$as_me:11376: \$? = $ac_status" >&5
11377 (exit $ac_status); }; }; then
11378 cf_XOPEN_SOURCE_set=yes
11380 echo "$as_me: failed program was:" >&5
11381 cat conftest.$ac_ext >&5
11382 cf_XOPEN_SOURCE_set=no
11384 rm -f conftest.$ac_objext conftest.$ac_ext
11385 echo "$as_me:11385: result: $cf_XOPEN_SOURCE_set" >&5
11386 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11387 if test $cf_XOPEN_SOURCE_set = yes
11389 cat >conftest.$ac_ext <<_ACEOF
11390 #line 11390 "configure"
11391 #include "confdefs.h"
11392 #include <stdlib.h>
11397 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11404 rm -f conftest.$ac_objext
11405 if { (eval echo "$as_me:11405: \"$ac_compile\"") >&5
11406 (eval $ac_compile) 2>&5
11408 echo "$as_me:11408: \$? = $ac_status" >&5
11409 (exit $ac_status); } &&
11410 { ac_try='test -s conftest.$ac_objext'
11411 { (eval echo "$as_me:11411: \"$ac_try\"") >&5
11412 (eval $ac_try) 2>&5
11414 echo "$as_me:11414: \$? = $ac_status" >&5
11415 (exit $ac_status); }; }; then
11416 cf_XOPEN_SOURCE_set_ok=yes
11418 echo "$as_me: failed program was:" >&5
11419 cat conftest.$ac_ext >&5
11420 cf_XOPEN_SOURCE_set_ok=no
11422 rm -f conftest.$ac_objext conftest.$ac_ext
11423 if test $cf_XOPEN_SOURCE_set_ok = no
11425 { echo "$as_me:11425: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11426 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11430 echo "$as_me:11430: checking if we should define _XOPEN_SOURCE" >&5
11431 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11432 if test "${cf_cv_xopen_source+set}" = set; then
11433 echo $ECHO_N "(cached) $ECHO_C" >&6
11436 cat >conftest.$ac_ext <<_ACEOF
11437 #line 11437 "configure"
11438 #include "confdefs.h"
11440 #include <stdlib.h>
11441 #include <string.h>
11442 #include <sys/types.h>
11448 #ifndef _XOPEN_SOURCE
11455 rm -f conftest.$ac_objext
11456 if { (eval echo "$as_me:11456: \"$ac_compile\"") >&5
11457 (eval $ac_compile) 2>&5
11459 echo "$as_me:11459: \$? = $ac_status" >&5
11460 (exit $ac_status); } &&
11461 { ac_try='test -s conftest.$ac_objext'
11462 { (eval echo "$as_me:11462: \"$ac_try\"") >&5
11463 (eval $ac_try) 2>&5
11465 echo "$as_me:11465: \$? = $ac_status" >&5
11466 (exit $ac_status); }; }; then
11467 cf_cv_xopen_source=no
11469 echo "$as_me: failed program was:" >&5
11470 cat conftest.$ac_ext >&5
11471 cf_save="$CPPFLAGS"
11472 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11473 cat >conftest.$ac_ext <<_ACEOF
11474 #line 11474 "configure"
11475 #include "confdefs.h"
11477 #include <stdlib.h>
11478 #include <string.h>
11479 #include <sys/types.h>
11485 #ifdef _XOPEN_SOURCE
11492 rm -f conftest.$ac_objext
11493 if { (eval echo "$as_me:11493: \"$ac_compile\"") >&5
11494 (eval $ac_compile) 2>&5
11496 echo "$as_me:11496: \$? = $ac_status" >&5
11497 (exit $ac_status); } &&
11498 { ac_try='test -s conftest.$ac_objext'
11499 { (eval echo "$as_me:11499: \"$ac_try\"") >&5
11500 (eval $ac_try) 2>&5
11502 echo "$as_me:11502: \$? = $ac_status" >&5
11503 (exit $ac_status); }; }; then
11504 cf_cv_xopen_source=no
11506 echo "$as_me: failed program was:" >&5
11507 cat conftest.$ac_ext >&5
11508 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11510 rm -f conftest.$ac_objext conftest.$ac_ext
11511 CPPFLAGS="$cf_save"
11514 rm -f conftest.$ac_objext conftest.$ac_ext
11517 echo "$as_me:11517: result: $cf_cv_xopen_source" >&5
11518 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11520 if test "$cf_cv_xopen_source" != no ; then
11522 CFLAGS=`echo "$CFLAGS" | \
11523 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11524 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
11526 CPPFLAGS=`echo "$CPPFLAGS" | \
11527 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11528 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
11530 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11535 cf_new_extra_cppflags=
11537 for cf_add_cflags in $cf_temp_xopen_source
11539 case $cf_fix_cppflags in
11541 case $cf_add_cflags in
11542 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11543 case $cf_add_cflags in
11545 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11547 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11548 && test -z "${cf_tst_cflags}" \
11549 && cf_fix_cppflags=yes
11551 if test $cf_fix_cppflags = yes ; then
11553 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11554 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11557 elif test "${cf_tst_cflags}" = "\"'" ; then
11559 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11560 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11566 case "$CPPFLAGS" in
11570 case $cf_add_cflags in
11572 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11574 CPPFLAGS=`echo "$CPPFLAGS" | \
11575 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11576 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11581 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11582 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11589 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11590 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11597 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11598 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11600 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11602 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11603 && test -z "${cf_tst_cflags}" \
11604 && cf_fix_cppflags=no
11609 if test -n "$cf_new_cflags" ; then
11611 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11612 CFLAGS="${CFLAGS}$cf_new_cflags"
11616 if test -n "$cf_new_cppflags" ; then
11618 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11619 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11623 if test -n "$cf_new_extra_cppflags" ; then
11625 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11626 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11635 # Check whether --enable-largefile or --disable-largefile was given.
11636 if test "${enable_largefile+set}" = set; then
11637 enableval="$enable_largefile"
11640 if test "$enable_largefile" != no; then
11642 echo "$as_me:11642: checking for special C compiler options needed for large files" >&5
11643 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
11644 if test "${ac_cv_sys_largefile_CC+set}" = set; then
11645 echo $ECHO_N "(cached) $ECHO_C" >&6
11647 ac_cv_sys_largefile_CC=no
11648 if test "$GCC" != yes; then
11651 # IRIX 6.2 and later do not support large files by default,
11652 # so use the C compiler's -n32 option if that helps.
11653 cat >conftest.$ac_ext <<_ACEOF
11654 #line 11654 "configure"
11655 #include "confdefs.h"
11656 #include <sys/types.h>
11657 /* Check that off_t can represent 2**63 - 1 correctly.
11658 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11659 since some C++ compilers masquerading as C compilers
11660 incorrectly reject 9223372036854775807. */
11661 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11662 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11663 && LARGE_OFF_T % 2147483647 == 1)
11673 rm -f conftest.$ac_objext
11674 if { (eval echo "$as_me:11674: \"$ac_compile\"") >&5
11675 (eval $ac_compile) 2>&5
11677 echo "$as_me:11677: \$? = $ac_status" >&5
11678 (exit $ac_status); } &&
11679 { ac_try='test -s conftest.$ac_objext'
11680 { (eval echo "$as_me:11680: \"$ac_try\"") >&5
11681 (eval $ac_try) 2>&5
11683 echo "$as_me:11683: \$? = $ac_status" >&5
11684 (exit $ac_status); }; }; then
11687 echo "$as_me: failed program was:" >&5
11688 cat conftest.$ac_ext >&5
11690 rm -f conftest.$ac_objext
11692 rm -f conftest.$ac_objext
11693 if { (eval echo "$as_me:11693: \"$ac_compile\"") >&5
11694 (eval $ac_compile) 2>&5
11696 echo "$as_me:11696: \$? = $ac_status" >&5
11697 (exit $ac_status); } &&
11698 { ac_try='test -s conftest.$ac_objext'
11699 { (eval echo "$as_me:11699: \"$ac_try\"") >&5
11700 (eval $ac_try) 2>&5
11702 echo "$as_me:11702: \$? = $ac_status" >&5
11703 (exit $ac_status); }; }; then
11704 ac_cv_sys_largefile_CC=' -n32'; break
11706 echo "$as_me: failed program was:" >&5
11707 cat conftest.$ac_ext >&5
11709 rm -f conftest.$ac_objext
11713 rm -f conftest.$ac_ext
11716 echo "$as_me:11716: result: $ac_cv_sys_largefile_CC" >&5
11717 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
11718 if test "$ac_cv_sys_largefile_CC" != no; then
11719 CC=$CC$ac_cv_sys_largefile_CC
11722 echo "$as_me:11722: checking for _FILE_OFFSET_BITS value needed for large files" >&5
11723 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
11724 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
11725 echo $ECHO_N "(cached) $ECHO_C" >&6
11728 ac_cv_sys_file_offset_bits=no
11729 cat >conftest.$ac_ext <<_ACEOF
11730 #line 11730 "configure"
11731 #include "confdefs.h"
11732 #include <sys/types.h>
11733 /* Check that off_t can represent 2**63 - 1 correctly.
11734 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11735 since some C++ compilers masquerading as C compilers
11736 incorrectly reject 9223372036854775807. */
11737 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11738 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11739 && LARGE_OFF_T % 2147483647 == 1)
11749 rm -f conftest.$ac_objext
11750 if { (eval echo "$as_me:11750: \"$ac_compile\"") >&5
11751 (eval $ac_compile) 2>&5
11753 echo "$as_me:11753: \$? = $ac_status" >&5
11754 (exit $ac_status); } &&
11755 { ac_try='test -s conftest.$ac_objext'
11756 { (eval echo "$as_me:11756: \"$ac_try\"") >&5
11757 (eval $ac_try) 2>&5
11759 echo "$as_me:11759: \$? = $ac_status" >&5
11760 (exit $ac_status); }; }; then
11763 echo "$as_me: failed program was:" >&5
11764 cat conftest.$ac_ext >&5
11766 rm -f conftest.$ac_objext conftest.$ac_ext
11767 cat >conftest.$ac_ext <<_ACEOF
11768 #line 11768 "configure"
11769 #include "confdefs.h"
11770 #define _FILE_OFFSET_BITS 64
11771 #include <sys/types.h>
11772 /* Check that off_t can represent 2**63 - 1 correctly.
11773 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11774 since some C++ compilers masquerading as C compilers
11775 incorrectly reject 9223372036854775807. */
11776 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11777 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11778 && LARGE_OFF_T % 2147483647 == 1)
11788 rm -f conftest.$ac_objext
11789 if { (eval echo "$as_me:11789: \"$ac_compile\"") >&5
11790 (eval $ac_compile) 2>&5
11792 echo "$as_me:11792: \$? = $ac_status" >&5
11793 (exit $ac_status); } &&
11794 { ac_try='test -s conftest.$ac_objext'
11795 { (eval echo "$as_me:11795: \"$ac_try\"") >&5
11796 (eval $ac_try) 2>&5
11798 echo "$as_me:11798: \$? = $ac_status" >&5
11799 (exit $ac_status); }; }; then
11800 ac_cv_sys_file_offset_bits=64; break
11802 echo "$as_me: failed program was:" >&5
11803 cat conftest.$ac_ext >&5
11805 rm -f conftest.$ac_objext conftest.$ac_ext
11809 echo "$as_me:11809: result: $ac_cv_sys_file_offset_bits" >&5
11810 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
11811 if test "$ac_cv_sys_file_offset_bits" != no; then
11813 cat >>confdefs.h <<EOF
11814 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
11819 echo "$as_me:11819: checking for _LARGE_FILES value needed for large files" >&5
11820 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
11821 if test "${ac_cv_sys_large_files+set}" = set; then
11822 echo $ECHO_N "(cached) $ECHO_C" >&6
11825 ac_cv_sys_large_files=no
11826 cat >conftest.$ac_ext <<_ACEOF
11827 #line 11827 "configure"
11828 #include "confdefs.h"
11829 #include <sys/types.h>
11830 /* Check that off_t can represent 2**63 - 1 correctly.
11831 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11832 since some C++ compilers masquerading as C compilers
11833 incorrectly reject 9223372036854775807. */
11834 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11835 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11836 && LARGE_OFF_T % 2147483647 == 1)
11846 rm -f conftest.$ac_objext
11847 if { (eval echo "$as_me:11847: \"$ac_compile\"") >&5
11848 (eval $ac_compile) 2>&5
11850 echo "$as_me:11850: \$? = $ac_status" >&5
11851 (exit $ac_status); } &&
11852 { ac_try='test -s conftest.$ac_objext'
11853 { (eval echo "$as_me:11853: \"$ac_try\"") >&5
11854 (eval $ac_try) 2>&5
11856 echo "$as_me:11856: \$? = $ac_status" >&5
11857 (exit $ac_status); }; }; then
11860 echo "$as_me: failed program was:" >&5
11861 cat conftest.$ac_ext >&5
11863 rm -f conftest.$ac_objext conftest.$ac_ext
11864 cat >conftest.$ac_ext <<_ACEOF
11865 #line 11865 "configure"
11866 #include "confdefs.h"
11867 #define _LARGE_FILES 1
11868 #include <sys/types.h>
11869 /* Check that off_t can represent 2**63 - 1 correctly.
11870 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11871 since some C++ compilers masquerading as C compilers
11872 incorrectly reject 9223372036854775807. */
11873 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11874 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11875 && LARGE_OFF_T % 2147483647 == 1)
11885 rm -f conftest.$ac_objext
11886 if { (eval echo "$as_me:11886: \"$ac_compile\"") >&5
11887 (eval $ac_compile) 2>&5
11889 echo "$as_me:11889: \$? = $ac_status" >&5
11890 (exit $ac_status); } &&
11891 { ac_try='test -s conftest.$ac_objext'
11892 { (eval echo "$as_me:11892: \"$ac_try\"") >&5
11893 (eval $ac_try) 2>&5
11895 echo "$as_me:11895: \$? = $ac_status" >&5
11896 (exit $ac_status); }; }; then
11897 ac_cv_sys_large_files=1; break
11899 echo "$as_me: failed program was:" >&5
11900 cat conftest.$ac_ext >&5
11902 rm -f conftest.$ac_objext conftest.$ac_ext
11906 echo "$as_me:11906: result: $ac_cv_sys_large_files" >&5
11907 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
11908 if test "$ac_cv_sys_large_files" != no; then
11910 cat >>confdefs.h <<EOF
11911 #define _LARGE_FILES $ac_cv_sys_large_files
11918 if test "$enable_largefile" != no ; then
11919 echo "$as_me:11919: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11920 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
11921 if test "${ac_cv_sys_largefile_source+set}" = set; then
11922 echo $ECHO_N "(cached) $ECHO_C" >&6
11925 ac_cv_sys_largefile_source=no
11926 cat >conftest.$ac_ext <<_ACEOF
11927 #line 11927 "configure"
11928 #include "confdefs.h"
11938 rm -f conftest.$ac_objext
11939 if { (eval echo "$as_me:11939: \"$ac_compile\"") >&5
11940 (eval $ac_compile) 2>&5
11942 echo "$as_me:11942: \$? = $ac_status" >&5
11943 (exit $ac_status); } &&
11944 { ac_try='test -s conftest.$ac_objext'
11945 { (eval echo "$as_me:11945: \"$ac_try\"") >&5
11946 (eval $ac_try) 2>&5
11948 echo "$as_me:11948: \$? = $ac_status" >&5
11949 (exit $ac_status); }; }; then
11952 echo "$as_me: failed program was:" >&5
11953 cat conftest.$ac_ext >&5
11955 rm -f conftest.$ac_objext conftest.$ac_ext
11956 cat >conftest.$ac_ext <<_ACEOF
11957 #line 11957 "configure"
11958 #include "confdefs.h"
11959 #define _LARGEFILE_SOURCE 1
11969 rm -f conftest.$ac_objext
11970 if { (eval echo "$as_me:11970: \"$ac_compile\"") >&5
11971 (eval $ac_compile) 2>&5
11973 echo "$as_me:11973: \$? = $ac_status" >&5
11974 (exit $ac_status); } &&
11975 { ac_try='test -s conftest.$ac_objext'
11976 { (eval echo "$as_me:11976: \"$ac_try\"") >&5
11977 (eval $ac_try) 2>&5
11979 echo "$as_me:11979: \$? = $ac_status" >&5
11980 (exit $ac_status); }; }; then
11981 ac_cv_sys_largefile_source=1; break
11983 echo "$as_me: failed program was:" >&5
11984 cat conftest.$ac_ext >&5
11986 rm -f conftest.$ac_objext conftest.$ac_ext
11990 echo "$as_me:11990: result: $ac_cv_sys_largefile_source" >&5
11991 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
11992 if test "$ac_cv_sys_largefile_source" != no; then
11994 cat >>confdefs.h <<EOF
11995 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12001 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12002 # in glibc 2.1.3, but that breaks too many other things.
12003 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12004 echo "$as_me:12004: checking for fseeko" >&5
12005 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
12006 if test "${ac_cv_func_fseeko+set}" = set; then
12007 echo $ECHO_N "(cached) $ECHO_C" >&6
12009 cat >conftest.$ac_ext <<_ACEOF
12010 #line 12010 "configure"
12011 #include "confdefs.h"
12016 return fseeko && fseeko (stdin, 0, 0);
12021 rm -f conftest.$ac_objext conftest$ac_exeext
12022 if { (eval echo "$as_me:12022: \"$ac_link\"") >&5
12023 (eval $ac_link) 2>&5
12025 echo "$as_me:12025: \$? = $ac_status" >&5
12026 (exit $ac_status); } &&
12027 { ac_try='test -s conftest$ac_exeext'
12028 { (eval echo "$as_me:12028: \"$ac_try\"") >&5
12029 (eval $ac_try) 2>&5
12031 echo "$as_me:12031: \$? = $ac_status" >&5
12032 (exit $ac_status); }; }; then
12033 ac_cv_func_fseeko=yes
12035 echo "$as_me: failed program was:" >&5
12036 cat conftest.$ac_ext >&5
12037 ac_cv_func_fseeko=no
12039 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12041 echo "$as_me:12041: result: $ac_cv_func_fseeko" >&5
12042 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
12043 if test $ac_cv_func_fseeko = yes; then
12045 cat >>confdefs.h <<\EOF
12046 #define HAVE_FSEEKO 1
12051 # Normally we would collect these definitions in the config.h,
12052 # but (like _XOPEN_SOURCE), some environments rely on having these
12053 # defined before any of the system headers are included. Another
12054 # case comes up with C++, e.g., on AIX the compiler compiles the
12055 # header files by themselves before looking at the body files it is
12056 # told to compile. For ncurses, those header files do not include
12058 test "$ac_cv_sys_large_files" != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
12059 test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
12060 test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
12062 echo "$as_me:12062: checking whether to use struct dirent64" >&5
12063 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
12064 if test "${cf_cv_struct_dirent64+set}" = set; then
12065 echo $ECHO_N "(cached) $ECHO_C" >&6
12068 cat >conftest.$ac_ext <<_ACEOF
12069 #line 12069 "configure"
12070 #include "confdefs.h"
12072 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
12073 #include <sys/types.h>
12074 #include <dirent.h>
12080 /* if transitional largefile support is setup, this is true */
12081 extern struct dirent64 * readdir(DIR *);
12082 struct dirent64 *x = readdir((DIR *)0);
12083 struct dirent *y = readdir((DIR *)0);
12090 rm -f conftest.$ac_objext
12091 if { (eval echo "$as_me:12091: \"$ac_compile\"") >&5
12092 (eval $ac_compile) 2>&5
12094 echo "$as_me:12094: \$? = $ac_status" >&5
12095 (exit $ac_status); } &&
12096 { ac_try='test -s conftest.$ac_objext'
12097 { (eval echo "$as_me:12097: \"$ac_try\"") >&5
12098 (eval $ac_try) 2>&5
12100 echo "$as_me:12100: \$? = $ac_status" >&5
12101 (exit $ac_status); }; }; then
12102 cf_cv_struct_dirent64=yes
12104 echo "$as_me: failed program was:" >&5
12105 cat conftest.$ac_ext >&5
12106 cf_cv_struct_dirent64=no
12108 rm -f conftest.$ac_objext conftest.$ac_ext
12111 echo "$as_me:12111: result: $cf_cv_struct_dirent64" >&5
12112 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
12113 test "$cf_cv_struct_dirent64" = yes &&
12114 cat >>confdefs.h <<\EOF
12115 #define HAVE_STRUCT_DIRENT64 1
12120 ### Enable compiling-in rcs id's
12121 echo "$as_me:12121: checking if RCS identifiers should be compiled-in" >&5
12122 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
12124 # Check whether --with-rcs-ids or --without-rcs-ids was given.
12125 if test "${with_rcs_ids+set}" = set; then
12126 withval="$with_rcs_ids"
12127 with_rcs_ids=$withval
12131 echo "$as_me:12131: result: $with_rcs_ids" >&5
12132 echo "${ECHO_T}$with_rcs_ids" >&6
12133 test "$with_rcs_ids" = yes &&
12134 cat >>confdefs.h <<\EOF
12135 #define USE_RCS_IDS 1
12138 ###############################################################################
12140 ### Note that some functions (such as const) are normally disabled anyway.
12141 echo "$as_me:12141: checking if you want to build with function extensions" >&5
12142 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
12144 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
12145 if test "${enable_ext_funcs+set}" = set; then
12146 enableval="$enable_ext_funcs"
12147 with_ext_funcs=$enableval
12151 echo "$as_me:12151: result: $with_ext_funcs" >&5
12152 echo "${ECHO_T}$with_ext_funcs" >&6
12153 if test "$with_ext_funcs" = yes ; then
12154 NCURSES_EXT_FUNCS=1
12156 cat >>confdefs.h <<\EOF
12157 #define HAVE_USE_DEFAULT_COLORS 1
12160 cat >>confdefs.h <<\EOF
12161 #define NCURSES_EXT_FUNCS 1
12165 NCURSES_EXT_FUNCS=0
12168 ### use option --enable-const to turn on use of const beyond that in XSI.
12169 echo "$as_me:12169: checking for extended use of const keyword" >&5
12170 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
12172 # Check whether --enable-const or --disable-const was given.
12173 if test "${enable_const+set}" = set; then
12174 enableval="$enable_const"
12175 with_ext_const=$enableval
12179 echo "$as_me:12179: result: $with_ext_const" >&5
12180 echo "${ECHO_T}$with_ext_const" >&6
12181 NCURSES_CONST='/*nothing*/'
12182 if test "$with_ext_const" = yes ; then
12183 NCURSES_CONST=const
12186 ###############################################################################
12187 # These options are relatively safe to experiment with.
12189 echo "$as_me:12189: checking if you want all development code" >&5
12190 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12192 # Check whether --with-develop or --without-develop was given.
12193 if test "${with_develop+set}" = set; then
12194 withval="$with_develop"
12195 with_develop=$withval
12199 echo "$as_me:12199: result: $with_develop" >&5
12200 echo "${ECHO_T}$with_develop" >&6
12202 ###############################################################################
12203 # These are just experimental, probably should not be in a package:
12205 # This is still experimental (20080329), but should ultimately be moved to
12206 # the script-block --with-normal, etc.
12208 echo "$as_me:12208: checking if you want to link with the pthread library" >&5
12209 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12211 # Check whether --with-pthread or --without-pthread was given.
12212 if test "${with_pthread+set}" = set; then
12213 withval="$with_pthread"
12214 with_pthread=$withval
12218 echo "$as_me:12218: result: $with_pthread" >&5
12219 echo "${ECHO_T}$with_pthread" >&6
12221 if test "$with_pthread" != no ; then
12222 echo "$as_me:12222: checking for pthread.h" >&5
12223 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12224 if test "${ac_cv_header_pthread_h+set}" = set; then
12225 echo $ECHO_N "(cached) $ECHO_C" >&6
12227 cat >conftest.$ac_ext <<_ACEOF
12228 #line 12228 "configure"
12229 #include "confdefs.h"
12230 #include <pthread.h>
12232 if { (eval echo "$as_me:12232: \"$ac_cpp conftest.$ac_ext\"") >&5
12233 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12235 egrep -v '^ *\+' conftest.er1 >conftest.err
12237 cat conftest.err >&5
12238 echo "$as_me:12238: \$? = $ac_status" >&5
12239 (exit $ac_status); } >/dev/null; then
12240 if test -s conftest.err; then
12241 ac_cpp_err=$ac_c_preproc_warn_flag
12248 if test -z "$ac_cpp_err"; then
12249 ac_cv_header_pthread_h=yes
12251 echo "$as_me: failed program was:" >&5
12252 cat conftest.$ac_ext >&5
12253 ac_cv_header_pthread_h=no
12255 rm -f conftest.err conftest.$ac_ext
12257 echo "$as_me:12257: result: $ac_cv_header_pthread_h" >&5
12258 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12259 if test $ac_cv_header_pthread_h = yes; then
12261 cat >>confdefs.h <<\EOF
12262 #define HAVE_PTHREADS_H 1
12265 for cf_lib_pthread in pthread c_r
12267 echo "$as_me:12267: checking if we can link with the $cf_lib_pthread library" >&5
12268 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12269 cf_save_LIBS="$LIBS"
12271 cf_add_libs="-l$cf_lib_pthread"
12272 # Filter out duplicates - this happens with badly-designed ".pc" files...
12273 for cf_add_1lib in $LIBS
12275 for cf_add_2lib in $cf_add_libs
12277 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12283 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12285 LIBS="$cf_add_libs"
12287 cat >conftest.$ac_ext <<_ACEOF
12288 #line 12288 "configure"
12289 #include "confdefs.h"
12291 #include <pthread.h>
12297 int rc = pthread_create(0,0,0,0);
12298 int r2 = pthread_mutexattr_settype(0, 0);
12304 rm -f conftest.$ac_objext conftest$ac_exeext
12305 if { (eval echo "$as_me:12305: \"$ac_link\"") >&5
12306 (eval $ac_link) 2>&5
12308 echo "$as_me:12308: \$? = $ac_status" >&5
12309 (exit $ac_status); } &&
12310 { ac_try='test -s conftest$ac_exeext'
12311 { (eval echo "$as_me:12311: \"$ac_try\"") >&5
12312 (eval $ac_try) 2>&5
12314 echo "$as_me:12314: \$? = $ac_status" >&5
12315 (exit $ac_status); }; }; then
12318 echo "$as_me: failed program was:" >&5
12319 cat conftest.$ac_ext >&5
12322 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12323 LIBS="$cf_save_LIBS"
12324 echo "$as_me:12324: result: $with_pthread" >&5
12325 echo "${ECHO_T}$with_pthread" >&6
12326 test "$with_pthread" = yes && break
12329 if test "$with_pthread" = yes ; then
12331 cf_add_libs="-l$cf_lib_pthread"
12332 # Filter out duplicates - this happens with badly-designed ".pc" files...
12333 for cf_add_1lib in $LIBS
12335 for cf_add_2lib in $cf_add_libs
12337 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12343 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12345 LIBS="$cf_add_libs"
12347 cat >>confdefs.h <<\EOF
12348 #define HAVE_LIBPTHREADS 1
12352 { { echo "$as_me:12352: error: Cannot link with pthread library" >&5
12353 echo "$as_me: error: Cannot link with pthread library" >&2;}
12354 { (exit 1); exit 1; }; }
12361 echo "$as_me:12361: checking if you want to use weak-symbols for pthreads" >&5
12362 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12364 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12365 if test "${enable_weak_symbols+set}" = set; then
12366 enableval="$enable_weak_symbols"
12367 use_weak_symbols=$withval
12369 use_weak_symbols=no
12371 echo "$as_me:12371: result: $use_weak_symbols" >&5
12372 echo "${ECHO_T}$use_weak_symbols" >&6
12373 if test "$use_weak_symbols" = yes ; then
12375 echo "$as_me:12375: checking if $CC supports weak symbols" >&5
12376 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12377 if test "${cf_cv_weak_symbols+set}" = set; then
12378 echo $ECHO_N "(cached) $ECHO_C" >&6
12381 cat >conftest.$ac_ext <<_ACEOF
12382 #line 12382 "configure"
12383 #include "confdefs.h"
12390 #if defined(__GNUC__)
12391 # if defined __USE_ISOC99
12392 # define _cat_pragma(exp) _Pragma(#exp)
12393 # define _weak_pragma(exp) _cat_pragma(weak name)
12395 # define _weak_pragma(exp)
12397 # define _declare(name) __extension__ extern __typeof__(name) name
12398 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
12401 weak_symbol(fopen);
12407 rm -f conftest.$ac_objext
12408 if { (eval echo "$as_me:12408: \"$ac_compile\"") >&5
12409 (eval $ac_compile) 2>&5
12411 echo "$as_me:12411: \$? = $ac_status" >&5
12412 (exit $ac_status); } &&
12413 { ac_try='test -s conftest.$ac_objext'
12414 { (eval echo "$as_me:12414: \"$ac_try\"") >&5
12415 (eval $ac_try) 2>&5
12417 echo "$as_me:12417: \$? = $ac_status" >&5
12418 (exit $ac_status); }; }; then
12419 cf_cv_weak_symbols=yes
12421 echo "$as_me: failed program was:" >&5
12422 cat conftest.$ac_ext >&5
12423 cf_cv_weak_symbols=no
12425 rm -f conftest.$ac_objext conftest.$ac_ext
12428 echo "$as_me:12428: result: $cf_cv_weak_symbols" >&5
12429 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12432 cf_cv_weak_symbols=no
12435 if test $cf_cv_weak_symbols = yes ; then
12437 cat >>confdefs.h <<\EOF
12438 #define USE_WEAK_SYMBOLS 1
12444 if test "$with_pthread" = "yes" ; then
12446 cat >>confdefs.h <<\EOF
12447 #define USE_PTHREADS 1
12450 enable_reentrant=yes
12451 if test $cf_cv_weak_symbols = yes ; then
12456 # OpenSUSE is installing ncurses6, using reentrant option.
12457 echo "$as_me:12457: checking for _nc_TABSIZE" >&5
12458 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
12459 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
12460 echo $ECHO_N "(cached) $ECHO_C" >&6
12462 cat >conftest.$ac_ext <<_ACEOF
12463 #line 12463 "configure"
12464 #include "confdefs.h"
12465 /* System header to define __stub macros and hopefully few prototypes,
12466 which can conflict with char _nc_TABSIZE (); below. */
12467 #include <assert.h>
12468 /* Override any gcc2 internal prototype to avoid an error. */
12472 /* We use char because int might match the return type of a gcc2
12473 builtin and then its argument prototype would still apply. */
12474 char _nc_TABSIZE ();
12480 /* The GNU C library defines this for functions which it implements
12481 to always fail with ENOSYS. Some functions are actually named
12482 something starting with __ and the normal name is an alias. */
12483 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
12486 f = _nc_TABSIZE; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12493 rm -f conftest.$ac_objext conftest$ac_exeext
12494 if { (eval echo "$as_me:12494: \"$ac_link\"") >&5
12495 (eval $ac_link) 2>&5
12497 echo "$as_me:12497: \$? = $ac_status" >&5
12498 (exit $ac_status); } &&
12499 { ac_try='test -s conftest$ac_exeext'
12500 { (eval echo "$as_me:12500: \"$ac_try\"") >&5
12501 (eval $ac_try) 2>&5
12503 echo "$as_me:12503: \$? = $ac_status" >&5
12504 (exit $ac_status); }; }; then
12505 ac_cv_func__nc_TABSIZE=yes
12507 echo "$as_me: failed program was:" >&5
12508 cat conftest.$ac_ext >&5
12509 ac_cv_func__nc_TABSIZE=no
12511 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12513 echo "$as_me:12513: result: $ac_cv_func__nc_TABSIZE" >&5
12514 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
12515 if test $ac_cv_func__nc_TABSIZE = yes; then
12516 assume_reentrant=yes
12518 assume_reentrant=no
12521 # Reentrant code has to be opaque; there's little advantage to making ncurses
12522 # opaque outside of that, so there is no --enable-opaque option. We can use
12523 # this option without --with-pthreads, but this will be always set for
12525 echo "$as_me:12525: checking if you want experimental reentrant code" >&5
12526 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
12528 # Check whether --enable-reentrant or --disable-reentrant was given.
12529 if test "${enable_reentrant+set}" = set; then
12530 enableval="$enable_reentrant"
12531 with_reentrant=$enableval
12533 with_reentrant=$assume_reentrant
12535 echo "$as_me:12535: result: $with_reentrant" >&5
12536 echo "${ECHO_T}$with_reentrant" >&6
12537 if test "$with_reentrant" = yes ; then
12538 cf_cv_enable_reentrant=1
12539 if test $cf_cv_weak_symbols = yes ; then
12541 # remove pthread library from $LIBS
12542 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
12544 elif test "$assume_reentrant" = no ; then
12545 LIB_SUFFIX="t${LIB_SUFFIX}"
12548 cat >>confdefs.h <<\EOF
12549 #define USE_REENTRANT 1
12553 cf_cv_enable_reentrant=0
12556 ### Allow using a different wrap-prefix
12557 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12558 echo "$as_me:12558: checking for prefix used to wrap public variables" >&5
12559 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12561 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12562 if test "${with_wrap_prefix+set}" = set; then
12563 withval="$with_wrap_prefix"
12564 NCURSES_WRAP_PREFIX=$withval
12566 NCURSES_WRAP_PREFIX=_nc_
12568 echo "$as_me:12568: result: $NCURSES_WRAP_PREFIX" >&5
12569 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12571 NCURSES_WRAP_PREFIX=_nc_
12574 cat >>confdefs.h <<EOF
12575 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12578 ###############################################################################
12580 ### use option --disable-echo to suppress full display compiling commands
12582 echo "$as_me:12582: checking if you want to see long compiling messages" >&5
12583 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12585 # Check whether --enable-echo or --disable-echo was given.
12586 if test "${enable_echo+set}" = set; then
12587 enableval="$enable_echo"
12588 test "$enableval" != no && enableval=yes
12589 if test "$enableval" != "yes" ; then
12592 ECHO_LD='@echo linking $@;'
12593 RULE_CC='@echo compiling $<'
12594 SHOW_CC='@echo compiling $@'
12616 echo "$as_me:12616: result: $enableval" >&5
12617 echo "${ECHO_T}$enableval" >&6
12619 ### use option --enable-warnings to turn on all gcc warnings
12620 echo "$as_me:12620: checking if you want to see compiler warnings" >&5
12621 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12623 # Check whether --enable-warnings or --disable-warnings was given.
12624 if test "${enable_warnings+set}" = set; then
12625 enableval="$enable_warnings"
12626 with_warnings=$enableval
12628 echo "$as_me:12628: result: $with_warnings" >&5
12629 echo "${ECHO_T}$with_warnings" >&6
12631 if test "x$with_warnings" = "xyes"; then
12633 ADAFLAGS="$ADAFLAGS -gnatg"
12637 if test "$GCC" = yes ; then
12640 echo "$as_me:12640: checking if this is really Intel C compiler" >&5
12641 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12642 cf_save_CFLAGS="$CFLAGS"
12643 CFLAGS="$CFLAGS -no-gcc"
12644 cat >conftest.$ac_ext <<_ACEOF
12645 #line 12645 "configure"
12646 #include "confdefs.h"
12652 #ifdef __INTEL_COMPILER
12661 rm -f conftest.$ac_objext
12662 if { (eval echo "$as_me:12662: \"$ac_compile\"") >&5
12663 (eval $ac_compile) 2>&5
12665 echo "$as_me:12665: \$? = $ac_status" >&5
12666 (exit $ac_status); } &&
12667 { ac_try='test -s conftest.$ac_objext'
12668 { (eval echo "$as_me:12668: \"$ac_try\"") >&5
12669 (eval $ac_try) 2>&5
12671 echo "$as_me:12671: \$? = $ac_status" >&5
12672 (exit $ac_status); }; }; then
12674 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12677 echo "$as_me: failed program was:" >&5
12678 cat conftest.$ac_ext >&5
12680 rm -f conftest.$ac_objext conftest.$ac_ext
12681 CFLAGS="$cf_save_CFLAGS"
12682 echo "$as_me:12682: result: $INTEL_COMPILER" >&5
12683 echo "${ECHO_T}$INTEL_COMPILER" >&6
12690 if test "$GCC" = yes ; then
12691 echo "$as_me:12691: checking if this is really Clang C compiler" >&5
12692 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12693 cf_save_CFLAGS="$CFLAGS"
12694 CFLAGS="$CFLAGS -Qunused-arguments"
12695 cat >conftest.$ac_ext <<_ACEOF
12696 #line 12696 "configure"
12697 #include "confdefs.h"
12712 rm -f conftest.$ac_objext
12713 if { (eval echo "$as_me:12713: \"$ac_compile\"") >&5
12714 (eval $ac_compile) 2>&5
12716 echo "$as_me:12716: \$? = $ac_status" >&5
12717 (exit $ac_status); } &&
12718 { ac_try='test -s conftest.$ac_objext'
12719 { (eval echo "$as_me:12719: \"$ac_try\"") >&5
12720 (eval $ac_try) 2>&5
12722 echo "$as_me:12722: \$? = $ac_status" >&5
12723 (exit $ac_status); }; }; then
12725 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12728 echo "$as_me: failed program was:" >&5
12729 cat conftest.$ac_ext >&5
12731 rm -f conftest.$ac_objext conftest.$ac_ext
12732 CFLAGS="$cf_save_CFLAGS"
12733 echo "$as_me:12733: result: $CLANG_COMPILER" >&5
12734 echo "${ECHO_T}$CLANG_COMPILER" >&6
12737 cat > conftest.$ac_ext <<EOF
12738 #line 12738 "${as_me:-configure}"
12739 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12742 if test "$INTEL_COMPILER" = yes
12744 # The "-wdXXX" options suppress warnings:
12745 # remark #1419: external declaration in primary source file
12746 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12747 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12748 # remark #193: zero used for undefined preprocessing identifier
12749 # remark #593: variable "curs_sb_left_arrow" was set but never used
12750 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12751 # remark #869: parameter "tw" was never referenced
12752 # remark #981: operands are evaluated in unspecified order
12753 # warning #279: controlling expression is constant
12755 { echo "$as_me:12755: checking for $CC warning options..." >&5
12756 echo "$as_me: checking for $CC warning options..." >&6;}
12757 cf_save_CFLAGS="$CFLAGS"
12758 EXTRA_CFLAGS="-Wall"
12770 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12771 if { (eval echo "$as_me:12771: \"$ac_compile\"") >&5
12772 (eval $ac_compile) 2>&5
12774 echo "$as_me:12774: \$? = $ac_status" >&5
12775 (exit $ac_status); }; then
12776 test -n "$verbose" && echo "$as_me:12776: result: ... -$cf_opt" >&5
12777 echo "${ECHO_T}... -$cf_opt" >&6
12778 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12781 CFLAGS="$cf_save_CFLAGS"
12783 elif test "$GCC" = yes
12785 { echo "$as_me:12785: checking for $CC warning options..." >&5
12786 echo "$as_me: checking for $CC warning options..." >&6;}
12787 cf_save_CFLAGS="$CFLAGS"
12790 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12791 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
12792 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
12793 for cf_opt in W Wall \
12794 Wbad-function-cast \
12797 Wdeclaration-after-statement \
12800 Wmissing-declarations \
12801 Wmissing-prototypes \
12805 Wstrict-prototypes \
12806 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
12808 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12809 if { (eval echo "$as_me:12809: \"$ac_compile\"") >&5
12810 (eval $ac_compile) 2>&5
12812 echo "$as_me:12812: \$? = $ac_status" >&5
12813 (exit $ac_status); }; then
12814 test -n "$verbose" && echo "$as_me:12814: result: ... -$cf_opt" >&5
12815 echo "${ECHO_T}... -$cf_opt" >&6
12818 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12821 case $GCC_VERSION in
12823 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
12825 echo "${as_me:-configure}:12825: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12831 case $GCC_VERSION in
12833 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
12835 echo "${as_me:-configure}:12835: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12841 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12844 CFLAGS="$cf_save_CFLAGS"
12850 if test "$GCC" = yes
12852 cat > conftest.i <<EOF
12854 #define GCC_PRINTF 0
12857 #define GCC_SCANF 0
12859 #ifndef GCC_NORETURN
12860 #define GCC_NORETURN /* nothing */
12863 #define GCC_UNUSED /* nothing */
12866 if test "$GCC" = yes
12868 { echo "$as_me:12868: checking for $CC __attribute__ directives..." >&5
12869 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12870 cat > conftest.$ac_ext <<EOF
12871 #line 12871 "${as_me:-configure}"
12872 #include "confdefs.h"
12873 #include "conftest.h"
12874 #include "conftest.i"
12876 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12878 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12881 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
12883 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
12885 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12886 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12887 extern void foo(void) GCC_NORETURN;
12888 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12890 cf_printf_attribute=no
12891 cf_scanf_attribute=no
12892 for cf_attribute in scanf printf unused noreturn
12895 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12897 cf_directive="__attribute__(($cf_attribute))"
12898 echo "checking for $CC $cf_directive" 1>&5
12900 case $cf_attribute in
12902 cf_printf_attribute=yes
12903 cat >conftest.h <<EOF
12904 #define GCC_$cf_ATTRIBUTE 1
12908 cf_scanf_attribute=yes
12909 cat >conftest.h <<EOF
12910 #define GCC_$cf_ATTRIBUTE 1
12914 cat >conftest.h <<EOF
12915 #define GCC_$cf_ATTRIBUTE $cf_directive
12920 if { (eval echo "$as_me:12920: \"$ac_compile\"") >&5
12921 (eval $ac_compile) 2>&5
12923 echo "$as_me:12923: \$? = $ac_status" >&5
12924 (exit $ac_status); }; then
12925 test -n "$verbose" && echo "$as_me:12925: result: ... $cf_attribute" >&5
12926 echo "${ECHO_T}... $cf_attribute" >&6
12927 cat conftest.h >>confdefs.h
12928 case $cf_attribute in
12931 cat >>confdefs.h <<EOF
12932 #define GCC_NORETURN $cf_directive
12937 cf_value='/* nothing */'
12938 if test "$cf_printf_attribute" != no ; then
12939 cf_value='__attribute__((format(printf,fmt,var)))'
12941 cat >>confdefs.h <<\EOF
12942 #define GCC_PRINTF 1
12947 cat >>confdefs.h <<EOF
12948 #define GCC_PRINTFLIKE(fmt,var) $cf_value
12953 cf_value='/* nothing */'
12954 if test "$cf_scanf_attribute" != no ; then
12955 cf_value='__attribute__((format(scanf,fmt,var)))'
12957 cat >>confdefs.h <<\EOF
12958 #define GCC_SCANF 1
12963 cat >>confdefs.h <<EOF
12964 #define GCC_SCANFLIKE(fmt,var) $cf_value
12970 cat >>confdefs.h <<EOF
12971 #define GCC_UNUSED $cf_directive
12979 fgrep define conftest.i >>confdefs.h
12984 ### use option --enable-assertions to turn on generation of assertion code
12985 echo "$as_me:12985: checking if you want to enable runtime assertions" >&5
12986 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12988 # Check whether --enable-assertions or --disable-assertions was given.
12989 if test "${enable_assertions+set}" = set; then
12990 enableval="$enable_assertions"
12991 with_assertions=$enableval
12995 echo "$as_me:12995: result: $with_assertions" >&5
12996 echo "${ECHO_T}$with_assertions" >&6
12999 if test "$with_assertions" = no
13001 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13004 ADAFLAGS="$ADAFLAGS -gnata"
13009 ### use option --disable-leaks to suppress "permanent" leaks, for testing
13011 cat >>confdefs.h <<\EOF
13012 #define HAVE_NC_ALLOC_H 1
13015 ### use option --enable-expanded to generate certain macros as functions
13017 # Check whether --enable-expanded or --disable-expanded was given.
13018 if test "${enable_expanded+set}" = set; then
13019 enableval="$enable_expanded"
13020 test "$enableval" = yes &&
13021 cat >>confdefs.h <<\EOF
13022 #define NCURSES_EXPANDED 1
13027 ### use option --disable-macros to suppress macros in favor of functions
13029 # Check whether --enable-macros or --disable-macros was given.
13030 if test "${enable_macros+set}" = set; then
13031 enableval="$enable_macros"
13032 test "$enableval" = no &&
13033 cat >>confdefs.h <<\EOF
13034 #define NCURSES_NOMACROS 1
13039 # Normally we only add trace() to the debug-library. Allow this to be
13040 # extended to all models of the ncurses library:
13042 case "$CFLAGS $CPPFLAGS" in
13048 echo "$as_me:13048: checking whether to add trace feature to all models" >&5
13049 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13051 # Check whether --with-trace or --without-trace was given.
13052 if test "${with_trace+set}" = set; then
13053 withval="$with_trace"
13054 cf_with_trace=$withval
13056 cf_with_trace=$cf_all_traces
13058 echo "$as_me:13058: result: $cf_with_trace" >&5
13059 echo "${ECHO_T}$cf_with_trace" >&6
13061 if test "$cf_with_trace" = yes ; then
13067 cf_new_extra_cppflags=
13069 for cf_add_cflags in -DTRACE
13071 case $cf_fix_cppflags in
13073 case $cf_add_cflags in
13074 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13075 case $cf_add_cflags in
13077 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13079 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13080 && test -z "${cf_tst_cflags}" \
13081 && cf_fix_cppflags=yes
13083 if test $cf_fix_cppflags = yes ; then
13085 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13086 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13089 elif test "${cf_tst_cflags}" = "\"'" ; then
13091 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13092 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13098 case "$CPPFLAGS" in
13102 case $cf_add_cflags in
13104 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13106 CPPFLAGS=`echo "$CPPFLAGS" | \
13107 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13108 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13113 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13114 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13121 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13122 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13129 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13130 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13132 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13134 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13135 && test -z "${cf_tst_cflags}" \
13136 && cf_fix_cppflags=no
13141 if test -n "$cf_new_cflags" ; then
13143 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13144 CFLAGS="${CFLAGS}$cf_new_cflags"
13148 if test -n "$cf_new_cppflags" ; then
13150 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13151 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13155 if test -n "$cf_new_extra_cppflags" ; then
13157 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13158 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13166 echo "$as_me:13166: checking if we want to use GNAT projects" >&5
13167 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
13169 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
13170 if test "${enable_gnat_projects+set}" = set; then
13171 enableval="$enable_gnat_projects"
13172 test "$enableval" != no && enableval=yes
13173 if test "$enableval" != "yes" ; then
13174 enable_gnat_projects=no
13176 enable_gnat_projects=yes
13180 enable_gnat_projects=yes
13183 echo "$as_me:13183: result: $enable_gnat_projects" >&5
13184 echo "${ECHO_T}$enable_gnat_projects" >&6
13186 ### Checks for libraries.
13187 case $cf_cv_system_name in
13191 echo "$as_me:13191: checking for gettimeofday" >&5
13192 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13193 if test "${ac_cv_func_gettimeofday+set}" = set; then
13194 echo $ECHO_N "(cached) $ECHO_C" >&6
13196 cat >conftest.$ac_ext <<_ACEOF
13197 #line 13197 "configure"
13198 #include "confdefs.h"
13199 /* System header to define __stub macros and hopefully few prototypes,
13200 which can conflict with char gettimeofday (); below. */
13201 #include <assert.h>
13202 /* Override any gcc2 internal prototype to avoid an error. */
13206 /* We use char because int might match the return type of a gcc2
13207 builtin and then its argument prototype would still apply. */
13208 char gettimeofday ();
13214 /* The GNU C library defines this for functions which it implements
13215 to always fail with ENOSYS. Some functions are actually named
13216 something starting with __ and the normal name is an alias. */
13217 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13220 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13227 rm -f conftest.$ac_objext conftest$ac_exeext
13228 if { (eval echo "$as_me:13228: \"$ac_link\"") >&5
13229 (eval $ac_link) 2>&5
13231 echo "$as_me:13231: \$? = $ac_status" >&5
13232 (exit $ac_status); } &&
13233 { ac_try='test -s conftest$ac_exeext'
13234 { (eval echo "$as_me:13234: \"$ac_try\"") >&5
13235 (eval $ac_try) 2>&5
13237 echo "$as_me:13237: \$? = $ac_status" >&5
13238 (exit $ac_status); }; }; then
13239 ac_cv_func_gettimeofday=yes
13241 echo "$as_me: failed program was:" >&5
13242 cat conftest.$ac_ext >&5
13243 ac_cv_func_gettimeofday=no
13245 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13247 echo "$as_me:13247: result: $ac_cv_func_gettimeofday" >&5
13248 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13249 if test $ac_cv_func_gettimeofday = yes; then
13250 cat >>confdefs.h <<\EOF
13251 #define HAVE_GETTIMEOFDAY 1
13256 echo "$as_me:13256: checking for gettimeofday in -lbsd" >&5
13257 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13258 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13259 echo $ECHO_N "(cached) $ECHO_C" >&6
13261 ac_check_lib_save_LIBS=$LIBS
13263 cat >conftest.$ac_ext <<_ACEOF
13264 #line 13264 "configure"
13265 #include "confdefs.h"
13267 /* Override any gcc2 internal prototype to avoid an error. */
13271 /* We use char because int might match the return type of a gcc2
13272 builtin and then its argument prototype would still apply. */
13273 char gettimeofday ();
13282 rm -f conftest.$ac_objext conftest$ac_exeext
13283 if { (eval echo "$as_me:13283: \"$ac_link\"") >&5
13284 (eval $ac_link) 2>&5
13286 echo "$as_me:13286: \$? = $ac_status" >&5
13287 (exit $ac_status); } &&
13288 { ac_try='test -s conftest$ac_exeext'
13289 { (eval echo "$as_me:13289: \"$ac_try\"") >&5
13290 (eval $ac_try) 2>&5
13292 echo "$as_me:13292: \$? = $ac_status" >&5
13293 (exit $ac_status); }; }; then
13294 ac_cv_lib_bsd_gettimeofday=yes
13296 echo "$as_me: failed program was:" >&5
13297 cat conftest.$ac_ext >&5
13298 ac_cv_lib_bsd_gettimeofday=no
13300 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13301 LIBS=$ac_check_lib_save_LIBS
13303 echo "$as_me:13303: result: $ac_cv_lib_bsd_gettimeofday" >&5
13304 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13305 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13307 cat >>confdefs.h <<\EOF
13308 #define HAVE_GETTIMEOFDAY 1
13318 ### Checks for header files.
13319 echo "$as_me:13319: checking for ANSI C header files" >&5
13320 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13321 if test "${ac_cv_header_stdc+set}" = set; then
13322 echo $ECHO_N "(cached) $ECHO_C" >&6
13324 cat >conftest.$ac_ext <<_ACEOF
13325 #line 13325 "configure"
13326 #include "confdefs.h"
13327 #include <stdlib.h>
13328 #include <stdarg.h>
13329 #include <string.h>
13333 if { (eval echo "$as_me:13333: \"$ac_cpp conftest.$ac_ext\"") >&5
13334 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13336 egrep -v '^ *\+' conftest.er1 >conftest.err
13338 cat conftest.err >&5
13339 echo "$as_me:13339: \$? = $ac_status" >&5
13340 (exit $ac_status); } >/dev/null; then
13341 if test -s conftest.err; then
13342 ac_cpp_err=$ac_c_preproc_warn_flag
13349 if test -z "$ac_cpp_err"; then
13350 ac_cv_header_stdc=yes
13352 echo "$as_me: failed program was:" >&5
13353 cat conftest.$ac_ext >&5
13354 ac_cv_header_stdc=no
13356 rm -f conftest.err conftest.$ac_ext
13358 if test $ac_cv_header_stdc = yes; then
13359 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13360 cat >conftest.$ac_ext <<_ACEOF
13361 #line 13361 "configure"
13362 #include "confdefs.h"
13363 #include <string.h>
13366 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13367 egrep "memchr" >/dev/null 2>&1; then
13370 ac_cv_header_stdc=no
13376 if test $ac_cv_header_stdc = yes; then
13377 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13378 cat >conftest.$ac_ext <<_ACEOF
13379 #line 13379 "configure"
13380 #include "confdefs.h"
13381 #include <stdlib.h>
13384 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13385 egrep "free" >/dev/null 2>&1; then
13388 ac_cv_header_stdc=no
13394 if test $ac_cv_header_stdc = yes; then
13395 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13396 if test "$cross_compiling" = yes; then
13399 cat >conftest.$ac_ext <<_ACEOF
13400 #line 13400 "configure"
13401 #include "confdefs.h"
13403 #if ((' ' & 0x0FF) == 0x020)
13404 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13405 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13407 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13408 || ('j' <= (c) && (c) <= 'r') \
13409 || ('s' <= (c) && (c) <= 'z'))
13410 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13413 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13418 for (i = 0; i < 256; i++)
13419 if (XOR (islower (i), ISLOWER (i))
13420 || toupper (i) != TOUPPER (i))
13421 $ac_main_return(2);
13422 $ac_main_return (0);
13425 rm -f conftest$ac_exeext
13426 if { (eval echo "$as_me:13426: \"$ac_link\"") >&5
13427 (eval $ac_link) 2>&5
13429 echo "$as_me:13429: \$? = $ac_status" >&5
13430 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13431 { (eval echo "$as_me:13431: \"$ac_try\"") >&5
13432 (eval $ac_try) 2>&5
13434 echo "$as_me:13434: \$? = $ac_status" >&5
13435 (exit $ac_status); }; }; then
13438 echo "$as_me: program exited with status $ac_status" >&5
13439 echo "$as_me: failed program was:" >&5
13440 cat conftest.$ac_ext >&5
13441 ac_cv_header_stdc=no
13443 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13447 echo "$as_me:13447: result: $ac_cv_header_stdc" >&5
13448 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13449 if test $ac_cv_header_stdc = yes; then
13451 cat >>confdefs.h <<\EOF
13452 #define STDC_HEADERS 1
13457 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13459 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13460 inttypes.h stdint.h unistd.h
13462 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13463 echo "$as_me:13463: checking for $ac_header" >&5
13464 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13465 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13466 echo $ECHO_N "(cached) $ECHO_C" >&6
13468 cat >conftest.$ac_ext <<_ACEOF
13469 #line 13469 "configure"
13470 #include "confdefs.h"
13471 $ac_includes_default
13472 #include <$ac_header>
13474 rm -f conftest.$ac_objext
13475 if { (eval echo "$as_me:13475: \"$ac_compile\"") >&5
13476 (eval $ac_compile) 2>&5
13478 echo "$as_me:13478: \$? = $ac_status" >&5
13479 (exit $ac_status); } &&
13480 { ac_try='test -s conftest.$ac_objext'
13481 { (eval echo "$as_me:13481: \"$ac_try\"") >&5
13482 (eval $ac_try) 2>&5
13484 echo "$as_me:13484: \$? = $ac_status" >&5
13485 (exit $ac_status); }; }; then
13486 eval "$as_ac_Header=yes"
13488 echo "$as_me: failed program was:" >&5
13489 cat conftest.$ac_ext >&5
13490 eval "$as_ac_Header=no"
13492 rm -f conftest.$ac_objext conftest.$ac_ext
13494 echo "$as_me:13494: result: `eval echo '${'$as_ac_Header'}'`" >&5
13495 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13496 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13497 cat >>confdefs.h <<EOF
13498 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13504 echo "$as_me:13504: checking for signed char" >&5
13505 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13506 if test "${ac_cv_type_signed_char+set}" = set; then
13507 echo $ECHO_N "(cached) $ECHO_C" >&6
13509 cat >conftest.$ac_ext <<_ACEOF
13510 #line 13510 "configure"
13511 #include "confdefs.h"
13512 $ac_includes_default
13516 if ((signed char *) 0)
13518 if (sizeof (signed char))
13524 rm -f conftest.$ac_objext
13525 if { (eval echo "$as_me:13525: \"$ac_compile\"") >&5
13526 (eval $ac_compile) 2>&5
13528 echo "$as_me:13528: \$? = $ac_status" >&5
13529 (exit $ac_status); } &&
13530 { ac_try='test -s conftest.$ac_objext'
13531 { (eval echo "$as_me:13531: \"$ac_try\"") >&5
13532 (eval $ac_try) 2>&5
13534 echo "$as_me:13534: \$? = $ac_status" >&5
13535 (exit $ac_status); }; }; then
13536 ac_cv_type_signed_char=yes
13538 echo "$as_me: failed program was:" >&5
13539 cat conftest.$ac_ext >&5
13540 ac_cv_type_signed_char=no
13542 rm -f conftest.$ac_objext conftest.$ac_ext
13544 echo "$as_me:13544: result: $ac_cv_type_signed_char" >&5
13545 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13547 echo "$as_me:13547: checking size of signed char" >&5
13548 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13549 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13550 echo $ECHO_N "(cached) $ECHO_C" >&6
13552 if test "$ac_cv_type_signed_char" = yes; then
13553 if test "$cross_compiling" = yes; then
13554 # Depending upon the size, compute the lo and hi bounds.
13555 cat >conftest.$ac_ext <<_ACEOF
13556 #line 13556 "configure"
13557 #include "confdefs.h"
13558 $ac_includes_default
13562 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13567 rm -f conftest.$ac_objext
13568 if { (eval echo "$as_me:13568: \"$ac_compile\"") >&5
13569 (eval $ac_compile) 2>&5
13571 echo "$as_me:13571: \$? = $ac_status" >&5
13572 (exit $ac_status); } &&
13573 { ac_try='test -s conftest.$ac_objext'
13574 { (eval echo "$as_me:13574: \"$ac_try\"") >&5
13575 (eval $ac_try) 2>&5
13577 echo "$as_me:13577: \$? = $ac_status" >&5
13578 (exit $ac_status); }; }; then
13581 cat >conftest.$ac_ext <<_ACEOF
13582 #line 13582 "configure"
13583 #include "confdefs.h"
13584 $ac_includes_default
13588 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13593 rm -f conftest.$ac_objext
13594 if { (eval echo "$as_me:13594: \"$ac_compile\"") >&5
13595 (eval $ac_compile) 2>&5
13597 echo "$as_me:13597: \$? = $ac_status" >&5
13598 (exit $ac_status); } &&
13599 { ac_try='test -s conftest.$ac_objext'
13600 { (eval echo "$as_me:13600: \"$ac_try\"") >&5
13601 (eval $ac_try) 2>&5
13603 echo "$as_me:13603: \$? = $ac_status" >&5
13604 (exit $ac_status); }; }; then
13605 ac_hi=$ac_mid; break
13607 echo "$as_me: failed program was:" >&5
13608 cat conftest.$ac_ext >&5
13609 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13611 rm -f conftest.$ac_objext conftest.$ac_ext
13614 echo "$as_me: failed program was:" >&5
13615 cat conftest.$ac_ext >&5
13618 cat >conftest.$ac_ext <<_ACEOF
13619 #line 13619 "configure"
13620 #include "confdefs.h"
13621 $ac_includes_default
13625 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13630 rm -f conftest.$ac_objext
13631 if { (eval echo "$as_me:13631: \"$ac_compile\"") >&5
13632 (eval $ac_compile) 2>&5
13634 echo "$as_me:13634: \$? = $ac_status" >&5
13635 (exit $ac_status); } &&
13636 { ac_try='test -s conftest.$ac_objext'
13637 { (eval echo "$as_me:13637: \"$ac_try\"") >&5
13638 (eval $ac_try) 2>&5
13640 echo "$as_me:13640: \$? = $ac_status" >&5
13641 (exit $ac_status); }; }; then
13642 ac_lo=$ac_mid; break
13644 echo "$as_me: failed program was:" >&5
13645 cat conftest.$ac_ext >&5
13646 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13648 rm -f conftest.$ac_objext conftest.$ac_ext
13651 rm -f conftest.$ac_objext conftest.$ac_ext
13652 # Binary search between lo and hi bounds.
13653 while test "x$ac_lo" != "x$ac_hi"; do
13654 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13655 cat >conftest.$ac_ext <<_ACEOF
13656 #line 13656 "configure"
13657 #include "confdefs.h"
13658 $ac_includes_default
13662 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13667 rm -f conftest.$ac_objext
13668 if { (eval echo "$as_me:13668: \"$ac_compile\"") >&5
13669 (eval $ac_compile) 2>&5
13671 echo "$as_me:13671: \$? = $ac_status" >&5
13672 (exit $ac_status); } &&
13673 { ac_try='test -s conftest.$ac_objext'
13674 { (eval echo "$as_me:13674: \"$ac_try\"") >&5
13675 (eval $ac_try) 2>&5
13677 echo "$as_me:13677: \$? = $ac_status" >&5
13678 (exit $ac_status); }; }; then
13681 echo "$as_me: failed program was:" >&5
13682 cat conftest.$ac_ext >&5
13683 ac_lo=`expr $ac_mid + 1`
13685 rm -f conftest.$ac_objext conftest.$ac_ext
13687 ac_cv_sizeof_signed_char=$ac_lo
13689 if test "$cross_compiling" = yes; then
13690 { { echo "$as_me:13690: error: cannot run test program while cross compiling" >&5
13691 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13692 { (exit 1); exit 1; }; }
13694 cat >conftest.$ac_ext <<_ACEOF
13695 #line 13695 "configure"
13696 #include "confdefs.h"
13697 $ac_includes_default
13701 FILE *f = fopen ("conftest.val", "w");
13703 $ac_main_return (1);
13704 fprintf (f, "%d", (sizeof (signed char)));
13710 rm -f conftest$ac_exeext
13711 if { (eval echo "$as_me:13711: \"$ac_link\"") >&5
13712 (eval $ac_link) 2>&5
13714 echo "$as_me:13714: \$? = $ac_status" >&5
13715 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13716 { (eval echo "$as_me:13716: \"$ac_try\"") >&5
13717 (eval $ac_try) 2>&5
13719 echo "$as_me:13719: \$? = $ac_status" >&5
13720 (exit $ac_status); }; }; then
13721 ac_cv_sizeof_signed_char=`cat conftest.val`
13723 echo "$as_me: program exited with status $ac_status" >&5
13724 echo "$as_me: failed program was:" >&5
13725 cat conftest.$ac_ext >&5
13727 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13732 ac_cv_sizeof_signed_char=0
13735 echo "$as_me:13735: result: $ac_cv_sizeof_signed_char" >&5
13736 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13737 cat >>confdefs.h <<EOF
13738 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13741 echo "$as_me:13741: checking for ANSI C header files" >&5
13742 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13743 if test "${ac_cv_header_stdc+set}" = set; then
13744 echo $ECHO_N "(cached) $ECHO_C" >&6
13746 cat >conftest.$ac_ext <<_ACEOF
13747 #line 13747 "configure"
13748 #include "confdefs.h"
13749 #include <stdlib.h>
13750 #include <stdarg.h>
13751 #include <string.h>
13755 if { (eval echo "$as_me:13755: \"$ac_cpp conftest.$ac_ext\"") >&5
13756 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13758 egrep -v '^ *\+' conftest.er1 >conftest.err
13760 cat conftest.err >&5
13761 echo "$as_me:13761: \$? = $ac_status" >&5
13762 (exit $ac_status); } >/dev/null; then
13763 if test -s conftest.err; then
13764 ac_cpp_err=$ac_c_preproc_warn_flag
13771 if test -z "$ac_cpp_err"; then
13772 ac_cv_header_stdc=yes
13774 echo "$as_me: failed program was:" >&5
13775 cat conftest.$ac_ext >&5
13776 ac_cv_header_stdc=no
13778 rm -f conftest.err conftest.$ac_ext
13780 if test $ac_cv_header_stdc = yes; then
13781 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13782 cat >conftest.$ac_ext <<_ACEOF
13783 #line 13783 "configure"
13784 #include "confdefs.h"
13785 #include <string.h>
13788 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13789 egrep "memchr" >/dev/null 2>&1; then
13792 ac_cv_header_stdc=no
13798 if test $ac_cv_header_stdc = yes; then
13799 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13800 cat >conftest.$ac_ext <<_ACEOF
13801 #line 13801 "configure"
13802 #include "confdefs.h"
13803 #include <stdlib.h>
13806 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13807 egrep "free" >/dev/null 2>&1; then
13810 ac_cv_header_stdc=no
13816 if test $ac_cv_header_stdc = yes; then
13817 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13818 if test "$cross_compiling" = yes; then
13821 cat >conftest.$ac_ext <<_ACEOF
13822 #line 13822 "configure"
13823 #include "confdefs.h"
13825 #if ((' ' & 0x0FF) == 0x020)
13826 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13827 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13829 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13830 || ('j' <= (c) && (c) <= 'r') \
13831 || ('s' <= (c) && (c) <= 'z'))
13832 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13835 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13840 for (i = 0; i < 256; i++)
13841 if (XOR (islower (i), ISLOWER (i))
13842 || toupper (i) != TOUPPER (i))
13843 $ac_main_return(2);
13844 $ac_main_return (0);
13847 rm -f conftest$ac_exeext
13848 if { (eval echo "$as_me:13848: \"$ac_link\"") >&5
13849 (eval $ac_link) 2>&5
13851 echo "$as_me:13851: \$? = $ac_status" >&5
13852 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13853 { (eval echo "$as_me:13853: \"$ac_try\"") >&5
13854 (eval $ac_try) 2>&5
13856 echo "$as_me:13856: \$? = $ac_status" >&5
13857 (exit $ac_status); }; }; then
13860 echo "$as_me: program exited with status $ac_status" >&5
13861 echo "$as_me: failed program was:" >&5
13862 cat conftest.$ac_ext >&5
13863 ac_cv_header_stdc=no
13865 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13869 echo "$as_me:13869: result: $ac_cv_header_stdc" >&5
13870 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13871 if test $ac_cv_header_stdc = yes; then
13873 cat >>confdefs.h <<\EOF
13874 #define STDC_HEADERS 1
13879 ac_header_dirent=no
13880 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13881 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13882 echo "$as_me:13882: checking for $ac_hdr that defines DIR" >&5
13883 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13884 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13885 echo $ECHO_N "(cached) $ECHO_C" >&6
13887 cat >conftest.$ac_ext <<_ACEOF
13888 #line 13888 "configure"
13889 #include "confdefs.h"
13890 #include <sys/types.h>
13902 rm -f conftest.$ac_objext
13903 if { (eval echo "$as_me:13903: \"$ac_compile\"") >&5
13904 (eval $ac_compile) 2>&5
13906 echo "$as_me:13906: \$? = $ac_status" >&5
13907 (exit $ac_status); } &&
13908 { ac_try='test -s conftest.$ac_objext'
13909 { (eval echo "$as_me:13909: \"$ac_try\"") >&5
13910 (eval $ac_try) 2>&5
13912 echo "$as_me:13912: \$? = $ac_status" >&5
13913 (exit $ac_status); }; }; then
13914 eval "$as_ac_Header=yes"
13916 echo "$as_me: failed program was:" >&5
13917 cat conftest.$ac_ext >&5
13918 eval "$as_ac_Header=no"
13920 rm -f conftest.$ac_objext conftest.$ac_ext
13922 echo "$as_me:13922: result: `eval echo '${'$as_ac_Header'}'`" >&5
13923 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13924 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13925 cat >>confdefs.h <<EOF
13926 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13929 ac_header_dirent=$ac_hdr; break
13933 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13934 if test $ac_header_dirent = dirent.h; then
13935 echo "$as_me:13935: checking for opendir in -ldir" >&5
13936 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13937 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13938 echo $ECHO_N "(cached) $ECHO_C" >&6
13940 ac_check_lib_save_LIBS=$LIBS
13942 cat >conftest.$ac_ext <<_ACEOF
13943 #line 13943 "configure"
13944 #include "confdefs.h"
13946 /* Override any gcc2 internal prototype to avoid an error. */
13950 /* We use char because int might match the return type of a gcc2
13951 builtin and then its argument prototype would still apply. */
13961 rm -f conftest.$ac_objext conftest$ac_exeext
13962 if { (eval echo "$as_me:13962: \"$ac_link\"") >&5
13963 (eval $ac_link) 2>&5
13965 echo "$as_me:13965: \$? = $ac_status" >&5
13966 (exit $ac_status); } &&
13967 { ac_try='test -s conftest$ac_exeext'
13968 { (eval echo "$as_me:13968: \"$ac_try\"") >&5
13969 (eval $ac_try) 2>&5
13971 echo "$as_me:13971: \$? = $ac_status" >&5
13972 (exit $ac_status); }; }; then
13973 ac_cv_lib_dir_opendir=yes
13975 echo "$as_me: failed program was:" >&5
13976 cat conftest.$ac_ext >&5
13977 ac_cv_lib_dir_opendir=no
13979 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13980 LIBS=$ac_check_lib_save_LIBS
13982 echo "$as_me:13982: result: $ac_cv_lib_dir_opendir" >&5
13983 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13984 if test $ac_cv_lib_dir_opendir = yes; then
13989 echo "$as_me:13989: checking for opendir in -lx" >&5
13990 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13991 if test "${ac_cv_lib_x_opendir+set}" = set; then
13992 echo $ECHO_N "(cached) $ECHO_C" >&6
13994 ac_check_lib_save_LIBS=$LIBS
13996 cat >conftest.$ac_ext <<_ACEOF
13997 #line 13997 "configure"
13998 #include "confdefs.h"
14000 /* Override any gcc2 internal prototype to avoid an error. */
14004 /* We use char because int might match the return type of a gcc2
14005 builtin and then its argument prototype would still apply. */
14015 rm -f conftest.$ac_objext conftest$ac_exeext
14016 if { (eval echo "$as_me:14016: \"$ac_link\"") >&5
14017 (eval $ac_link) 2>&5
14019 echo "$as_me:14019: \$? = $ac_status" >&5
14020 (exit $ac_status); } &&
14021 { ac_try='test -s conftest$ac_exeext'
14022 { (eval echo "$as_me:14022: \"$ac_try\"") >&5
14023 (eval $ac_try) 2>&5
14025 echo "$as_me:14025: \$? = $ac_status" >&5
14026 (exit $ac_status); }; }; then
14027 ac_cv_lib_x_opendir=yes
14029 echo "$as_me: failed program was:" >&5
14030 cat conftest.$ac_ext >&5
14031 ac_cv_lib_x_opendir=no
14033 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14034 LIBS=$ac_check_lib_save_LIBS
14036 echo "$as_me:14036: result: $ac_cv_lib_x_opendir" >&5
14037 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14038 if test $ac_cv_lib_x_opendir = yes; then
14044 echo "$as_me:14044: checking whether time.h and sys/time.h may both be included" >&5
14045 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14046 if test "${ac_cv_header_time+set}" = set; then
14047 echo $ECHO_N "(cached) $ECHO_C" >&6
14049 cat >conftest.$ac_ext <<_ACEOF
14050 #line 14050 "configure"
14051 #include "confdefs.h"
14052 #include <sys/types.h>
14053 #include <sys/time.h>
14059 if ((struct tm *) 0)
14065 rm -f conftest.$ac_objext
14066 if { (eval echo "$as_me:14066: \"$ac_compile\"") >&5
14067 (eval $ac_compile) 2>&5
14069 echo "$as_me:14069: \$? = $ac_status" >&5
14070 (exit $ac_status); } &&
14071 { ac_try='test -s conftest.$ac_objext'
14072 { (eval echo "$as_me:14072: \"$ac_try\"") >&5
14073 (eval $ac_try) 2>&5
14075 echo "$as_me:14075: \$? = $ac_status" >&5
14076 (exit $ac_status); }; }; then
14077 ac_cv_header_time=yes
14079 echo "$as_me: failed program was:" >&5
14080 cat conftest.$ac_ext >&5
14081 ac_cv_header_time=no
14083 rm -f conftest.$ac_objext conftest.$ac_ext
14085 echo "$as_me:14085: result: $ac_cv_header_time" >&5
14086 echo "${ECHO_T}$ac_cv_header_time" >&6
14087 if test $ac_cv_header_time = yes; then
14089 cat >>confdefs.h <<\EOF
14090 #define TIME_WITH_SYS_TIME 1
14095 ### checks for compiler characteristics
14097 ac_cpp='$CPP $CPPFLAGS'
14098 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14099 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14100 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14101 ac_main_return=return
14103 echo "$as_me:14103: checking for an ANSI C-conforming const" >&5
14104 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14105 if test "${ac_cv_c_const+set}" = set; then
14106 echo $ECHO_N "(cached) $ECHO_C" >&6
14108 cat >conftest.$ac_ext <<_ACEOF
14109 #line 14109 "configure"
14110 #include "confdefs.h"
14115 /* FIXME: Include the comments suggested by Paul. */
14116 #ifndef __cplusplus
14117 /* Ultrix mips cc rejects this. */
14118 typedef int charset[2];
14120 /* SunOS 4.1.1 cc rejects this. */
14121 char const *const *ccp;
14123 /* NEC SVR4.0.2 mips cc rejects this. */
14124 struct point {int x, y;};
14125 static struct point const zero = {0,0};
14126 /* AIX XL C 1.02.0.0 rejects this.
14127 It does not let you subtract one const X* pointer from another in
14128 an arm of an if-expression whose if-part is not a constant
14130 const char *g = "string";
14131 ccp = &g + (g ? g-g : 0);
14132 /* HPUX 7.0 cc rejects these. */
14135 ccp = (char const *const *) p;
14136 { /* SCO 3.2v4 cc rejects this. */
14138 char const *s = 0 ? (char *) 0 : (char const *) 0;
14142 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14143 int x[] = {25, 17};
14144 const int *foo = &x[0];
14147 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14148 typedef const int *iptr;
14152 { /* AIX XL C 1.02.0.0 rejects this saying
14153 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14154 struct s { int j; const int *ap[3]; };
14155 struct s *b; b->j = 5;
14157 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14158 const int foo = 10;
14166 rm -f conftest.$ac_objext
14167 if { (eval echo "$as_me:14167: \"$ac_compile\"") >&5
14168 (eval $ac_compile) 2>&5
14170 echo "$as_me:14170: \$? = $ac_status" >&5
14171 (exit $ac_status); } &&
14172 { ac_try='test -s conftest.$ac_objext'
14173 { (eval echo "$as_me:14173: \"$ac_try\"") >&5
14174 (eval $ac_try) 2>&5
14176 echo "$as_me:14176: \$? = $ac_status" >&5
14177 (exit $ac_status); }; }; then
14180 echo "$as_me: failed program was:" >&5
14181 cat conftest.$ac_ext >&5
14184 rm -f conftest.$ac_objext conftest.$ac_ext
14186 echo "$as_me:14186: result: $ac_cv_c_const" >&5
14187 echo "${ECHO_T}$ac_cv_c_const" >&6
14188 if test $ac_cv_c_const = no; then
14190 cat >>confdefs.h <<\EOF
14196 ### Checks for external-data
14198 echo "$as_me:14198: checking if data-only library module links" >&5
14199 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
14200 if test "${cf_cv_link_dataonly+set}" = set; then
14201 echo $ECHO_N "(cached) $ECHO_C" >&6
14205 cat >conftest.$ac_ext <<EOF
14206 #line 14206 "configure"
14207 int testdata[3] = { 123, 456, 789 };
14209 if { (eval echo "$as_me:14209: \"$ac_compile\"") >&5
14210 (eval $ac_compile) 2>&5
14212 echo "$as_me:14212: \$? = $ac_status" >&5
14213 (exit $ac_status); } ; then
14214 mv conftest.o data.o && \
14215 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
14217 rm -f conftest.$ac_ext data.o
14218 cat >conftest.$ac_ext <<EOF
14219 #line 14219 "configure"
14223 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
14225 extern int testdata[3];
14226 return testdata[0] == 123
14227 && testdata[1] == 456
14228 && testdata[2] == 789;
14232 if { (eval echo "$as_me:14232: \"$ac_compile\"") >&5
14233 (eval $ac_compile) 2>&5
14235 echo "$as_me:14235: \$? = $ac_status" >&5
14236 (exit $ac_status); }; then
14237 mv conftest.o func.o && \
14238 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
14240 rm -f conftest.$ac_ext func.o
14241 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
14242 cf_saveLIBS="$LIBS"
14243 LIBS="conftest.a $LIBS"
14244 if test "$cross_compiling" = yes; then
14245 cf_cv_link_dataonly=unknown
14247 cat >conftest.$ac_ext <<_ACEOF
14248 #line 14248 "configure"
14249 #include "confdefs.h"
14253 extern int testfunc();
14254 ${cf_cv_main_return:-return} (!testfunc());
14258 rm -f conftest$ac_exeext
14259 if { (eval echo "$as_me:14259: \"$ac_link\"") >&5
14260 (eval $ac_link) 2>&5
14262 echo "$as_me:14262: \$? = $ac_status" >&5
14263 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14264 { (eval echo "$as_me:14264: \"$ac_try\"") >&5
14265 (eval $ac_try) 2>&5
14267 echo "$as_me:14267: \$? = $ac_status" >&5
14268 (exit $ac_status); }; }; then
14269 cf_cv_link_dataonly=yes
14271 echo "$as_me: program exited with status $ac_status" >&5
14272 echo "$as_me: failed program was:" >&5
14273 cat conftest.$ac_ext >&5
14274 cf_cv_link_dataonly=no
14276 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14278 LIBS="$cf_saveLIBS"
14282 echo "$as_me:14282: result: $cf_cv_link_dataonly" >&5
14283 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
14285 if test "$cf_cv_link_dataonly" = no ; then
14287 cat >>confdefs.h <<\EOF
14288 #define BROKEN_LINKER 1
14294 ### Checks for library functions.
14300 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14301 echo "$as_me:14301: checking for $ac_header" >&5
14302 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14303 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14304 echo $ECHO_N "(cached) $ECHO_C" >&6
14306 cat >conftest.$ac_ext <<_ACEOF
14307 #line 14307 "configure"
14308 #include "confdefs.h"
14309 #include <$ac_header>
14311 if { (eval echo "$as_me:14311: \"$ac_cpp conftest.$ac_ext\"") >&5
14312 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14314 egrep -v '^ *\+' conftest.er1 >conftest.err
14316 cat conftest.err >&5
14317 echo "$as_me:14317: \$? = $ac_status" >&5
14318 (exit $ac_status); } >/dev/null; then
14319 if test -s conftest.err; then
14320 ac_cpp_err=$ac_c_preproc_warn_flag
14327 if test -z "$ac_cpp_err"; then
14328 eval "$as_ac_Header=yes"
14330 echo "$as_me: failed program was:" >&5
14331 cat conftest.$ac_ext >&5
14332 eval "$as_ac_Header=no"
14334 rm -f conftest.err conftest.$ac_ext
14336 echo "$as_me:14336: result: `eval echo '${'$as_ac_Header'}'`" >&5
14337 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14338 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14339 cat >>confdefs.h <<EOF
14340 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14346 echo "$as_me:14346: checking for working mkstemp" >&5
14347 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
14348 if test "${cf_cv_func_mkstemp+set}" = set; then
14349 echo $ECHO_N "(cached) $ECHO_C" >&6
14353 if test "$cross_compiling" = yes; then
14354 cf_cv_func_mkstemp=maybe
14356 cat >conftest.$ac_ext <<_ACEOF
14357 #line 14357 "configure"
14358 #include "confdefs.h"
14360 #include <sys/types.h>
14361 #ifdef HAVE_UNISTD_H
14362 #include <unistd.h>
14364 #include <stdlib.h>
14366 #include <string.h>
14367 #include <sys/stat.h>
14370 char *tmpl = "conftestXXXXXX";
14378 for (n = 0; n < 2; ++n) {
14379 strcpy(name[n], tmpl);
14380 if ((fd = mkstemp(name[n])) >= 0) {
14381 if (!strcmp(name[n], tmpl)
14382 || stat(name[n], &sb) != 0
14383 || (sb.st_mode & S_IFMT) != S_IFREG
14384 || (sb.st_mode & 077) != 0) {
14391 && !strcmp(name[0], name[1]))
14393 ${cf_cv_main_return:-return}(result);
14397 rm -f conftest$ac_exeext
14398 if { (eval echo "$as_me:14398: \"$ac_link\"") >&5
14399 (eval $ac_link) 2>&5
14401 echo "$as_me:14401: \$? = $ac_status" >&5
14402 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14403 { (eval echo "$as_me:14403: \"$ac_try\"") >&5
14404 (eval $ac_try) 2>&5
14406 echo "$as_me:14406: \$? = $ac_status" >&5
14407 (exit $ac_status); }; }; then
14408 cf_cv_func_mkstemp=yes
14411 echo "$as_me: program exited with status $ac_status" >&5
14412 echo "$as_me: failed program was:" >&5
14413 cat conftest.$ac_ext >&5
14414 cf_cv_func_mkstemp=no
14417 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14421 echo "$as_me:14421: result: $cf_cv_func_mkstemp" >&5
14422 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
14423 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
14424 echo "$as_me:14424: checking for mkstemp" >&5
14425 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
14426 if test "${ac_cv_func_mkstemp+set}" = set; then
14427 echo $ECHO_N "(cached) $ECHO_C" >&6
14429 cat >conftest.$ac_ext <<_ACEOF
14430 #line 14430 "configure"
14431 #include "confdefs.h"
14432 /* System header to define __stub macros and hopefully few prototypes,
14433 which can conflict with char mkstemp (); below. */
14434 #include <assert.h>
14435 /* Override any gcc2 internal prototype to avoid an error. */
14439 /* We use char because int might match the return type of a gcc2
14440 builtin and then its argument prototype would still apply. */
14447 /* The GNU C library defines this for functions which it implements
14448 to always fail with ENOSYS. Some functions are actually named
14449 something starting with __ and the normal name is an alias. */
14450 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
14453 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14460 rm -f conftest.$ac_objext conftest$ac_exeext
14461 if { (eval echo "$as_me:14461: \"$ac_link\"") >&5
14462 (eval $ac_link) 2>&5
14464 echo "$as_me:14464: \$? = $ac_status" >&5
14465 (exit $ac_status); } &&
14466 { ac_try='test -s conftest$ac_exeext'
14467 { (eval echo "$as_me:14467: \"$ac_try\"") >&5
14468 (eval $ac_try) 2>&5
14470 echo "$as_me:14470: \$? = $ac_status" >&5
14471 (exit $ac_status); }; }; then
14472 ac_cv_func_mkstemp=yes
14474 echo "$as_me: failed program was:" >&5
14475 cat conftest.$ac_ext >&5
14476 ac_cv_func_mkstemp=no
14478 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14480 echo "$as_me:14480: result: $ac_cv_func_mkstemp" >&5
14481 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
14484 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
14486 cat >>confdefs.h <<\EOF
14487 #define HAVE_MKSTEMP 1
14492 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
14493 CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14494 CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14498 if test "$cf_with_ada" != "no" ; then
14500 cf_ada_make=gnatmake
14502 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
14503 set dummy $cf_ada_make; ac_word=$2
14504 echo "$as_me:14504: checking for $ac_word" >&5
14505 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14506 if test "${ac_cv_prog_gnatmake_exists+set}" = set; then
14507 echo $ECHO_N "(cached) $ECHO_C" >&6
14509 if test -n "$gnatmake_exists"; then
14510 ac_cv_prog_gnatmake_exists="$gnatmake_exists" # Let the user override the test.
14512 ac_save_IFS=$IFS; IFS=$ac_path_separator
14514 for ac_dir in $ac_dummy; do
14516 test -z "$ac_dir" && ac_dir=.
14517 $as_executable_p "$ac_dir/$ac_word" || continue
14518 ac_cv_prog_gnatmake_exists="yes"
14519 echo "$as_me:14519: found $ac_dir/$ac_word" >&5
14523 test -z "$ac_cv_prog_gnatmake_exists" && ac_cv_prog_gnatmake_exists="no"
14526 gnatmake_exists=$ac_cv_prog_gnatmake_exists
14527 if test -n "$gnatmake_exists"; then
14528 echo "$as_me:14528: result: $gnatmake_exists" >&5
14529 echo "${ECHO_T}$gnatmake_exists" >&6
14531 echo "$as_me:14531: result: no" >&5
14532 echo "${ECHO_T}no" >&6
14535 if test "$ac_cv_prog_gnatmake_exists" = no; then
14537 cf_cv_prog_gnat_correct=no
14539 # Extract the first word of "gprconfig", so it can be a program name with args.
14540 set dummy gprconfig; ac_word=$2
14541 echo "$as_me:14541: checking for $ac_word" >&5
14542 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14543 if test "${ac_cv_prog_gprconfig_exists+set}" = set; then
14544 echo $ECHO_N "(cached) $ECHO_C" >&6
14546 if test -n "$gprconfig_exists"; then
14547 ac_cv_prog_gprconfig_exists="$gprconfig_exists" # Let the user override the test.
14549 ac_save_IFS=$IFS; IFS=$ac_path_separator
14551 for ac_dir in $ac_dummy; do
14553 test -z "$ac_dir" && ac_dir=.
14554 $as_executable_p "$ac_dir/$ac_word" || continue
14555 ac_cv_prog_gprconfig_exists="yes"
14556 echo "$as_me:14556: found $ac_dir/$ac_word" >&5
14560 test -z "$ac_cv_prog_gprconfig_exists" && ac_cv_prog_gprconfig_exists="no"
14563 gprconfig_exists=$ac_cv_prog_gprconfig_exists
14564 if test -n "$gprconfig_exists"; then
14565 echo "$as_me:14565: result: $gprconfig_exists" >&5
14566 echo "${ECHO_T}$gprconfig_exists" >&6
14568 echo "$as_me:14568: result: no" >&5
14569 echo "${ECHO_T}no" >&6
14572 if test "$ac_cv_prog_gprconfig_exists" = yes
14574 rm -rf conftest* *~conftest*
14575 if mkdir conftest.src
14579 for cf_gprconfig in Ada C
14581 echo "$as_me:14581: checking for gprconfig name for $cf_gprconfig" >&5
14582 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
14583 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
14584 if test -n "$cf_gprconfig_value"
14586 eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
14587 echo "$as_me:14587: result: $cf_gprconfig_value" >&5
14588 echo "${ECHO_T}$cf_gprconfig_value" >&6
14590 echo "$as_me:14590: result: missing" >&5
14591 echo "${ECHO_T}missing" >&6
14597 rm -rf conftest* *~conftest*
14600 # gprconfig is newer than gnatmake; we can continue...
14603 if test "x$cf_ada_config" != "x#"
14606 echo "$as_me:14606: checking for gnat version" >&5
14607 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
14608 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
14609 grep '[0-9].[0-9][0-9]*' |\
14610 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
14611 echo "$as_me:14611: result: $cf_gnat_version" >&5
14612 echo "${ECHO_T}$cf_gnat_version" >&6
14614 case $cf_gnat_version in
14615 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
14616 cf_cv_prog_gnat_correct=yes
14619 { echo "$as_me:14619: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
14620 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
14621 cf_cv_prog_gnat_correct=no
14625 # Extract the first word of "m4", so it can be a program name with args.
14626 set dummy m4; ac_word=$2
14627 echo "$as_me:14627: checking for $ac_word" >&5
14628 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14629 if test "${ac_cv_prog_M4_exists+set}" = set; then
14630 echo $ECHO_N "(cached) $ECHO_C" >&6
14632 if test -n "$M4_exists"; then
14633 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
14635 ac_save_IFS=$IFS; IFS=$ac_path_separator
14637 for ac_dir in $ac_dummy; do
14639 test -z "$ac_dir" && ac_dir=.
14640 $as_executable_p "$ac_dir/$ac_word" || continue
14641 ac_cv_prog_M4_exists="yes"
14642 echo "$as_me:14642: found $ac_dir/$ac_word" >&5
14646 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
14649 M4_exists=$ac_cv_prog_M4_exists
14650 if test -n "$M4_exists"; then
14651 echo "$as_me:14651: result: $M4_exists" >&5
14652 echo "${ECHO_T}$M4_exists" >&6
14654 echo "$as_me:14654: result: no" >&5
14655 echo "${ECHO_T}no" >&6
14658 if test "$ac_cv_prog_M4_exists" = no; then
14659 cf_cv_prog_gnat_correct=no
14660 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
14662 if test "$cf_cv_prog_gnat_correct" = yes; then
14663 echo "$as_me:14663: checking if GNAT works" >&5
14664 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
14666 rm -rf conftest* *~conftest*
14667 cat >>conftest.ads <<CF_EOF
14668 procedure conftest;
14670 cat >>conftest.adb <<CF_EOF
14673 procedure conftest is
14675 Text_IO.Put ("Hello World");
14677 GNAT.OS_Lib.OS_Exit (0);
14680 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
14681 if ( ./conftest 1>&5 2>&1 ) ; then
14682 cf_cv_prog_gnat_correct=yes
14684 cf_cv_prog_gnat_correct=no
14687 cf_cv_prog_gnat_correct=no
14689 rm -rf conftest* *~conftest*
14691 echo "$as_me:14691: result: $cf_cv_prog_gnat_correct" >&5
14692 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
14695 cf_cv_prog_gnat_correct=no
14699 if test "$cf_cv_prog_gnat_correct" = yes; then
14701 echo "$as_me:14701: checking optimization options for ADAFLAGS" >&5
14702 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
14706 ADAFLAGS="$ADAFLAGS -g"
14712 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
14714 ADAFLAGS="$ADAFLAGS $cf_O_flag"
14718 echo "$as_me:14718: result: $ADAFLAGS" >&5
14719 echo "${ECHO_T}$ADAFLAGS" >&6
14721 echo "$as_me:14721: checking if GNATPREP supports -T option" >&5
14722 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
14723 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
14724 echo $ECHO_N "(cached) $ECHO_C" >&6
14727 cf_cv_gnatprep_opt_t=no
14728 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
14731 echo "$as_me:14731: result: $cf_cv_gnatprep_opt_t" >&5
14732 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
14733 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
14735 echo "$as_me:14735: checking if GNAT supports generics" >&5
14736 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
14737 case $cf_gnat_version in
14739 cf_gnat_generics=yes
14742 cf_gnat_generics=no
14745 echo "$as_me:14745: result: $cf_gnat_generics" >&5
14746 echo "${ECHO_T}$cf_gnat_generics" >&6
14748 if test "$cf_gnat_generics" = yes
14750 cf_compile_generics=generics
14751 cf_generic_objects="\${GENOBJS}"
14753 cf_compile_generics=
14754 cf_generic_objects=
14757 echo "$as_me:14757: checking if GNAT supports SIGINT" >&5
14758 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
14759 if test "${cf_cv_gnat_sigint+set}" = set; then
14760 echo $ECHO_N "(cached) $ECHO_C" >&6
14763 rm -rf conftest* *~conftest*
14764 cat >>conftest.ads <<CF_EOF
14765 with Ada.Interrupts.Names;
14767 package ConfTest is
14769 pragma Warnings (Off); -- the next pragma exists since 3.11p
14770 pragma Unreserve_All_Interrupts;
14771 pragma Warnings (On);
14773 protected Process is
14775 function Continue return Boolean;
14776 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
14778 Done : Boolean := False;
14783 cat >>conftest.adb <<CF_EOF
14784 package body ConfTest is
14785 protected body Process is
14790 function Continue return Boolean is
14797 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
14798 cf_cv_gnat_sigint=yes
14800 cf_cv_gnat_sigint=no
14802 rm -rf conftest* *~conftest*
14805 echo "$as_me:14805: result: $cf_cv_gnat_sigint" >&5
14806 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
14808 if test $cf_cv_gnat_sigint = yes ; then
14811 USE_GNAT_SIGINT="#"
14814 cf_gnat_libraries=no
14815 cf_gnat_projects=no
14817 if test "$enable_gnat_projects" != no ; then
14818 echo "$as_me:14818: checking if GNAT supports project files" >&5
14819 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
14820 case $cf_gnat_version in
14824 case $cf_cv_system_name in
14828 rm -rf conftest* *~conftest*
14829 if mkdir conftest.src conftest.bin conftest.lib
14832 rm -rf conftest* *~conftest*
14833 cat >>library.gpr <<CF_EOF
14835 Kind := External ("LIB_KIND");
14836 for Library_Name use "ConfTest";
14837 for Object_Dir use ".";
14838 for Library_ALI_Dir use External("LIBRARY_DIR");
14839 for Library_Version use External ("SONAME");
14840 for Library_Kind use Kind;
14841 for Library_Dir use External("BUILD_DIR");
14842 Source_Dir := External ("SOURCE_DIR");
14843 for Source_Dirs use (Source_Dir);
14846 cat >>confpackage.ads <<CF_EOF
14847 package ConfPackage is
14848 procedure conftest;
14851 cat >>confpackage.adb <<CF_EOF
14853 package body ConfPackage is
14854 procedure conftest is
14856 Text_IO.Put ("Hello World");
14861 if ( $cf_ada_make $ADAFLAGS \
14863 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
14864 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
14865 -XSOURCE_DIR=`pwd` \
14866 -XSONAME=libConfTest.so.1 \
14867 -XLIB_KIND=static 1>&5 2>&1 ) ; then
14868 cf_gnat_projects=yes
14872 if test -f conftest.lib/confpackage.ali
14874 cf_gnat_libraries=yes
14876 rm -rf conftest* *~conftest*
14881 echo "$as_me:14881: result: $cf_gnat_projects" >&5
14882 echo "${ECHO_T}$cf_gnat_projects" >&6
14883 fi # enable_gnat_projects
14885 if test $cf_gnat_projects = yes
14887 echo "$as_me:14887: checking if GNAT supports libraries" >&5
14888 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
14889 echo "$as_me:14889: result: $cf_gnat_libraries" >&5
14890 echo "${ECHO_T}$cf_gnat_libraries" >&6
14893 if test "$cf_gnat_projects" = yes
14895 USE_OLD_MAKERULES="#"
14896 USE_GNAT_PROJECTS=""
14898 USE_OLD_MAKERULES=""
14899 USE_GNAT_PROJECTS="#"
14902 if test "$cf_gnat_libraries" = yes
14904 USE_GNAT_LIBRARIES=""
14906 USE_GNAT_LIBRARIES="#"
14909 echo "$as_me:14909: checking for ada-compiler" >&5
14910 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
14912 # Check whether --with-ada-compiler or --without-ada-compiler was given.
14913 if test "${with_ada_compiler+set}" = set; then
14914 withval="$with_ada_compiler"
14915 cf_ada_compiler=$withval
14917 cf_ada_compiler=gnatmake
14920 echo "$as_me:14920: result: $cf_ada_compiler" >&5
14921 echo "${ECHO_T}$cf_ada_compiler" >&6
14923 cf_ada_package=terminal_interface
14925 echo "$as_me:14925: checking for ada-include" >&5
14926 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
14928 # Check whether --with-ada-include or --without-ada-include was given.
14929 if test "${with_ada_include+set}" = set; then
14930 withval="$with_ada_include"
14933 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
14934 fi; if test -n "$prefix/share/ada/adainclude" ; then
14936 if test "x$prefix" != xNONE; then
14937 cf_path_syntax="$prefix"
14939 cf_path_syntax="$ac_default_prefix"
14942 case ".$withval" in
14943 (.\$\(*\)*|.\'*\'*)
14947 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14949 (.\${*prefix}*|.\${*dir}*)
14950 eval withval="$withval"
14951 case ".$withval" in
14953 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14958 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14961 { { echo "$as_me:14961: error: expected a pathname, not \"$withval\"" >&5
14962 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
14963 { (exit 1); exit 1; }; }
14968 eval ADA_INCLUDE="$withval"
14970 echo "$as_me:14970: result: $ADA_INCLUDE" >&5
14971 echo "${ECHO_T}$ADA_INCLUDE" >&6
14973 echo "$as_me:14973: checking for ada-objects" >&5
14974 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
14976 # Check whether --with-ada-objects or --without-ada-objects was given.
14977 if test "${with_ada_objects+set}" = set; then
14978 withval="$with_ada_objects"
14981 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
14982 fi; if test -n "$prefix/lib/ada/adalib" ; then
14984 if test "x$prefix" != xNONE; then
14985 cf_path_syntax="$prefix"
14987 cf_path_syntax="$ac_default_prefix"
14990 case ".$withval" in
14991 (.\$\(*\)*|.\'*\'*)
14995 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14997 (.\${*prefix}*|.\${*dir}*)
14998 eval withval="$withval"
14999 case ".$withval" in
15001 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15006 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15009 { { echo "$as_me:15009: error: expected a pathname, not \"$withval\"" >&5
15010 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15011 { (exit 1); exit 1; }; }
15016 eval ADA_OBJECTS="$withval"
15018 echo "$as_me:15018: result: $ADA_OBJECTS" >&5
15019 echo "${ECHO_T}$ADA_OBJECTS" >&6
15021 echo "$as_me:15021: checking if an Ada95 shared-library should be built" >&5
15022 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
15024 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
15025 if test "${with_ada_sharedlib+set}" = set; then
15026 withval="$with_ada_sharedlib"
15027 with_ada_sharedlib=$withval
15029 with_ada_sharedlib=no
15031 echo "$as_me:15031: result: $with_ada_sharedlib" >&5
15032 echo "${ECHO_T}$with_ada_sharedlib" >&6
15034 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
15035 MAKE_ADA_SHAREDLIB="#"
15037 if test "x$with_ada_sharedlib" != xno
15039 MAKE_ADA_SHAREDLIB=
15040 if test "x$with_ada_sharedlib" != xyes
15042 ADA_SHAREDLIB="$with_ada_sharedlib"
15047 { { echo "$as_me:15047: error: No usable Ada compiler found" >&5
15048 echo "$as_me: error: No usable Ada compiler found" >&2;}
15049 { (exit 1); exit 1; }; }
15052 { { echo "$as_me:15052: error: The Ada compiler is needed for this package" >&5
15053 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
15054 { (exit 1); exit 1; }; }
15057 ################################################################################
15064 ### Construct the list of include-directories to be generated
15066 if test "$srcdir" != "."; then
15067 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
15069 CPPFLAGS="-I../include $CPPFLAGS"
15070 if test "$srcdir" != "."; then
15071 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
15073 CPPFLAGS="-I. $CPPFLAGS"
15075 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
15076 if test "$srcdir" != "."; then
15077 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
15079 if test "$GCC" != yes; then
15080 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15081 elif test "$includedir" != "/usr/include"; then
15082 if test "$includedir" = '${prefix}/include' ; then
15083 if test x$prefix != x/usr ; then
15084 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15087 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15091 ### Build up pieces for makefile rules
15092 echo "$as_me:15092: checking default library suffix" >&5
15093 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
15095 case $DFT_LWR_MODEL in
15096 (libtool) DFT_ARG_SUFFIX='' ;;
15097 (normal) DFT_ARG_SUFFIX='' ;;
15098 (debug) DFT_ARG_SUFFIX='_g' ;;
15099 (profile) DFT_ARG_SUFFIX='_p' ;;
15100 (shared) DFT_ARG_SUFFIX='' ;;
15102 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
15103 echo "$as_me:15103: result: $DFT_ARG_SUFFIX" >&5
15104 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
15106 echo "$as_me:15106: checking default library-dependency suffix" >&5
15107 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
15109 case X$DFT_LWR_MODEL in
15111 DFT_LIB_SUFFIX='.la'
15112 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15115 DFT_LIB_SUFFIX='_g.a'
15116 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15119 DFT_LIB_SUFFIX='_p.a'
15120 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15123 case $cf_cv_system_name in
15125 DFT_LIB_SUFFIX='.so'
15126 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15128 (cygwin*|msys*|mingw*)
15129 DFT_LIB_SUFFIX='.dll'
15130 DFT_DEP_SUFFIX='.dll.a'
15133 DFT_LIB_SUFFIX='.dylib'
15134 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15139 DFT_LIB_SUFFIX='.so'
15140 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15143 DFT_LIB_SUFFIX='.sl'
15144 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15149 DFT_LIB_SUFFIX='.so'
15150 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15155 DFT_LIB_SUFFIX='.a'
15156 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15159 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
15161 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
15162 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
15164 echo "$as_me:15164: result: $DFT_DEP_SUFFIX" >&5
15165 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
15167 echo "$as_me:15167: checking default object directory" >&5
15168 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
15170 case $DFT_LWR_MODEL in
15171 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
15172 (normal) DFT_OBJ_SUBDIR='objects' ;;
15173 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
15174 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
15176 case $cf_cv_system_name in
15178 DFT_OBJ_SUBDIR='objects' ;;
15180 DFT_OBJ_SUBDIR='obj_s' ;;
15183 echo "$as_me:15183: result: $DFT_OBJ_SUBDIR" >&5
15184 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
15186 ### Set up low-level terminfo dependencies for makefiles.
15188 if test "$DFT_LWR_MODEL" = shared ; then
15189 case $cf_cv_system_name in
15191 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
15194 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
15199 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
15201 ### Construct the list of subdirectories for which we'll customize makefiles
15202 ### with the appropriate compile-rules.
15204 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
15206 cat >>confdefs.h <<EOF
15207 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
15210 ### Now that we're done running tests, add the compiler-warnings, if any
15215 cf_new_extra_cppflags=
15217 for cf_add_cflags in $EXTRA_CFLAGS
15219 case $cf_fix_cppflags in
15221 case $cf_add_cflags in
15222 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15223 case $cf_add_cflags in
15225 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15227 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15228 && test -z "${cf_tst_cflags}" \
15229 && cf_fix_cppflags=yes
15231 if test $cf_fix_cppflags = yes ; then
15233 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15234 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15237 elif test "${cf_tst_cflags}" = "\"'" ; then
15239 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15240 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15246 case "$CPPFLAGS" in
15250 case $cf_add_cflags in
15252 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15254 CPPFLAGS=`echo "$CPPFLAGS" | \
15255 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15256 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15261 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15262 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15269 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15270 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15277 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15278 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15280 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15282 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15283 && test -z "${cf_tst_cflags}" \
15284 && cf_fix_cppflags=no
15289 if test -n "$cf_new_cflags" ; then
15291 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15292 CFLAGS="${CFLAGS}$cf_new_cflags"
15296 if test -n "$cf_new_cppflags" ; then
15298 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15299 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15303 if test -n "$cf_new_extra_cppflags" ; then
15305 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15306 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15310 ################################################################################
15316 NCURSES_SHLIB2="sh -c"
15318 ADA_SUBDIRS="include gen src doc"
15319 if test "x$cf_with_tests" != "xno" ; then
15320 ADA_SUBDIRS="$ADA_SUBDIRS samples"
15322 for cf_dir in $ADA_SUBDIRS
15324 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
15331 # match layout used by make-tar.sh
15332 ADAHTML_DIR=../doc/ada
15334 if test "x$cross_compiling" = xyes ; then
15335 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
15337 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
15340 ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
15341 ac_config_commands="$ac_config_commands default"
15342 cat >confcache <<\_ACEOF
15343 # This file is a shell script that caches the results of configure
15344 # tests run on this system so they can be shared between configure
15345 # scripts and configure runs, see configure's option --config-cache.
15346 # It is not useful on other systems. If it contains results you don't
15347 # want to keep, you may remove or edit it.
15349 # config.status only pays attention to the cache file if you give it
15350 # the --recheck option to rerun configure.
15352 # `ac_cv_env_foo' variables (set or unset) will be overriden when
15353 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15354 # following values.
15358 # The following way of writing the cache mishandles newlines in values,
15359 # but we know of no workaround that is simple, portable, and efficient.
15360 # So, don't put newlines in cache variables' values.
15361 # Ultrix sh set writes to stderr and can't be redirected directly,
15362 # and sets the high bit in the cache file unless we assign to the vars.
15365 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15367 # `set' does not quote correctly, so add quotes (double-quote
15368 # substitution turns \\\\ into \\, and sed turns \\ into \).
15371 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15374 # `set' quotes correctly as required by POSIX, so do not add quotes.
15376 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15383 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15385 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15387 if cmp -s $cache_file confcache; then :; else
15388 if test -w $cache_file; then
15389 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15390 cat confcache >$cache_file
15392 echo "not updating unwritable cache $cache_file"
15397 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15398 # Let make expand exec_prefix.
15399 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15401 # VPATH may cause trouble with some makes, so we remove $(srcdir),
15402 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15403 # trailing colons and then remove the whole line if VPATH becomes empty
15404 # (actually we leave an empty line to preserve line numbers).
15405 if test "x$srcdir" = x.; then
15406 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15407 s/:*\$(srcdir):*/:/;
15408 s/:*\${srcdir}:*/:/;
15410 s/^\([^=]*=[ ]*\):*/\1/;
15416 DEFS=-DHAVE_CONFIG_H
15418 : ${CONFIG_STATUS=./config.status}
15419 ac_clean_files_save=$ac_clean_files
15420 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15421 { echo "$as_me:15421: creating $CONFIG_STATUS" >&5
15422 echo "$as_me: creating $CONFIG_STATUS" >&6;}
15423 cat >$CONFIG_STATUS <<_ACEOF
15425 # Generated automatically by configure.
15426 # Run this file to recreate the current configuration.
15427 # Compiler output produced by configure, useful for debugging
15428 # configure, is in config.log if it exists.
15431 SHELL=\${CONFIG_SHELL-$SHELL}
15432 ac_cs_invocation="\$0 \$@"
15436 cat >>$CONFIG_STATUS <<\_ACEOF
15437 # Be Bourne compatible
15438 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15441 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15445 # Name of the executable.
15446 as_me=`echo "$0" |sed 's,.*[\\/],,'`
15448 if expr a : '\(a\)' >/dev/null 2>&1; then
15454 rm -f conf$$ conf$$.exe conf$$.file
15456 if ln -s conf$$.file conf$$ 2>/dev/null; then
15457 # We could just check for DJGPP; but this test a) works b) is more generic
15458 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
15459 if test -f conf$$.exe; then
15460 # Don't use ln at all; we don't have any links
15465 elif ln conf$$.file conf$$ 2>/dev/null; then
15470 rm -f conf$$ conf$$.exe conf$$.file
15472 as_executable_p="test -f"
15474 # Support unset when possible.
15475 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15482 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
15483 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
15484 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
15485 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
15486 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
15487 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
15488 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
15489 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
15492 # We need space, tab and new line, in precisely that order.
15498 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
15504 # Files that config.status was made for.
15505 if test -n "$ac_config_files"; then
15506 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15509 if test -n "$ac_config_headers"; then
15510 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15513 if test -n "$ac_config_links"; then
15514 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15517 if test -n "$ac_config_commands"; then
15518 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15521 cat >>$CONFIG_STATUS <<\EOF
15524 \`$as_me' instantiates files from templates according to the
15525 current configuration.
15527 Usage: $0 [OPTIONS] [FILE]...
15529 -h, --help print this help, then exit
15530 -V, --version print version number, then exit
15531 -d, --debug don't remove temporary files
15532 --recheck update $as_me by reconfiguring in the same conditions
15533 --file=FILE[:TEMPLATE]
15534 instantiate the configuration file FILE
15535 --header=FILE[:TEMPLATE]
15536 instantiate the configuration header FILE
15538 Configuration files:
15541 Configuration headers:
15544 Configuration commands:
15547 Report bugs to <dickey@invisible-island.net>."
15550 cat >>$CONFIG_STATUS <<EOF
15553 configured by $0, generated by GNU Autoconf 2.52.20170501,
15554 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15556 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
15557 Free Software Foundation, Inc.
15558 This config.status script is free software; the Free Software Foundation
15559 gives unlimited permission to copy, distribute and modify it."
15564 cat >>$CONFIG_STATUS <<\EOF
15565 # If no file are specified by the user, then we need to provide default
15566 # value. By we need to know if files were specified by the user.
15572 ac_option=`expr "x$1" : 'x\([^=]*\)='`
15573 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15575 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
15579 *) # This is not an option, so the user has probably given explicit
15581 ac_need_defaults=false;;
15585 # Handling of the options.
15587 cat >>$CONFIG_STATUS <<EOF
15588 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15589 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
15590 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
15592 cat >>$CONFIG_STATUS <<\EOF
15593 --version | --vers* | -V )
15594 echo "$ac_cs_version"; exit 0 ;;
15596 # Conflict between --help and --header
15597 { { echo "$as_me:15597: error: ambiguous option: $1
15598 Try \`$0 --help' for more information." >&5
15599 echo "$as_me: error: ambiguous option: $1
15600 Try \`$0 --help' for more information." >&2;}
15601 { (exit 1); exit 1; }; };;
15602 --help | --hel | -h )
15603 echo "$ac_cs_usage"; exit 0 ;;
15604 --debug | --d* | -d )
15606 --file | --fil | --fi | --f )
15608 CONFIG_FILES="$CONFIG_FILES $1"
15609 ac_need_defaults=false;;
15610 --header | --heade | --head | --hea )
15612 CONFIG_HEADERS="$CONFIG_HEADERS $1"
15613 ac_need_defaults=false;;
15615 # This is an error.
15616 -*) { { echo "$as_me:15616: error: unrecognized option: $1
15617 Try \`$0 --help' for more information." >&5
15618 echo "$as_me: error: unrecognized option: $1
15619 Try \`$0 --help' for more information." >&2;}
15620 { (exit 1); exit 1; }; } ;;
15622 *) ac_config_targets="$ac_config_targets $1" ;;
15631 ## ----------------------- ##
15632 ## Running config.status. ##
15633 ## ----------------------- ##
15635 This file was extended by $as_me 2.52.20170501, executed with
15636 CONFIG_FILES = $CONFIG_FILES
15637 CONFIG_HEADERS = $CONFIG_HEADERS
15638 CONFIG_LINKS = $CONFIG_LINKS
15639 CONFIG_COMMANDS = $CONFIG_COMMANDS
15640 > $ac_cs_invocation
15641 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15646 cat >>$CONFIG_STATUS <<EOF
15648 # INIT-COMMANDS section.
15651 ### Special initialization commands, used to pass information from the
15652 ### configuration-run into config.status
15655 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
15656 DFT_LWR_MODEL="$DFT_LWR_MODEL"
15657 LIB_NAME="$LIB_NAME"
15658 LIB_PREFIX="$LIB_PREFIX"
15659 LIB_SUFFIX="$LIB_SUFFIX"
15661 NCURSES_MAJOR="$NCURSES_MAJOR"
15662 NCURSES_MINOR="$NCURSES_MINOR"
15663 NCURSES_PATCH="$NCURSES_PATCH"
15664 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
15665 cf_cv_abi_version="$cf_cv_abi_version"
15666 cf_cv_rel_version="$cf_cv_rel_version"
15667 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
15668 cf_cv_shared_soname='$cf_cv_shared_soname'
15669 cf_cv_shlib_version="$cf_cv_shlib_version"
15670 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
15671 cf_cv_system_name="$cf_cv_system_name"
15677 cat >>$CONFIG_STATUS <<\EOF
15678 for ac_config_target in $ac_config_targets
15680 case "$ac_config_target" in
15681 # Handling of arguments.
15682 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
15683 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
15684 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15685 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15686 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
15687 *) { { echo "$as_me:15687: error: invalid argument: $ac_config_target" >&5
15688 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
15689 { (exit 1); exit 1; }; };;
15693 # If the user did not use the arguments to specify the items to instantiate,
15694 # then the envvar interface is used. Set only those that are not.
15695 # We use the long form for the default assignment because of an extremely
15696 # bizarre bug on SunOS 4.1.3.
15697 if $ac_need_defaults; then
15698 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15699 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15700 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15703 # Create a temporary directory, and hook for its removal unless debugging.
15706 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
15707 trap '{ (exit 1); exit 1; }' 1 2 13 15
15710 # Create a (secure) tmp directory for tmp files.
15713 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
15714 test -n "$tmp" && test -d "$tmp"
15717 tmp=$TMPDIR/cs$$-$RANDOM
15718 (umask 077 && mkdir $tmp)
15721 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
15722 { (exit 1); exit 1; }
15727 cat >>$CONFIG_STATUS <<EOF
15730 # CONFIG_FILES section.
15733 # No need to generate the scripts if there are no CONFIG_FILES.
15734 # This happens for instance when ./config.status config.h
15735 if test -n "\$CONFIG_FILES"; then
15736 # Protect against being on the right side of a sed subst in config.status.
15737 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
15738 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
15739 s,@SHELL@,$SHELL,;t t
15740 s,@exec_prefix@,$exec_prefix,;t t
15741 s,@prefix@,$prefix,;t t
15742 s,@program_transform_name@,$program_transform_name,;t t
15743 s,@bindir@,$bindir,;t t
15744 s,@sbindir@,$sbindir,;t t
15745 s,@libexecdir@,$libexecdir,;t t
15746 s,@datarootdir@,$datarootdir,;t t
15747 s,@datadir@,$datadir,;t t
15748 s,@sysconfdir@,$sysconfdir,;t t
15749 s,@sharedstatedir@,$sharedstatedir,;t t
15750 s,@localstatedir@,$localstatedir,;t t
15751 s,@libdir@,$libdir,;t t
15752 s,@includedir@,$includedir,;t t
15753 s,@oldincludedir@,$oldincludedir,;t t
15754 s,@infodir@,$infodir,;t t
15755 s,@mandir@,$mandir,;t t
15756 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
15757 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
15758 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
15759 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
15760 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
15761 s,@build_alias@,$build_alias,;t t
15762 s,@host_alias@,$host_alias,;t t
15763 s,@target_alias@,$target_alias,;t t
15764 s,@ECHO_C@,$ECHO_C,;t t
15765 s,@ECHO_N@,$ECHO_N,;t t
15766 s,@ECHO_T@,$ECHO_T,;t t
15767 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
15768 s,@DEFS@,$DEFS,;t t
15769 s,@LIBS@,$LIBS,;t t
15770 s,@top_builddir@,$top_builddir,;t t
15771 s,@build@,$build,;t t
15772 s,@build_cpu@,$build_cpu,;t t
15773 s,@build_vendor@,$build_vendor,;t t
15774 s,@build_os@,$build_os,;t t
15775 s,@host@,$host,;t t
15776 s,@host_cpu@,$host_cpu,;t t
15777 s,@host_vendor@,$host_vendor,;t t
15778 s,@host_os@,$host_os,;t t
15779 s,@target@,$target,;t t
15780 s,@target_cpu@,$target_cpu,;t t
15781 s,@target_vendor@,$target_vendor,;t t
15782 s,@target_os@,$target_os,;t t
15784 s,@CFLAGS@,$CFLAGS,;t t
15785 s,@LDFLAGS@,$LDFLAGS,;t t
15786 s,@CPPFLAGS@,$CPPFLAGS,;t t
15787 s,@ac_ct_CC@,$ac_ct_CC,;t t
15788 s,@EXEEXT@,$EXEEXT,;t t
15789 s,@OBJEXT@,$OBJEXT,;t t
15790 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
15793 s,@EGREP@,$EGREP,;t t
15794 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
15795 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
15796 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
15797 s,@LN_S@,$LN_S,;t t
15798 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
15799 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
15800 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
15801 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
15802 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
15803 s,@SET_MAKE@,$SET_MAKE,;t t
15804 s,@CTAGS@,$CTAGS,;t t
15805 s,@ETAGS@,$ETAGS,;t t
15806 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
15807 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
15808 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
15809 s,@RANLIB@,$RANLIB,;t t
15810 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
15812 s,@ac_ct_LD@,$ac_ct_LD,;t t
15814 s,@ac_ct_AR@,$ac_ct_AR,;t t
15815 s,@ARFLAGS@,$ARFLAGS,;t t
15816 s,@DESTDIR@,$DESTDIR,;t t
15817 s,@BUILD_CC@,$BUILD_CC,;t t
15818 s,@BUILD_CPP@,$BUILD_CPP,;t t
15819 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
15820 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
15821 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
15822 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
15823 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
15824 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
15825 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
15826 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
15827 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
15828 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
15829 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
15830 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
15831 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
15832 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
15833 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
15834 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
15835 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
15836 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
15837 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
15838 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
15839 s,@CC_G_OPT@,$CC_G_OPT,;t t
15840 s,@LD_MODEL@,$LD_MODEL,;t t
15841 s,@shlibdir@,$shlibdir,;t t
15842 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
15843 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
15844 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
15845 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
15846 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
15847 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
15848 s,@LINK_PROGS@,$LINK_PROGS,;t t
15849 s,@LINK_TESTS@,$LINK_TESTS,;t t
15850 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
15851 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
15852 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
15853 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
15854 s,@RPATH_LIST@,$RPATH_LIST,;t t
15855 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
15856 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
15857 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
15858 s,@PTHREAD@,$PTHREAD,;t t
15859 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
15860 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
15861 s,@ECHO_LT@,$ECHO_LT,;t t
15862 s,@ECHO_LD@,$ECHO_LD,;t t
15863 s,@RULE_CC@,$RULE_CC,;t t
15864 s,@SHOW_CC@,$SHOW_CC,;t t
15865 s,@ECHO_CC@,$ECHO_CC,;t t
15866 s,@ADAFLAGS@,$ADAFLAGS,;t t
15867 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
15868 s,@ADA_TRACE@,$ADA_TRACE,;t t
15869 s,@gnatmake_exists@,$gnatmake_exists,;t t
15870 s,@gprconfig_exists@,$gprconfig_exists,;t t
15871 s,@M4_exists@,$M4_exists,;t t
15872 s,@cf_ada_make@,$cf_ada_make,;t t
15873 s,@cf_ada_config@,$cf_ada_config,;t t
15874 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
15875 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
15876 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
15877 s,@cf_compile_generics@,$cf_compile_generics,;t t
15878 s,@cf_generic_objects@,$cf_generic_objects,;t t
15879 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
15880 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
15881 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
15882 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
15883 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
15884 s,@cf_ada_package@,$cf_ada_package,;t t
15885 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
15886 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
15887 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
15888 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
15889 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
15890 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
15891 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
15892 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
15893 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
15894 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
15895 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
15896 s,@TEST_ARG2@,$TEST_ARG2,;t t
15897 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
15898 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
15899 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
15900 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
15901 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
15902 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
15903 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
15908 cat >>$CONFIG_STATUS <<\EOF
15909 # Split the substitutions into bite-sized pieces for seds with
15910 # small command number limits, like on Digital OSF/1 and HP-UX.
15911 ac_max_sed_lines=48
15912 ac_sed_frag=1 # Number of current file.
15913 ac_beg=1 # First line for current file.
15914 ac_end=$ac_max_sed_lines # Line after last line for current file.
15917 while $ac_more_lines; do
15918 if test $ac_beg -gt 1; then
15919 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15921 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15923 if test ! -s $tmp/subs.frag; then
15924 ac_more_lines=false
15926 # The purpose of the label and of the branching condition is to
15927 # speed up the sed processing (if there are no `@' at all, there
15928 # is no need to browse any of the substitutions).
15929 # These are the two extra sed commands mentioned above.
15931 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
15932 # It is possible to make a multiline substitution using escaped newlines.
15933 # Ensure that we do not split the substitution between script fragments.
15935 ac_END=`expr $ac_end + $ac_max_sed_lines`
15936 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
15937 if test -s $tmp/subs.next; then
15938 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
15939 if test ! -s $tmp/subs.edit; then
15940 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
15941 if test ! -s $tmp/subs.edit; then
15942 if test $ac_beg -gt 1; then
15943 ac_end=`expr $ac_end - 1`
15950 if test -z "$ac_sed_cmds"; then
15951 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
15953 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
15955 ac_sed_frag=`expr $ac_sed_frag + 1`
15957 ac_end=`expr $ac_end + $ac_max_sed_lines`
15960 if test -z "$ac_sed_cmds"; then
15963 fi # test -n "$CONFIG_FILES"
15966 cat >>$CONFIG_STATUS <<\EOF
15967 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
15968 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15970 - | *:- | *:-:* ) # input from stdin
15972 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15973 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15974 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15975 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15976 * ) ac_file_in=$ac_file.in ;;
15979 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
15980 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15981 X"$ac_file" : 'X\(//\)[^/]' \| \
15982 X"$ac_file" : 'X\(//\)$' \| \
15983 X"$ac_file" : 'X\(/\)' \| \
15984 . : '\(.\)' 2>/dev/null ||
15986 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15987 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15988 /^X\(\/\/\)$/{ s//\1/; q; }
15989 /^X\(\/\).*/{ s//\1/; q; }
15991 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15992 { case "$ac_dir" in
15993 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
15997 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
15998 case $as_mkdir_dir in
15999 # Skip DOS drivespec
16000 ?:) as_incr_dir=$as_mkdir_dir ;;
16002 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16003 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16008 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16009 # A "../" for each directory in $ac_dir_suffix.
16010 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16012 ac_dir_suffix= ac_dots=
16017 if test -z "$ac_dots"; then
16020 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16022 [\\/]* | ?:[\\/]* )
16023 ac_srcdir=$srcdir$ac_dir_suffix;
16024 ac_top_srcdir=$srcdir ;;
16025 *) # Relative path.
16026 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16027 ac_top_srcdir=$ac_dots$srcdir ;;
16031 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16032 *) ac_INSTALL=$ac_dots$INSTALL ;;
16035 if test x"$ac_file" != x-; then
16036 { echo "$as_me:16036: creating $ac_file" >&5
16037 echo "$as_me: creating $ac_file" >&6;}
16040 # Let's still pretend it is `configure' which instantiates (i.e., don't
16041 # use $as_me), people would be surprised to read:
16042 # /* config.h. Generated automatically by config.status. */
16043 configure_input="Generated automatically from `echo $ac_file_in |
16044 sed 's,.*/,,'` by configure."
16046 # First look for the input files in the build tree, otherwise in the
16048 ac_file_inputs=`IFS=:
16049 for f in $ac_file_in; do
16051 -) echo $tmp/stdin ;;
16053 # Absolute (can't be DOS-style, as IFS=:)
16054 test -f "$f" || { { echo "$as_me:16054: error: cannot find input file: $f" >&5
16055 echo "$as_me: error: cannot find input file: $f" >&2;}
16056 { (exit 1); exit 1; }; }
16059 if test -f "$f"; then
16062 elif test -f "$srcdir/$f"; then
16067 { { echo "$as_me:16067: error: cannot find input file: $f" >&5
16068 echo "$as_me: error: cannot find input file: $f" >&2;}
16069 { (exit 1); exit 1; }; }
16072 done` || { (exit 1); exit 1; }
16074 cat >>$CONFIG_STATUS <<\EOF
16075 ac_warn_datarootdir=no
16076 if test x"$ac_file" != x-; then
16077 for ac_item in $ac_file_inputs
16079 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
16080 if test -n "$ac_seen"; then
16081 ac_used=`grep '@datarootdir@' $ac_item`
16082 if test -z "$ac_used"; then
16083 { echo "$as_me:16083: WARNING: datarootdir was used implicitly but not set:
16085 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
16087 ac_warn_datarootdir=yes
16090 ac_seen=`grep '${datarootdir}' $ac_item`
16091 if test -n "$ac_seen"; then
16092 { echo "$as_me:16092: WARNING: datarootdir was used explicitly but not set:
16094 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
16096 ac_warn_datarootdir=yes
16101 if test "x$ac_warn_datarootdir" = xyes; then
16102 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
16106 cat >>$CONFIG_STATUS <<EOF
16110 cat >>$CONFIG_STATUS <<\EOF
16112 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16113 s,@configure_input@,$configure_input,;t t
16114 s,@srcdir@,$ac_srcdir,;t t
16115 s,@top_srcdir@,$ac_top_srcdir,;t t
16116 s,@INSTALL@,$ac_INSTALL,;t t
16117 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16119 if test x"$ac_file" != x-; then
16120 cp $tmp/out $ac_file
16122 for ac_name in prefix exec_prefix datarootdir
16124 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
16125 if test -n "$ac_seen"; then
16126 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
16127 if test -z "$ac_init"; then
16128 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
16129 { echo "$as_me:16129: WARNING: Variable $ac_name is used but was not set:
16131 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
16136 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
16137 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
16138 if test -s $tmp/out; then
16139 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
16140 { echo "$as_me:16140: WARNING: Some variables may not be substituted:
16142 echo "$as_me: WARNING: Some variables may not be substituted:
16152 cat >>$CONFIG_STATUS <<\EOF
16155 # CONFIG_HEADER section.
16158 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16159 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16161 # ac_d sets the value in "#define NAME VALUE" lines.
16162 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16163 ac_dB='[ ].*$,\1#\2'
16166 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16167 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16168 ac_iB='\([ ]\),\1#\2define\3'
16171 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16172 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16173 ac_uB='$,\1#\2define\3'
16177 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
16178 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16180 - | *:- | *:-:* ) # input from stdin
16182 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16183 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16184 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16185 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16186 * ) ac_file_in=$ac_file.in ;;
16189 test x"$ac_file" != x- && { echo "$as_me:16189: creating $ac_file" >&5
16190 echo "$as_me: creating $ac_file" >&6;}
16192 # First look for the input files in the build tree, otherwise in the
16194 ac_file_inputs=`IFS=:
16195 for f in $ac_file_in; do
16197 -) echo $tmp/stdin ;;
16199 # Absolute (can't be DOS-style, as IFS=:)
16200 test -f "$f" || { { echo "$as_me:16200: error: cannot find input file: $f" >&5
16201 echo "$as_me: error: cannot find input file: $f" >&2;}
16202 { (exit 1); exit 1; }; }
16205 if test -f "$f"; then
16208 elif test -f "$srcdir/$f"; then
16213 { { echo "$as_me:16213: error: cannot find input file: $f" >&5
16214 echo "$as_me: error: cannot find input file: $f" >&2;}
16215 { (exit 1); exit 1; }; }
16218 done` || { (exit 1); exit 1; }
16219 # Remove the trailing spaces.
16220 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
16224 # Transform confdefs.h into a list of #define's. We won't use it as a sed
16225 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
16226 # be either 'cat' or 'sort'.
16227 cat confdefs.h | uniq >conftest.vals
16229 # Break up conftest.vals because some shells have a limit on
16230 # the size of here documents, and old seds have small limits too.
16232 rm -f conftest.tail
16233 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
16234 while grep . conftest.vals >/dev/null
16236 # Write chunks of a limited-size here document to conftest.frag.
16237 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
16238 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
16239 echo 'CEOF' >> $CONFIG_STATUS
16240 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16241 rm -f conftest.vals
16242 mv conftest.tail conftest.vals
16244 rm -f conftest.vals
16246 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
16248 echo ' cat >> conftest.edit <<CEOF
16249 /@DEFS@/r conftest.frag
16252 sed -f conftest.edit $tmp/in > $tmp/out
16254 mv $tmp/out $tmp/in
16255 rm -f conftest.edit conftest.frag
16256 ' >> $CONFIG_STATUS
16258 cat >>$CONFIG_STATUS <<\EOF
16259 # Let's still pretend it is `configure' which instantiates (i.e., don't
16260 # use $as_me), people would be surprised to read:
16261 # /* config.h. Generated automatically by config.status. */
16262 if test x"$ac_file" = x-; then
16263 echo "/* Generated automatically by configure. */" >$tmp/config.h
16265 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
16267 cat $tmp/in >>$tmp/config.h
16269 if test x"$ac_file" != x-; then
16270 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16271 { echo "$as_me:16271: $ac_file is unchanged" >&5
16272 echo "$as_me: $ac_file is unchanged" >&6;}
16274 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16275 X"$ac_file" : 'X\(//\)[^/]' \| \
16276 X"$ac_file" : 'X\(//\)$' \| \
16277 X"$ac_file" : 'X\(/\)' \| \
16278 . : '\(.\)' 2>/dev/null ||
16280 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16281 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16282 /^X\(\/\/\)$/{ s//\1/; q; }
16283 /^X\(\/\).*/{ s//\1/; q; }
16285 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16286 { case "$ac_dir" in
16287 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16291 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16292 case $as_mkdir_dir in
16293 # Skip DOS drivespec
16294 ?:) as_incr_dir=$as_mkdir_dir ;;
16296 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16297 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16304 mv $tmp/config.h $ac_file
16308 rm -f $tmp/config.h
16312 cat >>$CONFIG_STATUS <<\EOF
16314 # CONFIG_COMMANDS section.
16316 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16317 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16318 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16322 if test -z "$USE_OLD_MAKERULES" ; then
16323 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
16330 cat >>$CONFIG_STATUS <<\EOF
16332 { (exit 0); exit 0; }
16334 chmod +x $CONFIG_STATUS
16335 ac_clean_files=$ac_clean_files_save
16337 # configure is writing to config.log, and then calls config.status.
16338 # config.status does its own redirection, appending to config.log.
16339 # Unfortunately, on DOS this fails, as config.log is still kept open
16340 # by configure, so config.status won't be able to write to it; its
16341 # output is simply discarded. So we exec the FD to /dev/null,
16342 # effectively closing config.log, so it can be properly (re)opened and
16343 # appended to by config.status. When coming back to configure, we
16344 # need to make the FD available again.
16345 if test "$no_create" != yes; then
16348 $SHELL $CONFIG_STATUS || ac_cs_success=false
16350 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16351 # would make configure fail if this is the last instruction.
16352 $ac_cs_success || { (exit 1); exit 1; }
16354 ${MAKE:-make} preinstall