2 # From configure.in Revision: 1.84 .
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 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[ ]*,,'`
3284 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3285 if test "${with_pkg_config_libdir+set}" = set; then
3286 withval="$with_pkg_config_libdir"
3287 cf_search_path=$withval
3289 test "x$PKG_CONFIG" != xnone && cf_search_path=yes
3292 case x$cf_search_path in
3297 test -n "$verbose" && echo " auto..." 1>&6
3299 echo "${as_me:-configure}:3299: testing auto... ..." 1>&5
3301 # Look for the library directory using the same prefix as the executable
3302 echo "$as_me:3302: checking for search-list" >&5
3303 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
3304 if test "x$PKG_CONFIG" != xnone
3306 # works for pkg-config since version 0.24 (2009)
3307 # works for pkgconf since version 0.8.3 (2012)
3308 for cf_pkg_program in \
3309 `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
3313 cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
3314 test -n "$cf_search_path" && break
3317 # works for pkg-config since import in 2005 of original 2001 HP code.
3318 test -z "$cf_search_path" && \
3320 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
3321 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
3322 sub(\"^[^']*'\",\"\"); \
3323 sub(\"'.*\",\"\"); \
3324 printf \" %s\", \\$0; } \
3329 echo "$as_me:3329: result: $cf_search_path" >&5
3330 echo "${ECHO_T}$cf_search_path" >&6
3337 echo "$as_me:3337: checking for first directory" >&5
3338 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
3339 cf_pkg_config_path=none
3340 for cf_config in $cf_search_path
3342 if test -d "$cf_config"
3344 cf_pkg_config_path=$cf_config
3348 echo "$as_me:3348: result: $cf_pkg_config_path" >&5
3349 echo "${ECHO_T}$cf_pkg_config_path" >&6
3351 if test "x$cf_pkg_config_path" != xnone ; then
3352 # limit this to the first directory found
3353 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
3356 if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
3358 echo "$as_me:3358: checking for workaround" >&5
3359 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
3360 if test "$prefix" = "NONE" ; then
3361 cf_prefix="$ac_default_prefix"
3365 eval cf_libdir=$libdir
3366 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
3368 for cf_config in $cf_search_path
3371 $cf_libdir/pkgconfig)
3372 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
3376 test -z "$cf_backup" && cf_backup=$cf_config
3380 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
3381 echo "$as_me:3381: result: $PKG_CONFIG_LIBDIR" >&5
3382 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3385 echo "$as_me:3385: checking if you want to build test-programs" >&5
3386 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3388 # Check whether --with-tests or --without-tests was given.
3389 if test "${with_tests+set}" = set; then
3390 withval="$with_tests"
3391 cf_with_tests=$withval
3395 echo "$as_me:3395: result: $cf_with_tests" >&5
3396 echo "${ECHO_T}$cf_with_tests" >&6
3398 echo "$as_me:3398: checking if we should assume mixed-case filenames" >&5
3399 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3401 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3402 if test "${enable_mixed_case+set}" = set; then
3403 enableval="$enable_mixed_case"
3404 enable_mixedcase=$enableval
3406 enable_mixedcase=auto
3408 echo "$as_me:3408: result: $enable_mixedcase" >&5
3409 echo "${ECHO_T}$enable_mixedcase" >&6
3410 if test "$enable_mixedcase" = "auto" ; then
3412 echo "$as_me:3412: checking if filesystem supports mixed-case filenames" >&5
3413 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3414 if test "${cf_cv_mixedcase+set}" = set; then
3415 echo $ECHO_N "(cached) $ECHO_C" >&6
3418 if test "$cross_compiling" = yes ; then
3419 case "$target_alias" in
3420 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3428 rm -f conftest CONFTEST
3430 if test -f CONFTEST ; then
3435 rm -f conftest CONFTEST
3439 echo "$as_me:3439: result: $cf_cv_mixedcase" >&5
3440 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3441 test "$cf_cv_mixedcase" = yes &&
3442 cat >>confdefs.h <<\EOF
3443 #define MIXEDCASE_FILENAMES 1
3447 cf_cv_mixedcase=$enable_mixedcase
3448 if test "$enable_mixedcase" = "yes" ; then
3449 cat >>confdefs.h <<\EOF
3450 #define MIXEDCASE_FILENAMES 1
3456 # do this after mixed-case option (tags/TAGS is not as important as tic).
3457 echo "$as_me:3457: checking whether ${MAKE-make} sets \${MAKE}" >&5
3458 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3459 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3460 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3461 echo $ECHO_N "(cached) $ECHO_C" >&6
3463 cat >conftest.make <<\EOF
3465 @echo 'ac_maketemp="${MAKE}"'
3467 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3468 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3469 if test -n "$ac_maketemp"; then
3470 eval ac_cv_prog_make_${ac_make}_set=yes
3472 eval ac_cv_prog_make_${ac_make}_set=no
3476 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3477 echo "$as_me:3477: result: yes" >&5
3478 echo "${ECHO_T}yes" >&6
3481 echo "$as_me:3481: result: no" >&5
3482 echo "${ECHO_T}no" >&6
3483 SET_MAKE="MAKE=${MAKE-make}"
3486 echo "$as_me:3486: checking for \".PHONY\" make-support" >&5
3487 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
3488 if test "${cf_cv_make_PHONY+set}" = set; then
3489 echo $ECHO_N "(cached) $ECHO_C" >&6
3494 mkdir conftest || exit 1
3496 cat >makefile <<'CF_EOF'
3500 @echo "** making $@ $(DATA)"
3502 @echo "** making $@ $(DATA)"
3504 @echo "** making $@ $(DATA)"
3507 @echo "** making $@ $(DATA)"
3510 for cf_data in 1 2 3
3512 ${MAKE:-make} always DATA=$cf_data
3513 ${MAKE:-make} once DATA=$cf_data
3514 ${MAKE:-make} -t always once
3515 if test -f always ; then
3516 echo "no (case 1)" > ../conftest.tmp
3517 elif test ! -f always.out ; then
3518 echo "no (case 2)" > ../conftest.tmp
3519 elif test ! -f once.out ; then
3520 echo "no (case 3)" > ../conftest.tmp
3521 elif ! cmp -s always.out once.out ; then
3522 echo "no (case 4)" > ../conftest.tmp
3523 diff always.out once.out
3525 cf_check="`cat always.out`"
3526 if test "x$cf_check" != "x$cf_data" ; then
3527 echo "no (case 5)" > ../conftest.tmp
3529 echo yes > ../conftest.tmp
3537 cf_cv_make_PHONY="`cat conftest.tmp`"
3541 echo "$as_me:3541: result: $cf_cv_make_PHONY" >&5
3542 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
3545 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
3546 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
3548 for ac_prog in exctags ctags
3550 # Extract the first word of "$ac_prog", so it can be a program name with args.
3551 set dummy $ac_prog; ac_word=$2
3552 echo "$as_me:3552: checking for $ac_word" >&5
3553 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3554 if test "${ac_cv_prog_CTAGS+set}" = set; then
3555 echo $ECHO_N "(cached) $ECHO_C" >&6
3557 if test -n "$CTAGS"; then
3558 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3560 ac_save_IFS=$IFS; IFS=$ac_path_separator
3562 for ac_dir in $ac_dummy; do
3564 test -z "$ac_dir" && ac_dir=.
3565 $as_executable_p "$ac_dir/$ac_word" || continue
3566 ac_cv_prog_CTAGS="$ac_prog"
3567 echo "$as_me:3567: found $ac_dir/$ac_word" >&5
3573 CTAGS=$ac_cv_prog_CTAGS
3574 if test -n "$CTAGS"; then
3575 echo "$as_me:3575: result: $CTAGS" >&5
3576 echo "${ECHO_T}$CTAGS" >&6
3578 echo "$as_me:3578: result: no" >&5
3579 echo "${ECHO_T}no" >&6
3582 test -n "$CTAGS" && break
3585 for ac_prog in exetags etags
3587 # Extract the first word of "$ac_prog", so it can be a program name with args.
3588 set dummy $ac_prog; ac_word=$2
3589 echo "$as_me:3589: checking for $ac_word" >&5
3590 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3591 if test "${ac_cv_prog_ETAGS+set}" = set; then
3592 echo $ECHO_N "(cached) $ECHO_C" >&6
3594 if test -n "$ETAGS"; then
3595 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3597 ac_save_IFS=$IFS; IFS=$ac_path_separator
3599 for ac_dir in $ac_dummy; do
3601 test -z "$ac_dir" && ac_dir=.
3602 $as_executable_p "$ac_dir/$ac_word" || continue
3603 ac_cv_prog_ETAGS="$ac_prog"
3604 echo "$as_me:3604: found $ac_dir/$ac_word" >&5
3610 ETAGS=$ac_cv_prog_ETAGS
3611 if test -n "$ETAGS"; then
3612 echo "$as_me:3612: result: $ETAGS" >&5
3613 echo "${ECHO_T}$ETAGS" >&6
3615 echo "$as_me:3615: result: no" >&5
3616 echo "${ECHO_T}no" >&6
3619 test -n "$ETAGS" && break
3622 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3623 set dummy ${CTAGS:-ctags}; ac_word=$2
3624 echo "$as_me:3624: checking for $ac_word" >&5
3625 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3626 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3627 echo $ECHO_N "(cached) $ECHO_C" >&6
3629 if test -n "$MAKE_LOWER_TAGS"; then
3630 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3632 ac_save_IFS=$IFS; IFS=$ac_path_separator
3634 for ac_dir in $ac_dummy; do
3636 test -z "$ac_dir" && ac_dir=.
3637 $as_executable_p "$ac_dir/$ac_word" || continue
3638 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3639 echo "$as_me:3639: found $ac_dir/$ac_word" >&5
3643 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3646 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3647 if test -n "$MAKE_LOWER_TAGS"; then
3648 echo "$as_me:3648: result: $MAKE_LOWER_TAGS" >&5
3649 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3651 echo "$as_me:3651: result: no" >&5
3652 echo "${ECHO_T}no" >&6
3655 if test "$cf_cv_mixedcase" = yes ; then
3656 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3657 set dummy ${ETAGS:-etags}; ac_word=$2
3658 echo "$as_me:3658: checking for $ac_word" >&5
3659 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3660 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3661 echo $ECHO_N "(cached) $ECHO_C" >&6
3663 if test -n "$MAKE_UPPER_TAGS"; then
3664 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3666 ac_save_IFS=$IFS; IFS=$ac_path_separator
3668 for ac_dir in $ac_dummy; do
3670 test -z "$ac_dir" && ac_dir=.
3671 $as_executable_p "$ac_dir/$ac_word" || continue
3672 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3673 echo "$as_me:3673: found $ac_dir/$ac_word" >&5
3677 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3680 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3681 if test -n "$MAKE_UPPER_TAGS"; then
3682 echo "$as_me:3682: result: $MAKE_UPPER_TAGS" >&5
3683 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3685 echo "$as_me:3685: result: no" >&5
3686 echo "${ECHO_T}no" >&6
3693 if test "$MAKE_UPPER_TAGS" = yes ; then
3699 if test "$MAKE_LOWER_TAGS" = yes ; then
3705 echo "$as_me:3705: checking for makeflags variable" >&5
3706 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3707 if test "${cf_cv_makeflags+set}" = set; then
3708 echo $ECHO_N "(cached) $ECHO_C" >&6
3712 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3714 cat >cf_makeflags.tmp <<CF_EOF
3717 @ echo '.$cf_option'
3719 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[ ]*$,,'`
3720 case "$cf_result" in
3722 cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
3723 case "$cf_result" in
3724 (.*CC=*) cf_cv_makeflags=
3726 (*) cf_cv_makeflags=$cf_option
3735 echo "${as_me:-configure}:3735: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3740 rm -f cf_makeflags.tmp
3743 echo "$as_me:3743: result: $cf_cv_makeflags" >&5
3744 echo "${ECHO_T}$cf_cv_makeflags" >&6
3746 if test -n "$ac_tool_prefix"; then
3747 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3748 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3749 echo "$as_me:3749: checking for $ac_word" >&5
3750 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3751 if test "${ac_cv_prog_RANLIB+set}" = set; then
3752 echo $ECHO_N "(cached) $ECHO_C" >&6
3754 if test -n "$RANLIB"; then
3755 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3757 ac_save_IFS=$IFS; IFS=$ac_path_separator
3759 for ac_dir in $ac_dummy; do
3761 test -z "$ac_dir" && ac_dir=.
3762 $as_executable_p "$ac_dir/$ac_word" || continue
3763 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3764 echo "$as_me:3764: found $ac_dir/$ac_word" >&5
3770 RANLIB=$ac_cv_prog_RANLIB
3771 if test -n "$RANLIB"; then
3772 echo "$as_me:3772: result: $RANLIB" >&5
3773 echo "${ECHO_T}$RANLIB" >&6
3775 echo "$as_me:3775: result: no" >&5
3776 echo "${ECHO_T}no" >&6
3780 if test -z "$ac_cv_prog_RANLIB"; then
3781 ac_ct_RANLIB=$RANLIB
3782 # Extract the first word of "ranlib", so it can be a program name with args.
3783 set dummy ranlib; ac_word=$2
3784 echo "$as_me:3784: checking for $ac_word" >&5
3785 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3786 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3787 echo $ECHO_N "(cached) $ECHO_C" >&6
3789 if test -n "$ac_ct_RANLIB"; then
3790 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3792 ac_save_IFS=$IFS; IFS=$ac_path_separator
3794 for ac_dir in $ac_dummy; do
3796 test -z "$ac_dir" && ac_dir=.
3797 $as_executable_p "$ac_dir/$ac_word" || continue
3798 ac_cv_prog_ac_ct_RANLIB="ranlib"
3799 echo "$as_me:3799: found $ac_dir/$ac_word" >&5
3803 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3806 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3807 if test -n "$ac_ct_RANLIB"; then
3808 echo "$as_me:3808: result: $ac_ct_RANLIB" >&5
3809 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3811 echo "$as_me:3811: result: no" >&5
3812 echo "${ECHO_T}no" >&6
3815 RANLIB=$ac_ct_RANLIB
3817 RANLIB="$ac_cv_prog_RANLIB"
3820 if test -n "$ac_tool_prefix"; then
3821 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3822 set dummy ${ac_tool_prefix}ld; ac_word=$2
3823 echo "$as_me:3823: checking for $ac_word" >&5
3824 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3825 if test "${ac_cv_prog_LD+set}" = set; then
3826 echo $ECHO_N "(cached) $ECHO_C" >&6
3828 if test -n "$LD"; then
3829 ac_cv_prog_LD="$LD" # Let the user override the test.
3831 ac_save_IFS=$IFS; IFS=$ac_path_separator
3833 for ac_dir in $ac_dummy; do
3835 test -z "$ac_dir" && ac_dir=.
3836 $as_executable_p "$ac_dir/$ac_word" || continue
3837 ac_cv_prog_LD="${ac_tool_prefix}ld"
3838 echo "$as_me:3838: found $ac_dir/$ac_word" >&5
3845 if test -n "$LD"; then
3846 echo "$as_me:3846: result: $LD" >&5
3847 echo "${ECHO_T}$LD" >&6
3849 echo "$as_me:3849: result: no" >&5
3850 echo "${ECHO_T}no" >&6
3854 if test -z "$ac_cv_prog_LD"; then
3856 # Extract the first word of "ld", so it can be a program name with args.
3857 set dummy ld; ac_word=$2
3858 echo "$as_me:3858: checking for $ac_word" >&5
3859 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3860 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3861 echo $ECHO_N "(cached) $ECHO_C" >&6
3863 if test -n "$ac_ct_LD"; then
3864 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3866 ac_save_IFS=$IFS; IFS=$ac_path_separator
3868 for ac_dir in $ac_dummy; do
3870 test -z "$ac_dir" && ac_dir=.
3871 $as_executable_p "$ac_dir/$ac_word" || continue
3872 ac_cv_prog_ac_ct_LD="ld"
3873 echo "$as_me:3873: found $ac_dir/$ac_word" >&5
3877 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3880 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3881 if test -n "$ac_ct_LD"; then
3882 echo "$as_me:3882: result: $ac_ct_LD" >&5
3883 echo "${ECHO_T}$ac_ct_LD" >&6
3885 echo "$as_me:3885: result: no" >&5
3886 echo "${ECHO_T}no" >&6
3894 if test -n "$ac_tool_prefix"; then
3895 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3896 set dummy ${ac_tool_prefix}ar; ac_word=$2
3897 echo "$as_me:3897: checking for $ac_word" >&5
3898 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3899 if test "${ac_cv_prog_AR+set}" = set; then
3900 echo $ECHO_N "(cached) $ECHO_C" >&6
3902 if test -n "$AR"; then
3903 ac_cv_prog_AR="$AR" # Let the user override the test.
3905 ac_save_IFS=$IFS; IFS=$ac_path_separator
3907 for ac_dir in $ac_dummy; do
3909 test -z "$ac_dir" && ac_dir=.
3910 $as_executable_p "$ac_dir/$ac_word" || continue
3911 ac_cv_prog_AR="${ac_tool_prefix}ar"
3912 echo "$as_me:3912: found $ac_dir/$ac_word" >&5
3919 if test -n "$AR"; then
3920 echo "$as_me:3920: result: $AR" >&5
3921 echo "${ECHO_T}$AR" >&6
3923 echo "$as_me:3923: result: no" >&5
3924 echo "${ECHO_T}no" >&6
3928 if test -z "$ac_cv_prog_AR"; then
3930 # Extract the first word of "ar", so it can be a program name with args.
3931 set dummy ar; ac_word=$2
3932 echo "$as_me:3932: checking for $ac_word" >&5
3933 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3934 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3935 echo $ECHO_N "(cached) $ECHO_C" >&6
3937 if test -n "$ac_ct_AR"; then
3938 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3940 ac_save_IFS=$IFS; IFS=$ac_path_separator
3942 for ac_dir in $ac_dummy; do
3944 test -z "$ac_dir" && ac_dir=.
3945 $as_executable_p "$ac_dir/$ac_word" || continue
3946 ac_cv_prog_ac_ct_AR="ar"
3947 echo "$as_me:3947: found $ac_dir/$ac_word" >&5
3951 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3954 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3955 if test -n "$ac_ct_AR"; then
3956 echo "$as_me:3956: result: $ac_ct_AR" >&5
3957 echo "${ECHO_T}$ac_ct_AR" >&6
3959 echo "$as_me:3959: result: no" >&5
3960 echo "${ECHO_T}no" >&6
3968 if test -n "$ac_tool_prefix"; then
3969 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3970 set dummy ${ac_tool_prefix}ar; ac_word=$2
3971 echo "$as_me:3971: checking for $ac_word" >&5
3972 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3973 if test "${ac_cv_prog_AR+set}" = set; then
3974 echo $ECHO_N "(cached) $ECHO_C" >&6
3976 if test -n "$AR"; then
3977 ac_cv_prog_AR="$AR" # Let the user override the test.
3979 ac_save_IFS=$IFS; IFS=$ac_path_separator
3981 for ac_dir in $ac_dummy; do
3983 test -z "$ac_dir" && ac_dir=.
3984 $as_executable_p "$ac_dir/$ac_word" || continue
3985 ac_cv_prog_AR="${ac_tool_prefix}ar"
3986 echo "$as_me:3986: found $ac_dir/$ac_word" >&5
3993 if test -n "$AR"; then
3994 echo "$as_me:3994: result: $AR" >&5
3995 echo "${ECHO_T}$AR" >&6
3997 echo "$as_me:3997: result: no" >&5
3998 echo "${ECHO_T}no" >&6
4002 if test -z "$ac_cv_prog_AR"; then
4004 # Extract the first word of "ar", so it can be a program name with args.
4005 set dummy ar; ac_word=$2
4006 echo "$as_me:4006: checking for $ac_word" >&5
4007 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4008 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4009 echo $ECHO_N "(cached) $ECHO_C" >&6
4011 if test -n "$ac_ct_AR"; then
4012 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4014 ac_save_IFS=$IFS; IFS=$ac_path_separator
4016 for ac_dir in $ac_dummy; do
4018 test -z "$ac_dir" && ac_dir=.
4019 $as_executable_p "$ac_dir/$ac_word" || continue
4020 ac_cv_prog_ac_ct_AR="ar"
4021 echo "$as_me:4021: found $ac_dir/$ac_word" >&5
4025 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4028 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4029 if test -n "$ac_ct_AR"; then
4030 echo "$as_me:4030: result: $ac_ct_AR" >&5
4031 echo "${ECHO_T}$ac_ct_AR" >&6
4033 echo "$as_me:4033: result: no" >&5
4034 echo "${ECHO_T}no" >&6
4042 echo "$as_me:4042: checking for options to update archives" >&5
4043 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4044 if test "${cf_cv_ar_flags+set}" = set; then
4045 echo $ECHO_N "(cached) $ECHO_C" >&6
4048 case "$cf_cv_system_name" in
4051 cat >mk_static_lib.sh <<-EOF
4056 exec \$MSVC_BIN -out:"\$out" \$@
4058 chmod +x mk_static_lib.sh
4059 AR=`pwd`/mk_static_lib.sh
4062 cf_cv_ar_flags=unknown
4063 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4066 # check if $ARFLAGS already contains this choice
4067 if test "x$ARFLAGS" != "x" ; then
4068 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4069 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4075 rm -f "conftest.$ac_cv_objext"
4078 cat >"conftest.$ac_ext" <<EOF
4079 #line 4079 "configure"
4080 int testdata[3] = { 123, 456, 789 };
4082 if { (eval echo "$as_me:4082: \"$ac_compile\"") >&5
4083 (eval $ac_compile) 2>&5
4085 echo "$as_me:4085: \$? = $ac_status" >&5
4086 (exit "$ac_status"); } ; then
4087 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4088 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
4089 if test -f conftest.a ; then
4090 cf_cv_ar_flags="$cf_ar_flags"
4094 test -n "$verbose" && echo " cannot compile test-program" 1>&6
4096 echo "${as_me:-configure}:4096: testing cannot compile test-program ..." 1>&5
4101 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
4106 echo "$as_me:4106: result: $cf_cv_ar_flags" >&5
4107 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4109 if test -n "$ARFLAGS" ; then
4110 if test -n "$cf_cv_ar_flags" ; then
4111 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4114 ARFLAGS=$cf_cv_ar_flags
4117 echo "$as_me:4117: checking for PATH separator" >&5
4118 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4119 case "$cf_cv_system_name" in
4120 (os2*) PATH_SEPARATOR=';' ;;
4121 (*) ${PATH_SEPARATOR:=':'} ;;
4124 echo "$as_me:4124: result: $PATH_SEPARATOR" >&5
4125 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4127 echo "$as_me:4127: checking if you have specified an install-prefix" >&5
4128 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4130 # Check whether --with-install-prefix or --without-install-prefix was given.
4131 if test "${with_install_prefix+set}" = set; then
4132 withval="$with_install_prefix"
4136 (*) DESTDIR="$withval"
4140 echo "$as_me:4140: result: $DESTDIR" >&5
4141 echo "${ECHO_T}$DESTDIR" >&6
4143 ###############################################################################
4145 # If we're cross-compiling, allow the user to override the tools and their
4146 # options. The configure script is oriented toward identifying the host
4147 # compiler, etc., but we need a build compiler to generate parts of the source.
4149 if test "$cross_compiling" = yes ; then
4151 # defaults that we might want to override
4152 : ${BUILD_CFLAGS:=''}
4153 : ${BUILD_CPPFLAGS:=''}
4154 : ${BUILD_LDFLAGS:=''}
4156 : ${BUILD_EXEEXT:='$x'}
4157 : ${BUILD_OBJEXT:='o'}
4159 # Check whether --with-build-cc or --without-build-cc was given.
4160 if test "${with_build_cc+set}" = set; then
4161 withval="$with_build_cc"
4164 for ac_prog in gcc clang c99 c89 cc cl
4166 # Extract the first word of "$ac_prog", so it can be a program name with args.
4167 set dummy $ac_prog; ac_word=$2
4168 echo "$as_me:4168: checking for $ac_word" >&5
4169 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4170 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4171 echo $ECHO_N "(cached) $ECHO_C" >&6
4173 if test -n "$BUILD_CC"; then
4174 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4176 ac_save_IFS=$IFS; IFS=$ac_path_separator
4178 for ac_dir in $ac_dummy; do
4180 test -z "$ac_dir" && ac_dir=.
4181 $as_executable_p "$ac_dir/$ac_word" || continue
4182 ac_cv_prog_BUILD_CC="$ac_prog"
4183 echo "$as_me:4183: found $ac_dir/$ac_word" >&5
4189 BUILD_CC=$ac_cv_prog_BUILD_CC
4190 if test -n "$BUILD_CC"; then
4191 echo "$as_me:4191: result: $BUILD_CC" >&5
4192 echo "${ECHO_T}$BUILD_CC" >&6
4194 echo "$as_me:4194: result: no" >&5
4195 echo "${ECHO_T}no" >&6
4198 test -n "$BUILD_CC" && break
4200 test -n "$BUILD_CC" || BUILD_CC="none"
4203 echo "$as_me:4203: checking for native build C compiler" >&5
4204 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4205 echo "$as_me:4205: result: $BUILD_CC" >&5
4206 echo "${ECHO_T}$BUILD_CC" >&6
4208 echo "$as_me:4208: checking for native build C preprocessor" >&5
4209 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4211 # Check whether --with-build-cpp or --without-build-cpp was given.
4212 if test "${with_build_cpp+set}" = set; then
4213 withval="$with_build_cpp"
4214 BUILD_CPP="$withval"
4216 BUILD_CPP='${BUILD_CC} -E'
4218 echo "$as_me:4218: result: $BUILD_CPP" >&5
4219 echo "${ECHO_T}$BUILD_CPP" >&6
4221 echo "$as_me:4221: checking for native build C flags" >&5
4222 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4224 # Check whether --with-build-cflags or --without-build-cflags was given.
4225 if test "${with_build_cflags+set}" = set; then
4226 withval="$with_build_cflags"
4227 BUILD_CFLAGS="$withval"
4229 echo "$as_me:4229: result: $BUILD_CFLAGS" >&5
4230 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4232 echo "$as_me:4232: checking for native build C preprocessor-flags" >&5
4233 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4235 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4236 if test "${with_build_cppflags+set}" = set; then
4237 withval="$with_build_cppflags"
4238 BUILD_CPPFLAGS="$withval"
4240 echo "$as_me:4240: result: $BUILD_CPPFLAGS" >&5
4241 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4243 echo "$as_me:4243: checking for native build linker-flags" >&5
4244 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4246 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4247 if test "${with_build_ldflags+set}" = set; then
4248 withval="$with_build_ldflags"
4249 BUILD_LDFLAGS="$withval"
4251 echo "$as_me:4251: result: $BUILD_LDFLAGS" >&5
4252 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4254 echo "$as_me:4254: checking for native build linker-libraries" >&5
4255 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4257 # Check whether --with-build-libs or --without-build-libs was given.
4258 if test "${with_build_libs+set}" = set; then
4259 withval="$with_build_libs"
4260 BUILD_LIBS="$withval"
4262 echo "$as_me:4262: result: $BUILD_LIBS" >&5
4263 echo "${ECHO_T}$BUILD_LIBS" >&6
4265 # this assumes we're on Unix.
4269 : ${BUILD_CC:='${CC}'}
4271 if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
4272 { { echo "$as_me:4272: error: Cross-build requires two compilers.
4273 Use --with-build-cc to specify the native compiler." >&5
4274 echo "$as_me: error: Cross-build requires two compilers.
4275 Use --with-build-cc to specify the native compiler." >&2;}
4276 { (exit 1); exit 1; }; }
4280 : ${BUILD_CC:='${CC}'}
4281 : ${BUILD_CPP:='${CPP}'}
4282 : ${BUILD_CFLAGS:='${CFLAGS}'}
4283 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4284 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4285 : ${BUILD_LIBS:='${LIBS}'}
4286 : ${BUILD_EXEEXT:='$x'}
4287 : ${BUILD_OBJEXT:='o'}
4290 ###############################################################################
4292 ### Options to allow the user to specify the set of libraries which are used.
4293 ### Use "--without-normal --with-shared" to allow the default model to be
4294 ### shared, for example.
4297 echo "$as_me:4297: checking if you want to build shared C-objects" >&5
4298 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
4300 # Check whether --with-shared or --without-shared was given.
4301 if test "${with_shared+set}" = set; then
4302 withval="$with_shared"
4303 with_shared=$withval
4307 echo "$as_me:4307: result: $with_shared" >&5
4308 echo "${ECHO_T}$with_shared" >&6
4309 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4311 echo "$as_me:4311: checking for specified models" >&5
4312 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4313 test -z "$cf_list_models" && cf_list_models=normal
4314 echo "$as_me:4314: result: $cf_list_models" >&5
4315 echo "${ECHO_T}$cf_list_models" >&6
4317 ### Use the first model as the default, and save its suffix for use in building
4318 ### up test-applications.
4319 echo "$as_me:4319: checking for default model" >&5
4320 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4321 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4322 echo "$as_me:4322: result: $DFT_LWR_MODEL" >&5
4323 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4325 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4327 echo "$as_me:4327: checking for specific curses-directory" >&5
4328 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4330 # Check whether --with-curses-dir or --without-curses-dir was given.
4331 if test "${with_curses_dir+set}" = set; then
4332 withval="$with_curses_dir"
4333 cf_cv_curses_dir=$withval
4337 echo "$as_me:4337: result: $cf_cv_curses_dir" >&5
4338 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4340 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
4343 if test "x$prefix" != xNONE; then
4344 cf_path_syntax="$prefix"
4346 cf_path_syntax="$ac_default_prefix"
4354 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4356 (.\$\{*prefix\}*|.\$\{*dir\}*)
4357 eval withval="$withval"
4360 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4365 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4368 { { echo "$as_me:4368: error: expected a pathname, not \"$withval\"" >&5
4369 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4370 { (exit 1); exit 1; }; }
4374 if test -d "$cf_cv_curses_dir"
4377 if test -n "$cf_cv_curses_dir/include" ; then
4378 for cf_add_incdir in $cf_cv_curses_dir/include
4380 while test "$cf_add_incdir" != /usr/include
4382 if test -d "$cf_add_incdir"
4385 if test -n "$CFLAGS$CPPFLAGS" ; then
4386 # a loop is needed to ensure we can add subdirs of existing dirs
4387 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4388 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4389 cf_have_incdir=yes; break
4394 if test "$cf_have_incdir" = no ; then
4395 if test "$cf_add_incdir" = /usr/local/include ; then
4396 if test "$GCC" = yes
4398 cf_save_CPPFLAGS=$CPPFLAGS
4400 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4401 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4403 cat >"conftest.$ac_ext" <<_ACEOF
4404 #line 4404 "configure"
4405 #include "confdefs.h"
4415 rm -f "conftest.$ac_objext"
4416 if { (eval echo "$as_me:4416: \"$ac_compile\"") >&5
4417 (eval $ac_compile) 2>&5
4419 echo "$as_me:4419: \$? = $ac_status" >&5
4420 (exit "$ac_status"); } &&
4421 { ac_try='test -s "conftest.$ac_objext"'
4422 { (eval echo "$as_me:4422: \"$ac_try\"") >&5
4425 echo "$as_me:4425: \$? = $ac_status" >&5
4426 (exit "$ac_status"); }; }; then
4429 echo "$as_me: failed program was:" >&5
4430 cat "conftest.$ac_ext" >&5
4433 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4434 CPPFLAGS=$cf_save_CPPFLAGS
4439 if test "$cf_have_incdir" = no ; then
4440 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4442 echo "${as_me:-configure}:4442: testing adding $cf_add_incdir to include-path ..." 1>&5
4444 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4446 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
4447 test "$cf_top_incdir" = "$cf_add_incdir" && break
4448 cf_add_incdir="$cf_top_incdir"
4459 if test -n "$cf_cv_curses_dir/lib" ; then
4460 for cf_add_libdir in $cf_cv_curses_dir/lib
4462 if test "$cf_add_libdir" = /usr/lib ; then
4464 elif test -d "$cf_add_libdir"
4467 if test -n "$LDFLAGS$LIBS" ; then
4468 # a loop is needed to ensure we can add subdirs of existing dirs
4469 for cf_test_libdir in $LDFLAGS $LIBS ; do
4470 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4471 cf_have_libdir=yes; break
4475 if test "$cf_have_libdir" = no ; then
4476 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4478 echo "${as_me:-configure}:4478: testing adding $cf_add_libdir to library-path ..." 1>&5
4480 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4489 cf_ncuconfig_root=ncurses
4490 cf_have_ncuconfig=no
4492 if test "x${PKG_CONFIG:=none}" != xnone; then
4493 echo "$as_me:4493: checking pkg-config for $cf_ncuconfig_root" >&5
4494 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
4495 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
4496 echo "$as_me:4496: result: yes" >&5
4497 echo "${ECHO_T}yes" >&6
4499 echo "$as_me:4499: checking if the $cf_ncuconfig_root package files work" >&5
4500 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
4501 cf_have_ncuconfig=unknown
4503 cf_save_CFLAGS="$CFLAGS"
4504 cf_save_CPPFLAGS="$CPPFLAGS"
4505 cf_save_LIBS="$LIBS"
4507 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
4508 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
4510 # while -W for passing linker flags is prevalent, it is not "standard".
4511 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
4512 # incompatible _and_ non-standard -W option which gives an error. Work
4513 # around that pitfall.
4514 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
4520 cf_new_extra_cppflags=
4522 for cf_add_cflags in $cf_pkg_cflags
4524 case "$cf_fix_cppflags" in
4526 case "$cf_add_cflags" in
4527 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4528 case "$cf_add_cflags" in
4530 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4532 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4533 && test -z "${cf_tst_cflags}" \
4534 && cf_fix_cppflags=yes
4536 if test "$cf_fix_cppflags" = yes ; then
4538 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4539 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4542 elif test "${cf_tst_cflags}" = "\"'" ; then
4544 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4545 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4555 case "$cf_add_cflags" in
4557 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4559 CPPFLAGS=`echo "$CPPFLAGS" | \
4560 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4561 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4566 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4567 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4574 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4575 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4582 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4583 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4585 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4587 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4588 && test -z "${cf_tst_cflags}" \
4589 && cf_fix_cppflags=no
4594 if test -n "$cf_new_cflags" ; then
4596 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4597 CFLAGS="${CFLAGS}$cf_new_cflags"
4601 if test -n "$cf_new_cppflags" ; then
4603 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4604 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4608 if test -n "$cf_new_extra_cppflags" ; then
4610 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4611 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4618 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4620 for cf_add_1lib in $cf_add_0lib; do
4621 for cf_add_2lib in $cf_add_libs; do
4622 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4627 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4631 cat >"conftest.$ac_ext" <<_ACEOF
4632 #line 4632 "configure"
4633 #include "confdefs.h"
4634 #include <${cf_cv_ncurses_header:-curses.h}>
4638 initscr(); mousemask(0,0); tigetstr((char *)0);
4643 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4644 if { (eval echo "$as_me:4644: \"$ac_link\"") >&5
4645 (eval $ac_link) 2>&5
4647 echo "$as_me:4647: \$? = $ac_status" >&5
4648 (exit "$ac_status"); } &&
4649 { ac_try='test -s "conftest$ac_exeext"'
4650 { (eval echo "$as_me:4650: \"$ac_try\"") >&5
4653 echo "$as_me:4653: \$? = $ac_status" >&5
4654 (exit "$ac_status"); }; }; then
4655 if test "$cross_compiling" = yes; then
4656 cf_test_ncuconfig=maybe
4658 cat >"conftest.$ac_ext" <<_ACEOF
4659 #line 4659 "configure"
4660 #include "confdefs.h"
4661 #include <${cf_cv_ncurses_header:-curses.h}>
4663 { const char *xx = curses_version(); return (xx == 0); }
4665 rm -f "conftest$ac_exeext"
4666 if { (eval echo "$as_me:4666: \"$ac_link\"") >&5
4667 (eval $ac_link) 2>&5
4669 echo "$as_me:4669: \$? = $ac_status" >&5
4670 (exit "$ac_status"); } && { ac_try='"./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 cf_test_ncuconfig=yes
4678 echo "$as_me: program exited with status $ac_status" >&5
4679 echo "$as_me: failed program was:" >&5
4680 cat "conftest.$ac_ext" >&5
4681 cf_test_ncuconfig=no
4683 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4686 echo "$as_me: failed program was:" >&5
4687 cat "conftest.$ac_ext" >&5
4688 cf_test_ncuconfig=no
4690 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4692 CFLAGS="$cf_save_CFLAGS"
4693 CPPFLAGS="$cf_save_CPPFLAGS"
4694 LIBS="$cf_save_LIBS"
4696 if test "x$cf_test_ncuconfig" != xyes; then
4697 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4698 cf_pkg_cflags="$cf_temp"
4699 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4700 cf_pkg_libs="$cf_temp"
4705 for cf_add_cflags in $cf_pkg_cflags
4707 case "x$cf_add_cflags" in
4710 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4713 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'`
4714 test "$CFLAGS" != "$cf_old_cflag" || break
4716 CFLAGS="$cf_old_cflag"
4719 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4722 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'`
4723 test "$CPPFLAGS" != "$cf_old_cflag" || break
4725 CPPFLAGS="$cf_old_cflag"
4734 cf_new_extra_cppflags=
4736 for cf_add_cflags in $cf_add_cflags
4738 case "$cf_fix_cppflags" in
4740 case "$cf_add_cflags" in
4741 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4742 case "$cf_add_cflags" in
4744 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4746 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4747 && test -z "${cf_tst_cflags}" \
4748 && cf_fix_cppflags=yes
4750 if test "$cf_fix_cppflags" = yes ; then
4752 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4753 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4756 elif test "${cf_tst_cflags}" = "\"'" ; then
4758 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4759 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4769 case "$cf_add_cflags" in
4771 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4773 CPPFLAGS=`echo "$CPPFLAGS" | \
4774 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4775 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4780 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4781 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4788 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4789 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4796 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4797 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4799 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4801 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4802 && test -z "${cf_tst_cflags}" \
4803 && cf_fix_cppflags=no
4808 if test -n "$cf_new_cflags" ; then
4810 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4811 CFLAGS="${CFLAGS}$cf_new_cflags"
4815 if test -n "$cf_new_cppflags" ; then
4817 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4818 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4822 if test -n "$cf_new_extra_cppflags" ; then
4824 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4825 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4834 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4836 for cf_add_1lib in $cf_add_0lib; do
4837 for cf_add_2lib in $cf_add_libs; do
4838 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4843 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4847 cat >"conftest.$ac_ext" <<_ACEOF
4848 #line 4848 "configure"
4849 #include "confdefs.h"
4850 #include <${cf_cv_ncurses_header:-curses.h}>
4854 initscr(); mousemask(0,0); tigetstr((char *)0);
4859 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4860 if { (eval echo "$as_me:4860: \"$ac_link\"") >&5
4861 (eval $ac_link) 2>&5
4863 echo "$as_me:4863: \$? = $ac_status" >&5
4864 (exit "$ac_status"); } &&
4865 { ac_try='test -s "conftest$ac_exeext"'
4866 { (eval echo "$as_me:4866: \"$ac_try\"") >&5
4869 echo "$as_me:4869: \$? = $ac_status" >&5
4870 (exit "$ac_status"); }; }; then
4871 if test "$cross_compiling" = yes; then
4872 cf_have_ncuconfig=maybe
4874 cat >"conftest.$ac_ext" <<_ACEOF
4875 #line 4875 "configure"
4876 #include "confdefs.h"
4877 #include <${cf_cv_ncurses_header:-curses.h}>
4879 { const char *xx = curses_version(); return (xx == 0); }
4881 rm -f "conftest$ac_exeext"
4882 if { (eval echo "$as_me:4882: \"$ac_link\"") >&5
4883 (eval $ac_link) 2>&5
4885 echo "$as_me:4885: \$? = $ac_status" >&5
4886 (exit "$ac_status"); } && { ac_try='"./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 cf_have_ncuconfig=yes
4894 echo "$as_me: program exited with status $ac_status" >&5
4895 echo "$as_me: failed program was:" >&5
4896 cat "conftest.$ac_ext" >&5
4897 cf_have_ncuconfig=no
4899 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4902 echo "$as_me: failed program was:" >&5
4903 cat "conftest.$ac_ext" >&5
4904 cf_have_ncuconfig=no
4906 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4907 echo "$as_me:4907: result: $cf_have_ncuconfig" >&5
4908 echo "${ECHO_T}$cf_have_ncuconfig" >&6
4909 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
4910 if test "$cf_have_ncuconfig" != "yes"
4912 CPPFLAGS="$cf_save_CPPFLAGS"
4913 LIBS="$cf_save_LIBS"
4914 NCURSES_CONFIG_PKG=none
4917 cat >>confdefs.h <<\EOF
4921 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
4923 echo "$as_me:4923: checking for terminfo header" >&5
4924 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4925 if test "${cf_cv_term_header+set}" = set; then
4926 echo $ECHO_N "(cached) $ECHO_C" >&6
4929 case "${cf_cv_ncurses_header}" in
4930 (*/ncurses.h|*/ncursesw.h)
4931 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4934 cf_term_header=term.h
4938 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4940 cat >"conftest.$ac_ext" <<_ACEOF
4941 #line 4941 "configure"
4942 #include "confdefs.h"
4944 #include <${cf_cv_ncurses_header:-curses.h}>
4950 int x = auto_left_margin; (void)x
4955 rm -f "conftest.$ac_objext"
4956 if { (eval echo "$as_me:4956: \"$ac_compile\"") >&5
4957 (eval $ac_compile) 2>&5
4959 echo "$as_me:4959: \$? = $ac_status" >&5
4960 (exit "$ac_status"); } &&
4961 { ac_try='test -s "conftest.$ac_objext"'
4962 { (eval echo "$as_me:4962: \"$ac_try\"") >&5
4965 echo "$as_me:4965: \$? = $ac_status" >&5
4966 (exit "$ac_status"); }; }; then
4968 cf_cv_term_header="$cf_test"
4970 echo "$as_me: failed program was:" >&5
4971 cat "conftest.$ac_ext" >&5
4973 cf_cv_term_header=unknown
4976 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4977 test "$cf_cv_term_header" != unknown && break
4981 echo "$as_me:4981: result: $cf_cv_term_header" >&5
4982 echo "${ECHO_T}$cf_cv_term_header" >&6
4984 # Set definitions to allow ifdef'ing to accommodate subdirectories
4986 case "$cf_cv_term_header" in
4989 cat >>confdefs.h <<\EOF
4990 #define HAVE_TERM_H 1
4996 case "$cf_cv_term_header" in
4999 cat >>confdefs.h <<\EOF
5000 #define HAVE_NCURSES_TERM_H 1
5006 cat >>confdefs.h <<\EOF
5007 #define HAVE_NCURSESW_TERM_H 1
5016 echo "$as_me:5016: result: no" >&5
5017 echo "${ECHO_T}no" >&6
5018 NCURSES_CONFIG_PKG=none
5021 NCURSES_CONFIG_PKG=none
5024 if test "x$cf_have_ncuconfig" = "xno"; then
5025 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
5027 if test -n "$ac_tool_prefix"; then
5028 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5030 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5031 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5032 echo "$as_me:5032: checking for $ac_word" >&5
5033 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5034 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5035 echo $ECHO_N "(cached) $ECHO_C" >&6
5037 if test -n "$NCURSES_CONFIG"; then
5038 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5040 ac_save_IFS=$IFS; IFS=$ac_path_separator
5042 for ac_dir in $ac_dummy; do
5044 test -z "$ac_dir" && ac_dir=.
5045 $as_executable_p "$ac_dir/$ac_word" || continue
5046 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5047 echo "$as_me:5047: found $ac_dir/$ac_word" >&5
5053 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5054 if test -n "$NCURSES_CONFIG"; then
5055 echo "$as_me:5055: result: $NCURSES_CONFIG" >&5
5056 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5058 echo "$as_me:5058: result: no" >&5
5059 echo "${ECHO_T}no" >&6
5062 test -n "$NCURSES_CONFIG" && break
5065 if test -z "$NCURSES_CONFIG"; then
5066 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5067 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5069 # Extract the first word of "$ac_prog", so it can be a program name with args.
5070 set dummy $ac_prog; ac_word=$2
5071 echo "$as_me:5071: checking for $ac_word" >&5
5072 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5073 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5074 echo $ECHO_N "(cached) $ECHO_C" >&6
5076 if test -n "$ac_ct_NCURSES_CONFIG"; then
5077 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5079 ac_save_IFS=$IFS; IFS=$ac_path_separator
5081 for ac_dir in $ac_dummy; do
5083 test -z "$ac_dir" && ac_dir=.
5084 $as_executable_p "$ac_dir/$ac_word" || continue
5085 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5086 echo "$as_me:5086: found $ac_dir/$ac_word" >&5
5092 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5093 if test -n "$ac_ct_NCURSES_CONFIG"; then
5094 echo "$as_me:5094: result: $ac_ct_NCURSES_CONFIG" >&5
5095 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5097 echo "$as_me:5097: result: no" >&5
5098 echo "${ECHO_T}no" >&6
5101 test -n "$ac_ct_NCURSES_CONFIG" && break
5103 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5105 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5108 if test "$NCURSES_CONFIG" != none ; then
5110 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
5112 case "x$cf_add_cflags" in
5115 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5118 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'`
5119 test "$CFLAGS" != "$cf_old_cflag" || break
5121 CFLAGS="$cf_old_cflag"
5124 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5127 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'`
5128 test "$CPPFLAGS" != "$cf_old_cflag" || break
5130 CPPFLAGS="$cf_old_cflag"
5139 cf_new_extra_cppflags=
5141 for cf_add_cflags in $cf_add_cflags
5143 case "$cf_fix_cppflags" in
5145 case "$cf_add_cflags" in
5146 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5147 case "$cf_add_cflags" in
5149 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5151 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5152 && test -z "${cf_tst_cflags}" \
5153 && cf_fix_cppflags=yes
5155 if test "$cf_fix_cppflags" = yes ; then
5157 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5158 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5161 elif test "${cf_tst_cflags}" = "\"'" ; then
5163 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5164 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5174 case "$cf_add_cflags" in
5176 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5178 CPPFLAGS=`echo "$CPPFLAGS" | \
5179 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5180 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5185 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5186 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5193 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5194 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5201 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5202 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5204 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5206 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5207 && test -z "${cf_tst_cflags}" \
5208 && cf_fix_cppflags=no
5213 if test -n "$cf_new_cflags" ; then
5215 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5216 CFLAGS="${CFLAGS}$cf_new_cflags"
5220 if test -n "$cf_new_cppflags" ; then
5222 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5223 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5227 if test -n "$cf_new_extra_cppflags" ; then
5229 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5230 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5239 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5241 for cf_add_1lib in $cf_add_0lib; do
5242 for cf_add_2lib in $cf_add_libs; do
5243 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5248 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5252 # even with config script, some packages use no-override for curses.h
5254 echo "$as_me:5254: checking if we have identified curses headers" >&5
5255 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5256 if test "${cf_cv_ncurses_header+set}" = set; then
5257 echo $ECHO_N "(cached) $ECHO_C" >&6
5260 cf_cv_ncurses_header=none
5262 ncurses.h ncurses/ncurses.h \
5263 curses.h ncurses/curses.h
5265 cat >"conftest.$ac_ext" <<_ACEOF
5266 #line 5266 "configure"
5267 #include "confdefs.h"
5268 #include <${cf_header}>
5272 initscr(); tgoto("?", 0,0)
5277 rm -f "conftest.$ac_objext"
5278 if { (eval echo "$as_me:5278: \"$ac_compile\"") >&5
5279 (eval $ac_compile) 2>&5
5281 echo "$as_me:5281: \$? = $ac_status" >&5
5282 (exit "$ac_status"); } &&
5283 { ac_try='test -s "conftest.$ac_objext"'
5284 { (eval echo "$as_me:5284: \"$ac_try\"") >&5
5287 echo "$as_me:5287: \$? = $ac_status" >&5
5288 (exit "$ac_status"); }; }; then
5289 cf_cv_ncurses_header=$cf_header; break
5291 echo "$as_me: failed program was:" >&5
5292 cat "conftest.$ac_ext" >&5
5294 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5298 echo "$as_me:5298: result: $cf_cv_ncurses_header" >&5
5299 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5301 if test "$cf_cv_ncurses_header" = none ; then
5302 { { echo "$as_me:5302: error: No curses header-files found" >&5
5303 echo "$as_me: error: No curses header-files found" >&2;}
5304 { (exit 1); exit 1; }; }
5307 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5309 for ac_header in $cf_cv_ncurses_header
5311 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5312 echo "$as_me:5312: checking for $ac_header" >&5
5313 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5314 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5315 echo $ECHO_N "(cached) $ECHO_C" >&6
5317 cat >"conftest.$ac_ext" <<_ACEOF
5318 #line 5318 "configure"
5319 #include "confdefs.h"
5320 #include <$ac_header>
5322 if { (eval echo "$as_me:5322: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5323 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5325 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5327 cat conftest.err >&5
5328 echo "$as_me:5328: \$? = $ac_status" >&5
5329 (exit "$ac_status"); } >/dev/null; then
5330 if test -s conftest.err; then
5331 ac_cpp_err=$ac_c_preproc_warn_flag
5338 if test -z "$ac_cpp_err"; then
5339 eval "$as_ac_Header=yes"
5341 echo "$as_me: failed program was:" >&5
5342 cat "conftest.$ac_ext" >&5
5343 eval "$as_ac_Header=no"
5345 rm -f conftest.err "conftest.$ac_ext"
5347 echo "$as_me:5347: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5348 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5349 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5350 cat >>confdefs.h <<EOF
5351 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5357 cat >>confdefs.h <<\EOF
5361 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5363 cat >>confdefs.h <<EOF
5364 #define $cf_nculib_ROOT 1
5367 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
5371 cf_ncuhdr_root=ncurses
5373 test -n "$cf_cv_curses_dir" && \
5374 test "$cf_cv_curses_dir" != "no" && { \
5376 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5377 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5379 while test "$cf_add_incdir" != /usr/include
5381 if test -d "$cf_add_incdir"
5384 if test -n "$CFLAGS$CPPFLAGS" ; then
5385 # a loop is needed to ensure we can add subdirs of existing dirs
5386 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5387 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5388 cf_have_incdir=yes; break
5393 if test "$cf_have_incdir" = no ; then
5394 if test "$cf_add_incdir" = /usr/local/include ; then
5395 if test "$GCC" = yes
5397 cf_save_CPPFLAGS=$CPPFLAGS
5399 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5400 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5402 cat >"conftest.$ac_ext" <<_ACEOF
5403 #line 5403 "configure"
5404 #include "confdefs.h"
5414 rm -f "conftest.$ac_objext"
5415 if { (eval echo "$as_me:5415: \"$ac_compile\"") >&5
5416 (eval $ac_compile) 2>&5
5418 echo "$as_me:5418: \$? = $ac_status" >&5
5419 (exit "$ac_status"); } &&
5420 { ac_try='test -s "conftest.$ac_objext"'
5421 { (eval echo "$as_me:5421: \"$ac_try\"") >&5
5424 echo "$as_me:5424: \$? = $ac_status" >&5
5425 (exit "$ac_status"); }; }; then
5428 echo "$as_me: failed program was:" >&5
5429 cat "conftest.$ac_ext" >&5
5432 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5433 CPPFLAGS=$cf_save_CPPFLAGS
5438 if test "$cf_have_incdir" = no ; then
5439 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5441 echo "${as_me:-configure}:5441: testing adding $cf_add_incdir to include-path ..." 1>&5
5443 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5445 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5446 test "$cf_top_incdir" = "$cf_add_incdir" && break
5447 cf_add_incdir="$cf_top_incdir"
5460 echo "$as_me:5460: checking for $cf_ncuhdr_root header in include-path" >&5
5461 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5462 if test "${cf_cv_ncurses_h+set}" = set; then
5463 echo $ECHO_N "(cached) $ECHO_C" >&6
5466 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5467 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
5468 for cf_header in $cf_header_list
5471 cat >"conftest.$ac_ext" <<_ACEOF
5472 #line 5472 "configure"
5473 #include "confdefs.h"
5475 #include <$cf_header>
5480 #ifdef NCURSES_VERSION
5482 printf("%s\\n", NCURSES_VERSION);
5495 rm -f "conftest.$ac_objext"
5496 if { (eval echo "$as_me:5496: \"$ac_compile\"") >&5
5497 (eval $ac_compile) 2>&5
5499 echo "$as_me:5499: \$? = $ac_status" >&5
5500 (exit "$ac_status"); } &&
5501 { ac_try='test -s "conftest.$ac_objext"'
5502 { (eval echo "$as_me:5502: \"$ac_try\"") >&5
5505 echo "$as_me:5505: \$? = $ac_status" >&5
5506 (exit "$ac_status"); }; }; then
5507 cf_cv_ncurses_h=$cf_header
5510 echo "$as_me: failed program was:" >&5
5511 cat "conftest.$ac_ext" >&5
5514 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5516 test "$cf_cv_ncurses_h" != no && break
5520 echo "$as_me:5520: result: $cf_cv_ncurses_h" >&5
5521 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5523 if test "$cf_cv_ncurses_h" != no ; then
5524 cf_cv_ncurses_header=$cf_cv_ncurses_h
5527 echo "$as_me:5527: checking for $cf_ncuhdr_root include-path" >&5
5528 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5529 if test "${cf_cv_ncurses_h2+set}" = set; then
5530 echo $ECHO_N "(cached) $ECHO_C" >&6
5533 test -n "$verbose" && echo
5537 # collect the current set of include-directories from compiler flags
5538 cf_header_path_list=""
5539 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5540 for cf_header_path in $CPPFLAGS $CFLAGS
5542 case "$cf_header_path" in
5544 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5546 test "x$cf_header_path" != "xNONE" && \
5547 test -d "$cf_header_path" && \
5549 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5550 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
5551 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5552 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5553 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5554 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"
5557 cf_header_path_list="$cf_header_path_list $cf_search"
5563 # add the variations for the package we are looking for
5567 test "x$prefix" != "xNONE" && \
5568 test -d "$prefix" && \
5570 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5571 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
5572 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5573 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5574 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5575 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5578 for cf_subdir_prefix in \
5587 test "x$cf_subdir_prefix" != "x$prefix" && \
5588 test -d "$cf_subdir_prefix" && \
5589 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
5590 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5591 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
5592 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
5593 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
5594 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
5595 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"
5600 test "$includedir" != NONE && \
5601 test "$includedir" != "/usr/include" && \
5602 test -d "$includedir" && {
5603 test -d "$includedir" && cf_search="$cf_search $includedir"
5604 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5607 test "$oldincludedir" != NONE && \
5608 test "$oldincludedir" != "/usr/include" && \
5609 test -d "$oldincludedir" && {
5610 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
5611 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5614 cf_search="$cf_search $cf_header_path_list"
5616 test -n "$verbose" && echo "search path $cf_search"
5617 cf_save2_CPPFLAGS="$CPPFLAGS"
5618 for cf_incdir in $cf_search
5621 if test -n "$cf_incdir" ; then
5622 for cf_add_incdir in $cf_incdir
5624 while test "$cf_add_incdir" != /usr/include
5626 if test -d "$cf_add_incdir"
5629 if test -n "$CFLAGS$CPPFLAGS" ; then
5630 # a loop is needed to ensure we can add subdirs of existing dirs
5631 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5632 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5633 cf_have_incdir=yes; break
5638 if test "$cf_have_incdir" = no ; then
5639 if test "$cf_add_incdir" = /usr/local/include ; then
5640 if test "$GCC" = yes
5642 cf_save_CPPFLAGS=$CPPFLAGS
5644 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5645 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5647 cat >"conftest.$ac_ext" <<_ACEOF
5648 #line 5648 "configure"
5649 #include "confdefs.h"
5659 rm -f "conftest.$ac_objext"
5660 if { (eval echo "$as_me:5660: \"$ac_compile\"") >&5
5661 (eval $ac_compile) 2>&5
5663 echo "$as_me:5663: \$? = $ac_status" >&5
5664 (exit "$ac_status"); } &&
5665 { ac_try='test -s "conftest.$ac_objext"'
5666 { (eval echo "$as_me:5666: \"$ac_try\"") >&5
5669 echo "$as_me:5669: \$? = $ac_status" >&5
5670 (exit "$ac_status"); }; }; then
5673 echo "$as_me: failed program was:" >&5
5674 cat "conftest.$ac_ext" >&5
5677 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5678 CPPFLAGS=$cf_save_CPPFLAGS
5683 if test "$cf_have_incdir" = no ; then
5684 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5686 echo "${as_me:-configure}:5686: testing adding $cf_add_incdir to include-path ..." 1>&5
5688 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5690 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5691 test "$cf_top_incdir" = "$cf_add_incdir" && break
5692 cf_add_incdir="$cf_top_incdir"
5708 cat >"conftest.$ac_ext" <<_ACEOF
5709 #line 5709 "configure"
5710 #include "confdefs.h"
5712 #include <$cf_header>
5717 #ifdef NCURSES_VERSION
5719 printf("%s\\n", NCURSES_VERSION);
5732 rm -f "conftest.$ac_objext"
5733 if { (eval echo "$as_me:5733: \"$ac_compile\"") >&5
5734 (eval $ac_compile) 2>&5
5736 echo "$as_me:5736: \$? = $ac_status" >&5
5737 (exit "$ac_status"); } &&
5738 { ac_try='test -s "conftest.$ac_objext"'
5739 { (eval echo "$as_me:5739: \"$ac_try\"") >&5
5742 echo "$as_me:5742: \$? = $ac_status" >&5
5743 (exit "$ac_status"); }; }; then
5744 cf_cv_ncurses_h2=$cf_header
5747 echo "$as_me: failed program was:" >&5
5748 cat "conftest.$ac_ext" >&5
5751 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5753 if test "$cf_cv_ncurses_h2" != no ; then
5754 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5755 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
5758 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5760 CPPFLAGS="$cf_save2_CPPFLAGS"
5761 test "$cf_cv_ncurses_h2" != no && break
5763 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5763: error: not found" >&5
5764 echo "$as_me: error: not found" >&2;}
5765 { (exit 1); exit 1; }; }
5768 echo "$as_me:5768: result: $cf_cv_ncurses_h2" >&5
5769 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5771 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
5772 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
5773 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
5774 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
5777 if test -n "$cf_1st_incdir" ; then
5778 for cf_add_incdir in $cf_1st_incdir
5780 while test "$cf_add_incdir" != /usr/include
5782 if test -d "$cf_add_incdir"
5785 if test -n "$CFLAGS$CPPFLAGS" ; then
5786 # a loop is needed to ensure we can add subdirs of existing dirs
5787 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5788 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5789 cf_have_incdir=yes; break
5794 if test "$cf_have_incdir" = no ; then
5795 if test "$cf_add_incdir" = /usr/local/include ; then
5796 if test "$GCC" = yes
5798 cf_save_CPPFLAGS=$CPPFLAGS
5800 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5801 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5803 cat >"conftest.$ac_ext" <<_ACEOF
5804 #line 5804 "configure"
5805 #include "confdefs.h"
5815 rm -f "conftest.$ac_objext"
5816 if { (eval echo "$as_me:5816: \"$ac_compile\"") >&5
5817 (eval $ac_compile) 2>&5
5819 echo "$as_me:5819: \$? = $ac_status" >&5
5820 (exit "$ac_status"); } &&
5821 { ac_try='test -s "conftest.$ac_objext"'
5822 { (eval echo "$as_me:5822: \"$ac_try\"") >&5
5825 echo "$as_me:5825: \$? = $ac_status" >&5
5826 (exit "$ac_status"); }; }; then
5829 echo "$as_me: failed program was:" >&5
5830 cat "conftest.$ac_ext" >&5
5833 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5834 CPPFLAGS=$cf_save_CPPFLAGS
5839 if test "$cf_have_incdir" = no ; then
5840 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5842 echo "${as_me:-configure}:5842: testing adding $cf_add_incdir to include-path ..." 1>&5
5844 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5846 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5847 test "$cf_top_incdir" = "$cf_add_incdir" && break
5848 cf_add_incdir="$cf_top_incdir"
5861 # Set definitions to allow ifdef'ing for ncurses.h
5863 case "$cf_cv_ncurses_header" in
5866 cat >>confdefs.h <<\EOF
5867 #define HAVE_NCURSES_H 1
5873 case "$cf_cv_ncurses_header" in
5874 (ncurses/curses.h|ncurses/ncurses.h)
5876 cat >>confdefs.h <<\EOF
5877 #define HAVE_NCURSES_NCURSES_H 1
5881 (ncursesw/curses.h|ncursesw/ncurses.h)
5883 cat >>confdefs.h <<\EOF
5884 #define HAVE_NCURSESW_NCURSES_H 1
5890 echo "$as_me:5890: checking for terminfo header" >&5
5891 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5892 if test "${cf_cv_term_header+set}" = set; then
5893 echo $ECHO_N "(cached) $ECHO_C" >&6
5896 case "${cf_cv_ncurses_header}" in
5897 (*/ncurses.h|*/ncursesw.h)
5898 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5901 cf_term_header=term.h
5905 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5907 cat >"conftest.$ac_ext" <<_ACEOF
5908 #line 5908 "configure"
5909 #include "confdefs.h"
5911 #include <${cf_cv_ncurses_header:-curses.h}>
5917 int x = auto_left_margin; (void)x
5922 rm -f "conftest.$ac_objext"
5923 if { (eval echo "$as_me:5923: \"$ac_compile\"") >&5
5924 (eval $ac_compile) 2>&5
5926 echo "$as_me:5926: \$? = $ac_status" >&5
5927 (exit "$ac_status"); } &&
5928 { ac_try='test -s "conftest.$ac_objext"'
5929 { (eval echo "$as_me:5929: \"$ac_try\"") >&5
5932 echo "$as_me:5932: \$? = $ac_status" >&5
5933 (exit "$ac_status"); }; }; then
5935 cf_cv_term_header="$cf_test"
5937 echo "$as_me: failed program was:" >&5
5938 cat "conftest.$ac_ext" >&5
5940 cf_cv_term_header=unknown
5943 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5944 test "$cf_cv_term_header" != unknown && break
5948 echo "$as_me:5948: result: $cf_cv_term_header" >&5
5949 echo "${ECHO_T}$cf_cv_term_header" >&6
5951 # Set definitions to allow ifdef'ing to accommodate subdirectories
5953 case "$cf_cv_term_header" in
5956 cat >>confdefs.h <<\EOF
5957 #define HAVE_TERM_H 1
5963 case "$cf_cv_term_header" in
5966 cat >>confdefs.h <<\EOF
5967 #define HAVE_NCURSES_TERM_H 1
5973 cat >>confdefs.h <<\EOF
5974 #define HAVE_NCURSESW_TERM_H 1
5980 # some applications need this, but should check for NCURSES_VERSION
5982 cat >>confdefs.h <<\EOF
5986 echo "$as_me:5986: checking for ncurses version" >&5
5987 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5988 if test "${cf_cv_ncurses_version+set}" = set; then
5989 echo $ECHO_N "(cached) $ECHO_C" >&6
5992 cf_cv_ncurses_version=no
5994 rm -f "$cf_tempfile"
5995 if test "$cross_compiling" = yes; then
5997 # This will not work if the preprocessor splits the line after the
5998 # Autoconf token. The 'unproto' program does that.
5999 cat > "conftest.$ac_ext" <<EOF
6000 #include <${cf_cv_ncurses_header:-curses.h}>
6002 #ifdef NCURSES_VERSION
6003 Autoconf NCURSES_VERSION
6011 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6012 { (eval echo "$as_me:6012: \"$cf_try\"") >&5
6015 echo "$as_me:6015: \$? = $ac_status" >&5
6016 (exit "$ac_status"); }
6017 if test -f conftest.out ; then
6018 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
6019 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6024 cat >"conftest.$ac_ext" <<_ACEOF
6025 #line 6025 "configure"
6026 #include "confdefs.h"
6028 #include <${cf_cv_ncurses_header:-curses.h}>
6032 FILE *fp = fopen("$cf_tempfile", "w");
6033 #ifdef NCURSES_VERSION
6034 # ifdef NCURSES_VERSION_PATCH
6035 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6037 fprintf(fp, "%s\\n", NCURSES_VERSION);
6041 fprintf(fp, "old\\n");
6046 ${cf_cv_main_return:-return}(0);
6049 rm -f "conftest$ac_exeext"
6050 if { (eval echo "$as_me:6050: \"$ac_link\"") >&5
6051 (eval $ac_link) 2>&5
6053 echo "$as_me:6053: \$? = $ac_status" >&5
6054 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6055 { (eval echo "$as_me:6055: \"$ac_try\"") >&5
6058 echo "$as_me:6058: \$? = $ac_status" >&5
6059 (exit "$ac_status"); }; }; then
6061 cf_cv_ncurses_version=`cat $cf_tempfile`
6063 echo "$as_me: program exited with status $ac_status" >&5
6064 echo "$as_me: failed program was:" >&5
6065 cat "conftest.$ac_ext" >&5
6067 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6069 rm -f "$cf_tempfile"
6072 echo "$as_me:6072: result: $cf_cv_ncurses_version" >&5
6073 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6074 test "$cf_cv_ncurses_version" = no ||
6075 cat >>confdefs.h <<\EOF
6079 cf_nculib_root=ncurses
6080 # This works, except for the special case where we find gpm, but
6081 # ncurses is in a nonstandard location via $LIBS, and we really want
6084 cf_ncurses_SAVE="$LIBS"
6085 echo "$as_me:6085: checking for Gpm_Open in -lgpm" >&5
6086 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6087 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6088 echo $ECHO_N "(cached) $ECHO_C" >&6
6090 ac_check_lib_save_LIBS=$LIBS
6092 cat >"conftest.$ac_ext" <<_ACEOF
6093 #line 6093 "configure"
6094 #include "confdefs.h"
6096 /* Override any gcc2 internal prototype to avoid an error. */
6100 /* We use char because int might match the return type of a gcc2
6101 builtin and then its argument prototype would still apply. */
6111 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6112 if { (eval echo "$as_me:6112: \"$ac_link\"") >&5
6113 (eval $ac_link) 2>&5
6115 echo "$as_me:6115: \$? = $ac_status" >&5
6116 (exit "$ac_status"); } &&
6117 { ac_try='test -s "conftest$ac_exeext"'
6118 { (eval echo "$as_me:6118: \"$ac_try\"") >&5
6121 echo "$as_me:6121: \$? = $ac_status" >&5
6122 (exit "$ac_status"); }; }; then
6123 ac_cv_lib_gpm_Gpm_Open=yes
6125 echo "$as_me: failed program was:" >&5
6126 cat "conftest.$ac_ext" >&5
6127 ac_cv_lib_gpm_Gpm_Open=no
6129 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6130 LIBS=$ac_check_lib_save_LIBS
6132 echo "$as_me:6132: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6133 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6134 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
6135 echo "$as_me:6135: checking for initscr in -lgpm" >&5
6136 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6137 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6138 echo $ECHO_N "(cached) $ECHO_C" >&6
6140 ac_check_lib_save_LIBS=$LIBS
6142 cat >"conftest.$ac_ext" <<_ACEOF
6143 #line 6143 "configure"
6144 #include "confdefs.h"
6146 /* Override any gcc2 internal prototype to avoid an error. */
6150 /* We use char because int might match the return type of a gcc2
6151 builtin and then its argument prototype would still apply. */
6161 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6162 if { (eval echo "$as_me:6162: \"$ac_link\"") >&5
6163 (eval $ac_link) 2>&5
6165 echo "$as_me:6165: \$? = $ac_status" >&5
6166 (exit "$ac_status"); } &&
6167 { ac_try='test -s "conftest$ac_exeext"'
6168 { (eval echo "$as_me:6168: \"$ac_try\"") >&5
6171 echo "$as_me:6171: \$? = $ac_status" >&5
6172 (exit "$ac_status"); }; }; then
6173 ac_cv_lib_gpm_initscr=yes
6175 echo "$as_me: failed program was:" >&5
6176 cat "conftest.$ac_ext" >&5
6177 ac_cv_lib_gpm_initscr=no
6179 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6180 LIBS=$ac_check_lib_save_LIBS
6182 echo "$as_me:6182: result: $ac_cv_lib_gpm_initscr" >&5
6183 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6184 if test "$ac_cv_lib_gpm_initscr" = yes; then
6185 LIBS="$cf_ncurses_SAVE"
6187 cf_ncurses_LIBS="-lgpm"
6194 # This is only necessary if you are linking against an obsolete
6195 # version of ncurses (but it should do no harm, since it is static).
6196 if test "$cf_nculib_root" = ncurses ; then
6197 echo "$as_me:6197: checking for tgoto in -lmytinfo" >&5
6198 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6199 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6200 echo $ECHO_N "(cached) $ECHO_C" >&6
6202 ac_check_lib_save_LIBS=$LIBS
6203 LIBS="-lmytinfo $LIBS"
6204 cat >"conftest.$ac_ext" <<_ACEOF
6205 #line 6205 "configure"
6206 #include "confdefs.h"
6208 /* Override any gcc2 internal prototype to avoid an error. */
6212 /* We use char because int might match the return type of a gcc2
6213 builtin and then its argument prototype would still apply. */
6223 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6224 if { (eval echo "$as_me:6224: \"$ac_link\"") >&5
6225 (eval $ac_link) 2>&5
6227 echo "$as_me:6227: \$? = $ac_status" >&5
6228 (exit "$ac_status"); } &&
6229 { ac_try='test -s "conftest$ac_exeext"'
6230 { (eval echo "$as_me:6230: \"$ac_try\"") >&5
6233 echo "$as_me:6233: \$? = $ac_status" >&5
6234 (exit "$ac_status"); }; }; then
6235 ac_cv_lib_mytinfo_tgoto=yes
6237 echo "$as_me: failed program was:" >&5
6238 cat "conftest.$ac_ext" >&5
6239 ac_cv_lib_mytinfo_tgoto=no
6241 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6242 LIBS=$ac_check_lib_save_LIBS
6244 echo "$as_me:6244: result: $ac_cv_lib_mytinfo_tgoto" >&5
6245 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6246 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6247 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6257 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6259 for cf_add_1lib in $cf_add_0lib; do
6260 for cf_add_2lib in $cf_add_libs; do
6261 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6266 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6270 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6276 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6278 for cf_add_1lib in $cf_add_0lib; do
6279 for cf_add_2lib in $cf_add_libs; do
6280 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6285 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6291 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
6293 echo "$as_me:6293: checking for initscr" >&5
6294 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6295 if test "${ac_cv_func_initscr+set}" = set; then
6296 echo $ECHO_N "(cached) $ECHO_C" >&6
6298 cat >"conftest.$ac_ext" <<_ACEOF
6299 #line 6299 "configure"
6300 #include "confdefs.h"
6301 #define initscr autoconf_temporary
6302 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6309 /* We use char because int might match the return type of a gcc2
6310 builtin and then its argument prototype would still apply. */
6311 char initscr (void);
6317 /* The GNU C library defines stubs for functions which it implements
6318 to always fail with ENOSYS. Some functions are actually named
6319 something starting with __ and the normal name is an alias. */
6320 #if defined (__stub_initscr) || defined (__stub___initscr)
6321 #error found stub for initscr
6329 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6330 if { (eval echo "$as_me:6330: \"$ac_link\"") >&5
6331 (eval $ac_link) 2>&5
6333 echo "$as_me:6333: \$? = $ac_status" >&5
6334 (exit "$ac_status"); } &&
6335 { ac_try='test -s "conftest$ac_exeext"'
6336 { (eval echo "$as_me:6336: \"$ac_try\"") >&5
6339 echo "$as_me:6339: \$? = $ac_status" >&5
6340 (exit "$ac_status"); }; }; then
6341 ac_cv_func_initscr=yes
6343 echo "$as_me: failed program was:" >&5
6344 cat "conftest.$ac_ext" >&5
6345 ac_cv_func_initscr=no
6347 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6349 echo "$as_me:6349: result: $ac_cv_func_initscr" >&5
6350 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6351 if test "$ac_cv_func_initscr" = yes; then
6352 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6355 cf_save_LIBS="$LIBS"
6356 echo "$as_me:6356: checking for initscr in -l$cf_nculib_root" >&5
6357 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6358 LIBS="-l$cf_nculib_root $LIBS"
6359 cat >"conftest.$ac_ext" <<_ACEOF
6360 #line 6360 "configure"
6361 #include "confdefs.h"
6362 #include <${cf_cv_ncurses_header:-curses.h}>
6371 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6372 if { (eval echo "$as_me:6372: \"$ac_link\"") >&5
6373 (eval $ac_link) 2>&5
6375 echo "$as_me:6375: \$? = $ac_status" >&5
6376 (exit "$ac_status"); } &&
6377 { ac_try='test -s "conftest$ac_exeext"'
6378 { (eval echo "$as_me:6378: \"$ac_try\"") >&5
6381 echo "$as_me:6381: \$? = $ac_status" >&5
6382 (exit "$ac_status"); }; }; then
6383 echo "$as_me:6383: result: yes" >&5
6384 echo "${ECHO_T}yes" >&6
6385 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6388 echo "$as_me: failed program was:" >&5
6389 cat "conftest.$ac_ext" >&5
6390 echo "$as_me:6390: result: no" >&5
6391 echo "${ECHO_T}no" >&6
6394 cf_library_path_list=""
6395 if test -n "${LDFLAGS}${LIBS}" ; then
6396 for cf_library_path in $LDFLAGS $LIBS
6398 case "$cf_library_path" in
6400 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6402 test "x$cf_library_path" != "xNONE" && \
6403 test -d "$cf_library_path" && \
6405 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6406 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6407 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6408 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6409 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6410 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"
6413 cf_library_path_list="$cf_library_path_list $cf_search"
6421 test "x$prefix" != "xNONE" && \
6422 test -d "$prefix" && \
6424 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6425 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6426 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6427 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6428 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6429 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6432 for cf_subdir_prefix in \
6441 test "x$cf_subdir_prefix" != "x$prefix" && \
6442 test -d "$cf_subdir_prefix" && \
6443 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6444 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6445 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6446 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
6447 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
6448 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
6449 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"
6454 cf_search="$cf_library_path_list $cf_search"
6456 for cf_libdir in $cf_search
6458 echo "$as_me:6458: checking for -l$cf_nculib_root in $cf_libdir" >&5
6459 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6460 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6461 cat >"conftest.$ac_ext" <<_ACEOF
6462 #line 6462 "configure"
6463 #include "confdefs.h"
6464 #include <${cf_cv_ncurses_header:-curses.h}>
6473 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6474 if { (eval echo "$as_me:6474: \"$ac_link\"") >&5
6475 (eval $ac_link) 2>&5
6477 echo "$as_me:6477: \$? = $ac_status" >&5
6478 (exit "$ac_status"); } &&
6479 { ac_try='test -s "conftest$ac_exeext"'
6480 { (eval echo "$as_me:6480: \"$ac_try\"") >&5
6483 echo "$as_me:6483: \$? = $ac_status" >&5
6484 (exit "$ac_status"); }; }; then
6485 echo "$as_me:6485: result: yes" >&5
6486 echo "${ECHO_T}yes" >&6
6487 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6490 echo "$as_me: failed program was:" >&5
6491 cat "conftest.$ac_ext" >&5
6492 echo "$as_me:6492: result: no" >&5
6493 echo "${ECHO_T}no" >&6
6494 LIBS="$cf_save_LIBS"
6496 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6500 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6504 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
6506 if test "$cf_found_library" = no ; then
6507 { { echo "$as_me:6507: error: Cannot link $cf_nculib_root library" >&5
6508 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6509 { (exit 1); exit 1; }; }
6514 if test -n "$cf_ncurses_LIBS" ; then
6515 echo "$as_me:6515: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6516 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6517 cf_ncurses_SAVE="$LIBS"
6518 for p in $cf_ncurses_LIBS ; do
6519 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
6520 if test "$q" != "$LIBS" ; then
6524 cat >"conftest.$ac_ext" <<_ACEOF
6525 #line 6525 "configure"
6526 #include "confdefs.h"
6527 #include <${cf_cv_ncurses_header:-curses.h}>
6531 initscr(); mousemask(0,0); tigetstr((char *)0);
6536 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6537 if { (eval echo "$as_me:6537: \"$ac_link\"") >&5
6538 (eval $ac_link) 2>&5
6540 echo "$as_me:6540: \$? = $ac_status" >&5
6541 (exit "$ac_status"); } &&
6542 { ac_try='test -s "conftest$ac_exeext"'
6543 { (eval echo "$as_me:6543: \"$ac_try\"") >&5
6546 echo "$as_me:6546: \$? = $ac_status" >&5
6547 (exit "$ac_status"); }; }; then
6548 echo "$as_me:6548: result: yes" >&5
6549 echo "${ECHO_T}yes" >&6
6551 echo "$as_me: failed program was:" >&5
6552 cat "conftest.$ac_ext" >&5
6553 echo "$as_me:6553: result: no" >&5
6554 echo "${ECHO_T}no" >&6
6555 LIBS="$cf_ncurses_SAVE"
6557 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6560 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6562 cat >>confdefs.h <<EOF
6563 #define $cf_nculib_ROOT 1
6571 echo "$as_me:6571: checking if you want wide-character code" >&5
6572 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6574 # Check whether --enable-widec or --disable-widec was given.
6575 if test "${enable_widec+set}" = set; then
6576 enableval="$enable_widec"
6577 with_widec=$enableval
6581 echo "$as_me:6581: result: $with_widec" >&5
6582 echo "${ECHO_T}$with_widec" >&6
6583 if test "$with_widec" = yes ; then
6585 for ac_header in wchar.h
6587 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6588 echo "$as_me:6588: checking for $ac_header" >&5
6589 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6590 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6591 echo $ECHO_N "(cached) $ECHO_C" >&6
6593 cat >"conftest.$ac_ext" <<_ACEOF
6594 #line 6594 "configure"
6595 #include "confdefs.h"
6596 #include <$ac_header>
6598 if { (eval echo "$as_me:6598: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6599 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6601 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6603 cat conftest.err >&5
6604 echo "$as_me:6604: \$? = $ac_status" >&5
6605 (exit "$ac_status"); } >/dev/null; then
6606 if test -s conftest.err; then
6607 ac_cpp_err=$ac_c_preproc_warn_flag
6614 if test -z "$ac_cpp_err"; then
6615 eval "$as_ac_Header=yes"
6617 echo "$as_me: failed program was:" >&5
6618 cat "conftest.$ac_ext" >&5
6619 eval "$as_ac_Header=no"
6621 rm -f conftest.err "conftest.$ac_ext"
6623 echo "$as_me:6623: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6624 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6625 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6626 cat >>confdefs.h <<EOF
6627 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6633 echo "$as_me:6633: checking for multibyte character support" >&5
6634 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6635 if test "${cf_cv_utf8_lib+set}" = set; then
6636 echo $ECHO_N "(cached) $ECHO_C" >&6
6639 cf_save_LIBS="$LIBS"
6640 cat >"conftest.$ac_ext" <<_ACEOF
6641 #line 6641 "configure"
6642 #include "confdefs.h"
6658 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6659 if { (eval echo "$as_me:6659: \"$ac_link\"") >&5
6660 (eval $ac_link) 2>&5
6662 echo "$as_me:6662: \$? = $ac_status" >&5
6663 (exit "$ac_status"); } &&
6664 { ac_try='test -s "conftest$ac_exeext"'
6665 { (eval echo "$as_me:6665: \"$ac_try\"") >&5
6668 echo "$as_me:6668: \$? = $ac_status" >&5
6669 (exit "$ac_status"); }; }; then
6672 echo "$as_me: failed program was:" >&5
6673 cat "conftest.$ac_ext" >&5
6675 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6676 # will be set on completion of the AC_TRY_LINK below.
6677 cf_cv_header_path_utf8=
6678 cf_cv_library_path_utf8=
6680 echo "${as_me:-configure}:6680: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6682 cf_save_LIBS="$LIBS"
6684 cat >"conftest.$ac_ext" <<_ACEOF
6685 #line 6685 "configure"
6686 #include "confdefs.h"
6688 #include <libutf8.h>
6697 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6698 if { (eval echo "$as_me:6698: \"$ac_link\"") >&5
6699 (eval $ac_link) 2>&5
6701 echo "$as_me:6701: \$? = $ac_status" >&5
6702 (exit "$ac_status"); } &&
6703 { ac_try='test -s "conftest$ac_exeext"'
6704 { (eval echo "$as_me:6704: \"$ac_try\"") >&5
6707 echo "$as_me:6707: \$? = $ac_status" >&5
6708 (exit "$ac_status"); }; }; then
6710 cf_cv_find_linkage_utf8=yes
6711 cf_cv_header_path_utf8=/usr/include
6712 cf_cv_library_path_utf8=/usr/lib
6715 echo "$as_me: failed program was:" >&5
6716 cat "conftest.$ac_ext" >&5
6718 LIBS="-lutf8 $cf_save_LIBS"
6720 cat >"conftest.$ac_ext" <<_ACEOF
6721 #line 6721 "configure"
6722 #include "confdefs.h"
6724 #include <libutf8.h>
6733 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6734 if { (eval echo "$as_me:6734: \"$ac_link\"") >&5
6735 (eval $ac_link) 2>&5
6737 echo "$as_me:6737: \$? = $ac_status" >&5
6738 (exit "$ac_status"); } &&
6739 { ac_try='test -s "conftest$ac_exeext"'
6740 { (eval echo "$as_me:6740: \"$ac_try\"") >&5
6743 echo "$as_me:6743: \$? = $ac_status" >&5
6744 (exit "$ac_status"); }; }; then
6746 cf_cv_find_linkage_utf8=yes
6747 cf_cv_header_path_utf8=/usr/include
6748 cf_cv_library_path_utf8=/usr/lib
6749 cf_cv_library_file_utf8="-lutf8"
6752 echo "$as_me: failed program was:" >&5
6753 cat "conftest.$ac_ext" >&5
6755 cf_cv_find_linkage_utf8=no
6756 LIBS="$cf_save_LIBS"
6758 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6760 echo "${as_me:-configure}:6760: testing find linkage for utf8 library ..." 1>&5
6762 echo "${as_me:-configure}:6762: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6764 cf_save_CPPFLAGS="$CPPFLAGS"
6765 cf_test_CPPFLAGS="$CPPFLAGS"
6769 # collect the current set of include-directories from compiler flags
6770 cf_header_path_list=""
6771 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6772 for cf_header_path in $CPPFLAGS $CFLAGS
6774 case "$cf_header_path" in
6776 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6778 test "x$cf_header_path" != "xNONE" && \
6779 test -d "$cf_header_path" && \
6781 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6782 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
6783 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
6784 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
6785 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
6786 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6789 cf_header_path_list="$cf_header_path_list $cf_search"
6795 # add the variations for the package we are looking for
6799 test "x$prefix" != "xNONE" && \
6800 test -d "$prefix" && \
6802 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6803 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
6804 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
6805 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
6806 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
6807 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
6810 for cf_subdir_prefix in \
6819 test "x$cf_subdir_prefix" != "x$prefix" && \
6820 test -d "$cf_subdir_prefix" && \
6821 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6822 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6823 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
6824 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6825 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6826 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6827 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6832 test "$includedir" != NONE && \
6833 test "$includedir" != "/usr/include" && \
6834 test -d "$includedir" && {
6835 test -d "$includedir" && cf_search="$cf_search $includedir"
6836 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
6839 test "$oldincludedir" != NONE && \
6840 test "$oldincludedir" != "/usr/include" && \
6841 test -d "$oldincludedir" && {
6842 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
6843 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
6846 cf_search="$cf_search $cf_header_path_list"
6848 for cf_cv_header_path_utf8 in $cf_search
6850 if test -d "$cf_cv_header_path_utf8" ; then
6851 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6853 echo "${as_me:-configure}:6853: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6855 CPPFLAGS="$cf_save_CPPFLAGS"
6857 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6858 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
6860 cat >"conftest.$ac_ext" <<_ACEOF
6861 #line 6861 "configure"
6862 #include "confdefs.h"
6864 #include <libutf8.h>
6873 rm -f "conftest.$ac_objext"
6874 if { (eval echo "$as_me:6874: \"$ac_compile\"") >&5
6875 (eval $ac_compile) 2>&5
6877 echo "$as_me:6877: \$? = $ac_status" >&5
6878 (exit "$ac_status"); } &&
6879 { ac_try='test -s "conftest.$ac_objext"'
6880 { (eval echo "$as_me:6880: \"$ac_try\"") >&5
6883 echo "$as_me:6883: \$? = $ac_status" >&5
6884 (exit "$ac_status"); }; }; then
6886 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6888 echo "${as_me:-configure}:6888: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6890 cf_cv_find_linkage_utf8=maybe
6891 cf_test_CPPFLAGS="$CPPFLAGS"
6894 echo "$as_me: failed program was:" >&5
6895 cat "conftest.$ac_ext" >&5
6897 CPPFLAGS="$cf_save_CPPFLAGS"
6900 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6904 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6906 echo "${as_me:-configure}:6906: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6908 cf_save_LIBS="$LIBS"
6909 cf_save_LDFLAGS="$LDFLAGS"
6911 if test "$cf_cv_find_linkage_utf8" != yes ; then
6914 cf_library_path_list=""
6915 if test -n "${LDFLAGS}${LIBS}" ; then
6916 for cf_library_path in $LDFLAGS $LIBS
6918 case "$cf_library_path" in
6920 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6922 test "x$cf_library_path" != "xNONE" && \
6923 test -d "$cf_library_path" && \
6925 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6926 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6927 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
6928 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6929 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
6930 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6933 cf_library_path_list="$cf_library_path_list $cf_search"
6941 test "x$prefix" != "xNONE" && \
6942 test -d "$prefix" && \
6944 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6945 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6946 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
6947 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
6948 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
6949 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
6952 for cf_subdir_prefix in \
6961 test "x$cf_subdir_prefix" != "x$prefix" && \
6962 test -d "$cf_subdir_prefix" && \
6963 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6964 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6965 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6966 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6967 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6968 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6969 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6974 cf_search="$cf_library_path_list $cf_search"
6976 for cf_cv_library_path_utf8 in $cf_search
6978 if test -d "$cf_cv_library_path_utf8" ; then
6979 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6981 echo "${as_me:-configure}:6981: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6983 CPPFLAGS="$cf_test_CPPFLAGS"
6984 LIBS="-lutf8 $cf_save_LIBS"
6985 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6986 cat >"conftest.$ac_ext" <<_ACEOF
6987 #line 6987 "configure"
6988 #include "confdefs.h"
6990 #include <libutf8.h>
6999 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7000 if { (eval echo "$as_me:7000: \"$ac_link\"") >&5
7001 (eval $ac_link) 2>&5
7003 echo "$as_me:7003: \$? = $ac_status" >&5
7004 (exit "$ac_status"); } &&
7005 { ac_try='test -s "conftest$ac_exeext"'
7006 { (eval echo "$as_me:7006: \"$ac_try\"") >&5
7009 echo "$as_me:7009: \$? = $ac_status" >&5
7010 (exit "$ac_status"); }; }; then
7012 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7014 echo "${as_me:-configure}:7014: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7016 cf_cv_find_linkage_utf8=yes
7017 cf_cv_library_file_utf8="-lutf8"
7020 echo "$as_me: failed program was:" >&5
7021 cat "conftest.$ac_ext" >&5
7023 CPPFLAGS="$cf_save_CPPFLAGS"
7024 LIBS="$cf_save_LIBS"
7025 LDFLAGS="$cf_save_LDFLAGS"
7028 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7031 CPPFLAGS="$cf_save_CPPFLAGS"
7032 LDFLAGS="$cf_save_LDFLAGS"
7036 cf_cv_find_linkage_utf8=no
7040 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7043 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7045 LIBS="$cf_save_LIBS"
7047 if test "$cf_cv_find_linkage_utf8" = yes ; then
7048 cf_cv_utf8_lib=add-on
7054 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7056 echo "$as_me:7056: result: $cf_cv_utf8_lib" >&5
7057 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7059 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7061 if test "$cf_cv_utf8_lib" = "add-on" ; then
7063 cat >>confdefs.h <<\EOF
7064 #define HAVE_LIBUTF8_H 1
7067 if test -n "$cf_cv_header_path_utf8" ; then
7068 for cf_add_incdir in $cf_cv_header_path_utf8
7070 while test "$cf_add_incdir" != /usr/include
7072 if test -d "$cf_add_incdir"
7075 if test -n "$CFLAGS$CPPFLAGS" ; then
7076 # a loop is needed to ensure we can add subdirs of existing dirs
7077 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7078 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7079 cf_have_incdir=yes; break
7084 if test "$cf_have_incdir" = no ; then
7085 if test "$cf_add_incdir" = /usr/local/include ; then
7086 if test "$GCC" = yes
7088 cf_save_CPPFLAGS=$CPPFLAGS
7090 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7091 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7093 cat >"conftest.$ac_ext" <<_ACEOF
7094 #line 7094 "configure"
7095 #include "confdefs.h"
7105 rm -f "conftest.$ac_objext"
7106 if { (eval echo "$as_me:7106: \"$ac_compile\"") >&5
7107 (eval $ac_compile) 2>&5
7109 echo "$as_me:7109: \$? = $ac_status" >&5
7110 (exit "$ac_status"); } &&
7111 { ac_try='test -s "conftest.$ac_objext"'
7112 { (eval echo "$as_me:7112: \"$ac_try\"") >&5
7115 echo "$as_me:7115: \$? = $ac_status" >&5
7116 (exit "$ac_status"); }; }; then
7119 echo "$as_me: failed program was:" >&5
7120 cat "conftest.$ac_ext" >&5
7123 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7124 CPPFLAGS=$cf_save_CPPFLAGS
7129 if test "$cf_have_incdir" = no ; then
7130 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7132 echo "${as_me:-configure}:7132: testing adding $cf_add_incdir to include-path ..." 1>&5
7134 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7136 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7137 test "$cf_top_incdir" = "$cf_add_incdir" && break
7138 cf_add_incdir="$cf_top_incdir"
7149 if test -n "$cf_cv_library_path_utf8" ; then
7150 for cf_add_libdir in $cf_cv_library_path_utf8
7152 if test "$cf_add_libdir" = /usr/lib ; then
7154 elif test -d "$cf_add_libdir"
7157 if test -n "$LDFLAGS$LIBS" ; then
7158 # a loop is needed to ensure we can add subdirs of existing dirs
7159 for cf_test_libdir in $LDFLAGS $LIBS ; do
7160 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7161 cf_have_libdir=yes; break
7165 if test "$cf_have_libdir" = no ; then
7166 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7168 echo "${as_me:-configure}:7168: testing adding $cf_add_libdir to library-path ..." 1>&5
7170 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7179 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7181 for cf_add_1lib in $cf_add_0lib; do
7182 for cf_add_2lib in $cf_add_libs; do
7183 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7188 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7194 cf_ncuconfig_root=ncursesw
7195 cf_have_ncuconfig=no
7197 if test "x${PKG_CONFIG:=none}" != xnone; then
7198 echo "$as_me:7198: checking pkg-config for $cf_ncuconfig_root" >&5
7199 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7200 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7201 echo "$as_me:7201: result: yes" >&5
7202 echo "${ECHO_T}yes" >&6
7204 echo "$as_me:7204: checking if the $cf_ncuconfig_root package files work" >&5
7205 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7206 cf_have_ncuconfig=unknown
7208 cf_save_CFLAGS="$CFLAGS"
7209 cf_save_CPPFLAGS="$CPPFLAGS"
7210 cf_save_LIBS="$LIBS"
7212 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7213 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7215 # while -W for passing linker flags is prevalent, it is not "standard".
7216 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7217 # incompatible _and_ non-standard -W option which gives an error. Work
7218 # around that pitfall.
7219 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7225 cf_new_extra_cppflags=
7227 for cf_add_cflags in $cf_pkg_cflags
7229 case "$cf_fix_cppflags" in
7231 case "$cf_add_cflags" in
7232 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7233 case "$cf_add_cflags" in
7235 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7237 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7238 && test -z "${cf_tst_cflags}" \
7239 && cf_fix_cppflags=yes
7241 if test "$cf_fix_cppflags" = yes ; then
7243 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7244 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7247 elif test "${cf_tst_cflags}" = "\"'" ; then
7249 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7250 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7260 case "$cf_add_cflags" in
7262 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7264 CPPFLAGS=`echo "$CPPFLAGS" | \
7265 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7266 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7271 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7272 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7279 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7280 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7287 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7288 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7290 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7292 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7293 && test -z "${cf_tst_cflags}" \
7294 && cf_fix_cppflags=no
7299 if test -n "$cf_new_cflags" ; then
7301 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7302 CFLAGS="${CFLAGS}$cf_new_cflags"
7306 if test -n "$cf_new_cppflags" ; then
7308 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7309 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7313 if test -n "$cf_new_extra_cppflags" ; then
7315 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7316 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7323 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7325 for cf_add_1lib in $cf_add_0lib; do
7326 for cf_add_2lib in $cf_add_libs; do
7327 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7332 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7336 cat >"conftest.$ac_ext" <<_ACEOF
7337 #line 7337 "configure"
7338 #include "confdefs.h"
7339 #include <${cf_cv_ncurses_header:-curses.h}>
7343 initscr(); mousemask(0,0); tigetstr((char *)0);
7348 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7349 if { (eval echo "$as_me:7349: \"$ac_link\"") >&5
7350 (eval $ac_link) 2>&5
7352 echo "$as_me:7352: \$? = $ac_status" >&5
7353 (exit "$ac_status"); } &&
7354 { ac_try='test -s "conftest$ac_exeext"'
7355 { (eval echo "$as_me:7355: \"$ac_try\"") >&5
7358 echo "$as_me:7358: \$? = $ac_status" >&5
7359 (exit "$ac_status"); }; }; then
7360 if test "$cross_compiling" = yes; then
7361 cf_test_ncuconfig=maybe
7363 cat >"conftest.$ac_ext" <<_ACEOF
7364 #line 7364 "configure"
7365 #include "confdefs.h"
7366 #include <${cf_cv_ncurses_header:-curses.h}>
7368 { const char *xx = curses_version(); return (xx == 0); }
7370 rm -f "conftest$ac_exeext"
7371 if { (eval echo "$as_me:7371: \"$ac_link\"") >&5
7372 (eval $ac_link) 2>&5
7374 echo "$as_me:7374: \$? = $ac_status" >&5
7375 (exit "$ac_status"); } && { ac_try='"./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 cf_test_ncuconfig=yes
7383 echo "$as_me: program exited with status $ac_status" >&5
7384 echo "$as_me: failed program was:" >&5
7385 cat "conftest.$ac_ext" >&5
7386 cf_test_ncuconfig=no
7388 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7391 echo "$as_me: failed program was:" >&5
7392 cat "conftest.$ac_ext" >&5
7393 cf_test_ncuconfig=no
7395 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7397 CFLAGS="$cf_save_CFLAGS"
7398 CPPFLAGS="$cf_save_CPPFLAGS"
7399 LIBS="$cf_save_LIBS"
7401 if test "x$cf_test_ncuconfig" != xyes; then
7402 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7403 cf_pkg_cflags="$cf_temp"
7404 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7405 cf_pkg_libs="$cf_temp"
7410 for cf_add_cflags in $cf_pkg_cflags
7412 case "x$cf_add_cflags" in
7415 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7418 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'`
7419 test "$CFLAGS" != "$cf_old_cflag" || break
7421 CFLAGS="$cf_old_cflag"
7424 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7427 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'`
7428 test "$CPPFLAGS" != "$cf_old_cflag" || break
7430 CPPFLAGS="$cf_old_cflag"
7439 cf_new_extra_cppflags=
7441 for cf_add_cflags in $cf_add_cflags
7443 case "$cf_fix_cppflags" in
7445 case "$cf_add_cflags" in
7446 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7447 case "$cf_add_cflags" in
7449 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7451 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7452 && test -z "${cf_tst_cflags}" \
7453 && cf_fix_cppflags=yes
7455 if test "$cf_fix_cppflags" = yes ; then
7457 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7458 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7461 elif test "${cf_tst_cflags}" = "\"'" ; then
7463 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7464 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7474 case "$cf_add_cflags" in
7476 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7478 CPPFLAGS=`echo "$CPPFLAGS" | \
7479 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7480 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7485 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7486 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7493 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7494 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7501 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7502 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7504 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7506 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7507 && test -z "${cf_tst_cflags}" \
7508 && cf_fix_cppflags=no
7513 if test -n "$cf_new_cflags" ; then
7515 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7516 CFLAGS="${CFLAGS}$cf_new_cflags"
7520 if test -n "$cf_new_cppflags" ; then
7522 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7523 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7527 if test -n "$cf_new_extra_cppflags" ; then
7529 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7530 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7539 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7541 for cf_add_1lib in $cf_add_0lib; do
7542 for cf_add_2lib in $cf_add_libs; do
7543 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7548 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7552 cat >"conftest.$ac_ext" <<_ACEOF
7553 #line 7553 "configure"
7554 #include "confdefs.h"
7555 #include <${cf_cv_ncurses_header:-curses.h}>
7559 initscr(); mousemask(0,0); tigetstr((char *)0);
7564 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7565 if { (eval echo "$as_me:7565: \"$ac_link\"") >&5
7566 (eval $ac_link) 2>&5
7568 echo "$as_me:7568: \$? = $ac_status" >&5
7569 (exit "$ac_status"); } &&
7570 { ac_try='test -s "conftest$ac_exeext"'
7571 { (eval echo "$as_me:7571: \"$ac_try\"") >&5
7574 echo "$as_me:7574: \$? = $ac_status" >&5
7575 (exit "$ac_status"); }; }; then
7576 if test "$cross_compiling" = yes; then
7577 cf_have_ncuconfig=maybe
7579 cat >"conftest.$ac_ext" <<_ACEOF
7580 #line 7580 "configure"
7581 #include "confdefs.h"
7582 #include <${cf_cv_ncurses_header:-curses.h}>
7584 { const char *xx = curses_version(); return (xx == 0); }
7586 rm -f "conftest$ac_exeext"
7587 if { (eval echo "$as_me:7587: \"$ac_link\"") >&5
7588 (eval $ac_link) 2>&5
7590 echo "$as_me:7590: \$? = $ac_status" >&5
7591 (exit "$ac_status"); } && { ac_try='"./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 cf_have_ncuconfig=yes
7599 echo "$as_me: program exited with status $ac_status" >&5
7600 echo "$as_me: failed program was:" >&5
7601 cat "conftest.$ac_ext" >&5
7602 cf_have_ncuconfig=no
7604 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7607 echo "$as_me: failed program was:" >&5
7608 cat "conftest.$ac_ext" >&5
7609 cf_have_ncuconfig=no
7611 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7612 echo "$as_me:7612: result: $cf_have_ncuconfig" >&5
7613 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7614 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7615 if test "$cf_have_ncuconfig" != "yes"
7617 CPPFLAGS="$cf_save_CPPFLAGS"
7618 LIBS="$cf_save_LIBS"
7619 NCURSES_CONFIG_PKG=none
7622 cat >>confdefs.h <<\EOF
7626 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7628 echo "$as_me:7628: checking for terminfo header" >&5
7629 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7630 if test "${cf_cv_term_header+set}" = set; then
7631 echo $ECHO_N "(cached) $ECHO_C" >&6
7634 case "${cf_cv_ncurses_header}" in
7635 (*/ncurses.h|*/ncursesw.h)
7636 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7639 cf_term_header=term.h
7643 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7645 cat >"conftest.$ac_ext" <<_ACEOF
7646 #line 7646 "configure"
7647 #include "confdefs.h"
7649 #include <${cf_cv_ncurses_header:-curses.h}>
7655 int x = auto_left_margin; (void)x
7660 rm -f "conftest.$ac_objext"
7661 if { (eval echo "$as_me:7661: \"$ac_compile\"") >&5
7662 (eval $ac_compile) 2>&5
7664 echo "$as_me:7664: \$? = $ac_status" >&5
7665 (exit "$ac_status"); } &&
7666 { ac_try='test -s "conftest.$ac_objext"'
7667 { (eval echo "$as_me:7667: \"$ac_try\"") >&5
7670 echo "$as_me:7670: \$? = $ac_status" >&5
7671 (exit "$ac_status"); }; }; then
7673 cf_cv_term_header="$cf_test"
7675 echo "$as_me: failed program was:" >&5
7676 cat "conftest.$ac_ext" >&5
7678 cf_cv_term_header=unknown
7681 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7682 test "$cf_cv_term_header" != unknown && break
7686 echo "$as_me:7686: result: $cf_cv_term_header" >&5
7687 echo "${ECHO_T}$cf_cv_term_header" >&6
7689 # Set definitions to allow ifdef'ing to accommodate subdirectories
7691 case "$cf_cv_term_header" in
7694 cat >>confdefs.h <<\EOF
7695 #define HAVE_TERM_H 1
7701 case "$cf_cv_term_header" in
7704 cat >>confdefs.h <<\EOF
7705 #define HAVE_NCURSES_TERM_H 1
7711 cat >>confdefs.h <<\EOF
7712 #define HAVE_NCURSESW_TERM_H 1
7721 echo "$as_me:7721: result: no" >&5
7722 echo "${ECHO_T}no" >&6
7723 NCURSES_CONFIG_PKG=none
7726 NCURSES_CONFIG_PKG=none
7729 if test "x$cf_have_ncuconfig" = "xno"; then
7730 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7732 if test -n "$ac_tool_prefix"; then
7733 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7735 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7736 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7737 echo "$as_me:7737: checking for $ac_word" >&5
7738 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7739 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7740 echo $ECHO_N "(cached) $ECHO_C" >&6
7742 if test -n "$NCURSES_CONFIG"; then
7743 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7745 ac_save_IFS=$IFS; IFS=$ac_path_separator
7747 for ac_dir in $ac_dummy; do
7749 test -z "$ac_dir" && ac_dir=.
7750 $as_executable_p "$ac_dir/$ac_word" || continue
7751 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7752 echo "$as_me:7752: found $ac_dir/$ac_word" >&5
7758 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7759 if test -n "$NCURSES_CONFIG"; then
7760 echo "$as_me:7760: result: $NCURSES_CONFIG" >&5
7761 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7763 echo "$as_me:7763: result: no" >&5
7764 echo "${ECHO_T}no" >&6
7767 test -n "$NCURSES_CONFIG" && break
7770 if test -z "$NCURSES_CONFIG"; then
7771 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7772 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7774 # Extract the first word of "$ac_prog", so it can be a program name with args.
7775 set dummy $ac_prog; ac_word=$2
7776 echo "$as_me:7776: checking for $ac_word" >&5
7777 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7778 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7779 echo $ECHO_N "(cached) $ECHO_C" >&6
7781 if test -n "$ac_ct_NCURSES_CONFIG"; then
7782 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7784 ac_save_IFS=$IFS; IFS=$ac_path_separator
7786 for ac_dir in $ac_dummy; do
7788 test -z "$ac_dir" && ac_dir=.
7789 $as_executable_p "$ac_dir/$ac_word" || continue
7790 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7791 echo "$as_me:7791: found $ac_dir/$ac_word" >&5
7797 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7798 if test -n "$ac_ct_NCURSES_CONFIG"; then
7799 echo "$as_me:7799: result: $ac_ct_NCURSES_CONFIG" >&5
7800 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7802 echo "$as_me:7802: result: no" >&5
7803 echo "${ECHO_T}no" >&6
7806 test -n "$ac_ct_NCURSES_CONFIG" && break
7808 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7810 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7813 if test "$NCURSES_CONFIG" != none ; then
7815 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7817 case "x$cf_add_cflags" in
7820 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7823 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'`
7824 test "$CFLAGS" != "$cf_old_cflag" || break
7826 CFLAGS="$cf_old_cflag"
7829 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7832 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'`
7833 test "$CPPFLAGS" != "$cf_old_cflag" || break
7835 CPPFLAGS="$cf_old_cflag"
7844 cf_new_extra_cppflags=
7846 for cf_add_cflags in $cf_add_cflags
7848 case "$cf_fix_cppflags" in
7850 case "$cf_add_cflags" in
7851 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7852 case "$cf_add_cflags" in
7854 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7856 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7857 && test -z "${cf_tst_cflags}" \
7858 && cf_fix_cppflags=yes
7860 if test "$cf_fix_cppflags" = yes ; then
7862 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7863 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7866 elif test "${cf_tst_cflags}" = "\"'" ; then
7868 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7869 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7879 case "$cf_add_cflags" in
7881 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7883 CPPFLAGS=`echo "$CPPFLAGS" | \
7884 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7885 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7890 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7891 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7898 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7899 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7906 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7907 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7909 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7911 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7912 && test -z "${cf_tst_cflags}" \
7913 && cf_fix_cppflags=no
7918 if test -n "$cf_new_cflags" ; then
7920 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7921 CFLAGS="${CFLAGS}$cf_new_cflags"
7925 if test -n "$cf_new_cppflags" ; then
7927 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7928 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7932 if test -n "$cf_new_extra_cppflags" ; then
7934 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7935 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7944 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7946 for cf_add_1lib in $cf_add_0lib; do
7947 for cf_add_2lib in $cf_add_libs; do
7948 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7953 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7957 # even with config script, some packages use no-override for curses.h
7959 echo "$as_me:7959: checking if we have identified curses headers" >&5
7960 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7961 if test "${cf_cv_ncurses_header+set}" = set; then
7962 echo $ECHO_N "(cached) $ECHO_C" >&6
7965 cf_cv_ncurses_header=none
7967 ncurses.h ncursesw/ncurses.h \
7968 curses.h ncursesw/curses.h
7970 cat >"conftest.$ac_ext" <<_ACEOF
7971 #line 7971 "configure"
7972 #include "confdefs.h"
7973 #include <${cf_header}>
7977 initscr(); tgoto("?", 0,0)
7982 rm -f "conftest.$ac_objext"
7983 if { (eval echo "$as_me:7983: \"$ac_compile\"") >&5
7984 (eval $ac_compile) 2>&5
7986 echo "$as_me:7986: \$? = $ac_status" >&5
7987 (exit "$ac_status"); } &&
7988 { ac_try='test -s "conftest.$ac_objext"'
7989 { (eval echo "$as_me:7989: \"$ac_try\"") >&5
7992 echo "$as_me:7992: \$? = $ac_status" >&5
7993 (exit "$ac_status"); }; }; then
7994 cf_cv_ncurses_header=$cf_header; break
7996 echo "$as_me: failed program was:" >&5
7997 cat "conftest.$ac_ext" >&5
7999 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8003 echo "$as_me:8003: result: $cf_cv_ncurses_header" >&5
8004 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8006 if test "$cf_cv_ncurses_header" = none ; then
8007 { { echo "$as_me:8007: error: No curses header-files found" >&5
8008 echo "$as_me: error: No curses header-files found" >&2;}
8009 { (exit 1); exit 1; }; }
8012 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8014 for ac_header in $cf_cv_ncurses_header
8016 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8017 echo "$as_me:8017: checking for $ac_header" >&5
8018 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8019 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8020 echo $ECHO_N "(cached) $ECHO_C" >&6
8022 cat >"conftest.$ac_ext" <<_ACEOF
8023 #line 8023 "configure"
8024 #include "confdefs.h"
8025 #include <$ac_header>
8027 if { (eval echo "$as_me:8027: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8028 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8030 $EGREP -v '^ *\+' conftest.er1 >conftest.err
8032 cat conftest.err >&5
8033 echo "$as_me:8033: \$? = $ac_status" >&5
8034 (exit "$ac_status"); } >/dev/null; then
8035 if test -s conftest.err; then
8036 ac_cpp_err=$ac_c_preproc_warn_flag
8043 if test -z "$ac_cpp_err"; then
8044 eval "$as_ac_Header=yes"
8046 echo "$as_me: failed program was:" >&5
8047 cat "conftest.$ac_ext" >&5
8048 eval "$as_ac_Header=no"
8050 rm -f conftest.err "conftest.$ac_ext"
8052 echo "$as_me:8052: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8053 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8054 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8055 cat >>confdefs.h <<EOF
8056 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8062 cat >>confdefs.h <<\EOF
8066 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8068 cat >>confdefs.h <<EOF
8069 #define $cf_nculib_ROOT 1
8072 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
8076 cf_ncuhdr_root=ncursesw
8078 test -n "$cf_cv_curses_dir" && \
8079 test "$cf_cv_curses_dir" != "no" && { \
8081 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8082 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8084 while test "$cf_add_incdir" != /usr/include
8086 if test -d "$cf_add_incdir"
8089 if test -n "$CFLAGS$CPPFLAGS" ; then
8090 # a loop is needed to ensure we can add subdirs of existing dirs
8091 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8092 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8093 cf_have_incdir=yes; break
8098 if test "$cf_have_incdir" = no ; then
8099 if test "$cf_add_incdir" = /usr/local/include ; then
8100 if test "$GCC" = yes
8102 cf_save_CPPFLAGS=$CPPFLAGS
8104 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8105 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8107 cat >"conftest.$ac_ext" <<_ACEOF
8108 #line 8108 "configure"
8109 #include "confdefs.h"
8119 rm -f "conftest.$ac_objext"
8120 if { (eval echo "$as_me:8120: \"$ac_compile\"") >&5
8121 (eval $ac_compile) 2>&5
8123 echo "$as_me:8123: \$? = $ac_status" >&5
8124 (exit "$ac_status"); } &&
8125 { ac_try='test -s "conftest.$ac_objext"'
8126 { (eval echo "$as_me:8126: \"$ac_try\"") >&5
8129 echo "$as_me:8129: \$? = $ac_status" >&5
8130 (exit "$ac_status"); }; }; then
8133 echo "$as_me: failed program was:" >&5
8134 cat "conftest.$ac_ext" >&5
8137 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8138 CPPFLAGS=$cf_save_CPPFLAGS
8143 if test "$cf_have_incdir" = no ; then
8144 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8146 echo "${as_me:-configure}:8146: testing adding $cf_add_incdir to include-path ..." 1>&5
8148 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8150 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8151 test "$cf_top_incdir" = "$cf_add_incdir" && break
8152 cf_add_incdir="$cf_top_incdir"
8165 echo "$as_me:8165: checking for $cf_ncuhdr_root header in include-path" >&5
8166 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8167 if test "${cf_cv_ncurses_h+set}" = set; then
8168 echo $ECHO_N "(cached) $ECHO_C" >&6
8171 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8172 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
8173 for cf_header in $cf_header_list
8176 cat >"conftest.$ac_ext" <<_ACEOF
8177 #line 8177 "configure"
8178 #include "confdefs.h"
8180 #define _XOPEN_SOURCE_EXTENDED
8181 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
8182 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
8184 #include <$cf_header>
8189 #ifdef NCURSES_VERSION
8195 printf("%s\\n", NCURSES_VERSION);
8208 rm -f "conftest.$ac_objext"
8209 if { (eval echo "$as_me:8209: \"$ac_compile\"") >&5
8210 (eval $ac_compile) 2>&5
8212 echo "$as_me:8212: \$? = $ac_status" >&5
8213 (exit "$ac_status"); } &&
8214 { ac_try='test -s "conftest.$ac_objext"'
8215 { (eval echo "$as_me:8215: \"$ac_try\"") >&5
8218 echo "$as_me:8218: \$? = $ac_status" >&5
8219 (exit "$ac_status"); }; }; then
8220 cf_cv_ncurses_h=$cf_header
8223 echo "$as_me: failed program was:" >&5
8224 cat "conftest.$ac_ext" >&5
8227 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8229 test "$cf_cv_ncurses_h" != no && break
8233 echo "$as_me:8233: result: $cf_cv_ncurses_h" >&5
8234 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8236 if test "$cf_cv_ncurses_h" != no ; then
8237 cf_cv_ncurses_header=$cf_cv_ncurses_h
8240 echo "$as_me:8240: checking for $cf_ncuhdr_root include-path" >&5
8241 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8242 if test "${cf_cv_ncurses_h2+set}" = set; then
8243 echo $ECHO_N "(cached) $ECHO_C" >&6
8246 test -n "$verbose" && echo
8250 # collect the current set of include-directories from compiler flags
8251 cf_header_path_list=""
8252 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8253 for cf_header_path in $CPPFLAGS $CFLAGS
8255 case "$cf_header_path" in
8257 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8259 test "x$cf_header_path" != "xNONE" && \
8260 test -d "$cf_header_path" && \
8262 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8263 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8264 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8265 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8266 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8267 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"
8270 cf_header_path_list="$cf_header_path_list $cf_search"
8276 # add the variations for the package we are looking for
8280 test "x$prefix" != "xNONE" && \
8281 test -d "$prefix" && \
8283 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8284 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8285 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8286 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8287 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8288 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8291 for cf_subdir_prefix in \
8300 test "x$cf_subdir_prefix" != "x$prefix" && \
8301 test -d "$cf_subdir_prefix" && \
8302 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8303 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8304 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8305 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8306 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8307 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8308 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"
8313 test "$includedir" != NONE && \
8314 test "$includedir" != "/usr/include" && \
8315 test -d "$includedir" && {
8316 test -d "$includedir" && cf_search="$cf_search $includedir"
8317 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8320 test "$oldincludedir" != NONE && \
8321 test "$oldincludedir" != "/usr/include" && \
8322 test -d "$oldincludedir" && {
8323 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8324 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8327 cf_search="$cf_search $cf_header_path_list"
8329 test -n "$verbose" && echo "search path $cf_search"
8330 cf_save2_CPPFLAGS="$CPPFLAGS"
8331 for cf_incdir in $cf_search
8334 if test -n "$cf_incdir" ; then
8335 for cf_add_incdir in $cf_incdir
8337 while test "$cf_add_incdir" != /usr/include
8339 if test -d "$cf_add_incdir"
8342 if test -n "$CFLAGS$CPPFLAGS" ; then
8343 # a loop is needed to ensure we can add subdirs of existing dirs
8344 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8345 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8346 cf_have_incdir=yes; break
8351 if test "$cf_have_incdir" = no ; then
8352 if test "$cf_add_incdir" = /usr/local/include ; then
8353 if test "$GCC" = yes
8355 cf_save_CPPFLAGS=$CPPFLAGS
8357 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8358 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8360 cat >"conftest.$ac_ext" <<_ACEOF
8361 #line 8361 "configure"
8362 #include "confdefs.h"
8372 rm -f "conftest.$ac_objext"
8373 if { (eval echo "$as_me:8373: \"$ac_compile\"") >&5
8374 (eval $ac_compile) 2>&5
8376 echo "$as_me:8376: \$? = $ac_status" >&5
8377 (exit "$ac_status"); } &&
8378 { ac_try='test -s "conftest.$ac_objext"'
8379 { (eval echo "$as_me:8379: \"$ac_try\"") >&5
8382 echo "$as_me:8382: \$? = $ac_status" >&5
8383 (exit "$ac_status"); }; }; then
8386 echo "$as_me: failed program was:" >&5
8387 cat "conftest.$ac_ext" >&5
8390 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8391 CPPFLAGS=$cf_save_CPPFLAGS
8396 if test "$cf_have_incdir" = no ; then
8397 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8399 echo "${as_me:-configure}:8399: testing adding $cf_add_incdir to include-path ..." 1>&5
8401 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8403 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8404 test "$cf_top_incdir" = "$cf_add_incdir" && break
8405 cf_add_incdir="$cf_top_incdir"
8421 cat >"conftest.$ac_ext" <<_ACEOF
8422 #line 8422 "configure"
8423 #include "confdefs.h"
8425 #include <$cf_header>
8430 #ifdef NCURSES_VERSION
8432 printf("%s\\n", NCURSES_VERSION);
8445 rm -f "conftest.$ac_objext"
8446 if { (eval echo "$as_me:8446: \"$ac_compile\"") >&5
8447 (eval $ac_compile) 2>&5
8449 echo "$as_me:8449: \$? = $ac_status" >&5
8450 (exit "$ac_status"); } &&
8451 { ac_try='test -s "conftest.$ac_objext"'
8452 { (eval echo "$as_me:8452: \"$ac_try\"") >&5
8455 echo "$as_me:8455: \$? = $ac_status" >&5
8456 (exit "$ac_status"); }; }; then
8457 cf_cv_ncurses_h2=$cf_header
8460 echo "$as_me: failed program was:" >&5
8461 cat "conftest.$ac_ext" >&5
8464 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8466 if test "$cf_cv_ncurses_h2" != no ; then
8467 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8468 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
8471 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8473 CPPFLAGS="$cf_save2_CPPFLAGS"
8474 test "$cf_cv_ncurses_h2" != no && break
8476 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8476: error: not found" >&5
8477 echo "$as_me: error: not found" >&2;}
8478 { (exit 1); exit 1; }; }
8481 echo "$as_me:8481: result: $cf_cv_ncurses_h2" >&5
8482 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8484 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
8485 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
8486 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
8487 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
8490 if test -n "$cf_1st_incdir" ; then
8491 for cf_add_incdir in $cf_1st_incdir
8493 while test "$cf_add_incdir" != /usr/include
8495 if test -d "$cf_add_incdir"
8498 if test -n "$CFLAGS$CPPFLAGS" ; then
8499 # a loop is needed to ensure we can add subdirs of existing dirs
8500 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8501 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8502 cf_have_incdir=yes; break
8507 if test "$cf_have_incdir" = no ; then
8508 if test "$cf_add_incdir" = /usr/local/include ; then
8509 if test "$GCC" = yes
8511 cf_save_CPPFLAGS=$CPPFLAGS
8513 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8514 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8516 cat >"conftest.$ac_ext" <<_ACEOF
8517 #line 8517 "configure"
8518 #include "confdefs.h"
8528 rm -f "conftest.$ac_objext"
8529 if { (eval echo "$as_me:8529: \"$ac_compile\"") >&5
8530 (eval $ac_compile) 2>&5
8532 echo "$as_me:8532: \$? = $ac_status" >&5
8533 (exit "$ac_status"); } &&
8534 { ac_try='test -s "conftest.$ac_objext"'
8535 { (eval echo "$as_me:8535: \"$ac_try\"") >&5
8538 echo "$as_me:8538: \$? = $ac_status" >&5
8539 (exit "$ac_status"); }; }; then
8542 echo "$as_me: failed program was:" >&5
8543 cat "conftest.$ac_ext" >&5
8546 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8547 CPPFLAGS=$cf_save_CPPFLAGS
8552 if test "$cf_have_incdir" = no ; then
8553 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8555 echo "${as_me:-configure}:8555: testing adding $cf_add_incdir to include-path ..." 1>&5
8557 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8559 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8560 test "$cf_top_incdir" = "$cf_add_incdir" && break
8561 cf_add_incdir="$cf_top_incdir"
8574 # Set definitions to allow ifdef'ing for ncurses.h
8576 case "$cf_cv_ncurses_header" in
8579 cat >>confdefs.h <<\EOF
8580 #define HAVE_NCURSES_H 1
8586 case "$cf_cv_ncurses_header" in
8587 (ncurses/curses.h|ncurses/ncurses.h)
8589 cat >>confdefs.h <<\EOF
8590 #define HAVE_NCURSES_NCURSES_H 1
8594 (ncursesw/curses.h|ncursesw/ncurses.h)
8596 cat >>confdefs.h <<\EOF
8597 #define HAVE_NCURSESW_NCURSES_H 1
8603 echo "$as_me:8603: checking for terminfo header" >&5
8604 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8605 if test "${cf_cv_term_header+set}" = set; then
8606 echo $ECHO_N "(cached) $ECHO_C" >&6
8609 case "${cf_cv_ncurses_header}" in
8610 (*/ncurses.h|*/ncursesw.h)
8611 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8614 cf_term_header=term.h
8618 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8620 cat >"conftest.$ac_ext" <<_ACEOF
8621 #line 8621 "configure"
8622 #include "confdefs.h"
8624 #include <${cf_cv_ncurses_header:-curses.h}>
8630 int x = auto_left_margin; (void)x
8635 rm -f "conftest.$ac_objext"
8636 if { (eval echo "$as_me:8636: \"$ac_compile\"") >&5
8637 (eval $ac_compile) 2>&5
8639 echo "$as_me:8639: \$? = $ac_status" >&5
8640 (exit "$ac_status"); } &&
8641 { ac_try='test -s "conftest.$ac_objext"'
8642 { (eval echo "$as_me:8642: \"$ac_try\"") >&5
8645 echo "$as_me:8645: \$? = $ac_status" >&5
8646 (exit "$ac_status"); }; }; then
8648 cf_cv_term_header="$cf_test"
8650 echo "$as_me: failed program was:" >&5
8651 cat "conftest.$ac_ext" >&5
8653 cf_cv_term_header=unknown
8656 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8657 test "$cf_cv_term_header" != unknown && break
8661 echo "$as_me:8661: result: $cf_cv_term_header" >&5
8662 echo "${ECHO_T}$cf_cv_term_header" >&6
8664 # Set definitions to allow ifdef'ing to accommodate subdirectories
8666 case "$cf_cv_term_header" in
8669 cat >>confdefs.h <<\EOF
8670 #define HAVE_TERM_H 1
8676 case "$cf_cv_term_header" in
8679 cat >>confdefs.h <<\EOF
8680 #define HAVE_NCURSES_TERM_H 1
8686 cat >>confdefs.h <<\EOF
8687 #define HAVE_NCURSESW_TERM_H 1
8693 # some applications need this, but should check for NCURSES_VERSION
8695 cat >>confdefs.h <<\EOF
8699 echo "$as_me:8699: checking for ncurses version" >&5
8700 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8701 if test "${cf_cv_ncurses_version+set}" = set; then
8702 echo $ECHO_N "(cached) $ECHO_C" >&6
8705 cf_cv_ncurses_version=no
8707 rm -f "$cf_tempfile"
8708 if test "$cross_compiling" = yes; then
8710 # This will not work if the preprocessor splits the line after the
8711 # Autoconf token. The 'unproto' program does that.
8712 cat > "conftest.$ac_ext" <<EOF
8713 #include <${cf_cv_ncurses_header:-curses.h}>
8715 #ifdef NCURSES_VERSION
8716 Autoconf NCURSES_VERSION
8724 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8725 { (eval echo "$as_me:8725: \"$cf_try\"") >&5
8728 echo "$as_me:8728: \$? = $ac_status" >&5
8729 (exit "$ac_status"); }
8730 if test -f conftest.out ; then
8731 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
8732 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8737 cat >"conftest.$ac_ext" <<_ACEOF
8738 #line 8738 "configure"
8739 #include "confdefs.h"
8741 #include <${cf_cv_ncurses_header:-curses.h}>
8745 FILE *fp = fopen("$cf_tempfile", "w");
8746 #ifdef NCURSES_VERSION
8747 # ifdef NCURSES_VERSION_PATCH
8748 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8750 fprintf(fp, "%s\\n", NCURSES_VERSION);
8754 fprintf(fp, "old\\n");
8759 ${cf_cv_main_return:-return}(0);
8762 rm -f "conftest$ac_exeext"
8763 if { (eval echo "$as_me:8763: \"$ac_link\"") >&5
8764 (eval $ac_link) 2>&5
8766 echo "$as_me:8766: \$? = $ac_status" >&5
8767 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8768 { (eval echo "$as_me:8768: \"$ac_try\"") >&5
8771 echo "$as_me:8771: \$? = $ac_status" >&5
8772 (exit "$ac_status"); }; }; then
8774 cf_cv_ncurses_version=`cat $cf_tempfile`
8776 echo "$as_me: program exited with status $ac_status" >&5
8777 echo "$as_me: failed program was:" >&5
8778 cat "conftest.$ac_ext" >&5
8780 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8782 rm -f "$cf_tempfile"
8785 echo "$as_me:8785: result: $cf_cv_ncurses_version" >&5
8786 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8787 test "$cf_cv_ncurses_version" = no ||
8788 cat >>confdefs.h <<\EOF
8792 cf_nculib_root=ncursesw
8793 # This works, except for the special case where we find gpm, but
8794 # ncurses is in a nonstandard location via $LIBS, and we really want
8797 cf_ncurses_SAVE="$LIBS"
8798 echo "$as_me:8798: checking for Gpm_Open in -lgpm" >&5
8799 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8800 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8801 echo $ECHO_N "(cached) $ECHO_C" >&6
8803 ac_check_lib_save_LIBS=$LIBS
8805 cat >"conftest.$ac_ext" <<_ACEOF
8806 #line 8806 "configure"
8807 #include "confdefs.h"
8809 /* Override any gcc2 internal prototype to avoid an error. */
8813 /* We use char because int might match the return type of a gcc2
8814 builtin and then its argument prototype would still apply. */
8824 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8825 if { (eval echo "$as_me:8825: \"$ac_link\"") >&5
8826 (eval $ac_link) 2>&5
8828 echo "$as_me:8828: \$? = $ac_status" >&5
8829 (exit "$ac_status"); } &&
8830 { ac_try='test -s "conftest$ac_exeext"'
8831 { (eval echo "$as_me:8831: \"$ac_try\"") >&5
8834 echo "$as_me:8834: \$? = $ac_status" >&5
8835 (exit "$ac_status"); }; }; then
8836 ac_cv_lib_gpm_Gpm_Open=yes
8838 echo "$as_me: failed program was:" >&5
8839 cat "conftest.$ac_ext" >&5
8840 ac_cv_lib_gpm_Gpm_Open=no
8842 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8843 LIBS=$ac_check_lib_save_LIBS
8845 echo "$as_me:8845: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8846 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8847 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
8848 echo "$as_me:8848: checking for initscr in -lgpm" >&5
8849 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8850 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8851 echo $ECHO_N "(cached) $ECHO_C" >&6
8853 ac_check_lib_save_LIBS=$LIBS
8855 cat >"conftest.$ac_ext" <<_ACEOF
8856 #line 8856 "configure"
8857 #include "confdefs.h"
8859 /* Override any gcc2 internal prototype to avoid an error. */
8863 /* We use char because int might match the return type of a gcc2
8864 builtin and then its argument prototype would still apply. */
8874 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8875 if { (eval echo "$as_me:8875: \"$ac_link\"") >&5
8876 (eval $ac_link) 2>&5
8878 echo "$as_me:8878: \$? = $ac_status" >&5
8879 (exit "$ac_status"); } &&
8880 { ac_try='test -s "conftest$ac_exeext"'
8881 { (eval echo "$as_me:8881: \"$ac_try\"") >&5
8884 echo "$as_me:8884: \$? = $ac_status" >&5
8885 (exit "$ac_status"); }; }; then
8886 ac_cv_lib_gpm_initscr=yes
8888 echo "$as_me: failed program was:" >&5
8889 cat "conftest.$ac_ext" >&5
8890 ac_cv_lib_gpm_initscr=no
8892 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8893 LIBS=$ac_check_lib_save_LIBS
8895 echo "$as_me:8895: result: $ac_cv_lib_gpm_initscr" >&5
8896 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8897 if test "$ac_cv_lib_gpm_initscr" = yes; then
8898 LIBS="$cf_ncurses_SAVE"
8900 cf_ncurses_LIBS="-lgpm"
8907 # This is only necessary if you are linking against an obsolete
8908 # version of ncurses (but it should do no harm, since it is static).
8909 if test "$cf_nculib_root" = ncurses ; then
8910 echo "$as_me:8910: checking for tgoto in -lmytinfo" >&5
8911 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8912 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8913 echo $ECHO_N "(cached) $ECHO_C" >&6
8915 ac_check_lib_save_LIBS=$LIBS
8916 LIBS="-lmytinfo $LIBS"
8917 cat >"conftest.$ac_ext" <<_ACEOF
8918 #line 8918 "configure"
8919 #include "confdefs.h"
8921 /* Override any gcc2 internal prototype to avoid an error. */
8925 /* We use char because int might match the return type of a gcc2
8926 builtin and then its argument prototype would still apply. */
8936 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8937 if { (eval echo "$as_me:8937: \"$ac_link\"") >&5
8938 (eval $ac_link) 2>&5
8940 echo "$as_me:8940: \$? = $ac_status" >&5
8941 (exit "$ac_status"); } &&
8942 { ac_try='test -s "conftest$ac_exeext"'
8943 { (eval echo "$as_me:8943: \"$ac_try\"") >&5
8946 echo "$as_me:8946: \$? = $ac_status" >&5
8947 (exit "$ac_status"); }; }; then
8948 ac_cv_lib_mytinfo_tgoto=yes
8950 echo "$as_me: failed program was:" >&5
8951 cat "conftest.$ac_ext" >&5
8952 ac_cv_lib_mytinfo_tgoto=no
8954 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8955 LIBS=$ac_check_lib_save_LIBS
8957 echo "$as_me:8957: result: $ac_cv_lib_mytinfo_tgoto" >&5
8958 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8959 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
8960 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8970 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8972 for cf_add_1lib in $cf_add_0lib; do
8973 for cf_add_2lib in $cf_add_libs; do
8974 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8979 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8983 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
8989 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8991 for cf_add_1lib in $cf_add_0lib; do
8992 for cf_add_2lib in $cf_add_libs; do
8993 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8998 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9004 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
9006 echo "$as_me:9006: checking for initscr" >&5
9007 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9008 if test "${ac_cv_func_initscr+set}" = set; then
9009 echo $ECHO_N "(cached) $ECHO_C" >&6
9011 cat >"conftest.$ac_ext" <<_ACEOF
9012 #line 9012 "configure"
9013 #include "confdefs.h"
9014 #define initscr autoconf_temporary
9015 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9022 /* We use char because int might match the return type of a gcc2
9023 builtin and then its argument prototype would still apply. */
9024 char initscr (void);
9030 /* The GNU C library defines stubs for functions which it implements
9031 to always fail with ENOSYS. Some functions are actually named
9032 something starting with __ and the normal name is an alias. */
9033 #if defined (__stub_initscr) || defined (__stub___initscr)
9034 #error found stub for initscr
9042 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9043 if { (eval echo "$as_me:9043: \"$ac_link\"") >&5
9044 (eval $ac_link) 2>&5
9046 echo "$as_me:9046: \$? = $ac_status" >&5
9047 (exit "$ac_status"); } &&
9048 { ac_try='test -s "conftest$ac_exeext"'
9049 { (eval echo "$as_me:9049: \"$ac_try\"") >&5
9052 echo "$as_me:9052: \$? = $ac_status" >&5
9053 (exit "$ac_status"); }; }; then
9054 ac_cv_func_initscr=yes
9056 echo "$as_me: failed program was:" >&5
9057 cat "conftest.$ac_ext" >&5
9058 ac_cv_func_initscr=no
9060 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9062 echo "$as_me:9062: result: $ac_cv_func_initscr" >&5
9063 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9064 if test "$ac_cv_func_initscr" = yes; then
9065 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9068 cf_save_LIBS="$LIBS"
9069 echo "$as_me:9069: checking for initscr in -l$cf_nculib_root" >&5
9070 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9071 LIBS="-l$cf_nculib_root $LIBS"
9072 cat >"conftest.$ac_ext" <<_ACEOF
9073 #line 9073 "configure"
9074 #include "confdefs.h"
9075 #include <${cf_cv_ncurses_header:-curses.h}>
9084 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9085 if { (eval echo "$as_me:9085: \"$ac_link\"") >&5
9086 (eval $ac_link) 2>&5
9088 echo "$as_me:9088: \$? = $ac_status" >&5
9089 (exit "$ac_status"); } &&
9090 { ac_try='test -s "conftest$ac_exeext"'
9091 { (eval echo "$as_me:9091: \"$ac_try\"") >&5
9094 echo "$as_me:9094: \$? = $ac_status" >&5
9095 (exit "$ac_status"); }; }; then
9096 echo "$as_me:9096: result: yes" >&5
9097 echo "${ECHO_T}yes" >&6
9098 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9101 echo "$as_me: failed program was:" >&5
9102 cat "conftest.$ac_ext" >&5
9103 echo "$as_me:9103: result: no" >&5
9104 echo "${ECHO_T}no" >&6
9107 cf_library_path_list=""
9108 if test -n "${LDFLAGS}${LIBS}" ; then
9109 for cf_library_path in $LDFLAGS $LIBS
9111 case "$cf_library_path" in
9113 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9115 test "x$cf_library_path" != "xNONE" && \
9116 test -d "$cf_library_path" && \
9118 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9119 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
9120 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9121 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9122 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9123 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"
9126 cf_library_path_list="$cf_library_path_list $cf_search"
9134 test "x$prefix" != "xNONE" && \
9135 test -d "$prefix" && \
9137 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9138 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
9139 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9140 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9141 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9142 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9145 for cf_subdir_prefix in \
9154 test "x$cf_subdir_prefix" != "x$prefix" && \
9155 test -d "$cf_subdir_prefix" && \
9156 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9157 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9158 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
9159 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9160 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9161 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9162 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"
9167 cf_search="$cf_library_path_list $cf_search"
9169 for cf_libdir in $cf_search
9171 echo "$as_me:9171: checking for -l$cf_nculib_root in $cf_libdir" >&5
9172 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9173 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9174 cat >"conftest.$ac_ext" <<_ACEOF
9175 #line 9175 "configure"
9176 #include "confdefs.h"
9177 #include <${cf_cv_ncurses_header:-curses.h}>
9186 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9187 if { (eval echo "$as_me:9187: \"$ac_link\"") >&5
9188 (eval $ac_link) 2>&5
9190 echo "$as_me:9190: \$? = $ac_status" >&5
9191 (exit "$ac_status"); } &&
9192 { ac_try='test -s "conftest$ac_exeext"'
9193 { (eval echo "$as_me:9193: \"$ac_try\"") >&5
9196 echo "$as_me:9196: \$? = $ac_status" >&5
9197 (exit "$ac_status"); }; }; then
9198 echo "$as_me:9198: result: yes" >&5
9199 echo "${ECHO_T}yes" >&6
9200 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9203 echo "$as_me: failed program was:" >&5
9204 cat "conftest.$ac_ext" >&5
9205 echo "$as_me:9205: result: no" >&5
9206 echo "${ECHO_T}no" >&6
9207 LIBS="$cf_save_LIBS"
9209 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9213 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9217 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
9219 if test "$cf_found_library" = no ; then
9220 { { echo "$as_me:9220: error: Cannot link $cf_nculib_root library" >&5
9221 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9222 { (exit 1); exit 1; }; }
9227 if test -n "$cf_ncurses_LIBS" ; then
9228 echo "$as_me:9228: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9229 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9230 cf_ncurses_SAVE="$LIBS"
9231 for p in $cf_ncurses_LIBS ; do
9232 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
9233 if test "$q" != "$LIBS" ; then
9237 cat >"conftest.$ac_ext" <<_ACEOF
9238 #line 9238 "configure"
9239 #include "confdefs.h"
9240 #include <${cf_cv_ncurses_header:-curses.h}>
9244 initscr(); mousemask(0,0); tigetstr((char *)0);
9249 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9250 if { (eval echo "$as_me:9250: \"$ac_link\"") >&5
9251 (eval $ac_link) 2>&5
9253 echo "$as_me:9253: \$? = $ac_status" >&5
9254 (exit "$ac_status"); } &&
9255 { ac_try='test -s "conftest$ac_exeext"'
9256 { (eval echo "$as_me:9256: \"$ac_try\"") >&5
9259 echo "$as_me:9259: \$? = $ac_status" >&5
9260 (exit "$ac_status"); }; }; then
9261 echo "$as_me:9261: result: yes" >&5
9262 echo "${ECHO_T}yes" >&6
9264 echo "$as_me: failed program was:" >&5
9265 cat "conftest.$ac_ext" >&5
9266 echo "$as_me:9266: result: no" >&5
9267 echo "${ECHO_T}no" >&6
9268 LIBS="$cf_ncurses_SAVE"
9270 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9273 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9275 cat >>confdefs.h <<EOF
9276 #define $cf_nculib_ROOT 1
9286 cf_ncuconfig_root=ncurses
9287 cf_have_ncuconfig=no
9289 if test "x${PKG_CONFIG:=none}" != xnone; then
9290 echo "$as_me:9290: checking pkg-config for $cf_ncuconfig_root" >&5
9291 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9292 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9293 echo "$as_me:9293: result: yes" >&5
9294 echo "${ECHO_T}yes" >&6
9296 echo "$as_me:9296: checking if the $cf_ncuconfig_root package files work" >&5
9297 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9298 cf_have_ncuconfig=unknown
9300 cf_save_CFLAGS="$CFLAGS"
9301 cf_save_CPPFLAGS="$CPPFLAGS"
9302 cf_save_LIBS="$LIBS"
9304 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
9305 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9307 # while -W for passing linker flags is prevalent, it is not "standard".
9308 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9309 # incompatible _and_ non-standard -W option which gives an error. Work
9310 # around that pitfall.
9311 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9317 cf_new_extra_cppflags=
9319 for cf_add_cflags in $cf_pkg_cflags
9321 case "$cf_fix_cppflags" in
9323 case "$cf_add_cflags" in
9324 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9325 case "$cf_add_cflags" in
9327 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9329 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9330 && test -z "${cf_tst_cflags}" \
9331 && cf_fix_cppflags=yes
9333 if test "$cf_fix_cppflags" = yes ; then
9335 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9336 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9339 elif test "${cf_tst_cflags}" = "\"'" ; then
9341 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9342 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9352 case "$cf_add_cflags" in
9354 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9356 CPPFLAGS=`echo "$CPPFLAGS" | \
9357 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9358 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9363 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9364 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9371 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9372 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9379 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9380 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9382 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9384 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9385 && test -z "${cf_tst_cflags}" \
9386 && cf_fix_cppflags=no
9391 if test -n "$cf_new_cflags" ; then
9393 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9394 CFLAGS="${CFLAGS}$cf_new_cflags"
9398 if test -n "$cf_new_cppflags" ; then
9400 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9401 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9405 if test -n "$cf_new_extra_cppflags" ; then
9407 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9408 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9415 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9417 for cf_add_1lib in $cf_add_0lib; do
9418 for cf_add_2lib in $cf_add_libs; do
9419 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9424 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9428 cat >"conftest.$ac_ext" <<_ACEOF
9429 #line 9429 "configure"
9430 #include "confdefs.h"
9431 #include <${cf_cv_ncurses_header:-curses.h}>
9435 initscr(); mousemask(0,0); tigetstr((char *)0);
9440 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9441 if { (eval echo "$as_me:9441: \"$ac_link\"") >&5
9442 (eval $ac_link) 2>&5
9444 echo "$as_me:9444: \$? = $ac_status" >&5
9445 (exit "$ac_status"); } &&
9446 { ac_try='test -s "conftest$ac_exeext"'
9447 { (eval echo "$as_me:9447: \"$ac_try\"") >&5
9450 echo "$as_me:9450: \$? = $ac_status" >&5
9451 (exit "$ac_status"); }; }; then
9452 if test "$cross_compiling" = yes; then
9453 cf_test_ncuconfig=maybe
9455 cat >"conftest.$ac_ext" <<_ACEOF
9456 #line 9456 "configure"
9457 #include "confdefs.h"
9458 #include <${cf_cv_ncurses_header:-curses.h}>
9460 { const char *xx = curses_version(); return (xx == 0); }
9462 rm -f "conftest$ac_exeext"
9463 if { (eval echo "$as_me:9463: \"$ac_link\"") >&5
9464 (eval $ac_link) 2>&5
9466 echo "$as_me:9466: \$? = $ac_status" >&5
9467 (exit "$ac_status"); } && { ac_try='"./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 cf_test_ncuconfig=yes
9475 echo "$as_me: program exited with status $ac_status" >&5
9476 echo "$as_me: failed program was:" >&5
9477 cat "conftest.$ac_ext" >&5
9478 cf_test_ncuconfig=no
9480 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9483 echo "$as_me: failed program was:" >&5
9484 cat "conftest.$ac_ext" >&5
9485 cf_test_ncuconfig=no
9487 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9489 CFLAGS="$cf_save_CFLAGS"
9490 CPPFLAGS="$cf_save_CPPFLAGS"
9491 LIBS="$cf_save_LIBS"
9493 if test "x$cf_test_ncuconfig" != xyes; then
9494 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9495 cf_pkg_cflags="$cf_temp"
9496 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9497 cf_pkg_libs="$cf_temp"
9502 for cf_add_cflags in $cf_pkg_cflags
9504 case "x$cf_add_cflags" in
9507 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9510 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'`
9511 test "$CFLAGS" != "$cf_old_cflag" || break
9513 CFLAGS="$cf_old_cflag"
9516 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9519 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'`
9520 test "$CPPFLAGS" != "$cf_old_cflag" || break
9522 CPPFLAGS="$cf_old_cflag"
9531 cf_new_extra_cppflags=
9533 for cf_add_cflags in $cf_add_cflags
9535 case "$cf_fix_cppflags" in
9537 case "$cf_add_cflags" in
9538 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9539 case "$cf_add_cflags" in
9541 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9543 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9544 && test -z "${cf_tst_cflags}" \
9545 && cf_fix_cppflags=yes
9547 if test "$cf_fix_cppflags" = yes ; then
9549 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9550 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9553 elif test "${cf_tst_cflags}" = "\"'" ; then
9555 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9556 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9566 case "$cf_add_cflags" in
9568 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9570 CPPFLAGS=`echo "$CPPFLAGS" | \
9571 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9572 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9577 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9578 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9585 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9586 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9593 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9594 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9596 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9598 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9599 && test -z "${cf_tst_cflags}" \
9600 && cf_fix_cppflags=no
9605 if test -n "$cf_new_cflags" ; then
9607 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9608 CFLAGS="${CFLAGS}$cf_new_cflags"
9612 if test -n "$cf_new_cppflags" ; then
9614 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9615 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9619 if test -n "$cf_new_extra_cppflags" ; then
9621 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9622 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9631 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9633 for cf_add_1lib in $cf_add_0lib; do
9634 for cf_add_2lib in $cf_add_libs; do
9635 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9640 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9644 cat >"conftest.$ac_ext" <<_ACEOF
9645 #line 9645 "configure"
9646 #include "confdefs.h"
9647 #include <${cf_cv_ncurses_header:-curses.h}>
9651 initscr(); mousemask(0,0); tigetstr((char *)0);
9656 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9657 if { (eval echo "$as_me:9657: \"$ac_link\"") >&5
9658 (eval $ac_link) 2>&5
9660 echo "$as_me:9660: \$? = $ac_status" >&5
9661 (exit "$ac_status"); } &&
9662 { ac_try='test -s "conftest$ac_exeext"'
9663 { (eval echo "$as_me:9663: \"$ac_try\"") >&5
9666 echo "$as_me:9666: \$? = $ac_status" >&5
9667 (exit "$ac_status"); }; }; then
9668 if test "$cross_compiling" = yes; then
9669 cf_have_ncuconfig=maybe
9671 cat >"conftest.$ac_ext" <<_ACEOF
9672 #line 9672 "configure"
9673 #include "confdefs.h"
9674 #include <${cf_cv_ncurses_header:-curses.h}>
9676 { const char *xx = curses_version(); return (xx == 0); }
9678 rm -f "conftest$ac_exeext"
9679 if { (eval echo "$as_me:9679: \"$ac_link\"") >&5
9680 (eval $ac_link) 2>&5
9682 echo "$as_me:9682: \$? = $ac_status" >&5
9683 (exit "$ac_status"); } && { ac_try='"./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 cf_have_ncuconfig=yes
9691 echo "$as_me: program exited with status $ac_status" >&5
9692 echo "$as_me: failed program was:" >&5
9693 cat "conftest.$ac_ext" >&5
9694 cf_have_ncuconfig=no
9696 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9699 echo "$as_me: failed program was:" >&5
9700 cat "conftest.$ac_ext" >&5
9701 cf_have_ncuconfig=no
9703 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9704 echo "$as_me:9704: result: $cf_have_ncuconfig" >&5
9705 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9706 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9707 if test "$cf_have_ncuconfig" != "yes"
9709 CPPFLAGS="$cf_save_CPPFLAGS"
9710 LIBS="$cf_save_LIBS"
9711 NCURSES_CONFIG_PKG=none
9714 cat >>confdefs.h <<\EOF
9718 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9720 echo "$as_me:9720: checking for terminfo header" >&5
9721 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9722 if test "${cf_cv_term_header+set}" = set; then
9723 echo $ECHO_N "(cached) $ECHO_C" >&6
9726 case "${cf_cv_ncurses_header}" in
9727 (*/ncurses.h|*/ncursesw.h)
9728 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9731 cf_term_header=term.h
9735 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9737 cat >"conftest.$ac_ext" <<_ACEOF
9738 #line 9738 "configure"
9739 #include "confdefs.h"
9741 #include <${cf_cv_ncurses_header:-curses.h}>
9747 int x = auto_left_margin; (void)x
9752 rm -f "conftest.$ac_objext"
9753 if { (eval echo "$as_me:9753: \"$ac_compile\"") >&5
9754 (eval $ac_compile) 2>&5
9756 echo "$as_me:9756: \$? = $ac_status" >&5
9757 (exit "$ac_status"); } &&
9758 { ac_try='test -s "conftest.$ac_objext"'
9759 { (eval echo "$as_me:9759: \"$ac_try\"") >&5
9762 echo "$as_me:9762: \$? = $ac_status" >&5
9763 (exit "$ac_status"); }; }; then
9765 cf_cv_term_header="$cf_test"
9767 echo "$as_me: failed program was:" >&5
9768 cat "conftest.$ac_ext" >&5
9770 cf_cv_term_header=unknown
9773 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9774 test "$cf_cv_term_header" != unknown && break
9778 echo "$as_me:9778: result: $cf_cv_term_header" >&5
9779 echo "${ECHO_T}$cf_cv_term_header" >&6
9781 # Set definitions to allow ifdef'ing to accommodate subdirectories
9783 case "$cf_cv_term_header" in
9786 cat >>confdefs.h <<\EOF
9787 #define HAVE_TERM_H 1
9793 case "$cf_cv_term_header" in
9796 cat >>confdefs.h <<\EOF
9797 #define HAVE_NCURSES_TERM_H 1
9803 cat >>confdefs.h <<\EOF
9804 #define HAVE_NCURSESW_TERM_H 1
9813 echo "$as_me:9813: result: no" >&5
9814 echo "${ECHO_T}no" >&6
9815 NCURSES_CONFIG_PKG=none
9818 NCURSES_CONFIG_PKG=none
9821 if test "x$cf_have_ncuconfig" = "xno"; then
9822 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9824 if test -n "$ac_tool_prefix"; then
9825 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9827 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9828 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9829 echo "$as_me:9829: checking for $ac_word" >&5
9830 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9831 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9832 echo $ECHO_N "(cached) $ECHO_C" >&6
9834 if test -n "$NCURSES_CONFIG"; then
9835 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9837 ac_save_IFS=$IFS; IFS=$ac_path_separator
9839 for ac_dir in $ac_dummy; do
9841 test -z "$ac_dir" && ac_dir=.
9842 $as_executable_p "$ac_dir/$ac_word" || continue
9843 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9844 echo "$as_me:9844: found $ac_dir/$ac_word" >&5
9850 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9851 if test -n "$NCURSES_CONFIG"; then
9852 echo "$as_me:9852: result: $NCURSES_CONFIG" >&5
9853 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9855 echo "$as_me:9855: result: no" >&5
9856 echo "${ECHO_T}no" >&6
9859 test -n "$NCURSES_CONFIG" && break
9862 if test -z "$NCURSES_CONFIG"; then
9863 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9864 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9866 # Extract the first word of "$ac_prog", so it can be a program name with args.
9867 set dummy $ac_prog; ac_word=$2
9868 echo "$as_me:9868: checking for $ac_word" >&5
9869 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9870 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9871 echo $ECHO_N "(cached) $ECHO_C" >&6
9873 if test -n "$ac_ct_NCURSES_CONFIG"; then
9874 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9876 ac_save_IFS=$IFS; IFS=$ac_path_separator
9878 for ac_dir in $ac_dummy; do
9880 test -z "$ac_dir" && ac_dir=.
9881 $as_executable_p "$ac_dir/$ac_word" || continue
9882 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9883 echo "$as_me:9883: found $ac_dir/$ac_word" >&5
9889 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9890 if test -n "$ac_ct_NCURSES_CONFIG"; then
9891 echo "$as_me:9891: result: $ac_ct_NCURSES_CONFIG" >&5
9892 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9894 echo "$as_me:9894: result: no" >&5
9895 echo "${ECHO_T}no" >&6
9898 test -n "$ac_ct_NCURSES_CONFIG" && break
9900 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9902 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9905 if test "$NCURSES_CONFIG" != none ; then
9907 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9909 case "x$cf_add_cflags" in
9912 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9915 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'`
9916 test "$CFLAGS" != "$cf_old_cflag" || break
9918 CFLAGS="$cf_old_cflag"
9921 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9924 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'`
9925 test "$CPPFLAGS" != "$cf_old_cflag" || break
9927 CPPFLAGS="$cf_old_cflag"
9936 cf_new_extra_cppflags=
9938 for cf_add_cflags in $cf_add_cflags
9940 case "$cf_fix_cppflags" in
9942 case "$cf_add_cflags" in
9943 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9944 case "$cf_add_cflags" in
9946 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9948 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9949 && test -z "${cf_tst_cflags}" \
9950 && cf_fix_cppflags=yes
9952 if test "$cf_fix_cppflags" = yes ; then
9954 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9955 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9958 elif test "${cf_tst_cflags}" = "\"'" ; then
9960 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9961 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9971 case "$cf_add_cflags" in
9973 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9975 CPPFLAGS=`echo "$CPPFLAGS" | \
9976 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9977 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9982 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9983 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9990 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9991 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9998 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9999 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10001 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10003 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10004 && test -z "${cf_tst_cflags}" \
10005 && cf_fix_cppflags=no
10010 if test -n "$cf_new_cflags" ; then
10012 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10013 CFLAGS="${CFLAGS}$cf_new_cflags"
10017 if test -n "$cf_new_cppflags" ; then
10019 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10020 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10024 if test -n "$cf_new_extra_cppflags" ; then
10026 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10027 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10033 cf_add_libs="$LIBS"
10036 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10037 # filter duplicates
10038 for cf_add_1lib in $cf_add_0lib; do
10039 for cf_add_2lib in $cf_add_libs; do
10040 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10045 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10047 LIBS="$cf_add_libs"
10049 # even with config script, some packages use no-override for curses.h
10051 echo "$as_me:10051: checking if we have identified curses headers" >&5
10052 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10053 if test "${cf_cv_ncurses_header+set}" = set; then
10054 echo $ECHO_N "(cached) $ECHO_C" >&6
10057 cf_cv_ncurses_header=none
10059 ncurses.h ncurses/ncurses.h \
10060 curses.h ncurses/curses.h
10062 cat >"conftest.$ac_ext" <<_ACEOF
10063 #line 10063 "configure"
10064 #include "confdefs.h"
10065 #include <${cf_header}>
10069 initscr(); tgoto("?", 0,0)
10074 rm -f "conftest.$ac_objext"
10075 if { (eval echo "$as_me:10075: \"$ac_compile\"") >&5
10076 (eval $ac_compile) 2>&5
10078 echo "$as_me:10078: \$? = $ac_status" >&5
10079 (exit "$ac_status"); } &&
10080 { ac_try='test -s "conftest.$ac_objext"'
10081 { (eval echo "$as_me:10081: \"$ac_try\"") >&5
10082 (eval $ac_try) 2>&5
10084 echo "$as_me:10084: \$? = $ac_status" >&5
10085 (exit "$ac_status"); }; }; then
10086 cf_cv_ncurses_header=$cf_header; break
10088 echo "$as_me: failed program was:" >&5
10089 cat "conftest.$ac_ext" >&5
10091 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10095 echo "$as_me:10095: result: $cf_cv_ncurses_header" >&5
10096 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10098 if test "$cf_cv_ncurses_header" = none ; then
10099 { { echo "$as_me:10099: error: No curses header-files found" >&5
10100 echo "$as_me: error: No curses header-files found" >&2;}
10101 { (exit 1); exit 1; }; }
10104 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10106 for ac_header in $cf_cv_ncurses_header
10108 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10109 echo "$as_me:10109: checking for $ac_header" >&5
10110 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10111 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10112 echo $ECHO_N "(cached) $ECHO_C" >&6
10114 cat >"conftest.$ac_ext" <<_ACEOF
10115 #line 10115 "configure"
10116 #include "confdefs.h"
10117 #include <$ac_header>
10119 if { (eval echo "$as_me:10119: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10120 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10122 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10124 cat conftest.err >&5
10125 echo "$as_me:10125: \$? = $ac_status" >&5
10126 (exit "$ac_status"); } >/dev/null; then
10127 if test -s conftest.err; then
10128 ac_cpp_err=$ac_c_preproc_warn_flag
10135 if test -z "$ac_cpp_err"; then
10136 eval "$as_ac_Header=yes"
10138 echo "$as_me: failed program was:" >&5
10139 cat "conftest.$ac_ext" >&5
10140 eval "$as_ac_Header=no"
10142 rm -f conftest.err "conftest.$ac_ext"
10144 echo "$as_me:10144: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10145 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10146 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10147 cat >>confdefs.h <<EOF
10148 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10154 cat >>confdefs.h <<\EOF
10158 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10160 cat >>confdefs.h <<EOF
10161 #define $cf_nculib_ROOT 1
10164 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
10168 cf_ncuhdr_root=ncurses
10170 test -n "$cf_cv_curses_dir" && \
10171 test "$cf_cv_curses_dir" != "no" && { \
10173 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
10174 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
10176 while test "$cf_add_incdir" != /usr/include
10178 if test -d "$cf_add_incdir"
10181 if test -n "$CFLAGS$CPPFLAGS" ; then
10182 # a loop is needed to ensure we can add subdirs of existing dirs
10183 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10184 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10185 cf_have_incdir=yes; break
10190 if test "$cf_have_incdir" = no ; then
10191 if test "$cf_add_incdir" = /usr/local/include ; then
10192 if test "$GCC" = yes
10194 cf_save_CPPFLAGS=$CPPFLAGS
10196 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10197 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10199 cat >"conftest.$ac_ext" <<_ACEOF
10200 #line 10200 "configure"
10201 #include "confdefs.h"
10211 rm -f "conftest.$ac_objext"
10212 if { (eval echo "$as_me:10212: \"$ac_compile\"") >&5
10213 (eval $ac_compile) 2>&5
10215 echo "$as_me:10215: \$? = $ac_status" >&5
10216 (exit "$ac_status"); } &&
10217 { ac_try='test -s "conftest.$ac_objext"'
10218 { (eval echo "$as_me:10218: \"$ac_try\"") >&5
10219 (eval $ac_try) 2>&5
10221 echo "$as_me:10221: \$? = $ac_status" >&5
10222 (exit "$ac_status"); }; }; then
10225 echo "$as_me: failed program was:" >&5
10226 cat "conftest.$ac_ext" >&5
10229 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10230 CPPFLAGS=$cf_save_CPPFLAGS
10235 if test "$cf_have_incdir" = no ; then
10236 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10238 echo "${as_me:-configure}:10238: testing adding $cf_add_incdir to include-path ..." 1>&5
10240 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10242 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10243 test "$cf_top_incdir" = "$cf_add_incdir" && break
10244 cf_add_incdir="$cf_top_incdir"
10257 echo "$as_me:10257: checking for $cf_ncuhdr_root header in include-path" >&5
10258 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10259 if test "${cf_cv_ncurses_h+set}" = set; then
10260 echo $ECHO_N "(cached) $ECHO_C" >&6
10263 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10264 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
10265 for cf_header in $cf_header_list
10268 cat >"conftest.$ac_ext" <<_ACEOF
10269 #line 10269 "configure"
10270 #include "confdefs.h"
10272 #include <$cf_header>
10277 #ifdef NCURSES_VERSION
10279 printf("%s\\n", NCURSES_VERSION);
10292 rm -f "conftest.$ac_objext"
10293 if { (eval echo "$as_me:10293: \"$ac_compile\"") >&5
10294 (eval $ac_compile) 2>&5
10296 echo "$as_me:10296: \$? = $ac_status" >&5
10297 (exit "$ac_status"); } &&
10298 { ac_try='test -s "conftest.$ac_objext"'
10299 { (eval echo "$as_me:10299: \"$ac_try\"") >&5
10300 (eval $ac_try) 2>&5
10302 echo "$as_me:10302: \$? = $ac_status" >&5
10303 (exit "$ac_status"); }; }; then
10304 cf_cv_ncurses_h=$cf_header
10307 echo "$as_me: failed program was:" >&5
10308 cat "conftest.$ac_ext" >&5
10311 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10313 test "$cf_cv_ncurses_h" != no && break
10317 echo "$as_me:10317: result: $cf_cv_ncurses_h" >&5
10318 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10320 if test "$cf_cv_ncurses_h" != no ; then
10321 cf_cv_ncurses_header=$cf_cv_ncurses_h
10324 echo "$as_me:10324: checking for $cf_ncuhdr_root include-path" >&5
10325 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10326 if test "${cf_cv_ncurses_h2+set}" = set; then
10327 echo $ECHO_N "(cached) $ECHO_C" >&6
10330 test -n "$verbose" && echo
10334 # collect the current set of include-directories from compiler flags
10335 cf_header_path_list=""
10336 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10337 for cf_header_path in $CPPFLAGS $CFLAGS
10339 case "$cf_header_path" in
10341 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10343 test "x$cf_header_path" != "xNONE" && \
10344 test -d "$cf_header_path" && \
10346 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10347 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
10348 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10349 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10350 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10351 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"
10354 cf_header_path_list="$cf_header_path_list $cf_search"
10360 # add the variations for the package we are looking for
10364 test "x$prefix" != "xNONE" && \
10365 test -d "$prefix" && \
10367 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10368 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
10369 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10370 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10371 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10372 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10375 for cf_subdir_prefix in \
10384 test "x$cf_subdir_prefix" != "x$prefix" && \
10385 test -d "$cf_subdir_prefix" && \
10386 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10387 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10388 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
10389 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10390 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10391 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10392 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"
10397 test "$includedir" != NONE && \
10398 test "$includedir" != "/usr/include" && \
10399 test -d "$includedir" && {
10400 test -d "$includedir" && cf_search="$cf_search $includedir"
10401 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10404 test "$oldincludedir" != NONE && \
10405 test "$oldincludedir" != "/usr/include" && \
10406 test -d "$oldincludedir" && {
10407 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
10408 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10411 cf_search="$cf_search $cf_header_path_list"
10413 test -n "$verbose" && echo "search path $cf_search"
10414 cf_save2_CPPFLAGS="$CPPFLAGS"
10415 for cf_incdir in $cf_search
10418 if test -n "$cf_incdir" ; then
10419 for cf_add_incdir in $cf_incdir
10421 while test "$cf_add_incdir" != /usr/include
10423 if test -d "$cf_add_incdir"
10426 if test -n "$CFLAGS$CPPFLAGS" ; then
10427 # a loop is needed to ensure we can add subdirs of existing dirs
10428 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10429 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10430 cf_have_incdir=yes; break
10435 if test "$cf_have_incdir" = no ; then
10436 if test "$cf_add_incdir" = /usr/local/include ; then
10437 if test "$GCC" = yes
10439 cf_save_CPPFLAGS=$CPPFLAGS
10441 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10442 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10444 cat >"conftest.$ac_ext" <<_ACEOF
10445 #line 10445 "configure"
10446 #include "confdefs.h"
10456 rm -f "conftest.$ac_objext"
10457 if { (eval echo "$as_me:10457: \"$ac_compile\"") >&5
10458 (eval $ac_compile) 2>&5
10460 echo "$as_me:10460: \$? = $ac_status" >&5
10461 (exit "$ac_status"); } &&
10462 { ac_try='test -s "conftest.$ac_objext"'
10463 { (eval echo "$as_me:10463: \"$ac_try\"") >&5
10464 (eval $ac_try) 2>&5
10466 echo "$as_me:10466: \$? = $ac_status" >&5
10467 (exit "$ac_status"); }; }; then
10470 echo "$as_me: failed program was:" >&5
10471 cat "conftest.$ac_ext" >&5
10474 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10475 CPPFLAGS=$cf_save_CPPFLAGS
10480 if test "$cf_have_incdir" = no ; then
10481 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10483 echo "${as_me:-configure}:10483: testing adding $cf_add_incdir to include-path ..." 1>&5
10485 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10487 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10488 test "$cf_top_incdir" = "$cf_add_incdir" && break
10489 cf_add_incdir="$cf_top_incdir"
10505 cat >"conftest.$ac_ext" <<_ACEOF
10506 #line 10506 "configure"
10507 #include "confdefs.h"
10509 #include <$cf_header>
10514 #ifdef NCURSES_VERSION
10516 printf("%s\\n", NCURSES_VERSION);
10529 rm -f "conftest.$ac_objext"
10530 if { (eval echo "$as_me:10530: \"$ac_compile\"") >&5
10531 (eval $ac_compile) 2>&5
10533 echo "$as_me:10533: \$? = $ac_status" >&5
10534 (exit "$ac_status"); } &&
10535 { ac_try='test -s "conftest.$ac_objext"'
10536 { (eval echo "$as_me:10536: \"$ac_try\"") >&5
10537 (eval $ac_try) 2>&5
10539 echo "$as_me:10539: \$? = $ac_status" >&5
10540 (exit "$ac_status"); }; }; then
10541 cf_cv_ncurses_h2=$cf_header
10544 echo "$as_me: failed program was:" >&5
10545 cat "conftest.$ac_ext" >&5
10546 cf_cv_ncurses_h2=no
10548 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10550 if test "$cf_cv_ncurses_h2" != no ; then
10551 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10552 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
10555 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10557 CPPFLAGS="$cf_save2_CPPFLAGS"
10558 test "$cf_cv_ncurses_h2" != no && break
10560 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10560: error: not found" >&5
10561 echo "$as_me: error: not found" >&2;}
10562 { (exit 1); exit 1; }; }
10565 echo "$as_me:10565: result: $cf_cv_ncurses_h2" >&5
10566 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10568 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
10569 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
10570 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
10571 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
10574 if test -n "$cf_1st_incdir" ; then
10575 for cf_add_incdir in $cf_1st_incdir
10577 while test "$cf_add_incdir" != /usr/include
10579 if test -d "$cf_add_incdir"
10582 if test -n "$CFLAGS$CPPFLAGS" ; then
10583 # a loop is needed to ensure we can add subdirs of existing dirs
10584 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10585 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10586 cf_have_incdir=yes; break
10591 if test "$cf_have_incdir" = no ; then
10592 if test "$cf_add_incdir" = /usr/local/include ; then
10593 if test "$GCC" = yes
10595 cf_save_CPPFLAGS=$CPPFLAGS
10597 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10598 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10600 cat >"conftest.$ac_ext" <<_ACEOF
10601 #line 10601 "configure"
10602 #include "confdefs.h"
10612 rm -f "conftest.$ac_objext"
10613 if { (eval echo "$as_me:10613: \"$ac_compile\"") >&5
10614 (eval $ac_compile) 2>&5
10616 echo "$as_me:10616: \$? = $ac_status" >&5
10617 (exit "$ac_status"); } &&
10618 { ac_try='test -s "conftest.$ac_objext"'
10619 { (eval echo "$as_me:10619: \"$ac_try\"") >&5
10620 (eval $ac_try) 2>&5
10622 echo "$as_me:10622: \$? = $ac_status" >&5
10623 (exit "$ac_status"); }; }; then
10626 echo "$as_me: failed program was:" >&5
10627 cat "conftest.$ac_ext" >&5
10630 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10631 CPPFLAGS=$cf_save_CPPFLAGS
10636 if test "$cf_have_incdir" = no ; then
10637 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10639 echo "${as_me:-configure}:10639: testing adding $cf_add_incdir to include-path ..." 1>&5
10641 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10643 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10644 test "$cf_top_incdir" = "$cf_add_incdir" && break
10645 cf_add_incdir="$cf_top_incdir"
10658 # Set definitions to allow ifdef'ing for ncurses.h
10660 case "$cf_cv_ncurses_header" in
10663 cat >>confdefs.h <<\EOF
10664 #define HAVE_NCURSES_H 1
10670 case "$cf_cv_ncurses_header" in
10671 (ncurses/curses.h|ncurses/ncurses.h)
10673 cat >>confdefs.h <<\EOF
10674 #define HAVE_NCURSES_NCURSES_H 1
10678 (ncursesw/curses.h|ncursesw/ncurses.h)
10680 cat >>confdefs.h <<\EOF
10681 #define HAVE_NCURSESW_NCURSES_H 1
10687 echo "$as_me:10687: checking for terminfo header" >&5
10688 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10689 if test "${cf_cv_term_header+set}" = set; then
10690 echo $ECHO_N "(cached) $ECHO_C" >&6
10693 case "${cf_cv_ncurses_header}" in
10694 (*/ncurses.h|*/ncursesw.h)
10695 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10698 cf_term_header=term.h
10702 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10704 cat >"conftest.$ac_ext" <<_ACEOF
10705 #line 10705 "configure"
10706 #include "confdefs.h"
10708 #include <${cf_cv_ncurses_header:-curses.h}>
10709 #include <$cf_test>
10714 int x = auto_left_margin; (void)x
10719 rm -f "conftest.$ac_objext"
10720 if { (eval echo "$as_me:10720: \"$ac_compile\"") >&5
10721 (eval $ac_compile) 2>&5
10723 echo "$as_me:10723: \$? = $ac_status" >&5
10724 (exit "$ac_status"); } &&
10725 { ac_try='test -s "conftest.$ac_objext"'
10726 { (eval echo "$as_me:10726: \"$ac_try\"") >&5
10727 (eval $ac_try) 2>&5
10729 echo "$as_me:10729: \$? = $ac_status" >&5
10730 (exit "$ac_status"); }; }; then
10732 cf_cv_term_header="$cf_test"
10734 echo "$as_me: failed program was:" >&5
10735 cat "conftest.$ac_ext" >&5
10737 cf_cv_term_header=unknown
10740 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10741 test "$cf_cv_term_header" != unknown && break
10745 echo "$as_me:10745: result: $cf_cv_term_header" >&5
10746 echo "${ECHO_T}$cf_cv_term_header" >&6
10748 # Set definitions to allow ifdef'ing to accommodate subdirectories
10750 case "$cf_cv_term_header" in
10753 cat >>confdefs.h <<\EOF
10754 #define HAVE_TERM_H 1
10760 case "$cf_cv_term_header" in
10763 cat >>confdefs.h <<\EOF
10764 #define HAVE_NCURSES_TERM_H 1
10770 cat >>confdefs.h <<\EOF
10771 #define HAVE_NCURSESW_TERM_H 1
10777 # some applications need this, but should check for NCURSES_VERSION
10779 cat >>confdefs.h <<\EOF
10783 echo "$as_me:10783: checking for ncurses version" >&5
10784 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10785 if test "${cf_cv_ncurses_version+set}" = set; then
10786 echo $ECHO_N "(cached) $ECHO_C" >&6
10789 cf_cv_ncurses_version=no
10791 rm -f "$cf_tempfile"
10792 if test "$cross_compiling" = yes; then
10794 # This will not work if the preprocessor splits the line after the
10795 # Autoconf token. The 'unproto' program does that.
10796 cat > "conftest.$ac_ext" <<EOF
10797 #include <${cf_cv_ncurses_header:-curses.h}>
10799 #ifdef NCURSES_VERSION
10800 Autoconf NCURSES_VERSION
10808 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10809 { (eval echo "$as_me:10809: \"$cf_try\"") >&5
10810 (eval $cf_try) 2>&5
10812 echo "$as_me:10812: \$? = $ac_status" >&5
10813 (exit "$ac_status"); }
10814 if test -f conftest.out ; then
10815 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
10816 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10821 cat >"conftest.$ac_ext" <<_ACEOF
10822 #line 10822 "configure"
10823 #include "confdefs.h"
10825 #include <${cf_cv_ncurses_header:-curses.h}>
10829 FILE *fp = fopen("$cf_tempfile", "w");
10830 #ifdef NCURSES_VERSION
10831 # ifdef NCURSES_VERSION_PATCH
10832 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10834 fprintf(fp, "%s\\n", NCURSES_VERSION);
10837 # ifdef __NCURSES_H
10838 fprintf(fp, "old\\n");
10843 ${cf_cv_main_return:-return}(0);
10846 rm -f "conftest$ac_exeext"
10847 if { (eval echo "$as_me:10847: \"$ac_link\"") >&5
10848 (eval $ac_link) 2>&5
10850 echo "$as_me:10850: \$? = $ac_status" >&5
10851 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10852 { (eval echo "$as_me:10852: \"$ac_try\"") >&5
10853 (eval $ac_try) 2>&5
10855 echo "$as_me:10855: \$? = $ac_status" >&5
10856 (exit "$ac_status"); }; }; then
10858 cf_cv_ncurses_version=`cat $cf_tempfile`
10860 echo "$as_me: program exited with status $ac_status" >&5
10861 echo "$as_me: failed program was:" >&5
10862 cat "conftest.$ac_ext" >&5
10864 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10866 rm -f "$cf_tempfile"
10869 echo "$as_me:10869: result: $cf_cv_ncurses_version" >&5
10870 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10871 test "$cf_cv_ncurses_version" = no ||
10872 cat >>confdefs.h <<\EOF
10876 cf_nculib_root=ncurses
10877 # This works, except for the special case where we find gpm, but
10878 # ncurses is in a nonstandard location via $LIBS, and we really want
10881 cf_ncurses_SAVE="$LIBS"
10882 echo "$as_me:10882: checking for Gpm_Open in -lgpm" >&5
10883 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10884 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10885 echo $ECHO_N "(cached) $ECHO_C" >&6
10887 ac_check_lib_save_LIBS=$LIBS
10889 cat >"conftest.$ac_ext" <<_ACEOF
10890 #line 10890 "configure"
10891 #include "confdefs.h"
10893 /* Override any gcc2 internal prototype to avoid an error. */
10897 /* We use char because int might match the return type of a gcc2
10898 builtin and then its argument prototype would still apply. */
10908 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10909 if { (eval echo "$as_me:10909: \"$ac_link\"") >&5
10910 (eval $ac_link) 2>&5
10912 echo "$as_me:10912: \$? = $ac_status" >&5
10913 (exit "$ac_status"); } &&
10914 { ac_try='test -s "conftest$ac_exeext"'
10915 { (eval echo "$as_me:10915: \"$ac_try\"") >&5
10916 (eval $ac_try) 2>&5
10918 echo "$as_me:10918: \$? = $ac_status" >&5
10919 (exit "$ac_status"); }; }; then
10920 ac_cv_lib_gpm_Gpm_Open=yes
10922 echo "$as_me: failed program was:" >&5
10923 cat "conftest.$ac_ext" >&5
10924 ac_cv_lib_gpm_Gpm_Open=no
10926 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10927 LIBS=$ac_check_lib_save_LIBS
10929 echo "$as_me:10929: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10930 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
10931 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
10932 echo "$as_me:10932: checking for initscr in -lgpm" >&5
10933 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
10934 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
10935 echo $ECHO_N "(cached) $ECHO_C" >&6
10937 ac_check_lib_save_LIBS=$LIBS
10939 cat >"conftest.$ac_ext" <<_ACEOF
10940 #line 10940 "configure"
10941 #include "confdefs.h"
10943 /* Override any gcc2 internal prototype to avoid an error. */
10947 /* We use char because int might match the return type of a gcc2
10948 builtin and then its argument prototype would still apply. */
10958 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10959 if { (eval echo "$as_me:10959: \"$ac_link\"") >&5
10960 (eval $ac_link) 2>&5
10962 echo "$as_me:10962: \$? = $ac_status" >&5
10963 (exit "$ac_status"); } &&
10964 { ac_try='test -s "conftest$ac_exeext"'
10965 { (eval echo "$as_me:10965: \"$ac_try\"") >&5
10966 (eval $ac_try) 2>&5
10968 echo "$as_me:10968: \$? = $ac_status" >&5
10969 (exit "$ac_status"); }; }; then
10970 ac_cv_lib_gpm_initscr=yes
10972 echo "$as_me: failed program was:" >&5
10973 cat "conftest.$ac_ext" >&5
10974 ac_cv_lib_gpm_initscr=no
10976 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10977 LIBS=$ac_check_lib_save_LIBS
10979 echo "$as_me:10979: result: $ac_cv_lib_gpm_initscr" >&5
10980 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
10981 if test "$ac_cv_lib_gpm_initscr" = yes; then
10982 LIBS="$cf_ncurses_SAVE"
10984 cf_ncurses_LIBS="-lgpm"
10991 # This is only necessary if you are linking against an obsolete
10992 # version of ncurses (but it should do no harm, since it is static).
10993 if test "$cf_nculib_root" = ncurses ; then
10994 echo "$as_me:10994: checking for tgoto in -lmytinfo" >&5
10995 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
10996 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
10997 echo $ECHO_N "(cached) $ECHO_C" >&6
10999 ac_check_lib_save_LIBS=$LIBS
11000 LIBS="-lmytinfo $LIBS"
11001 cat >"conftest.$ac_ext" <<_ACEOF
11002 #line 11002 "configure"
11003 #include "confdefs.h"
11005 /* Override any gcc2 internal prototype to avoid an error. */
11009 /* We use char because int might match the return type of a gcc2
11010 builtin and then its argument prototype would still apply. */
11020 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11021 if { (eval echo "$as_me:11021: \"$ac_link\"") >&5
11022 (eval $ac_link) 2>&5
11024 echo "$as_me:11024: \$? = $ac_status" >&5
11025 (exit "$ac_status"); } &&
11026 { ac_try='test -s "conftest$ac_exeext"'
11027 { (eval echo "$as_me:11027: \"$ac_try\"") >&5
11028 (eval $ac_try) 2>&5
11030 echo "$as_me:11030: \$? = $ac_status" >&5
11031 (exit "$ac_status"); }; }; then
11032 ac_cv_lib_mytinfo_tgoto=yes
11034 echo "$as_me: failed program was:" >&5
11035 cat "conftest.$ac_ext" >&5
11036 ac_cv_lib_mytinfo_tgoto=no
11038 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11039 LIBS=$ac_check_lib_save_LIBS
11041 echo "$as_me:11041: result: $ac_cv_lib_mytinfo_tgoto" >&5
11042 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11043 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
11044 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
11051 cf_add_libs="$LIBS"
11054 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11055 # filter duplicates
11056 for cf_add_1lib in $cf_add_0lib; do
11057 for cf_add_2lib in $cf_add_libs; do
11058 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11063 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11065 LIBS="$cf_add_libs"
11067 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
11070 cf_add_libs="$LIBS"
11073 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11074 # filter duplicates
11075 for cf_add_1lib in $cf_add_0lib; do
11076 for cf_add_2lib in $cf_add_libs; do
11077 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11082 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11084 LIBS="$cf_add_libs"
11088 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
11090 echo "$as_me:11090: checking for initscr" >&5
11091 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
11092 if test "${ac_cv_func_initscr+set}" = set; then
11093 echo $ECHO_N "(cached) $ECHO_C" >&6
11095 cat >"conftest.$ac_ext" <<_ACEOF
11096 #line 11096 "configure"
11097 #include "confdefs.h"
11098 #define initscr autoconf_temporary
11099 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11106 /* We use char because int might match the return type of a gcc2
11107 builtin and then its argument prototype would still apply. */
11108 char initscr (void);
11114 /* The GNU C library defines stubs for functions which it implements
11115 to always fail with ENOSYS. Some functions are actually named
11116 something starting with __ and the normal name is an alias. */
11117 #if defined (__stub_initscr) || defined (__stub___initscr)
11118 #error found stub for initscr
11126 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11127 if { (eval echo "$as_me:11127: \"$ac_link\"") >&5
11128 (eval $ac_link) 2>&5
11130 echo "$as_me:11130: \$? = $ac_status" >&5
11131 (exit "$ac_status"); } &&
11132 { ac_try='test -s "conftest$ac_exeext"'
11133 { (eval echo "$as_me:11133: \"$ac_try\"") >&5
11134 (eval $ac_try) 2>&5
11136 echo "$as_me:11136: \$? = $ac_status" >&5
11137 (exit "$ac_status"); }; }; then
11138 ac_cv_func_initscr=yes
11140 echo "$as_me: failed program was:" >&5
11141 cat "conftest.$ac_ext" >&5
11142 ac_cv_func_initscr=no
11144 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11146 echo "$as_me:11146: result: $ac_cv_func_initscr" >&5
11147 echo "${ECHO_T}$ac_cv_func_initscr" >&6
11148 if test "$ac_cv_func_initscr" = yes; then
11149 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11152 cf_save_LIBS="$LIBS"
11153 echo "$as_me:11153: checking for initscr in -l$cf_nculib_root" >&5
11154 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
11155 LIBS="-l$cf_nculib_root $LIBS"
11156 cat >"conftest.$ac_ext" <<_ACEOF
11157 #line 11157 "configure"
11158 #include "confdefs.h"
11159 #include <${cf_cv_ncurses_header:-curses.h}>
11168 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11169 if { (eval echo "$as_me:11169: \"$ac_link\"") >&5
11170 (eval $ac_link) 2>&5
11172 echo "$as_me:11172: \$? = $ac_status" >&5
11173 (exit "$ac_status"); } &&
11174 { ac_try='test -s "conftest$ac_exeext"'
11175 { (eval echo "$as_me:11175: \"$ac_try\"") >&5
11176 (eval $ac_try) 2>&5
11178 echo "$as_me:11178: \$? = $ac_status" >&5
11179 (exit "$ac_status"); }; }; then
11180 echo "$as_me:11180: result: yes" >&5
11181 echo "${ECHO_T}yes" >&6
11182 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11185 echo "$as_me: failed program was:" >&5
11186 cat "conftest.$ac_ext" >&5
11187 echo "$as_me:11187: result: no" >&5
11188 echo "${ECHO_T}no" >&6
11191 cf_library_path_list=""
11192 if test -n "${LDFLAGS}${LIBS}" ; then
11193 for cf_library_path in $LDFLAGS $LIBS
11195 case "$cf_library_path" in
11197 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11199 test "x$cf_library_path" != "xNONE" && \
11200 test -d "$cf_library_path" && \
11202 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11203 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
11204 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11205 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11206 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11207 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"
11210 cf_library_path_list="$cf_library_path_list $cf_search"
11218 test "x$prefix" != "xNONE" && \
11219 test -d "$prefix" && \
11221 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11222 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
11223 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11224 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11225 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11226 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11229 for cf_subdir_prefix in \
11238 test "x$cf_subdir_prefix" != "x$prefix" && \
11239 test -d "$cf_subdir_prefix" && \
11240 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11241 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11242 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
11243 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11244 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11245 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11246 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"
11251 cf_search="$cf_library_path_list $cf_search"
11253 for cf_libdir in $cf_search
11255 echo "$as_me:11255: checking for -l$cf_nculib_root in $cf_libdir" >&5
11256 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11257 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11258 cat >"conftest.$ac_ext" <<_ACEOF
11259 #line 11259 "configure"
11260 #include "confdefs.h"
11261 #include <${cf_cv_ncurses_header:-curses.h}>
11270 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11271 if { (eval echo "$as_me:11271: \"$ac_link\"") >&5
11272 (eval $ac_link) 2>&5
11274 echo "$as_me:11274: \$? = $ac_status" >&5
11275 (exit "$ac_status"); } &&
11276 { ac_try='test -s "conftest$ac_exeext"'
11277 { (eval echo "$as_me:11277: \"$ac_try\"") >&5
11278 (eval $ac_try) 2>&5
11280 echo "$as_me:11280: \$? = $ac_status" >&5
11281 (exit "$ac_status"); }; }; then
11282 echo "$as_me:11282: result: yes" >&5
11283 echo "${ECHO_T}yes" >&6
11284 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11287 echo "$as_me: failed program was:" >&5
11288 cat "conftest.$ac_ext" >&5
11289 echo "$as_me:11289: result: no" >&5
11290 echo "${ECHO_T}no" >&6
11291 LIBS="$cf_save_LIBS"
11293 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11297 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11301 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
11303 if test "$cf_found_library" = no ; then
11304 { { echo "$as_me:11304: error: Cannot link $cf_nculib_root library" >&5
11305 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11306 { (exit 1); exit 1; }; }
11311 if test -n "$cf_ncurses_LIBS" ; then
11312 echo "$as_me:11312: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11313 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11314 cf_ncurses_SAVE="$LIBS"
11315 for p in $cf_ncurses_LIBS ; do
11316 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
11317 if test "$q" != "$LIBS" ; then
11321 cat >"conftest.$ac_ext" <<_ACEOF
11322 #line 11322 "configure"
11323 #include "confdefs.h"
11324 #include <${cf_cv_ncurses_header:-curses.h}>
11328 initscr(); mousemask(0,0); tigetstr((char *)0);
11333 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11334 if { (eval echo "$as_me:11334: \"$ac_link\"") >&5
11335 (eval $ac_link) 2>&5
11337 echo "$as_me:11337: \$? = $ac_status" >&5
11338 (exit "$ac_status"); } &&
11339 { ac_try='test -s "conftest$ac_exeext"'
11340 { (eval echo "$as_me:11340: \"$ac_try\"") >&5
11341 (eval $ac_try) 2>&5
11343 echo "$as_me:11343: \$? = $ac_status" >&5
11344 (exit "$ac_status"); }; }; then
11345 echo "$as_me:11345: result: yes" >&5
11346 echo "${ECHO_T}yes" >&6
11348 echo "$as_me: failed program was:" >&5
11349 cat "conftest.$ac_ext" >&5
11350 echo "$as_me:11350: result: no" >&5
11351 echo "${ECHO_T}no" >&6
11352 LIBS="$cf_ncurses_SAVE"
11354 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11357 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11359 cat >>confdefs.h <<EOF
11360 #define $cf_nculib_ROOT 1
11365 NCURSES_CONFIG=none
11370 if test "$NCURSES_CONFIG_PKG" != none ; then
11371 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
11373 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11374 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11375 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11377 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
11378 if test -z "$cf_cv_abi_version"
11380 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
11383 elif test "$NCURSES_CONFIG" != none ; then
11385 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
11387 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11388 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11389 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11391 # ABI version is not available from headers
11392 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
11396 for cf_name in MAJOR MINOR PATCH
11398 cat >conftest.$ac_ext <<CF_EOF
11399 #include <${cf_cv_ncurses_header:-curses.h}>
11400 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
11402 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
11403 { (eval echo "$as_me:11403: \"$cf_try\"") >&5
11404 (eval $cf_try) 2>&5
11406 echo "$as_me:11406: \$? = $ac_status" >&5
11407 (exit "$ac_status"); }
11408 if test -f conftest.out ; then
11409 cf_result=`sed -e "s/^.*AUTOCONF_${cf_name}[ ][ ]*//" conftest.out`
11410 eval NCURSES_$cf_name=\"$cf_result\"
11411 # cat conftest.$ac_ext
11416 cf_cv_abi_version=${NCURSES_MAJOR}
11420 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
11422 cf_cv_timestamp=`date`
11424 echo "$as_me:11424: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
11425 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
11427 echo "$as_me:11427: checking if you want to have a library-prefix" >&5
11428 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
11430 # Check whether --with-lib-prefix or --without-lib-prefix was given.
11431 if test "${with_lib_prefix+set}" = set; then
11432 withval="$with_lib_prefix"
11433 with_lib_prefix=$withval
11435 with_lib_prefix=auto
11437 echo "$as_me:11437: result: $with_lib_prefix" >&5
11438 echo "${ECHO_T}$with_lib_prefix" >&6
11440 if test "$with_lib_prefix" = auto
11443 case "$cf_cv_system_name" in
11445 if test "$DFT_LWR_MODEL" = libtool; then
11454 (*) LIB_PREFIX='lib'
11457 cf_prefix=$LIB_PREFIX
11459 elif test "$with_lib_prefix" = no
11463 LIB_PREFIX=$with_lib_prefix
11468 ###############################################################################
11470 if test X"$CC_G_OPT" = X"" ; then
11472 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
11475 echo "$as_me:11475: checking for default loader flags" >&5
11476 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
11477 case $DFT_LWR_MODEL in
11478 (normal) LD_MODEL='' ;;
11479 (debug) LD_MODEL=$CC_G_OPT ;;
11480 (profile) LD_MODEL='-pg';;
11481 (shared) LD_MODEL='' ;;
11483 echo "$as_me:11483: result: $LD_MODEL" >&5
11484 echo "${ECHO_T}$LD_MODEL" >&6
11487 if test "x$cf_cv_enable_rpath" != xno
11489 echo "$as_me:11489: checking for an rpath option" >&5
11490 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
11491 case "$cf_cv_system_name" in
11493 if test "$GCC" = yes; then
11494 LD_RPATH_OPT="-Wl,-rpath,"
11496 LD_RPATH_OPT="-rpath "
11499 (linux*|gnu*|k*bsd*-gnu|freebsd*)
11500 LD_RPATH_OPT="-Wl,-rpath,"
11502 (openbsd[2-9].*|mirbsd*)
11503 LD_RPATH_OPT="-Wl,-rpath,"
11506 LD_RPATH_OPT="-rpath "
11509 LD_RPATH_OPT="-Wl,-rpath,"
11512 LD_RPATH_OPT="-rpath "
11520 echo "$as_me:11520: result: $LD_RPATH_OPT" >&5
11521 echo "${ECHO_T}$LD_RPATH_OPT" >&6
11523 case "x$LD_RPATH_OPT" in
11525 echo "$as_me:11525: checking if we need a space after rpath option" >&5
11526 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
11527 cf_save_LIBS="$LIBS"
11529 cf_add_libs="$LIBS"
11532 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11533 # filter duplicates
11534 for cf_add_1lib in $cf_add_0lib; do
11535 for cf_add_2lib in $cf_add_libs; do
11536 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11541 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11543 LIBS="$cf_add_libs"
11545 cat >"conftest.$ac_ext" <<_ACEOF
11546 #line 11546 "configure"
11547 #include "confdefs.h"
11557 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11558 if { (eval echo "$as_me:11558: \"$ac_link\"") >&5
11559 (eval $ac_link) 2>&5
11561 echo "$as_me:11561: \$? = $ac_status" >&5
11562 (exit "$ac_status"); } &&
11563 { ac_try='test -s "conftest$ac_exeext"'
11564 { (eval echo "$as_me:11564: \"$ac_try\"") >&5
11565 (eval $ac_try) 2>&5
11567 echo "$as_me:11567: \$? = $ac_status" >&5
11568 (exit "$ac_status"); }; }; then
11571 echo "$as_me: failed program was:" >&5
11572 cat "conftest.$ac_ext" >&5
11575 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11576 LIBS="$cf_save_LIBS"
11577 echo "$as_me:11577: result: $cf_rpath_space" >&5
11578 echo "${ECHO_T}$cf_rpath_space" >&6
11579 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
11588 INSTALL_LIB="-m 644"
11589 : ${rel_builddir:=.}
11595 cf_cv_do_symlinks=no
11597 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
11599 echo "$as_me:11599: checking if release/abi version should be used for shared libs" >&5
11600 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
11602 # Check whether --with-shlib-version or --without-shlib-version was given.
11603 if test "${with_shlib_version+set}" = set; then
11604 withval="$with_shlib_version"
11605 test -z "$withval" && withval=auto
11608 cf_cv_shlib_version=auto
11611 cf_cv_shlib_version=$withval
11614 echo "$as_me:11614: result: $withval" >&5
11615 echo "${ECHO_T}$withval" >&6
11616 { { echo "$as_me:11616: error: option value must be one of: rel, abi, or auto" >&5
11617 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
11618 { (exit 1); exit 1; }; }
11623 cf_cv_shlib_version=auto
11625 echo "$as_me:11625: result: $cf_cv_shlib_version" >&5
11626 echo "${ECHO_T}$cf_cv_shlib_version" >&6
11628 cf_cv_rm_so_locs=no
11631 # Some less-capable ports of gcc support only -fpic
11635 if test "$GCC" = yes
11639 case "$cf_cv_system_name" in
11640 (*linux*) # e.g., PGI compiler
11646 if test "$cf_try_fPIC" = yes
11648 echo "$as_me:11648: checking which $CC option to use" >&5
11649 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
11650 cf_save_CFLAGS="$CFLAGS"
11651 for CC_SHARED_OPTS in -fPIC -fpic ''
11653 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
11654 cat >"conftest.$ac_ext" <<_ACEOF
11655 #line 11655 "configure"
11656 #include "confdefs.h"
11666 rm -f "conftest.$ac_objext"
11667 if { (eval echo "$as_me:11667: \"$ac_compile\"") >&5
11668 (eval $ac_compile) 2>&5
11670 echo "$as_me:11670: \$? = $ac_status" >&5
11671 (exit "$ac_status"); } &&
11672 { ac_try='test -s "conftest.$ac_objext"'
11673 { (eval echo "$as_me:11673: \"$ac_try\"") >&5
11674 (eval $ac_try) 2>&5
11676 echo "$as_me:11676: \$? = $ac_status" >&5
11677 (exit "$ac_status"); }; }; then
11680 echo "$as_me: failed program was:" >&5
11681 cat "conftest.$ac_ext" >&5
11683 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11685 echo "$as_me:11685: result: $CC_SHARED_OPTS" >&5
11686 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
11687 CFLAGS="$cf_save_CFLAGS"
11690 cf_cv_shlib_version_infix=no
11692 case "$cf_cv_system_name" in
11693 (aix4.3-9*|aix[5-7]*)
11694 if test "$GCC" = yes; then
11695 CC_SHARED_OPTS='-Wl,-brtl'
11696 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11698 CC_SHARED_OPTS='-brtl'
11699 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
11700 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11704 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
11708 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11709 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11710 cf_cv_shlib_version=cygdll
11711 cf_cv_shlib_version_infix=cygdll
11714 cat >mk_shared_lib.sh <<-CF_EOF
11717 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11720 Linking shared library
11721 ** SHARED_LIB \$SHARED_LIB
11722 ** IMPORT_LIB \$IMPORT_LIB
11724 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11726 chmod +x mk_shared_lib.sh
11730 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11731 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11732 cf_cv_shlib_version=msysdll
11733 cf_cv_shlib_version_infix=msysdll
11736 cat >mk_shared_lib.sh <<-CF_EOF
11739 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11742 Linking shared library
11743 ** SHARED_LIB \$SHARED_LIB
11744 ** IMPORT_LIB \$IMPORT_LIB
11746 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11748 chmod +x mk_shared_lib.sh
11751 cf_try_cflags="no-cpp-precomp"
11752 CC_SHARED_OPTS="-dynamic"
11753 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
11754 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
11755 cf_cv_shlib_version_infix=yes
11756 echo "$as_me:11756: checking if ld -search_paths_first works" >&5
11757 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
11758 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
11759 echo $ECHO_N "(cached) $ECHO_C" >&6
11762 cf_save_LDFLAGS=$LDFLAGS
11763 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11764 cat >"conftest.$ac_ext" <<_ACEOF
11765 #line 11765 "configure"
11766 #include "confdefs.h"
11776 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11777 if { (eval echo "$as_me:11777: \"$ac_link\"") >&5
11778 (eval $ac_link) 2>&5
11780 echo "$as_me:11780: \$? = $ac_status" >&5
11781 (exit "$ac_status"); } &&
11782 { ac_try='test -s "conftest$ac_exeext"'
11783 { (eval echo "$as_me:11783: \"$ac_try\"") >&5
11784 (eval $ac_try) 2>&5
11786 echo "$as_me:11786: \$? = $ac_status" >&5
11787 (exit "$ac_status"); }; }; then
11788 cf_cv_ldflags_search_paths_first=yes
11790 echo "$as_me: failed program was:" >&5
11791 cat "conftest.$ac_ext" >&5
11792 cf_cv_ldflags_search_paths_first=no
11794 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11795 LDFLAGS=$cf_save_LDFLAGS
11797 echo "$as_me:11797: result: $cf_cv_ldflags_search_paths_first" >&5
11798 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
11799 if test "$cf_cv_ldflags_search_paths_first" = yes; then
11800 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11805 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11806 if test "$cf_cv_shlib_version" = rel; then
11807 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11809 cf_cv_shared_soname='`basename $@`'
11812 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11815 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
11816 if test "$GCC" != yes; then
11817 CC_SHARED_OPTS='+Z'
11819 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
11820 INSTALL_LIB="-m 555"
11823 # (tested with gcc 2.7.2 -- I don't have c89)
11824 if test "$GCC" = yes; then
11825 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
11827 CC_SHARED_OPTS='+Z'
11828 LD_SHARED_OPTS='-Wl,+b,${libdir}'
11830 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
11831 # HP-UX shared libraries must be executable, and should be
11832 # readonly to exploit a quirk in the memory manager.
11833 INSTALL_LIB="-m 555"
11836 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11837 if test "$cf_cv_shlib_version" = rel; then
11838 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11840 cf_shared_soname='`basename $@`'
11843 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
11846 if test "$cf_cv_enable_rpath" = yes ; then
11847 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11849 # tested with IRIX 5.2 and 'cc'.
11850 if test "$GCC" != yes; then
11851 CC_SHARED_OPTS='-KPIC'
11852 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
11854 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
11856 cf_cv_rm_so_locs=yes
11858 (linux*|gnu*|k*bsd*-gnu)
11859 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11860 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11861 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11863 if test "$cf_cv_enable_rpath" = yes ; then
11864 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11867 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11868 if test "$cf_cv_shlib_version" = rel; then
11869 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11871 cf_cv_shared_soname='`basename $@`'
11874 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11877 cf_cv_shlib_version=msvcdll
11878 cf_cv_shlib_version_infix=msvcdll
11881 if test "$DFT_LWR_MODEL" = "shared" ; then
11882 LOCAL_LDFLAGS="-link -dll"
11883 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11884 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
11887 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
11888 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
11889 cat >mk_shared_lib.sh <<-CF_EOF
11892 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
11897 Linking shared library
11898 ** SHARED LIB \$SHARED_LIB
11899 ** IMPORT_LIB \$IMPORT_LIB
11901 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
11902 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
11903 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
11905 chmod +x mk_shared_lib.sh
11906 cat >mk_prog.sh <<-CF_EOF
11909 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
11912 ldopts=("/subsystem:console")
11915 while test \$# -gt 0; do
11918 # ignore -link argument
11921 # ignore runtime-library option
11936 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
11939 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
11945 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
11946 ldopts+=("\${linkarg}")
11954 ldopts+=("-out:\$1")
11963 if [ "\$isdll" -ne 0 ]; then
11964 for lib in \${libs[*]}; do
11965 ldopts+=("\$lib.dll.lib")
11968 for lib in \${libs[*]}; do
11969 ldopts+=("\$lib.lib")
11974 ** ld options: "\${ldopts[@]}"
11976 exec \$LD \${ldopts[@]}
11978 chmod +x mk_prog.sh
11979 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
11980 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
11983 cf_cv_shlib_version=mingw
11984 cf_cv_shlib_version_infix=mingw
11987 if test "$DFT_LWR_MODEL" = "shared" ; then
11988 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
11989 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11990 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
11993 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11994 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11995 cat >mk_shared_lib.sh <<-CF_EOF
11998 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
12001 Linking shared library
12002 ** SHARED_LIB \$SHARED_LIB
12003 ** IMPORT_LIB \$IMPORT_LIB
12005 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
12007 chmod +x mk_shared_lib.sh
12009 (openbsd[2-9].*|mirbsd*)
12010 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12011 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12012 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12014 if test "$cf_cv_enable_rpath" = yes ; then
12015 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12017 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12019 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12020 if test "$cf_cv_shlib_version" = rel; then
12021 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12023 cf_cv_shared_soname='`basename $@`'
12026 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12030 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
12034 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
12036 (nto-qnx*|openbsd*|freebsd[12].*)
12037 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12038 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
12039 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12041 (dragonfly*|freebsd*)
12042 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12043 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12044 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12045 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
12046 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12049 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12050 if test "$cf_cv_shlib_version" = rel; then
12051 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12053 cf_cv_shared_soname='`basename $@`'
12056 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12059 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12060 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12061 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12062 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12063 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12064 if test "$cf_cv_shlib_version" = auto; then
12065 if test -f /usr/libexec/ld.elf_so; then
12066 cf_cv_shlib_version=abi
12068 cf_cv_shlib_version=rel
12072 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12073 if test "$cf_cv_shlib_version" = rel; then
12074 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12076 cf_cv_shared_soname='`basename $@`'
12079 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
12081 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
12085 # tested with OSF/1 V3.2 and 'cc'
12086 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
12087 # link with shared libs).
12088 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
12091 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
12094 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
12095 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12096 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12097 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12099 cf_cv_rm_so_locs=yes
12101 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
12102 # tested with osr5.0.5
12103 if test "$GCC" != yes; then
12104 CC_SHARED_OPTS='-belf -KPIC'
12106 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
12107 if test "$cf_cv_enable_rpath" = yes ; then
12108 # only way is to set LD_RUN_PATH but no switch for it
12111 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12112 LINK_PROGS='LD_RUN_PATH=${libdir}'
12113 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
12116 # tested with SunOS 4.1.1 and gcc 2.7.0
12117 if test "$GCC" != yes; then
12118 CC_SHARED_OPTS='-KPIC'
12120 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
12121 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12124 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
12125 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
12126 if test "$DFT_LWR_MODEL" = "shared" ; then
12127 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
12128 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12130 if test "$cf_cv_enable_rpath" = yes ; then
12131 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
12134 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12135 if test "$cf_cv_shlib_version" = rel; then
12136 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12138 cf_cv_shared_soname='`basename $@`'
12141 if test "$GCC" != yes; then
12142 cf_save_CFLAGS="$CFLAGS"
12143 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
12145 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
12146 cat >"conftest.$ac_ext" <<_ACEOF
12147 #line 12147 "configure"
12148 #include "confdefs.h"
12153 printf("Hello\\n");
12158 rm -f "conftest.$ac_objext"
12159 if { (eval echo "$as_me:12159: \"$ac_compile\"") >&5
12160 (eval $ac_compile) 2>&5
12162 echo "$as_me:12162: \$? = $ac_status" >&5
12163 (exit "$ac_status"); } &&
12164 { ac_try='test -s "conftest.$ac_objext"'
12165 { (eval echo "$as_me:12165: \"$ac_try\"") >&5
12166 (eval $ac_try) 2>&5
12168 echo "$as_me:12168: \$? = $ac_status" >&5
12169 (exit "$ac_status"); }; }; then
12172 echo "$as_me: failed program was:" >&5
12173 cat "conftest.$ac_ext" >&5
12175 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12177 CFLAGS="$cf_save_CFLAGS"
12178 CC_SHARED_OPTS=$cf_shared_opts
12179 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
12181 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
12184 (sysv5uw7*|unix_sv*)
12185 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
12186 if test "$GCC" != yes; then
12187 CC_SHARED_OPTS='-KPIC'
12189 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
12192 CC_SHARED_OPTS='unknown'
12193 MK_SHARED_LIB='echo unknown'
12197 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
12198 case "$cf_cv_shlib_version" in
12200 case "$MK_SHARED_LIB" in
12202 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
12205 { echo "$as_me:12205: WARNING: ignored --with-shlib-version" >&5
12206 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
12212 if test -n "$cf_try_cflags"
12214 cat > conftest.$ac_ext <<EOF
12215 #line 12215 "${as_me:-configure}"
12217 int main(int argc, char *argv[])
12219 printf("hello\\n");
12220 return (argv[argc-1] == 0) ;
12223 cf_save_CFLAGS="$CFLAGS"
12224 for cf_opt in $cf_try_cflags
12226 CFLAGS="$cf_save_CFLAGS -$cf_opt"
12227 echo "$as_me:12227: checking if CFLAGS option -$cf_opt works" >&5
12228 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
12229 if { (eval echo "$as_me:12229: \"$ac_compile\"") >&5
12230 (eval $ac_compile) 2>&5
12232 echo "$as_me:12232: \$? = $ac_status" >&5
12233 (exit "$ac_status"); }; then
12234 echo "$as_me:12234: result: yes" >&5
12235 echo "${ECHO_T}yes" >&6
12236 cf_save_CFLAGS="$CFLAGS"
12238 echo "$as_me:12238: result: no" >&5
12239 echo "${ECHO_T}no" >&6
12242 CFLAGS="$cf_save_CFLAGS"
12245 # RPATH_LIST is a colon-separated list of directories
12246 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
12247 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
12249 test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
12251 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
12253 echo "${as_me:-configure}:12253: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
12255 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
12257 echo "${as_me:-configure}:12257: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
12259 # The test/sample programs in the original tree link using rpath option.
12260 # Make it optional for packagers.
12261 if test -n "$LOCAL_LDFLAGS"
12263 echo "$as_me:12263: checking if you want to link sample programs with rpath option" >&5
12264 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
12266 # Check whether --enable-rpath-link or --disable-rpath-link was given.
12267 if test "${enable_rpath_link+set}" = set; then
12268 enableval="$enable_rpath_link"
12269 with_rpath_link=$enableval
12271 with_rpath_link=yes
12273 echo "$as_me:12273: result: $with_rpath_link" >&5
12274 echo "${ECHO_T}$with_rpath_link" >&6
12275 if test "$with_rpath_link" = no
12282 ###############################################################################
12284 ### use option --enable-broken-linker to force on use of broken-linker support
12286 echo "$as_me:12286: checking if you want broken-linker support code" >&5
12287 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
12289 # Check whether --enable-broken_linker or --disable-broken_linker was given.
12290 if test "${enable_broken_linker+set}" = set; then
12291 enableval="$enable_broken_linker"
12292 with_broken_linker=$enableval
12294 with_broken_linker=no
12296 echo "$as_me:12296: result: $with_broken_linker" >&5
12297 echo "${ECHO_T}$with_broken_linker" >&6
12299 : "${BROKEN_LINKER:=0}"
12300 if test "x$with_broken_linker" = xyes ; then
12302 cat >>confdefs.h <<\EOF
12303 #define BROKEN_LINKER 1
12309 # Check to define _XOPEN_SOURCE "automatically"
12311 echo "$as_me:12311: checking if the POSIX test-macros are already defined" >&5
12312 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
12313 if test "${cf_cv_posix_visible+set}" = set; then
12314 echo $ECHO_N "(cached) $ECHO_C" >&6
12317 cat >"conftest.$ac_ext" <<_ACEOF
12318 #line 12318 "configure"
12319 #include "confdefs.h"
12325 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
12326 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
12327 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
12328 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
12329 #error conflicting symbols found
12336 rm -f "conftest.$ac_objext"
12337 if { (eval echo "$as_me:12337: \"$ac_compile\"") >&5
12338 (eval $ac_compile) 2>&5
12340 echo "$as_me:12340: \$? = $ac_status" >&5
12341 (exit "$ac_status"); } &&
12342 { ac_try='test -s "conftest.$ac_objext"'
12343 { (eval echo "$as_me:12343: \"$ac_try\"") >&5
12344 (eval $ac_try) 2>&5
12346 echo "$as_me:12346: \$? = $ac_status" >&5
12347 (exit "$ac_status"); }; }; then
12348 cf_cv_posix_visible=no
12350 echo "$as_me: failed program was:" >&5
12351 cat "conftest.$ac_ext" >&5
12352 cf_cv_posix_visible=yes
12354 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12357 echo "$as_me:12357: result: $cf_cv_posix_visible" >&5
12358 echo "${ECHO_T}$cf_cv_posix_visible" >&6
12360 if test "$cf_cv_posix_visible" = no; then
12362 cf_XOPEN_SOURCE=600
12363 cf_POSIX_C_SOURCE=199506L
12368 cf_xopen_source="-D_ALL_SOURCE"
12371 cf_XOPEN_SOURCE=600
12374 cf_xopen_source="-D_APPLE_C_SOURCE"
12377 cf_xopen_source="-D_DARWIN_C_SOURCE"
12380 (freebsd*|dragonfly*|midnightbsd*)
12381 # 5.x headers associate
12382 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
12383 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
12384 cf_POSIX_C_SOURCE=200112L
12385 cf_XOPEN_SOURCE=600
12386 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12389 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
12392 cf_xopen_source="-D_HPUX_SOURCE"
12395 cf_xopen_source="-D_SGI_SOURCE"
12398 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
12400 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
12402 echo "$as_me:12402: checking if this is the GNU C library" >&5
12403 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
12404 if test "${cf_cv_gnu_library+set}" = set; then
12405 echo $ECHO_N "(cached) $ECHO_C" >&6
12408 cat >"conftest.$ac_ext" <<_ACEOF
12409 #line 12409 "configure"
12410 #include "confdefs.h"
12411 #include <sys/types.h>
12416 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
12418 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
12421 # error not GNU C library
12427 rm -f "conftest.$ac_objext"
12428 if { (eval echo "$as_me:12428: \"$ac_compile\"") >&5
12429 (eval $ac_compile) 2>&5
12431 echo "$as_me:12431: \$? = $ac_status" >&5
12432 (exit "$ac_status"); } &&
12433 { ac_try='test -s "conftest.$ac_objext"'
12434 { (eval echo "$as_me:12434: \"$ac_try\"") >&5
12435 (eval $ac_try) 2>&5
12437 echo "$as_me:12437: \$? = $ac_status" >&5
12438 (exit "$ac_status"); }; }; then
12439 cf_cv_gnu_library=yes
12441 echo "$as_me: failed program was:" >&5
12442 cat "conftest.$ac_ext" >&5
12443 cf_cv_gnu_library=no
12445 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12448 echo "$as_me:12448: result: $cf_cv_gnu_library" >&5
12449 echo "${ECHO_T}$cf_cv_gnu_library" >&6
12451 if test x$cf_cv_gnu_library = xyes; then
12453 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
12454 # was changed to help a little. newlib incorporated the change about 4
12456 echo "$as_me:12456: checking if _DEFAULT_SOURCE can be used as a basis" >&5
12457 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
12458 if test "${cf_cv_gnu_library_219+set}" = set; then
12459 echo $ECHO_N "(cached) $ECHO_C" >&6
12462 cf_save="$CPPFLAGS"
12464 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12465 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12467 cat >"conftest.$ac_ext" <<_ACEOF
12468 #line 12468 "configure"
12469 #include "confdefs.h"
12470 #include <sys/types.h>
12475 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
12477 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
12480 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
12486 rm -f "conftest.$ac_objext"
12487 if { (eval echo "$as_me:12487: \"$ac_compile\"") >&5
12488 (eval $ac_compile) 2>&5
12490 echo "$as_me:12490: \$? = $ac_status" >&5
12491 (exit "$ac_status"); } &&
12492 { ac_try='test -s "conftest.$ac_objext"'
12493 { (eval echo "$as_me:12493: \"$ac_try\"") >&5
12494 (eval $ac_try) 2>&5
12496 echo "$as_me:12496: \$? = $ac_status" >&5
12497 (exit "$ac_status"); }; }; then
12498 cf_cv_gnu_library_219=yes
12500 echo "$as_me: failed program was:" >&5
12501 cat "conftest.$ac_ext" >&5
12502 cf_cv_gnu_library_219=no
12504 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12505 CPPFLAGS="$cf_save"
12508 echo "$as_me:12508: result: $cf_cv_gnu_library_219" >&5
12509 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
12511 if test "x$cf_cv_gnu_library_219" = xyes; then
12512 cf_save="$CPPFLAGS"
12513 echo "$as_me:12513: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
12514 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
12515 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
12516 echo $ECHO_N "(cached) $ECHO_C" >&6
12522 cf_new_extra_cppflags=
12524 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
12526 case "$cf_fix_cppflags" in
12528 case "$cf_add_cflags" in
12529 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12530 case "$cf_add_cflags" in
12532 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12534 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12535 && test -z "${cf_tst_cflags}" \
12536 && cf_fix_cppflags=yes
12538 if test "$cf_fix_cppflags" = yes ; then
12540 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12541 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12544 elif test "${cf_tst_cflags}" = "\"'" ; then
12546 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12547 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12553 case "$CPPFLAGS" in
12557 case "$cf_add_cflags" in
12559 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12561 CPPFLAGS=`echo "$CPPFLAGS" | \
12562 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12563 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12568 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12569 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12576 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12577 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12584 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12585 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12587 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12589 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12590 && test -z "${cf_tst_cflags}" \
12591 && cf_fix_cppflags=no
12596 if test -n "$cf_new_cflags" ; then
12598 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12599 CFLAGS="${CFLAGS}$cf_new_cflags"
12603 if test -n "$cf_new_cppflags" ; then
12605 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12606 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12610 if test -n "$cf_new_extra_cppflags" ; then
12612 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12613 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12617 cat >"conftest.$ac_ext" <<_ACEOF
12618 #line 12618 "configure"
12619 #include "confdefs.h"
12621 #include <limits.h>
12622 #include <sys/types.h>
12628 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
12631 # error GNU C library is too old
12637 rm -f "conftest.$ac_objext"
12638 if { (eval echo "$as_me:12638: \"$ac_compile\"") >&5
12639 (eval $ac_compile) 2>&5
12641 echo "$as_me:12641: \$? = $ac_status" >&5
12642 (exit "$ac_status"); } &&
12643 { ac_try='test -s "conftest.$ac_objext"'
12644 { (eval echo "$as_me:12644: \"$ac_try\"") >&5
12645 (eval $ac_try) 2>&5
12647 echo "$as_me:12647: \$? = $ac_status" >&5
12648 (exit "$ac_status"); }; }; then
12649 cf_cv_gnu_dftsrc_219=yes
12651 echo "$as_me: failed program was:" >&5
12652 cat "conftest.$ac_ext" >&5
12653 cf_cv_gnu_dftsrc_219=no
12655 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12658 echo "$as_me:12658: result: $cf_cv_gnu_dftsrc_219" >&5
12659 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
12660 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
12662 cf_cv_gnu_dftsrc_219=maybe
12665 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
12667 echo "$as_me:12667: checking if we must define _GNU_SOURCE" >&5
12668 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
12669 if test "${cf_cv_gnu_source+set}" = set; then
12670 echo $ECHO_N "(cached) $ECHO_C" >&6
12673 cat >"conftest.$ac_ext" <<_ACEOF
12674 #line 12674 "configure"
12675 #include "confdefs.h"
12676 #include <sys/types.h>
12681 #ifndef _XOPEN_SOURCE
12682 #error expected _XOPEN_SOURCE to be defined
12688 rm -f "conftest.$ac_objext"
12689 if { (eval echo "$as_me:12689: \"$ac_compile\"") >&5
12690 (eval $ac_compile) 2>&5
12692 echo "$as_me:12692: \$? = $ac_status" >&5
12693 (exit "$ac_status"); } &&
12694 { ac_try='test -s "conftest.$ac_objext"'
12695 { (eval echo "$as_me:12695: \"$ac_try\"") >&5
12696 (eval $ac_try) 2>&5
12698 echo "$as_me:12698: \$? = $ac_status" >&5
12699 (exit "$ac_status"); }; }; then
12700 cf_cv_gnu_source=no
12702 echo "$as_me: failed program was:" >&5
12703 cat "conftest.$ac_ext" >&5
12704 cf_save="$CPPFLAGS"
12709 cf_new_extra_cppflags=
12711 for cf_add_cflags in -D_GNU_SOURCE
12713 case "$cf_fix_cppflags" in
12715 case "$cf_add_cflags" in
12716 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12717 case "$cf_add_cflags" in
12719 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12721 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12722 && test -z "${cf_tst_cflags}" \
12723 && cf_fix_cppflags=yes
12725 if test "$cf_fix_cppflags" = yes ; then
12727 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12728 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12731 elif test "${cf_tst_cflags}" = "\"'" ; then
12733 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12734 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12740 case "$CPPFLAGS" in
12744 case "$cf_add_cflags" in
12746 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12748 CPPFLAGS=`echo "$CPPFLAGS" | \
12749 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12750 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12755 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12756 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12763 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12764 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12771 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12772 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12774 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12776 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12777 && test -z "${cf_tst_cflags}" \
12778 && cf_fix_cppflags=no
12783 if test -n "$cf_new_cflags" ; then
12785 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12786 CFLAGS="${CFLAGS}$cf_new_cflags"
12790 if test -n "$cf_new_cppflags" ; then
12792 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12793 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12797 if test -n "$cf_new_extra_cppflags" ; then
12799 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12800 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12804 cat >"conftest.$ac_ext" <<_ACEOF
12805 #line 12805 "configure"
12806 #include "confdefs.h"
12807 #include <sys/types.h>
12812 #ifdef _XOPEN_SOURCE
12813 #error expected _XOPEN_SOURCE to be undefined
12819 rm -f "conftest.$ac_objext"
12820 if { (eval echo "$as_me:12820: \"$ac_compile\"") >&5
12821 (eval $ac_compile) 2>&5
12823 echo "$as_me:12823: \$? = $ac_status" >&5
12824 (exit "$ac_status"); } &&
12825 { ac_try='test -s "conftest.$ac_objext"'
12826 { (eval echo "$as_me:12826: \"$ac_try\"") >&5
12827 (eval $ac_try) 2>&5
12829 echo "$as_me:12829: \$? = $ac_status" >&5
12830 (exit "$ac_status"); }; }; then
12831 cf_cv_gnu_source=no
12833 echo "$as_me: failed program was:" >&5
12834 cat "conftest.$ac_ext" >&5
12835 cf_cv_gnu_source=yes
12837 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12838 CPPFLAGS="$cf_save"
12841 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12844 echo "$as_me:12844: result: $cf_cv_gnu_source" >&5
12845 echo "${ECHO_T}$cf_cv_gnu_source" >&6
12847 if test "$cf_cv_gnu_source" = yes
12849 echo "$as_me:12849: checking if we should also define _DEFAULT_SOURCE" >&5
12850 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
12851 if test "${cf_cv_default_source+set}" = set; then
12852 echo $ECHO_N "(cached) $ECHO_C" >&6
12855 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12856 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
12858 cat >"conftest.$ac_ext" <<_ACEOF
12859 #line 12859 "configure"
12860 #include "confdefs.h"
12861 #include <sys/types.h>
12866 #ifdef _DEFAULT_SOURCE
12867 #error expected _DEFAULT_SOURCE to be undefined
12873 rm -f "conftest.$ac_objext"
12874 if { (eval echo "$as_me:12874: \"$ac_compile\"") >&5
12875 (eval $ac_compile) 2>&5
12877 echo "$as_me:12877: \$? = $ac_status" >&5
12878 (exit "$ac_status"); } &&
12879 { ac_try='test -s "conftest.$ac_objext"'
12880 { (eval echo "$as_me:12880: \"$ac_try\"") >&5
12881 (eval $ac_try) 2>&5
12883 echo "$as_me:12883: \$? = $ac_status" >&5
12884 (exit "$ac_status"); }; }; then
12885 cf_cv_default_source=no
12887 echo "$as_me: failed program was:" >&5
12888 cat "conftest.$ac_ext" >&5
12889 cf_cv_default_source=yes
12891 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12894 echo "$as_me:12894: result: $cf_cv_default_source" >&5
12895 echo "${ECHO_T}$cf_cv_default_source" >&6
12896 if test "$cf_cv_default_source" = yes
12899 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12900 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12910 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
12913 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
12916 if test "$cf_cv_posix_visible" = no; then
12918 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
12920 cf_save_CFLAGS="$CFLAGS"
12921 cf_save_CPPFLAGS="$CPPFLAGS"
12923 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
12924 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12925 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12927 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
12928 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12929 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12931 echo "$as_me:12931: checking if we should define _POSIX_C_SOURCE" >&5
12932 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
12933 if test "${cf_cv_posix_c_source+set}" = set; then
12934 echo $ECHO_N "(cached) $ECHO_C" >&6
12937 echo "${as_me:-configure}:12937: testing if the symbol is already defined go no further ..." 1>&5
12939 cat >"conftest.$ac_ext" <<_ACEOF
12940 #line 12940 "configure"
12941 #include "confdefs.h"
12942 #include <sys/types.h>
12947 #ifndef _POSIX_C_SOURCE
12954 rm -f "conftest.$ac_objext"
12955 if { (eval echo "$as_me:12955: \"$ac_compile\"") >&5
12956 (eval $ac_compile) 2>&5
12958 echo "$as_me:12958: \$? = $ac_status" >&5
12959 (exit "$ac_status"); } &&
12960 { ac_try='test -s "conftest.$ac_objext"'
12961 { (eval echo "$as_me:12961: \"$ac_try\"") >&5
12962 (eval $ac_try) 2>&5
12964 echo "$as_me:12964: \$? = $ac_status" >&5
12965 (exit "$ac_status"); }; }; then
12966 cf_cv_posix_c_source=no
12968 echo "$as_me: failed program was:" >&5
12969 cat "conftest.$ac_ext" >&5
12970 cf_want_posix_source=no
12971 case .$cf_POSIX_C_SOURCE in
12973 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12976 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12977 cf_want_posix_source=yes
12980 cf_want_posix_source=yes
12983 if test "$cf_want_posix_source" = yes ; then
12984 cat >"conftest.$ac_ext" <<_ACEOF
12985 #line 12985 "configure"
12986 #include "confdefs.h"
12987 #include <sys/types.h>
12992 #ifdef _POSIX_SOURCE
12999 rm -f "conftest.$ac_objext"
13000 if { (eval echo "$as_me:13000: \"$ac_compile\"") >&5
13001 (eval $ac_compile) 2>&5
13003 echo "$as_me:13003: \$? = $ac_status" >&5
13004 (exit "$ac_status"); } &&
13005 { ac_try='test -s "conftest.$ac_objext"'
13006 { (eval echo "$as_me:13006: \"$ac_try\"") >&5
13007 (eval $ac_try) 2>&5
13009 echo "$as_me:13009: \$? = $ac_status" >&5
13010 (exit "$ac_status"); }; }; then
13013 echo "$as_me: failed program was:" >&5
13014 cat "conftest.$ac_ext" >&5
13015 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13017 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13020 echo "${as_me:-configure}:13020: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13022 CFLAGS="$cf_trim_CFLAGS"
13023 CPPFLAGS="$cf_trim_CPPFLAGS"
13025 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13026 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13028 echo "${as_me:-configure}:13028: testing if the second compile does not leave our definition intact error ..." 1>&5
13030 cat >"conftest.$ac_ext" <<_ACEOF
13031 #line 13031 "configure"
13032 #include "confdefs.h"
13033 #include <sys/types.h>
13038 #ifndef _POSIX_C_SOURCE
13045 rm -f "conftest.$ac_objext"
13046 if { (eval echo "$as_me:13046: \"$ac_compile\"") >&5
13047 (eval $ac_compile) 2>&5
13049 echo "$as_me:13049: \$? = $ac_status" >&5
13050 (exit "$ac_status"); } &&
13051 { ac_try='test -s "conftest.$ac_objext"'
13052 { (eval echo "$as_me:13052: \"$ac_try\"") >&5
13053 (eval $ac_try) 2>&5
13055 echo "$as_me:13055: \$? = $ac_status" >&5
13056 (exit "$ac_status"); }; }; then
13059 echo "$as_me: failed program was:" >&5
13060 cat "conftest.$ac_ext" >&5
13061 cf_cv_posix_c_source=no
13063 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13064 CFLAGS="$cf_save_CFLAGS"
13065 CPPFLAGS="$cf_save_CPPFLAGS"
13068 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13071 echo "$as_me:13071: result: $cf_cv_posix_c_source" >&5
13072 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13074 if test "$cf_cv_posix_c_source" != no ; then
13075 CFLAGS="$cf_trim_CFLAGS"
13076 CPPFLAGS="$cf_trim_CPPFLAGS"
13081 cf_new_extra_cppflags=
13083 for cf_add_cflags in $cf_cv_posix_c_source
13085 case "$cf_fix_cppflags" in
13087 case "$cf_add_cflags" in
13088 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13089 case "$cf_add_cflags" in
13091 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13093 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13094 && test -z "${cf_tst_cflags}" \
13095 && cf_fix_cppflags=yes
13097 if test "$cf_fix_cppflags" = yes ; then
13099 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13100 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13103 elif test "${cf_tst_cflags}" = "\"'" ; then
13105 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13106 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13112 case "$CPPFLAGS" in
13116 case "$cf_add_cflags" in
13118 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13120 CPPFLAGS=`echo "$CPPFLAGS" | \
13121 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13122 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13127 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13128 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13135 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13136 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13143 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13144 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13146 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13148 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13149 && test -z "${cf_tst_cflags}" \
13150 && cf_fix_cppflags=no
13155 if test -n "$cf_new_cflags" ; then
13157 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13158 CFLAGS="${CFLAGS}$cf_new_cflags"
13162 if test -n "$cf_new_cppflags" ; then
13164 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13165 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13169 if test -n "$cf_new_extra_cppflags" ; then
13171 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13172 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13178 fi # cf_cv_posix_visible
13182 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
13185 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
13186 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
13187 # Abusing the conformance level is a workaround.
13188 { echo "$as_me:13188: WARNING: this system does not provide usable locale support" >&5
13189 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
13190 cf_xopen_source="-D_BSD_SOURCE"
13191 cf_XOPEN_SOURCE=700
13194 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
13195 cf_xopen_source="-D_BSD_SOURCE"
13196 cf_XOPEN_SOURCE=600
13199 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
13202 cf_xopen_source="-D_OSF_SOURCE"
13205 cf_xopen_source="-D_QNX_SOURCE"
13208 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
13211 cf_xopen_source="-D__EXTENSIONS__"
13212 cf_cv_xopen_source=broken
13214 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
13220 echo "$as_me:13220: checking if we should define _XOPEN_SOURCE" >&5
13221 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13222 if test "${cf_cv_xopen_source+set}" = set; then
13223 echo $ECHO_N "(cached) $ECHO_C" >&6
13226 cat >"conftest.$ac_ext" <<_ACEOF
13227 #line 13227 "configure"
13228 #include "confdefs.h"
13230 #include <stdlib.h>
13231 #include <string.h>
13232 #include <sys/types.h>
13238 #ifndef _XOPEN_SOURCE
13245 rm -f "conftest.$ac_objext"
13246 if { (eval echo "$as_me:13246: \"$ac_compile\"") >&5
13247 (eval $ac_compile) 2>&5
13249 echo "$as_me:13249: \$? = $ac_status" >&5
13250 (exit "$ac_status"); } &&
13251 { ac_try='test -s "conftest.$ac_objext"'
13252 { (eval echo "$as_me:13252: \"$ac_try\"") >&5
13253 (eval $ac_try) 2>&5
13255 echo "$as_me:13255: \$? = $ac_status" >&5
13256 (exit "$ac_status"); }; }; then
13257 cf_cv_xopen_source=no
13259 echo "$as_me: failed program was:" >&5
13260 cat "conftest.$ac_ext" >&5
13261 cf_save="$CPPFLAGS"
13263 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13264 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13266 cat >"conftest.$ac_ext" <<_ACEOF
13267 #line 13267 "configure"
13268 #include "confdefs.h"
13270 #include <stdlib.h>
13271 #include <string.h>
13272 #include <sys/types.h>
13278 #ifdef _XOPEN_SOURCE
13285 rm -f "conftest.$ac_objext"
13286 if { (eval echo "$as_me:13286: \"$ac_compile\"") >&5
13287 (eval $ac_compile) 2>&5
13289 echo "$as_me:13289: \$? = $ac_status" >&5
13290 (exit "$ac_status"); } &&
13291 { ac_try='test -s "conftest.$ac_objext"'
13292 { (eval echo "$as_me:13292: \"$ac_try\"") >&5
13293 (eval $ac_try) 2>&5
13295 echo "$as_me:13295: \$? = $ac_status" >&5
13296 (exit "$ac_status"); }; }; then
13297 cf_cv_xopen_source=no
13299 echo "$as_me: failed program was:" >&5
13300 cat "conftest.$ac_ext" >&5
13301 cf_cv_xopen_source=$cf_XOPEN_SOURCE
13303 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13304 CPPFLAGS="$cf_save"
13307 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13310 echo "$as_me:13310: result: $cf_cv_xopen_source" >&5
13311 echo "${ECHO_T}$cf_cv_xopen_source" >&6
13313 if test "$cf_cv_xopen_source" != no ; then
13315 CFLAGS=`echo "$CFLAGS" | \
13316 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13317 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13319 CPPFLAGS=`echo "$CPPFLAGS" | \
13320 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13321 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13323 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13325 for cf_add_cflags in $cf_temp_xopen_source
13327 case "x$cf_add_cflags" in
13330 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13333 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'`
13334 test "$CFLAGS" != "$cf_old_cflag" || break
13336 CFLAGS="$cf_old_cflag"
13339 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13342 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'`
13343 test "$CPPFLAGS" != "$cf_old_cflag" || break
13345 CPPFLAGS="$cf_old_cflag"
13354 cf_new_extra_cppflags=
13356 for cf_add_cflags in $cf_add_cflags
13358 case "$cf_fix_cppflags" in
13360 case "$cf_add_cflags" in
13361 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13362 case "$cf_add_cflags" in
13364 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13366 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13367 && test -z "${cf_tst_cflags}" \
13368 && cf_fix_cppflags=yes
13370 if test "$cf_fix_cppflags" = yes ; then
13372 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13373 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13376 elif test "${cf_tst_cflags}" = "\"'" ; then
13378 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13379 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13385 case "$CPPFLAGS" in
13389 case "$cf_add_cflags" in
13391 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13393 CPPFLAGS=`echo "$CPPFLAGS" | \
13394 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13395 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13400 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13401 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13408 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13409 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13416 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13417 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13419 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13421 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13422 && test -z "${cf_tst_cflags}" \
13423 && cf_fix_cppflags=no
13428 if test -n "$cf_new_cflags" ; then
13430 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13431 CFLAGS="${CFLAGS}$cf_new_cflags"
13435 if test -n "$cf_new_cppflags" ; then
13437 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13438 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13442 if test -n "$cf_new_extra_cppflags" ; then
13444 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13445 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13453 if test "$cf_cv_posix_visible" = no; then
13455 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
13457 cf_save_CFLAGS="$CFLAGS"
13458 cf_save_CPPFLAGS="$CPPFLAGS"
13460 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13461 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13462 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13464 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13465 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13466 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13468 echo "$as_me:13468: checking if we should define _POSIX_C_SOURCE" >&5
13469 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13470 if test "${cf_cv_posix_c_source+set}" = set; then
13471 echo $ECHO_N "(cached) $ECHO_C" >&6
13474 echo "${as_me:-configure}:13474: testing if the symbol is already defined go no further ..." 1>&5
13476 cat >"conftest.$ac_ext" <<_ACEOF
13477 #line 13477 "configure"
13478 #include "confdefs.h"
13479 #include <sys/types.h>
13484 #ifndef _POSIX_C_SOURCE
13491 rm -f "conftest.$ac_objext"
13492 if { (eval echo "$as_me:13492: \"$ac_compile\"") >&5
13493 (eval $ac_compile) 2>&5
13495 echo "$as_me:13495: \$? = $ac_status" >&5
13496 (exit "$ac_status"); } &&
13497 { ac_try='test -s "conftest.$ac_objext"'
13498 { (eval echo "$as_me:13498: \"$ac_try\"") >&5
13499 (eval $ac_try) 2>&5
13501 echo "$as_me:13501: \$? = $ac_status" >&5
13502 (exit "$ac_status"); }; }; then
13503 cf_cv_posix_c_source=no
13505 echo "$as_me: failed program was:" >&5
13506 cat "conftest.$ac_ext" >&5
13507 cf_want_posix_source=no
13508 case .$cf_POSIX_C_SOURCE in
13510 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13513 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13514 cf_want_posix_source=yes
13517 cf_want_posix_source=yes
13520 if test "$cf_want_posix_source" = yes ; then
13521 cat >"conftest.$ac_ext" <<_ACEOF
13522 #line 13522 "configure"
13523 #include "confdefs.h"
13524 #include <sys/types.h>
13529 #ifdef _POSIX_SOURCE
13536 rm -f "conftest.$ac_objext"
13537 if { (eval echo "$as_me:13537: \"$ac_compile\"") >&5
13538 (eval $ac_compile) 2>&5
13540 echo "$as_me:13540: \$? = $ac_status" >&5
13541 (exit "$ac_status"); } &&
13542 { ac_try='test -s "conftest.$ac_objext"'
13543 { (eval echo "$as_me:13543: \"$ac_try\"") >&5
13544 (eval $ac_try) 2>&5
13546 echo "$as_me:13546: \$? = $ac_status" >&5
13547 (exit "$ac_status"); }; }; then
13550 echo "$as_me: failed program was:" >&5
13551 cat "conftest.$ac_ext" >&5
13552 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13554 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13557 echo "${as_me:-configure}:13557: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13559 CFLAGS="$cf_trim_CFLAGS"
13560 CPPFLAGS="$cf_trim_CPPFLAGS"
13562 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13563 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13565 echo "${as_me:-configure}:13565: testing if the second compile does not leave our definition intact error ..." 1>&5
13567 cat >"conftest.$ac_ext" <<_ACEOF
13568 #line 13568 "configure"
13569 #include "confdefs.h"
13570 #include <sys/types.h>
13575 #ifndef _POSIX_C_SOURCE
13582 rm -f "conftest.$ac_objext"
13583 if { (eval echo "$as_me:13583: \"$ac_compile\"") >&5
13584 (eval $ac_compile) 2>&5
13586 echo "$as_me:13586: \$? = $ac_status" >&5
13587 (exit "$ac_status"); } &&
13588 { ac_try='test -s "conftest.$ac_objext"'
13589 { (eval echo "$as_me:13589: \"$ac_try\"") >&5
13590 (eval $ac_try) 2>&5
13592 echo "$as_me:13592: \$? = $ac_status" >&5
13593 (exit "$ac_status"); }; }; then
13596 echo "$as_me: failed program was:" >&5
13597 cat "conftest.$ac_ext" >&5
13598 cf_cv_posix_c_source=no
13600 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13601 CFLAGS="$cf_save_CFLAGS"
13602 CPPFLAGS="$cf_save_CPPFLAGS"
13605 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13608 echo "$as_me:13608: result: $cf_cv_posix_c_source" >&5
13609 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13611 if test "$cf_cv_posix_c_source" != no ; then
13612 CFLAGS="$cf_trim_CFLAGS"
13613 CPPFLAGS="$cf_trim_CPPFLAGS"
13618 cf_new_extra_cppflags=
13620 for cf_add_cflags in $cf_cv_posix_c_source
13622 case "$cf_fix_cppflags" in
13624 case "$cf_add_cflags" in
13625 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13626 case "$cf_add_cflags" in
13628 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13630 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13631 && test -z "${cf_tst_cflags}" \
13632 && cf_fix_cppflags=yes
13634 if test "$cf_fix_cppflags" = yes ; then
13636 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13637 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13640 elif test "${cf_tst_cflags}" = "\"'" ; then
13642 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13643 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13649 case "$CPPFLAGS" in
13653 case "$cf_add_cflags" in
13655 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13657 CPPFLAGS=`echo "$CPPFLAGS" | \
13658 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13659 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13664 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13665 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13672 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13673 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13680 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13681 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13683 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13685 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13686 && test -z "${cf_tst_cflags}" \
13687 && cf_fix_cppflags=no
13692 if test -n "$cf_new_cflags" ; then
13694 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13695 CFLAGS="${CFLAGS}$cf_new_cflags"
13699 if test -n "$cf_new_cppflags" ; then
13701 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13702 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13706 if test -n "$cf_new_extra_cppflags" ; then
13708 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13709 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13715 fi # cf_cv_posix_visible
13720 if test -n "$cf_xopen_source" ; then
13722 for cf_add_cflags in $cf_xopen_source
13724 case "x$cf_add_cflags" in
13727 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13730 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'`
13731 test "$CFLAGS" != "$cf_old_cflag" || break
13732 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
13734 echo "${as_me:-configure}:13734: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
13736 CFLAGS="$cf_old_cflag"
13739 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13742 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'`
13743 test "$CPPFLAGS" != "$cf_old_cflag" || break
13744 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
13746 echo "${as_me:-configure}:13746: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
13748 CPPFLAGS="$cf_old_cflag"
13757 cf_new_extra_cppflags=
13759 for cf_add_cflags in $cf_add_cflags
13761 case "$cf_fix_cppflags" in
13763 case "$cf_add_cflags" in
13764 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13765 case "$cf_add_cflags" in
13767 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13769 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13770 && test -z "${cf_tst_cflags}" \
13771 && cf_fix_cppflags=yes
13773 if test "$cf_fix_cppflags" = yes ; then
13775 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13776 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13779 elif test "${cf_tst_cflags}" = "\"'" ; then
13781 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13782 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13788 case "$CPPFLAGS" in
13792 case "$cf_add_cflags" in
13794 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13796 CPPFLAGS=`echo "$CPPFLAGS" | \
13797 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13798 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13803 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13804 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13811 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13812 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13819 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13820 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13822 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13824 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13825 && test -z "${cf_tst_cflags}" \
13826 && cf_fix_cppflags=no
13831 if test -n "$cf_new_cflags" ; then
13832 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13834 echo "${as_me:-configure}:13834: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13836 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13837 CFLAGS="${CFLAGS}$cf_new_cflags"
13841 if test -n "$cf_new_cppflags" ; then
13842 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13844 echo "${as_me:-configure}:13844: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13846 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13847 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13851 if test -n "$cf_new_extra_cppflags" ; then
13852 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13854 echo "${as_me:-configure}:13854: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13856 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13857 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13865 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
13866 echo "$as_me:13866: checking if _XOPEN_SOURCE really is set" >&5
13867 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
13868 cat >"conftest.$ac_ext" <<_ACEOF
13869 #line 13869 "configure"
13870 #include "confdefs.h"
13871 #include <stdlib.h>
13876 #ifndef _XOPEN_SOURCE
13883 rm -f "conftest.$ac_objext"
13884 if { (eval echo "$as_me:13884: \"$ac_compile\"") >&5
13885 (eval $ac_compile) 2>&5
13887 echo "$as_me:13887: \$? = $ac_status" >&5
13888 (exit "$ac_status"); } &&
13889 { ac_try='test -s "conftest.$ac_objext"'
13890 { (eval echo "$as_me:13890: \"$ac_try\"") >&5
13891 (eval $ac_try) 2>&5
13893 echo "$as_me:13893: \$? = $ac_status" >&5
13894 (exit "$ac_status"); }; }; then
13895 cf_XOPEN_SOURCE_set=yes
13897 echo "$as_me: failed program was:" >&5
13898 cat "conftest.$ac_ext" >&5
13899 cf_XOPEN_SOURCE_set=no
13901 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13902 echo "$as_me:13902: result: $cf_XOPEN_SOURCE_set" >&5
13903 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
13904 if test "$cf_XOPEN_SOURCE_set" = yes
13906 cat >"conftest.$ac_ext" <<_ACEOF
13907 #line 13907 "configure"
13908 #include "confdefs.h"
13909 #include <stdlib.h>
13914 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
13921 rm -f "conftest.$ac_objext"
13922 if { (eval echo "$as_me:13922: \"$ac_compile\"") >&5
13923 (eval $ac_compile) 2>&5
13925 echo "$as_me:13925: \$? = $ac_status" >&5
13926 (exit "$ac_status"); } &&
13927 { ac_try='test -s "conftest.$ac_objext"'
13928 { (eval echo "$as_me:13928: \"$ac_try\"") >&5
13929 (eval $ac_try) 2>&5
13931 echo "$as_me:13931: \$? = $ac_status" >&5
13932 (exit "$ac_status"); }; }; then
13933 cf_XOPEN_SOURCE_set_ok=yes
13935 echo "$as_me: failed program was:" >&5
13936 cat "conftest.$ac_ext" >&5
13937 cf_XOPEN_SOURCE_set_ok=no
13939 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13940 if test "$cf_XOPEN_SOURCE_set_ok" = no
13942 { echo "$as_me:13942: WARNING: _XOPEN_SOURCE is lower than requested" >&5
13943 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
13947 echo "$as_me:13947: checking if we should define _XOPEN_SOURCE" >&5
13948 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13949 if test "${cf_cv_xopen_source+set}" = set; then
13950 echo $ECHO_N "(cached) $ECHO_C" >&6
13953 cat >"conftest.$ac_ext" <<_ACEOF
13954 #line 13954 "configure"
13955 #include "confdefs.h"
13957 #include <stdlib.h>
13958 #include <string.h>
13959 #include <sys/types.h>
13965 #ifndef _XOPEN_SOURCE
13972 rm -f "conftest.$ac_objext"
13973 if { (eval echo "$as_me:13973: \"$ac_compile\"") >&5
13974 (eval $ac_compile) 2>&5
13976 echo "$as_me:13976: \$? = $ac_status" >&5
13977 (exit "$ac_status"); } &&
13978 { ac_try='test -s "conftest.$ac_objext"'
13979 { (eval echo "$as_me:13979: \"$ac_try\"") >&5
13980 (eval $ac_try) 2>&5
13982 echo "$as_me:13982: \$? = $ac_status" >&5
13983 (exit "$ac_status"); }; }; then
13984 cf_cv_xopen_source=no
13986 echo "$as_me: failed program was:" >&5
13987 cat "conftest.$ac_ext" >&5
13988 cf_save="$CPPFLAGS"
13990 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13991 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13993 cat >"conftest.$ac_ext" <<_ACEOF
13994 #line 13994 "configure"
13995 #include "confdefs.h"
13997 #include <stdlib.h>
13998 #include <string.h>
13999 #include <sys/types.h>
14005 #ifdef _XOPEN_SOURCE
14012 rm -f "conftest.$ac_objext"
14013 if { (eval echo "$as_me:14013: \"$ac_compile\"") >&5
14014 (eval $ac_compile) 2>&5
14016 echo "$as_me:14016: \$? = $ac_status" >&5
14017 (exit "$ac_status"); } &&
14018 { ac_try='test -s "conftest.$ac_objext"'
14019 { (eval echo "$as_me:14019: \"$ac_try\"") >&5
14020 (eval $ac_try) 2>&5
14022 echo "$as_me:14022: \$? = $ac_status" >&5
14023 (exit "$ac_status"); }; }; then
14024 cf_cv_xopen_source=no
14026 echo "$as_me: failed program was:" >&5
14027 cat "conftest.$ac_ext" >&5
14028 cf_cv_xopen_source=$cf_XOPEN_SOURCE
14030 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14031 CPPFLAGS="$cf_save"
14034 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14037 echo "$as_me:14037: result: $cf_cv_xopen_source" >&5
14038 echo "${ECHO_T}$cf_cv_xopen_source" >&6
14040 if test "$cf_cv_xopen_source" != no ; then
14042 CFLAGS=`echo "$CFLAGS" | \
14043 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14044 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14046 CPPFLAGS=`echo "$CPPFLAGS" | \
14047 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14048 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14050 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
14052 for cf_add_cflags in $cf_temp_xopen_source
14054 case "x$cf_add_cflags" in
14057 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14060 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'`
14061 test "$CFLAGS" != "$cf_old_cflag" || break
14063 CFLAGS="$cf_old_cflag"
14066 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14069 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'`
14070 test "$CPPFLAGS" != "$cf_old_cflag" || break
14072 CPPFLAGS="$cf_old_cflag"
14081 cf_new_extra_cppflags=
14083 for cf_add_cflags in $cf_add_cflags
14085 case "$cf_fix_cppflags" in
14087 case "$cf_add_cflags" in
14088 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14089 case "$cf_add_cflags" in
14091 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14093 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14094 && test -z "${cf_tst_cflags}" \
14095 && cf_fix_cppflags=yes
14097 if test "$cf_fix_cppflags" = yes ; then
14099 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14100 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14103 elif test "${cf_tst_cflags}" = "\"'" ; then
14105 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14106 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14112 case "$CPPFLAGS" in
14116 case "$cf_add_cflags" in
14118 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14120 CPPFLAGS=`echo "$CPPFLAGS" | \
14121 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14122 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14127 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14128 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14135 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14136 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14143 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14144 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14146 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14148 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14149 && test -z "${cf_tst_cflags}" \
14150 && cf_fix_cppflags=no
14155 if test -n "$cf_new_cflags" ; then
14157 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14158 CFLAGS="${CFLAGS}$cf_new_cflags"
14162 if test -n "$cf_new_cppflags" ; then
14164 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14165 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14169 if test -n "$cf_new_extra_cppflags" ; then
14171 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14172 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14182 fi # cf_cv_posix_visible
14184 # Check whether --enable-largefile or --disable-largefile was given.
14185 if test "${enable_largefile+set}" = set; then
14186 enableval="$enable_largefile"
14189 if test "$enable_largefile" != no; then
14191 echo "$as_me:14191: checking for special C compiler options needed for large files" >&5
14192 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
14193 if test "${ac_cv_sys_largefile_CC+set}" = set; then
14194 echo $ECHO_N "(cached) $ECHO_C" >&6
14196 ac_cv_sys_largefile_CC=no
14197 if test "$GCC" != yes; then
14200 # IRIX 6.2 and later do not support large files by default,
14201 # so use the C compiler's -n32 option if that helps.
14202 cat >"conftest.$ac_ext" <<_ACEOF
14203 #line 14203 "configure"
14204 #include "confdefs.h"
14205 #include <sys/types.h>
14206 /* Check that off_t can represent 2**63 - 1 correctly.
14207 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14208 since some C++ compilers masquerading as C compilers
14209 incorrectly reject 9223372036854775807. */
14210 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14211 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14212 && LARGE_OFF_T % 2147483647 == 1)
14222 rm -f "conftest.$ac_objext"
14223 if { (eval echo "$as_me:14223: \"$ac_compile\"") >&5
14224 (eval $ac_compile) 2>&5
14226 echo "$as_me:14226: \$? = $ac_status" >&5
14227 (exit "$ac_status"); } &&
14228 { ac_try='test -s "conftest.$ac_objext"'
14229 { (eval echo "$as_me:14229: \"$ac_try\"") >&5
14230 (eval $ac_try) 2>&5
14232 echo "$as_me:14232: \$? = $ac_status" >&5
14233 (exit "$ac_status"); }; }; then
14236 echo "$as_me: failed program was:" >&5
14237 cat "conftest.$ac_ext" >&5
14239 rm -f "conftest.$ac_objext"
14241 rm -f "conftest.$ac_objext"
14242 if { (eval echo "$as_me:14242: \"$ac_compile\"") >&5
14243 (eval $ac_compile) 2>&5
14245 echo "$as_me:14245: \$? = $ac_status" >&5
14246 (exit "$ac_status"); } &&
14247 { ac_try='test -s "conftest.$ac_objext"'
14248 { (eval echo "$as_me:14248: \"$ac_try\"") >&5
14249 (eval $ac_try) 2>&5
14251 echo "$as_me:14251: \$? = $ac_status" >&5
14252 (exit "$ac_status"); }; }; then
14253 ac_cv_sys_largefile_CC=' -n32'; break
14255 echo "$as_me: failed program was:" >&5
14256 cat "conftest.$ac_ext" >&5
14258 rm -f "conftest.$ac_objext"
14262 rm -f "conftest.$ac_ext"
14265 echo "$as_me:14265: result: $ac_cv_sys_largefile_CC" >&5
14266 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
14267 if test "$ac_cv_sys_largefile_CC" != no; then
14268 CC=$CC$ac_cv_sys_largefile_CC
14271 echo "$as_me:14271: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14272 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
14273 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
14274 echo $ECHO_N "(cached) $ECHO_C" >&6
14277 ac_cv_sys_file_offset_bits=no
14278 cat >"conftest.$ac_ext" <<_ACEOF
14279 #line 14279 "configure"
14280 #include "confdefs.h"
14281 #include <sys/types.h>
14282 /* Check that off_t can represent 2**63 - 1 correctly.
14283 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14284 since some C++ compilers masquerading as C compilers
14285 incorrectly reject 9223372036854775807. */
14286 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14287 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14288 && LARGE_OFF_T % 2147483647 == 1)
14298 rm -f "conftest.$ac_objext"
14299 if { (eval echo "$as_me:14299: \"$ac_compile\"") >&5
14300 (eval $ac_compile) 2>&5
14302 echo "$as_me:14302: \$? = $ac_status" >&5
14303 (exit "$ac_status"); } &&
14304 { ac_try='test -s "conftest.$ac_objext"'
14305 { (eval echo "$as_me:14305: \"$ac_try\"") >&5
14306 (eval $ac_try) 2>&5
14308 echo "$as_me:14308: \$? = $ac_status" >&5
14309 (exit "$ac_status"); }; }; then
14312 echo "$as_me: failed program was:" >&5
14313 cat "conftest.$ac_ext" >&5
14315 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14316 cat >"conftest.$ac_ext" <<_ACEOF
14317 #line 14317 "configure"
14318 #include "confdefs.h"
14319 #define _FILE_OFFSET_BITS 64
14320 #include <sys/types.h>
14321 /* Check that off_t can represent 2**63 - 1 correctly.
14322 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14323 since some C++ compilers masquerading as C compilers
14324 incorrectly reject 9223372036854775807. */
14325 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14326 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14327 && LARGE_OFF_T % 2147483647 == 1)
14337 rm -f "conftest.$ac_objext"
14338 if { (eval echo "$as_me:14338: \"$ac_compile\"") >&5
14339 (eval $ac_compile) 2>&5
14341 echo "$as_me:14341: \$? = $ac_status" >&5
14342 (exit "$ac_status"); } &&
14343 { ac_try='test -s "conftest.$ac_objext"'
14344 { (eval echo "$as_me:14344: \"$ac_try\"") >&5
14345 (eval $ac_try) 2>&5
14347 echo "$as_me:14347: \$? = $ac_status" >&5
14348 (exit "$ac_status"); }; }; then
14349 ac_cv_sys_file_offset_bits=64; break
14351 echo "$as_me: failed program was:" >&5
14352 cat "conftest.$ac_ext" >&5
14354 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14358 echo "$as_me:14358: result: $ac_cv_sys_file_offset_bits" >&5
14359 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14360 if test "$ac_cv_sys_file_offset_bits" != no; then
14362 cat >>confdefs.h <<EOF
14363 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14368 echo "$as_me:14368: checking for _LARGE_FILES value needed for large files" >&5
14369 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14370 if test "${ac_cv_sys_large_files+set}" = set; then
14371 echo $ECHO_N "(cached) $ECHO_C" >&6
14374 ac_cv_sys_large_files=no
14375 cat >"conftest.$ac_ext" <<_ACEOF
14376 #line 14376 "configure"
14377 #include "confdefs.h"
14378 #include <sys/types.h>
14379 /* Check that off_t can represent 2**63 - 1 correctly.
14380 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14381 since some C++ compilers masquerading as C compilers
14382 incorrectly reject 9223372036854775807. */
14383 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14384 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14385 && LARGE_OFF_T % 2147483647 == 1)
14395 rm -f "conftest.$ac_objext"
14396 if { (eval echo "$as_me:14396: \"$ac_compile\"") >&5
14397 (eval $ac_compile) 2>&5
14399 echo "$as_me:14399: \$? = $ac_status" >&5
14400 (exit "$ac_status"); } &&
14401 { ac_try='test -s "conftest.$ac_objext"'
14402 { (eval echo "$as_me:14402: \"$ac_try\"") >&5
14403 (eval $ac_try) 2>&5
14405 echo "$as_me:14405: \$? = $ac_status" >&5
14406 (exit "$ac_status"); }; }; then
14409 echo "$as_me: failed program was:" >&5
14410 cat "conftest.$ac_ext" >&5
14412 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14413 cat >"conftest.$ac_ext" <<_ACEOF
14414 #line 14414 "configure"
14415 #include "confdefs.h"
14416 #define _LARGE_FILES 1
14417 #include <sys/types.h>
14418 /* Check that off_t can represent 2**63 - 1 correctly.
14419 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14420 since some C++ compilers masquerading as C compilers
14421 incorrectly reject 9223372036854775807. */
14422 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14423 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14424 && LARGE_OFF_T % 2147483647 == 1)
14434 rm -f "conftest.$ac_objext"
14435 if { (eval echo "$as_me:14435: \"$ac_compile\"") >&5
14436 (eval $ac_compile) 2>&5
14438 echo "$as_me:14438: \$? = $ac_status" >&5
14439 (exit "$ac_status"); } &&
14440 { ac_try='test -s "conftest.$ac_objext"'
14441 { (eval echo "$as_me:14441: \"$ac_try\"") >&5
14442 (eval $ac_try) 2>&5
14444 echo "$as_me:14444: \$? = $ac_status" >&5
14445 (exit "$ac_status"); }; }; then
14446 ac_cv_sys_large_files=1; break
14448 echo "$as_me: failed program was:" >&5
14449 cat "conftest.$ac_ext" >&5
14451 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14455 echo "$as_me:14455: result: $ac_cv_sys_large_files" >&5
14456 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14457 if test "$ac_cv_sys_large_files" != no; then
14459 cat >>confdefs.h <<EOF
14460 #define _LARGE_FILES $ac_cv_sys_large_files
14467 if test "$enable_largefile" != no ; then
14468 echo "$as_me:14468: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14469 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14470 if test "${ac_cv_sys_largefile_source+set}" = set; then
14471 echo $ECHO_N "(cached) $ECHO_C" >&6
14474 ac_cv_sys_largefile_source=no
14475 cat >"conftest.$ac_ext" <<_ACEOF
14476 #line 14476 "configure"
14477 #include "confdefs.h"
14487 rm -f "conftest.$ac_objext"
14488 if { (eval echo "$as_me:14488: \"$ac_compile\"") >&5
14489 (eval $ac_compile) 2>&5
14491 echo "$as_me:14491: \$? = $ac_status" >&5
14492 (exit "$ac_status"); } &&
14493 { ac_try='test -s "conftest.$ac_objext"'
14494 { (eval echo "$as_me:14494: \"$ac_try\"") >&5
14495 (eval $ac_try) 2>&5
14497 echo "$as_me:14497: \$? = $ac_status" >&5
14498 (exit "$ac_status"); }; }; then
14501 echo "$as_me: failed program was:" >&5
14502 cat "conftest.$ac_ext" >&5
14504 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14505 cat >"conftest.$ac_ext" <<_ACEOF
14506 #line 14506 "configure"
14507 #include "confdefs.h"
14508 #define _LARGEFILE_SOURCE 1
14518 rm -f "conftest.$ac_objext"
14519 if { (eval echo "$as_me:14519: \"$ac_compile\"") >&5
14520 (eval $ac_compile) 2>&5
14522 echo "$as_me:14522: \$? = $ac_status" >&5
14523 (exit "$ac_status"); } &&
14524 { ac_try='test -s "conftest.$ac_objext"'
14525 { (eval echo "$as_me:14525: \"$ac_try\"") >&5
14526 (eval $ac_try) 2>&5
14528 echo "$as_me:14528: \$? = $ac_status" >&5
14529 (exit "$ac_status"); }; }; then
14530 ac_cv_sys_largefile_source=1; break
14532 echo "$as_me: failed program was:" >&5
14533 cat "conftest.$ac_ext" >&5
14535 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14539 echo "$as_me:14539: result: $ac_cv_sys_largefile_source" >&5
14540 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14541 if test "$ac_cv_sys_largefile_source" != no; then
14543 cat >>confdefs.h <<EOF
14544 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14550 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14551 # in glibc 2.1.3, but that breaks too many other things.
14552 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14553 echo "$as_me:14553: checking for fseeko" >&5
14554 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14555 if test "${ac_cv_func_fseeko+set}" = set; then
14556 echo $ECHO_N "(cached) $ECHO_C" >&6
14558 cat >"conftest.$ac_ext" <<_ACEOF
14559 #line 14559 "configure"
14560 #include "confdefs.h"
14565 return fseeko && fseeko (stdin, 0, 0);
14570 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14571 if { (eval echo "$as_me:14571: \"$ac_link\"") >&5
14572 (eval $ac_link) 2>&5
14574 echo "$as_me:14574: \$? = $ac_status" >&5
14575 (exit "$ac_status"); } &&
14576 { ac_try='test -s "conftest$ac_exeext"'
14577 { (eval echo "$as_me:14577: \"$ac_try\"") >&5
14578 (eval $ac_try) 2>&5
14580 echo "$as_me:14580: \$? = $ac_status" >&5
14581 (exit "$ac_status"); }; }; then
14582 ac_cv_func_fseeko=yes
14584 echo "$as_me: failed program was:" >&5
14585 cat "conftest.$ac_ext" >&5
14586 ac_cv_func_fseeko=no
14588 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14590 echo "$as_me:14590: result: $ac_cv_func_fseeko" >&5
14591 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14592 if test $ac_cv_func_fseeko = yes; then
14594 cat >>confdefs.h <<\EOF
14595 #define HAVE_FSEEKO 1
14600 # Normally we would collect these definitions in the config.h,
14601 # but (like _XOPEN_SOURCE), some environments rely on having these
14602 # defined before any of the system headers are included. Another
14603 # case comes up with C++, e.g., on AIX the compiler compiles the
14604 # header files by themselves before looking at the body files it is
14605 # told to compile. For ncurses, those header files do not include
14607 if test "$ac_cv_sys_large_files" != no
14610 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14611 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14614 if test "$ac_cv_sys_largefile_source" != no
14617 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14618 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14621 if test "$ac_cv_sys_file_offset_bits" != no
14624 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14625 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14629 echo "$as_me:14629: checking whether to use struct dirent64" >&5
14630 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14631 if test "${cf_cv_struct_dirent64+set}" = set; then
14632 echo $ECHO_N "(cached) $ECHO_C" >&6
14635 cat >"conftest.$ac_ext" <<_ACEOF
14636 #line 14636 "configure"
14637 #include "confdefs.h"
14639 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14640 #include <sys/types.h>
14641 #include <dirent.h>
14647 /* if transitional largefile support is setup, this is true */
14648 extern struct dirent64 * readdir(DIR *);
14649 struct dirent64 *x = readdir((DIR *)0);
14650 struct dirent *y = readdir((DIR *)0);
14658 rm -f "conftest.$ac_objext"
14659 if { (eval echo "$as_me:14659: \"$ac_compile\"") >&5
14660 (eval $ac_compile) 2>&5
14662 echo "$as_me:14662: \$? = $ac_status" >&5
14663 (exit "$ac_status"); } &&
14664 { ac_try='test -s "conftest.$ac_objext"'
14665 { (eval echo "$as_me:14665: \"$ac_try\"") >&5
14666 (eval $ac_try) 2>&5
14668 echo "$as_me:14668: \$? = $ac_status" >&5
14669 (exit "$ac_status"); }; }; then
14670 cf_cv_struct_dirent64=yes
14672 echo "$as_me: failed program was:" >&5
14673 cat "conftest.$ac_ext" >&5
14674 cf_cv_struct_dirent64=no
14676 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14679 echo "$as_me:14679: result: $cf_cv_struct_dirent64" >&5
14680 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14681 test "$cf_cv_struct_dirent64" = yes &&
14682 cat >>confdefs.h <<\EOF
14683 #define HAVE_STRUCT_DIRENT64 1
14688 ### Enable compiling-in rcs id's
14689 echo "$as_me:14689: checking if RCS identifiers should be compiled-in" >&5
14690 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14692 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14693 if test "${with_rcs_ids+set}" = set; then
14694 withval="$with_rcs_ids"
14695 with_rcs_ids=$withval
14699 echo "$as_me:14699: result: $with_rcs_ids" >&5
14700 echo "${ECHO_T}$with_rcs_ids" >&6
14701 test "$with_rcs_ids" = yes &&
14702 cat >>confdefs.h <<\EOF
14703 #define USE_RCS_IDS 1
14706 ###############################################################################
14708 ### Note that some functions (such as const) are normally disabled anyway.
14709 echo "$as_me:14709: checking if you want to build with function extensions" >&5
14710 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14712 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14713 if test "${enable_ext_funcs+set}" = set; then
14714 enableval="$enable_ext_funcs"
14715 with_ext_funcs=$enableval
14719 echo "$as_me:14719: result: $with_ext_funcs" >&5
14720 echo "${ECHO_T}$with_ext_funcs" >&6
14721 if test "$with_ext_funcs" = yes ; then
14722 NCURSES_EXT_FUNCS=1
14724 cat >>confdefs.h <<\EOF
14725 #define HAVE_USE_DEFAULT_COLORS 1
14728 cat >>confdefs.h <<\EOF
14729 #define NCURSES_EXT_FUNCS 1
14733 NCURSES_EXT_FUNCS=0
14736 ### use option --enable-const to turn on use of const beyond that in XSI.
14737 echo "$as_me:14737: checking for extended use of const keyword" >&5
14738 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14740 # Check whether --enable-const or --disable-const was given.
14741 if test "${enable_const+set}" = set; then
14742 enableval="$enable_const"
14743 with_ext_const=$enableval
14747 echo "$as_me:14747: result: $with_ext_const" >&5
14748 echo "${ECHO_T}$with_ext_const" >&6
14749 NCURSES_CONST='/*nothing*/'
14750 if test "$with_ext_const" = yes ; then
14751 NCURSES_CONST=const
14754 ###############################################################################
14755 # These options are relatively safe to experiment with.
14757 echo "$as_me:14757: checking if you want all development code" >&5
14758 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14760 # Check whether --with-develop or --without-develop was given.
14761 if test "${with_develop+set}" = set; then
14762 withval="$with_develop"
14763 with_develop=$withval
14767 echo "$as_me:14767: result: $with_develop" >&5
14768 echo "${ECHO_T}$with_develop" >&6
14770 ###############################################################################
14771 # These are just experimental, probably should not be in a package:
14773 # This is still experimental (20080329), but should ultimately be moved to
14774 # the script-block --with-normal, etc.
14776 echo "$as_me:14776: checking if you want to link with the pthread library" >&5
14777 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14779 # Check whether --with-pthread or --without-pthread was given.
14780 if test "${with_pthread+set}" = set; then
14781 withval="$with_pthread"
14782 with_pthread=$withval
14786 echo "$as_me:14786: result: $with_pthread" >&5
14787 echo "${ECHO_T}$with_pthread" >&6
14789 if test "$with_pthread" != no ; then
14790 echo "$as_me:14790: checking for pthread.h" >&5
14791 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14792 if test "${ac_cv_header_pthread_h+set}" = set; then
14793 echo $ECHO_N "(cached) $ECHO_C" >&6
14795 cat >"conftest.$ac_ext" <<_ACEOF
14796 #line 14796 "configure"
14797 #include "confdefs.h"
14798 #include <pthread.h>
14800 if { (eval echo "$as_me:14800: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14801 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14803 $EGREP -v '^ *\+' conftest.er1 >conftest.err
14805 cat conftest.err >&5
14806 echo "$as_me:14806: \$? = $ac_status" >&5
14807 (exit "$ac_status"); } >/dev/null; then
14808 if test -s conftest.err; then
14809 ac_cpp_err=$ac_c_preproc_warn_flag
14816 if test -z "$ac_cpp_err"; then
14817 ac_cv_header_pthread_h=yes
14819 echo "$as_me: failed program was:" >&5
14820 cat "conftest.$ac_ext" >&5
14821 ac_cv_header_pthread_h=no
14823 rm -f conftest.err "conftest.$ac_ext"
14825 echo "$as_me:14825: result: $ac_cv_header_pthread_h" >&5
14826 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14827 if test "$ac_cv_header_pthread_h" = yes; then
14829 cat >>confdefs.h <<\EOF
14830 #define HAVE_PTHREADS_H 1
14833 for cf_lib_pthread in pthread c_r
14835 echo "$as_me:14835: checking if we can link with the $cf_lib_pthread library" >&5
14836 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14837 cf_save_LIBS="$LIBS"
14839 cf_add_libs="$LIBS"
14842 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14843 # filter duplicates
14844 for cf_add_1lib in $cf_add_0lib; do
14845 for cf_add_2lib in $cf_add_libs; do
14846 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14851 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14853 LIBS="$cf_add_libs"
14855 cat >"conftest.$ac_ext" <<_ACEOF
14856 #line 14856 "configure"
14857 #include "confdefs.h"
14859 #include <pthread.h>
14865 int rc = pthread_create(0,0,0,0);
14866 int r2 = pthread_mutexattr_settype(0, 0);
14872 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14873 if { (eval echo "$as_me:14873: \"$ac_link\"") >&5
14874 (eval $ac_link) 2>&5
14876 echo "$as_me:14876: \$? = $ac_status" >&5
14877 (exit "$ac_status"); } &&
14878 { ac_try='test -s "conftest$ac_exeext"'
14879 { (eval echo "$as_me:14879: \"$ac_try\"") >&5
14880 (eval $ac_try) 2>&5
14882 echo "$as_me:14882: \$? = $ac_status" >&5
14883 (exit "$ac_status"); }; }; then
14886 echo "$as_me: failed program was:" >&5
14887 cat "conftest.$ac_ext" >&5
14890 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14891 LIBS="$cf_save_LIBS"
14892 echo "$as_me:14892: result: $with_pthread" >&5
14893 echo "${ECHO_T}$with_pthread" >&6
14894 test "$with_pthread" = yes && break
14897 if test "$with_pthread" = yes ; then
14899 cf_add_libs="$LIBS"
14902 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14903 # filter duplicates
14904 for cf_add_1lib in $cf_add_0lib; do
14905 for cf_add_2lib in $cf_add_libs; do
14906 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14911 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14913 LIBS="$cf_add_libs"
14915 cat >>confdefs.h <<\EOF
14916 #define HAVE_LIBPTHREADS 1
14920 { { echo "$as_me:14920: error: Cannot link with pthread library" >&5
14921 echo "$as_me: error: Cannot link with pthread library" >&2;}
14922 { (exit 1); exit 1; }; }
14929 echo "$as_me:14929: checking if you want to use weak-symbols for pthreads" >&5
14930 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14932 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14933 if test "${enable_weak_symbols+set}" = set; then
14934 enableval="$enable_weak_symbols"
14935 use_weak_symbols=$withval
14937 use_weak_symbols=no
14939 echo "$as_me:14939: result: $use_weak_symbols" >&5
14940 echo "${ECHO_T}$use_weak_symbols" >&6
14941 if test "$use_weak_symbols" = yes ; then
14943 echo "$as_me:14943: checking if $CC supports weak symbols" >&5
14944 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14945 if test "${cf_cv_weak_symbols+set}" = set; then
14946 echo $ECHO_N "(cached) $ECHO_C" >&6
14949 cat >"conftest.$ac_ext" <<_ACEOF
14950 #line 14950 "configure"
14951 #include "confdefs.h"
14958 #if defined(__GNUC__)
14959 # if defined __USE_ISOC99
14960 # define _cat_pragma(exp) _Pragma(#exp)
14961 # define _weak_pragma(exp) _cat_pragma(weak name)
14963 # define _weak_pragma(exp)
14965 # define _declare(name) __extension__ extern __typeof__(name) name
14966 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
14969 weak_symbol(fopen);
14975 rm -f "conftest.$ac_objext"
14976 if { (eval echo "$as_me:14976: \"$ac_compile\"") >&5
14977 (eval $ac_compile) 2>&5
14979 echo "$as_me:14979: \$? = $ac_status" >&5
14980 (exit "$ac_status"); } &&
14981 { ac_try='test -s "conftest.$ac_objext"'
14982 { (eval echo "$as_me:14982: \"$ac_try\"") >&5
14983 (eval $ac_try) 2>&5
14985 echo "$as_me:14985: \$? = $ac_status" >&5
14986 (exit "$ac_status"); }; }; then
14987 cf_cv_weak_symbols=yes
14989 echo "$as_me: failed program was:" >&5
14990 cat "conftest.$ac_ext" >&5
14991 cf_cv_weak_symbols=no
14993 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14996 echo "$as_me:14996: result: $cf_cv_weak_symbols" >&5
14997 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15000 cf_cv_weak_symbols=no
15003 if test $cf_cv_weak_symbols = yes ; then
15005 cat >>confdefs.h <<\EOF
15006 #define USE_WEAK_SYMBOLS 1
15012 if test "$with_pthread" = "yes" ; then
15014 cat >>confdefs.h <<\EOF
15015 #define USE_PTHREADS 1
15018 enable_reentrant=yes
15019 if test $cf_cv_weak_symbols = yes ; then
15024 # OpenSUSE is installing ncurses6, using reentrant option.
15025 echo "$as_me:15025: checking for _nc_TABSIZE" >&5
15026 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
15027 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
15028 echo $ECHO_N "(cached) $ECHO_C" >&6
15030 cat >"conftest.$ac_ext" <<_ACEOF
15031 #line 15031 "configure"
15032 #include "confdefs.h"
15033 #define _nc_TABSIZE autoconf_temporary
15034 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15041 /* We use char because int might match the return type of a gcc2
15042 builtin and then its argument prototype would still apply. */
15043 char _nc_TABSIZE (void);
15049 /* The GNU C library defines stubs for functions which it implements
15050 to always fail with ENOSYS. Some functions are actually named
15051 something starting with __ and the normal name is an alias. */
15052 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
15053 #error found stub for _nc_TABSIZE
15056 return _nc_TABSIZE ();
15061 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15062 if { (eval echo "$as_me:15062: \"$ac_link\"") >&5
15063 (eval $ac_link) 2>&5
15065 echo "$as_me:15065: \$? = $ac_status" >&5
15066 (exit "$ac_status"); } &&
15067 { ac_try='test -s "conftest$ac_exeext"'
15068 { (eval echo "$as_me:15068: \"$ac_try\"") >&5
15069 (eval $ac_try) 2>&5
15071 echo "$as_me:15071: \$? = $ac_status" >&5
15072 (exit "$ac_status"); }; }; then
15073 ac_cv_func__nc_TABSIZE=yes
15075 echo "$as_me: failed program was:" >&5
15076 cat "conftest.$ac_ext" >&5
15077 ac_cv_func__nc_TABSIZE=no
15079 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15081 echo "$as_me:15081: result: $ac_cv_func__nc_TABSIZE" >&5
15082 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
15083 if test "$ac_cv_func__nc_TABSIZE" = yes; then
15084 assume_reentrant=yes
15086 assume_reentrant=no
15089 # Reentrant code has to be opaque; there's little advantage to making ncurses
15090 # opaque outside of that, so there is no --enable-opaque option. We can use
15091 # this option without --with-pthreads, but this will be always set for
15093 echo "$as_me:15093: checking if you want experimental reentrant code" >&5
15094 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
15096 # Check whether --enable-reentrant or --disable-reentrant was given.
15097 if test "${enable_reentrant+set}" = set; then
15098 enableval="$enable_reentrant"
15099 with_reentrant=$enableval
15101 with_reentrant=$assume_reentrant
15103 echo "$as_me:15103: result: $with_reentrant" >&5
15104 echo "${ECHO_T}$with_reentrant" >&6
15105 if test "$with_reentrant" = yes ; then
15106 cf_cv_enable_reentrant=1
15107 if test $cf_cv_weak_symbols = yes ; then
15109 # remove pthread library from $LIBS
15110 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
15112 elif test "$assume_reentrant" = no ; then
15113 LIB_SUFFIX="t${LIB_SUFFIX}"
15116 cat >>confdefs.h <<\EOF
15117 #define USE_REENTRANT 1
15121 cf_cv_enable_reentrant=0
15124 ### Allow using a different wrap-prefix
15125 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15126 echo "$as_me:15126: checking for prefix used to wrap public variables" >&5
15127 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15129 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15130 if test "${with_wrap_prefix+set}" = set; then
15131 withval="$with_wrap_prefix"
15132 NCURSES_WRAP_PREFIX=$withval
15134 NCURSES_WRAP_PREFIX=_nc_
15136 echo "$as_me:15136: result: $NCURSES_WRAP_PREFIX" >&5
15137 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15139 NCURSES_WRAP_PREFIX=_nc_
15142 cat >>confdefs.h <<EOF
15143 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15146 ###############################################################################
15148 ### use option --disable-echo to suppress full display compiling commands
15150 echo "$as_me:15150: checking if you want to see long compiling messages" >&5
15151 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15153 # Check whether --enable-echo or --disable-echo was given.
15154 if test "${enable_echo+set}" = set; then
15155 enableval="$enable_echo"
15156 test "$enableval" != no && enableval=yes
15157 if test "$enableval" != "yes" ; then
15160 ECHO_LD='@echo linking $@;'
15161 RULE_CC='@echo compiling $<'
15162 SHOW_CC='@echo compiling $@'
15184 echo "$as_me:15184: result: $enableval" >&5
15185 echo "${ECHO_T}$enableval" >&6
15187 echo "$as_me:15187: checking if you want to use C11 _Noreturn feature" >&5
15188 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
15190 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
15191 if test "${enable_stdnoreturn+set}" = set; then
15192 enableval="$enable_stdnoreturn"
15193 test "$enableval" != yes && enableval=no
15194 if test "$enableval" != "no" ; then
15195 enable_stdnoreturn=yes
15197 enable_stdnoreturn=no
15201 enable_stdnoreturn=no
15204 echo "$as_me:15204: result: $enable_stdnoreturn" >&5
15205 echo "${ECHO_T}$enable_stdnoreturn" >&6
15207 if test $enable_stdnoreturn = yes; then
15208 echo "$as_me:15208: checking for C11 _Noreturn feature" >&5
15209 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
15210 if test "${cf_cv_c11_noreturn+set}" = set; then
15211 echo $ECHO_N "(cached) $ECHO_C" >&6
15213 cat >"conftest.$ac_ext" <<_ACEOF
15214 #line 15214 "configure"
15215 #include "confdefs.h"
15218 #include <stdlib.h>
15219 #include <stdnoreturn.h>
15220 static _Noreturn void giveup(void) { exit(0); }
15225 if (feof(stdin)) giveup()
15230 rm -f "conftest.$ac_objext"
15231 if { (eval echo "$as_me:15231: \"$ac_compile\"") >&5
15232 (eval $ac_compile) 2>&5
15234 echo "$as_me:15234: \$? = $ac_status" >&5
15235 (exit "$ac_status"); } &&
15236 { ac_try='test -s "conftest.$ac_objext"'
15237 { (eval echo "$as_me:15237: \"$ac_try\"") >&5
15238 (eval $ac_try) 2>&5
15240 echo "$as_me:15240: \$? = $ac_status" >&5
15241 (exit "$ac_status"); }; }; then
15242 cf_cv_c11_noreturn=yes
15244 echo "$as_me: failed program was:" >&5
15245 cat "conftest.$ac_ext" >&5
15246 cf_cv_c11_noreturn=no
15248 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15251 echo "$as_me:15251: result: $cf_cv_c11_noreturn" >&5
15252 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
15254 cf_cv_c11_noreturn=no,
15257 if test "$cf_cv_c11_noreturn" = yes; then
15259 cat >>confdefs.h <<\EOF
15260 #define HAVE_STDNORETURN_H 1
15263 cat >>confdefs.h <<EOF
15264 #define STDC_NORETURN _Noreturn
15267 HAVE_STDNORETURN_H=1
15269 HAVE_STDNORETURN_H=0
15272 if test "$GCC" = yes || test "$GXX" = yes
15275 if test "$GCC" = yes || test "$GXX" = yes
15279 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
15281 echo "${as_me:-configure}:15281: testing repairing CFLAGS: $CFLAGS ..." 1>&5
15284 for cf_temp_scan in $CFLAGS
15286 case "x$cf_temp_scan" in
15289 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15290 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15295 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15296 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15301 CFLAGS="$cf_temp_flags"
15302 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
15304 echo "${as_me:-configure}:15304: testing ... fixed $CFLAGS ..." 1>&5
15306 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15308 echo "${as_me:-configure}:15308: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15314 if test "$GCC" = yes || test "$GXX" = yes
15318 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
15320 echo "${as_me:-configure}:15320: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
15323 for cf_temp_scan in $CPPFLAGS
15325 case "x$cf_temp_scan" in
15328 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15329 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15334 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15335 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15340 CPPFLAGS="$cf_temp_flags"
15341 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
15343 echo "${as_me:-configure}:15343: testing ... fixed $CPPFLAGS ..." 1>&5
15345 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15347 echo "${as_me:-configure}:15347: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15353 if test "$GCC" = yes || test "$GXX" = yes
15357 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
15359 echo "${as_me:-configure}:15359: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
15362 for cf_temp_scan in $LDFLAGS
15364 case "x$cf_temp_scan" in
15367 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15368 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15373 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15374 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15379 LDFLAGS="$cf_temp_flags"
15380 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
15382 echo "${as_me:-configure}:15382: testing ... fixed $LDFLAGS ..." 1>&5
15384 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15386 echo "${as_me:-configure}:15386: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15392 echo "$as_me:15392: checking if you want to turn on gcc warnings" >&5
15393 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
15395 # Check whether --enable-warnings or --disable-warnings was given.
15396 if test "${enable_warnings+set}" = set; then
15397 enableval="$enable_warnings"
15398 test "$enableval" != yes && enableval=no
15399 if test "$enableval" != "no" ; then
15400 enable_warnings=yes
15409 echo "$as_me:15409: result: $enable_warnings" >&5
15410 echo "${ECHO_T}$enable_warnings" >&6
15411 if test "$enable_warnings" = "yes"
15414 if test "x$have_x" = xyes; then
15416 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15417 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15418 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15419 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15420 for cf_X_CFLAGS in $X_CFLAGS
15422 case "x$cf_X_CFLAGS" in
15424 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15427 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15432 cat >"conftest.$ac_ext" <<_ACEOF
15433 #line 15433 "configure"
15434 #include "confdefs.h"
15436 #include <stdlib.h>
15437 #include <X11/Intrinsic.h>
15442 String foo = malloc(1); free((void*)foo)
15447 rm -f "conftest.$ac_objext"
15448 if { (eval echo "$as_me:15448: \"$ac_compile\"") >&5
15449 (eval $ac_compile) 2>&5
15451 echo "$as_me:15451: \$? = $ac_status" >&5
15452 (exit "$ac_status"); } &&
15453 { ac_try='test -s "conftest.$ac_objext"'
15454 { (eval echo "$as_me:15454: \"$ac_try\"") >&5
15455 (eval $ac_try) 2>&5
15457 echo "$as_me:15457: \$? = $ac_status" >&5
15458 (exit "$ac_status"); }; }; then
15460 echo "$as_me:15460: checking for X11/Xt const-feature" >&5
15461 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15462 if test "${cf_cv_const_x_string+set}" = set; then
15463 echo $ECHO_N "(cached) $ECHO_C" >&6
15466 cat >"conftest.$ac_ext" <<_ACEOF
15467 #line 15467 "configure"
15468 #include "confdefs.h"
15470 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15471 #undef XTSTRINGDEFINES /* X11R5 and later */
15472 #include <stdlib.h>
15473 #include <X11/Intrinsic.h>
15478 String foo = malloc(1); *foo = 0
15483 rm -f "conftest.$ac_objext"
15484 if { (eval echo "$as_me:15484: \"$ac_compile\"") >&5
15485 (eval $ac_compile) 2>&5
15487 echo "$as_me:15487: \$? = $ac_status" >&5
15488 (exit "$ac_status"); } &&
15489 { ac_try='test -s "conftest.$ac_objext"'
15490 { (eval echo "$as_me:15490: \"$ac_try\"") >&5
15491 (eval $ac_try) 2>&5
15493 echo "$as_me:15493: \$? = $ac_status" >&5
15494 (exit "$ac_status"); }; }; then
15496 cf_cv_const_x_string=no
15499 echo "$as_me: failed program was:" >&5
15500 cat "conftest.$ac_ext" >&5
15502 cf_cv_const_x_string=yes
15505 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15508 echo "$as_me:15508: result: $cf_cv_const_x_string" >&5
15509 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15511 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
15512 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
15513 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
15515 case "$cf_cv_const_x_string" in
15518 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15519 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15524 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15525 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15531 echo "$as_me: failed program was:" >&5
15532 cat "conftest.$ac_ext" >&5
15534 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15536 cat > "conftest.$ac_ext" <<EOF
15537 #line 15537 "${as_me:-configure}"
15538 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15540 if test "$INTEL_COMPILER" = yes
15542 # The "-wdXXX" options suppress warnings:
15543 # remark #1419: external declaration in primary source file
15544 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15545 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15546 # remark #193: zero used for undefined preprocessing identifier
15547 # remark #593: variable "curs_sb_left_arrow" was set but never used
15548 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15549 # remark #869: parameter "tw" was never referenced
15550 # remark #981: operands are evaluated in unspecified order
15551 # warning #279: controlling expression is constant
15553 { echo "$as_me:15553: checking for $CC warning options..." >&5
15554 echo "$as_me: checking for $CC warning options..." >&6;}
15555 cf_save_CFLAGS="$CFLAGS"
15556 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
15568 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15569 if { (eval echo "$as_me:15569: \"$ac_compile\"") >&5
15570 (eval $ac_compile) 2>&5
15572 echo "$as_me:15572: \$? = $ac_status" >&5
15573 (exit "$ac_status"); }; then
15574 test -n "$verbose" && echo "$as_me:15574: result: ... -$cf_opt" >&5
15575 echo "${ECHO_T}... -$cf_opt" >&6
15576 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15579 CFLAGS="$cf_save_CFLAGS"
15580 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
15582 { echo "$as_me:15582: checking for $CC warning options..." >&5
15583 echo "$as_me: checking for $CC warning options..." >&6;}
15584 cf_save_CFLAGS="$CFLAGS"
15586 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15587 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15588 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15589 for cf_opt in W Wall \
15590 Wbad-function-cast \
15593 Wdeclaration-after-statement \
15596 Wmissing-declarations \
15597 Wmissing-prototypes \
15601 Wstrict-prototypes \
15602 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15604 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15605 if { (eval echo "$as_me:15605: \"$ac_compile\"") >&5
15606 (eval $ac_compile) 2>&5
15608 echo "$as_me:15608: \$? = $ac_status" >&5
15609 (exit "$ac_status"); }; then
15610 test -n "$verbose" && echo "$as_me:15610: result: ... -$cf_opt" >&5
15611 echo "${ECHO_T}... -$cf_opt" >&6
15614 case "$GCC_VERSION" in
15616 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15618 echo "${as_me:-configure}:15618: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15624 case "$GCC_VERSION" in
15626 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15628 echo "${as_me:-configure}:15628: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15634 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15637 CFLAGS="$cf_save_CFLAGS"
15643 if test "$GCC" = yes || test "$GXX" = yes
15645 cat > conftest.i <<EOF
15647 #define GCC_PRINTF 0
15650 #define GCC_SCANF 0
15652 #ifndef GCC_NORETURN
15653 #define GCC_NORETURN /* nothing */
15656 #define GCC_UNUSED /* nothing */
15659 if test "$GCC" = yes
15661 { echo "$as_me:15661: checking for $CC __attribute__ directives..." >&5
15662 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15663 cat > "conftest.$ac_ext" <<EOF
15664 #line 15664 "${as_me:-configure}"
15665 #include "confdefs.h"
15666 #include "conftest.h"
15667 #include "conftest.i"
15669 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15671 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15674 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
15676 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
15678 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15679 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
15680 extern GCC_NORETURN void foo(void);
15681 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
15683 cf_printf_attribute=no
15684 cf_scanf_attribute=no
15685 for cf_attribute in scanf printf unused noreturn
15688 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15690 cf_directive="__attribute__(($cf_attribute))"
15691 echo "checking for $CC $cf_directive" 1>&5
15693 case "$cf_attribute" in
15695 cf_printf_attribute=yes
15696 cat >conftest.h <<EOF
15697 #define GCC_$cf_ATTRIBUTE 1
15701 cf_scanf_attribute=yes
15702 cat >conftest.h <<EOF
15703 #define GCC_$cf_ATTRIBUTE 1
15707 cat >conftest.h <<EOF
15708 #define GCC_$cf_ATTRIBUTE $cf_directive
15713 if { (eval echo "$as_me:15713: \"$ac_compile\"") >&5
15714 (eval $ac_compile) 2>&5
15716 echo "$as_me:15716: \$? = $ac_status" >&5
15717 (exit "$ac_status"); }; then
15718 test -n "$verbose" && echo "$as_me:15718: result: ... $cf_attribute" >&5
15719 echo "${ECHO_T}... $cf_attribute" >&6
15720 cat conftest.h >>confdefs.h
15721 case "$cf_attribute" in
15724 cat >>confdefs.h <<EOF
15725 #define GCC_NORETURN $cf_directive
15730 cf_value='/* nothing */'
15731 if test "$cf_printf_attribute" != no ; then
15732 cf_value='__attribute__((format(printf,fmt,var)))'
15734 cat >>confdefs.h <<\EOF
15735 #define GCC_PRINTF 1
15740 cat >>confdefs.h <<EOF
15741 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15746 cf_value='/* nothing */'
15747 if test "$cf_scanf_attribute" != no ; then
15748 cf_value='__attribute__((format(scanf,fmt,var)))'
15750 cat >>confdefs.h <<\EOF
15751 #define GCC_SCANF 1
15756 cat >>confdefs.h <<EOF
15757 #define GCC_SCANFLIKE(fmt,var) $cf_value
15763 cat >>confdefs.h <<EOF
15764 #define GCC_UNUSED $cf_directive
15772 ${FGREP-fgrep} define conftest.i >>confdefs.h
15779 if test "x$enable_warnings" = "xyes"; then
15781 ADAFLAGS="$ADAFLAGS -gnatg"
15785 ### use option --enable-assertions to turn on generation of assertion code
15786 echo "$as_me:15786: checking if you want to enable runtime assertions" >&5
15787 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15789 # Check whether --enable-assertions or --disable-assertions was given.
15790 if test "${enable_assertions+set}" = set; then
15791 enableval="$enable_assertions"
15792 with_assertions=$enableval
15796 echo "$as_me:15796: result: $with_assertions" >&5
15797 echo "${ECHO_T}$with_assertions" >&6
15800 if test "$with_assertions" = no
15802 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15805 ADAFLAGS="$ADAFLAGS -gnata"
15810 ### use option --disable-leaks to suppress "permanent" leaks, for testing
15812 cat >>confdefs.h <<\EOF
15813 #define HAVE_NC_ALLOC_H 1
15816 ### use option --enable-expanded to generate certain macros as functions
15818 # Check whether --enable-expanded or --disable-expanded was given.
15819 if test "${enable_expanded+set}" = set; then
15820 enableval="$enable_expanded"
15821 test "$enableval" = yes &&
15822 cat >>confdefs.h <<\EOF
15823 #define NCURSES_EXPANDED 1
15828 ### use option --disable-macros to suppress macros in favor of functions
15830 # Check whether --enable-macros or --disable-macros was given.
15831 if test "${enable_macros+set}" = set; then
15832 enableval="$enable_macros"
15833 test "$enableval" = no &&
15834 cat >>confdefs.h <<\EOF
15835 #define NCURSES_NOMACROS 1
15840 # Normally we only add trace() to the debug-library. Allow this to be
15841 # extended to all models of the ncurses library:
15843 case "$CFLAGS $CPPFLAGS" in
15849 echo "$as_me:15849: checking whether to add trace feature to all models" >&5
15850 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
15852 # Check whether --with-trace or --without-trace was given.
15853 if test "${with_trace+set}" = set; then
15854 withval="$with_trace"
15855 cf_with_trace=$withval
15857 cf_with_trace=$cf_all_traces
15859 echo "$as_me:15859: result: $cf_with_trace" >&5
15860 echo "${ECHO_T}$cf_with_trace" >&6
15862 if test "$cf_with_trace" = yes ; then
15868 cf_new_extra_cppflags=
15870 for cf_add_cflags in -DTRACE
15872 case "$cf_fix_cppflags" in
15874 case "$cf_add_cflags" in
15875 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15876 case "$cf_add_cflags" in
15878 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15880 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15881 && test -z "${cf_tst_cflags}" \
15882 && cf_fix_cppflags=yes
15884 if test "$cf_fix_cppflags" = yes ; then
15886 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15887 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15890 elif test "${cf_tst_cflags}" = "\"'" ; then
15892 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15893 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15899 case "$CPPFLAGS" in
15903 case "$cf_add_cflags" in
15905 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15907 CPPFLAGS=`echo "$CPPFLAGS" | \
15908 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15909 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15914 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15915 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15922 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15923 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15930 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15931 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15933 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15935 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15936 && test -z "${cf_tst_cflags}" \
15937 && cf_fix_cppflags=no
15942 if test -n "$cf_new_cflags" ; then
15944 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15945 CFLAGS="${CFLAGS}$cf_new_cflags"
15949 if test -n "$cf_new_cppflags" ; then
15951 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15952 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15956 if test -n "$cf_new_extra_cppflags" ; then
15958 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15959 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15967 echo "$as_me:15967: checking if we want to use GNAT projects" >&5
15968 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
15970 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
15971 if test "${enable_gnat_projects+set}" = set; then
15972 enableval="$enable_gnat_projects"
15973 test "$enableval" != no && enableval=yes
15974 if test "$enableval" != "yes" ; then
15975 enable_gnat_projects=no
15977 enable_gnat_projects=yes
15981 enable_gnat_projects=yes
15984 echo "$as_me:15984: result: $enable_gnat_projects" >&5
15985 echo "${ECHO_T}$enable_gnat_projects" >&6
15987 ### Checks for libraries.
15988 case $cf_cv_system_name in
15991 echo "$as_me:15991: checking if ssp library is needed" >&5
15992 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
15993 if test "${cf_cv_need_libssp+set}" = set; then
15994 echo $ECHO_N "(cached) $ECHO_C" >&6
15997 cat >"conftest.$ac_ext" <<_ACEOF
15998 #line 15998 "configure"
15999 #include "confdefs.h"
16001 #include <sys/types.h>
16002 #include <dirent.h>
16008 DIR *dp = opendir(".");
16014 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16015 if { (eval echo "$as_me:16015: \"$ac_link\"") >&5
16016 (eval $ac_link) 2>&5
16018 echo "$as_me:16018: \$? = $ac_status" >&5
16019 (exit "$ac_status"); } &&
16020 { ac_try='test -s "conftest$ac_exeext"'
16021 { (eval echo "$as_me:16021: \"$ac_try\"") >&5
16022 (eval $ac_try) 2>&5
16024 echo "$as_me:16024: \$? = $ac_status" >&5
16025 (exit "$ac_status"); }; }; then
16026 cf_cv_need_libssp=no
16028 echo "$as_me: failed program was:" >&5
16029 cat "conftest.$ac_ext" >&5
16031 cf_save_LIBS="$LIBS"
16033 cat >"conftest.$ac_ext" <<_ACEOF
16034 #line 16034 "configure"
16035 #include "confdefs.h"
16037 #include <sys/types.h>
16038 #include <dirent.h>
16044 DIR *dp = opendir(".");
16050 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16051 if { (eval echo "$as_me:16051: \"$ac_link\"") >&5
16052 (eval $ac_link) 2>&5
16054 echo "$as_me:16054: \$? = $ac_status" >&5
16055 (exit "$ac_status"); } &&
16056 { ac_try='test -s "conftest$ac_exeext"'
16057 { (eval echo "$as_me:16057: \"$ac_try\"") >&5
16058 (eval $ac_try) 2>&5
16060 echo "$as_me:16060: \$? = $ac_status" >&5
16061 (exit "$ac_status"); }; }; then
16062 cf_cv_need_libssp=yes
16064 echo "$as_me: failed program was:" >&5
16065 cat "conftest.$ac_ext" >&5
16066 cf_cv_need_libssp=maybe
16068 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16069 LIBS="$cf_save_LIBS"
16072 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16074 echo "$as_me:16074: result: $cf_cv_need_libssp" >&5
16075 echo "${ECHO_T}$cf_cv_need_libssp" >&6
16077 if test "x$cf_cv_need_libssp" = xyes
16080 cf_add_libs="$LIBS"
16083 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16084 # filter duplicates
16085 for cf_add_1lib in $cf_add_0lib; do
16086 for cf_add_2lib in $cf_add_libs; do
16087 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16092 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16094 LIBS="$cf_add_libs"
16100 echo "$as_me:16100: checking for gettimeofday" >&5
16101 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
16102 if test "${ac_cv_func_gettimeofday+set}" = set; then
16103 echo $ECHO_N "(cached) $ECHO_C" >&6
16105 cat >"conftest.$ac_ext" <<_ACEOF
16106 #line 16106 "configure"
16107 #include "confdefs.h"
16108 #define gettimeofday autoconf_temporary
16109 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16110 #undef gettimeofday
16116 /* We use char because int might match the return type of a gcc2
16117 builtin and then its argument prototype would still apply. */
16118 char gettimeofday (void);
16124 /* The GNU C library defines stubs for functions which it implements
16125 to always fail with ENOSYS. Some functions are actually named
16126 something starting with __ and the normal name is an alias. */
16127 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16128 #error found stub for gettimeofday
16131 return gettimeofday ();
16136 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16137 if { (eval echo "$as_me:16137: \"$ac_link\"") >&5
16138 (eval $ac_link) 2>&5
16140 echo "$as_me:16140: \$? = $ac_status" >&5
16141 (exit "$ac_status"); } &&
16142 { ac_try='test -s "conftest$ac_exeext"'
16143 { (eval echo "$as_me:16143: \"$ac_try\"") >&5
16144 (eval $ac_try) 2>&5
16146 echo "$as_me:16146: \$? = $ac_status" >&5
16147 (exit "$ac_status"); }; }; then
16148 ac_cv_func_gettimeofday=yes
16150 echo "$as_me: failed program was:" >&5
16151 cat "conftest.$ac_ext" >&5
16152 ac_cv_func_gettimeofday=no
16154 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16156 echo "$as_me:16156: result: $ac_cv_func_gettimeofday" >&5
16157 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16158 if test "$ac_cv_func_gettimeofday" = yes; then
16159 cat >>confdefs.h <<\EOF
16160 #define HAVE_GETTIMEOFDAY 1
16165 echo "$as_me:16165: checking for gettimeofday in -lbsd" >&5
16166 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
16167 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
16168 echo $ECHO_N "(cached) $ECHO_C" >&6
16170 ac_check_lib_save_LIBS=$LIBS
16172 cat >"conftest.$ac_ext" <<_ACEOF
16173 #line 16173 "configure"
16174 #include "confdefs.h"
16176 /* Override any gcc2 internal prototype to avoid an error. */
16180 /* We use char because int might match the return type of a gcc2
16181 builtin and then its argument prototype would still apply. */
16182 char gettimeofday ();
16191 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16192 if { (eval echo "$as_me:16192: \"$ac_link\"") >&5
16193 (eval $ac_link) 2>&5
16195 echo "$as_me:16195: \$? = $ac_status" >&5
16196 (exit "$ac_status"); } &&
16197 { ac_try='test -s "conftest$ac_exeext"'
16198 { (eval echo "$as_me:16198: \"$ac_try\"") >&5
16199 (eval $ac_try) 2>&5
16201 echo "$as_me:16201: \$? = $ac_status" >&5
16202 (exit "$ac_status"); }; }; then
16203 ac_cv_lib_bsd_gettimeofday=yes
16205 echo "$as_me: failed program was:" >&5
16206 cat "conftest.$ac_ext" >&5
16207 ac_cv_lib_bsd_gettimeofday=no
16209 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16210 LIBS=$ac_check_lib_save_LIBS
16212 echo "$as_me:16212: result: $ac_cv_lib_bsd_gettimeofday" >&5
16213 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
16214 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
16216 cat >>confdefs.h <<\EOF
16217 #define HAVE_GETTIMEOFDAY 1
16227 ### Checks for header files.
16228 echo "$as_me:16228: checking for ANSI C header files" >&5
16229 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16230 if test "${ac_cv_header_stdc+set}" = set; then
16231 echo $ECHO_N "(cached) $ECHO_C" >&6
16233 cat >"conftest.$ac_ext" <<_ACEOF
16234 #line 16234 "configure"
16235 #include "confdefs.h"
16236 #include <stdlib.h>
16237 #include <stdarg.h>
16238 #include <string.h>
16242 if { (eval echo "$as_me:16242: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16243 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16245 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16247 cat conftest.err >&5
16248 echo "$as_me:16248: \$? = $ac_status" >&5
16249 (exit "$ac_status"); } >/dev/null; then
16250 if test -s conftest.err; then
16251 ac_cpp_err=$ac_c_preproc_warn_flag
16258 if test -z "$ac_cpp_err"; then
16259 ac_cv_header_stdc=yes
16261 echo "$as_me: failed program was:" >&5
16262 cat "conftest.$ac_ext" >&5
16263 ac_cv_header_stdc=no
16265 rm -f conftest.err "conftest.$ac_ext"
16267 if test $ac_cv_header_stdc = yes; then
16268 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16269 cat >"conftest.$ac_ext" <<_ACEOF
16270 #line 16270 "configure"
16271 #include "confdefs.h"
16272 #include <string.h>
16275 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16276 $EGREP "memchr" >/dev/null 2>&1; then
16279 ac_cv_header_stdc=no
16285 if test $ac_cv_header_stdc = yes; then
16286 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16287 cat >"conftest.$ac_ext" <<_ACEOF
16288 #line 16288 "configure"
16289 #include "confdefs.h"
16290 #include <stdlib.h>
16293 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16294 $EGREP "free" >/dev/null 2>&1; then
16297 ac_cv_header_stdc=no
16303 if test $ac_cv_header_stdc = yes; then
16304 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16305 if test "$cross_compiling" = yes; then
16308 cat >"conftest.$ac_ext" <<_ACEOF
16309 #line 16309 "configure"
16310 #include "confdefs.h"
16312 #if ((' ' & 0x0FF) == 0x020)
16313 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16314 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16316 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16317 || ('j' <= (c) && (c) <= 'r') \
16318 || ('s' <= (c) && (c) <= 'z'))
16319 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16322 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16327 for (i = 0; i < 256; i++)
16328 if (XOR (islower (i), ISLOWER (i))
16329 || toupper (i) != TOUPPER (i))
16330 $ac_main_return(2);
16331 $ac_main_return (0);
16334 rm -f "conftest$ac_exeext"
16335 if { (eval echo "$as_me:16335: \"$ac_link\"") >&5
16336 (eval $ac_link) 2>&5
16338 echo "$as_me:16338: \$? = $ac_status" >&5
16339 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16340 { (eval echo "$as_me:16340: \"$ac_try\"") >&5
16341 (eval $ac_try) 2>&5
16343 echo "$as_me:16343: \$? = $ac_status" >&5
16344 (exit "$ac_status"); }; }; then
16347 echo "$as_me: program exited with status $ac_status" >&5
16348 echo "$as_me: failed program was:" >&5
16349 cat "conftest.$ac_ext" >&5
16350 ac_cv_header_stdc=no
16352 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16356 echo "$as_me:16356: result: $ac_cv_header_stdc" >&5
16357 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16358 if test $ac_cv_header_stdc = yes; then
16360 cat >>confdefs.h <<\EOF
16361 #define STDC_HEADERS 1
16366 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
16368 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
16369 inttypes.h stdint.h unistd.h
16371 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16372 echo "$as_me:16372: checking for $ac_header" >&5
16373 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16374 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16375 echo $ECHO_N "(cached) $ECHO_C" >&6
16377 cat >"conftest.$ac_ext" <<_ACEOF
16378 #line 16378 "configure"
16379 #include "confdefs.h"
16380 $ac_includes_default
16381 #include <$ac_header>
16383 rm -f "conftest.$ac_objext"
16384 if { (eval echo "$as_me:16384: \"$ac_compile\"") >&5
16385 (eval $ac_compile) 2>&5
16387 echo "$as_me:16387: \$? = $ac_status" >&5
16388 (exit "$ac_status"); } &&
16389 { ac_try='test -s "conftest.$ac_objext"'
16390 { (eval echo "$as_me:16390: \"$ac_try\"") >&5
16391 (eval $ac_try) 2>&5
16393 echo "$as_me:16393: \$? = $ac_status" >&5
16394 (exit "$ac_status"); }; }; then
16395 eval "$as_ac_Header=yes"
16397 echo "$as_me: failed program was:" >&5
16398 cat "conftest.$ac_ext" >&5
16399 eval "$as_ac_Header=no"
16401 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16403 echo "$as_me:16403: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16404 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16405 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16406 cat >>confdefs.h <<EOF
16407 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16413 echo "$as_me:16413: checking for signed char" >&5
16414 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
16415 if test "${ac_cv_type_signed_char+set}" = set; then
16416 echo $ECHO_N "(cached) $ECHO_C" >&6
16418 cat >"conftest.$ac_ext" <<_ACEOF
16419 #line 16419 "configure"
16420 #include "confdefs.h"
16421 $ac_includes_default
16425 if ((signed char *) 0)
16427 if (sizeof (signed char))
16433 rm -f "conftest.$ac_objext"
16434 if { (eval echo "$as_me:16434: \"$ac_compile\"") >&5
16435 (eval $ac_compile) 2>&5
16437 echo "$as_me:16437: \$? = $ac_status" >&5
16438 (exit "$ac_status"); } &&
16439 { ac_try='test -s "conftest.$ac_objext"'
16440 { (eval echo "$as_me:16440: \"$ac_try\"") >&5
16441 (eval $ac_try) 2>&5
16443 echo "$as_me:16443: \$? = $ac_status" >&5
16444 (exit "$ac_status"); }; }; then
16445 ac_cv_type_signed_char=yes
16447 echo "$as_me: failed program was:" >&5
16448 cat "conftest.$ac_ext" >&5
16449 ac_cv_type_signed_char=no
16451 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16453 echo "$as_me:16453: result: $ac_cv_type_signed_char" >&5
16454 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
16456 echo "$as_me:16456: checking size of signed char" >&5
16457 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
16458 if test "${ac_cv_sizeof_signed_char+set}" = set; then
16459 echo $ECHO_N "(cached) $ECHO_C" >&6
16461 if test "$ac_cv_type_signed_char" = yes; then
16462 if test "$cross_compiling" = yes; then
16463 # Depending upon the size, compute the lo and hi bounds.
16464 cat >"conftest.$ac_ext" <<_ACEOF
16465 #line 16465 "configure"
16466 #include "confdefs.h"
16467 $ac_includes_default
16471 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
16476 rm -f "conftest.$ac_objext"
16477 if { (eval echo "$as_me:16477: \"$ac_compile\"") >&5
16478 (eval $ac_compile) 2>&5
16480 echo "$as_me:16480: \$? = $ac_status" >&5
16481 (exit "$ac_status"); } &&
16482 { ac_try='test -s "conftest.$ac_objext"'
16483 { (eval echo "$as_me:16483: \"$ac_try\"") >&5
16484 (eval $ac_try) 2>&5
16486 echo "$as_me:16486: \$? = $ac_status" >&5
16487 (exit "$ac_status"); }; }; then
16490 cat >"conftest.$ac_ext" <<_ACEOF
16491 #line 16491 "configure"
16492 #include "confdefs.h"
16493 $ac_includes_default
16497 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16502 rm -f "conftest.$ac_objext"
16503 if { (eval echo "$as_me:16503: \"$ac_compile\"") >&5
16504 (eval $ac_compile) 2>&5
16506 echo "$as_me:16506: \$? = $ac_status" >&5
16507 (exit "$ac_status"); } &&
16508 { ac_try='test -s "conftest.$ac_objext"'
16509 { (eval echo "$as_me:16509: \"$ac_try\"") >&5
16510 (eval $ac_try) 2>&5
16512 echo "$as_me:16512: \$? = $ac_status" >&5
16513 (exit "$ac_status"); }; }; then
16514 ac_hi=$ac_mid; break
16516 echo "$as_me: failed program was:" >&5
16517 cat "conftest.$ac_ext" >&5
16518 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
16520 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16523 echo "$as_me: failed program was:" >&5
16524 cat "conftest.$ac_ext" >&5
16527 cat >"conftest.$ac_ext" <<_ACEOF
16528 #line 16528 "configure"
16529 #include "confdefs.h"
16530 $ac_includes_default
16534 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
16539 rm -f "conftest.$ac_objext"
16540 if { (eval echo "$as_me:16540: \"$ac_compile\"") >&5
16541 (eval $ac_compile) 2>&5
16543 echo "$as_me:16543: \$? = $ac_status" >&5
16544 (exit "$ac_status"); } &&
16545 { ac_try='test -s "conftest.$ac_objext"'
16546 { (eval echo "$as_me:16546: \"$ac_try\"") >&5
16547 (eval $ac_try) 2>&5
16549 echo "$as_me:16549: \$? = $ac_status" >&5
16550 (exit "$ac_status"); }; }; then
16551 ac_lo=$ac_mid; break
16553 echo "$as_me: failed program was:" >&5
16554 cat "conftest.$ac_ext" >&5
16555 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
16557 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16560 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16561 # Binary search between lo and hi bounds.
16562 while test "x$ac_lo" != "x$ac_hi"; do
16563 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
16564 cat >"conftest.$ac_ext" <<_ACEOF
16565 #line 16565 "configure"
16566 #include "confdefs.h"
16567 $ac_includes_default
16571 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16576 rm -f "conftest.$ac_objext"
16577 if { (eval echo "$as_me:16577: \"$ac_compile\"") >&5
16578 (eval $ac_compile) 2>&5
16580 echo "$as_me:16580: \$? = $ac_status" >&5
16581 (exit "$ac_status"); } &&
16582 { ac_try='test -s "conftest.$ac_objext"'
16583 { (eval echo "$as_me:16583: \"$ac_try\"") >&5
16584 (eval $ac_try) 2>&5
16586 echo "$as_me:16586: \$? = $ac_status" >&5
16587 (exit "$ac_status"); }; }; then
16590 echo "$as_me: failed program was:" >&5
16591 cat "conftest.$ac_ext" >&5
16592 ac_lo=`expr "$ac_mid" + 1`
16594 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16596 ac_cv_sizeof_signed_char=$ac_lo
16598 if test "$cross_compiling" = yes; then
16599 { { echo "$as_me:16599: error: cannot run test program while cross compiling" >&5
16600 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16601 { (exit 1); exit 1; }; }
16603 cat >"conftest.$ac_ext" <<_ACEOF
16604 #line 16604 "configure"
16605 #include "confdefs.h"
16606 $ac_includes_default
16610 FILE *f = fopen ("conftest.val", "w");
16612 $ac_main_return (1);
16613 fprintf (f, "%ld", (long)(sizeof (signed char)));
16619 rm -f "conftest$ac_exeext"
16620 if { (eval echo "$as_me:16620: \"$ac_link\"") >&5
16621 (eval $ac_link) 2>&5
16623 echo "$as_me:16623: \$? = $ac_status" >&5
16624 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16625 { (eval echo "$as_me:16625: \"$ac_try\"") >&5
16626 (eval $ac_try) 2>&5
16628 echo "$as_me:16628: \$? = $ac_status" >&5
16629 (exit "$ac_status"); }; }; then
16630 ac_cv_sizeof_signed_char=`cat conftest.val`
16632 echo "$as_me: program exited with status $ac_status" >&5
16633 echo "$as_me: failed program was:" >&5
16634 cat "conftest.$ac_ext" >&5
16636 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16641 ac_cv_sizeof_signed_char=0
16644 echo "$as_me:16644: result: $ac_cv_sizeof_signed_char" >&5
16645 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
16646 cat >>confdefs.h <<EOF
16647 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
16650 echo "$as_me:16650: checking for ANSI C header files" >&5
16651 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16652 if test "${ac_cv_header_stdc+set}" = set; then
16653 echo $ECHO_N "(cached) $ECHO_C" >&6
16655 cat >"conftest.$ac_ext" <<_ACEOF
16656 #line 16656 "configure"
16657 #include "confdefs.h"
16658 #include <stdlib.h>
16659 #include <stdarg.h>
16660 #include <string.h>
16664 if { (eval echo "$as_me:16664: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16665 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16667 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16669 cat conftest.err >&5
16670 echo "$as_me:16670: \$? = $ac_status" >&5
16671 (exit "$ac_status"); } >/dev/null; then
16672 if test -s conftest.err; then
16673 ac_cpp_err=$ac_c_preproc_warn_flag
16680 if test -z "$ac_cpp_err"; then
16681 ac_cv_header_stdc=yes
16683 echo "$as_me: failed program was:" >&5
16684 cat "conftest.$ac_ext" >&5
16685 ac_cv_header_stdc=no
16687 rm -f conftest.err "conftest.$ac_ext"
16689 if test $ac_cv_header_stdc = yes; then
16690 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16691 cat >"conftest.$ac_ext" <<_ACEOF
16692 #line 16692 "configure"
16693 #include "confdefs.h"
16694 #include <string.h>
16697 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16698 $EGREP "memchr" >/dev/null 2>&1; then
16701 ac_cv_header_stdc=no
16707 if test $ac_cv_header_stdc = yes; then
16708 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16709 cat >"conftest.$ac_ext" <<_ACEOF
16710 #line 16710 "configure"
16711 #include "confdefs.h"
16712 #include <stdlib.h>
16715 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16716 $EGREP "free" >/dev/null 2>&1; then
16719 ac_cv_header_stdc=no
16725 if test $ac_cv_header_stdc = yes; then
16726 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16727 if test "$cross_compiling" = yes; then
16730 cat >"conftest.$ac_ext" <<_ACEOF
16731 #line 16731 "configure"
16732 #include "confdefs.h"
16734 #if ((' ' & 0x0FF) == 0x020)
16735 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16736 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16738 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16739 || ('j' <= (c) && (c) <= 'r') \
16740 || ('s' <= (c) && (c) <= 'z'))
16741 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16744 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16749 for (i = 0; i < 256; i++)
16750 if (XOR (islower (i), ISLOWER (i))
16751 || toupper (i) != TOUPPER (i))
16752 $ac_main_return(2);
16753 $ac_main_return (0);
16756 rm -f "conftest$ac_exeext"
16757 if { (eval echo "$as_me:16757: \"$ac_link\"") >&5
16758 (eval $ac_link) 2>&5
16760 echo "$as_me:16760: \$? = $ac_status" >&5
16761 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16762 { (eval echo "$as_me:16762: \"$ac_try\"") >&5
16763 (eval $ac_try) 2>&5
16765 echo "$as_me:16765: \$? = $ac_status" >&5
16766 (exit "$ac_status"); }; }; then
16769 echo "$as_me: program exited with status $ac_status" >&5
16770 echo "$as_me: failed program was:" >&5
16771 cat "conftest.$ac_ext" >&5
16772 ac_cv_header_stdc=no
16774 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16778 echo "$as_me:16778: result: $ac_cv_header_stdc" >&5
16779 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16780 if test $ac_cv_header_stdc = yes; then
16782 cat >>confdefs.h <<\EOF
16783 #define STDC_HEADERS 1
16788 ac_header_dirent=no
16789 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16790 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16791 echo "$as_me:16791: checking for $ac_hdr that defines DIR" >&5
16792 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16793 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16794 echo $ECHO_N "(cached) $ECHO_C" >&6
16796 cat >"conftest.$ac_ext" <<_ACEOF
16797 #line 16797 "configure"
16798 #include "confdefs.h"
16799 #include <sys/types.h>
16811 rm -f "conftest.$ac_objext"
16812 if { (eval echo "$as_me:16812: \"$ac_compile\"") >&5
16813 (eval $ac_compile) 2>&5
16815 echo "$as_me:16815: \$? = $ac_status" >&5
16816 (exit "$ac_status"); } &&
16817 { ac_try='test -s "conftest.$ac_objext"'
16818 { (eval echo "$as_me:16818: \"$ac_try\"") >&5
16819 (eval $ac_try) 2>&5
16821 echo "$as_me:16821: \$? = $ac_status" >&5
16822 (exit "$ac_status"); }; }; then
16823 eval "$as_ac_Header=yes"
16825 echo "$as_me: failed program was:" >&5
16826 cat "conftest.$ac_ext" >&5
16827 eval "$as_ac_Header=no"
16829 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16831 echo "$as_me:16831: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16832 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16833 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16834 cat >>confdefs.h <<EOF
16835 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16838 ac_header_dirent=$ac_hdr; break
16842 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
16843 if test $ac_header_dirent = dirent.h; then
16844 echo "$as_me:16844: checking for opendir in -ldir" >&5
16845 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
16846 if test "${ac_cv_lib_dir_opendir+set}" = set; then
16847 echo $ECHO_N "(cached) $ECHO_C" >&6
16849 ac_check_lib_save_LIBS=$LIBS
16851 cat >"conftest.$ac_ext" <<_ACEOF
16852 #line 16852 "configure"
16853 #include "confdefs.h"
16855 /* Override any gcc2 internal prototype to avoid an error. */
16859 /* We use char because int might match the return type of a gcc2
16860 builtin and then its argument prototype would still apply. */
16870 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16871 if { (eval echo "$as_me:16871: \"$ac_link\"") >&5
16872 (eval $ac_link) 2>&5
16874 echo "$as_me:16874: \$? = $ac_status" >&5
16875 (exit "$ac_status"); } &&
16876 { ac_try='test -s "conftest$ac_exeext"'
16877 { (eval echo "$as_me:16877: \"$ac_try\"") >&5
16878 (eval $ac_try) 2>&5
16880 echo "$as_me:16880: \$? = $ac_status" >&5
16881 (exit "$ac_status"); }; }; then
16882 ac_cv_lib_dir_opendir=yes
16884 echo "$as_me: failed program was:" >&5
16885 cat "conftest.$ac_ext" >&5
16886 ac_cv_lib_dir_opendir=no
16888 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16889 LIBS=$ac_check_lib_save_LIBS
16891 echo "$as_me:16891: result: $ac_cv_lib_dir_opendir" >&5
16892 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
16893 if test "$ac_cv_lib_dir_opendir" = yes; then
16898 echo "$as_me:16898: checking for opendir in -lx" >&5
16899 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
16900 if test "${ac_cv_lib_x_opendir+set}" = set; then
16901 echo $ECHO_N "(cached) $ECHO_C" >&6
16903 ac_check_lib_save_LIBS=$LIBS
16905 cat >"conftest.$ac_ext" <<_ACEOF
16906 #line 16906 "configure"
16907 #include "confdefs.h"
16909 /* Override any gcc2 internal prototype to avoid an error. */
16913 /* We use char because int might match the return type of a gcc2
16914 builtin and then its argument prototype would still apply. */
16924 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16925 if { (eval echo "$as_me:16925: \"$ac_link\"") >&5
16926 (eval $ac_link) 2>&5
16928 echo "$as_me:16928: \$? = $ac_status" >&5
16929 (exit "$ac_status"); } &&
16930 { ac_try='test -s "conftest$ac_exeext"'
16931 { (eval echo "$as_me:16931: \"$ac_try\"") >&5
16932 (eval $ac_try) 2>&5
16934 echo "$as_me:16934: \$? = $ac_status" >&5
16935 (exit "$ac_status"); }; }; then
16936 ac_cv_lib_x_opendir=yes
16938 echo "$as_me: failed program was:" >&5
16939 cat "conftest.$ac_ext" >&5
16940 ac_cv_lib_x_opendir=no
16942 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16943 LIBS=$ac_check_lib_save_LIBS
16945 echo "$as_me:16945: result: $ac_cv_lib_x_opendir" >&5
16946 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
16947 if test "$ac_cv_lib_x_opendir" = yes; then
16953 echo "$as_me:16953: checking whether time.h and sys/time.h may both be included" >&5
16954 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16955 if test "${ac_cv_header_time+set}" = set; then
16956 echo $ECHO_N "(cached) $ECHO_C" >&6
16958 cat >"conftest.$ac_ext" <<_ACEOF
16959 #line 16959 "configure"
16960 #include "confdefs.h"
16961 #include <sys/types.h>
16962 #include <sys/time.h>
16968 if ((struct tm *) 0)
16974 rm -f "conftest.$ac_objext"
16975 if { (eval echo "$as_me:16975: \"$ac_compile\"") >&5
16976 (eval $ac_compile) 2>&5
16978 echo "$as_me:16978: \$? = $ac_status" >&5
16979 (exit "$ac_status"); } &&
16980 { ac_try='test -s "conftest.$ac_objext"'
16981 { (eval echo "$as_me:16981: \"$ac_try\"") >&5
16982 (eval $ac_try) 2>&5
16984 echo "$as_me:16984: \$? = $ac_status" >&5
16985 (exit "$ac_status"); }; }; then
16986 ac_cv_header_time=yes
16988 echo "$as_me: failed program was:" >&5
16989 cat "conftest.$ac_ext" >&5
16990 ac_cv_header_time=no
16992 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16994 echo "$as_me:16994: result: $ac_cv_header_time" >&5
16995 echo "${ECHO_T}$ac_cv_header_time" >&6
16996 if test $ac_cv_header_time = yes; then
16998 cat >>confdefs.h <<\EOF
16999 #define TIME_WITH_SYS_TIME 1
17004 ### checks for compiler characteristics
17006 ac_cpp='$CPP $CPPFLAGS'
17007 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17008 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17009 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17010 ac_main_return="return"
17012 echo "$as_me:17012: checking for an ANSI C-conforming const" >&5
17013 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17014 if test "${ac_cv_c_const+set}" = set; then
17015 echo $ECHO_N "(cached) $ECHO_C" >&6
17017 cat >"conftest.$ac_ext" <<_ACEOF
17018 #line 17018 "configure"
17019 #include "confdefs.h"
17024 /* FIXME: Include the comments suggested by Paul. */
17025 #ifndef __cplusplus
17026 /* Ultrix mips cc rejects this. */
17027 typedef int charset[2];
17029 /* SunOS 4.1.1 cc rejects this. */
17030 char const *const *ccp;
17032 /* NEC SVR4.0.2 mips cc rejects this. */
17033 struct point {int x, y;};
17034 static struct point const zero = {0,0};
17035 /* AIX XL C 1.02.0.0 rejects this.
17036 It does not let you subtract one const X* pointer from another in
17037 an arm of an if-expression whose if-part is not a constant
17039 const char *g = "string";
17040 ccp = &g + (g ? g-g : 0);
17041 /* HPUX 7.0 cc rejects these. */
17044 ccp = (char const *const *) p;
17045 { /* SCO 3.2v4 cc rejects this. */
17047 char const *s = 0 ? (char *) 0 : (char const *) 0;
17051 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
17052 int x[] = {25, 17};
17053 const int *foo = &x[0];
17056 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17057 typedef const int *iptr;
17061 { /* AIX XL C 1.02.0.0 rejects this saying
17062 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17063 struct s { int j; const int *ap[3]; };
17064 struct s *b; b->j = 5;
17066 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17067 const int foo = 10;
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
17089 echo "$as_me: failed program was:" >&5
17090 cat "conftest.$ac_ext" >&5
17093 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17095 echo "$as_me:17095: result: $ac_cv_c_const" >&5
17096 echo "${ECHO_T}$ac_cv_c_const" >&6
17097 if test $ac_cv_c_const = no; then
17099 cat >>confdefs.h <<\EOF
17105 ### Checks for external-data
17107 echo "$as_me:17107: checking if data-only library module links" >&5
17108 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
17109 if test "${cf_cv_link_dataonly+set}" = set; then
17110 echo $ECHO_N "(cached) $ECHO_C" >&6
17114 cat >conftest.$ac_ext <<EOF
17115 #line 17115 "configure"
17116 int testdata[3] = { 123, 456, 789 };
17118 if { (eval echo "$as_me:17118: \"$ac_compile\"") >&5
17119 (eval $ac_compile) 2>&5
17121 echo "$as_me:17121: \$? = $ac_status" >&5
17122 (exit "$ac_status"); } ; then
17123 mv conftest.o data.o && \
17124 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
17126 rm -f conftest.$ac_ext data.o
17127 cat >conftest.$ac_ext <<EOF
17128 #line 17128 "configure"
17132 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
17134 extern int testdata[3];
17135 return testdata[0] == 123
17136 && testdata[1] == 456
17137 && testdata[2] == 789;
17141 if { (eval echo "$as_me:17141: \"$ac_compile\"") >&5
17142 (eval $ac_compile) 2>&5
17144 echo "$as_me:17144: \$? = $ac_status" >&5
17145 (exit "$ac_status"); }; then
17146 mv conftest.o func.o && \
17147 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17149 rm -f conftest.$ac_ext func.o
17150 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17151 cf_saveLIBS="$LIBS"
17152 LIBS="conftest.a $LIBS"
17153 if test "$cross_compiling" = yes; then
17154 cf_cv_link_dataonly=unknown
17156 cat >"conftest.$ac_ext" <<_ACEOF
17157 #line 17157 "configure"
17158 #include "confdefs.h"
17162 extern int testfunc();
17163 ${cf_cv_main_return:-return} (!testfunc());
17167 rm -f "conftest$ac_exeext"
17168 if { (eval echo "$as_me:17168: \"$ac_link\"") >&5
17169 (eval $ac_link) 2>&5
17171 echo "$as_me:17171: \$? = $ac_status" >&5
17172 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17173 { (eval echo "$as_me:17173: \"$ac_try\"") >&5
17174 (eval $ac_try) 2>&5
17176 echo "$as_me:17176: \$? = $ac_status" >&5
17177 (exit "$ac_status"); }; }; then
17178 cf_cv_link_dataonly=yes
17180 echo "$as_me: program exited with status $ac_status" >&5
17181 echo "$as_me: failed program was:" >&5
17182 cat "conftest.$ac_ext" >&5
17183 cf_cv_link_dataonly=no
17185 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17187 LIBS="$cf_saveLIBS"
17191 echo "$as_me:17191: result: $cf_cv_link_dataonly" >&5
17192 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17194 if test "$cf_cv_link_dataonly" = no ; then
17196 cat >>confdefs.h <<\EOF
17197 #define BROKEN_LINKER 1
17203 ### Checks for library functions.
17209 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17210 echo "$as_me:17210: checking for $ac_header" >&5
17211 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17212 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17213 echo $ECHO_N "(cached) $ECHO_C" >&6
17215 cat >"conftest.$ac_ext" <<_ACEOF
17216 #line 17216 "configure"
17217 #include "confdefs.h"
17218 #include <$ac_header>
17220 if { (eval echo "$as_me:17220: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17221 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17223 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17225 cat conftest.err >&5
17226 echo "$as_me:17226: \$? = $ac_status" >&5
17227 (exit "$ac_status"); } >/dev/null; then
17228 if test -s conftest.err; then
17229 ac_cpp_err=$ac_c_preproc_warn_flag
17236 if test -z "$ac_cpp_err"; then
17237 eval "$as_ac_Header=yes"
17239 echo "$as_me: failed program was:" >&5
17240 cat "conftest.$ac_ext" >&5
17241 eval "$as_ac_Header=no"
17243 rm -f conftest.err "conftest.$ac_ext"
17245 echo "$as_me:17245: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17246 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17247 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17248 cat >>confdefs.h <<EOF
17249 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17255 echo "$as_me:17255: checking for working mkstemp" >&5
17256 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17257 if test "${cf_cv_func_mkstemp+set}" = set; then
17258 echo $ECHO_N "(cached) $ECHO_C" >&6
17262 if test "$cross_compiling" = yes; then
17263 cf_cv_func_mkstemp=maybe
17265 cat >"conftest.$ac_ext" <<_ACEOF
17266 #line 17266 "configure"
17267 #include "confdefs.h"
17269 #include <sys/types.h>
17270 #ifdef HAVE_UNISTD_H
17271 #include <unistd.h>
17273 #include <stdlib.h>
17275 #include <string.h>
17276 #include <sys/stat.h>
17279 char *tmpl = "conftestXXXXXX";
17287 for (n = 0; n < 2; ++n) {
17288 strcpy(name[n], tmpl);
17289 if ((fd = mkstemp(name[n])) >= 0) {
17290 if (!strcmp(name[n], tmpl)
17291 || stat(name[n], &sb) != 0
17292 || (sb.st_mode & S_IFMT) != S_IFREG
17293 || (sb.st_mode & 077) != 0) {
17300 && !strcmp(name[0], name[1]))
17302 ${cf_cv_main_return:-return}(result);
17306 rm -f "conftest$ac_exeext"
17307 if { (eval echo "$as_me:17307: \"$ac_link\"") >&5
17308 (eval $ac_link) 2>&5
17310 echo "$as_me:17310: \$? = $ac_status" >&5
17311 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17312 { (eval echo "$as_me:17312: \"$ac_try\"") >&5
17313 (eval $ac_try) 2>&5
17315 echo "$as_me:17315: \$? = $ac_status" >&5
17316 (exit "$ac_status"); }; }; then
17317 cf_cv_func_mkstemp=yes
17320 echo "$as_me: program exited with status $ac_status" >&5
17321 echo "$as_me: failed program was:" >&5
17322 cat "conftest.$ac_ext" >&5
17323 cf_cv_func_mkstemp=no
17326 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17330 echo "$as_me:17330: result: $cf_cv_func_mkstemp" >&5
17331 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17332 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17333 echo "$as_me:17333: checking for mkstemp" >&5
17334 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17335 if test "${ac_cv_func_mkstemp+set}" = set; then
17336 echo $ECHO_N "(cached) $ECHO_C" >&6
17338 cat >"conftest.$ac_ext" <<_ACEOF
17339 #line 17339 "configure"
17340 #include "confdefs.h"
17341 #define mkstemp autoconf_temporary
17342 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17349 /* We use char because int might match the return type of a gcc2
17350 builtin and then its argument prototype would still apply. */
17351 char mkstemp (void);
17357 /* The GNU C library defines stubs for functions which it implements
17358 to always fail with ENOSYS. Some functions are actually named
17359 something starting with __ and the normal name is an alias. */
17360 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17361 #error found stub for mkstemp
17369 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17370 if { (eval echo "$as_me:17370: \"$ac_link\"") >&5
17371 (eval $ac_link) 2>&5
17373 echo "$as_me:17373: \$? = $ac_status" >&5
17374 (exit "$ac_status"); } &&
17375 { ac_try='test -s "conftest$ac_exeext"'
17376 { (eval echo "$as_me:17376: \"$ac_try\"") >&5
17377 (eval $ac_try) 2>&5
17379 echo "$as_me:17379: \$? = $ac_status" >&5
17380 (exit "$ac_status"); }; }; then
17381 ac_cv_func_mkstemp=yes
17383 echo "$as_me: failed program was:" >&5
17384 cat "conftest.$ac_ext" >&5
17385 ac_cv_func_mkstemp=no
17387 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17389 echo "$as_me:17389: result: $ac_cv_func_mkstemp" >&5
17390 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17393 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17395 cat >>confdefs.h <<\EOF
17396 #define HAVE_MKSTEMP 1
17401 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17402 CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17403 CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17407 if test "$cf_with_ada" != "no" ; then
17409 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
17412 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17414 unset ac_cv_path_cf_TEMP_gnat
17416 # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
17417 set dummy $cf_prog_gnat; ac_word=$2
17418 echo "$as_me:17418: checking for $ac_word" >&5
17419 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17420 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
17421 echo $ECHO_N "(cached) $ECHO_C" >&6
17423 case $cf_TEMP_gnat in
17425 ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
17428 ac_save_IFS=$IFS; IFS=$ac_path_separator
17430 for ac_dir in $ac_dummy; do
17432 test -z "$ac_dir" && ac_dir=.
17433 if $as_executable_p "$ac_dir/$ac_word"; then
17434 ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
17435 echo "$as_me:17435: found $ac_dir/$ac_word" >&5
17440 test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
17444 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
17446 if test -n "$cf_TEMP_gnat"; then
17447 echo "$as_me:17447: result: $cf_TEMP_gnat" >&5
17448 echo "${ECHO_T}$cf_TEMP_gnat" >&6
17450 echo "$as_me:17450: result: no" >&5
17451 echo "${ECHO_T}no" >&6
17454 eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
17456 if test "x$cf_TEMP_gnat" != xno; then
17457 unset cf_cv_gnat_version
17460 echo "$as_me:17460: checking for $cf_prog_gnat version" >&5
17461 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
17462 if test "${cf_cv_gnat_version+set}" = set; then
17463 echo $ECHO_N "(cached) $ECHO_C" >&6
17466 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
17467 grep '[0-9].[0-9][0-9]*' |\
17468 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17471 echo "$as_me:17471: result: $cf_cv_gnat_version" >&5
17472 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17473 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17474 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
17477 eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
17480 unset cf_cv_gnat_version
17481 unset ac_cv_path_cf_TEMP_gnat
17484 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
17486 cf_cv_prog_gnat_correct=no
17488 cf_ada_make=gnatmake
17489 if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
17490 # gprconfig is newer than gnatmake; we can continue...
17493 rm -rf ./conftest* ./*~conftest*
17494 if mkdir conftest.src
17498 for cf_gprconfig in Ada C
17500 echo "$as_me:17500: checking for gprconfig name for $cf_gprconfig" >&5
17501 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
17502 if test "$cf_gprconfig" = C
17504 for cf_gprconfig_param in \
17505 "$cf_gprconfig,,,,GNATGCC" \
17506 "$cf_gprconfig,,,,GCC" \
17509 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17510 test -n "$cf_gprconfig_value" && break
17513 cf_gprconfig_param=$cf_gprconfig
17514 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17516 if test -n "$cf_gprconfig_value"
17518 eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
17519 echo "$as_me:17519: result: $cf_gprconfig_value" >&5
17520 echo "${ECHO_T}$cf_gprconfig_value" >&6
17522 echo "$as_me:17522: result: missing" >&5
17523 echo "${ECHO_T}missing" >&6
17529 rm -rf ./conftest* ./*~conftest*
17532 if test "x$cf_ada_config" != "x#"
17535 echo "$as_me:17535: checking for gnat version" >&5
17536 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17537 if test "${cf_cv_gnat_version+set}" = set; then
17538 echo $ECHO_N "(cached) $ECHO_C" >&6
17541 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
17542 grep '[0-9].[0-9][0-9]*' |\
17543 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17546 echo "$as_me:17546: result: $cf_cv_gnat_version" >&5
17547 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17548 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17550 case "$cf_cv_gnat_version" in
17551 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17552 cf_cv_prog_gnat_correct=yes
17555 { echo "$as_me:17555: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
17556 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
17557 cf_cv_prog_gnat_correct=no
17561 # Extract the first word of "m4", so it can be a program name with args.
17562 set dummy m4; ac_word=$2
17563 echo "$as_me:17563: checking for $ac_word" >&5
17564 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17565 if test "${ac_cv_prog_M4_exists+set}" = set; then
17566 echo $ECHO_N "(cached) $ECHO_C" >&6
17568 if test -n "$M4_exists"; then
17569 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17571 ac_save_IFS=$IFS; IFS=$ac_path_separator
17573 for ac_dir in $ac_dummy; do
17575 test -z "$ac_dir" && ac_dir=.
17576 $as_executable_p "$ac_dir/$ac_word" || continue
17577 ac_cv_prog_M4_exists="yes"
17578 echo "$as_me:17578: found $ac_dir/$ac_word" >&5
17582 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17585 M4_exists=$ac_cv_prog_M4_exists
17586 if test -n "$M4_exists"; then
17587 echo "$as_me:17587: result: $M4_exists" >&5
17588 echo "${ECHO_T}$M4_exists" >&6
17590 echo "$as_me:17590: result: no" >&5
17591 echo "${ECHO_T}no" >&6
17594 if test "$ac_cv_prog_M4_exists" = no; then
17595 cf_cv_prog_gnat_correct=no
17596 { echo "$as_me:17596: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
17597 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
17599 if test "$cf_cv_prog_gnat_correct" = yes; then
17600 echo "$as_me:17600: checking if GNAT works" >&5
17601 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17603 rm -rf ./conftest* ./*~conftest*
17604 cat >>conftest.ads <<CF_EOF
17605 procedure conftest;
17607 cat >>conftest.adb <<CF_EOF
17610 procedure conftest is
17612 Text_IO.Put ("Hello World");
17614 GNAT.OS_Lib.OS_Exit (0);
17617 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17618 if ( ./conftest 1>&5 2>&1 ) ; then
17619 cf_cv_prog_gnat_correct=yes
17621 cf_cv_prog_gnat_correct=no
17624 cf_cv_prog_gnat_correct=no
17626 rm -rf ./conftest* ./*~conftest*
17628 echo "$as_me:17628: result: $cf_cv_prog_gnat_correct" >&5
17629 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17632 cf_cv_prog_gnat_correct=no
17636 if test "$cf_cv_prog_gnat_correct" = yes; then
17638 echo "$as_me:17638: checking optimization options for ADAFLAGS" >&5
17639 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
17643 ADAFLAGS="$ADAFLAGS -g"
17649 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
17651 ADAFLAGS="$ADAFLAGS $cf_O_flag"
17655 echo "$as_me:17655: result: $ADAFLAGS" >&5
17656 echo "${ECHO_T}$ADAFLAGS" >&6
17658 echo "$as_me:17658: checking if GNATPREP supports -T option" >&5
17659 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
17660 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
17661 echo $ECHO_N "(cached) $ECHO_C" >&6
17664 cf_cv_gnatprep_opt_t=no
17665 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
17668 echo "$as_me:17668: result: $cf_cv_gnatprep_opt_t" >&5
17669 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
17670 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
17672 echo "$as_me:17672: checking if GNAT supports generics" >&5
17673 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
17674 case "$cf_cv_gnat_version" in
17675 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17676 cf_gnat_generics=yes
17679 cf_gnat_generics=no
17682 echo "$as_me:17682: result: $cf_gnat_generics" >&5
17683 echo "${ECHO_T}$cf_gnat_generics" >&6
17685 if test "$cf_gnat_generics" = yes
17687 cf_compile_generics=generics
17688 cf_generic_objects="\${GENOBJS}"
17690 cf_compile_generics=
17691 cf_generic_objects=
17694 echo "$as_me:17694: checking if GNAT supports SIGINT" >&5
17695 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
17696 if test "${cf_cv_gnat_sigint+set}" = set; then
17697 echo $ECHO_N "(cached) $ECHO_C" >&6
17700 rm -rf ./conftest* ./*~conftest*
17701 cat >>conftest.ads <<CF_EOF
17702 with Ada.Interrupts.Names;
17704 package ConfTest is
17706 pragma Warnings (Off); -- the next pragma exists since 3.11p
17707 pragma Unreserve_All_Interrupts;
17708 pragma Warnings (On);
17710 protected Process is
17712 function Continue return Boolean;
17713 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
17715 Done : Boolean := False;
17720 cat >>conftest.adb <<CF_EOF
17721 package body ConfTest is
17722 protected body Process is
17727 function Continue return Boolean is
17734 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17735 cf_cv_gnat_sigint=yes
17737 cf_cv_gnat_sigint=no
17739 rm -rf ./conftest* ./*~conftest*
17742 echo "$as_me:17742: result: $cf_cv_gnat_sigint" >&5
17743 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
17745 if test "$cf_cv_gnat_sigint" = yes ; then
17748 USE_GNAT_SIGINT="#"
17751 cf_gnat_libraries=no
17752 cf_gnat_projects=no
17754 if test "$enable_gnat_projects" != no ; then
17755 echo "$as_me:17755: checking if GNAT supports project files" >&5
17756 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
17757 case "$cf_cv_gnat_version" in
17761 case "$cf_cv_system_name" in
17765 rm -rf ./conftest* ./*~conftest*
17766 if mkdir conftest.src conftest.bin conftest.lib
17769 rm -rf ./conftest* ./*~conftest*
17770 cat >>library.gpr <<CF_EOF
17772 Kind := External ("LIB_KIND");
17773 for Library_Name use "ConfTest";
17774 for Object_Dir use ".";
17775 for Library_ALI_Dir use External("LIBRARY_DIR");
17776 for Library_Version use External ("SONAME");
17777 for Library_Kind use Kind;
17778 for Library_Dir use External("BUILD_DIR");
17779 Source_Dir := External ("SOURCE_DIR");
17780 for Source_Dirs use (Source_Dir);
17783 cat >>confpackage.ads <<CF_EOF
17784 package ConfPackage is
17785 procedure conftest;
17788 cat >>confpackage.adb <<CF_EOF
17790 package body ConfPackage is
17791 procedure conftest is
17793 Text_IO.Put ("Hello World");
17798 if ( "$cf_ada_make" $ADAFLAGS \
17800 -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
17801 -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
17802 -XSOURCE_DIR="`pwd`" \
17803 -XSONAME=libConfTest.so.1 \
17804 -XLIB_KIND=static 1>&5 2>&1 ) ; then
17805 cf_gnat_projects=yes
17809 if test -f conftest.lib/confpackage.ali
17811 cf_gnat_libraries=yes
17813 rm -rf ./conftest* ./*~conftest*
17818 echo "$as_me:17818: result: $cf_gnat_projects" >&5
17819 echo "${ECHO_T}$cf_gnat_projects" >&6
17820 fi # enable_gnat_projects
17822 if test "$cf_gnat_projects" = yes
17824 echo "$as_me:17824: checking if GNAT supports libraries" >&5
17825 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
17826 echo "$as_me:17826: result: $cf_gnat_libraries" >&5
17827 echo "${ECHO_T}$cf_gnat_libraries" >&6
17830 USE_OLD_MAKERULES=""
17831 USE_GNAT_PROJECTS="#"
17832 USE_GNAT_MAKE_GPR="#"
17833 USE_GNAT_GPRBUILD="#"
17835 if test "$cf_gnat_projects" = yes
17837 USE_OLD_MAKERULES="#"
17838 USE_GNAT_PROJECTS=""
17839 if test "$cf_cv_VERSION_GPRBUILD" != no
17841 USE_GNAT_GPRBUILD=""
17842 elif test "$cf_cv_VERSION_GNATMAKE" != no
17844 USE_GNAT_MAKE_GPR=""
17846 { echo "$as_me:17846: WARNING: use old makefile rules since tools are missing" >&5
17847 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
17851 if test "$cf_gnat_libraries" = yes
17853 USE_GNAT_LIBRARIES=""
17855 USE_GNAT_LIBRARIES="#"
17858 echo "$as_me:17858: checking for ada-compiler" >&5
17859 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
17861 # Check whether --with-ada-compiler or --without-ada-compiler was given.
17862 if test "${with_ada_compiler+set}" = set; then
17863 withval="$with_ada_compiler"
17864 cf_ada_compiler=$withval
17866 cf_ada_compiler=gnatmake
17869 echo "$as_me:17869: result: $cf_ada_compiler" >&5
17870 echo "${ECHO_T}$cf_ada_compiler" >&6
17872 cf_ada_package=terminal_interface
17874 echo "$as_me:17874: checking for ada-include" >&5
17875 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
17877 # Check whether --with-ada-include or --without-ada-include was given.
17878 if test "${with_ada_include+set}" = set; then
17879 withval="$with_ada_include"
17882 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
17883 fi; if test -n "$prefix/share/ada/adainclude" ; then
17885 if test "x$prefix" != xNONE; then
17886 cf_path_syntax="$prefix"
17888 cf_path_syntax="$ac_default_prefix"
17891 case ".$withval" in
17892 (.\$\(*\)*|.\'*\'*)
17896 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17898 (.\$\{*prefix\}*|.\$\{*dir\}*)
17899 eval withval="$withval"
17900 case ".$withval" in
17902 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17907 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17910 { { echo "$as_me:17910: error: expected a pathname, not \"$withval\"" >&5
17911 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17912 { (exit 1); exit 1; }; }
17917 eval ADA_INCLUDE="$withval"
17919 echo "$as_me:17919: result: $ADA_INCLUDE" >&5
17920 echo "${ECHO_T}$ADA_INCLUDE" >&6
17922 echo "$as_me:17922: checking for ada-objects" >&5
17923 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
17925 # Check whether --with-ada-objects or --without-ada-objects was given.
17926 if test "${with_ada_objects+set}" = set; then
17927 withval="$with_ada_objects"
17930 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
17931 fi; if test -n "$prefix/lib/ada/adalib" ; then
17933 if test "x$prefix" != xNONE; then
17934 cf_path_syntax="$prefix"
17936 cf_path_syntax="$ac_default_prefix"
17939 case ".$withval" in
17940 (.\$\(*\)*|.\'*\'*)
17944 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17946 (.\$\{*prefix\}*|.\$\{*dir\}*)
17947 eval withval="$withval"
17948 case ".$withval" in
17950 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17955 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17958 { { echo "$as_me:17958: error: expected a pathname, not \"$withval\"" >&5
17959 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17960 { (exit 1); exit 1; }; }
17965 eval ADA_OBJECTS="$withval"
17967 echo "$as_me:17967: result: $ADA_OBJECTS" >&5
17968 echo "${ECHO_T}$ADA_OBJECTS" >&6
17970 echo "$as_me:17970: checking if an Ada95 shared-library should be built" >&5
17971 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
17973 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
17974 if test "${with_ada_sharedlib+set}" = set; then
17975 withval="$with_ada_sharedlib"
17976 with_ada_sharedlib=$withval
17978 with_ada_sharedlib=no
17980 echo "$as_me:17980: result: $with_ada_sharedlib" >&5
17981 echo "${ECHO_T}$with_ada_sharedlib" >&6
17983 if test "x$with_ada_sharedlib" != xno
17985 if test "x$cf_gnat_projects" != xyes
17987 { echo "$as_me:17987: WARNING: disabling shared-library since GNAT projects are not supported" >&5
17988 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
17989 with_ada_sharedlib=no
17993 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
17994 MAKE_ADA_SHAREDLIB="#"
17996 if test "x$with_ada_sharedlib" != xno
17998 MAKE_ADA_SHAREDLIB=
17999 if test "x$with_ada_sharedlib" != xyes
18001 ADA_SHAREDLIB="$with_ada_sharedlib"
18005 # allow the Ada binding to be renamed
18007 echo "$as_me:18007: checking for ada-libname" >&5
18008 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
18010 # Check whether --with-ada-libname or --without-ada-libname was given.
18011 if test "${with_ada_libname+set}" = set; then
18012 withval="$with_ada_libname"
18013 ADA_LIBNAME=$withval
18015 ADA_LIBNAME=AdaCurses
18017 case "x$ADA_LIBNAME" in
18019 ADA_LIBNAME=AdaCurses
18023 echo "$as_me:18023: result: $ADA_LIBNAME" >&5
18024 echo "${ECHO_T}$ADA_LIBNAME" >&6
18027 { { echo "$as_me:18027: error: No usable Ada compiler found" >&5
18028 echo "$as_me: error: No usable Ada compiler found" >&2;}
18029 { (exit 1); exit 1; }; }
18032 { { echo "$as_me:18032: error: The Ada compiler is needed for this package" >&5
18033 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
18034 { (exit 1); exit 1; }; }
18037 ################################################################################
18044 ### Construct the list of include-directories to be generated
18046 if test "$srcdir" != "."; then
18047 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
18049 CPPFLAGS="-I../include $CPPFLAGS"
18050 if test "$srcdir" != "."; then
18051 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
18053 CPPFLAGS="-I. $CPPFLAGS"
18055 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18056 if test "$srcdir" != "."; then
18057 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18059 if test "$GCC" != yes; then
18060 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18061 elif test "$includedir" != "/usr/include"; then
18062 if test "$includedir" = '${prefix}/include' ; then
18063 if test x$prefix != x/usr ; then
18064 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18067 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18071 ### Build up pieces for makefile rules
18072 echo "$as_me:18072: checking default library suffix" >&5
18073 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18075 case $DFT_LWR_MODEL in
18076 (libtool) DFT_ARG_SUFFIX='' ;;
18077 (normal) DFT_ARG_SUFFIX='' ;;
18078 (debug) DFT_ARG_SUFFIX='_g' ;;
18079 (profile) DFT_ARG_SUFFIX='_p' ;;
18080 (shared) DFT_ARG_SUFFIX='' ;;
18082 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18083 echo "$as_me:18083: result: $DFT_ARG_SUFFIX" >&5
18084 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18086 echo "$as_me:18086: checking default library-dependency suffix" >&5
18087 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18089 case X$DFT_LWR_MODEL in
18091 DFT_LIB_SUFFIX='.la'
18092 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18095 case "$cf_cv_system_name" in
18097 DFT_LIB_SUFFIX='_g.lib'
18100 DFT_LIB_SUFFIX='_g.a'
18103 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18106 case "$cf_cv_system_name" in
18108 DFT_LIB_SUFFIX='_p.lib'
18111 DFT_LIB_SUFFIX='_p.a'
18114 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18117 case "$cf_cv_system_name" in
18119 DFT_LIB_SUFFIX='.so'
18120 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18123 DFT_LIB_SUFFIX='.dll'
18124 DFT_DEP_SUFFIX='.dll.lib'
18126 (cygwin*|msys*|mingw*)
18127 DFT_LIB_SUFFIX='.dll'
18128 DFT_DEP_SUFFIX='.dll.a'
18131 DFT_LIB_SUFFIX='.dylib'
18132 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18137 DFT_LIB_SUFFIX='.so'
18138 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18141 DFT_LIB_SUFFIX='.sl'
18142 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18147 DFT_LIB_SUFFIX='.so'
18148 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18155 DFT_LIB_SUFFIX='.lib'
18158 DFT_LIB_SUFFIX='.a'
18161 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18164 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
18166 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
18167 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
18169 echo "$as_me:18169: result: $DFT_DEP_SUFFIX" >&5
18170 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18172 echo "$as_me:18172: checking default object directory" >&5
18173 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18175 case $DFT_LWR_MODEL in
18176 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
18177 (normal) DFT_OBJ_SUBDIR='objects' ;;
18178 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
18179 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
18181 case "$cf_cv_system_name" in
18183 DFT_OBJ_SUBDIR='objects' ;;
18185 DFT_OBJ_SUBDIR='obj_s' ;;
18188 echo "$as_me:18188: result: $DFT_OBJ_SUBDIR" >&5
18189 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18191 ### Set up low-level terminfo dependencies for makefiles.
18193 if test "$DFT_LWR_MODEL" = shared ; then
18194 case $cf_cv_system_name in
18196 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18199 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
18204 USE_ARG_SUFFIX=${DFT_ARG_SUFFIX}
18206 USE_LIB_SUFFIX=${DFT_ARG_SUFFIX}
18208 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
18210 ### Construct the list of subdirectories for which we'll customize makefiles
18211 ### with the appropriate compile-rules.
18213 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
18215 cat >>confdefs.h <<EOF
18216 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18219 ################################################################################
18225 NCURSES_SHLIB2="sh -c"
18227 ADA_SUBDIRS="include gen src doc"
18228 if test "x$cf_with_tests" != "xno" ; then
18229 ADA_SUBDIRS="$ADA_SUBDIRS samples"
18231 for cf_dir in $ADA_SUBDIRS
18233 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18240 # match layout used by make-tar.sh
18241 ADAHTML_DIR=../doc/ada
18243 if test "x$cross_compiling" = xyes ; then
18244 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
18246 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
18249 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"
18250 ac_config_commands="$ac_config_commands default"
18251 cat >confcache <<\_ACEOF
18252 # This file is a shell script that caches the results of configure
18253 # tests run on this system so they can be shared between configure
18254 # scripts and configure runs, see configure's option --config-cache.
18255 # It is not useful on other systems. If it contains results you don't
18256 # want to keep, you may remove or edit it.
18258 # config.status only pays attention to the cache file if you give it
18259 # the --recheck option to rerun configure.
18261 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18262 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18263 # following values.
18267 # The following way of writing the cache mishandles newlines in values,
18268 # but we know of no workaround that is simple, portable, and efficient.
18269 # So, don't put newlines in cache variables' values.
18270 # Ultrix sh set writes to stderr and can't be redirected directly,
18271 # and sets the high bit in the cache file unless we assign to the vars.
18274 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18276 # `set' does not quote correctly, so add quotes (double-quote
18277 # substitution turns \\\\ into \\, and sed turns \\ into \).
18280 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18283 # `set' quotes correctly as required by POSIX, so do not add quotes.
18285 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18292 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18294 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18296 if cmp -s $cache_file confcache; then :; else
18297 if test -w $cache_file; then
18298 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18299 cat confcache >$cache_file
18301 echo "not updating unwritable cache $cache_file"
18306 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18307 # Let make expand exec_prefix.
18308 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18310 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18311 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18312 # trailing colons and then remove the whole line if VPATH becomes empty
18313 # (actually we leave an empty line to preserve line numbers).
18314 if test "x$srcdir" = x.; then
18315 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18316 s/:*\$(srcdir):*/:/;
18317 s/:*\${srcdir}:*/:/;
18319 s/^\([^=]*=[ ]*\):*/\1/;
18325 DEFS=-DHAVE_CONFIG_H
18327 : "${CONFIG_STATUS=./config.status}"
18328 ac_clean_files_save=$ac_clean_files
18329 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18330 { echo "$as_me:18330: creating $CONFIG_STATUS" >&5
18331 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18332 cat >"$CONFIG_STATUS" <<_ACEOF
18334 # Generated automatically by configure.
18335 # Run this file to recreate the current configuration.
18336 # Compiler output produced by configure, useful for debugging
18337 # configure, is in config.log if it exists.
18340 SHELL=\${CONFIG_SHELL-$SHELL}
18341 ac_cs_invocation="\$0 \$@"
18343 CLICOLOR_FORCE= GREP_OPTIONS=
18344 unset CLICOLOR_FORCE GREP_OPTIONS
18347 cat >>"$CONFIG_STATUS" <<\_ACEOF
18348 # Be Bourne compatible
18349 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18352 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18356 # Name of the executable.
18357 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18359 if expr a : '\(a\)' >/dev/null 2>&1; then
18365 rm -f conf$$ conf$$.exe conf$$.file
18367 if ln -s conf$$.file conf$$ 2>/dev/null; then
18368 # We could just check for DJGPP; but this test a) works b) is more generic
18369 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18370 if test -f conf$$.exe; then
18371 # Don't use ln at all; we don't have any links
18376 elif ln conf$$.file conf$$ 2>/dev/null; then
18381 rm -f conf$$ conf$$.exe conf$$.file
18383 as_executable_p="test -f"
18385 # Support unset when possible.
18386 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18393 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18394 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18395 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18396 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18397 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18398 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18399 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18400 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18403 # We need space, tab and new line, in precisely that order.
18409 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18415 # Files that config.status was made for.
18416 if test -n "$ac_config_files"; then
18417 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
18420 if test -n "$ac_config_headers"; then
18421 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
18424 if test -n "$ac_config_links"; then
18425 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
18428 if test -n "$ac_config_commands"; then
18429 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
18432 cat >>"$CONFIG_STATUS" <<\EOF
18435 \`$as_me' instantiates files from templates according to the
18436 current configuration.
18438 Usage: $0 [OPTIONS] [FILE]...
18440 -h, --help print this help, then exit
18441 -V, --version print version number, then exit
18442 -d, --debug don't remove temporary files
18443 --recheck update $as_me by reconfiguring in the same conditions
18444 --file=FILE[:TEMPLATE]
18445 instantiate the configuration file FILE
18446 --header=FILE[:TEMPLATE]
18447 instantiate the configuration header FILE
18449 Configuration files:
18452 Configuration headers:
18455 Configuration commands:
18458 Report bugs to <dickey@invisible-island.net>."
18461 cat >>"$CONFIG_STATUS" <<EOF
18464 configured by $0, generated by GNU Autoconf 2.52.20210509,
18465 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18467 Copyright 2003-2020,2021 Thomas E. Dickey
18468 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18469 Free Software Foundation, Inc.
18470 This config.status script is free software; the Free Software Foundation
18471 gives unlimited permission to copy, distribute and modify it."
18476 cat >>"$CONFIG_STATUS" <<\EOF
18477 # If no file are specified by the user, then we need to provide default
18478 # value. By we need to know if files were specified by the user.
18484 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18485 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18487 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18491 *) # This is not an option, so the user has probably given explicit
18493 ac_need_defaults=false;;
18497 # Handling of the options.
18499 cat >>"$CONFIG_STATUS" <<EOF
18500 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18501 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18502 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18504 cat >>"$CONFIG_STATUS" <<\EOF
18505 --version | --vers* | -V )
18506 echo "$ac_cs_version"; exit 0 ;;
18508 # Conflict between --help and --header
18509 { { echo "$as_me:18509: error: ambiguous option: $1
18510 Try \`$0 --help' for more information." >&5
18511 echo "$as_me: error: ambiguous option: $1
18512 Try \`$0 --help' for more information." >&2;}
18513 { (exit 1); exit 1; }; };;
18514 --help | --hel | -h )
18515 echo "$ac_cs_usage"; exit 0 ;;
18516 --debug | --d* | -d )
18518 --file | --fil | --fi | --f )
18520 CONFIG_FILES="$CONFIG_FILES $1"
18521 ac_need_defaults=false;;
18522 --header | --heade | --head | --hea )
18524 CONFIG_HEADERS="$CONFIG_HEADERS $1"
18525 ac_need_defaults=false;;
18527 # This is an error.
18528 -*) { { echo "$as_me:18528: error: unrecognized option: $1
18529 Try \`$0 --help' for more information." >&5
18530 echo "$as_me: error: unrecognized option: $1
18531 Try \`$0 --help' for more information." >&2;}
18532 { (exit 1); exit 1; }; } ;;
18534 *) ac_config_targets="$ac_config_targets $1" ;;
18543 ## ----------------------- ##
18544 ## Running config.status. ##
18545 ## ----------------------- ##
18547 This file was extended by $as_me 2.52.20210509, executed with
18548 CONFIG_FILES = $CONFIG_FILES
18549 CONFIG_HEADERS = $CONFIG_HEADERS
18550 CONFIG_LINKS = $CONFIG_LINKS
18551 CONFIG_COMMANDS = $CONFIG_COMMANDS
18552 > "$ac_cs_invocation"
18553 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18558 cat >>"$CONFIG_STATUS" <<EOF
18560 # INIT-COMMANDS section.
18563 ### Special initialization commands, used to pass information from the
18564 ### configuration-run into config.status
18567 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
18568 DFT_LWR_MODEL="$DFT_LWR_MODEL"
18569 LIB_NAME="$LIB_NAME"
18570 LIB_PREFIX="$LIB_PREFIX"
18571 LIB_SUFFIX="$LIB_SUFFIX"
18573 NCURSES_MAJOR="$NCURSES_MAJOR"
18574 NCURSES_MINOR="$NCURSES_MINOR"
18575 NCURSES_PATCH="$NCURSES_PATCH"
18576 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
18577 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
18578 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
18579 cf_cv_abi_version="$cf_cv_abi_version"
18580 cf_cv_rel_version="$cf_cv_rel_version"
18581 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
18582 cf_cv_shared_soname='$cf_cv_shared_soname'
18583 cf_cv_shlib_version="$cf_cv_shlib_version"
18584 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
18585 cf_cv_system_name="$cf_cv_system_name"
18591 cat >>"$CONFIG_STATUS" <<\EOF
18592 for ac_config_target in $ac_config_targets
18594 case "$ac_config_target" in
18595 # Handling of arguments.
18596 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
18597 "src/library.gpr" ) CONFIG_FILES="$CONFIG_FILES src/library.gpr:src/library.gpr.in" ;;
18598 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
18599 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18600 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18601 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
18602 *) { { echo "$as_me:18602: error: invalid argument: $ac_config_target" >&5
18603 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18604 { (exit 1); exit 1; }; };;
18608 # If the user did not use the arguments to specify the items to instantiate,
18609 # then the envvar interface is used. Set only those that are not.
18610 # We use the long form for the default assignment because of an extremely
18611 # bizarre bug on SunOS 4.1.3.
18612 if "$ac_need_defaults"; then
18613 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18614 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18615 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18618 # Create a temporary directory, and hook for its removal unless debugging.
18621 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18622 trap '{ (exit 1); exit 1; }' 1 2 13 15
18625 # Create a (secure) tmp directory for tmp files.
18628 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18629 test -n "$tmp" && test -d "$tmp"
18632 tmp=$TMPDIR/cs$$-$RANDOM
18633 (umask 077 && mkdir $tmp)
18636 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18637 { (exit 1); exit 1; }
18642 cat >>"$CONFIG_STATUS" <<EOF
18645 # CONFIG_FILES section.
18648 # No need to generate the scripts if there are no CONFIG_FILES.
18649 # This happens for instance when ./config.status config.h
18650 if test -n "\$CONFIG_FILES"; then
18651 # Protect against being on the right side of a sed subst in config.status.
18652 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18653 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18654 s,@SHELL@,$SHELL,;t t
18655 s,@exec_prefix@,$exec_prefix,;t t
18656 s,@prefix@,$prefix,;t t
18657 s,@program_transform_name@,$program_transform_name,;t t
18658 s,@bindir@,$bindir,;t t
18659 s,@sbindir@,$sbindir,;t t
18660 s,@libexecdir@,$libexecdir,;t t
18661 s,@datarootdir@,$datarootdir,;t t
18662 s,@datadir@,$datadir,;t t
18663 s,@sysconfdir@,$sysconfdir,;t t
18664 s,@sharedstatedir@,$sharedstatedir,;t t
18665 s,@localstatedir@,$localstatedir,;t t
18666 s,@runstatedir@,$runstatedir,;t t
18667 s,@libdir@,$libdir,;t t
18668 s,@includedir@,$includedir,;t t
18669 s,@oldincludedir@,$oldincludedir,;t t
18670 s,@infodir@,$infodir,;t t
18671 s,@mandir@,$mandir,;t t
18672 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18673 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18674 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18675 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18676 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18677 s,@build_alias@,$build_alias,;t t
18678 s,@host_alias@,$host_alias,;t t
18679 s,@target_alias@,$target_alias,;t t
18680 s,@ECHO_C@,$ECHO_C,;t t
18681 s,@ECHO_N@,$ECHO_N,;t t
18682 s,@ECHO_T@,$ECHO_T,;t t
18683 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18684 s,@DEFS@,$DEFS,;t t
18685 s,@LIBS@,$LIBS,;t t
18686 s,@top_builddir@,$top_builddir,;t t
18687 s,@build@,$build,;t t
18688 s,@build_cpu@,$build_cpu,;t t
18689 s,@build_vendor@,$build_vendor,;t t
18690 s,@build_os@,$build_os,;t t
18691 s,@host@,$host,;t t
18692 s,@host_cpu@,$host_cpu,;t t
18693 s,@host_vendor@,$host_vendor,;t t
18694 s,@host_os@,$host_os,;t t
18695 s,@target@,$target,;t t
18696 s,@target_cpu@,$target_cpu,;t t
18697 s,@target_vendor@,$target_vendor,;t t
18698 s,@target_os@,$target_os,;t t
18699 s,@GREP@,$GREP,;t t
18700 s,@FGREP@,$FGREP,;t t
18702 s,@CFLAGS@,$CFLAGS,;t t
18703 s,@LDFLAGS@,$LDFLAGS,;t t
18704 s,@CPPFLAGS@,$CPPFLAGS,;t t
18705 s,@ac_ct_CC@,$ac_ct_CC,;t t
18706 s,@EXEEXT@,$EXEEXT,;t t
18707 s,@OBJEXT@,$OBJEXT,;t t
18708 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18710 s,@EGREP@,$EGREP,;t t
18712 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18713 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18714 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18715 s,@LN_S@,$LN_S,;t t
18716 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
18717 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
18718 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18719 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
18720 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
18721 s,@SET_MAKE@,$SET_MAKE,;t t
18722 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
18723 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
18724 s,@CTAGS@,$CTAGS,;t t
18725 s,@ETAGS@,$ETAGS,;t t
18726 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18727 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18728 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
18729 s,@RANLIB@,$RANLIB,;t t
18730 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18732 s,@ac_ct_LD@,$ac_ct_LD,;t t
18734 s,@ac_ct_AR@,$ac_ct_AR,;t t
18735 s,@ARFLAGS@,$ARFLAGS,;t t
18736 s,@DESTDIR@,$DESTDIR,;t t
18737 s,@BUILD_CC@,$BUILD_CC,;t t
18738 s,@BUILD_CPP@,$BUILD_CPP,;t t
18739 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
18740 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
18741 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
18742 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
18743 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
18744 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
18745 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
18746 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
18747 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
18748 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
18749 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
18750 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
18751 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
18752 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18753 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18754 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
18755 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
18756 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
18757 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
18758 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
18759 s,@CC_G_OPT@,$CC_G_OPT,;t t
18760 s,@LD_MODEL@,$LD_MODEL,;t t
18761 s,@shlibdir@,$shlibdir,;t t
18762 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
18763 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
18764 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
18765 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
18766 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
18767 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
18768 s,@LINK_PROGS@,$LINK_PROGS,;t t
18769 s,@LINK_TESTS@,$LINK_TESTS,;t t
18770 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
18771 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
18772 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
18773 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
18774 s,@RPATH_LIST@,$RPATH_LIST,;t t
18775 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
18776 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
18777 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
18778 s,@PTHREAD@,$PTHREAD,;t t
18779 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
18780 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18781 s,@ECHO_LT@,$ECHO_LT,;t t
18782 s,@ECHO_LD@,$ECHO_LD,;t t
18783 s,@RULE_CC@,$RULE_CC,;t t
18784 s,@SHOW_CC@,$SHOW_CC,;t t
18785 s,@ECHO_CC@,$ECHO_CC,;t t
18786 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18787 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
18788 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
18789 s,@ADAFLAGS@,$ADAFLAGS,;t t
18790 s,@ADA_TRACE@,$ADA_TRACE,;t t
18791 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
18792 s,@M4_exists@,$M4_exists,;t t
18793 s,@cf_ada_make@,$cf_ada_make,;t t
18794 s,@cf_ada_config@,$cf_ada_config,;t t
18795 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
18796 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
18797 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
18798 s,@cf_compile_generics@,$cf_compile_generics,;t t
18799 s,@cf_generic_objects@,$cf_generic_objects,;t t
18800 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
18801 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
18802 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
18803 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
18804 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
18805 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
18806 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
18807 s,@cf_ada_package@,$cf_ada_package,;t t
18808 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
18809 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
18810 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
18811 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
18812 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
18813 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
18814 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
18815 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
18816 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
18817 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18818 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18819 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
18820 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
18821 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
18822 s,@TEST_ARG2@,$TEST_ARG2,;t t
18823 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
18824 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
18825 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
18826 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
18827 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
18828 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
18829 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
18834 cat >>"$CONFIG_STATUS" <<\EOF
18835 # Split the substitutions into bite-sized pieces for seds with
18836 # small command number limits, like on Digital OSF/1 and HP-UX.
18837 ac_max_sed_lines=48
18838 ac_sed_frag=1 # Number of current file.
18839 ac_beg=1 # First line for current file.
18840 ac_end=$ac_max_sed_lines # Line after last line for current file.
18843 while "$ac_more_lines"; do
18844 if test "$ac_beg" -gt 1; then
18845 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18847 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18849 if test ! -s $tmp/subs.frag; then
18850 ac_more_lines=false
18852 # The purpose of the label and of the branching condition is to
18853 # speed up the sed processing (if there are no `@' at all, there
18854 # is no need to browse any of the substitutions).
18855 # These are the two extra sed commands mentioned above.
18857 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18858 # It is possible to make a multiline substitution using escaped newlines.
18859 # Ensure that we do not split the substitution between script fragments.
18861 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
18862 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
18863 if test -s $tmp/subs.next; then
18864 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
18865 if test ! -s $tmp/subs.edit; then
18866 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
18867 if test ! -s $tmp/subs.edit; then
18868 if test "$ac_beg" -gt 1; then
18869 ac_end=`expr "$ac_end" - 1`
18876 if test -z "$ac_sed_cmds"; then
18877 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18879 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18881 ac_sed_frag=`expr "$ac_sed_frag" + 1`
18883 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
18886 if test -z "$ac_sed_cmds"; then
18889 fi # test -n "$CONFIG_FILES"
18892 cat >>"$CONFIG_STATUS" <<\EOF
18893 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18894 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18896 - | *:- | *:-:* ) # input from stdin
18898 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18899 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18900 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18901 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18902 * ) ac_file_in=$ac_file.in ;;
18905 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18906 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18907 X"$ac_file" : 'X\(//\)[^/]' \| \
18908 X"$ac_file" : 'X\(//\)$' \| \
18909 X"$ac_file" : 'X\(/\)' \| \
18910 . : '\(.\)' 2>/dev/null ||
18912 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18913 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18914 /^X\(\/\/\)$/{ s//\1/; q; }
18915 /^X\(\/\).*/{ s//\1/; q; }
18917 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18918 { case "$ac_dir" in
18919 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18923 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18924 case $as_mkdir_dir in
18925 # Skip DOS drivespec
18926 ?:) as_incr_dir=$as_mkdir_dir ;;
18928 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18929 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18934 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18935 # A "../" for each directory in $ac_dir_suffix.
18936 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18938 ac_dir_suffix= ac_dots=
18943 if test -z "$ac_dots"; then
18946 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
18948 [\\/]* | ?:[\\/]* )
18949 ac_srcdir="$srcdir$ac_dir_suffix";
18950 ac_top_srcdir="$srcdir" ;;
18951 *) # Relative path.
18952 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
18953 ac_top_srcdir="$ac_dots$srcdir" ;;
18957 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18958 *) ac_INSTALL=$ac_dots$INSTALL ;;
18961 if test x"$ac_file" != x-; then
18962 { echo "$as_me:18962: creating $ac_file" >&5
18963 echo "$as_me: creating $ac_file" >&6;}
18966 # Let's still pretend it is `configure' which instantiates (i.e., don't
18967 # use $as_me), people would be surprised to read:
18968 # /* config.h. Generated automatically by config.status. */
18969 configure_input="Generated automatically from `echo $ac_file_in |
18970 sed 's,.*/,,'` by configure."
18972 # First look for the input files in the build tree, otherwise in the
18974 ac_file_inputs=`IFS=:
18975 for f in $ac_file_in; do
18977 -) echo $tmp/stdin ;;
18979 # Absolute (can't be DOS-style, as IFS=:)
18980 test -f "$f" || { { echo "$as_me:18980: error: cannot find input file: $f" >&5
18981 echo "$as_me: error: cannot find input file: $f" >&2;}
18982 { (exit 1); exit 1; }; }
18985 if test -f "$f"; then
18988 elif test -f "$srcdir/$f"; then
18993 { { echo "$as_me:18993: error: cannot find input file: $f" >&5
18994 echo "$as_me: error: cannot find input file: $f" >&2;}
18995 { (exit 1); exit 1; }; }
18998 done` || { (exit 1); exit 1; }
19000 cat >>"$CONFIG_STATUS" <<\EOF
19001 ac_warn_datarootdir=no
19002 if test x"$ac_file" != x-; then
19003 for ac_item in $ac_file_inputs
19005 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
19006 if test -n "$ac_seen"; then
19007 ac_used=`grep '@datarootdir@' "$ac_item"`
19008 if test -z "$ac_used"; then
19009 { echo "$as_me:19009: WARNING: datarootdir was used implicitly but not set:
19011 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
19013 ac_warn_datarootdir=yes
19016 ac_seen=`grep '${datarootdir}' "$ac_item"`
19017 if test -n "$ac_seen"; then
19018 { echo "$as_me:19018: WARNING: datarootdir was used explicitly but not set:
19020 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
19022 ac_warn_datarootdir=yes
19027 if test "x$ac_warn_datarootdir" = xyes; then
19028 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
19032 cat >>"$CONFIG_STATUS" <<EOF
19036 cat >>"$CONFIG_STATUS" <<\EOF
19038 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19039 s,@configure_input@,$configure_input,;t t
19040 s,@srcdir@,$ac_srcdir,;t t
19041 s,@top_srcdir@,$ac_top_srcdir,;t t
19042 s,@INSTALL@,$ac_INSTALL,;t t
19043 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19045 if test x"$ac_file" != x-; then
19046 cp "$tmp/out" "$ac_file"
19048 for ac_name in prefix exec_prefix datarootdir
19050 ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
19051 if test -n "$ac_seen"; then
19052 ac_init=`${EGREP-egrep} '[ ]*'$ac_name'[ ]*=' "$ac_file"`
19053 if test -z "$ac_init"; then
19054 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
19055 { echo "$as_me:19055: WARNING: Variable $ac_name is used but was not set:
19057 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
19062 ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
19063 ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
19064 if test -s $tmp/out; then
19065 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
19066 { echo "$as_me:19066: WARNING: Some variables may not be substituted:
19068 echo "$as_me: WARNING: Some variables may not be substituted:
19078 cat >>"$CONFIG_STATUS" <<\EOF
19081 # CONFIG_HEADER section.
19084 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19085 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19087 # ac_d sets the value in "#define NAME VALUE" lines.
19088 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19089 ac_dB='[ ].*$,\1#\2'
19092 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19093 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19094 ac_iB='\([ ]\),\1#\2define\3'
19097 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19098 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19099 ac_uB='$,\1#\2define\3'
19103 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19104 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19106 - | *:- | *:-:* ) # input from stdin
19108 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19109 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19110 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19111 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19112 * ) ac_file_in=$ac_file.in ;;
19115 test x"$ac_file" != x- && { echo "$as_me:19115: creating $ac_file" >&5
19116 echo "$as_me: creating $ac_file" >&6;}
19118 # First look for the input files in the build tree, otherwise in the
19120 ac_file_inputs=`IFS=:
19121 for f in $ac_file_in; do
19123 -) echo $tmp/stdin ;;
19125 # Absolute (can't be DOS-style, as IFS=:)
19126 test -f "$f" || { { echo "$as_me:19126: error: cannot find input file: $f" >&5
19127 echo "$as_me: error: cannot find input file: $f" >&2;}
19128 { (exit 1); exit 1; }; }
19131 if test -f "$f"; then
19134 elif test -f "$srcdir/$f"; then
19139 { { echo "$as_me:19139: error: cannot find input file: $f" >&5
19140 echo "$as_me: error: cannot find input file: $f" >&2;}
19141 { (exit 1); exit 1; }; }
19144 done` || { (exit 1); exit 1; }
19145 # Remove the trailing spaces.
19146 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
19150 # Transform confdefs.h into a list of #define's. We won't use it as a sed
19151 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
19152 # be either 'cat' or 'sort'.
19153 cat confdefs.h | uniq >conftest.vals
19155 # Break up conftest.vals because some shells have a limit on
19156 # the size of here documents, and old seds have small limits too.
19158 rm -f conftest.tail
19159 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
19160 while grep . conftest.vals >/dev/null
19162 # Write chunks of a limited-size here document to conftest.frag.
19163 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
19164 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
19165 echo 'CEOF' >> "$CONFIG_STATUS"
19166 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
19167 rm -f conftest.vals
19168 mv conftest.tail conftest.vals
19170 rm -f conftest.vals
19172 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19174 echo ' cat >> conftest.edit <<CEOF
19175 /@DEFS@/r conftest.frag
19178 sed -f conftest.edit $tmp/in > $tmp/out
19180 mv $tmp/out $tmp/in
19181 rm -f conftest.edit conftest.frag
19182 ' >> "$CONFIG_STATUS"
19184 cat >>"$CONFIG_STATUS" <<\EOF
19185 # Let's still pretend it is `configure' which instantiates (i.e., don't
19186 # use $as_me), people would be surprised to read:
19187 # /* config.h. Generated automatically by config.status. */
19188 if test x"$ac_file" = x-; then
19189 echo "/* Generated automatically by configure. */" >$tmp/config.h
19191 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
19193 cat $tmp/in >>$tmp/config.h
19195 if test x"$ac_file" != x-; then
19196 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
19197 { echo "$as_me:19197: $ac_file is unchanged" >&5
19198 echo "$as_me: $ac_file is unchanged" >&6;}
19200 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19201 X"$ac_file" : 'X\(//\)[^/]' \| \
19202 X"$ac_file" : 'X\(//\)$' \| \
19203 X"$ac_file" : 'X\(/\)' \| \
19204 . : '\(.\)' 2>/dev/null ||
19206 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19207 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19208 /^X\(\/\/\)$/{ s//\1/; q; }
19209 /^X\(\/\).*/{ s//\1/; q; }
19211 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19212 { case "$ac_dir" in
19213 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19217 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19218 case $as_mkdir_dir in
19219 # Skip DOS drivespec
19220 ?:) as_incr_dir=$as_mkdir_dir ;;
19222 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19223 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19230 mv "$tmp/config.h" "$ac_file"
19234 rm -f $tmp/config.h
19238 cat >>"$CONFIG_STATUS" <<\EOF
19240 # CONFIG_COMMANDS section.
19242 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19243 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19244 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19248 if test -z "$USE_OLD_MAKERULES" ; then
19249 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
19256 cat >>"$CONFIG_STATUS" <<\EOF
19258 { (exit 0); exit 0; }
19260 chmod +x "$CONFIG_STATUS"
19261 ac_clean_files=$ac_clean_files_save
19263 # configure is writing to config.log, and then calls config.status.
19264 # config.status does its own redirection, appending to config.log.
19265 # Unfortunately, on DOS this fails, as config.log is still kept open
19266 # by configure, so config.status won't be able to write to it; its
19267 # output is simply discarded. So we exec the FD to /dev/null,
19268 # effectively closing config.log, so it can be properly (re)opened and
19269 # appended to by config.status. When coming back to configure, we
19270 # need to make the FD available again.
19271 if test "$no_create" != yes; then
19274 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
19276 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19277 # would make configure fail if this is the last instruction.
19278 "$ac_cs_success" || { (exit 1); exit 1; }
19280 ${MAKE:-make} preinstall