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
3783 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3784 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
3786 cat >conftest.$ac_ext <<_ACEOF
3787 #line 3787 "configure"
3788 #include "confdefs.h"
3798 rm -f conftest.$ac_objext
3799 if { (eval echo "$as_me:3799: \"$ac_compile\"") >&5
3800 (eval $ac_compile) 2>&5
3802 echo "$as_me:3802: \$? = $ac_status" >&5
3803 (exit $ac_status); } &&
3804 { ac_try='test -s conftest.$ac_objext'
3805 { (eval echo "$as_me:3805: \"$ac_try\"") >&5
3808 echo "$as_me:3808: \$? = $ac_status" >&5
3809 (exit $ac_status); }; }; then
3812 echo "$as_me: failed program was:" >&5
3813 cat conftest.$ac_ext >&5
3816 rm -f conftest.$ac_objext conftest.$ac_ext
3817 CPPFLAGS=$cf_save_CPPFLAGS
3822 if test "$cf_have_incdir" = no ; then
3823 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3825 echo "${as_me:-configure}:3825: testing adding $cf_add_incdir to include-path ..." 1>&5
3827 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3829 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3830 test "$cf_top_incdir" = "$cf_add_incdir" && break
3831 cf_add_incdir="$cf_top_incdir"
3842 if test -n "$cf_cv_curses_dir/lib" ; then
3843 for cf_add_libdir in $cf_cv_curses_dir/lib
3845 if test $cf_add_libdir = /usr/lib ; then
3847 elif test -d $cf_add_libdir
3850 if test -n "$LDFLAGS$LIBS" ; then
3851 # a loop is needed to ensure we can add subdirs of existing dirs
3852 for cf_test_libdir in $LDFLAGS $LIBS ; do
3853 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3854 cf_have_libdir=yes; break
3858 if test "$cf_have_libdir" = no ; then
3859 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
3861 echo "${as_me:-configure}:3861: testing adding $cf_add_libdir to library-path ..." 1>&5
3863 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3872 cf_ncuconfig_root=ncurses
3873 cf_have_ncuconfig=no
3875 if test "x${PKG_CONFIG:=none}" != xnone; then
3876 echo "$as_me:3876: checking pkg-config for $cf_ncuconfig_root" >&5
3877 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
3878 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
3879 echo "$as_me:3879: result: yes" >&5
3880 echo "${ECHO_T}yes" >&6
3882 echo "$as_me:3882: checking if the $cf_ncuconfig_root package files work" >&5
3883 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
3884 cf_have_ncuconfig=unknown
3886 cf_save_CPPFLAGS="$CPPFLAGS"
3887 cf_save_LIBS="$LIBS"
3892 cf_new_extra_cppflags=
3894 for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
3896 case $cf_fix_cppflags in
3898 case $cf_add_cflags in
3899 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3900 case $cf_add_cflags in
3902 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3904 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3905 && test -z "${cf_tst_cflags}" \
3906 && cf_fix_cppflags=yes
3908 if test $cf_fix_cppflags = yes ; then
3910 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3911 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3914 elif test "${cf_tst_cflags}" = "\"'" ; then
3916 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3917 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3927 case $cf_add_cflags in
3929 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3931 CPPFLAGS=`echo "$CPPFLAGS" | \
3932 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3933 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3938 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3939 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3946 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3947 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3954 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3955 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3957 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3959 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3960 && test -z "${cf_tst_cflags}" \
3961 && cf_fix_cppflags=no
3966 if test -n "$cf_new_cflags" ; then
3968 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3969 CFLAGS="${CFLAGS}$cf_new_cflags"
3973 if test -n "$cf_new_cppflags" ; then
3975 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3976 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3980 if test -n "$cf_new_extra_cppflags" ; then
3982 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3983 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3987 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
3988 # Filter out duplicates - this happens with badly-designed ".pc" files...
3989 for cf_add_1lib in $LIBS
3991 for cf_add_2lib in $cf_add_libs
3993 if test "x$cf_add_1lib" = "x$cf_add_2lib"
3999 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4003 cat >conftest.$ac_ext <<_ACEOF
4004 #line 4004 "configure"
4005 #include "confdefs.h"
4006 #include <${cf_cv_ncurses_header:-curses.h}>
4010 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
4015 rm -f conftest.$ac_objext conftest$ac_exeext
4016 if { (eval echo "$as_me:4016: \"$ac_link\"") >&5
4017 (eval $ac_link) 2>&5
4019 echo "$as_me:4019: \$? = $ac_status" >&5
4020 (exit $ac_status); } &&
4021 { ac_try='test -s conftest$ac_exeext'
4022 { (eval echo "$as_me:4022: \"$ac_try\"") >&5
4025 echo "$as_me:4025: \$? = $ac_status" >&5
4026 (exit $ac_status); }; }; then
4027 if test "$cross_compiling" = yes; then
4028 cf_have_ncuconfig=maybe
4030 cat >conftest.$ac_ext <<_ACEOF
4031 #line 4031 "configure"
4032 #include "confdefs.h"
4033 #include <${cf_cv_ncurses_header:-curses.h}>
4035 { char *xx = curses_version(); return (xx == 0); }
4037 rm -f conftest$ac_exeext
4038 if { (eval echo "$as_me:4038: \"$ac_link\"") >&5
4039 (eval $ac_link) 2>&5
4041 echo "$as_me:4041: \$? = $ac_status" >&5
4042 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4043 { (eval echo "$as_me:4043: \"$ac_try\"") >&5
4046 echo "$as_me:4046: \$? = $ac_status" >&5
4047 (exit $ac_status); }; }; then
4048 cf_have_ncuconfig=yes
4050 echo "$as_me: program exited with status $ac_status" >&5
4051 echo "$as_me: failed program was:" >&5
4052 cat conftest.$ac_ext >&5
4053 cf_have_ncuconfig=no
4055 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4058 echo "$as_me: failed program was:" >&5
4059 cat conftest.$ac_ext >&5
4060 cf_have_ncuconfig=no
4062 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4063 echo "$as_me:4063: result: $cf_have_ncuconfig" >&5
4064 echo "${ECHO_T}$cf_have_ncuconfig" >&6
4065 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
4066 if test "$cf_have_ncuconfig" != "yes"
4068 CPPFLAGS="$cf_save_CPPFLAGS"
4069 LIBS="$cf_save_LIBS"
4070 NCURSES_CONFIG_PKG=none
4073 cat >>confdefs.h <<\EOF
4077 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
4079 echo "$as_me:4079: checking for terminfo header" >&5
4080 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4081 if test "${cf_cv_term_header+set}" = set; then
4082 echo $ECHO_N "(cached) $ECHO_C" >&6
4085 case ${cf_cv_ncurses_header} in
4086 (*/ncurses.h|*/ncursesw.h)
4087 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4090 cf_term_header=term.h
4094 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4096 cat >conftest.$ac_ext <<_ACEOF
4097 #line 4097 "configure"
4098 #include "confdefs.h"
4100 #include <${cf_cv_ncurses_header:-curses.h}>
4106 int x = auto_left_margin
4111 rm -f conftest.$ac_objext
4112 if { (eval echo "$as_me:4112: \"$ac_compile\"") >&5
4113 (eval $ac_compile) 2>&5
4115 echo "$as_me:4115: \$? = $ac_status" >&5
4116 (exit $ac_status); } &&
4117 { ac_try='test -s conftest.$ac_objext'
4118 { (eval echo "$as_me:4118: \"$ac_try\"") >&5
4121 echo "$as_me:4121: \$? = $ac_status" >&5
4122 (exit $ac_status); }; }; then
4124 cf_cv_term_header="$cf_test"
4126 echo "$as_me: failed program was:" >&5
4127 cat conftest.$ac_ext >&5
4129 cf_cv_term_header=unknown
4132 rm -f conftest.$ac_objext conftest.$ac_ext
4133 test "$cf_cv_term_header" != unknown && break
4137 echo "$as_me:4137: result: $cf_cv_term_header" >&5
4138 echo "${ECHO_T}$cf_cv_term_header" >&6
4140 # Set definitions to allow ifdef'ing to accommodate subdirectories
4142 case $cf_cv_term_header in
4145 cat >>confdefs.h <<\EOF
4146 #define HAVE_TERM_H 1
4152 case $cf_cv_term_header in
4155 cat >>confdefs.h <<\EOF
4156 #define HAVE_NCURSES_TERM_H 1
4162 cat >>confdefs.h <<\EOF
4163 #define HAVE_NCURSESW_TERM_H 1
4172 echo "$as_me:4172: result: no" >&5
4173 echo "${ECHO_T}no" >&6
4174 NCURSES_CONFIG_PKG=none
4177 NCURSES_CONFIG_PKG=none
4180 if test "x$cf_have_ncuconfig" = "xno"; then
4181 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
4183 if test -n "$ac_tool_prefix"; then
4184 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4186 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4187 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4188 echo "$as_me:4188: checking for $ac_word" >&5
4189 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4190 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
4191 echo $ECHO_N "(cached) $ECHO_C" >&6
4193 if test -n "$NCURSES_CONFIG"; then
4194 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
4196 ac_save_IFS=$IFS; IFS=$ac_path_separator
4198 for ac_dir in $ac_dummy; do
4200 test -z "$ac_dir" && ac_dir=.
4201 $as_executable_p "$ac_dir/$ac_word" || continue
4202 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
4203 echo "$as_me:4203: found $ac_dir/$ac_word" >&5
4209 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
4210 if test -n "$NCURSES_CONFIG"; then
4211 echo "$as_me:4211: result: $NCURSES_CONFIG" >&5
4212 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4214 echo "$as_me:4214: result: no" >&5
4215 echo "${ECHO_T}no" >&6
4218 test -n "$NCURSES_CONFIG" && break
4221 if test -z "$NCURSES_CONFIG"; then
4222 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
4223 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4225 # Extract the first word of "$ac_prog", so it can be a program name with args.
4226 set dummy $ac_prog; ac_word=$2
4227 echo "$as_me:4227: checking for $ac_word" >&5
4228 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4229 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
4230 echo $ECHO_N "(cached) $ECHO_C" >&6
4232 if test -n "$ac_ct_NCURSES_CONFIG"; then
4233 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
4235 ac_save_IFS=$IFS; IFS=$ac_path_separator
4237 for ac_dir in $ac_dummy; do
4239 test -z "$ac_dir" && ac_dir=.
4240 $as_executable_p "$ac_dir/$ac_word" || continue
4241 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
4242 echo "$as_me:4242: found $ac_dir/$ac_word" >&5
4248 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
4249 if test -n "$ac_ct_NCURSES_CONFIG"; then
4250 echo "$as_me:4250: result: $ac_ct_NCURSES_CONFIG" >&5
4251 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
4253 echo "$as_me:4253: result: no" >&5
4254 echo "${ECHO_T}no" >&6
4257 test -n "$ac_ct_NCURSES_CONFIG" && break
4259 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
4261 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
4264 if test "$NCURSES_CONFIG" != none ; then
4269 cf_new_extra_cppflags=
4271 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
4273 case $cf_fix_cppflags in
4275 case $cf_add_cflags in
4276 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4277 case $cf_add_cflags in
4279 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4281 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4282 && test -z "${cf_tst_cflags}" \
4283 && cf_fix_cppflags=yes
4285 if test $cf_fix_cppflags = yes ; then
4287 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4288 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4291 elif test "${cf_tst_cflags}" = "\"'" ; then
4293 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4294 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4304 case $cf_add_cflags in
4306 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4308 CPPFLAGS=`echo "$CPPFLAGS" | \
4309 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4310 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4315 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4316 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4323 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4324 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4331 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4332 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4334 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4336 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4337 && test -z "${cf_tst_cflags}" \
4338 && cf_fix_cppflags=no
4343 if test -n "$cf_new_cflags" ; then
4345 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4346 CFLAGS="${CFLAGS}$cf_new_cflags"
4350 if test -n "$cf_new_cppflags" ; then
4352 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4353 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4357 if test -n "$cf_new_extra_cppflags" ; then
4359 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4360 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4364 cf_add_libs="`$NCURSES_CONFIG --libs`"
4365 # Filter out duplicates - this happens with badly-designed ".pc" files...
4366 for cf_add_1lib in $LIBS
4368 for cf_add_2lib in $cf_add_libs
4370 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4376 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4380 # even with config script, some packages use no-override for curses.h
4382 echo "$as_me:4382: checking if we have identified curses headers" >&5
4383 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4384 if test "${cf_cv_ncurses_header+set}" = set; then
4385 echo $ECHO_N "(cached) $ECHO_C" >&6
4388 cf_cv_ncurses_header=none
4390 ncurses.h ncurses/ncurses.h \
4391 curses.h ncurses/curses.h
4393 cat >conftest.$ac_ext <<_ACEOF
4394 #line 4394 "configure"
4395 #include "confdefs.h"
4396 #include <${cf_header}>
4400 initscr(); tgoto("?", 0,0)
4405 rm -f conftest.$ac_objext
4406 if { (eval echo "$as_me:4406: \"$ac_compile\"") >&5
4407 (eval $ac_compile) 2>&5
4409 echo "$as_me:4409: \$? = $ac_status" >&5
4410 (exit $ac_status); } &&
4411 { ac_try='test -s conftest.$ac_objext'
4412 { (eval echo "$as_me:4412: \"$ac_try\"") >&5
4415 echo "$as_me:4415: \$? = $ac_status" >&5
4416 (exit $ac_status); }; }; then
4417 cf_cv_ncurses_header=$cf_header; break
4419 echo "$as_me: failed program was:" >&5
4420 cat conftest.$ac_ext >&5
4422 rm -f conftest.$ac_objext conftest.$ac_ext
4426 echo "$as_me:4426: result: $cf_cv_ncurses_header" >&5
4427 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4429 if test "$cf_cv_ncurses_header" = none ; then
4430 { { echo "$as_me:4430: error: No curses header-files found" >&5
4431 echo "$as_me: error: No curses header-files found" >&2;}
4432 { (exit 1); exit 1; }; }
4435 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4437 for ac_header in $cf_cv_ncurses_header
4439 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4440 echo "$as_me:4440: checking for $ac_header" >&5
4441 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4442 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4443 echo $ECHO_N "(cached) $ECHO_C" >&6
4445 cat >conftest.$ac_ext <<_ACEOF
4446 #line 4446 "configure"
4447 #include "confdefs.h"
4448 #include <$ac_header>
4450 if { (eval echo "$as_me:4450: \"$ac_cpp conftest.$ac_ext\"") >&5
4451 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4453 egrep -v '^ *\+' conftest.er1 >conftest.err
4455 cat conftest.err >&5
4456 echo "$as_me:4456: \$? = $ac_status" >&5
4457 (exit $ac_status); } >/dev/null; then
4458 if test -s conftest.err; then
4459 ac_cpp_err=$ac_c_preproc_warn_flag
4466 if test -z "$ac_cpp_err"; then
4467 eval "$as_ac_Header=yes"
4469 echo "$as_me: failed program was:" >&5
4470 cat conftest.$ac_ext >&5
4471 eval "$as_ac_Header=no"
4473 rm -f conftest.err conftest.$ac_ext
4475 echo "$as_me:4475: result: `eval echo '${'$as_ac_Header'}'`" >&5
4476 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4477 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4478 cat >>confdefs.h <<EOF
4479 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4485 cat >>confdefs.h <<\EOF
4489 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4491 cat >>confdefs.h <<EOF
4492 #define $cf_nculib_ROOT 1
4495 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4499 cf_ncuhdr_root=ncurses
4501 test -n "$cf_cv_curses_dir" && \
4502 test "$cf_cv_curses_dir" != "no" && { \
4504 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4505 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4507 while test $cf_add_incdir != /usr/include
4509 if test -d $cf_add_incdir
4512 if test -n "$CFLAGS$CPPFLAGS" ; then
4513 # a loop is needed to ensure we can add subdirs of existing dirs
4514 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4515 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4516 cf_have_incdir=yes; break
4521 if test "$cf_have_incdir" = no ; then
4522 if test "$cf_add_incdir" = /usr/local/include ; then
4523 if test "$GCC" = yes
4525 cf_save_CPPFLAGS=$CPPFLAGS
4527 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4528 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4530 cat >conftest.$ac_ext <<_ACEOF
4531 #line 4531 "configure"
4532 #include "confdefs.h"
4542 rm -f conftest.$ac_objext
4543 if { (eval echo "$as_me:4543: \"$ac_compile\"") >&5
4544 (eval $ac_compile) 2>&5
4546 echo "$as_me:4546: \$? = $ac_status" >&5
4547 (exit $ac_status); } &&
4548 { ac_try='test -s conftest.$ac_objext'
4549 { (eval echo "$as_me:4549: \"$ac_try\"") >&5
4552 echo "$as_me:4552: \$? = $ac_status" >&5
4553 (exit $ac_status); }; }; then
4556 echo "$as_me: failed program was:" >&5
4557 cat conftest.$ac_ext >&5
4560 rm -f conftest.$ac_objext conftest.$ac_ext
4561 CPPFLAGS=$cf_save_CPPFLAGS
4566 if test "$cf_have_incdir" = no ; then
4567 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4569 echo "${as_me:-configure}:4569: testing adding $cf_add_incdir to include-path ..." 1>&5
4571 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4573 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4574 test "$cf_top_incdir" = "$cf_add_incdir" && break
4575 cf_add_incdir="$cf_top_incdir"
4588 echo "$as_me:4588: checking for $cf_ncuhdr_root header in include-path" >&5
4589 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4590 if test "${cf_cv_ncurses_h+set}" = set; then
4591 echo $ECHO_N "(cached) $ECHO_C" >&6
4594 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4595 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4596 for cf_header in $cf_header_list
4599 cat >conftest.$ac_ext <<_ACEOF
4600 #line 4600 "configure"
4601 #include "confdefs.h"
4603 #include <$cf_header>
4608 #ifdef NCURSES_VERSION
4610 printf("%s\n", NCURSES_VERSION);
4623 rm -f conftest.$ac_objext
4624 if { (eval echo "$as_me:4624: \"$ac_compile\"") >&5
4625 (eval $ac_compile) 2>&5
4627 echo "$as_me:4627: \$? = $ac_status" >&5
4628 (exit $ac_status); } &&
4629 { ac_try='test -s conftest.$ac_objext'
4630 { (eval echo "$as_me:4630: \"$ac_try\"") >&5
4633 echo "$as_me:4633: \$? = $ac_status" >&5
4634 (exit $ac_status); }; }; then
4635 cf_cv_ncurses_h=$cf_header
4638 echo "$as_me: failed program was:" >&5
4639 cat conftest.$ac_ext >&5
4642 rm -f conftest.$ac_objext conftest.$ac_ext
4644 test "$cf_cv_ncurses_h" != no && break
4648 echo "$as_me:4648: result: $cf_cv_ncurses_h" >&5
4649 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4651 if test "$cf_cv_ncurses_h" != no ; then
4652 cf_cv_ncurses_header=$cf_cv_ncurses_h
4655 echo "$as_me:4655: checking for $cf_ncuhdr_root include-path" >&5
4656 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4657 if test "${cf_cv_ncurses_h2+set}" = set; then
4658 echo $ECHO_N "(cached) $ECHO_C" >&6
4661 test -n "$verbose" && echo
4665 # collect the current set of include-directories from compiler flags
4666 cf_header_path_list=""
4667 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4668 for cf_header_path in $CPPFLAGS $CFLAGS
4670 case $cf_header_path in
4672 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4674 test "x$cf_header_path" != "xNONE" && \
4675 test -d "$cf_header_path" && \
4677 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
4678 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
4679 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4680 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4681 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4682 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"
4685 cf_header_path_list="$cf_header_path_list $cf_search"
4691 # add the variations for the package we are looking for
4695 test "x$prefix" != "xNONE" && \
4696 test -d "$prefix" && \
4698 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
4699 test -d $prefix/include && cf_search="$cf_search $prefix/include"
4700 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4701 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4702 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4703 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4706 for cf_subdir_prefix in \
4715 test "x$cf_subdir_prefix" != "x$prefix" && \
4716 test -d "$cf_subdir_prefix" && \
4717 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
4718 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
4719 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
4720 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
4721 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
4722 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
4723 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"
4728 test "$includedir" != NONE && \
4729 test "$includedir" != "/usr/include" && \
4730 test -d "$includedir" && {
4731 test -d $includedir && cf_search="$cf_search $includedir"
4732 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4735 test "$oldincludedir" != NONE && \
4736 test "$oldincludedir" != "/usr/include" && \
4737 test -d "$oldincludedir" && {
4738 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
4739 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4742 cf_search="$cf_search $cf_header_path_list"
4744 test -n "$verbose" && echo search path $cf_search
4745 cf_save2_CPPFLAGS="$CPPFLAGS"
4746 for cf_incdir in $cf_search
4749 if test -n "$cf_incdir" ; then
4750 for cf_add_incdir in $cf_incdir
4752 while test $cf_add_incdir != /usr/include
4754 if test -d $cf_add_incdir
4757 if test -n "$CFLAGS$CPPFLAGS" ; then
4758 # a loop is needed to ensure we can add subdirs of existing dirs
4759 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4760 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4761 cf_have_incdir=yes; break
4766 if test "$cf_have_incdir" = no ; then
4767 if test "$cf_add_incdir" = /usr/local/include ; then
4768 if test "$GCC" = yes
4770 cf_save_CPPFLAGS=$CPPFLAGS
4772 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4773 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4775 cat >conftest.$ac_ext <<_ACEOF
4776 #line 4776 "configure"
4777 #include "confdefs.h"
4787 rm -f conftest.$ac_objext
4788 if { (eval echo "$as_me:4788: \"$ac_compile\"") >&5
4789 (eval $ac_compile) 2>&5
4791 echo "$as_me:4791: \$? = $ac_status" >&5
4792 (exit $ac_status); } &&
4793 { ac_try='test -s conftest.$ac_objext'
4794 { (eval echo "$as_me:4794: \"$ac_try\"") >&5
4797 echo "$as_me:4797: \$? = $ac_status" >&5
4798 (exit $ac_status); }; }; then
4801 echo "$as_me: failed program was:" >&5
4802 cat conftest.$ac_ext >&5
4805 rm -f conftest.$ac_objext conftest.$ac_ext
4806 CPPFLAGS=$cf_save_CPPFLAGS
4811 if test "$cf_have_incdir" = no ; then
4812 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4814 echo "${as_me:-configure}:4814: testing adding $cf_add_incdir to include-path ..." 1>&5
4816 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4818 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4819 test "$cf_top_incdir" = "$cf_add_incdir" && break
4820 cf_add_incdir="$cf_top_incdir"
4836 cat >conftest.$ac_ext <<_ACEOF
4837 #line 4837 "configure"
4838 #include "confdefs.h"
4840 #include <$cf_header>
4845 #ifdef NCURSES_VERSION
4847 printf("%s\n", NCURSES_VERSION);
4860 rm -f conftest.$ac_objext
4861 if { (eval echo "$as_me:4861: \"$ac_compile\"") >&5
4862 (eval $ac_compile) 2>&5
4864 echo "$as_me:4864: \$? = $ac_status" >&5
4865 (exit $ac_status); } &&
4866 { ac_try='test -s conftest.$ac_objext'
4867 { (eval echo "$as_me:4867: \"$ac_try\"") >&5
4870 echo "$as_me:4870: \$? = $ac_status" >&5
4871 (exit $ac_status); }; }; then
4872 cf_cv_ncurses_h2=$cf_header
4875 echo "$as_me: failed program was:" >&5
4876 cat conftest.$ac_ext >&5
4879 rm -f conftest.$ac_objext conftest.$ac_ext
4881 if test "$cf_cv_ncurses_h2" != no ; then
4882 cf_cv_ncurses_h2=$cf_incdir/$cf_header
4883 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
4886 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
4888 CPPFLAGS="$cf_save2_CPPFLAGS"
4889 test "$cf_cv_ncurses_h2" != no && break
4891 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:4891: error: not found" >&5
4892 echo "$as_me: error: not found" >&2;}
4893 { (exit 1); exit 1; }; }
4896 echo "$as_me:4896: result: $cf_cv_ncurses_h2" >&5
4897 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
4899 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
4900 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
4901 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
4902 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
4905 if test -n "$cf_1st_incdir" ; then
4906 for cf_add_incdir in $cf_1st_incdir
4908 while test $cf_add_incdir != /usr/include
4910 if test -d $cf_add_incdir
4913 if test -n "$CFLAGS$CPPFLAGS" ; then
4914 # a loop is needed to ensure we can add subdirs of existing dirs
4915 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4916 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4917 cf_have_incdir=yes; break
4922 if test "$cf_have_incdir" = no ; then
4923 if test "$cf_add_incdir" = /usr/local/include ; then
4924 if test "$GCC" = yes
4926 cf_save_CPPFLAGS=$CPPFLAGS
4928 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4929 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4931 cat >conftest.$ac_ext <<_ACEOF
4932 #line 4932 "configure"
4933 #include "confdefs.h"
4943 rm -f conftest.$ac_objext
4944 if { (eval echo "$as_me:4944: \"$ac_compile\"") >&5
4945 (eval $ac_compile) 2>&5
4947 echo "$as_me:4947: \$? = $ac_status" >&5
4948 (exit $ac_status); } &&
4949 { ac_try='test -s conftest.$ac_objext'
4950 { (eval echo "$as_me:4950: \"$ac_try\"") >&5
4953 echo "$as_me:4953: \$? = $ac_status" >&5
4954 (exit $ac_status); }; }; then
4957 echo "$as_me: failed program was:" >&5
4958 cat conftest.$ac_ext >&5
4961 rm -f conftest.$ac_objext conftest.$ac_ext
4962 CPPFLAGS=$cf_save_CPPFLAGS
4967 if test "$cf_have_incdir" = no ; then
4968 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4970 echo "${as_me:-configure}:4970: testing adding $cf_add_incdir to include-path ..." 1>&5
4972 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4974 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4975 test "$cf_top_incdir" = "$cf_add_incdir" && break
4976 cf_add_incdir="$cf_top_incdir"
4989 # Set definitions to allow ifdef'ing for ncurses.h
4991 case $cf_cv_ncurses_header in
4994 cat >>confdefs.h <<\EOF
4995 #define HAVE_NCURSES_H 1
5001 case $cf_cv_ncurses_header in
5002 (ncurses/curses.h|ncurses/ncurses.h)
5004 cat >>confdefs.h <<\EOF
5005 #define HAVE_NCURSES_NCURSES_H 1
5009 (ncursesw/curses.h|ncursesw/ncurses.h)
5011 cat >>confdefs.h <<\EOF
5012 #define HAVE_NCURSESW_NCURSES_H 1
5018 echo "$as_me:5018: checking for terminfo header" >&5
5019 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5020 if test "${cf_cv_term_header+set}" = set; then
5021 echo $ECHO_N "(cached) $ECHO_C" >&6
5024 case ${cf_cv_ncurses_header} in
5025 (*/ncurses.h|*/ncursesw.h)
5026 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5029 cf_term_header=term.h
5033 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5035 cat >conftest.$ac_ext <<_ACEOF
5036 #line 5036 "configure"
5037 #include "confdefs.h"
5039 #include <${cf_cv_ncurses_header:-curses.h}>
5045 int x = auto_left_margin
5050 rm -f conftest.$ac_objext
5051 if { (eval echo "$as_me:5051: \"$ac_compile\"") >&5
5052 (eval $ac_compile) 2>&5
5054 echo "$as_me:5054: \$? = $ac_status" >&5
5055 (exit $ac_status); } &&
5056 { ac_try='test -s conftest.$ac_objext'
5057 { (eval echo "$as_me:5057: \"$ac_try\"") >&5
5060 echo "$as_me:5060: \$? = $ac_status" >&5
5061 (exit $ac_status); }; }; then
5063 cf_cv_term_header="$cf_test"
5065 echo "$as_me: failed program was:" >&5
5066 cat conftest.$ac_ext >&5
5068 cf_cv_term_header=unknown
5071 rm -f conftest.$ac_objext conftest.$ac_ext
5072 test "$cf_cv_term_header" != unknown && break
5076 echo "$as_me:5076: result: $cf_cv_term_header" >&5
5077 echo "${ECHO_T}$cf_cv_term_header" >&6
5079 # Set definitions to allow ifdef'ing to accommodate subdirectories
5081 case $cf_cv_term_header in
5084 cat >>confdefs.h <<\EOF
5085 #define HAVE_TERM_H 1
5091 case $cf_cv_term_header in
5094 cat >>confdefs.h <<\EOF
5095 #define HAVE_NCURSES_TERM_H 1
5101 cat >>confdefs.h <<\EOF
5102 #define HAVE_NCURSESW_TERM_H 1
5108 # some applications need this, but should check for NCURSES_VERSION
5110 cat >>confdefs.h <<\EOF
5114 echo "$as_me:5114: checking for ncurses version" >&5
5115 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5116 if test "${cf_cv_ncurses_version+set}" = set; then
5117 echo $ECHO_N "(cached) $ECHO_C" >&6
5120 cf_cv_ncurses_version=no
5123 if test "$cross_compiling" = yes; then
5125 # This will not work if the preprocessor splits the line after the
5126 # Autoconf token. The 'unproto' program does that.
5127 cat > conftest.$ac_ext <<EOF
5128 #include <${cf_cv_ncurses_header:-curses.h}>
5130 #ifdef NCURSES_VERSION
5131 Autoconf NCURSES_VERSION
5139 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5140 { (eval echo "$as_me:5140: \"$cf_try\"") >&5
5143 echo "$as_me:5143: \$? = $ac_status" >&5
5144 (exit $ac_status); }
5145 if test -f conftest.out ; then
5146 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5147 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5152 cat >conftest.$ac_ext <<_ACEOF
5153 #line 5153 "configure"
5154 #include "confdefs.h"
5156 #include <${cf_cv_ncurses_header:-curses.h}>
5160 FILE *fp = fopen("$cf_tempfile", "w");
5161 #ifdef NCURSES_VERSION
5162 # ifdef NCURSES_VERSION_PATCH
5163 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5165 fprintf(fp, "%s\n", NCURSES_VERSION);
5169 fprintf(fp, "old\n");
5174 ${cf_cv_main_return:-return}(0);
5177 rm -f conftest$ac_exeext
5178 if { (eval echo "$as_me:5178: \"$ac_link\"") >&5
5179 (eval $ac_link) 2>&5
5181 echo "$as_me:5181: \$? = $ac_status" >&5
5182 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5183 { (eval echo "$as_me:5183: \"$ac_try\"") >&5
5186 echo "$as_me:5186: \$? = $ac_status" >&5
5187 (exit $ac_status); }; }; then
5189 cf_cv_ncurses_version=`cat $cf_tempfile`
5191 echo "$as_me: program exited with status $ac_status" >&5
5192 echo "$as_me: failed program was:" >&5
5193 cat conftest.$ac_ext >&5
5195 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5200 echo "$as_me:5200: result: $cf_cv_ncurses_version" >&5
5201 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5202 test "$cf_cv_ncurses_version" = no ||
5203 cat >>confdefs.h <<\EOF
5207 cf_nculib_root=ncurses
5208 # This works, except for the special case where we find gpm, but
5209 # ncurses is in a nonstandard location via $LIBS, and we really want
5212 cf_ncurses_SAVE="$LIBS"
5213 echo "$as_me:5213: checking for Gpm_Open in -lgpm" >&5
5214 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5215 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5216 echo $ECHO_N "(cached) $ECHO_C" >&6
5218 ac_check_lib_save_LIBS=$LIBS
5220 cat >conftest.$ac_ext <<_ACEOF
5221 #line 5221 "configure"
5222 #include "confdefs.h"
5224 /* Override any gcc2 internal prototype to avoid an error. */
5228 /* We use char because int might match the return type of a gcc2
5229 builtin and then its argument prototype would still apply. */
5239 rm -f conftest.$ac_objext conftest$ac_exeext
5240 if { (eval echo "$as_me:5240: \"$ac_link\"") >&5
5241 (eval $ac_link) 2>&5
5243 echo "$as_me:5243: \$? = $ac_status" >&5
5244 (exit $ac_status); } &&
5245 { ac_try='test -s conftest$ac_exeext'
5246 { (eval echo "$as_me:5246: \"$ac_try\"") >&5
5249 echo "$as_me:5249: \$? = $ac_status" >&5
5250 (exit $ac_status); }; }; then
5251 ac_cv_lib_gpm_Gpm_Open=yes
5253 echo "$as_me: failed program was:" >&5
5254 cat conftest.$ac_ext >&5
5255 ac_cv_lib_gpm_Gpm_Open=no
5257 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5258 LIBS=$ac_check_lib_save_LIBS
5260 echo "$as_me:5260: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5261 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5262 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5263 echo "$as_me:5263: checking for initscr in -lgpm" >&5
5264 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5265 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5266 echo $ECHO_N "(cached) $ECHO_C" >&6
5268 ac_check_lib_save_LIBS=$LIBS
5270 cat >conftest.$ac_ext <<_ACEOF
5271 #line 5271 "configure"
5272 #include "confdefs.h"
5274 /* Override any gcc2 internal prototype to avoid an error. */
5278 /* We use char because int might match the return type of a gcc2
5279 builtin and then its argument prototype would still apply. */
5289 rm -f conftest.$ac_objext conftest$ac_exeext
5290 if { (eval echo "$as_me:5290: \"$ac_link\"") >&5
5291 (eval $ac_link) 2>&5
5293 echo "$as_me:5293: \$? = $ac_status" >&5
5294 (exit $ac_status); } &&
5295 { ac_try='test -s conftest$ac_exeext'
5296 { (eval echo "$as_me:5296: \"$ac_try\"") >&5
5299 echo "$as_me:5299: \$? = $ac_status" >&5
5300 (exit $ac_status); }; }; then
5301 ac_cv_lib_gpm_initscr=yes
5303 echo "$as_me: failed program was:" >&5
5304 cat conftest.$ac_ext >&5
5305 ac_cv_lib_gpm_initscr=no
5307 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5308 LIBS=$ac_check_lib_save_LIBS
5310 echo "$as_me:5310: result: $ac_cv_lib_gpm_initscr" >&5
5311 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
5312 if test $ac_cv_lib_gpm_initscr = yes; then
5313 LIBS="$cf_ncurses_SAVE"
5315 cf_ncurses_LIBS="-lgpm"
5322 # This is only necessary if you are linking against an obsolete
5323 # version of ncurses (but it should do no harm, since it's static).
5324 if test "$cf_nculib_root" = ncurses ; then
5325 echo "$as_me:5325: checking for tgoto in -lmytinfo" >&5
5326 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5327 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5328 echo $ECHO_N "(cached) $ECHO_C" >&6
5330 ac_check_lib_save_LIBS=$LIBS
5331 LIBS="-lmytinfo $LIBS"
5332 cat >conftest.$ac_ext <<_ACEOF
5333 #line 5333 "configure"
5334 #include "confdefs.h"
5336 /* Override any gcc2 internal prototype to avoid an error. */
5340 /* We use char because int might match the return type of a gcc2
5341 builtin and then its argument prototype would still apply. */
5351 rm -f conftest.$ac_objext conftest$ac_exeext
5352 if { (eval echo "$as_me:5352: \"$ac_link\"") >&5
5353 (eval $ac_link) 2>&5
5355 echo "$as_me:5355: \$? = $ac_status" >&5
5356 (exit $ac_status); } &&
5357 { ac_try='test -s conftest$ac_exeext'
5358 { (eval echo "$as_me:5358: \"$ac_try\"") >&5
5361 echo "$as_me:5361: \$? = $ac_status" >&5
5362 (exit $ac_status); }; }; then
5363 ac_cv_lib_mytinfo_tgoto=yes
5365 echo "$as_me: failed program was:" >&5
5366 cat conftest.$ac_ext >&5
5367 ac_cv_lib_mytinfo_tgoto=no
5369 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5370 LIBS=$ac_check_lib_save_LIBS
5372 echo "$as_me:5372: result: $ac_cv_lib_mytinfo_tgoto" >&5
5373 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5374 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5375 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5382 cf_add_libs="$cf_ncurses_LIBS"
5383 # Filter out duplicates - this happens with badly-designed ".pc" files...
5384 for cf_add_1lib in $LIBS
5386 for cf_add_2lib in $cf_add_libs
5388 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5394 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5398 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5401 cf_add_libs="-l$cf_nculib_root"
5402 # Filter out duplicates - this happens with badly-designed ".pc" files...
5403 for cf_add_1lib in $LIBS
5405 for cf_add_2lib in $cf_add_libs
5407 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5413 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5419 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5421 echo "$as_me:5421: checking for initscr" >&5
5422 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
5423 if test "${ac_cv_func_initscr+set}" = set; then
5424 echo $ECHO_N "(cached) $ECHO_C" >&6
5426 cat >conftest.$ac_ext <<_ACEOF
5427 #line 5427 "configure"
5428 #include "confdefs.h"
5429 /* System header to define __stub macros and hopefully few prototypes,
5430 which can conflict with char initscr (); below. */
5432 /* Override any gcc2 internal prototype to avoid an error. */
5436 /* We use char because int might match the return type of a gcc2
5437 builtin and then its argument prototype would still apply. */
5444 /* The GNU C library defines this for functions which it implements
5445 to always fail with ENOSYS. Some functions are actually named
5446 something starting with __ and the normal name is an alias. */
5447 #if defined (__stub_initscr) || defined (__stub___initscr)
5450 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5457 rm -f conftest.$ac_objext conftest$ac_exeext
5458 if { (eval echo "$as_me:5458: \"$ac_link\"") >&5
5459 (eval $ac_link) 2>&5
5461 echo "$as_me:5461: \$? = $ac_status" >&5
5462 (exit $ac_status); } &&
5463 { ac_try='test -s conftest$ac_exeext'
5464 { (eval echo "$as_me:5464: \"$ac_try\"") >&5
5467 echo "$as_me:5467: \$? = $ac_status" >&5
5468 (exit $ac_status); }; }; then
5469 ac_cv_func_initscr=yes
5471 echo "$as_me: failed program was:" >&5
5472 cat conftest.$ac_ext >&5
5473 ac_cv_func_initscr=no
5475 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5477 echo "$as_me:5477: result: $ac_cv_func_initscr" >&5
5478 echo "${ECHO_T}$ac_cv_func_initscr" >&6
5479 if test $ac_cv_func_initscr = yes; then
5480 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5483 cf_save_LIBS="$LIBS"
5484 echo "$as_me:5484: checking for initscr in -l$cf_nculib_root" >&5
5485 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
5486 LIBS="-l$cf_nculib_root $LIBS"
5487 cat >conftest.$ac_ext <<_ACEOF
5488 #line 5488 "configure"
5489 #include "confdefs.h"
5490 #include <${cf_cv_ncurses_header:-curses.h}>
5499 rm -f conftest.$ac_objext conftest$ac_exeext
5500 if { (eval echo "$as_me:5500: \"$ac_link\"") >&5
5501 (eval $ac_link) 2>&5
5503 echo "$as_me:5503: \$? = $ac_status" >&5
5504 (exit $ac_status); } &&
5505 { ac_try='test -s conftest$ac_exeext'
5506 { (eval echo "$as_me:5506: \"$ac_try\"") >&5
5509 echo "$as_me:5509: \$? = $ac_status" >&5
5510 (exit $ac_status); }; }; then
5511 echo "$as_me:5511: result: yes" >&5
5512 echo "${ECHO_T}yes" >&6
5513 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5516 echo "$as_me: failed program was:" >&5
5517 cat conftest.$ac_ext >&5
5518 echo "$as_me:5518: result: no" >&5
5519 echo "${ECHO_T}no" >&6
5522 cf_library_path_list=""
5523 if test -n "${LDFLAGS}${LIBS}" ; then
5524 for cf_library_path in $LDFLAGS $LIBS
5526 case $cf_library_path in
5528 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5530 test "x$cf_library_path" != "xNONE" && \
5531 test -d "$cf_library_path" && \
5533 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
5534 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
5535 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5536 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5537 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5538 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"
5541 cf_library_path_list="$cf_library_path_list $cf_search"
5549 test "x$prefix" != "xNONE" && \
5550 test -d "$prefix" && \
5552 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5553 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5554 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5555 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5556 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5557 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5560 for cf_subdir_prefix in \
5569 test "x$cf_subdir_prefix" != "x$prefix" && \
5570 test -d "$cf_subdir_prefix" && \
5571 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5572 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
5573 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
5574 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
5575 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
5576 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
5577 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"
5582 cf_search="$cf_library_path_list $cf_search"
5584 for cf_libdir in $cf_search
5586 echo "$as_me:5586: checking for -l$cf_nculib_root in $cf_libdir" >&5
5587 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5588 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5589 cat >conftest.$ac_ext <<_ACEOF
5590 #line 5590 "configure"
5591 #include "confdefs.h"
5592 #include <${cf_cv_ncurses_header:-curses.h}>
5601 rm -f conftest.$ac_objext conftest$ac_exeext
5602 if { (eval echo "$as_me:5602: \"$ac_link\"") >&5
5603 (eval $ac_link) 2>&5
5605 echo "$as_me:5605: \$? = $ac_status" >&5
5606 (exit $ac_status); } &&
5607 { ac_try='test -s conftest$ac_exeext'
5608 { (eval echo "$as_me:5608: \"$ac_try\"") >&5
5611 echo "$as_me:5611: \$? = $ac_status" >&5
5612 (exit $ac_status); }; }; then
5613 echo "$as_me:5613: result: yes" >&5
5614 echo "${ECHO_T}yes" >&6
5615 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5618 echo "$as_me: failed program was:" >&5
5619 cat conftest.$ac_ext >&5
5620 echo "$as_me:5620: result: no" >&5
5621 echo "${ECHO_T}no" >&6
5622 LIBS="$cf_save_LIBS"
5624 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5628 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5632 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5634 if test $cf_found_library = no ; then
5635 { { echo "$as_me:5635: error: Cannot link $cf_nculib_root library" >&5
5636 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5637 { (exit 1); exit 1; }; }
5642 if test -n "$cf_ncurses_LIBS" ; then
5643 echo "$as_me:5643: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5644 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5645 cf_ncurses_SAVE="$LIBS"
5646 for p in $cf_ncurses_LIBS ; do
5647 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5648 if test "$q" != "$LIBS" ; then
5652 cat >conftest.$ac_ext <<_ACEOF
5653 #line 5653 "configure"
5654 #include "confdefs.h"
5655 #include <${cf_cv_ncurses_header:-curses.h}>
5659 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5664 rm -f conftest.$ac_objext conftest$ac_exeext
5665 if { (eval echo "$as_me:5665: \"$ac_link\"") >&5
5666 (eval $ac_link) 2>&5
5668 echo "$as_me:5668: \$? = $ac_status" >&5
5669 (exit $ac_status); } &&
5670 { ac_try='test -s conftest$ac_exeext'
5671 { (eval echo "$as_me:5671: \"$ac_try\"") >&5
5674 echo "$as_me:5674: \$? = $ac_status" >&5
5675 (exit $ac_status); }; }; then
5676 echo "$as_me:5676: result: yes" >&5
5677 echo "${ECHO_T}yes" >&6
5679 echo "$as_me: failed program was:" >&5
5680 cat conftest.$ac_ext >&5
5681 echo "$as_me:5681: result: no" >&5
5682 echo "${ECHO_T}no" >&6
5683 LIBS="$cf_ncurses_SAVE"
5685 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5688 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5690 cat >>confdefs.h <<EOF
5691 #define $cf_nculib_ROOT 1
5699 echo "$as_me:5699: checking if you want wide-character code" >&5
5700 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
5702 # Check whether --enable-widec or --disable-widec was given.
5703 if test "${enable_widec+set}" = set; then
5704 enableval="$enable_widec"
5705 with_widec=$enableval
5709 echo "$as_me:5709: result: $with_widec" >&5
5710 echo "${ECHO_T}$with_widec" >&6
5711 if test "$with_widec" = yes ; then
5713 echo "$as_me:5713: checking for multibyte character support" >&5
5714 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
5715 if test "${cf_cv_utf8_lib+set}" = set; then
5716 echo $ECHO_N "(cached) $ECHO_C" >&6
5719 cf_save_LIBS="$LIBS"
5720 cat >conftest.$ac_ext <<_ACEOF
5721 #line 5721 "configure"
5722 #include "confdefs.h"
5733 rm -f conftest.$ac_objext conftest$ac_exeext
5734 if { (eval echo "$as_me:5734: \"$ac_link\"") >&5
5735 (eval $ac_link) 2>&5
5737 echo "$as_me:5737: \$? = $ac_status" >&5
5738 (exit $ac_status); } &&
5739 { ac_try='test -s conftest$ac_exeext'
5740 { (eval echo "$as_me:5740: \"$ac_try\"") >&5
5743 echo "$as_me:5743: \$? = $ac_status" >&5
5744 (exit $ac_status); }; }; then
5747 echo "$as_me: failed program was:" >&5
5748 cat conftest.$ac_ext >&5
5750 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
5751 # will be set on completion of the AC_TRY_LINK below.
5752 cf_cv_header_path_utf8=
5753 cf_cv_library_path_utf8=
5755 echo "${as_me:-configure}:5755: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
5757 cf_save_LIBS="$LIBS"
5759 cat >conftest.$ac_ext <<_ACEOF
5760 #line 5760 "configure"
5761 #include "confdefs.h"
5763 #include <libutf8.h>
5772 rm -f conftest.$ac_objext conftest$ac_exeext
5773 if { (eval echo "$as_me:5773: \"$ac_link\"") >&5
5774 (eval $ac_link) 2>&5
5776 echo "$as_me:5776: \$? = $ac_status" >&5
5777 (exit $ac_status); } &&
5778 { ac_try='test -s conftest$ac_exeext'
5779 { (eval echo "$as_me:5779: \"$ac_try\"") >&5
5782 echo "$as_me:5782: \$? = $ac_status" >&5
5783 (exit $ac_status); }; }; then
5785 cf_cv_find_linkage_utf8=yes
5786 cf_cv_header_path_utf8=/usr/include
5787 cf_cv_library_path_utf8=/usr/lib
5790 echo "$as_me: failed program was:" >&5
5791 cat conftest.$ac_ext >&5
5793 LIBS="-lutf8 $cf_save_LIBS"
5795 cat >conftest.$ac_ext <<_ACEOF
5796 #line 5796 "configure"
5797 #include "confdefs.h"
5799 #include <libutf8.h>
5808 rm -f conftest.$ac_objext conftest$ac_exeext
5809 if { (eval echo "$as_me:5809: \"$ac_link\"") >&5
5810 (eval $ac_link) 2>&5
5812 echo "$as_me:5812: \$? = $ac_status" >&5
5813 (exit $ac_status); } &&
5814 { ac_try='test -s conftest$ac_exeext'
5815 { (eval echo "$as_me:5815: \"$ac_try\"") >&5
5818 echo "$as_me:5818: \$? = $ac_status" >&5
5819 (exit $ac_status); }; }; then
5821 cf_cv_find_linkage_utf8=yes
5822 cf_cv_header_path_utf8=/usr/include
5823 cf_cv_library_path_utf8=/usr/lib
5824 cf_cv_library_file_utf8="-lutf8"
5827 echo "$as_me: failed program was:" >&5
5828 cat conftest.$ac_ext >&5
5830 cf_cv_find_linkage_utf8=no
5831 LIBS="$cf_save_LIBS"
5833 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
5835 echo "${as_me:-configure}:5835: testing find linkage for utf8 library ..." 1>&5
5837 echo "${as_me:-configure}:5837: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
5839 cf_save_CPPFLAGS="$CPPFLAGS"
5840 cf_test_CPPFLAGS="$CPPFLAGS"
5844 # collect the current set of include-directories from compiler flags
5845 cf_header_path_list=""
5846 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5847 for cf_header_path in $CPPFLAGS $CFLAGS
5849 case $cf_header_path in
5851 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5853 test "x$cf_header_path" != "xNONE" && \
5854 test -d "$cf_header_path" && \
5856 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5857 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5858 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
5859 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
5860 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
5861 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
5864 cf_header_path_list="$cf_header_path_list $cf_search"
5870 # add the variations for the package we are looking for
5874 test "x$prefix" != "xNONE" && \
5875 test -d "$prefix" && \
5877 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5878 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5879 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
5880 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
5881 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
5882 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
5885 for cf_subdir_prefix in \
5894 test "x$cf_subdir_prefix" != "x$prefix" && \
5895 test -d "$cf_subdir_prefix" && \
5896 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5897 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5898 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
5899 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
5900 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
5901 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
5902 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
5907 test "$includedir" != NONE && \
5908 test "$includedir" != "/usr/include" && \
5909 test -d "$includedir" && {
5910 test -d $includedir && cf_search="$cf_search $includedir"
5911 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
5914 test "$oldincludedir" != NONE && \
5915 test "$oldincludedir" != "/usr/include" && \
5916 test -d "$oldincludedir" && {
5917 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5918 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
5921 cf_search="$cf_search $cf_header_path_list"
5923 for cf_cv_header_path_utf8 in $cf_search
5925 if test -d $cf_cv_header_path_utf8 ; then
5926 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
5928 echo "${as_me:-configure}:5928: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
5930 CPPFLAGS="$cf_save_CPPFLAGS"
5932 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5933 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
5935 cat >conftest.$ac_ext <<_ACEOF
5936 #line 5936 "configure"
5937 #include "confdefs.h"
5939 #include <libutf8.h>
5948 rm -f conftest.$ac_objext
5949 if { (eval echo "$as_me:5949: \"$ac_compile\"") >&5
5950 (eval $ac_compile) 2>&5
5952 echo "$as_me:5952: \$? = $ac_status" >&5
5953 (exit $ac_status); } &&
5954 { ac_try='test -s conftest.$ac_objext'
5955 { (eval echo "$as_me:5955: \"$ac_try\"") >&5
5958 echo "$as_me:5958: \$? = $ac_status" >&5
5959 (exit $ac_status); }; }; then
5961 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
5963 echo "${as_me:-configure}:5963: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
5965 cf_cv_find_linkage_utf8=maybe
5966 cf_test_CPPFLAGS="$CPPFLAGS"
5969 echo "$as_me: failed program was:" >&5
5970 cat conftest.$ac_ext >&5
5972 CPPFLAGS="$cf_save_CPPFLAGS"
5975 rm -f conftest.$ac_objext conftest.$ac_ext
5979 if test "$cf_cv_find_linkage_utf8" = maybe ; then
5981 echo "${as_me:-configure}:5981: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
5983 cf_save_LIBS="$LIBS"
5984 cf_save_LDFLAGS="$LDFLAGS"
5986 if test "$cf_cv_find_linkage_utf8" != yes ; then
5989 cf_library_path_list=""
5990 if test -n "${LDFLAGS}${LIBS}" ; then
5991 for cf_library_path in $LDFLAGS $LIBS
5993 case $cf_library_path in
5995 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5997 test "x$cf_library_path" != "xNONE" && \
5998 test -d "$cf_library_path" && \
6000 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6001 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6002 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
6003 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6004 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
6005 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6008 cf_library_path_list="$cf_library_path_list $cf_search"
6016 test "x$prefix" != "xNONE" && \
6017 test -d "$prefix" && \
6019 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6020 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6021 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
6022 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
6023 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
6024 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
6027 for cf_subdir_prefix in \
6036 test "x$cf_subdir_prefix" != "x$prefix" && \
6037 test -d "$cf_subdir_prefix" && \
6038 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6039 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6040 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
6041 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6042 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6043 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6044 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6049 cf_search="$cf_library_path_list $cf_search"
6051 for cf_cv_library_path_utf8 in $cf_search
6053 if test -d $cf_cv_library_path_utf8 ; then
6054 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6056 echo "${as_me:-configure}:6056: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6058 CPPFLAGS="$cf_test_CPPFLAGS"
6059 LIBS="-lutf8 $cf_save_LIBS"
6060 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6061 cat >conftest.$ac_ext <<_ACEOF
6062 #line 6062 "configure"
6063 #include "confdefs.h"
6065 #include <libutf8.h>
6074 rm -f conftest.$ac_objext conftest$ac_exeext
6075 if { (eval echo "$as_me:6075: \"$ac_link\"") >&5
6076 (eval $ac_link) 2>&5
6078 echo "$as_me:6078: \$? = $ac_status" >&5
6079 (exit $ac_status); } &&
6080 { ac_try='test -s conftest$ac_exeext'
6081 { (eval echo "$as_me:6081: \"$ac_try\"") >&5
6084 echo "$as_me:6084: \$? = $ac_status" >&5
6085 (exit $ac_status); }; }; then
6087 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
6089 echo "${as_me:-configure}:6089: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
6091 cf_cv_find_linkage_utf8=yes
6092 cf_cv_library_file_utf8="-lutf8"
6095 echo "$as_me: failed program was:" >&5
6096 cat conftest.$ac_ext >&5
6098 CPPFLAGS="$cf_save_CPPFLAGS"
6099 LIBS="$cf_save_LIBS"
6100 LDFLAGS="$cf_save_LDFLAGS"
6103 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6106 CPPFLAGS="$cf_save_CPPFLAGS"
6107 LDFLAGS="$cf_save_LDFLAGS"
6111 cf_cv_find_linkage_utf8=no
6115 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6118 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6120 LIBS="$cf_save_LIBS"
6122 if test "$cf_cv_find_linkage_utf8" = yes ; then
6123 cf_cv_utf8_lib=add-on
6129 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6131 echo "$as_me:6131: result: $cf_cv_utf8_lib" >&5
6132 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
6134 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
6136 if test "$cf_cv_utf8_lib" = "add-on" ; then
6138 cat >>confdefs.h <<\EOF
6139 #define HAVE_LIBUTF8_H 1
6142 if test -n "$cf_cv_header_path_utf8" ; then
6143 for cf_add_incdir in $cf_cv_header_path_utf8
6145 while test $cf_add_incdir != /usr/include
6147 if test -d $cf_add_incdir
6150 if test -n "$CFLAGS$CPPFLAGS" ; then
6151 # a loop is needed to ensure we can add subdirs of existing dirs
6152 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6153 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6154 cf_have_incdir=yes; break
6159 if test "$cf_have_incdir" = no ; then
6160 if test "$cf_add_incdir" = /usr/local/include ; then
6161 if test "$GCC" = yes
6163 cf_save_CPPFLAGS=$CPPFLAGS
6165 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6166 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6168 cat >conftest.$ac_ext <<_ACEOF
6169 #line 6169 "configure"
6170 #include "confdefs.h"
6180 rm -f conftest.$ac_objext
6181 if { (eval echo "$as_me:6181: \"$ac_compile\"") >&5
6182 (eval $ac_compile) 2>&5
6184 echo "$as_me:6184: \$? = $ac_status" >&5
6185 (exit $ac_status); } &&
6186 { ac_try='test -s conftest.$ac_objext'
6187 { (eval echo "$as_me:6187: \"$ac_try\"") >&5
6190 echo "$as_me:6190: \$? = $ac_status" >&5
6191 (exit $ac_status); }; }; then
6194 echo "$as_me: failed program was:" >&5
6195 cat conftest.$ac_ext >&5
6198 rm -f conftest.$ac_objext conftest.$ac_ext
6199 CPPFLAGS=$cf_save_CPPFLAGS
6204 if test "$cf_have_incdir" = no ; then
6205 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6207 echo "${as_me:-configure}:6207: testing adding $cf_add_incdir to include-path ..." 1>&5
6209 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6211 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6212 test "$cf_top_incdir" = "$cf_add_incdir" && break
6213 cf_add_incdir="$cf_top_incdir"
6224 if test -n "$cf_cv_library_path_utf8" ; then
6225 for cf_add_libdir in $cf_cv_library_path_utf8
6227 if test $cf_add_libdir = /usr/lib ; then
6229 elif test -d $cf_add_libdir
6232 if test -n "$LDFLAGS$LIBS" ; then
6233 # a loop is needed to ensure we can add subdirs of existing dirs
6234 for cf_test_libdir in $LDFLAGS $LIBS ; do
6235 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6236 cf_have_libdir=yes; break
6240 if test "$cf_have_libdir" = no ; then
6241 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6243 echo "${as_me:-configure}:6243: testing adding $cf_add_libdir to library-path ..." 1>&5
6245 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6251 cf_add_libs="$cf_cv_library_file_utf8"
6252 # Filter out duplicates - this happens with badly-designed ".pc" files...
6253 for cf_add_1lib in $LIBS
6255 for cf_add_2lib in $cf_add_libs
6257 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6263 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6269 cf_ncuconfig_root=ncursesw
6270 cf_have_ncuconfig=no
6272 if test "x${PKG_CONFIG:=none}" != xnone; then
6273 echo "$as_me:6273: checking pkg-config for $cf_ncuconfig_root" >&5
6274 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
6275 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
6276 echo "$as_me:6276: result: yes" >&5
6277 echo "${ECHO_T}yes" >&6
6279 echo "$as_me:6279: checking if the $cf_ncuconfig_root package files work" >&5
6280 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
6281 cf_have_ncuconfig=unknown
6283 cf_save_CPPFLAGS="$CPPFLAGS"
6284 cf_save_LIBS="$LIBS"
6289 cf_new_extra_cppflags=
6291 for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
6293 case $cf_fix_cppflags in
6295 case $cf_add_cflags in
6296 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
6297 case $cf_add_cflags in
6299 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6301 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6302 && test -z "${cf_tst_cflags}" \
6303 && cf_fix_cppflags=yes
6305 if test $cf_fix_cppflags = yes ; then
6307 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6308 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6311 elif test "${cf_tst_cflags}" = "\"'" ; then
6313 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6314 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6324 case $cf_add_cflags in
6326 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6328 CPPFLAGS=`echo "$CPPFLAGS" | \
6329 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
6330 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
6335 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
6336 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
6343 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
6344 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
6351 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6352 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6354 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
6356 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6357 && test -z "${cf_tst_cflags}" \
6358 && cf_fix_cppflags=no
6363 if test -n "$cf_new_cflags" ; then
6365 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
6366 CFLAGS="${CFLAGS}$cf_new_cflags"
6370 if test -n "$cf_new_cppflags" ; then
6372 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6373 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
6377 if test -n "$cf_new_extra_cppflags" ; then
6379 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
6380 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
6384 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
6385 # Filter out duplicates - this happens with badly-designed ".pc" files...
6386 for cf_add_1lib in $LIBS
6388 for cf_add_2lib in $cf_add_libs
6390 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6396 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6400 cat >conftest.$ac_ext <<_ACEOF
6401 #line 6401 "configure"
6402 #include "confdefs.h"
6403 #include <${cf_cv_ncurses_header:-curses.h}>
6407 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6412 rm -f conftest.$ac_objext conftest$ac_exeext
6413 if { (eval echo "$as_me:6413: \"$ac_link\"") >&5
6414 (eval $ac_link) 2>&5
6416 echo "$as_me:6416: \$? = $ac_status" >&5
6417 (exit $ac_status); } &&
6418 { ac_try='test -s conftest$ac_exeext'
6419 { (eval echo "$as_me:6419: \"$ac_try\"") >&5
6422 echo "$as_me:6422: \$? = $ac_status" >&5
6423 (exit $ac_status); }; }; then
6424 if test "$cross_compiling" = yes; then
6425 cf_have_ncuconfig=maybe
6427 cat >conftest.$ac_ext <<_ACEOF
6428 #line 6428 "configure"
6429 #include "confdefs.h"
6430 #include <${cf_cv_ncurses_header:-curses.h}>
6432 { char *xx = curses_version(); return (xx == 0); }
6434 rm -f conftest$ac_exeext
6435 if { (eval echo "$as_me:6435: \"$ac_link\"") >&5
6436 (eval $ac_link) 2>&5
6438 echo "$as_me:6438: \$? = $ac_status" >&5
6439 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6440 { (eval echo "$as_me:6440: \"$ac_try\"") >&5
6443 echo "$as_me:6443: \$? = $ac_status" >&5
6444 (exit $ac_status); }; }; then
6445 cf_have_ncuconfig=yes
6447 echo "$as_me: program exited with status $ac_status" >&5
6448 echo "$as_me: failed program was:" >&5
6449 cat conftest.$ac_ext >&5
6450 cf_have_ncuconfig=no
6452 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6455 echo "$as_me: failed program was:" >&5
6456 cat conftest.$ac_ext >&5
6457 cf_have_ncuconfig=no
6459 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6460 echo "$as_me:6460: result: $cf_have_ncuconfig" >&5
6461 echo "${ECHO_T}$cf_have_ncuconfig" >&6
6462 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
6463 if test "$cf_have_ncuconfig" != "yes"
6465 CPPFLAGS="$cf_save_CPPFLAGS"
6466 LIBS="$cf_save_LIBS"
6467 NCURSES_CONFIG_PKG=none
6470 cat >>confdefs.h <<\EOF
6474 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
6476 echo "$as_me:6476: checking for terminfo header" >&5
6477 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6478 if test "${cf_cv_term_header+set}" = set; then
6479 echo $ECHO_N "(cached) $ECHO_C" >&6
6482 case ${cf_cv_ncurses_header} in
6483 (*/ncurses.h|*/ncursesw.h)
6484 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6487 cf_term_header=term.h
6491 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6493 cat >conftest.$ac_ext <<_ACEOF
6494 #line 6494 "configure"
6495 #include "confdefs.h"
6497 #include <${cf_cv_ncurses_header:-curses.h}>
6503 int x = auto_left_margin
6508 rm -f conftest.$ac_objext
6509 if { (eval echo "$as_me:6509: \"$ac_compile\"") >&5
6510 (eval $ac_compile) 2>&5
6512 echo "$as_me:6512: \$? = $ac_status" >&5
6513 (exit $ac_status); } &&
6514 { ac_try='test -s conftest.$ac_objext'
6515 { (eval echo "$as_me:6515: \"$ac_try\"") >&5
6518 echo "$as_me:6518: \$? = $ac_status" >&5
6519 (exit $ac_status); }; }; then
6521 cf_cv_term_header="$cf_test"
6523 echo "$as_me: failed program was:" >&5
6524 cat conftest.$ac_ext >&5
6526 cf_cv_term_header=unknown
6529 rm -f conftest.$ac_objext conftest.$ac_ext
6530 test "$cf_cv_term_header" != unknown && break
6534 echo "$as_me:6534: result: $cf_cv_term_header" >&5
6535 echo "${ECHO_T}$cf_cv_term_header" >&6
6537 # Set definitions to allow ifdef'ing to accommodate subdirectories
6539 case $cf_cv_term_header in
6542 cat >>confdefs.h <<\EOF
6543 #define HAVE_TERM_H 1
6549 case $cf_cv_term_header in
6552 cat >>confdefs.h <<\EOF
6553 #define HAVE_NCURSES_TERM_H 1
6559 cat >>confdefs.h <<\EOF
6560 #define HAVE_NCURSESW_TERM_H 1
6569 echo "$as_me:6569: result: no" >&5
6570 echo "${ECHO_T}no" >&6
6571 NCURSES_CONFIG_PKG=none
6574 NCURSES_CONFIG_PKG=none
6577 if test "x$cf_have_ncuconfig" = "xno"; then
6578 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
6580 if test -n "$ac_tool_prefix"; then
6581 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6583 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6584 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6585 echo "$as_me:6585: checking for $ac_word" >&5
6586 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6587 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
6588 echo $ECHO_N "(cached) $ECHO_C" >&6
6590 if test -n "$NCURSES_CONFIG"; then
6591 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
6593 ac_save_IFS=$IFS; IFS=$ac_path_separator
6595 for ac_dir in $ac_dummy; do
6597 test -z "$ac_dir" && ac_dir=.
6598 $as_executable_p "$ac_dir/$ac_word" || continue
6599 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
6600 echo "$as_me:6600: found $ac_dir/$ac_word" >&5
6606 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
6607 if test -n "$NCURSES_CONFIG"; then
6608 echo "$as_me:6608: result: $NCURSES_CONFIG" >&5
6609 echo "${ECHO_T}$NCURSES_CONFIG" >&6
6611 echo "$as_me:6611: result: no" >&5
6612 echo "${ECHO_T}no" >&6
6615 test -n "$NCURSES_CONFIG" && break
6618 if test -z "$NCURSES_CONFIG"; then
6619 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
6620 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6622 # Extract the first word of "$ac_prog", so it can be a program name with args.
6623 set dummy $ac_prog; ac_word=$2
6624 echo "$as_me:6624: checking for $ac_word" >&5
6625 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6626 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
6627 echo $ECHO_N "(cached) $ECHO_C" >&6
6629 if test -n "$ac_ct_NCURSES_CONFIG"; then
6630 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
6632 ac_save_IFS=$IFS; IFS=$ac_path_separator
6634 for ac_dir in $ac_dummy; do
6636 test -z "$ac_dir" && ac_dir=.
6637 $as_executable_p "$ac_dir/$ac_word" || continue
6638 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
6639 echo "$as_me:6639: found $ac_dir/$ac_word" >&5
6645 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
6646 if test -n "$ac_ct_NCURSES_CONFIG"; then
6647 echo "$as_me:6647: result: $ac_ct_NCURSES_CONFIG" >&5
6648 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
6650 echo "$as_me:6650: result: no" >&5
6651 echo "${ECHO_T}no" >&6
6654 test -n "$ac_ct_NCURSES_CONFIG" && break
6656 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
6658 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
6661 if test "$NCURSES_CONFIG" != none ; then
6666 cf_new_extra_cppflags=
6668 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
6670 case $cf_fix_cppflags in
6672 case $cf_add_cflags in
6673 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
6674 case $cf_add_cflags in
6676 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6678 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6679 && test -z "${cf_tst_cflags}" \
6680 && cf_fix_cppflags=yes
6682 if test $cf_fix_cppflags = yes ; then
6684 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6685 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6688 elif test "${cf_tst_cflags}" = "\"'" ; then
6690 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6691 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6701 case $cf_add_cflags in
6703 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6705 CPPFLAGS=`echo "$CPPFLAGS" | \
6706 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
6707 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
6712 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
6713 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
6720 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
6721 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
6728 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6729 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6731 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
6733 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6734 && test -z "${cf_tst_cflags}" \
6735 && cf_fix_cppflags=no
6740 if test -n "$cf_new_cflags" ; then
6742 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
6743 CFLAGS="${CFLAGS}$cf_new_cflags"
6747 if test -n "$cf_new_cppflags" ; then
6749 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6750 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
6754 if test -n "$cf_new_extra_cppflags" ; then
6756 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
6757 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
6761 cf_add_libs="`$NCURSES_CONFIG --libs`"
6762 # Filter out duplicates - this happens with badly-designed ".pc" files...
6763 for cf_add_1lib in $LIBS
6765 for cf_add_2lib in $cf_add_libs
6767 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6773 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6777 # even with config script, some packages use no-override for curses.h
6779 echo "$as_me:6779: checking if we have identified curses headers" >&5
6780 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6781 if test "${cf_cv_ncurses_header+set}" = set; then
6782 echo $ECHO_N "(cached) $ECHO_C" >&6
6785 cf_cv_ncurses_header=none
6787 ncurses.h ncursesw/ncurses.h \
6788 curses.h ncursesw/curses.h
6790 cat >conftest.$ac_ext <<_ACEOF
6791 #line 6791 "configure"
6792 #include "confdefs.h"
6793 #include <${cf_header}>
6797 initscr(); tgoto("?", 0,0)
6802 rm -f conftest.$ac_objext
6803 if { (eval echo "$as_me:6803: \"$ac_compile\"") >&5
6804 (eval $ac_compile) 2>&5
6806 echo "$as_me:6806: \$? = $ac_status" >&5
6807 (exit $ac_status); } &&
6808 { ac_try='test -s conftest.$ac_objext'
6809 { (eval echo "$as_me:6809: \"$ac_try\"") >&5
6812 echo "$as_me:6812: \$? = $ac_status" >&5
6813 (exit $ac_status); }; }; then
6814 cf_cv_ncurses_header=$cf_header; break
6816 echo "$as_me: failed program was:" >&5
6817 cat conftest.$ac_ext >&5
6819 rm -f conftest.$ac_objext conftest.$ac_ext
6823 echo "$as_me:6823: result: $cf_cv_ncurses_header" >&5
6824 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6826 if test "$cf_cv_ncurses_header" = none ; then
6827 { { echo "$as_me:6827: error: No curses header-files found" >&5
6828 echo "$as_me: error: No curses header-files found" >&2;}
6829 { (exit 1); exit 1; }; }
6832 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6834 for ac_header in $cf_cv_ncurses_header
6836 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6837 echo "$as_me:6837: checking for $ac_header" >&5
6838 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6839 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6840 echo $ECHO_N "(cached) $ECHO_C" >&6
6842 cat >conftest.$ac_ext <<_ACEOF
6843 #line 6843 "configure"
6844 #include "confdefs.h"
6845 #include <$ac_header>
6847 if { (eval echo "$as_me:6847: \"$ac_cpp conftest.$ac_ext\"") >&5
6848 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6850 egrep -v '^ *\+' conftest.er1 >conftest.err
6852 cat conftest.err >&5
6853 echo "$as_me:6853: \$? = $ac_status" >&5
6854 (exit $ac_status); } >/dev/null; then
6855 if test -s conftest.err; then
6856 ac_cpp_err=$ac_c_preproc_warn_flag
6863 if test -z "$ac_cpp_err"; then
6864 eval "$as_ac_Header=yes"
6866 echo "$as_me: failed program was:" >&5
6867 cat conftest.$ac_ext >&5
6868 eval "$as_ac_Header=no"
6870 rm -f conftest.err conftest.$ac_ext
6872 echo "$as_me:6872: result: `eval echo '${'$as_ac_Header'}'`" >&5
6873 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6874 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6875 cat >>confdefs.h <<EOF
6876 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6882 cat >>confdefs.h <<\EOF
6886 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6888 cat >>confdefs.h <<EOF
6889 #define $cf_nculib_ROOT 1
6892 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6896 cf_ncuhdr_root=ncursesw
6898 test -n "$cf_cv_curses_dir" && \
6899 test "$cf_cv_curses_dir" != "no" && { \
6901 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6902 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
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
6924 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6925 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6927 cat >conftest.$ac_ext <<_ACEOF
6928 #line 6928 "configure"
6929 #include "confdefs.h"
6939 rm -f conftest.$ac_objext
6940 if { (eval echo "$as_me:6940: \"$ac_compile\"") >&5
6941 (eval $ac_compile) 2>&5
6943 echo "$as_me:6943: \$? = $ac_status" >&5
6944 (exit $ac_status); } &&
6945 { ac_try='test -s conftest.$ac_objext'
6946 { (eval echo "$as_me:6946: \"$ac_try\"") >&5
6949 echo "$as_me:6949: \$? = $ac_status" >&5
6950 (exit $ac_status); }; }; then
6953 echo "$as_me: failed program was:" >&5
6954 cat conftest.$ac_ext >&5
6957 rm -f conftest.$ac_objext conftest.$ac_ext
6958 CPPFLAGS=$cf_save_CPPFLAGS
6963 if test "$cf_have_incdir" = no ; then
6964 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6966 echo "${as_me:-configure}:6966: testing adding $cf_add_incdir to include-path ..." 1>&5
6968 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6970 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6971 test "$cf_top_incdir" = "$cf_add_incdir" && break
6972 cf_add_incdir="$cf_top_incdir"
6985 echo "$as_me:6985: checking for $cf_ncuhdr_root header in include-path" >&5
6986 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6987 if test "${cf_cv_ncurses_h+set}" = set; then
6988 echo $ECHO_N "(cached) $ECHO_C" >&6
6991 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6992 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6993 for cf_header in $cf_header_list
6996 cat >conftest.$ac_ext <<_ACEOF
6997 #line 6997 "configure"
6998 #include "confdefs.h"
7000 #define _XOPEN_SOURCE_EXTENDED
7001 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
7002 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
7004 #include <$cf_header>
7009 #ifdef NCURSES_VERSION
7015 printf("%s\n", NCURSES_VERSION);
7028 rm -f conftest.$ac_objext
7029 if { (eval echo "$as_me:7029: \"$ac_compile\"") >&5
7030 (eval $ac_compile) 2>&5
7032 echo "$as_me:7032: \$? = $ac_status" >&5
7033 (exit $ac_status); } &&
7034 { ac_try='test -s conftest.$ac_objext'
7035 { (eval echo "$as_me:7035: \"$ac_try\"") >&5
7038 echo "$as_me:7038: \$? = $ac_status" >&5
7039 (exit $ac_status); }; }; then
7040 cf_cv_ncurses_h=$cf_header
7043 echo "$as_me: failed program was:" >&5
7044 cat conftest.$ac_ext >&5
7047 rm -f conftest.$ac_objext conftest.$ac_ext
7049 test "$cf_cv_ncurses_h" != no && break
7053 echo "$as_me:7053: result: $cf_cv_ncurses_h" >&5
7054 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
7056 if test "$cf_cv_ncurses_h" != no ; then
7057 cf_cv_ncurses_header=$cf_cv_ncurses_h
7060 echo "$as_me:7060: checking for $cf_ncuhdr_root include-path" >&5
7061 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
7062 if test "${cf_cv_ncurses_h2+set}" = set; then
7063 echo $ECHO_N "(cached) $ECHO_C" >&6
7066 test -n "$verbose" && echo
7070 # collect the current set of include-directories from compiler flags
7071 cf_header_path_list=""
7072 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7073 for cf_header_path in $CPPFLAGS $CFLAGS
7075 case $cf_header_path in
7077 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7079 test "x$cf_header_path" != "xNONE" && \
7080 test -d "$cf_header_path" && \
7082 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7083 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7084 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
7085 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
7086 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
7087 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"
7090 cf_header_path_list="$cf_header_path_list $cf_search"
7096 # add the variations for the package we are looking for
7100 test "x$prefix" != "xNONE" && \
7101 test -d "$prefix" && \
7103 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7104 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7105 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
7106 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
7107 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
7108 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7111 for cf_subdir_prefix in \
7120 test "x$cf_subdir_prefix" != "x$prefix" && \
7121 test -d "$cf_subdir_prefix" && \
7122 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7123 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7124 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
7125 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
7126 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
7127 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
7128 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"
7133 test "$includedir" != NONE && \
7134 test "$includedir" != "/usr/include" && \
7135 test -d "$includedir" && {
7136 test -d $includedir && cf_search="$cf_search $includedir"
7137 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
7140 test "$oldincludedir" != NONE && \
7141 test "$oldincludedir" != "/usr/include" && \
7142 test -d "$oldincludedir" && {
7143 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7144 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
7147 cf_search="$cf_search $cf_header_path_list"
7149 test -n "$verbose" && echo search path $cf_search
7150 cf_save2_CPPFLAGS="$CPPFLAGS"
7151 for cf_incdir in $cf_search
7154 if test -n "$cf_incdir" ; then
7155 for cf_add_incdir in $cf_incdir
7157 while test $cf_add_incdir != /usr/include
7159 if test -d $cf_add_incdir
7162 if test -n "$CFLAGS$CPPFLAGS" ; then
7163 # a loop is needed to ensure we can add subdirs of existing dirs
7164 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7165 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7166 cf_have_incdir=yes; break
7171 if test "$cf_have_incdir" = no ; then
7172 if test "$cf_add_incdir" = /usr/local/include ; then
7173 if test "$GCC" = yes
7175 cf_save_CPPFLAGS=$CPPFLAGS
7177 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7178 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7180 cat >conftest.$ac_ext <<_ACEOF
7181 #line 7181 "configure"
7182 #include "confdefs.h"
7192 rm -f conftest.$ac_objext
7193 if { (eval echo "$as_me:7193: \"$ac_compile\"") >&5
7194 (eval $ac_compile) 2>&5
7196 echo "$as_me:7196: \$? = $ac_status" >&5
7197 (exit $ac_status); } &&
7198 { ac_try='test -s conftest.$ac_objext'
7199 { (eval echo "$as_me:7199: \"$ac_try\"") >&5
7202 echo "$as_me:7202: \$? = $ac_status" >&5
7203 (exit $ac_status); }; }; then
7206 echo "$as_me: failed program was:" >&5
7207 cat conftest.$ac_ext >&5
7210 rm -f conftest.$ac_objext conftest.$ac_ext
7211 CPPFLAGS=$cf_save_CPPFLAGS
7216 if test "$cf_have_incdir" = no ; then
7217 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7219 echo "${as_me:-configure}:7219: testing adding $cf_add_incdir to include-path ..." 1>&5
7221 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7223 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7224 test "$cf_top_incdir" = "$cf_add_incdir" && break
7225 cf_add_incdir="$cf_top_incdir"
7241 cat >conftest.$ac_ext <<_ACEOF
7242 #line 7242 "configure"
7243 #include "confdefs.h"
7245 #include <$cf_header>
7250 #ifdef NCURSES_VERSION
7252 printf("%s\n", NCURSES_VERSION);
7265 rm -f conftest.$ac_objext
7266 if { (eval echo "$as_me:7266: \"$ac_compile\"") >&5
7267 (eval $ac_compile) 2>&5
7269 echo "$as_me:7269: \$? = $ac_status" >&5
7270 (exit $ac_status); } &&
7271 { ac_try='test -s conftest.$ac_objext'
7272 { (eval echo "$as_me:7272: \"$ac_try\"") >&5
7275 echo "$as_me:7275: \$? = $ac_status" >&5
7276 (exit $ac_status); }; }; then
7277 cf_cv_ncurses_h2=$cf_header
7280 echo "$as_me: failed program was:" >&5
7281 cat conftest.$ac_ext >&5
7284 rm -f conftest.$ac_objext conftest.$ac_ext
7286 if test "$cf_cv_ncurses_h2" != no ; then
7287 cf_cv_ncurses_h2=$cf_incdir/$cf_header
7288 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
7291 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
7293 CPPFLAGS="$cf_save2_CPPFLAGS"
7294 test "$cf_cv_ncurses_h2" != no && break
7296 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:7296: error: not found" >&5
7297 echo "$as_me: error: not found" >&2;}
7298 { (exit 1); exit 1; }; }
7301 echo "$as_me:7301: result: $cf_cv_ncurses_h2" >&5
7302 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
7304 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
7305 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
7306 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
7307 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
7310 if test -n "$cf_1st_incdir" ; then
7311 for cf_add_incdir in $cf_1st_incdir
7313 while test $cf_add_incdir != /usr/include
7315 if test -d $cf_add_incdir
7318 if test -n "$CFLAGS$CPPFLAGS" ; then
7319 # a loop is needed to ensure we can add subdirs of existing dirs
7320 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7321 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7322 cf_have_incdir=yes; break
7327 if test "$cf_have_incdir" = no ; then
7328 if test "$cf_add_incdir" = /usr/local/include ; then
7329 if test "$GCC" = yes
7331 cf_save_CPPFLAGS=$CPPFLAGS
7333 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7334 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7336 cat >conftest.$ac_ext <<_ACEOF
7337 #line 7337 "configure"
7338 #include "confdefs.h"
7348 rm -f conftest.$ac_objext
7349 if { (eval echo "$as_me:7349: \"$ac_compile\"") >&5
7350 (eval $ac_compile) 2>&5
7352 echo "$as_me:7352: \$? = $ac_status" >&5
7353 (exit $ac_status); } &&
7354 { ac_try='test -s conftest.$ac_objext'
7355 { (eval echo "$as_me:7355: \"$ac_try\"") >&5
7358 echo "$as_me:7358: \$? = $ac_status" >&5
7359 (exit $ac_status); }; }; then
7362 echo "$as_me: failed program was:" >&5
7363 cat conftest.$ac_ext >&5
7366 rm -f conftest.$ac_objext conftest.$ac_ext
7367 CPPFLAGS=$cf_save_CPPFLAGS
7372 if test "$cf_have_incdir" = no ; then
7373 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7375 echo "${as_me:-configure}:7375: testing adding $cf_add_incdir to include-path ..." 1>&5
7377 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7379 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7380 test "$cf_top_incdir" = "$cf_add_incdir" && break
7381 cf_add_incdir="$cf_top_incdir"
7394 # Set definitions to allow ifdef'ing for ncurses.h
7396 case $cf_cv_ncurses_header in
7399 cat >>confdefs.h <<\EOF
7400 #define HAVE_NCURSES_H 1
7406 case $cf_cv_ncurses_header in
7407 (ncurses/curses.h|ncurses/ncurses.h)
7409 cat >>confdefs.h <<\EOF
7410 #define HAVE_NCURSES_NCURSES_H 1
7414 (ncursesw/curses.h|ncursesw/ncurses.h)
7416 cat >>confdefs.h <<\EOF
7417 #define HAVE_NCURSESW_NCURSES_H 1
7423 echo "$as_me:7423: checking for terminfo header" >&5
7424 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7425 if test "${cf_cv_term_header+set}" = set; then
7426 echo $ECHO_N "(cached) $ECHO_C" >&6
7429 case ${cf_cv_ncurses_header} in
7430 (*/ncurses.h|*/ncursesw.h)
7431 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7434 cf_term_header=term.h
7438 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7440 cat >conftest.$ac_ext <<_ACEOF
7441 #line 7441 "configure"
7442 #include "confdefs.h"
7444 #include <${cf_cv_ncurses_header:-curses.h}>
7450 int x = auto_left_margin
7455 rm -f conftest.$ac_objext
7456 if { (eval echo "$as_me:7456: \"$ac_compile\"") >&5
7457 (eval $ac_compile) 2>&5
7459 echo "$as_me:7459: \$? = $ac_status" >&5
7460 (exit $ac_status); } &&
7461 { ac_try='test -s conftest.$ac_objext'
7462 { (eval echo "$as_me:7462: \"$ac_try\"") >&5
7465 echo "$as_me:7465: \$? = $ac_status" >&5
7466 (exit $ac_status); }; }; then
7468 cf_cv_term_header="$cf_test"
7470 echo "$as_me: failed program was:" >&5
7471 cat conftest.$ac_ext >&5
7473 cf_cv_term_header=unknown
7476 rm -f conftest.$ac_objext conftest.$ac_ext
7477 test "$cf_cv_term_header" != unknown && break
7481 echo "$as_me:7481: result: $cf_cv_term_header" >&5
7482 echo "${ECHO_T}$cf_cv_term_header" >&6
7484 # Set definitions to allow ifdef'ing to accommodate subdirectories
7486 case $cf_cv_term_header in
7489 cat >>confdefs.h <<\EOF
7490 #define HAVE_TERM_H 1
7496 case $cf_cv_term_header in
7499 cat >>confdefs.h <<\EOF
7500 #define HAVE_NCURSES_TERM_H 1
7506 cat >>confdefs.h <<\EOF
7507 #define HAVE_NCURSESW_TERM_H 1
7513 # some applications need this, but should check for NCURSES_VERSION
7515 cat >>confdefs.h <<\EOF
7519 echo "$as_me:7519: checking for ncurses version" >&5
7520 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
7521 if test "${cf_cv_ncurses_version+set}" = set; then
7522 echo $ECHO_N "(cached) $ECHO_C" >&6
7525 cf_cv_ncurses_version=no
7528 if test "$cross_compiling" = yes; then
7530 # This will not work if the preprocessor splits the line after the
7531 # Autoconf token. The 'unproto' program does that.
7532 cat > conftest.$ac_ext <<EOF
7533 #include <${cf_cv_ncurses_header:-curses.h}>
7535 #ifdef NCURSES_VERSION
7536 Autoconf NCURSES_VERSION
7544 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
7545 { (eval echo "$as_me:7545: \"$cf_try\"") >&5
7548 echo "$as_me:7548: \$? = $ac_status" >&5
7549 (exit $ac_status); }
7550 if test -f conftest.out ; then
7551 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
7552 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
7557 cat >conftest.$ac_ext <<_ACEOF
7558 #line 7558 "configure"
7559 #include "confdefs.h"
7561 #include <${cf_cv_ncurses_header:-curses.h}>
7565 FILE *fp = fopen("$cf_tempfile", "w");
7566 #ifdef NCURSES_VERSION
7567 # ifdef NCURSES_VERSION_PATCH
7568 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
7570 fprintf(fp, "%s\n", NCURSES_VERSION);
7574 fprintf(fp, "old\n");
7579 ${cf_cv_main_return:-return}(0);
7582 rm -f conftest$ac_exeext
7583 if { (eval echo "$as_me:7583: \"$ac_link\"") >&5
7584 (eval $ac_link) 2>&5
7586 echo "$as_me:7586: \$? = $ac_status" >&5
7587 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7588 { (eval echo "$as_me:7588: \"$ac_try\"") >&5
7591 echo "$as_me:7591: \$? = $ac_status" >&5
7592 (exit $ac_status); }; }; then
7594 cf_cv_ncurses_version=`cat $cf_tempfile`
7596 echo "$as_me: program exited with status $ac_status" >&5
7597 echo "$as_me: failed program was:" >&5
7598 cat conftest.$ac_ext >&5
7600 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7605 echo "$as_me:7605: result: $cf_cv_ncurses_version" >&5
7606 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
7607 test "$cf_cv_ncurses_version" = no ||
7608 cat >>confdefs.h <<\EOF
7612 cf_nculib_root=ncursesw
7613 # This works, except for the special case where we find gpm, but
7614 # ncurses is in a nonstandard location via $LIBS, and we really want
7617 cf_ncurses_SAVE="$LIBS"
7618 echo "$as_me:7618: checking for Gpm_Open in -lgpm" >&5
7619 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7620 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7621 echo $ECHO_N "(cached) $ECHO_C" >&6
7623 ac_check_lib_save_LIBS=$LIBS
7625 cat >conftest.$ac_ext <<_ACEOF
7626 #line 7626 "configure"
7627 #include "confdefs.h"
7629 /* Override any gcc2 internal prototype to avoid an error. */
7633 /* We use char because int might match the return type of a gcc2
7634 builtin and then its argument prototype would still apply. */
7644 rm -f conftest.$ac_objext conftest$ac_exeext
7645 if { (eval echo "$as_me:7645: \"$ac_link\"") >&5
7646 (eval $ac_link) 2>&5
7648 echo "$as_me:7648: \$? = $ac_status" >&5
7649 (exit $ac_status); } &&
7650 { ac_try='test -s conftest$ac_exeext'
7651 { (eval echo "$as_me:7651: \"$ac_try\"") >&5
7654 echo "$as_me:7654: \$? = $ac_status" >&5
7655 (exit $ac_status); }; }; then
7656 ac_cv_lib_gpm_Gpm_Open=yes
7658 echo "$as_me: failed program was:" >&5
7659 cat conftest.$ac_ext >&5
7660 ac_cv_lib_gpm_Gpm_Open=no
7662 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7663 LIBS=$ac_check_lib_save_LIBS
7665 echo "$as_me:7665: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7666 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7667 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
7668 echo "$as_me:7668: checking for initscr in -lgpm" >&5
7669 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
7670 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
7671 echo $ECHO_N "(cached) $ECHO_C" >&6
7673 ac_check_lib_save_LIBS=$LIBS
7675 cat >conftest.$ac_ext <<_ACEOF
7676 #line 7676 "configure"
7677 #include "confdefs.h"
7679 /* Override any gcc2 internal prototype to avoid an error. */
7683 /* We use char because int might match the return type of a gcc2
7684 builtin and then its argument prototype would still apply. */
7694 rm -f conftest.$ac_objext conftest$ac_exeext
7695 if { (eval echo "$as_me:7695: \"$ac_link\"") >&5
7696 (eval $ac_link) 2>&5
7698 echo "$as_me:7698: \$? = $ac_status" >&5
7699 (exit $ac_status); } &&
7700 { ac_try='test -s conftest$ac_exeext'
7701 { (eval echo "$as_me:7701: \"$ac_try\"") >&5
7704 echo "$as_me:7704: \$? = $ac_status" >&5
7705 (exit $ac_status); }; }; then
7706 ac_cv_lib_gpm_initscr=yes
7708 echo "$as_me: failed program was:" >&5
7709 cat conftest.$ac_ext >&5
7710 ac_cv_lib_gpm_initscr=no
7712 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7713 LIBS=$ac_check_lib_save_LIBS
7715 echo "$as_me:7715: result: $ac_cv_lib_gpm_initscr" >&5
7716 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
7717 if test $ac_cv_lib_gpm_initscr = yes; then
7718 LIBS="$cf_ncurses_SAVE"
7720 cf_ncurses_LIBS="-lgpm"
7727 # This is only necessary if you are linking against an obsolete
7728 # version of ncurses (but it should do no harm, since it's static).
7729 if test "$cf_nculib_root" = ncurses ; then
7730 echo "$as_me:7730: checking for tgoto in -lmytinfo" >&5
7731 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
7732 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
7733 echo $ECHO_N "(cached) $ECHO_C" >&6
7735 ac_check_lib_save_LIBS=$LIBS
7736 LIBS="-lmytinfo $LIBS"
7737 cat >conftest.$ac_ext <<_ACEOF
7738 #line 7738 "configure"
7739 #include "confdefs.h"
7741 /* Override any gcc2 internal prototype to avoid an error. */
7745 /* We use char because int might match the return type of a gcc2
7746 builtin and then its argument prototype would still apply. */
7756 rm -f conftest.$ac_objext conftest$ac_exeext
7757 if { (eval echo "$as_me:7757: \"$ac_link\"") >&5
7758 (eval $ac_link) 2>&5
7760 echo "$as_me:7760: \$? = $ac_status" >&5
7761 (exit $ac_status); } &&
7762 { ac_try='test -s conftest$ac_exeext'
7763 { (eval echo "$as_me:7763: \"$ac_try\"") >&5
7766 echo "$as_me:7766: \$? = $ac_status" >&5
7767 (exit $ac_status); }; }; then
7768 ac_cv_lib_mytinfo_tgoto=yes
7770 echo "$as_me: failed program was:" >&5
7771 cat conftest.$ac_ext >&5
7772 ac_cv_lib_mytinfo_tgoto=no
7774 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7775 LIBS=$ac_check_lib_save_LIBS
7777 echo "$as_me:7777: result: $ac_cv_lib_mytinfo_tgoto" >&5
7778 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7779 if test $ac_cv_lib_mytinfo_tgoto = yes; then
7780 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
7787 cf_add_libs="$cf_ncurses_LIBS"
7788 # Filter out duplicates - this happens with badly-designed ".pc" files...
7789 for cf_add_1lib in $LIBS
7791 for cf_add_2lib in $cf_add_libs
7793 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7799 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7803 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
7806 cf_add_libs="-l$cf_nculib_root"
7807 # Filter out duplicates - this happens with badly-designed ".pc" files...
7808 for cf_add_1lib in $LIBS
7810 for cf_add_2lib in $cf_add_libs
7812 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7818 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7824 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7826 echo "$as_me:7826: checking for initscr" >&5
7827 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7828 if test "${ac_cv_func_initscr+set}" = set; then
7829 echo $ECHO_N "(cached) $ECHO_C" >&6
7831 cat >conftest.$ac_ext <<_ACEOF
7832 #line 7832 "configure"
7833 #include "confdefs.h"
7834 /* System header to define __stub macros and hopefully few prototypes,
7835 which can conflict with char initscr (); below. */
7837 /* Override any gcc2 internal prototype to avoid an error. */
7841 /* We use char because int might match the return type of a gcc2
7842 builtin and then its argument prototype would still apply. */
7849 /* The GNU C library defines this for functions which it implements
7850 to always fail with ENOSYS. Some functions are actually named
7851 something starting with __ and the normal name is an alias. */
7852 #if defined (__stub_initscr) || defined (__stub___initscr)
7855 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7862 rm -f conftest.$ac_objext conftest$ac_exeext
7863 if { (eval echo "$as_me:7863: \"$ac_link\"") >&5
7864 (eval $ac_link) 2>&5
7866 echo "$as_me:7866: \$? = $ac_status" >&5
7867 (exit $ac_status); } &&
7868 { ac_try='test -s conftest$ac_exeext'
7869 { (eval echo "$as_me:7869: \"$ac_try\"") >&5
7872 echo "$as_me:7872: \$? = $ac_status" >&5
7873 (exit $ac_status); }; }; then
7874 ac_cv_func_initscr=yes
7876 echo "$as_me: failed program was:" >&5
7877 cat conftest.$ac_ext >&5
7878 ac_cv_func_initscr=no
7880 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7882 echo "$as_me:7882: result: $ac_cv_func_initscr" >&5
7883 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7884 if test $ac_cv_func_initscr = yes; then
7885 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7888 cf_save_LIBS="$LIBS"
7889 echo "$as_me:7889: checking for initscr in -l$cf_nculib_root" >&5
7890 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7891 LIBS="-l$cf_nculib_root $LIBS"
7892 cat >conftest.$ac_ext <<_ACEOF
7893 #line 7893 "configure"
7894 #include "confdefs.h"
7895 #include <${cf_cv_ncurses_header:-curses.h}>
7904 rm -f conftest.$ac_objext conftest$ac_exeext
7905 if { (eval echo "$as_me:7905: \"$ac_link\"") >&5
7906 (eval $ac_link) 2>&5
7908 echo "$as_me:7908: \$? = $ac_status" >&5
7909 (exit $ac_status); } &&
7910 { ac_try='test -s conftest$ac_exeext'
7911 { (eval echo "$as_me:7911: \"$ac_try\"") >&5
7914 echo "$as_me:7914: \$? = $ac_status" >&5
7915 (exit $ac_status); }; }; then
7916 echo "$as_me:7916: result: yes" >&5
7917 echo "${ECHO_T}yes" >&6
7918 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7921 echo "$as_me: failed program was:" >&5
7922 cat conftest.$ac_ext >&5
7923 echo "$as_me:7923: result: no" >&5
7924 echo "${ECHO_T}no" >&6
7927 cf_library_path_list=""
7928 if test -n "${LDFLAGS}${LIBS}" ; then
7929 for cf_library_path in $LDFLAGS $LIBS
7931 case $cf_library_path in
7933 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7935 test "x$cf_library_path" != "xNONE" && \
7936 test -d "$cf_library_path" && \
7938 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7939 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7940 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7941 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7942 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7943 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"
7946 cf_library_path_list="$cf_library_path_list $cf_search"
7954 test "x$prefix" != "xNONE" && \
7955 test -d "$prefix" && \
7957 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7958 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7959 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7960 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7961 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7962 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7965 for cf_subdir_prefix in \
7974 test "x$cf_subdir_prefix" != "x$prefix" && \
7975 test -d "$cf_subdir_prefix" && \
7976 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7977 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7978 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
7979 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
7980 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
7981 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
7982 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"
7987 cf_search="$cf_library_path_list $cf_search"
7989 for cf_libdir in $cf_search
7991 echo "$as_me:7991: checking for -l$cf_nculib_root in $cf_libdir" >&5
7992 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7993 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7994 cat >conftest.$ac_ext <<_ACEOF
7995 #line 7995 "configure"
7996 #include "confdefs.h"
7997 #include <${cf_cv_ncurses_header:-curses.h}>
8006 rm -f conftest.$ac_objext conftest$ac_exeext
8007 if { (eval echo "$as_me:8007: \"$ac_link\"") >&5
8008 (eval $ac_link) 2>&5
8010 echo "$as_me:8010: \$? = $ac_status" >&5
8011 (exit $ac_status); } &&
8012 { ac_try='test -s conftest$ac_exeext'
8013 { (eval echo "$as_me:8013: \"$ac_try\"") >&5
8016 echo "$as_me:8016: \$? = $ac_status" >&5
8017 (exit $ac_status); }; }; then
8018 echo "$as_me:8018: result: yes" >&5
8019 echo "${ECHO_T}yes" >&6
8020 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8023 echo "$as_me: failed program was:" >&5
8024 cat conftest.$ac_ext >&5
8025 echo "$as_me:8025: result: no" >&5
8026 echo "${ECHO_T}no" >&6
8027 LIBS="$cf_save_LIBS"
8029 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8033 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8037 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
8039 if test $cf_found_library = no ; then
8040 { { echo "$as_me:8040: error: Cannot link $cf_nculib_root library" >&5
8041 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
8042 { (exit 1); exit 1; }; }
8047 if test -n "$cf_ncurses_LIBS" ; then
8048 echo "$as_me:8048: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
8049 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
8050 cf_ncurses_SAVE="$LIBS"
8051 for p in $cf_ncurses_LIBS ; do
8052 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
8053 if test "$q" != "$LIBS" ; then
8057 cat >conftest.$ac_ext <<_ACEOF
8058 #line 8058 "configure"
8059 #include "confdefs.h"
8060 #include <${cf_cv_ncurses_header:-curses.h}>
8064 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8069 rm -f conftest.$ac_objext conftest$ac_exeext
8070 if { (eval echo "$as_me:8070: \"$ac_link\"") >&5
8071 (eval $ac_link) 2>&5
8073 echo "$as_me:8073: \$? = $ac_status" >&5
8074 (exit $ac_status); } &&
8075 { ac_try='test -s conftest$ac_exeext'
8076 { (eval echo "$as_me:8076: \"$ac_try\"") >&5
8079 echo "$as_me:8079: \$? = $ac_status" >&5
8080 (exit $ac_status); }; }; then
8081 echo "$as_me:8081: result: yes" >&5
8082 echo "${ECHO_T}yes" >&6
8084 echo "$as_me: failed program was:" >&5
8085 cat conftest.$ac_ext >&5
8086 echo "$as_me:8086: result: no" >&5
8087 echo "${ECHO_T}no" >&6
8088 LIBS="$cf_ncurses_SAVE"
8090 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8093 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8095 cat >>confdefs.h <<EOF
8096 #define $cf_nculib_ROOT 1
8106 cf_ncuconfig_root=ncurses
8107 cf_have_ncuconfig=no
8109 if test "x${PKG_CONFIG:=none}" != xnone; then
8110 echo "$as_me:8110: checking pkg-config for $cf_ncuconfig_root" >&5
8111 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
8112 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
8113 echo "$as_me:8113: result: yes" >&5
8114 echo "${ECHO_T}yes" >&6
8116 echo "$as_me:8116: checking if the $cf_ncuconfig_root package files work" >&5
8117 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
8118 cf_have_ncuconfig=unknown
8120 cf_save_CPPFLAGS="$CPPFLAGS"
8121 cf_save_LIBS="$LIBS"
8126 cf_new_extra_cppflags=
8128 for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
8130 case $cf_fix_cppflags in
8132 case $cf_add_cflags in
8133 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8134 case $cf_add_cflags in
8136 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8138 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8139 && test -z "${cf_tst_cflags}" \
8140 && cf_fix_cppflags=yes
8142 if test $cf_fix_cppflags = yes ; then
8144 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8145 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8148 elif test "${cf_tst_cflags}" = "\"'" ; then
8150 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8151 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8161 case $cf_add_cflags in
8163 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8165 CPPFLAGS=`echo "$CPPFLAGS" | \
8166 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8167 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8172 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8173 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8180 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8181 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8188 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8189 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8191 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8193 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8194 && test -z "${cf_tst_cflags}" \
8195 && cf_fix_cppflags=no
8200 if test -n "$cf_new_cflags" ; then
8202 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8203 CFLAGS="${CFLAGS}$cf_new_cflags"
8207 if test -n "$cf_new_cppflags" ; then
8209 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8210 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8214 if test -n "$cf_new_extra_cppflags" ; then
8216 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8217 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8221 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
8222 # Filter out duplicates - this happens with badly-designed ".pc" files...
8223 for cf_add_1lib in $LIBS
8225 for cf_add_2lib in $cf_add_libs
8227 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8233 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8237 cat >conftest.$ac_ext <<_ACEOF
8238 #line 8238 "configure"
8239 #include "confdefs.h"
8240 #include <${cf_cv_ncurses_header:-curses.h}>
8244 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8249 rm -f conftest.$ac_objext conftest$ac_exeext
8250 if { (eval echo "$as_me:8250: \"$ac_link\"") >&5
8251 (eval $ac_link) 2>&5
8253 echo "$as_me:8253: \$? = $ac_status" >&5
8254 (exit $ac_status); } &&
8255 { ac_try='test -s conftest$ac_exeext'
8256 { (eval echo "$as_me:8256: \"$ac_try\"") >&5
8259 echo "$as_me:8259: \$? = $ac_status" >&5
8260 (exit $ac_status); }; }; then
8261 if test "$cross_compiling" = yes; then
8262 cf_have_ncuconfig=maybe
8264 cat >conftest.$ac_ext <<_ACEOF
8265 #line 8265 "configure"
8266 #include "confdefs.h"
8267 #include <${cf_cv_ncurses_header:-curses.h}>
8269 { char *xx = curses_version(); return (xx == 0); }
8271 rm -f conftest$ac_exeext
8272 if { (eval echo "$as_me:8272: \"$ac_link\"") >&5
8273 (eval $ac_link) 2>&5
8275 echo "$as_me:8275: \$? = $ac_status" >&5
8276 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8277 { (eval echo "$as_me:8277: \"$ac_try\"") >&5
8280 echo "$as_me:8280: \$? = $ac_status" >&5
8281 (exit $ac_status); }; }; then
8282 cf_have_ncuconfig=yes
8284 echo "$as_me: program exited with status $ac_status" >&5
8285 echo "$as_me: failed program was:" >&5
8286 cat conftest.$ac_ext >&5
8287 cf_have_ncuconfig=no
8289 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8292 echo "$as_me: failed program was:" >&5
8293 cat conftest.$ac_ext >&5
8294 cf_have_ncuconfig=no
8296 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8297 echo "$as_me:8297: result: $cf_have_ncuconfig" >&5
8298 echo "${ECHO_T}$cf_have_ncuconfig" >&6
8299 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
8300 if test "$cf_have_ncuconfig" != "yes"
8302 CPPFLAGS="$cf_save_CPPFLAGS"
8303 LIBS="$cf_save_LIBS"
8304 NCURSES_CONFIG_PKG=none
8307 cat >>confdefs.h <<\EOF
8311 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
8313 echo "$as_me:8313: checking for terminfo header" >&5
8314 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8315 if test "${cf_cv_term_header+set}" = set; then
8316 echo $ECHO_N "(cached) $ECHO_C" >&6
8319 case ${cf_cv_ncurses_header} in
8320 (*/ncurses.h|*/ncursesw.h)
8321 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8324 cf_term_header=term.h
8328 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8330 cat >conftest.$ac_ext <<_ACEOF
8331 #line 8331 "configure"
8332 #include "confdefs.h"
8334 #include <${cf_cv_ncurses_header:-curses.h}>
8340 int x = auto_left_margin
8345 rm -f conftest.$ac_objext
8346 if { (eval echo "$as_me:8346: \"$ac_compile\"") >&5
8347 (eval $ac_compile) 2>&5
8349 echo "$as_me:8349: \$? = $ac_status" >&5
8350 (exit $ac_status); } &&
8351 { ac_try='test -s conftest.$ac_objext'
8352 { (eval echo "$as_me:8352: \"$ac_try\"") >&5
8355 echo "$as_me:8355: \$? = $ac_status" >&5
8356 (exit $ac_status); }; }; then
8358 cf_cv_term_header="$cf_test"
8360 echo "$as_me: failed program was:" >&5
8361 cat conftest.$ac_ext >&5
8363 cf_cv_term_header=unknown
8366 rm -f conftest.$ac_objext conftest.$ac_ext
8367 test "$cf_cv_term_header" != unknown && break
8371 echo "$as_me:8371: result: $cf_cv_term_header" >&5
8372 echo "${ECHO_T}$cf_cv_term_header" >&6
8374 # Set definitions to allow ifdef'ing to accommodate subdirectories
8376 case $cf_cv_term_header in
8379 cat >>confdefs.h <<\EOF
8380 #define HAVE_TERM_H 1
8386 case $cf_cv_term_header in
8389 cat >>confdefs.h <<\EOF
8390 #define HAVE_NCURSES_TERM_H 1
8396 cat >>confdefs.h <<\EOF
8397 #define HAVE_NCURSESW_TERM_H 1
8406 echo "$as_me:8406: result: no" >&5
8407 echo "${ECHO_T}no" >&6
8408 NCURSES_CONFIG_PKG=none
8411 NCURSES_CONFIG_PKG=none
8414 if test "x$cf_have_ncuconfig" = "xno"; then
8415 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
8417 if test -n "$ac_tool_prefix"; then
8418 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8420 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8421 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8422 echo "$as_me:8422: checking for $ac_word" >&5
8423 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8424 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8425 echo $ECHO_N "(cached) $ECHO_C" >&6
8427 if test -n "$NCURSES_CONFIG"; then
8428 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8430 ac_save_IFS=$IFS; IFS=$ac_path_separator
8432 for ac_dir in $ac_dummy; do
8434 test -z "$ac_dir" && ac_dir=.
8435 $as_executable_p "$ac_dir/$ac_word" || continue
8436 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8437 echo "$as_me:8437: found $ac_dir/$ac_word" >&5
8443 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8444 if test -n "$NCURSES_CONFIG"; then
8445 echo "$as_me:8445: result: $NCURSES_CONFIG" >&5
8446 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8448 echo "$as_me:8448: result: no" >&5
8449 echo "${ECHO_T}no" >&6
8452 test -n "$NCURSES_CONFIG" && break
8455 if test -z "$NCURSES_CONFIG"; then
8456 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8457 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8459 # Extract the first word of "$ac_prog", so it can be a program name with args.
8460 set dummy $ac_prog; ac_word=$2
8461 echo "$as_me:8461: checking for $ac_word" >&5
8462 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8463 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8464 echo $ECHO_N "(cached) $ECHO_C" >&6
8466 if test -n "$ac_ct_NCURSES_CONFIG"; then
8467 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8469 ac_save_IFS=$IFS; IFS=$ac_path_separator
8471 for ac_dir in $ac_dummy; do
8473 test -z "$ac_dir" && ac_dir=.
8474 $as_executable_p "$ac_dir/$ac_word" || continue
8475 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8476 echo "$as_me:8476: found $ac_dir/$ac_word" >&5
8482 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8483 if test -n "$ac_ct_NCURSES_CONFIG"; then
8484 echo "$as_me:8484: result: $ac_ct_NCURSES_CONFIG" >&5
8485 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8487 echo "$as_me:8487: result: no" >&5
8488 echo "${ECHO_T}no" >&6
8491 test -n "$ac_ct_NCURSES_CONFIG" && break
8493 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8495 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8498 if test "$NCURSES_CONFIG" != none ; then
8503 cf_new_extra_cppflags=
8505 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
8507 case $cf_fix_cppflags in
8509 case $cf_add_cflags in
8510 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8511 case $cf_add_cflags in
8513 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8515 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8516 && test -z "${cf_tst_cflags}" \
8517 && cf_fix_cppflags=yes
8519 if test $cf_fix_cppflags = yes ; then
8521 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8522 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8525 elif test "${cf_tst_cflags}" = "\"'" ; then
8527 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8528 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8538 case $cf_add_cflags in
8540 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8542 CPPFLAGS=`echo "$CPPFLAGS" | \
8543 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8544 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8549 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8550 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8557 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8558 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8565 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8566 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8568 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8570 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8571 && test -z "${cf_tst_cflags}" \
8572 && cf_fix_cppflags=no
8577 if test -n "$cf_new_cflags" ; then
8579 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8580 CFLAGS="${CFLAGS}$cf_new_cflags"
8584 if test -n "$cf_new_cppflags" ; then
8586 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8587 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8591 if test -n "$cf_new_extra_cppflags" ; then
8593 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8594 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8598 cf_add_libs="`$NCURSES_CONFIG --libs`"
8599 # Filter out duplicates - this happens with badly-designed ".pc" files...
8600 for cf_add_1lib in $LIBS
8602 for cf_add_2lib in $cf_add_libs
8604 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8610 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8614 # even with config script, some packages use no-override for curses.h
8616 echo "$as_me:8616: checking if we have identified curses headers" >&5
8617 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8618 if test "${cf_cv_ncurses_header+set}" = set; then
8619 echo $ECHO_N "(cached) $ECHO_C" >&6
8622 cf_cv_ncurses_header=none
8624 ncurses.h ncurses/ncurses.h \
8625 curses.h ncurses/curses.h
8627 cat >conftest.$ac_ext <<_ACEOF
8628 #line 8628 "configure"
8629 #include "confdefs.h"
8630 #include <${cf_header}>
8634 initscr(); tgoto("?", 0,0)
8639 rm -f conftest.$ac_objext
8640 if { (eval echo "$as_me:8640: \"$ac_compile\"") >&5
8641 (eval $ac_compile) 2>&5
8643 echo "$as_me:8643: \$? = $ac_status" >&5
8644 (exit $ac_status); } &&
8645 { ac_try='test -s conftest.$ac_objext'
8646 { (eval echo "$as_me:8646: \"$ac_try\"") >&5
8649 echo "$as_me:8649: \$? = $ac_status" >&5
8650 (exit $ac_status); }; }; then
8651 cf_cv_ncurses_header=$cf_header; break
8653 echo "$as_me: failed program was:" >&5
8654 cat conftest.$ac_ext >&5
8656 rm -f conftest.$ac_objext conftest.$ac_ext
8660 echo "$as_me:8660: result: $cf_cv_ncurses_header" >&5
8661 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8663 if test "$cf_cv_ncurses_header" = none ; then
8664 { { echo "$as_me:8664: error: No curses header-files found" >&5
8665 echo "$as_me: error: No curses header-files found" >&2;}
8666 { (exit 1); exit 1; }; }
8669 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8671 for ac_header in $cf_cv_ncurses_header
8673 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8674 echo "$as_me:8674: checking for $ac_header" >&5
8675 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8676 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8677 echo $ECHO_N "(cached) $ECHO_C" >&6
8679 cat >conftest.$ac_ext <<_ACEOF
8680 #line 8680 "configure"
8681 #include "confdefs.h"
8682 #include <$ac_header>
8684 if { (eval echo "$as_me:8684: \"$ac_cpp conftest.$ac_ext\"") >&5
8685 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8687 egrep -v '^ *\+' conftest.er1 >conftest.err
8689 cat conftest.err >&5
8690 echo "$as_me:8690: \$? = $ac_status" >&5
8691 (exit $ac_status); } >/dev/null; then
8692 if test -s conftest.err; then
8693 ac_cpp_err=$ac_c_preproc_warn_flag
8700 if test -z "$ac_cpp_err"; then
8701 eval "$as_ac_Header=yes"
8703 echo "$as_me: failed program was:" >&5
8704 cat conftest.$ac_ext >&5
8705 eval "$as_ac_Header=no"
8707 rm -f conftest.err conftest.$ac_ext
8709 echo "$as_me:8709: result: `eval echo '${'$as_ac_Header'}'`" >&5
8710 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8711 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8712 cat >>confdefs.h <<EOF
8713 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8719 cat >>confdefs.h <<\EOF
8723 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8725 cat >>confdefs.h <<EOF
8726 #define $cf_nculib_ROOT 1
8729 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8733 cf_ncuhdr_root=ncurses
8735 test -n "$cf_cv_curses_dir" && \
8736 test "$cf_cv_curses_dir" != "no" && { \
8738 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8739 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8741 while test $cf_add_incdir != /usr/include
8743 if test -d $cf_add_incdir
8746 if test -n "$CFLAGS$CPPFLAGS" ; then
8747 # a loop is needed to ensure we can add subdirs of existing dirs
8748 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8749 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8750 cf_have_incdir=yes; break
8755 if test "$cf_have_incdir" = no ; then
8756 if test "$cf_add_incdir" = /usr/local/include ; then
8757 if test "$GCC" = yes
8759 cf_save_CPPFLAGS=$CPPFLAGS
8761 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8762 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8764 cat >conftest.$ac_ext <<_ACEOF
8765 #line 8765 "configure"
8766 #include "confdefs.h"
8776 rm -f conftest.$ac_objext
8777 if { (eval echo "$as_me:8777: \"$ac_compile\"") >&5
8778 (eval $ac_compile) 2>&5
8780 echo "$as_me:8780: \$? = $ac_status" >&5
8781 (exit $ac_status); } &&
8782 { ac_try='test -s conftest.$ac_objext'
8783 { (eval echo "$as_me:8783: \"$ac_try\"") >&5
8786 echo "$as_me:8786: \$? = $ac_status" >&5
8787 (exit $ac_status); }; }; then
8790 echo "$as_me: failed program was:" >&5
8791 cat conftest.$ac_ext >&5
8794 rm -f conftest.$ac_objext conftest.$ac_ext
8795 CPPFLAGS=$cf_save_CPPFLAGS
8800 if test "$cf_have_incdir" = no ; then
8801 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8803 echo "${as_me:-configure}:8803: testing adding $cf_add_incdir to include-path ..." 1>&5
8805 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8807 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8808 test "$cf_top_incdir" = "$cf_add_incdir" && break
8809 cf_add_incdir="$cf_top_incdir"
8822 echo "$as_me:8822: checking for $cf_ncuhdr_root header in include-path" >&5
8823 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8824 if test "${cf_cv_ncurses_h+set}" = set; then
8825 echo $ECHO_N "(cached) $ECHO_C" >&6
8828 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8829 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8830 for cf_header in $cf_header_list
8833 cat >conftest.$ac_ext <<_ACEOF
8834 #line 8834 "configure"
8835 #include "confdefs.h"
8837 #include <$cf_header>
8842 #ifdef NCURSES_VERSION
8844 printf("%s\n", NCURSES_VERSION);
8857 rm -f conftest.$ac_objext
8858 if { (eval echo "$as_me:8858: \"$ac_compile\"") >&5
8859 (eval $ac_compile) 2>&5
8861 echo "$as_me:8861: \$? = $ac_status" >&5
8862 (exit $ac_status); } &&
8863 { ac_try='test -s conftest.$ac_objext'
8864 { (eval echo "$as_me:8864: \"$ac_try\"") >&5
8867 echo "$as_me:8867: \$? = $ac_status" >&5
8868 (exit $ac_status); }; }; then
8869 cf_cv_ncurses_h=$cf_header
8872 echo "$as_me: failed program was:" >&5
8873 cat conftest.$ac_ext >&5
8876 rm -f conftest.$ac_objext conftest.$ac_ext
8878 test "$cf_cv_ncurses_h" != no && break
8882 echo "$as_me:8882: result: $cf_cv_ncurses_h" >&5
8883 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8885 if test "$cf_cv_ncurses_h" != no ; then
8886 cf_cv_ncurses_header=$cf_cv_ncurses_h
8889 echo "$as_me:8889: checking for $cf_ncuhdr_root include-path" >&5
8890 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8891 if test "${cf_cv_ncurses_h2+set}" = set; then
8892 echo $ECHO_N "(cached) $ECHO_C" >&6
8895 test -n "$verbose" && echo
8899 # collect the current set of include-directories from compiler flags
8900 cf_header_path_list=""
8901 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8902 for cf_header_path in $CPPFLAGS $CFLAGS
8904 case $cf_header_path in
8906 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8908 test "x$cf_header_path" != "xNONE" && \
8909 test -d "$cf_header_path" && \
8911 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8912 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
8913 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8914 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8915 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8916 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"
8919 cf_header_path_list="$cf_header_path_list $cf_search"
8925 # add the variations for the package we are looking for
8929 test "x$prefix" != "xNONE" && \
8930 test -d "$prefix" && \
8932 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8933 test -d $prefix/include && cf_search="$cf_search $prefix/include"
8934 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8935 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8936 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8937 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8940 for cf_subdir_prefix in \
8949 test "x$cf_subdir_prefix" != "x$prefix" && \
8950 test -d "$cf_subdir_prefix" && \
8951 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8952 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8953 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
8954 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8955 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8956 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8957 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"
8962 test "$includedir" != NONE && \
8963 test "$includedir" != "/usr/include" && \
8964 test -d "$includedir" && {
8965 test -d $includedir && cf_search="$cf_search $includedir"
8966 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8969 test "$oldincludedir" != NONE && \
8970 test "$oldincludedir" != "/usr/include" && \
8971 test -d "$oldincludedir" && {
8972 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8973 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8976 cf_search="$cf_search $cf_header_path_list"
8978 test -n "$verbose" && echo search path $cf_search
8979 cf_save2_CPPFLAGS="$CPPFLAGS"
8980 for cf_incdir in $cf_search
8983 if test -n "$cf_incdir" ; then
8984 for cf_add_incdir in $cf_incdir
8986 while test $cf_add_incdir != /usr/include
8988 if test -d $cf_add_incdir
8991 if test -n "$CFLAGS$CPPFLAGS" ; then
8992 # a loop is needed to ensure we can add subdirs of existing dirs
8993 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8994 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8995 cf_have_incdir=yes; break
9000 if test "$cf_have_incdir" = no ; then
9001 if test "$cf_add_incdir" = /usr/local/include ; then
9002 if test "$GCC" = yes
9004 cf_save_CPPFLAGS=$CPPFLAGS
9006 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9007 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9009 cat >conftest.$ac_ext <<_ACEOF
9010 #line 9010 "configure"
9011 #include "confdefs.h"
9021 rm -f conftest.$ac_objext
9022 if { (eval echo "$as_me:9022: \"$ac_compile\"") >&5
9023 (eval $ac_compile) 2>&5
9025 echo "$as_me:9025: \$? = $ac_status" >&5
9026 (exit $ac_status); } &&
9027 { ac_try='test -s conftest.$ac_objext'
9028 { (eval echo "$as_me:9028: \"$ac_try\"") >&5
9031 echo "$as_me:9031: \$? = $ac_status" >&5
9032 (exit $ac_status); }; }; then
9035 echo "$as_me: failed program was:" >&5
9036 cat conftest.$ac_ext >&5
9039 rm -f conftest.$ac_objext conftest.$ac_ext
9040 CPPFLAGS=$cf_save_CPPFLAGS
9045 if test "$cf_have_incdir" = no ; then
9046 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9048 echo "${as_me:-configure}:9048: testing adding $cf_add_incdir to include-path ..." 1>&5
9050 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9052 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9053 test "$cf_top_incdir" = "$cf_add_incdir" && break
9054 cf_add_incdir="$cf_top_incdir"
9070 cat >conftest.$ac_ext <<_ACEOF
9071 #line 9071 "configure"
9072 #include "confdefs.h"
9074 #include <$cf_header>
9079 #ifdef NCURSES_VERSION
9081 printf("%s\n", NCURSES_VERSION);
9094 rm -f conftest.$ac_objext
9095 if { (eval echo "$as_me:9095: \"$ac_compile\"") >&5
9096 (eval $ac_compile) 2>&5
9098 echo "$as_me:9098: \$? = $ac_status" >&5
9099 (exit $ac_status); } &&
9100 { ac_try='test -s conftest.$ac_objext'
9101 { (eval echo "$as_me:9101: \"$ac_try\"") >&5
9104 echo "$as_me:9104: \$? = $ac_status" >&5
9105 (exit $ac_status); }; }; then
9106 cf_cv_ncurses_h2=$cf_header
9109 echo "$as_me: failed program was:" >&5
9110 cat conftest.$ac_ext >&5
9113 rm -f conftest.$ac_objext conftest.$ac_ext
9115 if test "$cf_cv_ncurses_h2" != no ; then
9116 cf_cv_ncurses_h2=$cf_incdir/$cf_header
9117 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
9120 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
9122 CPPFLAGS="$cf_save2_CPPFLAGS"
9123 test "$cf_cv_ncurses_h2" != no && break
9125 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9125: error: not found" >&5
9126 echo "$as_me: error: not found" >&2;}
9127 { (exit 1); exit 1; }; }
9130 echo "$as_me:9130: result: $cf_cv_ncurses_h2" >&5
9131 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
9133 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
9134 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
9135 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
9136 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
9139 if test -n "$cf_1st_incdir" ; then
9140 for cf_add_incdir in $cf_1st_incdir
9142 while test $cf_add_incdir != /usr/include
9144 if test -d $cf_add_incdir
9147 if test -n "$CFLAGS$CPPFLAGS" ; then
9148 # a loop is needed to ensure we can add subdirs of existing dirs
9149 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9150 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9151 cf_have_incdir=yes; break
9156 if test "$cf_have_incdir" = no ; then
9157 if test "$cf_add_incdir" = /usr/local/include ; then
9158 if test "$GCC" = yes
9160 cf_save_CPPFLAGS=$CPPFLAGS
9162 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9163 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9165 cat >conftest.$ac_ext <<_ACEOF
9166 #line 9166 "configure"
9167 #include "confdefs.h"
9177 rm -f conftest.$ac_objext
9178 if { (eval echo "$as_me:9178: \"$ac_compile\"") >&5
9179 (eval $ac_compile) 2>&5
9181 echo "$as_me:9181: \$? = $ac_status" >&5
9182 (exit $ac_status); } &&
9183 { ac_try='test -s conftest.$ac_objext'
9184 { (eval echo "$as_me:9184: \"$ac_try\"") >&5
9187 echo "$as_me:9187: \$? = $ac_status" >&5
9188 (exit $ac_status); }; }; then
9191 echo "$as_me: failed program was:" >&5
9192 cat conftest.$ac_ext >&5
9195 rm -f conftest.$ac_objext conftest.$ac_ext
9196 CPPFLAGS=$cf_save_CPPFLAGS
9201 if test "$cf_have_incdir" = no ; then
9202 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9204 echo "${as_me:-configure}:9204: testing adding $cf_add_incdir to include-path ..." 1>&5
9206 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9208 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9209 test "$cf_top_incdir" = "$cf_add_incdir" && break
9210 cf_add_incdir="$cf_top_incdir"
9223 # Set definitions to allow ifdef'ing for ncurses.h
9225 case $cf_cv_ncurses_header in
9228 cat >>confdefs.h <<\EOF
9229 #define HAVE_NCURSES_H 1
9235 case $cf_cv_ncurses_header in
9236 (ncurses/curses.h|ncurses/ncurses.h)
9238 cat >>confdefs.h <<\EOF
9239 #define HAVE_NCURSES_NCURSES_H 1
9243 (ncursesw/curses.h|ncursesw/ncurses.h)
9245 cat >>confdefs.h <<\EOF
9246 #define HAVE_NCURSESW_NCURSES_H 1
9252 echo "$as_me:9252: checking for terminfo header" >&5
9253 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9254 if test "${cf_cv_term_header+set}" = set; then
9255 echo $ECHO_N "(cached) $ECHO_C" >&6
9258 case ${cf_cv_ncurses_header} in
9259 (*/ncurses.h|*/ncursesw.h)
9260 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9263 cf_term_header=term.h
9267 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9269 cat >conftest.$ac_ext <<_ACEOF
9270 #line 9270 "configure"
9271 #include "confdefs.h"
9273 #include <${cf_cv_ncurses_header:-curses.h}>
9279 int x = auto_left_margin
9284 rm -f conftest.$ac_objext
9285 if { (eval echo "$as_me:9285: \"$ac_compile\"") >&5
9286 (eval $ac_compile) 2>&5
9288 echo "$as_me:9288: \$? = $ac_status" >&5
9289 (exit $ac_status); } &&
9290 { ac_try='test -s conftest.$ac_objext'
9291 { (eval echo "$as_me:9291: \"$ac_try\"") >&5
9294 echo "$as_me:9294: \$? = $ac_status" >&5
9295 (exit $ac_status); }; }; then
9297 cf_cv_term_header="$cf_test"
9299 echo "$as_me: failed program was:" >&5
9300 cat conftest.$ac_ext >&5
9302 cf_cv_term_header=unknown
9305 rm -f conftest.$ac_objext conftest.$ac_ext
9306 test "$cf_cv_term_header" != unknown && break
9310 echo "$as_me:9310: result: $cf_cv_term_header" >&5
9311 echo "${ECHO_T}$cf_cv_term_header" >&6
9313 # Set definitions to allow ifdef'ing to accommodate subdirectories
9315 case $cf_cv_term_header in
9318 cat >>confdefs.h <<\EOF
9319 #define HAVE_TERM_H 1
9325 case $cf_cv_term_header in
9328 cat >>confdefs.h <<\EOF
9329 #define HAVE_NCURSES_TERM_H 1
9335 cat >>confdefs.h <<\EOF
9336 #define HAVE_NCURSESW_TERM_H 1
9342 # some applications need this, but should check for NCURSES_VERSION
9344 cat >>confdefs.h <<\EOF
9348 echo "$as_me:9348: checking for ncurses version" >&5
9349 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9350 if test "${cf_cv_ncurses_version+set}" = set; then
9351 echo $ECHO_N "(cached) $ECHO_C" >&6
9354 cf_cv_ncurses_version=no
9357 if test "$cross_compiling" = yes; then
9359 # This will not work if the preprocessor splits the line after the
9360 # Autoconf token. The 'unproto' program does that.
9361 cat > conftest.$ac_ext <<EOF
9362 #include <${cf_cv_ncurses_header:-curses.h}>
9364 #ifdef NCURSES_VERSION
9365 Autoconf NCURSES_VERSION
9373 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9374 { (eval echo "$as_me:9374: \"$cf_try\"") >&5
9377 echo "$as_me:9377: \$? = $ac_status" >&5
9378 (exit $ac_status); }
9379 if test -f conftest.out ; then
9380 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
9381 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9386 cat >conftest.$ac_ext <<_ACEOF
9387 #line 9387 "configure"
9388 #include "confdefs.h"
9390 #include <${cf_cv_ncurses_header:-curses.h}>
9394 FILE *fp = fopen("$cf_tempfile", "w");
9395 #ifdef NCURSES_VERSION
9396 # ifdef NCURSES_VERSION_PATCH
9397 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9399 fprintf(fp, "%s\n", NCURSES_VERSION);
9403 fprintf(fp, "old\n");
9408 ${cf_cv_main_return:-return}(0);
9411 rm -f conftest$ac_exeext
9412 if { (eval echo "$as_me:9412: \"$ac_link\"") >&5
9413 (eval $ac_link) 2>&5
9415 echo "$as_me:9415: \$? = $ac_status" >&5
9416 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9417 { (eval echo "$as_me:9417: \"$ac_try\"") >&5
9420 echo "$as_me:9420: \$? = $ac_status" >&5
9421 (exit $ac_status); }; }; then
9423 cf_cv_ncurses_version=`cat $cf_tempfile`
9425 echo "$as_me: program exited with status $ac_status" >&5
9426 echo "$as_me: failed program was:" >&5
9427 cat conftest.$ac_ext >&5
9429 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9434 echo "$as_me:9434: result: $cf_cv_ncurses_version" >&5
9435 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9436 test "$cf_cv_ncurses_version" = no ||
9437 cat >>confdefs.h <<\EOF
9441 cf_nculib_root=ncurses
9442 # This works, except for the special case where we find gpm, but
9443 # ncurses is in a nonstandard location via $LIBS, and we really want
9446 cf_ncurses_SAVE="$LIBS"
9447 echo "$as_me:9447: checking for Gpm_Open in -lgpm" >&5
9448 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9449 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9450 echo $ECHO_N "(cached) $ECHO_C" >&6
9452 ac_check_lib_save_LIBS=$LIBS
9454 cat >conftest.$ac_ext <<_ACEOF
9455 #line 9455 "configure"
9456 #include "confdefs.h"
9458 /* Override any gcc2 internal prototype to avoid an error. */
9462 /* We use char because int might match the return type of a gcc2
9463 builtin and then its argument prototype would still apply. */
9473 rm -f conftest.$ac_objext conftest$ac_exeext
9474 if { (eval echo "$as_me:9474: \"$ac_link\"") >&5
9475 (eval $ac_link) 2>&5
9477 echo "$as_me:9477: \$? = $ac_status" >&5
9478 (exit $ac_status); } &&
9479 { ac_try='test -s conftest$ac_exeext'
9480 { (eval echo "$as_me:9480: \"$ac_try\"") >&5
9483 echo "$as_me:9483: \$? = $ac_status" >&5
9484 (exit $ac_status); }; }; then
9485 ac_cv_lib_gpm_Gpm_Open=yes
9487 echo "$as_me: failed program was:" >&5
9488 cat conftest.$ac_ext >&5
9489 ac_cv_lib_gpm_Gpm_Open=no
9491 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9492 LIBS=$ac_check_lib_save_LIBS
9494 echo "$as_me:9494: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9495 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9496 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
9497 echo "$as_me:9497: checking for initscr in -lgpm" >&5
9498 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9499 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9500 echo $ECHO_N "(cached) $ECHO_C" >&6
9502 ac_check_lib_save_LIBS=$LIBS
9504 cat >conftest.$ac_ext <<_ACEOF
9505 #line 9505 "configure"
9506 #include "confdefs.h"
9508 /* Override any gcc2 internal prototype to avoid an error. */
9512 /* We use char because int might match the return type of a gcc2
9513 builtin and then its argument prototype would still apply. */
9523 rm -f conftest.$ac_objext conftest$ac_exeext
9524 if { (eval echo "$as_me:9524: \"$ac_link\"") >&5
9525 (eval $ac_link) 2>&5
9527 echo "$as_me:9527: \$? = $ac_status" >&5
9528 (exit $ac_status); } &&
9529 { ac_try='test -s conftest$ac_exeext'
9530 { (eval echo "$as_me:9530: \"$ac_try\"") >&5
9533 echo "$as_me:9533: \$? = $ac_status" >&5
9534 (exit $ac_status); }; }; then
9535 ac_cv_lib_gpm_initscr=yes
9537 echo "$as_me: failed program was:" >&5
9538 cat conftest.$ac_ext >&5
9539 ac_cv_lib_gpm_initscr=no
9541 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9542 LIBS=$ac_check_lib_save_LIBS
9544 echo "$as_me:9544: result: $ac_cv_lib_gpm_initscr" >&5
9545 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9546 if test $ac_cv_lib_gpm_initscr = yes; then
9547 LIBS="$cf_ncurses_SAVE"
9549 cf_ncurses_LIBS="-lgpm"
9556 # This is only necessary if you are linking against an obsolete
9557 # version of ncurses (but it should do no harm, since it's static).
9558 if test "$cf_nculib_root" = ncurses ; then
9559 echo "$as_me:9559: checking for tgoto in -lmytinfo" >&5
9560 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9561 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9562 echo $ECHO_N "(cached) $ECHO_C" >&6
9564 ac_check_lib_save_LIBS=$LIBS
9565 LIBS="-lmytinfo $LIBS"
9566 cat >conftest.$ac_ext <<_ACEOF
9567 #line 9567 "configure"
9568 #include "confdefs.h"
9570 /* Override any gcc2 internal prototype to avoid an error. */
9574 /* We use char because int might match the return type of a gcc2
9575 builtin and then its argument prototype would still apply. */
9585 rm -f conftest.$ac_objext conftest$ac_exeext
9586 if { (eval echo "$as_me:9586: \"$ac_link\"") >&5
9587 (eval $ac_link) 2>&5
9589 echo "$as_me:9589: \$? = $ac_status" >&5
9590 (exit $ac_status); } &&
9591 { ac_try='test -s conftest$ac_exeext'
9592 { (eval echo "$as_me:9592: \"$ac_try\"") >&5
9595 echo "$as_me:9595: \$? = $ac_status" >&5
9596 (exit $ac_status); }; }; then
9597 ac_cv_lib_mytinfo_tgoto=yes
9599 echo "$as_me: failed program was:" >&5
9600 cat conftest.$ac_ext >&5
9601 ac_cv_lib_mytinfo_tgoto=no
9603 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9604 LIBS=$ac_check_lib_save_LIBS
9606 echo "$as_me:9606: result: $ac_cv_lib_mytinfo_tgoto" >&5
9607 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9608 if test $ac_cv_lib_mytinfo_tgoto = yes; then
9609 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9616 cf_add_libs="$cf_ncurses_LIBS"
9617 # Filter out duplicates - this happens with badly-designed ".pc" files...
9618 for cf_add_1lib in $LIBS
9620 for cf_add_2lib in $cf_add_libs
9622 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9628 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9632 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
9635 cf_add_libs="-l$cf_nculib_root"
9636 # Filter out duplicates - this happens with badly-designed ".pc" files...
9637 for cf_add_1lib in $LIBS
9639 for cf_add_2lib in $cf_add_libs
9641 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9647 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9653 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9655 echo "$as_me:9655: checking for initscr" >&5
9656 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9657 if test "${ac_cv_func_initscr+set}" = set; then
9658 echo $ECHO_N "(cached) $ECHO_C" >&6
9660 cat >conftest.$ac_ext <<_ACEOF
9661 #line 9661 "configure"
9662 #include "confdefs.h"
9663 /* System header to define __stub macros and hopefully few prototypes,
9664 which can conflict with char initscr (); below. */
9666 /* Override any gcc2 internal prototype to avoid an error. */
9670 /* We use char because int might match the return type of a gcc2
9671 builtin and then its argument prototype would still apply. */
9678 /* The GNU C library defines this for functions which it implements
9679 to always fail with ENOSYS. Some functions are actually named
9680 something starting with __ and the normal name is an alias. */
9681 #if defined (__stub_initscr) || defined (__stub___initscr)
9684 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9691 rm -f conftest.$ac_objext conftest$ac_exeext
9692 if { (eval echo "$as_me:9692: \"$ac_link\"") >&5
9693 (eval $ac_link) 2>&5
9695 echo "$as_me:9695: \$? = $ac_status" >&5
9696 (exit $ac_status); } &&
9697 { ac_try='test -s conftest$ac_exeext'
9698 { (eval echo "$as_me:9698: \"$ac_try\"") >&5
9701 echo "$as_me:9701: \$? = $ac_status" >&5
9702 (exit $ac_status); }; }; then
9703 ac_cv_func_initscr=yes
9705 echo "$as_me: failed program was:" >&5
9706 cat conftest.$ac_ext >&5
9707 ac_cv_func_initscr=no
9709 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9711 echo "$as_me:9711: result: $ac_cv_func_initscr" >&5
9712 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9713 if test $ac_cv_func_initscr = yes; then
9714 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9717 cf_save_LIBS="$LIBS"
9718 echo "$as_me:9718: checking for initscr in -l$cf_nculib_root" >&5
9719 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9720 LIBS="-l$cf_nculib_root $LIBS"
9721 cat >conftest.$ac_ext <<_ACEOF
9722 #line 9722 "configure"
9723 #include "confdefs.h"
9724 #include <${cf_cv_ncurses_header:-curses.h}>
9733 rm -f conftest.$ac_objext conftest$ac_exeext
9734 if { (eval echo "$as_me:9734: \"$ac_link\"") >&5
9735 (eval $ac_link) 2>&5
9737 echo "$as_me:9737: \$? = $ac_status" >&5
9738 (exit $ac_status); } &&
9739 { ac_try='test -s conftest$ac_exeext'
9740 { (eval echo "$as_me:9740: \"$ac_try\"") >&5
9743 echo "$as_me:9743: \$? = $ac_status" >&5
9744 (exit $ac_status); }; }; then
9745 echo "$as_me:9745: result: yes" >&5
9746 echo "${ECHO_T}yes" >&6
9747 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9750 echo "$as_me: failed program was:" >&5
9751 cat conftest.$ac_ext >&5
9752 echo "$as_me:9752: result: no" >&5
9753 echo "${ECHO_T}no" >&6
9756 cf_library_path_list=""
9757 if test -n "${LDFLAGS}${LIBS}" ; then
9758 for cf_library_path in $LDFLAGS $LIBS
9760 case $cf_library_path in
9762 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9764 test "x$cf_library_path" != "xNONE" && \
9765 test -d "$cf_library_path" && \
9767 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9768 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9769 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9770 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9771 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9772 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"
9775 cf_library_path_list="$cf_library_path_list $cf_search"
9783 test "x$prefix" != "xNONE" && \
9784 test -d "$prefix" && \
9786 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9787 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9788 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9789 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9790 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9791 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9794 for cf_subdir_prefix in \
9803 test "x$cf_subdir_prefix" != "x$prefix" && \
9804 test -d "$cf_subdir_prefix" && \
9805 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9806 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9807 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
9808 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9809 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9810 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9811 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"
9816 cf_search="$cf_library_path_list $cf_search"
9818 for cf_libdir in $cf_search
9820 echo "$as_me:9820: checking for -l$cf_nculib_root in $cf_libdir" >&5
9821 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9822 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9823 cat >conftest.$ac_ext <<_ACEOF
9824 #line 9824 "configure"
9825 #include "confdefs.h"
9826 #include <${cf_cv_ncurses_header:-curses.h}>
9835 rm -f conftest.$ac_objext conftest$ac_exeext
9836 if { (eval echo "$as_me:9836: \"$ac_link\"") >&5
9837 (eval $ac_link) 2>&5
9839 echo "$as_me:9839: \$? = $ac_status" >&5
9840 (exit $ac_status); } &&
9841 { ac_try='test -s conftest$ac_exeext'
9842 { (eval echo "$as_me:9842: \"$ac_try\"") >&5
9845 echo "$as_me:9845: \$? = $ac_status" >&5
9846 (exit $ac_status); }; }; then
9847 echo "$as_me:9847: result: yes" >&5
9848 echo "${ECHO_T}yes" >&6
9849 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9852 echo "$as_me: failed program was:" >&5
9853 cat conftest.$ac_ext >&5
9854 echo "$as_me:9854: result: no" >&5
9855 echo "${ECHO_T}no" >&6
9856 LIBS="$cf_save_LIBS"
9858 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9862 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9866 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9868 if test $cf_found_library = no ; then
9869 { { echo "$as_me:9869: error: Cannot link $cf_nculib_root library" >&5
9870 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9871 { (exit 1); exit 1; }; }
9876 if test -n "$cf_ncurses_LIBS" ; then
9877 echo "$as_me:9877: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9878 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9879 cf_ncurses_SAVE="$LIBS"
9880 for p in $cf_ncurses_LIBS ; do
9881 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9882 if test "$q" != "$LIBS" ; then
9886 cat >conftest.$ac_ext <<_ACEOF
9887 #line 9887 "configure"
9888 #include "confdefs.h"
9889 #include <${cf_cv_ncurses_header:-curses.h}>
9893 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9898 rm -f conftest.$ac_objext conftest$ac_exeext
9899 if { (eval echo "$as_me:9899: \"$ac_link\"") >&5
9900 (eval $ac_link) 2>&5
9902 echo "$as_me:9902: \$? = $ac_status" >&5
9903 (exit $ac_status); } &&
9904 { ac_try='test -s conftest$ac_exeext'
9905 { (eval echo "$as_me:9905: \"$ac_try\"") >&5
9908 echo "$as_me:9908: \$? = $ac_status" >&5
9909 (exit $ac_status); }; }; then
9910 echo "$as_me:9910: result: yes" >&5
9911 echo "${ECHO_T}yes" >&6
9913 echo "$as_me: failed program was:" >&5
9914 cat conftest.$ac_ext >&5
9915 echo "$as_me:9915: result: no" >&5
9916 echo "${ECHO_T}no" >&6
9917 LIBS="$cf_ncurses_SAVE"
9919 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9922 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9924 cat >>confdefs.h <<EOF
9925 #define $cf_nculib_ROOT 1
9935 if test "$NCURSES_CONFIG_PKG" != none ; then
9936 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
9938 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
9939 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
9940 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
9942 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
9943 if test -z "$cf_cv_abi_version"
9945 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
9948 elif test "$NCURSES_CONFIG" != none ; then
9950 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
9952 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
9953 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
9954 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
9956 # ABI version is not available from headers
9957 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
9961 for cf_name in MAJOR MINOR PATCH
9963 cat >conftest.$ac_ext <<CF_EOF
9964 #include <${cf_cv_ncurses_header:-curses.h}>
9965 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
9967 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
9968 { (eval echo "$as_me:9968: \"$cf_try\"") >&5
9971 echo "$as_me:9971: \$? = $ac_status" >&5
9972 (exit $ac_status); }
9973 if test -f conftest.out ; then
9974 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[ ][ ]*//"`
9975 eval NCURSES_$cf_name=\"$cf_result\"
9976 # cat conftest.$ac_ext
9981 cf_cv_abi_version=${NCURSES_MAJOR}
9985 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
9987 cf_cv_timestamp=`date`
9989 echo "$as_me:9989: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
9990 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
9992 echo "$as_me:9992: checking if you want to have a library-prefix" >&5
9993 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
9995 # Check whether --with-lib-prefix or --without-lib-prefix was given.
9996 if test "${with_lib_prefix+set}" = set; then
9997 withval="$with_lib_prefix"
9998 with_lib_prefix=$withval
10000 with_lib_prefix=auto
10002 echo "$as_me:10002: result: $with_lib_prefix" >&5
10003 echo "${ECHO_T}$with_lib_prefix" >&6
10005 if test $with_lib_prefix = auto
10008 case $cf_cv_system_name in
10010 if test "$DFT_LWR_MODEL" = libtool; then
10016 (*) LIB_PREFIX='lib'
10019 cf_prefix=$LIB_PREFIX
10021 elif test $with_lib_prefix = no
10025 LIB_PREFIX=$with_lib_prefix
10030 ###############################################################################
10032 if test X"$CC_G_OPT" = X"" ; then
10034 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
10037 echo "$as_me:10037: checking for default loader flags" >&5
10038 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
10039 case $DFT_LWR_MODEL in
10040 (normal) LD_MODEL='' ;;
10041 (debug) LD_MODEL=$CC_G_OPT ;;
10042 (profile) LD_MODEL='-pg';;
10043 (shared) LD_MODEL='' ;;
10045 echo "$as_me:10045: result: $LD_MODEL" >&5
10046 echo "${ECHO_T}$LD_MODEL" >&6
10049 echo "$as_me:10049: checking for an rpath option" >&5
10050 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
10051 case $cf_cv_system_name in
10053 if test "$GCC" = yes; then
10054 LD_RPATH_OPT="-Wl,-rpath,"
10056 LD_RPATH_OPT="-rpath "
10059 (linux*|gnu*|k*bsd*-gnu|freebsd*)
10060 LD_RPATH_OPT="-Wl,-rpath,"
10062 (openbsd[2-9].*|mirbsd*)
10063 LD_RPATH_OPT="-Wl,-rpath,"
10066 LD_RPATH_OPT="-rpath "
10069 LD_RPATH_OPT="-Wl,-rpath,"
10072 LD_RPATH_OPT="-rpath "
10080 echo "$as_me:10080: result: $LD_RPATH_OPT" >&5
10081 echo "${ECHO_T}$LD_RPATH_OPT" >&6
10083 case "x$LD_RPATH_OPT" in
10085 echo "$as_me:10085: checking if we need a space after rpath option" >&5
10086 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
10087 cf_save_LIBS="$LIBS"
10089 cf_add_libs="${LD_RPATH_OPT}$libdir"
10090 # Filter out duplicates - this happens with badly-designed ".pc" files...
10091 for cf_add_1lib in $LIBS
10093 for cf_add_2lib in $cf_add_libs
10095 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10101 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10103 LIBS="$cf_add_libs"
10105 cat >conftest.$ac_ext <<_ACEOF
10106 #line 10106 "configure"
10107 #include "confdefs.h"
10117 rm -f conftest.$ac_objext conftest$ac_exeext
10118 if { (eval echo "$as_me:10118: \"$ac_link\"") >&5
10119 (eval $ac_link) 2>&5
10121 echo "$as_me:10121: \$? = $ac_status" >&5
10122 (exit $ac_status); } &&
10123 { ac_try='test -s conftest$ac_exeext'
10124 { (eval echo "$as_me:10124: \"$ac_try\"") >&5
10125 (eval $ac_try) 2>&5
10127 echo "$as_me:10127: \$? = $ac_status" >&5
10128 (exit $ac_status); }; }; then
10131 echo "$as_me: failed program was:" >&5
10132 cat conftest.$ac_ext >&5
10135 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10136 LIBS="$cf_save_LIBS"
10137 echo "$as_me:10137: result: $cf_rpath_space" >&5
10138 echo "${ECHO_T}$cf_rpath_space" >&6
10139 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
10147 INSTALL_LIB="-m 644"
10148 : ${rel_builddir:=.}
10154 cf_cv_do_symlinks=no
10156 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
10158 echo "$as_me:10158: checking if release/abi version should be used for shared libs" >&5
10159 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
10161 # Check whether --with-shlib-version or --without-shlib-version was given.
10162 if test "${with_shlib_version+set}" = set; then
10163 withval="$with_shlib_version"
10164 test -z "$withval" && withval=auto
10167 cf_cv_shlib_version=auto
10170 cf_cv_shlib_version=$withval
10173 echo "$as_me:10173: result: $withval" >&5
10174 echo "${ECHO_T}$withval" >&6
10175 { { echo "$as_me:10175: error: option value must be one of: rel, abi, or auto" >&5
10176 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
10177 { (exit 1); exit 1; }; }
10182 cf_cv_shlib_version=auto
10184 echo "$as_me:10184: result: $cf_cv_shlib_version" >&5
10185 echo "${ECHO_T}$cf_cv_shlib_version" >&6
10187 cf_cv_rm_so_locs=no
10190 # Some less-capable ports of gcc support only -fpic
10194 if test "$GCC" = yes
10198 case $cf_cv_system_name in
10199 (*linux*) # e.g., PGI compiler
10205 if test "$cf_try_fPIC" = yes
10207 echo "$as_me:10207: checking which $CC option to use" >&5
10208 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
10209 cf_save_CFLAGS="$CFLAGS"
10210 for CC_SHARED_OPTS in -fPIC -fpic ''
10212 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
10213 cat >conftest.$ac_ext <<_ACEOF
10214 #line 10214 "configure"
10215 #include "confdefs.h"
10225 rm -f conftest.$ac_objext
10226 if { (eval echo "$as_me:10226: \"$ac_compile\"") >&5
10227 (eval $ac_compile) 2>&5
10229 echo "$as_me:10229: \$? = $ac_status" >&5
10230 (exit $ac_status); } &&
10231 { ac_try='test -s conftest.$ac_objext'
10232 { (eval echo "$as_me:10232: \"$ac_try\"") >&5
10233 (eval $ac_try) 2>&5
10235 echo "$as_me:10235: \$? = $ac_status" >&5
10236 (exit $ac_status); }; }; then
10239 echo "$as_me: failed program was:" >&5
10240 cat conftest.$ac_ext >&5
10242 rm -f conftest.$ac_objext conftest.$ac_ext
10244 echo "$as_me:10244: result: $CC_SHARED_OPTS" >&5
10245 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
10246 CFLAGS="$cf_save_CFLAGS"
10249 cf_cv_shlib_version_infix=no
10251 case $cf_cv_system_name in
10252 (aix4.3-9*|aix[5-7]*)
10253 if test "$GCC" = yes; then
10254 CC_SHARED_OPTS='-Wl,-brtl'
10255 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
10257 CC_SHARED_OPTS='-brtl'
10258 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
10259 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
10263 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
10267 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
10268 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
10269 cf_cv_shlib_version=cygdll
10270 cf_cv_shlib_version_infix=cygdll
10273 cat >mk_shared_lib.sh <<-CF_EOF
10276 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
10279 Linking shared library
10280 ** SHARED_LIB \$SHARED_LIB
10281 ** IMPORT_LIB \$IMPORT_LIB
10283 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
10285 chmod +x mk_shared_lib.sh
10289 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
10290 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
10291 cf_cv_shlib_version=msysdll
10292 cf_cv_shlib_version_infix=msysdll
10295 cat >mk_shared_lib.sh <<-CF_EOF
10298 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
10301 Linking shared library
10302 ** SHARED_LIB \$SHARED_LIB
10303 ** IMPORT_LIB \$IMPORT_LIB
10305 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
10307 chmod +x mk_shared_lib.sh
10310 cf_try_cflags="no-cpp-precomp"
10311 CC_SHARED_OPTS="-dynamic"
10312 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
10313 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
10314 cf_cv_shlib_version_infix=yes
10315 echo "$as_me:10315: checking if ld -search_paths_first works" >&5
10316 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
10317 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
10318 echo $ECHO_N "(cached) $ECHO_C" >&6
10321 cf_save_LDFLAGS=$LDFLAGS
10322 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
10323 cat >conftest.$ac_ext <<_ACEOF
10324 #line 10324 "configure"
10325 #include "confdefs.h"
10335 rm -f conftest.$ac_objext conftest$ac_exeext
10336 if { (eval echo "$as_me:10336: \"$ac_link\"") >&5
10337 (eval $ac_link) 2>&5
10339 echo "$as_me:10339: \$? = $ac_status" >&5
10340 (exit $ac_status); } &&
10341 { ac_try='test -s conftest$ac_exeext'
10342 { (eval echo "$as_me:10342: \"$ac_try\"") >&5
10343 (eval $ac_try) 2>&5
10345 echo "$as_me:10345: \$? = $ac_status" >&5
10346 (exit $ac_status); }; }; then
10347 cf_cv_ldflags_search_paths_first=yes
10349 echo "$as_me: failed program was:" >&5
10350 cat conftest.$ac_ext >&5
10351 cf_cv_ldflags_search_paths_first=no
10353 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10354 LDFLAGS=$cf_save_LDFLAGS
10356 echo "$as_me:10356: result: $cf_cv_ldflags_search_paths_first" >&5
10357 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
10358 if test $cf_cv_ldflags_search_paths_first = yes; then
10359 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
10363 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
10364 if test "$GCC" != yes; then
10365 CC_SHARED_OPTS='+Z'
10367 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
10368 INSTALL_LIB="-m 555"
10371 # (tested with gcc 2.7.2 -- I don't have c89)
10372 if test "$GCC" = yes; then
10373 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
10375 CC_SHARED_OPTS='+Z'
10376 LD_SHARED_OPTS='-Wl,+b,${libdir}'
10378 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
10379 # HP-UX shared libraries must be executable, and should be
10380 # readonly to exploit a quirk in the memory manager.
10381 INSTALL_LIB="-m 555"
10384 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10385 if test "$cf_cv_shlib_version" = rel; then
10386 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10388 cf_shared_soname='`basename $@`'
10391 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
10394 if test "$cf_cv_enable_rpath" = yes ; then
10395 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
10397 # tested with IRIX 5.2 and 'cc'.
10398 if test "$GCC" != yes; then
10399 CC_SHARED_OPTS='-KPIC'
10400 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
10402 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
10404 cf_cv_rm_so_locs=yes
10406 (linux*|gnu*|k*bsd*-gnu)
10407 if test "$DFT_LWR_MODEL" = "shared" ; then
10408 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
10409 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10411 if test "$cf_cv_enable_rpath" = yes ; then
10412 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
10415 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10416 if test "$cf_cv_shlib_version" = rel; then
10417 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10419 cf_cv_shared_soname='`basename $@`'
10422 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
10425 cf_cv_shlib_version=mingw
10426 cf_cv_shlib_version_infix=mingw
10429 if test "$DFT_LWR_MODEL" = "shared" ; then
10430 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
10431 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10432 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
10435 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
10436 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
10437 cat >mk_shared_lib.sh <<-CF_EOF
10440 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
10443 Linking shared library
10444 ** SHARED_LIB \$SHARED_LIB
10445 ** IMPORT_LIB \$IMPORT_LIB
10447 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
10449 chmod +x mk_shared_lib.sh
10451 (openbsd[2-9].*|mirbsd*)
10452 if test "$DFT_LWR_MODEL" = "shared" ; then
10453 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
10454 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10456 if test "$cf_cv_enable_rpath" = yes ; then
10457 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
10459 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
10461 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10462 if test "$cf_cv_shlib_version" = rel; then
10463 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10465 cf_cv_shared_soname='`basename $@`'
10468 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
10470 (nto-qnx*|openbsd*|freebsd[12].*)
10471 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
10472 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
10473 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10475 (dragonfly*|freebsd*)
10476 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
10477 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
10478 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
10479 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
10480 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
10483 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10484 if test "$cf_cv_shlib_version" = rel; then
10485 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10487 cf_cv_shared_soname='`basename $@`'
10490 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
10493 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
10494 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
10495 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
10496 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10497 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
10498 if test "$cf_cv_shlib_version" = auto; then
10499 if test -f /usr/libexec/ld.elf_so; then
10500 cf_cv_shlib_version=abi
10502 cf_cv_shlib_version=rel
10506 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10507 if test "$cf_cv_shlib_version" = rel; then
10508 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10510 cf_cv_shared_soname='`basename $@`'
10513 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
10515 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
10519 # tested with OSF/1 V3.2 and 'cc'
10520 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
10521 # link with shared libs).
10522 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
10525 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
10528 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
10529 if test "$DFT_LWR_MODEL" = "shared" ; then
10530 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
10531 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10533 cf_cv_rm_so_locs=yes
10535 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
10536 # tested with osr5.0.5
10537 if test "$GCC" != yes; then
10538 CC_SHARED_OPTS='-belf -KPIC'
10540 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
10541 if test "$cf_cv_enable_rpath" = yes ; then
10542 # only way is to set LD_RUN_PATH but no switch for it
10545 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10546 LINK_PROGS='LD_RUN_PATH=${libdir}'
10547 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
10550 # tested with SunOS 4.1.1 and gcc 2.7.0
10551 if test "$GCC" != yes; then
10552 CC_SHARED_OPTS='-KPIC'
10554 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
10555 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10558 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
10559 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
10560 if test "$DFT_LWR_MODEL" = "shared" ; then
10561 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
10562 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10564 if test "$cf_cv_enable_rpath" = yes ; then
10565 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
10568 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10569 if test "$cf_cv_shlib_version" = rel; then
10570 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10572 cf_cv_shared_soname='`basename $@`'
10575 if test "$GCC" != yes; then
10576 cf_save_CFLAGS="$CFLAGS"
10577 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
10579 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
10580 cat >conftest.$ac_ext <<_ACEOF
10581 #line 10581 "configure"
10582 #include "confdefs.h"
10592 rm -f conftest.$ac_objext
10593 if { (eval echo "$as_me:10593: \"$ac_compile\"") >&5
10594 (eval $ac_compile) 2>&5
10596 echo "$as_me:10596: \$? = $ac_status" >&5
10597 (exit $ac_status); } &&
10598 { ac_try='test -s conftest.$ac_objext'
10599 { (eval echo "$as_me:10599: \"$ac_try\"") >&5
10600 (eval $ac_try) 2>&5
10602 echo "$as_me:10602: \$? = $ac_status" >&5
10603 (exit $ac_status); }; }; then
10606 echo "$as_me: failed program was:" >&5
10607 cat conftest.$ac_ext >&5
10609 rm -f conftest.$ac_objext conftest.$ac_ext
10611 CFLAGS="$cf_save_CFLAGS"
10612 CC_SHARED_OPTS=$cf_shared_opts
10613 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
10615 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
10618 (sysv5uw7*|unix_sv*)
10619 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
10620 if test "$GCC" != yes; then
10621 CC_SHARED_OPTS='-KPIC'
10623 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
10626 CC_SHARED_OPTS='unknown'
10627 MK_SHARED_LIB='echo unknown'
10631 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
10632 case "$cf_cv_shlib_version" in
10634 case "$MK_SHARED_LIB" in
10636 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
10639 { echo "$as_me:10639: WARNING: ignored --with-shlib-version" >&5
10640 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
10646 if test -n "$cf_try_cflags"
10648 cat > conftest.$ac_ext <<EOF
10649 #line 10649 "${as_me:-configure}"
10651 int main(int argc, char *argv[])
10654 return (argv[argc-1] == 0) ;
10657 cf_save_CFLAGS="$CFLAGS"
10658 for cf_opt in $cf_try_cflags
10660 CFLAGS="$cf_save_CFLAGS -$cf_opt"
10661 echo "$as_me:10661: checking if CFLAGS option -$cf_opt works" >&5
10662 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
10663 if { (eval echo "$as_me:10663: \"$ac_compile\"") >&5
10664 (eval $ac_compile) 2>&5
10666 echo "$as_me:10666: \$? = $ac_status" >&5
10667 (exit $ac_status); }; then
10668 echo "$as_me:10668: result: yes" >&5
10669 echo "${ECHO_T}yes" >&6
10670 cf_save_CFLAGS="$CFLAGS"
10672 echo "$as_me:10672: result: no" >&5
10673 echo "${ECHO_T}no" >&6
10676 CFLAGS="$cf_save_CFLAGS"
10679 # RPATH_LIST is a colon-separated list of directories
10680 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
10681 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
10683 test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
10685 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
10687 echo "${as_me:-configure}:10687: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
10689 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
10691 echo "${as_me:-configure}:10691: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
10693 # The test/sample programs in the original tree link using rpath option.
10694 # Make it optional for packagers.
10695 if test -n "$LOCAL_LDFLAGS"
10697 echo "$as_me:10697: checking if you want to link sample programs with rpath option" >&5
10698 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
10700 # Check whether --enable-rpath-link or --disable-rpath-link was given.
10701 if test "${enable_rpath_link+set}" = set; then
10702 enableval="$enable_rpath_link"
10703 with_rpath_link=$enableval
10705 with_rpath_link=yes
10707 echo "$as_me:10707: result: $with_rpath_link" >&5
10708 echo "${ECHO_T}$with_rpath_link" >&6
10709 if test "$with_rpath_link" = no
10716 ###############################################################################
10718 ### use option --enable-broken-linker to force on use of broken-linker support
10719 echo "$as_me:10719: checking if you want broken-linker support code" >&5
10720 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
10722 # Check whether --enable-broken_linker or --disable-broken_linker was given.
10723 if test "${enable_broken_linker+set}" = set; then
10724 enableval="$enable_broken_linker"
10725 with_broken_linker=$enableval
10727 with_broken_linker=${BROKEN_LINKER:-no}
10729 echo "$as_me:10729: result: $with_broken_linker" >&5
10730 echo "${ECHO_T}$with_broken_linker" >&6
10733 if test "$with_broken_linker" = yes ; then
10734 cat >>confdefs.h <<\EOF
10735 #define BROKEN_LINKER 1
10739 elif test "$DFT_LWR_MODEL" = shared ; then
10740 case $cf_cv_system_name in
10742 cat >>confdefs.h <<\EOF
10743 #define BROKEN_LINKER 1
10747 test -n "$verbose" && echo " cygwin linker is broken anyway" 1>&6
10749 echo "${as_me:-configure}:10749: testing cygwin linker is broken anyway ..." 1>&5
10755 # Check to define _XOPEN_SOURCE "automatically"
10757 cf_XOPEN_SOURCE=600
10758 cf_POSIX_C_SOURCE=199506L
10763 cf_xopen_source="-D_ALL_SOURCE"
10766 cf_XOPEN_SOURCE=600
10769 cf_xopen_source="-D_APPLE_C_SOURCE"
10772 cf_xopen_source="-D_DARWIN_C_SOURCE"
10775 (freebsd*|dragonfly*)
10776 # 5.x headers associate
10777 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
10778 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
10779 cf_POSIX_C_SOURCE=200112L
10780 cf_XOPEN_SOURCE=600
10781 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10784 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
10787 cf_xopen_source="-D_HPUX_SOURCE"
10790 cf_xopen_source="-D_SGI_SOURCE"
10793 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
10795 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
10797 echo "$as_me:10797: checking if this is the GNU C library" >&5
10798 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
10799 if test "${cf_cv_gnu_library+set}" = set; then
10800 echo $ECHO_N "(cached) $ECHO_C" >&6
10803 cat >conftest.$ac_ext <<_ACEOF
10804 #line 10804 "configure"
10805 #include "confdefs.h"
10806 #include <sys/types.h>
10811 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
10814 # error not GNU C library
10820 rm -f conftest.$ac_objext
10821 if { (eval echo "$as_me:10821: \"$ac_compile\"") >&5
10822 (eval $ac_compile) 2>&5
10824 echo "$as_me:10824: \$? = $ac_status" >&5
10825 (exit $ac_status); } &&
10826 { ac_try='test -s conftest.$ac_objext'
10827 { (eval echo "$as_me:10827: \"$ac_try\"") >&5
10828 (eval $ac_try) 2>&5
10830 echo "$as_me:10830: \$? = $ac_status" >&5
10831 (exit $ac_status); }; }; then
10832 cf_cv_gnu_library=yes
10834 echo "$as_me: failed program was:" >&5
10835 cat conftest.$ac_ext >&5
10836 cf_cv_gnu_library=no
10838 rm -f conftest.$ac_objext conftest.$ac_ext
10841 echo "$as_me:10841: result: $cf_cv_gnu_library" >&5
10842 echo "${ECHO_T}$cf_cv_gnu_library" >&6
10844 if test x$cf_cv_gnu_library = xyes; then
10846 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
10847 # was changed to help a little...
10848 echo "$as_me:10848: checking if _DEFAULT_SOURCE can be used as a basis" >&5
10849 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
10850 if test "${cf_cv_gnu_library_219+set}" = set; then
10851 echo $ECHO_N "(cached) $ECHO_C" >&6
10854 cf_save="$CPPFLAGS"
10856 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10857 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10859 cat >conftest.$ac_ext <<_ACEOF
10860 #line 10860 "configure"
10861 #include "confdefs.h"
10862 #include <sys/types.h>
10867 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
10870 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
10876 rm -f conftest.$ac_objext
10877 if { (eval echo "$as_me:10877: \"$ac_compile\"") >&5
10878 (eval $ac_compile) 2>&5
10880 echo "$as_me:10880: \$? = $ac_status" >&5
10881 (exit $ac_status); } &&
10882 { ac_try='test -s conftest.$ac_objext'
10883 { (eval echo "$as_me:10883: \"$ac_try\"") >&5
10884 (eval $ac_try) 2>&5
10886 echo "$as_me:10886: \$? = $ac_status" >&5
10887 (exit $ac_status); }; }; then
10888 cf_cv_gnu_library_219=yes
10890 echo "$as_me: failed program was:" >&5
10891 cat conftest.$ac_ext >&5
10892 cf_cv_gnu_library_219=no
10894 rm -f conftest.$ac_objext conftest.$ac_ext
10895 CPPFLAGS="$cf_save"
10898 echo "$as_me:10898: result: $cf_cv_gnu_library_219" >&5
10899 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10901 if test "x$cf_cv_gnu_library_219" = xyes; then
10902 cf_save="$CPPFLAGS"
10903 echo "$as_me:10903: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10904 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10905 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10906 echo $ECHO_N "(cached) $ECHO_C" >&6
10912 cf_new_extra_cppflags=
10914 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10916 case $cf_fix_cppflags in
10918 case $cf_add_cflags in
10919 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10920 case $cf_add_cflags in
10922 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10924 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10925 && test -z "${cf_tst_cflags}" \
10926 && cf_fix_cppflags=yes
10928 if test $cf_fix_cppflags = yes ; then
10930 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10931 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10934 elif test "${cf_tst_cflags}" = "\"'" ; then
10936 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10937 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10943 case "$CPPFLAGS" in
10947 case $cf_add_cflags in
10949 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10951 CPPFLAGS=`echo "$CPPFLAGS" | \
10952 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10953 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10958 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10959 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10966 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10967 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10974 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10975 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10977 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10979 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10980 && test -z "${cf_tst_cflags}" \
10981 && cf_fix_cppflags=no
10986 if test -n "$cf_new_cflags" ; then
10988 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10989 CFLAGS="${CFLAGS}$cf_new_cflags"
10993 if test -n "$cf_new_cppflags" ; then
10995 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10996 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11000 if test -n "$cf_new_extra_cppflags" ; then
11002 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11003 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11007 cat >conftest.$ac_ext <<_ACEOF
11008 #line 11008 "configure"
11009 #include "confdefs.h"
11011 #include <limits.h>
11012 #include <sys/types.h>
11018 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
11021 # error GNU C library is too old
11027 rm -f conftest.$ac_objext
11028 if { (eval echo "$as_me:11028: \"$ac_compile\"") >&5
11029 (eval $ac_compile) 2>&5
11031 echo "$as_me:11031: \$? = $ac_status" >&5
11032 (exit $ac_status); } &&
11033 { ac_try='test -s conftest.$ac_objext'
11034 { (eval echo "$as_me:11034: \"$ac_try\"") >&5
11035 (eval $ac_try) 2>&5
11037 echo "$as_me:11037: \$? = $ac_status" >&5
11038 (exit $ac_status); }; }; then
11039 cf_cv_gnu_dftsrc_219=yes
11041 echo "$as_me: failed program was:" >&5
11042 cat conftest.$ac_ext >&5
11043 cf_cv_gnu_dftsrc_219=no
11045 rm -f conftest.$ac_objext conftest.$ac_ext
11048 echo "$as_me:11048: result: $cf_cv_gnu_dftsrc_219" >&5
11049 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
11050 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
11052 cf_cv_gnu_dftsrc_219=maybe
11055 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
11057 echo "$as_me:11057: checking if we must define _GNU_SOURCE" >&5
11058 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
11059 if test "${cf_cv_gnu_source+set}" = set; then
11060 echo $ECHO_N "(cached) $ECHO_C" >&6
11063 cat >conftest.$ac_ext <<_ACEOF
11064 #line 11064 "configure"
11065 #include "confdefs.h"
11066 #include <sys/types.h>
11071 #ifndef _XOPEN_SOURCE
11072 #error expected _XOPEN_SOURCE to be defined
11078 rm -f conftest.$ac_objext
11079 if { (eval echo "$as_me:11079: \"$ac_compile\"") >&5
11080 (eval $ac_compile) 2>&5
11082 echo "$as_me:11082: \$? = $ac_status" >&5
11083 (exit $ac_status); } &&
11084 { ac_try='test -s conftest.$ac_objext'
11085 { (eval echo "$as_me:11085: \"$ac_try\"") >&5
11086 (eval $ac_try) 2>&5
11088 echo "$as_me:11088: \$? = $ac_status" >&5
11089 (exit $ac_status); }; }; then
11090 cf_cv_gnu_source=no
11092 echo "$as_me: failed program was:" >&5
11093 cat conftest.$ac_ext >&5
11094 cf_save="$CPPFLAGS"
11099 cf_new_extra_cppflags=
11101 for cf_add_cflags in -D_GNU_SOURCE
11103 case $cf_fix_cppflags in
11105 case $cf_add_cflags in
11106 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11107 case $cf_add_cflags in
11109 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11111 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11112 && test -z "${cf_tst_cflags}" \
11113 && cf_fix_cppflags=yes
11115 if test $cf_fix_cppflags = yes ; then
11117 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11118 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11121 elif test "${cf_tst_cflags}" = "\"'" ; then
11123 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11124 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11130 case "$CPPFLAGS" in
11134 case $cf_add_cflags in
11136 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11138 CPPFLAGS=`echo "$CPPFLAGS" | \
11139 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11140 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11145 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11146 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11153 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11154 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
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"
11164 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11166 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11167 && test -z "${cf_tst_cflags}" \
11168 && cf_fix_cppflags=no
11173 if test -n "$cf_new_cflags" ; then
11175 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11176 CFLAGS="${CFLAGS}$cf_new_cflags"
11180 if test -n "$cf_new_cppflags" ; then
11182 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11183 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11187 if test -n "$cf_new_extra_cppflags" ; then
11189 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11190 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11194 cat >conftest.$ac_ext <<_ACEOF
11195 #line 11195 "configure"
11196 #include "confdefs.h"
11197 #include <sys/types.h>
11202 #ifdef _XOPEN_SOURCE
11203 #error expected _XOPEN_SOURCE to be undefined
11209 rm -f conftest.$ac_objext
11210 if { (eval echo "$as_me:11210: \"$ac_compile\"") >&5
11211 (eval $ac_compile) 2>&5
11213 echo "$as_me:11213: \$? = $ac_status" >&5
11214 (exit $ac_status); } &&
11215 { ac_try='test -s conftest.$ac_objext'
11216 { (eval echo "$as_me:11216: \"$ac_try\"") >&5
11217 (eval $ac_try) 2>&5
11219 echo "$as_me:11219: \$? = $ac_status" >&5
11220 (exit $ac_status); }; }; then
11221 cf_cv_gnu_source=no
11223 echo "$as_me: failed program was:" >&5
11224 cat conftest.$ac_ext >&5
11225 cf_cv_gnu_source=yes
11227 rm -f conftest.$ac_objext conftest.$ac_ext
11228 CPPFLAGS="$cf_save"
11231 rm -f conftest.$ac_objext conftest.$ac_ext
11234 echo "$as_me:11234: result: $cf_cv_gnu_source" >&5
11235 echo "${ECHO_T}$cf_cv_gnu_source" >&6
11237 if test "$cf_cv_gnu_source" = yes
11239 echo "$as_me:11239: checking if we should also define _DEFAULT_SOURCE" >&5
11240 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
11241 if test "${cf_cv_default_source+set}" = set; then
11242 echo $ECHO_N "(cached) $ECHO_C" >&6
11245 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11246 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
11248 cat >conftest.$ac_ext <<_ACEOF
11249 #line 11249 "configure"
11250 #include "confdefs.h"
11251 #include <sys/types.h>
11256 #ifdef _DEFAULT_SOURCE
11257 #error expected _DEFAULT_SOURCE to be undefined
11263 rm -f conftest.$ac_objext
11264 if { (eval echo "$as_me:11264: \"$ac_compile\"") >&5
11265 (eval $ac_compile) 2>&5
11267 echo "$as_me:11267: \$? = $ac_status" >&5
11268 (exit $ac_status); } &&
11269 { ac_try='test -s conftest.$ac_objext'
11270 { (eval echo "$as_me:11270: \"$ac_try\"") >&5
11271 (eval $ac_try) 2>&5
11273 echo "$as_me:11273: \$? = $ac_status" >&5
11274 (exit $ac_status); }; }; then
11275 cf_cv_default_source=no
11277 echo "$as_me: failed program was:" >&5
11278 cat conftest.$ac_ext >&5
11279 cf_cv_default_source=yes
11281 rm -f conftest.$ac_objext conftest.$ac_ext
11284 echo "$as_me:11284: result: $cf_cv_default_source" >&5
11285 echo "${ECHO_T}$cf_cv_default_source" >&6
11286 if test "$cf_cv_default_source" = yes
11289 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11290 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
11300 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
11303 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
11306 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11308 cf_save_CFLAGS="$CFLAGS"
11309 cf_save_CPPFLAGS="$CPPFLAGS"
11311 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11312 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11313 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
11315 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11316 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11317 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
11319 echo "$as_me:11319: checking if we should define _POSIX_C_SOURCE" >&5
11320 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11321 if test "${cf_cv_posix_c_source+set}" = set; then
11322 echo $ECHO_N "(cached) $ECHO_C" >&6
11325 echo "${as_me:-configure}:11325: testing if the symbol is already defined go no further ..." 1>&5
11327 cat >conftest.$ac_ext <<_ACEOF
11328 #line 11328 "configure"
11329 #include "confdefs.h"
11330 #include <sys/types.h>
11335 #ifndef _POSIX_C_SOURCE
11342 rm -f conftest.$ac_objext
11343 if { (eval echo "$as_me:11343: \"$ac_compile\"") >&5
11344 (eval $ac_compile) 2>&5
11346 echo "$as_me:11346: \$? = $ac_status" >&5
11347 (exit $ac_status); } &&
11348 { ac_try='test -s conftest.$ac_objext'
11349 { (eval echo "$as_me:11349: \"$ac_try\"") >&5
11350 (eval $ac_try) 2>&5
11352 echo "$as_me:11352: \$? = $ac_status" >&5
11353 (exit $ac_status); }; }; then
11354 cf_cv_posix_c_source=no
11356 echo "$as_me: failed program was:" >&5
11357 cat conftest.$ac_ext >&5
11358 cf_want_posix_source=no
11359 case .$cf_POSIX_C_SOURCE in
11361 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11364 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11365 cf_want_posix_source=yes
11368 cf_want_posix_source=yes
11371 if test "$cf_want_posix_source" = yes ; then
11372 cat >conftest.$ac_ext <<_ACEOF
11373 #line 11373 "configure"
11374 #include "confdefs.h"
11375 #include <sys/types.h>
11380 #ifdef _POSIX_SOURCE
11387 rm -f conftest.$ac_objext
11388 if { (eval echo "$as_me:11388: \"$ac_compile\"") >&5
11389 (eval $ac_compile) 2>&5
11391 echo "$as_me:11391: \$? = $ac_status" >&5
11392 (exit $ac_status); } &&
11393 { ac_try='test -s conftest.$ac_objext'
11394 { (eval echo "$as_me:11394: \"$ac_try\"") >&5
11395 (eval $ac_try) 2>&5
11397 echo "$as_me:11397: \$? = $ac_status" >&5
11398 (exit $ac_status); }; }; then
11401 echo "$as_me: failed program was:" >&5
11402 cat conftest.$ac_ext >&5
11403 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11405 rm -f conftest.$ac_objext conftest.$ac_ext
11408 echo "${as_me:-configure}:11408: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11410 CFLAGS="$cf_trim_CFLAGS"
11411 CPPFLAGS="$cf_trim_CPPFLAGS"
11413 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11414 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11416 echo "${as_me:-configure}:11416: testing if the second compile does not leave our definition intact error ..." 1>&5
11418 cat >conftest.$ac_ext <<_ACEOF
11419 #line 11419 "configure"
11420 #include "confdefs.h"
11421 #include <sys/types.h>
11426 #ifndef _POSIX_C_SOURCE
11433 rm -f conftest.$ac_objext
11434 if { (eval echo "$as_me:11434: \"$ac_compile\"") >&5
11435 (eval $ac_compile) 2>&5
11437 echo "$as_me:11437: \$? = $ac_status" >&5
11438 (exit $ac_status); } &&
11439 { ac_try='test -s conftest.$ac_objext'
11440 { (eval echo "$as_me:11440: \"$ac_try\"") >&5
11441 (eval $ac_try) 2>&5
11443 echo "$as_me:11443: \$? = $ac_status" >&5
11444 (exit $ac_status); }; }; then
11447 echo "$as_me: failed program was:" >&5
11448 cat conftest.$ac_ext >&5
11449 cf_cv_posix_c_source=no
11451 rm -f conftest.$ac_objext conftest.$ac_ext
11452 CFLAGS="$cf_save_CFLAGS"
11453 CPPFLAGS="$cf_save_CPPFLAGS"
11456 rm -f conftest.$ac_objext conftest.$ac_ext
11459 echo "$as_me:11459: result: $cf_cv_posix_c_source" >&5
11460 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11462 if test "$cf_cv_posix_c_source" != no ; then
11463 CFLAGS="$cf_trim_CFLAGS"
11464 CPPFLAGS="$cf_trim_CPPFLAGS"
11469 cf_new_extra_cppflags=
11471 for cf_add_cflags in $cf_cv_posix_c_source
11473 case $cf_fix_cppflags in
11475 case $cf_add_cflags in
11476 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11477 case $cf_add_cflags in
11479 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11481 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11482 && test -z "${cf_tst_cflags}" \
11483 && cf_fix_cppflags=yes
11485 if test $cf_fix_cppflags = yes ; then
11487 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11488 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11491 elif test "${cf_tst_cflags}" = "\"'" ; then
11493 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11494 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11500 case "$CPPFLAGS" in
11504 case $cf_add_cflags in
11506 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11508 CPPFLAGS=`echo "$CPPFLAGS" | \
11509 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11510 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11515 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11516 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11523 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11524 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11531 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11532 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11534 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11536 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11537 && test -z "${cf_tst_cflags}" \
11538 && cf_fix_cppflags=no
11543 if test -n "$cf_new_cflags" ; then
11545 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11546 CFLAGS="${CFLAGS}$cf_new_cflags"
11550 if test -n "$cf_new_cppflags" ; then
11552 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11553 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11557 if test -n "$cf_new_extra_cppflags" ; then
11559 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11560 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11568 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
11571 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
11572 cf_xopen_source="-D_BSD_SOURCE"
11573 cf_XOPEN_SOURCE=600
11576 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
11579 cf_xopen_source="-D_OSF_SOURCE"
11582 cf_xopen_source="-D_QNX_SOURCE"
11585 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
11588 cf_xopen_source="-D__EXTENSIONS__"
11589 cf_cv_xopen_source=broken
11591 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
11597 echo "$as_me:11597: checking if we should define _XOPEN_SOURCE" >&5
11598 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11599 if test "${cf_cv_xopen_source+set}" = set; then
11600 echo $ECHO_N "(cached) $ECHO_C" >&6
11603 cat >conftest.$ac_ext <<_ACEOF
11604 #line 11604 "configure"
11605 #include "confdefs.h"
11607 #include <stdlib.h>
11608 #include <string.h>
11609 #include <sys/types.h>
11615 #ifndef _XOPEN_SOURCE
11622 rm -f conftest.$ac_objext
11623 if { (eval echo "$as_me:11623: \"$ac_compile\"") >&5
11624 (eval $ac_compile) 2>&5
11626 echo "$as_me:11626: \$? = $ac_status" >&5
11627 (exit $ac_status); } &&
11628 { ac_try='test -s conftest.$ac_objext'
11629 { (eval echo "$as_me:11629: \"$ac_try\"") >&5
11630 (eval $ac_try) 2>&5
11632 echo "$as_me:11632: \$? = $ac_status" >&5
11633 (exit $ac_status); }; }; then
11634 cf_cv_xopen_source=no
11636 echo "$as_me: failed program was:" >&5
11637 cat conftest.$ac_ext >&5
11638 cf_save="$CPPFLAGS"
11640 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11641 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11643 cat >conftest.$ac_ext <<_ACEOF
11644 #line 11644 "configure"
11645 #include "confdefs.h"
11647 #include <stdlib.h>
11648 #include <string.h>
11649 #include <sys/types.h>
11655 #ifdef _XOPEN_SOURCE
11662 rm -f conftest.$ac_objext
11663 if { (eval echo "$as_me:11663: \"$ac_compile\"") >&5
11664 (eval $ac_compile) 2>&5
11666 echo "$as_me:11666: \$? = $ac_status" >&5
11667 (exit $ac_status); } &&
11668 { ac_try='test -s conftest.$ac_objext'
11669 { (eval echo "$as_me:11669: \"$ac_try\"") >&5
11670 (eval $ac_try) 2>&5
11672 echo "$as_me:11672: \$? = $ac_status" >&5
11673 (exit $ac_status); }; }; then
11674 cf_cv_xopen_source=no
11676 echo "$as_me: failed program was:" >&5
11677 cat conftest.$ac_ext >&5
11678 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11680 rm -f conftest.$ac_objext conftest.$ac_ext
11681 CPPFLAGS="$cf_save"
11684 rm -f conftest.$ac_objext conftest.$ac_ext
11687 echo "$as_me:11687: result: $cf_cv_xopen_source" >&5
11688 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11690 if test "$cf_cv_xopen_source" != no ; then
11692 CFLAGS=`echo "$CFLAGS" | \
11693 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11694 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
11696 CPPFLAGS=`echo "$CPPFLAGS" | \
11697 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11698 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
11700 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11705 cf_new_extra_cppflags=
11707 for cf_add_cflags in $cf_temp_xopen_source
11709 case $cf_fix_cppflags in
11711 case $cf_add_cflags in
11712 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11713 case $cf_add_cflags in
11715 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11717 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11718 && test -z "${cf_tst_cflags}" \
11719 && cf_fix_cppflags=yes
11721 if test $cf_fix_cppflags = yes ; then
11723 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11724 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11727 elif test "${cf_tst_cflags}" = "\"'" ; then
11729 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11730 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11736 case "$CPPFLAGS" in
11740 case $cf_add_cflags in
11742 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11744 CPPFLAGS=`echo "$CPPFLAGS" | \
11745 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11746 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11751 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11752 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11759 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11760 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11767 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11768 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11770 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11772 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11773 && test -z "${cf_tst_cflags}" \
11774 && cf_fix_cppflags=no
11779 if test -n "$cf_new_cflags" ; then
11781 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11782 CFLAGS="${CFLAGS}$cf_new_cflags"
11786 if test -n "$cf_new_cppflags" ; then
11788 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11789 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11793 if test -n "$cf_new_extra_cppflags" ; then
11795 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11796 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11802 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11804 cf_save_CFLAGS="$CFLAGS"
11805 cf_save_CPPFLAGS="$CPPFLAGS"
11807 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11808 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11809 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
11811 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11812 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11813 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
11815 echo "$as_me:11815: checking if we should define _POSIX_C_SOURCE" >&5
11816 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11817 if test "${cf_cv_posix_c_source+set}" = set; then
11818 echo $ECHO_N "(cached) $ECHO_C" >&6
11821 echo "${as_me:-configure}:11821: testing if the symbol is already defined go no further ..." 1>&5
11823 cat >conftest.$ac_ext <<_ACEOF
11824 #line 11824 "configure"
11825 #include "confdefs.h"
11826 #include <sys/types.h>
11831 #ifndef _POSIX_C_SOURCE
11838 rm -f conftest.$ac_objext
11839 if { (eval echo "$as_me:11839: \"$ac_compile\"") >&5
11840 (eval $ac_compile) 2>&5
11842 echo "$as_me:11842: \$? = $ac_status" >&5
11843 (exit $ac_status); } &&
11844 { ac_try='test -s conftest.$ac_objext'
11845 { (eval echo "$as_me:11845: \"$ac_try\"") >&5
11846 (eval $ac_try) 2>&5
11848 echo "$as_me:11848: \$? = $ac_status" >&5
11849 (exit $ac_status); }; }; then
11850 cf_cv_posix_c_source=no
11852 echo "$as_me: failed program was:" >&5
11853 cat conftest.$ac_ext >&5
11854 cf_want_posix_source=no
11855 case .$cf_POSIX_C_SOURCE in
11857 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11860 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11861 cf_want_posix_source=yes
11864 cf_want_posix_source=yes
11867 if test "$cf_want_posix_source" = yes ; then
11868 cat >conftest.$ac_ext <<_ACEOF
11869 #line 11869 "configure"
11870 #include "confdefs.h"
11871 #include <sys/types.h>
11876 #ifdef _POSIX_SOURCE
11883 rm -f conftest.$ac_objext
11884 if { (eval echo "$as_me:11884: \"$ac_compile\"") >&5
11885 (eval $ac_compile) 2>&5
11887 echo "$as_me:11887: \$? = $ac_status" >&5
11888 (exit $ac_status); } &&
11889 { ac_try='test -s conftest.$ac_objext'
11890 { (eval echo "$as_me:11890: \"$ac_try\"") >&5
11891 (eval $ac_try) 2>&5
11893 echo "$as_me:11893: \$? = $ac_status" >&5
11894 (exit $ac_status); }; }; then
11897 echo "$as_me: failed program was:" >&5
11898 cat conftest.$ac_ext >&5
11899 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11901 rm -f conftest.$ac_objext conftest.$ac_ext
11904 echo "${as_me:-configure}:11904: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11906 CFLAGS="$cf_trim_CFLAGS"
11907 CPPFLAGS="$cf_trim_CPPFLAGS"
11909 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11910 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11912 echo "${as_me:-configure}:11912: testing if the second compile does not leave our definition intact error ..." 1>&5
11914 cat >conftest.$ac_ext <<_ACEOF
11915 #line 11915 "configure"
11916 #include "confdefs.h"
11917 #include <sys/types.h>
11922 #ifndef _POSIX_C_SOURCE
11929 rm -f conftest.$ac_objext
11930 if { (eval echo "$as_me:11930: \"$ac_compile\"") >&5
11931 (eval $ac_compile) 2>&5
11933 echo "$as_me:11933: \$? = $ac_status" >&5
11934 (exit $ac_status); } &&
11935 { ac_try='test -s conftest.$ac_objext'
11936 { (eval echo "$as_me:11936: \"$ac_try\"") >&5
11937 (eval $ac_try) 2>&5
11939 echo "$as_me:11939: \$? = $ac_status" >&5
11940 (exit $ac_status); }; }; then
11943 echo "$as_me: failed program was:" >&5
11944 cat conftest.$ac_ext >&5
11945 cf_cv_posix_c_source=no
11947 rm -f conftest.$ac_objext conftest.$ac_ext
11948 CFLAGS="$cf_save_CFLAGS"
11949 CPPFLAGS="$cf_save_CPPFLAGS"
11952 rm -f conftest.$ac_objext conftest.$ac_ext
11955 echo "$as_me:11955: result: $cf_cv_posix_c_source" >&5
11956 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11958 if test "$cf_cv_posix_c_source" != no ; then
11959 CFLAGS="$cf_trim_CFLAGS"
11960 CPPFLAGS="$cf_trim_CPPFLAGS"
11965 cf_new_extra_cppflags=
11967 for cf_add_cflags in $cf_cv_posix_c_source
11969 case $cf_fix_cppflags in
11971 case $cf_add_cflags in
11972 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11973 case $cf_add_cflags in
11975 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11977 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11978 && test -z "${cf_tst_cflags}" \
11979 && cf_fix_cppflags=yes
11981 if test $cf_fix_cppflags = yes ; then
11983 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11984 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11987 elif test "${cf_tst_cflags}" = "\"'" ; then
11989 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11990 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11996 case "$CPPFLAGS" in
12000 case $cf_add_cflags in
12002 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12004 CPPFLAGS=`echo "$CPPFLAGS" | \
12005 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12006 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12011 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12012 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12019 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12020 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12027 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12028 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12030 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12032 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12033 && test -z "${cf_tst_cflags}" \
12034 && cf_fix_cppflags=no
12039 if test -n "$cf_new_cflags" ; then
12041 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12042 CFLAGS="${CFLAGS}$cf_new_cflags"
12046 if test -n "$cf_new_cppflags" ; then
12048 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12049 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12053 if test -n "$cf_new_extra_cppflags" ; then
12055 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12056 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12065 if test -n "$cf_xopen_source" ; then
12070 cf_new_extra_cppflags=
12072 for cf_add_cflags in $cf_xopen_source
12074 case $cf_fix_cppflags in
12076 case $cf_add_cflags in
12077 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12078 case $cf_add_cflags in
12080 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12082 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12083 && test -z "${cf_tst_cflags}" \
12084 && cf_fix_cppflags=yes
12086 if test $cf_fix_cppflags = yes ; then
12088 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12089 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12092 elif test "${cf_tst_cflags}" = "\"'" ; then
12094 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12095 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12101 case "$CPPFLAGS" in
12105 case $cf_add_cflags in
12107 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12109 CPPFLAGS=`echo "$CPPFLAGS" | \
12110 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12111 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12116 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12117 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12124 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12125 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12132 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12133 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12135 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12137 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12138 && test -z "${cf_tst_cflags}" \
12139 && cf_fix_cppflags=no
12144 if test -n "$cf_new_cflags" ; then
12145 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12147 echo "${as_me:-configure}:12147: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12149 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12150 CFLAGS="${CFLAGS}$cf_new_cflags"
12154 if test -n "$cf_new_cppflags" ; then
12155 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12157 echo "${as_me:-configure}:12157: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12159 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12160 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12164 if test -n "$cf_new_extra_cppflags" ; then
12165 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12167 echo "${as_me:-configure}:12167: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12169 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12170 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12176 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
12177 echo "$as_me:12177: checking if _XOPEN_SOURCE really is set" >&5
12178 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
12179 cat >conftest.$ac_ext <<_ACEOF
12180 #line 12180 "configure"
12181 #include "confdefs.h"
12182 #include <stdlib.h>
12187 #ifndef _XOPEN_SOURCE
12194 rm -f conftest.$ac_objext
12195 if { (eval echo "$as_me:12195: \"$ac_compile\"") >&5
12196 (eval $ac_compile) 2>&5
12198 echo "$as_me:12198: \$? = $ac_status" >&5
12199 (exit $ac_status); } &&
12200 { ac_try='test -s conftest.$ac_objext'
12201 { (eval echo "$as_me:12201: \"$ac_try\"") >&5
12202 (eval $ac_try) 2>&5
12204 echo "$as_me:12204: \$? = $ac_status" >&5
12205 (exit $ac_status); }; }; then
12206 cf_XOPEN_SOURCE_set=yes
12208 echo "$as_me: failed program was:" >&5
12209 cat conftest.$ac_ext >&5
12210 cf_XOPEN_SOURCE_set=no
12212 rm -f conftest.$ac_objext conftest.$ac_ext
12213 echo "$as_me:12213: result: $cf_XOPEN_SOURCE_set" >&5
12214 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
12215 if test $cf_XOPEN_SOURCE_set = yes
12217 cat >conftest.$ac_ext <<_ACEOF
12218 #line 12218 "configure"
12219 #include "confdefs.h"
12220 #include <stdlib.h>
12225 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
12232 rm -f conftest.$ac_objext
12233 if { (eval echo "$as_me:12233: \"$ac_compile\"") >&5
12234 (eval $ac_compile) 2>&5
12236 echo "$as_me:12236: \$? = $ac_status" >&5
12237 (exit $ac_status); } &&
12238 { ac_try='test -s conftest.$ac_objext'
12239 { (eval echo "$as_me:12239: \"$ac_try\"") >&5
12240 (eval $ac_try) 2>&5
12242 echo "$as_me:12242: \$? = $ac_status" >&5
12243 (exit $ac_status); }; }; then
12244 cf_XOPEN_SOURCE_set_ok=yes
12246 echo "$as_me: failed program was:" >&5
12247 cat conftest.$ac_ext >&5
12248 cf_XOPEN_SOURCE_set_ok=no
12250 rm -f conftest.$ac_objext conftest.$ac_ext
12251 if test $cf_XOPEN_SOURCE_set_ok = no
12253 { echo "$as_me:12253: WARNING: _XOPEN_SOURCE is lower than requested" >&5
12254 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
12258 echo "$as_me:12258: checking if we should define _XOPEN_SOURCE" >&5
12259 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12260 if test "${cf_cv_xopen_source+set}" = set; then
12261 echo $ECHO_N "(cached) $ECHO_C" >&6
12264 cat >conftest.$ac_ext <<_ACEOF
12265 #line 12265 "configure"
12266 #include "confdefs.h"
12268 #include <stdlib.h>
12269 #include <string.h>
12270 #include <sys/types.h>
12276 #ifndef _XOPEN_SOURCE
12283 rm -f conftest.$ac_objext
12284 if { (eval echo "$as_me:12284: \"$ac_compile\"") >&5
12285 (eval $ac_compile) 2>&5
12287 echo "$as_me:12287: \$? = $ac_status" >&5
12288 (exit $ac_status); } &&
12289 { ac_try='test -s conftest.$ac_objext'
12290 { (eval echo "$as_me:12290: \"$ac_try\"") >&5
12291 (eval $ac_try) 2>&5
12293 echo "$as_me:12293: \$? = $ac_status" >&5
12294 (exit $ac_status); }; }; then
12295 cf_cv_xopen_source=no
12297 echo "$as_me: failed program was:" >&5
12298 cat conftest.$ac_ext >&5
12299 cf_save="$CPPFLAGS"
12301 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12302 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12304 cat >conftest.$ac_ext <<_ACEOF
12305 #line 12305 "configure"
12306 #include "confdefs.h"
12308 #include <stdlib.h>
12309 #include <string.h>
12310 #include <sys/types.h>
12316 #ifdef _XOPEN_SOURCE
12323 rm -f conftest.$ac_objext
12324 if { (eval echo "$as_me:12324: \"$ac_compile\"") >&5
12325 (eval $ac_compile) 2>&5
12327 echo "$as_me:12327: \$? = $ac_status" >&5
12328 (exit $ac_status); } &&
12329 { ac_try='test -s conftest.$ac_objext'
12330 { (eval echo "$as_me:12330: \"$ac_try\"") >&5
12331 (eval $ac_try) 2>&5
12333 echo "$as_me:12333: \$? = $ac_status" >&5
12334 (exit $ac_status); }; }; then
12335 cf_cv_xopen_source=no
12337 echo "$as_me: failed program was:" >&5
12338 cat conftest.$ac_ext >&5
12339 cf_cv_xopen_source=$cf_XOPEN_SOURCE
12341 rm -f conftest.$ac_objext conftest.$ac_ext
12342 CPPFLAGS="$cf_save"
12345 rm -f conftest.$ac_objext conftest.$ac_ext
12348 echo "$as_me:12348: result: $cf_cv_xopen_source" >&5
12349 echo "${ECHO_T}$cf_cv_xopen_source" >&6
12351 if test "$cf_cv_xopen_source" != no ; then
12353 CFLAGS=`echo "$CFLAGS" | \
12354 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12355 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
12357 CPPFLAGS=`echo "$CPPFLAGS" | \
12358 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12359 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
12361 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12366 cf_new_extra_cppflags=
12368 for cf_add_cflags in $cf_temp_xopen_source
12370 case $cf_fix_cppflags in
12372 case $cf_add_cflags in
12373 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12374 case $cf_add_cflags in
12376 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12378 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12379 && test -z "${cf_tst_cflags}" \
12380 && cf_fix_cppflags=yes
12382 if test $cf_fix_cppflags = yes ; then
12384 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12385 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12388 elif test "${cf_tst_cflags}" = "\"'" ; then
12390 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12391 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12397 case "$CPPFLAGS" in
12401 case $cf_add_cflags in
12403 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12405 CPPFLAGS=`echo "$CPPFLAGS" | \
12406 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12407 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12412 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12413 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12420 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12421 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12428 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12429 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12431 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12433 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12434 && test -z "${cf_tst_cflags}" \
12435 && cf_fix_cppflags=no
12440 if test -n "$cf_new_cflags" ; then
12442 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12443 CFLAGS="${CFLAGS}$cf_new_cflags"
12447 if test -n "$cf_new_cppflags" ; then
12449 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12450 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12454 if test -n "$cf_new_extra_cppflags" ; then
12456 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12457 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12466 # Check whether --enable-largefile or --disable-largefile was given.
12467 if test "${enable_largefile+set}" = set; then
12468 enableval="$enable_largefile"
12471 if test "$enable_largefile" != no; then
12473 echo "$as_me:12473: checking for special C compiler options needed for large files" >&5
12474 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12475 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12476 echo $ECHO_N "(cached) $ECHO_C" >&6
12478 ac_cv_sys_largefile_CC=no
12479 if test "$GCC" != yes; then
12482 # IRIX 6.2 and later do not support large files by default,
12483 # so use the C compiler's -n32 option if that helps.
12484 cat >conftest.$ac_ext <<_ACEOF
12485 #line 12485 "configure"
12486 #include "confdefs.h"
12487 #include <sys/types.h>
12488 /* Check that off_t can represent 2**63 - 1 correctly.
12489 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12490 since some C++ compilers masquerading as C compilers
12491 incorrectly reject 9223372036854775807. */
12492 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12493 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12494 && LARGE_OFF_T % 2147483647 == 1)
12504 rm -f conftest.$ac_objext
12505 if { (eval echo "$as_me:12505: \"$ac_compile\"") >&5
12506 (eval $ac_compile) 2>&5
12508 echo "$as_me:12508: \$? = $ac_status" >&5
12509 (exit $ac_status); } &&
12510 { ac_try='test -s conftest.$ac_objext'
12511 { (eval echo "$as_me:12511: \"$ac_try\"") >&5
12512 (eval $ac_try) 2>&5
12514 echo "$as_me:12514: \$? = $ac_status" >&5
12515 (exit $ac_status); }; }; then
12518 echo "$as_me: failed program was:" >&5
12519 cat conftest.$ac_ext >&5
12521 rm -f conftest.$ac_objext
12523 rm -f conftest.$ac_objext
12524 if { (eval echo "$as_me:12524: \"$ac_compile\"") >&5
12525 (eval $ac_compile) 2>&5
12527 echo "$as_me:12527: \$? = $ac_status" >&5
12528 (exit $ac_status); } &&
12529 { ac_try='test -s conftest.$ac_objext'
12530 { (eval echo "$as_me:12530: \"$ac_try\"") >&5
12531 (eval $ac_try) 2>&5
12533 echo "$as_me:12533: \$? = $ac_status" >&5
12534 (exit $ac_status); }; }; then
12535 ac_cv_sys_largefile_CC=' -n32'; break
12537 echo "$as_me: failed program was:" >&5
12538 cat conftest.$ac_ext >&5
12540 rm -f conftest.$ac_objext
12544 rm -f conftest.$ac_ext
12547 echo "$as_me:12547: result: $ac_cv_sys_largefile_CC" >&5
12548 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12549 if test "$ac_cv_sys_largefile_CC" != no; then
12550 CC=$CC$ac_cv_sys_largefile_CC
12553 echo "$as_me:12553: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12554 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12555 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12556 echo $ECHO_N "(cached) $ECHO_C" >&6
12559 ac_cv_sys_file_offset_bits=no
12560 cat >conftest.$ac_ext <<_ACEOF
12561 #line 12561 "configure"
12562 #include "confdefs.h"
12563 #include <sys/types.h>
12564 /* Check that off_t can represent 2**63 - 1 correctly.
12565 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12566 since some C++ compilers masquerading as C compilers
12567 incorrectly reject 9223372036854775807. */
12568 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12569 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12570 && LARGE_OFF_T % 2147483647 == 1)
12580 rm -f conftest.$ac_objext
12581 if { (eval echo "$as_me:12581: \"$ac_compile\"") >&5
12582 (eval $ac_compile) 2>&5
12584 echo "$as_me:12584: \$? = $ac_status" >&5
12585 (exit $ac_status); } &&
12586 { ac_try='test -s conftest.$ac_objext'
12587 { (eval echo "$as_me:12587: \"$ac_try\"") >&5
12588 (eval $ac_try) 2>&5
12590 echo "$as_me:12590: \$? = $ac_status" >&5
12591 (exit $ac_status); }; }; then
12594 echo "$as_me: failed program was:" >&5
12595 cat conftest.$ac_ext >&5
12597 rm -f conftest.$ac_objext conftest.$ac_ext
12598 cat >conftest.$ac_ext <<_ACEOF
12599 #line 12599 "configure"
12600 #include "confdefs.h"
12601 #define _FILE_OFFSET_BITS 64
12602 #include <sys/types.h>
12603 /* Check that off_t can represent 2**63 - 1 correctly.
12604 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12605 since some C++ compilers masquerading as C compilers
12606 incorrectly reject 9223372036854775807. */
12607 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12608 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12609 && LARGE_OFF_T % 2147483647 == 1)
12619 rm -f conftest.$ac_objext
12620 if { (eval echo "$as_me:12620: \"$ac_compile\"") >&5
12621 (eval $ac_compile) 2>&5
12623 echo "$as_me:12623: \$? = $ac_status" >&5
12624 (exit $ac_status); } &&
12625 { ac_try='test -s conftest.$ac_objext'
12626 { (eval echo "$as_me:12626: \"$ac_try\"") >&5
12627 (eval $ac_try) 2>&5
12629 echo "$as_me:12629: \$? = $ac_status" >&5
12630 (exit $ac_status); }; }; then
12631 ac_cv_sys_file_offset_bits=64; break
12633 echo "$as_me: failed program was:" >&5
12634 cat conftest.$ac_ext >&5
12636 rm -f conftest.$ac_objext conftest.$ac_ext
12640 echo "$as_me:12640: result: $ac_cv_sys_file_offset_bits" >&5
12641 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12642 if test "$ac_cv_sys_file_offset_bits" != no; then
12644 cat >>confdefs.h <<EOF
12645 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12650 echo "$as_me:12650: checking for _LARGE_FILES value needed for large files" >&5
12651 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12652 if test "${ac_cv_sys_large_files+set}" = set; then
12653 echo $ECHO_N "(cached) $ECHO_C" >&6
12656 ac_cv_sys_large_files=no
12657 cat >conftest.$ac_ext <<_ACEOF
12658 #line 12658 "configure"
12659 #include "confdefs.h"
12660 #include <sys/types.h>
12661 /* Check that off_t can represent 2**63 - 1 correctly.
12662 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12663 since some C++ compilers masquerading as C compilers
12664 incorrectly reject 9223372036854775807. */
12665 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12666 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12667 && LARGE_OFF_T % 2147483647 == 1)
12677 rm -f conftest.$ac_objext
12678 if { (eval echo "$as_me:12678: \"$ac_compile\"") >&5
12679 (eval $ac_compile) 2>&5
12681 echo "$as_me:12681: \$? = $ac_status" >&5
12682 (exit $ac_status); } &&
12683 { ac_try='test -s conftest.$ac_objext'
12684 { (eval echo "$as_me:12684: \"$ac_try\"") >&5
12685 (eval $ac_try) 2>&5
12687 echo "$as_me:12687: \$? = $ac_status" >&5
12688 (exit $ac_status); }; }; then
12691 echo "$as_me: failed program was:" >&5
12692 cat conftest.$ac_ext >&5
12694 rm -f conftest.$ac_objext conftest.$ac_ext
12695 cat >conftest.$ac_ext <<_ACEOF
12696 #line 12696 "configure"
12697 #include "confdefs.h"
12698 #define _LARGE_FILES 1
12699 #include <sys/types.h>
12700 /* Check that off_t can represent 2**63 - 1 correctly.
12701 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12702 since some C++ compilers masquerading as C compilers
12703 incorrectly reject 9223372036854775807. */
12704 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12705 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12706 && LARGE_OFF_T % 2147483647 == 1)
12716 rm -f conftest.$ac_objext
12717 if { (eval echo "$as_me:12717: \"$ac_compile\"") >&5
12718 (eval $ac_compile) 2>&5
12720 echo "$as_me:12720: \$? = $ac_status" >&5
12721 (exit $ac_status); } &&
12722 { ac_try='test -s conftest.$ac_objext'
12723 { (eval echo "$as_me:12723: \"$ac_try\"") >&5
12724 (eval $ac_try) 2>&5
12726 echo "$as_me:12726: \$? = $ac_status" >&5
12727 (exit $ac_status); }; }; then
12728 ac_cv_sys_large_files=1; break
12730 echo "$as_me: failed program was:" >&5
12731 cat conftest.$ac_ext >&5
12733 rm -f conftest.$ac_objext conftest.$ac_ext
12737 echo "$as_me:12737: result: $ac_cv_sys_large_files" >&5
12738 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
12739 if test "$ac_cv_sys_large_files" != no; then
12741 cat >>confdefs.h <<EOF
12742 #define _LARGE_FILES $ac_cv_sys_large_files
12749 if test "$enable_largefile" != no ; then
12750 echo "$as_me:12750: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12751 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12752 if test "${ac_cv_sys_largefile_source+set}" = set; then
12753 echo $ECHO_N "(cached) $ECHO_C" >&6
12756 ac_cv_sys_largefile_source=no
12757 cat >conftest.$ac_ext <<_ACEOF
12758 #line 12758 "configure"
12759 #include "confdefs.h"
12769 rm -f conftest.$ac_objext
12770 if { (eval echo "$as_me:12770: \"$ac_compile\"") >&5
12771 (eval $ac_compile) 2>&5
12773 echo "$as_me:12773: \$? = $ac_status" >&5
12774 (exit $ac_status); } &&
12775 { ac_try='test -s conftest.$ac_objext'
12776 { (eval echo "$as_me:12776: \"$ac_try\"") >&5
12777 (eval $ac_try) 2>&5
12779 echo "$as_me:12779: \$? = $ac_status" >&5
12780 (exit $ac_status); }; }; then
12783 echo "$as_me: failed program was:" >&5
12784 cat conftest.$ac_ext >&5
12786 rm -f conftest.$ac_objext conftest.$ac_ext
12787 cat >conftest.$ac_ext <<_ACEOF
12788 #line 12788 "configure"
12789 #include "confdefs.h"
12790 #define _LARGEFILE_SOURCE 1
12800 rm -f conftest.$ac_objext
12801 if { (eval echo "$as_me:12801: \"$ac_compile\"") >&5
12802 (eval $ac_compile) 2>&5
12804 echo "$as_me:12804: \$? = $ac_status" >&5
12805 (exit $ac_status); } &&
12806 { ac_try='test -s conftest.$ac_objext'
12807 { (eval echo "$as_me:12807: \"$ac_try\"") >&5
12808 (eval $ac_try) 2>&5
12810 echo "$as_me:12810: \$? = $ac_status" >&5
12811 (exit $ac_status); }; }; then
12812 ac_cv_sys_largefile_source=1; break
12814 echo "$as_me: failed program was:" >&5
12815 cat conftest.$ac_ext >&5
12817 rm -f conftest.$ac_objext conftest.$ac_ext
12821 echo "$as_me:12821: result: $ac_cv_sys_largefile_source" >&5
12822 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
12823 if test "$ac_cv_sys_largefile_source" != no; then
12825 cat >>confdefs.h <<EOF
12826 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12832 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12833 # in glibc 2.1.3, but that breaks too many other things.
12834 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12835 echo "$as_me:12835: checking for fseeko" >&5
12836 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
12837 if test "${ac_cv_func_fseeko+set}" = set; then
12838 echo $ECHO_N "(cached) $ECHO_C" >&6
12840 cat >conftest.$ac_ext <<_ACEOF
12841 #line 12841 "configure"
12842 #include "confdefs.h"
12847 return fseeko && fseeko (stdin, 0, 0);
12852 rm -f conftest.$ac_objext conftest$ac_exeext
12853 if { (eval echo "$as_me:12853: \"$ac_link\"") >&5
12854 (eval $ac_link) 2>&5
12856 echo "$as_me:12856: \$? = $ac_status" >&5
12857 (exit $ac_status); } &&
12858 { ac_try='test -s conftest$ac_exeext'
12859 { (eval echo "$as_me:12859: \"$ac_try\"") >&5
12860 (eval $ac_try) 2>&5
12862 echo "$as_me:12862: \$? = $ac_status" >&5
12863 (exit $ac_status); }; }; then
12864 ac_cv_func_fseeko=yes
12866 echo "$as_me: failed program was:" >&5
12867 cat conftest.$ac_ext >&5
12868 ac_cv_func_fseeko=no
12870 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12872 echo "$as_me:12872: result: $ac_cv_func_fseeko" >&5
12873 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
12874 if test $ac_cv_func_fseeko = yes; then
12876 cat >>confdefs.h <<\EOF
12877 #define HAVE_FSEEKO 1
12882 # Normally we would collect these definitions in the config.h,
12883 # but (like _XOPEN_SOURCE), some environments rely on having these
12884 # defined before any of the system headers are included. Another
12885 # case comes up with C++, e.g., on AIX the compiler compiles the
12886 # header files by themselves before looking at the body files it is
12887 # told to compile. For ncurses, those header files do not include
12889 if test "$ac_cv_sys_large_files" != no
12892 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12893 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
12896 if test "$ac_cv_sys_largefile_source" != no
12899 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12900 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
12903 if test "$ac_cv_sys_file_offset_bits" != no
12906 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12907 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
12911 echo "$as_me:12911: checking whether to use struct dirent64" >&5
12912 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
12913 if test "${cf_cv_struct_dirent64+set}" = set; then
12914 echo $ECHO_N "(cached) $ECHO_C" >&6
12917 cat >conftest.$ac_ext <<_ACEOF
12918 #line 12918 "configure"
12919 #include "confdefs.h"
12921 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
12922 #include <sys/types.h>
12923 #include <dirent.h>
12929 /* if transitional largefile support is setup, this is true */
12930 extern struct dirent64 * readdir(DIR *);
12931 struct dirent64 *x = readdir((DIR *)0);
12932 struct dirent *y = readdir((DIR *)0);
12939 rm -f conftest.$ac_objext
12940 if { (eval echo "$as_me:12940: \"$ac_compile\"") >&5
12941 (eval $ac_compile) 2>&5
12943 echo "$as_me:12943: \$? = $ac_status" >&5
12944 (exit $ac_status); } &&
12945 { ac_try='test -s conftest.$ac_objext'
12946 { (eval echo "$as_me:12946: \"$ac_try\"") >&5
12947 (eval $ac_try) 2>&5
12949 echo "$as_me:12949: \$? = $ac_status" >&5
12950 (exit $ac_status); }; }; then
12951 cf_cv_struct_dirent64=yes
12953 echo "$as_me: failed program was:" >&5
12954 cat conftest.$ac_ext >&5
12955 cf_cv_struct_dirent64=no
12957 rm -f conftest.$ac_objext conftest.$ac_ext
12960 echo "$as_me:12960: result: $cf_cv_struct_dirent64" >&5
12961 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
12962 test "$cf_cv_struct_dirent64" = yes &&
12963 cat >>confdefs.h <<\EOF
12964 #define HAVE_STRUCT_DIRENT64 1
12969 ### Enable compiling-in rcs id's
12970 echo "$as_me:12970: checking if RCS identifiers should be compiled-in" >&5
12971 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
12973 # Check whether --with-rcs-ids or --without-rcs-ids was given.
12974 if test "${with_rcs_ids+set}" = set; then
12975 withval="$with_rcs_ids"
12976 with_rcs_ids=$withval
12980 echo "$as_me:12980: result: $with_rcs_ids" >&5
12981 echo "${ECHO_T}$with_rcs_ids" >&6
12982 test "$with_rcs_ids" = yes &&
12983 cat >>confdefs.h <<\EOF
12984 #define USE_RCS_IDS 1
12987 ###############################################################################
12989 ### Note that some functions (such as const) are normally disabled anyway.
12990 echo "$as_me:12990: checking if you want to build with function extensions" >&5
12991 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
12993 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
12994 if test "${enable_ext_funcs+set}" = set; then
12995 enableval="$enable_ext_funcs"
12996 with_ext_funcs=$enableval
13000 echo "$as_me:13000: result: $with_ext_funcs" >&5
13001 echo "${ECHO_T}$with_ext_funcs" >&6
13002 if test "$with_ext_funcs" = yes ; then
13003 NCURSES_EXT_FUNCS=1
13005 cat >>confdefs.h <<\EOF
13006 #define HAVE_USE_DEFAULT_COLORS 1
13009 cat >>confdefs.h <<\EOF
13010 #define NCURSES_EXT_FUNCS 1
13014 NCURSES_EXT_FUNCS=0
13017 ### use option --enable-const to turn on use of const beyond that in XSI.
13018 echo "$as_me:13018: checking for extended use of const keyword" >&5
13019 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
13021 # Check whether --enable-const or --disable-const was given.
13022 if test "${enable_const+set}" = set; then
13023 enableval="$enable_const"
13024 with_ext_const=$enableval
13028 echo "$as_me:13028: result: $with_ext_const" >&5
13029 echo "${ECHO_T}$with_ext_const" >&6
13030 NCURSES_CONST='/*nothing*/'
13031 if test "$with_ext_const" = yes ; then
13032 NCURSES_CONST=const
13035 ###############################################################################
13036 # These options are relatively safe to experiment with.
13038 echo "$as_me:13038: checking if you want all development code" >&5
13039 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
13041 # Check whether --with-develop or --without-develop was given.
13042 if test "${with_develop+set}" = set; then
13043 withval="$with_develop"
13044 with_develop=$withval
13048 echo "$as_me:13048: result: $with_develop" >&5
13049 echo "${ECHO_T}$with_develop" >&6
13051 ###############################################################################
13052 # These are just experimental, probably should not be in a package:
13054 # This is still experimental (20080329), but should ultimately be moved to
13055 # the script-block --with-normal, etc.
13057 echo "$as_me:13057: checking if you want to link with the pthread library" >&5
13058 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
13060 # Check whether --with-pthread or --without-pthread was given.
13061 if test "${with_pthread+set}" = set; then
13062 withval="$with_pthread"
13063 with_pthread=$withval
13067 echo "$as_me:13067: result: $with_pthread" >&5
13068 echo "${ECHO_T}$with_pthread" >&6
13070 if test "$with_pthread" != no ; then
13071 echo "$as_me:13071: checking for pthread.h" >&5
13072 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
13073 if test "${ac_cv_header_pthread_h+set}" = set; then
13074 echo $ECHO_N "(cached) $ECHO_C" >&6
13076 cat >conftest.$ac_ext <<_ACEOF
13077 #line 13077 "configure"
13078 #include "confdefs.h"
13079 #include <pthread.h>
13081 if { (eval echo "$as_me:13081: \"$ac_cpp conftest.$ac_ext\"") >&5
13082 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13084 egrep -v '^ *\+' conftest.er1 >conftest.err
13086 cat conftest.err >&5
13087 echo "$as_me:13087: \$? = $ac_status" >&5
13088 (exit $ac_status); } >/dev/null; then
13089 if test -s conftest.err; then
13090 ac_cpp_err=$ac_c_preproc_warn_flag
13097 if test -z "$ac_cpp_err"; then
13098 ac_cv_header_pthread_h=yes
13100 echo "$as_me: failed program was:" >&5
13101 cat conftest.$ac_ext >&5
13102 ac_cv_header_pthread_h=no
13104 rm -f conftest.err conftest.$ac_ext
13106 echo "$as_me:13106: result: $ac_cv_header_pthread_h" >&5
13107 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
13108 if test $ac_cv_header_pthread_h = yes; then
13110 cat >>confdefs.h <<\EOF
13111 #define HAVE_PTHREADS_H 1
13114 for cf_lib_pthread in pthread c_r
13116 echo "$as_me:13116: checking if we can link with the $cf_lib_pthread library" >&5
13117 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
13118 cf_save_LIBS="$LIBS"
13120 cf_add_libs="-l$cf_lib_pthread"
13121 # Filter out duplicates - this happens with badly-designed ".pc" files...
13122 for cf_add_1lib in $LIBS
13124 for cf_add_2lib in $cf_add_libs
13126 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13132 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13134 LIBS="$cf_add_libs"
13136 cat >conftest.$ac_ext <<_ACEOF
13137 #line 13137 "configure"
13138 #include "confdefs.h"
13140 #include <pthread.h>
13146 int rc = pthread_create(0,0,0,0);
13147 int r2 = pthread_mutexattr_settype(0, 0);
13153 rm -f conftest.$ac_objext conftest$ac_exeext
13154 if { (eval echo "$as_me:13154: \"$ac_link\"") >&5
13155 (eval $ac_link) 2>&5
13157 echo "$as_me:13157: \$? = $ac_status" >&5
13158 (exit $ac_status); } &&
13159 { ac_try='test -s conftest$ac_exeext'
13160 { (eval echo "$as_me:13160: \"$ac_try\"") >&5
13161 (eval $ac_try) 2>&5
13163 echo "$as_me:13163: \$? = $ac_status" >&5
13164 (exit $ac_status); }; }; then
13167 echo "$as_me: failed program was:" >&5
13168 cat conftest.$ac_ext >&5
13171 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13172 LIBS="$cf_save_LIBS"
13173 echo "$as_me:13173: result: $with_pthread" >&5
13174 echo "${ECHO_T}$with_pthread" >&6
13175 test "$with_pthread" = yes && break
13178 if test "$with_pthread" = yes ; then
13180 cf_add_libs="-l$cf_lib_pthread"
13181 # Filter out duplicates - this happens with badly-designed ".pc" files...
13182 for cf_add_1lib in $LIBS
13184 for cf_add_2lib in $cf_add_libs
13186 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13192 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13194 LIBS="$cf_add_libs"
13196 cat >>confdefs.h <<\EOF
13197 #define HAVE_LIBPTHREADS 1
13201 { { echo "$as_me:13201: error: Cannot link with pthread library" >&5
13202 echo "$as_me: error: Cannot link with pthread library" >&2;}
13203 { (exit 1); exit 1; }; }
13210 echo "$as_me:13210: checking if you want to use weak-symbols for pthreads" >&5
13211 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
13213 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
13214 if test "${enable_weak_symbols+set}" = set; then
13215 enableval="$enable_weak_symbols"
13216 use_weak_symbols=$withval
13218 use_weak_symbols=no
13220 echo "$as_me:13220: result: $use_weak_symbols" >&5
13221 echo "${ECHO_T}$use_weak_symbols" >&6
13222 if test "$use_weak_symbols" = yes ; then
13224 echo "$as_me:13224: checking if $CC supports weak symbols" >&5
13225 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
13226 if test "${cf_cv_weak_symbols+set}" = set; then
13227 echo $ECHO_N "(cached) $ECHO_C" >&6
13230 cat >conftest.$ac_ext <<_ACEOF
13231 #line 13231 "configure"
13232 #include "confdefs.h"
13239 #if defined(__GNUC__)
13240 # if defined __USE_ISOC99
13241 # define _cat_pragma(exp) _Pragma(#exp)
13242 # define _weak_pragma(exp) _cat_pragma(weak name)
13244 # define _weak_pragma(exp)
13246 # define _declare(name) __extension__ extern __typeof__(name) name
13247 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
13250 weak_symbol(fopen);
13256 rm -f conftest.$ac_objext
13257 if { (eval echo "$as_me:13257: \"$ac_compile\"") >&5
13258 (eval $ac_compile) 2>&5
13260 echo "$as_me:13260: \$? = $ac_status" >&5
13261 (exit $ac_status); } &&
13262 { ac_try='test -s conftest.$ac_objext'
13263 { (eval echo "$as_me:13263: \"$ac_try\"") >&5
13264 (eval $ac_try) 2>&5
13266 echo "$as_me:13266: \$? = $ac_status" >&5
13267 (exit $ac_status); }; }; then
13268 cf_cv_weak_symbols=yes
13270 echo "$as_me: failed program was:" >&5
13271 cat conftest.$ac_ext >&5
13272 cf_cv_weak_symbols=no
13274 rm -f conftest.$ac_objext conftest.$ac_ext
13277 echo "$as_me:13277: result: $cf_cv_weak_symbols" >&5
13278 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
13281 cf_cv_weak_symbols=no
13284 if test $cf_cv_weak_symbols = yes ; then
13286 cat >>confdefs.h <<\EOF
13287 #define USE_WEAK_SYMBOLS 1
13293 if test "$with_pthread" = "yes" ; then
13295 cat >>confdefs.h <<\EOF
13296 #define USE_PTHREADS 1
13299 enable_reentrant=yes
13300 if test $cf_cv_weak_symbols = yes ; then
13305 # OpenSUSE is installing ncurses6, using reentrant option.
13306 echo "$as_me:13306: checking for _nc_TABSIZE" >&5
13307 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
13308 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
13309 echo $ECHO_N "(cached) $ECHO_C" >&6
13311 cat >conftest.$ac_ext <<_ACEOF
13312 #line 13312 "configure"
13313 #include "confdefs.h"
13314 /* System header to define __stub macros and hopefully few prototypes,
13315 which can conflict with char _nc_TABSIZE (); below. */
13316 #include <assert.h>
13317 /* Override any gcc2 internal prototype to avoid an error. */
13321 /* We use char because int might match the return type of a gcc2
13322 builtin and then its argument prototype would still apply. */
13323 char _nc_TABSIZE ();
13329 /* The GNU C library defines this for functions which it implements
13330 to always fail with ENOSYS. Some functions are actually named
13331 something starting with __ and the normal name is an alias. */
13332 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
13335 f = _nc_TABSIZE; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13342 rm -f conftest.$ac_objext conftest$ac_exeext
13343 if { (eval echo "$as_me:13343: \"$ac_link\"") >&5
13344 (eval $ac_link) 2>&5
13346 echo "$as_me:13346: \$? = $ac_status" >&5
13347 (exit $ac_status); } &&
13348 { ac_try='test -s conftest$ac_exeext'
13349 { (eval echo "$as_me:13349: \"$ac_try\"") >&5
13350 (eval $ac_try) 2>&5
13352 echo "$as_me:13352: \$? = $ac_status" >&5
13353 (exit $ac_status); }; }; then
13354 ac_cv_func__nc_TABSIZE=yes
13356 echo "$as_me: failed program was:" >&5
13357 cat conftest.$ac_ext >&5
13358 ac_cv_func__nc_TABSIZE=no
13360 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13362 echo "$as_me:13362: result: $ac_cv_func__nc_TABSIZE" >&5
13363 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
13364 if test $ac_cv_func__nc_TABSIZE = yes; then
13365 assume_reentrant=yes
13367 assume_reentrant=no
13370 # Reentrant code has to be opaque; there's little advantage to making ncurses
13371 # opaque outside of that, so there is no --enable-opaque option. We can use
13372 # this option without --with-pthreads, but this will be always set for
13374 echo "$as_me:13374: checking if you want experimental reentrant code" >&5
13375 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
13377 # Check whether --enable-reentrant or --disable-reentrant was given.
13378 if test "${enable_reentrant+set}" = set; then
13379 enableval="$enable_reentrant"
13380 with_reentrant=$enableval
13382 with_reentrant=$assume_reentrant
13384 echo "$as_me:13384: result: $with_reentrant" >&5
13385 echo "${ECHO_T}$with_reentrant" >&6
13386 if test "$with_reentrant" = yes ; then
13387 cf_cv_enable_reentrant=1
13388 if test $cf_cv_weak_symbols = yes ; then
13390 # remove pthread library from $LIBS
13391 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
13393 elif test "$assume_reentrant" = no ; then
13394 LIB_SUFFIX="t${LIB_SUFFIX}"
13397 cat >>confdefs.h <<\EOF
13398 #define USE_REENTRANT 1
13402 cf_cv_enable_reentrant=0
13405 ### Allow using a different wrap-prefix
13406 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
13407 echo "$as_me:13407: checking for prefix used to wrap public variables" >&5
13408 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
13410 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
13411 if test "${with_wrap_prefix+set}" = set; then
13412 withval="$with_wrap_prefix"
13413 NCURSES_WRAP_PREFIX=$withval
13415 NCURSES_WRAP_PREFIX=_nc_
13417 echo "$as_me:13417: result: $NCURSES_WRAP_PREFIX" >&5
13418 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
13420 NCURSES_WRAP_PREFIX=_nc_
13423 cat >>confdefs.h <<EOF
13424 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
13427 ###############################################################################
13429 ### use option --disable-echo to suppress full display compiling commands
13431 echo "$as_me:13431: checking if you want to see long compiling messages" >&5
13432 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
13434 # Check whether --enable-echo or --disable-echo was given.
13435 if test "${enable_echo+set}" = set; then
13436 enableval="$enable_echo"
13437 test "$enableval" != no && enableval=yes
13438 if test "$enableval" != "yes" ; then
13441 ECHO_LD='@echo linking $@;'
13442 RULE_CC='@echo compiling $<'
13443 SHOW_CC='@echo compiling $@'
13465 echo "$as_me:13465: result: $enableval" >&5
13466 echo "${ECHO_T}$enableval" >&6
13468 ### use option --enable-warnings to turn on all gcc warnings
13469 echo "$as_me:13469: checking if you want to see compiler warnings" >&5
13470 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
13472 # Check whether --enable-warnings or --disable-warnings was given.
13473 if test "${enable_warnings+set}" = set; then
13474 enableval="$enable_warnings"
13475 with_warnings=$enableval
13477 echo "$as_me:13477: result: $with_warnings" >&5
13478 echo "${ECHO_T}$with_warnings" >&6
13480 if test "x$with_warnings" = "xyes"; then
13482 ADAFLAGS="$ADAFLAGS -gnatg"
13486 if test "$GCC" = yes ; then
13489 echo "$as_me:13489: checking if this is really Intel C compiler" >&5
13490 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
13491 cf_save_CFLAGS="$CFLAGS"
13492 CFLAGS="$CFLAGS -no-gcc"
13493 cat >conftest.$ac_ext <<_ACEOF
13494 #line 13494 "configure"
13495 #include "confdefs.h"
13501 #ifdef __INTEL_COMPILER
13510 rm -f conftest.$ac_objext
13511 if { (eval echo "$as_me:13511: \"$ac_compile\"") >&5
13512 (eval $ac_compile) 2>&5
13514 echo "$as_me:13514: \$? = $ac_status" >&5
13515 (exit $ac_status); } &&
13516 { ac_try='test -s conftest.$ac_objext'
13517 { (eval echo "$as_me:13517: \"$ac_try\"") >&5
13518 (eval $ac_try) 2>&5
13520 echo "$as_me:13520: \$? = $ac_status" >&5
13521 (exit $ac_status); }; }; then
13523 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13526 echo "$as_me: failed program was:" >&5
13527 cat conftest.$ac_ext >&5
13529 rm -f conftest.$ac_objext conftest.$ac_ext
13530 CFLAGS="$cf_save_CFLAGS"
13531 echo "$as_me:13531: result: $INTEL_COMPILER" >&5
13532 echo "${ECHO_T}$INTEL_COMPILER" >&6
13539 if test "$GCC" = yes ; then
13540 echo "$as_me:13540: checking if this is really Clang C compiler" >&5
13541 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13542 cf_save_CFLAGS="$CFLAGS"
13543 CFLAGS="$CFLAGS -Qunused-arguments"
13544 cat >conftest.$ac_ext <<_ACEOF
13545 #line 13545 "configure"
13546 #include "confdefs.h"
13561 rm -f conftest.$ac_objext
13562 if { (eval echo "$as_me:13562: \"$ac_compile\"") >&5
13563 (eval $ac_compile) 2>&5
13565 echo "$as_me:13565: \$? = $ac_status" >&5
13566 (exit $ac_status); } &&
13567 { ac_try='test -s conftest.$ac_objext'
13568 { (eval echo "$as_me:13568: \"$ac_try\"") >&5
13569 (eval $ac_try) 2>&5
13571 echo "$as_me:13571: \$? = $ac_status" >&5
13572 (exit $ac_status); }; }; then
13574 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13577 echo "$as_me: failed program was:" >&5
13578 cat conftest.$ac_ext >&5
13580 rm -f conftest.$ac_objext conftest.$ac_ext
13581 CFLAGS="$cf_save_CFLAGS"
13582 echo "$as_me:13582: result: $CLANG_COMPILER" >&5
13583 echo "${ECHO_T}$CLANG_COMPILER" >&6
13586 cat > conftest.$ac_ext <<EOF
13587 #line 13587 "${as_me:-configure}"
13588 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13591 if test "$INTEL_COMPILER" = yes
13593 # The "-wdXXX" options suppress warnings:
13594 # remark #1419: external declaration in primary source file
13595 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13596 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13597 # remark #193: zero used for undefined preprocessing identifier
13598 # remark #593: variable "curs_sb_left_arrow" was set but never used
13599 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13600 # remark #869: parameter "tw" was never referenced
13601 # remark #981: operands are evaluated in unspecified order
13602 # warning #279: controlling expression is constant
13604 { echo "$as_me:13604: checking for $CC warning options..." >&5
13605 echo "$as_me: checking for $CC warning options..." >&6;}
13606 cf_save_CFLAGS="$CFLAGS"
13607 EXTRA_CFLAGS="-Wall"
13619 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13620 if { (eval echo "$as_me:13620: \"$ac_compile\"") >&5
13621 (eval $ac_compile) 2>&5
13623 echo "$as_me:13623: \$? = $ac_status" >&5
13624 (exit $ac_status); }; then
13625 test -n "$verbose" && echo "$as_me:13625: result: ... -$cf_opt" >&5
13626 echo "${ECHO_T}... -$cf_opt" >&6
13627 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13630 CFLAGS="$cf_save_CFLAGS"
13632 elif test "$GCC" = yes
13634 { echo "$as_me:13634: checking for $CC warning options..." >&5
13635 echo "$as_me: checking for $CC warning options..." >&6;}
13636 cf_save_CFLAGS="$CFLAGS"
13639 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13640 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13641 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13642 for cf_opt in W Wall \
13643 Wbad-function-cast \
13646 Wdeclaration-after-statement \
13649 Wmissing-declarations \
13650 Wmissing-prototypes \
13654 Wstrict-prototypes \
13655 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13657 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13658 if { (eval echo "$as_me:13658: \"$ac_compile\"") >&5
13659 (eval $ac_compile) 2>&5
13661 echo "$as_me:13661: \$? = $ac_status" >&5
13662 (exit $ac_status); }; then
13663 test -n "$verbose" && echo "$as_me:13663: result: ... -$cf_opt" >&5
13664 echo "${ECHO_T}... -$cf_opt" >&6
13668 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13669 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
13673 case $GCC_VERSION in
13675 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
13677 echo "${as_me:-configure}:13677: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13683 case $GCC_VERSION in
13685 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
13687 echo "${as_me:-configure}:13687: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13693 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13696 CFLAGS="$cf_save_CFLAGS"
13702 if test "$GCC" = yes
13704 cat > conftest.i <<EOF
13706 #define GCC_PRINTF 0
13709 #define GCC_SCANF 0
13711 #ifndef GCC_NORETURN
13712 #define GCC_NORETURN /* nothing */
13715 #define GCC_UNUSED /* nothing */
13718 if test "$GCC" = yes
13720 { echo "$as_me:13720: checking for $CC __attribute__ directives..." >&5
13721 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13722 cat > conftest.$ac_ext <<EOF
13723 #line 13723 "${as_me:-configure}"
13724 #include "confdefs.h"
13725 #include "conftest.h"
13726 #include "conftest.i"
13728 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13730 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13733 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
13735 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
13737 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13738 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13739 extern void foo(void) GCC_NORETURN;
13740 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13742 cf_printf_attribute=no
13743 cf_scanf_attribute=no
13744 for cf_attribute in scanf printf unused noreturn
13747 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13749 cf_directive="__attribute__(($cf_attribute))"
13750 echo "checking for $CC $cf_directive" 1>&5
13752 case $cf_attribute in
13754 cf_printf_attribute=yes
13755 cat >conftest.h <<EOF
13756 #define GCC_$cf_ATTRIBUTE 1
13760 cf_scanf_attribute=yes
13761 cat >conftest.h <<EOF
13762 #define GCC_$cf_ATTRIBUTE 1
13766 cat >conftest.h <<EOF
13767 #define GCC_$cf_ATTRIBUTE $cf_directive
13772 if { (eval echo "$as_me:13772: \"$ac_compile\"") >&5
13773 (eval $ac_compile) 2>&5
13775 echo "$as_me:13775: \$? = $ac_status" >&5
13776 (exit $ac_status); }; then
13777 test -n "$verbose" && echo "$as_me:13777: result: ... $cf_attribute" >&5
13778 echo "${ECHO_T}... $cf_attribute" >&6
13779 cat conftest.h >>confdefs.h
13780 case $cf_attribute in
13783 cat >>confdefs.h <<EOF
13784 #define GCC_NORETURN $cf_directive
13789 cf_value='/* nothing */'
13790 if test "$cf_printf_attribute" != no ; then
13791 cf_value='__attribute__((format(printf,fmt,var)))'
13793 cat >>confdefs.h <<\EOF
13794 #define GCC_PRINTF 1
13799 cat >>confdefs.h <<EOF
13800 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13805 cf_value='/* nothing */'
13806 if test "$cf_scanf_attribute" != no ; then
13807 cf_value='__attribute__((format(scanf,fmt,var)))'
13809 cat >>confdefs.h <<\EOF
13810 #define GCC_SCANF 1
13815 cat >>confdefs.h <<EOF
13816 #define GCC_SCANFLIKE(fmt,var) $cf_value
13822 cat >>confdefs.h <<EOF
13823 #define GCC_UNUSED $cf_directive
13831 fgrep define conftest.i >>confdefs.h
13836 ### use option --enable-assertions to turn on generation of assertion code
13837 echo "$as_me:13837: checking if you want to enable runtime assertions" >&5
13838 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13840 # Check whether --enable-assertions or --disable-assertions was given.
13841 if test "${enable_assertions+set}" = set; then
13842 enableval="$enable_assertions"
13843 with_assertions=$enableval
13847 echo "$as_me:13847: result: $with_assertions" >&5
13848 echo "${ECHO_T}$with_assertions" >&6
13851 if test "$with_assertions" = no
13853 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13856 ADAFLAGS="$ADAFLAGS -gnata"
13861 ### use option --disable-leaks to suppress "permanent" leaks, for testing
13863 cat >>confdefs.h <<\EOF
13864 #define HAVE_NC_ALLOC_H 1
13867 ### use option --enable-expanded to generate certain macros as functions
13869 # Check whether --enable-expanded or --disable-expanded was given.
13870 if test "${enable_expanded+set}" = set; then
13871 enableval="$enable_expanded"
13872 test "$enableval" = yes &&
13873 cat >>confdefs.h <<\EOF
13874 #define NCURSES_EXPANDED 1
13879 ### use option --disable-macros to suppress macros in favor of functions
13881 # Check whether --enable-macros or --disable-macros was given.
13882 if test "${enable_macros+set}" = set; then
13883 enableval="$enable_macros"
13884 test "$enableval" = no &&
13885 cat >>confdefs.h <<\EOF
13886 #define NCURSES_NOMACROS 1
13891 # Normally we only add trace() to the debug-library. Allow this to be
13892 # extended to all models of the ncurses library:
13894 case "$CFLAGS $CPPFLAGS" in
13900 echo "$as_me:13900: checking whether to add trace feature to all models" >&5
13901 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13903 # Check whether --with-trace or --without-trace was given.
13904 if test "${with_trace+set}" = set; then
13905 withval="$with_trace"
13906 cf_with_trace=$withval
13908 cf_with_trace=$cf_all_traces
13910 echo "$as_me:13910: result: $cf_with_trace" >&5
13911 echo "${ECHO_T}$cf_with_trace" >&6
13913 if test "$cf_with_trace" = yes ; then
13919 cf_new_extra_cppflags=
13921 for cf_add_cflags in -DTRACE
13923 case $cf_fix_cppflags in
13925 case $cf_add_cflags in
13926 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13927 case $cf_add_cflags in
13929 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13931 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13932 && test -z "${cf_tst_cflags}" \
13933 && cf_fix_cppflags=yes
13935 if test $cf_fix_cppflags = yes ; then
13937 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13938 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13941 elif test "${cf_tst_cflags}" = "\"'" ; then
13943 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13944 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13950 case "$CPPFLAGS" in
13954 case $cf_add_cflags in
13956 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13958 CPPFLAGS=`echo "$CPPFLAGS" | \
13959 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13960 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13965 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13966 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13973 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13974 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13981 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13982 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13984 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13986 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13987 && test -z "${cf_tst_cflags}" \
13988 && cf_fix_cppflags=no
13993 if test -n "$cf_new_cflags" ; then
13995 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13996 CFLAGS="${CFLAGS}$cf_new_cflags"
14000 if test -n "$cf_new_cppflags" ; then
14002 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14003 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14007 if test -n "$cf_new_extra_cppflags" ; then
14009 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14010 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14018 echo "$as_me:14018: checking if we want to use GNAT projects" >&5
14019 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14021 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14022 if test "${enable_gnat_projects+set}" = set; then
14023 enableval="$enable_gnat_projects"
14024 test "$enableval" != no && enableval=yes
14025 if test "$enableval" != "yes" ; then
14026 enable_gnat_projects=no
14028 enable_gnat_projects=yes
14032 enable_gnat_projects=yes
14035 echo "$as_me:14035: result: $enable_gnat_projects" >&5
14036 echo "${ECHO_T}$enable_gnat_projects" >&6
14038 ### Checks for libraries.
14039 case $cf_cv_system_name in
14043 echo "$as_me:14043: checking for gettimeofday" >&5
14044 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14045 if test "${ac_cv_func_gettimeofday+set}" = set; then
14046 echo $ECHO_N "(cached) $ECHO_C" >&6
14048 cat >conftest.$ac_ext <<_ACEOF
14049 #line 14049 "configure"
14050 #include "confdefs.h"
14051 /* System header to define __stub macros and hopefully few prototypes,
14052 which can conflict with char gettimeofday (); below. */
14053 #include <assert.h>
14054 /* Override any gcc2 internal prototype to avoid an error. */
14058 /* We use char because int might match the return type of a gcc2
14059 builtin and then its argument prototype would still apply. */
14060 char gettimeofday ();
14066 /* The GNU C library defines this for functions which it implements
14067 to always fail with ENOSYS. Some functions are actually named
14068 something starting with __ and the normal name is an alias. */
14069 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14072 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14079 rm -f conftest.$ac_objext conftest$ac_exeext
14080 if { (eval echo "$as_me:14080: \"$ac_link\"") >&5
14081 (eval $ac_link) 2>&5
14083 echo "$as_me:14083: \$? = $ac_status" >&5
14084 (exit $ac_status); } &&
14085 { ac_try='test -s conftest$ac_exeext'
14086 { (eval echo "$as_me:14086: \"$ac_try\"") >&5
14087 (eval $ac_try) 2>&5
14089 echo "$as_me:14089: \$? = $ac_status" >&5
14090 (exit $ac_status); }; }; then
14091 ac_cv_func_gettimeofday=yes
14093 echo "$as_me: failed program was:" >&5
14094 cat conftest.$ac_ext >&5
14095 ac_cv_func_gettimeofday=no
14097 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14099 echo "$as_me:14099: result: $ac_cv_func_gettimeofday" >&5
14100 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14101 if test $ac_cv_func_gettimeofday = yes; then
14102 cat >>confdefs.h <<\EOF
14103 #define HAVE_GETTIMEOFDAY 1
14108 echo "$as_me:14108: checking for gettimeofday in -lbsd" >&5
14109 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14110 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14111 echo $ECHO_N "(cached) $ECHO_C" >&6
14113 ac_check_lib_save_LIBS=$LIBS
14115 cat >conftest.$ac_ext <<_ACEOF
14116 #line 14116 "configure"
14117 #include "confdefs.h"
14119 /* Override any gcc2 internal prototype to avoid an error. */
14123 /* We use char because int might match the return type of a gcc2
14124 builtin and then its argument prototype would still apply. */
14125 char gettimeofday ();
14134 rm -f conftest.$ac_objext conftest$ac_exeext
14135 if { (eval echo "$as_me:14135: \"$ac_link\"") >&5
14136 (eval $ac_link) 2>&5
14138 echo "$as_me:14138: \$? = $ac_status" >&5
14139 (exit $ac_status); } &&
14140 { ac_try='test -s conftest$ac_exeext'
14141 { (eval echo "$as_me:14141: \"$ac_try\"") >&5
14142 (eval $ac_try) 2>&5
14144 echo "$as_me:14144: \$? = $ac_status" >&5
14145 (exit $ac_status); }; }; then
14146 ac_cv_lib_bsd_gettimeofday=yes
14148 echo "$as_me: failed program was:" >&5
14149 cat conftest.$ac_ext >&5
14150 ac_cv_lib_bsd_gettimeofday=no
14152 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14153 LIBS=$ac_check_lib_save_LIBS
14155 echo "$as_me:14155: result: $ac_cv_lib_bsd_gettimeofday" >&5
14156 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14157 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14159 cat >>confdefs.h <<\EOF
14160 #define HAVE_GETTIMEOFDAY 1
14170 ### Checks for header files.
14171 echo "$as_me:14171: checking for ANSI C header files" >&5
14172 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14173 if test "${ac_cv_header_stdc+set}" = set; then
14174 echo $ECHO_N "(cached) $ECHO_C" >&6
14176 cat >conftest.$ac_ext <<_ACEOF
14177 #line 14177 "configure"
14178 #include "confdefs.h"
14179 #include <stdlib.h>
14180 #include <stdarg.h>
14181 #include <string.h>
14185 if { (eval echo "$as_me:14185: \"$ac_cpp conftest.$ac_ext\"") >&5
14186 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14188 egrep -v '^ *\+' conftest.er1 >conftest.err
14190 cat conftest.err >&5
14191 echo "$as_me:14191: \$? = $ac_status" >&5
14192 (exit $ac_status); } >/dev/null; then
14193 if test -s conftest.err; then
14194 ac_cpp_err=$ac_c_preproc_warn_flag
14201 if test -z "$ac_cpp_err"; then
14202 ac_cv_header_stdc=yes
14204 echo "$as_me: failed program was:" >&5
14205 cat conftest.$ac_ext >&5
14206 ac_cv_header_stdc=no
14208 rm -f conftest.err conftest.$ac_ext
14210 if test $ac_cv_header_stdc = yes; then
14211 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14212 cat >conftest.$ac_ext <<_ACEOF
14213 #line 14213 "configure"
14214 #include "confdefs.h"
14215 #include <string.h>
14218 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14219 egrep "memchr" >/dev/null 2>&1; then
14222 ac_cv_header_stdc=no
14228 if test $ac_cv_header_stdc = yes; then
14229 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14230 cat >conftest.$ac_ext <<_ACEOF
14231 #line 14231 "configure"
14232 #include "confdefs.h"
14233 #include <stdlib.h>
14236 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14237 egrep "free" >/dev/null 2>&1; then
14240 ac_cv_header_stdc=no
14246 if test $ac_cv_header_stdc = yes; then
14247 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14248 if test "$cross_compiling" = yes; then
14251 cat >conftest.$ac_ext <<_ACEOF
14252 #line 14252 "configure"
14253 #include "confdefs.h"
14255 #if ((' ' & 0x0FF) == 0x020)
14256 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14257 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14259 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14260 || ('j' <= (c) && (c) <= 'r') \
14261 || ('s' <= (c) && (c) <= 'z'))
14262 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14265 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14270 for (i = 0; i < 256; i++)
14271 if (XOR (islower (i), ISLOWER (i))
14272 || toupper (i) != TOUPPER (i))
14273 $ac_main_return(2);
14274 $ac_main_return (0);
14277 rm -f conftest$ac_exeext
14278 if { (eval echo "$as_me:14278: \"$ac_link\"") >&5
14279 (eval $ac_link) 2>&5
14281 echo "$as_me:14281: \$? = $ac_status" >&5
14282 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14283 { (eval echo "$as_me:14283: \"$ac_try\"") >&5
14284 (eval $ac_try) 2>&5
14286 echo "$as_me:14286: \$? = $ac_status" >&5
14287 (exit $ac_status); }; }; then
14290 echo "$as_me: program exited with status $ac_status" >&5
14291 echo "$as_me: failed program was:" >&5
14292 cat conftest.$ac_ext >&5
14293 ac_cv_header_stdc=no
14295 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14299 echo "$as_me:14299: result: $ac_cv_header_stdc" >&5
14300 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14301 if test $ac_cv_header_stdc = yes; then
14303 cat >>confdefs.h <<\EOF
14304 #define STDC_HEADERS 1
14309 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
14311 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
14312 inttypes.h stdint.h unistd.h
14314 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14315 echo "$as_me:14315: checking for $ac_header" >&5
14316 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14317 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14318 echo $ECHO_N "(cached) $ECHO_C" >&6
14320 cat >conftest.$ac_ext <<_ACEOF
14321 #line 14321 "configure"
14322 #include "confdefs.h"
14323 $ac_includes_default
14324 #include <$ac_header>
14326 rm -f conftest.$ac_objext
14327 if { (eval echo "$as_me:14327: \"$ac_compile\"") >&5
14328 (eval $ac_compile) 2>&5
14330 echo "$as_me:14330: \$? = $ac_status" >&5
14331 (exit $ac_status); } &&
14332 { ac_try='test -s conftest.$ac_objext'
14333 { (eval echo "$as_me:14333: \"$ac_try\"") >&5
14334 (eval $ac_try) 2>&5
14336 echo "$as_me:14336: \$? = $ac_status" >&5
14337 (exit $ac_status); }; }; then
14338 eval "$as_ac_Header=yes"
14340 echo "$as_me: failed program was:" >&5
14341 cat conftest.$ac_ext >&5
14342 eval "$as_ac_Header=no"
14344 rm -f conftest.$ac_objext conftest.$ac_ext
14346 echo "$as_me:14346: result: `eval echo '${'$as_ac_Header'}'`" >&5
14347 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14348 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14349 cat >>confdefs.h <<EOF
14350 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14356 echo "$as_me:14356: checking for signed char" >&5
14357 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14358 if test "${ac_cv_type_signed_char+set}" = set; then
14359 echo $ECHO_N "(cached) $ECHO_C" >&6
14361 cat >conftest.$ac_ext <<_ACEOF
14362 #line 14362 "configure"
14363 #include "confdefs.h"
14364 $ac_includes_default
14368 if ((signed char *) 0)
14370 if (sizeof (signed char))
14376 rm -f conftest.$ac_objext
14377 if { (eval echo "$as_me:14377: \"$ac_compile\"") >&5
14378 (eval $ac_compile) 2>&5
14380 echo "$as_me:14380: \$? = $ac_status" >&5
14381 (exit $ac_status); } &&
14382 { ac_try='test -s conftest.$ac_objext'
14383 { (eval echo "$as_me:14383: \"$ac_try\"") >&5
14384 (eval $ac_try) 2>&5
14386 echo "$as_me:14386: \$? = $ac_status" >&5
14387 (exit $ac_status); }; }; then
14388 ac_cv_type_signed_char=yes
14390 echo "$as_me: failed program was:" >&5
14391 cat conftest.$ac_ext >&5
14392 ac_cv_type_signed_char=no
14394 rm -f conftest.$ac_objext conftest.$ac_ext
14396 echo "$as_me:14396: result: $ac_cv_type_signed_char" >&5
14397 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14399 echo "$as_me:14399: checking size of signed char" >&5
14400 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14401 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14402 echo $ECHO_N "(cached) $ECHO_C" >&6
14404 if test "$ac_cv_type_signed_char" = yes; then
14405 if test "$cross_compiling" = yes; then
14406 # Depending upon the size, compute the lo and hi bounds.
14407 cat >conftest.$ac_ext <<_ACEOF
14408 #line 14408 "configure"
14409 #include "confdefs.h"
14410 $ac_includes_default
14414 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14419 rm -f conftest.$ac_objext
14420 if { (eval echo "$as_me:14420: \"$ac_compile\"") >&5
14421 (eval $ac_compile) 2>&5
14423 echo "$as_me:14423: \$? = $ac_status" >&5
14424 (exit $ac_status); } &&
14425 { ac_try='test -s conftest.$ac_objext'
14426 { (eval echo "$as_me:14426: \"$ac_try\"") >&5
14427 (eval $ac_try) 2>&5
14429 echo "$as_me:14429: \$? = $ac_status" >&5
14430 (exit $ac_status); }; }; then
14433 cat >conftest.$ac_ext <<_ACEOF
14434 #line 14434 "configure"
14435 #include "confdefs.h"
14436 $ac_includes_default
14440 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14445 rm -f conftest.$ac_objext
14446 if { (eval echo "$as_me:14446: \"$ac_compile\"") >&5
14447 (eval $ac_compile) 2>&5
14449 echo "$as_me:14449: \$? = $ac_status" >&5
14450 (exit $ac_status); } &&
14451 { ac_try='test -s conftest.$ac_objext'
14452 { (eval echo "$as_me:14452: \"$ac_try\"") >&5
14453 (eval $ac_try) 2>&5
14455 echo "$as_me:14455: \$? = $ac_status" >&5
14456 (exit $ac_status); }; }; then
14457 ac_hi=$ac_mid; break
14459 echo "$as_me: failed program was:" >&5
14460 cat conftest.$ac_ext >&5
14461 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
14463 rm -f conftest.$ac_objext conftest.$ac_ext
14466 echo "$as_me: failed program was:" >&5
14467 cat conftest.$ac_ext >&5
14470 cat >conftest.$ac_ext <<_ACEOF
14471 #line 14471 "configure"
14472 #include "confdefs.h"
14473 $ac_includes_default
14477 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14482 rm -f conftest.$ac_objext
14483 if { (eval echo "$as_me:14483: \"$ac_compile\"") >&5
14484 (eval $ac_compile) 2>&5
14486 echo "$as_me:14486: \$? = $ac_status" >&5
14487 (exit $ac_status); } &&
14488 { ac_try='test -s conftest.$ac_objext'
14489 { (eval echo "$as_me:14489: \"$ac_try\"") >&5
14490 (eval $ac_try) 2>&5
14492 echo "$as_me:14492: \$? = $ac_status" >&5
14493 (exit $ac_status); }; }; then
14494 ac_lo=$ac_mid; break
14496 echo "$as_me: failed program was:" >&5
14497 cat conftest.$ac_ext >&5
14498 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
14500 rm -f conftest.$ac_objext conftest.$ac_ext
14503 rm -f conftest.$ac_objext conftest.$ac_ext
14504 # Binary search between lo and hi bounds.
14505 while test "x$ac_lo" != "x$ac_hi"; do
14506 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14507 cat >conftest.$ac_ext <<_ACEOF
14508 #line 14508 "configure"
14509 #include "confdefs.h"
14510 $ac_includes_default
14514 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14519 rm -f conftest.$ac_objext
14520 if { (eval echo "$as_me:14520: \"$ac_compile\"") >&5
14521 (eval $ac_compile) 2>&5
14523 echo "$as_me:14523: \$? = $ac_status" >&5
14524 (exit $ac_status); } &&
14525 { ac_try='test -s conftest.$ac_objext'
14526 { (eval echo "$as_me:14526: \"$ac_try\"") >&5
14527 (eval $ac_try) 2>&5
14529 echo "$as_me:14529: \$? = $ac_status" >&5
14530 (exit $ac_status); }; }; then
14533 echo "$as_me: failed program was:" >&5
14534 cat conftest.$ac_ext >&5
14535 ac_lo=`expr $ac_mid + 1`
14537 rm -f conftest.$ac_objext conftest.$ac_ext
14539 ac_cv_sizeof_signed_char=$ac_lo
14541 if test "$cross_compiling" = yes; then
14542 { { echo "$as_me:14542: error: cannot run test program while cross compiling" >&5
14543 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14544 { (exit 1); exit 1; }; }
14546 cat >conftest.$ac_ext <<_ACEOF
14547 #line 14547 "configure"
14548 #include "confdefs.h"
14549 $ac_includes_default
14553 FILE *f = fopen ("conftest.val", "w");
14555 $ac_main_return (1);
14556 fprintf (f, "%d", (sizeof (signed char)));
14562 rm -f conftest$ac_exeext
14563 if { (eval echo "$as_me:14563: \"$ac_link\"") >&5
14564 (eval $ac_link) 2>&5
14566 echo "$as_me:14566: \$? = $ac_status" >&5
14567 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14568 { (eval echo "$as_me:14568: \"$ac_try\"") >&5
14569 (eval $ac_try) 2>&5
14571 echo "$as_me:14571: \$? = $ac_status" >&5
14572 (exit $ac_status); }; }; then
14573 ac_cv_sizeof_signed_char=`cat conftest.val`
14575 echo "$as_me: program exited with status $ac_status" >&5
14576 echo "$as_me: failed program was:" >&5
14577 cat conftest.$ac_ext >&5
14579 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14584 ac_cv_sizeof_signed_char=0
14587 echo "$as_me:14587: result: $ac_cv_sizeof_signed_char" >&5
14588 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14589 cat >>confdefs.h <<EOF
14590 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14593 echo "$as_me:14593: checking for ANSI C header files" >&5
14594 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14595 if test "${ac_cv_header_stdc+set}" = set; then
14596 echo $ECHO_N "(cached) $ECHO_C" >&6
14598 cat >conftest.$ac_ext <<_ACEOF
14599 #line 14599 "configure"
14600 #include "confdefs.h"
14601 #include <stdlib.h>
14602 #include <stdarg.h>
14603 #include <string.h>
14607 if { (eval echo "$as_me:14607: \"$ac_cpp conftest.$ac_ext\"") >&5
14608 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14610 egrep -v '^ *\+' conftest.er1 >conftest.err
14612 cat conftest.err >&5
14613 echo "$as_me:14613: \$? = $ac_status" >&5
14614 (exit $ac_status); } >/dev/null; then
14615 if test -s conftest.err; then
14616 ac_cpp_err=$ac_c_preproc_warn_flag
14623 if test -z "$ac_cpp_err"; then
14624 ac_cv_header_stdc=yes
14626 echo "$as_me: failed program was:" >&5
14627 cat conftest.$ac_ext >&5
14628 ac_cv_header_stdc=no
14630 rm -f conftest.err conftest.$ac_ext
14632 if test $ac_cv_header_stdc = yes; then
14633 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14634 cat >conftest.$ac_ext <<_ACEOF
14635 #line 14635 "configure"
14636 #include "confdefs.h"
14637 #include <string.h>
14640 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14641 egrep "memchr" >/dev/null 2>&1; then
14644 ac_cv_header_stdc=no
14650 if test $ac_cv_header_stdc = yes; then
14651 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14652 cat >conftest.$ac_ext <<_ACEOF
14653 #line 14653 "configure"
14654 #include "confdefs.h"
14655 #include <stdlib.h>
14658 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14659 egrep "free" >/dev/null 2>&1; then
14662 ac_cv_header_stdc=no
14668 if test $ac_cv_header_stdc = yes; then
14669 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14670 if test "$cross_compiling" = yes; then
14673 cat >conftest.$ac_ext <<_ACEOF
14674 #line 14674 "configure"
14675 #include "confdefs.h"
14677 #if ((' ' & 0x0FF) == 0x020)
14678 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14679 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14681 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14682 || ('j' <= (c) && (c) <= 'r') \
14683 || ('s' <= (c) && (c) <= 'z'))
14684 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14687 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14692 for (i = 0; i < 256; i++)
14693 if (XOR (islower (i), ISLOWER (i))
14694 || toupper (i) != TOUPPER (i))
14695 $ac_main_return(2);
14696 $ac_main_return (0);
14699 rm -f conftest$ac_exeext
14700 if { (eval echo "$as_me:14700: \"$ac_link\"") >&5
14701 (eval $ac_link) 2>&5
14703 echo "$as_me:14703: \$? = $ac_status" >&5
14704 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14705 { (eval echo "$as_me:14705: \"$ac_try\"") >&5
14706 (eval $ac_try) 2>&5
14708 echo "$as_me:14708: \$? = $ac_status" >&5
14709 (exit $ac_status); }; }; then
14712 echo "$as_me: program exited with status $ac_status" >&5
14713 echo "$as_me: failed program was:" >&5
14714 cat conftest.$ac_ext >&5
14715 ac_cv_header_stdc=no
14717 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14721 echo "$as_me:14721: result: $ac_cv_header_stdc" >&5
14722 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14723 if test $ac_cv_header_stdc = yes; then
14725 cat >>confdefs.h <<\EOF
14726 #define STDC_HEADERS 1
14731 ac_header_dirent=no
14732 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14733 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14734 echo "$as_me:14734: checking for $ac_hdr that defines DIR" >&5
14735 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14736 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14737 echo $ECHO_N "(cached) $ECHO_C" >&6
14739 cat >conftest.$ac_ext <<_ACEOF
14740 #line 14740 "configure"
14741 #include "confdefs.h"
14742 #include <sys/types.h>
14754 rm -f conftest.$ac_objext
14755 if { (eval echo "$as_me:14755: \"$ac_compile\"") >&5
14756 (eval $ac_compile) 2>&5
14758 echo "$as_me:14758: \$? = $ac_status" >&5
14759 (exit $ac_status); } &&
14760 { ac_try='test -s conftest.$ac_objext'
14761 { (eval echo "$as_me:14761: \"$ac_try\"") >&5
14762 (eval $ac_try) 2>&5
14764 echo "$as_me:14764: \$? = $ac_status" >&5
14765 (exit $ac_status); }; }; then
14766 eval "$as_ac_Header=yes"
14768 echo "$as_me: failed program was:" >&5
14769 cat conftest.$ac_ext >&5
14770 eval "$as_ac_Header=no"
14772 rm -f conftest.$ac_objext conftest.$ac_ext
14774 echo "$as_me:14774: result: `eval echo '${'$as_ac_Header'}'`" >&5
14775 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14776 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14777 cat >>confdefs.h <<EOF
14778 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14781 ac_header_dirent=$ac_hdr; break
14785 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14786 if test $ac_header_dirent = dirent.h; then
14787 echo "$as_me:14787: checking for opendir in -ldir" >&5
14788 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14789 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14790 echo $ECHO_N "(cached) $ECHO_C" >&6
14792 ac_check_lib_save_LIBS=$LIBS
14794 cat >conftest.$ac_ext <<_ACEOF
14795 #line 14795 "configure"
14796 #include "confdefs.h"
14798 /* Override any gcc2 internal prototype to avoid an error. */
14802 /* We use char because int might match the return type of a gcc2
14803 builtin and then its argument prototype would still apply. */
14813 rm -f conftest.$ac_objext conftest$ac_exeext
14814 if { (eval echo "$as_me:14814: \"$ac_link\"") >&5
14815 (eval $ac_link) 2>&5
14817 echo "$as_me:14817: \$? = $ac_status" >&5
14818 (exit $ac_status); } &&
14819 { ac_try='test -s conftest$ac_exeext'
14820 { (eval echo "$as_me:14820: \"$ac_try\"") >&5
14821 (eval $ac_try) 2>&5
14823 echo "$as_me:14823: \$? = $ac_status" >&5
14824 (exit $ac_status); }; }; then
14825 ac_cv_lib_dir_opendir=yes
14827 echo "$as_me: failed program was:" >&5
14828 cat conftest.$ac_ext >&5
14829 ac_cv_lib_dir_opendir=no
14831 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14832 LIBS=$ac_check_lib_save_LIBS
14834 echo "$as_me:14834: result: $ac_cv_lib_dir_opendir" >&5
14835 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14836 if test $ac_cv_lib_dir_opendir = yes; then
14841 echo "$as_me:14841: checking for opendir in -lx" >&5
14842 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14843 if test "${ac_cv_lib_x_opendir+set}" = set; then
14844 echo $ECHO_N "(cached) $ECHO_C" >&6
14846 ac_check_lib_save_LIBS=$LIBS
14848 cat >conftest.$ac_ext <<_ACEOF
14849 #line 14849 "configure"
14850 #include "confdefs.h"
14852 /* Override any gcc2 internal prototype to avoid an error. */
14856 /* We use char because int might match the return type of a gcc2
14857 builtin and then its argument prototype would still apply. */
14867 rm -f conftest.$ac_objext conftest$ac_exeext
14868 if { (eval echo "$as_me:14868: \"$ac_link\"") >&5
14869 (eval $ac_link) 2>&5
14871 echo "$as_me:14871: \$? = $ac_status" >&5
14872 (exit $ac_status); } &&
14873 { ac_try='test -s conftest$ac_exeext'
14874 { (eval echo "$as_me:14874: \"$ac_try\"") >&5
14875 (eval $ac_try) 2>&5
14877 echo "$as_me:14877: \$? = $ac_status" >&5
14878 (exit $ac_status); }; }; then
14879 ac_cv_lib_x_opendir=yes
14881 echo "$as_me: failed program was:" >&5
14882 cat conftest.$ac_ext >&5
14883 ac_cv_lib_x_opendir=no
14885 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14886 LIBS=$ac_check_lib_save_LIBS
14888 echo "$as_me:14888: result: $ac_cv_lib_x_opendir" >&5
14889 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14890 if test $ac_cv_lib_x_opendir = yes; then
14896 echo "$as_me:14896: checking whether time.h and sys/time.h may both be included" >&5
14897 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14898 if test "${ac_cv_header_time+set}" = set; then
14899 echo $ECHO_N "(cached) $ECHO_C" >&6
14901 cat >conftest.$ac_ext <<_ACEOF
14902 #line 14902 "configure"
14903 #include "confdefs.h"
14904 #include <sys/types.h>
14905 #include <sys/time.h>
14911 if ((struct tm *) 0)
14917 rm -f conftest.$ac_objext
14918 if { (eval echo "$as_me:14918: \"$ac_compile\"") >&5
14919 (eval $ac_compile) 2>&5
14921 echo "$as_me:14921: \$? = $ac_status" >&5
14922 (exit $ac_status); } &&
14923 { ac_try='test -s conftest.$ac_objext'
14924 { (eval echo "$as_me:14924: \"$ac_try\"") >&5
14925 (eval $ac_try) 2>&5
14927 echo "$as_me:14927: \$? = $ac_status" >&5
14928 (exit $ac_status); }; }; then
14929 ac_cv_header_time=yes
14931 echo "$as_me: failed program was:" >&5
14932 cat conftest.$ac_ext >&5
14933 ac_cv_header_time=no
14935 rm -f conftest.$ac_objext conftest.$ac_ext
14937 echo "$as_me:14937: result: $ac_cv_header_time" >&5
14938 echo "${ECHO_T}$ac_cv_header_time" >&6
14939 if test $ac_cv_header_time = yes; then
14941 cat >>confdefs.h <<\EOF
14942 #define TIME_WITH_SYS_TIME 1
14947 ### checks for compiler characteristics
14949 ac_cpp='$CPP $CPPFLAGS'
14950 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14951 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14952 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14953 ac_main_return=return
14955 echo "$as_me:14955: checking for an ANSI C-conforming const" >&5
14956 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14957 if test "${ac_cv_c_const+set}" = set; then
14958 echo $ECHO_N "(cached) $ECHO_C" >&6
14960 cat >conftest.$ac_ext <<_ACEOF
14961 #line 14961 "configure"
14962 #include "confdefs.h"
14967 /* FIXME: Include the comments suggested by Paul. */
14968 #ifndef __cplusplus
14969 /* Ultrix mips cc rejects this. */
14970 typedef int charset[2];
14972 /* SunOS 4.1.1 cc rejects this. */
14973 char const *const *ccp;
14975 /* NEC SVR4.0.2 mips cc rejects this. */
14976 struct point {int x, y;};
14977 static struct point const zero = {0,0};
14978 /* AIX XL C 1.02.0.0 rejects this.
14979 It does not let you subtract one const X* pointer from another in
14980 an arm of an if-expression whose if-part is not a constant
14982 const char *g = "string";
14983 ccp = &g + (g ? g-g : 0);
14984 /* HPUX 7.0 cc rejects these. */
14987 ccp = (char const *const *) p;
14988 { /* SCO 3.2v4 cc rejects this. */
14990 char const *s = 0 ? (char *) 0 : (char const *) 0;
14994 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14995 int x[] = {25, 17};
14996 const int *foo = &x[0];
14999 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15000 typedef const int *iptr;
15004 { /* AIX XL C 1.02.0.0 rejects this saying
15005 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15006 struct s { int j; const int *ap[3]; };
15007 struct s *b; b->j = 5;
15009 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15010 const int foo = 10;
15018 rm -f conftest.$ac_objext
15019 if { (eval echo "$as_me:15019: \"$ac_compile\"") >&5
15020 (eval $ac_compile) 2>&5
15022 echo "$as_me:15022: \$? = $ac_status" >&5
15023 (exit $ac_status); } &&
15024 { ac_try='test -s conftest.$ac_objext'
15025 { (eval echo "$as_me:15025: \"$ac_try\"") >&5
15026 (eval $ac_try) 2>&5
15028 echo "$as_me:15028: \$? = $ac_status" >&5
15029 (exit $ac_status); }; }; then
15032 echo "$as_me: failed program was:" >&5
15033 cat conftest.$ac_ext >&5
15036 rm -f conftest.$ac_objext conftest.$ac_ext
15038 echo "$as_me:15038: result: $ac_cv_c_const" >&5
15039 echo "${ECHO_T}$ac_cv_c_const" >&6
15040 if test $ac_cv_c_const = no; then
15042 cat >>confdefs.h <<\EOF
15048 ### Checks for external-data
15050 echo "$as_me:15050: checking if data-only library module links" >&5
15051 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15052 if test "${cf_cv_link_dataonly+set}" = set; then
15053 echo $ECHO_N "(cached) $ECHO_C" >&6
15057 cat >conftest.$ac_ext <<EOF
15058 #line 15058 "configure"
15059 int testdata[3] = { 123, 456, 789 };
15061 if { (eval echo "$as_me:15061: \"$ac_compile\"") >&5
15062 (eval $ac_compile) 2>&5
15064 echo "$as_me:15064: \$? = $ac_status" >&5
15065 (exit $ac_status); } ; then
15066 mv conftest.o data.o && \
15067 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15069 rm -f conftest.$ac_ext data.o
15070 cat >conftest.$ac_ext <<EOF
15071 #line 15071 "configure"
15075 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
15077 extern int testdata[3];
15078 return testdata[0] == 123
15079 && testdata[1] == 456
15080 && testdata[2] == 789;
15084 if { (eval echo "$as_me:15084: \"$ac_compile\"") >&5
15085 (eval $ac_compile) 2>&5
15087 echo "$as_me:15087: \$? = $ac_status" >&5
15088 (exit $ac_status); }; then
15089 mv conftest.o func.o && \
15090 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15092 rm -f conftest.$ac_ext func.o
15093 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15094 cf_saveLIBS="$LIBS"
15095 LIBS="conftest.a $LIBS"
15096 if test "$cross_compiling" = yes; then
15097 cf_cv_link_dataonly=unknown
15099 cat >conftest.$ac_ext <<_ACEOF
15100 #line 15100 "configure"
15101 #include "confdefs.h"
15105 extern int testfunc();
15106 ${cf_cv_main_return:-return} (!testfunc());
15110 rm -f conftest$ac_exeext
15111 if { (eval echo "$as_me:15111: \"$ac_link\"") >&5
15112 (eval $ac_link) 2>&5
15114 echo "$as_me:15114: \$? = $ac_status" >&5
15115 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15116 { (eval echo "$as_me:15116: \"$ac_try\"") >&5
15117 (eval $ac_try) 2>&5
15119 echo "$as_me:15119: \$? = $ac_status" >&5
15120 (exit $ac_status); }; }; then
15121 cf_cv_link_dataonly=yes
15123 echo "$as_me: program exited with status $ac_status" >&5
15124 echo "$as_me: failed program was:" >&5
15125 cat conftest.$ac_ext >&5
15126 cf_cv_link_dataonly=no
15128 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15130 LIBS="$cf_saveLIBS"
15134 echo "$as_me:15134: result: $cf_cv_link_dataonly" >&5
15135 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15137 if test "$cf_cv_link_dataonly" = no ; then
15139 cat >>confdefs.h <<\EOF
15140 #define BROKEN_LINKER 1
15146 ### Checks for library functions.
15152 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15153 echo "$as_me:15153: checking for $ac_header" >&5
15154 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15155 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15156 echo $ECHO_N "(cached) $ECHO_C" >&6
15158 cat >conftest.$ac_ext <<_ACEOF
15159 #line 15159 "configure"
15160 #include "confdefs.h"
15161 #include <$ac_header>
15163 if { (eval echo "$as_me:15163: \"$ac_cpp conftest.$ac_ext\"") >&5
15164 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15166 egrep -v '^ *\+' conftest.er1 >conftest.err
15168 cat conftest.err >&5
15169 echo "$as_me:15169: \$? = $ac_status" >&5
15170 (exit $ac_status); } >/dev/null; then
15171 if test -s conftest.err; then
15172 ac_cpp_err=$ac_c_preproc_warn_flag
15179 if test -z "$ac_cpp_err"; then
15180 eval "$as_ac_Header=yes"
15182 echo "$as_me: failed program was:" >&5
15183 cat conftest.$ac_ext >&5
15184 eval "$as_ac_Header=no"
15186 rm -f conftest.err conftest.$ac_ext
15188 echo "$as_me:15188: result: `eval echo '${'$as_ac_Header'}'`" >&5
15189 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15190 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15191 cat >>confdefs.h <<EOF
15192 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15198 echo "$as_me:15198: checking for working mkstemp" >&5
15199 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
15200 if test "${cf_cv_func_mkstemp+set}" = set; then
15201 echo $ECHO_N "(cached) $ECHO_C" >&6
15205 if test "$cross_compiling" = yes; then
15206 cf_cv_func_mkstemp=maybe
15208 cat >conftest.$ac_ext <<_ACEOF
15209 #line 15209 "configure"
15210 #include "confdefs.h"
15212 #include <sys/types.h>
15213 #ifdef HAVE_UNISTD_H
15214 #include <unistd.h>
15216 #include <stdlib.h>
15218 #include <string.h>
15219 #include <sys/stat.h>
15222 char *tmpl = "conftestXXXXXX";
15230 for (n = 0; n < 2; ++n) {
15231 strcpy(name[n], tmpl);
15232 if ((fd = mkstemp(name[n])) >= 0) {
15233 if (!strcmp(name[n], tmpl)
15234 || stat(name[n], &sb) != 0
15235 || (sb.st_mode & S_IFMT) != S_IFREG
15236 || (sb.st_mode & 077) != 0) {
15243 && !strcmp(name[0], name[1]))
15245 ${cf_cv_main_return:-return}(result);
15249 rm -f conftest$ac_exeext
15250 if { (eval echo "$as_me:15250: \"$ac_link\"") >&5
15251 (eval $ac_link) 2>&5
15253 echo "$as_me:15253: \$? = $ac_status" >&5
15254 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15255 { (eval echo "$as_me:15255: \"$ac_try\"") >&5
15256 (eval $ac_try) 2>&5
15258 echo "$as_me:15258: \$? = $ac_status" >&5
15259 (exit $ac_status); }; }; then
15260 cf_cv_func_mkstemp=yes
15263 echo "$as_me: program exited with status $ac_status" >&5
15264 echo "$as_me: failed program was:" >&5
15265 cat conftest.$ac_ext >&5
15266 cf_cv_func_mkstemp=no
15269 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15273 echo "$as_me:15273: result: $cf_cv_func_mkstemp" >&5
15274 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
15275 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
15276 echo "$as_me:15276: checking for mkstemp" >&5
15277 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
15278 if test "${ac_cv_func_mkstemp+set}" = set; then
15279 echo $ECHO_N "(cached) $ECHO_C" >&6
15281 cat >conftest.$ac_ext <<_ACEOF
15282 #line 15282 "configure"
15283 #include "confdefs.h"
15284 /* System header to define __stub macros and hopefully few prototypes,
15285 which can conflict with char mkstemp (); below. */
15286 #include <assert.h>
15287 /* Override any gcc2 internal prototype to avoid an error. */
15291 /* We use char because int might match the return type of a gcc2
15292 builtin and then its argument prototype would still apply. */
15299 /* The GNU C library defines this for functions which it implements
15300 to always fail with ENOSYS. Some functions are actually named
15301 something starting with __ and the normal name is an alias. */
15302 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
15305 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15312 rm -f conftest.$ac_objext conftest$ac_exeext
15313 if { (eval echo "$as_me:15313: \"$ac_link\"") >&5
15314 (eval $ac_link) 2>&5
15316 echo "$as_me:15316: \$? = $ac_status" >&5
15317 (exit $ac_status); } &&
15318 { ac_try='test -s conftest$ac_exeext'
15319 { (eval echo "$as_me:15319: \"$ac_try\"") >&5
15320 (eval $ac_try) 2>&5
15322 echo "$as_me:15322: \$? = $ac_status" >&5
15323 (exit $ac_status); }; }; then
15324 ac_cv_func_mkstemp=yes
15326 echo "$as_me: failed program was:" >&5
15327 cat conftest.$ac_ext >&5
15328 ac_cv_func_mkstemp=no
15330 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15332 echo "$as_me:15332: result: $ac_cv_func_mkstemp" >&5
15333 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
15336 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
15338 cat >>confdefs.h <<\EOF
15339 #define HAVE_MKSTEMP 1
15344 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
15345 CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
15346 CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
15350 if test "$cf_with_ada" != "no" ; then
15352 cf_ada_make=gnatmake
15354 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
15355 set dummy $cf_ada_make; ac_word=$2
15356 echo "$as_me:15356: checking for $ac_word" >&5
15357 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15358 if test "${ac_cv_prog_gnatmake_exists+set}" = set; then
15359 echo $ECHO_N "(cached) $ECHO_C" >&6
15361 if test -n "$gnatmake_exists"; then
15362 ac_cv_prog_gnatmake_exists="$gnatmake_exists" # Let the user override the test.
15364 ac_save_IFS=$IFS; IFS=$ac_path_separator
15366 for ac_dir in $ac_dummy; do
15368 test -z "$ac_dir" && ac_dir=.
15369 $as_executable_p "$ac_dir/$ac_word" || continue
15370 ac_cv_prog_gnatmake_exists="yes"
15371 echo "$as_me:15371: found $ac_dir/$ac_word" >&5
15375 test -z "$ac_cv_prog_gnatmake_exists" && ac_cv_prog_gnatmake_exists="no"
15378 gnatmake_exists=$ac_cv_prog_gnatmake_exists
15379 if test -n "$gnatmake_exists"; then
15380 echo "$as_me:15380: result: $gnatmake_exists" >&5
15381 echo "${ECHO_T}$gnatmake_exists" >&6
15383 echo "$as_me:15383: result: no" >&5
15384 echo "${ECHO_T}no" >&6
15387 if test "$ac_cv_prog_gnatmake_exists" = no; then
15389 cf_cv_prog_gnat_correct=no
15391 # Extract the first word of "gprconfig", so it can be a program name with args.
15392 set dummy gprconfig; ac_word=$2
15393 echo "$as_me:15393: checking for $ac_word" >&5
15394 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15395 if test "${ac_cv_prog_gprconfig_exists+set}" = set; then
15396 echo $ECHO_N "(cached) $ECHO_C" >&6
15398 if test -n "$gprconfig_exists"; then
15399 ac_cv_prog_gprconfig_exists="$gprconfig_exists" # Let the user override the test.
15401 ac_save_IFS=$IFS; IFS=$ac_path_separator
15403 for ac_dir in $ac_dummy; do
15405 test -z "$ac_dir" && ac_dir=.
15406 $as_executable_p "$ac_dir/$ac_word" || continue
15407 ac_cv_prog_gprconfig_exists="yes"
15408 echo "$as_me:15408: found $ac_dir/$ac_word" >&5
15412 test -z "$ac_cv_prog_gprconfig_exists" && ac_cv_prog_gprconfig_exists="no"
15415 gprconfig_exists=$ac_cv_prog_gprconfig_exists
15416 if test -n "$gprconfig_exists"; then
15417 echo "$as_me:15417: result: $gprconfig_exists" >&5
15418 echo "${ECHO_T}$gprconfig_exists" >&6
15420 echo "$as_me:15420: result: no" >&5
15421 echo "${ECHO_T}no" >&6
15424 if test "$ac_cv_prog_gprconfig_exists" = yes
15426 rm -rf conftest* *~conftest*
15427 if mkdir conftest.src
15431 for cf_gprconfig in Ada C
15433 echo "$as_me:15433: checking for gprconfig name for $cf_gprconfig" >&5
15434 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
15435 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
15436 if test -n "$cf_gprconfig_value"
15438 eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
15439 echo "$as_me:15439: result: $cf_gprconfig_value" >&5
15440 echo "${ECHO_T}$cf_gprconfig_value" >&6
15442 echo "$as_me:15442: result: missing" >&5
15443 echo "${ECHO_T}missing" >&6
15449 rm -rf conftest* *~conftest*
15452 # gprconfig is newer than gnatmake; we can continue...
15455 if test "x$cf_ada_config" != "x#"
15458 echo "$as_me:15458: checking for gnat version" >&5
15459 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
15460 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
15461 grep '[0-9].[0-9][0-9]*' |\
15462 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
15463 echo "$as_me:15463: result: $cf_gnat_version" >&5
15464 echo "${ECHO_T}$cf_gnat_version" >&6
15466 case $cf_gnat_version in
15467 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
15468 cf_cv_prog_gnat_correct=yes
15471 { echo "$as_me:15471: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
15472 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
15473 cf_cv_prog_gnat_correct=no
15477 # Extract the first word of "m4", so it can be a program name with args.
15478 set dummy m4; ac_word=$2
15479 echo "$as_me:15479: checking for $ac_word" >&5
15480 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15481 if test "${ac_cv_prog_M4_exists+set}" = set; then
15482 echo $ECHO_N "(cached) $ECHO_C" >&6
15484 if test -n "$M4_exists"; then
15485 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
15487 ac_save_IFS=$IFS; IFS=$ac_path_separator
15489 for ac_dir in $ac_dummy; do
15491 test -z "$ac_dir" && ac_dir=.
15492 $as_executable_p "$ac_dir/$ac_word" || continue
15493 ac_cv_prog_M4_exists="yes"
15494 echo "$as_me:15494: found $ac_dir/$ac_word" >&5
15498 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
15501 M4_exists=$ac_cv_prog_M4_exists
15502 if test -n "$M4_exists"; then
15503 echo "$as_me:15503: result: $M4_exists" >&5
15504 echo "${ECHO_T}$M4_exists" >&6
15506 echo "$as_me:15506: result: no" >&5
15507 echo "${ECHO_T}no" >&6
15510 if test "$ac_cv_prog_M4_exists" = no; then
15511 cf_cv_prog_gnat_correct=no
15512 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
15514 if test "$cf_cv_prog_gnat_correct" = yes; then
15515 echo "$as_me:15515: checking if GNAT works" >&5
15516 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
15518 rm -rf conftest* *~conftest*
15519 cat >>conftest.ads <<CF_EOF
15520 procedure conftest;
15522 cat >>conftest.adb <<CF_EOF
15525 procedure conftest is
15527 Text_IO.Put ("Hello World");
15529 GNAT.OS_Lib.OS_Exit (0);
15532 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15533 if ( ./conftest 1>&5 2>&1 ) ; then
15534 cf_cv_prog_gnat_correct=yes
15536 cf_cv_prog_gnat_correct=no
15539 cf_cv_prog_gnat_correct=no
15541 rm -rf conftest* *~conftest*
15543 echo "$as_me:15543: result: $cf_cv_prog_gnat_correct" >&5
15544 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
15547 cf_cv_prog_gnat_correct=no
15551 if test "$cf_cv_prog_gnat_correct" = yes; then
15553 echo "$as_me:15553: checking optimization options for ADAFLAGS" >&5
15554 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
15558 ADAFLAGS="$ADAFLAGS -g"
15564 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
15566 ADAFLAGS="$ADAFLAGS $cf_O_flag"
15570 echo "$as_me:15570: result: $ADAFLAGS" >&5
15571 echo "${ECHO_T}$ADAFLAGS" >&6
15573 echo "$as_me:15573: checking if GNATPREP supports -T option" >&5
15574 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
15575 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
15576 echo $ECHO_N "(cached) $ECHO_C" >&6
15579 cf_cv_gnatprep_opt_t=no
15580 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
15583 echo "$as_me:15583: result: $cf_cv_gnatprep_opt_t" >&5
15584 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
15585 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
15587 echo "$as_me:15587: checking if GNAT supports generics" >&5
15588 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
15589 case $cf_gnat_version in
15591 cf_gnat_generics=yes
15594 cf_gnat_generics=no
15597 echo "$as_me:15597: result: $cf_gnat_generics" >&5
15598 echo "${ECHO_T}$cf_gnat_generics" >&6
15600 if test "$cf_gnat_generics" = yes
15602 cf_compile_generics=generics
15603 cf_generic_objects="\${GENOBJS}"
15605 cf_compile_generics=
15606 cf_generic_objects=
15609 echo "$as_me:15609: checking if GNAT supports SIGINT" >&5
15610 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
15611 if test "${cf_cv_gnat_sigint+set}" = set; then
15612 echo $ECHO_N "(cached) $ECHO_C" >&6
15615 rm -rf conftest* *~conftest*
15616 cat >>conftest.ads <<CF_EOF
15617 with Ada.Interrupts.Names;
15619 package ConfTest is
15621 pragma Warnings (Off); -- the next pragma exists since 3.11p
15622 pragma Unreserve_All_Interrupts;
15623 pragma Warnings (On);
15625 protected Process is
15627 function Continue return Boolean;
15628 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
15630 Done : Boolean := False;
15635 cat >>conftest.adb <<CF_EOF
15636 package body ConfTest is
15637 protected body Process is
15642 function Continue return Boolean is
15649 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15650 cf_cv_gnat_sigint=yes
15652 cf_cv_gnat_sigint=no
15654 rm -rf conftest* *~conftest*
15657 echo "$as_me:15657: result: $cf_cv_gnat_sigint" >&5
15658 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
15660 if test $cf_cv_gnat_sigint = yes ; then
15663 USE_GNAT_SIGINT="#"
15666 cf_gnat_libraries=no
15667 cf_gnat_projects=no
15669 if test "$enable_gnat_projects" != no ; then
15670 echo "$as_me:15670: checking if GNAT supports project files" >&5
15671 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
15672 case $cf_gnat_version in
15676 case $cf_cv_system_name in
15680 rm -rf conftest* *~conftest*
15681 if mkdir conftest.src conftest.bin conftest.lib
15684 rm -rf conftest* *~conftest*
15685 cat >>library.gpr <<CF_EOF
15687 Kind := External ("LIB_KIND");
15688 for Library_Name use "ConfTest";
15689 for Object_Dir use ".";
15690 for Library_ALI_Dir use External("LIBRARY_DIR");
15691 for Library_Version use External ("SONAME");
15692 for Library_Kind use Kind;
15693 for Library_Dir use External("BUILD_DIR");
15694 Source_Dir := External ("SOURCE_DIR");
15695 for Source_Dirs use (Source_Dir);
15698 cat >>confpackage.ads <<CF_EOF
15699 package ConfPackage is
15700 procedure conftest;
15703 cat >>confpackage.adb <<CF_EOF
15705 package body ConfPackage is
15706 procedure conftest is
15708 Text_IO.Put ("Hello World");
15713 if ( $cf_ada_make $ADAFLAGS \
15715 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
15716 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
15717 -XSOURCE_DIR=`pwd` \
15718 -XSONAME=libConfTest.so.1 \
15719 -XLIB_KIND=static 1>&5 2>&1 ) ; then
15720 cf_gnat_projects=yes
15724 if test -f conftest.lib/confpackage.ali
15726 cf_gnat_libraries=yes
15728 rm -rf conftest* *~conftest*
15733 echo "$as_me:15733: result: $cf_gnat_projects" >&5
15734 echo "${ECHO_T}$cf_gnat_projects" >&6
15735 fi # enable_gnat_projects
15737 if test $cf_gnat_projects = yes
15739 echo "$as_me:15739: checking if GNAT supports libraries" >&5
15740 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
15741 echo "$as_me:15741: result: $cf_gnat_libraries" >&5
15742 echo "${ECHO_T}$cf_gnat_libraries" >&6
15745 if test "$cf_gnat_projects" = yes
15747 USE_OLD_MAKERULES="#"
15748 USE_GNAT_PROJECTS=""
15750 USE_OLD_MAKERULES=""
15751 USE_GNAT_PROJECTS="#"
15754 if test "$cf_gnat_libraries" = yes
15756 USE_GNAT_LIBRARIES=""
15758 USE_GNAT_LIBRARIES="#"
15761 echo "$as_me:15761: checking for ada-compiler" >&5
15762 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
15764 # Check whether --with-ada-compiler or --without-ada-compiler was given.
15765 if test "${with_ada_compiler+set}" = set; then
15766 withval="$with_ada_compiler"
15767 cf_ada_compiler=$withval
15769 cf_ada_compiler=gnatmake
15772 echo "$as_me:15772: result: $cf_ada_compiler" >&5
15773 echo "${ECHO_T}$cf_ada_compiler" >&6
15775 cf_ada_package=terminal_interface
15777 echo "$as_me:15777: checking for ada-include" >&5
15778 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
15780 # Check whether --with-ada-include or --without-ada-include was given.
15781 if test "${with_ada_include+set}" = set; then
15782 withval="$with_ada_include"
15785 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
15786 fi; if test -n "$prefix/share/ada/adainclude" ; then
15788 if test "x$prefix" != xNONE; then
15789 cf_path_syntax="$prefix"
15791 cf_path_syntax="$ac_default_prefix"
15794 case ".$withval" in
15795 (.\$\(*\)*|.\'*\'*)
15799 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
15801 (.\${*prefix}*|.\${*dir}*)
15802 eval withval="$withval"
15803 case ".$withval" in
15805 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15810 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15813 { { echo "$as_me:15813: error: expected a pathname, not \"$withval\"" >&5
15814 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15815 { (exit 1); exit 1; }; }
15820 eval ADA_INCLUDE="$withval"
15822 echo "$as_me:15822: result: $ADA_INCLUDE" >&5
15823 echo "${ECHO_T}$ADA_INCLUDE" >&6
15825 echo "$as_me:15825: checking for ada-objects" >&5
15826 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
15828 # Check whether --with-ada-objects or --without-ada-objects was given.
15829 if test "${with_ada_objects+set}" = set; then
15830 withval="$with_ada_objects"
15833 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
15834 fi; if test -n "$prefix/lib/ada/adalib" ; then
15836 if test "x$prefix" != xNONE; then
15837 cf_path_syntax="$prefix"
15839 cf_path_syntax="$ac_default_prefix"
15842 case ".$withval" in
15843 (.\$\(*\)*|.\'*\'*)
15847 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
15849 (.\${*prefix}*|.\${*dir}*)
15850 eval withval="$withval"
15851 case ".$withval" in
15853 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15858 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15861 { { echo "$as_me:15861: error: expected a pathname, not \"$withval\"" >&5
15862 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15863 { (exit 1); exit 1; }; }
15868 eval ADA_OBJECTS="$withval"
15870 echo "$as_me:15870: result: $ADA_OBJECTS" >&5
15871 echo "${ECHO_T}$ADA_OBJECTS" >&6
15873 echo "$as_me:15873: checking if an Ada95 shared-library should be built" >&5
15874 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
15876 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
15877 if test "${with_ada_sharedlib+set}" = set; then
15878 withval="$with_ada_sharedlib"
15879 with_ada_sharedlib=$withval
15881 with_ada_sharedlib=no
15883 echo "$as_me:15883: result: $with_ada_sharedlib" >&5
15884 echo "${ECHO_T}$with_ada_sharedlib" >&6
15886 if test "x$with_ada_sharedlib" != xno
15888 if test "x$cf_gnat_projects" != xyes
15890 { echo "$as_me:15890: WARNING: disabling shared-library since GNAT projects are not supported" >&5
15891 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
15892 with_ada_sharedlib=no
15896 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
15897 MAKE_ADA_SHAREDLIB="#"
15899 if test "x$with_ada_sharedlib" != xno
15901 MAKE_ADA_SHAREDLIB=
15902 if test "x$with_ada_sharedlib" != xyes
15904 ADA_SHAREDLIB="$with_ada_sharedlib"
15909 { { echo "$as_me:15909: error: No usable Ada compiler found" >&5
15910 echo "$as_me: error: No usable Ada compiler found" >&2;}
15911 { (exit 1); exit 1; }; }
15914 { { echo "$as_me:15914: error: The Ada compiler is needed for this package" >&5
15915 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
15916 { (exit 1); exit 1; }; }
15919 ################################################################################
15926 ### Construct the list of include-directories to be generated
15928 if test "$srcdir" != "."; then
15929 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
15931 CPPFLAGS="-I../include $CPPFLAGS"
15932 if test "$srcdir" != "."; then
15933 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
15935 CPPFLAGS="-I. $CPPFLAGS"
15937 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
15938 if test "$srcdir" != "."; then
15939 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
15941 if test "$GCC" != yes; then
15942 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15943 elif test "$includedir" != "/usr/include"; then
15944 if test "$includedir" = '${prefix}/include' ; then
15945 if test x$prefix != x/usr ; then
15946 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15949 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15953 ### Build up pieces for makefile rules
15954 echo "$as_me:15954: checking default library suffix" >&5
15955 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
15957 case $DFT_LWR_MODEL in
15958 (libtool) DFT_ARG_SUFFIX='' ;;
15959 (normal) DFT_ARG_SUFFIX='' ;;
15960 (debug) DFT_ARG_SUFFIX='_g' ;;
15961 (profile) DFT_ARG_SUFFIX='_p' ;;
15962 (shared) DFT_ARG_SUFFIX='' ;;
15964 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
15965 echo "$as_me:15965: result: $DFT_ARG_SUFFIX" >&5
15966 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
15968 echo "$as_me:15968: checking default library-dependency suffix" >&5
15969 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
15971 case X$DFT_LWR_MODEL in
15973 DFT_LIB_SUFFIX='.la'
15974 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15977 DFT_LIB_SUFFIX='_g.a'
15978 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15981 DFT_LIB_SUFFIX='_p.a'
15982 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15985 case $cf_cv_system_name in
15987 DFT_LIB_SUFFIX='.so'
15988 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
15990 (cygwin*|msys*|mingw*)
15991 DFT_LIB_SUFFIX='.dll'
15992 DFT_DEP_SUFFIX='.dll.a'
15995 DFT_LIB_SUFFIX='.dylib'
15996 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16001 DFT_LIB_SUFFIX='.so'
16002 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16005 DFT_LIB_SUFFIX='.sl'
16006 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16011 DFT_LIB_SUFFIX='.so'
16012 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16017 DFT_LIB_SUFFIX='.a'
16018 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16021 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
16023 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
16024 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
16026 echo "$as_me:16026: result: $DFT_DEP_SUFFIX" >&5
16027 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
16029 echo "$as_me:16029: checking default object directory" >&5
16030 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
16032 case $DFT_LWR_MODEL in
16033 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
16034 (normal) DFT_OBJ_SUBDIR='objects' ;;
16035 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
16036 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
16038 case $cf_cv_system_name in
16040 DFT_OBJ_SUBDIR='objects' ;;
16042 DFT_OBJ_SUBDIR='obj_s' ;;
16045 echo "$as_me:16045: result: $DFT_OBJ_SUBDIR" >&5
16046 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
16048 ### Set up low-level terminfo dependencies for makefiles.
16050 if test "$DFT_LWR_MODEL" = shared ; then
16051 case $cf_cv_system_name in
16053 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
16056 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
16061 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
16063 ### Construct the list of subdirectories for which we'll customize makefiles
16064 ### with the appropriate compile-rules.
16066 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
16068 cat >>confdefs.h <<EOF
16069 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
16072 ### Now that we're done running tests, add the compiler-warnings, if any
16077 cf_new_extra_cppflags=
16079 for cf_add_cflags in $EXTRA_CFLAGS
16081 case $cf_fix_cppflags in
16083 case $cf_add_cflags in
16084 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16085 case $cf_add_cflags in
16087 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16089 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16090 && test -z "${cf_tst_cflags}" \
16091 && cf_fix_cppflags=yes
16093 if test $cf_fix_cppflags = yes ; then
16095 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16096 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16099 elif test "${cf_tst_cflags}" = "\"'" ; then
16101 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16102 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16108 case "$CPPFLAGS" in
16112 case $cf_add_cflags in
16114 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16116 CPPFLAGS=`echo "$CPPFLAGS" | \
16117 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16118 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16123 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16124 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16131 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16132 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16139 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16140 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16142 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16144 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16145 && test -z "${cf_tst_cflags}" \
16146 && cf_fix_cppflags=no
16151 if test -n "$cf_new_cflags" ; then
16153 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16154 CFLAGS="${CFLAGS}$cf_new_cflags"
16158 if test -n "$cf_new_cppflags" ; then
16160 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16161 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16165 if test -n "$cf_new_extra_cppflags" ; then
16167 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16168 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16172 ################################################################################
16178 NCURSES_SHLIB2="sh -c"
16180 ADA_SUBDIRS="include gen src doc"
16181 if test "x$cf_with_tests" != "xno" ; then
16182 ADA_SUBDIRS="$ADA_SUBDIRS samples"
16184 for cf_dir in $ADA_SUBDIRS
16186 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
16193 # match layout used by make-tar.sh
16194 ADAHTML_DIR=../doc/ada
16196 if test "x$cross_compiling" = xyes ; then
16197 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
16199 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
16202 ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
16203 ac_config_commands="$ac_config_commands default"
16204 cat >confcache <<\_ACEOF
16205 # This file is a shell script that caches the results of configure
16206 # tests run on this system so they can be shared between configure
16207 # scripts and configure runs, see configure's option --config-cache.
16208 # It is not useful on other systems. If it contains results you don't
16209 # want to keep, you may remove or edit it.
16211 # config.status only pays attention to the cache file if you give it
16212 # the --recheck option to rerun configure.
16214 # `ac_cv_env_foo' variables (set or unset) will be overriden when
16215 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16216 # following values.
16220 # The following way of writing the cache mishandles newlines in values,
16221 # but we know of no workaround that is simple, portable, and efficient.
16222 # So, don't put newlines in cache variables' values.
16223 # Ultrix sh set writes to stderr and can't be redirected directly,
16224 # and sets the high bit in the cache file unless we assign to the vars.
16227 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16229 # `set' does not quote correctly, so add quotes (double-quote
16230 # substitution turns \\\\ into \\, and sed turns \\ into \).
16233 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16236 # `set' quotes correctly as required by POSIX, so do not add quotes.
16238 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16245 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16247 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16249 if cmp -s $cache_file confcache; then :; else
16250 if test -w $cache_file; then
16251 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16252 cat confcache >$cache_file
16254 echo "not updating unwritable cache $cache_file"
16259 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16260 # Let make expand exec_prefix.
16261 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16263 # VPATH may cause trouble with some makes, so we remove $(srcdir),
16264 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16265 # trailing colons and then remove the whole line if VPATH becomes empty
16266 # (actually we leave an empty line to preserve line numbers).
16267 if test "x$srcdir" = x.; then
16268 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16269 s/:*\$(srcdir):*/:/;
16270 s/:*\${srcdir}:*/:/;
16272 s/^\([^=]*=[ ]*\):*/\1/;
16278 DEFS=-DHAVE_CONFIG_H
16280 : ${CONFIG_STATUS=./config.status}
16281 ac_clean_files_save=$ac_clean_files
16282 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16283 { echo "$as_me:16283: creating $CONFIG_STATUS" >&5
16284 echo "$as_me: creating $CONFIG_STATUS" >&6;}
16285 cat >$CONFIG_STATUS <<_ACEOF
16287 # Generated automatically by configure.
16288 # Run this file to recreate the current configuration.
16289 # Compiler output produced by configure, useful for debugging
16290 # configure, is in config.log if it exists.
16293 SHELL=\${CONFIG_SHELL-$SHELL}
16294 ac_cs_invocation="\$0 \$@"
16298 cat >>$CONFIG_STATUS <<\_ACEOF
16299 # Be Bourne compatible
16300 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16303 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16307 # Name of the executable.
16308 as_me=`echo "$0" |sed 's,.*[\\/],,'`
16310 if expr a : '\(a\)' >/dev/null 2>&1; then
16316 rm -f conf$$ conf$$.exe conf$$.file
16318 if ln -s conf$$.file conf$$ 2>/dev/null; then
16319 # We could just check for DJGPP; but this test a) works b) is more generic
16320 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16321 if test -f conf$$.exe; then
16322 # Don't use ln at all; we don't have any links
16327 elif ln conf$$.file conf$$ 2>/dev/null; then
16332 rm -f conf$$ conf$$.exe conf$$.file
16334 as_executable_p="test -f"
16336 # Support unset when possible.
16337 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16344 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
16345 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
16346 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
16347 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
16348 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
16349 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
16350 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
16351 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
16354 # We need space, tab and new line, in precisely that order.
16360 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
16366 # Files that config.status was made for.
16367 if test -n "$ac_config_files"; then
16368 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16371 if test -n "$ac_config_headers"; then
16372 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16375 if test -n "$ac_config_links"; then
16376 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16379 if test -n "$ac_config_commands"; then
16380 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16383 cat >>$CONFIG_STATUS <<\EOF
16386 \`$as_me' instantiates files from templates according to the
16387 current configuration.
16389 Usage: $0 [OPTIONS] [FILE]...
16391 -h, --help print this help, then exit
16392 -V, --version print version number, then exit
16393 -d, --debug don't remove temporary files
16394 --recheck update $as_me by reconfiguring in the same conditions
16395 --file=FILE[:TEMPLATE]
16396 instantiate the configuration file FILE
16397 --header=FILE[:TEMPLATE]
16398 instantiate the configuration header FILE
16400 Configuration files:
16403 Configuration headers:
16406 Configuration commands:
16409 Report bugs to <dickey@invisible-island.net>."
16412 cat >>$CONFIG_STATUS <<EOF
16415 configured by $0, generated by GNU Autoconf 2.52.20170501,
16416 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16418 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16419 Free Software Foundation, Inc.
16420 This config.status script is free software; the Free Software Foundation
16421 gives unlimited permission to copy, distribute and modify it."
16426 cat >>$CONFIG_STATUS <<\EOF
16427 # If no file are specified by the user, then we need to provide default
16428 # value. By we need to know if files were specified by the user.
16434 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16435 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16437 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16441 *) # This is not an option, so the user has probably given explicit
16443 ac_need_defaults=false;;
16447 # Handling of the options.
16449 cat >>$CONFIG_STATUS <<EOF
16450 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16451 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16452 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16454 cat >>$CONFIG_STATUS <<\EOF
16455 --version | --vers* | -V )
16456 echo "$ac_cs_version"; exit 0 ;;
16458 # Conflict between --help and --header
16459 { { echo "$as_me:16459: error: ambiguous option: $1
16460 Try \`$0 --help' for more information." >&5
16461 echo "$as_me: error: ambiguous option: $1
16462 Try \`$0 --help' for more information." >&2;}
16463 { (exit 1); exit 1; }; };;
16464 --help | --hel | -h )
16465 echo "$ac_cs_usage"; exit 0 ;;
16466 --debug | --d* | -d )
16468 --file | --fil | --fi | --f )
16470 CONFIG_FILES="$CONFIG_FILES $1"
16471 ac_need_defaults=false;;
16472 --header | --heade | --head | --hea )
16474 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16475 ac_need_defaults=false;;
16477 # This is an error.
16478 -*) { { echo "$as_me:16478: error: unrecognized option: $1
16479 Try \`$0 --help' for more information." >&5
16480 echo "$as_me: error: unrecognized option: $1
16481 Try \`$0 --help' for more information." >&2;}
16482 { (exit 1); exit 1; }; } ;;
16484 *) ac_config_targets="$ac_config_targets $1" ;;
16493 ## ----------------------- ##
16494 ## Running config.status. ##
16495 ## ----------------------- ##
16497 This file was extended by $as_me 2.52.20170501, executed with
16498 CONFIG_FILES = $CONFIG_FILES
16499 CONFIG_HEADERS = $CONFIG_HEADERS
16500 CONFIG_LINKS = $CONFIG_LINKS
16501 CONFIG_COMMANDS = $CONFIG_COMMANDS
16502 > $ac_cs_invocation
16503 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16508 cat >>$CONFIG_STATUS <<EOF
16510 # INIT-COMMANDS section.
16513 ### Special initialization commands, used to pass information from the
16514 ### configuration-run into config.status
16517 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
16518 DFT_LWR_MODEL="$DFT_LWR_MODEL"
16519 LIB_NAME="$LIB_NAME"
16520 LIB_PREFIX="$LIB_PREFIX"
16521 LIB_SUFFIX="$LIB_SUFFIX"
16523 NCURSES_MAJOR="$NCURSES_MAJOR"
16524 NCURSES_MINOR="$NCURSES_MINOR"
16525 NCURSES_PATCH="$NCURSES_PATCH"
16526 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
16527 cf_cv_abi_version="$cf_cv_abi_version"
16528 cf_cv_rel_version="$cf_cv_rel_version"
16529 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
16530 cf_cv_shared_soname='$cf_cv_shared_soname'
16531 cf_cv_shlib_version="$cf_cv_shlib_version"
16532 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
16533 cf_cv_system_name="$cf_cv_system_name"
16539 cat >>$CONFIG_STATUS <<\EOF
16540 for ac_config_target in $ac_config_targets
16542 case "$ac_config_target" in
16543 # Handling of arguments.
16544 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
16545 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
16546 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16547 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16548 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
16549 *) { { echo "$as_me:16549: error: invalid argument: $ac_config_target" >&5
16550 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16551 { (exit 1); exit 1; }; };;
16555 # If the user did not use the arguments to specify the items to instantiate,
16556 # then the envvar interface is used. Set only those that are not.
16557 # We use the long form for the default assignment because of an extremely
16558 # bizarre bug on SunOS 4.1.3.
16559 if $ac_need_defaults; then
16560 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16561 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16562 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16565 # Create a temporary directory, and hook for its removal unless debugging.
16568 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16569 trap '{ (exit 1); exit 1; }' 1 2 13 15
16572 # Create a (secure) tmp directory for tmp files.
16575 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16576 test -n "$tmp" && test -d "$tmp"
16579 tmp=$TMPDIR/cs$$-$RANDOM
16580 (umask 077 && mkdir $tmp)
16583 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16584 { (exit 1); exit 1; }
16589 cat >>$CONFIG_STATUS <<EOF
16592 # CONFIG_FILES section.
16595 # No need to generate the scripts if there are no CONFIG_FILES.
16596 # This happens for instance when ./config.status config.h
16597 if test -n "\$CONFIG_FILES"; then
16598 # Protect against being on the right side of a sed subst in config.status.
16599 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16600 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16601 s,@SHELL@,$SHELL,;t t
16602 s,@exec_prefix@,$exec_prefix,;t t
16603 s,@prefix@,$prefix,;t t
16604 s,@program_transform_name@,$program_transform_name,;t t
16605 s,@bindir@,$bindir,;t t
16606 s,@sbindir@,$sbindir,;t t
16607 s,@libexecdir@,$libexecdir,;t t
16608 s,@datarootdir@,$datarootdir,;t t
16609 s,@datadir@,$datadir,;t t
16610 s,@sysconfdir@,$sysconfdir,;t t
16611 s,@sharedstatedir@,$sharedstatedir,;t t
16612 s,@localstatedir@,$localstatedir,;t t
16613 s,@libdir@,$libdir,;t t
16614 s,@includedir@,$includedir,;t t
16615 s,@oldincludedir@,$oldincludedir,;t t
16616 s,@infodir@,$infodir,;t t
16617 s,@mandir@,$mandir,;t t
16618 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16619 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16620 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16621 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16622 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16623 s,@build_alias@,$build_alias,;t t
16624 s,@host_alias@,$host_alias,;t t
16625 s,@target_alias@,$target_alias,;t t
16626 s,@ECHO_C@,$ECHO_C,;t t
16627 s,@ECHO_N@,$ECHO_N,;t t
16628 s,@ECHO_T@,$ECHO_T,;t t
16629 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16630 s,@DEFS@,$DEFS,;t t
16631 s,@LIBS@,$LIBS,;t t
16632 s,@top_builddir@,$top_builddir,;t t
16633 s,@build@,$build,;t t
16634 s,@build_cpu@,$build_cpu,;t t
16635 s,@build_vendor@,$build_vendor,;t t
16636 s,@build_os@,$build_os,;t t
16637 s,@host@,$host,;t t
16638 s,@host_cpu@,$host_cpu,;t t
16639 s,@host_vendor@,$host_vendor,;t t
16640 s,@host_os@,$host_os,;t t
16641 s,@target@,$target,;t t
16642 s,@target_cpu@,$target_cpu,;t t
16643 s,@target_vendor@,$target_vendor,;t t
16644 s,@target_os@,$target_os,;t t
16646 s,@CFLAGS@,$CFLAGS,;t t
16647 s,@LDFLAGS@,$LDFLAGS,;t t
16648 s,@CPPFLAGS@,$CPPFLAGS,;t t
16649 s,@ac_ct_CC@,$ac_ct_CC,;t t
16650 s,@EXEEXT@,$EXEEXT,;t t
16651 s,@OBJEXT@,$OBJEXT,;t t
16652 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
16655 s,@EGREP@,$EGREP,;t t
16656 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16657 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16658 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16659 s,@LN_S@,$LN_S,;t t
16660 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
16661 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
16662 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
16663 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
16664 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
16665 s,@SET_MAKE@,$SET_MAKE,;t t
16666 s,@CTAGS@,$CTAGS,;t t
16667 s,@ETAGS@,$ETAGS,;t t
16668 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
16669 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
16670 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
16671 s,@RANLIB@,$RANLIB,;t t
16672 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16674 s,@ac_ct_LD@,$ac_ct_LD,;t t
16676 s,@ac_ct_AR@,$ac_ct_AR,;t t
16677 s,@ARFLAGS@,$ARFLAGS,;t t
16678 s,@DESTDIR@,$DESTDIR,;t t
16679 s,@BUILD_CC@,$BUILD_CC,;t t
16680 s,@BUILD_CPP@,$BUILD_CPP,;t t
16681 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
16682 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
16683 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
16684 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
16685 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
16686 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
16687 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
16688 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
16689 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
16690 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
16691 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
16692 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
16693 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
16694 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
16695 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
16696 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
16697 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
16698 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
16699 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
16700 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
16701 s,@CC_G_OPT@,$CC_G_OPT,;t t
16702 s,@LD_MODEL@,$LD_MODEL,;t t
16703 s,@shlibdir@,$shlibdir,;t t
16704 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
16705 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
16706 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
16707 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
16708 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
16709 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
16710 s,@LINK_PROGS@,$LINK_PROGS,;t t
16711 s,@LINK_TESTS@,$LINK_TESTS,;t t
16712 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16713 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
16714 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
16715 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
16716 s,@RPATH_LIST@,$RPATH_LIST,;t t
16717 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
16718 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
16719 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
16720 s,@PTHREAD@,$PTHREAD,;t t
16721 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
16722 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
16723 s,@ECHO_LT@,$ECHO_LT,;t t
16724 s,@ECHO_LD@,$ECHO_LD,;t t
16725 s,@RULE_CC@,$RULE_CC,;t t
16726 s,@SHOW_CC@,$SHOW_CC,;t t
16727 s,@ECHO_CC@,$ECHO_CC,;t t
16728 s,@ADAFLAGS@,$ADAFLAGS,;t t
16729 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
16730 s,@ADA_TRACE@,$ADA_TRACE,;t t
16731 s,@gnatmake_exists@,$gnatmake_exists,;t t
16732 s,@gprconfig_exists@,$gprconfig_exists,;t t
16733 s,@M4_exists@,$M4_exists,;t t
16734 s,@cf_ada_make@,$cf_ada_make,;t t
16735 s,@cf_ada_config@,$cf_ada_config,;t t
16736 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
16737 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
16738 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
16739 s,@cf_compile_generics@,$cf_compile_generics,;t t
16740 s,@cf_generic_objects@,$cf_generic_objects,;t t
16741 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
16742 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
16743 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
16744 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
16745 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
16746 s,@cf_ada_package@,$cf_ada_package,;t t
16747 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
16748 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
16749 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
16750 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
16751 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
16752 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
16753 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
16754 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
16755 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
16756 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
16757 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
16758 s,@TEST_ARG2@,$TEST_ARG2,;t t
16759 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
16760 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
16761 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
16762 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
16763 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
16764 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
16765 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
16770 cat >>$CONFIG_STATUS <<\EOF
16771 # Split the substitutions into bite-sized pieces for seds with
16772 # small command number limits, like on Digital OSF/1 and HP-UX.
16773 ac_max_sed_lines=48
16774 ac_sed_frag=1 # Number of current file.
16775 ac_beg=1 # First line for current file.
16776 ac_end=$ac_max_sed_lines # Line after last line for current file.
16779 while $ac_more_lines; do
16780 if test $ac_beg -gt 1; then
16781 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16783 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16785 if test ! -s $tmp/subs.frag; then
16786 ac_more_lines=false
16788 # The purpose of the label and of the branching condition is to
16789 # speed up the sed processing (if there are no `@' at all, there
16790 # is no need to browse any of the substitutions).
16791 # These are the two extra sed commands mentioned above.
16793 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16794 # It is possible to make a multiline substitution using escaped newlines.
16795 # Ensure that we do not split the substitution between script fragments.
16797 ac_END=`expr $ac_end + $ac_max_sed_lines`
16798 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
16799 if test -s $tmp/subs.next; then
16800 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
16801 if test ! -s $tmp/subs.edit; then
16802 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
16803 if test ! -s $tmp/subs.edit; then
16804 if test $ac_beg -gt 1; then
16805 ac_end=`expr $ac_end - 1`
16812 if test -z "$ac_sed_cmds"; then
16813 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16815 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16817 ac_sed_frag=`expr $ac_sed_frag + 1`
16819 ac_end=`expr $ac_end + $ac_max_sed_lines`
16822 if test -z "$ac_sed_cmds"; then
16825 fi # test -n "$CONFIG_FILES"
16828 cat >>$CONFIG_STATUS <<\EOF
16829 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16830 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16832 - | *:- | *:-:* ) # input from stdin
16834 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16835 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16836 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16837 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16838 * ) ac_file_in=$ac_file.in ;;
16841 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16842 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16843 X"$ac_file" : 'X\(//\)[^/]' \| \
16844 X"$ac_file" : 'X\(//\)$' \| \
16845 X"$ac_file" : 'X\(/\)' \| \
16846 . : '\(.\)' 2>/dev/null ||
16848 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16849 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16850 /^X\(\/\/\)$/{ s//\1/; q; }
16851 /^X\(\/\).*/{ s//\1/; q; }
16853 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16854 { case "$ac_dir" in
16855 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16859 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16860 case $as_mkdir_dir in
16861 # Skip DOS drivespec
16862 ?:) as_incr_dir=$as_mkdir_dir ;;
16864 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16865 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16870 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16871 # A "../" for each directory in $ac_dir_suffix.
16872 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16874 ac_dir_suffix= ac_dots=
16879 if test -z "$ac_dots"; then
16882 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16884 [\\/]* | ?:[\\/]* )
16885 ac_srcdir=$srcdir$ac_dir_suffix;
16886 ac_top_srcdir=$srcdir ;;
16887 *) # Relative path.
16888 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16889 ac_top_srcdir=$ac_dots$srcdir ;;
16893 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16894 *) ac_INSTALL=$ac_dots$INSTALL ;;
16897 if test x"$ac_file" != x-; then
16898 { echo "$as_me:16898: creating $ac_file" >&5
16899 echo "$as_me: creating $ac_file" >&6;}
16902 # Let's still pretend it is `configure' which instantiates (i.e., don't
16903 # use $as_me), people would be surprised to read:
16904 # /* config.h. Generated automatically by config.status. */
16905 configure_input="Generated automatically from `echo $ac_file_in |
16906 sed 's,.*/,,'` by configure."
16908 # First look for the input files in the build tree, otherwise in the
16910 ac_file_inputs=`IFS=:
16911 for f in $ac_file_in; do
16913 -) echo $tmp/stdin ;;
16915 # Absolute (can't be DOS-style, as IFS=:)
16916 test -f "$f" || { { echo "$as_me:16916: error: cannot find input file: $f" >&5
16917 echo "$as_me: error: cannot find input file: $f" >&2;}
16918 { (exit 1); exit 1; }; }
16921 if test -f "$f"; then
16924 elif test -f "$srcdir/$f"; then
16929 { { echo "$as_me:16929: error: cannot find input file: $f" >&5
16930 echo "$as_me: error: cannot find input file: $f" >&2;}
16931 { (exit 1); exit 1; }; }
16934 done` || { (exit 1); exit 1; }
16936 cat >>$CONFIG_STATUS <<\EOF
16937 ac_warn_datarootdir=no
16938 if test x"$ac_file" != x-; then
16939 for ac_item in $ac_file_inputs
16941 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
16942 if test -n "$ac_seen"; then
16943 ac_used=`grep '@datarootdir@' $ac_item`
16944 if test -z "$ac_used"; then
16945 { echo "$as_me:16945: WARNING: datarootdir was used implicitly but not set:
16947 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
16949 ac_warn_datarootdir=yes
16952 ac_seen=`grep '${datarootdir}' $ac_item`
16953 if test -n "$ac_seen"; then
16954 { echo "$as_me:16954: WARNING: datarootdir was used explicitly but not set:
16956 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
16958 ac_warn_datarootdir=yes
16963 if test "x$ac_warn_datarootdir" = xyes; then
16964 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
16968 cat >>$CONFIG_STATUS <<EOF
16972 cat >>$CONFIG_STATUS <<\EOF
16974 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16975 s,@configure_input@,$configure_input,;t t
16976 s,@srcdir@,$ac_srcdir,;t t
16977 s,@top_srcdir@,$ac_top_srcdir,;t t
16978 s,@INSTALL@,$ac_INSTALL,;t t
16979 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16981 if test x"$ac_file" != x-; then
16982 cp $tmp/out $ac_file
16984 for ac_name in prefix exec_prefix datarootdir
16986 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
16987 if test -n "$ac_seen"; then
16988 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
16989 if test -z "$ac_init"; then
16990 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
16991 { echo "$as_me:16991: WARNING: Variable $ac_name is used but was not set:
16993 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
16998 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
16999 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
17000 if test -s $tmp/out; then
17001 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
17002 { echo "$as_me:17002: WARNING: Some variables may not be substituted:
17004 echo "$as_me: WARNING: Some variables may not be substituted:
17014 cat >>$CONFIG_STATUS <<\EOF
17017 # CONFIG_HEADER section.
17020 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17021 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17023 # ac_d sets the value in "#define NAME VALUE" lines.
17024 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17025 ac_dB='[ ].*$,\1#\2'
17028 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17029 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17030 ac_iB='\([ ]\),\1#\2define\3'
17033 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17034 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17035 ac_uB='$,\1#\2define\3'
17039 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
17040 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17042 - | *:- | *:-:* ) # input from stdin
17044 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17045 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17046 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17047 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17048 * ) ac_file_in=$ac_file.in ;;
17051 test x"$ac_file" != x- && { echo "$as_me:17051: creating $ac_file" >&5
17052 echo "$as_me: creating $ac_file" >&6;}
17054 # First look for the input files in the build tree, otherwise in the
17056 ac_file_inputs=`IFS=:
17057 for f in $ac_file_in; do
17059 -) echo $tmp/stdin ;;
17061 # Absolute (can't be DOS-style, as IFS=:)
17062 test -f "$f" || { { echo "$as_me:17062: error: cannot find input file: $f" >&5
17063 echo "$as_me: error: cannot find input file: $f" >&2;}
17064 { (exit 1); exit 1; }; }
17067 if test -f "$f"; then
17070 elif test -f "$srcdir/$f"; then
17075 { { echo "$as_me:17075: error: cannot find input file: $f" >&5
17076 echo "$as_me: error: cannot find input file: $f" >&2;}
17077 { (exit 1); exit 1; }; }
17080 done` || { (exit 1); exit 1; }
17081 # Remove the trailing spaces.
17082 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
17086 # Transform confdefs.h into a list of #define's. We won't use it as a sed
17087 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
17088 # be either 'cat' or 'sort'.
17089 cat confdefs.h | uniq >conftest.vals
17091 # Break up conftest.vals because some shells have a limit on
17092 # the size of here documents, and old seds have small limits too.
17094 rm -f conftest.tail
17095 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
17096 while grep . conftest.vals >/dev/null
17098 # Write chunks of a limited-size here document to conftest.frag.
17099 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
17100 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
17101 echo 'CEOF' >> $CONFIG_STATUS
17102 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17103 rm -f conftest.vals
17104 mv conftest.tail conftest.vals
17106 rm -f conftest.vals
17108 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
17110 echo ' cat >> conftest.edit <<CEOF
17111 /@DEFS@/r conftest.frag
17114 sed -f conftest.edit $tmp/in > $tmp/out
17116 mv $tmp/out $tmp/in
17117 rm -f conftest.edit conftest.frag
17118 ' >> $CONFIG_STATUS
17120 cat >>$CONFIG_STATUS <<\EOF
17121 # Let's still pretend it is `configure' which instantiates (i.e., don't
17122 # use $as_me), people would be surprised to read:
17123 # /* config.h. Generated automatically by config.status. */
17124 if test x"$ac_file" = x-; then
17125 echo "/* Generated automatically by configure. */" >$tmp/config.h
17127 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
17129 cat $tmp/in >>$tmp/config.h
17131 if test x"$ac_file" != x-; then
17132 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17133 { echo "$as_me:17133: $ac_file is unchanged" >&5
17134 echo "$as_me: $ac_file is unchanged" >&6;}
17136 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17137 X"$ac_file" : 'X\(//\)[^/]' \| \
17138 X"$ac_file" : 'X\(//\)$' \| \
17139 X"$ac_file" : 'X\(/\)' \| \
17140 . : '\(.\)' 2>/dev/null ||
17142 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17143 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17144 /^X\(\/\/\)$/{ s//\1/; q; }
17145 /^X\(\/\).*/{ s//\1/; q; }
17147 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17148 { case "$ac_dir" in
17149 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17153 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17154 case $as_mkdir_dir in
17155 # Skip DOS drivespec
17156 ?:) as_incr_dir=$as_mkdir_dir ;;
17158 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17159 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17166 mv $tmp/config.h $ac_file
17170 rm -f $tmp/config.h
17174 cat >>$CONFIG_STATUS <<\EOF
17176 # CONFIG_COMMANDS section.
17178 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17179 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17180 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17184 if test -z "$USE_OLD_MAKERULES" ; then
17185 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
17192 cat >>$CONFIG_STATUS <<\EOF
17194 { (exit 0); exit 0; }
17196 chmod +x $CONFIG_STATUS
17197 ac_clean_files=$ac_clean_files_save
17199 # configure is writing to config.log, and then calls config.status.
17200 # config.status does its own redirection, appending to config.log.
17201 # Unfortunately, on DOS this fails, as config.log is still kept open
17202 # by configure, so config.status won't be able to write to it; its
17203 # output is simply discarded. So we exec the FD to /dev/null,
17204 # effectively closing config.log, so it can be properly (re)opened and
17205 # appended to by config.status. When coming back to configure, we
17206 # need to make the FD available again.
17207 if test "$no_create" != yes; then
17210 $SHELL $CONFIG_STATUS || ac_cs_success=false
17212 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17213 # would make configure fail if this is the last instruction.
17214 $ac_cs_success || { (exit 1); exit 1; }
17216 ${MAKE:-make} preinstall