2 # From configure.in Revision: 1.85 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20210509.
6 # Copyright 2003-2020,2021 Thomas E. Dickey
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
12 # Avoid depending upon Character Ranges.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
36 if expr a : '\(a\)' >/dev/null 2>&1; then
42 rm -f conf$$ conf$$.exe conf$$.file
44 if ln -s conf$$.file conf$$ 2>/dev/null; then
45 # We could just check for DJGPP; but this test a) works b) is more generic
46 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47 if test -f conf$$.exe; then
48 # Don't use ln at all; we don't have any links
53 elif ln conf$$.file conf$$ 2>/dev/null; then
58 rm -f conf$$ conf$$.exe conf$$.file
60 as_executable_p="test -f"
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
70 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
80 # We need space, tab and new line, in precisely that order.
86 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
89 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90 # so uname gets run too.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
98 ac_default_prefix=/usr/local
103 SHELL=${CONFIG_SHELL-/bin/sh}
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete. It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : "${ac_max_here_lines=38}"
110 ac_unique_file="gen/gen.c"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
115 # include <sys/types.h>
118 # include <sys/stat.h>
129 # if !STDC_HEADERS && HAVE_MEMORY_H
135 # include <strings.h>
138 # include <inttypes.h>
148 # Initialize some variables set by options.
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
160 program_transform_name=s,x,x,
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
188 # Identity of this package.
198 # If the previous option needs an argument, assign it.
199 if test -n "$ac_prev"; then
200 eval "$ac_prev=\$ac_option"
205 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
207 # Accept the important Cygnus configure options, so we can diagnose typos.
211 -bindir | --bindir | --bindi | --bind | --bin | --bi)
213 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
216 -build | --build | --buil | --bui | --bu)
217 ac_prev=build_alias ;;
218 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219 build_alias=$ac_optarg ;;
221 -cache-file | --cache-file | --cache-fil | --cache-fi \
222 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223 ac_prev=cache_file ;;
224 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226 cache_file=$ac_optarg ;;
229 cache_file=config.cache ;;
231 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
233 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
235 datadir=$ac_optarg ;;
237 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238 | --dataroo | --dataro | --datar)
239 ac_prev=datarootdir ;;
240 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242 datarootdir=$ac_optarg ;;
244 -disable-* | --disable-*)
245 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246 # Reject names that are not valid shell variable names.
247 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249 { (exit 1); exit 1; }; }
250 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251 eval "enable_$ac_feature=no" ;;
253 -enable-* | --enable-*)
254 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255 # Reject names that are not valid shell variable names.
256 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258 { (exit 1); exit 1; }; }
259 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
261 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
264 eval "enable_$ac_feature='$ac_optarg'" ;;
266 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268 | --exec | --exe | --ex)
269 ac_prev=exec_prefix ;;
270 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272 | --exec=* | --exe=* | --ex=*)
273 exec_prefix=$ac_optarg ;;
275 -gas | --gas | --ga | --g)
276 # Obsolete; use --with-gas.
279 -help | --help | --hel | --he | -h)
281 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282 ac_init_help=recursive ;;
283 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284 ac_init_help=short ;;
286 -host | --host | --hos | --ho)
287 ac_prev=host_alias ;;
288 -host=* | --host=* | --hos=* | --ho=*)
289 host_alias=$ac_optarg ;;
291 -includedir | --includedir | --includedi | --included | --include \
292 | --includ | --inclu | --incl | --inc)
293 ac_prev=includedir ;;
294 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295 | --includ=* | --inclu=* | --incl=* | --inc=*)
296 includedir=$ac_optarg ;;
298 -infodir | --infodir | --infodi | --infod | --info | --inf)
300 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301 infodir=$ac_optarg ;;
303 -libdir | --libdir | --libdi | --libd)
305 -libdir=* | --libdir=* | --libdi=* | --libd=*)
308 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309 | --libexe | --libex | --libe)
310 ac_prev=libexecdir ;;
311 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312 | --libexe=* | --libex=* | --libe=*)
313 libexecdir=$ac_optarg ;;
315 -localstatedir | --localstatedir | --localstatedi | --localstated \
316 | --localstate | --localstat | --localsta | --localst \
317 | --locals | --local | --loca | --loc | --lo)
318 ac_prev=localstatedir ;;
319 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322 localstatedir=$ac_optarg ;;
324 -runstatedir | --runstatedir | --runstatedi | --runstated \
325 | --runstate | --runstat | --runsta | --runst \
326 | --runs | --run | --ru)
327 ac_prev=runstatedir ;;
328 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329 | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330 | --runs=* | --run=* | --ru=*)
331 runstatedir=$ac_optarg ;;
333 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
335 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
339 # Obsolete; use --without-fp.
342 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
346 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
350 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352 | --oldin | --oldi | --old | --ol | --o)
353 ac_prev=oldincludedir ;;
354 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357 oldincludedir=$ac_optarg ;;
359 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
361 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
364 -program-prefix | --program-prefix | --program-prefi | --program-pref \
365 | --program-pre | --program-pr | --program-p)
366 ac_prev=program_prefix ;;
367 -program-prefix=* | --program-prefix=* | --program-prefi=* \
368 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369 program_prefix=$ac_optarg ;;
371 -program-suffix | --program-suffix | --program-suffi | --program-suff \
372 | --program-suf | --program-su | --program-s)
373 ac_prev=program_suffix ;;
374 -program-suffix=* | --program-suffix=* | --program-suffi=* \
375 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376 program_suffix=$ac_optarg ;;
378 -program-transform-name | --program-transform-name \
379 | --program-transform-nam | --program-transform-na \
380 | --program-transform-n | --program-transform- \
381 | --program-transform | --program-transfor \
382 | --program-transfo | --program-transf \
383 | --program-trans | --program-tran \
384 | --progr-tra | --program-tr | --program-t)
385 ac_prev=program_transform_name ;;
386 -program-transform-name=* | --program-transform-name=* \
387 | --program-transform-nam=* | --program-transform-na=* \
388 | --program-transform-n=* | --program-transform-=* \
389 | --program-transform=* | --program-transfor=* \
390 | --program-transfo=* | --program-transf=* \
391 | --program-trans=* | --program-tran=* \
392 | --progr-tra=* | --program-tr=* | --program-t=*)
393 program_transform_name=$ac_optarg ;;
395 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396 | -silent | --silent | --silen | --sile | --sil)
399 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
401 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
403 sbindir=$ac_optarg ;;
405 -sharedstatedir | --sharedstatedir | --sharedstatedi \
406 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407 | --sharedst | --shareds | --shared | --share | --shar \
409 ac_prev=sharedstatedir ;;
410 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
414 sharedstatedir=$ac_optarg ;;
416 -site | --site | --sit)
418 -site=* | --site=* | --sit=*)
421 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
423 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
426 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427 | --syscon | --sysco | --sysc | --sys | --sy)
428 ac_prev=sysconfdir ;;
429 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431 sysconfdir=$ac_optarg ;;
433 -target | --target | --targe | --targ | --tar | --ta | --t)
434 ac_prev=target_alias ;;
435 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436 target_alias=$ac_optarg ;;
438 -v | -verbose | --verbose | --verbos | --verbo | --verb)
441 -version | --version | --versio | --versi | --vers | -V)
445 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446 # Reject names that are not valid shell variable names.
447 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448 { echo "$as_me: error: invalid package name: $ac_package" >&2
449 { (exit 1); exit 1; }; }
450 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
452 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
455 eval "with_$ac_package='$ac_optarg'" ;;
457 -without-* | --without-*)
458 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459 # Reject names that are not valid shell variable names.
460 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461 { echo "$as_me: error: invalid package name: $ac_package" >&2
462 { (exit 1); exit 1; }; }
463 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464 eval "with_$ac_package=no" ;;
467 # Obsolete; use --with-x.
470 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471 | --x-incl | --x-inc | --x-in | --x-i)
472 ac_prev=x_includes ;;
473 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475 x_includes=$ac_optarg ;;
477 -x-libraries | --x-libraries | --x-librarie | --x-librari \
478 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479 ac_prev=x_libraries ;;
480 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482 x_libraries=$ac_optarg ;;
484 -*) { echo "$as_me: error: unrecognized option: $ac_option
485 Try \`$0 --help' for more information." >&2
486 { (exit 1); exit 1; }; }
490 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491 # Reject names that are not valid shell variable names.
492 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494 { (exit 1); exit 1; }; }
495 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496 eval "$ac_envvar='$ac_optarg'"
497 export "$ac_envvar" ;;
500 # FIXME: should be removed in autoconf 3.0.
501 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
504 : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
510 if test -n "$ac_prev"; then
511 ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
512 { echo "$as_me: error: missing argument to $ac_option" >&2
513 { (exit 1); exit 1; }; }
516 # Be sure to have absolute paths.
517 for ac_var in exec_prefix prefix
519 eval ac_val=$`echo "$ac_var"`
521 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523 { (exit 1); exit 1; }; };;
527 # Be sure to have absolute paths.
528 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
529 localstatedir libdir includedir oldincludedir infodir mandir
531 eval ac_val=$`echo "$ac_var"`
533 [\\/$]* | ?:[\\/]* ) ;;
534 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535 { (exit 1); exit 1; }; };;
539 # There might be people who depend on the old broken behavior: `$host'
540 # used to hold the argument of --host etc.
545 # FIXME: should be removed in autoconf 3.0.
546 if test "x$host_alias" != x; then
547 if test "x$build_alias" = x; then
548 cross_compiling=maybe
549 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550 If a cross compiler is detected then cross compile mode will be used." >&2
551 elif test "x$build_alias" != "x$host_alias"; then
557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
559 test "$silent" = yes && exec 6>/dev/null
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563 ac_srcdir_defaulted=yes
564 # Try the directory containing this script, then its parent.
566 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
569 if test ! -r "$srcdir/$ac_unique_file"; then
573 ac_srcdir_defaulted=no
575 if test ! -r "$srcdir/$ac_unique_file"; then
576 if test "$ac_srcdir_defaulted" = yes; then
577 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578 { (exit 1); exit 1; }; }
580 { echo "$as_me: error: cannot find sources in $srcdir" >&2
581 { (exit 1); exit 1; }; }
584 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585 ac_env_build_alias_set=${build_alias+set}
586 ac_env_build_alias_value=$build_alias
587 ac_cv_env_build_alias_set=${build_alias+set}
588 ac_cv_env_build_alias_value=$build_alias
589 ac_env_host_alias_set=${host_alias+set}
590 ac_env_host_alias_value=$host_alias
591 ac_cv_env_host_alias_set=${host_alias+set}
592 ac_cv_env_host_alias_value=$host_alias
593 ac_env_target_alias_set=${target_alias+set}
594 ac_env_target_alias_value=$target_alias
595 ac_cv_env_target_alias_set=${target_alias+set}
596 ac_cv_env_target_alias_value=$target_alias
597 ac_env_CC_set=${CC+set}
599 ac_cv_env_CC_set=${CC+set}
600 ac_cv_env_CC_value=$CC
601 ac_env_CFLAGS_set=${CFLAGS+set}
602 ac_env_CFLAGS_value=$CFLAGS
603 ac_cv_env_CFLAGS_set=${CFLAGS+set}
604 ac_cv_env_CFLAGS_value=$CFLAGS
605 ac_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_env_LDFLAGS_value=$LDFLAGS
607 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608 ac_cv_env_LDFLAGS_value=$LDFLAGS
609 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_env_CPPFLAGS_value=$CPPFLAGS
611 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613 ac_env_CPP_set=${CPP+set}
614 ac_env_CPP_value=$CPP
615 ac_cv_env_CPP_set=${CPP+set}
616 ac_cv_env_CPP_value=$CPP
619 # Report the --help message.
621 if test "$ac_init_help" = "long"; then
622 # Omit some internal or obsolete options to make the list less imposing.
623 # This message is too long to be a string in the A/UX 3.1 sh.
625 \`configure' configures this package to adapt to many kinds of systems.
627 Usage: $0 [OPTION]... [VAR=VALUE]...
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE. See below for descriptions of some of the useful variables.
632 Defaults for the options are specified in brackets.
635 -h, --help display this help and exit
636 --help=short display options specific to this package
637 --help=recursive display the short help of all the included packages
638 -V, --version display version information and exit
639 -q, --quiet, --silent do not print \`checking...' messages
640 --cache-file=FILE cache test results in FILE [disabled]
641 -C, --config-cache alias for \`--cache-file=config.cache'
642 -n, --no-create do not create output files
643 --srcdir=DIR find the sources in DIR [configure dir or \`..']
648 Installation directories:
649 --prefix=PREFIX install architecture-independent files in PREFIX
651 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
659 For better control, use the options below.
661 Fine tuning of the installation directories:
662 --bindir=DIR user executables [EPREFIX/bin]
663 --sbindir=DIR system admin executables [EPREFIX/sbin]
664 --libexecdir=DIR program executables [EPREFIX/libexec]
665 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
666 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
667 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
668 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
669 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
670 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
671 --libdir=DIR object code libraries [EPREFIX/lib]
672 --includedir=DIR C header files [PREFIX/include]
673 --oldincludedir=DIR C header files for non-gcc [/usr/include]
674 --infodir=DIR info documentation [DATAROOTDIR/info]
675 --mandir=DIR man documentation [DATAROOTDIR/man]
681 --program-prefix=PREFIX prepend PREFIX to installed program names
682 --program-suffix=SUFFIX append SUFFIX to installed program names
683 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
686 --build=BUILD configure for building on BUILD [guessed]
687 --host=HOST build programs to run on HOST [BUILD]
688 --target=TARGET configure for building compilers for TARGET [HOST]
692 if test -n "$ac_init_help"; then
697 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
698 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
701 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
702 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
705 --with-system-type=XXX test: override derived host system-type
706 --disable-stripping do not strip (debug info) installed executables
707 --with-pkg-config{=path} enable/disable use of pkg-config
708 --with-pkg-config-libdir=XXX use given directory for installing pc-files
709 --without-tests suppress build with test-programs
710 --enable-mixed-case tic should assume mixed-case filenames
711 --with-install-prefix prefixes actual install-location ($DESTDIR)
712 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
713 --with-build-cc=XXX the build C compiler ($BUILD_CC)
714 --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
715 --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
716 --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
717 --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
718 --with-build-libs=XXX the build libraries (${BUILD_LIBS})
719 Options to Specify the Libraries Built/Used:
720 --with-shared generate shared C-objects (needed for --with-ada-sharedlib)
721 --with-curses-dir=DIR directory in which (n)curses is installed
722 --enable-widec compile with wide-char/UTF-8 code
723 --with-lib-prefix override library-prefix
724 --with-shlib-version=X Specify rel or abi version for shared libs
725 --enable-rpath-link link sample programs with rpath option
726 Fine-Tuning Your Configuration:
727 --enable-broken_linker compile with broken-linker support code
728 --disable-largefile omit support for large files
729 --with-rcs-ids compile-in RCS identifiers
731 --disable-ext-funcs disable function-extensions
732 --enable-const compile with extra/non-standard const
734 --without-develop disable development options
736 --with-pthread use POSIX thread library
737 --enable-weak-symbols enable weak-symbols for pthreads
738 --enable-reentrant compile with experimental reentrant code
739 --with-wrap-prefix=XXX override prefix used for public variables
740 Testing/development Options:
741 --disable-echo do not display "compiling" commands
742 --enable-warnings test: turn on gcc compiler warnings
743 --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics
744 --enable-assertions test: turn on generation of assertion code
745 --enable-expanded test: generate functions for certain macros
746 --disable-macros test: use functions rather than macros
747 --with-trace test: add trace() function to all models of ncurses
748 --disable-gnat-projects test: disable GNAT projects even if usable
749 Ada95 Binding Options:
750 --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
751 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
752 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
753 --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
754 --with-ada-libname=XXX override default Ada library-name
756 Some influential environment variables:
757 CC C compiler command
758 CFLAGS C compiler flags
759 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
760 nonstandard directory <lib dir>
761 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
762 headers in a nonstandard directory <include dir>
765 Use these variables to override the choices made by `configure' or to help
766 it to find libraries and programs with nonstandard names/locations.
771 if test "$ac_init_help" = "recursive"; then
772 # If there are subdirs, report their specific --help.
774 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
776 # A "../" for each directory in /$ac_subdir.
777 ac_dots=`echo "$ac_subdir" |
778 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
781 .) # No --srcdir option. We are building in place.
782 ac_sub_srcdir="$srcdir" ;;
783 [\\/]* | ?:[\\/]* ) # Absolute path.
784 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
786 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
789 # Check for guested configure; otherwise get Cygnus style configure.
790 if test -f "$ac_sub_srcdir/configure.gnu"; then
792 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
793 elif test -f "$ac_sub_srcdir/configure"; then
795 $SHELL "$ac_sub_srcdir/configure" --help=recursive
796 elif test -f "$ac_sub_srcdir/configure.ac" ||
797 test -f "$ac_sub_srcdir/configure.in"; then
799 "$ac_configure" --help
801 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
807 test -n "$ac_init_help" && exit 0
808 if "$ac_init_version"; then
811 Copyright 2003-2020,2021 Thomas E. Dickey
812 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
813 Free Software Foundation, Inc.
814 This configure script is free software; the Free Software Foundation
815 gives unlimited permission to copy, distribute and modify it.
821 This file contains any messages produced by compilers while
822 running configure, to aid debugging if configure makes a mistake.
824 It was created by $as_me, which was
825 generated by GNU Autoconf 2.52.20210509. Invocation command line was
836 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
837 uname -m = `(uname -m) 2>/dev/null || echo unknown`
838 uname -r = `(uname -r) 2>/dev/null || echo unknown`
839 uname -s = `(uname -s) 2>/dev/null || echo unknown`
840 uname -v = `(uname -v) 2>/dev/null || echo unknown`
842 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
843 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
845 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
846 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
847 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
848 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
849 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
850 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
851 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
865 # Keep a trace of the command line.
866 # Strip out --no-create and --no-recursion so they do not pile up.
867 # Also quote any args containing shell meta-characters.
873 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
874 | --no-cr | --no-c) ;;
875 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
876 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
877 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
878 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
879 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
881 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
884 # Get rid of the leading space.
887 # When interrupted or exit'd, cleanup temporary files, and complete
888 # config.log. We remove comments because anyway the quotes in there
889 # would cause problems or look ugly.
891 # Save into config.log some information that might help in debugging.
893 echo "## ----------------- ##" >&5
894 echo "## Cache variables. ##" >&5
895 echo "## ----------------- ##" >&5
897 # The following way of writing the cache mishandles newlines in values,
900 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
903 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
904 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
908 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
912 sed "/^$/d" confdefs.h >conftest.log
913 if test -s conftest.log; then
915 echo "## ------------ ##" >&5
916 echo "## confdefs.h. ##" >&5
917 echo "## ------------ ##" >&5
922 test "$ac_signal" != 0 &&
923 echo "$as_me: caught signal $ac_signal" >&5
924 echo "$as_me: exit $exit_status" >&5
925 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
928 for ac_signal in 1 2 13 15; do
929 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
933 # confdefs.h avoids OS command line length limits that DEFS can exceed.
934 rm -rf conftest* confdefs.h
935 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
938 # Let the site file select an alternate cache file if it wants to.
939 # Prefer explicitly selected file to automatically selected ones.
940 if test -z "$CONFIG_SITE"; then
941 if test "x$prefix" != xNONE; then
942 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
944 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
947 for ac_site_file in $CONFIG_SITE; do
948 if test -r "$ac_site_file"; then
949 { echo "$as_me:949: loading site script $ac_site_file" >&5
950 echo "$as_me: loading site script $ac_site_file" >&6;}
951 cat "$ac_site_file" >&5
956 if test -r "$cache_file"; then
957 # Some versions of bash will fail to source /dev/null (special
958 # files actually), so we avoid doing that.
959 if test -f "$cache_file"; then
960 { echo "$as_me:960: loading cache $cache_file" >&5
961 echo "$as_me: loading cache $cache_file" >&6;}
963 [\\/]* | ?:[\\/]* ) . $cache_file;;
968 { echo "$as_me:968: creating cache $cache_file" >&5
969 echo "$as_me: creating cache $cache_file" >&6;}
973 # Check that the precious variables saved in the cache have kept the same
975 ac_cache_corrupted=false
976 for ac_var in `(set) 2>&1 |
977 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
978 eval ac_old_set=\$ac_cv_env_${ac_var}_set
979 eval ac_new_set=\$ac_env_${ac_var}_set
980 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
981 eval ac_new_val="\$ac_env_${ac_var}_value"
982 case "$ac_old_set,$ac_new_set" in
984 { echo "$as_me:984: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
985 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
986 ac_cache_corrupted=: ;;
988 { echo "$as_me:988: error: \`$ac_var' was not set in the previous run" >&5
989 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
990 ac_cache_corrupted=: ;;
993 if test "x$ac_old_val" != "x$ac_new_val"; then
994 { echo "$as_me:994: error: \`$ac_var' has changed since the previous run:" >&5
995 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
996 { echo "$as_me:996: former value: $ac_old_val" >&5
997 echo "$as_me: former value: $ac_old_val" >&2;}
998 { echo "$as_me:998: current value: $ac_new_val" >&5
999 echo "$as_me: current value: $ac_new_val" >&2;}
1000 ac_cache_corrupted=:
1003 # Pass precious variables to config.status. It doesn't matter if
1004 # we pass some twice (in addition to the command line arguments).
1005 if test "$ac_new_set" = set; then
1006 case "$ac_new_val" in
1007 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1008 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1009 ac_configure_args="$ac_configure_args '$ac_arg'"
1011 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1016 if "$ac_cache_corrupted"; then
1017 { echo "$as_me:1017: error: changes in the environment can compromise the build" >&5
1018 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1019 { { echo "$as_me:1019: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1020 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1021 { (exit 1); exit 1; }; }
1025 ac_cpp='$CPP $CPPFLAGS'
1026 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1027 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1028 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1029 ac_main_return="return"
1031 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1033 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1045 echo "#! $SHELL" >conftest.sh
1046 echo "exit 0" >>conftest.sh
1047 chmod +x conftest.sh
1048 if { (echo "$as_me:1048: PATH=\".;.\"; conftest.sh") >&5
1049 (PATH=".;."; conftest.sh) 2>&5
1051 echo "$as_me:1051: \$? = $ac_status" >&5
1052 (exit "$ac_status"); }; then
1053 ac_path_separator=';'
1057 PATH_SEPARATOR="$ac_path_separator"
1060 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1065 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1066 if test -f "$ac_dir/install-sh"; then
1068 ac_install_sh="$ac_aux_dir/install-sh -c"
1070 elif test -f "$ac_dir/install.sh"; then
1072 ac_install_sh="$ac_aux_dir/install.sh -c"
1074 elif test -f "$ac_dir/shtool"; then
1076 ac_install_sh="$ac_aux_dir/shtool install -c"
1080 if test -z "$ac_aux_dir"; then
1081 { { echo "$as_me:1081: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1082 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1083 { (exit 1); exit 1; }; }
1085 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1086 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1087 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1089 # Make sure we can run config.sub.
1090 $ac_config_sub sun4 >/dev/null 2>&1 ||
1091 { { echo "$as_me:1091: error: cannot run $ac_config_sub" >&5
1092 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1093 { (exit 1); exit 1; }; }
1095 echo "$as_me:1095: checking build system type" >&5
1096 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1097 if test "${ac_cv_build+set}" = set; then
1098 echo $ECHO_N "(cached) $ECHO_C" >&6
1100 ac_cv_build_alias=$build_alias
1101 test -z "$ac_cv_build_alias" &&
1102 ac_cv_build_alias=`$ac_config_guess`
1103 test -z "$ac_cv_build_alias" &&
1104 { { echo "$as_me:1104: error: cannot guess build type; you must specify one" >&5
1105 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1106 { (exit 1); exit 1; }; }
1107 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1108 { { echo "$as_me:1108: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1109 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1110 { (exit 1); exit 1; }; }
1113 echo "$as_me:1113: result: $ac_cv_build" >&5
1114 echo "${ECHO_T}$ac_cv_build" >&6
1116 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1117 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1118 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1120 echo "$as_me:1120: checking host system type" >&5
1121 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1122 if test "${ac_cv_host+set}" = set; then
1123 echo $ECHO_N "(cached) $ECHO_C" >&6
1125 ac_cv_host_alias=$host_alias
1126 test -z "$ac_cv_host_alias" &&
1127 ac_cv_host_alias=$ac_cv_build_alias
1128 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1129 { { echo "$as_me:1129: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1130 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1131 { (exit 1); exit 1; }; }
1134 echo "$as_me:1134: result: $ac_cv_host" >&5
1135 echo "${ECHO_T}$ac_cv_host" >&6
1137 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1138 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1139 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1141 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1142 echo "$as_me:1142: checking target system type" >&5
1143 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1144 if test "${ac_cv_target+set}" = set; then
1145 echo $ECHO_N "(cached) $ECHO_C" >&6
1147 ac_cv_target_alias=$target_alias
1148 test "x$ac_cv_target_alias" = "x" &&
1149 ac_cv_target_alias=$ac_cv_host_alias
1150 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1151 { { echo "$as_me:1151: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1152 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1153 { (exit 1); exit 1; }; }
1156 echo "$as_me:1156: result: $ac_cv_target" >&5
1157 echo "${ECHO_T}$ac_cv_target" >&6
1158 target=$ac_cv_target
1159 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1160 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1161 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1163 # The aliases save the names the user supplied, while $host etc.
1164 # will get canonicalized.
1165 test -n "$target_alias" &&
1166 test "$program_prefix$program_suffix$program_transform_name" = \
1168 program_prefix=${target_alias}-
1169 system_name="$host_os"
1171 system_name="`(uname -s -r) 2>/dev/null`"
1172 if test -z "$system_name" ; then
1173 system_name="`(hostname) 2>/dev/null`"
1176 test -n "$system_name" &&
1177 cat >>confdefs.h <<EOF
1178 #define SYSTEM_NAME "$system_name"
1181 if test "${cf_cv_system_name+set}" = set; then
1182 echo $ECHO_N "(cached) $ECHO_C" >&6
1184 cf_cv_system_name="$system_name"
1187 test -z "$system_name" && system_name="$cf_cv_system_name"
1188 test -n "$cf_cv_system_name" && echo "$as_me:1188: result: Configuring for $cf_cv_system_name" >&5
1189 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1191 if test ".$system_name" != ".$cf_cv_system_name" ; then
1192 echo "$as_me:1192: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1193 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1194 { { echo "$as_me:1194: error: \"Please remove config.cache and try again.\"" >&5
1195 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1196 { (exit 1); exit 1; }; }
1199 # Check whether --with-system-type or --without-system-type was given.
1200 if test "${with_system_type+set}" = set; then
1201 withval="$with_system_type"
1202 { echo "$as_me:1202: WARNING: overriding system type to $withval" >&5
1203 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1204 cf_cv_system_name=$withval
1209 ### Save the given $CFLAGS to allow user-override.
1210 cf_user_CFLAGS="$CFLAGS"
1212 ### Default install-location
1213 for ac_prog in ggrep grep
1215 # Extract the first word of "$ac_prog", so it can be a program name with args.
1216 set dummy $ac_prog; ac_word=$2
1217 echo "$as_me:1217: checking for $ac_word" >&5
1218 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1219 if test "${ac_cv_prog_GREP+set}" = set; then
1220 echo $ECHO_N "(cached) $ECHO_C" >&6
1222 if test -n "$GREP"; then
1223 ac_cv_prog_GREP="$GREP" # Let the user override the test.
1225 ac_save_IFS=$IFS; IFS=$ac_path_separator
1227 for ac_dir in $ac_dummy; do
1229 test -z "$ac_dir" && ac_dir=.
1230 $as_executable_p "$ac_dir/$ac_word" || continue
1231 ac_cv_prog_GREP="$ac_prog"
1232 echo "$as_me:1232: found $ac_dir/$ac_word" >&5
1238 GREP=$ac_cv_prog_GREP
1239 if test -n "$GREP"; then
1240 echo "$as_me:1240: result: $GREP" >&5
1241 echo "${ECHO_T}$GREP" >&6
1243 echo "$as_me:1243: result: no" >&5
1244 echo "${ECHO_T}no" >&6
1247 test -n "$GREP" && break
1249 test -n "$GREP" || GREP=": "
1251 echo "$as_me:1251: checking for fgrep" >&5
1252 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1253 if test "${ac_cv_path_FGREP+set}" = set; then
1254 echo $ECHO_N "(cached) $ECHO_C" >&6
1256 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1257 then ac_cv_path_FGREP="$GREP -F"
1259 for ac_prog in gfgrep fgrep
1261 # Extract the first word of "$ac_prog", so it can be a program name with args.
1262 set dummy $ac_prog; ac_word=$2
1263 echo "$as_me:1263: checking for $ac_word" >&5
1264 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1265 if test "${ac_cv_path_FGREP+set}" = set; then
1266 echo $ECHO_N "(cached) $ECHO_C" >&6
1270 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1273 ac_save_IFS=$IFS; IFS=$ac_path_separator
1275 for ac_dir in $ac_dummy; do
1277 test -z "$ac_dir" && ac_dir=.
1278 if $as_executable_p "$ac_dir/$ac_word"; then
1279 ac_cv_path_FGREP="$ac_dir/$ac_word"
1280 echo "$as_me:1280: found $ac_dir/$ac_word" >&5
1288 FGREP=$ac_cv_path_FGREP
1290 if test -n "$FGREP"; then
1291 echo "$as_me:1291: result: $FGREP" >&5
1292 echo "${ECHO_T}$FGREP" >&6
1294 echo "$as_me:1294: result: no" >&5
1295 echo "${ECHO_T}no" >&6
1298 test -n "$FGREP" && break
1300 test -n "$FGREP" || FGREP=": "
1302 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1302: error: cannot find workable fgrep" >&5
1303 echo "$as_me: error: cannot find workable fgrep" >&2;}
1304 { (exit 1); exit 1; }; }
1307 echo "$as_me:1307: result: $ac_cv_path_FGREP" >&5
1308 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1309 FGREP="$ac_cv_path_FGREP"
1311 echo "$as_me:1311: checking for prefix" >&5
1312 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1313 if test "x$prefix" = "xNONE" ; then
1314 case "$cf_cv_system_name" in
1315 # non-vendor systems don't have a conflict
1316 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1319 (*) prefix=$ac_default_prefix
1323 echo "$as_me:1323: result: $prefix" >&5
1324 echo "${ECHO_T}$prefix" >&6
1326 if test "x$prefix" = "xNONE" ; then
1327 echo "$as_me:1327: checking for default include-directory" >&5
1328 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1329 test -n "$verbose" && echo 1>&6
1332 "$includedir/ncurses" \
1334 "$prefix/include/ncurses" \
1335 /usr/local/include \
1336 /usr/local/include/ncurses \
1338 /usr/include/ncurses
1340 cf_dir=`eval echo "$cf_symbol"`
1341 if test -f "$cf_dir/curses.h" ; then
1342 if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1343 includedir="$cf_symbol"
1344 test -n "$verbose" && echo $ECHO_N " found " 1>&6
1348 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1350 echo "$as_me:1350: result: $includedir" >&5
1351 echo "${ECHO_T}$includedir" >&6
1354 ### Checks for programs.
1357 ac_cpp='$CPP $CPPFLAGS'
1358 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1359 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1360 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1361 ac_main_return="return"
1362 if test -n "$ac_tool_prefix"; then
1363 for ac_prog in gnatgcc gcc cc
1365 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1366 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1367 echo "$as_me:1367: checking for $ac_word" >&5
1368 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1369 if test "${ac_cv_prog_CC+set}" = set; then
1370 echo $ECHO_N "(cached) $ECHO_C" >&6
1372 if test -n "$CC"; then
1373 ac_cv_prog_CC="$CC" # Let the user override the test.
1375 ac_save_IFS=$IFS; IFS=$ac_path_separator
1377 for ac_dir in $ac_dummy; do
1379 test -z "$ac_dir" && ac_dir=.
1380 $as_executable_p "$ac_dir/$ac_word" || continue
1381 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1382 echo "$as_me:1382: found $ac_dir/$ac_word" >&5
1389 if test -n "$CC"; then
1390 echo "$as_me:1390: result: $CC" >&5
1391 echo "${ECHO_T}$CC" >&6
1393 echo "$as_me:1393: result: no" >&5
1394 echo "${ECHO_T}no" >&6
1397 test -n "$CC" && break
1400 if test -z "$CC"; then
1402 for ac_prog in gnatgcc gcc cc
1404 # Extract the first word of "$ac_prog", so it can be a program name with args.
1405 set dummy $ac_prog; ac_word=$2
1406 echo "$as_me:1406: checking for $ac_word" >&5
1407 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1408 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1409 echo $ECHO_N "(cached) $ECHO_C" >&6
1411 if test -n "$ac_ct_CC"; then
1412 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1414 ac_save_IFS=$IFS; IFS=$ac_path_separator
1416 for ac_dir in $ac_dummy; do
1418 test -z "$ac_dir" && ac_dir=.
1419 $as_executable_p "$ac_dir/$ac_word" || continue
1420 ac_cv_prog_ac_ct_CC="$ac_prog"
1421 echo "$as_me:1421: found $ac_dir/$ac_word" >&5
1427 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1428 if test -n "$ac_ct_CC"; then
1429 echo "$as_me:1429: result: $ac_ct_CC" >&5
1430 echo "${ECHO_T}$ac_ct_CC" >&6
1432 echo "$as_me:1432: result: no" >&5
1433 echo "${ECHO_T}no" >&6
1436 test -n "$ac_ct_CC" && break
1442 test -z "$CC" && { { echo "$as_me:1442: error: no acceptable cc found in \$PATH" >&5
1443 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1444 { (exit 1); exit 1; }; }
1446 # Provide some information about the compiler.
1447 echo "$as_me:1447:" \
1448 "checking for C compiler version" >&5
1449 ac_compiler=`set X $ac_compile; echo "$2"`
1450 { (eval echo "$as_me:1450: \"$ac_compiler --version </dev/null >&5\"") >&5
1451 (eval $ac_compiler --version </dev/null >&5) 2>&5
1453 echo "$as_me:1453: \$? = $ac_status" >&5
1454 (exit "$ac_status"); }
1455 { (eval echo "$as_me:1455: \"$ac_compiler -v </dev/null >&5\"") >&5
1456 (eval $ac_compiler -v </dev/null >&5) 2>&5
1458 echo "$as_me:1458: \$? = $ac_status" >&5
1459 (exit "$ac_status"); }
1460 { (eval echo "$as_me:1460: \"$ac_compiler -V </dev/null >&5\"") >&5
1461 (eval $ac_compiler -V </dev/null >&5) 2>&5
1463 echo "$as_me:1463: \$? = $ac_status" >&5
1464 (exit "$ac_status"); }
1466 cat >"conftest.$ac_ext" <<_ACEOF
1467 #line 1467 "configure"
1468 #include "confdefs.h"
1478 ac_clean_files_save=$ac_clean_files
1479 ac_clean_files="$ac_clean_files a.out a.exe"
1480 # Try to create an executable without -o first, disregard a.out.
1481 # It will help us diagnose broken compilers, and finding out an intuition
1483 echo "$as_me:1483: checking for C compiler default output" >&5
1484 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1485 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1486 if { (eval echo "$as_me:1486: \"$ac_link_default\"") >&5
1487 (eval $ac_link_default) 2>&5
1489 echo "$as_me:1489: \$? = $ac_status" >&5
1490 (exit "$ac_status"); }; then
1491 # Find the output, starting from the most likely. This scheme is
1492 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1494 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1495 ls a.out conftest 2>/dev/null;
1496 ls a.* conftest.* 2>/dev/null`; do
1498 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1499 a.out ) # We found the default executable, but exeext='' is most
1502 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1503 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1510 echo "$as_me: failed program was:" >&5
1511 cat "conftest.$ac_ext" >&5
1512 { { echo "$as_me:1512: error: C compiler cannot create executables" >&5
1513 echo "$as_me: error: C compiler cannot create executables" >&2;}
1514 { (exit 77); exit 77; }; }
1517 ac_exeext=$ac_cv_exeext
1518 echo "$as_me:1518: result: $ac_file" >&5
1519 echo "${ECHO_T}$ac_file" >&6
1521 # Check the compiler produces executables we can run. If not, either
1522 # the compiler is broken, or we cross compile.
1523 echo "$as_me:1523: checking whether the C compiler works" >&5
1524 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1525 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1526 # If not cross compiling, check that we can run a simple program.
1527 if test "$cross_compiling" != yes; then
1528 if { ac_try='./$ac_file'
1529 { (eval echo "$as_me:1529: \"$ac_try\"") >&5
1532 echo "$as_me:1532: \$? = $ac_status" >&5
1533 (exit "$ac_status"); }; }; then
1536 if test "$cross_compiling" = maybe; then
1539 { { echo "$as_me:1539: error: cannot run C compiled programs.
1540 If you meant to cross compile, use \`--host'." >&5
1541 echo "$as_me: error: cannot run C compiled programs.
1542 If you meant to cross compile, use \`--host'." >&2;}
1543 { (exit 1); exit 1; }; }
1547 echo "$as_me:1547: result: yes" >&5
1548 echo "${ECHO_T}yes" >&6
1550 rm -f a.out a.exe "conftest$ac_cv_exeext"
1551 ac_clean_files=$ac_clean_files_save
1552 # Check the compiler produces executables we can run. If not, either
1553 # the compiler is broken, or we cross compile.
1554 echo "$as_me:1554: checking whether we are cross compiling" >&5
1555 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1556 echo "$as_me:1556: result: $cross_compiling" >&5
1557 echo "${ECHO_T}$cross_compiling" >&6
1559 echo "$as_me:1559: checking for executable suffix" >&5
1560 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1561 if { (eval echo "$as_me:1561: \"$ac_link\"") >&5
1562 (eval $ac_link) 2>&5
1564 echo "$as_me:1564: \$? = $ac_status" >&5
1565 (exit "$ac_status"); }; then
1566 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1567 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1568 # work properly (i.e., refer to `conftest.exe'), while it won't with
1570 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1572 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1573 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1580 { { echo "$as_me:1580: error: cannot compute EXEEXT: cannot compile and link" >&5
1581 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1582 { (exit 1); exit 1; }; }
1585 rm -f "conftest$ac_cv_exeext"
1586 echo "$as_me:1586: result: $ac_cv_exeext" >&5
1587 echo "${ECHO_T}$ac_cv_exeext" >&6
1589 rm -f "conftest.$ac_ext"
1590 EXEEXT=$ac_cv_exeext
1592 echo "$as_me:1592: checking for object suffix" >&5
1593 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1594 if test "${ac_cv_objext+set}" = set; then
1595 echo $ECHO_N "(cached) $ECHO_C" >&6
1597 cat >"conftest.$ac_ext" <<_ACEOF
1598 #line 1598 "configure"
1599 #include "confdefs.h"
1609 rm -f conftest.o conftest.obj
1610 if { (eval echo "$as_me:1610: \"$ac_compile\"") >&5
1611 (eval $ac_compile) 2>&5
1613 echo "$as_me:1613: \$? = $ac_status" >&5
1614 (exit "$ac_status"); }; then
1615 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1617 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1618 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1623 echo "$as_me: failed program was:" >&5
1624 cat "conftest.$ac_ext" >&5
1625 { { echo "$as_me:1625: error: cannot compute OBJEXT: cannot compile" >&5
1626 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1627 { (exit 1); exit 1; }; }
1630 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1632 echo "$as_me:1632: result: $ac_cv_objext" >&5
1633 echo "${ECHO_T}$ac_cv_objext" >&6
1634 OBJEXT=$ac_cv_objext
1636 echo "$as_me:1636: checking whether we are using the GNU C compiler" >&5
1637 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1638 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1639 echo $ECHO_N "(cached) $ECHO_C" >&6
1641 cat >"conftest.$ac_ext" <<_ACEOF
1642 #line 1642 "configure"
1643 #include "confdefs.h"
1656 rm -f "conftest.$ac_objext"
1657 if { (eval echo "$as_me:1657: \"$ac_compile\"") >&5
1658 (eval $ac_compile) 2>&5
1660 echo "$as_me:1660: \$? = $ac_status" >&5
1661 (exit "$ac_status"); } &&
1662 { ac_try='test -s "conftest.$ac_objext"'
1663 { (eval echo "$as_me:1663: \"$ac_try\"") >&5
1666 echo "$as_me:1666: \$? = $ac_status" >&5
1667 (exit "$ac_status"); }; }; then
1670 echo "$as_me: failed program was:" >&5
1671 cat "conftest.$ac_ext" >&5
1674 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1675 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1678 echo "$as_me:1678: result: $ac_cv_c_compiler_gnu" >&5
1679 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1680 GCC=`test $ac_compiler_gnu = yes && echo yes`
1681 ac_test_CFLAGS=${CFLAGS+set}
1682 ac_save_CFLAGS=$CFLAGS
1684 echo "$as_me:1684: checking whether $CC accepts -g" >&5
1685 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1686 if test "${ac_cv_prog_cc_g+set}" = set; then
1687 echo $ECHO_N "(cached) $ECHO_C" >&6
1689 cat >"conftest.$ac_ext" <<_ACEOF
1690 #line 1690 "configure"
1691 #include "confdefs.h"
1701 rm -f "conftest.$ac_objext"
1702 if { (eval echo "$as_me:1702: \"$ac_compile\"") >&5
1703 (eval $ac_compile) 2>&5
1705 echo "$as_me:1705: \$? = $ac_status" >&5
1706 (exit "$ac_status"); } &&
1707 { ac_try='test -s "conftest.$ac_objext"'
1708 { (eval echo "$as_me:1708: \"$ac_try\"") >&5
1711 echo "$as_me:1711: \$? = $ac_status" >&5
1712 (exit "$ac_status"); }; }; then
1715 echo "$as_me: failed program was:" >&5
1716 cat "conftest.$ac_ext" >&5
1719 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1721 echo "$as_me:1721: result: $ac_cv_prog_cc_g" >&5
1722 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1723 if test "$ac_test_CFLAGS" = set; then
1724 CFLAGS=$ac_save_CFLAGS
1725 elif test $ac_cv_prog_cc_g = yes; then
1726 if test "$GCC" = yes; then
1732 if test "$GCC" = yes; then
1738 # Some people use a C++ compiler to compile C. Since we use `exit',
1739 # in C++ we need to declare it. In case someone uses the same compiler
1740 # for both compiling C and C++ we need to have the C++ compiler decide
1741 # the declaration of exit, since it's the most demanding environment.
1742 cat >"conftest.$ac_ext" <<_ACEOF
1747 rm -f "conftest.$ac_objext"
1748 if { (eval echo "$as_me:1748: \"$ac_compile\"") >&5
1749 (eval $ac_compile) 2>&5
1751 echo "$as_me:1751: \$? = $ac_status" >&5
1752 (exit "$ac_status"); } &&
1753 { ac_try='test -s "conftest.$ac_objext"'
1754 { (eval echo "$as_me:1754: \"$ac_try\"") >&5
1757 echo "$as_me:1757: \$? = $ac_status" >&5
1758 (exit "$ac_status"); }; }; then
1759 for ac_declaration in \
1761 '#include <stdlib.h>' \
1762 'extern "C" void std::exit (int) throw (); using std::exit;' \
1763 'extern "C" void std::exit (int); using std::exit;' \
1764 'extern "C" void exit (int) throw ();' \
1765 'extern "C" void exit (int);' \
1768 cat >"conftest.$ac_ext" <<_ACEOF
1769 #line 1769 "configure"
1770 #include "confdefs.h"
1781 rm -f "conftest.$ac_objext"
1782 if { (eval echo "$as_me:1782: \"$ac_compile\"") >&5
1783 (eval $ac_compile) 2>&5
1785 echo "$as_me:1785: \$? = $ac_status" >&5
1786 (exit "$ac_status"); } &&
1787 { ac_try='test -s "conftest.$ac_objext"'
1788 { (eval echo "$as_me:1788: \"$ac_try\"") >&5
1791 echo "$as_me:1791: \$? = $ac_status" >&5
1792 (exit "$ac_status"); }; }; then
1795 echo "$as_me: failed program was:" >&5
1796 cat "conftest.$ac_ext" >&5
1799 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1800 cat >"conftest.$ac_ext" <<_ACEOF
1801 #line 1801 "configure"
1802 #include "confdefs.h"
1812 rm -f "conftest.$ac_objext"
1813 if { (eval echo "$as_me:1813: \"$ac_compile\"") >&5
1814 (eval $ac_compile) 2>&5
1816 echo "$as_me:1816: \$? = $ac_status" >&5
1817 (exit "$ac_status"); } &&
1818 { ac_try='test -s "conftest.$ac_objext"'
1819 { (eval echo "$as_me:1819: \"$ac_try\"") >&5
1822 echo "$as_me:1822: \$? = $ac_status" >&5
1823 (exit "$ac_status"); }; }; then
1826 echo "$as_me: failed program was:" >&5
1827 cat "conftest.$ac_ext" >&5
1829 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1832 if test -n "$ac_declaration"; then
1833 echo '#ifdef __cplusplus' >>confdefs.h
1834 echo "$ac_declaration" >>confdefs.h
1835 echo '#endif' >>confdefs.h
1839 echo "$as_me: failed program was:" >&5
1840 cat "conftest.$ac_ext" >&5
1842 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1844 ac_cpp='$CPP $CPPFLAGS'
1845 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1846 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1847 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1848 ac_main_return="return"
1851 if test "$GCC" = yes ; then
1852 echo "$as_me:1852: checking version of $CC" >&5
1853 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1854 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.].*//'`"
1855 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1856 echo "$as_me:1856: result: $GCC_VERSION" >&5
1857 echo "${ECHO_T}$GCC_VERSION" >&6
1862 if test "$GCC" = yes ; then
1865 echo "$as_me:1865: checking if this is really Intel C compiler" >&5
1866 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1867 cf_save_CFLAGS="$CFLAGS"
1868 CFLAGS="$CFLAGS -no-gcc"
1869 cat >"conftest.$ac_ext" <<_ACEOF
1870 #line 1870 "configure"
1871 #include "confdefs.h"
1877 #ifdef __INTEL_COMPILER
1886 rm -f "conftest.$ac_objext"
1887 if { (eval echo "$as_me:1887: \"$ac_compile\"") >&5
1888 (eval $ac_compile) 2>&5
1890 echo "$as_me:1890: \$? = $ac_status" >&5
1891 (exit "$ac_status"); } &&
1892 { ac_try='test -s "conftest.$ac_objext"'
1893 { (eval echo "$as_me:1893: \"$ac_try\"") >&5
1896 echo "$as_me:1896: \$? = $ac_status" >&5
1897 (exit "$ac_status"); }; }; then
1899 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1902 echo "$as_me: failed program was:" >&5
1903 cat "conftest.$ac_ext" >&5
1905 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1906 CFLAGS="$cf_save_CFLAGS"
1907 echo "$as_me:1907: result: $INTEL_COMPILER" >&5
1908 echo "${ECHO_T}$INTEL_COMPILER" >&6
1915 if test "$GCC" = yes ; then
1916 echo "$as_me:1916: checking if this is really Clang C compiler" >&5
1917 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1918 cf_save_CFLAGS="$CFLAGS"
1919 cat >"conftest.$ac_ext" <<_ACEOF
1920 #line 1920 "configure"
1921 #include "confdefs.h"
1936 rm -f "conftest.$ac_objext"
1937 if { (eval echo "$as_me:1937: \"$ac_compile\"") >&5
1938 (eval $ac_compile) 2>&5
1940 echo "$as_me:1940: \$? = $ac_status" >&5
1941 (exit "$ac_status"); } &&
1942 { ac_try='test -s "conftest.$ac_objext"'
1943 { (eval echo "$as_me:1943: \"$ac_try\"") >&5
1946 echo "$as_me:1946: \$? = $ac_status" >&5
1947 (exit "$ac_status"); }; }; then
1951 echo "$as_me: failed program was:" >&5
1952 cat "conftest.$ac_ext" >&5
1954 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1955 CFLAGS="$cf_save_CFLAGS"
1956 echo "$as_me:1956: result: $CLANG_COMPILER" >&5
1957 echo "${ECHO_T}$CLANG_COMPILER" >&6
1962 if test "x$CLANG_COMPILER" = "xyes" ; then
1964 (c[1-9][0-9]|*/c[1-9][0-9])
1965 { echo "$as_me:1965: WARNING: replacing broken compiler alias $CC" >&5
1966 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
1967 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
1972 echo "$as_me:1972: checking version of $CC" >&5
1973 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1974 CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1975 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
1976 echo "$as_me:1976: result: $CLANG_VERSION" >&5
1977 echo "${ECHO_T}$CLANG_VERSION" >&6
1979 for cf_clang_opt in \
1980 -Qunused-arguments \
1981 -Wno-error=implicit-function-declaration
1983 echo "$as_me:1983: checking if option $cf_clang_opt works" >&5
1984 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
1985 cf_save_CFLAGS="$CFLAGS"
1986 CFLAGS="$CFLAGS $cf_clang_opt"
1987 cat >"conftest.$ac_ext" <<_ACEOF
1988 #line 1988 "configure"
1989 #include "confdefs.h"
1996 printf("hello!\\n");
2001 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2002 if { (eval echo "$as_me:2002: \"$ac_link\"") >&5
2003 (eval $ac_link) 2>&5
2005 echo "$as_me:2005: \$? = $ac_status" >&5
2006 (exit "$ac_status"); } &&
2007 { ac_try='test -s "conftest$ac_exeext"'
2008 { (eval echo "$as_me:2008: \"$ac_try\"") >&5
2011 echo "$as_me:2011: \$? = $ac_status" >&5
2012 (exit "$ac_status"); }; }; then
2016 echo "$as_me: failed program was:" >&5
2017 cat "conftest.$ac_ext" >&5
2021 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2022 echo "$as_me:2022: result: $cf_clang_optok" >&5
2023 echo "${ECHO_T}$cf_clang_optok" >&6
2024 CFLAGS="$cf_save_CFLAGS"
2025 if test "$cf_clang_optok" = yes; then
2026 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2028 echo "${as_me:-configure}:2028: testing adding option $cf_clang_opt ..." 1>&5
2030 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2031 CFLAGS="${CFLAGS}$cf_clang_opt"
2037 echo "$as_me:2037: checking for $CC option to accept ANSI C" >&5
2038 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2039 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2040 echo $ECHO_N "(cached) $ECHO_C" >&6
2042 ac_cv_prog_cc_stdc=no
2044 cat >"conftest.$ac_ext" <<_ACEOF
2045 #line 2045 "configure"
2046 #include "confdefs.h"
2049 #include <sys/types.h>
2050 #include <sys/stat.h>
2051 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2052 struct buf { int x; };
2053 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2054 static char *e (p, i)
2060 static char *f (char * (*g) (char **, int), char **p, ...)
2065 s = g (p, va_arg (v,int));
2069 int test (int i, double x);
2070 struct s1 {int (*f) (int a);};
2071 struct s2 {int (*f) (double a);};
2072 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2078 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2083 # Don't try gcc -ansi; that turns off useful extensions and
2084 # breaks some systems' header files.
2085 # AIX -qlanglvl=ansi
2086 # Ultrix and OSF/1 -std1
2087 # HP-UX 10.20 and later -Ae
2088 # HP-UX older versions -Aa -D_HPUX_SOURCE
2089 # SVR4 -Xc -D__EXTENSIONS__
2090 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2092 CC="$ac_save_CC $ac_arg"
2093 rm -f "conftest.$ac_objext"
2094 if { (eval echo "$as_me:2094: \"$ac_compile\"") >&5
2095 (eval $ac_compile) 2>&5
2097 echo "$as_me:2097: \$? = $ac_status" >&5
2098 (exit "$ac_status"); } &&
2099 { ac_try='test -s "conftest.$ac_objext"'
2100 { (eval echo "$as_me:2100: \"$ac_try\"") >&5
2103 echo "$as_me:2103: \$? = $ac_status" >&5
2104 (exit "$ac_status"); }; }; then
2105 ac_cv_prog_cc_stdc=$ac_arg
2108 echo "$as_me: failed program was:" >&5
2109 cat "conftest.$ac_ext" >&5
2111 rm -f "conftest.$ac_objext"
2113 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2118 case "x$ac_cv_prog_cc_stdc" in
2120 echo "$as_me:2120: result: none needed" >&5
2121 echo "${ECHO_T}none needed" >&6 ;;
2123 echo "$as_me:2123: result: $ac_cv_prog_cc_stdc" >&5
2124 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2125 CC="$CC $ac_cv_prog_cc_stdc" ;;
2128 # This should have been defined by AC_PROG_CC
2131 echo "$as_me:2131: checking \$CFLAGS variable" >&5
2132 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2135 echo "$as_me:2135: result: broken" >&5
2136 echo "${ECHO_T}broken" >&6
2137 { echo "$as_me:2137: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2138 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2141 for cf_arg in $cf_flags
2147 cf_new_extra_cppflags=
2149 for cf_add_cflags in $cf_arg
2151 case "$cf_fix_cppflags" in
2153 case "$cf_add_cflags" in
2154 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2155 case "$cf_add_cflags" in
2157 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2159 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2160 && test -z "${cf_tst_cflags}" \
2161 && cf_fix_cppflags=yes
2163 if test "$cf_fix_cppflags" = yes ; then
2165 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2166 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2169 elif test "${cf_tst_cflags}" = "\"'" ; then
2171 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2172 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2182 case "$cf_add_cflags" in
2184 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2186 CPPFLAGS=`echo "$CPPFLAGS" | \
2187 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2188 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2193 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2194 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2201 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2202 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2209 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2210 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2212 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2214 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2215 && test -z "${cf_tst_cflags}" \
2216 && cf_fix_cppflags=no
2221 if test -n "$cf_new_cflags" ; then
2223 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2224 CFLAGS="${CFLAGS}$cf_new_cflags"
2228 if test -n "$cf_new_cppflags" ; then
2230 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2231 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2235 if test -n "$cf_new_extra_cppflags" ; then
2237 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2238 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2245 echo "$as_me:2245: result: ok" >&5
2246 echo "${ECHO_T}ok" >&6
2250 echo "$as_me:2250: checking \$CC variable" >&5
2251 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2254 echo "$as_me:2254: result: broken" >&5
2255 echo "${ECHO_T}broken" >&6
2256 { echo "$as_me:2256: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2257 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2259 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2260 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2262 for cf_arg in $cf_flags
2270 cf_new_extra_cppflags=
2272 for cf_add_cflags in $cf_arg
2274 case "$cf_fix_cppflags" in
2276 case "$cf_add_cflags" in
2277 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2278 case "$cf_add_cflags" in
2280 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2282 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2283 && test -z "${cf_tst_cflags}" \
2284 && cf_fix_cppflags=yes
2286 if test "$cf_fix_cppflags" = yes ; then
2288 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2289 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2292 elif test "${cf_tst_cflags}" = "\"'" ; then
2294 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2295 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2305 case "$cf_add_cflags" in
2307 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2309 CPPFLAGS=`echo "$CPPFLAGS" | \
2310 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2311 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2316 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2317 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2324 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2325 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2332 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2333 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2335 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2337 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2338 && test -z "${cf_tst_cflags}" \
2339 && cf_fix_cppflags=no
2344 if test -n "$cf_new_cflags" ; then
2346 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2347 CFLAGS="${CFLAGS}$cf_new_cflags"
2351 if test -n "$cf_new_cppflags" ; then
2353 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2354 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2358 if test -n "$cf_new_extra_cppflags" ; then
2360 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2361 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2371 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2373 echo "${as_me:-configure}:2373: testing resulting CC: '$CC' ..." 1>&5
2375 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2377 echo "${as_me:-configure}:2377: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2379 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2381 echo "${as_me:-configure}:2381: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2385 echo "$as_me:2385: result: ok" >&5
2386 echo "${ECHO_T}ok" >&6
2390 echo "$as_me:2390: checking for egrep" >&5
2391 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2392 if test "${ac_cv_path_EGREP+set}" = set; then
2393 echo $ECHO_N "(cached) $ECHO_C" >&6
2395 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2396 then ac_cv_path_EGREP="$GREP -E"
2398 for ac_prog in gegrep egrep
2400 # Extract the first word of "$ac_prog", so it can be a program name with args.
2401 set dummy $ac_prog; ac_word=$2
2402 echo "$as_me:2402: checking for $ac_word" >&5
2403 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2404 if test "${ac_cv_path_EGREP+set}" = set; then
2405 echo $ECHO_N "(cached) $ECHO_C" >&6
2409 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2412 ac_save_IFS=$IFS; IFS=$ac_path_separator
2414 for ac_dir in $ac_dummy; do
2416 test -z "$ac_dir" && ac_dir=.
2417 if $as_executable_p "$ac_dir/$ac_word"; then
2418 ac_cv_path_EGREP="$ac_dir/$ac_word"
2419 echo "$as_me:2419: found $ac_dir/$ac_word" >&5
2427 EGREP=$ac_cv_path_EGREP
2429 if test -n "$EGREP"; then
2430 echo "$as_me:2430: result: $EGREP" >&5
2431 echo "${ECHO_T}$EGREP" >&6
2433 echo "$as_me:2433: result: no" >&5
2434 echo "${ECHO_T}no" >&6
2437 test -n "$EGREP" && break
2439 test -n "$EGREP" || EGREP=": "
2441 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2441: error: cannot find workable egrep" >&5
2442 echo "$as_me: error: cannot find workable egrep" >&2;}
2443 { (exit 1); exit 1; }; }
2446 echo "$as_me:2446: result: $ac_cv_path_EGREP" >&5
2447 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2448 EGREP="$ac_cv_path_EGREP"
2451 ac_cpp='$CPP $CPPFLAGS'
2452 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2453 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2454 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2455 ac_main_return="return"
2456 echo "$as_me:2456: checking how to run the C preprocessor" >&5
2457 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2458 # On Suns, sometimes $CPP names a directory.
2459 if test -n "$CPP" && test -d "$CPP"; then
2462 if test -z "$CPP"; then
2463 if test "${ac_cv_prog_CPP+set}" = set; then
2464 echo $ECHO_N "(cached) $ECHO_C" >&6
2466 # Double quotes because CPP needs to be expanded
2467 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2470 for ac_c_preproc_warn_flag in '' yes
2472 # Use a header file that comes with gcc, so configuring glibc
2473 # with a fresh cross-compiler works.
2474 # On the NeXT, cc -E runs the code through the compiler's parser,
2475 # not just through cpp. "Syntax error" is here to catch this case.
2476 cat >"conftest.$ac_ext" <<_ACEOF
2477 #line 2477 "configure"
2478 #include "confdefs.h"
2482 if { (eval echo "$as_me:2482: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2483 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2485 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2487 cat conftest.err >&5
2488 echo "$as_me:2488: \$? = $ac_status" >&5
2489 (exit "$ac_status"); } >/dev/null; then
2490 if test -s conftest.err; then
2491 ac_cpp_err=$ac_c_preproc_warn_flag
2498 if test -z "$ac_cpp_err"; then
2501 echo "$as_me: failed program was:" >&5
2502 cat "conftest.$ac_ext" >&5
2503 # Broken: fails on valid input.
2506 rm -f conftest.err "conftest.$ac_ext"
2508 # OK, works on sane cases. Now check whether non-existent headers
2509 # can be detected and how.
2510 cat >"conftest.$ac_ext" <<_ACEOF
2511 #line 2511 "configure"
2512 #include "confdefs.h"
2513 #include <ac_nonexistent.h>
2515 if { (eval echo "$as_me:2515: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2516 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2518 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2520 cat conftest.err >&5
2521 echo "$as_me:2521: \$? = $ac_status" >&5
2522 (exit "$ac_status"); } >/dev/null; then
2523 if test -s conftest.err; then
2524 ac_cpp_err=$ac_c_preproc_warn_flag
2531 if test -z "$ac_cpp_err"; then
2532 # Broken: success on invalid input.
2535 echo "$as_me: failed program was:" >&5
2536 cat "conftest.$ac_ext" >&5
2537 # Passes both tests.
2541 rm -f conftest.err "conftest.$ac_ext"
2544 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2545 rm -f conftest.err "conftest.$ac_ext"
2546 if $ac_preproc_ok; then
2558 echo "$as_me:2558: result: $CPP" >&5
2559 echo "${ECHO_T}$CPP" >&6
2561 for ac_c_preproc_warn_flag in '' yes
2563 # Use a header file that comes with gcc, so configuring glibc
2564 # with a fresh cross-compiler works.
2565 # On the NeXT, cc -E runs the code through the compiler's parser,
2566 # not just through cpp. "Syntax error" is here to catch this case.
2567 cat >"conftest.$ac_ext" <<_ACEOF
2568 #line 2568 "configure"
2569 #include "confdefs.h"
2573 if { (eval echo "$as_me:2573: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2574 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2576 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2578 cat conftest.err >&5
2579 echo "$as_me:2579: \$? = $ac_status" >&5
2580 (exit "$ac_status"); } >/dev/null; then
2581 if test -s conftest.err; then
2582 ac_cpp_err=$ac_c_preproc_warn_flag
2589 if test -z "$ac_cpp_err"; then
2592 echo "$as_me: failed program was:" >&5
2593 cat "conftest.$ac_ext" >&5
2594 # Broken: fails on valid input.
2597 rm -f conftest.err "conftest.$ac_ext"
2599 # OK, works on sane cases. Now check whether non-existent headers
2600 # can be detected and how.
2601 cat >"conftest.$ac_ext" <<_ACEOF
2602 #line 2602 "configure"
2603 #include "confdefs.h"
2604 #include <ac_nonexistent.h>
2606 if { (eval echo "$as_me:2606: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2607 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2609 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2611 cat conftest.err >&5
2612 echo "$as_me:2612: \$? = $ac_status" >&5
2613 (exit "$ac_status"); } >/dev/null; then
2614 if test -s conftest.err; then
2615 ac_cpp_err=$ac_c_preproc_warn_flag
2622 if test -z "$ac_cpp_err"; then
2623 # Broken: success on invalid input.
2626 echo "$as_me: failed program was:" >&5
2627 cat "conftest.$ac_ext" >&5
2628 # Passes both tests.
2632 rm -f conftest.err "conftest.$ac_ext"
2635 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2636 rm -f conftest.err "conftest.$ac_ext"
2637 if $ac_preproc_ok; then
2640 { { echo "$as_me:2640: error: C preprocessor \"$CPP\" fails sanity check" >&5
2641 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2642 { (exit 1); exit 1; }; }
2646 ac_cpp='$CPP $CPPFLAGS'
2647 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2648 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2649 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2650 ac_main_return="return"
2652 if test $ac_cv_c_compiler_gnu = yes; then
2653 echo "$as_me:2653: checking whether $CC needs -traditional" >&5
2654 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2655 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2656 echo $ECHO_N "(cached) $ECHO_C" >&6
2658 ac_pattern="Autoconf.*'x'"
2659 cat >"conftest.$ac_ext" <<_ACEOF
2660 #line 2660 "configure"
2661 #include "confdefs.h"
2663 int Autoconf = TIOCGETP;
2665 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2666 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2667 ac_cv_prog_gcc_traditional=yes
2669 ac_cv_prog_gcc_traditional=no
2673 if test $ac_cv_prog_gcc_traditional = no; then
2674 cat >"conftest.$ac_ext" <<_ACEOF
2675 #line 2675 "configure"
2676 #include "confdefs.h"
2678 int Autoconf = TCGETA;
2680 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2681 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2682 ac_cv_prog_gcc_traditional=yes
2688 echo "$as_me:2688: result: $ac_cv_prog_gcc_traditional" >&5
2689 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2690 if test $ac_cv_prog_gcc_traditional = yes; then
2691 CC="$CC -traditional"
2695 echo "$as_me:2695: checking whether $CC understands -c and -o together" >&5
2696 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2697 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2698 echo $ECHO_N "(cached) $ECHO_C" >&6
2701 cat > conftest.$ac_ext <<CF_EOF
2704 ${cf_cv_main_return:-return}(0);
2707 # We do the test twice because some compilers refuse to overwrite an
2708 # existing .o file with -o, though they will create one.
2709 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2710 if { (eval echo "$as_me:2710: \"$ac_try\"") >&5
2713 echo "$as_me:2713: \$? = $ac_status" >&5
2714 (exit "$ac_status"); } &&
2715 test -f conftest2.$ac_objext && { (eval echo "$as_me:2715: \"$ac_try\"") >&5
2718 echo "$as_me:2718: \$? = $ac_status" >&5
2719 (exit "$ac_status"); };
2721 eval cf_cv_prog_CC_c_o=yes
2723 eval cf_cv_prog_CC_c_o=no
2728 if test "$cf_cv_prog_CC_c_o" = yes; then
2729 echo "$as_me:2729: result: yes" >&5
2730 echo "${ECHO_T}yes" >&6
2732 echo "$as_me:2732: result: no" >&5
2733 echo "${ECHO_T}no" >&6
2736 test "$program_prefix" != NONE &&
2737 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2738 # Use a double $ so make ignores it.
2739 test "$program_suffix" != NONE &&
2740 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2741 # Double any \ or $. echo might interpret backslashes.
2742 # By default was `s,x,x', remove it if useless.
2743 cat <<\_ACEOF >conftest.sed
2744 s/[\\$]/&&/g;s/;s,x,x,$//
2746 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2749 for ac_prog in mawk gawk nawk awk
2751 # Extract the first word of "$ac_prog", so it can be a program name with args.
2752 set dummy $ac_prog; ac_word=$2
2753 echo "$as_me:2753: checking for $ac_word" >&5
2754 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2755 if test "${ac_cv_prog_AWK+set}" = set; then
2756 echo $ECHO_N "(cached) $ECHO_C" >&6
2758 if test -n "$AWK"; then
2759 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2761 ac_save_IFS=$IFS; IFS=$ac_path_separator
2763 for ac_dir in $ac_dummy; do
2765 test -z "$ac_dir" && ac_dir=.
2766 $as_executable_p "$ac_dir/$ac_word" || continue
2767 ac_cv_prog_AWK="$ac_prog"
2768 echo "$as_me:2768: found $ac_dir/$ac_word" >&5
2775 if test -n "$AWK"; then
2776 echo "$as_me:2776: result: $AWK" >&5
2777 echo "${ECHO_T}$AWK" >&6
2779 echo "$as_me:2779: result: no" >&5
2780 echo "${ECHO_T}no" >&6
2783 test -n "$AWK" && break
2786 test -z "$AWK" && { { echo "$as_me:2786: error: No awk program found" >&5
2787 echo "$as_me: error: No awk program found" >&2;}
2788 { (exit 1); exit 1; }; }
2790 echo "$as_me:2790: checking for egrep" >&5
2791 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2792 if test "${ac_cv_prog_egrep+set}" = set; then
2793 echo $ECHO_N "(cached) $ECHO_C" >&6
2795 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2796 then ac_cv_prog_egrep='grep -E'
2797 else ac_cv_prog_egrep='egrep'
2800 echo "$as_me:2800: result: $ac_cv_prog_egrep" >&5
2801 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2802 EGREP=$ac_cv_prog_egrep
2804 test -z "$EGREP" && { { echo "$as_me:2804: error: No egrep program found" >&5
2805 echo "$as_me: error: No egrep program found" >&2;}
2806 { (exit 1); exit 1; }; }
2808 # Find a good install program. We prefer a C program (faster),
2809 # so one script is as good as another. But avoid the broken or
2810 # incompatible versions:
2811 # SysV /etc/install, /usr/sbin/install
2812 # SunOS /usr/etc/install
2813 # IRIX /sbin/install
2815 # AmigaOS /C/install, which installs bootblocks on floppy discs
2816 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2817 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2818 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2819 # ./install, which can be erroneously created by make from ./install.sh.
2820 echo "$as_me:2820: checking for a BSD compatible install" >&5
2821 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2822 if test -z "$INSTALL"; then
2823 if test "${ac_cv_path_install+set}" = set; then
2824 echo $ECHO_N "(cached) $ECHO_C" >&6
2826 ac_save_IFS=$IFS; IFS=$ac_path_separator
2827 for ac_dir in $PATH; do
2829 # Account for people who put trailing slashes in PATH elements.
2831 / | ./ | .// | /cC/* \
2832 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2835 # OSF1 and SCO ODT 3.0 have their own names for install.
2836 # Don't use installbsd from OSF since it installs stuff as root
2838 for ac_prog in ginstall scoinst install; do
2839 if $as_executable_p "$ac_dir/$ac_prog"; then
2840 if test $ac_prog = install &&
2841 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2842 # AIX install. It has an incompatible calling convention.
2844 elif test $ac_prog = install &&
2845 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2846 # program-specific install script used by HP pwplus--don't use.
2849 ac_cv_path_install="$ac_dir/$ac_prog -c"
2859 if test "${ac_cv_path_install+set}" = set; then
2860 INSTALL=$ac_cv_path_install
2862 # As a last resort, use the slow shell script. We don't cache a
2863 # path for INSTALL within a source directory, because that will
2864 # break other packages using the cache if that directory is
2865 # removed, or if the path is relative.
2866 INSTALL=$ac_install_sh
2869 echo "$as_me:2869: result: $INSTALL" >&5
2870 echo "${ECHO_T}$INSTALL" >&6
2872 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2873 # It thinks the first close brace ends the variable substitution.
2874 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2876 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2878 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2880 echo "$as_me:2880: checking whether ln -s works" >&5
2881 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2883 if test "$LN_S" = "ln -s"; then
2884 echo "$as_me:2884: result: yes" >&5
2885 echo "${ECHO_T}yes" >&6
2887 echo "$as_me:2887: result: no, using $LN_S" >&5
2888 echo "${ECHO_T}no, using $LN_S" >&6
2891 echo "$as_me:2891: checking if $LN_S -f options work" >&5
2892 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2894 rm -f conf$$.src conf$$dst
2896 echo first >conf$$.src
2897 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2902 rm -f conf$$.dst conf$$src
2903 echo "$as_me:2903: result: $cf_prog_ln_sf" >&5
2904 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2906 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2908 # Find a good install program. We prefer a C program (faster),
2909 # so one script is as good as another. But avoid the broken or
2910 # incompatible versions:
2911 # SysV /etc/install, /usr/sbin/install
2912 # SunOS /usr/etc/install
2913 # IRIX /sbin/install
2915 # AmigaOS /C/install, which installs bootblocks on floppy discs
2916 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2917 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2918 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2919 # ./install, which can be erroneously created by make from ./install.sh.
2920 echo "$as_me:2920: checking for a BSD compatible install" >&5
2921 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2922 if test -z "$INSTALL"; then
2923 if test "${ac_cv_path_install+set}" = set; then
2924 echo $ECHO_N "(cached) $ECHO_C" >&6
2926 ac_save_IFS=$IFS; IFS=$ac_path_separator
2927 for ac_dir in $PATH; do
2929 # Account for people who put trailing slashes in PATH elements.
2931 / | ./ | .// | /cC/* \
2932 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2935 # OSF1 and SCO ODT 3.0 have their own names for install.
2936 # Don't use installbsd from OSF since it installs stuff as root
2938 for ac_prog in ginstall scoinst install; do
2939 if $as_executable_p "$ac_dir/$ac_prog"; then
2940 if test $ac_prog = install &&
2941 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2942 # AIX install. It has an incompatible calling convention.
2944 elif test $ac_prog = install &&
2945 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2946 # program-specific install script used by HP pwplus--don't use.
2949 ac_cv_path_install="$ac_dir/$ac_prog -c"
2959 if test "${ac_cv_path_install+set}" = set; then
2960 INSTALL=$ac_cv_path_install
2962 # As a last resort, use the slow shell script. We don't cache a
2963 # path for INSTALL within a source directory, because that will
2964 # break other packages using the cache if that directory is
2965 # removed, or if the path is relative.
2966 INSTALL=$ac_install_sh
2969 echo "$as_me:2969: result: $INSTALL" >&5
2970 echo "${ECHO_T}$INSTALL" >&6
2972 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2973 # It thinks the first close brace ends the variable substitution.
2974 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2976 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2978 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2984 cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
2985 test -z "$cf_dir" && cf_dir=.
2986 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
2990 echo "$as_me:2990: checking if you want to install stripped executables" >&5
2991 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2993 # Check whether --enable-stripping or --disable-stripping was given.
2994 if test "${enable_stripping+set}" = set; then
2995 enableval="$enable_stripping"
2996 test "$enableval" != no && enableval=yes
2997 if test "$enableval" != "yes" ; then
3000 enable_stripping=yes
3004 enable_stripping=yes
3007 echo "$as_me:3007: result: $enable_stripping" >&5
3008 echo "${ECHO_T}$enable_stripping" >&6
3010 if test "$enable_stripping" = yes
3017 : "${INSTALL:=install}"
3018 echo "$as_me:3018: checking if install accepts -p option" >&5
3019 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
3020 if test "${cf_cv_install_p+set}" = set; then
3021 echo $ECHO_N "(cached) $ECHO_C" >&6
3028 if $INSTALL -p conftest.in conftest.out 2>/dev/null
3030 if test -f conftest.out/conftest.in
3032 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
3033 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
3034 if test -s conftest.err
3049 echo "$as_me:3049: result: $cf_cv_install_p" >&5
3050 echo "${ECHO_T}$cf_cv_install_p" >&6
3052 echo "$as_me:3052: checking if install needs to be told about ownership" >&5
3053 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
3054 case `$ac_config_guess` in
3063 echo "$as_me:3063: result: $with_install_o" >&5
3064 echo "${ECHO_T}$with_install_o" >&6
3065 if test "x$with_install_o" = xyes
3067 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'`"
3072 echo "$as_me:3072: checking for long file names" >&5
3073 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3074 if test "${ac_cv_sys_long_file_names+set}" = set; then
3075 echo $ECHO_N "(cached) $ECHO_C" >&6
3077 ac_cv_sys_long_file_names=yes
3078 # Test for long file names in all the places we know might matter:
3079 # . the current directory, where building will happen
3080 # $prefix/lib where we will be installing things
3081 # $exec_prefix/lib likewise
3082 # eval it to expand exec_prefix.
3083 # $TMPDIR if set, where it might want to write temporary files
3084 # if $TMPDIR is not set:
3085 # /tmp where it might want to write temporary files
3088 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3091 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3093 for ac_dir in . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3094 test -d "$ac_dir" || continue
3095 test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3096 ac_xdir=$ac_dir/cf$$
3097 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3098 ac_tf1=$ac_xdir/conftest9012345
3099 ac_tf2=$ac_xdir/conftest9012346
3100 (echo 1 >"$ac_tf1") 2>/dev/null
3101 (echo 2 >"$ac_tf2") 2>/dev/null
3102 ac_val=`cat "$ac_tf1" 2>/dev/null`
3103 if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3104 ac_cv_sys_long_file_names=no
3105 rm -rf "$ac_xdir" 2>/dev/null
3108 rm -rf "$ac_xdir" 2>/dev/null
3111 echo "$as_me:3111: result: $ac_cv_sys_long_file_names" >&5
3112 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3113 if test "$ac_cv_sys_long_file_names" = yes; then
3115 cat >>confdefs.h <<\EOF
3116 #define HAVE_LONG_FILE_NAMES 1
3121 # if we find pkg-config, check if we should install the ".pc" files.
3123 echo "$as_me:3123: checking if you want to use pkg-config" >&5
3124 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3126 # Check whether --with-pkg-config or --without-pkg-config was given.
3127 if test "${with_pkg_config+set}" = set; then
3128 withval="$with_pkg_config"
3129 cf_pkg_config=$withval
3133 echo "$as_me:3133: result: $cf_pkg_config" >&5
3134 echo "${ECHO_T}$cf_pkg_config" >&6
3136 case "$cf_pkg_config" in
3142 if test -n "$ac_tool_prefix"; then
3143 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3144 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3145 echo "$as_me:3145: checking for $ac_word" >&5
3146 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3147 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3148 echo $ECHO_N "(cached) $ECHO_C" >&6
3152 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3155 ac_save_IFS=$IFS; IFS=$ac_path_separator
3157 for ac_dir in $ac_dummy; do
3159 test -z "$ac_dir" && ac_dir=.
3160 if $as_executable_p "$ac_dir/$ac_word"; then
3161 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3162 echo "$as_me:3162: found $ac_dir/$ac_word" >&5
3170 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3172 if test -n "$PKG_CONFIG"; then
3173 echo "$as_me:3173: result: $PKG_CONFIG" >&5
3174 echo "${ECHO_T}$PKG_CONFIG" >&6
3176 echo "$as_me:3176: result: no" >&5
3177 echo "${ECHO_T}no" >&6
3181 if test -z "$ac_cv_path_PKG_CONFIG"; then
3182 ac_pt_PKG_CONFIG=$PKG_CONFIG
3183 # Extract the first word of "pkg-config", so it can be a program name with args.
3184 set dummy pkg-config; ac_word=$2
3185 echo "$as_me:3185: checking for $ac_word" >&5
3186 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3187 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3188 echo $ECHO_N "(cached) $ECHO_C" >&6
3190 case $ac_pt_PKG_CONFIG in
3192 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3195 ac_save_IFS=$IFS; IFS=$ac_path_separator
3197 for ac_dir in $ac_dummy; do
3199 test -z "$ac_dir" && ac_dir=.
3200 if $as_executable_p "$ac_dir/$ac_word"; then
3201 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3202 echo "$as_me:3202: found $ac_dir/$ac_word" >&5
3207 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3211 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3213 if test -n "$ac_pt_PKG_CONFIG"; then
3214 echo "$as_me:3214: result: $ac_pt_PKG_CONFIG" >&5
3215 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3217 echo "$as_me:3217: result: no" >&5
3218 echo "${ECHO_T}no" >&6
3221 PKG_CONFIG=$ac_pt_PKG_CONFIG
3223 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3232 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3233 if test "$PKG_CONFIG" != none ; then
3235 if test "x$prefix" != xNONE; then
3236 cf_path_syntax="$prefix"
3238 cf_path_syntax="$ac_default_prefix"
3241 case ".$PKG_CONFIG" in
3246 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3248 (.\$\{*prefix\}*|.\$\{*dir\}*)
3249 eval PKG_CONFIG="$PKG_CONFIG"
3250 case ".$PKG_CONFIG" in
3252 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3257 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3260 { { echo "$as_me:3260: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3261 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3262 { (exit 1); exit 1; }; }
3266 elif test "x$cf_pkg_config" != xno ; then
3267 { echo "$as_me:3267: WARNING: pkg-config is not installed" >&5
3268 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3271 case "$PKG_CONFIG" in
3273 echo "$as_me:3273: checking for pkg-config library directory" >&5
3274 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3277 echo "$as_me:3277: checking for $PKG_CONFIG library directory" >&5
3278 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3282 # if $PKG_CONFIG_LIBDIR is set, try to use that
3283 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[ ]*,,'`
3285 # if the option is used, let that override. otherwise default to "libdir"
3287 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3288 if test "${with_pkg_config_libdir+set}" = set; then
3289 withval="$with_pkg_config_libdir"
3290 cf_search_path=$withval
3292 test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
3295 case "x$cf_search_path" in
3297 PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
3298 echo "$as_me:3298: result: $PKG_CONFIG_LIBDIR" >&5
3299 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3308 PKG_CONFIG_LIBDIR="$cf_search_path"
3309 echo "$as_me:3309: result: $PKG_CONFIG_LIBDIR" >&5
3310 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3314 echo "$as_me:3314: result: auto" >&5
3315 echo "${ECHO_T}auto" >&6
3317 # Look for the library directory using the same prefix as the executable
3318 echo "$as_me:3318: checking for search-list" >&5
3319 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
3320 if test "x$PKG_CONFIG" != xnone
3322 # works for pkg-config since version 0.24 (2009)
3323 # works for pkgconf since version 0.8.3 (2012)
3324 for cf_pkg_program in \
3325 `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
3329 cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
3330 test -n "$cf_search_path" && break
3333 # works for pkg-config since import in 2005 of original 2001 HP code.
3334 test -z "$cf_search_path" && \
3336 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
3337 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
3338 sub(\"^[^']*'\",\"\"); \
3339 sub(\"'.*\",\"\"); \
3340 printf \" %s\", \\$0; } \
3345 echo "$as_me:3345: result: $cf_search_path" >&5
3346 echo "${ECHO_T}$cf_search_path" >&6
3349 { { echo "$as_me:3349: error: Unexpected option value: $cf_search_path" >&5
3350 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
3351 { (exit 1); exit 1; }; }
3355 if test -n "$cf_search_path"
3357 echo "$as_me:3357: checking for first directory" >&5
3358 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
3359 cf_pkg_config_path=none
3360 for cf_config in $cf_search_path
3362 if test -d "$cf_config"
3364 cf_pkg_config_path=$cf_config
3368 echo "$as_me:3368: result: $cf_pkg_config_path" >&5
3369 echo "${ECHO_T}$cf_pkg_config_path" >&6
3371 if test "x$cf_pkg_config_path" != xnone ; then
3372 # limit this to the first directory found
3373 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
3376 if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
3378 echo "$as_me:3378: checking for workaround" >&5
3379 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
3380 if test "$prefix" = "NONE" ; then
3381 cf_prefix="$ac_default_prefix"
3385 eval cf_libdir=$libdir
3386 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
3388 for cf_config in $cf_search_path
3391 $cf_libdir/pkgconfig)
3392 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
3396 test -z "$cf_backup" && cf_backup=$cf_config
3400 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
3401 echo "$as_me:3401: result: $PKG_CONFIG_LIBDIR" >&5
3402 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3406 echo "$as_me:3406: checking if you want to build test-programs" >&5
3407 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3409 # Check whether --with-tests or --without-tests was given.
3410 if test "${with_tests+set}" = set; then
3411 withval="$with_tests"
3412 cf_with_tests=$withval
3416 echo "$as_me:3416: result: $cf_with_tests" >&5
3417 echo "${ECHO_T}$cf_with_tests" >&6
3419 echo "$as_me:3419: checking if we should assume mixed-case filenames" >&5
3420 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3422 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3423 if test "${enable_mixed_case+set}" = set; then
3424 enableval="$enable_mixed_case"
3425 enable_mixedcase=$enableval
3427 enable_mixedcase=auto
3429 echo "$as_me:3429: result: $enable_mixedcase" >&5
3430 echo "${ECHO_T}$enable_mixedcase" >&6
3431 if test "$enable_mixedcase" = "auto" ; then
3433 echo "$as_me:3433: checking if filesystem supports mixed-case filenames" >&5
3434 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3435 if test "${cf_cv_mixedcase+set}" = set; then
3436 echo $ECHO_N "(cached) $ECHO_C" >&6
3439 if test "$cross_compiling" = yes ; then
3440 case "$target_alias" in
3441 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3449 rm -f conftest CONFTEST
3451 if test -f CONFTEST ; then
3456 rm -f conftest CONFTEST
3460 echo "$as_me:3460: result: $cf_cv_mixedcase" >&5
3461 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3462 test "$cf_cv_mixedcase" = yes &&
3463 cat >>confdefs.h <<\EOF
3464 #define MIXEDCASE_FILENAMES 1
3468 cf_cv_mixedcase=$enable_mixedcase
3469 if test "$enable_mixedcase" = "yes" ; then
3470 cat >>confdefs.h <<\EOF
3471 #define MIXEDCASE_FILENAMES 1
3477 # do this after mixed-case option (tags/TAGS is not as important as tic).
3478 echo "$as_me:3478: checking whether ${MAKE-make} sets \${MAKE}" >&5
3479 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3480 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3481 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3482 echo $ECHO_N "(cached) $ECHO_C" >&6
3484 cat >conftest.make <<\EOF
3486 @echo 'ac_maketemp="${MAKE}"'
3488 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3489 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3490 if test -n "$ac_maketemp"; then
3491 eval ac_cv_prog_make_${ac_make}_set=yes
3493 eval ac_cv_prog_make_${ac_make}_set=no
3497 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3498 echo "$as_me:3498: result: yes" >&5
3499 echo "${ECHO_T}yes" >&6
3502 echo "$as_me:3502: result: no" >&5
3503 echo "${ECHO_T}no" >&6
3504 SET_MAKE="MAKE=${MAKE-make}"
3507 echo "$as_me:3507: checking for \".PHONY\" make-support" >&5
3508 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
3509 if test "${cf_cv_make_PHONY+set}" = set; then
3510 echo $ECHO_N "(cached) $ECHO_C" >&6
3515 mkdir conftest || exit 1
3517 cat >makefile <<'CF_EOF'
3521 @echo "** making $@ $(DATA)"
3523 @echo "** making $@ $(DATA)"
3525 @echo "** making $@ $(DATA)"
3528 @echo "** making $@ $(DATA)"
3531 for cf_data in 1 2 3
3533 ${MAKE:-make} always DATA=$cf_data
3534 ${MAKE:-make} once DATA=$cf_data
3535 ${MAKE:-make} -t always once
3536 if test -f always ; then
3537 echo "no (case 1)" > ../conftest.tmp
3538 elif test ! -f always.out ; then
3539 echo "no (case 2)" > ../conftest.tmp
3540 elif test ! -f once.out ; then
3541 echo "no (case 3)" > ../conftest.tmp
3542 elif ! cmp -s always.out once.out ; then
3543 echo "no (case 4)" > ../conftest.tmp
3544 diff always.out once.out
3546 cf_check="`cat always.out`"
3547 if test "x$cf_check" != "x$cf_data" ; then
3548 echo "no (case 5)" > ../conftest.tmp
3550 echo yes > ../conftest.tmp
3558 cf_cv_make_PHONY="`cat conftest.tmp`"
3562 echo "$as_me:3562: result: $cf_cv_make_PHONY" >&5
3563 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
3566 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
3567 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
3569 for ac_prog in exctags ctags
3571 # Extract the first word of "$ac_prog", so it can be a program name with args.
3572 set dummy $ac_prog; ac_word=$2
3573 echo "$as_me:3573: checking for $ac_word" >&5
3574 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3575 if test "${ac_cv_prog_CTAGS+set}" = set; then
3576 echo $ECHO_N "(cached) $ECHO_C" >&6
3578 if test -n "$CTAGS"; then
3579 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3581 ac_save_IFS=$IFS; IFS=$ac_path_separator
3583 for ac_dir in $ac_dummy; do
3585 test -z "$ac_dir" && ac_dir=.
3586 $as_executable_p "$ac_dir/$ac_word" || continue
3587 ac_cv_prog_CTAGS="$ac_prog"
3588 echo "$as_me:3588: found $ac_dir/$ac_word" >&5
3594 CTAGS=$ac_cv_prog_CTAGS
3595 if test -n "$CTAGS"; then
3596 echo "$as_me:3596: result: $CTAGS" >&5
3597 echo "${ECHO_T}$CTAGS" >&6
3599 echo "$as_me:3599: result: no" >&5
3600 echo "${ECHO_T}no" >&6
3603 test -n "$CTAGS" && break
3606 for ac_prog in exetags etags
3608 # Extract the first word of "$ac_prog", so it can be a program name with args.
3609 set dummy $ac_prog; ac_word=$2
3610 echo "$as_me:3610: checking for $ac_word" >&5
3611 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3612 if test "${ac_cv_prog_ETAGS+set}" = set; then
3613 echo $ECHO_N "(cached) $ECHO_C" >&6
3615 if test -n "$ETAGS"; then
3616 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3618 ac_save_IFS=$IFS; IFS=$ac_path_separator
3620 for ac_dir in $ac_dummy; do
3622 test -z "$ac_dir" && ac_dir=.
3623 $as_executable_p "$ac_dir/$ac_word" || continue
3624 ac_cv_prog_ETAGS="$ac_prog"
3625 echo "$as_me:3625: found $ac_dir/$ac_word" >&5
3631 ETAGS=$ac_cv_prog_ETAGS
3632 if test -n "$ETAGS"; then
3633 echo "$as_me:3633: result: $ETAGS" >&5
3634 echo "${ECHO_T}$ETAGS" >&6
3636 echo "$as_me:3636: result: no" >&5
3637 echo "${ECHO_T}no" >&6
3640 test -n "$ETAGS" && break
3643 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3644 set dummy ${CTAGS:-ctags}; ac_word=$2
3645 echo "$as_me:3645: checking for $ac_word" >&5
3646 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3647 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3648 echo $ECHO_N "(cached) $ECHO_C" >&6
3650 if test -n "$MAKE_LOWER_TAGS"; then
3651 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3653 ac_save_IFS=$IFS; IFS=$ac_path_separator
3655 for ac_dir in $ac_dummy; do
3657 test -z "$ac_dir" && ac_dir=.
3658 $as_executable_p "$ac_dir/$ac_word" || continue
3659 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3660 echo "$as_me:3660: found $ac_dir/$ac_word" >&5
3664 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3667 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3668 if test -n "$MAKE_LOWER_TAGS"; then
3669 echo "$as_me:3669: result: $MAKE_LOWER_TAGS" >&5
3670 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3672 echo "$as_me:3672: result: no" >&5
3673 echo "${ECHO_T}no" >&6
3676 if test "$cf_cv_mixedcase" = yes ; then
3677 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3678 set dummy ${ETAGS:-etags}; ac_word=$2
3679 echo "$as_me:3679: checking for $ac_word" >&5
3680 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3681 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3682 echo $ECHO_N "(cached) $ECHO_C" >&6
3684 if test -n "$MAKE_UPPER_TAGS"; then
3685 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3687 ac_save_IFS=$IFS; IFS=$ac_path_separator
3689 for ac_dir in $ac_dummy; do
3691 test -z "$ac_dir" && ac_dir=.
3692 $as_executable_p "$ac_dir/$ac_word" || continue
3693 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3694 echo "$as_me:3694: found $ac_dir/$ac_word" >&5
3698 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3701 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3702 if test -n "$MAKE_UPPER_TAGS"; then
3703 echo "$as_me:3703: result: $MAKE_UPPER_TAGS" >&5
3704 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3706 echo "$as_me:3706: result: no" >&5
3707 echo "${ECHO_T}no" >&6
3714 if test "$MAKE_UPPER_TAGS" = yes ; then
3720 if test "$MAKE_LOWER_TAGS" = yes ; then
3726 echo "$as_me:3726: checking for makeflags variable" >&5
3727 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3728 if test "${cf_cv_makeflags+set}" = set; then
3729 echo $ECHO_N "(cached) $ECHO_C" >&6
3733 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3735 cat >cf_makeflags.tmp <<CF_EOF
3738 @ echo '.$cf_option'
3740 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[ ]*$,,'`
3741 case "$cf_result" in
3743 cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
3744 case "$cf_result" in
3745 (.*CC=*) cf_cv_makeflags=
3747 (*) cf_cv_makeflags=$cf_option
3756 echo "${as_me:-configure}:3756: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3761 rm -f cf_makeflags.tmp
3764 echo "$as_me:3764: result: $cf_cv_makeflags" >&5
3765 echo "${ECHO_T}$cf_cv_makeflags" >&6
3767 if test -n "$ac_tool_prefix"; then
3768 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3769 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3770 echo "$as_me:3770: checking for $ac_word" >&5
3771 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3772 if test "${ac_cv_prog_RANLIB+set}" = set; then
3773 echo $ECHO_N "(cached) $ECHO_C" >&6
3775 if test -n "$RANLIB"; then
3776 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3778 ac_save_IFS=$IFS; IFS=$ac_path_separator
3780 for ac_dir in $ac_dummy; do
3782 test -z "$ac_dir" && ac_dir=.
3783 $as_executable_p "$ac_dir/$ac_word" || continue
3784 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3785 echo "$as_me:3785: found $ac_dir/$ac_word" >&5
3791 RANLIB=$ac_cv_prog_RANLIB
3792 if test -n "$RANLIB"; then
3793 echo "$as_me:3793: result: $RANLIB" >&5
3794 echo "${ECHO_T}$RANLIB" >&6
3796 echo "$as_me:3796: result: no" >&5
3797 echo "${ECHO_T}no" >&6
3801 if test -z "$ac_cv_prog_RANLIB"; then
3802 ac_ct_RANLIB=$RANLIB
3803 # Extract the first word of "ranlib", so it can be a program name with args.
3804 set dummy ranlib; ac_word=$2
3805 echo "$as_me:3805: checking for $ac_word" >&5
3806 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3807 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3808 echo $ECHO_N "(cached) $ECHO_C" >&6
3810 if test -n "$ac_ct_RANLIB"; then
3811 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3813 ac_save_IFS=$IFS; IFS=$ac_path_separator
3815 for ac_dir in $ac_dummy; do
3817 test -z "$ac_dir" && ac_dir=.
3818 $as_executable_p "$ac_dir/$ac_word" || continue
3819 ac_cv_prog_ac_ct_RANLIB="ranlib"
3820 echo "$as_me:3820: found $ac_dir/$ac_word" >&5
3824 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3827 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3828 if test -n "$ac_ct_RANLIB"; then
3829 echo "$as_me:3829: result: $ac_ct_RANLIB" >&5
3830 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3832 echo "$as_me:3832: result: no" >&5
3833 echo "${ECHO_T}no" >&6
3836 RANLIB=$ac_ct_RANLIB
3838 RANLIB="$ac_cv_prog_RANLIB"
3841 if test -n "$ac_tool_prefix"; then
3842 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3843 set dummy ${ac_tool_prefix}ld; ac_word=$2
3844 echo "$as_me:3844: checking for $ac_word" >&5
3845 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3846 if test "${ac_cv_prog_LD+set}" = set; then
3847 echo $ECHO_N "(cached) $ECHO_C" >&6
3849 if test -n "$LD"; then
3850 ac_cv_prog_LD="$LD" # Let the user override the test.
3852 ac_save_IFS=$IFS; IFS=$ac_path_separator
3854 for ac_dir in $ac_dummy; do
3856 test -z "$ac_dir" && ac_dir=.
3857 $as_executable_p "$ac_dir/$ac_word" || continue
3858 ac_cv_prog_LD="${ac_tool_prefix}ld"
3859 echo "$as_me:3859: found $ac_dir/$ac_word" >&5
3866 if test -n "$LD"; then
3867 echo "$as_me:3867: result: $LD" >&5
3868 echo "${ECHO_T}$LD" >&6
3870 echo "$as_me:3870: result: no" >&5
3871 echo "${ECHO_T}no" >&6
3875 if test -z "$ac_cv_prog_LD"; then
3877 # Extract the first word of "ld", so it can be a program name with args.
3878 set dummy ld; ac_word=$2
3879 echo "$as_me:3879: checking for $ac_word" >&5
3880 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3881 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3882 echo $ECHO_N "(cached) $ECHO_C" >&6
3884 if test -n "$ac_ct_LD"; then
3885 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3887 ac_save_IFS=$IFS; IFS=$ac_path_separator
3889 for ac_dir in $ac_dummy; do
3891 test -z "$ac_dir" && ac_dir=.
3892 $as_executable_p "$ac_dir/$ac_word" || continue
3893 ac_cv_prog_ac_ct_LD="ld"
3894 echo "$as_me:3894: found $ac_dir/$ac_word" >&5
3898 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3901 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3902 if test -n "$ac_ct_LD"; then
3903 echo "$as_me:3903: result: $ac_ct_LD" >&5
3904 echo "${ECHO_T}$ac_ct_LD" >&6
3906 echo "$as_me:3906: result: no" >&5
3907 echo "${ECHO_T}no" >&6
3915 if test -n "$ac_tool_prefix"; then
3916 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3917 set dummy ${ac_tool_prefix}ar; ac_word=$2
3918 echo "$as_me:3918: checking for $ac_word" >&5
3919 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3920 if test "${ac_cv_prog_AR+set}" = set; then
3921 echo $ECHO_N "(cached) $ECHO_C" >&6
3923 if test -n "$AR"; then
3924 ac_cv_prog_AR="$AR" # Let the user override the test.
3926 ac_save_IFS=$IFS; IFS=$ac_path_separator
3928 for ac_dir in $ac_dummy; do
3930 test -z "$ac_dir" && ac_dir=.
3931 $as_executable_p "$ac_dir/$ac_word" || continue
3932 ac_cv_prog_AR="${ac_tool_prefix}ar"
3933 echo "$as_me:3933: found $ac_dir/$ac_word" >&5
3940 if test -n "$AR"; then
3941 echo "$as_me:3941: result: $AR" >&5
3942 echo "${ECHO_T}$AR" >&6
3944 echo "$as_me:3944: result: no" >&5
3945 echo "${ECHO_T}no" >&6
3949 if test -z "$ac_cv_prog_AR"; then
3951 # Extract the first word of "ar", so it can be a program name with args.
3952 set dummy ar; ac_word=$2
3953 echo "$as_me:3953: checking for $ac_word" >&5
3954 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3955 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3956 echo $ECHO_N "(cached) $ECHO_C" >&6
3958 if test -n "$ac_ct_AR"; then
3959 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3961 ac_save_IFS=$IFS; IFS=$ac_path_separator
3963 for ac_dir in $ac_dummy; do
3965 test -z "$ac_dir" && ac_dir=.
3966 $as_executable_p "$ac_dir/$ac_word" || continue
3967 ac_cv_prog_ac_ct_AR="ar"
3968 echo "$as_me:3968: found $ac_dir/$ac_word" >&5
3972 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3975 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3976 if test -n "$ac_ct_AR"; then
3977 echo "$as_me:3977: result: $ac_ct_AR" >&5
3978 echo "${ECHO_T}$ac_ct_AR" >&6
3980 echo "$as_me:3980: result: no" >&5
3981 echo "${ECHO_T}no" >&6
3989 if test -n "$ac_tool_prefix"; then
3990 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3991 set dummy ${ac_tool_prefix}ar; ac_word=$2
3992 echo "$as_me:3992: checking for $ac_word" >&5
3993 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3994 if test "${ac_cv_prog_AR+set}" = set; then
3995 echo $ECHO_N "(cached) $ECHO_C" >&6
3997 if test -n "$AR"; then
3998 ac_cv_prog_AR="$AR" # Let the user override the test.
4000 ac_save_IFS=$IFS; IFS=$ac_path_separator
4002 for ac_dir in $ac_dummy; do
4004 test -z "$ac_dir" && ac_dir=.
4005 $as_executable_p "$ac_dir/$ac_word" || continue
4006 ac_cv_prog_AR="${ac_tool_prefix}ar"
4007 echo "$as_me:4007: found $ac_dir/$ac_word" >&5
4014 if test -n "$AR"; then
4015 echo "$as_me:4015: result: $AR" >&5
4016 echo "${ECHO_T}$AR" >&6
4018 echo "$as_me:4018: result: no" >&5
4019 echo "${ECHO_T}no" >&6
4023 if test -z "$ac_cv_prog_AR"; then
4025 # Extract the first word of "ar", so it can be a program name with args.
4026 set dummy ar; ac_word=$2
4027 echo "$as_me:4027: checking for $ac_word" >&5
4028 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4029 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4030 echo $ECHO_N "(cached) $ECHO_C" >&6
4032 if test -n "$ac_ct_AR"; then
4033 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4035 ac_save_IFS=$IFS; IFS=$ac_path_separator
4037 for ac_dir in $ac_dummy; do
4039 test -z "$ac_dir" && ac_dir=.
4040 $as_executable_p "$ac_dir/$ac_word" || continue
4041 ac_cv_prog_ac_ct_AR="ar"
4042 echo "$as_me:4042: found $ac_dir/$ac_word" >&5
4046 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4049 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4050 if test -n "$ac_ct_AR"; then
4051 echo "$as_me:4051: result: $ac_ct_AR" >&5
4052 echo "${ECHO_T}$ac_ct_AR" >&6
4054 echo "$as_me:4054: result: no" >&5
4055 echo "${ECHO_T}no" >&6
4063 echo "$as_me:4063: checking for options to update archives" >&5
4064 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4065 if test "${cf_cv_ar_flags+set}" = set; then
4066 echo $ECHO_N "(cached) $ECHO_C" >&6
4069 case "$cf_cv_system_name" in
4072 cat >mk_static_lib.sh <<-EOF
4077 exec \$MSVC_BIN -out:"\$out" \$@
4079 chmod +x mk_static_lib.sh
4080 AR=`pwd`/mk_static_lib.sh
4083 cf_cv_ar_flags=unknown
4084 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4087 # check if $ARFLAGS already contains this choice
4088 if test "x$ARFLAGS" != "x" ; then
4089 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4090 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4096 rm -f "conftest.$ac_cv_objext"
4099 cat >"conftest.$ac_ext" <<EOF
4100 #line 4100 "configure"
4101 int testdata[3] = { 123, 456, 789 };
4103 if { (eval echo "$as_me:4103: \"$ac_compile\"") >&5
4104 (eval $ac_compile) 2>&5
4106 echo "$as_me:4106: \$? = $ac_status" >&5
4107 (exit "$ac_status"); } ; then
4108 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4109 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
4110 if test -f conftest.a ; then
4111 cf_cv_ar_flags="$cf_ar_flags"
4115 test -n "$verbose" && echo " cannot compile test-program" 1>&6
4117 echo "${as_me:-configure}:4117: testing cannot compile test-program ..." 1>&5
4122 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
4127 echo "$as_me:4127: result: $cf_cv_ar_flags" >&5
4128 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4130 if test -n "$ARFLAGS" ; then
4131 if test -n "$cf_cv_ar_flags" ; then
4132 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4135 ARFLAGS=$cf_cv_ar_flags
4138 echo "$as_me:4138: checking for PATH separator" >&5
4139 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4140 case "$cf_cv_system_name" in
4141 (os2*) PATH_SEPARATOR=';' ;;
4142 (*) ${PATH_SEPARATOR:=':'} ;;
4145 echo "$as_me:4145: result: $PATH_SEPARATOR" >&5
4146 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4148 echo "$as_me:4148: checking if you have specified an install-prefix" >&5
4149 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4151 # Check whether --with-install-prefix or --without-install-prefix was given.
4152 if test "${with_install_prefix+set}" = set; then
4153 withval="$with_install_prefix"
4157 (*) DESTDIR="$withval"
4161 echo "$as_me:4161: result: $DESTDIR" >&5
4162 echo "${ECHO_T}$DESTDIR" >&6
4164 ###############################################################################
4166 # If we're cross-compiling, allow the user to override the tools and their
4167 # options. The configure script is oriented toward identifying the host
4168 # compiler, etc., but we need a build compiler to generate parts of the source.
4170 if test "$cross_compiling" = yes ; then
4172 # defaults that we might want to override
4173 : ${BUILD_CFLAGS:=''}
4174 : ${BUILD_CPPFLAGS:=''}
4175 : ${BUILD_LDFLAGS:=''}
4177 : ${BUILD_EXEEXT:='$x'}
4178 : ${BUILD_OBJEXT:='o'}
4180 # Check whether --with-build-cc or --without-build-cc was given.
4181 if test "${with_build_cc+set}" = set; then
4182 withval="$with_build_cc"
4185 for ac_prog in gcc clang c99 c89 cc cl
4187 # Extract the first word of "$ac_prog", so it can be a program name with args.
4188 set dummy $ac_prog; ac_word=$2
4189 echo "$as_me:4189: checking for $ac_word" >&5
4190 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4191 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4192 echo $ECHO_N "(cached) $ECHO_C" >&6
4194 if test -n "$BUILD_CC"; then
4195 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4197 ac_save_IFS=$IFS; IFS=$ac_path_separator
4199 for ac_dir in $ac_dummy; do
4201 test -z "$ac_dir" && ac_dir=.
4202 $as_executable_p "$ac_dir/$ac_word" || continue
4203 ac_cv_prog_BUILD_CC="$ac_prog"
4204 echo "$as_me:4204: found $ac_dir/$ac_word" >&5
4210 BUILD_CC=$ac_cv_prog_BUILD_CC
4211 if test -n "$BUILD_CC"; then
4212 echo "$as_me:4212: result: $BUILD_CC" >&5
4213 echo "${ECHO_T}$BUILD_CC" >&6
4215 echo "$as_me:4215: result: no" >&5
4216 echo "${ECHO_T}no" >&6
4219 test -n "$BUILD_CC" && break
4221 test -n "$BUILD_CC" || BUILD_CC="none"
4224 echo "$as_me:4224: checking for native build C compiler" >&5
4225 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4226 echo "$as_me:4226: result: $BUILD_CC" >&5
4227 echo "${ECHO_T}$BUILD_CC" >&6
4229 echo "$as_me:4229: checking for native build C preprocessor" >&5
4230 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4232 # Check whether --with-build-cpp or --without-build-cpp was given.
4233 if test "${with_build_cpp+set}" = set; then
4234 withval="$with_build_cpp"
4235 BUILD_CPP="$withval"
4237 BUILD_CPP='${BUILD_CC} -E'
4239 echo "$as_me:4239: result: $BUILD_CPP" >&5
4240 echo "${ECHO_T}$BUILD_CPP" >&6
4242 echo "$as_me:4242: checking for native build C flags" >&5
4243 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4245 # Check whether --with-build-cflags or --without-build-cflags was given.
4246 if test "${with_build_cflags+set}" = set; then
4247 withval="$with_build_cflags"
4248 BUILD_CFLAGS="$withval"
4250 echo "$as_me:4250: result: $BUILD_CFLAGS" >&5
4251 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4253 echo "$as_me:4253: checking for native build C preprocessor-flags" >&5
4254 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4256 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4257 if test "${with_build_cppflags+set}" = set; then
4258 withval="$with_build_cppflags"
4259 BUILD_CPPFLAGS="$withval"
4261 echo "$as_me:4261: result: $BUILD_CPPFLAGS" >&5
4262 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4264 echo "$as_me:4264: checking for native build linker-flags" >&5
4265 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4267 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4268 if test "${with_build_ldflags+set}" = set; then
4269 withval="$with_build_ldflags"
4270 BUILD_LDFLAGS="$withval"
4272 echo "$as_me:4272: result: $BUILD_LDFLAGS" >&5
4273 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4275 echo "$as_me:4275: checking for native build linker-libraries" >&5
4276 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4278 # Check whether --with-build-libs or --without-build-libs was given.
4279 if test "${with_build_libs+set}" = set; then
4280 withval="$with_build_libs"
4281 BUILD_LIBS="$withval"
4283 echo "$as_me:4283: result: $BUILD_LIBS" >&5
4284 echo "${ECHO_T}$BUILD_LIBS" >&6
4286 # this assumes we're on Unix.
4290 : ${BUILD_CC:='${CC}'}
4292 if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
4293 { { echo "$as_me:4293: error: Cross-build requires two compilers.
4294 Use --with-build-cc to specify the native compiler." >&5
4295 echo "$as_me: error: Cross-build requires two compilers.
4296 Use --with-build-cc to specify the native compiler." >&2;}
4297 { (exit 1); exit 1; }; }
4301 : ${BUILD_CC:='${CC}'}
4302 : ${BUILD_CPP:='${CPP}'}
4303 : ${BUILD_CFLAGS:='${CFLAGS}'}
4304 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4305 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4306 : ${BUILD_LIBS:='${LIBS}'}
4307 : ${BUILD_EXEEXT:='$x'}
4308 : ${BUILD_OBJEXT:='o'}
4311 ###############################################################################
4313 ### Options to allow the user to specify the set of libraries which are used.
4314 ### Use "--without-normal --with-shared" to allow the default model to be
4315 ### shared, for example.
4318 echo "$as_me:4318: checking if you want to build shared C-objects" >&5
4319 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
4321 # Check whether --with-shared or --without-shared was given.
4322 if test "${with_shared+set}" = set; then
4323 withval="$with_shared"
4324 with_shared=$withval
4328 echo "$as_me:4328: result: $with_shared" >&5
4329 echo "${ECHO_T}$with_shared" >&6
4330 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4332 echo "$as_me:4332: checking for specified models" >&5
4333 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4334 test -z "$cf_list_models" && cf_list_models=normal
4335 echo "$as_me:4335: result: $cf_list_models" >&5
4336 echo "${ECHO_T}$cf_list_models" >&6
4338 ### Use the first model as the default, and save its suffix for use in building
4339 ### up test-applications.
4340 echo "$as_me:4340: checking for default model" >&5
4341 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4342 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4343 echo "$as_me:4343: result: $DFT_LWR_MODEL" >&5
4344 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4346 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4348 echo "$as_me:4348: checking for specific curses-directory" >&5
4349 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4351 # Check whether --with-curses-dir or --without-curses-dir was given.
4352 if test "${with_curses_dir+set}" = set; then
4353 withval="$with_curses_dir"
4354 cf_cv_curses_dir=$withval
4358 echo "$as_me:4358: result: $cf_cv_curses_dir" >&5
4359 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4361 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
4364 if test "x$prefix" != xNONE; then
4365 cf_path_syntax="$prefix"
4367 cf_path_syntax="$ac_default_prefix"
4375 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4377 (.\$\{*prefix\}*|.\$\{*dir\}*)
4378 eval withval="$withval"
4381 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4386 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4389 { { echo "$as_me:4389: error: expected a pathname, not \"$withval\"" >&5
4390 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4391 { (exit 1); exit 1; }; }
4395 if test -d "$cf_cv_curses_dir"
4398 if test -n "$cf_cv_curses_dir/include" ; then
4399 for cf_add_incdir in $cf_cv_curses_dir/include
4401 while test "$cf_add_incdir" != /usr/include
4403 if test -d "$cf_add_incdir"
4406 if test -n "$CFLAGS$CPPFLAGS" ; then
4407 # a loop is needed to ensure we can add subdirs of existing dirs
4408 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4409 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4410 cf_have_incdir=yes; break
4415 if test "$cf_have_incdir" = no ; then
4416 if test "$cf_add_incdir" = /usr/local/include ; then
4417 if test "$GCC" = yes
4419 cf_save_CPPFLAGS=$CPPFLAGS
4421 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4422 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4424 cat >"conftest.$ac_ext" <<_ACEOF
4425 #line 4425 "configure"
4426 #include "confdefs.h"
4436 rm -f "conftest.$ac_objext"
4437 if { (eval echo "$as_me:4437: \"$ac_compile\"") >&5
4438 (eval $ac_compile) 2>&5
4440 echo "$as_me:4440: \$? = $ac_status" >&5
4441 (exit "$ac_status"); } &&
4442 { ac_try='test -s "conftest.$ac_objext"'
4443 { (eval echo "$as_me:4443: \"$ac_try\"") >&5
4446 echo "$as_me:4446: \$? = $ac_status" >&5
4447 (exit "$ac_status"); }; }; then
4450 echo "$as_me: failed program was:" >&5
4451 cat "conftest.$ac_ext" >&5
4454 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4455 CPPFLAGS=$cf_save_CPPFLAGS
4460 if test "$cf_have_incdir" = no ; then
4461 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4463 echo "${as_me:-configure}:4463: testing adding $cf_add_incdir to include-path ..." 1>&5
4465 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4467 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
4468 test "$cf_top_incdir" = "$cf_add_incdir" && break
4469 cf_add_incdir="$cf_top_incdir"
4480 if test -n "$cf_cv_curses_dir/lib" ; then
4481 for cf_add_libdir in $cf_cv_curses_dir/lib
4483 if test "$cf_add_libdir" = /usr/lib ; then
4485 elif test -d "$cf_add_libdir"
4488 if test -n "$LDFLAGS$LIBS" ; then
4489 # a loop is needed to ensure we can add subdirs of existing dirs
4490 for cf_test_libdir in $LDFLAGS $LIBS ; do
4491 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4492 cf_have_libdir=yes; break
4496 if test "$cf_have_libdir" = no ; then
4497 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4499 echo "${as_me:-configure}:4499: testing adding $cf_add_libdir to library-path ..." 1>&5
4501 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4510 cf_ncuconfig_root=ncurses
4511 cf_have_ncuconfig=no
4513 if test "x${PKG_CONFIG:=none}" != xnone; then
4514 echo "$as_me:4514: checking pkg-config for $cf_ncuconfig_root" >&5
4515 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
4516 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
4517 echo "$as_me:4517: result: yes" >&5
4518 echo "${ECHO_T}yes" >&6
4520 echo "$as_me:4520: checking if the $cf_ncuconfig_root package files work" >&5
4521 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
4522 cf_have_ncuconfig=unknown
4524 cf_save_CFLAGS="$CFLAGS"
4525 cf_save_CPPFLAGS="$CPPFLAGS"
4526 cf_save_LIBS="$LIBS"
4528 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
4529 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
4531 # while -W for passing linker flags is prevalent, it is not "standard".
4532 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
4533 # incompatible _and_ non-standard -W option which gives an error. Work
4534 # around that pitfall.
4535 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
4541 cf_new_extra_cppflags=
4543 for cf_add_cflags in $cf_pkg_cflags
4545 case "$cf_fix_cppflags" in
4547 case "$cf_add_cflags" in
4548 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4549 case "$cf_add_cflags" in
4551 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4553 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4554 && test -z "${cf_tst_cflags}" \
4555 && cf_fix_cppflags=yes
4557 if test "$cf_fix_cppflags" = yes ; then
4559 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4560 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4563 elif test "${cf_tst_cflags}" = "\"'" ; then
4565 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4566 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4576 case "$cf_add_cflags" in
4578 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4580 CPPFLAGS=`echo "$CPPFLAGS" | \
4581 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4582 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4587 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4588 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4595 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4596 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4603 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4604 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4606 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4608 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4609 && test -z "${cf_tst_cflags}" \
4610 && cf_fix_cppflags=no
4615 if test -n "$cf_new_cflags" ; then
4617 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4618 CFLAGS="${CFLAGS}$cf_new_cflags"
4622 if test -n "$cf_new_cppflags" ; then
4624 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4625 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4629 if test -n "$cf_new_extra_cppflags" ; then
4631 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4632 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4639 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4641 for cf_add_1lib in $cf_add_0lib; do
4642 for cf_add_2lib in $cf_add_libs; do
4643 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4648 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4652 cat >"conftest.$ac_ext" <<_ACEOF
4653 #line 4653 "configure"
4654 #include "confdefs.h"
4655 #include <${cf_cv_ncurses_header:-curses.h}>
4659 initscr(); mousemask(0,0); tigetstr((char *)0);
4664 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4665 if { (eval echo "$as_me:4665: \"$ac_link\"") >&5
4666 (eval $ac_link) 2>&5
4668 echo "$as_me:4668: \$? = $ac_status" >&5
4669 (exit "$ac_status"); } &&
4670 { ac_try='test -s "conftest$ac_exeext"'
4671 { (eval echo "$as_me:4671: \"$ac_try\"") >&5
4674 echo "$as_me:4674: \$? = $ac_status" >&5
4675 (exit "$ac_status"); }; }; then
4676 if test "$cross_compiling" = yes; then
4677 cf_test_ncuconfig=maybe
4679 cat >"conftest.$ac_ext" <<_ACEOF
4680 #line 4680 "configure"
4681 #include "confdefs.h"
4682 #include <${cf_cv_ncurses_header:-curses.h}>
4684 { const char *xx = curses_version(); return (xx == 0); }
4686 rm -f "conftest$ac_exeext"
4687 if { (eval echo "$as_me:4687: \"$ac_link\"") >&5
4688 (eval $ac_link) 2>&5
4690 echo "$as_me:4690: \$? = $ac_status" >&5
4691 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4692 { (eval echo "$as_me:4692: \"$ac_try\"") >&5
4695 echo "$as_me:4695: \$? = $ac_status" >&5
4696 (exit "$ac_status"); }; }; then
4697 cf_test_ncuconfig=yes
4699 echo "$as_me: program exited with status $ac_status" >&5
4700 echo "$as_me: failed program was:" >&5
4701 cat "conftest.$ac_ext" >&5
4702 cf_test_ncuconfig=no
4704 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4707 echo "$as_me: failed program was:" >&5
4708 cat "conftest.$ac_ext" >&5
4709 cf_test_ncuconfig=no
4711 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4713 CFLAGS="$cf_save_CFLAGS"
4714 CPPFLAGS="$cf_save_CPPFLAGS"
4715 LIBS="$cf_save_LIBS"
4717 if test "x$cf_test_ncuconfig" != xyes; then
4718 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4719 cf_pkg_cflags="$cf_temp"
4720 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4721 cf_pkg_libs="$cf_temp"
4726 for cf_add_cflags in $cf_pkg_cflags
4728 case "x$cf_add_cflags" in
4731 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4734 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
4735 test "$CFLAGS" != "$cf_old_cflag" || break
4737 CFLAGS="$cf_old_cflag"
4740 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4743 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
4744 test "$CPPFLAGS" != "$cf_old_cflag" || break
4746 CPPFLAGS="$cf_old_cflag"
4755 cf_new_extra_cppflags=
4757 for cf_add_cflags in $cf_add_cflags
4759 case "$cf_fix_cppflags" in
4761 case "$cf_add_cflags" in
4762 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4763 case "$cf_add_cflags" in
4765 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4767 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4768 && test -z "${cf_tst_cflags}" \
4769 && cf_fix_cppflags=yes
4771 if test "$cf_fix_cppflags" = yes ; then
4773 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4774 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4777 elif test "${cf_tst_cflags}" = "\"'" ; then
4779 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4780 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4790 case "$cf_add_cflags" in
4792 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4794 CPPFLAGS=`echo "$CPPFLAGS" | \
4795 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4796 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4801 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4802 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4809 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4810 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4817 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4818 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4820 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4822 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4823 && test -z "${cf_tst_cflags}" \
4824 && cf_fix_cppflags=no
4829 if test -n "$cf_new_cflags" ; then
4831 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4832 CFLAGS="${CFLAGS}$cf_new_cflags"
4836 if test -n "$cf_new_cppflags" ; then
4838 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4839 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4843 if test -n "$cf_new_extra_cppflags" ; then
4845 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4846 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4855 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4857 for cf_add_1lib in $cf_add_0lib; do
4858 for cf_add_2lib in $cf_add_libs; do
4859 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4864 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4868 cat >"conftest.$ac_ext" <<_ACEOF
4869 #line 4869 "configure"
4870 #include "confdefs.h"
4871 #include <${cf_cv_ncurses_header:-curses.h}>
4875 initscr(); mousemask(0,0); tigetstr((char *)0);
4880 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4881 if { (eval echo "$as_me:4881: \"$ac_link\"") >&5
4882 (eval $ac_link) 2>&5
4884 echo "$as_me:4884: \$? = $ac_status" >&5
4885 (exit "$ac_status"); } &&
4886 { ac_try='test -s "conftest$ac_exeext"'
4887 { (eval echo "$as_me:4887: \"$ac_try\"") >&5
4890 echo "$as_me:4890: \$? = $ac_status" >&5
4891 (exit "$ac_status"); }; }; then
4892 if test "$cross_compiling" = yes; then
4893 cf_have_ncuconfig=maybe
4895 cat >"conftest.$ac_ext" <<_ACEOF
4896 #line 4896 "configure"
4897 #include "confdefs.h"
4898 #include <${cf_cv_ncurses_header:-curses.h}>
4900 { const char *xx = curses_version(); return (xx == 0); }
4902 rm -f "conftest$ac_exeext"
4903 if { (eval echo "$as_me:4903: \"$ac_link\"") >&5
4904 (eval $ac_link) 2>&5
4906 echo "$as_me:4906: \$? = $ac_status" >&5
4907 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4908 { (eval echo "$as_me:4908: \"$ac_try\"") >&5
4911 echo "$as_me:4911: \$? = $ac_status" >&5
4912 (exit "$ac_status"); }; }; then
4913 cf_have_ncuconfig=yes
4915 echo "$as_me: program exited with status $ac_status" >&5
4916 echo "$as_me: failed program was:" >&5
4917 cat "conftest.$ac_ext" >&5
4918 cf_have_ncuconfig=no
4920 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4923 echo "$as_me: failed program was:" >&5
4924 cat "conftest.$ac_ext" >&5
4925 cf_have_ncuconfig=no
4927 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4928 echo "$as_me:4928: result: $cf_have_ncuconfig" >&5
4929 echo "${ECHO_T}$cf_have_ncuconfig" >&6
4930 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
4931 if test "$cf_have_ncuconfig" != "yes"
4933 CPPFLAGS="$cf_save_CPPFLAGS"
4934 LIBS="$cf_save_LIBS"
4935 NCURSES_CONFIG_PKG=none
4938 cat >>confdefs.h <<\EOF
4942 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
4944 echo "$as_me:4944: checking for terminfo header" >&5
4945 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4946 if test "${cf_cv_term_header+set}" = set; then
4947 echo $ECHO_N "(cached) $ECHO_C" >&6
4950 case "${cf_cv_ncurses_header}" in
4951 (*/ncurses.h|*/ncursesw.h)
4952 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4955 cf_term_header=term.h
4959 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4961 cat >"conftest.$ac_ext" <<_ACEOF
4962 #line 4962 "configure"
4963 #include "confdefs.h"
4965 #include <${cf_cv_ncurses_header:-curses.h}>
4971 int x = auto_left_margin; (void)x
4976 rm -f "conftest.$ac_objext"
4977 if { (eval echo "$as_me:4977: \"$ac_compile\"") >&5
4978 (eval $ac_compile) 2>&5
4980 echo "$as_me:4980: \$? = $ac_status" >&5
4981 (exit "$ac_status"); } &&
4982 { ac_try='test -s "conftest.$ac_objext"'
4983 { (eval echo "$as_me:4983: \"$ac_try\"") >&5
4986 echo "$as_me:4986: \$? = $ac_status" >&5
4987 (exit "$ac_status"); }; }; then
4989 cf_cv_term_header="$cf_test"
4991 echo "$as_me: failed program was:" >&5
4992 cat "conftest.$ac_ext" >&5
4994 cf_cv_term_header=unknown
4997 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4998 test "$cf_cv_term_header" != unknown && break
5002 echo "$as_me:5002: result: $cf_cv_term_header" >&5
5003 echo "${ECHO_T}$cf_cv_term_header" >&6
5005 # Set definitions to allow ifdef'ing to accommodate subdirectories
5007 case "$cf_cv_term_header" in
5010 cat >>confdefs.h <<\EOF
5011 #define HAVE_TERM_H 1
5017 case "$cf_cv_term_header" in
5020 cat >>confdefs.h <<\EOF
5021 #define HAVE_NCURSES_TERM_H 1
5027 cat >>confdefs.h <<\EOF
5028 #define HAVE_NCURSESW_TERM_H 1
5037 echo "$as_me:5037: result: no" >&5
5038 echo "${ECHO_T}no" >&6
5039 NCURSES_CONFIG_PKG=none
5042 NCURSES_CONFIG_PKG=none
5045 if test "x$cf_have_ncuconfig" = "xno"; then
5046 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
5048 if test -n "$ac_tool_prefix"; then
5049 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5051 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5052 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5053 echo "$as_me:5053: checking for $ac_word" >&5
5054 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5055 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5056 echo $ECHO_N "(cached) $ECHO_C" >&6
5058 if test -n "$NCURSES_CONFIG"; then
5059 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5061 ac_save_IFS=$IFS; IFS=$ac_path_separator
5063 for ac_dir in $ac_dummy; do
5065 test -z "$ac_dir" && ac_dir=.
5066 $as_executable_p "$ac_dir/$ac_word" || continue
5067 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5068 echo "$as_me:5068: found $ac_dir/$ac_word" >&5
5074 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5075 if test -n "$NCURSES_CONFIG"; then
5076 echo "$as_me:5076: result: $NCURSES_CONFIG" >&5
5077 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5079 echo "$as_me:5079: result: no" >&5
5080 echo "${ECHO_T}no" >&6
5083 test -n "$NCURSES_CONFIG" && break
5086 if test -z "$NCURSES_CONFIG"; then
5087 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5088 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5090 # Extract the first word of "$ac_prog", so it can be a program name with args.
5091 set dummy $ac_prog; ac_word=$2
5092 echo "$as_me:5092: checking for $ac_word" >&5
5093 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5094 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5095 echo $ECHO_N "(cached) $ECHO_C" >&6
5097 if test -n "$ac_ct_NCURSES_CONFIG"; then
5098 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5100 ac_save_IFS=$IFS; IFS=$ac_path_separator
5102 for ac_dir in $ac_dummy; do
5104 test -z "$ac_dir" && ac_dir=.
5105 $as_executable_p "$ac_dir/$ac_word" || continue
5106 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5107 echo "$as_me:5107: found $ac_dir/$ac_word" >&5
5113 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5114 if test -n "$ac_ct_NCURSES_CONFIG"; then
5115 echo "$as_me:5115: result: $ac_ct_NCURSES_CONFIG" >&5
5116 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5118 echo "$as_me:5118: result: no" >&5
5119 echo "${ECHO_T}no" >&6
5122 test -n "$ac_ct_NCURSES_CONFIG" && break
5124 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5126 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5129 if test "$NCURSES_CONFIG" != none ; then
5131 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
5133 case "x$cf_add_cflags" in
5136 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5139 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5140 test "$CFLAGS" != "$cf_old_cflag" || break
5142 CFLAGS="$cf_old_cflag"
5145 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5148 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5149 test "$CPPFLAGS" != "$cf_old_cflag" || break
5151 CPPFLAGS="$cf_old_cflag"
5160 cf_new_extra_cppflags=
5162 for cf_add_cflags in $cf_add_cflags
5164 case "$cf_fix_cppflags" in
5166 case "$cf_add_cflags" in
5167 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5168 case "$cf_add_cflags" in
5170 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5172 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5173 && test -z "${cf_tst_cflags}" \
5174 && cf_fix_cppflags=yes
5176 if test "$cf_fix_cppflags" = yes ; then
5178 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5179 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5182 elif test "${cf_tst_cflags}" = "\"'" ; then
5184 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5185 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5195 case "$cf_add_cflags" in
5197 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5199 CPPFLAGS=`echo "$CPPFLAGS" | \
5200 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5201 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5206 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5207 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5214 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5215 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5222 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5223 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5225 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5227 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5228 && test -z "${cf_tst_cflags}" \
5229 && cf_fix_cppflags=no
5234 if test -n "$cf_new_cflags" ; then
5236 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5237 CFLAGS="${CFLAGS}$cf_new_cflags"
5241 if test -n "$cf_new_cppflags" ; then
5243 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5244 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5248 if test -n "$cf_new_extra_cppflags" ; then
5250 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5251 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5260 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5262 for cf_add_1lib in $cf_add_0lib; do
5263 for cf_add_2lib in $cf_add_libs; do
5264 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5269 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5273 # even with config script, some packages use no-override for curses.h
5275 echo "$as_me:5275: checking if we have identified curses headers" >&5
5276 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5277 if test "${cf_cv_ncurses_header+set}" = set; then
5278 echo $ECHO_N "(cached) $ECHO_C" >&6
5281 cf_cv_ncurses_header=none
5283 ncurses.h ncurses/ncurses.h \
5284 curses.h ncurses/curses.h
5286 cat >"conftest.$ac_ext" <<_ACEOF
5287 #line 5287 "configure"
5288 #include "confdefs.h"
5289 #include <${cf_header}>
5293 initscr(); tgoto("?", 0,0)
5298 rm -f "conftest.$ac_objext"
5299 if { (eval echo "$as_me:5299: \"$ac_compile\"") >&5
5300 (eval $ac_compile) 2>&5
5302 echo "$as_me:5302: \$? = $ac_status" >&5
5303 (exit "$ac_status"); } &&
5304 { ac_try='test -s "conftest.$ac_objext"'
5305 { (eval echo "$as_me:5305: \"$ac_try\"") >&5
5308 echo "$as_me:5308: \$? = $ac_status" >&5
5309 (exit "$ac_status"); }; }; then
5310 cf_cv_ncurses_header=$cf_header; break
5312 echo "$as_me: failed program was:" >&5
5313 cat "conftest.$ac_ext" >&5
5315 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5319 echo "$as_me:5319: result: $cf_cv_ncurses_header" >&5
5320 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5322 if test "$cf_cv_ncurses_header" = none ; then
5323 { { echo "$as_me:5323: error: No curses header-files found" >&5
5324 echo "$as_me: error: No curses header-files found" >&2;}
5325 { (exit 1); exit 1; }; }
5328 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5330 for ac_header in $cf_cv_ncurses_header
5332 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5333 echo "$as_me:5333: checking for $ac_header" >&5
5334 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5335 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5336 echo $ECHO_N "(cached) $ECHO_C" >&6
5338 cat >"conftest.$ac_ext" <<_ACEOF
5339 #line 5339 "configure"
5340 #include "confdefs.h"
5341 #include <$ac_header>
5343 if { (eval echo "$as_me:5343: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5344 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5346 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5348 cat conftest.err >&5
5349 echo "$as_me:5349: \$? = $ac_status" >&5
5350 (exit "$ac_status"); } >/dev/null; then
5351 if test -s conftest.err; then
5352 ac_cpp_err=$ac_c_preproc_warn_flag
5359 if test -z "$ac_cpp_err"; then
5360 eval "$as_ac_Header=yes"
5362 echo "$as_me: failed program was:" >&5
5363 cat "conftest.$ac_ext" >&5
5364 eval "$as_ac_Header=no"
5366 rm -f conftest.err "conftest.$ac_ext"
5368 echo "$as_me:5368: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5369 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5370 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5371 cat >>confdefs.h <<EOF
5372 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5378 cat >>confdefs.h <<\EOF
5382 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5384 cat >>confdefs.h <<EOF
5385 #define $cf_nculib_ROOT 1
5388 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
5392 cf_ncuhdr_root=ncurses
5394 test -n "$cf_cv_curses_dir" && \
5395 test "$cf_cv_curses_dir" != "no" && { \
5397 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5398 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5400 while test "$cf_add_incdir" != /usr/include
5402 if test -d "$cf_add_incdir"
5405 if test -n "$CFLAGS$CPPFLAGS" ; then
5406 # a loop is needed to ensure we can add subdirs of existing dirs
5407 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5408 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5409 cf_have_incdir=yes; break
5414 if test "$cf_have_incdir" = no ; then
5415 if test "$cf_add_incdir" = /usr/local/include ; then
5416 if test "$GCC" = yes
5418 cf_save_CPPFLAGS=$CPPFLAGS
5420 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5421 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5423 cat >"conftest.$ac_ext" <<_ACEOF
5424 #line 5424 "configure"
5425 #include "confdefs.h"
5435 rm -f "conftest.$ac_objext"
5436 if { (eval echo "$as_me:5436: \"$ac_compile\"") >&5
5437 (eval $ac_compile) 2>&5
5439 echo "$as_me:5439: \$? = $ac_status" >&5
5440 (exit "$ac_status"); } &&
5441 { ac_try='test -s "conftest.$ac_objext"'
5442 { (eval echo "$as_me:5442: \"$ac_try\"") >&5
5445 echo "$as_me:5445: \$? = $ac_status" >&5
5446 (exit "$ac_status"); }; }; then
5449 echo "$as_me: failed program was:" >&5
5450 cat "conftest.$ac_ext" >&5
5453 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5454 CPPFLAGS=$cf_save_CPPFLAGS
5459 if test "$cf_have_incdir" = no ; then
5460 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5462 echo "${as_me:-configure}:5462: testing adding $cf_add_incdir to include-path ..." 1>&5
5464 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5466 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5467 test "$cf_top_incdir" = "$cf_add_incdir" && break
5468 cf_add_incdir="$cf_top_incdir"
5481 echo "$as_me:5481: checking for $cf_ncuhdr_root header in include-path" >&5
5482 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5483 if test "${cf_cv_ncurses_h+set}" = set; then
5484 echo $ECHO_N "(cached) $ECHO_C" >&6
5487 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5488 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
5489 for cf_header in $cf_header_list
5492 cat >"conftest.$ac_ext" <<_ACEOF
5493 #line 5493 "configure"
5494 #include "confdefs.h"
5496 #include <$cf_header>
5501 #ifdef NCURSES_VERSION
5503 printf("%s\\n", NCURSES_VERSION);
5516 rm -f "conftest.$ac_objext"
5517 if { (eval echo "$as_me:5517: \"$ac_compile\"") >&5
5518 (eval $ac_compile) 2>&5
5520 echo "$as_me:5520: \$? = $ac_status" >&5
5521 (exit "$ac_status"); } &&
5522 { ac_try='test -s "conftest.$ac_objext"'
5523 { (eval echo "$as_me:5523: \"$ac_try\"") >&5
5526 echo "$as_me:5526: \$? = $ac_status" >&5
5527 (exit "$ac_status"); }; }; then
5528 cf_cv_ncurses_h=$cf_header
5531 echo "$as_me: failed program was:" >&5
5532 cat "conftest.$ac_ext" >&5
5535 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5537 test "$cf_cv_ncurses_h" != no && break
5541 echo "$as_me:5541: result: $cf_cv_ncurses_h" >&5
5542 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5544 if test "$cf_cv_ncurses_h" != no ; then
5545 cf_cv_ncurses_header=$cf_cv_ncurses_h
5548 echo "$as_me:5548: checking for $cf_ncuhdr_root include-path" >&5
5549 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5550 if test "${cf_cv_ncurses_h2+set}" = set; then
5551 echo $ECHO_N "(cached) $ECHO_C" >&6
5554 test -n "$verbose" && echo
5558 # collect the current set of include-directories from compiler flags
5559 cf_header_path_list=""
5560 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5561 for cf_header_path in $CPPFLAGS $CFLAGS
5563 case "$cf_header_path" in
5565 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5567 test "x$cf_header_path" != "xNONE" && \
5568 test -d "$cf_header_path" && \
5570 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5571 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
5572 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5573 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5574 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5575 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"
5578 cf_header_path_list="$cf_header_path_list $cf_search"
5584 # add the variations for the package we are looking for
5588 test "x$prefix" != "xNONE" && \
5589 test -d "$prefix" && \
5591 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5592 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
5593 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5594 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5595 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5596 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5599 for cf_subdir_prefix in \
5608 test "x$cf_subdir_prefix" != "x$prefix" && \
5609 test -d "$cf_subdir_prefix" && \
5610 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
5611 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5612 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
5613 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
5614 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
5615 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
5616 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"
5621 test "$includedir" != NONE && \
5622 test "$includedir" != "/usr/include" && \
5623 test -d "$includedir" && {
5624 test -d "$includedir" && cf_search="$cf_search $includedir"
5625 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5628 test "$oldincludedir" != NONE && \
5629 test "$oldincludedir" != "/usr/include" && \
5630 test -d "$oldincludedir" && {
5631 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
5632 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5635 cf_search="$cf_search $cf_header_path_list"
5637 test -n "$verbose" && echo "search path $cf_search"
5638 cf_save2_CPPFLAGS="$CPPFLAGS"
5639 for cf_incdir in $cf_search
5642 if test -n "$cf_incdir" ; then
5643 for cf_add_incdir in $cf_incdir
5645 while test "$cf_add_incdir" != /usr/include
5647 if test -d "$cf_add_incdir"
5650 if test -n "$CFLAGS$CPPFLAGS" ; then
5651 # a loop is needed to ensure we can add subdirs of existing dirs
5652 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5653 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5654 cf_have_incdir=yes; break
5659 if test "$cf_have_incdir" = no ; then
5660 if test "$cf_add_incdir" = /usr/local/include ; then
5661 if test "$GCC" = yes
5663 cf_save_CPPFLAGS=$CPPFLAGS
5665 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5666 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5668 cat >"conftest.$ac_ext" <<_ACEOF
5669 #line 5669 "configure"
5670 #include "confdefs.h"
5680 rm -f "conftest.$ac_objext"
5681 if { (eval echo "$as_me:5681: \"$ac_compile\"") >&5
5682 (eval $ac_compile) 2>&5
5684 echo "$as_me:5684: \$? = $ac_status" >&5
5685 (exit "$ac_status"); } &&
5686 { ac_try='test -s "conftest.$ac_objext"'
5687 { (eval echo "$as_me:5687: \"$ac_try\"") >&5
5690 echo "$as_me:5690: \$? = $ac_status" >&5
5691 (exit "$ac_status"); }; }; then
5694 echo "$as_me: failed program was:" >&5
5695 cat "conftest.$ac_ext" >&5
5698 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5699 CPPFLAGS=$cf_save_CPPFLAGS
5704 if test "$cf_have_incdir" = no ; then
5705 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5707 echo "${as_me:-configure}:5707: testing adding $cf_add_incdir to include-path ..." 1>&5
5709 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5711 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5712 test "$cf_top_incdir" = "$cf_add_incdir" && break
5713 cf_add_incdir="$cf_top_incdir"
5729 cat >"conftest.$ac_ext" <<_ACEOF
5730 #line 5730 "configure"
5731 #include "confdefs.h"
5733 #include <$cf_header>
5738 #ifdef NCURSES_VERSION
5740 printf("%s\\n", NCURSES_VERSION);
5753 rm -f "conftest.$ac_objext"
5754 if { (eval echo "$as_me:5754: \"$ac_compile\"") >&5
5755 (eval $ac_compile) 2>&5
5757 echo "$as_me:5757: \$? = $ac_status" >&5
5758 (exit "$ac_status"); } &&
5759 { ac_try='test -s "conftest.$ac_objext"'
5760 { (eval echo "$as_me:5760: \"$ac_try\"") >&5
5763 echo "$as_me:5763: \$? = $ac_status" >&5
5764 (exit "$ac_status"); }; }; then
5765 cf_cv_ncurses_h2=$cf_header
5768 echo "$as_me: failed program was:" >&5
5769 cat "conftest.$ac_ext" >&5
5772 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5774 if test "$cf_cv_ncurses_h2" != no ; then
5775 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5776 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
5779 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5781 CPPFLAGS="$cf_save2_CPPFLAGS"
5782 test "$cf_cv_ncurses_h2" != no && break
5784 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5784: error: not found" >&5
5785 echo "$as_me: error: not found" >&2;}
5786 { (exit 1); exit 1; }; }
5789 echo "$as_me:5789: result: $cf_cv_ncurses_h2" >&5
5790 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5792 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
5793 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
5794 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
5795 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
5798 if test -n "$cf_1st_incdir" ; then
5799 for cf_add_incdir in $cf_1st_incdir
5801 while test "$cf_add_incdir" != /usr/include
5803 if test -d "$cf_add_incdir"
5806 if test -n "$CFLAGS$CPPFLAGS" ; then
5807 # a loop is needed to ensure we can add subdirs of existing dirs
5808 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5809 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5810 cf_have_incdir=yes; break
5815 if test "$cf_have_incdir" = no ; then
5816 if test "$cf_add_incdir" = /usr/local/include ; then
5817 if test "$GCC" = yes
5819 cf_save_CPPFLAGS=$CPPFLAGS
5821 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5822 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5824 cat >"conftest.$ac_ext" <<_ACEOF
5825 #line 5825 "configure"
5826 #include "confdefs.h"
5836 rm -f "conftest.$ac_objext"
5837 if { (eval echo "$as_me:5837: \"$ac_compile\"") >&5
5838 (eval $ac_compile) 2>&5
5840 echo "$as_me:5840: \$? = $ac_status" >&5
5841 (exit "$ac_status"); } &&
5842 { ac_try='test -s "conftest.$ac_objext"'
5843 { (eval echo "$as_me:5843: \"$ac_try\"") >&5
5846 echo "$as_me:5846: \$? = $ac_status" >&5
5847 (exit "$ac_status"); }; }; then
5850 echo "$as_me: failed program was:" >&5
5851 cat "conftest.$ac_ext" >&5
5854 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5855 CPPFLAGS=$cf_save_CPPFLAGS
5860 if test "$cf_have_incdir" = no ; then
5861 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5863 echo "${as_me:-configure}:5863: testing adding $cf_add_incdir to include-path ..." 1>&5
5865 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5867 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5868 test "$cf_top_incdir" = "$cf_add_incdir" && break
5869 cf_add_incdir="$cf_top_incdir"
5882 # Set definitions to allow ifdef'ing for ncurses.h
5884 case "$cf_cv_ncurses_header" in
5887 cat >>confdefs.h <<\EOF
5888 #define HAVE_NCURSES_H 1
5894 case "$cf_cv_ncurses_header" in
5895 (ncurses/curses.h|ncurses/ncurses.h)
5897 cat >>confdefs.h <<\EOF
5898 #define HAVE_NCURSES_NCURSES_H 1
5902 (ncursesw/curses.h|ncursesw/ncurses.h)
5904 cat >>confdefs.h <<\EOF
5905 #define HAVE_NCURSESW_NCURSES_H 1
5911 echo "$as_me:5911: checking for terminfo header" >&5
5912 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5913 if test "${cf_cv_term_header+set}" = set; then
5914 echo $ECHO_N "(cached) $ECHO_C" >&6
5917 case "${cf_cv_ncurses_header}" in
5918 (*/ncurses.h|*/ncursesw.h)
5919 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5922 cf_term_header=term.h
5926 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5928 cat >"conftest.$ac_ext" <<_ACEOF
5929 #line 5929 "configure"
5930 #include "confdefs.h"
5932 #include <${cf_cv_ncurses_header:-curses.h}>
5938 int x = auto_left_margin; (void)x
5943 rm -f "conftest.$ac_objext"
5944 if { (eval echo "$as_me:5944: \"$ac_compile\"") >&5
5945 (eval $ac_compile) 2>&5
5947 echo "$as_me:5947: \$? = $ac_status" >&5
5948 (exit "$ac_status"); } &&
5949 { ac_try='test -s "conftest.$ac_objext"'
5950 { (eval echo "$as_me:5950: \"$ac_try\"") >&5
5953 echo "$as_me:5953: \$? = $ac_status" >&5
5954 (exit "$ac_status"); }; }; then
5956 cf_cv_term_header="$cf_test"
5958 echo "$as_me: failed program was:" >&5
5959 cat "conftest.$ac_ext" >&5
5961 cf_cv_term_header=unknown
5964 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5965 test "$cf_cv_term_header" != unknown && break
5969 echo "$as_me:5969: result: $cf_cv_term_header" >&5
5970 echo "${ECHO_T}$cf_cv_term_header" >&6
5972 # Set definitions to allow ifdef'ing to accommodate subdirectories
5974 case "$cf_cv_term_header" in
5977 cat >>confdefs.h <<\EOF
5978 #define HAVE_TERM_H 1
5984 case "$cf_cv_term_header" in
5987 cat >>confdefs.h <<\EOF
5988 #define HAVE_NCURSES_TERM_H 1
5994 cat >>confdefs.h <<\EOF
5995 #define HAVE_NCURSESW_TERM_H 1
6001 # some applications need this, but should check for NCURSES_VERSION
6003 cat >>confdefs.h <<\EOF
6007 echo "$as_me:6007: checking for ncurses version" >&5
6008 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6009 if test "${cf_cv_ncurses_version+set}" = set; then
6010 echo $ECHO_N "(cached) $ECHO_C" >&6
6013 cf_cv_ncurses_version=no
6015 rm -f "$cf_tempfile"
6016 if test "$cross_compiling" = yes; then
6018 # This will not work if the preprocessor splits the line after the
6019 # Autoconf token. The 'unproto' program does that.
6020 cat > "conftest.$ac_ext" <<EOF
6021 #include <${cf_cv_ncurses_header:-curses.h}>
6023 #ifdef NCURSES_VERSION
6024 Autoconf NCURSES_VERSION
6032 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6033 { (eval echo "$as_me:6033: \"$cf_try\"") >&5
6036 echo "$as_me:6036: \$? = $ac_status" >&5
6037 (exit "$ac_status"); }
6038 if test -f conftest.out ; then
6039 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
6040 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6045 cat >"conftest.$ac_ext" <<_ACEOF
6046 #line 6046 "configure"
6047 #include "confdefs.h"
6049 #include <${cf_cv_ncurses_header:-curses.h}>
6053 FILE *fp = fopen("$cf_tempfile", "w");
6054 #ifdef NCURSES_VERSION
6055 # ifdef NCURSES_VERSION_PATCH
6056 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6058 fprintf(fp, "%s\\n", NCURSES_VERSION);
6062 fprintf(fp, "old\\n");
6067 ${cf_cv_main_return:-return}(0);
6070 rm -f "conftest$ac_exeext"
6071 if { (eval echo "$as_me:6071: \"$ac_link\"") >&5
6072 (eval $ac_link) 2>&5
6074 echo "$as_me:6074: \$? = $ac_status" >&5
6075 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6076 { (eval echo "$as_me:6076: \"$ac_try\"") >&5
6079 echo "$as_me:6079: \$? = $ac_status" >&5
6080 (exit "$ac_status"); }; }; then
6082 cf_cv_ncurses_version=`cat $cf_tempfile`
6084 echo "$as_me: program exited with status $ac_status" >&5
6085 echo "$as_me: failed program was:" >&5
6086 cat "conftest.$ac_ext" >&5
6088 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6090 rm -f "$cf_tempfile"
6093 echo "$as_me:6093: result: $cf_cv_ncurses_version" >&5
6094 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6095 test "$cf_cv_ncurses_version" = no ||
6096 cat >>confdefs.h <<\EOF
6100 cf_nculib_root=ncurses
6101 # This works, except for the special case where we find gpm, but
6102 # ncurses is in a nonstandard location via $LIBS, and we really want
6105 cf_ncurses_SAVE="$LIBS"
6106 echo "$as_me:6106: checking for Gpm_Open in -lgpm" >&5
6107 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6108 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6109 echo $ECHO_N "(cached) $ECHO_C" >&6
6111 ac_check_lib_save_LIBS=$LIBS
6113 cat >"conftest.$ac_ext" <<_ACEOF
6114 #line 6114 "configure"
6115 #include "confdefs.h"
6117 /* Override any gcc2 internal prototype to avoid an error. */
6121 /* We use char because int might match the return type of a gcc2
6122 builtin and then its argument prototype would still apply. */
6132 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6133 if { (eval echo "$as_me:6133: \"$ac_link\"") >&5
6134 (eval $ac_link) 2>&5
6136 echo "$as_me:6136: \$? = $ac_status" >&5
6137 (exit "$ac_status"); } &&
6138 { ac_try='test -s "conftest$ac_exeext"'
6139 { (eval echo "$as_me:6139: \"$ac_try\"") >&5
6142 echo "$as_me:6142: \$? = $ac_status" >&5
6143 (exit "$ac_status"); }; }; then
6144 ac_cv_lib_gpm_Gpm_Open=yes
6146 echo "$as_me: failed program was:" >&5
6147 cat "conftest.$ac_ext" >&5
6148 ac_cv_lib_gpm_Gpm_Open=no
6150 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6151 LIBS=$ac_check_lib_save_LIBS
6153 echo "$as_me:6153: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6154 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6155 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
6156 echo "$as_me:6156: checking for initscr in -lgpm" >&5
6157 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6158 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6159 echo $ECHO_N "(cached) $ECHO_C" >&6
6161 ac_check_lib_save_LIBS=$LIBS
6163 cat >"conftest.$ac_ext" <<_ACEOF
6164 #line 6164 "configure"
6165 #include "confdefs.h"
6167 /* Override any gcc2 internal prototype to avoid an error. */
6171 /* We use char because int might match the return type of a gcc2
6172 builtin and then its argument prototype would still apply. */
6182 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6183 if { (eval echo "$as_me:6183: \"$ac_link\"") >&5
6184 (eval $ac_link) 2>&5
6186 echo "$as_me:6186: \$? = $ac_status" >&5
6187 (exit "$ac_status"); } &&
6188 { ac_try='test -s "conftest$ac_exeext"'
6189 { (eval echo "$as_me:6189: \"$ac_try\"") >&5
6192 echo "$as_me:6192: \$? = $ac_status" >&5
6193 (exit "$ac_status"); }; }; then
6194 ac_cv_lib_gpm_initscr=yes
6196 echo "$as_me: failed program was:" >&5
6197 cat "conftest.$ac_ext" >&5
6198 ac_cv_lib_gpm_initscr=no
6200 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6201 LIBS=$ac_check_lib_save_LIBS
6203 echo "$as_me:6203: result: $ac_cv_lib_gpm_initscr" >&5
6204 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6205 if test "$ac_cv_lib_gpm_initscr" = yes; then
6206 LIBS="$cf_ncurses_SAVE"
6208 cf_ncurses_LIBS="-lgpm"
6215 # This is only necessary if you are linking against an obsolete
6216 # version of ncurses (but it should do no harm, since it is static).
6217 if test "$cf_nculib_root" = ncurses ; then
6218 echo "$as_me:6218: checking for tgoto in -lmytinfo" >&5
6219 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6220 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6221 echo $ECHO_N "(cached) $ECHO_C" >&6
6223 ac_check_lib_save_LIBS=$LIBS
6224 LIBS="-lmytinfo $LIBS"
6225 cat >"conftest.$ac_ext" <<_ACEOF
6226 #line 6226 "configure"
6227 #include "confdefs.h"
6229 /* Override any gcc2 internal prototype to avoid an error. */
6233 /* We use char because int might match the return type of a gcc2
6234 builtin and then its argument prototype would still apply. */
6244 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6245 if { (eval echo "$as_me:6245: \"$ac_link\"") >&5
6246 (eval $ac_link) 2>&5
6248 echo "$as_me:6248: \$? = $ac_status" >&5
6249 (exit "$ac_status"); } &&
6250 { ac_try='test -s "conftest$ac_exeext"'
6251 { (eval echo "$as_me:6251: \"$ac_try\"") >&5
6254 echo "$as_me:6254: \$? = $ac_status" >&5
6255 (exit "$ac_status"); }; }; then
6256 ac_cv_lib_mytinfo_tgoto=yes
6258 echo "$as_me: failed program was:" >&5
6259 cat "conftest.$ac_ext" >&5
6260 ac_cv_lib_mytinfo_tgoto=no
6262 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6263 LIBS=$ac_check_lib_save_LIBS
6265 echo "$as_me:6265: result: $ac_cv_lib_mytinfo_tgoto" >&5
6266 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6267 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6268 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6278 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6280 for cf_add_1lib in $cf_add_0lib; do
6281 for cf_add_2lib in $cf_add_libs; do
6282 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6287 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6291 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6297 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6299 for cf_add_1lib in $cf_add_0lib; do
6300 for cf_add_2lib in $cf_add_libs; do
6301 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6306 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6312 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
6314 echo "$as_me:6314: checking for initscr" >&5
6315 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6316 if test "${ac_cv_func_initscr+set}" = set; then
6317 echo $ECHO_N "(cached) $ECHO_C" >&6
6319 cat >"conftest.$ac_ext" <<_ACEOF
6320 #line 6320 "configure"
6321 #include "confdefs.h"
6322 #define initscr autoconf_temporary
6323 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6330 /* We use char because int might match the return type of a gcc2
6331 builtin and then its argument prototype would still apply. */
6332 char initscr (void);
6338 /* The GNU C library defines stubs for functions which it implements
6339 to always fail with ENOSYS. Some functions are actually named
6340 something starting with __ and the normal name is an alias. */
6341 #if defined (__stub_initscr) || defined (__stub___initscr)
6342 #error found stub for initscr
6350 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6351 if { (eval echo "$as_me:6351: \"$ac_link\"") >&5
6352 (eval $ac_link) 2>&5
6354 echo "$as_me:6354: \$? = $ac_status" >&5
6355 (exit "$ac_status"); } &&
6356 { ac_try='test -s "conftest$ac_exeext"'
6357 { (eval echo "$as_me:6357: \"$ac_try\"") >&5
6360 echo "$as_me:6360: \$? = $ac_status" >&5
6361 (exit "$ac_status"); }; }; then
6362 ac_cv_func_initscr=yes
6364 echo "$as_me: failed program was:" >&5
6365 cat "conftest.$ac_ext" >&5
6366 ac_cv_func_initscr=no
6368 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6370 echo "$as_me:6370: result: $ac_cv_func_initscr" >&5
6371 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6372 if test "$ac_cv_func_initscr" = yes; then
6373 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6376 cf_save_LIBS="$LIBS"
6377 echo "$as_me:6377: checking for initscr in -l$cf_nculib_root" >&5
6378 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6379 LIBS="-l$cf_nculib_root $LIBS"
6380 cat >"conftest.$ac_ext" <<_ACEOF
6381 #line 6381 "configure"
6382 #include "confdefs.h"
6383 #include <${cf_cv_ncurses_header:-curses.h}>
6392 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6393 if { (eval echo "$as_me:6393: \"$ac_link\"") >&5
6394 (eval $ac_link) 2>&5
6396 echo "$as_me:6396: \$? = $ac_status" >&5
6397 (exit "$ac_status"); } &&
6398 { ac_try='test -s "conftest$ac_exeext"'
6399 { (eval echo "$as_me:6399: \"$ac_try\"") >&5
6402 echo "$as_me:6402: \$? = $ac_status" >&5
6403 (exit "$ac_status"); }; }; then
6404 echo "$as_me:6404: result: yes" >&5
6405 echo "${ECHO_T}yes" >&6
6406 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6409 echo "$as_me: failed program was:" >&5
6410 cat "conftest.$ac_ext" >&5
6411 echo "$as_me:6411: result: no" >&5
6412 echo "${ECHO_T}no" >&6
6415 cf_library_path_list=""
6416 if test -n "${LDFLAGS}${LIBS}" ; then
6417 for cf_library_path in $LDFLAGS $LIBS
6419 case "$cf_library_path" in
6421 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6423 test "x$cf_library_path" != "xNONE" && \
6424 test -d "$cf_library_path" && \
6426 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6427 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6428 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6429 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6430 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6431 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"
6434 cf_library_path_list="$cf_library_path_list $cf_search"
6442 test "x$prefix" != "xNONE" && \
6443 test -d "$prefix" && \
6445 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6446 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6447 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6448 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6449 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6450 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6453 for cf_subdir_prefix in \
6462 test "x$cf_subdir_prefix" != "x$prefix" && \
6463 test -d "$cf_subdir_prefix" && \
6464 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6465 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6466 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6467 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
6468 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
6469 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
6470 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"
6475 cf_search="$cf_library_path_list $cf_search"
6477 for cf_libdir in $cf_search
6479 echo "$as_me:6479: checking for -l$cf_nculib_root in $cf_libdir" >&5
6480 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6481 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6482 cat >"conftest.$ac_ext" <<_ACEOF
6483 #line 6483 "configure"
6484 #include "confdefs.h"
6485 #include <${cf_cv_ncurses_header:-curses.h}>
6494 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6495 if { (eval echo "$as_me:6495: \"$ac_link\"") >&5
6496 (eval $ac_link) 2>&5
6498 echo "$as_me:6498: \$? = $ac_status" >&5
6499 (exit "$ac_status"); } &&
6500 { ac_try='test -s "conftest$ac_exeext"'
6501 { (eval echo "$as_me:6501: \"$ac_try\"") >&5
6504 echo "$as_me:6504: \$? = $ac_status" >&5
6505 (exit "$ac_status"); }; }; then
6506 echo "$as_me:6506: result: yes" >&5
6507 echo "${ECHO_T}yes" >&6
6508 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6511 echo "$as_me: failed program was:" >&5
6512 cat "conftest.$ac_ext" >&5
6513 echo "$as_me:6513: result: no" >&5
6514 echo "${ECHO_T}no" >&6
6515 LIBS="$cf_save_LIBS"
6517 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6521 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6525 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
6527 if test "$cf_found_library" = no ; then
6528 { { echo "$as_me:6528: error: Cannot link $cf_nculib_root library" >&5
6529 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6530 { (exit 1); exit 1; }; }
6535 if test -n "$cf_ncurses_LIBS" ; then
6536 echo "$as_me:6536: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6537 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6538 cf_ncurses_SAVE="$LIBS"
6539 for p in $cf_ncurses_LIBS ; do
6540 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
6541 if test "$q" != "$LIBS" ; then
6545 cat >"conftest.$ac_ext" <<_ACEOF
6546 #line 6546 "configure"
6547 #include "confdefs.h"
6548 #include <${cf_cv_ncurses_header:-curses.h}>
6552 initscr(); mousemask(0,0); tigetstr((char *)0);
6557 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6558 if { (eval echo "$as_me:6558: \"$ac_link\"") >&5
6559 (eval $ac_link) 2>&5
6561 echo "$as_me:6561: \$? = $ac_status" >&5
6562 (exit "$ac_status"); } &&
6563 { ac_try='test -s "conftest$ac_exeext"'
6564 { (eval echo "$as_me:6564: \"$ac_try\"") >&5
6567 echo "$as_me:6567: \$? = $ac_status" >&5
6568 (exit "$ac_status"); }; }; then
6569 echo "$as_me:6569: result: yes" >&5
6570 echo "${ECHO_T}yes" >&6
6572 echo "$as_me: failed program was:" >&5
6573 cat "conftest.$ac_ext" >&5
6574 echo "$as_me:6574: result: no" >&5
6575 echo "${ECHO_T}no" >&6
6576 LIBS="$cf_ncurses_SAVE"
6578 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6581 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6583 cat >>confdefs.h <<EOF
6584 #define $cf_nculib_ROOT 1
6592 echo "$as_me:6592: checking if you want wide-character code" >&5
6593 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6595 # Check whether --enable-widec or --disable-widec was given.
6596 if test "${enable_widec+set}" = set; then
6597 enableval="$enable_widec"
6598 with_widec=$enableval
6602 echo "$as_me:6602: result: $with_widec" >&5
6603 echo "${ECHO_T}$with_widec" >&6
6604 if test "$with_widec" = yes ; then
6606 for ac_header in wchar.h
6608 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6609 echo "$as_me:6609: checking for $ac_header" >&5
6610 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6611 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6612 echo $ECHO_N "(cached) $ECHO_C" >&6
6614 cat >"conftest.$ac_ext" <<_ACEOF
6615 #line 6615 "configure"
6616 #include "confdefs.h"
6617 #include <$ac_header>
6619 if { (eval echo "$as_me:6619: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6620 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6622 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6624 cat conftest.err >&5
6625 echo "$as_me:6625: \$? = $ac_status" >&5
6626 (exit "$ac_status"); } >/dev/null; then
6627 if test -s conftest.err; then
6628 ac_cpp_err=$ac_c_preproc_warn_flag
6635 if test -z "$ac_cpp_err"; then
6636 eval "$as_ac_Header=yes"
6638 echo "$as_me: failed program was:" >&5
6639 cat "conftest.$ac_ext" >&5
6640 eval "$as_ac_Header=no"
6642 rm -f conftest.err "conftest.$ac_ext"
6644 echo "$as_me:6644: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6645 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6646 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6647 cat >>confdefs.h <<EOF
6648 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6654 echo "$as_me:6654: checking for multibyte character support" >&5
6655 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6656 if test "${cf_cv_utf8_lib+set}" = set; then
6657 echo $ECHO_N "(cached) $ECHO_C" >&6
6660 cf_save_LIBS="$LIBS"
6661 cat >"conftest.$ac_ext" <<_ACEOF
6662 #line 6662 "configure"
6663 #include "confdefs.h"
6679 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6680 if { (eval echo "$as_me:6680: \"$ac_link\"") >&5
6681 (eval $ac_link) 2>&5
6683 echo "$as_me:6683: \$? = $ac_status" >&5
6684 (exit "$ac_status"); } &&
6685 { ac_try='test -s "conftest$ac_exeext"'
6686 { (eval echo "$as_me:6686: \"$ac_try\"") >&5
6689 echo "$as_me:6689: \$? = $ac_status" >&5
6690 (exit "$ac_status"); }; }; then
6693 echo "$as_me: failed program was:" >&5
6694 cat "conftest.$ac_ext" >&5
6696 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6697 # will be set on completion of the AC_TRY_LINK below.
6698 cf_cv_header_path_utf8=
6699 cf_cv_library_path_utf8=
6701 echo "${as_me:-configure}:6701: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6703 cf_save_LIBS="$LIBS"
6705 cat >"conftest.$ac_ext" <<_ACEOF
6706 #line 6706 "configure"
6707 #include "confdefs.h"
6709 #include <libutf8.h>
6718 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6719 if { (eval echo "$as_me:6719: \"$ac_link\"") >&5
6720 (eval $ac_link) 2>&5
6722 echo "$as_me:6722: \$? = $ac_status" >&5
6723 (exit "$ac_status"); } &&
6724 { ac_try='test -s "conftest$ac_exeext"'
6725 { (eval echo "$as_me:6725: \"$ac_try\"") >&5
6728 echo "$as_me:6728: \$? = $ac_status" >&5
6729 (exit "$ac_status"); }; }; then
6731 cf_cv_find_linkage_utf8=yes
6732 cf_cv_header_path_utf8=/usr/include
6733 cf_cv_library_path_utf8=/usr/lib
6736 echo "$as_me: failed program was:" >&5
6737 cat "conftest.$ac_ext" >&5
6739 LIBS="-lutf8 $cf_save_LIBS"
6741 cat >"conftest.$ac_ext" <<_ACEOF
6742 #line 6742 "configure"
6743 #include "confdefs.h"
6745 #include <libutf8.h>
6754 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6755 if { (eval echo "$as_me:6755: \"$ac_link\"") >&5
6756 (eval $ac_link) 2>&5
6758 echo "$as_me:6758: \$? = $ac_status" >&5
6759 (exit "$ac_status"); } &&
6760 { ac_try='test -s "conftest$ac_exeext"'
6761 { (eval echo "$as_me:6761: \"$ac_try\"") >&5
6764 echo "$as_me:6764: \$? = $ac_status" >&5
6765 (exit "$ac_status"); }; }; then
6767 cf_cv_find_linkage_utf8=yes
6768 cf_cv_header_path_utf8=/usr/include
6769 cf_cv_library_path_utf8=/usr/lib
6770 cf_cv_library_file_utf8="-lutf8"
6773 echo "$as_me: failed program was:" >&5
6774 cat "conftest.$ac_ext" >&5
6776 cf_cv_find_linkage_utf8=no
6777 LIBS="$cf_save_LIBS"
6779 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6781 echo "${as_me:-configure}:6781: testing find linkage for utf8 library ..." 1>&5
6783 echo "${as_me:-configure}:6783: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6785 cf_save_CPPFLAGS="$CPPFLAGS"
6786 cf_test_CPPFLAGS="$CPPFLAGS"
6790 # collect the current set of include-directories from compiler flags
6791 cf_header_path_list=""
6792 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6793 for cf_header_path in $CPPFLAGS $CFLAGS
6795 case "$cf_header_path" in
6797 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6799 test "x$cf_header_path" != "xNONE" && \
6800 test -d "$cf_header_path" && \
6802 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6803 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
6804 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
6805 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
6806 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
6807 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6810 cf_header_path_list="$cf_header_path_list $cf_search"
6816 # add the variations for the package we are looking for
6820 test "x$prefix" != "xNONE" && \
6821 test -d "$prefix" && \
6823 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6824 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
6825 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
6826 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
6827 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
6828 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
6831 for cf_subdir_prefix in \
6840 test "x$cf_subdir_prefix" != "x$prefix" && \
6841 test -d "$cf_subdir_prefix" && \
6842 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6843 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6844 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
6845 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6846 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6847 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6848 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6853 test "$includedir" != NONE && \
6854 test "$includedir" != "/usr/include" && \
6855 test -d "$includedir" && {
6856 test -d "$includedir" && cf_search="$cf_search $includedir"
6857 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
6860 test "$oldincludedir" != NONE && \
6861 test "$oldincludedir" != "/usr/include" && \
6862 test -d "$oldincludedir" && {
6863 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
6864 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
6867 cf_search="$cf_search $cf_header_path_list"
6869 for cf_cv_header_path_utf8 in $cf_search
6871 if test -d "$cf_cv_header_path_utf8" ; then
6872 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6874 echo "${as_me:-configure}:6874: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6876 CPPFLAGS="$cf_save_CPPFLAGS"
6878 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6879 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
6881 cat >"conftest.$ac_ext" <<_ACEOF
6882 #line 6882 "configure"
6883 #include "confdefs.h"
6885 #include <libutf8.h>
6894 rm -f "conftest.$ac_objext"
6895 if { (eval echo "$as_me:6895: \"$ac_compile\"") >&5
6896 (eval $ac_compile) 2>&5
6898 echo "$as_me:6898: \$? = $ac_status" >&5
6899 (exit "$ac_status"); } &&
6900 { ac_try='test -s "conftest.$ac_objext"'
6901 { (eval echo "$as_me:6901: \"$ac_try\"") >&5
6904 echo "$as_me:6904: \$? = $ac_status" >&5
6905 (exit "$ac_status"); }; }; then
6907 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6909 echo "${as_me:-configure}:6909: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6911 cf_cv_find_linkage_utf8=maybe
6912 cf_test_CPPFLAGS="$CPPFLAGS"
6915 echo "$as_me: failed program was:" >&5
6916 cat "conftest.$ac_ext" >&5
6918 CPPFLAGS="$cf_save_CPPFLAGS"
6921 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6925 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6927 echo "${as_me:-configure}:6927: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6929 cf_save_LIBS="$LIBS"
6930 cf_save_LDFLAGS="$LDFLAGS"
6932 if test "$cf_cv_find_linkage_utf8" != yes ; then
6935 cf_library_path_list=""
6936 if test -n "${LDFLAGS}${LIBS}" ; then
6937 for cf_library_path in $LDFLAGS $LIBS
6939 case "$cf_library_path" in
6941 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6943 test "x$cf_library_path" != "xNONE" && \
6944 test -d "$cf_library_path" && \
6946 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6947 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6948 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
6949 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6950 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
6951 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6954 cf_library_path_list="$cf_library_path_list $cf_search"
6962 test "x$prefix" != "xNONE" && \
6963 test -d "$prefix" && \
6965 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6966 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6967 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
6968 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
6969 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
6970 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
6973 for cf_subdir_prefix in \
6982 test "x$cf_subdir_prefix" != "x$prefix" && \
6983 test -d "$cf_subdir_prefix" && \
6984 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6985 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6986 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6987 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6988 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6989 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6990 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6995 cf_search="$cf_library_path_list $cf_search"
6997 for cf_cv_library_path_utf8 in $cf_search
6999 if test -d "$cf_cv_library_path_utf8" ; then
7000 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7002 echo "${as_me:-configure}:7002: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7004 CPPFLAGS="$cf_test_CPPFLAGS"
7005 LIBS="-lutf8 $cf_save_LIBS"
7006 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7007 cat >"conftest.$ac_ext" <<_ACEOF
7008 #line 7008 "configure"
7009 #include "confdefs.h"
7011 #include <libutf8.h>
7020 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7021 if { (eval echo "$as_me:7021: \"$ac_link\"") >&5
7022 (eval $ac_link) 2>&5
7024 echo "$as_me:7024: \$? = $ac_status" >&5
7025 (exit "$ac_status"); } &&
7026 { ac_try='test -s "conftest$ac_exeext"'
7027 { (eval echo "$as_me:7027: \"$ac_try\"") >&5
7030 echo "$as_me:7030: \$? = $ac_status" >&5
7031 (exit "$ac_status"); }; }; then
7033 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7035 echo "${as_me:-configure}:7035: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7037 cf_cv_find_linkage_utf8=yes
7038 cf_cv_library_file_utf8="-lutf8"
7041 echo "$as_me: failed program was:" >&5
7042 cat "conftest.$ac_ext" >&5
7044 CPPFLAGS="$cf_save_CPPFLAGS"
7045 LIBS="$cf_save_LIBS"
7046 LDFLAGS="$cf_save_LDFLAGS"
7049 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7052 CPPFLAGS="$cf_save_CPPFLAGS"
7053 LDFLAGS="$cf_save_LDFLAGS"
7057 cf_cv_find_linkage_utf8=no
7061 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7064 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7066 LIBS="$cf_save_LIBS"
7068 if test "$cf_cv_find_linkage_utf8" = yes ; then
7069 cf_cv_utf8_lib=add-on
7075 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7077 echo "$as_me:7077: result: $cf_cv_utf8_lib" >&5
7078 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7080 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7082 if test "$cf_cv_utf8_lib" = "add-on" ; then
7084 cat >>confdefs.h <<\EOF
7085 #define HAVE_LIBUTF8_H 1
7088 if test -n "$cf_cv_header_path_utf8" ; then
7089 for cf_add_incdir in $cf_cv_header_path_utf8
7091 while test "$cf_add_incdir" != /usr/include
7093 if test -d "$cf_add_incdir"
7096 if test -n "$CFLAGS$CPPFLAGS" ; then
7097 # a loop is needed to ensure we can add subdirs of existing dirs
7098 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7099 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7100 cf_have_incdir=yes; break
7105 if test "$cf_have_incdir" = no ; then
7106 if test "$cf_add_incdir" = /usr/local/include ; then
7107 if test "$GCC" = yes
7109 cf_save_CPPFLAGS=$CPPFLAGS
7111 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7112 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7114 cat >"conftest.$ac_ext" <<_ACEOF
7115 #line 7115 "configure"
7116 #include "confdefs.h"
7126 rm -f "conftest.$ac_objext"
7127 if { (eval echo "$as_me:7127: \"$ac_compile\"") >&5
7128 (eval $ac_compile) 2>&5
7130 echo "$as_me:7130: \$? = $ac_status" >&5
7131 (exit "$ac_status"); } &&
7132 { ac_try='test -s "conftest.$ac_objext"'
7133 { (eval echo "$as_me:7133: \"$ac_try\"") >&5
7136 echo "$as_me:7136: \$? = $ac_status" >&5
7137 (exit "$ac_status"); }; }; then
7140 echo "$as_me: failed program was:" >&5
7141 cat "conftest.$ac_ext" >&5
7144 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7145 CPPFLAGS=$cf_save_CPPFLAGS
7150 if test "$cf_have_incdir" = no ; then
7151 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7153 echo "${as_me:-configure}:7153: testing adding $cf_add_incdir to include-path ..." 1>&5
7155 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7157 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7158 test "$cf_top_incdir" = "$cf_add_incdir" && break
7159 cf_add_incdir="$cf_top_incdir"
7170 if test -n "$cf_cv_library_path_utf8" ; then
7171 for cf_add_libdir in $cf_cv_library_path_utf8
7173 if test "$cf_add_libdir" = /usr/lib ; then
7175 elif test -d "$cf_add_libdir"
7178 if test -n "$LDFLAGS$LIBS" ; then
7179 # a loop is needed to ensure we can add subdirs of existing dirs
7180 for cf_test_libdir in $LDFLAGS $LIBS ; do
7181 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7182 cf_have_libdir=yes; break
7186 if test "$cf_have_libdir" = no ; then
7187 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7189 echo "${as_me:-configure}:7189: testing adding $cf_add_libdir to library-path ..." 1>&5
7191 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7200 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7202 for cf_add_1lib in $cf_add_0lib; do
7203 for cf_add_2lib in $cf_add_libs; do
7204 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7209 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7215 cf_ncuconfig_root=ncursesw
7216 cf_have_ncuconfig=no
7218 if test "x${PKG_CONFIG:=none}" != xnone; then
7219 echo "$as_me:7219: checking pkg-config for $cf_ncuconfig_root" >&5
7220 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7221 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7222 echo "$as_me:7222: result: yes" >&5
7223 echo "${ECHO_T}yes" >&6
7225 echo "$as_me:7225: checking if the $cf_ncuconfig_root package files work" >&5
7226 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7227 cf_have_ncuconfig=unknown
7229 cf_save_CFLAGS="$CFLAGS"
7230 cf_save_CPPFLAGS="$CPPFLAGS"
7231 cf_save_LIBS="$LIBS"
7233 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7234 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7236 # while -W for passing linker flags is prevalent, it is not "standard".
7237 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7238 # incompatible _and_ non-standard -W option which gives an error. Work
7239 # around that pitfall.
7240 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7246 cf_new_extra_cppflags=
7248 for cf_add_cflags in $cf_pkg_cflags
7250 case "$cf_fix_cppflags" in
7252 case "$cf_add_cflags" in
7253 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7254 case "$cf_add_cflags" in
7256 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7258 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7259 && test -z "${cf_tst_cflags}" \
7260 && cf_fix_cppflags=yes
7262 if test "$cf_fix_cppflags" = yes ; then
7264 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7265 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7268 elif test "${cf_tst_cflags}" = "\"'" ; then
7270 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7271 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7281 case "$cf_add_cflags" in
7283 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7285 CPPFLAGS=`echo "$CPPFLAGS" | \
7286 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7287 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7292 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7293 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7300 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7301 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7308 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7309 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7311 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7313 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7314 && test -z "${cf_tst_cflags}" \
7315 && cf_fix_cppflags=no
7320 if test -n "$cf_new_cflags" ; then
7322 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7323 CFLAGS="${CFLAGS}$cf_new_cflags"
7327 if test -n "$cf_new_cppflags" ; then
7329 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7330 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7334 if test -n "$cf_new_extra_cppflags" ; then
7336 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7337 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7344 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7346 for cf_add_1lib in $cf_add_0lib; do
7347 for cf_add_2lib in $cf_add_libs; do
7348 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7353 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7357 cat >"conftest.$ac_ext" <<_ACEOF
7358 #line 7358 "configure"
7359 #include "confdefs.h"
7360 #include <${cf_cv_ncurses_header:-curses.h}>
7364 initscr(); mousemask(0,0); tigetstr((char *)0);
7369 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7370 if { (eval echo "$as_me:7370: \"$ac_link\"") >&5
7371 (eval $ac_link) 2>&5
7373 echo "$as_me:7373: \$? = $ac_status" >&5
7374 (exit "$ac_status"); } &&
7375 { ac_try='test -s "conftest$ac_exeext"'
7376 { (eval echo "$as_me:7376: \"$ac_try\"") >&5
7379 echo "$as_me:7379: \$? = $ac_status" >&5
7380 (exit "$ac_status"); }; }; then
7381 if test "$cross_compiling" = yes; then
7382 cf_test_ncuconfig=maybe
7384 cat >"conftest.$ac_ext" <<_ACEOF
7385 #line 7385 "configure"
7386 #include "confdefs.h"
7387 #include <${cf_cv_ncurses_header:-curses.h}>
7389 { const char *xx = curses_version(); return (xx == 0); }
7391 rm -f "conftest$ac_exeext"
7392 if { (eval echo "$as_me:7392: \"$ac_link\"") >&5
7393 (eval $ac_link) 2>&5
7395 echo "$as_me:7395: \$? = $ac_status" >&5
7396 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7397 { (eval echo "$as_me:7397: \"$ac_try\"") >&5
7400 echo "$as_me:7400: \$? = $ac_status" >&5
7401 (exit "$ac_status"); }; }; then
7402 cf_test_ncuconfig=yes
7404 echo "$as_me: program exited with status $ac_status" >&5
7405 echo "$as_me: failed program was:" >&5
7406 cat "conftest.$ac_ext" >&5
7407 cf_test_ncuconfig=no
7409 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7412 echo "$as_me: failed program was:" >&5
7413 cat "conftest.$ac_ext" >&5
7414 cf_test_ncuconfig=no
7416 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7418 CFLAGS="$cf_save_CFLAGS"
7419 CPPFLAGS="$cf_save_CPPFLAGS"
7420 LIBS="$cf_save_LIBS"
7422 if test "x$cf_test_ncuconfig" != xyes; then
7423 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7424 cf_pkg_cflags="$cf_temp"
7425 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7426 cf_pkg_libs="$cf_temp"
7431 for cf_add_cflags in $cf_pkg_cflags
7433 case "x$cf_add_cflags" in
7436 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7439 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
7440 test "$CFLAGS" != "$cf_old_cflag" || break
7442 CFLAGS="$cf_old_cflag"
7445 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7448 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
7449 test "$CPPFLAGS" != "$cf_old_cflag" || break
7451 CPPFLAGS="$cf_old_cflag"
7460 cf_new_extra_cppflags=
7462 for cf_add_cflags in $cf_add_cflags
7464 case "$cf_fix_cppflags" in
7466 case "$cf_add_cflags" in
7467 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7468 case "$cf_add_cflags" in
7470 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7472 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7473 && test -z "${cf_tst_cflags}" \
7474 && cf_fix_cppflags=yes
7476 if test "$cf_fix_cppflags" = yes ; then
7478 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7479 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7482 elif test "${cf_tst_cflags}" = "\"'" ; then
7484 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7485 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7495 case "$cf_add_cflags" in
7497 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7499 CPPFLAGS=`echo "$CPPFLAGS" | \
7500 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7501 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7506 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7507 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7514 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7515 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7522 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7523 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7525 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7527 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7528 && test -z "${cf_tst_cflags}" \
7529 && cf_fix_cppflags=no
7534 if test -n "$cf_new_cflags" ; then
7536 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7537 CFLAGS="${CFLAGS}$cf_new_cflags"
7541 if test -n "$cf_new_cppflags" ; then
7543 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7544 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7548 if test -n "$cf_new_extra_cppflags" ; then
7550 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7551 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7560 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7562 for cf_add_1lib in $cf_add_0lib; do
7563 for cf_add_2lib in $cf_add_libs; do
7564 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7569 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7573 cat >"conftest.$ac_ext" <<_ACEOF
7574 #line 7574 "configure"
7575 #include "confdefs.h"
7576 #include <${cf_cv_ncurses_header:-curses.h}>
7580 initscr(); mousemask(0,0); tigetstr((char *)0);
7585 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7586 if { (eval echo "$as_me:7586: \"$ac_link\"") >&5
7587 (eval $ac_link) 2>&5
7589 echo "$as_me:7589: \$? = $ac_status" >&5
7590 (exit "$ac_status"); } &&
7591 { ac_try='test -s "conftest$ac_exeext"'
7592 { (eval echo "$as_me:7592: \"$ac_try\"") >&5
7595 echo "$as_me:7595: \$? = $ac_status" >&5
7596 (exit "$ac_status"); }; }; then
7597 if test "$cross_compiling" = yes; then
7598 cf_have_ncuconfig=maybe
7600 cat >"conftest.$ac_ext" <<_ACEOF
7601 #line 7601 "configure"
7602 #include "confdefs.h"
7603 #include <${cf_cv_ncurses_header:-curses.h}>
7605 { const char *xx = curses_version(); return (xx == 0); }
7607 rm -f "conftest$ac_exeext"
7608 if { (eval echo "$as_me:7608: \"$ac_link\"") >&5
7609 (eval $ac_link) 2>&5
7611 echo "$as_me:7611: \$? = $ac_status" >&5
7612 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7613 { (eval echo "$as_me:7613: \"$ac_try\"") >&5
7616 echo "$as_me:7616: \$? = $ac_status" >&5
7617 (exit "$ac_status"); }; }; then
7618 cf_have_ncuconfig=yes
7620 echo "$as_me: program exited with status $ac_status" >&5
7621 echo "$as_me: failed program was:" >&5
7622 cat "conftest.$ac_ext" >&5
7623 cf_have_ncuconfig=no
7625 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7628 echo "$as_me: failed program was:" >&5
7629 cat "conftest.$ac_ext" >&5
7630 cf_have_ncuconfig=no
7632 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7633 echo "$as_me:7633: result: $cf_have_ncuconfig" >&5
7634 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7635 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7636 if test "$cf_have_ncuconfig" != "yes"
7638 CPPFLAGS="$cf_save_CPPFLAGS"
7639 LIBS="$cf_save_LIBS"
7640 NCURSES_CONFIG_PKG=none
7643 cat >>confdefs.h <<\EOF
7647 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7649 echo "$as_me:7649: checking for terminfo header" >&5
7650 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7651 if test "${cf_cv_term_header+set}" = set; then
7652 echo $ECHO_N "(cached) $ECHO_C" >&6
7655 case "${cf_cv_ncurses_header}" in
7656 (*/ncurses.h|*/ncursesw.h)
7657 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7660 cf_term_header=term.h
7664 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7666 cat >"conftest.$ac_ext" <<_ACEOF
7667 #line 7667 "configure"
7668 #include "confdefs.h"
7670 #include <${cf_cv_ncurses_header:-curses.h}>
7676 int x = auto_left_margin; (void)x
7681 rm -f "conftest.$ac_objext"
7682 if { (eval echo "$as_me:7682: \"$ac_compile\"") >&5
7683 (eval $ac_compile) 2>&5
7685 echo "$as_me:7685: \$? = $ac_status" >&5
7686 (exit "$ac_status"); } &&
7687 { ac_try='test -s "conftest.$ac_objext"'
7688 { (eval echo "$as_me:7688: \"$ac_try\"") >&5
7691 echo "$as_me:7691: \$? = $ac_status" >&5
7692 (exit "$ac_status"); }; }; then
7694 cf_cv_term_header="$cf_test"
7696 echo "$as_me: failed program was:" >&5
7697 cat "conftest.$ac_ext" >&5
7699 cf_cv_term_header=unknown
7702 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7703 test "$cf_cv_term_header" != unknown && break
7707 echo "$as_me:7707: result: $cf_cv_term_header" >&5
7708 echo "${ECHO_T}$cf_cv_term_header" >&6
7710 # Set definitions to allow ifdef'ing to accommodate subdirectories
7712 case "$cf_cv_term_header" in
7715 cat >>confdefs.h <<\EOF
7716 #define HAVE_TERM_H 1
7722 case "$cf_cv_term_header" in
7725 cat >>confdefs.h <<\EOF
7726 #define HAVE_NCURSES_TERM_H 1
7732 cat >>confdefs.h <<\EOF
7733 #define HAVE_NCURSESW_TERM_H 1
7742 echo "$as_me:7742: result: no" >&5
7743 echo "${ECHO_T}no" >&6
7744 NCURSES_CONFIG_PKG=none
7747 NCURSES_CONFIG_PKG=none
7750 if test "x$cf_have_ncuconfig" = "xno"; then
7751 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7753 if test -n "$ac_tool_prefix"; then
7754 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7756 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7757 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7758 echo "$as_me:7758: checking for $ac_word" >&5
7759 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7760 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7761 echo $ECHO_N "(cached) $ECHO_C" >&6
7763 if test -n "$NCURSES_CONFIG"; then
7764 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7766 ac_save_IFS=$IFS; IFS=$ac_path_separator
7768 for ac_dir in $ac_dummy; do
7770 test -z "$ac_dir" && ac_dir=.
7771 $as_executable_p "$ac_dir/$ac_word" || continue
7772 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7773 echo "$as_me:7773: found $ac_dir/$ac_word" >&5
7779 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7780 if test -n "$NCURSES_CONFIG"; then
7781 echo "$as_me:7781: result: $NCURSES_CONFIG" >&5
7782 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7784 echo "$as_me:7784: result: no" >&5
7785 echo "${ECHO_T}no" >&6
7788 test -n "$NCURSES_CONFIG" && break
7791 if test -z "$NCURSES_CONFIG"; then
7792 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7793 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7795 # Extract the first word of "$ac_prog", so it can be a program name with args.
7796 set dummy $ac_prog; ac_word=$2
7797 echo "$as_me:7797: checking for $ac_word" >&5
7798 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7799 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7800 echo $ECHO_N "(cached) $ECHO_C" >&6
7802 if test -n "$ac_ct_NCURSES_CONFIG"; then
7803 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7805 ac_save_IFS=$IFS; IFS=$ac_path_separator
7807 for ac_dir in $ac_dummy; do
7809 test -z "$ac_dir" && ac_dir=.
7810 $as_executable_p "$ac_dir/$ac_word" || continue
7811 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7812 echo "$as_me:7812: found $ac_dir/$ac_word" >&5
7818 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7819 if test -n "$ac_ct_NCURSES_CONFIG"; then
7820 echo "$as_me:7820: result: $ac_ct_NCURSES_CONFIG" >&5
7821 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7823 echo "$as_me:7823: result: no" >&5
7824 echo "${ECHO_T}no" >&6
7827 test -n "$ac_ct_NCURSES_CONFIG" && break
7829 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7831 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7834 if test "$NCURSES_CONFIG" != none ; then
7836 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7838 case "x$cf_add_cflags" in
7841 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7844 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
7845 test "$CFLAGS" != "$cf_old_cflag" || break
7847 CFLAGS="$cf_old_cflag"
7850 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7853 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
7854 test "$CPPFLAGS" != "$cf_old_cflag" || break
7856 CPPFLAGS="$cf_old_cflag"
7865 cf_new_extra_cppflags=
7867 for cf_add_cflags in $cf_add_cflags
7869 case "$cf_fix_cppflags" in
7871 case "$cf_add_cflags" in
7872 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7873 case "$cf_add_cflags" in
7875 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7877 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7878 && test -z "${cf_tst_cflags}" \
7879 && cf_fix_cppflags=yes
7881 if test "$cf_fix_cppflags" = yes ; then
7883 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7884 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7887 elif test "${cf_tst_cflags}" = "\"'" ; then
7889 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7890 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7900 case "$cf_add_cflags" in
7902 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7904 CPPFLAGS=`echo "$CPPFLAGS" | \
7905 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7906 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7911 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7912 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7919 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7920 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7927 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7928 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7930 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7932 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7933 && test -z "${cf_tst_cflags}" \
7934 && cf_fix_cppflags=no
7939 if test -n "$cf_new_cflags" ; then
7941 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7942 CFLAGS="${CFLAGS}$cf_new_cflags"
7946 if test -n "$cf_new_cppflags" ; then
7948 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7949 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7953 if test -n "$cf_new_extra_cppflags" ; then
7955 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7956 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7965 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7967 for cf_add_1lib in $cf_add_0lib; do
7968 for cf_add_2lib in $cf_add_libs; do
7969 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7974 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7978 # even with config script, some packages use no-override for curses.h
7980 echo "$as_me:7980: checking if we have identified curses headers" >&5
7981 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7982 if test "${cf_cv_ncurses_header+set}" = set; then
7983 echo $ECHO_N "(cached) $ECHO_C" >&6
7986 cf_cv_ncurses_header=none
7988 ncurses.h ncursesw/ncurses.h \
7989 curses.h ncursesw/curses.h
7991 cat >"conftest.$ac_ext" <<_ACEOF
7992 #line 7992 "configure"
7993 #include "confdefs.h"
7994 #include <${cf_header}>
7998 initscr(); tgoto("?", 0,0)
8003 rm -f "conftest.$ac_objext"
8004 if { (eval echo "$as_me:8004: \"$ac_compile\"") >&5
8005 (eval $ac_compile) 2>&5
8007 echo "$as_me:8007: \$? = $ac_status" >&5
8008 (exit "$ac_status"); } &&
8009 { ac_try='test -s "conftest.$ac_objext"'
8010 { (eval echo "$as_me:8010: \"$ac_try\"") >&5
8013 echo "$as_me:8013: \$? = $ac_status" >&5
8014 (exit "$ac_status"); }; }; then
8015 cf_cv_ncurses_header=$cf_header; break
8017 echo "$as_me: failed program was:" >&5
8018 cat "conftest.$ac_ext" >&5
8020 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8024 echo "$as_me:8024: result: $cf_cv_ncurses_header" >&5
8025 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8027 if test "$cf_cv_ncurses_header" = none ; then
8028 { { echo "$as_me:8028: error: No curses header-files found" >&5
8029 echo "$as_me: error: No curses header-files found" >&2;}
8030 { (exit 1); exit 1; }; }
8033 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8035 for ac_header in $cf_cv_ncurses_header
8037 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8038 echo "$as_me:8038: checking for $ac_header" >&5
8039 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8040 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8041 echo $ECHO_N "(cached) $ECHO_C" >&6
8043 cat >"conftest.$ac_ext" <<_ACEOF
8044 #line 8044 "configure"
8045 #include "confdefs.h"
8046 #include <$ac_header>
8048 if { (eval echo "$as_me:8048: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8049 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8051 $EGREP -v '^ *\+' conftest.er1 >conftest.err
8053 cat conftest.err >&5
8054 echo "$as_me:8054: \$? = $ac_status" >&5
8055 (exit "$ac_status"); } >/dev/null; then
8056 if test -s conftest.err; then
8057 ac_cpp_err=$ac_c_preproc_warn_flag
8064 if test -z "$ac_cpp_err"; then
8065 eval "$as_ac_Header=yes"
8067 echo "$as_me: failed program was:" >&5
8068 cat "conftest.$ac_ext" >&5
8069 eval "$as_ac_Header=no"
8071 rm -f conftest.err "conftest.$ac_ext"
8073 echo "$as_me:8073: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8074 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8075 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8076 cat >>confdefs.h <<EOF
8077 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8083 cat >>confdefs.h <<\EOF
8087 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8089 cat >>confdefs.h <<EOF
8090 #define $cf_nculib_ROOT 1
8093 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
8097 cf_ncuhdr_root=ncursesw
8099 test -n "$cf_cv_curses_dir" && \
8100 test "$cf_cv_curses_dir" != "no" && { \
8102 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8103 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8105 while test "$cf_add_incdir" != /usr/include
8107 if test -d "$cf_add_incdir"
8110 if test -n "$CFLAGS$CPPFLAGS" ; then
8111 # a loop is needed to ensure we can add subdirs of existing dirs
8112 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8113 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8114 cf_have_incdir=yes; break
8119 if test "$cf_have_incdir" = no ; then
8120 if test "$cf_add_incdir" = /usr/local/include ; then
8121 if test "$GCC" = yes
8123 cf_save_CPPFLAGS=$CPPFLAGS
8125 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8126 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8128 cat >"conftest.$ac_ext" <<_ACEOF
8129 #line 8129 "configure"
8130 #include "confdefs.h"
8140 rm -f "conftest.$ac_objext"
8141 if { (eval echo "$as_me:8141: \"$ac_compile\"") >&5
8142 (eval $ac_compile) 2>&5
8144 echo "$as_me:8144: \$? = $ac_status" >&5
8145 (exit "$ac_status"); } &&
8146 { ac_try='test -s "conftest.$ac_objext"'
8147 { (eval echo "$as_me:8147: \"$ac_try\"") >&5
8150 echo "$as_me:8150: \$? = $ac_status" >&5
8151 (exit "$ac_status"); }; }; then
8154 echo "$as_me: failed program was:" >&5
8155 cat "conftest.$ac_ext" >&5
8158 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8159 CPPFLAGS=$cf_save_CPPFLAGS
8164 if test "$cf_have_incdir" = no ; then
8165 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8167 echo "${as_me:-configure}:8167: testing adding $cf_add_incdir to include-path ..." 1>&5
8169 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8171 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8172 test "$cf_top_incdir" = "$cf_add_incdir" && break
8173 cf_add_incdir="$cf_top_incdir"
8186 echo "$as_me:8186: checking for $cf_ncuhdr_root header in include-path" >&5
8187 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8188 if test "${cf_cv_ncurses_h+set}" = set; then
8189 echo $ECHO_N "(cached) $ECHO_C" >&6
8192 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8193 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
8194 for cf_header in $cf_header_list
8197 cat >"conftest.$ac_ext" <<_ACEOF
8198 #line 8198 "configure"
8199 #include "confdefs.h"
8201 #define _XOPEN_SOURCE_EXTENDED
8202 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
8203 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
8205 #include <$cf_header>
8210 #ifdef NCURSES_VERSION
8216 printf("%s\\n", NCURSES_VERSION);
8229 rm -f "conftest.$ac_objext"
8230 if { (eval echo "$as_me:8230: \"$ac_compile\"") >&5
8231 (eval $ac_compile) 2>&5
8233 echo "$as_me:8233: \$? = $ac_status" >&5
8234 (exit "$ac_status"); } &&
8235 { ac_try='test -s "conftest.$ac_objext"'
8236 { (eval echo "$as_me:8236: \"$ac_try\"") >&5
8239 echo "$as_me:8239: \$? = $ac_status" >&5
8240 (exit "$ac_status"); }; }; then
8241 cf_cv_ncurses_h=$cf_header
8244 echo "$as_me: failed program was:" >&5
8245 cat "conftest.$ac_ext" >&5
8248 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8250 test "$cf_cv_ncurses_h" != no && break
8254 echo "$as_me:8254: result: $cf_cv_ncurses_h" >&5
8255 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8257 if test "$cf_cv_ncurses_h" != no ; then
8258 cf_cv_ncurses_header=$cf_cv_ncurses_h
8261 echo "$as_me:8261: checking for $cf_ncuhdr_root include-path" >&5
8262 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8263 if test "${cf_cv_ncurses_h2+set}" = set; then
8264 echo $ECHO_N "(cached) $ECHO_C" >&6
8267 test -n "$verbose" && echo
8271 # collect the current set of include-directories from compiler flags
8272 cf_header_path_list=""
8273 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8274 for cf_header_path in $CPPFLAGS $CFLAGS
8276 case "$cf_header_path" in
8278 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8280 test "x$cf_header_path" != "xNONE" && \
8281 test -d "$cf_header_path" && \
8283 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8284 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8285 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8286 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8287 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8288 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"
8291 cf_header_path_list="$cf_header_path_list $cf_search"
8297 # add the variations for the package we are looking for
8301 test "x$prefix" != "xNONE" && \
8302 test -d "$prefix" && \
8304 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8305 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8306 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8307 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8308 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8309 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8312 for cf_subdir_prefix in \
8321 test "x$cf_subdir_prefix" != "x$prefix" && \
8322 test -d "$cf_subdir_prefix" && \
8323 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8324 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8325 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8326 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8327 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8328 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8329 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"
8334 test "$includedir" != NONE && \
8335 test "$includedir" != "/usr/include" && \
8336 test -d "$includedir" && {
8337 test -d "$includedir" && cf_search="$cf_search $includedir"
8338 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8341 test "$oldincludedir" != NONE && \
8342 test "$oldincludedir" != "/usr/include" && \
8343 test -d "$oldincludedir" && {
8344 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8345 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8348 cf_search="$cf_search $cf_header_path_list"
8350 test -n "$verbose" && echo "search path $cf_search"
8351 cf_save2_CPPFLAGS="$CPPFLAGS"
8352 for cf_incdir in $cf_search
8355 if test -n "$cf_incdir" ; then
8356 for cf_add_incdir in $cf_incdir
8358 while test "$cf_add_incdir" != /usr/include
8360 if test -d "$cf_add_incdir"
8363 if test -n "$CFLAGS$CPPFLAGS" ; then
8364 # a loop is needed to ensure we can add subdirs of existing dirs
8365 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8366 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8367 cf_have_incdir=yes; break
8372 if test "$cf_have_incdir" = no ; then
8373 if test "$cf_add_incdir" = /usr/local/include ; then
8374 if test "$GCC" = yes
8376 cf_save_CPPFLAGS=$CPPFLAGS
8378 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8379 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8381 cat >"conftest.$ac_ext" <<_ACEOF
8382 #line 8382 "configure"
8383 #include "confdefs.h"
8393 rm -f "conftest.$ac_objext"
8394 if { (eval echo "$as_me:8394: \"$ac_compile\"") >&5
8395 (eval $ac_compile) 2>&5
8397 echo "$as_me:8397: \$? = $ac_status" >&5
8398 (exit "$ac_status"); } &&
8399 { ac_try='test -s "conftest.$ac_objext"'
8400 { (eval echo "$as_me:8400: \"$ac_try\"") >&5
8403 echo "$as_me:8403: \$? = $ac_status" >&5
8404 (exit "$ac_status"); }; }; then
8407 echo "$as_me: failed program was:" >&5
8408 cat "conftest.$ac_ext" >&5
8411 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8412 CPPFLAGS=$cf_save_CPPFLAGS
8417 if test "$cf_have_incdir" = no ; then
8418 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8420 echo "${as_me:-configure}:8420: testing adding $cf_add_incdir to include-path ..." 1>&5
8422 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8424 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8425 test "$cf_top_incdir" = "$cf_add_incdir" && break
8426 cf_add_incdir="$cf_top_incdir"
8442 cat >"conftest.$ac_ext" <<_ACEOF
8443 #line 8443 "configure"
8444 #include "confdefs.h"
8446 #include <$cf_header>
8451 #ifdef NCURSES_VERSION
8453 printf("%s\\n", NCURSES_VERSION);
8466 rm -f "conftest.$ac_objext"
8467 if { (eval echo "$as_me:8467: \"$ac_compile\"") >&5
8468 (eval $ac_compile) 2>&5
8470 echo "$as_me:8470: \$? = $ac_status" >&5
8471 (exit "$ac_status"); } &&
8472 { ac_try='test -s "conftest.$ac_objext"'
8473 { (eval echo "$as_me:8473: \"$ac_try\"") >&5
8476 echo "$as_me:8476: \$? = $ac_status" >&5
8477 (exit "$ac_status"); }; }; then
8478 cf_cv_ncurses_h2=$cf_header
8481 echo "$as_me: failed program was:" >&5
8482 cat "conftest.$ac_ext" >&5
8485 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8487 if test "$cf_cv_ncurses_h2" != no ; then
8488 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8489 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
8492 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8494 CPPFLAGS="$cf_save2_CPPFLAGS"
8495 test "$cf_cv_ncurses_h2" != no && break
8497 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8497: error: not found" >&5
8498 echo "$as_me: error: not found" >&2;}
8499 { (exit 1); exit 1; }; }
8502 echo "$as_me:8502: result: $cf_cv_ncurses_h2" >&5
8503 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8505 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
8506 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
8507 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
8508 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
8511 if test -n "$cf_1st_incdir" ; then
8512 for cf_add_incdir in $cf_1st_incdir
8514 while test "$cf_add_incdir" != /usr/include
8516 if test -d "$cf_add_incdir"
8519 if test -n "$CFLAGS$CPPFLAGS" ; then
8520 # a loop is needed to ensure we can add subdirs of existing dirs
8521 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8522 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8523 cf_have_incdir=yes; break
8528 if test "$cf_have_incdir" = no ; then
8529 if test "$cf_add_incdir" = /usr/local/include ; then
8530 if test "$GCC" = yes
8532 cf_save_CPPFLAGS=$CPPFLAGS
8534 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8535 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8537 cat >"conftest.$ac_ext" <<_ACEOF
8538 #line 8538 "configure"
8539 #include "confdefs.h"
8549 rm -f "conftest.$ac_objext"
8550 if { (eval echo "$as_me:8550: \"$ac_compile\"") >&5
8551 (eval $ac_compile) 2>&5
8553 echo "$as_me:8553: \$? = $ac_status" >&5
8554 (exit "$ac_status"); } &&
8555 { ac_try='test -s "conftest.$ac_objext"'
8556 { (eval echo "$as_me:8556: \"$ac_try\"") >&5
8559 echo "$as_me:8559: \$? = $ac_status" >&5
8560 (exit "$ac_status"); }; }; then
8563 echo "$as_me: failed program was:" >&5
8564 cat "conftest.$ac_ext" >&5
8567 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8568 CPPFLAGS=$cf_save_CPPFLAGS
8573 if test "$cf_have_incdir" = no ; then
8574 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8576 echo "${as_me:-configure}:8576: testing adding $cf_add_incdir to include-path ..." 1>&5
8578 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8580 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8581 test "$cf_top_incdir" = "$cf_add_incdir" && break
8582 cf_add_incdir="$cf_top_incdir"
8595 # Set definitions to allow ifdef'ing for ncurses.h
8597 case "$cf_cv_ncurses_header" in
8600 cat >>confdefs.h <<\EOF
8601 #define HAVE_NCURSES_H 1
8607 case "$cf_cv_ncurses_header" in
8608 (ncurses/curses.h|ncurses/ncurses.h)
8610 cat >>confdefs.h <<\EOF
8611 #define HAVE_NCURSES_NCURSES_H 1
8615 (ncursesw/curses.h|ncursesw/ncurses.h)
8617 cat >>confdefs.h <<\EOF
8618 #define HAVE_NCURSESW_NCURSES_H 1
8624 echo "$as_me:8624: checking for terminfo header" >&5
8625 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8626 if test "${cf_cv_term_header+set}" = set; then
8627 echo $ECHO_N "(cached) $ECHO_C" >&6
8630 case "${cf_cv_ncurses_header}" in
8631 (*/ncurses.h|*/ncursesw.h)
8632 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8635 cf_term_header=term.h
8639 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8641 cat >"conftest.$ac_ext" <<_ACEOF
8642 #line 8642 "configure"
8643 #include "confdefs.h"
8645 #include <${cf_cv_ncurses_header:-curses.h}>
8651 int x = auto_left_margin; (void)x
8656 rm -f "conftest.$ac_objext"
8657 if { (eval echo "$as_me:8657: \"$ac_compile\"") >&5
8658 (eval $ac_compile) 2>&5
8660 echo "$as_me:8660: \$? = $ac_status" >&5
8661 (exit "$ac_status"); } &&
8662 { ac_try='test -s "conftest.$ac_objext"'
8663 { (eval echo "$as_me:8663: \"$ac_try\"") >&5
8666 echo "$as_me:8666: \$? = $ac_status" >&5
8667 (exit "$ac_status"); }; }; then
8669 cf_cv_term_header="$cf_test"
8671 echo "$as_me: failed program was:" >&5
8672 cat "conftest.$ac_ext" >&5
8674 cf_cv_term_header=unknown
8677 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8678 test "$cf_cv_term_header" != unknown && break
8682 echo "$as_me:8682: result: $cf_cv_term_header" >&5
8683 echo "${ECHO_T}$cf_cv_term_header" >&6
8685 # Set definitions to allow ifdef'ing to accommodate subdirectories
8687 case "$cf_cv_term_header" in
8690 cat >>confdefs.h <<\EOF
8691 #define HAVE_TERM_H 1
8697 case "$cf_cv_term_header" in
8700 cat >>confdefs.h <<\EOF
8701 #define HAVE_NCURSES_TERM_H 1
8707 cat >>confdefs.h <<\EOF
8708 #define HAVE_NCURSESW_TERM_H 1
8714 # some applications need this, but should check for NCURSES_VERSION
8716 cat >>confdefs.h <<\EOF
8720 echo "$as_me:8720: checking for ncurses version" >&5
8721 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8722 if test "${cf_cv_ncurses_version+set}" = set; then
8723 echo $ECHO_N "(cached) $ECHO_C" >&6
8726 cf_cv_ncurses_version=no
8728 rm -f "$cf_tempfile"
8729 if test "$cross_compiling" = yes; then
8731 # This will not work if the preprocessor splits the line after the
8732 # Autoconf token. The 'unproto' program does that.
8733 cat > "conftest.$ac_ext" <<EOF
8734 #include <${cf_cv_ncurses_header:-curses.h}>
8736 #ifdef NCURSES_VERSION
8737 Autoconf NCURSES_VERSION
8745 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8746 { (eval echo "$as_me:8746: \"$cf_try\"") >&5
8749 echo "$as_me:8749: \$? = $ac_status" >&5
8750 (exit "$ac_status"); }
8751 if test -f conftest.out ; then
8752 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
8753 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8758 cat >"conftest.$ac_ext" <<_ACEOF
8759 #line 8759 "configure"
8760 #include "confdefs.h"
8762 #include <${cf_cv_ncurses_header:-curses.h}>
8766 FILE *fp = fopen("$cf_tempfile", "w");
8767 #ifdef NCURSES_VERSION
8768 # ifdef NCURSES_VERSION_PATCH
8769 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8771 fprintf(fp, "%s\\n", NCURSES_VERSION);
8775 fprintf(fp, "old\\n");
8780 ${cf_cv_main_return:-return}(0);
8783 rm -f "conftest$ac_exeext"
8784 if { (eval echo "$as_me:8784: \"$ac_link\"") >&5
8785 (eval $ac_link) 2>&5
8787 echo "$as_me:8787: \$? = $ac_status" >&5
8788 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8789 { (eval echo "$as_me:8789: \"$ac_try\"") >&5
8792 echo "$as_me:8792: \$? = $ac_status" >&5
8793 (exit "$ac_status"); }; }; then
8795 cf_cv_ncurses_version=`cat $cf_tempfile`
8797 echo "$as_me: program exited with status $ac_status" >&5
8798 echo "$as_me: failed program was:" >&5
8799 cat "conftest.$ac_ext" >&5
8801 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8803 rm -f "$cf_tempfile"
8806 echo "$as_me:8806: result: $cf_cv_ncurses_version" >&5
8807 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8808 test "$cf_cv_ncurses_version" = no ||
8809 cat >>confdefs.h <<\EOF
8813 cf_nculib_root=ncursesw
8814 # This works, except for the special case where we find gpm, but
8815 # ncurses is in a nonstandard location via $LIBS, and we really want
8818 cf_ncurses_SAVE="$LIBS"
8819 echo "$as_me:8819: checking for Gpm_Open in -lgpm" >&5
8820 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8821 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8822 echo $ECHO_N "(cached) $ECHO_C" >&6
8824 ac_check_lib_save_LIBS=$LIBS
8826 cat >"conftest.$ac_ext" <<_ACEOF
8827 #line 8827 "configure"
8828 #include "confdefs.h"
8830 /* Override any gcc2 internal prototype to avoid an error. */
8834 /* We use char because int might match the return type of a gcc2
8835 builtin and then its argument prototype would still apply. */
8845 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8846 if { (eval echo "$as_me:8846: \"$ac_link\"") >&5
8847 (eval $ac_link) 2>&5
8849 echo "$as_me:8849: \$? = $ac_status" >&5
8850 (exit "$ac_status"); } &&
8851 { ac_try='test -s "conftest$ac_exeext"'
8852 { (eval echo "$as_me:8852: \"$ac_try\"") >&5
8855 echo "$as_me:8855: \$? = $ac_status" >&5
8856 (exit "$ac_status"); }; }; then
8857 ac_cv_lib_gpm_Gpm_Open=yes
8859 echo "$as_me: failed program was:" >&5
8860 cat "conftest.$ac_ext" >&5
8861 ac_cv_lib_gpm_Gpm_Open=no
8863 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8864 LIBS=$ac_check_lib_save_LIBS
8866 echo "$as_me:8866: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8867 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8868 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
8869 echo "$as_me:8869: checking for initscr in -lgpm" >&5
8870 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8871 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8872 echo $ECHO_N "(cached) $ECHO_C" >&6
8874 ac_check_lib_save_LIBS=$LIBS
8876 cat >"conftest.$ac_ext" <<_ACEOF
8877 #line 8877 "configure"
8878 #include "confdefs.h"
8880 /* Override any gcc2 internal prototype to avoid an error. */
8884 /* We use char because int might match the return type of a gcc2
8885 builtin and then its argument prototype would still apply. */
8895 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8896 if { (eval echo "$as_me:8896: \"$ac_link\"") >&5
8897 (eval $ac_link) 2>&5
8899 echo "$as_me:8899: \$? = $ac_status" >&5
8900 (exit "$ac_status"); } &&
8901 { ac_try='test -s "conftest$ac_exeext"'
8902 { (eval echo "$as_me:8902: \"$ac_try\"") >&5
8905 echo "$as_me:8905: \$? = $ac_status" >&5
8906 (exit "$ac_status"); }; }; then
8907 ac_cv_lib_gpm_initscr=yes
8909 echo "$as_me: failed program was:" >&5
8910 cat "conftest.$ac_ext" >&5
8911 ac_cv_lib_gpm_initscr=no
8913 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8914 LIBS=$ac_check_lib_save_LIBS
8916 echo "$as_me:8916: result: $ac_cv_lib_gpm_initscr" >&5
8917 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8918 if test "$ac_cv_lib_gpm_initscr" = yes; then
8919 LIBS="$cf_ncurses_SAVE"
8921 cf_ncurses_LIBS="-lgpm"
8928 # This is only necessary if you are linking against an obsolete
8929 # version of ncurses (but it should do no harm, since it is static).
8930 if test "$cf_nculib_root" = ncurses ; then
8931 echo "$as_me:8931: checking for tgoto in -lmytinfo" >&5
8932 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8933 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8934 echo $ECHO_N "(cached) $ECHO_C" >&6
8936 ac_check_lib_save_LIBS=$LIBS
8937 LIBS="-lmytinfo $LIBS"
8938 cat >"conftest.$ac_ext" <<_ACEOF
8939 #line 8939 "configure"
8940 #include "confdefs.h"
8942 /* Override any gcc2 internal prototype to avoid an error. */
8946 /* We use char because int might match the return type of a gcc2
8947 builtin and then its argument prototype would still apply. */
8957 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8958 if { (eval echo "$as_me:8958: \"$ac_link\"") >&5
8959 (eval $ac_link) 2>&5
8961 echo "$as_me:8961: \$? = $ac_status" >&5
8962 (exit "$ac_status"); } &&
8963 { ac_try='test -s "conftest$ac_exeext"'
8964 { (eval echo "$as_me:8964: \"$ac_try\"") >&5
8967 echo "$as_me:8967: \$? = $ac_status" >&5
8968 (exit "$ac_status"); }; }; then
8969 ac_cv_lib_mytinfo_tgoto=yes
8971 echo "$as_me: failed program was:" >&5
8972 cat "conftest.$ac_ext" >&5
8973 ac_cv_lib_mytinfo_tgoto=no
8975 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8976 LIBS=$ac_check_lib_save_LIBS
8978 echo "$as_me:8978: result: $ac_cv_lib_mytinfo_tgoto" >&5
8979 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8980 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
8981 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8991 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8993 for cf_add_1lib in $cf_add_0lib; do
8994 for cf_add_2lib in $cf_add_libs; do
8995 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9000 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9004 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
9010 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9012 for cf_add_1lib in $cf_add_0lib; do
9013 for cf_add_2lib in $cf_add_libs; do
9014 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9019 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9025 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
9027 echo "$as_me:9027: checking for initscr" >&5
9028 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9029 if test "${ac_cv_func_initscr+set}" = set; then
9030 echo $ECHO_N "(cached) $ECHO_C" >&6
9032 cat >"conftest.$ac_ext" <<_ACEOF
9033 #line 9033 "configure"
9034 #include "confdefs.h"
9035 #define initscr autoconf_temporary
9036 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9043 /* We use char because int might match the return type of a gcc2
9044 builtin and then its argument prototype would still apply. */
9045 char initscr (void);
9051 /* The GNU C library defines stubs for functions which it implements
9052 to always fail with ENOSYS. Some functions are actually named
9053 something starting with __ and the normal name is an alias. */
9054 #if defined (__stub_initscr) || defined (__stub___initscr)
9055 #error found stub for initscr
9063 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9064 if { (eval echo "$as_me:9064: \"$ac_link\"") >&5
9065 (eval $ac_link) 2>&5
9067 echo "$as_me:9067: \$? = $ac_status" >&5
9068 (exit "$ac_status"); } &&
9069 { ac_try='test -s "conftest$ac_exeext"'
9070 { (eval echo "$as_me:9070: \"$ac_try\"") >&5
9073 echo "$as_me:9073: \$? = $ac_status" >&5
9074 (exit "$ac_status"); }; }; then
9075 ac_cv_func_initscr=yes
9077 echo "$as_me: failed program was:" >&5
9078 cat "conftest.$ac_ext" >&5
9079 ac_cv_func_initscr=no
9081 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9083 echo "$as_me:9083: result: $ac_cv_func_initscr" >&5
9084 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9085 if test "$ac_cv_func_initscr" = yes; then
9086 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9089 cf_save_LIBS="$LIBS"
9090 echo "$as_me:9090: checking for initscr in -l$cf_nculib_root" >&5
9091 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9092 LIBS="-l$cf_nculib_root $LIBS"
9093 cat >"conftest.$ac_ext" <<_ACEOF
9094 #line 9094 "configure"
9095 #include "confdefs.h"
9096 #include <${cf_cv_ncurses_header:-curses.h}>
9105 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9106 if { (eval echo "$as_me:9106: \"$ac_link\"") >&5
9107 (eval $ac_link) 2>&5
9109 echo "$as_me:9109: \$? = $ac_status" >&5
9110 (exit "$ac_status"); } &&
9111 { ac_try='test -s "conftest$ac_exeext"'
9112 { (eval echo "$as_me:9112: \"$ac_try\"") >&5
9115 echo "$as_me:9115: \$? = $ac_status" >&5
9116 (exit "$ac_status"); }; }; then
9117 echo "$as_me:9117: result: yes" >&5
9118 echo "${ECHO_T}yes" >&6
9119 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9122 echo "$as_me: failed program was:" >&5
9123 cat "conftest.$ac_ext" >&5
9124 echo "$as_me:9124: result: no" >&5
9125 echo "${ECHO_T}no" >&6
9128 cf_library_path_list=""
9129 if test -n "${LDFLAGS}${LIBS}" ; then
9130 for cf_library_path in $LDFLAGS $LIBS
9132 case "$cf_library_path" in
9134 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9136 test "x$cf_library_path" != "xNONE" && \
9137 test -d "$cf_library_path" && \
9139 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9140 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
9141 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9142 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9143 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9144 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"
9147 cf_library_path_list="$cf_library_path_list $cf_search"
9155 test "x$prefix" != "xNONE" && \
9156 test -d "$prefix" && \
9158 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9159 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
9160 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9161 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9162 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9163 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9166 for cf_subdir_prefix in \
9175 test "x$cf_subdir_prefix" != "x$prefix" && \
9176 test -d "$cf_subdir_prefix" && \
9177 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9178 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9179 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
9180 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9181 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9182 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9183 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"
9188 cf_search="$cf_library_path_list $cf_search"
9190 for cf_libdir in $cf_search
9192 echo "$as_me:9192: checking for -l$cf_nculib_root in $cf_libdir" >&5
9193 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9194 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9195 cat >"conftest.$ac_ext" <<_ACEOF
9196 #line 9196 "configure"
9197 #include "confdefs.h"
9198 #include <${cf_cv_ncurses_header:-curses.h}>
9207 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9208 if { (eval echo "$as_me:9208: \"$ac_link\"") >&5
9209 (eval $ac_link) 2>&5
9211 echo "$as_me:9211: \$? = $ac_status" >&5
9212 (exit "$ac_status"); } &&
9213 { ac_try='test -s "conftest$ac_exeext"'
9214 { (eval echo "$as_me:9214: \"$ac_try\"") >&5
9217 echo "$as_me:9217: \$? = $ac_status" >&5
9218 (exit "$ac_status"); }; }; then
9219 echo "$as_me:9219: result: yes" >&5
9220 echo "${ECHO_T}yes" >&6
9221 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9224 echo "$as_me: failed program was:" >&5
9225 cat "conftest.$ac_ext" >&5
9226 echo "$as_me:9226: result: no" >&5
9227 echo "${ECHO_T}no" >&6
9228 LIBS="$cf_save_LIBS"
9230 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9234 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9238 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
9240 if test "$cf_found_library" = no ; then
9241 { { echo "$as_me:9241: error: Cannot link $cf_nculib_root library" >&5
9242 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9243 { (exit 1); exit 1; }; }
9248 if test -n "$cf_ncurses_LIBS" ; then
9249 echo "$as_me:9249: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9250 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9251 cf_ncurses_SAVE="$LIBS"
9252 for p in $cf_ncurses_LIBS ; do
9253 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
9254 if test "$q" != "$LIBS" ; then
9258 cat >"conftest.$ac_ext" <<_ACEOF
9259 #line 9259 "configure"
9260 #include "confdefs.h"
9261 #include <${cf_cv_ncurses_header:-curses.h}>
9265 initscr(); mousemask(0,0); tigetstr((char *)0);
9270 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9271 if { (eval echo "$as_me:9271: \"$ac_link\"") >&5
9272 (eval $ac_link) 2>&5
9274 echo "$as_me:9274: \$? = $ac_status" >&5
9275 (exit "$ac_status"); } &&
9276 { ac_try='test -s "conftest$ac_exeext"'
9277 { (eval echo "$as_me:9277: \"$ac_try\"") >&5
9280 echo "$as_me:9280: \$? = $ac_status" >&5
9281 (exit "$ac_status"); }; }; then
9282 echo "$as_me:9282: result: yes" >&5
9283 echo "${ECHO_T}yes" >&6
9285 echo "$as_me: failed program was:" >&5
9286 cat "conftest.$ac_ext" >&5
9287 echo "$as_me:9287: result: no" >&5
9288 echo "${ECHO_T}no" >&6
9289 LIBS="$cf_ncurses_SAVE"
9291 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9294 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9296 cat >>confdefs.h <<EOF
9297 #define $cf_nculib_ROOT 1
9307 cf_ncuconfig_root=ncurses
9308 cf_have_ncuconfig=no
9310 if test "x${PKG_CONFIG:=none}" != xnone; then
9311 echo "$as_me:9311: checking pkg-config for $cf_ncuconfig_root" >&5
9312 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9313 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9314 echo "$as_me:9314: result: yes" >&5
9315 echo "${ECHO_T}yes" >&6
9317 echo "$as_me:9317: checking if the $cf_ncuconfig_root package files work" >&5
9318 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9319 cf_have_ncuconfig=unknown
9321 cf_save_CFLAGS="$CFLAGS"
9322 cf_save_CPPFLAGS="$CPPFLAGS"
9323 cf_save_LIBS="$LIBS"
9325 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
9326 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9328 # while -W for passing linker flags is prevalent, it is not "standard".
9329 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9330 # incompatible _and_ non-standard -W option which gives an error. Work
9331 # around that pitfall.
9332 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9338 cf_new_extra_cppflags=
9340 for cf_add_cflags in $cf_pkg_cflags
9342 case "$cf_fix_cppflags" in
9344 case "$cf_add_cflags" in
9345 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9346 case "$cf_add_cflags" in
9348 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9350 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9351 && test -z "${cf_tst_cflags}" \
9352 && cf_fix_cppflags=yes
9354 if test "$cf_fix_cppflags" = yes ; then
9356 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9357 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9360 elif test "${cf_tst_cflags}" = "\"'" ; then
9362 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9363 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9373 case "$cf_add_cflags" in
9375 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9377 CPPFLAGS=`echo "$CPPFLAGS" | \
9378 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9379 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9384 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9385 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9392 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9393 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9400 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9401 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9403 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9405 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9406 && test -z "${cf_tst_cflags}" \
9407 && cf_fix_cppflags=no
9412 if test -n "$cf_new_cflags" ; then
9414 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9415 CFLAGS="${CFLAGS}$cf_new_cflags"
9419 if test -n "$cf_new_cppflags" ; then
9421 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9422 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9426 if test -n "$cf_new_extra_cppflags" ; then
9428 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9429 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9436 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9438 for cf_add_1lib in $cf_add_0lib; do
9439 for cf_add_2lib in $cf_add_libs; do
9440 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9445 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9449 cat >"conftest.$ac_ext" <<_ACEOF
9450 #line 9450 "configure"
9451 #include "confdefs.h"
9452 #include <${cf_cv_ncurses_header:-curses.h}>
9456 initscr(); mousemask(0,0); tigetstr((char *)0);
9461 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9462 if { (eval echo "$as_me:9462: \"$ac_link\"") >&5
9463 (eval $ac_link) 2>&5
9465 echo "$as_me:9465: \$? = $ac_status" >&5
9466 (exit "$ac_status"); } &&
9467 { ac_try='test -s "conftest$ac_exeext"'
9468 { (eval echo "$as_me:9468: \"$ac_try\"") >&5
9471 echo "$as_me:9471: \$? = $ac_status" >&5
9472 (exit "$ac_status"); }; }; then
9473 if test "$cross_compiling" = yes; then
9474 cf_test_ncuconfig=maybe
9476 cat >"conftest.$ac_ext" <<_ACEOF
9477 #line 9477 "configure"
9478 #include "confdefs.h"
9479 #include <${cf_cv_ncurses_header:-curses.h}>
9481 { const char *xx = curses_version(); return (xx == 0); }
9483 rm -f "conftest$ac_exeext"
9484 if { (eval echo "$as_me:9484: \"$ac_link\"") >&5
9485 (eval $ac_link) 2>&5
9487 echo "$as_me:9487: \$? = $ac_status" >&5
9488 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9489 { (eval echo "$as_me:9489: \"$ac_try\"") >&5
9492 echo "$as_me:9492: \$? = $ac_status" >&5
9493 (exit "$ac_status"); }; }; then
9494 cf_test_ncuconfig=yes
9496 echo "$as_me: program exited with status $ac_status" >&5
9497 echo "$as_me: failed program was:" >&5
9498 cat "conftest.$ac_ext" >&5
9499 cf_test_ncuconfig=no
9501 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9504 echo "$as_me: failed program was:" >&5
9505 cat "conftest.$ac_ext" >&5
9506 cf_test_ncuconfig=no
9508 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9510 CFLAGS="$cf_save_CFLAGS"
9511 CPPFLAGS="$cf_save_CPPFLAGS"
9512 LIBS="$cf_save_LIBS"
9514 if test "x$cf_test_ncuconfig" != xyes; then
9515 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9516 cf_pkg_cflags="$cf_temp"
9517 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9518 cf_pkg_libs="$cf_temp"
9523 for cf_add_cflags in $cf_pkg_cflags
9525 case "x$cf_add_cflags" in
9528 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9531 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
9532 test "$CFLAGS" != "$cf_old_cflag" || break
9534 CFLAGS="$cf_old_cflag"
9537 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9540 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
9541 test "$CPPFLAGS" != "$cf_old_cflag" || break
9543 CPPFLAGS="$cf_old_cflag"
9552 cf_new_extra_cppflags=
9554 for cf_add_cflags in $cf_add_cflags
9556 case "$cf_fix_cppflags" in
9558 case "$cf_add_cflags" in
9559 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9560 case "$cf_add_cflags" in
9562 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9564 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9565 && test -z "${cf_tst_cflags}" \
9566 && cf_fix_cppflags=yes
9568 if test "$cf_fix_cppflags" = yes ; then
9570 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9571 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9574 elif test "${cf_tst_cflags}" = "\"'" ; then
9576 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9577 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9587 case "$cf_add_cflags" in
9589 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9591 CPPFLAGS=`echo "$CPPFLAGS" | \
9592 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9593 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9598 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9599 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9606 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9607 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9614 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9615 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9617 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9619 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9620 && test -z "${cf_tst_cflags}" \
9621 && cf_fix_cppflags=no
9626 if test -n "$cf_new_cflags" ; then
9628 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9629 CFLAGS="${CFLAGS}$cf_new_cflags"
9633 if test -n "$cf_new_cppflags" ; then
9635 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9636 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9640 if test -n "$cf_new_extra_cppflags" ; then
9642 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9643 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9652 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9654 for cf_add_1lib in $cf_add_0lib; do
9655 for cf_add_2lib in $cf_add_libs; do
9656 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9661 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9665 cat >"conftest.$ac_ext" <<_ACEOF
9666 #line 9666 "configure"
9667 #include "confdefs.h"
9668 #include <${cf_cv_ncurses_header:-curses.h}>
9672 initscr(); mousemask(0,0); tigetstr((char *)0);
9677 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9678 if { (eval echo "$as_me:9678: \"$ac_link\"") >&5
9679 (eval $ac_link) 2>&5
9681 echo "$as_me:9681: \$? = $ac_status" >&5
9682 (exit "$ac_status"); } &&
9683 { ac_try='test -s "conftest$ac_exeext"'
9684 { (eval echo "$as_me:9684: \"$ac_try\"") >&5
9687 echo "$as_me:9687: \$? = $ac_status" >&5
9688 (exit "$ac_status"); }; }; then
9689 if test "$cross_compiling" = yes; then
9690 cf_have_ncuconfig=maybe
9692 cat >"conftest.$ac_ext" <<_ACEOF
9693 #line 9693 "configure"
9694 #include "confdefs.h"
9695 #include <${cf_cv_ncurses_header:-curses.h}>
9697 { const char *xx = curses_version(); return (xx == 0); }
9699 rm -f "conftest$ac_exeext"
9700 if { (eval echo "$as_me:9700: \"$ac_link\"") >&5
9701 (eval $ac_link) 2>&5
9703 echo "$as_me:9703: \$? = $ac_status" >&5
9704 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9705 { (eval echo "$as_me:9705: \"$ac_try\"") >&5
9708 echo "$as_me:9708: \$? = $ac_status" >&5
9709 (exit "$ac_status"); }; }; then
9710 cf_have_ncuconfig=yes
9712 echo "$as_me: program exited with status $ac_status" >&5
9713 echo "$as_me: failed program was:" >&5
9714 cat "conftest.$ac_ext" >&5
9715 cf_have_ncuconfig=no
9717 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9720 echo "$as_me: failed program was:" >&5
9721 cat "conftest.$ac_ext" >&5
9722 cf_have_ncuconfig=no
9724 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9725 echo "$as_me:9725: result: $cf_have_ncuconfig" >&5
9726 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9727 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9728 if test "$cf_have_ncuconfig" != "yes"
9730 CPPFLAGS="$cf_save_CPPFLAGS"
9731 LIBS="$cf_save_LIBS"
9732 NCURSES_CONFIG_PKG=none
9735 cat >>confdefs.h <<\EOF
9739 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9741 echo "$as_me:9741: checking for terminfo header" >&5
9742 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9743 if test "${cf_cv_term_header+set}" = set; then
9744 echo $ECHO_N "(cached) $ECHO_C" >&6
9747 case "${cf_cv_ncurses_header}" in
9748 (*/ncurses.h|*/ncursesw.h)
9749 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9752 cf_term_header=term.h
9756 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9758 cat >"conftest.$ac_ext" <<_ACEOF
9759 #line 9759 "configure"
9760 #include "confdefs.h"
9762 #include <${cf_cv_ncurses_header:-curses.h}>
9768 int x = auto_left_margin; (void)x
9773 rm -f "conftest.$ac_objext"
9774 if { (eval echo "$as_me:9774: \"$ac_compile\"") >&5
9775 (eval $ac_compile) 2>&5
9777 echo "$as_me:9777: \$? = $ac_status" >&5
9778 (exit "$ac_status"); } &&
9779 { ac_try='test -s "conftest.$ac_objext"'
9780 { (eval echo "$as_me:9780: \"$ac_try\"") >&5
9783 echo "$as_me:9783: \$? = $ac_status" >&5
9784 (exit "$ac_status"); }; }; then
9786 cf_cv_term_header="$cf_test"
9788 echo "$as_me: failed program was:" >&5
9789 cat "conftest.$ac_ext" >&5
9791 cf_cv_term_header=unknown
9794 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9795 test "$cf_cv_term_header" != unknown && break
9799 echo "$as_me:9799: result: $cf_cv_term_header" >&5
9800 echo "${ECHO_T}$cf_cv_term_header" >&6
9802 # Set definitions to allow ifdef'ing to accommodate subdirectories
9804 case "$cf_cv_term_header" in
9807 cat >>confdefs.h <<\EOF
9808 #define HAVE_TERM_H 1
9814 case "$cf_cv_term_header" in
9817 cat >>confdefs.h <<\EOF
9818 #define HAVE_NCURSES_TERM_H 1
9824 cat >>confdefs.h <<\EOF
9825 #define HAVE_NCURSESW_TERM_H 1
9834 echo "$as_me:9834: result: no" >&5
9835 echo "${ECHO_T}no" >&6
9836 NCURSES_CONFIG_PKG=none
9839 NCURSES_CONFIG_PKG=none
9842 if test "x$cf_have_ncuconfig" = "xno"; then
9843 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9845 if test -n "$ac_tool_prefix"; then
9846 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9848 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9849 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9850 echo "$as_me:9850: checking for $ac_word" >&5
9851 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9852 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9853 echo $ECHO_N "(cached) $ECHO_C" >&6
9855 if test -n "$NCURSES_CONFIG"; then
9856 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9858 ac_save_IFS=$IFS; IFS=$ac_path_separator
9860 for ac_dir in $ac_dummy; do
9862 test -z "$ac_dir" && ac_dir=.
9863 $as_executable_p "$ac_dir/$ac_word" || continue
9864 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9865 echo "$as_me:9865: found $ac_dir/$ac_word" >&5
9871 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9872 if test -n "$NCURSES_CONFIG"; then
9873 echo "$as_me:9873: result: $NCURSES_CONFIG" >&5
9874 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9876 echo "$as_me:9876: result: no" >&5
9877 echo "${ECHO_T}no" >&6
9880 test -n "$NCURSES_CONFIG" && break
9883 if test -z "$NCURSES_CONFIG"; then
9884 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9885 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9887 # Extract the first word of "$ac_prog", so it can be a program name with args.
9888 set dummy $ac_prog; ac_word=$2
9889 echo "$as_me:9889: checking for $ac_word" >&5
9890 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9891 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9892 echo $ECHO_N "(cached) $ECHO_C" >&6
9894 if test -n "$ac_ct_NCURSES_CONFIG"; then
9895 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9897 ac_save_IFS=$IFS; IFS=$ac_path_separator
9899 for ac_dir in $ac_dummy; do
9901 test -z "$ac_dir" && ac_dir=.
9902 $as_executable_p "$ac_dir/$ac_word" || continue
9903 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9904 echo "$as_me:9904: found $ac_dir/$ac_word" >&5
9910 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9911 if test -n "$ac_ct_NCURSES_CONFIG"; then
9912 echo "$as_me:9912: result: $ac_ct_NCURSES_CONFIG" >&5
9913 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9915 echo "$as_me:9915: result: no" >&5
9916 echo "${ECHO_T}no" >&6
9919 test -n "$ac_ct_NCURSES_CONFIG" && break
9921 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9923 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9926 if test "$NCURSES_CONFIG" != none ; then
9928 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9930 case "x$cf_add_cflags" in
9933 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9936 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
9937 test "$CFLAGS" != "$cf_old_cflag" || break
9939 CFLAGS="$cf_old_cflag"
9942 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9945 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
9946 test "$CPPFLAGS" != "$cf_old_cflag" || break
9948 CPPFLAGS="$cf_old_cflag"
9957 cf_new_extra_cppflags=
9959 for cf_add_cflags in $cf_add_cflags
9961 case "$cf_fix_cppflags" in
9963 case "$cf_add_cflags" in
9964 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9965 case "$cf_add_cflags" in
9967 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9969 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9970 && test -z "${cf_tst_cflags}" \
9971 && cf_fix_cppflags=yes
9973 if test "$cf_fix_cppflags" = yes ; then
9975 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9976 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9979 elif test "${cf_tst_cflags}" = "\"'" ; then
9981 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9982 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9992 case "$cf_add_cflags" in
9994 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9996 CPPFLAGS=`echo "$CPPFLAGS" | \
9997 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9998 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10003 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10004 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10011 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10012 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10019 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10020 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10022 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10024 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10025 && test -z "${cf_tst_cflags}" \
10026 && cf_fix_cppflags=no
10031 if test -n "$cf_new_cflags" ; then
10033 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10034 CFLAGS="${CFLAGS}$cf_new_cflags"
10038 if test -n "$cf_new_cppflags" ; then
10040 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10041 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10045 if test -n "$cf_new_extra_cppflags" ; then
10047 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10048 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10054 cf_add_libs="$LIBS"
10057 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10058 # filter duplicates
10059 for cf_add_1lib in $cf_add_0lib; do
10060 for cf_add_2lib in $cf_add_libs; do
10061 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10066 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10068 LIBS="$cf_add_libs"
10070 # even with config script, some packages use no-override for curses.h
10072 echo "$as_me:10072: checking if we have identified curses headers" >&5
10073 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10074 if test "${cf_cv_ncurses_header+set}" = set; then
10075 echo $ECHO_N "(cached) $ECHO_C" >&6
10078 cf_cv_ncurses_header=none
10080 ncurses.h ncurses/ncurses.h \
10081 curses.h ncurses/curses.h
10083 cat >"conftest.$ac_ext" <<_ACEOF
10084 #line 10084 "configure"
10085 #include "confdefs.h"
10086 #include <${cf_header}>
10090 initscr(); tgoto("?", 0,0)
10095 rm -f "conftest.$ac_objext"
10096 if { (eval echo "$as_me:10096: \"$ac_compile\"") >&5
10097 (eval $ac_compile) 2>&5
10099 echo "$as_me:10099: \$? = $ac_status" >&5
10100 (exit "$ac_status"); } &&
10101 { ac_try='test -s "conftest.$ac_objext"'
10102 { (eval echo "$as_me:10102: \"$ac_try\"") >&5
10103 (eval $ac_try) 2>&5
10105 echo "$as_me:10105: \$? = $ac_status" >&5
10106 (exit "$ac_status"); }; }; then
10107 cf_cv_ncurses_header=$cf_header; break
10109 echo "$as_me: failed program was:" >&5
10110 cat "conftest.$ac_ext" >&5
10112 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10116 echo "$as_me:10116: result: $cf_cv_ncurses_header" >&5
10117 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10119 if test "$cf_cv_ncurses_header" = none ; then
10120 { { echo "$as_me:10120: error: No curses header-files found" >&5
10121 echo "$as_me: error: No curses header-files found" >&2;}
10122 { (exit 1); exit 1; }; }
10125 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10127 for ac_header in $cf_cv_ncurses_header
10129 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10130 echo "$as_me:10130: checking for $ac_header" >&5
10131 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10132 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10133 echo $ECHO_N "(cached) $ECHO_C" >&6
10135 cat >"conftest.$ac_ext" <<_ACEOF
10136 #line 10136 "configure"
10137 #include "confdefs.h"
10138 #include <$ac_header>
10140 if { (eval echo "$as_me:10140: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10141 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10143 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10145 cat conftest.err >&5
10146 echo "$as_me:10146: \$? = $ac_status" >&5
10147 (exit "$ac_status"); } >/dev/null; then
10148 if test -s conftest.err; then
10149 ac_cpp_err=$ac_c_preproc_warn_flag
10156 if test -z "$ac_cpp_err"; then
10157 eval "$as_ac_Header=yes"
10159 echo "$as_me: failed program was:" >&5
10160 cat "conftest.$ac_ext" >&5
10161 eval "$as_ac_Header=no"
10163 rm -f conftest.err "conftest.$ac_ext"
10165 echo "$as_me:10165: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10166 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10167 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10168 cat >>confdefs.h <<EOF
10169 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10175 cat >>confdefs.h <<\EOF
10179 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10181 cat >>confdefs.h <<EOF
10182 #define $cf_nculib_ROOT 1
10185 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
10189 cf_ncuhdr_root=ncurses
10191 test -n "$cf_cv_curses_dir" && \
10192 test "$cf_cv_curses_dir" != "no" && { \
10194 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
10195 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
10197 while test "$cf_add_incdir" != /usr/include
10199 if test -d "$cf_add_incdir"
10202 if test -n "$CFLAGS$CPPFLAGS" ; then
10203 # a loop is needed to ensure we can add subdirs of existing dirs
10204 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10205 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10206 cf_have_incdir=yes; break
10211 if test "$cf_have_incdir" = no ; then
10212 if test "$cf_add_incdir" = /usr/local/include ; then
10213 if test "$GCC" = yes
10215 cf_save_CPPFLAGS=$CPPFLAGS
10217 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10218 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10220 cat >"conftest.$ac_ext" <<_ACEOF
10221 #line 10221 "configure"
10222 #include "confdefs.h"
10232 rm -f "conftest.$ac_objext"
10233 if { (eval echo "$as_me:10233: \"$ac_compile\"") >&5
10234 (eval $ac_compile) 2>&5
10236 echo "$as_me:10236: \$? = $ac_status" >&5
10237 (exit "$ac_status"); } &&
10238 { ac_try='test -s "conftest.$ac_objext"'
10239 { (eval echo "$as_me:10239: \"$ac_try\"") >&5
10240 (eval $ac_try) 2>&5
10242 echo "$as_me:10242: \$? = $ac_status" >&5
10243 (exit "$ac_status"); }; }; then
10246 echo "$as_me: failed program was:" >&5
10247 cat "conftest.$ac_ext" >&5
10250 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10251 CPPFLAGS=$cf_save_CPPFLAGS
10256 if test "$cf_have_incdir" = no ; then
10257 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10259 echo "${as_me:-configure}:10259: testing adding $cf_add_incdir to include-path ..." 1>&5
10261 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10263 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10264 test "$cf_top_incdir" = "$cf_add_incdir" && break
10265 cf_add_incdir="$cf_top_incdir"
10278 echo "$as_me:10278: checking for $cf_ncuhdr_root header in include-path" >&5
10279 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10280 if test "${cf_cv_ncurses_h+set}" = set; then
10281 echo $ECHO_N "(cached) $ECHO_C" >&6
10284 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10285 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
10286 for cf_header in $cf_header_list
10289 cat >"conftest.$ac_ext" <<_ACEOF
10290 #line 10290 "configure"
10291 #include "confdefs.h"
10293 #include <$cf_header>
10298 #ifdef NCURSES_VERSION
10300 printf("%s\\n", NCURSES_VERSION);
10313 rm -f "conftest.$ac_objext"
10314 if { (eval echo "$as_me:10314: \"$ac_compile\"") >&5
10315 (eval $ac_compile) 2>&5
10317 echo "$as_me:10317: \$? = $ac_status" >&5
10318 (exit "$ac_status"); } &&
10319 { ac_try='test -s "conftest.$ac_objext"'
10320 { (eval echo "$as_me:10320: \"$ac_try\"") >&5
10321 (eval $ac_try) 2>&5
10323 echo "$as_me:10323: \$? = $ac_status" >&5
10324 (exit "$ac_status"); }; }; then
10325 cf_cv_ncurses_h=$cf_header
10328 echo "$as_me: failed program was:" >&5
10329 cat "conftest.$ac_ext" >&5
10332 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10334 test "$cf_cv_ncurses_h" != no && break
10338 echo "$as_me:10338: result: $cf_cv_ncurses_h" >&5
10339 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10341 if test "$cf_cv_ncurses_h" != no ; then
10342 cf_cv_ncurses_header=$cf_cv_ncurses_h
10345 echo "$as_me:10345: checking for $cf_ncuhdr_root include-path" >&5
10346 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10347 if test "${cf_cv_ncurses_h2+set}" = set; then
10348 echo $ECHO_N "(cached) $ECHO_C" >&6
10351 test -n "$verbose" && echo
10355 # collect the current set of include-directories from compiler flags
10356 cf_header_path_list=""
10357 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10358 for cf_header_path in $CPPFLAGS $CFLAGS
10360 case "$cf_header_path" in
10362 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10364 test "x$cf_header_path" != "xNONE" && \
10365 test -d "$cf_header_path" && \
10367 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10368 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
10369 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10370 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10371 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10372 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"
10375 cf_header_path_list="$cf_header_path_list $cf_search"
10381 # add the variations for the package we are looking for
10385 test "x$prefix" != "xNONE" && \
10386 test -d "$prefix" && \
10388 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10389 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
10390 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10391 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10392 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10393 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10396 for cf_subdir_prefix in \
10405 test "x$cf_subdir_prefix" != "x$prefix" && \
10406 test -d "$cf_subdir_prefix" && \
10407 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10408 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10409 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
10410 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10411 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10412 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10413 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"
10418 test "$includedir" != NONE && \
10419 test "$includedir" != "/usr/include" && \
10420 test -d "$includedir" && {
10421 test -d "$includedir" && cf_search="$cf_search $includedir"
10422 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10425 test "$oldincludedir" != NONE && \
10426 test "$oldincludedir" != "/usr/include" && \
10427 test -d "$oldincludedir" && {
10428 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
10429 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10432 cf_search="$cf_search $cf_header_path_list"
10434 test -n "$verbose" && echo "search path $cf_search"
10435 cf_save2_CPPFLAGS="$CPPFLAGS"
10436 for cf_incdir in $cf_search
10439 if test -n "$cf_incdir" ; then
10440 for cf_add_incdir in $cf_incdir
10442 while test "$cf_add_incdir" != /usr/include
10444 if test -d "$cf_add_incdir"
10447 if test -n "$CFLAGS$CPPFLAGS" ; then
10448 # a loop is needed to ensure we can add subdirs of existing dirs
10449 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10450 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10451 cf_have_incdir=yes; break
10456 if test "$cf_have_incdir" = no ; then
10457 if test "$cf_add_incdir" = /usr/local/include ; then
10458 if test "$GCC" = yes
10460 cf_save_CPPFLAGS=$CPPFLAGS
10462 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10463 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10465 cat >"conftest.$ac_ext" <<_ACEOF
10466 #line 10466 "configure"
10467 #include "confdefs.h"
10477 rm -f "conftest.$ac_objext"
10478 if { (eval echo "$as_me:10478: \"$ac_compile\"") >&5
10479 (eval $ac_compile) 2>&5
10481 echo "$as_me:10481: \$? = $ac_status" >&5
10482 (exit "$ac_status"); } &&
10483 { ac_try='test -s "conftest.$ac_objext"'
10484 { (eval echo "$as_me:10484: \"$ac_try\"") >&5
10485 (eval $ac_try) 2>&5
10487 echo "$as_me:10487: \$? = $ac_status" >&5
10488 (exit "$ac_status"); }; }; then
10491 echo "$as_me: failed program was:" >&5
10492 cat "conftest.$ac_ext" >&5
10495 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10496 CPPFLAGS=$cf_save_CPPFLAGS
10501 if test "$cf_have_incdir" = no ; then
10502 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10504 echo "${as_me:-configure}:10504: testing adding $cf_add_incdir to include-path ..." 1>&5
10506 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10508 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10509 test "$cf_top_incdir" = "$cf_add_incdir" && break
10510 cf_add_incdir="$cf_top_incdir"
10526 cat >"conftest.$ac_ext" <<_ACEOF
10527 #line 10527 "configure"
10528 #include "confdefs.h"
10530 #include <$cf_header>
10535 #ifdef NCURSES_VERSION
10537 printf("%s\\n", NCURSES_VERSION);
10550 rm -f "conftest.$ac_objext"
10551 if { (eval echo "$as_me:10551: \"$ac_compile\"") >&5
10552 (eval $ac_compile) 2>&5
10554 echo "$as_me:10554: \$? = $ac_status" >&5
10555 (exit "$ac_status"); } &&
10556 { ac_try='test -s "conftest.$ac_objext"'
10557 { (eval echo "$as_me:10557: \"$ac_try\"") >&5
10558 (eval $ac_try) 2>&5
10560 echo "$as_me:10560: \$? = $ac_status" >&5
10561 (exit "$ac_status"); }; }; then
10562 cf_cv_ncurses_h2=$cf_header
10565 echo "$as_me: failed program was:" >&5
10566 cat "conftest.$ac_ext" >&5
10567 cf_cv_ncurses_h2=no
10569 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10571 if test "$cf_cv_ncurses_h2" != no ; then
10572 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10573 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
10576 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10578 CPPFLAGS="$cf_save2_CPPFLAGS"
10579 test "$cf_cv_ncurses_h2" != no && break
10581 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10581: error: not found" >&5
10582 echo "$as_me: error: not found" >&2;}
10583 { (exit 1); exit 1; }; }
10586 echo "$as_me:10586: result: $cf_cv_ncurses_h2" >&5
10587 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10589 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
10590 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
10591 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
10592 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
10595 if test -n "$cf_1st_incdir" ; then
10596 for cf_add_incdir in $cf_1st_incdir
10598 while test "$cf_add_incdir" != /usr/include
10600 if test -d "$cf_add_incdir"
10603 if test -n "$CFLAGS$CPPFLAGS" ; then
10604 # a loop is needed to ensure we can add subdirs of existing dirs
10605 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10606 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10607 cf_have_incdir=yes; break
10612 if test "$cf_have_incdir" = no ; then
10613 if test "$cf_add_incdir" = /usr/local/include ; then
10614 if test "$GCC" = yes
10616 cf_save_CPPFLAGS=$CPPFLAGS
10618 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10619 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10621 cat >"conftest.$ac_ext" <<_ACEOF
10622 #line 10622 "configure"
10623 #include "confdefs.h"
10633 rm -f "conftest.$ac_objext"
10634 if { (eval echo "$as_me:10634: \"$ac_compile\"") >&5
10635 (eval $ac_compile) 2>&5
10637 echo "$as_me:10637: \$? = $ac_status" >&5
10638 (exit "$ac_status"); } &&
10639 { ac_try='test -s "conftest.$ac_objext"'
10640 { (eval echo "$as_me:10640: \"$ac_try\"") >&5
10641 (eval $ac_try) 2>&5
10643 echo "$as_me:10643: \$? = $ac_status" >&5
10644 (exit "$ac_status"); }; }; then
10647 echo "$as_me: failed program was:" >&5
10648 cat "conftest.$ac_ext" >&5
10651 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10652 CPPFLAGS=$cf_save_CPPFLAGS
10657 if test "$cf_have_incdir" = no ; then
10658 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10660 echo "${as_me:-configure}:10660: testing adding $cf_add_incdir to include-path ..." 1>&5
10662 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10664 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10665 test "$cf_top_incdir" = "$cf_add_incdir" && break
10666 cf_add_incdir="$cf_top_incdir"
10679 # Set definitions to allow ifdef'ing for ncurses.h
10681 case "$cf_cv_ncurses_header" in
10684 cat >>confdefs.h <<\EOF
10685 #define HAVE_NCURSES_H 1
10691 case "$cf_cv_ncurses_header" in
10692 (ncurses/curses.h|ncurses/ncurses.h)
10694 cat >>confdefs.h <<\EOF
10695 #define HAVE_NCURSES_NCURSES_H 1
10699 (ncursesw/curses.h|ncursesw/ncurses.h)
10701 cat >>confdefs.h <<\EOF
10702 #define HAVE_NCURSESW_NCURSES_H 1
10708 echo "$as_me:10708: checking for terminfo header" >&5
10709 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10710 if test "${cf_cv_term_header+set}" = set; then
10711 echo $ECHO_N "(cached) $ECHO_C" >&6
10714 case "${cf_cv_ncurses_header}" in
10715 (*/ncurses.h|*/ncursesw.h)
10716 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10719 cf_term_header=term.h
10723 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10725 cat >"conftest.$ac_ext" <<_ACEOF
10726 #line 10726 "configure"
10727 #include "confdefs.h"
10729 #include <${cf_cv_ncurses_header:-curses.h}>
10730 #include <$cf_test>
10735 int x = auto_left_margin; (void)x
10740 rm -f "conftest.$ac_objext"
10741 if { (eval echo "$as_me:10741: \"$ac_compile\"") >&5
10742 (eval $ac_compile) 2>&5
10744 echo "$as_me:10744: \$? = $ac_status" >&5
10745 (exit "$ac_status"); } &&
10746 { ac_try='test -s "conftest.$ac_objext"'
10747 { (eval echo "$as_me:10747: \"$ac_try\"") >&5
10748 (eval $ac_try) 2>&5
10750 echo "$as_me:10750: \$? = $ac_status" >&5
10751 (exit "$ac_status"); }; }; then
10753 cf_cv_term_header="$cf_test"
10755 echo "$as_me: failed program was:" >&5
10756 cat "conftest.$ac_ext" >&5
10758 cf_cv_term_header=unknown
10761 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10762 test "$cf_cv_term_header" != unknown && break
10766 echo "$as_me:10766: result: $cf_cv_term_header" >&5
10767 echo "${ECHO_T}$cf_cv_term_header" >&6
10769 # Set definitions to allow ifdef'ing to accommodate subdirectories
10771 case "$cf_cv_term_header" in
10774 cat >>confdefs.h <<\EOF
10775 #define HAVE_TERM_H 1
10781 case "$cf_cv_term_header" in
10784 cat >>confdefs.h <<\EOF
10785 #define HAVE_NCURSES_TERM_H 1
10791 cat >>confdefs.h <<\EOF
10792 #define HAVE_NCURSESW_TERM_H 1
10798 # some applications need this, but should check for NCURSES_VERSION
10800 cat >>confdefs.h <<\EOF
10804 echo "$as_me:10804: checking for ncurses version" >&5
10805 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10806 if test "${cf_cv_ncurses_version+set}" = set; then
10807 echo $ECHO_N "(cached) $ECHO_C" >&6
10810 cf_cv_ncurses_version=no
10812 rm -f "$cf_tempfile"
10813 if test "$cross_compiling" = yes; then
10815 # This will not work if the preprocessor splits the line after the
10816 # Autoconf token. The 'unproto' program does that.
10817 cat > "conftest.$ac_ext" <<EOF
10818 #include <${cf_cv_ncurses_header:-curses.h}>
10820 #ifdef NCURSES_VERSION
10821 Autoconf NCURSES_VERSION
10829 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10830 { (eval echo "$as_me:10830: \"$cf_try\"") >&5
10831 (eval $cf_try) 2>&5
10833 echo "$as_me:10833: \$? = $ac_status" >&5
10834 (exit "$ac_status"); }
10835 if test -f conftest.out ; then
10836 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
10837 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10842 cat >"conftest.$ac_ext" <<_ACEOF
10843 #line 10843 "configure"
10844 #include "confdefs.h"
10846 #include <${cf_cv_ncurses_header:-curses.h}>
10850 FILE *fp = fopen("$cf_tempfile", "w");
10851 #ifdef NCURSES_VERSION
10852 # ifdef NCURSES_VERSION_PATCH
10853 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10855 fprintf(fp, "%s\\n", NCURSES_VERSION);
10858 # ifdef __NCURSES_H
10859 fprintf(fp, "old\\n");
10864 ${cf_cv_main_return:-return}(0);
10867 rm -f "conftest$ac_exeext"
10868 if { (eval echo "$as_me:10868: \"$ac_link\"") >&5
10869 (eval $ac_link) 2>&5
10871 echo "$as_me:10871: \$? = $ac_status" >&5
10872 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10873 { (eval echo "$as_me:10873: \"$ac_try\"") >&5
10874 (eval $ac_try) 2>&5
10876 echo "$as_me:10876: \$? = $ac_status" >&5
10877 (exit "$ac_status"); }; }; then
10879 cf_cv_ncurses_version=`cat $cf_tempfile`
10881 echo "$as_me: program exited with status $ac_status" >&5
10882 echo "$as_me: failed program was:" >&5
10883 cat "conftest.$ac_ext" >&5
10885 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10887 rm -f "$cf_tempfile"
10890 echo "$as_me:10890: result: $cf_cv_ncurses_version" >&5
10891 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10892 test "$cf_cv_ncurses_version" = no ||
10893 cat >>confdefs.h <<\EOF
10897 cf_nculib_root=ncurses
10898 # This works, except for the special case where we find gpm, but
10899 # ncurses is in a nonstandard location via $LIBS, and we really want
10902 cf_ncurses_SAVE="$LIBS"
10903 echo "$as_me:10903: checking for Gpm_Open in -lgpm" >&5
10904 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10905 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10906 echo $ECHO_N "(cached) $ECHO_C" >&6
10908 ac_check_lib_save_LIBS=$LIBS
10910 cat >"conftest.$ac_ext" <<_ACEOF
10911 #line 10911 "configure"
10912 #include "confdefs.h"
10914 /* Override any gcc2 internal prototype to avoid an error. */
10918 /* We use char because int might match the return type of a gcc2
10919 builtin and then its argument prototype would still apply. */
10929 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10930 if { (eval echo "$as_me:10930: \"$ac_link\"") >&5
10931 (eval $ac_link) 2>&5
10933 echo "$as_me:10933: \$? = $ac_status" >&5
10934 (exit "$ac_status"); } &&
10935 { ac_try='test -s "conftest$ac_exeext"'
10936 { (eval echo "$as_me:10936: \"$ac_try\"") >&5
10937 (eval $ac_try) 2>&5
10939 echo "$as_me:10939: \$? = $ac_status" >&5
10940 (exit "$ac_status"); }; }; then
10941 ac_cv_lib_gpm_Gpm_Open=yes
10943 echo "$as_me: failed program was:" >&5
10944 cat "conftest.$ac_ext" >&5
10945 ac_cv_lib_gpm_Gpm_Open=no
10947 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10948 LIBS=$ac_check_lib_save_LIBS
10950 echo "$as_me:10950: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10951 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
10952 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
10953 echo "$as_me:10953: checking for initscr in -lgpm" >&5
10954 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
10955 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
10956 echo $ECHO_N "(cached) $ECHO_C" >&6
10958 ac_check_lib_save_LIBS=$LIBS
10960 cat >"conftest.$ac_ext" <<_ACEOF
10961 #line 10961 "configure"
10962 #include "confdefs.h"
10964 /* Override any gcc2 internal prototype to avoid an error. */
10968 /* We use char because int might match the return type of a gcc2
10969 builtin and then its argument prototype would still apply. */
10979 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10980 if { (eval echo "$as_me:10980: \"$ac_link\"") >&5
10981 (eval $ac_link) 2>&5
10983 echo "$as_me:10983: \$? = $ac_status" >&5
10984 (exit "$ac_status"); } &&
10985 { ac_try='test -s "conftest$ac_exeext"'
10986 { (eval echo "$as_me:10986: \"$ac_try\"") >&5
10987 (eval $ac_try) 2>&5
10989 echo "$as_me:10989: \$? = $ac_status" >&5
10990 (exit "$ac_status"); }; }; then
10991 ac_cv_lib_gpm_initscr=yes
10993 echo "$as_me: failed program was:" >&5
10994 cat "conftest.$ac_ext" >&5
10995 ac_cv_lib_gpm_initscr=no
10997 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10998 LIBS=$ac_check_lib_save_LIBS
11000 echo "$as_me:11000: result: $ac_cv_lib_gpm_initscr" >&5
11001 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
11002 if test "$ac_cv_lib_gpm_initscr" = yes; then
11003 LIBS="$cf_ncurses_SAVE"
11005 cf_ncurses_LIBS="-lgpm"
11012 # This is only necessary if you are linking against an obsolete
11013 # version of ncurses (but it should do no harm, since it is static).
11014 if test "$cf_nculib_root" = ncurses ; then
11015 echo "$as_me:11015: checking for tgoto in -lmytinfo" >&5
11016 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
11017 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
11018 echo $ECHO_N "(cached) $ECHO_C" >&6
11020 ac_check_lib_save_LIBS=$LIBS
11021 LIBS="-lmytinfo $LIBS"
11022 cat >"conftest.$ac_ext" <<_ACEOF
11023 #line 11023 "configure"
11024 #include "confdefs.h"
11026 /* Override any gcc2 internal prototype to avoid an error. */
11030 /* We use char because int might match the return type of a gcc2
11031 builtin and then its argument prototype would still apply. */
11041 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11042 if { (eval echo "$as_me:11042: \"$ac_link\"") >&5
11043 (eval $ac_link) 2>&5
11045 echo "$as_me:11045: \$? = $ac_status" >&5
11046 (exit "$ac_status"); } &&
11047 { ac_try='test -s "conftest$ac_exeext"'
11048 { (eval echo "$as_me:11048: \"$ac_try\"") >&5
11049 (eval $ac_try) 2>&5
11051 echo "$as_me:11051: \$? = $ac_status" >&5
11052 (exit "$ac_status"); }; }; then
11053 ac_cv_lib_mytinfo_tgoto=yes
11055 echo "$as_me: failed program was:" >&5
11056 cat "conftest.$ac_ext" >&5
11057 ac_cv_lib_mytinfo_tgoto=no
11059 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11060 LIBS=$ac_check_lib_save_LIBS
11062 echo "$as_me:11062: result: $ac_cv_lib_mytinfo_tgoto" >&5
11063 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11064 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
11065 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
11072 cf_add_libs="$LIBS"
11075 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11076 # filter duplicates
11077 for cf_add_1lib in $cf_add_0lib; do
11078 for cf_add_2lib in $cf_add_libs; do
11079 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11084 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11086 LIBS="$cf_add_libs"
11088 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
11091 cf_add_libs="$LIBS"
11094 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11095 # filter duplicates
11096 for cf_add_1lib in $cf_add_0lib; do
11097 for cf_add_2lib in $cf_add_libs; do
11098 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11103 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11105 LIBS="$cf_add_libs"
11109 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
11111 echo "$as_me:11111: checking for initscr" >&5
11112 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
11113 if test "${ac_cv_func_initscr+set}" = set; then
11114 echo $ECHO_N "(cached) $ECHO_C" >&6
11116 cat >"conftest.$ac_ext" <<_ACEOF
11117 #line 11117 "configure"
11118 #include "confdefs.h"
11119 #define initscr autoconf_temporary
11120 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11127 /* We use char because int might match the return type of a gcc2
11128 builtin and then its argument prototype would still apply. */
11129 char initscr (void);
11135 /* The GNU C library defines stubs for functions which it implements
11136 to always fail with ENOSYS. Some functions are actually named
11137 something starting with __ and the normal name is an alias. */
11138 #if defined (__stub_initscr) || defined (__stub___initscr)
11139 #error found stub for initscr
11147 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11148 if { (eval echo "$as_me:11148: \"$ac_link\"") >&5
11149 (eval $ac_link) 2>&5
11151 echo "$as_me:11151: \$? = $ac_status" >&5
11152 (exit "$ac_status"); } &&
11153 { ac_try='test -s "conftest$ac_exeext"'
11154 { (eval echo "$as_me:11154: \"$ac_try\"") >&5
11155 (eval $ac_try) 2>&5
11157 echo "$as_me:11157: \$? = $ac_status" >&5
11158 (exit "$ac_status"); }; }; then
11159 ac_cv_func_initscr=yes
11161 echo "$as_me: failed program was:" >&5
11162 cat "conftest.$ac_ext" >&5
11163 ac_cv_func_initscr=no
11165 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11167 echo "$as_me:11167: result: $ac_cv_func_initscr" >&5
11168 echo "${ECHO_T}$ac_cv_func_initscr" >&6
11169 if test "$ac_cv_func_initscr" = yes; then
11170 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11173 cf_save_LIBS="$LIBS"
11174 echo "$as_me:11174: checking for initscr in -l$cf_nculib_root" >&5
11175 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
11176 LIBS="-l$cf_nculib_root $LIBS"
11177 cat >"conftest.$ac_ext" <<_ACEOF
11178 #line 11178 "configure"
11179 #include "confdefs.h"
11180 #include <${cf_cv_ncurses_header:-curses.h}>
11189 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11190 if { (eval echo "$as_me:11190: \"$ac_link\"") >&5
11191 (eval $ac_link) 2>&5
11193 echo "$as_me:11193: \$? = $ac_status" >&5
11194 (exit "$ac_status"); } &&
11195 { ac_try='test -s "conftest$ac_exeext"'
11196 { (eval echo "$as_me:11196: \"$ac_try\"") >&5
11197 (eval $ac_try) 2>&5
11199 echo "$as_me:11199: \$? = $ac_status" >&5
11200 (exit "$ac_status"); }; }; then
11201 echo "$as_me:11201: result: yes" >&5
11202 echo "${ECHO_T}yes" >&6
11203 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11206 echo "$as_me: failed program was:" >&5
11207 cat "conftest.$ac_ext" >&5
11208 echo "$as_me:11208: result: no" >&5
11209 echo "${ECHO_T}no" >&6
11212 cf_library_path_list=""
11213 if test -n "${LDFLAGS}${LIBS}" ; then
11214 for cf_library_path in $LDFLAGS $LIBS
11216 case "$cf_library_path" in
11218 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11220 test "x$cf_library_path" != "xNONE" && \
11221 test -d "$cf_library_path" && \
11223 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11224 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
11225 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11226 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11227 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11228 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"
11231 cf_library_path_list="$cf_library_path_list $cf_search"
11239 test "x$prefix" != "xNONE" && \
11240 test -d "$prefix" && \
11242 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11243 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
11244 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11245 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11246 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11247 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11250 for cf_subdir_prefix in \
11259 test "x$cf_subdir_prefix" != "x$prefix" && \
11260 test -d "$cf_subdir_prefix" && \
11261 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11262 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11263 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
11264 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11265 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11266 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11267 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"
11272 cf_search="$cf_library_path_list $cf_search"
11274 for cf_libdir in $cf_search
11276 echo "$as_me:11276: checking for -l$cf_nculib_root in $cf_libdir" >&5
11277 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11278 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11279 cat >"conftest.$ac_ext" <<_ACEOF
11280 #line 11280 "configure"
11281 #include "confdefs.h"
11282 #include <${cf_cv_ncurses_header:-curses.h}>
11291 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11292 if { (eval echo "$as_me:11292: \"$ac_link\"") >&5
11293 (eval $ac_link) 2>&5
11295 echo "$as_me:11295: \$? = $ac_status" >&5
11296 (exit "$ac_status"); } &&
11297 { ac_try='test -s "conftest$ac_exeext"'
11298 { (eval echo "$as_me:11298: \"$ac_try\"") >&5
11299 (eval $ac_try) 2>&5
11301 echo "$as_me:11301: \$? = $ac_status" >&5
11302 (exit "$ac_status"); }; }; then
11303 echo "$as_me:11303: result: yes" >&5
11304 echo "${ECHO_T}yes" >&6
11305 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11308 echo "$as_me: failed program was:" >&5
11309 cat "conftest.$ac_ext" >&5
11310 echo "$as_me:11310: result: no" >&5
11311 echo "${ECHO_T}no" >&6
11312 LIBS="$cf_save_LIBS"
11314 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11318 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11322 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
11324 if test "$cf_found_library" = no ; then
11325 { { echo "$as_me:11325: error: Cannot link $cf_nculib_root library" >&5
11326 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11327 { (exit 1); exit 1; }; }
11332 if test -n "$cf_ncurses_LIBS" ; then
11333 echo "$as_me:11333: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11334 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11335 cf_ncurses_SAVE="$LIBS"
11336 for p in $cf_ncurses_LIBS ; do
11337 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
11338 if test "$q" != "$LIBS" ; then
11342 cat >"conftest.$ac_ext" <<_ACEOF
11343 #line 11343 "configure"
11344 #include "confdefs.h"
11345 #include <${cf_cv_ncurses_header:-curses.h}>
11349 initscr(); mousemask(0,0); tigetstr((char *)0);
11354 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11355 if { (eval echo "$as_me:11355: \"$ac_link\"") >&5
11356 (eval $ac_link) 2>&5
11358 echo "$as_me:11358: \$? = $ac_status" >&5
11359 (exit "$ac_status"); } &&
11360 { ac_try='test -s "conftest$ac_exeext"'
11361 { (eval echo "$as_me:11361: \"$ac_try\"") >&5
11362 (eval $ac_try) 2>&5
11364 echo "$as_me:11364: \$? = $ac_status" >&5
11365 (exit "$ac_status"); }; }; then
11366 echo "$as_me:11366: result: yes" >&5
11367 echo "${ECHO_T}yes" >&6
11369 echo "$as_me: failed program was:" >&5
11370 cat "conftest.$ac_ext" >&5
11371 echo "$as_me:11371: result: no" >&5
11372 echo "${ECHO_T}no" >&6
11373 LIBS="$cf_ncurses_SAVE"
11375 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11378 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11380 cat >>confdefs.h <<EOF
11381 #define $cf_nculib_ROOT 1
11386 NCURSES_CONFIG=none
11391 if test "$NCURSES_CONFIG_PKG" != none ; then
11392 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
11394 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11395 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11396 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11398 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
11399 if test -z "$cf_cv_abi_version"
11401 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
11404 elif test "$NCURSES_CONFIG" != none ; then
11406 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
11408 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11409 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11410 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11412 # ABI version is not available from headers
11413 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
11417 for cf_name in MAJOR MINOR PATCH
11419 cat >conftest.$ac_ext <<CF_EOF
11420 #include <${cf_cv_ncurses_header:-curses.h}>
11421 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
11423 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
11424 { (eval echo "$as_me:11424: \"$cf_try\"") >&5
11425 (eval $cf_try) 2>&5
11427 echo "$as_me:11427: \$? = $ac_status" >&5
11428 (exit "$ac_status"); }
11429 if test -f conftest.out ; then
11430 cf_result=`sed -e "s/^.*AUTOCONF_${cf_name}[ ][ ]*//" conftest.out`
11431 eval NCURSES_$cf_name=\"$cf_result\"
11432 # cat conftest.$ac_ext
11437 cf_cv_abi_version=${NCURSES_MAJOR}
11441 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
11443 cf_cv_timestamp=`date`
11445 echo "$as_me:11445: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
11446 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
11448 echo "$as_me:11448: checking if you want to have a library-prefix" >&5
11449 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
11451 # Check whether --with-lib-prefix or --without-lib-prefix was given.
11452 if test "${with_lib_prefix+set}" = set; then
11453 withval="$with_lib_prefix"
11454 with_lib_prefix=$withval
11456 with_lib_prefix=auto
11458 echo "$as_me:11458: result: $with_lib_prefix" >&5
11459 echo "${ECHO_T}$with_lib_prefix" >&6
11461 if test "$with_lib_prefix" = auto
11464 case "$cf_cv_system_name" in
11466 if test "$DFT_LWR_MODEL" = libtool; then
11475 (*) LIB_PREFIX='lib'
11478 cf_prefix=$LIB_PREFIX
11480 elif test "$with_lib_prefix" = no
11484 LIB_PREFIX=$with_lib_prefix
11489 ###############################################################################
11491 if test X"$CC_G_OPT" = X"" ; then
11493 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
11496 echo "$as_me:11496: checking for default loader flags" >&5
11497 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
11498 case $DFT_LWR_MODEL in
11499 (normal) LD_MODEL='' ;;
11500 (debug) LD_MODEL=$CC_G_OPT ;;
11501 (profile) LD_MODEL='-pg';;
11502 (shared) LD_MODEL='' ;;
11504 echo "$as_me:11504: result: $LD_MODEL" >&5
11505 echo "${ECHO_T}$LD_MODEL" >&6
11508 if test "x$cf_cv_enable_rpath" != xno
11510 echo "$as_me:11510: checking for an rpath option" >&5
11511 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
11512 case "$cf_cv_system_name" in
11514 if test "$GCC" = yes; then
11515 LD_RPATH_OPT="-Wl,-rpath,"
11517 LD_RPATH_OPT="-rpath "
11520 (linux*|gnu*|k*bsd*-gnu|freebsd*)
11521 LD_RPATH_OPT="-Wl,-rpath,"
11523 (openbsd[2-9].*|mirbsd*)
11524 LD_RPATH_OPT="-Wl,-rpath,"
11527 LD_RPATH_OPT="-rpath "
11530 LD_RPATH_OPT="-Wl,-rpath,"
11533 LD_RPATH_OPT="-rpath "
11541 echo "$as_me:11541: result: $LD_RPATH_OPT" >&5
11542 echo "${ECHO_T}$LD_RPATH_OPT" >&6
11544 case "x$LD_RPATH_OPT" in
11546 echo "$as_me:11546: checking if we need a space after rpath option" >&5
11547 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
11548 cf_save_LIBS="$LIBS"
11550 cf_add_libs="$LIBS"
11553 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11554 # filter duplicates
11555 for cf_add_1lib in $cf_add_0lib; do
11556 for cf_add_2lib in $cf_add_libs; do
11557 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11562 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11564 LIBS="$cf_add_libs"
11566 cat >"conftest.$ac_ext" <<_ACEOF
11567 #line 11567 "configure"
11568 #include "confdefs.h"
11578 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11579 if { (eval echo "$as_me:11579: \"$ac_link\"") >&5
11580 (eval $ac_link) 2>&5
11582 echo "$as_me:11582: \$? = $ac_status" >&5
11583 (exit "$ac_status"); } &&
11584 { ac_try='test -s "conftest$ac_exeext"'
11585 { (eval echo "$as_me:11585: \"$ac_try\"") >&5
11586 (eval $ac_try) 2>&5
11588 echo "$as_me:11588: \$? = $ac_status" >&5
11589 (exit "$ac_status"); }; }; then
11592 echo "$as_me: failed program was:" >&5
11593 cat "conftest.$ac_ext" >&5
11596 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11597 LIBS="$cf_save_LIBS"
11598 echo "$as_me:11598: result: $cf_rpath_space" >&5
11599 echo "${ECHO_T}$cf_rpath_space" >&6
11600 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
11609 INSTALL_LIB="-m 644"
11610 : ${rel_builddir:=.}
11616 cf_cv_do_symlinks=no
11618 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
11620 echo "$as_me:11620: checking if release/abi version should be used for shared libs" >&5
11621 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
11623 # Check whether --with-shlib-version or --without-shlib-version was given.
11624 if test "${with_shlib_version+set}" = set; then
11625 withval="$with_shlib_version"
11626 test -z "$withval" && withval=auto
11629 cf_cv_shlib_version=auto
11632 cf_cv_shlib_version=$withval
11635 echo "$as_me:11635: result: $withval" >&5
11636 echo "${ECHO_T}$withval" >&6
11637 { { echo "$as_me:11637: error: option value must be one of: rel, abi, or auto" >&5
11638 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
11639 { (exit 1); exit 1; }; }
11644 cf_cv_shlib_version=auto
11646 echo "$as_me:11646: result: $cf_cv_shlib_version" >&5
11647 echo "${ECHO_T}$cf_cv_shlib_version" >&6
11649 cf_cv_rm_so_locs=no
11652 # Some less-capable ports of gcc support only -fpic
11656 if test "$GCC" = yes
11660 case "$cf_cv_system_name" in
11661 (*linux*) # e.g., PGI compiler
11667 if test "$cf_try_fPIC" = yes
11669 echo "$as_me:11669: checking which $CC option to use" >&5
11670 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
11671 cf_save_CFLAGS="$CFLAGS"
11672 for CC_SHARED_OPTS in -fPIC -fpic ''
11674 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
11675 cat >"conftest.$ac_ext" <<_ACEOF
11676 #line 11676 "configure"
11677 #include "confdefs.h"
11687 rm -f "conftest.$ac_objext"
11688 if { (eval echo "$as_me:11688: \"$ac_compile\"") >&5
11689 (eval $ac_compile) 2>&5
11691 echo "$as_me:11691: \$? = $ac_status" >&5
11692 (exit "$ac_status"); } &&
11693 { ac_try='test -s "conftest.$ac_objext"'
11694 { (eval echo "$as_me:11694: \"$ac_try\"") >&5
11695 (eval $ac_try) 2>&5
11697 echo "$as_me:11697: \$? = $ac_status" >&5
11698 (exit "$ac_status"); }; }; then
11701 echo "$as_me: failed program was:" >&5
11702 cat "conftest.$ac_ext" >&5
11704 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11706 echo "$as_me:11706: result: $CC_SHARED_OPTS" >&5
11707 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
11708 CFLAGS="$cf_save_CFLAGS"
11711 cf_cv_shlib_version_infix=no
11713 case "$cf_cv_system_name" in
11714 (aix4.3-9*|aix[5-7]*)
11715 if test "$GCC" = yes; then
11716 CC_SHARED_OPTS='-Wl,-brtl'
11717 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11719 CC_SHARED_OPTS='-brtl'
11720 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
11721 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11725 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
11729 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11730 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11731 cf_cv_shlib_version=cygdll
11732 cf_cv_shlib_version_infix=cygdll
11735 cat >mk_shared_lib.sh <<-CF_EOF
11738 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11741 Linking shared library
11742 ** SHARED_LIB \$SHARED_LIB
11743 ** IMPORT_LIB \$IMPORT_LIB
11745 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11747 chmod +x mk_shared_lib.sh
11751 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11752 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11753 cf_cv_shlib_version=msysdll
11754 cf_cv_shlib_version_infix=msysdll
11757 cat >mk_shared_lib.sh <<-CF_EOF
11760 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11763 Linking shared library
11764 ** SHARED_LIB \$SHARED_LIB
11765 ** IMPORT_LIB \$IMPORT_LIB
11767 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11769 chmod +x mk_shared_lib.sh
11772 cf_try_cflags="no-cpp-precomp"
11773 CC_SHARED_OPTS="-dynamic"
11774 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
11775 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
11776 cf_cv_shlib_version_infix=yes
11777 echo "$as_me:11777: checking if ld -search_paths_first works" >&5
11778 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
11779 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
11780 echo $ECHO_N "(cached) $ECHO_C" >&6
11783 cf_save_LDFLAGS=$LDFLAGS
11784 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11785 cat >"conftest.$ac_ext" <<_ACEOF
11786 #line 11786 "configure"
11787 #include "confdefs.h"
11797 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11798 if { (eval echo "$as_me:11798: \"$ac_link\"") >&5
11799 (eval $ac_link) 2>&5
11801 echo "$as_me:11801: \$? = $ac_status" >&5
11802 (exit "$ac_status"); } &&
11803 { ac_try='test -s "conftest$ac_exeext"'
11804 { (eval echo "$as_me:11804: \"$ac_try\"") >&5
11805 (eval $ac_try) 2>&5
11807 echo "$as_me:11807: \$? = $ac_status" >&5
11808 (exit "$ac_status"); }; }; then
11809 cf_cv_ldflags_search_paths_first=yes
11811 echo "$as_me: failed program was:" >&5
11812 cat "conftest.$ac_ext" >&5
11813 cf_cv_ldflags_search_paths_first=no
11815 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11816 LDFLAGS=$cf_save_LDFLAGS
11818 echo "$as_me:11818: result: $cf_cv_ldflags_search_paths_first" >&5
11819 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
11820 if test "$cf_cv_ldflags_search_paths_first" = yes; then
11821 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11826 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11827 if test "$cf_cv_shlib_version" = rel; then
11828 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11830 cf_cv_shared_soname='`basename $@`'
11833 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11836 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
11837 if test "$GCC" != yes; then
11838 CC_SHARED_OPTS='+Z'
11840 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
11841 INSTALL_LIB="-m 555"
11844 # (tested with gcc 2.7.2 -- I don't have c89)
11845 if test "$GCC" = yes; then
11846 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
11848 CC_SHARED_OPTS='+Z'
11849 LD_SHARED_OPTS='-Wl,+b,${libdir}'
11851 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
11852 # HP-UX shared libraries must be executable, and should be
11853 # readonly to exploit a quirk in the memory manager.
11854 INSTALL_LIB="-m 555"
11857 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11858 if test "$cf_cv_shlib_version" = rel; then
11859 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11861 cf_shared_soname='`basename $@`'
11864 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
11867 if test "$cf_cv_enable_rpath" = yes ; then
11868 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11870 # tested with IRIX 5.2 and 'cc'.
11871 if test "$GCC" != yes; then
11872 CC_SHARED_OPTS='-KPIC'
11873 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
11875 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
11877 cf_cv_rm_so_locs=yes
11879 (linux*|gnu*|k*bsd*-gnu)
11880 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11881 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11882 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11884 if test "$cf_cv_enable_rpath" = yes ; then
11885 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11888 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11889 if test "$cf_cv_shlib_version" = rel; then
11890 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11892 cf_cv_shared_soname='`basename $@`'
11895 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11898 cf_cv_shlib_version=msvcdll
11899 cf_cv_shlib_version_infix=msvcdll
11902 if test "$DFT_LWR_MODEL" = "shared" ; then
11903 LOCAL_LDFLAGS="-link -dll"
11904 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11905 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
11908 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
11909 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
11910 cat >mk_shared_lib.sh <<-CF_EOF
11913 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
11918 Linking shared library
11919 ** SHARED LIB \$SHARED_LIB
11920 ** IMPORT_LIB \$IMPORT_LIB
11922 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
11923 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
11924 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
11926 chmod +x mk_shared_lib.sh
11927 cat >mk_prog.sh <<-CF_EOF
11930 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
11933 ldopts=("/subsystem:console")
11936 while test \$# -gt 0; do
11939 # ignore -link argument
11942 # ignore runtime-library option
11957 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
11960 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
11966 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
11967 ldopts+=("\${linkarg}")
11975 ldopts+=("-out:\$1")
11984 if [ "\$isdll" -ne 0 ]; then
11985 for lib in \${libs[*]}; do
11986 ldopts+=("\$lib.dll.lib")
11989 for lib in \${libs[*]}; do
11990 ldopts+=("\$lib.lib")
11995 ** ld options: "\${ldopts[@]}"
11997 exec \$LD \${ldopts[@]}
11999 chmod +x mk_prog.sh
12000 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
12001 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
12004 cf_cv_shlib_version=mingw
12005 cf_cv_shlib_version_infix=mingw
12008 if test "$DFT_LWR_MODEL" = "shared" ; then
12009 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
12010 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12011 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
12014 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
12015 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
12016 cat >mk_shared_lib.sh <<-CF_EOF
12019 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
12022 Linking shared library
12023 ** SHARED_LIB \$SHARED_LIB
12024 ** IMPORT_LIB \$IMPORT_LIB
12026 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
12028 chmod +x mk_shared_lib.sh
12030 (openbsd[2-9].*|mirbsd*)
12031 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12032 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12033 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12035 if test "$cf_cv_enable_rpath" = yes ; then
12036 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12038 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12040 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12041 if test "$cf_cv_shlib_version" = rel; then
12042 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12044 cf_cv_shared_soname='`basename $@`'
12047 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12051 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
12055 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
12057 (nto-qnx*|openbsd*|freebsd[12].*)
12058 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12059 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
12060 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12062 (dragonfly*|freebsd*)
12063 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12064 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12065 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12066 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
12067 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12070 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12071 if test "$cf_cv_shlib_version" = rel; then
12072 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12074 cf_cv_shared_soname='`basename $@`'
12077 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12080 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12081 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12082 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12083 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12084 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12085 if test "$cf_cv_shlib_version" = auto; then
12086 if test -f /usr/libexec/ld.elf_so; then
12087 cf_cv_shlib_version=abi
12089 cf_cv_shlib_version=rel
12093 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12094 if test "$cf_cv_shlib_version" = rel; then
12095 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12097 cf_cv_shared_soname='`basename $@`'
12100 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
12102 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
12106 # tested with OSF/1 V3.2 and 'cc'
12107 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
12108 # link with shared libs).
12109 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
12112 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
12115 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
12116 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12117 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12118 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12120 cf_cv_rm_so_locs=yes
12122 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
12123 # tested with osr5.0.5
12124 if test "$GCC" != yes; then
12125 CC_SHARED_OPTS='-belf -KPIC'
12127 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
12128 if test "$cf_cv_enable_rpath" = yes ; then
12129 # only way is to set LD_RUN_PATH but no switch for it
12132 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12133 LINK_PROGS='LD_RUN_PATH=${libdir}'
12134 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
12137 # tested with SunOS 4.1.1 and gcc 2.7.0
12138 if test "$GCC" != yes; then
12139 CC_SHARED_OPTS='-KPIC'
12141 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
12142 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12145 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
12146 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
12147 if test "$DFT_LWR_MODEL" = "shared" ; then
12148 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
12149 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12151 if test "$cf_cv_enable_rpath" = yes ; then
12152 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
12155 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12156 if test "$cf_cv_shlib_version" = rel; then
12157 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12159 cf_cv_shared_soname='`basename $@`'
12162 if test "$GCC" != yes; then
12163 cf_save_CFLAGS="$CFLAGS"
12164 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
12166 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
12167 cat >"conftest.$ac_ext" <<_ACEOF
12168 #line 12168 "configure"
12169 #include "confdefs.h"
12174 printf("Hello\\n");
12179 rm -f "conftest.$ac_objext"
12180 if { (eval echo "$as_me:12180: \"$ac_compile\"") >&5
12181 (eval $ac_compile) 2>&5
12183 echo "$as_me:12183: \$? = $ac_status" >&5
12184 (exit "$ac_status"); } &&
12185 { ac_try='test -s "conftest.$ac_objext"'
12186 { (eval echo "$as_me:12186: \"$ac_try\"") >&5
12187 (eval $ac_try) 2>&5
12189 echo "$as_me:12189: \$? = $ac_status" >&5
12190 (exit "$ac_status"); }; }; then
12193 echo "$as_me: failed program was:" >&5
12194 cat "conftest.$ac_ext" >&5
12196 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12198 CFLAGS="$cf_save_CFLAGS"
12199 CC_SHARED_OPTS=$cf_shared_opts
12200 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
12202 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
12205 (sysv5uw7*|unix_sv*)
12206 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
12207 if test "$GCC" != yes; then
12208 CC_SHARED_OPTS='-KPIC'
12210 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
12213 CC_SHARED_OPTS='unknown'
12214 MK_SHARED_LIB='echo unknown'
12218 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
12219 case "$cf_cv_shlib_version" in
12221 case "$MK_SHARED_LIB" in
12223 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
12226 { echo "$as_me:12226: WARNING: ignored --with-shlib-version" >&5
12227 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
12233 if test -n "$cf_try_cflags"
12235 cat > conftest.$ac_ext <<EOF
12236 #line 12236 "${as_me:-configure}"
12238 int main(int argc, char *argv[])
12240 printf("hello\\n");
12241 return (argv[argc-1] == 0) ;
12244 cf_save_CFLAGS="$CFLAGS"
12245 for cf_opt in $cf_try_cflags
12247 CFLAGS="$cf_save_CFLAGS -$cf_opt"
12248 echo "$as_me:12248: checking if CFLAGS option -$cf_opt works" >&5
12249 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
12250 if { (eval echo "$as_me:12250: \"$ac_compile\"") >&5
12251 (eval $ac_compile) 2>&5
12253 echo "$as_me:12253: \$? = $ac_status" >&5
12254 (exit "$ac_status"); }; then
12255 echo "$as_me:12255: result: yes" >&5
12256 echo "${ECHO_T}yes" >&6
12257 cf_save_CFLAGS="$CFLAGS"
12259 echo "$as_me:12259: result: no" >&5
12260 echo "${ECHO_T}no" >&6
12263 CFLAGS="$cf_save_CFLAGS"
12266 # RPATH_LIST is a colon-separated list of directories
12267 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
12268 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
12270 test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
12272 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
12274 echo "${as_me:-configure}:12274: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
12276 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
12278 echo "${as_me:-configure}:12278: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
12280 # The test/sample programs in the original tree link using rpath option.
12281 # Make it optional for packagers.
12282 if test -n "$LOCAL_LDFLAGS"
12284 echo "$as_me:12284: checking if you want to link sample programs with rpath option" >&5
12285 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
12287 # Check whether --enable-rpath-link or --disable-rpath-link was given.
12288 if test "${enable_rpath_link+set}" = set; then
12289 enableval="$enable_rpath_link"
12290 with_rpath_link=$enableval
12292 with_rpath_link=yes
12294 echo "$as_me:12294: result: $with_rpath_link" >&5
12295 echo "${ECHO_T}$with_rpath_link" >&6
12296 if test "$with_rpath_link" = no
12303 ###############################################################################
12305 ### use option --enable-broken-linker to force on use of broken-linker support
12307 echo "$as_me:12307: checking if you want broken-linker support code" >&5
12308 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
12310 # Check whether --enable-broken_linker or --disable-broken_linker was given.
12311 if test "${enable_broken_linker+set}" = set; then
12312 enableval="$enable_broken_linker"
12313 with_broken_linker=$enableval
12315 with_broken_linker=no
12317 echo "$as_me:12317: result: $with_broken_linker" >&5
12318 echo "${ECHO_T}$with_broken_linker" >&6
12320 : "${BROKEN_LINKER:=0}"
12321 if test "x$with_broken_linker" = xyes ; then
12323 cat >>confdefs.h <<\EOF
12324 #define BROKEN_LINKER 1
12330 # Check to define _XOPEN_SOURCE "automatically"
12332 echo "$as_me:12332: checking if the POSIX test-macros are already defined" >&5
12333 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
12334 if test "${cf_cv_posix_visible+set}" = set; then
12335 echo $ECHO_N "(cached) $ECHO_C" >&6
12338 cat >"conftest.$ac_ext" <<_ACEOF
12339 #line 12339 "configure"
12340 #include "confdefs.h"
12346 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
12347 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
12348 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
12349 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
12350 #error conflicting symbols found
12357 rm -f "conftest.$ac_objext"
12358 if { (eval echo "$as_me:12358: \"$ac_compile\"") >&5
12359 (eval $ac_compile) 2>&5
12361 echo "$as_me:12361: \$? = $ac_status" >&5
12362 (exit "$ac_status"); } &&
12363 { ac_try='test -s "conftest.$ac_objext"'
12364 { (eval echo "$as_me:12364: \"$ac_try\"") >&5
12365 (eval $ac_try) 2>&5
12367 echo "$as_me:12367: \$? = $ac_status" >&5
12368 (exit "$ac_status"); }; }; then
12369 cf_cv_posix_visible=no
12371 echo "$as_me: failed program was:" >&5
12372 cat "conftest.$ac_ext" >&5
12373 cf_cv_posix_visible=yes
12375 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12378 echo "$as_me:12378: result: $cf_cv_posix_visible" >&5
12379 echo "${ECHO_T}$cf_cv_posix_visible" >&6
12381 if test "$cf_cv_posix_visible" = no; then
12383 cf_XOPEN_SOURCE=600
12384 cf_POSIX_C_SOURCE=199506L
12389 cf_xopen_source="-D_ALL_SOURCE"
12392 cf_XOPEN_SOURCE=600
12395 cf_xopen_source="-D_APPLE_C_SOURCE"
12398 cf_xopen_source="-D_DARWIN_C_SOURCE"
12401 (freebsd*|dragonfly*|midnightbsd*)
12402 # 5.x headers associate
12403 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
12404 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
12405 cf_POSIX_C_SOURCE=200112L
12406 cf_XOPEN_SOURCE=600
12407 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12410 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
12413 cf_xopen_source="-D_HPUX_SOURCE"
12416 cf_xopen_source="-D_SGI_SOURCE"
12419 (linux*gnu|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
12421 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
12423 echo "$as_me:12423: checking if this is the GNU C library" >&5
12424 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
12425 if test "${cf_cv_gnu_library+set}" = set; then
12426 echo $ECHO_N "(cached) $ECHO_C" >&6
12429 cat >"conftest.$ac_ext" <<_ACEOF
12430 #line 12430 "configure"
12431 #include "confdefs.h"
12432 #include <sys/types.h>
12437 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
12439 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
12442 # error not GNU C library
12448 rm -f "conftest.$ac_objext"
12449 if { (eval echo "$as_me:12449: \"$ac_compile\"") >&5
12450 (eval $ac_compile) 2>&5
12452 echo "$as_me:12452: \$? = $ac_status" >&5
12453 (exit "$ac_status"); } &&
12454 { ac_try='test -s "conftest.$ac_objext"'
12455 { (eval echo "$as_me:12455: \"$ac_try\"") >&5
12456 (eval $ac_try) 2>&5
12458 echo "$as_me:12458: \$? = $ac_status" >&5
12459 (exit "$ac_status"); }; }; then
12460 cf_cv_gnu_library=yes
12462 echo "$as_me: failed program was:" >&5
12463 cat "conftest.$ac_ext" >&5
12464 cf_cv_gnu_library=no
12466 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12469 echo "$as_me:12469: result: $cf_cv_gnu_library" >&5
12470 echo "${ECHO_T}$cf_cv_gnu_library" >&6
12472 if test x$cf_cv_gnu_library = xyes; then
12474 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
12475 # was changed to help a little. newlib incorporated the change about 4
12477 echo "$as_me:12477: checking if _DEFAULT_SOURCE can be used as a basis" >&5
12478 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
12479 if test "${cf_cv_gnu_library_219+set}" = set; then
12480 echo $ECHO_N "(cached) $ECHO_C" >&6
12483 cf_save="$CPPFLAGS"
12485 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12486 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12488 cat >"conftest.$ac_ext" <<_ACEOF
12489 #line 12489 "configure"
12490 #include "confdefs.h"
12491 #include <sys/types.h>
12496 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
12498 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
12501 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
12507 rm -f "conftest.$ac_objext"
12508 if { (eval echo "$as_me:12508: \"$ac_compile\"") >&5
12509 (eval $ac_compile) 2>&5
12511 echo "$as_me:12511: \$? = $ac_status" >&5
12512 (exit "$ac_status"); } &&
12513 { ac_try='test -s "conftest.$ac_objext"'
12514 { (eval echo "$as_me:12514: \"$ac_try\"") >&5
12515 (eval $ac_try) 2>&5
12517 echo "$as_me:12517: \$? = $ac_status" >&5
12518 (exit "$ac_status"); }; }; then
12519 cf_cv_gnu_library_219=yes
12521 echo "$as_me: failed program was:" >&5
12522 cat "conftest.$ac_ext" >&5
12523 cf_cv_gnu_library_219=no
12525 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12526 CPPFLAGS="$cf_save"
12529 echo "$as_me:12529: result: $cf_cv_gnu_library_219" >&5
12530 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
12532 if test "x$cf_cv_gnu_library_219" = xyes; then
12533 cf_save="$CPPFLAGS"
12534 echo "$as_me:12534: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
12535 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
12536 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
12537 echo $ECHO_N "(cached) $ECHO_C" >&6
12543 cf_new_extra_cppflags=
12545 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
12547 case "$cf_fix_cppflags" in
12549 case "$cf_add_cflags" in
12550 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12551 case "$cf_add_cflags" in
12553 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12555 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12556 && test -z "${cf_tst_cflags}" \
12557 && cf_fix_cppflags=yes
12559 if test "$cf_fix_cppflags" = yes ; then
12561 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12562 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12565 elif test "${cf_tst_cflags}" = "\"'" ; then
12567 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12568 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12574 case "$CPPFLAGS" in
12578 case "$cf_add_cflags" in
12580 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12582 CPPFLAGS=`echo "$CPPFLAGS" | \
12583 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12584 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12589 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12590 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12597 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12598 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12605 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12606 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12608 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12610 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12611 && test -z "${cf_tst_cflags}" \
12612 && cf_fix_cppflags=no
12617 if test -n "$cf_new_cflags" ; then
12619 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12620 CFLAGS="${CFLAGS}$cf_new_cflags"
12624 if test -n "$cf_new_cppflags" ; then
12626 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12627 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12631 if test -n "$cf_new_extra_cppflags" ; then
12633 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12634 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12638 cat >"conftest.$ac_ext" <<_ACEOF
12639 #line 12639 "configure"
12640 #include "confdefs.h"
12642 #include <limits.h>
12643 #include <sys/types.h>
12649 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
12652 # error GNU C library is too old
12658 rm -f "conftest.$ac_objext"
12659 if { (eval echo "$as_me:12659: \"$ac_compile\"") >&5
12660 (eval $ac_compile) 2>&5
12662 echo "$as_me:12662: \$? = $ac_status" >&5
12663 (exit "$ac_status"); } &&
12664 { ac_try='test -s "conftest.$ac_objext"'
12665 { (eval echo "$as_me:12665: \"$ac_try\"") >&5
12666 (eval $ac_try) 2>&5
12668 echo "$as_me:12668: \$? = $ac_status" >&5
12669 (exit "$ac_status"); }; }; then
12670 cf_cv_gnu_dftsrc_219=yes
12672 echo "$as_me: failed program was:" >&5
12673 cat "conftest.$ac_ext" >&5
12674 cf_cv_gnu_dftsrc_219=no
12676 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12679 echo "$as_me:12679: result: $cf_cv_gnu_dftsrc_219" >&5
12680 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
12681 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
12683 cf_cv_gnu_dftsrc_219=maybe
12686 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
12688 echo "$as_me:12688: checking if we must define _GNU_SOURCE" >&5
12689 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
12690 if test "${cf_cv_gnu_source+set}" = set; then
12691 echo $ECHO_N "(cached) $ECHO_C" >&6
12694 cat >"conftest.$ac_ext" <<_ACEOF
12695 #line 12695 "configure"
12696 #include "confdefs.h"
12697 #include <sys/types.h>
12702 #ifndef _XOPEN_SOURCE
12703 #error expected _XOPEN_SOURCE to be defined
12709 rm -f "conftest.$ac_objext"
12710 if { (eval echo "$as_me:12710: \"$ac_compile\"") >&5
12711 (eval $ac_compile) 2>&5
12713 echo "$as_me:12713: \$? = $ac_status" >&5
12714 (exit "$ac_status"); } &&
12715 { ac_try='test -s "conftest.$ac_objext"'
12716 { (eval echo "$as_me:12716: \"$ac_try\"") >&5
12717 (eval $ac_try) 2>&5
12719 echo "$as_me:12719: \$? = $ac_status" >&5
12720 (exit "$ac_status"); }; }; then
12721 cf_cv_gnu_source=no
12723 echo "$as_me: failed program was:" >&5
12724 cat "conftest.$ac_ext" >&5
12725 cf_save="$CPPFLAGS"
12730 cf_new_extra_cppflags=
12732 for cf_add_cflags in -D_GNU_SOURCE
12734 case "$cf_fix_cppflags" in
12736 case "$cf_add_cflags" in
12737 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12738 case "$cf_add_cflags" in
12740 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12742 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12743 && test -z "${cf_tst_cflags}" \
12744 && cf_fix_cppflags=yes
12746 if test "$cf_fix_cppflags" = yes ; then
12748 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12749 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12752 elif test "${cf_tst_cflags}" = "\"'" ; then
12754 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12755 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12761 case "$CPPFLAGS" in
12765 case "$cf_add_cflags" in
12767 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12769 CPPFLAGS=`echo "$CPPFLAGS" | \
12770 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12771 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12776 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12777 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12784 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12785 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12792 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12793 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12795 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12797 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12798 && test -z "${cf_tst_cflags}" \
12799 && cf_fix_cppflags=no
12804 if test -n "$cf_new_cflags" ; then
12806 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12807 CFLAGS="${CFLAGS}$cf_new_cflags"
12811 if test -n "$cf_new_cppflags" ; then
12813 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12814 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12818 if test -n "$cf_new_extra_cppflags" ; then
12820 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12821 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12825 cat >"conftest.$ac_ext" <<_ACEOF
12826 #line 12826 "configure"
12827 #include "confdefs.h"
12828 #include <sys/types.h>
12833 #ifdef _XOPEN_SOURCE
12834 #error expected _XOPEN_SOURCE to be undefined
12840 rm -f "conftest.$ac_objext"
12841 if { (eval echo "$as_me:12841: \"$ac_compile\"") >&5
12842 (eval $ac_compile) 2>&5
12844 echo "$as_me:12844: \$? = $ac_status" >&5
12845 (exit "$ac_status"); } &&
12846 { ac_try='test -s "conftest.$ac_objext"'
12847 { (eval echo "$as_me:12847: \"$ac_try\"") >&5
12848 (eval $ac_try) 2>&5
12850 echo "$as_me:12850: \$? = $ac_status" >&5
12851 (exit "$ac_status"); }; }; then
12852 cf_cv_gnu_source=no
12854 echo "$as_me: failed program was:" >&5
12855 cat "conftest.$ac_ext" >&5
12856 cf_cv_gnu_source=yes
12858 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12859 CPPFLAGS="$cf_save"
12862 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12865 echo "$as_me:12865: result: $cf_cv_gnu_source" >&5
12866 echo "${ECHO_T}$cf_cv_gnu_source" >&6
12868 if test "$cf_cv_gnu_source" = yes
12870 echo "$as_me:12870: checking if we should also define _DEFAULT_SOURCE" >&5
12871 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
12872 if test "${cf_cv_default_source+set}" = set; then
12873 echo $ECHO_N "(cached) $ECHO_C" >&6
12876 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12877 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
12879 cat >"conftest.$ac_ext" <<_ACEOF
12880 #line 12880 "configure"
12881 #include "confdefs.h"
12882 #include <sys/types.h>
12887 #ifdef _DEFAULT_SOURCE
12888 #error expected _DEFAULT_SOURCE to be undefined
12894 rm -f "conftest.$ac_objext"
12895 if { (eval echo "$as_me:12895: \"$ac_compile\"") >&5
12896 (eval $ac_compile) 2>&5
12898 echo "$as_me:12898: \$? = $ac_status" >&5
12899 (exit "$ac_status"); } &&
12900 { ac_try='test -s "conftest.$ac_objext"'
12901 { (eval echo "$as_me:12901: \"$ac_try\"") >&5
12902 (eval $ac_try) 2>&5
12904 echo "$as_me:12904: \$? = $ac_status" >&5
12905 (exit "$ac_status"); }; }; then
12906 cf_cv_default_source=no
12908 echo "$as_me: failed program was:" >&5
12909 cat "conftest.$ac_ext" >&5
12910 cf_cv_default_source=yes
12912 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12915 echo "$as_me:12915: result: $cf_cv_default_source" >&5
12916 echo "${ECHO_T}$cf_cv_default_source" >&6
12917 if test "$cf_cv_default_source" = yes
12920 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12921 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12931 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
12934 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
12937 if test "$cf_cv_posix_visible" = no; then
12939 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
12941 cf_save_CFLAGS="$CFLAGS"
12942 cf_save_CPPFLAGS="$CPPFLAGS"
12944 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
12945 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12946 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12948 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
12949 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12950 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12952 echo "$as_me:12952: checking if we should define _POSIX_C_SOURCE" >&5
12953 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
12954 if test "${cf_cv_posix_c_source+set}" = set; then
12955 echo $ECHO_N "(cached) $ECHO_C" >&6
12958 echo "${as_me:-configure}:12958: testing if the symbol is already defined go no further ..." 1>&5
12960 cat >"conftest.$ac_ext" <<_ACEOF
12961 #line 12961 "configure"
12962 #include "confdefs.h"
12963 #include <sys/types.h>
12968 #ifndef _POSIX_C_SOURCE
12975 rm -f "conftest.$ac_objext"
12976 if { (eval echo "$as_me:12976: \"$ac_compile\"") >&5
12977 (eval $ac_compile) 2>&5
12979 echo "$as_me:12979: \$? = $ac_status" >&5
12980 (exit "$ac_status"); } &&
12981 { ac_try='test -s "conftest.$ac_objext"'
12982 { (eval echo "$as_me:12982: \"$ac_try\"") >&5
12983 (eval $ac_try) 2>&5
12985 echo "$as_me:12985: \$? = $ac_status" >&5
12986 (exit "$ac_status"); }; }; then
12987 cf_cv_posix_c_source=no
12989 echo "$as_me: failed program was:" >&5
12990 cat "conftest.$ac_ext" >&5
12991 cf_want_posix_source=no
12992 case .$cf_POSIX_C_SOURCE in
12994 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12997 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12998 cf_want_posix_source=yes
13001 cf_want_posix_source=yes
13004 if test "$cf_want_posix_source" = yes ; then
13005 cat >"conftest.$ac_ext" <<_ACEOF
13006 #line 13006 "configure"
13007 #include "confdefs.h"
13008 #include <sys/types.h>
13013 #ifdef _POSIX_SOURCE
13020 rm -f "conftest.$ac_objext"
13021 if { (eval echo "$as_me:13021: \"$ac_compile\"") >&5
13022 (eval $ac_compile) 2>&5
13024 echo "$as_me:13024: \$? = $ac_status" >&5
13025 (exit "$ac_status"); } &&
13026 { ac_try='test -s "conftest.$ac_objext"'
13027 { (eval echo "$as_me:13027: \"$ac_try\"") >&5
13028 (eval $ac_try) 2>&5
13030 echo "$as_me:13030: \$? = $ac_status" >&5
13031 (exit "$ac_status"); }; }; then
13034 echo "$as_me: failed program was:" >&5
13035 cat "conftest.$ac_ext" >&5
13036 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13038 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13041 echo "${as_me:-configure}:13041: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13043 CFLAGS="$cf_trim_CFLAGS"
13044 CPPFLAGS="$cf_trim_CPPFLAGS"
13046 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13047 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13049 echo "${as_me:-configure}:13049: testing if the second compile does not leave our definition intact error ..." 1>&5
13051 cat >"conftest.$ac_ext" <<_ACEOF
13052 #line 13052 "configure"
13053 #include "confdefs.h"
13054 #include <sys/types.h>
13059 #ifndef _POSIX_C_SOURCE
13066 rm -f "conftest.$ac_objext"
13067 if { (eval echo "$as_me:13067: \"$ac_compile\"") >&5
13068 (eval $ac_compile) 2>&5
13070 echo "$as_me:13070: \$? = $ac_status" >&5
13071 (exit "$ac_status"); } &&
13072 { ac_try='test -s "conftest.$ac_objext"'
13073 { (eval echo "$as_me:13073: \"$ac_try\"") >&5
13074 (eval $ac_try) 2>&5
13076 echo "$as_me:13076: \$? = $ac_status" >&5
13077 (exit "$ac_status"); }; }; then
13080 echo "$as_me: failed program was:" >&5
13081 cat "conftest.$ac_ext" >&5
13082 cf_cv_posix_c_source=no
13084 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13085 CFLAGS="$cf_save_CFLAGS"
13086 CPPFLAGS="$cf_save_CPPFLAGS"
13089 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13092 echo "$as_me:13092: result: $cf_cv_posix_c_source" >&5
13093 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13095 if test "$cf_cv_posix_c_source" != no ; then
13096 CFLAGS="$cf_trim_CFLAGS"
13097 CPPFLAGS="$cf_trim_CPPFLAGS"
13102 cf_new_extra_cppflags=
13104 for cf_add_cflags in $cf_cv_posix_c_source
13106 case "$cf_fix_cppflags" in
13108 case "$cf_add_cflags" in
13109 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13110 case "$cf_add_cflags" in
13112 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13114 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13115 && test -z "${cf_tst_cflags}" \
13116 && cf_fix_cppflags=yes
13118 if test "$cf_fix_cppflags" = yes ; then
13120 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13121 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13124 elif test "${cf_tst_cflags}" = "\"'" ; then
13126 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13127 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13133 case "$CPPFLAGS" in
13137 case "$cf_add_cflags" in
13139 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13141 CPPFLAGS=`echo "$CPPFLAGS" | \
13142 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13143 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13148 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13149 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13156 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13157 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13164 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13165 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13167 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13169 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13170 && test -z "${cf_tst_cflags}" \
13171 && cf_fix_cppflags=no
13176 if test -n "$cf_new_cflags" ; then
13178 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13179 CFLAGS="${CFLAGS}$cf_new_cflags"
13183 if test -n "$cf_new_cppflags" ; then
13185 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13186 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13190 if test -n "$cf_new_extra_cppflags" ; then
13192 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13193 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13199 fi # cf_cv_posix_visible
13203 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
13206 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
13207 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
13208 # Abusing the conformance level is a workaround.
13209 { echo "$as_me:13209: WARNING: this system does not provide usable locale support" >&5
13210 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
13211 cf_xopen_source="-D_BSD_SOURCE"
13212 cf_XOPEN_SOURCE=700
13215 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
13216 cf_xopen_source="-D_BSD_SOURCE"
13217 cf_XOPEN_SOURCE=600
13220 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
13223 cf_xopen_source="-D_OSF_SOURCE"
13226 cf_xopen_source="-D_QNX_SOURCE"
13229 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
13232 cf_xopen_source="-D__EXTENSIONS__"
13233 cf_cv_xopen_source=broken
13235 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
13241 echo "$as_me:13241: checking if we should define _XOPEN_SOURCE" >&5
13242 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13243 if test "${cf_cv_xopen_source+set}" = set; then
13244 echo $ECHO_N "(cached) $ECHO_C" >&6
13247 cat >"conftest.$ac_ext" <<_ACEOF
13248 #line 13248 "configure"
13249 #include "confdefs.h"
13251 #include <stdlib.h>
13252 #include <string.h>
13253 #include <sys/types.h>
13259 #ifndef _XOPEN_SOURCE
13267 rm -f "conftest.$ac_objext"
13268 if { (eval echo "$as_me:13268: \"$ac_compile\"") >&5
13269 (eval $ac_compile) 2>&5
13271 echo "$as_me:13271: \$? = $ac_status" >&5
13272 (exit "$ac_status"); } &&
13273 { ac_try='test -s "conftest.$ac_objext"'
13274 { (eval echo "$as_me:13274: \"$ac_try\"") >&5
13275 (eval $ac_try) 2>&5
13277 echo "$as_me:13277: \$? = $ac_status" >&5
13278 (exit "$ac_status"); }; }; then
13279 cf_cv_xopen_source=no
13281 echo "$as_me: failed program was:" >&5
13282 cat "conftest.$ac_ext" >&5
13283 cf_save="$CPPFLAGS"
13285 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13286 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13288 cat >"conftest.$ac_ext" <<_ACEOF
13289 #line 13289 "configure"
13290 #include "confdefs.h"
13292 #include <stdlib.h>
13293 #include <string.h>
13294 #include <sys/types.h>
13300 #ifndef _XOPEN_SOURCE
13308 rm -f "conftest.$ac_objext"
13309 if { (eval echo "$as_me:13309: \"$ac_compile\"") >&5
13310 (eval $ac_compile) 2>&5
13312 echo "$as_me:13312: \$? = $ac_status" >&5
13313 (exit "$ac_status"); } &&
13314 { ac_try='test -s "conftest.$ac_objext"'
13315 { (eval echo "$as_me:13315: \"$ac_try\"") >&5
13316 (eval $ac_try) 2>&5
13318 echo "$as_me:13318: \$? = $ac_status" >&5
13319 (exit "$ac_status"); }; }; then
13320 cf_cv_xopen_source=no
13322 echo "$as_me: failed program was:" >&5
13323 cat "conftest.$ac_ext" >&5
13324 cf_cv_xopen_source=$cf_XOPEN_SOURCE
13326 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13327 CPPFLAGS="$cf_save"
13330 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13333 echo "$as_me:13333: result: $cf_cv_xopen_source" >&5
13334 echo "${ECHO_T}$cf_cv_xopen_source" >&6
13336 if test "$cf_cv_xopen_source" != no ; then
13338 CFLAGS=`echo "$CFLAGS" | \
13339 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13340 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13342 CPPFLAGS=`echo "$CPPFLAGS" | \
13343 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13344 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13346 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13348 for cf_add_cflags in $cf_temp_xopen_source
13350 case "x$cf_add_cflags" in
13353 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13356 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
13357 test "$CFLAGS" != "$cf_old_cflag" || break
13359 CFLAGS="$cf_old_cflag"
13362 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13365 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
13366 test "$CPPFLAGS" != "$cf_old_cflag" || break
13368 CPPFLAGS="$cf_old_cflag"
13377 cf_new_extra_cppflags=
13379 for cf_add_cflags in $cf_add_cflags
13381 case "$cf_fix_cppflags" in
13383 case "$cf_add_cflags" in
13384 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13385 case "$cf_add_cflags" in
13387 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13389 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13390 && test -z "${cf_tst_cflags}" \
13391 && cf_fix_cppflags=yes
13393 if test "$cf_fix_cppflags" = yes ; then
13395 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13396 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13399 elif test "${cf_tst_cflags}" = "\"'" ; then
13401 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13402 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13408 case "$CPPFLAGS" in
13412 case "$cf_add_cflags" in
13414 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13416 CPPFLAGS=`echo "$CPPFLAGS" | \
13417 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13418 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13423 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13424 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13431 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13432 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13439 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13440 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13442 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13444 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13445 && test -z "${cf_tst_cflags}" \
13446 && cf_fix_cppflags=no
13451 if test -n "$cf_new_cflags" ; then
13453 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13454 CFLAGS="${CFLAGS}$cf_new_cflags"
13458 if test -n "$cf_new_cppflags" ; then
13460 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13461 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13465 if test -n "$cf_new_extra_cppflags" ; then
13467 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13468 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13476 cf_save_xopen_cppflags="$CPPFLAGS"
13478 if test "$cf_cv_posix_visible" = no; then
13480 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
13482 cf_save_CFLAGS="$CFLAGS"
13483 cf_save_CPPFLAGS="$CPPFLAGS"
13485 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13486 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13487 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13489 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13490 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13491 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13493 echo "$as_me:13493: checking if we should define _POSIX_C_SOURCE" >&5
13494 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13495 if test "${cf_cv_posix_c_source+set}" = set; then
13496 echo $ECHO_N "(cached) $ECHO_C" >&6
13499 echo "${as_me:-configure}:13499: testing if the symbol is already defined go no further ..." 1>&5
13501 cat >"conftest.$ac_ext" <<_ACEOF
13502 #line 13502 "configure"
13503 #include "confdefs.h"
13504 #include <sys/types.h>
13509 #ifndef _POSIX_C_SOURCE
13516 rm -f "conftest.$ac_objext"
13517 if { (eval echo "$as_me:13517: \"$ac_compile\"") >&5
13518 (eval $ac_compile) 2>&5
13520 echo "$as_me:13520: \$? = $ac_status" >&5
13521 (exit "$ac_status"); } &&
13522 { ac_try='test -s "conftest.$ac_objext"'
13523 { (eval echo "$as_me:13523: \"$ac_try\"") >&5
13524 (eval $ac_try) 2>&5
13526 echo "$as_me:13526: \$? = $ac_status" >&5
13527 (exit "$ac_status"); }; }; then
13528 cf_cv_posix_c_source=no
13530 echo "$as_me: failed program was:" >&5
13531 cat "conftest.$ac_ext" >&5
13532 cf_want_posix_source=no
13533 case .$cf_POSIX_C_SOURCE in
13535 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13538 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13539 cf_want_posix_source=yes
13542 cf_want_posix_source=yes
13545 if test "$cf_want_posix_source" = yes ; then
13546 cat >"conftest.$ac_ext" <<_ACEOF
13547 #line 13547 "configure"
13548 #include "confdefs.h"
13549 #include <sys/types.h>
13554 #ifdef _POSIX_SOURCE
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
13575 echo "$as_me: failed program was:" >&5
13576 cat "conftest.$ac_ext" >&5
13577 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13579 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13582 echo "${as_me:-configure}:13582: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13584 CFLAGS="$cf_trim_CFLAGS"
13585 CPPFLAGS="$cf_trim_CPPFLAGS"
13587 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13588 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13590 echo "${as_me:-configure}:13590: testing if the second compile does not leave our definition intact error ..." 1>&5
13592 cat >"conftest.$ac_ext" <<_ACEOF
13593 #line 13593 "configure"
13594 #include "confdefs.h"
13595 #include <sys/types.h>
13600 #ifndef _POSIX_C_SOURCE
13607 rm -f "conftest.$ac_objext"
13608 if { (eval echo "$as_me:13608: \"$ac_compile\"") >&5
13609 (eval $ac_compile) 2>&5
13611 echo "$as_me:13611: \$? = $ac_status" >&5
13612 (exit "$ac_status"); } &&
13613 { ac_try='test -s "conftest.$ac_objext"'
13614 { (eval echo "$as_me:13614: \"$ac_try\"") >&5
13615 (eval $ac_try) 2>&5
13617 echo "$as_me:13617: \$? = $ac_status" >&5
13618 (exit "$ac_status"); }; }; then
13621 echo "$as_me: failed program was:" >&5
13622 cat "conftest.$ac_ext" >&5
13623 cf_cv_posix_c_source=no
13625 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13626 CFLAGS="$cf_save_CFLAGS"
13627 CPPFLAGS="$cf_save_CPPFLAGS"
13630 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13633 echo "$as_me:13633: result: $cf_cv_posix_c_source" >&5
13634 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13636 if test "$cf_cv_posix_c_source" != no ; then
13637 CFLAGS="$cf_trim_CFLAGS"
13638 CPPFLAGS="$cf_trim_CPPFLAGS"
13643 cf_new_extra_cppflags=
13645 for cf_add_cflags in $cf_cv_posix_c_source
13647 case "$cf_fix_cppflags" in
13649 case "$cf_add_cflags" in
13650 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13651 case "$cf_add_cflags" in
13653 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13655 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13656 && test -z "${cf_tst_cflags}" \
13657 && cf_fix_cppflags=yes
13659 if test "$cf_fix_cppflags" = yes ; then
13661 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13662 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13665 elif test "${cf_tst_cflags}" = "\"'" ; then
13667 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13668 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13674 case "$CPPFLAGS" in
13678 case "$cf_add_cflags" in
13680 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13682 CPPFLAGS=`echo "$CPPFLAGS" | \
13683 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13684 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13689 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13690 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13697 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13698 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13705 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13706 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13708 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13710 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13711 && test -z "${cf_tst_cflags}" \
13712 && cf_fix_cppflags=no
13717 if test -n "$cf_new_cflags" ; then
13719 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13720 CFLAGS="${CFLAGS}$cf_new_cflags"
13724 if test -n "$cf_new_cppflags" ; then
13726 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13727 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13731 if test -n "$cf_new_extra_cppflags" ; then
13733 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13734 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13740 fi # cf_cv_posix_visible
13742 # Some of these niche implementations use copy/paste, double-check...
13743 test -n "$verbose" && echo " checking if _POSIX_C_SOURCE inteferes" 1>&6
13745 echo "${as_me:-configure}:13745: testing checking if _POSIX_C_SOURCE inteferes ..." 1>&5
13747 cat >"conftest.$ac_ext" <<_ACEOF
13748 #line 13748 "configure"
13749 #include "confdefs.h"
13751 #include <stdlib.h>
13752 #include <string.h>
13753 #include <sys/types.h>
13759 #ifndef _XOPEN_SOURCE
13767 rm -f "conftest.$ac_objext"
13768 if { (eval echo "$as_me:13768: \"$ac_compile\"") >&5
13769 (eval $ac_compile) 2>&5
13771 echo "$as_me:13771: \$? = $ac_status" >&5
13772 (exit "$ac_status"); } &&
13773 { ac_try='test -s "conftest.$ac_objext"'
13774 { (eval echo "$as_me:13774: \"$ac_try\"") >&5
13775 (eval $ac_try) 2>&5
13777 echo "$as_me:13777: \$? = $ac_status" >&5
13778 (exit "$ac_status"); }; }; then
13781 echo "$as_me: failed program was:" >&5
13782 cat "conftest.$ac_ext" >&5
13784 { echo "$as_me:13784: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
13785 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
13786 CPPFLAGS="$cf_save_xopen_cppflags"
13788 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13792 if test -n "$cf_xopen_source" ; then
13794 for cf_add_cflags in $cf_xopen_source
13796 case "x$cf_add_cflags" in
13799 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13802 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
13803 test "$CFLAGS" != "$cf_old_cflag" || break
13804 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
13806 echo "${as_me:-configure}:13806: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
13808 CFLAGS="$cf_old_cflag"
13811 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13814 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
13815 test "$CPPFLAGS" != "$cf_old_cflag" || break
13816 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
13818 echo "${as_me:-configure}:13818: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
13820 CPPFLAGS="$cf_old_cflag"
13829 cf_new_extra_cppflags=
13831 for cf_add_cflags in $cf_add_cflags
13833 case "$cf_fix_cppflags" in
13835 case "$cf_add_cflags" in
13836 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13837 case "$cf_add_cflags" in
13839 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13841 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13842 && test -z "${cf_tst_cflags}" \
13843 && cf_fix_cppflags=yes
13845 if test "$cf_fix_cppflags" = yes ; then
13847 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13848 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13851 elif test "${cf_tst_cflags}" = "\"'" ; then
13853 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13854 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13860 case "$CPPFLAGS" in
13864 case "$cf_add_cflags" in
13866 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13868 CPPFLAGS=`echo "$CPPFLAGS" | \
13869 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13870 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13875 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13876 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13883 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13884 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13891 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13892 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13894 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13896 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13897 && test -z "${cf_tst_cflags}" \
13898 && cf_fix_cppflags=no
13903 if test -n "$cf_new_cflags" ; then
13904 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13906 echo "${as_me:-configure}:13906: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13908 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13909 CFLAGS="${CFLAGS}$cf_new_cflags"
13913 if test -n "$cf_new_cppflags" ; then
13914 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13916 echo "${as_me:-configure}:13916: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13918 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13919 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13923 if test -n "$cf_new_extra_cppflags" ; then
13924 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13926 echo "${as_me:-configure}:13926: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13928 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13929 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13937 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
13938 echo "$as_me:13938: checking if _XOPEN_SOURCE really is set" >&5
13939 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
13940 cat >"conftest.$ac_ext" <<_ACEOF
13941 #line 13941 "configure"
13942 #include "confdefs.h"
13943 #include <stdlib.h>
13948 #ifndef _XOPEN_SOURCE
13955 rm -f "conftest.$ac_objext"
13956 if { (eval echo "$as_me:13956: \"$ac_compile\"") >&5
13957 (eval $ac_compile) 2>&5
13959 echo "$as_me:13959: \$? = $ac_status" >&5
13960 (exit "$ac_status"); } &&
13961 { ac_try='test -s "conftest.$ac_objext"'
13962 { (eval echo "$as_me:13962: \"$ac_try\"") >&5
13963 (eval $ac_try) 2>&5
13965 echo "$as_me:13965: \$? = $ac_status" >&5
13966 (exit "$ac_status"); }; }; then
13967 cf_XOPEN_SOURCE_set=yes
13969 echo "$as_me: failed program was:" >&5
13970 cat "conftest.$ac_ext" >&5
13971 cf_XOPEN_SOURCE_set=no
13973 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13974 echo "$as_me:13974: result: $cf_XOPEN_SOURCE_set" >&5
13975 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
13976 if test "$cf_XOPEN_SOURCE_set" = yes
13978 cat >"conftest.$ac_ext" <<_ACEOF
13979 #line 13979 "configure"
13980 #include "confdefs.h"
13981 #include <stdlib.h>
13986 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
13993 rm -f "conftest.$ac_objext"
13994 if { (eval echo "$as_me:13994: \"$ac_compile\"") >&5
13995 (eval $ac_compile) 2>&5
13997 echo "$as_me:13997: \$? = $ac_status" >&5
13998 (exit "$ac_status"); } &&
13999 { ac_try='test -s "conftest.$ac_objext"'
14000 { (eval echo "$as_me:14000: \"$ac_try\"") >&5
14001 (eval $ac_try) 2>&5
14003 echo "$as_me:14003: \$? = $ac_status" >&5
14004 (exit "$ac_status"); }; }; then
14005 cf_XOPEN_SOURCE_set_ok=yes
14007 echo "$as_me: failed program was:" >&5
14008 cat "conftest.$ac_ext" >&5
14009 cf_XOPEN_SOURCE_set_ok=no
14011 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14012 if test "$cf_XOPEN_SOURCE_set_ok" = no
14014 { echo "$as_me:14014: WARNING: _XOPEN_SOURCE is lower than requested" >&5
14015 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
14019 echo "$as_me:14019: checking if we should define _XOPEN_SOURCE" >&5
14020 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
14021 if test "${cf_cv_xopen_source+set}" = set; then
14022 echo $ECHO_N "(cached) $ECHO_C" >&6
14025 cat >"conftest.$ac_ext" <<_ACEOF
14026 #line 14026 "configure"
14027 #include "confdefs.h"
14029 #include <stdlib.h>
14030 #include <string.h>
14031 #include <sys/types.h>
14037 #ifndef _XOPEN_SOURCE
14045 rm -f "conftest.$ac_objext"
14046 if { (eval echo "$as_me:14046: \"$ac_compile\"") >&5
14047 (eval $ac_compile) 2>&5
14049 echo "$as_me:14049: \$? = $ac_status" >&5
14050 (exit "$ac_status"); } &&
14051 { ac_try='test -s "conftest.$ac_objext"'
14052 { (eval echo "$as_me:14052: \"$ac_try\"") >&5
14053 (eval $ac_try) 2>&5
14055 echo "$as_me:14055: \$? = $ac_status" >&5
14056 (exit "$ac_status"); }; }; then
14057 cf_cv_xopen_source=no
14059 echo "$as_me: failed program was:" >&5
14060 cat "conftest.$ac_ext" >&5
14061 cf_save="$CPPFLAGS"
14063 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14064 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
14066 cat >"conftest.$ac_ext" <<_ACEOF
14067 #line 14067 "configure"
14068 #include "confdefs.h"
14070 #include <stdlib.h>
14071 #include <string.h>
14072 #include <sys/types.h>
14078 #ifndef _XOPEN_SOURCE
14086 rm -f "conftest.$ac_objext"
14087 if { (eval echo "$as_me:14087: \"$ac_compile\"") >&5
14088 (eval $ac_compile) 2>&5
14090 echo "$as_me:14090: \$? = $ac_status" >&5
14091 (exit "$ac_status"); } &&
14092 { ac_try='test -s "conftest.$ac_objext"'
14093 { (eval echo "$as_me:14093: \"$ac_try\"") >&5
14094 (eval $ac_try) 2>&5
14096 echo "$as_me:14096: \$? = $ac_status" >&5
14097 (exit "$ac_status"); }; }; then
14098 cf_cv_xopen_source=no
14100 echo "$as_me: failed program was:" >&5
14101 cat "conftest.$ac_ext" >&5
14102 cf_cv_xopen_source=$cf_XOPEN_SOURCE
14104 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14105 CPPFLAGS="$cf_save"
14108 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14111 echo "$as_me:14111: result: $cf_cv_xopen_source" >&5
14112 echo "${ECHO_T}$cf_cv_xopen_source" >&6
14114 if test "$cf_cv_xopen_source" != no ; then
14116 CFLAGS=`echo "$CFLAGS" | \
14117 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14118 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14120 CPPFLAGS=`echo "$CPPFLAGS" | \
14121 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14122 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14124 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
14126 for cf_add_cflags in $cf_temp_xopen_source
14128 case "x$cf_add_cflags" in
14131 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14134 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
14135 test "$CFLAGS" != "$cf_old_cflag" || break
14137 CFLAGS="$cf_old_cflag"
14140 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14143 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
14144 test "$CPPFLAGS" != "$cf_old_cflag" || break
14146 CPPFLAGS="$cf_old_cflag"
14155 cf_new_extra_cppflags=
14157 for cf_add_cflags in $cf_add_cflags
14159 case "$cf_fix_cppflags" in
14161 case "$cf_add_cflags" in
14162 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14163 case "$cf_add_cflags" in
14165 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14167 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14168 && test -z "${cf_tst_cflags}" \
14169 && cf_fix_cppflags=yes
14171 if test "$cf_fix_cppflags" = yes ; then
14173 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14174 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14177 elif test "${cf_tst_cflags}" = "\"'" ; then
14179 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14180 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14186 case "$CPPFLAGS" in
14190 case "$cf_add_cflags" in
14192 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14194 CPPFLAGS=`echo "$CPPFLAGS" | \
14195 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14196 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14201 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14202 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14209 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14210 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14217 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14218 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14220 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14222 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14223 && test -z "${cf_tst_cflags}" \
14224 && cf_fix_cppflags=no
14229 if test -n "$cf_new_cflags" ; then
14231 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14232 CFLAGS="${CFLAGS}$cf_new_cflags"
14236 if test -n "$cf_new_cppflags" ; then
14238 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14239 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14243 if test -n "$cf_new_extra_cppflags" ; then
14245 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14246 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14256 fi # cf_cv_posix_visible
14258 # Check whether --enable-largefile or --disable-largefile was given.
14259 if test "${enable_largefile+set}" = set; then
14260 enableval="$enable_largefile"
14263 if test "$enable_largefile" != no; then
14265 echo "$as_me:14265: checking for special C compiler options needed for large files" >&5
14266 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
14267 if test "${ac_cv_sys_largefile_CC+set}" = set; then
14268 echo $ECHO_N "(cached) $ECHO_C" >&6
14270 ac_cv_sys_largefile_CC=no
14271 if test "$GCC" != yes; then
14274 # IRIX 6.2 and later do not support large files by default,
14275 # so use the C compiler's -n32 option if that helps.
14276 cat >"conftest.$ac_ext" <<_ACEOF
14277 #line 14277 "configure"
14278 #include "confdefs.h"
14279 #include <sys/types.h>
14280 /* Check that off_t can represent 2**63 - 1 correctly.
14281 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14282 since some C++ compilers masquerading as C compilers
14283 incorrectly reject 9223372036854775807. */
14284 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14285 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14286 && LARGE_OFF_T % 2147483647 == 1)
14296 rm -f "conftest.$ac_objext"
14297 if { (eval echo "$as_me:14297: \"$ac_compile\"") >&5
14298 (eval $ac_compile) 2>&5
14300 echo "$as_me:14300: \$? = $ac_status" >&5
14301 (exit "$ac_status"); } &&
14302 { ac_try='test -s "conftest.$ac_objext"'
14303 { (eval echo "$as_me:14303: \"$ac_try\"") >&5
14304 (eval $ac_try) 2>&5
14306 echo "$as_me:14306: \$? = $ac_status" >&5
14307 (exit "$ac_status"); }; }; then
14310 echo "$as_me: failed program was:" >&5
14311 cat "conftest.$ac_ext" >&5
14313 rm -f "conftest.$ac_objext"
14315 rm -f "conftest.$ac_objext"
14316 if { (eval echo "$as_me:14316: \"$ac_compile\"") >&5
14317 (eval $ac_compile) 2>&5
14319 echo "$as_me:14319: \$? = $ac_status" >&5
14320 (exit "$ac_status"); } &&
14321 { ac_try='test -s "conftest.$ac_objext"'
14322 { (eval echo "$as_me:14322: \"$ac_try\"") >&5
14323 (eval $ac_try) 2>&5
14325 echo "$as_me:14325: \$? = $ac_status" >&5
14326 (exit "$ac_status"); }; }; then
14327 ac_cv_sys_largefile_CC=' -n32'; break
14329 echo "$as_me: failed program was:" >&5
14330 cat "conftest.$ac_ext" >&5
14332 rm -f "conftest.$ac_objext"
14336 rm -f "conftest.$ac_ext"
14339 echo "$as_me:14339: result: $ac_cv_sys_largefile_CC" >&5
14340 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
14341 if test "$ac_cv_sys_largefile_CC" != no; then
14342 CC=$CC$ac_cv_sys_largefile_CC
14345 echo "$as_me:14345: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14346 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
14347 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
14348 echo $ECHO_N "(cached) $ECHO_C" >&6
14351 ac_cv_sys_file_offset_bits=no
14352 cat >"conftest.$ac_ext" <<_ACEOF
14353 #line 14353 "configure"
14354 #include "confdefs.h"
14355 #include <sys/types.h>
14356 /* Check that off_t can represent 2**63 - 1 correctly.
14357 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14358 since some C++ compilers masquerading as C compilers
14359 incorrectly reject 9223372036854775807. */
14360 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14361 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14362 && LARGE_OFF_T % 2147483647 == 1)
14372 rm -f "conftest.$ac_objext"
14373 if { (eval echo "$as_me:14373: \"$ac_compile\"") >&5
14374 (eval $ac_compile) 2>&5
14376 echo "$as_me:14376: \$? = $ac_status" >&5
14377 (exit "$ac_status"); } &&
14378 { ac_try='test -s "conftest.$ac_objext"'
14379 { (eval echo "$as_me:14379: \"$ac_try\"") >&5
14380 (eval $ac_try) 2>&5
14382 echo "$as_me:14382: \$? = $ac_status" >&5
14383 (exit "$ac_status"); }; }; then
14386 echo "$as_me: failed program was:" >&5
14387 cat "conftest.$ac_ext" >&5
14389 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14390 cat >"conftest.$ac_ext" <<_ACEOF
14391 #line 14391 "configure"
14392 #include "confdefs.h"
14393 #define _FILE_OFFSET_BITS 64
14394 #include <sys/types.h>
14395 /* Check that off_t can represent 2**63 - 1 correctly.
14396 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14397 since some C++ compilers masquerading as C compilers
14398 incorrectly reject 9223372036854775807. */
14399 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14400 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14401 && LARGE_OFF_T % 2147483647 == 1)
14411 rm -f "conftest.$ac_objext"
14412 if { (eval echo "$as_me:14412: \"$ac_compile\"") >&5
14413 (eval $ac_compile) 2>&5
14415 echo "$as_me:14415: \$? = $ac_status" >&5
14416 (exit "$ac_status"); } &&
14417 { ac_try='test -s "conftest.$ac_objext"'
14418 { (eval echo "$as_me:14418: \"$ac_try\"") >&5
14419 (eval $ac_try) 2>&5
14421 echo "$as_me:14421: \$? = $ac_status" >&5
14422 (exit "$ac_status"); }; }; then
14423 ac_cv_sys_file_offset_bits=64; break
14425 echo "$as_me: failed program was:" >&5
14426 cat "conftest.$ac_ext" >&5
14428 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14432 echo "$as_me:14432: result: $ac_cv_sys_file_offset_bits" >&5
14433 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14434 if test "$ac_cv_sys_file_offset_bits" != no; then
14436 cat >>confdefs.h <<EOF
14437 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14442 echo "$as_me:14442: checking for _LARGE_FILES value needed for large files" >&5
14443 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14444 if test "${ac_cv_sys_large_files+set}" = set; then
14445 echo $ECHO_N "(cached) $ECHO_C" >&6
14448 ac_cv_sys_large_files=no
14449 cat >"conftest.$ac_ext" <<_ACEOF
14450 #line 14450 "configure"
14451 #include "confdefs.h"
14452 #include <sys/types.h>
14453 /* Check that off_t can represent 2**63 - 1 correctly.
14454 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14455 since some C++ compilers masquerading as C compilers
14456 incorrectly reject 9223372036854775807. */
14457 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14458 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14459 && LARGE_OFF_T % 2147483647 == 1)
14469 rm -f "conftest.$ac_objext"
14470 if { (eval echo "$as_me:14470: \"$ac_compile\"") >&5
14471 (eval $ac_compile) 2>&5
14473 echo "$as_me:14473: \$? = $ac_status" >&5
14474 (exit "$ac_status"); } &&
14475 { ac_try='test -s "conftest.$ac_objext"'
14476 { (eval echo "$as_me:14476: \"$ac_try\"") >&5
14477 (eval $ac_try) 2>&5
14479 echo "$as_me:14479: \$? = $ac_status" >&5
14480 (exit "$ac_status"); }; }; then
14483 echo "$as_me: failed program was:" >&5
14484 cat "conftest.$ac_ext" >&5
14486 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14487 cat >"conftest.$ac_ext" <<_ACEOF
14488 #line 14488 "configure"
14489 #include "confdefs.h"
14490 #define _LARGE_FILES 1
14491 #include <sys/types.h>
14492 /* Check that off_t can represent 2**63 - 1 correctly.
14493 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14494 since some C++ compilers masquerading as C compilers
14495 incorrectly reject 9223372036854775807. */
14496 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14497 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14498 && LARGE_OFF_T % 2147483647 == 1)
14508 rm -f "conftest.$ac_objext"
14509 if { (eval echo "$as_me:14509: \"$ac_compile\"") >&5
14510 (eval $ac_compile) 2>&5
14512 echo "$as_me:14512: \$? = $ac_status" >&5
14513 (exit "$ac_status"); } &&
14514 { ac_try='test -s "conftest.$ac_objext"'
14515 { (eval echo "$as_me:14515: \"$ac_try\"") >&5
14516 (eval $ac_try) 2>&5
14518 echo "$as_me:14518: \$? = $ac_status" >&5
14519 (exit "$ac_status"); }; }; then
14520 ac_cv_sys_large_files=1; break
14522 echo "$as_me: failed program was:" >&5
14523 cat "conftest.$ac_ext" >&5
14525 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14529 echo "$as_me:14529: result: $ac_cv_sys_large_files" >&5
14530 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14531 if test "$ac_cv_sys_large_files" != no; then
14533 cat >>confdefs.h <<EOF
14534 #define _LARGE_FILES $ac_cv_sys_large_files
14541 if test "$enable_largefile" != no ; then
14542 echo "$as_me:14542: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14543 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14544 if test "${ac_cv_sys_largefile_source+set}" = set; then
14545 echo $ECHO_N "(cached) $ECHO_C" >&6
14548 ac_cv_sys_largefile_source=no
14549 cat >"conftest.$ac_ext" <<_ACEOF
14550 #line 14550 "configure"
14551 #include "confdefs.h"
14561 rm -f "conftest.$ac_objext"
14562 if { (eval echo "$as_me:14562: \"$ac_compile\"") >&5
14563 (eval $ac_compile) 2>&5
14565 echo "$as_me:14565: \$? = $ac_status" >&5
14566 (exit "$ac_status"); } &&
14567 { ac_try='test -s "conftest.$ac_objext"'
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
14575 echo "$as_me: failed program was:" >&5
14576 cat "conftest.$ac_ext" >&5
14578 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14579 cat >"conftest.$ac_ext" <<_ACEOF
14580 #line 14580 "configure"
14581 #include "confdefs.h"
14582 #define _LARGEFILE_SOURCE 1
14592 rm -f "conftest.$ac_objext"
14593 if { (eval echo "$as_me:14593: \"$ac_compile\"") >&5
14594 (eval $ac_compile) 2>&5
14596 echo "$as_me:14596: \$? = $ac_status" >&5
14597 (exit "$ac_status"); } &&
14598 { ac_try='test -s "conftest.$ac_objext"'
14599 { (eval echo "$as_me:14599: \"$ac_try\"") >&5
14600 (eval $ac_try) 2>&5
14602 echo "$as_me:14602: \$? = $ac_status" >&5
14603 (exit "$ac_status"); }; }; then
14604 ac_cv_sys_largefile_source=1; break
14606 echo "$as_me: failed program was:" >&5
14607 cat "conftest.$ac_ext" >&5
14609 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14613 echo "$as_me:14613: result: $ac_cv_sys_largefile_source" >&5
14614 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14615 if test "$ac_cv_sys_largefile_source" != no; then
14617 cat >>confdefs.h <<EOF
14618 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14624 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14625 # in glibc 2.1.3, but that breaks too many other things.
14626 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14627 echo "$as_me:14627: checking for fseeko" >&5
14628 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14629 if test "${ac_cv_func_fseeko+set}" = set; then
14630 echo $ECHO_N "(cached) $ECHO_C" >&6
14632 cat >"conftest.$ac_ext" <<_ACEOF
14633 #line 14633 "configure"
14634 #include "confdefs.h"
14639 return fseeko && fseeko (stdin, 0, 0);
14644 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14645 if { (eval echo "$as_me:14645: \"$ac_link\"") >&5
14646 (eval $ac_link) 2>&5
14648 echo "$as_me:14648: \$? = $ac_status" >&5
14649 (exit "$ac_status"); } &&
14650 { ac_try='test -s "conftest$ac_exeext"'
14651 { (eval echo "$as_me:14651: \"$ac_try\"") >&5
14652 (eval $ac_try) 2>&5
14654 echo "$as_me:14654: \$? = $ac_status" >&5
14655 (exit "$ac_status"); }; }; then
14656 ac_cv_func_fseeko=yes
14658 echo "$as_me: failed program was:" >&5
14659 cat "conftest.$ac_ext" >&5
14660 ac_cv_func_fseeko=no
14662 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14664 echo "$as_me:14664: result: $ac_cv_func_fseeko" >&5
14665 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14666 if test $ac_cv_func_fseeko = yes; then
14668 cat >>confdefs.h <<\EOF
14669 #define HAVE_FSEEKO 1
14674 # Normally we would collect these definitions in the config.h,
14675 # but (like _XOPEN_SOURCE), some environments rely on having these
14676 # defined before any of the system headers are included. Another
14677 # case comes up with C++, e.g., on AIX the compiler compiles the
14678 # header files by themselves before looking at the body files it is
14679 # told to compile. For ncurses, those header files do not include
14681 if test "$ac_cv_sys_large_files" != no
14684 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14685 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14688 if test "$ac_cv_sys_largefile_source" != no
14691 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14692 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14695 if test "$ac_cv_sys_file_offset_bits" != no
14698 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14699 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14703 echo "$as_me:14703: checking whether to use struct dirent64" >&5
14704 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14705 if test "${cf_cv_struct_dirent64+set}" = set; then
14706 echo $ECHO_N "(cached) $ECHO_C" >&6
14709 cat >"conftest.$ac_ext" <<_ACEOF
14710 #line 14710 "configure"
14711 #include "confdefs.h"
14713 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14714 #include <sys/types.h>
14715 #include <dirent.h>
14721 /* if transitional largefile support is setup, this is true */
14722 extern struct dirent64 * readdir(DIR *);
14723 struct dirent64 *x = readdir((DIR *)0);
14724 struct dirent *y = readdir((DIR *)0);
14732 rm -f "conftest.$ac_objext"
14733 if { (eval echo "$as_me:14733: \"$ac_compile\"") >&5
14734 (eval $ac_compile) 2>&5
14736 echo "$as_me:14736: \$? = $ac_status" >&5
14737 (exit "$ac_status"); } &&
14738 { ac_try='test -s "conftest.$ac_objext"'
14739 { (eval echo "$as_me:14739: \"$ac_try\"") >&5
14740 (eval $ac_try) 2>&5
14742 echo "$as_me:14742: \$? = $ac_status" >&5
14743 (exit "$ac_status"); }; }; then
14744 cf_cv_struct_dirent64=yes
14746 echo "$as_me: failed program was:" >&5
14747 cat "conftest.$ac_ext" >&5
14748 cf_cv_struct_dirent64=no
14750 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14753 echo "$as_me:14753: result: $cf_cv_struct_dirent64" >&5
14754 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14755 test "$cf_cv_struct_dirent64" = yes &&
14756 cat >>confdefs.h <<\EOF
14757 #define HAVE_STRUCT_DIRENT64 1
14762 ### Enable compiling-in rcs id's
14763 echo "$as_me:14763: checking if RCS identifiers should be compiled-in" >&5
14764 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14766 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14767 if test "${with_rcs_ids+set}" = set; then
14768 withval="$with_rcs_ids"
14769 with_rcs_ids=$withval
14773 echo "$as_me:14773: result: $with_rcs_ids" >&5
14774 echo "${ECHO_T}$with_rcs_ids" >&6
14775 test "$with_rcs_ids" = yes &&
14776 cat >>confdefs.h <<\EOF
14777 #define USE_RCS_IDS 1
14780 ###############################################################################
14782 ### Note that some functions (such as const) are normally disabled anyway.
14783 echo "$as_me:14783: checking if you want to build with function extensions" >&5
14784 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14786 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14787 if test "${enable_ext_funcs+set}" = set; then
14788 enableval="$enable_ext_funcs"
14789 with_ext_funcs=$enableval
14793 echo "$as_me:14793: result: $with_ext_funcs" >&5
14794 echo "${ECHO_T}$with_ext_funcs" >&6
14795 if test "$with_ext_funcs" = yes ; then
14796 NCURSES_EXT_FUNCS=1
14798 cat >>confdefs.h <<\EOF
14799 #define HAVE_USE_DEFAULT_COLORS 1
14802 cat >>confdefs.h <<\EOF
14803 #define NCURSES_EXT_FUNCS 1
14807 NCURSES_EXT_FUNCS=0
14810 ### use option --enable-const to turn on use of const beyond that in XSI.
14811 echo "$as_me:14811: checking for extended use of const keyword" >&5
14812 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14814 # Check whether --enable-const or --disable-const was given.
14815 if test "${enable_const+set}" = set; then
14816 enableval="$enable_const"
14817 with_ext_const=$enableval
14821 echo "$as_me:14821: result: $with_ext_const" >&5
14822 echo "${ECHO_T}$with_ext_const" >&6
14823 NCURSES_CONST='/*nothing*/'
14824 if test "$with_ext_const" = yes ; then
14825 NCURSES_CONST=const
14828 ###############################################################################
14829 # These options are relatively safe to experiment with.
14831 echo "$as_me:14831: checking if you want all development code" >&5
14832 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14834 # Check whether --with-develop or --without-develop was given.
14835 if test "${with_develop+set}" = set; then
14836 withval="$with_develop"
14837 with_develop=$withval
14841 echo "$as_me:14841: result: $with_develop" >&5
14842 echo "${ECHO_T}$with_develop" >&6
14844 ###############################################################################
14845 # These are just experimental, probably should not be in a package:
14847 # This is still experimental (20080329), but should ultimately be moved to
14848 # the script-block --with-normal, etc.
14850 echo "$as_me:14850: checking if you want to link with the pthread library" >&5
14851 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14853 # Check whether --with-pthread or --without-pthread was given.
14854 if test "${with_pthread+set}" = set; then
14855 withval="$with_pthread"
14856 with_pthread=$withval
14860 echo "$as_me:14860: result: $with_pthread" >&5
14861 echo "${ECHO_T}$with_pthread" >&6
14863 if test "$with_pthread" != no ; then
14864 echo "$as_me:14864: checking for pthread.h" >&5
14865 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14866 if test "${ac_cv_header_pthread_h+set}" = set; then
14867 echo $ECHO_N "(cached) $ECHO_C" >&6
14869 cat >"conftest.$ac_ext" <<_ACEOF
14870 #line 14870 "configure"
14871 #include "confdefs.h"
14872 #include <pthread.h>
14874 if { (eval echo "$as_me:14874: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14875 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14877 $EGREP -v '^ *\+' conftest.er1 >conftest.err
14879 cat conftest.err >&5
14880 echo "$as_me:14880: \$? = $ac_status" >&5
14881 (exit "$ac_status"); } >/dev/null; then
14882 if test -s conftest.err; then
14883 ac_cpp_err=$ac_c_preproc_warn_flag
14890 if test -z "$ac_cpp_err"; then
14891 ac_cv_header_pthread_h=yes
14893 echo "$as_me: failed program was:" >&5
14894 cat "conftest.$ac_ext" >&5
14895 ac_cv_header_pthread_h=no
14897 rm -f conftest.err "conftest.$ac_ext"
14899 echo "$as_me:14899: result: $ac_cv_header_pthread_h" >&5
14900 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14901 if test "$ac_cv_header_pthread_h" = yes; then
14903 cat >>confdefs.h <<\EOF
14904 #define HAVE_PTHREADS_H 1
14907 for cf_lib_pthread in pthread c_r
14909 echo "$as_me:14909: checking if we can link with the $cf_lib_pthread library" >&5
14910 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14911 cf_save_LIBS="$LIBS"
14913 cf_add_libs="$LIBS"
14916 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14917 # filter duplicates
14918 for cf_add_1lib in $cf_add_0lib; do
14919 for cf_add_2lib in $cf_add_libs; do
14920 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14925 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14927 LIBS="$cf_add_libs"
14929 cat >"conftest.$ac_ext" <<_ACEOF
14930 #line 14930 "configure"
14931 #include "confdefs.h"
14933 #include <pthread.h>
14939 int rc = pthread_create(0,0,0,0);
14940 int r2 = pthread_mutexattr_settype(0, 0);
14946 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14947 if { (eval echo "$as_me:14947: \"$ac_link\"") >&5
14948 (eval $ac_link) 2>&5
14950 echo "$as_me:14950: \$? = $ac_status" >&5
14951 (exit "$ac_status"); } &&
14952 { ac_try='test -s "conftest$ac_exeext"'
14953 { (eval echo "$as_me:14953: \"$ac_try\"") >&5
14954 (eval $ac_try) 2>&5
14956 echo "$as_me:14956: \$? = $ac_status" >&5
14957 (exit "$ac_status"); }; }; then
14960 echo "$as_me: failed program was:" >&5
14961 cat "conftest.$ac_ext" >&5
14964 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14965 LIBS="$cf_save_LIBS"
14966 echo "$as_me:14966: result: $with_pthread" >&5
14967 echo "${ECHO_T}$with_pthread" >&6
14968 test "$with_pthread" = yes && break
14971 if test "$with_pthread" = yes ; then
14973 cf_add_libs="$LIBS"
14976 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14977 # filter duplicates
14978 for cf_add_1lib in $cf_add_0lib; do
14979 for cf_add_2lib in $cf_add_libs; do
14980 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14985 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14987 LIBS="$cf_add_libs"
14989 cat >>confdefs.h <<\EOF
14990 #define HAVE_LIBPTHREADS 1
14994 { { echo "$as_me:14994: error: Cannot link with pthread library" >&5
14995 echo "$as_me: error: Cannot link with pthread library" >&2;}
14996 { (exit 1); exit 1; }; }
15003 echo "$as_me:15003: checking if you want to use weak-symbols for pthreads" >&5
15004 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15006 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15007 if test "${enable_weak_symbols+set}" = set; then
15008 enableval="$enable_weak_symbols"
15009 use_weak_symbols=$withval
15011 use_weak_symbols=no
15013 echo "$as_me:15013: result: $use_weak_symbols" >&5
15014 echo "${ECHO_T}$use_weak_symbols" >&6
15015 if test "$use_weak_symbols" = yes ; then
15017 echo "$as_me:15017: checking if $CC supports weak symbols" >&5
15018 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15019 if test "${cf_cv_weak_symbols+set}" = set; then
15020 echo $ECHO_N "(cached) $ECHO_C" >&6
15023 cat >"conftest.$ac_ext" <<_ACEOF
15024 #line 15024 "configure"
15025 #include "confdefs.h"
15032 #if defined(__GNUC__)
15033 # if defined __USE_ISOC99
15034 # define _cat_pragma(exp) _Pragma(#exp)
15035 # define _weak_pragma(exp) _cat_pragma(weak name)
15037 # define _weak_pragma(exp)
15039 # define _declare(name) __extension__ extern __typeof__(name) name
15040 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
15043 weak_symbol(fopen);
15049 rm -f "conftest.$ac_objext"
15050 if { (eval echo "$as_me:15050: \"$ac_compile\"") >&5
15051 (eval $ac_compile) 2>&5
15053 echo "$as_me:15053: \$? = $ac_status" >&5
15054 (exit "$ac_status"); } &&
15055 { ac_try='test -s "conftest.$ac_objext"'
15056 { (eval echo "$as_me:15056: \"$ac_try\"") >&5
15057 (eval $ac_try) 2>&5
15059 echo "$as_me:15059: \$? = $ac_status" >&5
15060 (exit "$ac_status"); }; }; then
15061 cf_cv_weak_symbols=yes
15063 echo "$as_me: failed program was:" >&5
15064 cat "conftest.$ac_ext" >&5
15065 cf_cv_weak_symbols=no
15067 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15070 echo "$as_me:15070: result: $cf_cv_weak_symbols" >&5
15071 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15074 cf_cv_weak_symbols=no
15077 if test $cf_cv_weak_symbols = yes ; then
15079 cat >>confdefs.h <<\EOF
15080 #define USE_WEAK_SYMBOLS 1
15086 if test "$with_pthread" = "yes" ; then
15088 cat >>confdefs.h <<\EOF
15089 #define USE_PTHREADS 1
15092 enable_reentrant=yes
15093 if test $cf_cv_weak_symbols = yes ; then
15098 # OpenSUSE is installing ncurses6, using reentrant option.
15099 echo "$as_me:15099: checking for _nc_TABSIZE" >&5
15100 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
15101 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
15102 echo $ECHO_N "(cached) $ECHO_C" >&6
15104 cat >"conftest.$ac_ext" <<_ACEOF
15105 #line 15105 "configure"
15106 #include "confdefs.h"
15107 #define _nc_TABSIZE autoconf_temporary
15108 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15115 /* We use char because int might match the return type of a gcc2
15116 builtin and then its argument prototype would still apply. */
15117 char _nc_TABSIZE (void);
15123 /* The GNU C library defines stubs for functions which it implements
15124 to always fail with ENOSYS. Some functions are actually named
15125 something starting with __ and the normal name is an alias. */
15126 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
15127 #error found stub for _nc_TABSIZE
15130 return _nc_TABSIZE ();
15135 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15136 if { (eval echo "$as_me:15136: \"$ac_link\"") >&5
15137 (eval $ac_link) 2>&5
15139 echo "$as_me:15139: \$? = $ac_status" >&5
15140 (exit "$ac_status"); } &&
15141 { ac_try='test -s "conftest$ac_exeext"'
15142 { (eval echo "$as_me:15142: \"$ac_try\"") >&5
15143 (eval $ac_try) 2>&5
15145 echo "$as_me:15145: \$? = $ac_status" >&5
15146 (exit "$ac_status"); }; }; then
15147 ac_cv_func__nc_TABSIZE=yes
15149 echo "$as_me: failed program was:" >&5
15150 cat "conftest.$ac_ext" >&5
15151 ac_cv_func__nc_TABSIZE=no
15153 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15155 echo "$as_me:15155: result: $ac_cv_func__nc_TABSIZE" >&5
15156 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
15157 if test "$ac_cv_func__nc_TABSIZE" = yes; then
15158 assume_reentrant=yes
15160 assume_reentrant=no
15163 # Reentrant code has to be opaque; there's little advantage to making ncurses
15164 # opaque outside of that, so there is no --enable-opaque option. We can use
15165 # this option without --with-pthreads, but this will be always set for
15167 echo "$as_me:15167: checking if you want experimental reentrant code" >&5
15168 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
15170 # Check whether --enable-reentrant or --disable-reentrant was given.
15171 if test "${enable_reentrant+set}" = set; then
15172 enableval="$enable_reentrant"
15173 with_reentrant=$enableval
15175 with_reentrant=$assume_reentrant
15177 echo "$as_me:15177: result: $with_reentrant" >&5
15178 echo "${ECHO_T}$with_reentrant" >&6
15179 if test "$with_reentrant" = yes ; then
15180 cf_cv_enable_reentrant=1
15181 if test $cf_cv_weak_symbols = yes ; then
15183 # remove pthread library from $LIBS
15184 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
15186 elif test "$assume_reentrant" = no ; then
15187 LIB_SUFFIX="t${LIB_SUFFIX}"
15190 cat >>confdefs.h <<\EOF
15191 #define USE_REENTRANT 1
15195 cf_cv_enable_reentrant=0
15198 ### Allow using a different wrap-prefix
15199 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15200 echo "$as_me:15200: checking for prefix used to wrap public variables" >&5
15201 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15203 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15204 if test "${with_wrap_prefix+set}" = set; then
15205 withval="$with_wrap_prefix"
15206 NCURSES_WRAP_PREFIX=$withval
15208 NCURSES_WRAP_PREFIX=_nc_
15210 echo "$as_me:15210: result: $NCURSES_WRAP_PREFIX" >&5
15211 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15213 NCURSES_WRAP_PREFIX=_nc_
15216 cat >>confdefs.h <<EOF
15217 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15220 ###############################################################################
15222 ### use option --disable-echo to suppress full display compiling commands
15224 echo "$as_me:15224: checking if you want to see long compiling messages" >&5
15225 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15227 # Check whether --enable-echo or --disable-echo was given.
15228 if test "${enable_echo+set}" = set; then
15229 enableval="$enable_echo"
15230 test "$enableval" != no && enableval=yes
15231 if test "$enableval" != "yes" ; then
15234 ECHO_LD='@echo linking $@;'
15235 RULE_CC='@echo compiling $<'
15236 SHOW_CC='@echo compiling $@'
15258 echo "$as_me:15258: result: $enableval" >&5
15259 echo "${ECHO_T}$enableval" >&6
15261 echo "$as_me:15261: checking if you want to use C11 _Noreturn feature" >&5
15262 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
15264 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
15265 if test "${enable_stdnoreturn+set}" = set; then
15266 enableval="$enable_stdnoreturn"
15267 test "$enableval" != yes && enableval=no
15268 if test "$enableval" != "no" ; then
15269 enable_stdnoreturn=yes
15271 enable_stdnoreturn=no
15275 enable_stdnoreturn=no
15278 echo "$as_me:15278: result: $enable_stdnoreturn" >&5
15279 echo "${ECHO_T}$enable_stdnoreturn" >&6
15281 if test $enable_stdnoreturn = yes; then
15282 echo "$as_me:15282: checking for C11 _Noreturn feature" >&5
15283 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
15284 if test "${cf_cv_c11_noreturn+set}" = set; then
15285 echo $ECHO_N "(cached) $ECHO_C" >&6
15287 cat >"conftest.$ac_ext" <<_ACEOF
15288 #line 15288 "configure"
15289 #include "confdefs.h"
15292 #include <stdlib.h>
15293 #include <stdnoreturn.h>
15294 static _Noreturn void giveup(void) { exit(0); }
15299 if (feof(stdin)) giveup()
15304 rm -f "conftest.$ac_objext"
15305 if { (eval echo "$as_me:15305: \"$ac_compile\"") >&5
15306 (eval $ac_compile) 2>&5
15308 echo "$as_me:15308: \$? = $ac_status" >&5
15309 (exit "$ac_status"); } &&
15310 { ac_try='test -s "conftest.$ac_objext"'
15311 { (eval echo "$as_me:15311: \"$ac_try\"") >&5
15312 (eval $ac_try) 2>&5
15314 echo "$as_me:15314: \$? = $ac_status" >&5
15315 (exit "$ac_status"); }; }; then
15316 cf_cv_c11_noreturn=yes
15318 echo "$as_me: failed program was:" >&5
15319 cat "conftest.$ac_ext" >&5
15320 cf_cv_c11_noreturn=no
15322 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15325 echo "$as_me:15325: result: $cf_cv_c11_noreturn" >&5
15326 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
15328 cf_cv_c11_noreturn=no,
15331 if test "$cf_cv_c11_noreturn" = yes; then
15333 cat >>confdefs.h <<\EOF
15334 #define HAVE_STDNORETURN_H 1
15337 cat >>confdefs.h <<EOF
15338 #define STDC_NORETURN _Noreturn
15341 HAVE_STDNORETURN_H=1
15343 HAVE_STDNORETURN_H=0
15346 if test "$GCC" = yes || test "$GXX" = yes
15349 if test "$GCC" = yes || test "$GXX" = yes
15354 for cf_temp_scan in $CFLAGS
15356 case "x$cf_temp_scan" in
15359 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15360 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15365 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15366 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15371 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15372 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15377 if test "x$CFLAGS" != "x$cf_temp_flags"
15379 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
15381 echo "${as_me:-configure}:15381: testing repairing CFLAGS: $CFLAGS ..." 1>&5
15383 CFLAGS="$cf_temp_flags"
15384 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
15386 echo "${as_me:-configure}:15386: testing ... fixed $CFLAGS ..." 1>&5
15388 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15390 echo "${as_me:-configure}:15390: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15397 if test "$GCC" = yes || test "$GXX" = yes
15402 for cf_temp_scan in $CPPFLAGS
15404 case "x$cf_temp_scan" in
15407 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15408 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15413 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15414 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15419 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15420 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15425 if test "x$CPPFLAGS" != "x$cf_temp_flags"
15427 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
15429 echo "${as_me:-configure}:15429: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
15431 CPPFLAGS="$cf_temp_flags"
15432 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
15434 echo "${as_me:-configure}:15434: testing ... fixed $CPPFLAGS ..." 1>&5
15436 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15438 echo "${as_me:-configure}:15438: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15445 if test "$GCC" = yes || test "$GXX" = yes
15450 for cf_temp_scan in $LDFLAGS
15452 case "x$cf_temp_scan" in
15455 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15456 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15461 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15462 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15467 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15468 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15473 if test "x$LDFLAGS" != "x$cf_temp_flags"
15475 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
15477 echo "${as_me:-configure}:15477: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
15479 LDFLAGS="$cf_temp_flags"
15480 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
15482 echo "${as_me:-configure}:15482: testing ... fixed $LDFLAGS ..." 1>&5
15484 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15486 echo "${as_me:-configure}:15486: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15493 echo "$as_me:15493: checking if you want to turn on gcc warnings" >&5
15494 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
15496 # Check whether --enable-warnings or --disable-warnings was given.
15497 if test "${enable_warnings+set}" = set; then
15498 enableval="$enable_warnings"
15499 test "$enableval" != yes && enableval=no
15500 if test "$enableval" != "no" ; then
15501 enable_warnings=yes
15510 echo "$as_me:15510: result: $enable_warnings" >&5
15511 echo "${ECHO_T}$enable_warnings" >&6
15512 if test "$enable_warnings" = "yes"
15515 if test "x$have_x" = xyes; then
15517 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15518 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15519 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15520 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15521 for cf_X_CFLAGS in $X_CFLAGS
15523 case "x$cf_X_CFLAGS" in
15525 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15528 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15533 cat >"conftest.$ac_ext" <<_ACEOF
15534 #line 15534 "configure"
15535 #include "confdefs.h"
15537 #include <stdlib.h>
15538 #include <X11/Intrinsic.h>
15543 String foo = malloc(1); free((void*)foo)
15548 rm -f "conftest.$ac_objext"
15549 if { (eval echo "$as_me:15549: \"$ac_compile\"") >&5
15550 (eval $ac_compile) 2>&5
15552 echo "$as_me:15552: \$? = $ac_status" >&5
15553 (exit "$ac_status"); } &&
15554 { ac_try='test -s "conftest.$ac_objext"'
15555 { (eval echo "$as_me:15555: \"$ac_try\"") >&5
15556 (eval $ac_try) 2>&5
15558 echo "$as_me:15558: \$? = $ac_status" >&5
15559 (exit "$ac_status"); }; }; then
15561 echo "$as_me:15561: checking for X11/Xt const-feature" >&5
15562 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15563 if test "${cf_cv_const_x_string+set}" = set; then
15564 echo $ECHO_N "(cached) $ECHO_C" >&6
15567 cat >"conftest.$ac_ext" <<_ACEOF
15568 #line 15568 "configure"
15569 #include "confdefs.h"
15571 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15572 #undef XTSTRINGDEFINES /* X11R5 and later */
15573 #include <stdlib.h>
15574 #include <X11/Intrinsic.h>
15579 String foo = malloc(1); *foo = 0
15584 rm -f "conftest.$ac_objext"
15585 if { (eval echo "$as_me:15585: \"$ac_compile\"") >&5
15586 (eval $ac_compile) 2>&5
15588 echo "$as_me:15588: \$? = $ac_status" >&5
15589 (exit "$ac_status"); } &&
15590 { ac_try='test -s "conftest.$ac_objext"'
15591 { (eval echo "$as_me:15591: \"$ac_try\"") >&5
15592 (eval $ac_try) 2>&5
15594 echo "$as_me:15594: \$? = $ac_status" >&5
15595 (exit "$ac_status"); }; }; then
15597 cf_cv_const_x_string=no
15600 echo "$as_me: failed program was:" >&5
15601 cat "conftest.$ac_ext" >&5
15603 cf_cv_const_x_string=yes
15606 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15609 echo "$as_me:15609: result: $cf_cv_const_x_string" >&5
15610 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15612 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
15613 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
15614 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
15616 case "$cf_cv_const_x_string" in
15619 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15620 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15625 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15626 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15632 echo "$as_me: failed program was:" >&5
15633 cat "conftest.$ac_ext" >&5
15635 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15637 cat > "conftest.$ac_ext" <<EOF
15638 #line 15638 "${as_me:-configure}"
15639 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15641 if test "$INTEL_COMPILER" = yes
15643 # The "-wdXXX" options suppress warnings:
15644 # remark #1419: external declaration in primary source file
15645 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15646 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15647 # remark #193: zero used for undefined preprocessing identifier
15648 # remark #593: variable "curs_sb_left_arrow" was set but never used
15649 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15650 # remark #869: parameter "tw" was never referenced
15651 # remark #981: operands are evaluated in unspecified order
15652 # warning #279: controlling expression is constant
15654 { echo "$as_me:15654: checking for $CC warning options..." >&5
15655 echo "$as_me: checking for $CC warning options..." >&6;}
15656 cf_save_CFLAGS="$CFLAGS"
15657 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
15669 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15670 if { (eval echo "$as_me:15670: \"$ac_compile\"") >&5
15671 (eval $ac_compile) 2>&5
15673 echo "$as_me:15673: \$? = $ac_status" >&5
15674 (exit "$ac_status"); }; then
15675 test -n "$verbose" && echo "$as_me:15675: result: ... -$cf_opt" >&5
15676 echo "${ECHO_T}... -$cf_opt" >&6
15677 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15680 CFLAGS="$cf_save_CFLAGS"
15681 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
15683 { echo "$as_me:15683: checking for $CC warning options..." >&5
15684 echo "$as_me: checking for $CC warning options..." >&6;}
15685 cf_save_CFLAGS="$CFLAGS"
15687 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15688 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15689 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15690 for cf_opt in W Wall \
15691 Wbad-function-cast \
15694 Wdeclaration-after-statement \
15697 Wmissing-declarations \
15698 Wmissing-prototypes \
15702 Wstrict-prototypes \
15703 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15705 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15706 if { (eval echo "$as_me:15706: \"$ac_compile\"") >&5
15707 (eval $ac_compile) 2>&5
15709 echo "$as_me:15709: \$? = $ac_status" >&5
15710 (exit "$ac_status"); }; then
15711 test -n "$verbose" && echo "$as_me:15711: result: ... -$cf_opt" >&5
15712 echo "${ECHO_T}... -$cf_opt" >&6
15715 case "$GCC_VERSION" in
15717 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15719 echo "${as_me:-configure}:15719: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15725 case "$GCC_VERSION" in
15727 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15729 echo "${as_me:-configure}:15729: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15735 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15738 CFLAGS="$cf_save_CFLAGS"
15744 if test "$GCC" = yes || test "$GXX" = yes
15746 cat > conftest.i <<EOF
15748 #define GCC_PRINTF 0
15751 #define GCC_SCANF 0
15753 #ifndef GCC_NORETURN
15754 #define GCC_NORETURN /* nothing */
15757 #define GCC_UNUSED /* nothing */
15760 if test "$GCC" = yes
15762 { echo "$as_me:15762: checking for $CC __attribute__ directives..." >&5
15763 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15764 cat > "conftest.$ac_ext" <<EOF
15765 #line 15765 "${as_me:-configure}"
15766 #include "confdefs.h"
15767 #include "conftest.h"
15768 #include "conftest.i"
15770 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15772 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15775 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
15777 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
15779 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15780 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
15781 extern GCC_NORETURN void foo(void);
15782 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
15784 cf_printf_attribute=no
15785 cf_scanf_attribute=no
15786 for cf_attribute in scanf printf unused noreturn
15789 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15791 cf_directive="__attribute__(($cf_attribute))"
15792 echo "checking for $CC $cf_directive" 1>&5
15794 case "$cf_attribute" in
15796 cf_printf_attribute=yes
15797 cat >conftest.h <<EOF
15798 #define GCC_$cf_ATTRIBUTE 1
15802 cf_scanf_attribute=yes
15803 cat >conftest.h <<EOF
15804 #define GCC_$cf_ATTRIBUTE 1
15808 cat >conftest.h <<EOF
15809 #define GCC_$cf_ATTRIBUTE $cf_directive
15814 if { (eval echo "$as_me:15814: \"$ac_compile\"") >&5
15815 (eval $ac_compile) 2>&5
15817 echo "$as_me:15817: \$? = $ac_status" >&5
15818 (exit "$ac_status"); }; then
15819 test -n "$verbose" && echo "$as_me:15819: result: ... $cf_attribute" >&5
15820 echo "${ECHO_T}... $cf_attribute" >&6
15821 cat conftest.h >>confdefs.h
15822 case "$cf_attribute" in
15825 cat >>confdefs.h <<EOF
15826 #define GCC_NORETURN $cf_directive
15831 cf_value='/* nothing */'
15832 if test "$cf_printf_attribute" != no ; then
15833 cf_value='__attribute__((format(printf,fmt,var)))'
15835 cat >>confdefs.h <<\EOF
15836 #define GCC_PRINTF 1
15841 cat >>confdefs.h <<EOF
15842 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15847 cf_value='/* nothing */'
15848 if test "$cf_scanf_attribute" != no ; then
15849 cf_value='__attribute__((format(scanf,fmt,var)))'
15851 cat >>confdefs.h <<\EOF
15852 #define GCC_SCANF 1
15857 cat >>confdefs.h <<EOF
15858 #define GCC_SCANFLIKE(fmt,var) $cf_value
15864 cat >>confdefs.h <<EOF
15865 #define GCC_UNUSED $cf_directive
15873 ${FGREP-fgrep} define conftest.i >>confdefs.h
15880 if test "x$enable_warnings" = "xyes"; then
15882 ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
15886 ### use option --enable-assertions to turn on generation of assertion code
15887 echo "$as_me:15887: checking if you want to enable runtime assertions" >&5
15888 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15890 # Check whether --enable-assertions or --disable-assertions was given.
15891 if test "${enable_assertions+set}" = set; then
15892 enableval="$enable_assertions"
15893 with_assertions=$enableval
15897 echo "$as_me:15897: result: $with_assertions" >&5
15898 echo "${ECHO_T}$with_assertions" >&6
15901 if test "$with_assertions" = no
15903 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15906 ADAFLAGS="$ADAFLAGS -gnata"
15911 ### use option --disable-leaks to suppress "permanent" leaks, for testing
15913 cat >>confdefs.h <<\EOF
15914 #define HAVE_NC_ALLOC_H 1
15917 ### use option --enable-expanded to generate certain macros as functions
15919 # Check whether --enable-expanded or --disable-expanded was given.
15920 if test "${enable_expanded+set}" = set; then
15921 enableval="$enable_expanded"
15922 test "$enableval" = yes &&
15923 cat >>confdefs.h <<\EOF
15924 #define NCURSES_EXPANDED 1
15929 ### use option --disable-macros to suppress macros in favor of functions
15931 # Check whether --enable-macros or --disable-macros was given.
15932 if test "${enable_macros+set}" = set; then
15933 enableval="$enable_macros"
15934 test "$enableval" = no &&
15935 cat >>confdefs.h <<\EOF
15936 #define NCURSES_NOMACROS 1
15941 # Normally we only add trace() to the debug-library. Allow this to be
15942 # extended to all models of the ncurses library:
15944 case "$CFLAGS $CPPFLAGS" in
15950 echo "$as_me:15950: checking whether to add trace feature to all models" >&5
15951 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
15953 # Check whether --with-trace or --without-trace was given.
15954 if test "${with_trace+set}" = set; then
15955 withval="$with_trace"
15956 cf_with_trace=$withval
15958 cf_with_trace=$cf_all_traces
15960 echo "$as_me:15960: result: $cf_with_trace" >&5
15961 echo "${ECHO_T}$cf_with_trace" >&6
15963 if test "$cf_with_trace" = yes ; then
15969 cf_new_extra_cppflags=
15971 for cf_add_cflags in -DTRACE
15973 case "$cf_fix_cppflags" in
15975 case "$cf_add_cflags" in
15976 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15977 case "$cf_add_cflags" in
15979 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15981 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15982 && test -z "${cf_tst_cflags}" \
15983 && cf_fix_cppflags=yes
15985 if test "$cf_fix_cppflags" = yes ; then
15987 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15988 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15991 elif test "${cf_tst_cflags}" = "\"'" ; then
15993 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15994 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16000 case "$CPPFLAGS" in
16004 case "$cf_add_cflags" in
16006 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16008 CPPFLAGS=`echo "$CPPFLAGS" | \
16009 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16010 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16015 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16016 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16023 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16024 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16031 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16032 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16034 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16036 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16037 && test -z "${cf_tst_cflags}" \
16038 && cf_fix_cppflags=no
16043 if test -n "$cf_new_cflags" ; then
16045 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16046 CFLAGS="${CFLAGS}$cf_new_cflags"
16050 if test -n "$cf_new_cppflags" ; then
16052 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16053 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16057 if test -n "$cf_new_extra_cppflags" ; then
16059 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16060 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16068 echo "$as_me:16068: checking if we want to use GNAT projects" >&5
16069 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
16071 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
16072 if test "${enable_gnat_projects+set}" = set; then
16073 enableval="$enable_gnat_projects"
16074 test "$enableval" != no && enableval=yes
16075 if test "$enableval" != "yes" ; then
16076 enable_gnat_projects=no
16078 enable_gnat_projects=yes
16082 enable_gnat_projects=yes
16085 echo "$as_me:16085: result: $enable_gnat_projects" >&5
16086 echo "${ECHO_T}$enable_gnat_projects" >&6
16088 ### Checks for libraries.
16089 case $cf_cv_system_name in
16092 echo "$as_me:16092: checking if ssp library is needed" >&5
16093 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
16094 if test "${cf_cv_need_libssp+set}" = set; then
16095 echo $ECHO_N "(cached) $ECHO_C" >&6
16098 cat >"conftest.$ac_ext" <<_ACEOF
16099 #line 16099 "configure"
16100 #include "confdefs.h"
16102 #include <sys/types.h>
16103 #include <dirent.h>
16109 DIR *dp = opendir(".");
16115 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16116 if { (eval echo "$as_me:16116: \"$ac_link\"") >&5
16117 (eval $ac_link) 2>&5
16119 echo "$as_me:16119: \$? = $ac_status" >&5
16120 (exit "$ac_status"); } &&
16121 { ac_try='test -s "conftest$ac_exeext"'
16122 { (eval echo "$as_me:16122: \"$ac_try\"") >&5
16123 (eval $ac_try) 2>&5
16125 echo "$as_me:16125: \$? = $ac_status" >&5
16126 (exit "$ac_status"); }; }; then
16127 cf_cv_need_libssp=no
16129 echo "$as_me: failed program was:" >&5
16130 cat "conftest.$ac_ext" >&5
16132 cf_save_LIBS="$LIBS"
16134 cat >"conftest.$ac_ext" <<_ACEOF
16135 #line 16135 "configure"
16136 #include "confdefs.h"
16138 #include <sys/types.h>
16139 #include <dirent.h>
16145 DIR *dp = opendir(".");
16151 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16152 if { (eval echo "$as_me:16152: \"$ac_link\"") >&5
16153 (eval $ac_link) 2>&5
16155 echo "$as_me:16155: \$? = $ac_status" >&5
16156 (exit "$ac_status"); } &&
16157 { ac_try='test -s "conftest$ac_exeext"'
16158 { (eval echo "$as_me:16158: \"$ac_try\"") >&5
16159 (eval $ac_try) 2>&5
16161 echo "$as_me:16161: \$? = $ac_status" >&5
16162 (exit "$ac_status"); }; }; then
16163 cf_cv_need_libssp=yes
16165 echo "$as_me: failed program was:" >&5
16166 cat "conftest.$ac_ext" >&5
16167 cf_cv_need_libssp=maybe
16169 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16170 LIBS="$cf_save_LIBS"
16173 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16175 echo "$as_me:16175: result: $cf_cv_need_libssp" >&5
16176 echo "${ECHO_T}$cf_cv_need_libssp" >&6
16178 if test "x$cf_cv_need_libssp" = xyes
16181 cf_add_libs="$LIBS"
16184 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16185 # filter duplicates
16186 for cf_add_1lib in $cf_add_0lib; do
16187 for cf_add_2lib in $cf_add_libs; do
16188 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16193 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16195 LIBS="$cf_add_libs"
16201 echo "$as_me:16201: checking for gettimeofday" >&5
16202 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
16203 if test "${ac_cv_func_gettimeofday+set}" = set; then
16204 echo $ECHO_N "(cached) $ECHO_C" >&6
16206 cat >"conftest.$ac_ext" <<_ACEOF
16207 #line 16207 "configure"
16208 #include "confdefs.h"
16209 #define gettimeofday autoconf_temporary
16210 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16211 #undef gettimeofday
16217 /* We use char because int might match the return type of a gcc2
16218 builtin and then its argument prototype would still apply. */
16219 char gettimeofday (void);
16225 /* The GNU C library defines stubs for functions which it implements
16226 to always fail with ENOSYS. Some functions are actually named
16227 something starting with __ and the normal name is an alias. */
16228 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16229 #error found stub for gettimeofday
16232 return gettimeofday ();
16237 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16238 if { (eval echo "$as_me:16238: \"$ac_link\"") >&5
16239 (eval $ac_link) 2>&5
16241 echo "$as_me:16241: \$? = $ac_status" >&5
16242 (exit "$ac_status"); } &&
16243 { ac_try='test -s "conftest$ac_exeext"'
16244 { (eval echo "$as_me:16244: \"$ac_try\"") >&5
16245 (eval $ac_try) 2>&5
16247 echo "$as_me:16247: \$? = $ac_status" >&5
16248 (exit "$ac_status"); }; }; then
16249 ac_cv_func_gettimeofday=yes
16251 echo "$as_me: failed program was:" >&5
16252 cat "conftest.$ac_ext" >&5
16253 ac_cv_func_gettimeofday=no
16255 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16257 echo "$as_me:16257: result: $ac_cv_func_gettimeofday" >&5
16258 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16259 if test "$ac_cv_func_gettimeofday" = yes; then
16260 cat >>confdefs.h <<\EOF
16261 #define HAVE_GETTIMEOFDAY 1
16266 echo "$as_me:16266: checking for gettimeofday in -lbsd" >&5
16267 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
16268 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
16269 echo $ECHO_N "(cached) $ECHO_C" >&6
16271 ac_check_lib_save_LIBS=$LIBS
16273 cat >"conftest.$ac_ext" <<_ACEOF
16274 #line 16274 "configure"
16275 #include "confdefs.h"
16277 /* Override any gcc2 internal prototype to avoid an error. */
16281 /* We use char because int might match the return type of a gcc2
16282 builtin and then its argument prototype would still apply. */
16283 char gettimeofday ();
16292 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16293 if { (eval echo "$as_me:16293: \"$ac_link\"") >&5
16294 (eval $ac_link) 2>&5
16296 echo "$as_me:16296: \$? = $ac_status" >&5
16297 (exit "$ac_status"); } &&
16298 { ac_try='test -s "conftest$ac_exeext"'
16299 { (eval echo "$as_me:16299: \"$ac_try\"") >&5
16300 (eval $ac_try) 2>&5
16302 echo "$as_me:16302: \$? = $ac_status" >&5
16303 (exit "$ac_status"); }; }; then
16304 ac_cv_lib_bsd_gettimeofday=yes
16306 echo "$as_me: failed program was:" >&5
16307 cat "conftest.$ac_ext" >&5
16308 ac_cv_lib_bsd_gettimeofday=no
16310 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16311 LIBS=$ac_check_lib_save_LIBS
16313 echo "$as_me:16313: result: $ac_cv_lib_bsd_gettimeofday" >&5
16314 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
16315 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
16317 cat >>confdefs.h <<\EOF
16318 #define HAVE_GETTIMEOFDAY 1
16328 ### Checks for header files.
16329 echo "$as_me:16329: checking for ANSI C header files" >&5
16330 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16331 if test "${ac_cv_header_stdc+set}" = set; then
16332 echo $ECHO_N "(cached) $ECHO_C" >&6
16334 cat >"conftest.$ac_ext" <<_ACEOF
16335 #line 16335 "configure"
16336 #include "confdefs.h"
16337 #include <stdlib.h>
16338 #include <stdarg.h>
16339 #include <string.h>
16343 if { (eval echo "$as_me:16343: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16344 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16346 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16348 cat conftest.err >&5
16349 echo "$as_me:16349: \$? = $ac_status" >&5
16350 (exit "$ac_status"); } >/dev/null; then
16351 if test -s conftest.err; then
16352 ac_cpp_err=$ac_c_preproc_warn_flag
16359 if test -z "$ac_cpp_err"; then
16360 ac_cv_header_stdc=yes
16362 echo "$as_me: failed program was:" >&5
16363 cat "conftest.$ac_ext" >&5
16364 ac_cv_header_stdc=no
16366 rm -f conftest.err "conftest.$ac_ext"
16368 if test $ac_cv_header_stdc = yes; then
16369 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16370 cat >"conftest.$ac_ext" <<_ACEOF
16371 #line 16371 "configure"
16372 #include "confdefs.h"
16373 #include <string.h>
16376 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16377 $EGREP "memchr" >/dev/null 2>&1; then
16380 ac_cv_header_stdc=no
16386 if test $ac_cv_header_stdc = yes; then
16387 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16388 cat >"conftest.$ac_ext" <<_ACEOF
16389 #line 16389 "configure"
16390 #include "confdefs.h"
16391 #include <stdlib.h>
16394 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16395 $EGREP "free" >/dev/null 2>&1; then
16398 ac_cv_header_stdc=no
16404 if test $ac_cv_header_stdc = yes; then
16405 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16406 if test "$cross_compiling" = yes; then
16409 cat >"conftest.$ac_ext" <<_ACEOF
16410 #line 16410 "configure"
16411 #include "confdefs.h"
16413 #if ((' ' & 0x0FF) == 0x020)
16414 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16415 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16417 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16418 || ('j' <= (c) && (c) <= 'r') \
16419 || ('s' <= (c) && (c) <= 'z'))
16420 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16423 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16428 for (i = 0; i < 256; i++)
16429 if (XOR (islower (i), ISLOWER (i))
16430 || toupper (i) != TOUPPER (i))
16431 $ac_main_return(2);
16432 $ac_main_return (0);
16435 rm -f "conftest$ac_exeext"
16436 if { (eval echo "$as_me:16436: \"$ac_link\"") >&5
16437 (eval $ac_link) 2>&5
16439 echo "$as_me:16439: \$? = $ac_status" >&5
16440 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16441 { (eval echo "$as_me:16441: \"$ac_try\"") >&5
16442 (eval $ac_try) 2>&5
16444 echo "$as_me:16444: \$? = $ac_status" >&5
16445 (exit "$ac_status"); }; }; then
16448 echo "$as_me: program exited with status $ac_status" >&5
16449 echo "$as_me: failed program was:" >&5
16450 cat "conftest.$ac_ext" >&5
16451 ac_cv_header_stdc=no
16453 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16457 echo "$as_me:16457: result: $ac_cv_header_stdc" >&5
16458 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16459 if test $ac_cv_header_stdc = yes; then
16461 cat >>confdefs.h <<\EOF
16462 #define STDC_HEADERS 1
16467 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
16469 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
16470 inttypes.h stdint.h unistd.h
16472 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16473 echo "$as_me:16473: checking for $ac_header" >&5
16474 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16475 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16476 echo $ECHO_N "(cached) $ECHO_C" >&6
16478 cat >"conftest.$ac_ext" <<_ACEOF
16479 #line 16479 "configure"
16480 #include "confdefs.h"
16481 $ac_includes_default
16482 #include <$ac_header>
16484 rm -f "conftest.$ac_objext"
16485 if { (eval echo "$as_me:16485: \"$ac_compile\"") >&5
16486 (eval $ac_compile) 2>&5
16488 echo "$as_me:16488: \$? = $ac_status" >&5
16489 (exit "$ac_status"); } &&
16490 { ac_try='test -s "conftest.$ac_objext"'
16491 { (eval echo "$as_me:16491: \"$ac_try\"") >&5
16492 (eval $ac_try) 2>&5
16494 echo "$as_me:16494: \$? = $ac_status" >&5
16495 (exit "$ac_status"); }; }; then
16496 eval "$as_ac_Header=yes"
16498 echo "$as_me: failed program was:" >&5
16499 cat "conftest.$ac_ext" >&5
16500 eval "$as_ac_Header=no"
16502 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16504 echo "$as_me:16504: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16505 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16506 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16507 cat >>confdefs.h <<EOF
16508 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16514 echo "$as_me:16514: checking for signed char" >&5
16515 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
16516 if test "${ac_cv_type_signed_char+set}" = set; then
16517 echo $ECHO_N "(cached) $ECHO_C" >&6
16519 cat >"conftest.$ac_ext" <<_ACEOF
16520 #line 16520 "configure"
16521 #include "confdefs.h"
16522 $ac_includes_default
16526 if ((signed char *) 0)
16528 if (sizeof (signed char))
16534 rm -f "conftest.$ac_objext"
16535 if { (eval echo "$as_me:16535: \"$ac_compile\"") >&5
16536 (eval $ac_compile) 2>&5
16538 echo "$as_me:16538: \$? = $ac_status" >&5
16539 (exit "$ac_status"); } &&
16540 { ac_try='test -s "conftest.$ac_objext"'
16541 { (eval echo "$as_me:16541: \"$ac_try\"") >&5
16542 (eval $ac_try) 2>&5
16544 echo "$as_me:16544: \$? = $ac_status" >&5
16545 (exit "$ac_status"); }; }; then
16546 ac_cv_type_signed_char=yes
16548 echo "$as_me: failed program was:" >&5
16549 cat "conftest.$ac_ext" >&5
16550 ac_cv_type_signed_char=no
16552 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16554 echo "$as_me:16554: result: $ac_cv_type_signed_char" >&5
16555 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
16557 echo "$as_me:16557: checking size of signed char" >&5
16558 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
16559 if test "${ac_cv_sizeof_signed_char+set}" = set; then
16560 echo $ECHO_N "(cached) $ECHO_C" >&6
16562 if test "$ac_cv_type_signed_char" = yes; then
16563 if test "$cross_compiling" = yes; then
16564 # Depending upon the size, compute the lo and hi bounds.
16565 cat >"conftest.$ac_ext" <<_ACEOF
16566 #line 16566 "configure"
16567 #include "confdefs.h"
16568 $ac_includes_default
16572 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
16577 rm -f "conftest.$ac_objext"
16578 if { (eval echo "$as_me:16578: \"$ac_compile\"") >&5
16579 (eval $ac_compile) 2>&5
16581 echo "$as_me:16581: \$? = $ac_status" >&5
16582 (exit "$ac_status"); } &&
16583 { ac_try='test -s "conftest.$ac_objext"'
16584 { (eval echo "$as_me:16584: \"$ac_try\"") >&5
16585 (eval $ac_try) 2>&5
16587 echo "$as_me:16587: \$? = $ac_status" >&5
16588 (exit "$ac_status"); }; }; then
16591 cat >"conftest.$ac_ext" <<_ACEOF
16592 #line 16592 "configure"
16593 #include "confdefs.h"
16594 $ac_includes_default
16598 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16603 rm -f "conftest.$ac_objext"
16604 if { (eval echo "$as_me:16604: \"$ac_compile\"") >&5
16605 (eval $ac_compile) 2>&5
16607 echo "$as_me:16607: \$? = $ac_status" >&5
16608 (exit "$ac_status"); } &&
16609 { ac_try='test -s "conftest.$ac_objext"'
16610 { (eval echo "$as_me:16610: \"$ac_try\"") >&5
16611 (eval $ac_try) 2>&5
16613 echo "$as_me:16613: \$? = $ac_status" >&5
16614 (exit "$ac_status"); }; }; then
16615 ac_hi=$ac_mid; break
16617 echo "$as_me: failed program was:" >&5
16618 cat "conftest.$ac_ext" >&5
16619 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
16621 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16624 echo "$as_me: failed program was:" >&5
16625 cat "conftest.$ac_ext" >&5
16628 cat >"conftest.$ac_ext" <<_ACEOF
16629 #line 16629 "configure"
16630 #include "confdefs.h"
16631 $ac_includes_default
16635 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
16640 rm -f "conftest.$ac_objext"
16641 if { (eval echo "$as_me:16641: \"$ac_compile\"") >&5
16642 (eval $ac_compile) 2>&5
16644 echo "$as_me:16644: \$? = $ac_status" >&5
16645 (exit "$ac_status"); } &&
16646 { ac_try='test -s "conftest.$ac_objext"'
16647 { (eval echo "$as_me:16647: \"$ac_try\"") >&5
16648 (eval $ac_try) 2>&5
16650 echo "$as_me:16650: \$? = $ac_status" >&5
16651 (exit "$ac_status"); }; }; then
16652 ac_lo=$ac_mid; break
16654 echo "$as_me: failed program was:" >&5
16655 cat "conftest.$ac_ext" >&5
16656 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
16658 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16661 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16662 # Binary search between lo and hi bounds.
16663 while test "x$ac_lo" != "x$ac_hi"; do
16664 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
16665 cat >"conftest.$ac_ext" <<_ACEOF
16666 #line 16666 "configure"
16667 #include "confdefs.h"
16668 $ac_includes_default
16672 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16677 rm -f "conftest.$ac_objext"
16678 if { (eval echo "$as_me:16678: \"$ac_compile\"") >&5
16679 (eval $ac_compile) 2>&5
16681 echo "$as_me:16681: \$? = $ac_status" >&5
16682 (exit "$ac_status"); } &&
16683 { ac_try='test -s "conftest.$ac_objext"'
16684 { (eval echo "$as_me:16684: \"$ac_try\"") >&5
16685 (eval $ac_try) 2>&5
16687 echo "$as_me:16687: \$? = $ac_status" >&5
16688 (exit "$ac_status"); }; }; then
16691 echo "$as_me: failed program was:" >&5
16692 cat "conftest.$ac_ext" >&5
16693 ac_lo=`expr "$ac_mid" + 1`
16695 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16697 ac_cv_sizeof_signed_char=$ac_lo
16699 if test "$cross_compiling" = yes; then
16700 { { echo "$as_me:16700: error: cannot run test program while cross compiling" >&5
16701 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16702 { (exit 1); exit 1; }; }
16704 cat >"conftest.$ac_ext" <<_ACEOF
16705 #line 16705 "configure"
16706 #include "confdefs.h"
16707 $ac_includes_default
16711 FILE *f = fopen ("conftest.val", "w");
16713 $ac_main_return (1);
16714 fprintf (f, "%ld", (long)(sizeof (signed char)));
16720 rm -f "conftest$ac_exeext"
16721 if { (eval echo "$as_me:16721: \"$ac_link\"") >&5
16722 (eval $ac_link) 2>&5
16724 echo "$as_me:16724: \$? = $ac_status" >&5
16725 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16726 { (eval echo "$as_me:16726: \"$ac_try\"") >&5
16727 (eval $ac_try) 2>&5
16729 echo "$as_me:16729: \$? = $ac_status" >&5
16730 (exit "$ac_status"); }; }; then
16731 ac_cv_sizeof_signed_char=`cat conftest.val`
16733 echo "$as_me: program exited with status $ac_status" >&5
16734 echo "$as_me: failed program was:" >&5
16735 cat "conftest.$ac_ext" >&5
16737 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16742 ac_cv_sizeof_signed_char=0
16745 echo "$as_me:16745: result: $ac_cv_sizeof_signed_char" >&5
16746 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
16747 cat >>confdefs.h <<EOF
16748 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
16751 echo "$as_me:16751: checking for ANSI C header files" >&5
16752 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16753 if test "${ac_cv_header_stdc+set}" = set; then
16754 echo $ECHO_N "(cached) $ECHO_C" >&6
16756 cat >"conftest.$ac_ext" <<_ACEOF
16757 #line 16757 "configure"
16758 #include "confdefs.h"
16759 #include <stdlib.h>
16760 #include <stdarg.h>
16761 #include <string.h>
16765 if { (eval echo "$as_me:16765: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16766 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16768 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16770 cat conftest.err >&5
16771 echo "$as_me:16771: \$? = $ac_status" >&5
16772 (exit "$ac_status"); } >/dev/null; then
16773 if test -s conftest.err; then
16774 ac_cpp_err=$ac_c_preproc_warn_flag
16781 if test -z "$ac_cpp_err"; then
16782 ac_cv_header_stdc=yes
16784 echo "$as_me: failed program was:" >&5
16785 cat "conftest.$ac_ext" >&5
16786 ac_cv_header_stdc=no
16788 rm -f conftest.err "conftest.$ac_ext"
16790 if test $ac_cv_header_stdc = yes; then
16791 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16792 cat >"conftest.$ac_ext" <<_ACEOF
16793 #line 16793 "configure"
16794 #include "confdefs.h"
16795 #include <string.h>
16798 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16799 $EGREP "memchr" >/dev/null 2>&1; then
16802 ac_cv_header_stdc=no
16808 if test $ac_cv_header_stdc = yes; then
16809 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16810 cat >"conftest.$ac_ext" <<_ACEOF
16811 #line 16811 "configure"
16812 #include "confdefs.h"
16813 #include <stdlib.h>
16816 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16817 $EGREP "free" >/dev/null 2>&1; then
16820 ac_cv_header_stdc=no
16826 if test $ac_cv_header_stdc = yes; then
16827 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16828 if test "$cross_compiling" = yes; then
16831 cat >"conftest.$ac_ext" <<_ACEOF
16832 #line 16832 "configure"
16833 #include "confdefs.h"
16835 #if ((' ' & 0x0FF) == 0x020)
16836 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16837 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16839 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16840 || ('j' <= (c) && (c) <= 'r') \
16841 || ('s' <= (c) && (c) <= 'z'))
16842 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16845 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16850 for (i = 0; i < 256; i++)
16851 if (XOR (islower (i), ISLOWER (i))
16852 || toupper (i) != TOUPPER (i))
16853 $ac_main_return(2);
16854 $ac_main_return (0);
16857 rm -f "conftest$ac_exeext"
16858 if { (eval echo "$as_me:16858: \"$ac_link\"") >&5
16859 (eval $ac_link) 2>&5
16861 echo "$as_me:16861: \$? = $ac_status" >&5
16862 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16863 { (eval echo "$as_me:16863: \"$ac_try\"") >&5
16864 (eval $ac_try) 2>&5
16866 echo "$as_me:16866: \$? = $ac_status" >&5
16867 (exit "$ac_status"); }; }; then
16870 echo "$as_me: program exited with status $ac_status" >&5
16871 echo "$as_me: failed program was:" >&5
16872 cat "conftest.$ac_ext" >&5
16873 ac_cv_header_stdc=no
16875 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16879 echo "$as_me:16879: result: $ac_cv_header_stdc" >&5
16880 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16881 if test $ac_cv_header_stdc = yes; then
16883 cat >>confdefs.h <<\EOF
16884 #define STDC_HEADERS 1
16889 ac_header_dirent=no
16890 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16891 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16892 echo "$as_me:16892: checking for $ac_hdr that defines DIR" >&5
16893 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16894 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16895 echo $ECHO_N "(cached) $ECHO_C" >&6
16897 cat >"conftest.$ac_ext" <<_ACEOF
16898 #line 16898 "configure"
16899 #include "confdefs.h"
16900 #include <sys/types.h>
16912 rm -f "conftest.$ac_objext"
16913 if { (eval echo "$as_me:16913: \"$ac_compile\"") >&5
16914 (eval $ac_compile) 2>&5
16916 echo "$as_me:16916: \$? = $ac_status" >&5
16917 (exit "$ac_status"); } &&
16918 { ac_try='test -s "conftest.$ac_objext"'
16919 { (eval echo "$as_me:16919: \"$ac_try\"") >&5
16920 (eval $ac_try) 2>&5
16922 echo "$as_me:16922: \$? = $ac_status" >&5
16923 (exit "$ac_status"); }; }; then
16924 eval "$as_ac_Header=yes"
16926 echo "$as_me: failed program was:" >&5
16927 cat "conftest.$ac_ext" >&5
16928 eval "$as_ac_Header=no"
16930 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16932 echo "$as_me:16932: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16933 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16934 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16935 cat >>confdefs.h <<EOF
16936 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16939 ac_header_dirent=$ac_hdr; break
16943 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
16944 if test $ac_header_dirent = dirent.h; then
16945 echo "$as_me:16945: checking for opendir in -ldir" >&5
16946 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
16947 if test "${ac_cv_lib_dir_opendir+set}" = set; then
16948 echo $ECHO_N "(cached) $ECHO_C" >&6
16950 ac_check_lib_save_LIBS=$LIBS
16952 cat >"conftest.$ac_ext" <<_ACEOF
16953 #line 16953 "configure"
16954 #include "confdefs.h"
16956 /* Override any gcc2 internal prototype to avoid an error. */
16960 /* We use char because int might match the return type of a gcc2
16961 builtin and then its argument prototype would still apply. */
16971 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16972 if { (eval echo "$as_me:16972: \"$ac_link\"") >&5
16973 (eval $ac_link) 2>&5
16975 echo "$as_me:16975: \$? = $ac_status" >&5
16976 (exit "$ac_status"); } &&
16977 { ac_try='test -s "conftest$ac_exeext"'
16978 { (eval echo "$as_me:16978: \"$ac_try\"") >&5
16979 (eval $ac_try) 2>&5
16981 echo "$as_me:16981: \$? = $ac_status" >&5
16982 (exit "$ac_status"); }; }; then
16983 ac_cv_lib_dir_opendir=yes
16985 echo "$as_me: failed program was:" >&5
16986 cat "conftest.$ac_ext" >&5
16987 ac_cv_lib_dir_opendir=no
16989 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16990 LIBS=$ac_check_lib_save_LIBS
16992 echo "$as_me:16992: result: $ac_cv_lib_dir_opendir" >&5
16993 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
16994 if test "$ac_cv_lib_dir_opendir" = yes; then
16999 echo "$as_me:16999: checking for opendir in -lx" >&5
17000 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
17001 if test "${ac_cv_lib_x_opendir+set}" = set; then
17002 echo $ECHO_N "(cached) $ECHO_C" >&6
17004 ac_check_lib_save_LIBS=$LIBS
17006 cat >"conftest.$ac_ext" <<_ACEOF
17007 #line 17007 "configure"
17008 #include "confdefs.h"
17010 /* Override any gcc2 internal prototype to avoid an error. */
17014 /* We use char because int might match the return type of a gcc2
17015 builtin and then its argument prototype would still apply. */
17025 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17026 if { (eval echo "$as_me:17026: \"$ac_link\"") >&5
17027 (eval $ac_link) 2>&5
17029 echo "$as_me:17029: \$? = $ac_status" >&5
17030 (exit "$ac_status"); } &&
17031 { ac_try='test -s "conftest$ac_exeext"'
17032 { (eval echo "$as_me:17032: \"$ac_try\"") >&5
17033 (eval $ac_try) 2>&5
17035 echo "$as_me:17035: \$? = $ac_status" >&5
17036 (exit "$ac_status"); }; }; then
17037 ac_cv_lib_x_opendir=yes
17039 echo "$as_me: failed program was:" >&5
17040 cat "conftest.$ac_ext" >&5
17041 ac_cv_lib_x_opendir=no
17043 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17044 LIBS=$ac_check_lib_save_LIBS
17046 echo "$as_me:17046: result: $ac_cv_lib_x_opendir" >&5
17047 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
17048 if test "$ac_cv_lib_x_opendir" = yes; then
17054 echo "$as_me:17054: checking whether time.h and sys/time.h may both be included" >&5
17055 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17056 if test "${ac_cv_header_time+set}" = set; then
17057 echo $ECHO_N "(cached) $ECHO_C" >&6
17059 cat >"conftest.$ac_ext" <<_ACEOF
17060 #line 17060 "configure"
17061 #include "confdefs.h"
17062 #include <sys/types.h>
17063 #include <sys/time.h>
17069 if ((struct tm *) 0)
17075 rm -f "conftest.$ac_objext"
17076 if { (eval echo "$as_me:17076: \"$ac_compile\"") >&5
17077 (eval $ac_compile) 2>&5
17079 echo "$as_me:17079: \$? = $ac_status" >&5
17080 (exit "$ac_status"); } &&
17081 { ac_try='test -s "conftest.$ac_objext"'
17082 { (eval echo "$as_me:17082: \"$ac_try\"") >&5
17083 (eval $ac_try) 2>&5
17085 echo "$as_me:17085: \$? = $ac_status" >&5
17086 (exit "$ac_status"); }; }; then
17087 ac_cv_header_time=yes
17089 echo "$as_me: failed program was:" >&5
17090 cat "conftest.$ac_ext" >&5
17091 ac_cv_header_time=no
17093 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17095 echo "$as_me:17095: result: $ac_cv_header_time" >&5
17096 echo "${ECHO_T}$ac_cv_header_time" >&6
17097 if test $ac_cv_header_time = yes; then
17099 cat >>confdefs.h <<\EOF
17100 #define TIME_WITH_SYS_TIME 1
17105 ### checks for compiler characteristics
17107 ac_cpp='$CPP $CPPFLAGS'
17108 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17109 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17110 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17111 ac_main_return="return"
17113 echo "$as_me:17113: checking for an ANSI C-conforming const" >&5
17114 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17115 if test "${ac_cv_c_const+set}" = set; then
17116 echo $ECHO_N "(cached) $ECHO_C" >&6
17118 cat >"conftest.$ac_ext" <<_ACEOF
17119 #line 17119 "configure"
17120 #include "confdefs.h"
17125 /* FIXME: Include the comments suggested by Paul. */
17126 #ifndef __cplusplus
17127 /* Ultrix mips cc rejects this. */
17128 typedef int charset[2];
17130 /* SunOS 4.1.1 cc rejects this. */
17131 char const *const *ccp;
17133 /* NEC SVR4.0.2 mips cc rejects this. */
17134 struct point {int x, y;};
17135 static struct point const zero = {0,0};
17136 /* AIX XL C 1.02.0.0 rejects this.
17137 It does not let you subtract one const X* pointer from another in
17138 an arm of an if-expression whose if-part is not a constant
17140 const char *g = "string";
17141 ccp = &g + (g ? g-g : 0);
17142 /* HPUX 7.0 cc rejects these. */
17145 ccp = (char const *const *) p;
17146 { /* SCO 3.2v4 cc rejects this. */
17148 char const *s = 0 ? (char *) 0 : (char const *) 0;
17152 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
17153 int x[] = {25, 17};
17154 const int *foo = &x[0];
17157 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17158 typedef const int *iptr;
17162 { /* AIX XL C 1.02.0.0 rejects this saying
17163 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17164 struct s { int j; const int *ap[3]; };
17165 struct s *b; b->j = 5;
17167 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17168 const int foo = 10;
17176 rm -f "conftest.$ac_objext"
17177 if { (eval echo "$as_me:17177: \"$ac_compile\"") >&5
17178 (eval $ac_compile) 2>&5
17180 echo "$as_me:17180: \$? = $ac_status" >&5
17181 (exit "$ac_status"); } &&
17182 { ac_try='test -s "conftest.$ac_objext"'
17183 { (eval echo "$as_me:17183: \"$ac_try\"") >&5
17184 (eval $ac_try) 2>&5
17186 echo "$as_me:17186: \$? = $ac_status" >&5
17187 (exit "$ac_status"); }; }; then
17190 echo "$as_me: failed program was:" >&5
17191 cat "conftest.$ac_ext" >&5
17194 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17196 echo "$as_me:17196: result: $ac_cv_c_const" >&5
17197 echo "${ECHO_T}$ac_cv_c_const" >&6
17198 if test $ac_cv_c_const = no; then
17200 cat >>confdefs.h <<\EOF
17206 ### Checks for external-data
17208 echo "$as_me:17208: checking if data-only library module links" >&5
17209 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
17210 if test "${cf_cv_link_dataonly+set}" = set; then
17211 echo $ECHO_N "(cached) $ECHO_C" >&6
17215 cat >conftest.$ac_ext <<EOF
17216 #line 17216 "configure"
17217 int testdata[3] = { 123, 456, 789 };
17219 if { (eval echo "$as_me:17219: \"$ac_compile\"") >&5
17220 (eval $ac_compile) 2>&5
17222 echo "$as_me:17222: \$? = $ac_status" >&5
17223 (exit "$ac_status"); } ; then
17224 mv conftest.o data.o && \
17225 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
17227 rm -f conftest.$ac_ext data.o
17228 cat >conftest.$ac_ext <<EOF
17229 #line 17229 "configure"
17233 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
17235 extern int testdata[3];
17236 return testdata[0] == 123
17237 && testdata[1] == 456
17238 && testdata[2] == 789;
17242 if { (eval echo "$as_me:17242: \"$ac_compile\"") >&5
17243 (eval $ac_compile) 2>&5
17245 echo "$as_me:17245: \$? = $ac_status" >&5
17246 (exit "$ac_status"); }; then
17247 mv conftest.o func.o && \
17248 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17250 rm -f conftest.$ac_ext func.o
17251 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17252 cf_saveLIBS="$LIBS"
17253 LIBS="conftest.a $LIBS"
17254 if test "$cross_compiling" = yes; then
17255 cf_cv_link_dataonly=unknown
17257 cat >"conftest.$ac_ext" <<_ACEOF
17258 #line 17258 "configure"
17259 #include "confdefs.h"
17263 extern int testfunc();
17264 ${cf_cv_main_return:-return} (!testfunc());
17268 rm -f "conftest$ac_exeext"
17269 if { (eval echo "$as_me:17269: \"$ac_link\"") >&5
17270 (eval $ac_link) 2>&5
17272 echo "$as_me:17272: \$? = $ac_status" >&5
17273 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17274 { (eval echo "$as_me:17274: \"$ac_try\"") >&5
17275 (eval $ac_try) 2>&5
17277 echo "$as_me:17277: \$? = $ac_status" >&5
17278 (exit "$ac_status"); }; }; then
17279 cf_cv_link_dataonly=yes
17281 echo "$as_me: program exited with status $ac_status" >&5
17282 echo "$as_me: failed program was:" >&5
17283 cat "conftest.$ac_ext" >&5
17284 cf_cv_link_dataonly=no
17286 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17288 LIBS="$cf_saveLIBS"
17292 echo "$as_me:17292: result: $cf_cv_link_dataonly" >&5
17293 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17295 if test "$cf_cv_link_dataonly" = no ; then
17297 cat >>confdefs.h <<\EOF
17298 #define BROKEN_LINKER 1
17304 ### Checks for library functions.
17310 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17311 echo "$as_me:17311: checking for $ac_header" >&5
17312 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17313 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17314 echo $ECHO_N "(cached) $ECHO_C" >&6
17316 cat >"conftest.$ac_ext" <<_ACEOF
17317 #line 17317 "configure"
17318 #include "confdefs.h"
17319 #include <$ac_header>
17321 if { (eval echo "$as_me:17321: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17322 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17324 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17326 cat conftest.err >&5
17327 echo "$as_me:17327: \$? = $ac_status" >&5
17328 (exit "$ac_status"); } >/dev/null; then
17329 if test -s conftest.err; then
17330 ac_cpp_err=$ac_c_preproc_warn_flag
17337 if test -z "$ac_cpp_err"; then
17338 eval "$as_ac_Header=yes"
17340 echo "$as_me: failed program was:" >&5
17341 cat "conftest.$ac_ext" >&5
17342 eval "$as_ac_Header=no"
17344 rm -f conftest.err "conftest.$ac_ext"
17346 echo "$as_me:17346: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17347 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17348 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17349 cat >>confdefs.h <<EOF
17350 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17356 echo "$as_me:17356: checking for working mkstemp" >&5
17357 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17358 if test "${cf_cv_func_mkstemp+set}" = set; then
17359 echo $ECHO_N "(cached) $ECHO_C" >&6
17363 if test "$cross_compiling" = yes; then
17364 cf_cv_func_mkstemp=maybe
17366 cat >"conftest.$ac_ext" <<_ACEOF
17367 #line 17367 "configure"
17368 #include "confdefs.h"
17370 #include <sys/types.h>
17371 #ifdef HAVE_UNISTD_H
17372 #include <unistd.h>
17374 #include <stdlib.h>
17376 #include <string.h>
17377 #include <sys/stat.h>
17380 char *tmpl = "conftestXXXXXX";
17388 for (n = 0; n < 2; ++n) {
17389 strcpy(name[n], tmpl);
17390 if ((fd = mkstemp(name[n])) >= 0) {
17391 if (!strcmp(name[n], tmpl)
17392 || stat(name[n], &sb) != 0
17393 || (sb.st_mode & S_IFMT) != S_IFREG
17394 || (sb.st_mode & 077) != 0) {
17401 && !strcmp(name[0], name[1]))
17403 ${cf_cv_main_return:-return}(result);
17407 rm -f "conftest$ac_exeext"
17408 if { (eval echo "$as_me:17408: \"$ac_link\"") >&5
17409 (eval $ac_link) 2>&5
17411 echo "$as_me:17411: \$? = $ac_status" >&5
17412 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17413 { (eval echo "$as_me:17413: \"$ac_try\"") >&5
17414 (eval $ac_try) 2>&5
17416 echo "$as_me:17416: \$? = $ac_status" >&5
17417 (exit "$ac_status"); }; }; then
17418 cf_cv_func_mkstemp=yes
17421 echo "$as_me: program exited with status $ac_status" >&5
17422 echo "$as_me: failed program was:" >&5
17423 cat "conftest.$ac_ext" >&5
17424 cf_cv_func_mkstemp=no
17427 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17431 echo "$as_me:17431: result: $cf_cv_func_mkstemp" >&5
17432 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17433 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17434 echo "$as_me:17434: checking for mkstemp" >&5
17435 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17436 if test "${ac_cv_func_mkstemp+set}" = set; then
17437 echo $ECHO_N "(cached) $ECHO_C" >&6
17439 cat >"conftest.$ac_ext" <<_ACEOF
17440 #line 17440 "configure"
17441 #include "confdefs.h"
17442 #define mkstemp autoconf_temporary
17443 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17450 /* We use char because int might match the return type of a gcc2
17451 builtin and then its argument prototype would still apply. */
17452 char mkstemp (void);
17458 /* The GNU C library defines stubs for functions which it implements
17459 to always fail with ENOSYS. Some functions are actually named
17460 something starting with __ and the normal name is an alias. */
17461 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17462 #error found stub for mkstemp
17470 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17471 if { (eval echo "$as_me:17471: \"$ac_link\"") >&5
17472 (eval $ac_link) 2>&5
17474 echo "$as_me:17474: \$? = $ac_status" >&5
17475 (exit "$ac_status"); } &&
17476 { ac_try='test -s "conftest$ac_exeext"'
17477 { (eval echo "$as_me:17477: \"$ac_try\"") >&5
17478 (eval $ac_try) 2>&5
17480 echo "$as_me:17480: \$? = $ac_status" >&5
17481 (exit "$ac_status"); }; }; then
17482 ac_cv_func_mkstemp=yes
17484 echo "$as_me: failed program was:" >&5
17485 cat "conftest.$ac_ext" >&5
17486 ac_cv_func_mkstemp=no
17488 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17490 echo "$as_me:17490: result: $ac_cv_func_mkstemp" >&5
17491 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17494 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17496 cat >>confdefs.h <<\EOF
17497 #define HAVE_MKSTEMP 1
17502 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17503 CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17504 CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17508 if test "$cf_with_ada" != "no" ; then
17510 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
17513 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17515 unset ac_cv_path_cf_TEMP_gnat
17517 # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
17518 set dummy $cf_prog_gnat; ac_word=$2
17519 echo "$as_me:17519: checking for $ac_word" >&5
17520 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17521 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
17522 echo $ECHO_N "(cached) $ECHO_C" >&6
17524 case $cf_TEMP_gnat in
17526 ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
17529 ac_save_IFS=$IFS; IFS=$ac_path_separator
17531 for ac_dir in $ac_dummy; do
17533 test -z "$ac_dir" && ac_dir=.
17534 if $as_executable_p "$ac_dir/$ac_word"; then
17535 ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
17536 echo "$as_me:17536: found $ac_dir/$ac_word" >&5
17541 test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
17545 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
17547 if test -n "$cf_TEMP_gnat"; then
17548 echo "$as_me:17548: result: $cf_TEMP_gnat" >&5
17549 echo "${ECHO_T}$cf_TEMP_gnat" >&6
17551 echo "$as_me:17551: result: no" >&5
17552 echo "${ECHO_T}no" >&6
17555 eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
17557 if test "x$cf_TEMP_gnat" != xno; then
17558 unset cf_cv_gnat_version
17561 echo "$as_me:17561: checking for $cf_prog_gnat version" >&5
17562 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
17563 if test "${cf_cv_gnat_version+set}" = set; then
17564 echo $ECHO_N "(cached) $ECHO_C" >&6
17567 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
17568 grep '[0-9].[0-9][0-9]*' |\
17569 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17572 echo "$as_me:17572: result: $cf_cv_gnat_version" >&5
17573 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17574 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17575 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
17578 eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
17581 unset cf_cv_gnat_version
17582 unset ac_cv_path_cf_TEMP_gnat
17585 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
17587 cf_cv_prog_gnat_correct=no
17589 cf_ada_make=gnatmake
17590 if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
17591 # gprconfig is newer than gnatmake; we can continue...
17594 rm -rf ./conftest* ./*~conftest*
17595 if mkdir conftest.src
17599 for cf_gprconfig in Ada C
17601 echo "$as_me:17601: checking for gprconfig name for $cf_gprconfig" >&5
17602 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
17603 if test "$cf_gprconfig" = C
17605 for cf_gprconfig_param in \
17606 "$cf_gprconfig,,,,GNATGCC" \
17607 "$cf_gprconfig,,,,GCC" \
17610 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17611 test -n "$cf_gprconfig_value" && break
17614 cf_gprconfig_param=$cf_gprconfig
17615 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17617 if test -n "$cf_gprconfig_value"
17619 eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
17620 echo "$as_me:17620: result: $cf_gprconfig_value" >&5
17621 echo "${ECHO_T}$cf_gprconfig_value" >&6
17623 echo "$as_me:17623: result: missing" >&5
17624 echo "${ECHO_T}missing" >&6
17630 rm -rf ./conftest* ./*~conftest*
17633 if test "x$cf_ada_config" != "x#"
17636 echo "$as_me:17636: checking for gnat version" >&5
17637 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17638 if test "${cf_cv_gnat_version+set}" = set; then
17639 echo $ECHO_N "(cached) $ECHO_C" >&6
17642 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
17643 grep '[0-9].[0-9][0-9]*' |\
17644 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17647 echo "$as_me:17647: result: $cf_cv_gnat_version" >&5
17648 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17649 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17651 case "$cf_cv_gnat_version" in
17652 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17653 cf_cv_prog_gnat_correct=yes
17656 { echo "$as_me:17656: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
17657 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
17658 cf_cv_prog_gnat_correct=no
17662 # Extract the first word of "m4", so it can be a program name with args.
17663 set dummy m4; ac_word=$2
17664 echo "$as_me:17664: checking for $ac_word" >&5
17665 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17666 if test "${ac_cv_prog_M4_exists+set}" = set; then
17667 echo $ECHO_N "(cached) $ECHO_C" >&6
17669 if test -n "$M4_exists"; then
17670 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17672 ac_save_IFS=$IFS; IFS=$ac_path_separator
17674 for ac_dir in $ac_dummy; do
17676 test -z "$ac_dir" && ac_dir=.
17677 $as_executable_p "$ac_dir/$ac_word" || continue
17678 ac_cv_prog_M4_exists="yes"
17679 echo "$as_me:17679: found $ac_dir/$ac_word" >&5
17683 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17686 M4_exists=$ac_cv_prog_M4_exists
17687 if test -n "$M4_exists"; then
17688 echo "$as_me:17688: result: $M4_exists" >&5
17689 echo "${ECHO_T}$M4_exists" >&6
17691 echo "$as_me:17691: result: no" >&5
17692 echo "${ECHO_T}no" >&6
17695 if test "$ac_cv_prog_M4_exists" = no; then
17696 cf_cv_prog_gnat_correct=no
17697 { echo "$as_me:17697: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
17698 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
17700 if test "$cf_cv_prog_gnat_correct" = yes; then
17701 echo "$as_me:17701: checking if GNAT works" >&5
17702 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17704 rm -rf ./conftest* ./*~conftest*
17705 cat >>conftest.ads <<CF_EOF
17706 procedure conftest;
17708 cat >>conftest.adb <<CF_EOF
17711 procedure conftest is
17713 Text_IO.Put ("Hello World");
17715 GNAT.OS_Lib.OS_Exit (0);
17718 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17719 if ( ./conftest 1>&5 2>&1 ) ; then
17720 cf_cv_prog_gnat_correct=yes
17722 cf_cv_prog_gnat_correct=no
17725 cf_cv_prog_gnat_correct=no
17727 rm -rf ./conftest* ./*~conftest*
17729 echo "$as_me:17729: result: $cf_cv_prog_gnat_correct" >&5
17730 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17733 cf_cv_prog_gnat_correct=no
17737 if test "$cf_cv_prog_gnat_correct" = yes; then
17739 echo "$as_me:17739: checking optimization options for ADAFLAGS" >&5
17740 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
17744 ADAFLAGS="$ADAFLAGS -g"
17750 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
17752 ADAFLAGS="$ADAFLAGS $cf_O_flag"
17756 echo "$as_me:17756: result: $ADAFLAGS" >&5
17757 echo "${ECHO_T}$ADAFLAGS" >&6
17759 echo "$as_me:17759: checking if GNATPREP supports -T option" >&5
17760 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
17761 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
17762 echo $ECHO_N "(cached) $ECHO_C" >&6
17765 cf_cv_gnatprep_opt_t=no
17766 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
17769 echo "$as_me:17769: result: $cf_cv_gnatprep_opt_t" >&5
17770 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
17771 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
17773 echo "$as_me:17773: checking if GNAT supports generics" >&5
17774 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
17775 case "$cf_cv_gnat_version" in
17776 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17777 cf_gnat_generics=yes
17780 cf_gnat_generics=no
17783 echo "$as_me:17783: result: $cf_gnat_generics" >&5
17784 echo "${ECHO_T}$cf_gnat_generics" >&6
17786 if test "$cf_gnat_generics" = yes
17788 cf_compile_generics=generics
17789 cf_generic_objects="\${GENOBJS}"
17791 cf_compile_generics=
17792 cf_generic_objects=
17795 echo "$as_me:17795: checking if GNAT supports SIGINT" >&5
17796 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
17797 if test "${cf_cv_gnat_sigint+set}" = set; then
17798 echo $ECHO_N "(cached) $ECHO_C" >&6
17801 rm -rf ./conftest* ./*~conftest*
17802 cat >>conftest.ads <<CF_EOF
17803 with Ada.Interrupts.Names;
17805 package ConfTest is
17807 pragma Warnings (Off); -- the next pragma exists since 3.11p
17808 pragma Unreserve_All_Interrupts;
17809 pragma Warnings (On);
17811 protected Process is
17813 function Continue return Boolean;
17814 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
17816 Done : Boolean := False;
17821 cat >>conftest.adb <<CF_EOF
17822 package body ConfTest is
17823 protected body Process is
17828 function Continue return Boolean is
17835 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17836 cf_cv_gnat_sigint=yes
17838 cf_cv_gnat_sigint=no
17840 rm -rf ./conftest* ./*~conftest*
17843 echo "$as_me:17843: result: $cf_cv_gnat_sigint" >&5
17844 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
17846 if test "$cf_cv_gnat_sigint" = yes ; then
17849 USE_GNAT_SIGINT="#"
17852 cf_gnat_libraries=no
17853 cf_gnat_projects=no
17855 if test "$enable_gnat_projects" != no ; then
17856 echo "$as_me:17856: checking if GNAT supports project files" >&5
17857 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
17858 case "$cf_cv_gnat_version" in
17862 case "$cf_cv_system_name" in
17866 rm -rf ./conftest* ./*~conftest*
17867 if mkdir conftest.src conftest.bin conftest.lib
17870 rm -rf ./conftest* ./*~conftest*
17871 cat >>library.gpr <<CF_EOF
17873 Kind := External ("LIB_KIND");
17874 for Library_Name use "ConfTest";
17875 for Object_Dir use ".";
17876 for Library_ALI_Dir use External("LIBRARY_DIR");
17877 for Library_Version use External ("SONAME");
17878 for Library_Kind use Kind;
17879 for Library_Dir use External("BUILD_DIR");
17880 Source_Dir := External ("SOURCE_DIR");
17881 for Source_Dirs use (Source_Dir);
17884 cat >>confpackage.ads <<CF_EOF
17885 package ConfPackage is
17886 procedure conftest;
17889 cat >>confpackage.adb <<CF_EOF
17891 package body ConfPackage is
17892 procedure conftest is
17894 Text_IO.Put ("Hello World");
17899 if ( "$cf_ada_make" $ADAFLAGS \
17901 -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
17902 -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
17903 -XSOURCE_DIR="`pwd`" \
17904 -XSONAME=libConfTest.so.1 \
17905 -XLIB_KIND=static 1>&5 2>&1 ) ; then
17906 cf_gnat_projects=yes
17910 if test -f conftest.lib/confpackage.ali
17912 cf_gnat_libraries=yes
17914 rm -rf ./conftest* ./*~conftest*
17919 echo "$as_me:17919: result: $cf_gnat_projects" >&5
17920 echo "${ECHO_T}$cf_gnat_projects" >&6
17921 fi # enable_gnat_projects
17923 if test "$cf_gnat_projects" = yes
17925 echo "$as_me:17925: checking if GNAT supports libraries" >&5
17926 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
17927 echo "$as_me:17927: result: $cf_gnat_libraries" >&5
17928 echo "${ECHO_T}$cf_gnat_libraries" >&6
17931 USE_OLD_MAKERULES=""
17932 USE_GNAT_PROJECTS="#"
17933 USE_GNAT_MAKE_GPR="#"
17934 USE_GNAT_GPRBUILD="#"
17936 if test "$cf_gnat_projects" = yes
17938 USE_OLD_MAKERULES="#"
17939 USE_GNAT_PROJECTS=""
17940 if test "$cf_cv_VERSION_GPRBUILD" != no
17942 USE_GNAT_GPRBUILD=""
17943 elif test "$cf_cv_VERSION_GNATMAKE" != no
17945 USE_GNAT_MAKE_GPR=""
17947 { echo "$as_me:17947: WARNING: use old makefile rules since tools are missing" >&5
17948 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
17952 if test "$cf_gnat_libraries" = yes
17954 USE_GNAT_LIBRARIES=""
17956 USE_GNAT_LIBRARIES="#"
17959 echo "$as_me:17959: checking for ada-compiler" >&5
17960 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
17962 # Check whether --with-ada-compiler or --without-ada-compiler was given.
17963 if test "${with_ada_compiler+set}" = set; then
17964 withval="$with_ada_compiler"
17965 cf_ada_compiler=$withval
17967 cf_ada_compiler=gnatmake
17970 echo "$as_me:17970: result: $cf_ada_compiler" >&5
17971 echo "${ECHO_T}$cf_ada_compiler" >&6
17973 cf_ada_package=terminal_interface
17975 echo "$as_me:17975: checking for ada-include" >&5
17976 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
17978 # Check whether --with-ada-include or --without-ada-include was given.
17979 if test "${with_ada_include+set}" = set; then
17980 withval="$with_ada_include"
17983 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
17984 fi; if test -n "$prefix/share/ada/adainclude" ; then
17986 if test "x$prefix" != xNONE; then
17987 cf_path_syntax="$prefix"
17989 cf_path_syntax="$ac_default_prefix"
17992 case ".$withval" in
17993 (.\$\(*\)*|.\'*\'*)
17997 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17999 (.\$\{*prefix\}*|.\$\{*dir\}*)
18000 eval withval="$withval"
18001 case ".$withval" in
18003 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18008 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18011 { { echo "$as_me:18011: error: expected a pathname, not \"$withval\"" >&5
18012 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18013 { (exit 1); exit 1; }; }
18018 eval ADA_INCLUDE="$withval"
18020 echo "$as_me:18020: result: $ADA_INCLUDE" >&5
18021 echo "${ECHO_T}$ADA_INCLUDE" >&6
18023 echo "$as_me:18023: checking for ada-objects" >&5
18024 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
18026 # Check whether --with-ada-objects or --without-ada-objects was given.
18027 if test "${with_ada_objects+set}" = set; then
18028 withval="$with_ada_objects"
18031 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
18032 fi; if test -n "$prefix/lib/ada/adalib" ; then
18034 if test "x$prefix" != xNONE; then
18035 cf_path_syntax="$prefix"
18037 cf_path_syntax="$ac_default_prefix"
18040 case ".$withval" in
18041 (.\$\(*\)*|.\'*\'*)
18045 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
18047 (.\$\{*prefix\}*|.\$\{*dir\}*)
18048 eval withval="$withval"
18049 case ".$withval" in
18051 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18056 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18059 { { echo "$as_me:18059: error: expected a pathname, not \"$withval\"" >&5
18060 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18061 { (exit 1); exit 1; }; }
18066 eval ADA_OBJECTS="$withval"
18068 echo "$as_me:18068: result: $ADA_OBJECTS" >&5
18069 echo "${ECHO_T}$ADA_OBJECTS" >&6
18071 echo "$as_me:18071: checking if an Ada95 shared-library should be built" >&5
18072 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
18074 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
18075 if test "${with_ada_sharedlib+set}" = set; then
18076 withval="$with_ada_sharedlib"
18077 with_ada_sharedlib=$withval
18079 with_ada_sharedlib=no
18081 echo "$as_me:18081: result: $with_ada_sharedlib" >&5
18082 echo "${ECHO_T}$with_ada_sharedlib" >&6
18084 if test "x$with_ada_sharedlib" != xno
18086 if test "x$cf_gnat_projects" != xyes
18088 { echo "$as_me:18088: WARNING: disabling shared-library since GNAT projects are not supported" >&5
18089 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
18090 with_ada_sharedlib=no
18094 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
18095 MAKE_ADA_SHAREDLIB="#"
18097 if test "x$with_ada_sharedlib" != xno
18099 MAKE_ADA_SHAREDLIB=
18100 if test "x$with_ada_sharedlib" != xyes
18102 ADA_SHAREDLIB="$with_ada_sharedlib"
18106 # allow the Ada binding to be renamed
18108 echo "$as_me:18108: checking for ada-libname" >&5
18109 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
18111 # Check whether --with-ada-libname or --without-ada-libname was given.
18112 if test "${with_ada_libname+set}" = set; then
18113 withval="$with_ada_libname"
18114 ADA_LIBNAME=$withval
18116 ADA_LIBNAME=AdaCurses
18118 case "x$ADA_LIBNAME" in
18120 ADA_LIBNAME=AdaCurses
18124 echo "$as_me:18124: result: $ADA_LIBNAME" >&5
18125 echo "${ECHO_T}$ADA_LIBNAME" >&6
18128 { { echo "$as_me:18128: error: No usable Ada compiler found" >&5
18129 echo "$as_me: error: No usable Ada compiler found" >&2;}
18130 { (exit 1); exit 1; }; }
18133 { { echo "$as_me:18133: error: The Ada compiler is needed for this package" >&5
18134 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
18135 { (exit 1); exit 1; }; }
18138 ################################################################################
18145 ### Construct the list of include-directories to be generated
18147 if test "$srcdir" != "."; then
18148 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
18150 CPPFLAGS="-I../include $CPPFLAGS"
18151 if test "$srcdir" != "."; then
18152 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
18154 CPPFLAGS="-I. $CPPFLAGS"
18156 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18157 if test "$srcdir" != "."; then
18158 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18160 if test "$GCC" != yes; then
18161 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18162 elif test "$includedir" != "/usr/include"; then
18163 if test "$includedir" = '${prefix}/include' ; then
18164 if test x$prefix != x/usr ; then
18165 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18168 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18172 ### Build up pieces for makefile rules
18173 echo "$as_me:18173: checking default library suffix" >&5
18174 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18176 case $DFT_LWR_MODEL in
18177 (libtool) DFT_ARG_SUFFIX='' ;;
18178 (normal) DFT_ARG_SUFFIX='' ;;
18179 (debug) DFT_ARG_SUFFIX='_g' ;;
18180 (profile) DFT_ARG_SUFFIX='_p' ;;
18181 (shared) DFT_ARG_SUFFIX='' ;;
18183 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18184 echo "$as_me:18184: result: $DFT_ARG_SUFFIX" >&5
18185 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18187 echo "$as_me:18187: checking default library-dependency suffix" >&5
18188 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18190 case X$DFT_LWR_MODEL in
18192 DFT_LIB_SUFFIX='.la'
18193 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18196 case "$cf_cv_system_name" in
18198 DFT_LIB_SUFFIX='_g.lib'
18201 DFT_LIB_SUFFIX='_g.a'
18204 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18207 case "$cf_cv_system_name" in
18209 DFT_LIB_SUFFIX='_p.lib'
18212 DFT_LIB_SUFFIX='_p.a'
18215 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18218 case "$cf_cv_system_name" in
18220 DFT_LIB_SUFFIX='.so'
18221 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18224 DFT_LIB_SUFFIX='.dll'
18225 DFT_DEP_SUFFIX='.dll.lib'
18227 (cygwin*|msys*|mingw*)
18228 DFT_LIB_SUFFIX='.dll'
18229 DFT_DEP_SUFFIX='.dll.a'
18232 DFT_LIB_SUFFIX='.dylib'
18233 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18238 DFT_LIB_SUFFIX='.so'
18239 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18242 DFT_LIB_SUFFIX='.sl'
18243 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18248 DFT_LIB_SUFFIX='.so'
18249 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18256 DFT_LIB_SUFFIX='.lib'
18259 DFT_LIB_SUFFIX='.a'
18262 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18265 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
18267 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
18268 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
18270 echo "$as_me:18270: result: $DFT_DEP_SUFFIX" >&5
18271 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18273 echo "$as_me:18273: checking default object directory" >&5
18274 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18276 case $DFT_LWR_MODEL in
18277 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
18278 (normal) DFT_OBJ_SUBDIR='objects' ;;
18279 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
18280 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
18282 case "$cf_cv_system_name" in
18284 DFT_OBJ_SUBDIR='objects' ;;
18286 DFT_OBJ_SUBDIR='obj_s' ;;
18289 echo "$as_me:18289: result: $DFT_OBJ_SUBDIR" >&5
18290 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18292 ### Set up low-level terminfo dependencies for makefiles.
18294 if test "$DFT_LWR_MODEL" = shared ; then
18295 case $cf_cv_system_name in
18297 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18300 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
18305 USE_ARG_SUFFIX=${DFT_ARG_SUFFIX}
18307 USE_LIB_SUFFIX=${DFT_ARG_SUFFIX}
18309 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
18311 ### Construct the list of subdirectories for which we'll customize makefiles
18312 ### with the appropriate compile-rules.
18314 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
18316 cat >>confdefs.h <<EOF
18317 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18320 ################################################################################
18326 NCURSES_SHLIB2="sh -c"
18328 ADA_SUBDIRS="include gen src doc"
18329 if test "x$cf_with_tests" != "xno" ; then
18330 ADA_SUBDIRS="$ADA_SUBDIRS samples"
18332 for cf_dir in $ADA_SUBDIRS
18334 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18341 # match layout used by make-tar.sh
18342 ADAHTML_DIR=../doc/ada
18344 if test "x$cross_compiling" = xyes ; then
18345 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
18347 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
18350 ac_config_files="$ac_config_files $SUB_MAKEFILES src/library.gpr:src/library.gpr.in doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
18351 ac_config_commands="$ac_config_commands default"
18352 cat >confcache <<\_ACEOF
18353 # This file is a shell script that caches the results of configure
18354 # tests run on this system so they can be shared between configure
18355 # scripts and configure runs, see configure's option --config-cache.
18356 # It is not useful on other systems. If it contains results you don't
18357 # want to keep, you may remove or edit it.
18359 # config.status only pays attention to the cache file if you give it
18360 # the --recheck option to rerun configure.
18362 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18363 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18364 # following values.
18368 # The following way of writing the cache mishandles newlines in values,
18369 # but we know of no workaround that is simple, portable, and efficient.
18370 # So, don't put newlines in cache variables' values.
18371 # Ultrix sh set writes to stderr and can't be redirected directly,
18372 # and sets the high bit in the cache file unless we assign to the vars.
18375 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18377 # `set' does not quote correctly, so add quotes (double-quote
18378 # substitution turns \\\\ into \\, and sed turns \\ into \).
18381 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18384 # `set' quotes correctly as required by POSIX, so do not add quotes.
18386 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18393 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18395 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18397 if cmp -s $cache_file confcache; then :; else
18398 if test -w $cache_file; then
18399 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18400 cat confcache >$cache_file
18402 echo "not updating unwritable cache $cache_file"
18407 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18408 # Let make expand exec_prefix.
18409 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18411 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18412 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18413 # trailing colons and then remove the whole line if VPATH becomes empty
18414 # (actually we leave an empty line to preserve line numbers).
18415 if test "x$srcdir" = x.; then
18416 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18417 s/:*\$(srcdir):*/:/;
18418 s/:*\${srcdir}:*/:/;
18420 s/^\([^=]*=[ ]*\):*/\1/;
18426 DEFS=-DHAVE_CONFIG_H
18428 : "${CONFIG_STATUS=./config.status}"
18429 ac_clean_files_save=$ac_clean_files
18430 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18431 { echo "$as_me:18431: creating $CONFIG_STATUS" >&5
18432 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18433 cat >"$CONFIG_STATUS" <<_ACEOF
18435 # Generated automatically by configure.
18436 # Run this file to recreate the current configuration.
18437 # Compiler output produced by configure, useful for debugging
18438 # configure, is in config.log if it exists.
18441 SHELL=\${CONFIG_SHELL-$SHELL}
18442 ac_cs_invocation="\$0 \$@"
18444 CLICOLOR_FORCE= GREP_OPTIONS=
18445 unset CLICOLOR_FORCE GREP_OPTIONS
18448 cat >>"$CONFIG_STATUS" <<\_ACEOF
18449 # Be Bourne compatible
18450 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18453 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18457 # Name of the executable.
18458 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18460 if expr a : '\(a\)' >/dev/null 2>&1; then
18466 rm -f conf$$ conf$$.exe conf$$.file
18468 if ln -s conf$$.file conf$$ 2>/dev/null; then
18469 # We could just check for DJGPP; but this test a) works b) is more generic
18470 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18471 if test -f conf$$.exe; then
18472 # Don't use ln at all; we don't have any links
18477 elif ln conf$$.file conf$$ 2>/dev/null; then
18482 rm -f conf$$ conf$$.exe conf$$.file
18484 as_executable_p="test -f"
18486 # Support unset when possible.
18487 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18494 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18495 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18496 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18497 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18498 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18499 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18500 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18501 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18504 # We need space, tab and new line, in precisely that order.
18510 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18516 # Files that config.status was made for.
18517 if test -n "$ac_config_files"; then
18518 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
18521 if test -n "$ac_config_headers"; then
18522 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
18525 if test -n "$ac_config_links"; then
18526 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
18529 if test -n "$ac_config_commands"; then
18530 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
18533 cat >>"$CONFIG_STATUS" <<\EOF
18536 \`$as_me' instantiates files from templates according to the
18537 current configuration.
18539 Usage: $0 [OPTIONS] [FILE]...
18541 -h, --help print this help, then exit
18542 -V, --version print version number, then exit
18543 -d, --debug don't remove temporary files
18544 --recheck update $as_me by reconfiguring in the same conditions
18545 --file=FILE[:TEMPLATE]
18546 instantiate the configuration file FILE
18547 --header=FILE[:TEMPLATE]
18548 instantiate the configuration header FILE
18550 Configuration files:
18553 Configuration headers:
18556 Configuration commands:
18559 Report bugs to <dickey@invisible-island.net>."
18562 cat >>"$CONFIG_STATUS" <<EOF
18565 configured by $0, generated by GNU Autoconf 2.52.20210509,
18566 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18568 Copyright 2003-2020,2021 Thomas E. Dickey
18569 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18570 Free Software Foundation, Inc.
18571 This config.status script is free software; the Free Software Foundation
18572 gives unlimited permission to copy, distribute and modify it."
18577 cat >>"$CONFIG_STATUS" <<\EOF
18578 # If no file are specified by the user, then we need to provide default
18579 # value. By we need to know if files were specified by the user.
18585 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18586 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18588 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18592 *) # This is not an option, so the user has probably given explicit
18594 ac_need_defaults=false;;
18598 # Handling of the options.
18600 cat >>"$CONFIG_STATUS" <<EOF
18601 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18602 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18603 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18605 cat >>"$CONFIG_STATUS" <<\EOF
18606 --version | --vers* | -V )
18607 echo "$ac_cs_version"; exit 0 ;;
18609 # Conflict between --help and --header
18610 { { echo "$as_me:18610: error: ambiguous option: $1
18611 Try \`$0 --help' for more information." >&5
18612 echo "$as_me: error: ambiguous option: $1
18613 Try \`$0 --help' for more information." >&2;}
18614 { (exit 1); exit 1; }; };;
18615 --help | --hel | -h )
18616 echo "$ac_cs_usage"; exit 0 ;;
18617 --debug | --d* | -d )
18619 --file | --fil | --fi | --f )
18621 CONFIG_FILES="$CONFIG_FILES $1"
18622 ac_need_defaults=false;;
18623 --header | --heade | --head | --hea )
18625 CONFIG_HEADERS="$CONFIG_HEADERS $1"
18626 ac_need_defaults=false;;
18628 # This is an error.
18629 -*) { { echo "$as_me:18629: error: unrecognized option: $1
18630 Try \`$0 --help' for more information." >&5
18631 echo "$as_me: error: unrecognized option: $1
18632 Try \`$0 --help' for more information." >&2;}
18633 { (exit 1); exit 1; }; } ;;
18635 *) ac_config_targets="$ac_config_targets $1" ;;
18644 ## ----------------------- ##
18645 ## Running config.status. ##
18646 ## ----------------------- ##
18648 This file was extended by $as_me 2.52.20210509, executed with
18649 CONFIG_FILES = $CONFIG_FILES
18650 CONFIG_HEADERS = $CONFIG_HEADERS
18651 CONFIG_LINKS = $CONFIG_LINKS
18652 CONFIG_COMMANDS = $CONFIG_COMMANDS
18653 > "$ac_cs_invocation"
18654 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18659 cat >>"$CONFIG_STATUS" <<EOF
18661 # INIT-COMMANDS section.
18664 ### Special initialization commands, used to pass information from the
18665 ### configuration-run into config.status
18668 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
18669 DFT_LWR_MODEL="$DFT_LWR_MODEL"
18670 LIB_NAME="$LIB_NAME"
18671 LIB_PREFIX="$LIB_PREFIX"
18672 LIB_SUFFIX="$LIB_SUFFIX"
18674 NCURSES_MAJOR="$NCURSES_MAJOR"
18675 NCURSES_MINOR="$NCURSES_MINOR"
18676 NCURSES_PATCH="$NCURSES_PATCH"
18677 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
18678 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
18679 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
18680 cf_cv_abi_version="$cf_cv_abi_version"
18681 cf_cv_rel_version="$cf_cv_rel_version"
18682 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
18683 cf_cv_shared_soname='$cf_cv_shared_soname'
18684 cf_cv_shlib_version="$cf_cv_shlib_version"
18685 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
18686 cf_cv_system_name="$cf_cv_system_name"
18692 cat >>"$CONFIG_STATUS" <<\EOF
18693 for ac_config_target in $ac_config_targets
18695 case "$ac_config_target" in
18696 # Handling of arguments.
18697 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
18698 "src/library.gpr" ) CONFIG_FILES="$CONFIG_FILES src/library.gpr:src/library.gpr.in" ;;
18699 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
18700 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18701 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18702 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
18703 *) { { echo "$as_me:18703: error: invalid argument: $ac_config_target" >&5
18704 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18705 { (exit 1); exit 1; }; };;
18709 # If the user did not use the arguments to specify the items to instantiate,
18710 # then the envvar interface is used. Set only those that are not.
18711 # We use the long form for the default assignment because of an extremely
18712 # bizarre bug on SunOS 4.1.3.
18713 if "$ac_need_defaults"; then
18714 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18715 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18716 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18719 # Create a temporary directory, and hook for its removal unless debugging.
18722 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18723 trap '{ (exit 1); exit 1; }' 1 2 13 15
18726 # Create a (secure) tmp directory for tmp files.
18729 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18730 test -n "$tmp" && test -d "$tmp"
18733 tmp=$TMPDIR/cs$$-$RANDOM
18734 (umask 077 && mkdir $tmp)
18737 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18738 { (exit 1); exit 1; }
18743 cat >>"$CONFIG_STATUS" <<EOF
18746 # CONFIG_FILES section.
18749 # No need to generate the scripts if there are no CONFIG_FILES.
18750 # This happens for instance when ./config.status config.h
18751 if test -n "\$CONFIG_FILES"; then
18752 # Protect against being on the right side of a sed subst in config.status.
18753 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18754 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18755 s,@SHELL@,$SHELL,;t t
18756 s,@exec_prefix@,$exec_prefix,;t t
18757 s,@prefix@,$prefix,;t t
18758 s,@program_transform_name@,$program_transform_name,;t t
18759 s,@bindir@,$bindir,;t t
18760 s,@sbindir@,$sbindir,;t t
18761 s,@libexecdir@,$libexecdir,;t t
18762 s,@datarootdir@,$datarootdir,;t t
18763 s,@datadir@,$datadir,;t t
18764 s,@sysconfdir@,$sysconfdir,;t t
18765 s,@sharedstatedir@,$sharedstatedir,;t t
18766 s,@localstatedir@,$localstatedir,;t t
18767 s,@runstatedir@,$runstatedir,;t t
18768 s,@libdir@,$libdir,;t t
18769 s,@includedir@,$includedir,;t t
18770 s,@oldincludedir@,$oldincludedir,;t t
18771 s,@infodir@,$infodir,;t t
18772 s,@mandir@,$mandir,;t t
18773 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18774 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18775 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18776 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18777 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18778 s,@build_alias@,$build_alias,;t t
18779 s,@host_alias@,$host_alias,;t t
18780 s,@target_alias@,$target_alias,;t t
18781 s,@ECHO_C@,$ECHO_C,;t t
18782 s,@ECHO_N@,$ECHO_N,;t t
18783 s,@ECHO_T@,$ECHO_T,;t t
18784 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18785 s,@DEFS@,$DEFS,;t t
18786 s,@LIBS@,$LIBS,;t t
18787 s,@top_builddir@,$top_builddir,;t t
18788 s,@build@,$build,;t t
18789 s,@build_cpu@,$build_cpu,;t t
18790 s,@build_vendor@,$build_vendor,;t t
18791 s,@build_os@,$build_os,;t t
18792 s,@host@,$host,;t t
18793 s,@host_cpu@,$host_cpu,;t t
18794 s,@host_vendor@,$host_vendor,;t t
18795 s,@host_os@,$host_os,;t t
18796 s,@target@,$target,;t t
18797 s,@target_cpu@,$target_cpu,;t t
18798 s,@target_vendor@,$target_vendor,;t t
18799 s,@target_os@,$target_os,;t t
18800 s,@GREP@,$GREP,;t t
18801 s,@FGREP@,$FGREP,;t t
18803 s,@CFLAGS@,$CFLAGS,;t t
18804 s,@LDFLAGS@,$LDFLAGS,;t t
18805 s,@CPPFLAGS@,$CPPFLAGS,;t t
18806 s,@ac_ct_CC@,$ac_ct_CC,;t t
18807 s,@EXEEXT@,$EXEEXT,;t t
18808 s,@OBJEXT@,$OBJEXT,;t t
18809 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18811 s,@EGREP@,$EGREP,;t t
18813 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18814 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18815 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18816 s,@LN_S@,$LN_S,;t t
18817 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
18818 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
18819 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18820 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
18821 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
18822 s,@SET_MAKE@,$SET_MAKE,;t t
18823 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
18824 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
18825 s,@CTAGS@,$CTAGS,;t t
18826 s,@ETAGS@,$ETAGS,;t t
18827 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18828 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18829 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
18830 s,@RANLIB@,$RANLIB,;t t
18831 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18833 s,@ac_ct_LD@,$ac_ct_LD,;t t
18835 s,@ac_ct_AR@,$ac_ct_AR,;t t
18836 s,@ARFLAGS@,$ARFLAGS,;t t
18837 s,@DESTDIR@,$DESTDIR,;t t
18838 s,@BUILD_CC@,$BUILD_CC,;t t
18839 s,@BUILD_CPP@,$BUILD_CPP,;t t
18840 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
18841 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
18842 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
18843 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
18844 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
18845 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
18846 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
18847 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
18848 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
18849 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
18850 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
18851 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
18852 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
18853 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18854 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18855 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
18856 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
18857 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
18858 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
18859 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
18860 s,@CC_G_OPT@,$CC_G_OPT,;t t
18861 s,@LD_MODEL@,$LD_MODEL,;t t
18862 s,@shlibdir@,$shlibdir,;t t
18863 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
18864 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
18865 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
18866 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
18867 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
18868 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
18869 s,@LINK_PROGS@,$LINK_PROGS,;t t
18870 s,@LINK_TESTS@,$LINK_TESTS,;t t
18871 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
18872 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
18873 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
18874 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
18875 s,@RPATH_LIST@,$RPATH_LIST,;t t
18876 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
18877 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
18878 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
18879 s,@PTHREAD@,$PTHREAD,;t t
18880 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
18881 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18882 s,@ECHO_LT@,$ECHO_LT,;t t
18883 s,@ECHO_LD@,$ECHO_LD,;t t
18884 s,@RULE_CC@,$RULE_CC,;t t
18885 s,@SHOW_CC@,$SHOW_CC,;t t
18886 s,@ECHO_CC@,$ECHO_CC,;t t
18887 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18888 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
18889 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
18890 s,@ADAFLAGS@,$ADAFLAGS,;t t
18891 s,@ADA_TRACE@,$ADA_TRACE,;t t
18892 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
18893 s,@M4_exists@,$M4_exists,;t t
18894 s,@cf_ada_make@,$cf_ada_make,;t t
18895 s,@cf_ada_config@,$cf_ada_config,;t t
18896 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
18897 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
18898 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
18899 s,@cf_compile_generics@,$cf_compile_generics,;t t
18900 s,@cf_generic_objects@,$cf_generic_objects,;t t
18901 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
18902 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
18903 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
18904 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
18905 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
18906 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
18907 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
18908 s,@cf_ada_package@,$cf_ada_package,;t t
18909 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
18910 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
18911 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
18912 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
18913 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
18914 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
18915 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
18916 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
18917 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
18918 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18919 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18920 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
18921 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
18922 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
18923 s,@TEST_ARG2@,$TEST_ARG2,;t t
18924 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
18925 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
18926 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
18927 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
18928 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
18929 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
18930 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
18935 cat >>"$CONFIG_STATUS" <<\EOF
18936 # Split the substitutions into bite-sized pieces for seds with
18937 # small command number limits, like on Digital OSF/1 and HP-UX.
18938 ac_max_sed_lines=48
18939 ac_sed_frag=1 # Number of current file.
18940 ac_beg=1 # First line for current file.
18941 ac_end=$ac_max_sed_lines # Line after last line for current file.
18944 while "$ac_more_lines"; do
18945 if test "$ac_beg" -gt 1; then
18946 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18948 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18950 if test ! -s $tmp/subs.frag; then
18951 ac_more_lines=false
18953 # The purpose of the label and of the branching condition is to
18954 # speed up the sed processing (if there are no `@' at all, there
18955 # is no need to browse any of the substitutions).
18956 # These are the two extra sed commands mentioned above.
18958 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18959 # It is possible to make a multiline substitution using escaped newlines.
18960 # Ensure that we do not split the substitution between script fragments.
18962 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
18963 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
18964 if test -s $tmp/subs.next; then
18965 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
18966 if test ! -s $tmp/subs.edit; then
18967 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
18968 if test ! -s $tmp/subs.edit; then
18969 if test "$ac_beg" -gt 1; then
18970 ac_end=`expr "$ac_end" - 1`
18977 if test -z "$ac_sed_cmds"; then
18978 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18980 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18982 ac_sed_frag=`expr "$ac_sed_frag" + 1`
18984 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
18987 if test -z "$ac_sed_cmds"; then
18990 fi # test -n "$CONFIG_FILES"
18993 cat >>"$CONFIG_STATUS" <<\EOF
18994 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18995 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18997 - | *:- | *:-:* ) # input from stdin
18999 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19000 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19001 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19002 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19003 * ) ac_file_in=$ac_file.in ;;
19006 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19007 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19008 X"$ac_file" : 'X\(//\)[^/]' \| \
19009 X"$ac_file" : 'X\(//\)$' \| \
19010 X"$ac_file" : 'X\(/\)' \| \
19011 . : '\(.\)' 2>/dev/null ||
19013 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19014 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19015 /^X\(\/\/\)$/{ s//\1/; q; }
19016 /^X\(\/\).*/{ s//\1/; q; }
19018 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19019 { case "$ac_dir" in
19020 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19024 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19025 case $as_mkdir_dir in
19026 # Skip DOS drivespec
19027 ?:) as_incr_dir=$as_mkdir_dir ;;
19029 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19030 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19035 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
19036 # A "../" for each directory in $ac_dir_suffix.
19037 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
19039 ac_dir_suffix= ac_dots=
19044 if test -z "$ac_dots"; then
19047 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
19049 [\\/]* | ?:[\\/]* )
19050 ac_srcdir="$srcdir$ac_dir_suffix";
19051 ac_top_srcdir="$srcdir" ;;
19052 *) # Relative path.
19053 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
19054 ac_top_srcdir="$ac_dots$srcdir" ;;
19058 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19059 *) ac_INSTALL=$ac_dots$INSTALL ;;
19062 if test x"$ac_file" != x-; then
19063 { echo "$as_me:19063: creating $ac_file" >&5
19064 echo "$as_me: creating $ac_file" >&6;}
19067 # Let's still pretend it is `configure' which instantiates (i.e., don't
19068 # use $as_me), people would be surprised to read:
19069 # /* config.h. Generated automatically by config.status. */
19070 configure_input="Generated automatically from `echo $ac_file_in |
19071 sed 's,.*/,,'` by configure."
19073 # First look for the input files in the build tree, otherwise in the
19075 ac_file_inputs=`IFS=:
19076 for f in $ac_file_in; do
19078 -) echo $tmp/stdin ;;
19080 # Absolute (can't be DOS-style, as IFS=:)
19081 test -f "$f" || { { echo "$as_me:19081: error: cannot find input file: $f" >&5
19082 echo "$as_me: error: cannot find input file: $f" >&2;}
19083 { (exit 1); exit 1; }; }
19086 if test -f "$f"; then
19089 elif test -f "$srcdir/$f"; then
19094 { { echo "$as_me:19094: error: cannot find input file: $f" >&5
19095 echo "$as_me: error: cannot find input file: $f" >&2;}
19096 { (exit 1); exit 1; }; }
19099 done` || { (exit 1); exit 1; }
19101 cat >>"$CONFIG_STATUS" <<\EOF
19102 ac_warn_datarootdir=no
19103 if test x"$ac_file" != x-; then
19104 for ac_item in $ac_file_inputs
19106 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
19107 if test -n "$ac_seen"; then
19108 ac_used=`grep '@datarootdir@' "$ac_item"`
19109 if test -z "$ac_used"; then
19110 { echo "$as_me:19110: WARNING: datarootdir was used implicitly but not set:
19112 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
19114 ac_warn_datarootdir=yes
19117 ac_seen=`grep '${datarootdir}' "$ac_item"`
19118 if test -n "$ac_seen"; then
19119 { echo "$as_me:19119: WARNING: datarootdir was used explicitly but not set:
19121 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
19123 ac_warn_datarootdir=yes
19128 if test "x$ac_warn_datarootdir" = xyes; then
19129 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
19133 cat >>"$CONFIG_STATUS" <<EOF
19137 cat >>"$CONFIG_STATUS" <<\EOF
19139 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19140 s,@configure_input@,$configure_input,;t t
19141 s,@srcdir@,$ac_srcdir,;t t
19142 s,@top_srcdir@,$ac_top_srcdir,;t t
19143 s,@INSTALL@,$ac_INSTALL,;t t
19144 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19146 if test x"$ac_file" != x-; then
19147 cp "$tmp/out" "$ac_file"
19149 for ac_name in prefix exec_prefix datarootdir
19151 ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
19152 if test -n "$ac_seen"; then
19153 ac_init=`${EGREP-egrep} '[ ]*'$ac_name'[ ]*=' "$ac_file"`
19154 if test -z "$ac_init"; then
19155 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
19156 { echo "$as_me:19156: WARNING: Variable $ac_name is used but was not set:
19158 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
19163 ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
19164 ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
19165 if test -s $tmp/out; then
19166 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
19167 { echo "$as_me:19167: WARNING: Some variables may not be substituted:
19169 echo "$as_me: WARNING: Some variables may not be substituted:
19179 cat >>"$CONFIG_STATUS" <<\EOF
19182 # CONFIG_HEADER section.
19185 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19186 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19188 # ac_d sets the value in "#define NAME VALUE" lines.
19189 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19190 ac_dB='[ ].*$,\1#\2'
19193 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19194 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19195 ac_iB='\([ ]\),\1#\2define\3'
19198 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19199 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19200 ac_uB='$,\1#\2define\3'
19204 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19205 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19207 - | *:- | *:-:* ) # input from stdin
19209 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19210 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19211 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19212 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19213 * ) ac_file_in=$ac_file.in ;;
19216 test x"$ac_file" != x- && { echo "$as_me:19216: creating $ac_file" >&5
19217 echo "$as_me: creating $ac_file" >&6;}
19219 # First look for the input files in the build tree, otherwise in the
19221 ac_file_inputs=`IFS=:
19222 for f in $ac_file_in; do
19224 -) echo $tmp/stdin ;;
19226 # Absolute (can't be DOS-style, as IFS=:)
19227 test -f "$f" || { { echo "$as_me:19227: error: cannot find input file: $f" >&5
19228 echo "$as_me: error: cannot find input file: $f" >&2;}
19229 { (exit 1); exit 1; }; }
19232 if test -f "$f"; then
19235 elif test -f "$srcdir/$f"; then
19240 { { echo "$as_me:19240: error: cannot find input file: $f" >&5
19241 echo "$as_me: error: cannot find input file: $f" >&2;}
19242 { (exit 1); exit 1; }; }
19245 done` || { (exit 1); exit 1; }
19246 # Remove the trailing spaces.
19247 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
19251 # Transform confdefs.h into a list of #define's. We won't use it as a sed
19252 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
19253 # be either 'cat' or 'sort'.
19254 cat confdefs.h | uniq >conftest.vals
19256 # Break up conftest.vals because some shells have a limit on
19257 # the size of here documents, and old seds have small limits too.
19259 rm -f conftest.tail
19260 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
19261 while grep . conftest.vals >/dev/null
19263 # Write chunks of a limited-size here document to conftest.frag.
19264 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
19265 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
19266 echo 'CEOF' >> "$CONFIG_STATUS"
19267 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
19268 rm -f conftest.vals
19269 mv conftest.tail conftest.vals
19271 rm -f conftest.vals
19273 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19275 echo ' cat >> conftest.edit <<CEOF
19276 /@DEFS@/r conftest.frag
19279 sed -f conftest.edit $tmp/in > $tmp/out
19281 mv $tmp/out $tmp/in
19282 rm -f conftest.edit conftest.frag
19283 ' >> "$CONFIG_STATUS"
19285 cat >>"$CONFIG_STATUS" <<\EOF
19286 # Let's still pretend it is `configure' which instantiates (i.e., don't
19287 # use $as_me), people would be surprised to read:
19288 # /* config.h. Generated automatically by config.status. */
19289 if test x"$ac_file" = x-; then
19290 echo "/* Generated automatically by configure. */" >$tmp/config.h
19292 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
19294 cat $tmp/in >>$tmp/config.h
19296 if test x"$ac_file" != x-; then
19297 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
19298 { echo "$as_me:19298: $ac_file is unchanged" >&5
19299 echo "$as_me: $ac_file is unchanged" >&6;}
19301 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19302 X"$ac_file" : 'X\(//\)[^/]' \| \
19303 X"$ac_file" : 'X\(//\)$' \| \
19304 X"$ac_file" : 'X\(/\)' \| \
19305 . : '\(.\)' 2>/dev/null ||
19307 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19308 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19309 /^X\(\/\/\)$/{ s//\1/; q; }
19310 /^X\(\/\).*/{ s//\1/; q; }
19312 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19313 { case "$ac_dir" in
19314 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19318 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19319 case $as_mkdir_dir in
19320 # Skip DOS drivespec
19321 ?:) as_incr_dir=$as_mkdir_dir ;;
19323 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19324 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19331 mv "$tmp/config.h" "$ac_file"
19335 rm -f $tmp/config.h
19339 cat >>"$CONFIG_STATUS" <<\EOF
19341 # CONFIG_COMMANDS section.
19343 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19344 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19345 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19349 if test -z "$USE_OLD_MAKERULES" ; then
19350 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
19357 cat >>"$CONFIG_STATUS" <<\EOF
19359 { (exit 0); exit 0; }
19361 chmod +x "$CONFIG_STATUS"
19362 ac_clean_files=$ac_clean_files_save
19364 # configure is writing to config.log, and then calls config.status.
19365 # config.status does its own redirection, appending to config.log.
19366 # Unfortunately, on DOS this fails, as config.log is still kept open
19367 # by configure, so config.status won't be able to write to it; its
19368 # output is simply discarded. So we exec the FD to /dev/null,
19369 # effectively closing config.log, so it can be properly (re)opened and
19370 # appended to by config.status. When coming back to configure, we
19371 # need to make the FD available again.
19372 if test "$no_create" != yes; then
19375 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
19377 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19378 # would make configure fail if this is the last instruction.
19379 "$ac_cs_success" || { (exit 1); exit 1; }
19381 ${MAKE:-make} preinstall