2 # From configure.in Revision: 1.83 .
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 PKG_CONFIG_LIBDIR=no
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 PKG_CONFIG_LIBDIR=$withval
3289 test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3292 case x$PKG_CONFIG_LIBDIR in
3296 # Look for the library directory using the same prefix as the executable
3297 if test "x$PKG_CONFIG" = xnone
3301 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3304 # If you don't like using the default architecture, you have to specify the
3305 # intended library directory and corresponding compiler/linker options.
3307 # This case allows for Debian's 2014-flavor of multiarch, along with the
3308 # most common variations before that point. Some other variants spell the
3309 # directory differently, e.g., "pkg-config", and put it in unusual places.
3310 # pkg-config has always been poorly standardized, which is ironic...
3311 case x`(arch) 2>/dev/null` in
3314 $cf_path/lib/*64-linux-gnu \
3322 $cf_path/lib/*-linux-gnu \
3330 test -n "$verbose" && echo " list..." 1>&6
3332 echo "${as_me:-configure}:3332: testing list... ..." 1>&5
3334 for cf_config in $cf_search_path
3336 test -n "$verbose" && echo " checking $cf_config/pkgconfig" 1>&6
3338 echo "${as_me:-configure}:3338: testing checking $cf_config/pkgconfig ..." 1>&5
3340 if test -d "$cf_config/pkgconfig"
3342 PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3343 echo "$as_me:3343: checking done" >&5
3344 echo $ECHO_N "checking done... $ECHO_C" >&6
3353 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3354 echo "$as_me:3354: result: $PKG_CONFIG_LIBDIR" >&5
3355 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3358 echo "$as_me:3358: checking if you want to build test-programs" >&5
3359 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3361 # Check whether --with-tests or --without-tests was given.
3362 if test "${with_tests+set}" = set; then
3363 withval="$with_tests"
3364 cf_with_tests=$withval
3368 echo "$as_me:3368: result: $cf_with_tests" >&5
3369 echo "${ECHO_T}$cf_with_tests" >&6
3371 echo "$as_me:3371: checking if we should assume mixed-case filenames" >&5
3372 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3374 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3375 if test "${enable_mixed_case+set}" = set; then
3376 enableval="$enable_mixed_case"
3377 enable_mixedcase=$enableval
3379 enable_mixedcase=auto
3381 echo "$as_me:3381: result: $enable_mixedcase" >&5
3382 echo "${ECHO_T}$enable_mixedcase" >&6
3383 if test "$enable_mixedcase" = "auto" ; then
3385 echo "$as_me:3385: checking if filesystem supports mixed-case filenames" >&5
3386 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3387 if test "${cf_cv_mixedcase+set}" = set; then
3388 echo $ECHO_N "(cached) $ECHO_C" >&6
3391 if test "$cross_compiling" = yes ; then
3392 case "$target_alias" in
3393 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3401 rm -f conftest CONFTEST
3403 if test -f CONFTEST ; then
3408 rm -f conftest CONFTEST
3412 echo "$as_me:3412: result: $cf_cv_mixedcase" >&5
3413 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3414 test "$cf_cv_mixedcase" = yes &&
3415 cat >>confdefs.h <<\EOF
3416 #define MIXEDCASE_FILENAMES 1
3420 cf_cv_mixedcase=$enable_mixedcase
3421 if test "$enable_mixedcase" = "yes" ; then
3422 cat >>confdefs.h <<\EOF
3423 #define MIXEDCASE_FILENAMES 1
3429 # do this after mixed-case option (tags/TAGS is not as important as tic).
3430 echo "$as_me:3430: checking whether ${MAKE-make} sets \${MAKE}" >&5
3431 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3432 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3433 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3434 echo $ECHO_N "(cached) $ECHO_C" >&6
3436 cat >conftest.make <<\EOF
3438 @echo 'ac_maketemp="${MAKE}"'
3440 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3441 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3442 if test -n "$ac_maketemp"; then
3443 eval ac_cv_prog_make_${ac_make}_set=yes
3445 eval ac_cv_prog_make_${ac_make}_set=no
3449 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3450 echo "$as_me:3450: result: yes" >&5
3451 echo "${ECHO_T}yes" >&6
3454 echo "$as_me:3454: result: no" >&5
3455 echo "${ECHO_T}no" >&6
3456 SET_MAKE="MAKE=${MAKE-make}"
3459 echo "$as_me:3459: checking for \".PHONY\" make-support" >&5
3460 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
3461 if test "${cf_cv_make_PHONY+set}" = set; then
3462 echo $ECHO_N "(cached) $ECHO_C" >&6
3467 mkdir conftest || exit 1
3469 cat >makefile <<'CF_EOF'
3473 @echo "** making $@ $(DATA)"
3475 @echo "** making $@ $(DATA)"
3477 @echo "** making $@ $(DATA)"
3480 @echo "** making $@ $(DATA)"
3483 for cf_data in 1 2 3
3485 ${MAKE:-make} always DATA=$cf_data
3486 ${MAKE:-make} once DATA=$cf_data
3487 ${MAKE:-make} -t always once
3488 if test -f always ; then
3489 echo "no (case 1)" > ../conftest.tmp
3490 elif test ! -f always.out ; then
3491 echo "no (case 2)" > ../conftest.tmp
3492 elif test ! -f once.out ; then
3493 echo "no (case 3)" > ../conftest.tmp
3494 elif ! cmp -s always.out once.out ; then
3495 echo "no (case 4)" > ../conftest.tmp
3496 diff always.out once.out
3498 cf_check="`cat always.out`"
3499 if test "x$cf_check" != "x$cf_data" ; then
3500 echo "no (case 5)" > ../conftest.tmp
3502 echo yes > ../conftest.tmp
3510 cf_cv_make_PHONY="`cat conftest.tmp`"
3514 echo "$as_me:3514: result: $cf_cv_make_PHONY" >&5
3515 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
3518 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
3519 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
3521 for ac_prog in exctags ctags
3523 # Extract the first word of "$ac_prog", so it can be a program name with args.
3524 set dummy $ac_prog; ac_word=$2
3525 echo "$as_me:3525: checking for $ac_word" >&5
3526 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3527 if test "${ac_cv_prog_CTAGS+set}" = set; then
3528 echo $ECHO_N "(cached) $ECHO_C" >&6
3530 if test -n "$CTAGS"; then
3531 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3533 ac_save_IFS=$IFS; IFS=$ac_path_separator
3535 for ac_dir in $ac_dummy; do
3537 test -z "$ac_dir" && ac_dir=.
3538 $as_executable_p "$ac_dir/$ac_word" || continue
3539 ac_cv_prog_CTAGS="$ac_prog"
3540 echo "$as_me:3540: found $ac_dir/$ac_word" >&5
3546 CTAGS=$ac_cv_prog_CTAGS
3547 if test -n "$CTAGS"; then
3548 echo "$as_me:3548: result: $CTAGS" >&5
3549 echo "${ECHO_T}$CTAGS" >&6
3551 echo "$as_me:3551: result: no" >&5
3552 echo "${ECHO_T}no" >&6
3555 test -n "$CTAGS" && break
3558 for ac_prog in exetags etags
3560 # Extract the first word of "$ac_prog", so it can be a program name with args.
3561 set dummy $ac_prog; ac_word=$2
3562 echo "$as_me:3562: checking for $ac_word" >&5
3563 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3564 if test "${ac_cv_prog_ETAGS+set}" = set; then
3565 echo $ECHO_N "(cached) $ECHO_C" >&6
3567 if test -n "$ETAGS"; then
3568 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3570 ac_save_IFS=$IFS; IFS=$ac_path_separator
3572 for ac_dir in $ac_dummy; do
3574 test -z "$ac_dir" && ac_dir=.
3575 $as_executable_p "$ac_dir/$ac_word" || continue
3576 ac_cv_prog_ETAGS="$ac_prog"
3577 echo "$as_me:3577: found $ac_dir/$ac_word" >&5
3583 ETAGS=$ac_cv_prog_ETAGS
3584 if test -n "$ETAGS"; then
3585 echo "$as_me:3585: result: $ETAGS" >&5
3586 echo "${ECHO_T}$ETAGS" >&6
3588 echo "$as_me:3588: result: no" >&5
3589 echo "${ECHO_T}no" >&6
3592 test -n "$ETAGS" && break
3595 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3596 set dummy ${CTAGS:-ctags}; ac_word=$2
3597 echo "$as_me:3597: checking for $ac_word" >&5
3598 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3599 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3600 echo $ECHO_N "(cached) $ECHO_C" >&6
3602 if test -n "$MAKE_LOWER_TAGS"; then
3603 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3605 ac_save_IFS=$IFS; IFS=$ac_path_separator
3607 for ac_dir in $ac_dummy; do
3609 test -z "$ac_dir" && ac_dir=.
3610 $as_executable_p "$ac_dir/$ac_word" || continue
3611 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3612 echo "$as_me:3612: found $ac_dir/$ac_word" >&5
3616 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3619 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3620 if test -n "$MAKE_LOWER_TAGS"; then
3621 echo "$as_me:3621: result: $MAKE_LOWER_TAGS" >&5
3622 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3624 echo "$as_me:3624: result: no" >&5
3625 echo "${ECHO_T}no" >&6
3628 if test "$cf_cv_mixedcase" = yes ; then
3629 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3630 set dummy ${ETAGS:-etags}; ac_word=$2
3631 echo "$as_me:3631: checking for $ac_word" >&5
3632 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3633 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3634 echo $ECHO_N "(cached) $ECHO_C" >&6
3636 if test -n "$MAKE_UPPER_TAGS"; then
3637 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3639 ac_save_IFS=$IFS; IFS=$ac_path_separator
3641 for ac_dir in $ac_dummy; do
3643 test -z "$ac_dir" && ac_dir=.
3644 $as_executable_p "$ac_dir/$ac_word" || continue
3645 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3646 echo "$as_me:3646: found $ac_dir/$ac_word" >&5
3650 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3653 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3654 if test -n "$MAKE_UPPER_TAGS"; then
3655 echo "$as_me:3655: result: $MAKE_UPPER_TAGS" >&5
3656 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3658 echo "$as_me:3658: result: no" >&5
3659 echo "${ECHO_T}no" >&6
3666 if test "$MAKE_UPPER_TAGS" = yes ; then
3672 if test "$MAKE_LOWER_TAGS" = yes ; then
3678 echo "$as_me:3678: checking for makeflags variable" >&5
3679 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3680 if test "${cf_cv_makeflags+set}" = set; then
3681 echo $ECHO_N "(cached) $ECHO_C" >&6
3685 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3687 cat >cf_makeflags.tmp <<CF_EOF
3690 @ echo '.$cf_option'
3692 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[ ]*$,,'`
3693 case "$cf_result" in
3695 cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
3696 case "$cf_result" in
3697 (.*CC=*) cf_cv_makeflags=
3699 (*) cf_cv_makeflags=$cf_option
3708 echo "${as_me:-configure}:3708: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3713 rm -f cf_makeflags.tmp
3716 echo "$as_me:3716: result: $cf_cv_makeflags" >&5
3717 echo "${ECHO_T}$cf_cv_makeflags" >&6
3719 if test -n "$ac_tool_prefix"; then
3720 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3721 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3722 echo "$as_me:3722: checking for $ac_word" >&5
3723 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3724 if test "${ac_cv_prog_RANLIB+set}" = set; then
3725 echo $ECHO_N "(cached) $ECHO_C" >&6
3727 if test -n "$RANLIB"; then
3728 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3730 ac_save_IFS=$IFS; IFS=$ac_path_separator
3732 for ac_dir in $ac_dummy; do
3734 test -z "$ac_dir" && ac_dir=.
3735 $as_executable_p "$ac_dir/$ac_word" || continue
3736 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3737 echo "$as_me:3737: found $ac_dir/$ac_word" >&5
3743 RANLIB=$ac_cv_prog_RANLIB
3744 if test -n "$RANLIB"; then
3745 echo "$as_me:3745: result: $RANLIB" >&5
3746 echo "${ECHO_T}$RANLIB" >&6
3748 echo "$as_me:3748: result: no" >&5
3749 echo "${ECHO_T}no" >&6
3753 if test -z "$ac_cv_prog_RANLIB"; then
3754 ac_ct_RANLIB=$RANLIB
3755 # Extract the first word of "ranlib", so it can be a program name with args.
3756 set dummy ranlib; ac_word=$2
3757 echo "$as_me:3757: checking for $ac_word" >&5
3758 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3759 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3760 echo $ECHO_N "(cached) $ECHO_C" >&6
3762 if test -n "$ac_ct_RANLIB"; then
3763 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3765 ac_save_IFS=$IFS; IFS=$ac_path_separator
3767 for ac_dir in $ac_dummy; do
3769 test -z "$ac_dir" && ac_dir=.
3770 $as_executable_p "$ac_dir/$ac_word" || continue
3771 ac_cv_prog_ac_ct_RANLIB="ranlib"
3772 echo "$as_me:3772: found $ac_dir/$ac_word" >&5
3776 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3779 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3780 if test -n "$ac_ct_RANLIB"; then
3781 echo "$as_me:3781: result: $ac_ct_RANLIB" >&5
3782 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3784 echo "$as_me:3784: result: no" >&5
3785 echo "${ECHO_T}no" >&6
3788 RANLIB=$ac_ct_RANLIB
3790 RANLIB="$ac_cv_prog_RANLIB"
3793 if test -n "$ac_tool_prefix"; then
3794 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3795 set dummy ${ac_tool_prefix}ld; ac_word=$2
3796 echo "$as_me:3796: checking for $ac_word" >&5
3797 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3798 if test "${ac_cv_prog_LD+set}" = set; then
3799 echo $ECHO_N "(cached) $ECHO_C" >&6
3801 if test -n "$LD"; then
3802 ac_cv_prog_LD="$LD" # Let the user override the test.
3804 ac_save_IFS=$IFS; IFS=$ac_path_separator
3806 for ac_dir in $ac_dummy; do
3808 test -z "$ac_dir" && ac_dir=.
3809 $as_executable_p "$ac_dir/$ac_word" || continue
3810 ac_cv_prog_LD="${ac_tool_prefix}ld"
3811 echo "$as_me:3811: found $ac_dir/$ac_word" >&5
3818 if test -n "$LD"; then
3819 echo "$as_me:3819: result: $LD" >&5
3820 echo "${ECHO_T}$LD" >&6
3822 echo "$as_me:3822: result: no" >&5
3823 echo "${ECHO_T}no" >&6
3827 if test -z "$ac_cv_prog_LD"; then
3829 # Extract the first word of "ld", so it can be a program name with args.
3830 set dummy ld; ac_word=$2
3831 echo "$as_me:3831: checking for $ac_word" >&5
3832 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3833 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3834 echo $ECHO_N "(cached) $ECHO_C" >&6
3836 if test -n "$ac_ct_LD"; then
3837 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3839 ac_save_IFS=$IFS; IFS=$ac_path_separator
3841 for ac_dir in $ac_dummy; do
3843 test -z "$ac_dir" && ac_dir=.
3844 $as_executable_p "$ac_dir/$ac_word" || continue
3845 ac_cv_prog_ac_ct_LD="ld"
3846 echo "$as_me:3846: found $ac_dir/$ac_word" >&5
3850 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3853 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3854 if test -n "$ac_ct_LD"; then
3855 echo "$as_me:3855: result: $ac_ct_LD" >&5
3856 echo "${ECHO_T}$ac_ct_LD" >&6
3858 echo "$as_me:3858: result: no" >&5
3859 echo "${ECHO_T}no" >&6
3867 if test -n "$ac_tool_prefix"; then
3868 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3869 set dummy ${ac_tool_prefix}ar; ac_word=$2
3870 echo "$as_me:3870: checking for $ac_word" >&5
3871 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3872 if test "${ac_cv_prog_AR+set}" = set; then
3873 echo $ECHO_N "(cached) $ECHO_C" >&6
3875 if test -n "$AR"; then
3876 ac_cv_prog_AR="$AR" # Let the user override the test.
3878 ac_save_IFS=$IFS; IFS=$ac_path_separator
3880 for ac_dir in $ac_dummy; do
3882 test -z "$ac_dir" && ac_dir=.
3883 $as_executable_p "$ac_dir/$ac_word" || continue
3884 ac_cv_prog_AR="${ac_tool_prefix}ar"
3885 echo "$as_me:3885: found $ac_dir/$ac_word" >&5
3892 if test -n "$AR"; then
3893 echo "$as_me:3893: result: $AR" >&5
3894 echo "${ECHO_T}$AR" >&6
3896 echo "$as_me:3896: result: no" >&5
3897 echo "${ECHO_T}no" >&6
3901 if test -z "$ac_cv_prog_AR"; then
3903 # Extract the first word of "ar", so it can be a program name with args.
3904 set dummy ar; ac_word=$2
3905 echo "$as_me:3905: checking for $ac_word" >&5
3906 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3907 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3908 echo $ECHO_N "(cached) $ECHO_C" >&6
3910 if test -n "$ac_ct_AR"; then
3911 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3913 ac_save_IFS=$IFS; IFS=$ac_path_separator
3915 for ac_dir in $ac_dummy; do
3917 test -z "$ac_dir" && ac_dir=.
3918 $as_executable_p "$ac_dir/$ac_word" || continue
3919 ac_cv_prog_ac_ct_AR="ar"
3920 echo "$as_me:3920: found $ac_dir/$ac_word" >&5
3924 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3927 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3928 if test -n "$ac_ct_AR"; then
3929 echo "$as_me:3929: result: $ac_ct_AR" >&5
3930 echo "${ECHO_T}$ac_ct_AR" >&6
3932 echo "$as_me:3932: result: no" >&5
3933 echo "${ECHO_T}no" >&6
3941 if test -n "$ac_tool_prefix"; then
3942 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3943 set dummy ${ac_tool_prefix}ar; ac_word=$2
3944 echo "$as_me:3944: checking for $ac_word" >&5
3945 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3946 if test "${ac_cv_prog_AR+set}" = set; then
3947 echo $ECHO_N "(cached) $ECHO_C" >&6
3949 if test -n "$AR"; then
3950 ac_cv_prog_AR="$AR" # Let the user override the test.
3952 ac_save_IFS=$IFS; IFS=$ac_path_separator
3954 for ac_dir in $ac_dummy; do
3956 test -z "$ac_dir" && ac_dir=.
3957 $as_executable_p "$ac_dir/$ac_word" || continue
3958 ac_cv_prog_AR="${ac_tool_prefix}ar"
3959 echo "$as_me:3959: found $ac_dir/$ac_word" >&5
3966 if test -n "$AR"; then
3967 echo "$as_me:3967: result: $AR" >&5
3968 echo "${ECHO_T}$AR" >&6
3970 echo "$as_me:3970: result: no" >&5
3971 echo "${ECHO_T}no" >&6
3975 if test -z "$ac_cv_prog_AR"; then
3977 # Extract the first word of "ar", so it can be a program name with args.
3978 set dummy ar; ac_word=$2
3979 echo "$as_me:3979: checking for $ac_word" >&5
3980 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3981 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3982 echo $ECHO_N "(cached) $ECHO_C" >&6
3984 if test -n "$ac_ct_AR"; then
3985 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3987 ac_save_IFS=$IFS; IFS=$ac_path_separator
3989 for ac_dir in $ac_dummy; do
3991 test -z "$ac_dir" && ac_dir=.
3992 $as_executable_p "$ac_dir/$ac_word" || continue
3993 ac_cv_prog_ac_ct_AR="ar"
3994 echo "$as_me:3994: found $ac_dir/$ac_word" >&5
3998 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4001 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4002 if test -n "$ac_ct_AR"; then
4003 echo "$as_me:4003: result: $ac_ct_AR" >&5
4004 echo "${ECHO_T}$ac_ct_AR" >&6
4006 echo "$as_me:4006: result: no" >&5
4007 echo "${ECHO_T}no" >&6
4015 echo "$as_me:4015: checking for options to update archives" >&5
4016 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4017 if test "${cf_cv_ar_flags+set}" = set; then
4018 echo $ECHO_N "(cached) $ECHO_C" >&6
4021 case "$cf_cv_system_name" in
4024 cat >mk_static_lib.sh <<-EOF
4029 exec \$MSVC_BIN -out:"\$out" \$@
4031 chmod +x mk_static_lib.sh
4032 AR=`pwd`/mk_static_lib.sh
4035 cf_cv_ar_flags=unknown
4036 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4039 # check if $ARFLAGS already contains this choice
4040 if test "x$ARFLAGS" != "x" ; then
4041 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4042 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4048 rm -f "conftest.$ac_cv_objext"
4051 cat >"conftest.$ac_ext" <<EOF
4052 #line 4052 "configure"
4053 int testdata[3] = { 123, 456, 789 };
4055 if { (eval echo "$as_me:4055: \"$ac_compile\"") >&5
4056 (eval $ac_compile) 2>&5
4058 echo "$as_me:4058: \$? = $ac_status" >&5
4059 (exit "$ac_status"); } ; then
4060 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4061 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
4062 if test -f conftest.a ; then
4063 cf_cv_ar_flags="$cf_ar_flags"
4067 test -n "$verbose" && echo " cannot compile test-program" 1>&6
4069 echo "${as_me:-configure}:4069: testing cannot compile test-program ..." 1>&5
4074 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
4079 echo "$as_me:4079: result: $cf_cv_ar_flags" >&5
4080 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4082 if test -n "$ARFLAGS" ; then
4083 if test -n "$cf_cv_ar_flags" ; then
4084 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4087 ARFLAGS=$cf_cv_ar_flags
4090 echo "$as_me:4090: checking for PATH separator" >&5
4091 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4092 case "$cf_cv_system_name" in
4093 (os2*) PATH_SEPARATOR=';' ;;
4094 (*) ${PATH_SEPARATOR:=':'} ;;
4097 echo "$as_me:4097: result: $PATH_SEPARATOR" >&5
4098 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4100 echo "$as_me:4100: checking if you have specified an install-prefix" >&5
4101 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4103 # Check whether --with-install-prefix or --without-install-prefix was given.
4104 if test "${with_install_prefix+set}" = set; then
4105 withval="$with_install_prefix"
4109 (*) DESTDIR="$withval"
4113 echo "$as_me:4113: result: $DESTDIR" >&5
4114 echo "${ECHO_T}$DESTDIR" >&6
4116 ###############################################################################
4118 # If we're cross-compiling, allow the user to override the tools and their
4119 # options. The configure script is oriented toward identifying the host
4120 # compiler, etc., but we need a build compiler to generate parts of the source.
4122 if test "$cross_compiling" = yes ; then
4124 # defaults that we might want to override
4125 : ${BUILD_CFLAGS:=''}
4126 : ${BUILD_CPPFLAGS:=''}
4127 : ${BUILD_LDFLAGS:=''}
4129 : ${BUILD_EXEEXT:='$x'}
4130 : ${BUILD_OBJEXT:='o'}
4132 # Check whether --with-build-cc or --without-build-cc was given.
4133 if test "${with_build_cc+set}" = set; then
4134 withval="$with_build_cc"
4137 for ac_prog in gcc clang c99 c89 cc cl
4139 # Extract the first word of "$ac_prog", so it can be a program name with args.
4140 set dummy $ac_prog; ac_word=$2
4141 echo "$as_me:4141: checking for $ac_word" >&5
4142 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4143 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4144 echo $ECHO_N "(cached) $ECHO_C" >&6
4146 if test -n "$BUILD_CC"; then
4147 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4149 ac_save_IFS=$IFS; IFS=$ac_path_separator
4151 for ac_dir in $ac_dummy; do
4153 test -z "$ac_dir" && ac_dir=.
4154 $as_executable_p "$ac_dir/$ac_word" || continue
4155 ac_cv_prog_BUILD_CC="$ac_prog"
4156 echo "$as_me:4156: found $ac_dir/$ac_word" >&5
4162 BUILD_CC=$ac_cv_prog_BUILD_CC
4163 if test -n "$BUILD_CC"; then
4164 echo "$as_me:4164: result: $BUILD_CC" >&5
4165 echo "${ECHO_T}$BUILD_CC" >&6
4167 echo "$as_me:4167: result: no" >&5
4168 echo "${ECHO_T}no" >&6
4171 test -n "$BUILD_CC" && break
4173 test -n "$BUILD_CC" || BUILD_CC="none"
4176 echo "$as_me:4176: checking for native build C compiler" >&5
4177 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4178 echo "$as_me:4178: result: $BUILD_CC" >&5
4179 echo "${ECHO_T}$BUILD_CC" >&6
4181 echo "$as_me:4181: checking for native build C preprocessor" >&5
4182 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4184 # Check whether --with-build-cpp or --without-build-cpp was given.
4185 if test "${with_build_cpp+set}" = set; then
4186 withval="$with_build_cpp"
4187 BUILD_CPP="$withval"
4189 BUILD_CPP='${BUILD_CC} -E'
4191 echo "$as_me:4191: result: $BUILD_CPP" >&5
4192 echo "${ECHO_T}$BUILD_CPP" >&6
4194 echo "$as_me:4194: checking for native build C flags" >&5
4195 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4197 # Check whether --with-build-cflags or --without-build-cflags was given.
4198 if test "${with_build_cflags+set}" = set; then
4199 withval="$with_build_cflags"
4200 BUILD_CFLAGS="$withval"
4202 echo "$as_me:4202: result: $BUILD_CFLAGS" >&5
4203 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4205 echo "$as_me:4205: checking for native build C preprocessor-flags" >&5
4206 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4208 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4209 if test "${with_build_cppflags+set}" = set; then
4210 withval="$with_build_cppflags"
4211 BUILD_CPPFLAGS="$withval"
4213 echo "$as_me:4213: result: $BUILD_CPPFLAGS" >&5
4214 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4216 echo "$as_me:4216: checking for native build linker-flags" >&5
4217 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4219 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4220 if test "${with_build_ldflags+set}" = set; then
4221 withval="$with_build_ldflags"
4222 BUILD_LDFLAGS="$withval"
4224 echo "$as_me:4224: result: $BUILD_LDFLAGS" >&5
4225 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4227 echo "$as_me:4227: checking for native build linker-libraries" >&5
4228 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4230 # Check whether --with-build-libs or --without-build-libs was given.
4231 if test "${with_build_libs+set}" = set; then
4232 withval="$with_build_libs"
4233 BUILD_LIBS="$withval"
4235 echo "$as_me:4235: result: $BUILD_LIBS" >&5
4236 echo "${ECHO_T}$BUILD_LIBS" >&6
4238 # this assumes we're on Unix.
4242 : ${BUILD_CC:='${CC}'}
4244 if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
4245 { { echo "$as_me:4245: error: Cross-build requires two compilers.
4246 Use --with-build-cc to specify the native compiler." >&5
4247 echo "$as_me: error: Cross-build requires two compilers.
4248 Use --with-build-cc to specify the native compiler." >&2;}
4249 { (exit 1); exit 1; }; }
4253 : ${BUILD_CC:='${CC}'}
4254 : ${BUILD_CPP:='${CPP}'}
4255 : ${BUILD_CFLAGS:='${CFLAGS}'}
4256 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4257 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4258 : ${BUILD_LIBS:='${LIBS}'}
4259 : ${BUILD_EXEEXT:='$x'}
4260 : ${BUILD_OBJEXT:='o'}
4263 ###############################################################################
4265 ### Options to allow the user to specify the set of libraries which are used.
4266 ### Use "--without-normal --with-shared" to allow the default model to be
4267 ### shared, for example.
4270 echo "$as_me:4270: checking if you want to build shared C-objects" >&5
4271 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
4273 # Check whether --with-shared or --without-shared was given.
4274 if test "${with_shared+set}" = set; then
4275 withval="$with_shared"
4276 with_shared=$withval
4280 echo "$as_me:4280: result: $with_shared" >&5
4281 echo "${ECHO_T}$with_shared" >&6
4282 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4284 echo "$as_me:4284: checking for specified models" >&5
4285 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4286 test -z "$cf_list_models" && cf_list_models=normal
4287 echo "$as_me:4287: result: $cf_list_models" >&5
4288 echo "${ECHO_T}$cf_list_models" >&6
4290 ### Use the first model as the default, and save its suffix for use in building
4291 ### up test-applications.
4292 echo "$as_me:4292: checking for default model" >&5
4293 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4294 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4295 echo "$as_me:4295: result: $DFT_LWR_MODEL" >&5
4296 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4298 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4300 echo "$as_me:4300: checking for specific curses-directory" >&5
4301 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4303 # Check whether --with-curses-dir or --without-curses-dir was given.
4304 if test "${with_curses_dir+set}" = set; then
4305 withval="$with_curses_dir"
4306 cf_cv_curses_dir=$withval
4310 echo "$as_me:4310: result: $cf_cv_curses_dir" >&5
4311 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4313 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
4316 if test "x$prefix" != xNONE; then
4317 cf_path_syntax="$prefix"
4319 cf_path_syntax="$ac_default_prefix"
4327 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4329 (.\$\{*prefix\}*|.\$\{*dir\}*)
4330 eval withval="$withval"
4333 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4338 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4341 { { echo "$as_me:4341: error: expected a pathname, not \"$withval\"" >&5
4342 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4343 { (exit 1); exit 1; }; }
4347 if test -d "$cf_cv_curses_dir"
4350 if test -n "$cf_cv_curses_dir/include" ; then
4351 for cf_add_incdir in $cf_cv_curses_dir/include
4353 while test "$cf_add_incdir" != /usr/include
4355 if test -d "$cf_add_incdir"
4358 if test -n "$CFLAGS$CPPFLAGS" ; then
4359 # a loop is needed to ensure we can add subdirs of existing dirs
4360 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4361 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4362 cf_have_incdir=yes; break
4367 if test "$cf_have_incdir" = no ; then
4368 if test "$cf_add_incdir" = /usr/local/include ; then
4369 if test "$GCC" = yes
4371 cf_save_CPPFLAGS=$CPPFLAGS
4373 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4374 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4376 cat >"conftest.$ac_ext" <<_ACEOF
4377 #line 4377 "configure"
4378 #include "confdefs.h"
4388 rm -f "conftest.$ac_objext"
4389 if { (eval echo "$as_me:4389: \"$ac_compile\"") >&5
4390 (eval $ac_compile) 2>&5
4392 echo "$as_me:4392: \$? = $ac_status" >&5
4393 (exit "$ac_status"); } &&
4394 { ac_try='test -s "conftest.$ac_objext"'
4395 { (eval echo "$as_me:4395: \"$ac_try\"") >&5
4398 echo "$as_me:4398: \$? = $ac_status" >&5
4399 (exit "$ac_status"); }; }; then
4402 echo "$as_me: failed program was:" >&5
4403 cat "conftest.$ac_ext" >&5
4406 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4407 CPPFLAGS=$cf_save_CPPFLAGS
4412 if test "$cf_have_incdir" = no ; then
4413 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4415 echo "${as_me:-configure}:4415: testing adding $cf_add_incdir to include-path ..." 1>&5
4417 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4419 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
4420 test "$cf_top_incdir" = "$cf_add_incdir" && break
4421 cf_add_incdir="$cf_top_incdir"
4432 if test -n "$cf_cv_curses_dir/lib" ; then
4433 for cf_add_libdir in $cf_cv_curses_dir/lib
4435 if test "$cf_add_libdir" = /usr/lib ; then
4437 elif test -d "$cf_add_libdir"
4440 if test -n "$LDFLAGS$LIBS" ; then
4441 # a loop is needed to ensure we can add subdirs of existing dirs
4442 for cf_test_libdir in $LDFLAGS $LIBS ; do
4443 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4444 cf_have_libdir=yes; break
4448 if test "$cf_have_libdir" = no ; then
4449 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4451 echo "${as_me:-configure}:4451: testing adding $cf_add_libdir to library-path ..." 1>&5
4453 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4462 cf_ncuconfig_root=ncurses
4463 cf_have_ncuconfig=no
4465 if test "x${PKG_CONFIG:=none}" != xnone; then
4466 echo "$as_me:4466: checking pkg-config for $cf_ncuconfig_root" >&5
4467 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
4468 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
4469 echo "$as_me:4469: result: yes" >&5
4470 echo "${ECHO_T}yes" >&6
4472 echo "$as_me:4472: checking if the $cf_ncuconfig_root package files work" >&5
4473 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
4474 cf_have_ncuconfig=unknown
4476 cf_save_CFLAGS="$CFLAGS"
4477 cf_save_CPPFLAGS="$CPPFLAGS"
4478 cf_save_LIBS="$LIBS"
4480 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
4481 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
4483 # while -W for passing linker flags is prevalent, it is not "standard".
4484 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
4485 # incompatible _and_ non-standard -W option which gives an error. Work
4486 # around that pitfall.
4487 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
4493 cf_new_extra_cppflags=
4495 for cf_add_cflags in $cf_pkg_cflags
4497 case "$cf_fix_cppflags" in
4499 case "$cf_add_cflags" in
4500 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4501 case "$cf_add_cflags" in
4503 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4505 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4506 && test -z "${cf_tst_cflags}" \
4507 && cf_fix_cppflags=yes
4509 if test "$cf_fix_cppflags" = yes ; then
4511 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4512 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4515 elif test "${cf_tst_cflags}" = "\"'" ; then
4517 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4518 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4528 case "$cf_add_cflags" in
4530 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4532 CPPFLAGS=`echo "$CPPFLAGS" | \
4533 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4534 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4539 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4540 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4547 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4548 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4555 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4556 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4558 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4560 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4561 && test -z "${cf_tst_cflags}" \
4562 && cf_fix_cppflags=no
4567 if test -n "$cf_new_cflags" ; then
4569 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4570 CFLAGS="${CFLAGS}$cf_new_cflags"
4574 if test -n "$cf_new_cppflags" ; then
4576 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4577 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4581 if test -n "$cf_new_extra_cppflags" ; then
4583 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4584 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4591 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4593 for cf_add_1lib in $cf_add_0lib; do
4594 for cf_add_2lib in $cf_add_libs; do
4595 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4600 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4604 cat >"conftest.$ac_ext" <<_ACEOF
4605 #line 4605 "configure"
4606 #include "confdefs.h"
4607 #include <${cf_cv_ncurses_header:-curses.h}>
4611 initscr(); mousemask(0,0); tigetstr((char *)0);
4616 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4617 if { (eval echo "$as_me:4617: \"$ac_link\"") >&5
4618 (eval $ac_link) 2>&5
4620 echo "$as_me:4620: \$? = $ac_status" >&5
4621 (exit "$ac_status"); } &&
4622 { ac_try='test -s "conftest$ac_exeext"'
4623 { (eval echo "$as_me:4623: \"$ac_try\"") >&5
4626 echo "$as_me:4626: \$? = $ac_status" >&5
4627 (exit "$ac_status"); }; }; then
4628 if test "$cross_compiling" = yes; then
4629 cf_test_ncuconfig=maybe
4631 cat >"conftest.$ac_ext" <<_ACEOF
4632 #line 4632 "configure"
4633 #include "confdefs.h"
4634 #include <${cf_cv_ncurses_header:-curses.h}>
4636 { const char *xx = curses_version(); return (xx == 0); }
4638 rm -f "conftest$ac_exeext"
4639 if { (eval echo "$as_me:4639: \"$ac_link\"") >&5
4640 (eval $ac_link) 2>&5
4642 echo "$as_me:4642: \$? = $ac_status" >&5
4643 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4644 { (eval echo "$as_me:4644: \"$ac_try\"") >&5
4647 echo "$as_me:4647: \$? = $ac_status" >&5
4648 (exit "$ac_status"); }; }; then
4649 cf_test_ncuconfig=yes
4651 echo "$as_me: program exited with status $ac_status" >&5
4652 echo "$as_me: failed program was:" >&5
4653 cat "conftest.$ac_ext" >&5
4654 cf_test_ncuconfig=no
4656 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4659 echo "$as_me: failed program was:" >&5
4660 cat "conftest.$ac_ext" >&5
4661 cf_test_ncuconfig=no
4663 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4665 CFLAGS="$cf_save_CFLAGS"
4666 CPPFLAGS="$cf_save_CPPFLAGS"
4667 LIBS="$cf_save_LIBS"
4669 if test "x$cf_test_ncuconfig" != xyes; then
4670 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4671 cf_pkg_cflags="$cf_temp"
4672 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4673 cf_pkg_libs="$cf_temp"
4678 for cf_add_cflags in $cf_pkg_cflags
4681 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4682 cf_old_cflag="$CFLAGS"
4686 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
4688 (*$cf_add_cflags\ *)
4689 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
4692 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
4696 if test "$CFLAGS" != "$cf_old_cflag" ;
4699 CFLAGS="$cf_new_cflag"
4702 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4703 cf_old_cflag="$CPPFLAGS"
4707 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
4709 (*$cf_add_cflags\ *)
4710 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
4713 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
4717 if test "$CPPFLAGS" != "$cf_old_cflag" ;
4720 CPPFLAGS="$cf_new_cflag"
4728 cf_new_extra_cppflags=
4730 for cf_add_cflags in $cf_pkg_cflags
4732 case "$cf_fix_cppflags" in
4734 case "$cf_add_cflags" in
4735 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4736 case "$cf_add_cflags" in
4738 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4740 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4741 && test -z "${cf_tst_cflags}" \
4742 && cf_fix_cppflags=yes
4744 if test "$cf_fix_cppflags" = yes ; then
4746 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4747 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4750 elif test "${cf_tst_cflags}" = "\"'" ; 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"
4763 case "$cf_add_cflags" in
4765 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4767 CPPFLAGS=`echo "$CPPFLAGS" | \
4768 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4769 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4774 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4775 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4782 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4783 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4790 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4791 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4793 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4795 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4796 && test -z "${cf_tst_cflags}" \
4797 && cf_fix_cppflags=no
4802 if test -n "$cf_new_cflags" ; then
4804 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4805 CFLAGS="${CFLAGS}$cf_new_cflags"
4809 if test -n "$cf_new_cppflags" ; then
4811 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4812 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4816 if test -n "$cf_new_extra_cppflags" ; then
4818 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4819 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4826 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4828 for cf_add_1lib in $cf_add_0lib; do
4829 for cf_add_2lib in $cf_add_libs; do
4830 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4835 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4839 cat >"conftest.$ac_ext" <<_ACEOF
4840 #line 4840 "configure"
4841 #include "confdefs.h"
4842 #include <${cf_cv_ncurses_header:-curses.h}>
4846 initscr(); mousemask(0,0); tigetstr((char *)0);
4851 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4852 if { (eval echo "$as_me:4852: \"$ac_link\"") >&5
4853 (eval $ac_link) 2>&5
4855 echo "$as_me:4855: \$? = $ac_status" >&5
4856 (exit "$ac_status"); } &&
4857 { ac_try='test -s "conftest$ac_exeext"'
4858 { (eval echo "$as_me:4858: \"$ac_try\"") >&5
4861 echo "$as_me:4861: \$? = $ac_status" >&5
4862 (exit "$ac_status"); }; }; then
4863 if test "$cross_compiling" = yes; then
4864 cf_have_ncuconfig=maybe
4866 cat >"conftest.$ac_ext" <<_ACEOF
4867 #line 4867 "configure"
4868 #include "confdefs.h"
4869 #include <${cf_cv_ncurses_header:-curses.h}>
4871 { const char *xx = curses_version(); return (xx == 0); }
4873 rm -f "conftest$ac_exeext"
4874 if { (eval echo "$as_me:4874: \"$ac_link\"") >&5
4875 (eval $ac_link) 2>&5
4877 echo "$as_me:4877: \$? = $ac_status" >&5
4878 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4879 { (eval echo "$as_me:4879: \"$ac_try\"") >&5
4882 echo "$as_me:4882: \$? = $ac_status" >&5
4883 (exit "$ac_status"); }; }; then
4884 cf_have_ncuconfig=yes
4886 echo "$as_me: program exited with status $ac_status" >&5
4887 echo "$as_me: failed program was:" >&5
4888 cat "conftest.$ac_ext" >&5
4889 cf_have_ncuconfig=no
4891 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4894 echo "$as_me: failed program was:" >&5
4895 cat "conftest.$ac_ext" >&5
4896 cf_have_ncuconfig=no
4898 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4899 echo "$as_me:4899: result: $cf_have_ncuconfig" >&5
4900 echo "${ECHO_T}$cf_have_ncuconfig" >&6
4901 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
4902 if test "$cf_have_ncuconfig" != "yes"
4904 CPPFLAGS="$cf_save_CPPFLAGS"
4905 LIBS="$cf_save_LIBS"
4906 NCURSES_CONFIG_PKG=none
4909 cat >>confdefs.h <<\EOF
4913 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
4915 echo "$as_me:4915: checking for terminfo header" >&5
4916 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4917 if test "${cf_cv_term_header+set}" = set; then
4918 echo $ECHO_N "(cached) $ECHO_C" >&6
4921 case "${cf_cv_ncurses_header}" in
4922 (*/ncurses.h|*/ncursesw.h)
4923 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4926 cf_term_header=term.h
4930 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4932 cat >"conftest.$ac_ext" <<_ACEOF
4933 #line 4933 "configure"
4934 #include "confdefs.h"
4936 #include <${cf_cv_ncurses_header:-curses.h}>
4942 int x = auto_left_margin; (void)x
4947 rm -f "conftest.$ac_objext"
4948 if { (eval echo "$as_me:4948: \"$ac_compile\"") >&5
4949 (eval $ac_compile) 2>&5
4951 echo "$as_me:4951: \$? = $ac_status" >&5
4952 (exit "$ac_status"); } &&
4953 { ac_try='test -s "conftest.$ac_objext"'
4954 { (eval echo "$as_me:4954: \"$ac_try\"") >&5
4957 echo "$as_me:4957: \$? = $ac_status" >&5
4958 (exit "$ac_status"); }; }; then
4960 cf_cv_term_header="$cf_test"
4962 echo "$as_me: failed program was:" >&5
4963 cat "conftest.$ac_ext" >&5
4965 cf_cv_term_header=unknown
4968 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4969 test "$cf_cv_term_header" != unknown && break
4973 echo "$as_me:4973: result: $cf_cv_term_header" >&5
4974 echo "${ECHO_T}$cf_cv_term_header" >&6
4976 # Set definitions to allow ifdef'ing to accommodate subdirectories
4978 case "$cf_cv_term_header" in
4981 cat >>confdefs.h <<\EOF
4982 #define HAVE_TERM_H 1
4988 case "$cf_cv_term_header" in
4991 cat >>confdefs.h <<\EOF
4992 #define HAVE_NCURSES_TERM_H 1
4998 cat >>confdefs.h <<\EOF
4999 #define HAVE_NCURSESW_TERM_H 1
5008 echo "$as_me:5008: result: no" >&5
5009 echo "${ECHO_T}no" >&6
5010 NCURSES_CONFIG_PKG=none
5013 NCURSES_CONFIG_PKG=none
5016 if test "x$cf_have_ncuconfig" = "xno"; then
5017 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
5019 if test -n "$ac_tool_prefix"; then
5020 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5022 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5023 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5024 echo "$as_me:5024: checking for $ac_word" >&5
5025 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5026 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5027 echo $ECHO_N "(cached) $ECHO_C" >&6
5029 if test -n "$NCURSES_CONFIG"; then
5030 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5032 ac_save_IFS=$IFS; IFS=$ac_path_separator
5034 for ac_dir in $ac_dummy; do
5036 test -z "$ac_dir" && ac_dir=.
5037 $as_executable_p "$ac_dir/$ac_word" || continue
5038 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5039 echo "$as_me:5039: found $ac_dir/$ac_word" >&5
5045 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5046 if test -n "$NCURSES_CONFIG"; then
5047 echo "$as_me:5047: result: $NCURSES_CONFIG" >&5
5048 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5050 echo "$as_me:5050: result: no" >&5
5051 echo "${ECHO_T}no" >&6
5054 test -n "$NCURSES_CONFIG" && break
5057 if test -z "$NCURSES_CONFIG"; then
5058 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5059 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5061 # Extract the first word of "$ac_prog", so it can be a program name with args.
5062 set dummy $ac_prog; ac_word=$2
5063 echo "$as_me:5063: checking for $ac_word" >&5
5064 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5065 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5066 echo $ECHO_N "(cached) $ECHO_C" >&6
5068 if test -n "$ac_ct_NCURSES_CONFIG"; then
5069 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5071 ac_save_IFS=$IFS; IFS=$ac_path_separator
5073 for ac_dir in $ac_dummy; do
5075 test -z "$ac_dir" && ac_dir=.
5076 $as_executable_p "$ac_dir/$ac_word" || continue
5077 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5078 echo "$as_me:5078: found $ac_dir/$ac_word" >&5
5084 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5085 if test -n "$ac_ct_NCURSES_CONFIG"; then
5086 echo "$as_me:5086: result: $ac_ct_NCURSES_CONFIG" >&5
5087 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5089 echo "$as_me:5089: result: no" >&5
5090 echo "${ECHO_T}no" >&6
5093 test -n "$ac_ct_NCURSES_CONFIG" && break
5095 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5097 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5100 if test "$NCURSES_CONFIG" != none ; then
5102 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
5105 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5106 cf_old_cflag="$CFLAGS"
5110 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
5112 (*$cf_add_cflags\ *)
5113 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
5116 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
5120 if test "$CFLAGS" != "$cf_old_cflag" ;
5123 CFLAGS="$cf_new_cflag"
5126 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5127 cf_old_cflag="$CPPFLAGS"
5131 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
5133 (*$cf_add_cflags\ *)
5134 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
5137 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
5141 if test "$CPPFLAGS" != "$cf_old_cflag" ;
5144 CPPFLAGS="$cf_new_cflag"
5152 cf_new_extra_cppflags=
5154 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
5156 case "$cf_fix_cppflags" in
5158 case "$cf_add_cflags" in
5159 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5160 case "$cf_add_cflags" in
5162 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5164 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5165 && test -z "${cf_tst_cflags}" \
5166 && cf_fix_cppflags=yes
5168 if test "$cf_fix_cppflags" = yes ; then
5170 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5171 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5174 elif test "${cf_tst_cflags}" = "\"'" ; then
5176 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5177 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5187 case "$cf_add_cflags" in
5189 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5191 CPPFLAGS=`echo "$CPPFLAGS" | \
5192 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5193 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5198 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5199 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5206 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5207 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5214 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5215 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5217 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5219 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5220 && test -z "${cf_tst_cflags}" \
5221 && cf_fix_cppflags=no
5226 if test -n "$cf_new_cflags" ; then
5228 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5229 CFLAGS="${CFLAGS}$cf_new_cflags"
5233 if test -n "$cf_new_cppflags" ; then
5235 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5236 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5240 if test -n "$cf_new_extra_cppflags" ; then
5242 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5243 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5250 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5252 for cf_add_1lib in $cf_add_0lib; do
5253 for cf_add_2lib in $cf_add_libs; do
5254 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5259 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5263 # even with config script, some packages use no-override for curses.h
5265 echo "$as_me:5265: checking if we have identified curses headers" >&5
5266 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5267 if test "${cf_cv_ncurses_header+set}" = set; then
5268 echo $ECHO_N "(cached) $ECHO_C" >&6
5271 cf_cv_ncurses_header=none
5273 ncurses.h ncurses/ncurses.h \
5274 curses.h ncurses/curses.h
5276 cat >"conftest.$ac_ext" <<_ACEOF
5277 #line 5277 "configure"
5278 #include "confdefs.h"
5279 #include <${cf_header}>
5283 initscr(); tgoto("?", 0,0)
5288 rm -f "conftest.$ac_objext"
5289 if { (eval echo "$as_me:5289: \"$ac_compile\"") >&5
5290 (eval $ac_compile) 2>&5
5292 echo "$as_me:5292: \$? = $ac_status" >&5
5293 (exit "$ac_status"); } &&
5294 { ac_try='test -s "conftest.$ac_objext"'
5295 { (eval echo "$as_me:5295: \"$ac_try\"") >&5
5298 echo "$as_me:5298: \$? = $ac_status" >&5
5299 (exit "$ac_status"); }; }; then
5300 cf_cv_ncurses_header=$cf_header; break
5302 echo "$as_me: failed program was:" >&5
5303 cat "conftest.$ac_ext" >&5
5305 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5309 echo "$as_me:5309: result: $cf_cv_ncurses_header" >&5
5310 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5312 if test "$cf_cv_ncurses_header" = none ; then
5313 { { echo "$as_me:5313: error: No curses header-files found" >&5
5314 echo "$as_me: error: No curses header-files found" >&2;}
5315 { (exit 1); exit 1; }; }
5318 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5320 for ac_header in $cf_cv_ncurses_header
5322 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5323 echo "$as_me:5323: checking for $ac_header" >&5
5324 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5325 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5326 echo $ECHO_N "(cached) $ECHO_C" >&6
5328 cat >"conftest.$ac_ext" <<_ACEOF
5329 #line 5329 "configure"
5330 #include "confdefs.h"
5331 #include <$ac_header>
5333 if { (eval echo "$as_me:5333: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5334 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5336 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5338 cat conftest.err >&5
5339 echo "$as_me:5339: \$? = $ac_status" >&5
5340 (exit "$ac_status"); } >/dev/null; then
5341 if test -s conftest.err; then
5342 ac_cpp_err=$ac_c_preproc_warn_flag
5349 if test -z "$ac_cpp_err"; then
5350 eval "$as_ac_Header=yes"
5352 echo "$as_me: failed program was:" >&5
5353 cat "conftest.$ac_ext" >&5
5354 eval "$as_ac_Header=no"
5356 rm -f conftest.err "conftest.$ac_ext"
5358 echo "$as_me:5358: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5359 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5360 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5361 cat >>confdefs.h <<EOF
5362 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5368 cat >>confdefs.h <<\EOF
5372 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5374 cat >>confdefs.h <<EOF
5375 #define $cf_nculib_ROOT 1
5378 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
5382 cf_ncuhdr_root=ncurses
5384 test -n "$cf_cv_curses_dir" && \
5385 test "$cf_cv_curses_dir" != "no" && { \
5387 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5388 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5390 while test "$cf_add_incdir" != /usr/include
5392 if test -d "$cf_add_incdir"
5395 if test -n "$CFLAGS$CPPFLAGS" ; then
5396 # a loop is needed to ensure we can add subdirs of existing dirs
5397 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5398 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5399 cf_have_incdir=yes; break
5404 if test "$cf_have_incdir" = no ; then
5405 if test "$cf_add_incdir" = /usr/local/include ; then
5406 if test "$GCC" = yes
5408 cf_save_CPPFLAGS=$CPPFLAGS
5410 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5411 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5413 cat >"conftest.$ac_ext" <<_ACEOF
5414 #line 5414 "configure"
5415 #include "confdefs.h"
5425 rm -f "conftest.$ac_objext"
5426 if { (eval echo "$as_me:5426: \"$ac_compile\"") >&5
5427 (eval $ac_compile) 2>&5
5429 echo "$as_me:5429: \$? = $ac_status" >&5
5430 (exit "$ac_status"); } &&
5431 { ac_try='test -s "conftest.$ac_objext"'
5432 { (eval echo "$as_me:5432: \"$ac_try\"") >&5
5435 echo "$as_me:5435: \$? = $ac_status" >&5
5436 (exit "$ac_status"); }; }; then
5439 echo "$as_me: failed program was:" >&5
5440 cat "conftest.$ac_ext" >&5
5443 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5444 CPPFLAGS=$cf_save_CPPFLAGS
5449 if test "$cf_have_incdir" = no ; then
5450 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5452 echo "${as_me:-configure}:5452: testing adding $cf_add_incdir to include-path ..." 1>&5
5454 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5456 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5457 test "$cf_top_incdir" = "$cf_add_incdir" && break
5458 cf_add_incdir="$cf_top_incdir"
5471 echo "$as_me:5471: checking for $cf_ncuhdr_root header in include-path" >&5
5472 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5473 if test "${cf_cv_ncurses_h+set}" = set; then
5474 echo $ECHO_N "(cached) $ECHO_C" >&6
5477 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5478 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
5479 for cf_header in $cf_header_list
5482 cat >"conftest.$ac_ext" <<_ACEOF
5483 #line 5483 "configure"
5484 #include "confdefs.h"
5486 #include <$cf_header>
5491 #ifdef NCURSES_VERSION
5493 printf("%s\\n", NCURSES_VERSION);
5506 rm -f "conftest.$ac_objext"
5507 if { (eval echo "$as_me:5507: \"$ac_compile\"") >&5
5508 (eval $ac_compile) 2>&5
5510 echo "$as_me:5510: \$? = $ac_status" >&5
5511 (exit "$ac_status"); } &&
5512 { ac_try='test -s "conftest.$ac_objext"'
5513 { (eval echo "$as_me:5513: \"$ac_try\"") >&5
5516 echo "$as_me:5516: \$? = $ac_status" >&5
5517 (exit "$ac_status"); }; }; then
5518 cf_cv_ncurses_h=$cf_header
5521 echo "$as_me: failed program was:" >&5
5522 cat "conftest.$ac_ext" >&5
5525 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5527 test "$cf_cv_ncurses_h" != no && break
5531 echo "$as_me:5531: result: $cf_cv_ncurses_h" >&5
5532 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5534 if test "$cf_cv_ncurses_h" != no ; then
5535 cf_cv_ncurses_header=$cf_cv_ncurses_h
5538 echo "$as_me:5538: checking for $cf_ncuhdr_root include-path" >&5
5539 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5540 if test "${cf_cv_ncurses_h2+set}" = set; then
5541 echo $ECHO_N "(cached) $ECHO_C" >&6
5544 test -n "$verbose" && echo
5548 # collect the current set of include-directories from compiler flags
5549 cf_header_path_list=""
5550 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5551 for cf_header_path in $CPPFLAGS $CFLAGS
5553 case "$cf_header_path" in
5555 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5557 test "x$cf_header_path" != "xNONE" && \
5558 test -d "$cf_header_path" && \
5560 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5561 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
5562 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5563 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5564 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5565 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"
5568 cf_header_path_list="$cf_header_path_list $cf_search"
5574 # add the variations for the package we are looking for
5578 test "x$prefix" != "xNONE" && \
5579 test -d "$prefix" && \
5581 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5582 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
5583 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5584 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5585 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5586 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5589 for cf_subdir_prefix in \
5598 test "x$cf_subdir_prefix" != "x$prefix" && \
5599 test -d "$cf_subdir_prefix" && \
5600 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
5601 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5602 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
5603 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
5604 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
5605 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
5606 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"
5611 test "$includedir" != NONE && \
5612 test "$includedir" != "/usr/include" && \
5613 test -d "$includedir" && {
5614 test -d "$includedir" && cf_search="$cf_search $includedir"
5615 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5618 test "$oldincludedir" != NONE && \
5619 test "$oldincludedir" != "/usr/include" && \
5620 test -d "$oldincludedir" && {
5621 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
5622 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5625 cf_search="$cf_search $cf_header_path_list"
5627 test -n "$verbose" && echo "search path $cf_search"
5628 cf_save2_CPPFLAGS="$CPPFLAGS"
5629 for cf_incdir in $cf_search
5632 if test -n "$cf_incdir" ; then
5633 for cf_add_incdir in $cf_incdir
5635 while test "$cf_add_incdir" != /usr/include
5637 if test -d "$cf_add_incdir"
5640 if test -n "$CFLAGS$CPPFLAGS" ; then
5641 # a loop is needed to ensure we can add subdirs of existing dirs
5642 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5643 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5644 cf_have_incdir=yes; break
5649 if test "$cf_have_incdir" = no ; then
5650 if test "$cf_add_incdir" = /usr/local/include ; then
5651 if test "$GCC" = yes
5653 cf_save_CPPFLAGS=$CPPFLAGS
5655 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5656 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5658 cat >"conftest.$ac_ext" <<_ACEOF
5659 #line 5659 "configure"
5660 #include "confdefs.h"
5670 rm -f "conftest.$ac_objext"
5671 if { (eval echo "$as_me:5671: \"$ac_compile\"") >&5
5672 (eval $ac_compile) 2>&5
5674 echo "$as_me:5674: \$? = $ac_status" >&5
5675 (exit "$ac_status"); } &&
5676 { ac_try='test -s "conftest.$ac_objext"'
5677 { (eval echo "$as_me:5677: \"$ac_try\"") >&5
5680 echo "$as_me:5680: \$? = $ac_status" >&5
5681 (exit "$ac_status"); }; }; then
5684 echo "$as_me: failed program was:" >&5
5685 cat "conftest.$ac_ext" >&5
5688 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5689 CPPFLAGS=$cf_save_CPPFLAGS
5694 if test "$cf_have_incdir" = no ; then
5695 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5697 echo "${as_me:-configure}:5697: testing adding $cf_add_incdir to include-path ..." 1>&5
5699 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5701 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5702 test "$cf_top_incdir" = "$cf_add_incdir" && break
5703 cf_add_incdir="$cf_top_incdir"
5719 cat >"conftest.$ac_ext" <<_ACEOF
5720 #line 5720 "configure"
5721 #include "confdefs.h"
5723 #include <$cf_header>
5728 #ifdef NCURSES_VERSION
5730 printf("%s\\n", NCURSES_VERSION);
5743 rm -f "conftest.$ac_objext"
5744 if { (eval echo "$as_me:5744: \"$ac_compile\"") >&5
5745 (eval $ac_compile) 2>&5
5747 echo "$as_me:5747: \$? = $ac_status" >&5
5748 (exit "$ac_status"); } &&
5749 { ac_try='test -s "conftest.$ac_objext"'
5750 { (eval echo "$as_me:5750: \"$ac_try\"") >&5
5753 echo "$as_me:5753: \$? = $ac_status" >&5
5754 (exit "$ac_status"); }; }; then
5755 cf_cv_ncurses_h2=$cf_header
5758 echo "$as_me: failed program was:" >&5
5759 cat "conftest.$ac_ext" >&5
5762 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5764 if test "$cf_cv_ncurses_h2" != no ; then
5765 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5766 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
5769 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5771 CPPFLAGS="$cf_save2_CPPFLAGS"
5772 test "$cf_cv_ncurses_h2" != no && break
5774 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5774: error: not found" >&5
5775 echo "$as_me: error: not found" >&2;}
5776 { (exit 1); exit 1; }; }
5779 echo "$as_me:5779: result: $cf_cv_ncurses_h2" >&5
5780 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5782 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
5783 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
5784 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
5785 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
5788 if test -n "$cf_1st_incdir" ; then
5789 for cf_add_incdir in $cf_1st_incdir
5791 while test "$cf_add_incdir" != /usr/include
5793 if test -d "$cf_add_incdir"
5796 if test -n "$CFLAGS$CPPFLAGS" ; then
5797 # a loop is needed to ensure we can add subdirs of existing dirs
5798 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5799 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5800 cf_have_incdir=yes; break
5805 if test "$cf_have_incdir" = no ; then
5806 if test "$cf_add_incdir" = /usr/local/include ; then
5807 if test "$GCC" = yes
5809 cf_save_CPPFLAGS=$CPPFLAGS
5811 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5812 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5814 cat >"conftest.$ac_ext" <<_ACEOF
5815 #line 5815 "configure"
5816 #include "confdefs.h"
5826 rm -f "conftest.$ac_objext"
5827 if { (eval echo "$as_me:5827: \"$ac_compile\"") >&5
5828 (eval $ac_compile) 2>&5
5830 echo "$as_me:5830: \$? = $ac_status" >&5
5831 (exit "$ac_status"); } &&
5832 { ac_try='test -s "conftest.$ac_objext"'
5833 { (eval echo "$as_me:5833: \"$ac_try\"") >&5
5836 echo "$as_me:5836: \$? = $ac_status" >&5
5837 (exit "$ac_status"); }; }; then
5840 echo "$as_me: failed program was:" >&5
5841 cat "conftest.$ac_ext" >&5
5844 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5845 CPPFLAGS=$cf_save_CPPFLAGS
5850 if test "$cf_have_incdir" = no ; then
5851 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5853 echo "${as_me:-configure}:5853: testing adding $cf_add_incdir to include-path ..." 1>&5
5855 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5857 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5858 test "$cf_top_incdir" = "$cf_add_incdir" && break
5859 cf_add_incdir="$cf_top_incdir"
5872 # Set definitions to allow ifdef'ing for ncurses.h
5874 case "$cf_cv_ncurses_header" in
5877 cat >>confdefs.h <<\EOF
5878 #define HAVE_NCURSES_H 1
5884 case "$cf_cv_ncurses_header" in
5885 (ncurses/curses.h|ncurses/ncurses.h)
5887 cat >>confdefs.h <<\EOF
5888 #define HAVE_NCURSES_NCURSES_H 1
5892 (ncursesw/curses.h|ncursesw/ncurses.h)
5894 cat >>confdefs.h <<\EOF
5895 #define HAVE_NCURSESW_NCURSES_H 1
5901 echo "$as_me:5901: checking for terminfo header" >&5
5902 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5903 if test "${cf_cv_term_header+set}" = set; then
5904 echo $ECHO_N "(cached) $ECHO_C" >&6
5907 case "${cf_cv_ncurses_header}" in
5908 (*/ncurses.h|*/ncursesw.h)
5909 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5912 cf_term_header=term.h
5916 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5918 cat >"conftest.$ac_ext" <<_ACEOF
5919 #line 5919 "configure"
5920 #include "confdefs.h"
5922 #include <${cf_cv_ncurses_header:-curses.h}>
5928 int x = auto_left_margin; (void)x
5933 rm -f "conftest.$ac_objext"
5934 if { (eval echo "$as_me:5934: \"$ac_compile\"") >&5
5935 (eval $ac_compile) 2>&5
5937 echo "$as_me:5937: \$? = $ac_status" >&5
5938 (exit "$ac_status"); } &&
5939 { ac_try='test -s "conftest.$ac_objext"'
5940 { (eval echo "$as_me:5940: \"$ac_try\"") >&5
5943 echo "$as_me:5943: \$? = $ac_status" >&5
5944 (exit "$ac_status"); }; }; then
5946 cf_cv_term_header="$cf_test"
5948 echo "$as_me: failed program was:" >&5
5949 cat "conftest.$ac_ext" >&5
5951 cf_cv_term_header=unknown
5954 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5955 test "$cf_cv_term_header" != unknown && break
5959 echo "$as_me:5959: result: $cf_cv_term_header" >&5
5960 echo "${ECHO_T}$cf_cv_term_header" >&6
5962 # Set definitions to allow ifdef'ing to accommodate subdirectories
5964 case "$cf_cv_term_header" in
5967 cat >>confdefs.h <<\EOF
5968 #define HAVE_TERM_H 1
5974 case "$cf_cv_term_header" in
5977 cat >>confdefs.h <<\EOF
5978 #define HAVE_NCURSES_TERM_H 1
5984 cat >>confdefs.h <<\EOF
5985 #define HAVE_NCURSESW_TERM_H 1
5991 # some applications need this, but should check for NCURSES_VERSION
5993 cat >>confdefs.h <<\EOF
5997 echo "$as_me:5997: checking for ncurses version" >&5
5998 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5999 if test "${cf_cv_ncurses_version+set}" = set; then
6000 echo $ECHO_N "(cached) $ECHO_C" >&6
6003 cf_cv_ncurses_version=no
6005 rm -f "$cf_tempfile"
6006 if test "$cross_compiling" = yes; then
6008 # This will not work if the preprocessor splits the line after the
6009 # Autoconf token. The 'unproto' program does that.
6010 cat > "conftest.$ac_ext" <<EOF
6011 #include <${cf_cv_ncurses_header:-curses.h}>
6013 #ifdef NCURSES_VERSION
6014 Autoconf NCURSES_VERSION
6022 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6023 { (eval echo "$as_me:6023: \"$cf_try\"") >&5
6026 echo "$as_me:6026: \$? = $ac_status" >&5
6027 (exit "$ac_status"); }
6028 if test -f conftest.out ; then
6029 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
6030 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6035 cat >"conftest.$ac_ext" <<_ACEOF
6036 #line 6036 "configure"
6037 #include "confdefs.h"
6039 #include <${cf_cv_ncurses_header:-curses.h}>
6043 FILE *fp = fopen("$cf_tempfile", "w");
6044 #ifdef NCURSES_VERSION
6045 # ifdef NCURSES_VERSION_PATCH
6046 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6048 fprintf(fp, "%s\\n", NCURSES_VERSION);
6052 fprintf(fp, "old\\n");
6057 ${cf_cv_main_return:-return}(0);
6060 rm -f "conftest$ac_exeext"
6061 if { (eval echo "$as_me:6061: \"$ac_link\"") >&5
6062 (eval $ac_link) 2>&5
6064 echo "$as_me:6064: \$? = $ac_status" >&5
6065 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6066 { (eval echo "$as_me:6066: \"$ac_try\"") >&5
6069 echo "$as_me:6069: \$? = $ac_status" >&5
6070 (exit "$ac_status"); }; }; then
6072 cf_cv_ncurses_version=`cat $cf_tempfile`
6074 echo "$as_me: program exited with status $ac_status" >&5
6075 echo "$as_me: failed program was:" >&5
6076 cat "conftest.$ac_ext" >&5
6078 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6080 rm -f "$cf_tempfile"
6083 echo "$as_me:6083: result: $cf_cv_ncurses_version" >&5
6084 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6085 test "$cf_cv_ncurses_version" = no ||
6086 cat >>confdefs.h <<\EOF
6090 cf_nculib_root=ncurses
6091 # This works, except for the special case where we find gpm, but
6092 # ncurses is in a nonstandard location via $LIBS, and we really want
6095 cf_ncurses_SAVE="$LIBS"
6096 echo "$as_me:6096: checking for Gpm_Open in -lgpm" >&5
6097 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6098 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6099 echo $ECHO_N "(cached) $ECHO_C" >&6
6101 ac_check_lib_save_LIBS=$LIBS
6103 cat >"conftest.$ac_ext" <<_ACEOF
6104 #line 6104 "configure"
6105 #include "confdefs.h"
6107 /* Override any gcc2 internal prototype to avoid an error. */
6111 /* We use char because int might match the return type of a gcc2
6112 builtin and then its argument prototype would still apply. */
6122 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6123 if { (eval echo "$as_me:6123: \"$ac_link\"") >&5
6124 (eval $ac_link) 2>&5
6126 echo "$as_me:6126: \$? = $ac_status" >&5
6127 (exit "$ac_status"); } &&
6128 { ac_try='test -s "conftest$ac_exeext"'
6129 { (eval echo "$as_me:6129: \"$ac_try\"") >&5
6132 echo "$as_me:6132: \$? = $ac_status" >&5
6133 (exit "$ac_status"); }; }; then
6134 ac_cv_lib_gpm_Gpm_Open=yes
6136 echo "$as_me: failed program was:" >&5
6137 cat "conftest.$ac_ext" >&5
6138 ac_cv_lib_gpm_Gpm_Open=no
6140 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6141 LIBS=$ac_check_lib_save_LIBS
6143 echo "$as_me:6143: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6144 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6145 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
6146 echo "$as_me:6146: checking for initscr in -lgpm" >&5
6147 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6148 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6149 echo $ECHO_N "(cached) $ECHO_C" >&6
6151 ac_check_lib_save_LIBS=$LIBS
6153 cat >"conftest.$ac_ext" <<_ACEOF
6154 #line 6154 "configure"
6155 #include "confdefs.h"
6157 /* Override any gcc2 internal prototype to avoid an error. */
6161 /* We use char because int might match the return type of a gcc2
6162 builtin and then its argument prototype would still apply. */
6172 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6173 if { (eval echo "$as_me:6173: \"$ac_link\"") >&5
6174 (eval $ac_link) 2>&5
6176 echo "$as_me:6176: \$? = $ac_status" >&5
6177 (exit "$ac_status"); } &&
6178 { ac_try='test -s "conftest$ac_exeext"'
6179 { (eval echo "$as_me:6179: \"$ac_try\"") >&5
6182 echo "$as_me:6182: \$? = $ac_status" >&5
6183 (exit "$ac_status"); }; }; then
6184 ac_cv_lib_gpm_initscr=yes
6186 echo "$as_me: failed program was:" >&5
6187 cat "conftest.$ac_ext" >&5
6188 ac_cv_lib_gpm_initscr=no
6190 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6191 LIBS=$ac_check_lib_save_LIBS
6193 echo "$as_me:6193: result: $ac_cv_lib_gpm_initscr" >&5
6194 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6195 if test "$ac_cv_lib_gpm_initscr" = yes; then
6196 LIBS="$cf_ncurses_SAVE"
6198 cf_ncurses_LIBS="-lgpm"
6205 # This is only necessary if you are linking against an obsolete
6206 # version of ncurses (but it should do no harm, since it is static).
6207 if test "$cf_nculib_root" = ncurses ; then
6208 echo "$as_me:6208: checking for tgoto in -lmytinfo" >&5
6209 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6210 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6211 echo $ECHO_N "(cached) $ECHO_C" >&6
6213 ac_check_lib_save_LIBS=$LIBS
6214 LIBS="-lmytinfo $LIBS"
6215 cat >"conftest.$ac_ext" <<_ACEOF
6216 #line 6216 "configure"
6217 #include "confdefs.h"
6219 /* Override any gcc2 internal prototype to avoid an error. */
6223 /* We use char because int might match the return type of a gcc2
6224 builtin and then its argument prototype would still apply. */
6234 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6235 if { (eval echo "$as_me:6235: \"$ac_link\"") >&5
6236 (eval $ac_link) 2>&5
6238 echo "$as_me:6238: \$? = $ac_status" >&5
6239 (exit "$ac_status"); } &&
6240 { ac_try='test -s "conftest$ac_exeext"'
6241 { (eval echo "$as_me:6241: \"$ac_try\"") >&5
6244 echo "$as_me:6244: \$? = $ac_status" >&5
6245 (exit "$ac_status"); }; }; then
6246 ac_cv_lib_mytinfo_tgoto=yes
6248 echo "$as_me: failed program was:" >&5
6249 cat "conftest.$ac_ext" >&5
6250 ac_cv_lib_mytinfo_tgoto=no
6252 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6253 LIBS=$ac_check_lib_save_LIBS
6255 echo "$as_me:6255: result: $ac_cv_lib_mytinfo_tgoto" >&5
6256 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6257 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6258 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6268 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6270 for cf_add_1lib in $cf_add_0lib; do
6271 for cf_add_2lib in $cf_add_libs; do
6272 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6277 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6281 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6287 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6289 for cf_add_1lib in $cf_add_0lib; do
6290 for cf_add_2lib in $cf_add_libs; do
6291 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6296 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6302 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
6304 echo "$as_me:6304: checking for initscr" >&5
6305 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6306 if test "${ac_cv_func_initscr+set}" = set; then
6307 echo $ECHO_N "(cached) $ECHO_C" >&6
6309 cat >"conftest.$ac_ext" <<_ACEOF
6310 #line 6310 "configure"
6311 #include "confdefs.h"
6312 #define initscr autoconf_temporary
6313 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6320 /* We use char because int might match the return type of a gcc2
6321 builtin and then its argument prototype would still apply. */
6322 char initscr (void);
6328 /* The GNU C library defines stubs for functions which it implements
6329 to always fail with ENOSYS. Some functions are actually named
6330 something starting with __ and the normal name is an alias. */
6331 #if defined (__stub_initscr) || defined (__stub___initscr)
6332 #error found stub for initscr
6340 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6341 if { (eval echo "$as_me:6341: \"$ac_link\"") >&5
6342 (eval $ac_link) 2>&5
6344 echo "$as_me:6344: \$? = $ac_status" >&5
6345 (exit "$ac_status"); } &&
6346 { ac_try='test -s "conftest$ac_exeext"'
6347 { (eval echo "$as_me:6347: \"$ac_try\"") >&5
6350 echo "$as_me:6350: \$? = $ac_status" >&5
6351 (exit "$ac_status"); }; }; then
6352 ac_cv_func_initscr=yes
6354 echo "$as_me: failed program was:" >&5
6355 cat "conftest.$ac_ext" >&5
6356 ac_cv_func_initscr=no
6358 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6360 echo "$as_me:6360: result: $ac_cv_func_initscr" >&5
6361 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6362 if test "$ac_cv_func_initscr" = yes; then
6363 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6366 cf_save_LIBS="$LIBS"
6367 echo "$as_me:6367: checking for initscr in -l$cf_nculib_root" >&5
6368 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6369 LIBS="-l$cf_nculib_root $LIBS"
6370 cat >"conftest.$ac_ext" <<_ACEOF
6371 #line 6371 "configure"
6372 #include "confdefs.h"
6373 #include <${cf_cv_ncurses_header:-curses.h}>
6382 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6383 if { (eval echo "$as_me:6383: \"$ac_link\"") >&5
6384 (eval $ac_link) 2>&5
6386 echo "$as_me:6386: \$? = $ac_status" >&5
6387 (exit "$ac_status"); } &&
6388 { ac_try='test -s "conftest$ac_exeext"'
6389 { (eval echo "$as_me:6389: \"$ac_try\"") >&5
6392 echo "$as_me:6392: \$? = $ac_status" >&5
6393 (exit "$ac_status"); }; }; then
6394 echo "$as_me:6394: result: yes" >&5
6395 echo "${ECHO_T}yes" >&6
6396 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6399 echo "$as_me: failed program was:" >&5
6400 cat "conftest.$ac_ext" >&5
6401 echo "$as_me:6401: result: no" >&5
6402 echo "${ECHO_T}no" >&6
6405 cf_library_path_list=""
6406 if test -n "${LDFLAGS}${LIBS}" ; then
6407 for cf_library_path in $LDFLAGS $LIBS
6409 case "$cf_library_path" in
6411 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6413 test "x$cf_library_path" != "xNONE" && \
6414 test -d "$cf_library_path" && \
6416 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6417 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6418 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6419 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6420 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6421 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"
6424 cf_library_path_list="$cf_library_path_list $cf_search"
6432 test "x$prefix" != "xNONE" && \
6433 test -d "$prefix" && \
6435 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6436 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6437 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6438 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6439 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6440 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6443 for cf_subdir_prefix in \
6452 test "x$cf_subdir_prefix" != "x$prefix" && \
6453 test -d "$cf_subdir_prefix" && \
6454 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6455 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6456 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6457 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
6458 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
6459 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
6460 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"
6465 cf_search="$cf_library_path_list $cf_search"
6467 for cf_libdir in $cf_search
6469 echo "$as_me:6469: checking for -l$cf_nculib_root in $cf_libdir" >&5
6470 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6471 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6472 cat >"conftest.$ac_ext" <<_ACEOF
6473 #line 6473 "configure"
6474 #include "confdefs.h"
6475 #include <${cf_cv_ncurses_header:-curses.h}>
6484 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6485 if { (eval echo "$as_me:6485: \"$ac_link\"") >&5
6486 (eval $ac_link) 2>&5
6488 echo "$as_me:6488: \$? = $ac_status" >&5
6489 (exit "$ac_status"); } &&
6490 { ac_try='test -s "conftest$ac_exeext"'
6491 { (eval echo "$as_me:6491: \"$ac_try\"") >&5
6494 echo "$as_me:6494: \$? = $ac_status" >&5
6495 (exit "$ac_status"); }; }; then
6496 echo "$as_me:6496: result: yes" >&5
6497 echo "${ECHO_T}yes" >&6
6498 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6501 echo "$as_me: failed program was:" >&5
6502 cat "conftest.$ac_ext" >&5
6503 echo "$as_me:6503: result: no" >&5
6504 echo "${ECHO_T}no" >&6
6505 LIBS="$cf_save_LIBS"
6507 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6511 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6515 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
6517 if test "$cf_found_library" = no ; then
6518 { { echo "$as_me:6518: error: Cannot link $cf_nculib_root library" >&5
6519 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6520 { (exit 1); exit 1; }; }
6525 if test -n "$cf_ncurses_LIBS" ; then
6526 echo "$as_me:6526: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6527 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6528 cf_ncurses_SAVE="$LIBS"
6529 for p in $cf_ncurses_LIBS ; do
6530 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
6531 if test "$q" != "$LIBS" ; then
6535 cat >"conftest.$ac_ext" <<_ACEOF
6536 #line 6536 "configure"
6537 #include "confdefs.h"
6538 #include <${cf_cv_ncurses_header:-curses.h}>
6542 initscr(); mousemask(0,0); tigetstr((char *)0);
6547 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6548 if { (eval echo "$as_me:6548: \"$ac_link\"") >&5
6549 (eval $ac_link) 2>&5
6551 echo "$as_me:6551: \$? = $ac_status" >&5
6552 (exit "$ac_status"); } &&
6553 { ac_try='test -s "conftest$ac_exeext"'
6554 { (eval echo "$as_me:6554: \"$ac_try\"") >&5
6557 echo "$as_me:6557: \$? = $ac_status" >&5
6558 (exit "$ac_status"); }; }; then
6559 echo "$as_me:6559: result: yes" >&5
6560 echo "${ECHO_T}yes" >&6
6562 echo "$as_me: failed program was:" >&5
6563 cat "conftest.$ac_ext" >&5
6564 echo "$as_me:6564: result: no" >&5
6565 echo "${ECHO_T}no" >&6
6566 LIBS="$cf_ncurses_SAVE"
6568 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6571 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6573 cat >>confdefs.h <<EOF
6574 #define $cf_nculib_ROOT 1
6582 echo "$as_me:6582: checking if you want wide-character code" >&5
6583 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6585 # Check whether --enable-widec or --disable-widec was given.
6586 if test "${enable_widec+set}" = set; then
6587 enableval="$enable_widec"
6588 with_widec=$enableval
6592 echo "$as_me:6592: result: $with_widec" >&5
6593 echo "${ECHO_T}$with_widec" >&6
6594 if test "$with_widec" = yes ; then
6596 for ac_header in wchar.h
6598 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6599 echo "$as_me:6599: checking for $ac_header" >&5
6600 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6601 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6602 echo $ECHO_N "(cached) $ECHO_C" >&6
6604 cat >"conftest.$ac_ext" <<_ACEOF
6605 #line 6605 "configure"
6606 #include "confdefs.h"
6607 #include <$ac_header>
6609 if { (eval echo "$as_me:6609: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6610 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6612 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6614 cat conftest.err >&5
6615 echo "$as_me:6615: \$? = $ac_status" >&5
6616 (exit "$ac_status"); } >/dev/null; then
6617 if test -s conftest.err; then
6618 ac_cpp_err=$ac_c_preproc_warn_flag
6625 if test -z "$ac_cpp_err"; then
6626 eval "$as_ac_Header=yes"
6628 echo "$as_me: failed program was:" >&5
6629 cat "conftest.$ac_ext" >&5
6630 eval "$as_ac_Header=no"
6632 rm -f conftest.err "conftest.$ac_ext"
6634 echo "$as_me:6634: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6635 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6636 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6637 cat >>confdefs.h <<EOF
6638 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6644 echo "$as_me:6644: checking for multibyte character support" >&5
6645 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6646 if test "${cf_cv_utf8_lib+set}" = set; then
6647 echo $ECHO_N "(cached) $ECHO_C" >&6
6650 cf_save_LIBS="$LIBS"
6651 cat >"conftest.$ac_ext" <<_ACEOF
6652 #line 6652 "configure"
6653 #include "confdefs.h"
6669 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6670 if { (eval echo "$as_me:6670: \"$ac_link\"") >&5
6671 (eval $ac_link) 2>&5
6673 echo "$as_me:6673: \$? = $ac_status" >&5
6674 (exit "$ac_status"); } &&
6675 { ac_try='test -s "conftest$ac_exeext"'
6676 { (eval echo "$as_me:6676: \"$ac_try\"") >&5
6679 echo "$as_me:6679: \$? = $ac_status" >&5
6680 (exit "$ac_status"); }; }; then
6683 echo "$as_me: failed program was:" >&5
6684 cat "conftest.$ac_ext" >&5
6686 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6687 # will be set on completion of the AC_TRY_LINK below.
6688 cf_cv_header_path_utf8=
6689 cf_cv_library_path_utf8=
6691 echo "${as_me:-configure}:6691: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6693 cf_save_LIBS="$LIBS"
6695 cat >"conftest.$ac_ext" <<_ACEOF
6696 #line 6696 "configure"
6697 #include "confdefs.h"
6699 #include <libutf8.h>
6708 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6709 if { (eval echo "$as_me:6709: \"$ac_link\"") >&5
6710 (eval $ac_link) 2>&5
6712 echo "$as_me:6712: \$? = $ac_status" >&5
6713 (exit "$ac_status"); } &&
6714 { ac_try='test -s "conftest$ac_exeext"'
6715 { (eval echo "$as_me:6715: \"$ac_try\"") >&5
6718 echo "$as_me:6718: \$? = $ac_status" >&5
6719 (exit "$ac_status"); }; }; then
6721 cf_cv_find_linkage_utf8=yes
6722 cf_cv_header_path_utf8=/usr/include
6723 cf_cv_library_path_utf8=/usr/lib
6726 echo "$as_me: failed program was:" >&5
6727 cat "conftest.$ac_ext" >&5
6729 LIBS="-lutf8 $cf_save_LIBS"
6731 cat >"conftest.$ac_ext" <<_ACEOF
6732 #line 6732 "configure"
6733 #include "confdefs.h"
6735 #include <libutf8.h>
6744 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6745 if { (eval echo "$as_me:6745: \"$ac_link\"") >&5
6746 (eval $ac_link) 2>&5
6748 echo "$as_me:6748: \$? = $ac_status" >&5
6749 (exit "$ac_status"); } &&
6750 { ac_try='test -s "conftest$ac_exeext"'
6751 { (eval echo "$as_me:6751: \"$ac_try\"") >&5
6754 echo "$as_me:6754: \$? = $ac_status" >&5
6755 (exit "$ac_status"); }; }; then
6757 cf_cv_find_linkage_utf8=yes
6758 cf_cv_header_path_utf8=/usr/include
6759 cf_cv_library_path_utf8=/usr/lib
6760 cf_cv_library_file_utf8="-lutf8"
6763 echo "$as_me: failed program was:" >&5
6764 cat "conftest.$ac_ext" >&5
6766 cf_cv_find_linkage_utf8=no
6767 LIBS="$cf_save_LIBS"
6769 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6771 echo "${as_me:-configure}:6771: testing find linkage for utf8 library ..." 1>&5
6773 echo "${as_me:-configure}:6773: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6775 cf_save_CPPFLAGS="$CPPFLAGS"
6776 cf_test_CPPFLAGS="$CPPFLAGS"
6780 # collect the current set of include-directories from compiler flags
6781 cf_header_path_list=""
6782 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6783 for cf_header_path in $CPPFLAGS $CFLAGS
6785 case "$cf_header_path" in
6787 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6789 test "x$cf_header_path" != "xNONE" && \
6790 test -d "$cf_header_path" && \
6792 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6793 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
6794 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
6795 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
6796 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
6797 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6800 cf_header_path_list="$cf_header_path_list $cf_search"
6806 # add the variations for the package we are looking for
6810 test "x$prefix" != "xNONE" && \
6811 test -d "$prefix" && \
6813 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6814 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
6815 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
6816 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
6817 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
6818 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
6821 for cf_subdir_prefix in \
6830 test "x$cf_subdir_prefix" != "x$prefix" && \
6831 test -d "$cf_subdir_prefix" && \
6832 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6833 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6834 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
6835 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6836 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6837 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6838 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6843 test "$includedir" != NONE && \
6844 test "$includedir" != "/usr/include" && \
6845 test -d "$includedir" && {
6846 test -d "$includedir" && cf_search="$cf_search $includedir"
6847 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
6850 test "$oldincludedir" != NONE && \
6851 test "$oldincludedir" != "/usr/include" && \
6852 test -d "$oldincludedir" && {
6853 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
6854 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
6857 cf_search="$cf_search $cf_header_path_list"
6859 for cf_cv_header_path_utf8 in $cf_search
6861 if test -d "$cf_cv_header_path_utf8" ; then
6862 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6864 echo "${as_me:-configure}:6864: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6866 CPPFLAGS="$cf_save_CPPFLAGS"
6868 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6869 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
6871 cat >"conftest.$ac_ext" <<_ACEOF
6872 #line 6872 "configure"
6873 #include "confdefs.h"
6875 #include <libutf8.h>
6884 rm -f "conftest.$ac_objext"
6885 if { (eval echo "$as_me:6885: \"$ac_compile\"") >&5
6886 (eval $ac_compile) 2>&5
6888 echo "$as_me:6888: \$? = $ac_status" >&5
6889 (exit "$ac_status"); } &&
6890 { ac_try='test -s "conftest.$ac_objext"'
6891 { (eval echo "$as_me:6891: \"$ac_try\"") >&5
6894 echo "$as_me:6894: \$? = $ac_status" >&5
6895 (exit "$ac_status"); }; }; then
6897 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6899 echo "${as_me:-configure}:6899: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6901 cf_cv_find_linkage_utf8=maybe
6902 cf_test_CPPFLAGS="$CPPFLAGS"
6905 echo "$as_me: failed program was:" >&5
6906 cat "conftest.$ac_ext" >&5
6908 CPPFLAGS="$cf_save_CPPFLAGS"
6911 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6915 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6917 echo "${as_me:-configure}:6917: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6919 cf_save_LIBS="$LIBS"
6920 cf_save_LDFLAGS="$LDFLAGS"
6922 if test "$cf_cv_find_linkage_utf8" != yes ; then
6925 cf_library_path_list=""
6926 if test -n "${LDFLAGS}${LIBS}" ; then
6927 for cf_library_path in $LDFLAGS $LIBS
6929 case "$cf_library_path" in
6931 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6933 test "x$cf_library_path" != "xNONE" && \
6934 test -d "$cf_library_path" && \
6936 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6937 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6938 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
6939 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6940 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
6941 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6944 cf_library_path_list="$cf_library_path_list $cf_search"
6952 test "x$prefix" != "xNONE" && \
6953 test -d "$prefix" && \
6955 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6956 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6957 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
6958 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
6959 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
6960 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
6963 for cf_subdir_prefix in \
6972 test "x$cf_subdir_prefix" != "x$prefix" && \
6973 test -d "$cf_subdir_prefix" && \
6974 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6975 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6976 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6977 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6978 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6979 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6980 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6985 cf_search="$cf_library_path_list $cf_search"
6987 for cf_cv_library_path_utf8 in $cf_search
6989 if test -d "$cf_cv_library_path_utf8" ; then
6990 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6992 echo "${as_me:-configure}:6992: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6994 CPPFLAGS="$cf_test_CPPFLAGS"
6995 LIBS="-lutf8 $cf_save_LIBS"
6996 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6997 cat >"conftest.$ac_ext" <<_ACEOF
6998 #line 6998 "configure"
6999 #include "confdefs.h"
7001 #include <libutf8.h>
7010 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7011 if { (eval echo "$as_me:7011: \"$ac_link\"") >&5
7012 (eval $ac_link) 2>&5
7014 echo "$as_me:7014: \$? = $ac_status" >&5
7015 (exit "$ac_status"); } &&
7016 { ac_try='test -s "conftest$ac_exeext"'
7017 { (eval echo "$as_me:7017: \"$ac_try\"") >&5
7020 echo "$as_me:7020: \$? = $ac_status" >&5
7021 (exit "$ac_status"); }; }; then
7023 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7025 echo "${as_me:-configure}:7025: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7027 cf_cv_find_linkage_utf8=yes
7028 cf_cv_library_file_utf8="-lutf8"
7031 echo "$as_me: failed program was:" >&5
7032 cat "conftest.$ac_ext" >&5
7034 CPPFLAGS="$cf_save_CPPFLAGS"
7035 LIBS="$cf_save_LIBS"
7036 LDFLAGS="$cf_save_LDFLAGS"
7039 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7042 CPPFLAGS="$cf_save_CPPFLAGS"
7043 LDFLAGS="$cf_save_LDFLAGS"
7047 cf_cv_find_linkage_utf8=no
7051 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7054 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7056 LIBS="$cf_save_LIBS"
7058 if test "$cf_cv_find_linkage_utf8" = yes ; then
7059 cf_cv_utf8_lib=add-on
7065 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7067 echo "$as_me:7067: result: $cf_cv_utf8_lib" >&5
7068 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7070 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7072 if test "$cf_cv_utf8_lib" = "add-on" ; then
7074 cat >>confdefs.h <<\EOF
7075 #define HAVE_LIBUTF8_H 1
7078 if test -n "$cf_cv_header_path_utf8" ; then
7079 for cf_add_incdir in $cf_cv_header_path_utf8
7081 while test "$cf_add_incdir" != /usr/include
7083 if test -d "$cf_add_incdir"
7086 if test -n "$CFLAGS$CPPFLAGS" ; then
7087 # a loop is needed to ensure we can add subdirs of existing dirs
7088 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7089 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7090 cf_have_incdir=yes; break
7095 if test "$cf_have_incdir" = no ; then
7096 if test "$cf_add_incdir" = /usr/local/include ; then
7097 if test "$GCC" = yes
7099 cf_save_CPPFLAGS=$CPPFLAGS
7101 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7102 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7104 cat >"conftest.$ac_ext" <<_ACEOF
7105 #line 7105 "configure"
7106 #include "confdefs.h"
7116 rm -f "conftest.$ac_objext"
7117 if { (eval echo "$as_me:7117: \"$ac_compile\"") >&5
7118 (eval $ac_compile) 2>&5
7120 echo "$as_me:7120: \$? = $ac_status" >&5
7121 (exit "$ac_status"); } &&
7122 { ac_try='test -s "conftest.$ac_objext"'
7123 { (eval echo "$as_me:7123: \"$ac_try\"") >&5
7126 echo "$as_me:7126: \$? = $ac_status" >&5
7127 (exit "$ac_status"); }; }; then
7130 echo "$as_me: failed program was:" >&5
7131 cat "conftest.$ac_ext" >&5
7134 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7135 CPPFLAGS=$cf_save_CPPFLAGS
7140 if test "$cf_have_incdir" = no ; then
7141 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7143 echo "${as_me:-configure}:7143: testing adding $cf_add_incdir to include-path ..." 1>&5
7145 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7147 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7148 test "$cf_top_incdir" = "$cf_add_incdir" && break
7149 cf_add_incdir="$cf_top_incdir"
7160 if test -n "$cf_cv_library_path_utf8" ; then
7161 for cf_add_libdir in $cf_cv_library_path_utf8
7163 if test "$cf_add_libdir" = /usr/lib ; then
7165 elif test -d "$cf_add_libdir"
7168 if test -n "$LDFLAGS$LIBS" ; then
7169 # a loop is needed to ensure we can add subdirs of existing dirs
7170 for cf_test_libdir in $LDFLAGS $LIBS ; do
7171 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7172 cf_have_libdir=yes; break
7176 if test "$cf_have_libdir" = no ; then
7177 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7179 echo "${as_me:-configure}:7179: testing adding $cf_add_libdir to library-path ..." 1>&5
7181 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7190 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7192 for cf_add_1lib in $cf_add_0lib; do
7193 for cf_add_2lib in $cf_add_libs; do
7194 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7199 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7205 cf_ncuconfig_root=ncursesw
7206 cf_have_ncuconfig=no
7208 if test "x${PKG_CONFIG:=none}" != xnone; then
7209 echo "$as_me:7209: checking pkg-config for $cf_ncuconfig_root" >&5
7210 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7211 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7212 echo "$as_me:7212: result: yes" >&5
7213 echo "${ECHO_T}yes" >&6
7215 echo "$as_me:7215: checking if the $cf_ncuconfig_root package files work" >&5
7216 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7217 cf_have_ncuconfig=unknown
7219 cf_save_CFLAGS="$CFLAGS"
7220 cf_save_CPPFLAGS="$CPPFLAGS"
7221 cf_save_LIBS="$LIBS"
7223 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7224 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7226 # while -W for passing linker flags is prevalent, it is not "standard".
7227 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7228 # incompatible _and_ non-standard -W option which gives an error. Work
7229 # around that pitfall.
7230 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7236 cf_new_extra_cppflags=
7238 for cf_add_cflags in $cf_pkg_cflags
7240 case "$cf_fix_cppflags" in
7242 case "$cf_add_cflags" in
7243 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7244 case "$cf_add_cflags" in
7246 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7248 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7249 && test -z "${cf_tst_cflags}" \
7250 && cf_fix_cppflags=yes
7252 if test "$cf_fix_cppflags" = yes ; then
7254 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7255 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7258 elif test "${cf_tst_cflags}" = "\"'" ; then
7260 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7261 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7271 case "$cf_add_cflags" in
7273 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7275 CPPFLAGS=`echo "$CPPFLAGS" | \
7276 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7277 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7282 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7283 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7290 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7291 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7298 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7299 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7301 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7303 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7304 && test -z "${cf_tst_cflags}" \
7305 && cf_fix_cppflags=no
7310 if test -n "$cf_new_cflags" ; then
7312 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7313 CFLAGS="${CFLAGS}$cf_new_cflags"
7317 if test -n "$cf_new_cppflags" ; then
7319 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7320 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7324 if test -n "$cf_new_extra_cppflags" ; then
7326 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7327 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7334 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7336 for cf_add_1lib in $cf_add_0lib; do
7337 for cf_add_2lib in $cf_add_libs; do
7338 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7343 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7347 cat >"conftest.$ac_ext" <<_ACEOF
7348 #line 7348 "configure"
7349 #include "confdefs.h"
7350 #include <${cf_cv_ncurses_header:-curses.h}>
7354 initscr(); mousemask(0,0); tigetstr((char *)0);
7359 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7360 if { (eval echo "$as_me:7360: \"$ac_link\"") >&5
7361 (eval $ac_link) 2>&5
7363 echo "$as_me:7363: \$? = $ac_status" >&5
7364 (exit "$ac_status"); } &&
7365 { ac_try='test -s "conftest$ac_exeext"'
7366 { (eval echo "$as_me:7366: \"$ac_try\"") >&5
7369 echo "$as_me:7369: \$? = $ac_status" >&5
7370 (exit "$ac_status"); }; }; then
7371 if test "$cross_compiling" = yes; then
7372 cf_test_ncuconfig=maybe
7374 cat >"conftest.$ac_ext" <<_ACEOF
7375 #line 7375 "configure"
7376 #include "confdefs.h"
7377 #include <${cf_cv_ncurses_header:-curses.h}>
7379 { const char *xx = curses_version(); return (xx == 0); }
7381 rm -f "conftest$ac_exeext"
7382 if { (eval echo "$as_me:7382: \"$ac_link\"") >&5
7383 (eval $ac_link) 2>&5
7385 echo "$as_me:7385: \$? = $ac_status" >&5
7386 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7387 { (eval echo "$as_me:7387: \"$ac_try\"") >&5
7390 echo "$as_me:7390: \$? = $ac_status" >&5
7391 (exit "$ac_status"); }; }; then
7392 cf_test_ncuconfig=yes
7394 echo "$as_me: program exited with status $ac_status" >&5
7395 echo "$as_me: failed program was:" >&5
7396 cat "conftest.$ac_ext" >&5
7397 cf_test_ncuconfig=no
7399 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7402 echo "$as_me: failed program was:" >&5
7403 cat "conftest.$ac_ext" >&5
7404 cf_test_ncuconfig=no
7406 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7408 CFLAGS="$cf_save_CFLAGS"
7409 CPPFLAGS="$cf_save_CPPFLAGS"
7410 LIBS="$cf_save_LIBS"
7412 if test "x$cf_test_ncuconfig" != xyes; then
7413 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7414 cf_pkg_cflags="$cf_temp"
7415 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7416 cf_pkg_libs="$cf_temp"
7421 for cf_add_cflags in $cf_pkg_cflags
7424 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7425 cf_old_cflag="$CFLAGS"
7429 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
7431 (*$cf_add_cflags\ *)
7432 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
7435 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
7439 if test "$CFLAGS" != "$cf_old_cflag" ;
7442 CFLAGS="$cf_new_cflag"
7445 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7446 cf_old_cflag="$CPPFLAGS"
7450 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
7452 (*$cf_add_cflags\ *)
7453 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
7456 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
7460 if test "$CPPFLAGS" != "$cf_old_cflag" ;
7463 CPPFLAGS="$cf_new_cflag"
7471 cf_new_extra_cppflags=
7473 for cf_add_cflags in $cf_pkg_cflags
7475 case "$cf_fix_cppflags" in
7477 case "$cf_add_cflags" in
7478 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7479 case "$cf_add_cflags" in
7481 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7483 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7484 && test -z "${cf_tst_cflags}" \
7485 && cf_fix_cppflags=yes
7487 if test "$cf_fix_cppflags" = yes ; then
7489 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7490 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7493 elif test "${cf_tst_cflags}" = "\"'" ; then
7495 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7496 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7506 case "$cf_add_cflags" in
7508 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7510 CPPFLAGS=`echo "$CPPFLAGS" | \
7511 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7512 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7517 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7518 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7525 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7526 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7533 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7534 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7536 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7538 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7539 && test -z "${cf_tst_cflags}" \
7540 && cf_fix_cppflags=no
7545 if test -n "$cf_new_cflags" ; then
7547 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7548 CFLAGS="${CFLAGS}$cf_new_cflags"
7552 if test -n "$cf_new_cppflags" ; then
7554 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7555 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7559 if test -n "$cf_new_extra_cppflags" ; then
7561 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7562 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7569 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7571 for cf_add_1lib in $cf_add_0lib; do
7572 for cf_add_2lib in $cf_add_libs; do
7573 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7578 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7582 cat >"conftest.$ac_ext" <<_ACEOF
7583 #line 7583 "configure"
7584 #include "confdefs.h"
7585 #include <${cf_cv_ncurses_header:-curses.h}>
7589 initscr(); mousemask(0,0); tigetstr((char *)0);
7594 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7595 if { (eval echo "$as_me:7595: \"$ac_link\"") >&5
7596 (eval $ac_link) 2>&5
7598 echo "$as_me:7598: \$? = $ac_status" >&5
7599 (exit "$ac_status"); } &&
7600 { ac_try='test -s "conftest$ac_exeext"'
7601 { (eval echo "$as_me:7601: \"$ac_try\"") >&5
7604 echo "$as_me:7604: \$? = $ac_status" >&5
7605 (exit "$ac_status"); }; }; then
7606 if test "$cross_compiling" = yes; then
7607 cf_have_ncuconfig=maybe
7609 cat >"conftest.$ac_ext" <<_ACEOF
7610 #line 7610 "configure"
7611 #include "confdefs.h"
7612 #include <${cf_cv_ncurses_header:-curses.h}>
7614 { const char *xx = curses_version(); return (xx == 0); }
7616 rm -f "conftest$ac_exeext"
7617 if { (eval echo "$as_me:7617: \"$ac_link\"") >&5
7618 (eval $ac_link) 2>&5
7620 echo "$as_me:7620: \$? = $ac_status" >&5
7621 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7622 { (eval echo "$as_me:7622: \"$ac_try\"") >&5
7625 echo "$as_me:7625: \$? = $ac_status" >&5
7626 (exit "$ac_status"); }; }; then
7627 cf_have_ncuconfig=yes
7629 echo "$as_me: program exited with status $ac_status" >&5
7630 echo "$as_me: failed program was:" >&5
7631 cat "conftest.$ac_ext" >&5
7632 cf_have_ncuconfig=no
7634 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7637 echo "$as_me: failed program was:" >&5
7638 cat "conftest.$ac_ext" >&5
7639 cf_have_ncuconfig=no
7641 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7642 echo "$as_me:7642: result: $cf_have_ncuconfig" >&5
7643 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7644 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7645 if test "$cf_have_ncuconfig" != "yes"
7647 CPPFLAGS="$cf_save_CPPFLAGS"
7648 LIBS="$cf_save_LIBS"
7649 NCURSES_CONFIG_PKG=none
7652 cat >>confdefs.h <<\EOF
7656 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7658 echo "$as_me:7658: checking for terminfo header" >&5
7659 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7660 if test "${cf_cv_term_header+set}" = set; then
7661 echo $ECHO_N "(cached) $ECHO_C" >&6
7664 case "${cf_cv_ncurses_header}" in
7665 (*/ncurses.h|*/ncursesw.h)
7666 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7669 cf_term_header=term.h
7673 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7675 cat >"conftest.$ac_ext" <<_ACEOF
7676 #line 7676 "configure"
7677 #include "confdefs.h"
7679 #include <${cf_cv_ncurses_header:-curses.h}>
7685 int x = auto_left_margin; (void)x
7690 rm -f "conftest.$ac_objext"
7691 if { (eval echo "$as_me:7691: \"$ac_compile\"") >&5
7692 (eval $ac_compile) 2>&5
7694 echo "$as_me:7694: \$? = $ac_status" >&5
7695 (exit "$ac_status"); } &&
7696 { ac_try='test -s "conftest.$ac_objext"'
7697 { (eval echo "$as_me:7697: \"$ac_try\"") >&5
7700 echo "$as_me:7700: \$? = $ac_status" >&5
7701 (exit "$ac_status"); }; }; then
7703 cf_cv_term_header="$cf_test"
7705 echo "$as_me: failed program was:" >&5
7706 cat "conftest.$ac_ext" >&5
7708 cf_cv_term_header=unknown
7711 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7712 test "$cf_cv_term_header" != unknown && break
7716 echo "$as_me:7716: result: $cf_cv_term_header" >&5
7717 echo "${ECHO_T}$cf_cv_term_header" >&6
7719 # Set definitions to allow ifdef'ing to accommodate subdirectories
7721 case "$cf_cv_term_header" in
7724 cat >>confdefs.h <<\EOF
7725 #define HAVE_TERM_H 1
7731 case "$cf_cv_term_header" in
7734 cat >>confdefs.h <<\EOF
7735 #define HAVE_NCURSES_TERM_H 1
7741 cat >>confdefs.h <<\EOF
7742 #define HAVE_NCURSESW_TERM_H 1
7751 echo "$as_me:7751: result: no" >&5
7752 echo "${ECHO_T}no" >&6
7753 NCURSES_CONFIG_PKG=none
7756 NCURSES_CONFIG_PKG=none
7759 if test "x$cf_have_ncuconfig" = "xno"; then
7760 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7762 if test -n "$ac_tool_prefix"; then
7763 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7765 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7766 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7767 echo "$as_me:7767: checking for $ac_word" >&5
7768 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7769 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7770 echo $ECHO_N "(cached) $ECHO_C" >&6
7772 if test -n "$NCURSES_CONFIG"; then
7773 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7775 ac_save_IFS=$IFS; IFS=$ac_path_separator
7777 for ac_dir in $ac_dummy; do
7779 test -z "$ac_dir" && ac_dir=.
7780 $as_executable_p "$ac_dir/$ac_word" || continue
7781 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7782 echo "$as_me:7782: found $ac_dir/$ac_word" >&5
7788 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7789 if test -n "$NCURSES_CONFIG"; then
7790 echo "$as_me:7790: result: $NCURSES_CONFIG" >&5
7791 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7793 echo "$as_me:7793: result: no" >&5
7794 echo "${ECHO_T}no" >&6
7797 test -n "$NCURSES_CONFIG" && break
7800 if test -z "$NCURSES_CONFIG"; then
7801 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7802 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7804 # Extract the first word of "$ac_prog", so it can be a program name with args.
7805 set dummy $ac_prog; ac_word=$2
7806 echo "$as_me:7806: checking for $ac_word" >&5
7807 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7808 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7809 echo $ECHO_N "(cached) $ECHO_C" >&6
7811 if test -n "$ac_ct_NCURSES_CONFIG"; then
7812 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7814 ac_save_IFS=$IFS; IFS=$ac_path_separator
7816 for ac_dir in $ac_dummy; do
7818 test -z "$ac_dir" && ac_dir=.
7819 $as_executable_p "$ac_dir/$ac_word" || continue
7820 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7821 echo "$as_me:7821: found $ac_dir/$ac_word" >&5
7827 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7828 if test -n "$ac_ct_NCURSES_CONFIG"; then
7829 echo "$as_me:7829: result: $ac_ct_NCURSES_CONFIG" >&5
7830 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7832 echo "$as_me:7832: result: no" >&5
7833 echo "${ECHO_T}no" >&6
7836 test -n "$ac_ct_NCURSES_CONFIG" && break
7838 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7840 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7843 if test "$NCURSES_CONFIG" != none ; then
7845 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7848 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7849 cf_old_cflag="$CFLAGS"
7853 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
7855 (*$cf_add_cflags\ *)
7856 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
7859 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
7863 if test "$CFLAGS" != "$cf_old_cflag" ;
7866 CFLAGS="$cf_new_cflag"
7869 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7870 cf_old_cflag="$CPPFLAGS"
7874 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
7876 (*$cf_add_cflags\ *)
7877 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
7880 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
7884 if test "$CPPFLAGS" != "$cf_old_cflag" ;
7887 CPPFLAGS="$cf_new_cflag"
7895 cf_new_extra_cppflags=
7897 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7899 case "$cf_fix_cppflags" in
7901 case "$cf_add_cflags" in
7902 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7903 case "$cf_add_cflags" in
7905 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7907 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7908 && test -z "${cf_tst_cflags}" \
7909 && cf_fix_cppflags=yes
7911 if test "$cf_fix_cppflags" = yes ; then
7913 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7914 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7917 elif test "${cf_tst_cflags}" = "\"'" ; then
7919 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7920 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7930 case "$cf_add_cflags" in
7932 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7934 CPPFLAGS=`echo "$CPPFLAGS" | \
7935 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7936 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7941 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7942 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7949 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7950 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7957 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7958 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7960 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7962 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7963 && test -z "${cf_tst_cflags}" \
7964 && cf_fix_cppflags=no
7969 if test -n "$cf_new_cflags" ; then
7971 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7972 CFLAGS="${CFLAGS}$cf_new_cflags"
7976 if test -n "$cf_new_cppflags" ; then
7978 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7979 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7983 if test -n "$cf_new_extra_cppflags" ; then
7985 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7986 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7993 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7995 for cf_add_1lib in $cf_add_0lib; do
7996 for cf_add_2lib in $cf_add_libs; do
7997 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8002 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8006 # even with config script, some packages use no-override for curses.h
8008 echo "$as_me:8008: checking if we have identified curses headers" >&5
8009 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8010 if test "${cf_cv_ncurses_header+set}" = set; then
8011 echo $ECHO_N "(cached) $ECHO_C" >&6
8014 cf_cv_ncurses_header=none
8016 ncurses.h ncursesw/ncurses.h \
8017 curses.h ncursesw/curses.h
8019 cat >"conftest.$ac_ext" <<_ACEOF
8020 #line 8020 "configure"
8021 #include "confdefs.h"
8022 #include <${cf_header}>
8026 initscr(); tgoto("?", 0,0)
8031 rm -f "conftest.$ac_objext"
8032 if { (eval echo "$as_me:8032: \"$ac_compile\"") >&5
8033 (eval $ac_compile) 2>&5
8035 echo "$as_me:8035: \$? = $ac_status" >&5
8036 (exit "$ac_status"); } &&
8037 { ac_try='test -s "conftest.$ac_objext"'
8038 { (eval echo "$as_me:8038: \"$ac_try\"") >&5
8041 echo "$as_me:8041: \$? = $ac_status" >&5
8042 (exit "$ac_status"); }; }; then
8043 cf_cv_ncurses_header=$cf_header; break
8045 echo "$as_me: failed program was:" >&5
8046 cat "conftest.$ac_ext" >&5
8048 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8052 echo "$as_me:8052: result: $cf_cv_ncurses_header" >&5
8053 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8055 if test "$cf_cv_ncurses_header" = none ; then
8056 { { echo "$as_me:8056: error: No curses header-files found" >&5
8057 echo "$as_me: error: No curses header-files found" >&2;}
8058 { (exit 1); exit 1; }; }
8061 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8063 for ac_header in $cf_cv_ncurses_header
8065 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8066 echo "$as_me:8066: checking for $ac_header" >&5
8067 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8068 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8069 echo $ECHO_N "(cached) $ECHO_C" >&6
8071 cat >"conftest.$ac_ext" <<_ACEOF
8072 #line 8072 "configure"
8073 #include "confdefs.h"
8074 #include <$ac_header>
8076 if { (eval echo "$as_me:8076: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8077 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8079 $EGREP -v '^ *\+' conftest.er1 >conftest.err
8081 cat conftest.err >&5
8082 echo "$as_me:8082: \$? = $ac_status" >&5
8083 (exit "$ac_status"); } >/dev/null; then
8084 if test -s conftest.err; then
8085 ac_cpp_err=$ac_c_preproc_warn_flag
8092 if test -z "$ac_cpp_err"; then
8093 eval "$as_ac_Header=yes"
8095 echo "$as_me: failed program was:" >&5
8096 cat "conftest.$ac_ext" >&5
8097 eval "$as_ac_Header=no"
8099 rm -f conftest.err "conftest.$ac_ext"
8101 echo "$as_me:8101: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8102 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8103 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8104 cat >>confdefs.h <<EOF
8105 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8111 cat >>confdefs.h <<\EOF
8115 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8117 cat >>confdefs.h <<EOF
8118 #define $cf_nculib_ROOT 1
8121 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
8125 cf_ncuhdr_root=ncursesw
8127 test -n "$cf_cv_curses_dir" && \
8128 test "$cf_cv_curses_dir" != "no" && { \
8130 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8131 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8133 while test "$cf_add_incdir" != /usr/include
8135 if test -d "$cf_add_incdir"
8138 if test -n "$CFLAGS$CPPFLAGS" ; then
8139 # a loop is needed to ensure we can add subdirs of existing dirs
8140 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8141 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8142 cf_have_incdir=yes; break
8147 if test "$cf_have_incdir" = no ; then
8148 if test "$cf_add_incdir" = /usr/local/include ; then
8149 if test "$GCC" = yes
8151 cf_save_CPPFLAGS=$CPPFLAGS
8153 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8154 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8156 cat >"conftest.$ac_ext" <<_ACEOF
8157 #line 8157 "configure"
8158 #include "confdefs.h"
8168 rm -f "conftest.$ac_objext"
8169 if { (eval echo "$as_me:8169: \"$ac_compile\"") >&5
8170 (eval $ac_compile) 2>&5
8172 echo "$as_me:8172: \$? = $ac_status" >&5
8173 (exit "$ac_status"); } &&
8174 { ac_try='test -s "conftest.$ac_objext"'
8175 { (eval echo "$as_me:8175: \"$ac_try\"") >&5
8178 echo "$as_me:8178: \$? = $ac_status" >&5
8179 (exit "$ac_status"); }; }; then
8182 echo "$as_me: failed program was:" >&5
8183 cat "conftest.$ac_ext" >&5
8186 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8187 CPPFLAGS=$cf_save_CPPFLAGS
8192 if test "$cf_have_incdir" = no ; then
8193 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8195 echo "${as_me:-configure}:8195: testing adding $cf_add_incdir to include-path ..." 1>&5
8197 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8199 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8200 test "$cf_top_incdir" = "$cf_add_incdir" && break
8201 cf_add_incdir="$cf_top_incdir"
8214 echo "$as_me:8214: checking for $cf_ncuhdr_root header in include-path" >&5
8215 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8216 if test "${cf_cv_ncurses_h+set}" = set; then
8217 echo $ECHO_N "(cached) $ECHO_C" >&6
8220 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8221 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
8222 for cf_header in $cf_header_list
8225 cat >"conftest.$ac_ext" <<_ACEOF
8226 #line 8226 "configure"
8227 #include "confdefs.h"
8229 #define _XOPEN_SOURCE_EXTENDED
8230 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
8231 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
8233 #include <$cf_header>
8238 #ifdef NCURSES_VERSION
8244 printf("%s\\n", NCURSES_VERSION);
8257 rm -f "conftest.$ac_objext"
8258 if { (eval echo "$as_me:8258: \"$ac_compile\"") >&5
8259 (eval $ac_compile) 2>&5
8261 echo "$as_me:8261: \$? = $ac_status" >&5
8262 (exit "$ac_status"); } &&
8263 { ac_try='test -s "conftest.$ac_objext"'
8264 { (eval echo "$as_me:8264: \"$ac_try\"") >&5
8267 echo "$as_me:8267: \$? = $ac_status" >&5
8268 (exit "$ac_status"); }; }; then
8269 cf_cv_ncurses_h=$cf_header
8272 echo "$as_me: failed program was:" >&5
8273 cat "conftest.$ac_ext" >&5
8276 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8278 test "$cf_cv_ncurses_h" != no && break
8282 echo "$as_me:8282: result: $cf_cv_ncurses_h" >&5
8283 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8285 if test "$cf_cv_ncurses_h" != no ; then
8286 cf_cv_ncurses_header=$cf_cv_ncurses_h
8289 echo "$as_me:8289: checking for $cf_ncuhdr_root include-path" >&5
8290 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8291 if test "${cf_cv_ncurses_h2+set}" = set; then
8292 echo $ECHO_N "(cached) $ECHO_C" >&6
8295 test -n "$verbose" && echo
8299 # collect the current set of include-directories from compiler flags
8300 cf_header_path_list=""
8301 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8302 for cf_header_path in $CPPFLAGS $CFLAGS
8304 case "$cf_header_path" in
8306 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8308 test "x$cf_header_path" != "xNONE" && \
8309 test -d "$cf_header_path" && \
8311 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8312 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8313 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8314 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8315 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8316 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"
8319 cf_header_path_list="$cf_header_path_list $cf_search"
8325 # add the variations for the package we are looking for
8329 test "x$prefix" != "xNONE" && \
8330 test -d "$prefix" && \
8332 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8333 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8334 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8335 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8336 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8337 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8340 for cf_subdir_prefix in \
8349 test "x$cf_subdir_prefix" != "x$prefix" && \
8350 test -d "$cf_subdir_prefix" && \
8351 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8352 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8353 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8354 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8355 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8356 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8357 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"
8362 test "$includedir" != NONE && \
8363 test "$includedir" != "/usr/include" && \
8364 test -d "$includedir" && {
8365 test -d "$includedir" && cf_search="$cf_search $includedir"
8366 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8369 test "$oldincludedir" != NONE && \
8370 test "$oldincludedir" != "/usr/include" && \
8371 test -d "$oldincludedir" && {
8372 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8373 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8376 cf_search="$cf_search $cf_header_path_list"
8378 test -n "$verbose" && echo "search path $cf_search"
8379 cf_save2_CPPFLAGS="$CPPFLAGS"
8380 for cf_incdir in $cf_search
8383 if test -n "$cf_incdir" ; then
8384 for cf_add_incdir in $cf_incdir
8386 while test "$cf_add_incdir" != /usr/include
8388 if test -d "$cf_add_incdir"
8391 if test -n "$CFLAGS$CPPFLAGS" ; then
8392 # a loop is needed to ensure we can add subdirs of existing dirs
8393 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8394 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8395 cf_have_incdir=yes; break
8400 if test "$cf_have_incdir" = no ; then
8401 if test "$cf_add_incdir" = /usr/local/include ; then
8402 if test "$GCC" = yes
8404 cf_save_CPPFLAGS=$CPPFLAGS
8406 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8407 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8409 cat >"conftest.$ac_ext" <<_ACEOF
8410 #line 8410 "configure"
8411 #include "confdefs.h"
8421 rm -f "conftest.$ac_objext"
8422 if { (eval echo "$as_me:8422: \"$ac_compile\"") >&5
8423 (eval $ac_compile) 2>&5
8425 echo "$as_me:8425: \$? = $ac_status" >&5
8426 (exit "$ac_status"); } &&
8427 { ac_try='test -s "conftest.$ac_objext"'
8428 { (eval echo "$as_me:8428: \"$ac_try\"") >&5
8431 echo "$as_me:8431: \$? = $ac_status" >&5
8432 (exit "$ac_status"); }; }; then
8435 echo "$as_me: failed program was:" >&5
8436 cat "conftest.$ac_ext" >&5
8439 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8440 CPPFLAGS=$cf_save_CPPFLAGS
8445 if test "$cf_have_incdir" = no ; then
8446 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8448 echo "${as_me:-configure}:8448: testing adding $cf_add_incdir to include-path ..." 1>&5
8450 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8452 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8453 test "$cf_top_incdir" = "$cf_add_incdir" && break
8454 cf_add_incdir="$cf_top_incdir"
8470 cat >"conftest.$ac_ext" <<_ACEOF
8471 #line 8471 "configure"
8472 #include "confdefs.h"
8474 #include <$cf_header>
8479 #ifdef NCURSES_VERSION
8481 printf("%s\\n", NCURSES_VERSION);
8494 rm -f "conftest.$ac_objext"
8495 if { (eval echo "$as_me:8495: \"$ac_compile\"") >&5
8496 (eval $ac_compile) 2>&5
8498 echo "$as_me:8498: \$? = $ac_status" >&5
8499 (exit "$ac_status"); } &&
8500 { ac_try='test -s "conftest.$ac_objext"'
8501 { (eval echo "$as_me:8501: \"$ac_try\"") >&5
8504 echo "$as_me:8504: \$? = $ac_status" >&5
8505 (exit "$ac_status"); }; }; then
8506 cf_cv_ncurses_h2=$cf_header
8509 echo "$as_me: failed program was:" >&5
8510 cat "conftest.$ac_ext" >&5
8513 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8515 if test "$cf_cv_ncurses_h2" != no ; then
8516 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8517 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
8520 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8522 CPPFLAGS="$cf_save2_CPPFLAGS"
8523 test "$cf_cv_ncurses_h2" != no && break
8525 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8525: error: not found" >&5
8526 echo "$as_me: error: not found" >&2;}
8527 { (exit 1); exit 1; }; }
8530 echo "$as_me:8530: result: $cf_cv_ncurses_h2" >&5
8531 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8533 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
8534 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
8535 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
8536 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
8539 if test -n "$cf_1st_incdir" ; then
8540 for cf_add_incdir in $cf_1st_incdir
8542 while test "$cf_add_incdir" != /usr/include
8544 if test -d "$cf_add_incdir"
8547 if test -n "$CFLAGS$CPPFLAGS" ; then
8548 # a loop is needed to ensure we can add subdirs of existing dirs
8549 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8550 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8551 cf_have_incdir=yes; break
8556 if test "$cf_have_incdir" = no ; then
8557 if test "$cf_add_incdir" = /usr/local/include ; then
8558 if test "$GCC" = yes
8560 cf_save_CPPFLAGS=$CPPFLAGS
8562 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8563 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8565 cat >"conftest.$ac_ext" <<_ACEOF
8566 #line 8566 "configure"
8567 #include "confdefs.h"
8577 rm -f "conftest.$ac_objext"
8578 if { (eval echo "$as_me:8578: \"$ac_compile\"") >&5
8579 (eval $ac_compile) 2>&5
8581 echo "$as_me:8581: \$? = $ac_status" >&5
8582 (exit "$ac_status"); } &&
8583 { ac_try='test -s "conftest.$ac_objext"'
8584 { (eval echo "$as_me:8584: \"$ac_try\"") >&5
8587 echo "$as_me:8587: \$? = $ac_status" >&5
8588 (exit "$ac_status"); }; }; then
8591 echo "$as_me: failed program was:" >&5
8592 cat "conftest.$ac_ext" >&5
8595 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8596 CPPFLAGS=$cf_save_CPPFLAGS
8601 if test "$cf_have_incdir" = no ; then
8602 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8604 echo "${as_me:-configure}:8604: testing adding $cf_add_incdir to include-path ..." 1>&5
8606 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8608 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8609 test "$cf_top_incdir" = "$cf_add_incdir" && break
8610 cf_add_incdir="$cf_top_incdir"
8623 # Set definitions to allow ifdef'ing for ncurses.h
8625 case "$cf_cv_ncurses_header" in
8628 cat >>confdefs.h <<\EOF
8629 #define HAVE_NCURSES_H 1
8635 case "$cf_cv_ncurses_header" in
8636 (ncurses/curses.h|ncurses/ncurses.h)
8638 cat >>confdefs.h <<\EOF
8639 #define HAVE_NCURSES_NCURSES_H 1
8643 (ncursesw/curses.h|ncursesw/ncurses.h)
8645 cat >>confdefs.h <<\EOF
8646 #define HAVE_NCURSESW_NCURSES_H 1
8652 echo "$as_me:8652: checking for terminfo header" >&5
8653 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8654 if test "${cf_cv_term_header+set}" = set; then
8655 echo $ECHO_N "(cached) $ECHO_C" >&6
8658 case "${cf_cv_ncurses_header}" in
8659 (*/ncurses.h|*/ncursesw.h)
8660 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8663 cf_term_header=term.h
8667 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8669 cat >"conftest.$ac_ext" <<_ACEOF
8670 #line 8670 "configure"
8671 #include "confdefs.h"
8673 #include <${cf_cv_ncurses_header:-curses.h}>
8679 int x = auto_left_margin; (void)x
8684 rm -f "conftest.$ac_objext"
8685 if { (eval echo "$as_me:8685: \"$ac_compile\"") >&5
8686 (eval $ac_compile) 2>&5
8688 echo "$as_me:8688: \$? = $ac_status" >&5
8689 (exit "$ac_status"); } &&
8690 { ac_try='test -s "conftest.$ac_objext"'
8691 { (eval echo "$as_me:8691: \"$ac_try\"") >&5
8694 echo "$as_me:8694: \$? = $ac_status" >&5
8695 (exit "$ac_status"); }; }; then
8697 cf_cv_term_header="$cf_test"
8699 echo "$as_me: failed program was:" >&5
8700 cat "conftest.$ac_ext" >&5
8702 cf_cv_term_header=unknown
8705 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8706 test "$cf_cv_term_header" != unknown && break
8710 echo "$as_me:8710: result: $cf_cv_term_header" >&5
8711 echo "${ECHO_T}$cf_cv_term_header" >&6
8713 # Set definitions to allow ifdef'ing to accommodate subdirectories
8715 case "$cf_cv_term_header" in
8718 cat >>confdefs.h <<\EOF
8719 #define HAVE_TERM_H 1
8725 case "$cf_cv_term_header" in
8728 cat >>confdefs.h <<\EOF
8729 #define HAVE_NCURSES_TERM_H 1
8735 cat >>confdefs.h <<\EOF
8736 #define HAVE_NCURSESW_TERM_H 1
8742 # some applications need this, but should check for NCURSES_VERSION
8744 cat >>confdefs.h <<\EOF
8748 echo "$as_me:8748: checking for ncurses version" >&5
8749 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8750 if test "${cf_cv_ncurses_version+set}" = set; then
8751 echo $ECHO_N "(cached) $ECHO_C" >&6
8754 cf_cv_ncurses_version=no
8756 rm -f "$cf_tempfile"
8757 if test "$cross_compiling" = yes; then
8759 # This will not work if the preprocessor splits the line after the
8760 # Autoconf token. The 'unproto' program does that.
8761 cat > "conftest.$ac_ext" <<EOF
8762 #include <${cf_cv_ncurses_header:-curses.h}>
8764 #ifdef NCURSES_VERSION
8765 Autoconf NCURSES_VERSION
8773 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8774 { (eval echo "$as_me:8774: \"$cf_try\"") >&5
8777 echo "$as_me:8777: \$? = $ac_status" >&5
8778 (exit "$ac_status"); }
8779 if test -f conftest.out ; then
8780 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
8781 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8786 cat >"conftest.$ac_ext" <<_ACEOF
8787 #line 8787 "configure"
8788 #include "confdefs.h"
8790 #include <${cf_cv_ncurses_header:-curses.h}>
8794 FILE *fp = fopen("$cf_tempfile", "w");
8795 #ifdef NCURSES_VERSION
8796 # ifdef NCURSES_VERSION_PATCH
8797 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8799 fprintf(fp, "%s\\n", NCURSES_VERSION);
8803 fprintf(fp, "old\\n");
8808 ${cf_cv_main_return:-return}(0);
8811 rm -f "conftest$ac_exeext"
8812 if { (eval echo "$as_me:8812: \"$ac_link\"") >&5
8813 (eval $ac_link) 2>&5
8815 echo "$as_me:8815: \$? = $ac_status" >&5
8816 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8817 { (eval echo "$as_me:8817: \"$ac_try\"") >&5
8820 echo "$as_me:8820: \$? = $ac_status" >&5
8821 (exit "$ac_status"); }; }; then
8823 cf_cv_ncurses_version=`cat $cf_tempfile`
8825 echo "$as_me: program exited with status $ac_status" >&5
8826 echo "$as_me: failed program was:" >&5
8827 cat "conftest.$ac_ext" >&5
8829 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8831 rm -f "$cf_tempfile"
8834 echo "$as_me:8834: result: $cf_cv_ncurses_version" >&5
8835 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8836 test "$cf_cv_ncurses_version" = no ||
8837 cat >>confdefs.h <<\EOF
8841 cf_nculib_root=ncursesw
8842 # This works, except for the special case where we find gpm, but
8843 # ncurses is in a nonstandard location via $LIBS, and we really want
8846 cf_ncurses_SAVE="$LIBS"
8847 echo "$as_me:8847: checking for Gpm_Open in -lgpm" >&5
8848 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8849 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8850 echo $ECHO_N "(cached) $ECHO_C" >&6
8852 ac_check_lib_save_LIBS=$LIBS
8854 cat >"conftest.$ac_ext" <<_ACEOF
8855 #line 8855 "configure"
8856 #include "confdefs.h"
8858 /* Override any gcc2 internal prototype to avoid an error. */
8862 /* We use char because int might match the return type of a gcc2
8863 builtin and then its argument prototype would still apply. */
8873 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8874 if { (eval echo "$as_me:8874: \"$ac_link\"") >&5
8875 (eval $ac_link) 2>&5
8877 echo "$as_me:8877: \$? = $ac_status" >&5
8878 (exit "$ac_status"); } &&
8879 { ac_try='test -s "conftest$ac_exeext"'
8880 { (eval echo "$as_me:8880: \"$ac_try\"") >&5
8883 echo "$as_me:8883: \$? = $ac_status" >&5
8884 (exit "$ac_status"); }; }; then
8885 ac_cv_lib_gpm_Gpm_Open=yes
8887 echo "$as_me: failed program was:" >&5
8888 cat "conftest.$ac_ext" >&5
8889 ac_cv_lib_gpm_Gpm_Open=no
8891 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8892 LIBS=$ac_check_lib_save_LIBS
8894 echo "$as_me:8894: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8895 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8896 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
8897 echo "$as_me:8897: checking for initscr in -lgpm" >&5
8898 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8899 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8900 echo $ECHO_N "(cached) $ECHO_C" >&6
8902 ac_check_lib_save_LIBS=$LIBS
8904 cat >"conftest.$ac_ext" <<_ACEOF
8905 #line 8905 "configure"
8906 #include "confdefs.h"
8908 /* Override any gcc2 internal prototype to avoid an error. */
8912 /* We use char because int might match the return type of a gcc2
8913 builtin and then its argument prototype would still apply. */
8923 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8924 if { (eval echo "$as_me:8924: \"$ac_link\"") >&5
8925 (eval $ac_link) 2>&5
8927 echo "$as_me:8927: \$? = $ac_status" >&5
8928 (exit "$ac_status"); } &&
8929 { ac_try='test -s "conftest$ac_exeext"'
8930 { (eval echo "$as_me:8930: \"$ac_try\"") >&5
8933 echo "$as_me:8933: \$? = $ac_status" >&5
8934 (exit "$ac_status"); }; }; then
8935 ac_cv_lib_gpm_initscr=yes
8937 echo "$as_me: failed program was:" >&5
8938 cat "conftest.$ac_ext" >&5
8939 ac_cv_lib_gpm_initscr=no
8941 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8942 LIBS=$ac_check_lib_save_LIBS
8944 echo "$as_me:8944: result: $ac_cv_lib_gpm_initscr" >&5
8945 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8946 if test "$ac_cv_lib_gpm_initscr" = yes; then
8947 LIBS="$cf_ncurses_SAVE"
8949 cf_ncurses_LIBS="-lgpm"
8956 # This is only necessary if you are linking against an obsolete
8957 # version of ncurses (but it should do no harm, since it is static).
8958 if test "$cf_nculib_root" = ncurses ; then
8959 echo "$as_me:8959: checking for tgoto in -lmytinfo" >&5
8960 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8961 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8962 echo $ECHO_N "(cached) $ECHO_C" >&6
8964 ac_check_lib_save_LIBS=$LIBS
8965 LIBS="-lmytinfo $LIBS"
8966 cat >"conftest.$ac_ext" <<_ACEOF
8967 #line 8967 "configure"
8968 #include "confdefs.h"
8970 /* Override any gcc2 internal prototype to avoid an error. */
8974 /* We use char because int might match the return type of a gcc2
8975 builtin and then its argument prototype would still apply. */
8985 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8986 if { (eval echo "$as_me:8986: \"$ac_link\"") >&5
8987 (eval $ac_link) 2>&5
8989 echo "$as_me:8989: \$? = $ac_status" >&5
8990 (exit "$ac_status"); } &&
8991 { ac_try='test -s "conftest$ac_exeext"'
8992 { (eval echo "$as_me:8992: \"$ac_try\"") >&5
8995 echo "$as_me:8995: \$? = $ac_status" >&5
8996 (exit "$ac_status"); }; }; then
8997 ac_cv_lib_mytinfo_tgoto=yes
8999 echo "$as_me: failed program was:" >&5
9000 cat "conftest.$ac_ext" >&5
9001 ac_cv_lib_mytinfo_tgoto=no
9003 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9004 LIBS=$ac_check_lib_save_LIBS
9006 echo "$as_me:9006: result: $ac_cv_lib_mytinfo_tgoto" >&5
9007 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9008 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
9009 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9019 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9021 for cf_add_1lib in $cf_add_0lib; do
9022 for cf_add_2lib in $cf_add_libs; do
9023 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9028 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9032 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
9038 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9040 for cf_add_1lib in $cf_add_0lib; do
9041 for cf_add_2lib in $cf_add_libs; do
9042 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9047 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9053 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
9055 echo "$as_me:9055: checking for initscr" >&5
9056 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9057 if test "${ac_cv_func_initscr+set}" = set; then
9058 echo $ECHO_N "(cached) $ECHO_C" >&6
9060 cat >"conftest.$ac_ext" <<_ACEOF
9061 #line 9061 "configure"
9062 #include "confdefs.h"
9063 #define initscr autoconf_temporary
9064 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9071 /* We use char because int might match the return type of a gcc2
9072 builtin and then its argument prototype would still apply. */
9073 char initscr (void);
9079 /* The GNU C library defines stubs for functions which it implements
9080 to always fail with ENOSYS. Some functions are actually named
9081 something starting with __ and the normal name is an alias. */
9082 #if defined (__stub_initscr) || defined (__stub___initscr)
9083 #error found stub for initscr
9091 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9092 if { (eval echo "$as_me:9092: \"$ac_link\"") >&5
9093 (eval $ac_link) 2>&5
9095 echo "$as_me:9095: \$? = $ac_status" >&5
9096 (exit "$ac_status"); } &&
9097 { ac_try='test -s "conftest$ac_exeext"'
9098 { (eval echo "$as_me:9098: \"$ac_try\"") >&5
9101 echo "$as_me:9101: \$? = $ac_status" >&5
9102 (exit "$ac_status"); }; }; then
9103 ac_cv_func_initscr=yes
9105 echo "$as_me: failed program was:" >&5
9106 cat "conftest.$ac_ext" >&5
9107 ac_cv_func_initscr=no
9109 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9111 echo "$as_me:9111: result: $ac_cv_func_initscr" >&5
9112 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9113 if test "$ac_cv_func_initscr" = yes; then
9114 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9117 cf_save_LIBS="$LIBS"
9118 echo "$as_me:9118: checking for initscr in -l$cf_nculib_root" >&5
9119 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9120 LIBS="-l$cf_nculib_root $LIBS"
9121 cat >"conftest.$ac_ext" <<_ACEOF
9122 #line 9122 "configure"
9123 #include "confdefs.h"
9124 #include <${cf_cv_ncurses_header:-curses.h}>
9133 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9134 if { (eval echo "$as_me:9134: \"$ac_link\"") >&5
9135 (eval $ac_link) 2>&5
9137 echo "$as_me:9137: \$? = $ac_status" >&5
9138 (exit "$ac_status"); } &&
9139 { ac_try='test -s "conftest$ac_exeext"'
9140 { (eval echo "$as_me:9140: \"$ac_try\"") >&5
9143 echo "$as_me:9143: \$? = $ac_status" >&5
9144 (exit "$ac_status"); }; }; then
9145 echo "$as_me:9145: result: yes" >&5
9146 echo "${ECHO_T}yes" >&6
9147 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9150 echo "$as_me: failed program was:" >&5
9151 cat "conftest.$ac_ext" >&5
9152 echo "$as_me:9152: result: no" >&5
9153 echo "${ECHO_T}no" >&6
9156 cf_library_path_list=""
9157 if test -n "${LDFLAGS}${LIBS}" ; then
9158 for cf_library_path in $LDFLAGS $LIBS
9160 case "$cf_library_path" in
9162 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9164 test "x$cf_library_path" != "xNONE" && \
9165 test -d "$cf_library_path" && \
9167 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9168 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
9169 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9170 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9171 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9172 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"
9175 cf_library_path_list="$cf_library_path_list $cf_search"
9183 test "x$prefix" != "xNONE" && \
9184 test -d "$prefix" && \
9186 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9187 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
9188 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9189 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9190 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9191 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9194 for cf_subdir_prefix in \
9203 test "x$cf_subdir_prefix" != "x$prefix" && \
9204 test -d "$cf_subdir_prefix" && \
9205 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9206 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9207 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
9208 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9209 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9210 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9211 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"
9216 cf_search="$cf_library_path_list $cf_search"
9218 for cf_libdir in $cf_search
9220 echo "$as_me:9220: checking for -l$cf_nculib_root in $cf_libdir" >&5
9221 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9222 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9223 cat >"conftest.$ac_ext" <<_ACEOF
9224 #line 9224 "configure"
9225 #include "confdefs.h"
9226 #include <${cf_cv_ncurses_header:-curses.h}>
9235 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9236 if { (eval echo "$as_me:9236: \"$ac_link\"") >&5
9237 (eval $ac_link) 2>&5
9239 echo "$as_me:9239: \$? = $ac_status" >&5
9240 (exit "$ac_status"); } &&
9241 { ac_try='test -s "conftest$ac_exeext"'
9242 { (eval echo "$as_me:9242: \"$ac_try\"") >&5
9245 echo "$as_me:9245: \$? = $ac_status" >&5
9246 (exit "$ac_status"); }; }; then
9247 echo "$as_me:9247: result: yes" >&5
9248 echo "${ECHO_T}yes" >&6
9249 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9252 echo "$as_me: failed program was:" >&5
9253 cat "conftest.$ac_ext" >&5
9254 echo "$as_me:9254: result: no" >&5
9255 echo "${ECHO_T}no" >&6
9256 LIBS="$cf_save_LIBS"
9258 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9262 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9266 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
9268 if test "$cf_found_library" = no ; then
9269 { { echo "$as_me:9269: error: Cannot link $cf_nculib_root library" >&5
9270 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9271 { (exit 1); exit 1; }; }
9276 if test -n "$cf_ncurses_LIBS" ; then
9277 echo "$as_me:9277: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9278 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9279 cf_ncurses_SAVE="$LIBS"
9280 for p in $cf_ncurses_LIBS ; do
9281 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
9282 if test "$q" != "$LIBS" ; then
9286 cat >"conftest.$ac_ext" <<_ACEOF
9287 #line 9287 "configure"
9288 #include "confdefs.h"
9289 #include <${cf_cv_ncurses_header:-curses.h}>
9293 initscr(); mousemask(0,0); tigetstr((char *)0);
9298 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9299 if { (eval echo "$as_me:9299: \"$ac_link\"") >&5
9300 (eval $ac_link) 2>&5
9302 echo "$as_me:9302: \$? = $ac_status" >&5
9303 (exit "$ac_status"); } &&
9304 { ac_try='test -s "conftest$ac_exeext"'
9305 { (eval echo "$as_me:9305: \"$ac_try\"") >&5
9308 echo "$as_me:9308: \$? = $ac_status" >&5
9309 (exit "$ac_status"); }; }; then
9310 echo "$as_me:9310: result: yes" >&5
9311 echo "${ECHO_T}yes" >&6
9313 echo "$as_me: failed program was:" >&5
9314 cat "conftest.$ac_ext" >&5
9315 echo "$as_me:9315: result: no" >&5
9316 echo "${ECHO_T}no" >&6
9317 LIBS="$cf_ncurses_SAVE"
9319 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9322 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9324 cat >>confdefs.h <<EOF
9325 #define $cf_nculib_ROOT 1
9335 cf_ncuconfig_root=ncurses
9336 cf_have_ncuconfig=no
9338 if test "x${PKG_CONFIG:=none}" != xnone; then
9339 echo "$as_me:9339: checking pkg-config for $cf_ncuconfig_root" >&5
9340 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9341 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9342 echo "$as_me:9342: result: yes" >&5
9343 echo "${ECHO_T}yes" >&6
9345 echo "$as_me:9345: checking if the $cf_ncuconfig_root package files work" >&5
9346 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9347 cf_have_ncuconfig=unknown
9349 cf_save_CFLAGS="$CFLAGS"
9350 cf_save_CPPFLAGS="$CPPFLAGS"
9351 cf_save_LIBS="$LIBS"
9353 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
9354 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9356 # while -W for passing linker flags is prevalent, it is not "standard".
9357 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9358 # incompatible _and_ non-standard -W option which gives an error. Work
9359 # around that pitfall.
9360 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9366 cf_new_extra_cppflags=
9368 for cf_add_cflags in $cf_pkg_cflags
9370 case "$cf_fix_cppflags" in
9372 case "$cf_add_cflags" in
9373 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9374 case "$cf_add_cflags" in
9376 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9378 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9379 && test -z "${cf_tst_cflags}" \
9380 && cf_fix_cppflags=yes
9382 if test "$cf_fix_cppflags" = yes ; then
9384 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9385 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9388 elif test "${cf_tst_cflags}" = "\"'" ; then
9390 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9391 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9401 case "$cf_add_cflags" in
9403 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9405 CPPFLAGS=`echo "$CPPFLAGS" | \
9406 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9407 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9412 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9413 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9420 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9421 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9428 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9429 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9431 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9433 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9434 && test -z "${cf_tst_cflags}" \
9435 && cf_fix_cppflags=no
9440 if test -n "$cf_new_cflags" ; then
9442 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9443 CFLAGS="${CFLAGS}$cf_new_cflags"
9447 if test -n "$cf_new_cppflags" ; then
9449 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9450 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9454 if test -n "$cf_new_extra_cppflags" ; then
9456 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9457 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9464 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9466 for cf_add_1lib in $cf_add_0lib; do
9467 for cf_add_2lib in $cf_add_libs; do
9468 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9473 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9477 cat >"conftest.$ac_ext" <<_ACEOF
9478 #line 9478 "configure"
9479 #include "confdefs.h"
9480 #include <${cf_cv_ncurses_header:-curses.h}>
9484 initscr(); mousemask(0,0); tigetstr((char *)0);
9489 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9490 if { (eval echo "$as_me:9490: \"$ac_link\"") >&5
9491 (eval $ac_link) 2>&5
9493 echo "$as_me:9493: \$? = $ac_status" >&5
9494 (exit "$ac_status"); } &&
9495 { ac_try='test -s "conftest$ac_exeext"'
9496 { (eval echo "$as_me:9496: \"$ac_try\"") >&5
9499 echo "$as_me:9499: \$? = $ac_status" >&5
9500 (exit "$ac_status"); }; }; then
9501 if test "$cross_compiling" = yes; then
9502 cf_test_ncuconfig=maybe
9504 cat >"conftest.$ac_ext" <<_ACEOF
9505 #line 9505 "configure"
9506 #include "confdefs.h"
9507 #include <${cf_cv_ncurses_header:-curses.h}>
9509 { const char *xx = curses_version(); return (xx == 0); }
9511 rm -f "conftest$ac_exeext"
9512 if { (eval echo "$as_me:9512: \"$ac_link\"") >&5
9513 (eval $ac_link) 2>&5
9515 echo "$as_me:9515: \$? = $ac_status" >&5
9516 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9517 { (eval echo "$as_me:9517: \"$ac_try\"") >&5
9520 echo "$as_me:9520: \$? = $ac_status" >&5
9521 (exit "$ac_status"); }; }; then
9522 cf_test_ncuconfig=yes
9524 echo "$as_me: program exited with status $ac_status" >&5
9525 echo "$as_me: failed program was:" >&5
9526 cat "conftest.$ac_ext" >&5
9527 cf_test_ncuconfig=no
9529 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9532 echo "$as_me: failed program was:" >&5
9533 cat "conftest.$ac_ext" >&5
9534 cf_test_ncuconfig=no
9536 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9538 CFLAGS="$cf_save_CFLAGS"
9539 CPPFLAGS="$cf_save_CPPFLAGS"
9540 LIBS="$cf_save_LIBS"
9542 if test "x$cf_test_ncuconfig" != xyes; then
9543 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9544 cf_pkg_cflags="$cf_temp"
9545 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9546 cf_pkg_libs="$cf_temp"
9551 for cf_add_cflags in $cf_pkg_cflags
9554 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9555 cf_old_cflag="$CFLAGS"
9559 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
9561 (*$cf_add_cflags\ *)
9562 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
9565 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
9569 if test "$CFLAGS" != "$cf_old_cflag" ;
9572 CFLAGS="$cf_new_cflag"
9575 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9576 cf_old_cflag="$CPPFLAGS"
9580 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
9582 (*$cf_add_cflags\ *)
9583 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
9586 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
9590 if test "$CPPFLAGS" != "$cf_old_cflag" ;
9593 CPPFLAGS="$cf_new_cflag"
9601 cf_new_extra_cppflags=
9603 for cf_add_cflags in $cf_pkg_cflags
9605 case "$cf_fix_cppflags" in
9607 case "$cf_add_cflags" in
9608 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9609 case "$cf_add_cflags" in
9611 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9613 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9614 && test -z "${cf_tst_cflags}" \
9615 && cf_fix_cppflags=yes
9617 if test "$cf_fix_cppflags" = yes ; then
9619 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9620 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9623 elif test "${cf_tst_cflags}" = "\"'" ; then
9625 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9626 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9636 case "$cf_add_cflags" in
9638 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9640 CPPFLAGS=`echo "$CPPFLAGS" | \
9641 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9642 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9647 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9648 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9655 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9656 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9663 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9664 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9666 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9668 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9669 && test -z "${cf_tst_cflags}" \
9670 && cf_fix_cppflags=no
9675 if test -n "$cf_new_cflags" ; then
9677 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9678 CFLAGS="${CFLAGS}$cf_new_cflags"
9682 if test -n "$cf_new_cppflags" ; then
9684 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9685 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9689 if test -n "$cf_new_extra_cppflags" ; then
9691 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9692 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9699 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9701 for cf_add_1lib in $cf_add_0lib; do
9702 for cf_add_2lib in $cf_add_libs; do
9703 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9708 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9712 cat >"conftest.$ac_ext" <<_ACEOF
9713 #line 9713 "configure"
9714 #include "confdefs.h"
9715 #include <${cf_cv_ncurses_header:-curses.h}>
9719 initscr(); mousemask(0,0); tigetstr((char *)0);
9724 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9725 if { (eval echo "$as_me:9725: \"$ac_link\"") >&5
9726 (eval $ac_link) 2>&5
9728 echo "$as_me:9728: \$? = $ac_status" >&5
9729 (exit "$ac_status"); } &&
9730 { ac_try='test -s "conftest$ac_exeext"'
9731 { (eval echo "$as_me:9731: \"$ac_try\"") >&5
9734 echo "$as_me:9734: \$? = $ac_status" >&5
9735 (exit "$ac_status"); }; }; then
9736 if test "$cross_compiling" = yes; then
9737 cf_have_ncuconfig=maybe
9739 cat >"conftest.$ac_ext" <<_ACEOF
9740 #line 9740 "configure"
9741 #include "confdefs.h"
9742 #include <${cf_cv_ncurses_header:-curses.h}>
9744 { const char *xx = curses_version(); return (xx == 0); }
9746 rm -f "conftest$ac_exeext"
9747 if { (eval echo "$as_me:9747: \"$ac_link\"") >&5
9748 (eval $ac_link) 2>&5
9750 echo "$as_me:9750: \$? = $ac_status" >&5
9751 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9752 { (eval echo "$as_me:9752: \"$ac_try\"") >&5
9755 echo "$as_me:9755: \$? = $ac_status" >&5
9756 (exit "$ac_status"); }; }; then
9757 cf_have_ncuconfig=yes
9759 echo "$as_me: program exited with status $ac_status" >&5
9760 echo "$as_me: failed program was:" >&5
9761 cat "conftest.$ac_ext" >&5
9762 cf_have_ncuconfig=no
9764 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9767 echo "$as_me: failed program was:" >&5
9768 cat "conftest.$ac_ext" >&5
9769 cf_have_ncuconfig=no
9771 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9772 echo "$as_me:9772: result: $cf_have_ncuconfig" >&5
9773 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9774 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9775 if test "$cf_have_ncuconfig" != "yes"
9777 CPPFLAGS="$cf_save_CPPFLAGS"
9778 LIBS="$cf_save_LIBS"
9779 NCURSES_CONFIG_PKG=none
9782 cat >>confdefs.h <<\EOF
9786 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9788 echo "$as_me:9788: checking for terminfo header" >&5
9789 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9790 if test "${cf_cv_term_header+set}" = set; then
9791 echo $ECHO_N "(cached) $ECHO_C" >&6
9794 case "${cf_cv_ncurses_header}" in
9795 (*/ncurses.h|*/ncursesw.h)
9796 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9799 cf_term_header=term.h
9803 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9805 cat >"conftest.$ac_ext" <<_ACEOF
9806 #line 9806 "configure"
9807 #include "confdefs.h"
9809 #include <${cf_cv_ncurses_header:-curses.h}>
9815 int x = auto_left_margin; (void)x
9820 rm -f "conftest.$ac_objext"
9821 if { (eval echo "$as_me:9821: \"$ac_compile\"") >&5
9822 (eval $ac_compile) 2>&5
9824 echo "$as_me:9824: \$? = $ac_status" >&5
9825 (exit "$ac_status"); } &&
9826 { ac_try='test -s "conftest.$ac_objext"'
9827 { (eval echo "$as_me:9827: \"$ac_try\"") >&5
9830 echo "$as_me:9830: \$? = $ac_status" >&5
9831 (exit "$ac_status"); }; }; then
9833 cf_cv_term_header="$cf_test"
9835 echo "$as_me: failed program was:" >&5
9836 cat "conftest.$ac_ext" >&5
9838 cf_cv_term_header=unknown
9841 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9842 test "$cf_cv_term_header" != unknown && break
9846 echo "$as_me:9846: result: $cf_cv_term_header" >&5
9847 echo "${ECHO_T}$cf_cv_term_header" >&6
9849 # Set definitions to allow ifdef'ing to accommodate subdirectories
9851 case "$cf_cv_term_header" in
9854 cat >>confdefs.h <<\EOF
9855 #define HAVE_TERM_H 1
9861 case "$cf_cv_term_header" in
9864 cat >>confdefs.h <<\EOF
9865 #define HAVE_NCURSES_TERM_H 1
9871 cat >>confdefs.h <<\EOF
9872 #define HAVE_NCURSESW_TERM_H 1
9881 echo "$as_me:9881: result: no" >&5
9882 echo "${ECHO_T}no" >&6
9883 NCURSES_CONFIG_PKG=none
9886 NCURSES_CONFIG_PKG=none
9889 if test "x$cf_have_ncuconfig" = "xno"; then
9890 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9892 if test -n "$ac_tool_prefix"; then
9893 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9895 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9896 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9897 echo "$as_me:9897: checking for $ac_word" >&5
9898 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9899 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9900 echo $ECHO_N "(cached) $ECHO_C" >&6
9902 if test -n "$NCURSES_CONFIG"; then
9903 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9905 ac_save_IFS=$IFS; IFS=$ac_path_separator
9907 for ac_dir in $ac_dummy; do
9909 test -z "$ac_dir" && ac_dir=.
9910 $as_executable_p "$ac_dir/$ac_word" || continue
9911 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9912 echo "$as_me:9912: found $ac_dir/$ac_word" >&5
9918 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9919 if test -n "$NCURSES_CONFIG"; then
9920 echo "$as_me:9920: result: $NCURSES_CONFIG" >&5
9921 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9923 echo "$as_me:9923: result: no" >&5
9924 echo "${ECHO_T}no" >&6
9927 test -n "$NCURSES_CONFIG" && break
9930 if test -z "$NCURSES_CONFIG"; then
9931 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9932 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9934 # Extract the first word of "$ac_prog", so it can be a program name with args.
9935 set dummy $ac_prog; ac_word=$2
9936 echo "$as_me:9936: checking for $ac_word" >&5
9937 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9938 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9939 echo $ECHO_N "(cached) $ECHO_C" >&6
9941 if test -n "$ac_ct_NCURSES_CONFIG"; then
9942 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9944 ac_save_IFS=$IFS; IFS=$ac_path_separator
9946 for ac_dir in $ac_dummy; do
9948 test -z "$ac_dir" && ac_dir=.
9949 $as_executable_p "$ac_dir/$ac_word" || continue
9950 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9951 echo "$as_me:9951: found $ac_dir/$ac_word" >&5
9957 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9958 if test -n "$ac_ct_NCURSES_CONFIG"; then
9959 echo "$as_me:9959: result: $ac_ct_NCURSES_CONFIG" >&5
9960 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9962 echo "$as_me:9962: result: no" >&5
9963 echo "${ECHO_T}no" >&6
9966 test -n "$ac_ct_NCURSES_CONFIG" && break
9968 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9970 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9973 if test "$NCURSES_CONFIG" != none ; then
9975 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9978 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9979 cf_old_cflag="$CFLAGS"
9983 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
9985 (*$cf_add_cflags\ *)
9986 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
9989 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
9993 if test "$CFLAGS" != "$cf_old_cflag" ;
9996 CFLAGS="$cf_new_cflag"
9999 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10000 cf_old_cflag="$CPPFLAGS"
10002 case "$CPPFLAGS" in
10003 (*$cf_add_cflags=*)
10004 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
10006 (*$cf_add_cflags\ *)
10007 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
10010 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
10014 if test "$CPPFLAGS" != "$cf_old_cflag" ;
10017 CPPFLAGS="$cf_new_cflag"
10025 cf_new_extra_cppflags=
10027 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
10029 case "$cf_fix_cppflags" in
10031 case "$cf_add_cflags" in
10032 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10033 case "$cf_add_cflags" in
10035 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10037 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10038 && test -z "${cf_tst_cflags}" \
10039 && cf_fix_cppflags=yes
10041 if test "$cf_fix_cppflags" = yes ; then
10043 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10044 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10047 elif test "${cf_tst_cflags}" = "\"'" ; then
10049 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10050 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10056 case "$CPPFLAGS" in
10060 case "$cf_add_cflags" in
10062 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10064 CPPFLAGS=`echo "$CPPFLAGS" | \
10065 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10066 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10071 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10072 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10079 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10080 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10087 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10088 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10090 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10092 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10093 && test -z "${cf_tst_cflags}" \
10094 && cf_fix_cppflags=no
10099 if test -n "$cf_new_cflags" ; then
10101 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10102 CFLAGS="${CFLAGS}$cf_new_cflags"
10106 if test -n "$cf_new_cppflags" ; then
10108 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10109 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10113 if test -n "$cf_new_extra_cppflags" ; then
10115 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10116 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10120 cf_add_libs="$LIBS"
10123 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10124 # filter duplicates
10125 for cf_add_1lib in $cf_add_0lib; do
10126 for cf_add_2lib in $cf_add_libs; do
10127 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10132 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10134 LIBS="$cf_add_libs"
10136 # even with config script, some packages use no-override for curses.h
10138 echo "$as_me:10138: checking if we have identified curses headers" >&5
10139 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10140 if test "${cf_cv_ncurses_header+set}" = set; then
10141 echo $ECHO_N "(cached) $ECHO_C" >&6
10144 cf_cv_ncurses_header=none
10146 ncurses.h ncurses/ncurses.h \
10147 curses.h ncurses/curses.h
10149 cat >"conftest.$ac_ext" <<_ACEOF
10150 #line 10150 "configure"
10151 #include "confdefs.h"
10152 #include <${cf_header}>
10156 initscr(); tgoto("?", 0,0)
10161 rm -f "conftest.$ac_objext"
10162 if { (eval echo "$as_me:10162: \"$ac_compile\"") >&5
10163 (eval $ac_compile) 2>&5
10165 echo "$as_me:10165: \$? = $ac_status" >&5
10166 (exit "$ac_status"); } &&
10167 { ac_try='test -s "conftest.$ac_objext"'
10168 { (eval echo "$as_me:10168: \"$ac_try\"") >&5
10169 (eval $ac_try) 2>&5
10171 echo "$as_me:10171: \$? = $ac_status" >&5
10172 (exit "$ac_status"); }; }; then
10173 cf_cv_ncurses_header=$cf_header; break
10175 echo "$as_me: failed program was:" >&5
10176 cat "conftest.$ac_ext" >&5
10178 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10182 echo "$as_me:10182: result: $cf_cv_ncurses_header" >&5
10183 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10185 if test "$cf_cv_ncurses_header" = none ; then
10186 { { echo "$as_me:10186: error: No curses header-files found" >&5
10187 echo "$as_me: error: No curses header-files found" >&2;}
10188 { (exit 1); exit 1; }; }
10191 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10193 for ac_header in $cf_cv_ncurses_header
10195 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10196 echo "$as_me:10196: checking for $ac_header" >&5
10197 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10198 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10199 echo $ECHO_N "(cached) $ECHO_C" >&6
10201 cat >"conftest.$ac_ext" <<_ACEOF
10202 #line 10202 "configure"
10203 #include "confdefs.h"
10204 #include <$ac_header>
10206 if { (eval echo "$as_me:10206: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10207 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10209 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10211 cat conftest.err >&5
10212 echo "$as_me:10212: \$? = $ac_status" >&5
10213 (exit "$ac_status"); } >/dev/null; then
10214 if test -s conftest.err; then
10215 ac_cpp_err=$ac_c_preproc_warn_flag
10222 if test -z "$ac_cpp_err"; then
10223 eval "$as_ac_Header=yes"
10225 echo "$as_me: failed program was:" >&5
10226 cat "conftest.$ac_ext" >&5
10227 eval "$as_ac_Header=no"
10229 rm -f conftest.err "conftest.$ac_ext"
10231 echo "$as_me:10231: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10232 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10233 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10234 cat >>confdefs.h <<EOF
10235 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10241 cat >>confdefs.h <<\EOF
10245 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10247 cat >>confdefs.h <<EOF
10248 #define $cf_nculib_ROOT 1
10251 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
10255 cf_ncuhdr_root=ncurses
10257 test -n "$cf_cv_curses_dir" && \
10258 test "$cf_cv_curses_dir" != "no" && { \
10260 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
10261 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
10263 while test "$cf_add_incdir" != /usr/include
10265 if test -d "$cf_add_incdir"
10268 if test -n "$CFLAGS$CPPFLAGS" ; then
10269 # a loop is needed to ensure we can add subdirs of existing dirs
10270 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10271 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10272 cf_have_incdir=yes; break
10277 if test "$cf_have_incdir" = no ; then
10278 if test "$cf_add_incdir" = /usr/local/include ; then
10279 if test "$GCC" = yes
10281 cf_save_CPPFLAGS=$CPPFLAGS
10283 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10284 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10286 cat >"conftest.$ac_ext" <<_ACEOF
10287 #line 10287 "configure"
10288 #include "confdefs.h"
10298 rm -f "conftest.$ac_objext"
10299 if { (eval echo "$as_me:10299: \"$ac_compile\"") >&5
10300 (eval $ac_compile) 2>&5
10302 echo "$as_me:10302: \$? = $ac_status" >&5
10303 (exit "$ac_status"); } &&
10304 { ac_try='test -s "conftest.$ac_objext"'
10305 { (eval echo "$as_me:10305: \"$ac_try\"") >&5
10306 (eval $ac_try) 2>&5
10308 echo "$as_me:10308: \$? = $ac_status" >&5
10309 (exit "$ac_status"); }; }; then
10312 echo "$as_me: failed program was:" >&5
10313 cat "conftest.$ac_ext" >&5
10316 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10317 CPPFLAGS=$cf_save_CPPFLAGS
10322 if test "$cf_have_incdir" = no ; then
10323 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10325 echo "${as_me:-configure}:10325: testing adding $cf_add_incdir to include-path ..." 1>&5
10327 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10329 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10330 test "$cf_top_incdir" = "$cf_add_incdir" && break
10331 cf_add_incdir="$cf_top_incdir"
10344 echo "$as_me:10344: checking for $cf_ncuhdr_root header in include-path" >&5
10345 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10346 if test "${cf_cv_ncurses_h+set}" = set; then
10347 echo $ECHO_N "(cached) $ECHO_C" >&6
10350 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10351 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
10352 for cf_header in $cf_header_list
10355 cat >"conftest.$ac_ext" <<_ACEOF
10356 #line 10356 "configure"
10357 #include "confdefs.h"
10359 #include <$cf_header>
10364 #ifdef NCURSES_VERSION
10366 printf("%s\\n", NCURSES_VERSION);
10379 rm -f "conftest.$ac_objext"
10380 if { (eval echo "$as_me:10380: \"$ac_compile\"") >&5
10381 (eval $ac_compile) 2>&5
10383 echo "$as_me:10383: \$? = $ac_status" >&5
10384 (exit "$ac_status"); } &&
10385 { ac_try='test -s "conftest.$ac_objext"'
10386 { (eval echo "$as_me:10386: \"$ac_try\"") >&5
10387 (eval $ac_try) 2>&5
10389 echo "$as_me:10389: \$? = $ac_status" >&5
10390 (exit "$ac_status"); }; }; then
10391 cf_cv_ncurses_h=$cf_header
10394 echo "$as_me: failed program was:" >&5
10395 cat "conftest.$ac_ext" >&5
10398 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10400 test "$cf_cv_ncurses_h" != no && break
10404 echo "$as_me:10404: result: $cf_cv_ncurses_h" >&5
10405 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10407 if test "$cf_cv_ncurses_h" != no ; then
10408 cf_cv_ncurses_header=$cf_cv_ncurses_h
10411 echo "$as_me:10411: checking for $cf_ncuhdr_root include-path" >&5
10412 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10413 if test "${cf_cv_ncurses_h2+set}" = set; then
10414 echo $ECHO_N "(cached) $ECHO_C" >&6
10417 test -n "$verbose" && echo
10421 # collect the current set of include-directories from compiler flags
10422 cf_header_path_list=""
10423 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10424 for cf_header_path in $CPPFLAGS $CFLAGS
10426 case "$cf_header_path" in
10428 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10430 test "x$cf_header_path" != "xNONE" && \
10431 test -d "$cf_header_path" && \
10433 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10434 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
10435 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10436 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10437 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10438 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"
10441 cf_header_path_list="$cf_header_path_list $cf_search"
10447 # add the variations for the package we are looking for
10451 test "x$prefix" != "xNONE" && \
10452 test -d "$prefix" && \
10454 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10455 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
10456 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10457 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10458 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10459 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10462 for cf_subdir_prefix in \
10471 test "x$cf_subdir_prefix" != "x$prefix" && \
10472 test -d "$cf_subdir_prefix" && \
10473 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10474 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10475 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
10476 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10477 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10478 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10479 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"
10484 test "$includedir" != NONE && \
10485 test "$includedir" != "/usr/include" && \
10486 test -d "$includedir" && {
10487 test -d "$includedir" && cf_search="$cf_search $includedir"
10488 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10491 test "$oldincludedir" != NONE && \
10492 test "$oldincludedir" != "/usr/include" && \
10493 test -d "$oldincludedir" && {
10494 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
10495 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10498 cf_search="$cf_search $cf_header_path_list"
10500 test -n "$verbose" && echo "search path $cf_search"
10501 cf_save2_CPPFLAGS="$CPPFLAGS"
10502 for cf_incdir in $cf_search
10505 if test -n "$cf_incdir" ; then
10506 for cf_add_incdir in $cf_incdir
10508 while test "$cf_add_incdir" != /usr/include
10510 if test -d "$cf_add_incdir"
10513 if test -n "$CFLAGS$CPPFLAGS" ; then
10514 # a loop is needed to ensure we can add subdirs of existing dirs
10515 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10516 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10517 cf_have_incdir=yes; break
10522 if test "$cf_have_incdir" = no ; then
10523 if test "$cf_add_incdir" = /usr/local/include ; then
10524 if test "$GCC" = yes
10526 cf_save_CPPFLAGS=$CPPFLAGS
10528 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10529 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10531 cat >"conftest.$ac_ext" <<_ACEOF
10532 #line 10532 "configure"
10533 #include "confdefs.h"
10543 rm -f "conftest.$ac_objext"
10544 if { (eval echo "$as_me:10544: \"$ac_compile\"") >&5
10545 (eval $ac_compile) 2>&5
10547 echo "$as_me:10547: \$? = $ac_status" >&5
10548 (exit "$ac_status"); } &&
10549 { ac_try='test -s "conftest.$ac_objext"'
10550 { (eval echo "$as_me:10550: \"$ac_try\"") >&5
10551 (eval $ac_try) 2>&5
10553 echo "$as_me:10553: \$? = $ac_status" >&5
10554 (exit "$ac_status"); }; }; then
10557 echo "$as_me: failed program was:" >&5
10558 cat "conftest.$ac_ext" >&5
10561 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10562 CPPFLAGS=$cf_save_CPPFLAGS
10567 if test "$cf_have_incdir" = no ; then
10568 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10570 echo "${as_me:-configure}:10570: testing adding $cf_add_incdir to include-path ..." 1>&5
10572 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10574 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10575 test "$cf_top_incdir" = "$cf_add_incdir" && break
10576 cf_add_incdir="$cf_top_incdir"
10592 cat >"conftest.$ac_ext" <<_ACEOF
10593 #line 10593 "configure"
10594 #include "confdefs.h"
10596 #include <$cf_header>
10601 #ifdef NCURSES_VERSION
10603 printf("%s\\n", NCURSES_VERSION);
10616 rm -f "conftest.$ac_objext"
10617 if { (eval echo "$as_me:10617: \"$ac_compile\"") >&5
10618 (eval $ac_compile) 2>&5
10620 echo "$as_me:10620: \$? = $ac_status" >&5
10621 (exit "$ac_status"); } &&
10622 { ac_try='test -s "conftest.$ac_objext"'
10623 { (eval echo "$as_me:10623: \"$ac_try\"") >&5
10624 (eval $ac_try) 2>&5
10626 echo "$as_me:10626: \$? = $ac_status" >&5
10627 (exit "$ac_status"); }; }; then
10628 cf_cv_ncurses_h2=$cf_header
10631 echo "$as_me: failed program was:" >&5
10632 cat "conftest.$ac_ext" >&5
10633 cf_cv_ncurses_h2=no
10635 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10637 if test "$cf_cv_ncurses_h2" != no ; then
10638 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10639 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
10642 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10644 CPPFLAGS="$cf_save2_CPPFLAGS"
10645 test "$cf_cv_ncurses_h2" != no && break
10647 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10647: error: not found" >&5
10648 echo "$as_me: error: not found" >&2;}
10649 { (exit 1); exit 1; }; }
10652 echo "$as_me:10652: result: $cf_cv_ncurses_h2" >&5
10653 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10655 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
10656 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
10657 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
10658 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
10661 if test -n "$cf_1st_incdir" ; then
10662 for cf_add_incdir in $cf_1st_incdir
10664 while test "$cf_add_incdir" != /usr/include
10666 if test -d "$cf_add_incdir"
10669 if test -n "$CFLAGS$CPPFLAGS" ; then
10670 # a loop is needed to ensure we can add subdirs of existing dirs
10671 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10672 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10673 cf_have_incdir=yes; break
10678 if test "$cf_have_incdir" = no ; then
10679 if test "$cf_add_incdir" = /usr/local/include ; then
10680 if test "$GCC" = yes
10682 cf_save_CPPFLAGS=$CPPFLAGS
10684 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10685 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10687 cat >"conftest.$ac_ext" <<_ACEOF
10688 #line 10688 "configure"
10689 #include "confdefs.h"
10699 rm -f "conftest.$ac_objext"
10700 if { (eval echo "$as_me:10700: \"$ac_compile\"") >&5
10701 (eval $ac_compile) 2>&5
10703 echo "$as_me:10703: \$? = $ac_status" >&5
10704 (exit "$ac_status"); } &&
10705 { ac_try='test -s "conftest.$ac_objext"'
10706 { (eval echo "$as_me:10706: \"$ac_try\"") >&5
10707 (eval $ac_try) 2>&5
10709 echo "$as_me:10709: \$? = $ac_status" >&5
10710 (exit "$ac_status"); }; }; then
10713 echo "$as_me: failed program was:" >&5
10714 cat "conftest.$ac_ext" >&5
10717 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10718 CPPFLAGS=$cf_save_CPPFLAGS
10723 if test "$cf_have_incdir" = no ; then
10724 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10726 echo "${as_me:-configure}:10726: testing adding $cf_add_incdir to include-path ..." 1>&5
10728 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10730 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10731 test "$cf_top_incdir" = "$cf_add_incdir" && break
10732 cf_add_incdir="$cf_top_incdir"
10745 # Set definitions to allow ifdef'ing for ncurses.h
10747 case "$cf_cv_ncurses_header" in
10750 cat >>confdefs.h <<\EOF
10751 #define HAVE_NCURSES_H 1
10757 case "$cf_cv_ncurses_header" in
10758 (ncurses/curses.h|ncurses/ncurses.h)
10760 cat >>confdefs.h <<\EOF
10761 #define HAVE_NCURSES_NCURSES_H 1
10765 (ncursesw/curses.h|ncursesw/ncurses.h)
10767 cat >>confdefs.h <<\EOF
10768 #define HAVE_NCURSESW_NCURSES_H 1
10774 echo "$as_me:10774: checking for terminfo header" >&5
10775 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10776 if test "${cf_cv_term_header+set}" = set; then
10777 echo $ECHO_N "(cached) $ECHO_C" >&6
10780 case "${cf_cv_ncurses_header}" in
10781 (*/ncurses.h|*/ncursesw.h)
10782 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10785 cf_term_header=term.h
10789 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10791 cat >"conftest.$ac_ext" <<_ACEOF
10792 #line 10792 "configure"
10793 #include "confdefs.h"
10795 #include <${cf_cv_ncurses_header:-curses.h}>
10796 #include <$cf_test>
10801 int x = auto_left_margin; (void)x
10806 rm -f "conftest.$ac_objext"
10807 if { (eval echo "$as_me:10807: \"$ac_compile\"") >&5
10808 (eval $ac_compile) 2>&5
10810 echo "$as_me:10810: \$? = $ac_status" >&5
10811 (exit "$ac_status"); } &&
10812 { ac_try='test -s "conftest.$ac_objext"'
10813 { (eval echo "$as_me:10813: \"$ac_try\"") >&5
10814 (eval $ac_try) 2>&5
10816 echo "$as_me:10816: \$? = $ac_status" >&5
10817 (exit "$ac_status"); }; }; then
10819 cf_cv_term_header="$cf_test"
10821 echo "$as_me: failed program was:" >&5
10822 cat "conftest.$ac_ext" >&5
10824 cf_cv_term_header=unknown
10827 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10828 test "$cf_cv_term_header" != unknown && break
10832 echo "$as_me:10832: result: $cf_cv_term_header" >&5
10833 echo "${ECHO_T}$cf_cv_term_header" >&6
10835 # Set definitions to allow ifdef'ing to accommodate subdirectories
10837 case "$cf_cv_term_header" in
10840 cat >>confdefs.h <<\EOF
10841 #define HAVE_TERM_H 1
10847 case "$cf_cv_term_header" in
10850 cat >>confdefs.h <<\EOF
10851 #define HAVE_NCURSES_TERM_H 1
10857 cat >>confdefs.h <<\EOF
10858 #define HAVE_NCURSESW_TERM_H 1
10864 # some applications need this, but should check for NCURSES_VERSION
10866 cat >>confdefs.h <<\EOF
10870 echo "$as_me:10870: checking for ncurses version" >&5
10871 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10872 if test "${cf_cv_ncurses_version+set}" = set; then
10873 echo $ECHO_N "(cached) $ECHO_C" >&6
10876 cf_cv_ncurses_version=no
10878 rm -f "$cf_tempfile"
10879 if test "$cross_compiling" = yes; then
10881 # This will not work if the preprocessor splits the line after the
10882 # Autoconf token. The 'unproto' program does that.
10883 cat > "conftest.$ac_ext" <<EOF
10884 #include <${cf_cv_ncurses_header:-curses.h}>
10886 #ifdef NCURSES_VERSION
10887 Autoconf NCURSES_VERSION
10895 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10896 { (eval echo "$as_me:10896: \"$cf_try\"") >&5
10897 (eval $cf_try) 2>&5
10899 echo "$as_me:10899: \$? = $ac_status" >&5
10900 (exit "$ac_status"); }
10901 if test -f conftest.out ; then
10902 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
10903 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10908 cat >"conftest.$ac_ext" <<_ACEOF
10909 #line 10909 "configure"
10910 #include "confdefs.h"
10912 #include <${cf_cv_ncurses_header:-curses.h}>
10916 FILE *fp = fopen("$cf_tempfile", "w");
10917 #ifdef NCURSES_VERSION
10918 # ifdef NCURSES_VERSION_PATCH
10919 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10921 fprintf(fp, "%s\\n", NCURSES_VERSION);
10924 # ifdef __NCURSES_H
10925 fprintf(fp, "old\\n");
10930 ${cf_cv_main_return:-return}(0);
10933 rm -f "conftest$ac_exeext"
10934 if { (eval echo "$as_me:10934: \"$ac_link\"") >&5
10935 (eval $ac_link) 2>&5
10937 echo "$as_me:10937: \$? = $ac_status" >&5
10938 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10939 { (eval echo "$as_me:10939: \"$ac_try\"") >&5
10940 (eval $ac_try) 2>&5
10942 echo "$as_me:10942: \$? = $ac_status" >&5
10943 (exit "$ac_status"); }; }; then
10945 cf_cv_ncurses_version=`cat $cf_tempfile`
10947 echo "$as_me: program exited with status $ac_status" >&5
10948 echo "$as_me: failed program was:" >&5
10949 cat "conftest.$ac_ext" >&5
10951 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10953 rm -f "$cf_tempfile"
10956 echo "$as_me:10956: result: $cf_cv_ncurses_version" >&5
10957 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10958 test "$cf_cv_ncurses_version" = no ||
10959 cat >>confdefs.h <<\EOF
10963 cf_nculib_root=ncurses
10964 # This works, except for the special case where we find gpm, but
10965 # ncurses is in a nonstandard location via $LIBS, and we really want
10968 cf_ncurses_SAVE="$LIBS"
10969 echo "$as_me:10969: checking for Gpm_Open in -lgpm" >&5
10970 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10971 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10972 echo $ECHO_N "(cached) $ECHO_C" >&6
10974 ac_check_lib_save_LIBS=$LIBS
10976 cat >"conftest.$ac_ext" <<_ACEOF
10977 #line 10977 "configure"
10978 #include "confdefs.h"
10980 /* Override any gcc2 internal prototype to avoid an error. */
10984 /* We use char because int might match the return type of a gcc2
10985 builtin and then its argument prototype would still apply. */
10995 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10996 if { (eval echo "$as_me:10996: \"$ac_link\"") >&5
10997 (eval $ac_link) 2>&5
10999 echo "$as_me:10999: \$? = $ac_status" >&5
11000 (exit "$ac_status"); } &&
11001 { ac_try='test -s "conftest$ac_exeext"'
11002 { (eval echo "$as_me:11002: \"$ac_try\"") >&5
11003 (eval $ac_try) 2>&5
11005 echo "$as_me:11005: \$? = $ac_status" >&5
11006 (exit "$ac_status"); }; }; then
11007 ac_cv_lib_gpm_Gpm_Open=yes
11009 echo "$as_me: failed program was:" >&5
11010 cat "conftest.$ac_ext" >&5
11011 ac_cv_lib_gpm_Gpm_Open=no
11013 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11014 LIBS=$ac_check_lib_save_LIBS
11016 echo "$as_me:11016: result: $ac_cv_lib_gpm_Gpm_Open" >&5
11017 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
11018 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
11019 echo "$as_me:11019: checking for initscr in -lgpm" >&5
11020 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
11021 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
11022 echo $ECHO_N "(cached) $ECHO_C" >&6
11024 ac_check_lib_save_LIBS=$LIBS
11026 cat >"conftest.$ac_ext" <<_ACEOF
11027 #line 11027 "configure"
11028 #include "confdefs.h"
11030 /* Override any gcc2 internal prototype to avoid an error. */
11034 /* We use char because int might match the return type of a gcc2
11035 builtin and then its argument prototype would still apply. */
11045 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11046 if { (eval echo "$as_me:11046: \"$ac_link\"") >&5
11047 (eval $ac_link) 2>&5
11049 echo "$as_me:11049: \$? = $ac_status" >&5
11050 (exit "$ac_status"); } &&
11051 { ac_try='test -s "conftest$ac_exeext"'
11052 { (eval echo "$as_me:11052: \"$ac_try\"") >&5
11053 (eval $ac_try) 2>&5
11055 echo "$as_me:11055: \$? = $ac_status" >&5
11056 (exit "$ac_status"); }; }; then
11057 ac_cv_lib_gpm_initscr=yes
11059 echo "$as_me: failed program was:" >&5
11060 cat "conftest.$ac_ext" >&5
11061 ac_cv_lib_gpm_initscr=no
11063 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11064 LIBS=$ac_check_lib_save_LIBS
11066 echo "$as_me:11066: result: $ac_cv_lib_gpm_initscr" >&5
11067 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
11068 if test "$ac_cv_lib_gpm_initscr" = yes; then
11069 LIBS="$cf_ncurses_SAVE"
11071 cf_ncurses_LIBS="-lgpm"
11078 # This is only necessary if you are linking against an obsolete
11079 # version of ncurses (but it should do no harm, since it is static).
11080 if test "$cf_nculib_root" = ncurses ; then
11081 echo "$as_me:11081: checking for tgoto in -lmytinfo" >&5
11082 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
11083 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
11084 echo $ECHO_N "(cached) $ECHO_C" >&6
11086 ac_check_lib_save_LIBS=$LIBS
11087 LIBS="-lmytinfo $LIBS"
11088 cat >"conftest.$ac_ext" <<_ACEOF
11089 #line 11089 "configure"
11090 #include "confdefs.h"
11092 /* Override any gcc2 internal prototype to avoid an error. */
11096 /* We use char because int might match the return type of a gcc2
11097 builtin and then its argument prototype would still apply. */
11107 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11108 if { (eval echo "$as_me:11108: \"$ac_link\"") >&5
11109 (eval $ac_link) 2>&5
11111 echo "$as_me:11111: \$? = $ac_status" >&5
11112 (exit "$ac_status"); } &&
11113 { ac_try='test -s "conftest$ac_exeext"'
11114 { (eval echo "$as_me:11114: \"$ac_try\"") >&5
11115 (eval $ac_try) 2>&5
11117 echo "$as_me:11117: \$? = $ac_status" >&5
11118 (exit "$ac_status"); }; }; then
11119 ac_cv_lib_mytinfo_tgoto=yes
11121 echo "$as_me: failed program was:" >&5
11122 cat "conftest.$ac_ext" >&5
11123 ac_cv_lib_mytinfo_tgoto=no
11125 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11126 LIBS=$ac_check_lib_save_LIBS
11128 echo "$as_me:11128: result: $ac_cv_lib_mytinfo_tgoto" >&5
11129 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11130 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
11131 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
11138 cf_add_libs="$LIBS"
11141 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11142 # filter duplicates
11143 for cf_add_1lib in $cf_add_0lib; do
11144 for cf_add_2lib in $cf_add_libs; do
11145 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11150 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11152 LIBS="$cf_add_libs"
11154 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
11157 cf_add_libs="$LIBS"
11160 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11161 # filter duplicates
11162 for cf_add_1lib in $cf_add_0lib; do
11163 for cf_add_2lib in $cf_add_libs; do
11164 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11169 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11171 LIBS="$cf_add_libs"
11175 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
11177 echo "$as_me:11177: checking for initscr" >&5
11178 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
11179 if test "${ac_cv_func_initscr+set}" = set; then
11180 echo $ECHO_N "(cached) $ECHO_C" >&6
11182 cat >"conftest.$ac_ext" <<_ACEOF
11183 #line 11183 "configure"
11184 #include "confdefs.h"
11185 #define initscr autoconf_temporary
11186 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11193 /* We use char because int might match the return type of a gcc2
11194 builtin and then its argument prototype would still apply. */
11195 char initscr (void);
11201 /* The GNU C library defines stubs for functions which it implements
11202 to always fail with ENOSYS. Some functions are actually named
11203 something starting with __ and the normal name is an alias. */
11204 #if defined (__stub_initscr) || defined (__stub___initscr)
11205 #error found stub for initscr
11213 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11214 if { (eval echo "$as_me:11214: \"$ac_link\"") >&5
11215 (eval $ac_link) 2>&5
11217 echo "$as_me:11217: \$? = $ac_status" >&5
11218 (exit "$ac_status"); } &&
11219 { ac_try='test -s "conftest$ac_exeext"'
11220 { (eval echo "$as_me:11220: \"$ac_try\"") >&5
11221 (eval $ac_try) 2>&5
11223 echo "$as_me:11223: \$? = $ac_status" >&5
11224 (exit "$ac_status"); }; }; then
11225 ac_cv_func_initscr=yes
11227 echo "$as_me: failed program was:" >&5
11228 cat "conftest.$ac_ext" >&5
11229 ac_cv_func_initscr=no
11231 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11233 echo "$as_me:11233: result: $ac_cv_func_initscr" >&5
11234 echo "${ECHO_T}$ac_cv_func_initscr" >&6
11235 if test "$ac_cv_func_initscr" = yes; then
11236 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11239 cf_save_LIBS="$LIBS"
11240 echo "$as_me:11240: checking for initscr in -l$cf_nculib_root" >&5
11241 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
11242 LIBS="-l$cf_nculib_root $LIBS"
11243 cat >"conftest.$ac_ext" <<_ACEOF
11244 #line 11244 "configure"
11245 #include "confdefs.h"
11246 #include <${cf_cv_ncurses_header:-curses.h}>
11255 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11256 if { (eval echo "$as_me:11256: \"$ac_link\"") >&5
11257 (eval $ac_link) 2>&5
11259 echo "$as_me:11259: \$? = $ac_status" >&5
11260 (exit "$ac_status"); } &&
11261 { ac_try='test -s "conftest$ac_exeext"'
11262 { (eval echo "$as_me:11262: \"$ac_try\"") >&5
11263 (eval $ac_try) 2>&5
11265 echo "$as_me:11265: \$? = $ac_status" >&5
11266 (exit "$ac_status"); }; }; then
11267 echo "$as_me:11267: result: yes" >&5
11268 echo "${ECHO_T}yes" >&6
11269 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11272 echo "$as_me: failed program was:" >&5
11273 cat "conftest.$ac_ext" >&5
11274 echo "$as_me:11274: result: no" >&5
11275 echo "${ECHO_T}no" >&6
11278 cf_library_path_list=""
11279 if test -n "${LDFLAGS}${LIBS}" ; then
11280 for cf_library_path in $LDFLAGS $LIBS
11282 case "$cf_library_path" in
11284 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11286 test "x$cf_library_path" != "xNONE" && \
11287 test -d "$cf_library_path" && \
11289 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11290 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
11291 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11292 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11293 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11294 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"
11297 cf_library_path_list="$cf_library_path_list $cf_search"
11305 test "x$prefix" != "xNONE" && \
11306 test -d "$prefix" && \
11308 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11309 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
11310 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11311 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11312 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11313 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11316 for cf_subdir_prefix in \
11325 test "x$cf_subdir_prefix" != "x$prefix" && \
11326 test -d "$cf_subdir_prefix" && \
11327 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11328 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11329 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
11330 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11331 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11332 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11333 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"
11338 cf_search="$cf_library_path_list $cf_search"
11340 for cf_libdir in $cf_search
11342 echo "$as_me:11342: checking for -l$cf_nculib_root in $cf_libdir" >&5
11343 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11344 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11345 cat >"conftest.$ac_ext" <<_ACEOF
11346 #line 11346 "configure"
11347 #include "confdefs.h"
11348 #include <${cf_cv_ncurses_header:-curses.h}>
11357 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11358 if { (eval echo "$as_me:11358: \"$ac_link\"") >&5
11359 (eval $ac_link) 2>&5
11361 echo "$as_me:11361: \$? = $ac_status" >&5
11362 (exit "$ac_status"); } &&
11363 { ac_try='test -s "conftest$ac_exeext"'
11364 { (eval echo "$as_me:11364: \"$ac_try\"") >&5
11365 (eval $ac_try) 2>&5
11367 echo "$as_me:11367: \$? = $ac_status" >&5
11368 (exit "$ac_status"); }; }; then
11369 echo "$as_me:11369: result: yes" >&5
11370 echo "${ECHO_T}yes" >&6
11371 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11374 echo "$as_me: failed program was:" >&5
11375 cat "conftest.$ac_ext" >&5
11376 echo "$as_me:11376: result: no" >&5
11377 echo "${ECHO_T}no" >&6
11378 LIBS="$cf_save_LIBS"
11380 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11384 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11388 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
11390 if test "$cf_found_library" = no ; then
11391 { { echo "$as_me:11391: error: Cannot link $cf_nculib_root library" >&5
11392 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11393 { (exit 1); exit 1; }; }
11398 if test -n "$cf_ncurses_LIBS" ; then
11399 echo "$as_me:11399: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11400 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11401 cf_ncurses_SAVE="$LIBS"
11402 for p in $cf_ncurses_LIBS ; do
11403 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
11404 if test "$q" != "$LIBS" ; then
11408 cat >"conftest.$ac_ext" <<_ACEOF
11409 #line 11409 "configure"
11410 #include "confdefs.h"
11411 #include <${cf_cv_ncurses_header:-curses.h}>
11415 initscr(); mousemask(0,0); tigetstr((char *)0);
11420 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11421 if { (eval echo "$as_me:11421: \"$ac_link\"") >&5
11422 (eval $ac_link) 2>&5
11424 echo "$as_me:11424: \$? = $ac_status" >&5
11425 (exit "$ac_status"); } &&
11426 { ac_try='test -s "conftest$ac_exeext"'
11427 { (eval echo "$as_me:11427: \"$ac_try\"") >&5
11428 (eval $ac_try) 2>&5
11430 echo "$as_me:11430: \$? = $ac_status" >&5
11431 (exit "$ac_status"); }; }; then
11432 echo "$as_me:11432: result: yes" >&5
11433 echo "${ECHO_T}yes" >&6
11435 echo "$as_me: failed program was:" >&5
11436 cat "conftest.$ac_ext" >&5
11437 echo "$as_me:11437: result: no" >&5
11438 echo "${ECHO_T}no" >&6
11439 LIBS="$cf_ncurses_SAVE"
11441 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11444 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11446 cat >>confdefs.h <<EOF
11447 #define $cf_nculib_ROOT 1
11452 NCURSES_CONFIG=none
11457 if test "$NCURSES_CONFIG_PKG" != none ; then
11458 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
11460 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11461 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11462 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11464 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
11465 if test -z "$cf_cv_abi_version"
11467 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
11470 elif test "$NCURSES_CONFIG" != none ; then
11472 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
11474 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11475 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11476 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11478 # ABI version is not available from headers
11479 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
11483 for cf_name in MAJOR MINOR PATCH
11485 cat >conftest.$ac_ext <<CF_EOF
11486 #include <${cf_cv_ncurses_header:-curses.h}>
11487 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
11489 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
11490 { (eval echo "$as_me:11490: \"$cf_try\"") >&5
11491 (eval $cf_try) 2>&5
11493 echo "$as_me:11493: \$? = $ac_status" >&5
11494 (exit "$ac_status"); }
11495 if test -f conftest.out ; then
11496 cf_result=`sed -e "s/^.*AUTOCONF_${cf_name}[ ][ ]*//" conftest.out`
11497 eval NCURSES_$cf_name=\"$cf_result\"
11498 # cat conftest.$ac_ext
11503 cf_cv_abi_version=${NCURSES_MAJOR}
11507 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
11509 cf_cv_timestamp=`date`
11511 echo "$as_me:11511: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
11512 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
11514 echo "$as_me:11514: checking if you want to have a library-prefix" >&5
11515 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
11517 # Check whether --with-lib-prefix or --without-lib-prefix was given.
11518 if test "${with_lib_prefix+set}" = set; then
11519 withval="$with_lib_prefix"
11520 with_lib_prefix=$withval
11522 with_lib_prefix=auto
11524 echo "$as_me:11524: result: $with_lib_prefix" >&5
11525 echo "${ECHO_T}$with_lib_prefix" >&6
11527 if test "$with_lib_prefix" = auto
11530 case "$cf_cv_system_name" in
11532 if test "$DFT_LWR_MODEL" = libtool; then
11541 (*) LIB_PREFIX='lib'
11544 cf_prefix=$LIB_PREFIX
11546 elif test "$with_lib_prefix" = no
11550 LIB_PREFIX=$with_lib_prefix
11555 ###############################################################################
11557 if test X"$CC_G_OPT" = X"" ; then
11559 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
11562 echo "$as_me:11562: checking for default loader flags" >&5
11563 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
11564 case $DFT_LWR_MODEL in
11565 (normal) LD_MODEL='' ;;
11566 (debug) LD_MODEL=$CC_G_OPT ;;
11567 (profile) LD_MODEL='-pg';;
11568 (shared) LD_MODEL='' ;;
11570 echo "$as_me:11570: result: $LD_MODEL" >&5
11571 echo "${ECHO_T}$LD_MODEL" >&6
11574 if test "x$cf_cv_enable_rpath" != xno
11576 echo "$as_me:11576: checking for an rpath option" >&5
11577 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
11578 case "$cf_cv_system_name" in
11580 if test "$GCC" = yes; then
11581 LD_RPATH_OPT="-Wl,-rpath,"
11583 LD_RPATH_OPT="-rpath "
11586 (linux*|gnu*|k*bsd*-gnu|freebsd*)
11587 LD_RPATH_OPT="-Wl,-rpath,"
11589 (openbsd[2-9].*|mirbsd*)
11590 LD_RPATH_OPT="-Wl,-rpath,"
11593 LD_RPATH_OPT="-rpath "
11596 LD_RPATH_OPT="-Wl,-rpath,"
11599 LD_RPATH_OPT="-rpath "
11607 echo "$as_me:11607: result: $LD_RPATH_OPT" >&5
11608 echo "${ECHO_T}$LD_RPATH_OPT" >&6
11610 case "x$LD_RPATH_OPT" in
11612 echo "$as_me:11612: checking if we need a space after rpath option" >&5
11613 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
11614 cf_save_LIBS="$LIBS"
11616 cf_add_libs="$LIBS"
11619 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11620 # filter duplicates
11621 for cf_add_1lib in $cf_add_0lib; do
11622 for cf_add_2lib in $cf_add_libs; do
11623 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11628 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11630 LIBS="$cf_add_libs"
11632 cat >"conftest.$ac_ext" <<_ACEOF
11633 #line 11633 "configure"
11634 #include "confdefs.h"
11644 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11645 if { (eval echo "$as_me:11645: \"$ac_link\"") >&5
11646 (eval $ac_link) 2>&5
11648 echo "$as_me:11648: \$? = $ac_status" >&5
11649 (exit "$ac_status"); } &&
11650 { ac_try='test -s "conftest$ac_exeext"'
11651 { (eval echo "$as_me:11651: \"$ac_try\"") >&5
11652 (eval $ac_try) 2>&5
11654 echo "$as_me:11654: \$? = $ac_status" >&5
11655 (exit "$ac_status"); }; }; then
11658 echo "$as_me: failed program was:" >&5
11659 cat "conftest.$ac_ext" >&5
11662 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11663 LIBS="$cf_save_LIBS"
11664 echo "$as_me:11664: result: $cf_rpath_space" >&5
11665 echo "${ECHO_T}$cf_rpath_space" >&6
11666 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
11675 INSTALL_LIB="-m 644"
11676 : ${rel_builddir:=.}
11682 cf_cv_do_symlinks=no
11684 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
11686 echo "$as_me:11686: checking if release/abi version should be used for shared libs" >&5
11687 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
11689 # Check whether --with-shlib-version or --without-shlib-version was given.
11690 if test "${with_shlib_version+set}" = set; then
11691 withval="$with_shlib_version"
11692 test -z "$withval" && withval=auto
11695 cf_cv_shlib_version=auto
11698 cf_cv_shlib_version=$withval
11701 echo "$as_me:11701: result: $withval" >&5
11702 echo "${ECHO_T}$withval" >&6
11703 { { echo "$as_me:11703: error: option value must be one of: rel, abi, or auto" >&5
11704 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
11705 { (exit 1); exit 1; }; }
11710 cf_cv_shlib_version=auto
11712 echo "$as_me:11712: result: $cf_cv_shlib_version" >&5
11713 echo "${ECHO_T}$cf_cv_shlib_version" >&6
11715 cf_cv_rm_so_locs=no
11718 # Some less-capable ports of gcc support only -fpic
11722 if test "$GCC" = yes
11726 case "$cf_cv_system_name" in
11727 (*linux*) # e.g., PGI compiler
11733 if test "$cf_try_fPIC" = yes
11735 echo "$as_me:11735: checking which $CC option to use" >&5
11736 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
11737 cf_save_CFLAGS="$CFLAGS"
11738 for CC_SHARED_OPTS in -fPIC -fpic ''
11740 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
11741 cat >"conftest.$ac_ext" <<_ACEOF
11742 #line 11742 "configure"
11743 #include "confdefs.h"
11753 rm -f "conftest.$ac_objext"
11754 if { (eval echo "$as_me:11754: \"$ac_compile\"") >&5
11755 (eval $ac_compile) 2>&5
11757 echo "$as_me:11757: \$? = $ac_status" >&5
11758 (exit "$ac_status"); } &&
11759 { ac_try='test -s "conftest.$ac_objext"'
11760 { (eval echo "$as_me:11760: \"$ac_try\"") >&5
11761 (eval $ac_try) 2>&5
11763 echo "$as_me:11763: \$? = $ac_status" >&5
11764 (exit "$ac_status"); }; }; then
11767 echo "$as_me: failed program was:" >&5
11768 cat "conftest.$ac_ext" >&5
11770 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11772 echo "$as_me:11772: result: $CC_SHARED_OPTS" >&5
11773 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
11774 CFLAGS="$cf_save_CFLAGS"
11777 cf_cv_shlib_version_infix=no
11779 case "$cf_cv_system_name" in
11780 (aix4.3-9*|aix[5-7]*)
11781 if test "$GCC" = yes; then
11782 CC_SHARED_OPTS='-Wl,-brtl'
11783 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11785 CC_SHARED_OPTS='-brtl'
11786 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
11787 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11791 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
11795 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11796 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11797 cf_cv_shlib_version=cygdll
11798 cf_cv_shlib_version_infix=cygdll
11801 cat >mk_shared_lib.sh <<-CF_EOF
11804 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11807 Linking shared library
11808 ** SHARED_LIB \$SHARED_LIB
11809 ** IMPORT_LIB \$IMPORT_LIB
11811 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11813 chmod +x mk_shared_lib.sh
11817 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11818 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11819 cf_cv_shlib_version=msysdll
11820 cf_cv_shlib_version_infix=msysdll
11823 cat >mk_shared_lib.sh <<-CF_EOF
11826 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11829 Linking shared library
11830 ** SHARED_LIB \$SHARED_LIB
11831 ** IMPORT_LIB \$IMPORT_LIB
11833 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11835 chmod +x mk_shared_lib.sh
11838 cf_try_cflags="no-cpp-precomp"
11839 CC_SHARED_OPTS="-dynamic"
11840 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
11841 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
11842 cf_cv_shlib_version_infix=yes
11843 echo "$as_me:11843: checking if ld -search_paths_first works" >&5
11844 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
11845 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
11846 echo $ECHO_N "(cached) $ECHO_C" >&6
11849 cf_save_LDFLAGS=$LDFLAGS
11850 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11851 cat >"conftest.$ac_ext" <<_ACEOF
11852 #line 11852 "configure"
11853 #include "confdefs.h"
11863 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11864 if { (eval echo "$as_me:11864: \"$ac_link\"") >&5
11865 (eval $ac_link) 2>&5
11867 echo "$as_me:11867: \$? = $ac_status" >&5
11868 (exit "$ac_status"); } &&
11869 { ac_try='test -s "conftest$ac_exeext"'
11870 { (eval echo "$as_me:11870: \"$ac_try\"") >&5
11871 (eval $ac_try) 2>&5
11873 echo "$as_me:11873: \$? = $ac_status" >&5
11874 (exit "$ac_status"); }; }; then
11875 cf_cv_ldflags_search_paths_first=yes
11877 echo "$as_me: failed program was:" >&5
11878 cat "conftest.$ac_ext" >&5
11879 cf_cv_ldflags_search_paths_first=no
11881 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11882 LDFLAGS=$cf_save_LDFLAGS
11884 echo "$as_me:11884: result: $cf_cv_ldflags_search_paths_first" >&5
11885 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
11886 if test "$cf_cv_ldflags_search_paths_first" = yes; then
11887 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11892 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11893 if test "$cf_cv_shlib_version" = rel; then
11894 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11896 cf_cv_shared_soname='`basename $@`'
11899 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11902 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
11903 if test "$GCC" != yes; then
11904 CC_SHARED_OPTS='+Z'
11906 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
11907 INSTALL_LIB="-m 555"
11910 # (tested with gcc 2.7.2 -- I don't have c89)
11911 if test "$GCC" = yes; then
11912 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
11914 CC_SHARED_OPTS='+Z'
11915 LD_SHARED_OPTS='-Wl,+b,${libdir}'
11917 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
11918 # HP-UX shared libraries must be executable, and should be
11919 # readonly to exploit a quirk in the memory manager.
11920 INSTALL_LIB="-m 555"
11923 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11924 if test "$cf_cv_shlib_version" = rel; then
11925 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11927 cf_shared_soname='`basename $@`'
11930 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
11933 if test "$cf_cv_enable_rpath" = yes ; then
11934 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11936 # tested with IRIX 5.2 and 'cc'.
11937 if test "$GCC" != yes; then
11938 CC_SHARED_OPTS='-KPIC'
11939 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
11941 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
11943 cf_cv_rm_so_locs=yes
11945 (linux*|gnu*|k*bsd*-gnu)
11946 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11947 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11948 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11950 if test "$cf_cv_enable_rpath" = yes ; then
11951 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11954 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11955 if test "$cf_cv_shlib_version" = rel; then
11956 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11958 cf_cv_shared_soname='`basename $@`'
11961 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11964 cf_cv_shlib_version=msvcdll
11965 cf_cv_shlib_version_infix=msvcdll
11968 if test "$DFT_LWR_MODEL" = "shared" ; then
11969 LOCAL_LDFLAGS="-link -dll"
11970 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11971 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
11974 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
11975 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
11976 cat >mk_shared_lib.sh <<-CF_EOF
11979 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
11984 Linking shared library
11985 ** SHARED LIB \$SHARED_LIB
11986 ** IMPORT_LIB \$IMPORT_LIB
11988 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
11989 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
11990 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
11992 chmod +x mk_shared_lib.sh
11993 cat >mk_prog.sh <<-CF_EOF
11996 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
11999 ldopts=("/subsystem:console")
12002 while test \$# -gt 0; do
12005 # ignore -link argument
12008 # ignore runtime-library option
12023 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
12026 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
12032 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
12033 ldopts+=("\${linkarg}")
12041 ldopts+=("-out:\$1")
12050 if [ "\$isdll" -ne 0 ]; then
12051 for lib in \${libs[*]}; do
12052 ldopts+=("\$lib.dll.lib")
12055 for lib in \${libs[*]}; do
12056 ldopts+=("\$lib.lib")
12061 ** ld options: "\${ldopts[@]}"
12063 exec \$LD \${ldopts[@]}
12065 chmod +x mk_prog.sh
12066 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
12067 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
12070 cf_cv_shlib_version=mingw
12071 cf_cv_shlib_version_infix=mingw
12074 if test "$DFT_LWR_MODEL" = "shared" ; then
12075 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
12076 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12077 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
12080 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
12081 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
12082 cat >mk_shared_lib.sh <<-CF_EOF
12085 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
12088 Linking shared library
12089 ** SHARED_LIB \$SHARED_LIB
12090 ** IMPORT_LIB \$IMPORT_LIB
12092 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
12094 chmod +x mk_shared_lib.sh
12096 (openbsd[2-9].*|mirbsd*)
12097 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12098 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12099 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12101 if test "$cf_cv_enable_rpath" = yes ; then
12102 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12104 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12106 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12107 if test "$cf_cv_shlib_version" = rel; then
12108 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12110 cf_cv_shared_soname='`basename $@`'
12113 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12117 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
12121 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
12123 (nto-qnx*|openbsd*|freebsd[12].*)
12124 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12125 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
12126 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12128 (dragonfly*|freebsd*)
12129 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12130 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12131 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12132 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
12133 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12136 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12137 if test "$cf_cv_shlib_version" = rel; then
12138 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12140 cf_cv_shared_soname='`basename $@`'
12143 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12146 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12147 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12148 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12149 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12150 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12151 if test "$cf_cv_shlib_version" = auto; then
12152 if test -f /usr/libexec/ld.elf_so; then
12153 cf_cv_shlib_version=abi
12155 cf_cv_shlib_version=rel
12159 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12160 if test "$cf_cv_shlib_version" = rel; then
12161 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12163 cf_cv_shared_soname='`basename $@`'
12166 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
12168 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
12172 # tested with OSF/1 V3.2 and 'cc'
12173 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
12174 # link with shared libs).
12175 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
12178 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
12181 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
12182 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12183 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12184 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12186 cf_cv_rm_so_locs=yes
12188 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
12189 # tested with osr5.0.5
12190 if test "$GCC" != yes; then
12191 CC_SHARED_OPTS='-belf -KPIC'
12193 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
12194 if test "$cf_cv_enable_rpath" = yes ; then
12195 # only way is to set LD_RUN_PATH but no switch for it
12198 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12199 LINK_PROGS='LD_RUN_PATH=${libdir}'
12200 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
12203 # tested with SunOS 4.1.1 and gcc 2.7.0
12204 if test "$GCC" != yes; then
12205 CC_SHARED_OPTS='-KPIC'
12207 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
12208 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12211 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
12212 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
12213 if test "$DFT_LWR_MODEL" = "shared" ; then
12214 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
12215 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12217 if test "$cf_cv_enable_rpath" = yes ; then
12218 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
12221 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12222 if test "$cf_cv_shlib_version" = rel; then
12223 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12225 cf_cv_shared_soname='`basename $@`'
12228 if test "$GCC" != yes; then
12229 cf_save_CFLAGS="$CFLAGS"
12230 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
12232 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
12233 cat >"conftest.$ac_ext" <<_ACEOF
12234 #line 12234 "configure"
12235 #include "confdefs.h"
12240 printf("Hello\\n");
12245 rm -f "conftest.$ac_objext"
12246 if { (eval echo "$as_me:12246: \"$ac_compile\"") >&5
12247 (eval $ac_compile) 2>&5
12249 echo "$as_me:12249: \$? = $ac_status" >&5
12250 (exit "$ac_status"); } &&
12251 { ac_try='test -s "conftest.$ac_objext"'
12252 { (eval echo "$as_me:12252: \"$ac_try\"") >&5
12253 (eval $ac_try) 2>&5
12255 echo "$as_me:12255: \$? = $ac_status" >&5
12256 (exit "$ac_status"); }; }; then
12259 echo "$as_me: failed program was:" >&5
12260 cat "conftest.$ac_ext" >&5
12262 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12264 CFLAGS="$cf_save_CFLAGS"
12265 CC_SHARED_OPTS=$cf_shared_opts
12266 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
12268 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
12271 (sysv5uw7*|unix_sv*)
12272 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
12273 if test "$GCC" != yes; then
12274 CC_SHARED_OPTS='-KPIC'
12276 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
12279 CC_SHARED_OPTS='unknown'
12280 MK_SHARED_LIB='echo unknown'
12284 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
12285 case "$cf_cv_shlib_version" in
12287 case "$MK_SHARED_LIB" in
12289 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
12292 { echo "$as_me:12292: WARNING: ignored --with-shlib-version" >&5
12293 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
12299 if test -n "$cf_try_cflags"
12301 cat > conftest.$ac_ext <<EOF
12302 #line 12302 "${as_me:-configure}"
12304 int main(int argc, char *argv[])
12306 printf("hello\\n");
12307 return (argv[argc-1] == 0) ;
12310 cf_save_CFLAGS="$CFLAGS"
12311 for cf_opt in $cf_try_cflags
12313 CFLAGS="$cf_save_CFLAGS -$cf_opt"
12314 echo "$as_me:12314: checking if CFLAGS option -$cf_opt works" >&5
12315 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
12316 if { (eval echo "$as_me:12316: \"$ac_compile\"") >&5
12317 (eval $ac_compile) 2>&5
12319 echo "$as_me:12319: \$? = $ac_status" >&5
12320 (exit "$ac_status"); }; then
12321 echo "$as_me:12321: result: yes" >&5
12322 echo "${ECHO_T}yes" >&6
12323 cf_save_CFLAGS="$CFLAGS"
12325 echo "$as_me:12325: result: no" >&5
12326 echo "${ECHO_T}no" >&6
12329 CFLAGS="$cf_save_CFLAGS"
12332 # RPATH_LIST is a colon-separated list of directories
12333 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
12334 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
12336 test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
12338 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
12340 echo "${as_me:-configure}:12340: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
12342 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
12344 echo "${as_me:-configure}:12344: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
12346 # The test/sample programs in the original tree link using rpath option.
12347 # Make it optional for packagers.
12348 if test -n "$LOCAL_LDFLAGS"
12350 echo "$as_me:12350: checking if you want to link sample programs with rpath option" >&5
12351 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
12353 # Check whether --enable-rpath-link or --disable-rpath-link was given.
12354 if test "${enable_rpath_link+set}" = set; then
12355 enableval="$enable_rpath_link"
12356 with_rpath_link=$enableval
12358 with_rpath_link=yes
12360 echo "$as_me:12360: result: $with_rpath_link" >&5
12361 echo "${ECHO_T}$with_rpath_link" >&6
12362 if test "$with_rpath_link" = no
12369 ###############################################################################
12371 ### use option --enable-broken-linker to force on use of broken-linker support
12373 echo "$as_me:12373: checking if you want broken-linker support code" >&5
12374 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
12376 # Check whether --enable-broken_linker or --disable-broken_linker was given.
12377 if test "${enable_broken_linker+set}" = set; then
12378 enableval="$enable_broken_linker"
12379 with_broken_linker=$enableval
12381 with_broken_linker=no
12383 echo "$as_me:12383: result: $with_broken_linker" >&5
12384 echo "${ECHO_T}$with_broken_linker" >&6
12386 : "${BROKEN_LINKER:=0}"
12387 if test "x$with_broken_linker" = xyes ; then
12389 cat >>confdefs.h <<\EOF
12390 #define BROKEN_LINKER 1
12396 # Check to define _XOPEN_SOURCE "automatically"
12398 echo "$as_me:12398: checking if the POSIX test-macros are already defined" >&5
12399 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
12400 if test "${cf_cv_posix_visible+set}" = set; then
12401 echo $ECHO_N "(cached) $ECHO_C" >&6
12404 cat >"conftest.$ac_ext" <<_ACEOF
12405 #line 12405 "configure"
12406 #include "confdefs.h"
12412 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
12413 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
12414 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
12415 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
12416 #error conflicting symbols found
12423 rm -f "conftest.$ac_objext"
12424 if { (eval echo "$as_me:12424: \"$ac_compile\"") >&5
12425 (eval $ac_compile) 2>&5
12427 echo "$as_me:12427: \$? = $ac_status" >&5
12428 (exit "$ac_status"); } &&
12429 { ac_try='test -s "conftest.$ac_objext"'
12430 { (eval echo "$as_me:12430: \"$ac_try\"") >&5
12431 (eval $ac_try) 2>&5
12433 echo "$as_me:12433: \$? = $ac_status" >&5
12434 (exit "$ac_status"); }; }; then
12435 cf_cv_posix_visible=no
12437 echo "$as_me: failed program was:" >&5
12438 cat "conftest.$ac_ext" >&5
12439 cf_cv_posix_visible=yes
12441 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12444 echo "$as_me:12444: result: $cf_cv_posix_visible" >&5
12445 echo "${ECHO_T}$cf_cv_posix_visible" >&6
12447 if test "$cf_cv_posix_visible" = no; then
12449 cf_XOPEN_SOURCE=600
12450 cf_POSIX_C_SOURCE=199506L
12455 cf_xopen_source="-D_ALL_SOURCE"
12458 cf_XOPEN_SOURCE=600
12461 cf_xopen_source="-D_APPLE_C_SOURCE"
12464 cf_xopen_source="-D_DARWIN_C_SOURCE"
12467 (freebsd*|dragonfly*|midnightbsd*)
12468 # 5.x headers associate
12469 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
12470 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
12471 cf_POSIX_C_SOURCE=200112L
12472 cf_XOPEN_SOURCE=600
12473 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12476 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
12479 cf_xopen_source="-D_HPUX_SOURCE"
12482 cf_xopen_source="-D_SGI_SOURCE"
12485 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
12487 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
12489 echo "$as_me:12489: checking if this is the GNU C library" >&5
12490 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
12491 if test "${cf_cv_gnu_library+set}" = set; then
12492 echo $ECHO_N "(cached) $ECHO_C" >&6
12495 cat >"conftest.$ac_ext" <<_ACEOF
12496 #line 12496 "configure"
12497 #include "confdefs.h"
12498 #include <sys/types.h>
12503 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
12505 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
12508 # error not GNU C library
12514 rm -f "conftest.$ac_objext"
12515 if { (eval echo "$as_me:12515: \"$ac_compile\"") >&5
12516 (eval $ac_compile) 2>&5
12518 echo "$as_me:12518: \$? = $ac_status" >&5
12519 (exit "$ac_status"); } &&
12520 { ac_try='test -s "conftest.$ac_objext"'
12521 { (eval echo "$as_me:12521: \"$ac_try\"") >&5
12522 (eval $ac_try) 2>&5
12524 echo "$as_me:12524: \$? = $ac_status" >&5
12525 (exit "$ac_status"); }; }; then
12526 cf_cv_gnu_library=yes
12528 echo "$as_me: failed program was:" >&5
12529 cat "conftest.$ac_ext" >&5
12530 cf_cv_gnu_library=no
12532 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12535 echo "$as_me:12535: result: $cf_cv_gnu_library" >&5
12536 echo "${ECHO_T}$cf_cv_gnu_library" >&6
12538 if test x$cf_cv_gnu_library = xyes; then
12540 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
12541 # was changed to help a little. newlib incorporated the change about 4
12543 echo "$as_me:12543: checking if _DEFAULT_SOURCE can be used as a basis" >&5
12544 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
12545 if test "${cf_cv_gnu_library_219+set}" = set; then
12546 echo $ECHO_N "(cached) $ECHO_C" >&6
12549 cf_save="$CPPFLAGS"
12551 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12552 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12554 cat >"conftest.$ac_ext" <<_ACEOF
12555 #line 12555 "configure"
12556 #include "confdefs.h"
12557 #include <sys/types.h>
12562 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
12564 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
12567 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
12573 rm -f "conftest.$ac_objext"
12574 if { (eval echo "$as_me:12574: \"$ac_compile\"") >&5
12575 (eval $ac_compile) 2>&5
12577 echo "$as_me:12577: \$? = $ac_status" >&5
12578 (exit "$ac_status"); } &&
12579 { ac_try='test -s "conftest.$ac_objext"'
12580 { (eval echo "$as_me:12580: \"$ac_try\"") >&5
12581 (eval $ac_try) 2>&5
12583 echo "$as_me:12583: \$? = $ac_status" >&5
12584 (exit "$ac_status"); }; }; then
12585 cf_cv_gnu_library_219=yes
12587 echo "$as_me: failed program was:" >&5
12588 cat "conftest.$ac_ext" >&5
12589 cf_cv_gnu_library_219=no
12591 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12592 CPPFLAGS="$cf_save"
12595 echo "$as_me:12595: result: $cf_cv_gnu_library_219" >&5
12596 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
12598 if test "x$cf_cv_gnu_library_219" = xyes; then
12599 cf_save="$CPPFLAGS"
12600 echo "$as_me:12600: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
12601 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
12602 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
12603 echo $ECHO_N "(cached) $ECHO_C" >&6
12609 cf_new_extra_cppflags=
12611 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
12613 case "$cf_fix_cppflags" in
12615 case "$cf_add_cflags" in
12616 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12617 case "$cf_add_cflags" in
12619 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12621 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12622 && test -z "${cf_tst_cflags}" \
12623 && cf_fix_cppflags=yes
12625 if test "$cf_fix_cppflags" = yes ; then
12627 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12628 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12631 elif test "${cf_tst_cflags}" = "\"'" ; then
12633 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12634 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12640 case "$CPPFLAGS" in
12644 case "$cf_add_cflags" in
12646 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12648 CPPFLAGS=`echo "$CPPFLAGS" | \
12649 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12650 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12655 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12656 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12663 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12664 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12671 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12672 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12674 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12676 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12677 && test -z "${cf_tst_cflags}" \
12678 && cf_fix_cppflags=no
12683 if test -n "$cf_new_cflags" ; then
12685 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12686 CFLAGS="${CFLAGS}$cf_new_cflags"
12690 if test -n "$cf_new_cppflags" ; then
12692 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12693 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12697 if test -n "$cf_new_extra_cppflags" ; then
12699 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12700 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12704 cat >"conftest.$ac_ext" <<_ACEOF
12705 #line 12705 "configure"
12706 #include "confdefs.h"
12708 #include <limits.h>
12709 #include <sys/types.h>
12715 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
12718 # error GNU C library is too old
12724 rm -f "conftest.$ac_objext"
12725 if { (eval echo "$as_me:12725: \"$ac_compile\"") >&5
12726 (eval $ac_compile) 2>&5
12728 echo "$as_me:12728: \$? = $ac_status" >&5
12729 (exit "$ac_status"); } &&
12730 { ac_try='test -s "conftest.$ac_objext"'
12731 { (eval echo "$as_me:12731: \"$ac_try\"") >&5
12732 (eval $ac_try) 2>&5
12734 echo "$as_me:12734: \$? = $ac_status" >&5
12735 (exit "$ac_status"); }; }; then
12736 cf_cv_gnu_dftsrc_219=yes
12738 echo "$as_me: failed program was:" >&5
12739 cat "conftest.$ac_ext" >&5
12740 cf_cv_gnu_dftsrc_219=no
12742 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12745 echo "$as_me:12745: result: $cf_cv_gnu_dftsrc_219" >&5
12746 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
12747 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
12749 cf_cv_gnu_dftsrc_219=maybe
12752 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
12754 echo "$as_me:12754: checking if we must define _GNU_SOURCE" >&5
12755 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
12756 if test "${cf_cv_gnu_source+set}" = set; then
12757 echo $ECHO_N "(cached) $ECHO_C" >&6
12760 cat >"conftest.$ac_ext" <<_ACEOF
12761 #line 12761 "configure"
12762 #include "confdefs.h"
12763 #include <sys/types.h>
12768 #ifndef _XOPEN_SOURCE
12769 #error expected _XOPEN_SOURCE to be defined
12775 rm -f "conftest.$ac_objext"
12776 if { (eval echo "$as_me:12776: \"$ac_compile\"") >&5
12777 (eval $ac_compile) 2>&5
12779 echo "$as_me:12779: \$? = $ac_status" >&5
12780 (exit "$ac_status"); } &&
12781 { ac_try='test -s "conftest.$ac_objext"'
12782 { (eval echo "$as_me:12782: \"$ac_try\"") >&5
12783 (eval $ac_try) 2>&5
12785 echo "$as_me:12785: \$? = $ac_status" >&5
12786 (exit "$ac_status"); }; }; then
12787 cf_cv_gnu_source=no
12789 echo "$as_me: failed program was:" >&5
12790 cat "conftest.$ac_ext" >&5
12791 cf_save="$CPPFLAGS"
12796 cf_new_extra_cppflags=
12798 for cf_add_cflags in -D_GNU_SOURCE
12800 case "$cf_fix_cppflags" in
12802 case "$cf_add_cflags" in
12803 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12804 case "$cf_add_cflags" in
12806 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12808 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12809 && test -z "${cf_tst_cflags}" \
12810 && cf_fix_cppflags=yes
12812 if test "$cf_fix_cppflags" = yes ; then
12814 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12815 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12818 elif test "${cf_tst_cflags}" = "\"'" ; then
12820 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12821 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12827 case "$CPPFLAGS" in
12831 case "$cf_add_cflags" in
12833 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12835 CPPFLAGS=`echo "$CPPFLAGS" | \
12836 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12837 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12842 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12843 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12850 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12851 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12858 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12859 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12861 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12863 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12864 && test -z "${cf_tst_cflags}" \
12865 && cf_fix_cppflags=no
12870 if test -n "$cf_new_cflags" ; then
12872 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12873 CFLAGS="${CFLAGS}$cf_new_cflags"
12877 if test -n "$cf_new_cppflags" ; then
12879 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12880 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12884 if test -n "$cf_new_extra_cppflags" ; then
12886 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12887 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12891 cat >"conftest.$ac_ext" <<_ACEOF
12892 #line 12892 "configure"
12893 #include "confdefs.h"
12894 #include <sys/types.h>
12899 #ifdef _XOPEN_SOURCE
12900 #error expected _XOPEN_SOURCE to be undefined
12906 rm -f "conftest.$ac_objext"
12907 if { (eval echo "$as_me:12907: \"$ac_compile\"") >&5
12908 (eval $ac_compile) 2>&5
12910 echo "$as_me:12910: \$? = $ac_status" >&5
12911 (exit "$ac_status"); } &&
12912 { ac_try='test -s "conftest.$ac_objext"'
12913 { (eval echo "$as_me:12913: \"$ac_try\"") >&5
12914 (eval $ac_try) 2>&5
12916 echo "$as_me:12916: \$? = $ac_status" >&5
12917 (exit "$ac_status"); }; }; then
12918 cf_cv_gnu_source=no
12920 echo "$as_me: failed program was:" >&5
12921 cat "conftest.$ac_ext" >&5
12922 cf_cv_gnu_source=yes
12924 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12925 CPPFLAGS="$cf_save"
12928 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12931 echo "$as_me:12931: result: $cf_cv_gnu_source" >&5
12932 echo "${ECHO_T}$cf_cv_gnu_source" >&6
12934 if test "$cf_cv_gnu_source" = yes
12936 echo "$as_me:12936: checking if we should also define _DEFAULT_SOURCE" >&5
12937 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
12938 if test "${cf_cv_default_source+set}" = set; then
12939 echo $ECHO_N "(cached) $ECHO_C" >&6
12942 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12943 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
12945 cat >"conftest.$ac_ext" <<_ACEOF
12946 #line 12946 "configure"
12947 #include "confdefs.h"
12948 #include <sys/types.h>
12953 #ifdef _DEFAULT_SOURCE
12954 #error expected _DEFAULT_SOURCE to be undefined
12960 rm -f "conftest.$ac_objext"
12961 if { (eval echo "$as_me:12961: \"$ac_compile\"") >&5
12962 (eval $ac_compile) 2>&5
12964 echo "$as_me:12964: \$? = $ac_status" >&5
12965 (exit "$ac_status"); } &&
12966 { ac_try='test -s "conftest.$ac_objext"'
12967 { (eval echo "$as_me:12967: \"$ac_try\"") >&5
12968 (eval $ac_try) 2>&5
12970 echo "$as_me:12970: \$? = $ac_status" >&5
12971 (exit "$ac_status"); }; }; then
12972 cf_cv_default_source=no
12974 echo "$as_me: failed program was:" >&5
12975 cat "conftest.$ac_ext" >&5
12976 cf_cv_default_source=yes
12978 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12981 echo "$as_me:12981: result: $cf_cv_default_source" >&5
12982 echo "${ECHO_T}$cf_cv_default_source" >&6
12983 if test "$cf_cv_default_source" = yes
12986 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12987 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12997 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
13000 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
13003 if test "$cf_cv_posix_visible" = no; then
13005 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
13007 cf_save_CFLAGS="$CFLAGS"
13008 cf_save_CPPFLAGS="$CPPFLAGS"
13010 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13011 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13012 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13014 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13015 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13016 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13018 echo "$as_me:13018: checking if we should define _POSIX_C_SOURCE" >&5
13019 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13020 if test "${cf_cv_posix_c_source+set}" = set; then
13021 echo $ECHO_N "(cached) $ECHO_C" >&6
13024 echo "${as_me:-configure}:13024: testing if the symbol is already defined go no further ..." 1>&5
13026 cat >"conftest.$ac_ext" <<_ACEOF
13027 #line 13027 "configure"
13028 #include "confdefs.h"
13029 #include <sys/types.h>
13034 #ifndef _POSIX_C_SOURCE
13041 rm -f "conftest.$ac_objext"
13042 if { (eval echo "$as_me:13042: \"$ac_compile\"") >&5
13043 (eval $ac_compile) 2>&5
13045 echo "$as_me:13045: \$? = $ac_status" >&5
13046 (exit "$ac_status"); } &&
13047 { ac_try='test -s "conftest.$ac_objext"'
13048 { (eval echo "$as_me:13048: \"$ac_try\"") >&5
13049 (eval $ac_try) 2>&5
13051 echo "$as_me:13051: \$? = $ac_status" >&5
13052 (exit "$ac_status"); }; }; then
13053 cf_cv_posix_c_source=no
13055 echo "$as_me: failed program was:" >&5
13056 cat "conftest.$ac_ext" >&5
13057 cf_want_posix_source=no
13058 case .$cf_POSIX_C_SOURCE in
13060 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13063 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13064 cf_want_posix_source=yes
13067 cf_want_posix_source=yes
13070 if test "$cf_want_posix_source" = yes ; then
13071 cat >"conftest.$ac_ext" <<_ACEOF
13072 #line 13072 "configure"
13073 #include "confdefs.h"
13074 #include <sys/types.h>
13079 #ifdef _POSIX_SOURCE
13086 rm -f "conftest.$ac_objext"
13087 if { (eval echo "$as_me:13087: \"$ac_compile\"") >&5
13088 (eval $ac_compile) 2>&5
13090 echo "$as_me:13090: \$? = $ac_status" >&5
13091 (exit "$ac_status"); } &&
13092 { ac_try='test -s "conftest.$ac_objext"'
13093 { (eval echo "$as_me:13093: \"$ac_try\"") >&5
13094 (eval $ac_try) 2>&5
13096 echo "$as_me:13096: \$? = $ac_status" >&5
13097 (exit "$ac_status"); }; }; then
13100 echo "$as_me: failed program was:" >&5
13101 cat "conftest.$ac_ext" >&5
13102 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13104 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13107 echo "${as_me:-configure}:13107: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13109 CFLAGS="$cf_trim_CFLAGS"
13110 CPPFLAGS="$cf_trim_CPPFLAGS"
13112 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13113 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13115 echo "${as_me:-configure}:13115: testing if the second compile does not leave our definition intact error ..." 1>&5
13117 cat >"conftest.$ac_ext" <<_ACEOF
13118 #line 13118 "configure"
13119 #include "confdefs.h"
13120 #include <sys/types.h>
13125 #ifndef _POSIX_C_SOURCE
13132 rm -f "conftest.$ac_objext"
13133 if { (eval echo "$as_me:13133: \"$ac_compile\"") >&5
13134 (eval $ac_compile) 2>&5
13136 echo "$as_me:13136: \$? = $ac_status" >&5
13137 (exit "$ac_status"); } &&
13138 { ac_try='test -s "conftest.$ac_objext"'
13139 { (eval echo "$as_me:13139: \"$ac_try\"") >&5
13140 (eval $ac_try) 2>&5
13142 echo "$as_me:13142: \$? = $ac_status" >&5
13143 (exit "$ac_status"); }; }; then
13146 echo "$as_me: failed program was:" >&5
13147 cat "conftest.$ac_ext" >&5
13148 cf_cv_posix_c_source=no
13150 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13151 CFLAGS="$cf_save_CFLAGS"
13152 CPPFLAGS="$cf_save_CPPFLAGS"
13155 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13158 echo "$as_me:13158: result: $cf_cv_posix_c_source" >&5
13159 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13161 if test "$cf_cv_posix_c_source" != no ; then
13162 CFLAGS="$cf_trim_CFLAGS"
13163 CPPFLAGS="$cf_trim_CPPFLAGS"
13168 cf_new_extra_cppflags=
13170 for cf_add_cflags in $cf_cv_posix_c_source
13172 case "$cf_fix_cppflags" in
13174 case "$cf_add_cflags" in
13175 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13176 case "$cf_add_cflags" in
13178 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13180 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13181 && test -z "${cf_tst_cflags}" \
13182 && cf_fix_cppflags=yes
13184 if test "$cf_fix_cppflags" = yes ; then
13186 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13187 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13190 elif test "${cf_tst_cflags}" = "\"'" ; then
13192 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13193 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13199 case "$CPPFLAGS" in
13203 case "$cf_add_cflags" in
13205 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13207 CPPFLAGS=`echo "$CPPFLAGS" | \
13208 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13209 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13214 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13215 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13222 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13223 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13230 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13231 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13233 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13235 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13236 && test -z "${cf_tst_cflags}" \
13237 && cf_fix_cppflags=no
13242 if test -n "$cf_new_cflags" ; then
13244 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13245 CFLAGS="${CFLAGS}$cf_new_cflags"
13249 if test -n "$cf_new_cppflags" ; then
13251 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13252 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13256 if test -n "$cf_new_extra_cppflags" ; then
13258 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13259 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13265 fi # cf_cv_posix_visible
13269 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
13272 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
13273 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
13274 # Abusing the conformance level is a workaround.
13275 { echo "$as_me:13275: WARNING: this system does not provide usable locale support" >&5
13276 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
13277 cf_xopen_source="-D_BSD_SOURCE"
13278 cf_XOPEN_SOURCE=700
13281 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
13282 cf_xopen_source="-D_BSD_SOURCE"
13283 cf_XOPEN_SOURCE=600
13286 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
13289 cf_xopen_source="-D_OSF_SOURCE"
13292 cf_xopen_source="-D_QNX_SOURCE"
13295 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
13298 cf_xopen_source="-D__EXTENSIONS__"
13299 cf_cv_xopen_source=broken
13301 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
13307 echo "$as_me:13307: checking if we should define _XOPEN_SOURCE" >&5
13308 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13309 if test "${cf_cv_xopen_source+set}" = set; then
13310 echo $ECHO_N "(cached) $ECHO_C" >&6
13313 cat >"conftest.$ac_ext" <<_ACEOF
13314 #line 13314 "configure"
13315 #include "confdefs.h"
13317 #include <stdlib.h>
13318 #include <string.h>
13319 #include <sys/types.h>
13325 #ifndef _XOPEN_SOURCE
13332 rm -f "conftest.$ac_objext"
13333 if { (eval echo "$as_me:13333: \"$ac_compile\"") >&5
13334 (eval $ac_compile) 2>&5
13336 echo "$as_me:13336: \$? = $ac_status" >&5
13337 (exit "$ac_status"); } &&
13338 { ac_try='test -s "conftest.$ac_objext"'
13339 { (eval echo "$as_me:13339: \"$ac_try\"") >&5
13340 (eval $ac_try) 2>&5
13342 echo "$as_me:13342: \$? = $ac_status" >&5
13343 (exit "$ac_status"); }; }; then
13344 cf_cv_xopen_source=no
13346 echo "$as_me: failed program was:" >&5
13347 cat "conftest.$ac_ext" >&5
13348 cf_save="$CPPFLAGS"
13350 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13351 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13353 cat >"conftest.$ac_ext" <<_ACEOF
13354 #line 13354 "configure"
13355 #include "confdefs.h"
13357 #include <stdlib.h>
13358 #include <string.h>
13359 #include <sys/types.h>
13365 #ifdef _XOPEN_SOURCE
13372 rm -f "conftest.$ac_objext"
13373 if { (eval echo "$as_me:13373: \"$ac_compile\"") >&5
13374 (eval $ac_compile) 2>&5
13376 echo "$as_me:13376: \$? = $ac_status" >&5
13377 (exit "$ac_status"); } &&
13378 { ac_try='test -s "conftest.$ac_objext"'
13379 { (eval echo "$as_me:13379: \"$ac_try\"") >&5
13380 (eval $ac_try) 2>&5
13382 echo "$as_me:13382: \$? = $ac_status" >&5
13383 (exit "$ac_status"); }; }; then
13384 cf_cv_xopen_source=no
13386 echo "$as_me: failed program was:" >&5
13387 cat "conftest.$ac_ext" >&5
13388 cf_cv_xopen_source=$cf_XOPEN_SOURCE
13390 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13391 CPPFLAGS="$cf_save"
13394 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13397 echo "$as_me:13397: result: $cf_cv_xopen_source" >&5
13398 echo "${ECHO_T}$cf_cv_xopen_source" >&6
13400 if test "$cf_cv_xopen_source" != no ; then
13402 CFLAGS=`echo "$CFLAGS" | \
13403 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13404 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13406 CPPFLAGS=`echo "$CPPFLAGS" | \
13407 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13408 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13410 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13412 for cf_add_cflags in $cf_temp_xopen_source
13415 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13416 cf_old_cflag="$CFLAGS"
13419 (*$cf_add_cflags=*)
13420 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
13422 (*$cf_add_cflags\ *)
13423 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
13426 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
13430 if test "$CFLAGS" != "$cf_old_cflag" ;
13433 CFLAGS="$cf_new_cflag"
13436 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13437 cf_old_cflag="$CPPFLAGS"
13439 case "$CPPFLAGS" in
13440 (*$cf_add_cflags=*)
13441 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
13443 (*$cf_add_cflags\ *)
13444 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
13447 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
13451 if test "$CPPFLAGS" != "$cf_old_cflag" ;
13454 CPPFLAGS="$cf_new_cflag"
13462 cf_new_extra_cppflags=
13464 for cf_add_cflags in $cf_temp_xopen_source
13466 case "$cf_fix_cppflags" in
13468 case "$cf_add_cflags" in
13469 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13470 case "$cf_add_cflags" in
13472 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13474 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13475 && test -z "${cf_tst_cflags}" \
13476 && cf_fix_cppflags=yes
13478 if test "$cf_fix_cppflags" = yes ; then
13480 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13481 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13484 elif test "${cf_tst_cflags}" = "\"'" ; then
13486 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13487 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13493 case "$CPPFLAGS" in
13497 case "$cf_add_cflags" in
13499 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13501 CPPFLAGS=`echo "$CPPFLAGS" | \
13502 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13503 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13508 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13509 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13516 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13517 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13524 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13525 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13527 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13529 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13530 && test -z "${cf_tst_cflags}" \
13531 && cf_fix_cppflags=no
13536 if test -n "$cf_new_cflags" ; then
13538 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13539 CFLAGS="${CFLAGS}$cf_new_cflags"
13543 if test -n "$cf_new_cppflags" ; then
13545 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13546 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13550 if test -n "$cf_new_extra_cppflags" ; then
13552 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13553 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13559 if test "$cf_cv_posix_visible" = no; then
13561 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
13563 cf_save_CFLAGS="$CFLAGS"
13564 cf_save_CPPFLAGS="$CPPFLAGS"
13566 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13567 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13568 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13570 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13571 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13572 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13574 echo "$as_me:13574: checking if we should define _POSIX_C_SOURCE" >&5
13575 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13576 if test "${cf_cv_posix_c_source+set}" = set; then
13577 echo $ECHO_N "(cached) $ECHO_C" >&6
13580 echo "${as_me:-configure}:13580: testing if the symbol is already defined go no further ..." 1>&5
13582 cat >"conftest.$ac_ext" <<_ACEOF
13583 #line 13583 "configure"
13584 #include "confdefs.h"
13585 #include <sys/types.h>
13590 #ifndef _POSIX_C_SOURCE
13597 rm -f "conftest.$ac_objext"
13598 if { (eval echo "$as_me:13598: \"$ac_compile\"") >&5
13599 (eval $ac_compile) 2>&5
13601 echo "$as_me:13601: \$? = $ac_status" >&5
13602 (exit "$ac_status"); } &&
13603 { ac_try='test -s "conftest.$ac_objext"'
13604 { (eval echo "$as_me:13604: \"$ac_try\"") >&5
13605 (eval $ac_try) 2>&5
13607 echo "$as_me:13607: \$? = $ac_status" >&5
13608 (exit "$ac_status"); }; }; then
13609 cf_cv_posix_c_source=no
13611 echo "$as_me: failed program was:" >&5
13612 cat "conftest.$ac_ext" >&5
13613 cf_want_posix_source=no
13614 case .$cf_POSIX_C_SOURCE in
13616 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13619 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13620 cf_want_posix_source=yes
13623 cf_want_posix_source=yes
13626 if test "$cf_want_posix_source" = yes ; then
13627 cat >"conftest.$ac_ext" <<_ACEOF
13628 #line 13628 "configure"
13629 #include "confdefs.h"
13630 #include <sys/types.h>
13635 #ifdef _POSIX_SOURCE
13642 rm -f "conftest.$ac_objext"
13643 if { (eval echo "$as_me:13643: \"$ac_compile\"") >&5
13644 (eval $ac_compile) 2>&5
13646 echo "$as_me:13646: \$? = $ac_status" >&5
13647 (exit "$ac_status"); } &&
13648 { ac_try='test -s "conftest.$ac_objext"'
13649 { (eval echo "$as_me:13649: \"$ac_try\"") >&5
13650 (eval $ac_try) 2>&5
13652 echo "$as_me:13652: \$? = $ac_status" >&5
13653 (exit "$ac_status"); }; }; then
13656 echo "$as_me: failed program was:" >&5
13657 cat "conftest.$ac_ext" >&5
13658 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13660 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13663 echo "${as_me:-configure}:13663: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13665 CFLAGS="$cf_trim_CFLAGS"
13666 CPPFLAGS="$cf_trim_CPPFLAGS"
13668 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13669 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13671 echo "${as_me:-configure}:13671: testing if the second compile does not leave our definition intact error ..." 1>&5
13673 cat >"conftest.$ac_ext" <<_ACEOF
13674 #line 13674 "configure"
13675 #include "confdefs.h"
13676 #include <sys/types.h>
13681 #ifndef _POSIX_C_SOURCE
13688 rm -f "conftest.$ac_objext"
13689 if { (eval echo "$as_me:13689: \"$ac_compile\"") >&5
13690 (eval $ac_compile) 2>&5
13692 echo "$as_me:13692: \$? = $ac_status" >&5
13693 (exit "$ac_status"); } &&
13694 { ac_try='test -s "conftest.$ac_objext"'
13695 { (eval echo "$as_me:13695: \"$ac_try\"") >&5
13696 (eval $ac_try) 2>&5
13698 echo "$as_me:13698: \$? = $ac_status" >&5
13699 (exit "$ac_status"); }; }; then
13702 echo "$as_me: failed program was:" >&5
13703 cat "conftest.$ac_ext" >&5
13704 cf_cv_posix_c_source=no
13706 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13707 CFLAGS="$cf_save_CFLAGS"
13708 CPPFLAGS="$cf_save_CPPFLAGS"
13711 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13714 echo "$as_me:13714: result: $cf_cv_posix_c_source" >&5
13715 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13717 if test "$cf_cv_posix_c_source" != no ; then
13718 CFLAGS="$cf_trim_CFLAGS"
13719 CPPFLAGS="$cf_trim_CPPFLAGS"
13724 cf_new_extra_cppflags=
13726 for cf_add_cflags in $cf_cv_posix_c_source
13728 case "$cf_fix_cppflags" in
13730 case "$cf_add_cflags" in
13731 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13732 case "$cf_add_cflags" in
13734 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13736 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13737 && test -z "${cf_tst_cflags}" \
13738 && cf_fix_cppflags=yes
13740 if test "$cf_fix_cppflags" = yes ; then
13742 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13743 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13746 elif test "${cf_tst_cflags}" = "\"'" ; then
13748 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13749 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13755 case "$CPPFLAGS" in
13759 case "$cf_add_cflags" in
13761 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13763 CPPFLAGS=`echo "$CPPFLAGS" | \
13764 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13765 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13770 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13771 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13778 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13779 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13786 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13787 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13789 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13791 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13792 && test -z "${cf_tst_cflags}" \
13793 && cf_fix_cppflags=no
13798 if test -n "$cf_new_cflags" ; then
13800 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13801 CFLAGS="${CFLAGS}$cf_new_cflags"
13805 if test -n "$cf_new_cppflags" ; then
13807 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13808 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13812 if test -n "$cf_new_extra_cppflags" ; then
13814 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13815 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13821 fi # cf_cv_posix_visible
13826 if test -n "$cf_xopen_source" ; then
13828 for cf_add_cflags in $cf_xopen_source
13831 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13832 cf_old_cflag="$CFLAGS"
13835 (*$cf_add_cflags=*)
13836 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
13838 (*$cf_add_cflags\ *)
13839 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
13842 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
13846 if test "$CFLAGS" != "$cf_old_cflag" ;
13848 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
13850 echo "${as_me:-configure}:13850: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
13852 CFLAGS="$cf_new_cflag"
13855 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13856 cf_old_cflag="$CPPFLAGS"
13858 case "$CPPFLAGS" in
13859 (*$cf_add_cflags=*)
13860 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
13862 (*$cf_add_cflags\ *)
13863 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
13866 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
13870 if test "$CPPFLAGS" != "$cf_old_cflag" ;
13872 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
13874 echo "${as_me:-configure}:13874: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
13876 CPPFLAGS="$cf_new_cflag"
13884 cf_new_extra_cppflags=
13886 for cf_add_cflags in $cf_xopen_source
13888 case "$cf_fix_cppflags" in
13890 case "$cf_add_cflags" in
13891 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13892 case "$cf_add_cflags" in
13894 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13896 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13897 && test -z "${cf_tst_cflags}" \
13898 && cf_fix_cppflags=yes
13900 if test "$cf_fix_cppflags" = yes ; then
13902 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13903 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13906 elif test "${cf_tst_cflags}" = "\"'" ; then
13908 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13909 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13915 case "$CPPFLAGS" in
13919 case "$cf_add_cflags" in
13921 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13923 CPPFLAGS=`echo "$CPPFLAGS" | \
13924 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13925 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13930 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13931 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13938 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13939 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13946 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13947 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13949 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13951 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13952 && test -z "${cf_tst_cflags}" \
13953 && cf_fix_cppflags=no
13958 if test -n "$cf_new_cflags" ; then
13959 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13961 echo "${as_me:-configure}:13961: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13963 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13964 CFLAGS="${CFLAGS}$cf_new_cflags"
13968 if test -n "$cf_new_cppflags" ; then
13969 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13971 echo "${as_me:-configure}:13971: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13973 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13974 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13978 if test -n "$cf_new_extra_cppflags" ; then
13979 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13981 echo "${as_me:-configure}:13981: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13983 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13984 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13990 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
13991 echo "$as_me:13991: checking if _XOPEN_SOURCE really is set" >&5
13992 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
13993 cat >"conftest.$ac_ext" <<_ACEOF
13994 #line 13994 "configure"
13995 #include "confdefs.h"
13996 #include <stdlib.h>
14001 #ifndef _XOPEN_SOURCE
14008 rm -f "conftest.$ac_objext"
14009 if { (eval echo "$as_me:14009: \"$ac_compile\"") >&5
14010 (eval $ac_compile) 2>&5
14012 echo "$as_me:14012: \$? = $ac_status" >&5
14013 (exit "$ac_status"); } &&
14014 { ac_try='test -s "conftest.$ac_objext"'
14015 { (eval echo "$as_me:14015: \"$ac_try\"") >&5
14016 (eval $ac_try) 2>&5
14018 echo "$as_me:14018: \$? = $ac_status" >&5
14019 (exit "$ac_status"); }; }; then
14020 cf_XOPEN_SOURCE_set=yes
14022 echo "$as_me: failed program was:" >&5
14023 cat "conftest.$ac_ext" >&5
14024 cf_XOPEN_SOURCE_set=no
14026 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14027 echo "$as_me:14027: result: $cf_XOPEN_SOURCE_set" >&5
14028 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
14029 if test "$cf_XOPEN_SOURCE_set" = yes
14031 cat >"conftest.$ac_ext" <<_ACEOF
14032 #line 14032 "configure"
14033 #include "confdefs.h"
14034 #include <stdlib.h>
14039 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
14046 rm -f "conftest.$ac_objext"
14047 if { (eval echo "$as_me:14047: \"$ac_compile\"") >&5
14048 (eval $ac_compile) 2>&5
14050 echo "$as_me:14050: \$? = $ac_status" >&5
14051 (exit "$ac_status"); } &&
14052 { ac_try='test -s "conftest.$ac_objext"'
14053 { (eval echo "$as_me:14053: \"$ac_try\"") >&5
14054 (eval $ac_try) 2>&5
14056 echo "$as_me:14056: \$? = $ac_status" >&5
14057 (exit "$ac_status"); }; }; then
14058 cf_XOPEN_SOURCE_set_ok=yes
14060 echo "$as_me: failed program was:" >&5
14061 cat "conftest.$ac_ext" >&5
14062 cf_XOPEN_SOURCE_set_ok=no
14064 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14065 if test "$cf_XOPEN_SOURCE_set_ok" = no
14067 { echo "$as_me:14067: WARNING: _XOPEN_SOURCE is lower than requested" >&5
14068 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
14072 echo "$as_me:14072: checking if we should define _XOPEN_SOURCE" >&5
14073 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
14074 if test "${cf_cv_xopen_source+set}" = set; then
14075 echo $ECHO_N "(cached) $ECHO_C" >&6
14078 cat >"conftest.$ac_ext" <<_ACEOF
14079 #line 14079 "configure"
14080 #include "confdefs.h"
14082 #include <stdlib.h>
14083 #include <string.h>
14084 #include <sys/types.h>
14090 #ifndef _XOPEN_SOURCE
14097 rm -f "conftest.$ac_objext"
14098 if { (eval echo "$as_me:14098: \"$ac_compile\"") >&5
14099 (eval $ac_compile) 2>&5
14101 echo "$as_me:14101: \$? = $ac_status" >&5
14102 (exit "$ac_status"); } &&
14103 { ac_try='test -s "conftest.$ac_objext"'
14104 { (eval echo "$as_me:14104: \"$ac_try\"") >&5
14105 (eval $ac_try) 2>&5
14107 echo "$as_me:14107: \$? = $ac_status" >&5
14108 (exit "$ac_status"); }; }; then
14109 cf_cv_xopen_source=no
14111 echo "$as_me: failed program was:" >&5
14112 cat "conftest.$ac_ext" >&5
14113 cf_save="$CPPFLAGS"
14115 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14116 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
14118 cat >"conftest.$ac_ext" <<_ACEOF
14119 #line 14119 "configure"
14120 #include "confdefs.h"
14122 #include <stdlib.h>
14123 #include <string.h>
14124 #include <sys/types.h>
14130 #ifdef _XOPEN_SOURCE
14137 rm -f "conftest.$ac_objext"
14138 if { (eval echo "$as_me:14138: \"$ac_compile\"") >&5
14139 (eval $ac_compile) 2>&5
14141 echo "$as_me:14141: \$? = $ac_status" >&5
14142 (exit "$ac_status"); } &&
14143 { ac_try='test -s "conftest.$ac_objext"'
14144 { (eval echo "$as_me:14144: \"$ac_try\"") >&5
14145 (eval $ac_try) 2>&5
14147 echo "$as_me:14147: \$? = $ac_status" >&5
14148 (exit "$ac_status"); }; }; then
14149 cf_cv_xopen_source=no
14151 echo "$as_me: failed program was:" >&5
14152 cat "conftest.$ac_ext" >&5
14153 cf_cv_xopen_source=$cf_XOPEN_SOURCE
14155 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14156 CPPFLAGS="$cf_save"
14159 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14162 echo "$as_me:14162: result: $cf_cv_xopen_source" >&5
14163 echo "${ECHO_T}$cf_cv_xopen_source" >&6
14165 if test "$cf_cv_xopen_source" != no ; then
14167 CFLAGS=`echo "$CFLAGS" | \
14168 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14169 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14171 CPPFLAGS=`echo "$CPPFLAGS" | \
14172 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14173 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14175 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
14177 for cf_add_cflags in $cf_temp_xopen_source
14180 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14181 cf_old_cflag="$CFLAGS"
14184 (*$cf_add_cflags=*)
14185 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
14187 (*$cf_add_cflags\ *)
14188 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
14191 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
14195 if test "$CFLAGS" != "$cf_old_cflag" ;
14198 CFLAGS="$cf_new_cflag"
14201 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14202 cf_old_cflag="$CPPFLAGS"
14204 case "$CPPFLAGS" in
14205 (*$cf_add_cflags=*)
14206 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^ ]*%%g"`
14208 (*$cf_add_cflags\ *)
14209 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
14212 cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
14216 if test "$CPPFLAGS" != "$cf_old_cflag" ;
14219 CPPFLAGS="$cf_new_cflag"
14227 cf_new_extra_cppflags=
14229 for cf_add_cflags in $cf_temp_xopen_source
14231 case "$cf_fix_cppflags" in
14233 case "$cf_add_cflags" in
14234 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14235 case "$cf_add_cflags" in
14237 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14239 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14240 && test -z "${cf_tst_cflags}" \
14241 && cf_fix_cppflags=yes
14243 if test "$cf_fix_cppflags" = yes ; then
14245 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14246 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14249 elif test "${cf_tst_cflags}" = "\"'" ; then
14251 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14252 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14258 case "$CPPFLAGS" in
14262 case "$cf_add_cflags" in
14264 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14266 CPPFLAGS=`echo "$CPPFLAGS" | \
14267 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14268 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14273 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14274 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14281 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14282 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14289 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14290 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14292 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14294 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14295 && test -z "${cf_tst_cflags}" \
14296 && cf_fix_cppflags=no
14301 if test -n "$cf_new_cflags" ; then
14303 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14304 CFLAGS="${CFLAGS}$cf_new_cflags"
14308 if test -n "$cf_new_cppflags" ; then
14310 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14311 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14315 if test -n "$cf_new_extra_cppflags" ; then
14317 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14318 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14326 fi # cf_cv_posix_visible
14328 # Check whether --enable-largefile or --disable-largefile was given.
14329 if test "${enable_largefile+set}" = set; then
14330 enableval="$enable_largefile"
14333 if test "$enable_largefile" != no; then
14335 echo "$as_me:14335: checking for special C compiler options needed for large files" >&5
14336 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
14337 if test "${ac_cv_sys_largefile_CC+set}" = set; then
14338 echo $ECHO_N "(cached) $ECHO_C" >&6
14340 ac_cv_sys_largefile_CC=no
14341 if test "$GCC" != yes; then
14344 # IRIX 6.2 and later do not support large files by default,
14345 # so use the C compiler's -n32 option if that helps.
14346 cat >"conftest.$ac_ext" <<_ACEOF
14347 #line 14347 "configure"
14348 #include "confdefs.h"
14349 #include <sys/types.h>
14350 /* Check that off_t can represent 2**63 - 1 correctly.
14351 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14352 since some C++ compilers masquerading as C compilers
14353 incorrectly reject 9223372036854775807. */
14354 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14355 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14356 && LARGE_OFF_T % 2147483647 == 1)
14366 rm -f "conftest.$ac_objext"
14367 if { (eval echo "$as_me:14367: \"$ac_compile\"") >&5
14368 (eval $ac_compile) 2>&5
14370 echo "$as_me:14370: \$? = $ac_status" >&5
14371 (exit "$ac_status"); } &&
14372 { ac_try='test -s "conftest.$ac_objext"'
14373 { (eval echo "$as_me:14373: \"$ac_try\"") >&5
14374 (eval $ac_try) 2>&5
14376 echo "$as_me:14376: \$? = $ac_status" >&5
14377 (exit "$ac_status"); }; }; then
14380 echo "$as_me: failed program was:" >&5
14381 cat "conftest.$ac_ext" >&5
14383 rm -f "conftest.$ac_objext"
14385 rm -f "conftest.$ac_objext"
14386 if { (eval echo "$as_me:14386: \"$ac_compile\"") >&5
14387 (eval $ac_compile) 2>&5
14389 echo "$as_me:14389: \$? = $ac_status" >&5
14390 (exit "$ac_status"); } &&
14391 { ac_try='test -s "conftest.$ac_objext"'
14392 { (eval echo "$as_me:14392: \"$ac_try\"") >&5
14393 (eval $ac_try) 2>&5
14395 echo "$as_me:14395: \$? = $ac_status" >&5
14396 (exit "$ac_status"); }; }; then
14397 ac_cv_sys_largefile_CC=' -n32'; break
14399 echo "$as_me: failed program was:" >&5
14400 cat "conftest.$ac_ext" >&5
14402 rm -f "conftest.$ac_objext"
14406 rm -f "conftest.$ac_ext"
14409 echo "$as_me:14409: result: $ac_cv_sys_largefile_CC" >&5
14410 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
14411 if test "$ac_cv_sys_largefile_CC" != no; then
14412 CC=$CC$ac_cv_sys_largefile_CC
14415 echo "$as_me:14415: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14416 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
14417 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
14418 echo $ECHO_N "(cached) $ECHO_C" >&6
14421 ac_cv_sys_file_offset_bits=no
14422 cat >"conftest.$ac_ext" <<_ACEOF
14423 #line 14423 "configure"
14424 #include "confdefs.h"
14425 #include <sys/types.h>
14426 /* Check that off_t can represent 2**63 - 1 correctly.
14427 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14428 since some C++ compilers masquerading as C compilers
14429 incorrectly reject 9223372036854775807. */
14430 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14431 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14432 && LARGE_OFF_T % 2147483647 == 1)
14442 rm -f "conftest.$ac_objext"
14443 if { (eval echo "$as_me:14443: \"$ac_compile\"") >&5
14444 (eval $ac_compile) 2>&5
14446 echo "$as_me:14446: \$? = $ac_status" >&5
14447 (exit "$ac_status"); } &&
14448 { ac_try='test -s "conftest.$ac_objext"'
14449 { (eval echo "$as_me:14449: \"$ac_try\"") >&5
14450 (eval $ac_try) 2>&5
14452 echo "$as_me:14452: \$? = $ac_status" >&5
14453 (exit "$ac_status"); }; }; then
14456 echo "$as_me: failed program was:" >&5
14457 cat "conftest.$ac_ext" >&5
14459 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14460 cat >"conftest.$ac_ext" <<_ACEOF
14461 #line 14461 "configure"
14462 #include "confdefs.h"
14463 #define _FILE_OFFSET_BITS 64
14464 #include <sys/types.h>
14465 /* Check that off_t can represent 2**63 - 1 correctly.
14466 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14467 since some C++ compilers masquerading as C compilers
14468 incorrectly reject 9223372036854775807. */
14469 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14470 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14471 && LARGE_OFF_T % 2147483647 == 1)
14481 rm -f "conftest.$ac_objext"
14482 if { (eval echo "$as_me:14482: \"$ac_compile\"") >&5
14483 (eval $ac_compile) 2>&5
14485 echo "$as_me:14485: \$? = $ac_status" >&5
14486 (exit "$ac_status"); } &&
14487 { ac_try='test -s "conftest.$ac_objext"'
14488 { (eval echo "$as_me:14488: \"$ac_try\"") >&5
14489 (eval $ac_try) 2>&5
14491 echo "$as_me:14491: \$? = $ac_status" >&5
14492 (exit "$ac_status"); }; }; then
14493 ac_cv_sys_file_offset_bits=64; break
14495 echo "$as_me: failed program was:" >&5
14496 cat "conftest.$ac_ext" >&5
14498 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14502 echo "$as_me:14502: result: $ac_cv_sys_file_offset_bits" >&5
14503 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14504 if test "$ac_cv_sys_file_offset_bits" != no; then
14506 cat >>confdefs.h <<EOF
14507 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14512 echo "$as_me:14512: checking for _LARGE_FILES value needed for large files" >&5
14513 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14514 if test "${ac_cv_sys_large_files+set}" = set; then
14515 echo $ECHO_N "(cached) $ECHO_C" >&6
14518 ac_cv_sys_large_files=no
14519 cat >"conftest.$ac_ext" <<_ACEOF
14520 #line 14520 "configure"
14521 #include "confdefs.h"
14522 #include <sys/types.h>
14523 /* Check that off_t can represent 2**63 - 1 correctly.
14524 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14525 since some C++ compilers masquerading as C compilers
14526 incorrectly reject 9223372036854775807. */
14527 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14528 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14529 && LARGE_OFF_T % 2147483647 == 1)
14539 rm -f "conftest.$ac_objext"
14540 if { (eval echo "$as_me:14540: \"$ac_compile\"") >&5
14541 (eval $ac_compile) 2>&5
14543 echo "$as_me:14543: \$? = $ac_status" >&5
14544 (exit "$ac_status"); } &&
14545 { ac_try='test -s "conftest.$ac_objext"'
14546 { (eval echo "$as_me:14546: \"$ac_try\"") >&5
14547 (eval $ac_try) 2>&5
14549 echo "$as_me:14549: \$? = $ac_status" >&5
14550 (exit "$ac_status"); }; }; then
14553 echo "$as_me: failed program was:" >&5
14554 cat "conftest.$ac_ext" >&5
14556 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14557 cat >"conftest.$ac_ext" <<_ACEOF
14558 #line 14558 "configure"
14559 #include "confdefs.h"
14560 #define _LARGE_FILES 1
14561 #include <sys/types.h>
14562 /* Check that off_t can represent 2**63 - 1 correctly.
14563 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14564 since some C++ compilers masquerading as C compilers
14565 incorrectly reject 9223372036854775807. */
14566 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14567 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14568 && LARGE_OFF_T % 2147483647 == 1)
14578 rm -f "conftest.$ac_objext"
14579 if { (eval echo "$as_me:14579: \"$ac_compile\"") >&5
14580 (eval $ac_compile) 2>&5
14582 echo "$as_me:14582: \$? = $ac_status" >&5
14583 (exit "$ac_status"); } &&
14584 { ac_try='test -s "conftest.$ac_objext"'
14585 { (eval echo "$as_me:14585: \"$ac_try\"") >&5
14586 (eval $ac_try) 2>&5
14588 echo "$as_me:14588: \$? = $ac_status" >&5
14589 (exit "$ac_status"); }; }; then
14590 ac_cv_sys_large_files=1; break
14592 echo "$as_me: failed program was:" >&5
14593 cat "conftest.$ac_ext" >&5
14595 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14599 echo "$as_me:14599: result: $ac_cv_sys_large_files" >&5
14600 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14601 if test "$ac_cv_sys_large_files" != no; then
14603 cat >>confdefs.h <<EOF
14604 #define _LARGE_FILES $ac_cv_sys_large_files
14611 if test "$enable_largefile" != no ; then
14612 echo "$as_me:14612: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14613 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14614 if test "${ac_cv_sys_largefile_source+set}" = set; then
14615 echo $ECHO_N "(cached) $ECHO_C" >&6
14618 ac_cv_sys_largefile_source=no
14619 cat >"conftest.$ac_ext" <<_ACEOF
14620 #line 14620 "configure"
14621 #include "confdefs.h"
14631 rm -f "conftest.$ac_objext"
14632 if { (eval echo "$as_me:14632: \"$ac_compile\"") >&5
14633 (eval $ac_compile) 2>&5
14635 echo "$as_me:14635: \$? = $ac_status" >&5
14636 (exit "$ac_status"); } &&
14637 { ac_try='test -s "conftest.$ac_objext"'
14638 { (eval echo "$as_me:14638: \"$ac_try\"") >&5
14639 (eval $ac_try) 2>&5
14641 echo "$as_me:14641: \$? = $ac_status" >&5
14642 (exit "$ac_status"); }; }; then
14645 echo "$as_me: failed program was:" >&5
14646 cat "conftest.$ac_ext" >&5
14648 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14649 cat >"conftest.$ac_ext" <<_ACEOF
14650 #line 14650 "configure"
14651 #include "confdefs.h"
14652 #define _LARGEFILE_SOURCE 1
14662 rm -f "conftest.$ac_objext"
14663 if { (eval echo "$as_me:14663: \"$ac_compile\"") >&5
14664 (eval $ac_compile) 2>&5
14666 echo "$as_me:14666: \$? = $ac_status" >&5
14667 (exit "$ac_status"); } &&
14668 { ac_try='test -s "conftest.$ac_objext"'
14669 { (eval echo "$as_me:14669: \"$ac_try\"") >&5
14670 (eval $ac_try) 2>&5
14672 echo "$as_me:14672: \$? = $ac_status" >&5
14673 (exit "$ac_status"); }; }; then
14674 ac_cv_sys_largefile_source=1; break
14676 echo "$as_me: failed program was:" >&5
14677 cat "conftest.$ac_ext" >&5
14679 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14683 echo "$as_me:14683: result: $ac_cv_sys_largefile_source" >&5
14684 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14685 if test "$ac_cv_sys_largefile_source" != no; then
14687 cat >>confdefs.h <<EOF
14688 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14694 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14695 # in glibc 2.1.3, but that breaks too many other things.
14696 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14697 echo "$as_me:14697: checking for fseeko" >&5
14698 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14699 if test "${ac_cv_func_fseeko+set}" = set; then
14700 echo $ECHO_N "(cached) $ECHO_C" >&6
14702 cat >"conftest.$ac_ext" <<_ACEOF
14703 #line 14703 "configure"
14704 #include "confdefs.h"
14709 return fseeko && fseeko (stdin, 0, 0);
14714 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14715 if { (eval echo "$as_me:14715: \"$ac_link\"") >&5
14716 (eval $ac_link) 2>&5
14718 echo "$as_me:14718: \$? = $ac_status" >&5
14719 (exit "$ac_status"); } &&
14720 { ac_try='test -s "conftest$ac_exeext"'
14721 { (eval echo "$as_me:14721: \"$ac_try\"") >&5
14722 (eval $ac_try) 2>&5
14724 echo "$as_me:14724: \$? = $ac_status" >&5
14725 (exit "$ac_status"); }; }; then
14726 ac_cv_func_fseeko=yes
14728 echo "$as_me: failed program was:" >&5
14729 cat "conftest.$ac_ext" >&5
14730 ac_cv_func_fseeko=no
14732 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14734 echo "$as_me:14734: result: $ac_cv_func_fseeko" >&5
14735 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14736 if test $ac_cv_func_fseeko = yes; then
14738 cat >>confdefs.h <<\EOF
14739 #define HAVE_FSEEKO 1
14744 # Normally we would collect these definitions in the config.h,
14745 # but (like _XOPEN_SOURCE), some environments rely on having these
14746 # defined before any of the system headers are included. Another
14747 # case comes up with C++, e.g., on AIX the compiler compiles the
14748 # header files by themselves before looking at the body files it is
14749 # told to compile. For ncurses, those header files do not include
14751 if test "$ac_cv_sys_large_files" != no
14754 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14755 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14758 if test "$ac_cv_sys_largefile_source" != no
14761 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14762 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14765 if test "$ac_cv_sys_file_offset_bits" != no
14768 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14769 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14773 echo "$as_me:14773: checking whether to use struct dirent64" >&5
14774 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14775 if test "${cf_cv_struct_dirent64+set}" = set; then
14776 echo $ECHO_N "(cached) $ECHO_C" >&6
14779 cat >"conftest.$ac_ext" <<_ACEOF
14780 #line 14780 "configure"
14781 #include "confdefs.h"
14783 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14784 #include <sys/types.h>
14785 #include <dirent.h>
14791 /* if transitional largefile support is setup, this is true */
14792 extern struct dirent64 * readdir(DIR *);
14793 struct dirent64 *x = readdir((DIR *)0);
14794 struct dirent *y = readdir((DIR *)0);
14802 rm -f "conftest.$ac_objext"
14803 if { (eval echo "$as_me:14803: \"$ac_compile\"") >&5
14804 (eval $ac_compile) 2>&5
14806 echo "$as_me:14806: \$? = $ac_status" >&5
14807 (exit "$ac_status"); } &&
14808 { ac_try='test -s "conftest.$ac_objext"'
14809 { (eval echo "$as_me:14809: \"$ac_try\"") >&5
14810 (eval $ac_try) 2>&5
14812 echo "$as_me:14812: \$? = $ac_status" >&5
14813 (exit "$ac_status"); }; }; then
14814 cf_cv_struct_dirent64=yes
14816 echo "$as_me: failed program was:" >&5
14817 cat "conftest.$ac_ext" >&5
14818 cf_cv_struct_dirent64=no
14820 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14823 echo "$as_me:14823: result: $cf_cv_struct_dirent64" >&5
14824 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14825 test "$cf_cv_struct_dirent64" = yes &&
14826 cat >>confdefs.h <<\EOF
14827 #define HAVE_STRUCT_DIRENT64 1
14832 ### Enable compiling-in rcs id's
14833 echo "$as_me:14833: checking if RCS identifiers should be compiled-in" >&5
14834 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14836 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14837 if test "${with_rcs_ids+set}" = set; then
14838 withval="$with_rcs_ids"
14839 with_rcs_ids=$withval
14843 echo "$as_me:14843: result: $with_rcs_ids" >&5
14844 echo "${ECHO_T}$with_rcs_ids" >&6
14845 test "$with_rcs_ids" = yes &&
14846 cat >>confdefs.h <<\EOF
14847 #define USE_RCS_IDS 1
14850 ###############################################################################
14852 ### Note that some functions (such as const) are normally disabled anyway.
14853 echo "$as_me:14853: checking if you want to build with function extensions" >&5
14854 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14856 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14857 if test "${enable_ext_funcs+set}" = set; then
14858 enableval="$enable_ext_funcs"
14859 with_ext_funcs=$enableval
14863 echo "$as_me:14863: result: $with_ext_funcs" >&5
14864 echo "${ECHO_T}$with_ext_funcs" >&6
14865 if test "$with_ext_funcs" = yes ; then
14866 NCURSES_EXT_FUNCS=1
14868 cat >>confdefs.h <<\EOF
14869 #define HAVE_USE_DEFAULT_COLORS 1
14872 cat >>confdefs.h <<\EOF
14873 #define NCURSES_EXT_FUNCS 1
14877 NCURSES_EXT_FUNCS=0
14880 ### use option --enable-const to turn on use of const beyond that in XSI.
14881 echo "$as_me:14881: checking for extended use of const keyword" >&5
14882 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14884 # Check whether --enable-const or --disable-const was given.
14885 if test "${enable_const+set}" = set; then
14886 enableval="$enable_const"
14887 with_ext_const=$enableval
14891 echo "$as_me:14891: result: $with_ext_const" >&5
14892 echo "${ECHO_T}$with_ext_const" >&6
14893 NCURSES_CONST='/*nothing*/'
14894 if test "$with_ext_const" = yes ; then
14895 NCURSES_CONST=const
14898 ###############################################################################
14899 # These options are relatively safe to experiment with.
14901 echo "$as_me:14901: checking if you want all development code" >&5
14902 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14904 # Check whether --with-develop or --without-develop was given.
14905 if test "${with_develop+set}" = set; then
14906 withval="$with_develop"
14907 with_develop=$withval
14911 echo "$as_me:14911: result: $with_develop" >&5
14912 echo "${ECHO_T}$with_develop" >&6
14914 ###############################################################################
14915 # These are just experimental, probably should not be in a package:
14917 # This is still experimental (20080329), but should ultimately be moved to
14918 # the script-block --with-normal, etc.
14920 echo "$as_me:14920: checking if you want to link with the pthread library" >&5
14921 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14923 # Check whether --with-pthread or --without-pthread was given.
14924 if test "${with_pthread+set}" = set; then
14925 withval="$with_pthread"
14926 with_pthread=$withval
14930 echo "$as_me:14930: result: $with_pthread" >&5
14931 echo "${ECHO_T}$with_pthread" >&6
14933 if test "$with_pthread" != no ; then
14934 echo "$as_me:14934: checking for pthread.h" >&5
14935 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14936 if test "${ac_cv_header_pthread_h+set}" = set; then
14937 echo $ECHO_N "(cached) $ECHO_C" >&6
14939 cat >"conftest.$ac_ext" <<_ACEOF
14940 #line 14940 "configure"
14941 #include "confdefs.h"
14942 #include <pthread.h>
14944 if { (eval echo "$as_me:14944: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14945 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14947 $EGREP -v '^ *\+' conftest.er1 >conftest.err
14949 cat conftest.err >&5
14950 echo "$as_me:14950: \$? = $ac_status" >&5
14951 (exit "$ac_status"); } >/dev/null; then
14952 if test -s conftest.err; then
14953 ac_cpp_err=$ac_c_preproc_warn_flag
14960 if test -z "$ac_cpp_err"; then
14961 ac_cv_header_pthread_h=yes
14963 echo "$as_me: failed program was:" >&5
14964 cat "conftest.$ac_ext" >&5
14965 ac_cv_header_pthread_h=no
14967 rm -f conftest.err "conftest.$ac_ext"
14969 echo "$as_me:14969: result: $ac_cv_header_pthread_h" >&5
14970 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14971 if test "$ac_cv_header_pthread_h" = yes; then
14973 cat >>confdefs.h <<\EOF
14974 #define HAVE_PTHREADS_H 1
14977 for cf_lib_pthread in pthread c_r
14979 echo "$as_me:14979: checking if we can link with the $cf_lib_pthread library" >&5
14980 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14981 cf_save_LIBS="$LIBS"
14983 cf_add_libs="$LIBS"
14986 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14987 # filter duplicates
14988 for cf_add_1lib in $cf_add_0lib; do
14989 for cf_add_2lib in $cf_add_libs; do
14990 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14995 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14997 LIBS="$cf_add_libs"
14999 cat >"conftest.$ac_ext" <<_ACEOF
15000 #line 15000 "configure"
15001 #include "confdefs.h"
15003 #include <pthread.h>
15009 int rc = pthread_create(0,0,0,0);
15010 int r2 = pthread_mutexattr_settype(0, 0);
15016 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15017 if { (eval echo "$as_me:15017: \"$ac_link\"") >&5
15018 (eval $ac_link) 2>&5
15020 echo "$as_me:15020: \$? = $ac_status" >&5
15021 (exit "$ac_status"); } &&
15022 { ac_try='test -s "conftest$ac_exeext"'
15023 { (eval echo "$as_me:15023: \"$ac_try\"") >&5
15024 (eval $ac_try) 2>&5
15026 echo "$as_me:15026: \$? = $ac_status" >&5
15027 (exit "$ac_status"); }; }; then
15030 echo "$as_me: failed program was:" >&5
15031 cat "conftest.$ac_ext" >&5
15034 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15035 LIBS="$cf_save_LIBS"
15036 echo "$as_me:15036: result: $with_pthread" >&5
15037 echo "${ECHO_T}$with_pthread" >&6
15038 test "$with_pthread" = yes && break
15041 if test "$with_pthread" = yes ; then
15043 cf_add_libs="$LIBS"
15046 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15047 # filter duplicates
15048 for cf_add_1lib in $cf_add_0lib; do
15049 for cf_add_2lib in $cf_add_libs; do
15050 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15055 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15057 LIBS="$cf_add_libs"
15059 cat >>confdefs.h <<\EOF
15060 #define HAVE_LIBPTHREADS 1
15064 { { echo "$as_me:15064: error: Cannot link with pthread library" >&5
15065 echo "$as_me: error: Cannot link with pthread library" >&2;}
15066 { (exit 1); exit 1; }; }
15073 echo "$as_me:15073: checking if you want to use weak-symbols for pthreads" >&5
15074 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15076 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15077 if test "${enable_weak_symbols+set}" = set; then
15078 enableval="$enable_weak_symbols"
15079 use_weak_symbols=$withval
15081 use_weak_symbols=no
15083 echo "$as_me:15083: result: $use_weak_symbols" >&5
15084 echo "${ECHO_T}$use_weak_symbols" >&6
15085 if test "$use_weak_symbols" = yes ; then
15087 echo "$as_me:15087: checking if $CC supports weak symbols" >&5
15088 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15089 if test "${cf_cv_weak_symbols+set}" = set; then
15090 echo $ECHO_N "(cached) $ECHO_C" >&6
15093 cat >"conftest.$ac_ext" <<_ACEOF
15094 #line 15094 "configure"
15095 #include "confdefs.h"
15102 #if defined(__GNUC__)
15103 # if defined __USE_ISOC99
15104 # define _cat_pragma(exp) _Pragma(#exp)
15105 # define _weak_pragma(exp) _cat_pragma(weak name)
15107 # define _weak_pragma(exp)
15109 # define _declare(name) __extension__ extern __typeof__(name) name
15110 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
15113 weak_symbol(fopen);
15119 rm -f "conftest.$ac_objext"
15120 if { (eval echo "$as_me:15120: \"$ac_compile\"") >&5
15121 (eval $ac_compile) 2>&5
15123 echo "$as_me:15123: \$? = $ac_status" >&5
15124 (exit "$ac_status"); } &&
15125 { ac_try='test -s "conftest.$ac_objext"'
15126 { (eval echo "$as_me:15126: \"$ac_try\"") >&5
15127 (eval $ac_try) 2>&5
15129 echo "$as_me:15129: \$? = $ac_status" >&5
15130 (exit "$ac_status"); }; }; then
15131 cf_cv_weak_symbols=yes
15133 echo "$as_me: failed program was:" >&5
15134 cat "conftest.$ac_ext" >&5
15135 cf_cv_weak_symbols=no
15137 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15140 echo "$as_me:15140: result: $cf_cv_weak_symbols" >&5
15141 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15144 cf_cv_weak_symbols=no
15147 if test $cf_cv_weak_symbols = yes ; then
15149 cat >>confdefs.h <<\EOF
15150 #define USE_WEAK_SYMBOLS 1
15156 if test "$with_pthread" = "yes" ; then
15158 cat >>confdefs.h <<\EOF
15159 #define USE_PTHREADS 1
15162 enable_reentrant=yes
15163 if test $cf_cv_weak_symbols = yes ; then
15168 # OpenSUSE is installing ncurses6, using reentrant option.
15169 echo "$as_me:15169: checking for _nc_TABSIZE" >&5
15170 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
15171 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
15172 echo $ECHO_N "(cached) $ECHO_C" >&6
15174 cat >"conftest.$ac_ext" <<_ACEOF
15175 #line 15175 "configure"
15176 #include "confdefs.h"
15177 #define _nc_TABSIZE autoconf_temporary
15178 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15185 /* We use char because int might match the return type of a gcc2
15186 builtin and then its argument prototype would still apply. */
15187 char _nc_TABSIZE (void);
15193 /* The GNU C library defines stubs for functions which it implements
15194 to always fail with ENOSYS. Some functions are actually named
15195 something starting with __ and the normal name is an alias. */
15196 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
15197 #error found stub for _nc_TABSIZE
15200 return _nc_TABSIZE ();
15205 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15206 if { (eval echo "$as_me:15206: \"$ac_link\"") >&5
15207 (eval $ac_link) 2>&5
15209 echo "$as_me:15209: \$? = $ac_status" >&5
15210 (exit "$ac_status"); } &&
15211 { ac_try='test -s "conftest$ac_exeext"'
15212 { (eval echo "$as_me:15212: \"$ac_try\"") >&5
15213 (eval $ac_try) 2>&5
15215 echo "$as_me:15215: \$? = $ac_status" >&5
15216 (exit "$ac_status"); }; }; then
15217 ac_cv_func__nc_TABSIZE=yes
15219 echo "$as_me: failed program was:" >&5
15220 cat "conftest.$ac_ext" >&5
15221 ac_cv_func__nc_TABSIZE=no
15223 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15225 echo "$as_me:15225: result: $ac_cv_func__nc_TABSIZE" >&5
15226 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
15227 if test "$ac_cv_func__nc_TABSIZE" = yes; then
15228 assume_reentrant=yes
15230 assume_reentrant=no
15233 # Reentrant code has to be opaque; there's little advantage to making ncurses
15234 # opaque outside of that, so there is no --enable-opaque option. We can use
15235 # this option without --with-pthreads, but this will be always set for
15237 echo "$as_me:15237: checking if you want experimental reentrant code" >&5
15238 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
15240 # Check whether --enable-reentrant or --disable-reentrant was given.
15241 if test "${enable_reentrant+set}" = set; then
15242 enableval="$enable_reentrant"
15243 with_reentrant=$enableval
15245 with_reentrant=$assume_reentrant
15247 echo "$as_me:15247: result: $with_reentrant" >&5
15248 echo "${ECHO_T}$with_reentrant" >&6
15249 if test "$with_reentrant" = yes ; then
15250 cf_cv_enable_reentrant=1
15251 if test $cf_cv_weak_symbols = yes ; then
15253 # remove pthread library from $LIBS
15254 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
15256 elif test "$assume_reentrant" = no ; then
15257 LIB_SUFFIX="t${LIB_SUFFIX}"
15260 cat >>confdefs.h <<\EOF
15261 #define USE_REENTRANT 1
15265 cf_cv_enable_reentrant=0
15268 ### Allow using a different wrap-prefix
15269 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15270 echo "$as_me:15270: checking for prefix used to wrap public variables" >&5
15271 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15273 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15274 if test "${with_wrap_prefix+set}" = set; then
15275 withval="$with_wrap_prefix"
15276 NCURSES_WRAP_PREFIX=$withval
15278 NCURSES_WRAP_PREFIX=_nc_
15280 echo "$as_me:15280: result: $NCURSES_WRAP_PREFIX" >&5
15281 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15283 NCURSES_WRAP_PREFIX=_nc_
15286 cat >>confdefs.h <<EOF
15287 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15290 ###############################################################################
15292 ### use option --disable-echo to suppress full display compiling commands
15294 echo "$as_me:15294: checking if you want to see long compiling messages" >&5
15295 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15297 # Check whether --enable-echo or --disable-echo was given.
15298 if test "${enable_echo+set}" = set; then
15299 enableval="$enable_echo"
15300 test "$enableval" != no && enableval=yes
15301 if test "$enableval" != "yes" ; then
15304 ECHO_LD='@echo linking $@;'
15305 RULE_CC='@echo compiling $<'
15306 SHOW_CC='@echo compiling $@'
15328 echo "$as_me:15328: result: $enableval" >&5
15329 echo "${ECHO_T}$enableval" >&6
15331 echo "$as_me:15331: checking if you want to use C11 _Noreturn feature" >&5
15332 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
15334 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
15335 if test "${enable_stdnoreturn+set}" = set; then
15336 enableval="$enable_stdnoreturn"
15337 test "$enableval" != yes && enableval=no
15338 if test "$enableval" != "no" ; then
15339 enable_stdnoreturn=yes
15341 enable_stdnoreturn=no
15345 enable_stdnoreturn=no
15348 echo "$as_me:15348: result: $enable_stdnoreturn" >&5
15349 echo "${ECHO_T}$enable_stdnoreturn" >&6
15351 if test $enable_stdnoreturn = yes; then
15352 echo "$as_me:15352: checking for C11 _Noreturn feature" >&5
15353 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
15354 if test "${cf_cv_c11_noreturn+set}" = set; then
15355 echo $ECHO_N "(cached) $ECHO_C" >&6
15357 cat >"conftest.$ac_ext" <<_ACEOF
15358 #line 15358 "configure"
15359 #include "confdefs.h"
15362 #include <stdlib.h>
15363 #include <stdnoreturn.h>
15364 static _Noreturn void giveup(void) { exit(0); }
15369 if (feof(stdin)) giveup()
15374 rm -f "conftest.$ac_objext"
15375 if { (eval echo "$as_me:15375: \"$ac_compile\"") >&5
15376 (eval $ac_compile) 2>&5
15378 echo "$as_me:15378: \$? = $ac_status" >&5
15379 (exit "$ac_status"); } &&
15380 { ac_try='test -s "conftest.$ac_objext"'
15381 { (eval echo "$as_me:15381: \"$ac_try\"") >&5
15382 (eval $ac_try) 2>&5
15384 echo "$as_me:15384: \$? = $ac_status" >&5
15385 (exit "$ac_status"); }; }; then
15386 cf_cv_c11_noreturn=yes
15388 echo "$as_me: failed program was:" >&5
15389 cat "conftest.$ac_ext" >&5
15390 cf_cv_c11_noreturn=no
15392 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15395 echo "$as_me:15395: result: $cf_cv_c11_noreturn" >&5
15396 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
15398 cf_cv_c11_noreturn=no,
15401 if test "$cf_cv_c11_noreturn" = yes; then
15403 cat >>confdefs.h <<\EOF
15404 #define HAVE_STDNORETURN_H 1
15407 cat >>confdefs.h <<EOF
15408 #define STDC_NORETURN _Noreturn
15411 HAVE_STDNORETURN_H=1
15413 HAVE_STDNORETURN_H=0
15416 if test "$GCC" = yes || test "$GXX" = yes
15419 if test "$GCC" = yes || test "$GXX" = yes
15423 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
15425 echo "${as_me:-configure}:15425: testing repairing CFLAGS: $CFLAGS ..." 1>&5
15428 for cf_temp_scan in $CFLAGS
15430 case "x$cf_temp_scan" in
15433 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15434 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15439 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15440 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15445 CFLAGS="$cf_temp_flags"
15446 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
15448 echo "${as_me:-configure}:15448: testing ... fixed $CFLAGS ..." 1>&5
15450 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15452 echo "${as_me:-configure}:15452: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15458 if test "$GCC" = yes || test "$GXX" = yes
15462 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
15464 echo "${as_me:-configure}:15464: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
15467 for cf_temp_scan in $CPPFLAGS
15469 case "x$cf_temp_scan" in
15472 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15473 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15478 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15479 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15484 CPPFLAGS="$cf_temp_flags"
15485 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
15487 echo "${as_me:-configure}:15487: testing ... fixed $CPPFLAGS ..." 1>&5
15489 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15491 echo "${as_me:-configure}:15491: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15497 if test "$GCC" = yes || test "$GXX" = yes
15501 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
15503 echo "${as_me:-configure}:15503: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
15506 for cf_temp_scan in $LDFLAGS
15508 case "x$cf_temp_scan" in
15511 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15512 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15517 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15518 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15523 LDFLAGS="$cf_temp_flags"
15524 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
15526 echo "${as_me:-configure}:15526: testing ... fixed $LDFLAGS ..." 1>&5
15528 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15530 echo "${as_me:-configure}:15530: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15536 echo "$as_me:15536: checking if you want to turn on gcc warnings" >&5
15537 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
15539 # Check whether --enable-warnings or --disable-warnings was given.
15540 if test "${enable_warnings+set}" = set; then
15541 enableval="$enable_warnings"
15542 test "$enableval" != yes && enableval=no
15543 if test "$enableval" != "no" ; then
15544 enable_warnings=yes
15553 echo "$as_me:15553: result: $enable_warnings" >&5
15554 echo "${ECHO_T}$enable_warnings" >&6
15555 if test "$enable_warnings" = "yes"
15558 if test "x$have_x" = xyes; then
15560 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15561 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15562 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15563 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15564 for cf_X_CFLAGS in $X_CFLAGS
15566 case "x$cf_X_CFLAGS" in
15568 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15571 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15576 cat >"conftest.$ac_ext" <<_ACEOF
15577 #line 15577 "configure"
15578 #include "confdefs.h"
15580 #include <stdlib.h>
15581 #include <X11/Intrinsic.h>
15586 String foo = malloc(1); free((void*)foo)
15591 rm -f "conftest.$ac_objext"
15592 if { (eval echo "$as_me:15592: \"$ac_compile\"") >&5
15593 (eval $ac_compile) 2>&5
15595 echo "$as_me:15595: \$? = $ac_status" >&5
15596 (exit "$ac_status"); } &&
15597 { ac_try='test -s "conftest.$ac_objext"'
15598 { (eval echo "$as_me:15598: \"$ac_try\"") >&5
15599 (eval $ac_try) 2>&5
15601 echo "$as_me:15601: \$? = $ac_status" >&5
15602 (exit "$ac_status"); }; }; then
15604 echo "$as_me:15604: checking for X11/Xt const-feature" >&5
15605 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15606 if test "${cf_cv_const_x_string+set}" = set; then
15607 echo $ECHO_N "(cached) $ECHO_C" >&6
15610 cat >"conftest.$ac_ext" <<_ACEOF
15611 #line 15611 "configure"
15612 #include "confdefs.h"
15614 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15615 #undef XTSTRINGDEFINES /* X11R5 and later */
15616 #include <stdlib.h>
15617 #include <X11/Intrinsic.h>
15622 String foo = malloc(1); *foo = 0
15627 rm -f "conftest.$ac_objext"
15628 if { (eval echo "$as_me:15628: \"$ac_compile\"") >&5
15629 (eval $ac_compile) 2>&5
15631 echo "$as_me:15631: \$? = $ac_status" >&5
15632 (exit "$ac_status"); } &&
15633 { ac_try='test -s "conftest.$ac_objext"'
15634 { (eval echo "$as_me:15634: \"$ac_try\"") >&5
15635 (eval $ac_try) 2>&5
15637 echo "$as_me:15637: \$? = $ac_status" >&5
15638 (exit "$ac_status"); }; }; then
15640 cf_cv_const_x_string=no
15643 echo "$as_me: failed program was:" >&5
15644 cat "conftest.$ac_ext" >&5
15646 cf_cv_const_x_string=yes
15649 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15652 echo "$as_me:15652: result: $cf_cv_const_x_string" >&5
15653 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15655 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
15656 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
15657 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
15659 case "$cf_cv_const_x_string" in
15662 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15663 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15668 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15669 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15675 echo "$as_me: failed program was:" >&5
15676 cat "conftest.$ac_ext" >&5
15678 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15680 cat > "conftest.$ac_ext" <<EOF
15681 #line 15681 "${as_me:-configure}"
15682 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15684 if test "$INTEL_COMPILER" = yes
15686 # The "-wdXXX" options suppress warnings:
15687 # remark #1419: external declaration in primary source file
15688 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15689 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15690 # remark #193: zero used for undefined preprocessing identifier
15691 # remark #593: variable "curs_sb_left_arrow" was set but never used
15692 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15693 # remark #869: parameter "tw" was never referenced
15694 # remark #981: operands are evaluated in unspecified order
15695 # warning #279: controlling expression is constant
15697 { echo "$as_me:15697: checking for $CC warning options..." >&5
15698 echo "$as_me: checking for $CC warning options..." >&6;}
15699 cf_save_CFLAGS="$CFLAGS"
15700 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
15712 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
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_opt" >&5
15719 echo "${ECHO_T}... -$cf_opt" >&6
15720 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15723 CFLAGS="$cf_save_CFLAGS"
15724 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
15726 { echo "$as_me:15726: checking for $CC warning options..." >&5
15727 echo "$as_me: checking for $CC warning options..." >&6;}
15728 cf_save_CFLAGS="$CFLAGS"
15730 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15731 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15732 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15733 for cf_opt in W Wall \
15734 Wbad-function-cast \
15737 Wdeclaration-after-statement \
15740 Wmissing-declarations \
15741 Wmissing-prototypes \
15745 Wstrict-prototypes \
15746 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15748 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15749 if { (eval echo "$as_me:15749: \"$ac_compile\"") >&5
15750 (eval $ac_compile) 2>&5
15752 echo "$as_me:15752: \$? = $ac_status" >&5
15753 (exit "$ac_status"); }; then
15754 test -n "$verbose" && echo "$as_me:15754: result: ... -$cf_opt" >&5
15755 echo "${ECHO_T}... -$cf_opt" >&6
15758 case "$GCC_VERSION" in
15760 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15762 echo "${as_me:-configure}:15762: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15768 case "$GCC_VERSION" in
15770 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15772 echo "${as_me:-configure}:15772: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15778 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15781 CFLAGS="$cf_save_CFLAGS"
15787 if test "$GCC" = yes || test "$GXX" = yes
15789 cat > conftest.i <<EOF
15791 #define GCC_PRINTF 0
15794 #define GCC_SCANF 0
15796 #ifndef GCC_NORETURN
15797 #define GCC_NORETURN /* nothing */
15800 #define GCC_UNUSED /* nothing */
15803 if test "$GCC" = yes
15805 { echo "$as_me:15805: checking for $CC __attribute__ directives..." >&5
15806 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15807 cat > "conftest.$ac_ext" <<EOF
15808 #line 15808 "${as_me:-configure}"
15809 #include "confdefs.h"
15810 #include "conftest.h"
15811 #include "conftest.i"
15813 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15815 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15818 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
15820 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
15822 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15823 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
15824 extern GCC_NORETURN void foo(void);
15825 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
15827 cf_printf_attribute=no
15828 cf_scanf_attribute=no
15829 for cf_attribute in scanf printf unused noreturn
15832 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15834 cf_directive="__attribute__(($cf_attribute))"
15835 echo "checking for $CC $cf_directive" 1>&5
15837 case "$cf_attribute" in
15839 cf_printf_attribute=yes
15840 cat >conftest.h <<EOF
15841 #define GCC_$cf_ATTRIBUTE 1
15845 cf_scanf_attribute=yes
15846 cat >conftest.h <<EOF
15847 #define GCC_$cf_ATTRIBUTE 1
15851 cat >conftest.h <<EOF
15852 #define GCC_$cf_ATTRIBUTE $cf_directive
15857 if { (eval echo "$as_me:15857: \"$ac_compile\"") >&5
15858 (eval $ac_compile) 2>&5
15860 echo "$as_me:15860: \$? = $ac_status" >&5
15861 (exit "$ac_status"); }; then
15862 test -n "$verbose" && echo "$as_me:15862: result: ... $cf_attribute" >&5
15863 echo "${ECHO_T}... $cf_attribute" >&6
15864 cat conftest.h >>confdefs.h
15865 case "$cf_attribute" in
15868 cat >>confdefs.h <<EOF
15869 #define GCC_NORETURN $cf_directive
15874 cf_value='/* nothing */'
15875 if test "$cf_printf_attribute" != no ; then
15876 cf_value='__attribute__((format(printf,fmt,var)))'
15878 cat >>confdefs.h <<\EOF
15879 #define GCC_PRINTF 1
15884 cat >>confdefs.h <<EOF
15885 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15890 cf_value='/* nothing */'
15891 if test "$cf_scanf_attribute" != no ; then
15892 cf_value='__attribute__((format(scanf,fmt,var)))'
15894 cat >>confdefs.h <<\EOF
15895 #define GCC_SCANF 1
15900 cat >>confdefs.h <<EOF
15901 #define GCC_SCANFLIKE(fmt,var) $cf_value
15907 cat >>confdefs.h <<EOF
15908 #define GCC_UNUSED $cf_directive
15916 ${FGREP-fgrep} define conftest.i >>confdefs.h
15923 if test "x$enable_warnings" = "xyes"; then
15925 ADAFLAGS="$ADAFLAGS -gnatg"
15929 ### use option --enable-assertions to turn on generation of assertion code
15930 echo "$as_me:15930: checking if you want to enable runtime assertions" >&5
15931 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15933 # Check whether --enable-assertions or --disable-assertions was given.
15934 if test "${enable_assertions+set}" = set; then
15935 enableval="$enable_assertions"
15936 with_assertions=$enableval
15940 echo "$as_me:15940: result: $with_assertions" >&5
15941 echo "${ECHO_T}$with_assertions" >&6
15944 if test "$with_assertions" = no
15946 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15949 ADAFLAGS="$ADAFLAGS -gnata"
15954 ### use option --disable-leaks to suppress "permanent" leaks, for testing
15956 cat >>confdefs.h <<\EOF
15957 #define HAVE_NC_ALLOC_H 1
15960 ### use option --enable-expanded to generate certain macros as functions
15962 # Check whether --enable-expanded or --disable-expanded was given.
15963 if test "${enable_expanded+set}" = set; then
15964 enableval="$enable_expanded"
15965 test "$enableval" = yes &&
15966 cat >>confdefs.h <<\EOF
15967 #define NCURSES_EXPANDED 1
15972 ### use option --disable-macros to suppress macros in favor of functions
15974 # Check whether --enable-macros or --disable-macros was given.
15975 if test "${enable_macros+set}" = set; then
15976 enableval="$enable_macros"
15977 test "$enableval" = no &&
15978 cat >>confdefs.h <<\EOF
15979 #define NCURSES_NOMACROS 1
15984 # Normally we only add trace() to the debug-library. Allow this to be
15985 # extended to all models of the ncurses library:
15987 case "$CFLAGS $CPPFLAGS" in
15993 echo "$as_me:15993: checking whether to add trace feature to all models" >&5
15994 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
15996 # Check whether --with-trace or --without-trace was given.
15997 if test "${with_trace+set}" = set; then
15998 withval="$with_trace"
15999 cf_with_trace=$withval
16001 cf_with_trace=$cf_all_traces
16003 echo "$as_me:16003: result: $cf_with_trace" >&5
16004 echo "${ECHO_T}$cf_with_trace" >&6
16006 if test "$cf_with_trace" = yes ; then
16012 cf_new_extra_cppflags=
16014 for cf_add_cflags in -DTRACE
16016 case "$cf_fix_cppflags" in
16018 case "$cf_add_cflags" in
16019 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16020 case "$cf_add_cflags" in
16022 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16024 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16025 && test -z "${cf_tst_cflags}" \
16026 && cf_fix_cppflags=yes
16028 if test "$cf_fix_cppflags" = yes ; then
16030 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16031 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16034 elif test "${cf_tst_cflags}" = "\"'" ; then
16036 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16037 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16043 case "$CPPFLAGS" in
16047 case "$cf_add_cflags" in
16049 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16051 CPPFLAGS=`echo "$CPPFLAGS" | \
16052 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16053 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16058 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16059 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16066 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16067 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16074 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16075 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16077 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16079 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16080 && test -z "${cf_tst_cflags}" \
16081 && cf_fix_cppflags=no
16086 if test -n "$cf_new_cflags" ; then
16088 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16089 CFLAGS="${CFLAGS}$cf_new_cflags"
16093 if test -n "$cf_new_cppflags" ; then
16095 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16096 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16100 if test -n "$cf_new_extra_cppflags" ; then
16102 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16103 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16111 echo "$as_me:16111: checking if we want to use GNAT projects" >&5
16112 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
16114 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
16115 if test "${enable_gnat_projects+set}" = set; then
16116 enableval="$enable_gnat_projects"
16117 test "$enableval" != no && enableval=yes
16118 if test "$enableval" != "yes" ; then
16119 enable_gnat_projects=no
16121 enable_gnat_projects=yes
16125 enable_gnat_projects=yes
16128 echo "$as_me:16128: result: $enable_gnat_projects" >&5
16129 echo "${ECHO_T}$enable_gnat_projects" >&6
16131 ### Checks for libraries.
16132 case $cf_cv_system_name in
16136 echo "$as_me:16136: checking for gettimeofday" >&5
16137 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
16138 if test "${ac_cv_func_gettimeofday+set}" = set; then
16139 echo $ECHO_N "(cached) $ECHO_C" >&6
16141 cat >"conftest.$ac_ext" <<_ACEOF
16142 #line 16142 "configure"
16143 #include "confdefs.h"
16144 #define gettimeofday autoconf_temporary
16145 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16146 #undef gettimeofday
16152 /* We use char because int might match the return type of a gcc2
16153 builtin and then its argument prototype would still apply. */
16154 char gettimeofday (void);
16160 /* The GNU C library defines stubs for functions which it implements
16161 to always fail with ENOSYS. Some functions are actually named
16162 something starting with __ and the normal name is an alias. */
16163 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16164 #error found stub for gettimeofday
16167 return gettimeofday ();
16172 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16173 if { (eval echo "$as_me:16173: \"$ac_link\"") >&5
16174 (eval $ac_link) 2>&5
16176 echo "$as_me:16176: \$? = $ac_status" >&5
16177 (exit "$ac_status"); } &&
16178 { ac_try='test -s "conftest$ac_exeext"'
16179 { (eval echo "$as_me:16179: \"$ac_try\"") >&5
16180 (eval $ac_try) 2>&5
16182 echo "$as_me:16182: \$? = $ac_status" >&5
16183 (exit "$ac_status"); }; }; then
16184 ac_cv_func_gettimeofday=yes
16186 echo "$as_me: failed program was:" >&5
16187 cat "conftest.$ac_ext" >&5
16188 ac_cv_func_gettimeofday=no
16190 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16192 echo "$as_me:16192: result: $ac_cv_func_gettimeofday" >&5
16193 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16194 if test "$ac_cv_func_gettimeofday" = yes; then
16195 cat >>confdefs.h <<\EOF
16196 #define HAVE_GETTIMEOFDAY 1
16201 echo "$as_me:16201: checking for gettimeofday in -lbsd" >&5
16202 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
16203 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
16204 echo $ECHO_N "(cached) $ECHO_C" >&6
16206 ac_check_lib_save_LIBS=$LIBS
16208 cat >"conftest.$ac_ext" <<_ACEOF
16209 #line 16209 "configure"
16210 #include "confdefs.h"
16212 /* Override any gcc2 internal prototype to avoid an error. */
16216 /* We use char because int might match the return type of a gcc2
16217 builtin and then its argument prototype would still apply. */
16218 char gettimeofday ();
16227 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16228 if { (eval echo "$as_me:16228: \"$ac_link\"") >&5
16229 (eval $ac_link) 2>&5
16231 echo "$as_me:16231: \$? = $ac_status" >&5
16232 (exit "$ac_status"); } &&
16233 { ac_try='test -s "conftest$ac_exeext"'
16234 { (eval echo "$as_me:16234: \"$ac_try\"") >&5
16235 (eval $ac_try) 2>&5
16237 echo "$as_me:16237: \$? = $ac_status" >&5
16238 (exit "$ac_status"); }; }; then
16239 ac_cv_lib_bsd_gettimeofday=yes
16241 echo "$as_me: failed program was:" >&5
16242 cat "conftest.$ac_ext" >&5
16243 ac_cv_lib_bsd_gettimeofday=no
16245 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16246 LIBS=$ac_check_lib_save_LIBS
16248 echo "$as_me:16248: result: $ac_cv_lib_bsd_gettimeofday" >&5
16249 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
16250 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
16252 cat >>confdefs.h <<\EOF
16253 #define HAVE_GETTIMEOFDAY 1
16263 ### Checks for header files.
16264 echo "$as_me:16264: checking for ANSI C header files" >&5
16265 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16266 if test "${ac_cv_header_stdc+set}" = set; then
16267 echo $ECHO_N "(cached) $ECHO_C" >&6
16269 cat >"conftest.$ac_ext" <<_ACEOF
16270 #line 16270 "configure"
16271 #include "confdefs.h"
16272 #include <stdlib.h>
16273 #include <stdarg.h>
16274 #include <string.h>
16278 if { (eval echo "$as_me:16278: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16279 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16281 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16283 cat conftest.err >&5
16284 echo "$as_me:16284: \$? = $ac_status" >&5
16285 (exit "$ac_status"); } >/dev/null; then
16286 if test -s conftest.err; then
16287 ac_cpp_err=$ac_c_preproc_warn_flag
16294 if test -z "$ac_cpp_err"; then
16295 ac_cv_header_stdc=yes
16297 echo "$as_me: failed program was:" >&5
16298 cat "conftest.$ac_ext" >&5
16299 ac_cv_header_stdc=no
16301 rm -f conftest.err "conftest.$ac_ext"
16303 if test $ac_cv_header_stdc = yes; then
16304 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16305 cat >"conftest.$ac_ext" <<_ACEOF
16306 #line 16306 "configure"
16307 #include "confdefs.h"
16308 #include <string.h>
16311 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16312 $EGREP "memchr" >/dev/null 2>&1; then
16315 ac_cv_header_stdc=no
16321 if test $ac_cv_header_stdc = yes; then
16322 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16323 cat >"conftest.$ac_ext" <<_ACEOF
16324 #line 16324 "configure"
16325 #include "confdefs.h"
16326 #include <stdlib.h>
16329 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16330 $EGREP "free" >/dev/null 2>&1; then
16333 ac_cv_header_stdc=no
16339 if test $ac_cv_header_stdc = yes; then
16340 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16341 if test "$cross_compiling" = yes; then
16344 cat >"conftest.$ac_ext" <<_ACEOF
16345 #line 16345 "configure"
16346 #include "confdefs.h"
16348 #if ((' ' & 0x0FF) == 0x020)
16349 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16350 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16352 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16353 || ('j' <= (c) && (c) <= 'r') \
16354 || ('s' <= (c) && (c) <= 'z'))
16355 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16358 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16363 for (i = 0; i < 256; i++)
16364 if (XOR (islower (i), ISLOWER (i))
16365 || toupper (i) != TOUPPER (i))
16366 $ac_main_return(2);
16367 $ac_main_return (0);
16370 rm -f "conftest$ac_exeext"
16371 if { (eval echo "$as_me:16371: \"$ac_link\"") >&5
16372 (eval $ac_link) 2>&5
16374 echo "$as_me:16374: \$? = $ac_status" >&5
16375 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16376 { (eval echo "$as_me:16376: \"$ac_try\"") >&5
16377 (eval $ac_try) 2>&5
16379 echo "$as_me:16379: \$? = $ac_status" >&5
16380 (exit "$ac_status"); }; }; then
16383 echo "$as_me: program exited with status $ac_status" >&5
16384 echo "$as_me: failed program was:" >&5
16385 cat "conftest.$ac_ext" >&5
16386 ac_cv_header_stdc=no
16388 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16392 echo "$as_me:16392: result: $ac_cv_header_stdc" >&5
16393 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16394 if test $ac_cv_header_stdc = yes; then
16396 cat >>confdefs.h <<\EOF
16397 #define STDC_HEADERS 1
16402 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
16404 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
16405 inttypes.h stdint.h unistd.h
16407 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16408 echo "$as_me:16408: checking for $ac_header" >&5
16409 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16410 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16411 echo $ECHO_N "(cached) $ECHO_C" >&6
16413 cat >"conftest.$ac_ext" <<_ACEOF
16414 #line 16414 "configure"
16415 #include "confdefs.h"
16416 $ac_includes_default
16417 #include <$ac_header>
16419 rm -f "conftest.$ac_objext"
16420 if { (eval echo "$as_me:16420: \"$ac_compile\"") >&5
16421 (eval $ac_compile) 2>&5
16423 echo "$as_me:16423: \$? = $ac_status" >&5
16424 (exit "$ac_status"); } &&
16425 { ac_try='test -s "conftest.$ac_objext"'
16426 { (eval echo "$as_me:16426: \"$ac_try\"") >&5
16427 (eval $ac_try) 2>&5
16429 echo "$as_me:16429: \$? = $ac_status" >&5
16430 (exit "$ac_status"); }; }; then
16431 eval "$as_ac_Header=yes"
16433 echo "$as_me: failed program was:" >&5
16434 cat "conftest.$ac_ext" >&5
16435 eval "$as_ac_Header=no"
16437 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16439 echo "$as_me:16439: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16440 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16441 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16442 cat >>confdefs.h <<EOF
16443 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16449 echo "$as_me:16449: checking for signed char" >&5
16450 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
16451 if test "${ac_cv_type_signed_char+set}" = set; then
16452 echo $ECHO_N "(cached) $ECHO_C" >&6
16454 cat >"conftest.$ac_ext" <<_ACEOF
16455 #line 16455 "configure"
16456 #include "confdefs.h"
16457 $ac_includes_default
16461 if ((signed char *) 0)
16463 if (sizeof (signed char))
16469 rm -f "conftest.$ac_objext"
16470 if { (eval echo "$as_me:16470: \"$ac_compile\"") >&5
16471 (eval $ac_compile) 2>&5
16473 echo "$as_me:16473: \$? = $ac_status" >&5
16474 (exit "$ac_status"); } &&
16475 { ac_try='test -s "conftest.$ac_objext"'
16476 { (eval echo "$as_me:16476: \"$ac_try\"") >&5
16477 (eval $ac_try) 2>&5
16479 echo "$as_me:16479: \$? = $ac_status" >&5
16480 (exit "$ac_status"); }; }; then
16481 ac_cv_type_signed_char=yes
16483 echo "$as_me: failed program was:" >&5
16484 cat "conftest.$ac_ext" >&5
16485 ac_cv_type_signed_char=no
16487 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16489 echo "$as_me:16489: result: $ac_cv_type_signed_char" >&5
16490 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
16492 echo "$as_me:16492: checking size of signed char" >&5
16493 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
16494 if test "${ac_cv_sizeof_signed_char+set}" = set; then
16495 echo $ECHO_N "(cached) $ECHO_C" >&6
16497 if test "$ac_cv_type_signed_char" = yes; then
16498 if test "$cross_compiling" = yes; then
16499 # Depending upon the size, compute the lo and hi bounds.
16500 cat >"conftest.$ac_ext" <<_ACEOF
16501 #line 16501 "configure"
16502 #include "confdefs.h"
16503 $ac_includes_default
16507 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
16512 rm -f "conftest.$ac_objext"
16513 if { (eval echo "$as_me:16513: \"$ac_compile\"") >&5
16514 (eval $ac_compile) 2>&5
16516 echo "$as_me:16516: \$? = $ac_status" >&5
16517 (exit "$ac_status"); } &&
16518 { ac_try='test -s "conftest.$ac_objext"'
16519 { (eval echo "$as_me:16519: \"$ac_try\"") >&5
16520 (eval $ac_try) 2>&5
16522 echo "$as_me:16522: \$? = $ac_status" >&5
16523 (exit "$ac_status"); }; }; then
16526 cat >"conftest.$ac_ext" <<_ACEOF
16527 #line 16527 "configure"
16528 #include "confdefs.h"
16529 $ac_includes_default
16533 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16538 rm -f "conftest.$ac_objext"
16539 if { (eval echo "$as_me:16539: \"$ac_compile\"") >&5
16540 (eval $ac_compile) 2>&5
16542 echo "$as_me:16542: \$? = $ac_status" >&5
16543 (exit "$ac_status"); } &&
16544 { ac_try='test -s "conftest.$ac_objext"'
16545 { (eval echo "$as_me:16545: \"$ac_try\"") >&5
16546 (eval $ac_try) 2>&5
16548 echo "$as_me:16548: \$? = $ac_status" >&5
16549 (exit "$ac_status"); }; }; then
16550 ac_hi=$ac_mid; break
16552 echo "$as_me: failed program was:" >&5
16553 cat "conftest.$ac_ext" >&5
16554 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
16556 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16559 echo "$as_me: failed program was:" >&5
16560 cat "conftest.$ac_ext" >&5
16563 cat >"conftest.$ac_ext" <<_ACEOF
16564 #line 16564 "configure"
16565 #include "confdefs.h"
16566 $ac_includes_default
16570 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
16575 rm -f "conftest.$ac_objext"
16576 if { (eval echo "$as_me:16576: \"$ac_compile\"") >&5
16577 (eval $ac_compile) 2>&5
16579 echo "$as_me:16579: \$? = $ac_status" >&5
16580 (exit "$ac_status"); } &&
16581 { ac_try='test -s "conftest.$ac_objext"'
16582 { (eval echo "$as_me:16582: \"$ac_try\"") >&5
16583 (eval $ac_try) 2>&5
16585 echo "$as_me:16585: \$? = $ac_status" >&5
16586 (exit "$ac_status"); }; }; then
16587 ac_lo=$ac_mid; break
16589 echo "$as_me: failed program was:" >&5
16590 cat "conftest.$ac_ext" >&5
16591 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
16593 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16596 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16597 # Binary search between lo and hi bounds.
16598 while test "x$ac_lo" != "x$ac_hi"; do
16599 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
16600 cat >"conftest.$ac_ext" <<_ACEOF
16601 #line 16601 "configure"
16602 #include "confdefs.h"
16603 $ac_includes_default
16607 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16612 rm -f "conftest.$ac_objext"
16613 if { (eval echo "$as_me:16613: \"$ac_compile\"") >&5
16614 (eval $ac_compile) 2>&5
16616 echo "$as_me:16616: \$? = $ac_status" >&5
16617 (exit "$ac_status"); } &&
16618 { ac_try='test -s "conftest.$ac_objext"'
16619 { (eval echo "$as_me:16619: \"$ac_try\"") >&5
16620 (eval $ac_try) 2>&5
16622 echo "$as_me:16622: \$? = $ac_status" >&5
16623 (exit "$ac_status"); }; }; then
16626 echo "$as_me: failed program was:" >&5
16627 cat "conftest.$ac_ext" >&5
16628 ac_lo=`expr "$ac_mid" + 1`
16630 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16632 ac_cv_sizeof_signed_char=$ac_lo
16634 if test "$cross_compiling" = yes; then
16635 { { echo "$as_me:16635: error: cannot run test program while cross compiling" >&5
16636 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16637 { (exit 1); exit 1; }; }
16639 cat >"conftest.$ac_ext" <<_ACEOF
16640 #line 16640 "configure"
16641 #include "confdefs.h"
16642 $ac_includes_default
16646 FILE *f = fopen ("conftest.val", "w");
16648 $ac_main_return (1);
16649 fprintf (f, "%ld", (long)(sizeof (signed char)));
16655 rm -f "conftest$ac_exeext"
16656 if { (eval echo "$as_me:16656: \"$ac_link\"") >&5
16657 (eval $ac_link) 2>&5
16659 echo "$as_me:16659: \$? = $ac_status" >&5
16660 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16661 { (eval echo "$as_me:16661: \"$ac_try\"") >&5
16662 (eval $ac_try) 2>&5
16664 echo "$as_me:16664: \$? = $ac_status" >&5
16665 (exit "$ac_status"); }; }; then
16666 ac_cv_sizeof_signed_char=`cat conftest.val`
16668 echo "$as_me: program exited with status $ac_status" >&5
16669 echo "$as_me: failed program was:" >&5
16670 cat "conftest.$ac_ext" >&5
16672 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16677 ac_cv_sizeof_signed_char=0
16680 echo "$as_me:16680: result: $ac_cv_sizeof_signed_char" >&5
16681 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
16682 cat >>confdefs.h <<EOF
16683 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
16686 echo "$as_me:16686: checking for ANSI C header files" >&5
16687 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16688 if test "${ac_cv_header_stdc+set}" = set; then
16689 echo $ECHO_N "(cached) $ECHO_C" >&6
16691 cat >"conftest.$ac_ext" <<_ACEOF
16692 #line 16692 "configure"
16693 #include "confdefs.h"
16694 #include <stdlib.h>
16695 #include <stdarg.h>
16696 #include <string.h>
16700 if { (eval echo "$as_me:16700: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16701 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16703 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16705 cat conftest.err >&5
16706 echo "$as_me:16706: \$? = $ac_status" >&5
16707 (exit "$ac_status"); } >/dev/null; then
16708 if test -s conftest.err; then
16709 ac_cpp_err=$ac_c_preproc_warn_flag
16716 if test -z "$ac_cpp_err"; then
16717 ac_cv_header_stdc=yes
16719 echo "$as_me: failed program was:" >&5
16720 cat "conftest.$ac_ext" >&5
16721 ac_cv_header_stdc=no
16723 rm -f conftest.err "conftest.$ac_ext"
16725 if test $ac_cv_header_stdc = yes; then
16726 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16727 cat >"conftest.$ac_ext" <<_ACEOF
16728 #line 16728 "configure"
16729 #include "confdefs.h"
16730 #include <string.h>
16733 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16734 $EGREP "memchr" >/dev/null 2>&1; then
16737 ac_cv_header_stdc=no
16743 if test $ac_cv_header_stdc = yes; then
16744 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16745 cat >"conftest.$ac_ext" <<_ACEOF
16746 #line 16746 "configure"
16747 #include "confdefs.h"
16748 #include <stdlib.h>
16751 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16752 $EGREP "free" >/dev/null 2>&1; then
16755 ac_cv_header_stdc=no
16761 if test $ac_cv_header_stdc = yes; then
16762 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16763 if test "$cross_compiling" = yes; then
16766 cat >"conftest.$ac_ext" <<_ACEOF
16767 #line 16767 "configure"
16768 #include "confdefs.h"
16770 #if ((' ' & 0x0FF) == 0x020)
16771 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16772 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16774 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16775 || ('j' <= (c) && (c) <= 'r') \
16776 || ('s' <= (c) && (c) <= 'z'))
16777 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16780 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16785 for (i = 0; i < 256; i++)
16786 if (XOR (islower (i), ISLOWER (i))
16787 || toupper (i) != TOUPPER (i))
16788 $ac_main_return(2);
16789 $ac_main_return (0);
16792 rm -f "conftest$ac_exeext"
16793 if { (eval echo "$as_me:16793: \"$ac_link\"") >&5
16794 (eval $ac_link) 2>&5
16796 echo "$as_me:16796: \$? = $ac_status" >&5
16797 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16798 { (eval echo "$as_me:16798: \"$ac_try\"") >&5
16799 (eval $ac_try) 2>&5
16801 echo "$as_me:16801: \$? = $ac_status" >&5
16802 (exit "$ac_status"); }; }; then
16805 echo "$as_me: program exited with status $ac_status" >&5
16806 echo "$as_me: failed program was:" >&5
16807 cat "conftest.$ac_ext" >&5
16808 ac_cv_header_stdc=no
16810 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16814 echo "$as_me:16814: result: $ac_cv_header_stdc" >&5
16815 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16816 if test $ac_cv_header_stdc = yes; then
16818 cat >>confdefs.h <<\EOF
16819 #define STDC_HEADERS 1
16824 ac_header_dirent=no
16825 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16826 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16827 echo "$as_me:16827: checking for $ac_hdr that defines DIR" >&5
16828 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16829 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16830 echo $ECHO_N "(cached) $ECHO_C" >&6
16832 cat >"conftest.$ac_ext" <<_ACEOF
16833 #line 16833 "configure"
16834 #include "confdefs.h"
16835 #include <sys/types.h>
16847 rm -f "conftest.$ac_objext"
16848 if { (eval echo "$as_me:16848: \"$ac_compile\"") >&5
16849 (eval $ac_compile) 2>&5
16851 echo "$as_me:16851: \$? = $ac_status" >&5
16852 (exit "$ac_status"); } &&
16853 { ac_try='test -s "conftest.$ac_objext"'
16854 { (eval echo "$as_me:16854: \"$ac_try\"") >&5
16855 (eval $ac_try) 2>&5
16857 echo "$as_me:16857: \$? = $ac_status" >&5
16858 (exit "$ac_status"); }; }; then
16859 eval "$as_ac_Header=yes"
16861 echo "$as_me: failed program was:" >&5
16862 cat "conftest.$ac_ext" >&5
16863 eval "$as_ac_Header=no"
16865 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16867 echo "$as_me:16867: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16868 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16869 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16870 cat >>confdefs.h <<EOF
16871 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16874 ac_header_dirent=$ac_hdr; break
16878 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
16879 if test $ac_header_dirent = dirent.h; then
16880 echo "$as_me:16880: checking for opendir in -ldir" >&5
16881 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
16882 if test "${ac_cv_lib_dir_opendir+set}" = set; then
16883 echo $ECHO_N "(cached) $ECHO_C" >&6
16885 ac_check_lib_save_LIBS=$LIBS
16887 cat >"conftest.$ac_ext" <<_ACEOF
16888 #line 16888 "configure"
16889 #include "confdefs.h"
16891 /* Override any gcc2 internal prototype to avoid an error. */
16895 /* We use char because int might match the return type of a gcc2
16896 builtin and then its argument prototype would still apply. */
16906 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16907 if { (eval echo "$as_me:16907: \"$ac_link\"") >&5
16908 (eval $ac_link) 2>&5
16910 echo "$as_me:16910: \$? = $ac_status" >&5
16911 (exit "$ac_status"); } &&
16912 { ac_try='test -s "conftest$ac_exeext"'
16913 { (eval echo "$as_me:16913: \"$ac_try\"") >&5
16914 (eval $ac_try) 2>&5
16916 echo "$as_me:16916: \$? = $ac_status" >&5
16917 (exit "$ac_status"); }; }; then
16918 ac_cv_lib_dir_opendir=yes
16920 echo "$as_me: failed program was:" >&5
16921 cat "conftest.$ac_ext" >&5
16922 ac_cv_lib_dir_opendir=no
16924 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16925 LIBS=$ac_check_lib_save_LIBS
16927 echo "$as_me:16927: result: $ac_cv_lib_dir_opendir" >&5
16928 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
16929 if test "$ac_cv_lib_dir_opendir" = yes; then
16934 echo "$as_me:16934: checking for opendir in -lx" >&5
16935 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
16936 if test "${ac_cv_lib_x_opendir+set}" = set; then
16937 echo $ECHO_N "(cached) $ECHO_C" >&6
16939 ac_check_lib_save_LIBS=$LIBS
16941 cat >"conftest.$ac_ext" <<_ACEOF
16942 #line 16942 "configure"
16943 #include "confdefs.h"
16945 /* Override any gcc2 internal prototype to avoid an error. */
16949 /* We use char because int might match the return type of a gcc2
16950 builtin and then its argument prototype would still apply. */
16960 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16961 if { (eval echo "$as_me:16961: \"$ac_link\"") >&5
16962 (eval $ac_link) 2>&5
16964 echo "$as_me:16964: \$? = $ac_status" >&5
16965 (exit "$ac_status"); } &&
16966 { ac_try='test -s "conftest$ac_exeext"'
16967 { (eval echo "$as_me:16967: \"$ac_try\"") >&5
16968 (eval $ac_try) 2>&5
16970 echo "$as_me:16970: \$? = $ac_status" >&5
16971 (exit "$ac_status"); }; }; then
16972 ac_cv_lib_x_opendir=yes
16974 echo "$as_me: failed program was:" >&5
16975 cat "conftest.$ac_ext" >&5
16976 ac_cv_lib_x_opendir=no
16978 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16979 LIBS=$ac_check_lib_save_LIBS
16981 echo "$as_me:16981: result: $ac_cv_lib_x_opendir" >&5
16982 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
16983 if test "$ac_cv_lib_x_opendir" = yes; then
16989 echo "$as_me:16989: checking whether time.h and sys/time.h may both be included" >&5
16990 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16991 if test "${ac_cv_header_time+set}" = set; then
16992 echo $ECHO_N "(cached) $ECHO_C" >&6
16994 cat >"conftest.$ac_ext" <<_ACEOF
16995 #line 16995 "configure"
16996 #include "confdefs.h"
16997 #include <sys/types.h>
16998 #include <sys/time.h>
17004 if ((struct tm *) 0)
17010 rm -f "conftest.$ac_objext"
17011 if { (eval echo "$as_me:17011: \"$ac_compile\"") >&5
17012 (eval $ac_compile) 2>&5
17014 echo "$as_me:17014: \$? = $ac_status" >&5
17015 (exit "$ac_status"); } &&
17016 { ac_try='test -s "conftest.$ac_objext"'
17017 { (eval echo "$as_me:17017: \"$ac_try\"") >&5
17018 (eval $ac_try) 2>&5
17020 echo "$as_me:17020: \$? = $ac_status" >&5
17021 (exit "$ac_status"); }; }; then
17022 ac_cv_header_time=yes
17024 echo "$as_me: failed program was:" >&5
17025 cat "conftest.$ac_ext" >&5
17026 ac_cv_header_time=no
17028 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17030 echo "$as_me:17030: result: $ac_cv_header_time" >&5
17031 echo "${ECHO_T}$ac_cv_header_time" >&6
17032 if test $ac_cv_header_time = yes; then
17034 cat >>confdefs.h <<\EOF
17035 #define TIME_WITH_SYS_TIME 1
17040 ### checks for compiler characteristics
17042 ac_cpp='$CPP $CPPFLAGS'
17043 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17044 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17045 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17046 ac_main_return="return"
17048 echo "$as_me:17048: checking for an ANSI C-conforming const" >&5
17049 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17050 if test "${ac_cv_c_const+set}" = set; then
17051 echo $ECHO_N "(cached) $ECHO_C" >&6
17053 cat >"conftest.$ac_ext" <<_ACEOF
17054 #line 17054 "configure"
17055 #include "confdefs.h"
17060 /* FIXME: Include the comments suggested by Paul. */
17061 #ifndef __cplusplus
17062 /* Ultrix mips cc rejects this. */
17063 typedef int charset[2];
17065 /* SunOS 4.1.1 cc rejects this. */
17066 char const *const *ccp;
17068 /* NEC SVR4.0.2 mips cc rejects this. */
17069 struct point {int x, y;};
17070 static struct point const zero = {0,0};
17071 /* AIX XL C 1.02.0.0 rejects this.
17072 It does not let you subtract one const X* pointer from another in
17073 an arm of an if-expression whose if-part is not a constant
17075 const char *g = "string";
17076 ccp = &g + (g ? g-g : 0);
17077 /* HPUX 7.0 cc rejects these. */
17080 ccp = (char const *const *) p;
17081 { /* SCO 3.2v4 cc rejects this. */
17083 char const *s = 0 ? (char *) 0 : (char const *) 0;
17087 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
17088 int x[] = {25, 17};
17089 const int *foo = &x[0];
17092 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17093 typedef const int *iptr;
17097 { /* AIX XL C 1.02.0.0 rejects this saying
17098 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17099 struct s { int j; const int *ap[3]; };
17100 struct s *b; b->j = 5;
17102 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17103 const int foo = 10;
17111 rm -f "conftest.$ac_objext"
17112 if { (eval echo "$as_me:17112: \"$ac_compile\"") >&5
17113 (eval $ac_compile) 2>&5
17115 echo "$as_me:17115: \$? = $ac_status" >&5
17116 (exit "$ac_status"); } &&
17117 { ac_try='test -s "conftest.$ac_objext"'
17118 { (eval echo "$as_me:17118: \"$ac_try\"") >&5
17119 (eval $ac_try) 2>&5
17121 echo "$as_me:17121: \$? = $ac_status" >&5
17122 (exit "$ac_status"); }; }; then
17125 echo "$as_me: failed program was:" >&5
17126 cat "conftest.$ac_ext" >&5
17129 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17131 echo "$as_me:17131: result: $ac_cv_c_const" >&5
17132 echo "${ECHO_T}$ac_cv_c_const" >&6
17133 if test $ac_cv_c_const = no; then
17135 cat >>confdefs.h <<\EOF
17141 ### Checks for external-data
17143 echo "$as_me:17143: checking if data-only library module links" >&5
17144 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
17145 if test "${cf_cv_link_dataonly+set}" = set; then
17146 echo $ECHO_N "(cached) $ECHO_C" >&6
17150 cat >conftest.$ac_ext <<EOF
17151 #line 17151 "configure"
17152 int testdata[3] = { 123, 456, 789 };
17154 if { (eval echo "$as_me:17154: \"$ac_compile\"") >&5
17155 (eval $ac_compile) 2>&5
17157 echo "$as_me:17157: \$? = $ac_status" >&5
17158 (exit "$ac_status"); } ; then
17159 mv conftest.o data.o && \
17160 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
17162 rm -f conftest.$ac_ext data.o
17163 cat >conftest.$ac_ext <<EOF
17164 #line 17164 "configure"
17168 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
17170 extern int testdata[3];
17171 return testdata[0] == 123
17172 && testdata[1] == 456
17173 && testdata[2] == 789;
17177 if { (eval echo "$as_me:17177: \"$ac_compile\"") >&5
17178 (eval $ac_compile) 2>&5
17180 echo "$as_me:17180: \$? = $ac_status" >&5
17181 (exit "$ac_status"); }; then
17182 mv conftest.o func.o && \
17183 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17185 rm -f conftest.$ac_ext func.o
17186 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17187 cf_saveLIBS="$LIBS"
17188 LIBS="conftest.a $LIBS"
17189 if test "$cross_compiling" = yes; then
17190 cf_cv_link_dataonly=unknown
17192 cat >"conftest.$ac_ext" <<_ACEOF
17193 #line 17193 "configure"
17194 #include "confdefs.h"
17198 extern int testfunc();
17199 ${cf_cv_main_return:-return} (!testfunc());
17203 rm -f "conftest$ac_exeext"
17204 if { (eval echo "$as_me:17204: \"$ac_link\"") >&5
17205 (eval $ac_link) 2>&5
17207 echo "$as_me:17207: \$? = $ac_status" >&5
17208 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17209 { (eval echo "$as_me:17209: \"$ac_try\"") >&5
17210 (eval $ac_try) 2>&5
17212 echo "$as_me:17212: \$? = $ac_status" >&5
17213 (exit "$ac_status"); }; }; then
17214 cf_cv_link_dataonly=yes
17216 echo "$as_me: program exited with status $ac_status" >&5
17217 echo "$as_me: failed program was:" >&5
17218 cat "conftest.$ac_ext" >&5
17219 cf_cv_link_dataonly=no
17221 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17223 LIBS="$cf_saveLIBS"
17227 echo "$as_me:17227: result: $cf_cv_link_dataonly" >&5
17228 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17230 if test "$cf_cv_link_dataonly" = no ; then
17232 cat >>confdefs.h <<\EOF
17233 #define BROKEN_LINKER 1
17239 ### Checks for library functions.
17245 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17246 echo "$as_me:17246: checking for $ac_header" >&5
17247 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17248 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17249 echo $ECHO_N "(cached) $ECHO_C" >&6
17251 cat >"conftest.$ac_ext" <<_ACEOF
17252 #line 17252 "configure"
17253 #include "confdefs.h"
17254 #include <$ac_header>
17256 if { (eval echo "$as_me:17256: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17257 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17259 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17261 cat conftest.err >&5
17262 echo "$as_me:17262: \$? = $ac_status" >&5
17263 (exit "$ac_status"); } >/dev/null; then
17264 if test -s conftest.err; then
17265 ac_cpp_err=$ac_c_preproc_warn_flag
17272 if test -z "$ac_cpp_err"; then
17273 eval "$as_ac_Header=yes"
17275 echo "$as_me: failed program was:" >&5
17276 cat "conftest.$ac_ext" >&5
17277 eval "$as_ac_Header=no"
17279 rm -f conftest.err "conftest.$ac_ext"
17281 echo "$as_me:17281: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17282 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17283 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17284 cat >>confdefs.h <<EOF
17285 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17291 echo "$as_me:17291: checking for working mkstemp" >&5
17292 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17293 if test "${cf_cv_func_mkstemp+set}" = set; then
17294 echo $ECHO_N "(cached) $ECHO_C" >&6
17298 if test "$cross_compiling" = yes; then
17299 cf_cv_func_mkstemp=maybe
17301 cat >"conftest.$ac_ext" <<_ACEOF
17302 #line 17302 "configure"
17303 #include "confdefs.h"
17305 #include <sys/types.h>
17306 #ifdef HAVE_UNISTD_H
17307 #include <unistd.h>
17309 #include <stdlib.h>
17311 #include <string.h>
17312 #include <sys/stat.h>
17315 char *tmpl = "conftestXXXXXX";
17323 for (n = 0; n < 2; ++n) {
17324 strcpy(name[n], tmpl);
17325 if ((fd = mkstemp(name[n])) >= 0) {
17326 if (!strcmp(name[n], tmpl)
17327 || stat(name[n], &sb) != 0
17328 || (sb.st_mode & S_IFMT) != S_IFREG
17329 || (sb.st_mode & 077) != 0) {
17336 && !strcmp(name[0], name[1]))
17338 ${cf_cv_main_return:-return}(result);
17342 rm -f "conftest$ac_exeext"
17343 if { (eval echo "$as_me:17343: \"$ac_link\"") >&5
17344 (eval $ac_link) 2>&5
17346 echo "$as_me:17346: \$? = $ac_status" >&5
17347 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17348 { (eval echo "$as_me:17348: \"$ac_try\"") >&5
17349 (eval $ac_try) 2>&5
17351 echo "$as_me:17351: \$? = $ac_status" >&5
17352 (exit "$ac_status"); }; }; then
17353 cf_cv_func_mkstemp=yes
17356 echo "$as_me: program exited with status $ac_status" >&5
17357 echo "$as_me: failed program was:" >&5
17358 cat "conftest.$ac_ext" >&5
17359 cf_cv_func_mkstemp=no
17362 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17366 echo "$as_me:17366: result: $cf_cv_func_mkstemp" >&5
17367 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17368 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17369 echo "$as_me:17369: checking for mkstemp" >&5
17370 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17371 if test "${ac_cv_func_mkstemp+set}" = set; then
17372 echo $ECHO_N "(cached) $ECHO_C" >&6
17374 cat >"conftest.$ac_ext" <<_ACEOF
17375 #line 17375 "configure"
17376 #include "confdefs.h"
17377 #define mkstemp autoconf_temporary
17378 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17385 /* We use char because int might match the return type of a gcc2
17386 builtin and then its argument prototype would still apply. */
17387 char mkstemp (void);
17393 /* The GNU C library defines stubs for functions which it implements
17394 to always fail with ENOSYS. Some functions are actually named
17395 something starting with __ and the normal name is an alias. */
17396 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17397 #error found stub for mkstemp
17405 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17406 if { (eval echo "$as_me:17406: \"$ac_link\"") >&5
17407 (eval $ac_link) 2>&5
17409 echo "$as_me:17409: \$? = $ac_status" >&5
17410 (exit "$ac_status"); } &&
17411 { ac_try='test -s "conftest$ac_exeext"'
17412 { (eval echo "$as_me:17412: \"$ac_try\"") >&5
17413 (eval $ac_try) 2>&5
17415 echo "$as_me:17415: \$? = $ac_status" >&5
17416 (exit "$ac_status"); }; }; then
17417 ac_cv_func_mkstemp=yes
17419 echo "$as_me: failed program was:" >&5
17420 cat "conftest.$ac_ext" >&5
17421 ac_cv_func_mkstemp=no
17423 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17425 echo "$as_me:17425: result: $ac_cv_func_mkstemp" >&5
17426 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17429 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17431 cat >>confdefs.h <<\EOF
17432 #define HAVE_MKSTEMP 1
17437 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17438 CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17439 CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17443 if test "$cf_with_ada" != "no" ; then
17445 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
17448 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17450 unset ac_cv_path_cf_TEMP_gnat
17452 # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
17453 set dummy $cf_prog_gnat; ac_word=$2
17454 echo "$as_me:17454: checking for $ac_word" >&5
17455 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17456 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
17457 echo $ECHO_N "(cached) $ECHO_C" >&6
17459 case $cf_TEMP_gnat in
17461 ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
17464 ac_save_IFS=$IFS; IFS=$ac_path_separator
17466 for ac_dir in $ac_dummy; do
17468 test -z "$ac_dir" && ac_dir=.
17469 if $as_executable_p "$ac_dir/$ac_word"; then
17470 ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
17471 echo "$as_me:17471: found $ac_dir/$ac_word" >&5
17476 test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
17480 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
17482 if test -n "$cf_TEMP_gnat"; then
17483 echo "$as_me:17483: result: $cf_TEMP_gnat" >&5
17484 echo "${ECHO_T}$cf_TEMP_gnat" >&6
17486 echo "$as_me:17486: result: no" >&5
17487 echo "${ECHO_T}no" >&6
17490 eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
17492 if test "x$cf_TEMP_gnat" != xno; then
17493 unset cf_cv_gnat_version
17496 echo "$as_me:17496: checking for $cf_prog_gnat version" >&5
17497 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
17498 if test "${cf_cv_gnat_version+set}" = set; then
17499 echo $ECHO_N "(cached) $ECHO_C" >&6
17502 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
17503 grep '[0-9].[0-9][0-9]*' |\
17504 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17507 echo "$as_me:17507: result: $cf_cv_gnat_version" >&5
17508 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17509 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17510 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
17513 eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
17516 unset cf_cv_gnat_version
17517 unset ac_cv_path_cf_TEMP_gnat
17520 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
17522 cf_cv_prog_gnat_correct=no
17524 cf_ada_make=gnatmake
17525 if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
17526 # gprconfig is newer than gnatmake; we can continue...
17529 rm -rf ./conftest* ./*~conftest*
17530 if mkdir conftest.src
17534 for cf_gprconfig in Ada C
17536 echo "$as_me:17536: checking for gprconfig name for $cf_gprconfig" >&5
17537 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
17538 if test "$cf_gprconfig" = C
17540 for cf_gprconfig_param in \
17541 "$cf_gprconfig,,,,GNATGCC" \
17542 "$cf_gprconfig,,,,GCC" \
17545 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17546 test -n "$cf_gprconfig_value" && break
17549 cf_gprconfig_param=$cf_gprconfig
17550 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17552 if test -n "$cf_gprconfig_value"
17554 eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
17555 echo "$as_me:17555: result: $cf_gprconfig_value" >&5
17556 echo "${ECHO_T}$cf_gprconfig_value" >&6
17558 echo "$as_me:17558: result: missing" >&5
17559 echo "${ECHO_T}missing" >&6
17565 rm -rf ./conftest* ./*~conftest*
17568 if test "x$cf_ada_config" != "x#"
17571 echo "$as_me:17571: checking for gnat version" >&5
17572 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17573 if test "${cf_cv_gnat_version+set}" = set; then
17574 echo $ECHO_N "(cached) $ECHO_C" >&6
17577 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
17578 grep '[0-9].[0-9][0-9]*' |\
17579 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17582 echo "$as_me:17582: result: $cf_cv_gnat_version" >&5
17583 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17584 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17586 case "$cf_cv_gnat_version" in
17587 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17588 cf_cv_prog_gnat_correct=yes
17591 { echo "$as_me:17591: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
17592 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
17593 cf_cv_prog_gnat_correct=no
17597 # Extract the first word of "m4", so it can be a program name with args.
17598 set dummy m4; ac_word=$2
17599 echo "$as_me:17599: checking for $ac_word" >&5
17600 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17601 if test "${ac_cv_prog_M4_exists+set}" = set; then
17602 echo $ECHO_N "(cached) $ECHO_C" >&6
17604 if test -n "$M4_exists"; then
17605 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17607 ac_save_IFS=$IFS; IFS=$ac_path_separator
17609 for ac_dir in $ac_dummy; do
17611 test -z "$ac_dir" && ac_dir=.
17612 $as_executable_p "$ac_dir/$ac_word" || continue
17613 ac_cv_prog_M4_exists="yes"
17614 echo "$as_me:17614: found $ac_dir/$ac_word" >&5
17618 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17621 M4_exists=$ac_cv_prog_M4_exists
17622 if test -n "$M4_exists"; then
17623 echo "$as_me:17623: result: $M4_exists" >&5
17624 echo "${ECHO_T}$M4_exists" >&6
17626 echo "$as_me:17626: result: no" >&5
17627 echo "${ECHO_T}no" >&6
17630 if test "$ac_cv_prog_M4_exists" = no; then
17631 cf_cv_prog_gnat_correct=no
17632 { echo "$as_me:17632: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
17633 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
17635 if test "$cf_cv_prog_gnat_correct" = yes; then
17636 echo "$as_me:17636: checking if GNAT works" >&5
17637 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17639 rm -rf ./conftest* ./*~conftest*
17640 cat >>conftest.ads <<CF_EOF
17641 procedure conftest;
17643 cat >>conftest.adb <<CF_EOF
17646 procedure conftest is
17648 Text_IO.Put ("Hello World");
17650 GNAT.OS_Lib.OS_Exit (0);
17653 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17654 if ( ./conftest 1>&5 2>&1 ) ; then
17655 cf_cv_prog_gnat_correct=yes
17657 cf_cv_prog_gnat_correct=no
17660 cf_cv_prog_gnat_correct=no
17662 rm -rf ./conftest* ./*~conftest*
17664 echo "$as_me:17664: result: $cf_cv_prog_gnat_correct" >&5
17665 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17668 cf_cv_prog_gnat_correct=no
17672 if test "$cf_cv_prog_gnat_correct" = yes; then
17674 echo "$as_me:17674: checking optimization options for ADAFLAGS" >&5
17675 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
17679 ADAFLAGS="$ADAFLAGS -g"
17685 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
17687 ADAFLAGS="$ADAFLAGS $cf_O_flag"
17691 echo "$as_me:17691: result: $ADAFLAGS" >&5
17692 echo "${ECHO_T}$ADAFLAGS" >&6
17694 echo "$as_me:17694: checking if GNATPREP supports -T option" >&5
17695 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
17696 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
17697 echo $ECHO_N "(cached) $ECHO_C" >&6
17700 cf_cv_gnatprep_opt_t=no
17701 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
17704 echo "$as_me:17704: result: $cf_cv_gnatprep_opt_t" >&5
17705 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
17706 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
17708 echo "$as_me:17708: checking if GNAT supports generics" >&5
17709 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
17710 case "$cf_cv_gnat_version" in
17711 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17712 cf_gnat_generics=yes
17715 cf_gnat_generics=no
17718 echo "$as_me:17718: result: $cf_gnat_generics" >&5
17719 echo "${ECHO_T}$cf_gnat_generics" >&6
17721 if test "$cf_gnat_generics" = yes
17723 cf_compile_generics=generics
17724 cf_generic_objects="\${GENOBJS}"
17726 cf_compile_generics=
17727 cf_generic_objects=
17730 echo "$as_me:17730: checking if GNAT supports SIGINT" >&5
17731 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
17732 if test "${cf_cv_gnat_sigint+set}" = set; then
17733 echo $ECHO_N "(cached) $ECHO_C" >&6
17736 rm -rf ./conftest* ./*~conftest*
17737 cat >>conftest.ads <<CF_EOF
17738 with Ada.Interrupts.Names;
17740 package ConfTest is
17742 pragma Warnings (Off); -- the next pragma exists since 3.11p
17743 pragma Unreserve_All_Interrupts;
17744 pragma Warnings (On);
17746 protected Process is
17748 function Continue return Boolean;
17749 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
17751 Done : Boolean := False;
17756 cat >>conftest.adb <<CF_EOF
17757 package body ConfTest is
17758 protected body Process is
17763 function Continue return Boolean is
17770 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17771 cf_cv_gnat_sigint=yes
17773 cf_cv_gnat_sigint=no
17775 rm -rf ./conftest* ./*~conftest*
17778 echo "$as_me:17778: result: $cf_cv_gnat_sigint" >&5
17779 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
17781 if test "$cf_cv_gnat_sigint" = yes ; then
17784 USE_GNAT_SIGINT="#"
17787 cf_gnat_libraries=no
17788 cf_gnat_projects=no
17790 if test "$enable_gnat_projects" != no ; then
17791 echo "$as_me:17791: checking if GNAT supports project files" >&5
17792 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
17793 case "$cf_cv_gnat_version" in
17797 case "$cf_cv_system_name" in
17801 rm -rf ./conftest* ./*~conftest*
17802 if mkdir conftest.src conftest.bin conftest.lib
17805 rm -rf ./conftest* ./*~conftest*
17806 cat >>library.gpr <<CF_EOF
17808 Kind := External ("LIB_KIND");
17809 for Library_Name use "ConfTest";
17810 for Object_Dir use ".";
17811 for Library_ALI_Dir use External("LIBRARY_DIR");
17812 for Library_Version use External ("SONAME");
17813 for Library_Kind use Kind;
17814 for Library_Dir use External("BUILD_DIR");
17815 Source_Dir := External ("SOURCE_DIR");
17816 for Source_Dirs use (Source_Dir);
17819 cat >>confpackage.ads <<CF_EOF
17820 package ConfPackage is
17821 procedure conftest;
17824 cat >>confpackage.adb <<CF_EOF
17826 package body ConfPackage is
17827 procedure conftest is
17829 Text_IO.Put ("Hello World");
17834 if ( "$cf_ada_make" $ADAFLAGS \
17836 -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
17837 -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
17838 -XSOURCE_DIR="`pwd`" \
17839 -XSONAME=libConfTest.so.1 \
17840 -XLIB_KIND=static 1>&5 2>&1 ) ; then
17841 cf_gnat_projects=yes
17845 if test -f conftest.lib/confpackage.ali
17847 cf_gnat_libraries=yes
17849 rm -rf ./conftest* ./*~conftest*
17854 echo "$as_me:17854: result: $cf_gnat_projects" >&5
17855 echo "${ECHO_T}$cf_gnat_projects" >&6
17856 fi # enable_gnat_projects
17858 if test "$cf_gnat_projects" = yes
17860 echo "$as_me:17860: checking if GNAT supports libraries" >&5
17861 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
17862 echo "$as_me:17862: result: $cf_gnat_libraries" >&5
17863 echo "${ECHO_T}$cf_gnat_libraries" >&6
17866 USE_OLD_MAKERULES=""
17867 USE_GNAT_PROJECTS="#"
17868 USE_GNAT_MAKE_GPR="#"
17869 USE_GNAT_GPRBUILD="#"
17871 if test "$cf_gnat_projects" = yes
17873 USE_OLD_MAKERULES="#"
17874 USE_GNAT_PROJECTS=""
17875 if test "$cf_cv_VERSION_GPRBUILD" != no
17877 USE_GNAT_GPRBUILD=""
17878 elif test "$cf_cv_VERSION_GNATMAKE" != no
17880 USE_GNAT_MAKE_GPR=""
17882 { echo "$as_me:17882: WARNING: use old makefile rules since tools are missing" >&5
17883 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
17887 if test "$cf_gnat_libraries" = yes
17889 USE_GNAT_LIBRARIES=""
17891 USE_GNAT_LIBRARIES="#"
17894 echo "$as_me:17894: checking for ada-compiler" >&5
17895 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
17897 # Check whether --with-ada-compiler or --without-ada-compiler was given.
17898 if test "${with_ada_compiler+set}" = set; then
17899 withval="$with_ada_compiler"
17900 cf_ada_compiler=$withval
17902 cf_ada_compiler=gnatmake
17905 echo "$as_me:17905: result: $cf_ada_compiler" >&5
17906 echo "${ECHO_T}$cf_ada_compiler" >&6
17908 cf_ada_package=terminal_interface
17910 echo "$as_me:17910: checking for ada-include" >&5
17911 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
17913 # Check whether --with-ada-include or --without-ada-include was given.
17914 if test "${with_ada_include+set}" = set; then
17915 withval="$with_ada_include"
17918 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
17919 fi; if test -n "$prefix/share/ada/adainclude" ; then
17921 if test "x$prefix" != xNONE; then
17922 cf_path_syntax="$prefix"
17924 cf_path_syntax="$ac_default_prefix"
17927 case ".$withval" in
17928 (.\$\(*\)*|.\'*\'*)
17932 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17934 (.\$\{*prefix\}*|.\$\{*dir\}*)
17935 eval withval="$withval"
17936 case ".$withval" in
17938 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17943 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17946 { { echo "$as_me:17946: error: expected a pathname, not \"$withval\"" >&5
17947 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17948 { (exit 1); exit 1; }; }
17953 eval ADA_INCLUDE="$withval"
17955 echo "$as_me:17955: result: $ADA_INCLUDE" >&5
17956 echo "${ECHO_T}$ADA_INCLUDE" >&6
17958 echo "$as_me:17958: checking for ada-objects" >&5
17959 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
17961 # Check whether --with-ada-objects or --without-ada-objects was given.
17962 if test "${with_ada_objects+set}" = set; then
17963 withval="$with_ada_objects"
17966 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
17967 fi; if test -n "$prefix/lib/ada/adalib" ; then
17969 if test "x$prefix" != xNONE; then
17970 cf_path_syntax="$prefix"
17972 cf_path_syntax="$ac_default_prefix"
17975 case ".$withval" in
17976 (.\$\(*\)*|.\'*\'*)
17980 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17982 (.\$\{*prefix\}*|.\$\{*dir\}*)
17983 eval withval="$withval"
17984 case ".$withval" in
17986 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17991 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17994 { { echo "$as_me:17994: error: expected a pathname, not \"$withval\"" >&5
17995 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17996 { (exit 1); exit 1; }; }
18001 eval ADA_OBJECTS="$withval"
18003 echo "$as_me:18003: result: $ADA_OBJECTS" >&5
18004 echo "${ECHO_T}$ADA_OBJECTS" >&6
18006 echo "$as_me:18006: checking if an Ada95 shared-library should be built" >&5
18007 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
18009 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
18010 if test "${with_ada_sharedlib+set}" = set; then
18011 withval="$with_ada_sharedlib"
18012 with_ada_sharedlib=$withval
18014 with_ada_sharedlib=no
18016 echo "$as_me:18016: result: $with_ada_sharedlib" >&5
18017 echo "${ECHO_T}$with_ada_sharedlib" >&6
18019 if test "x$with_ada_sharedlib" != xno
18021 if test "x$cf_gnat_projects" != xyes
18023 { echo "$as_me:18023: WARNING: disabling shared-library since GNAT projects are not supported" >&5
18024 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
18025 with_ada_sharedlib=no
18029 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
18030 MAKE_ADA_SHAREDLIB="#"
18032 if test "x$with_ada_sharedlib" != xno
18034 MAKE_ADA_SHAREDLIB=
18035 if test "x$with_ada_sharedlib" != xyes
18037 ADA_SHAREDLIB="$with_ada_sharedlib"
18041 # allow the Ada binding to be renamed
18043 echo "$as_me:18043: checking for ada-libname" >&5
18044 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
18046 # Check whether --with-ada-libname or --without-ada-libname was given.
18047 if test "${with_ada_libname+set}" = set; then
18048 withval="$with_ada_libname"
18049 ADA_LIBNAME=$withval
18051 ADA_LIBNAME=AdaCurses
18053 case "x$ADA_LIBNAME" in
18055 ADA_LIBNAME=AdaCurses
18059 echo "$as_me:18059: result: $ADA_LIBNAME" >&5
18060 echo "${ECHO_T}$ADA_LIBNAME" >&6
18063 { { echo "$as_me:18063: error: No usable Ada compiler found" >&5
18064 echo "$as_me: error: No usable Ada compiler found" >&2;}
18065 { (exit 1); exit 1; }; }
18068 { { echo "$as_me:18068: error: The Ada compiler is needed for this package" >&5
18069 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
18070 { (exit 1); exit 1; }; }
18073 ################################################################################
18080 ### Construct the list of include-directories to be generated
18082 if test "$srcdir" != "."; then
18083 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
18085 CPPFLAGS="-I../include $CPPFLAGS"
18086 if test "$srcdir" != "."; then
18087 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
18089 CPPFLAGS="-I. $CPPFLAGS"
18091 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18092 if test "$srcdir" != "."; then
18093 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18095 if test "$GCC" != yes; then
18096 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18097 elif test "$includedir" != "/usr/include"; then
18098 if test "$includedir" = '${prefix}/include' ; then
18099 if test x$prefix != x/usr ; then
18100 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18103 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18107 ### Build up pieces for makefile rules
18108 echo "$as_me:18108: checking default library suffix" >&5
18109 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18111 case $DFT_LWR_MODEL in
18112 (libtool) DFT_ARG_SUFFIX='' ;;
18113 (normal) DFT_ARG_SUFFIX='' ;;
18114 (debug) DFT_ARG_SUFFIX='_g' ;;
18115 (profile) DFT_ARG_SUFFIX='_p' ;;
18116 (shared) DFT_ARG_SUFFIX='' ;;
18118 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18119 echo "$as_me:18119: result: $DFT_ARG_SUFFIX" >&5
18120 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18122 echo "$as_me:18122: checking default library-dependency suffix" >&5
18123 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18125 case X$DFT_LWR_MODEL in
18127 DFT_LIB_SUFFIX='.la'
18128 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18131 case "$cf_cv_system_name" in
18133 DFT_LIB_SUFFIX='_g.lib'
18136 DFT_LIB_SUFFIX='_g.a'
18139 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18142 case "$cf_cv_system_name" in
18144 DFT_LIB_SUFFIX='_p.lib'
18147 DFT_LIB_SUFFIX='_p.a'
18150 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18153 case "$cf_cv_system_name" in
18155 DFT_LIB_SUFFIX='.so'
18156 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18159 DFT_LIB_SUFFIX='.dll'
18160 DFT_DEP_SUFFIX='.dll.lib'
18162 (cygwin*|msys*|mingw*)
18163 DFT_LIB_SUFFIX='.dll'
18164 DFT_DEP_SUFFIX='.dll.a'
18167 DFT_LIB_SUFFIX='.dylib'
18168 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18173 DFT_LIB_SUFFIX='.so'
18174 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18177 DFT_LIB_SUFFIX='.sl'
18178 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18183 DFT_LIB_SUFFIX='.so'
18184 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18191 DFT_LIB_SUFFIX='.lib'
18194 DFT_LIB_SUFFIX='.a'
18197 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18200 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
18202 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
18203 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
18205 echo "$as_me:18205: result: $DFT_DEP_SUFFIX" >&5
18206 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18208 echo "$as_me:18208: checking default object directory" >&5
18209 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18211 case $DFT_LWR_MODEL in
18212 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
18213 (normal) DFT_OBJ_SUBDIR='objects' ;;
18214 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
18215 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
18217 case "$cf_cv_system_name" in
18219 DFT_OBJ_SUBDIR='objects' ;;
18221 DFT_OBJ_SUBDIR='obj_s' ;;
18224 echo "$as_me:18224: result: $DFT_OBJ_SUBDIR" >&5
18225 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18227 ### Set up low-level terminfo dependencies for makefiles.
18229 if test "$DFT_LWR_MODEL" = shared ; then
18230 case $cf_cv_system_name in
18232 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18235 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
18240 USE_ARG_SUFFIX=${DFT_ARG_SUFFIX}
18242 USE_LIB_SUFFIX=${DFT_ARG_SUFFIX}
18244 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
18246 ### Construct the list of subdirectories for which we'll customize makefiles
18247 ### with the appropriate compile-rules.
18249 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
18251 cat >>confdefs.h <<EOF
18252 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18255 ################################################################################
18261 NCURSES_SHLIB2="sh -c"
18263 ADA_SUBDIRS="include gen src doc"
18264 if test "x$cf_with_tests" != "xno" ; then
18265 ADA_SUBDIRS="$ADA_SUBDIRS samples"
18267 for cf_dir in $ADA_SUBDIRS
18269 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18276 # match layout used by make-tar.sh
18277 ADAHTML_DIR=../doc/ada
18279 if test "x$cross_compiling" = xyes ; then
18280 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
18282 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
18285 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"
18286 ac_config_commands="$ac_config_commands default"
18287 cat >confcache <<\_ACEOF
18288 # This file is a shell script that caches the results of configure
18289 # tests run on this system so they can be shared between configure
18290 # scripts and configure runs, see configure's option --config-cache.
18291 # It is not useful on other systems. If it contains results you don't
18292 # want to keep, you may remove or edit it.
18294 # config.status only pays attention to the cache file if you give it
18295 # the --recheck option to rerun configure.
18297 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18298 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18299 # following values.
18303 # The following way of writing the cache mishandles newlines in values,
18304 # but we know of no workaround that is simple, portable, and efficient.
18305 # So, don't put newlines in cache variables' values.
18306 # Ultrix sh set writes to stderr and can't be redirected directly,
18307 # and sets the high bit in the cache file unless we assign to the vars.
18310 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18312 # `set' does not quote correctly, so add quotes (double-quote
18313 # substitution turns \\\\ into \\, and sed turns \\ into \).
18316 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18319 # `set' quotes correctly as required by POSIX, so do not add quotes.
18321 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18328 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18330 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18332 if cmp -s $cache_file confcache; then :; else
18333 if test -w $cache_file; then
18334 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18335 cat confcache >$cache_file
18337 echo "not updating unwritable cache $cache_file"
18342 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18343 # Let make expand exec_prefix.
18344 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18346 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18347 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18348 # trailing colons and then remove the whole line if VPATH becomes empty
18349 # (actually we leave an empty line to preserve line numbers).
18350 if test "x$srcdir" = x.; then
18351 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18352 s/:*\$(srcdir):*/:/;
18353 s/:*\${srcdir}:*/:/;
18355 s/^\([^=]*=[ ]*\):*/\1/;
18361 DEFS=-DHAVE_CONFIG_H
18363 : "${CONFIG_STATUS=./config.status}"
18364 ac_clean_files_save=$ac_clean_files
18365 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18366 { echo "$as_me:18366: creating $CONFIG_STATUS" >&5
18367 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18368 cat >"$CONFIG_STATUS" <<_ACEOF
18370 # Generated automatically by configure.
18371 # Run this file to recreate the current configuration.
18372 # Compiler output produced by configure, useful for debugging
18373 # configure, is in config.log if it exists.
18376 SHELL=\${CONFIG_SHELL-$SHELL}
18377 ac_cs_invocation="\$0 \$@"
18379 CLICOLOR_FORCE= GREP_OPTIONS=
18380 unset CLICOLOR_FORCE GREP_OPTIONS
18383 cat >>"$CONFIG_STATUS" <<\_ACEOF
18384 # Be Bourne compatible
18385 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18388 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18392 # Name of the executable.
18393 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18395 if expr a : '\(a\)' >/dev/null 2>&1; then
18401 rm -f conf$$ conf$$.exe conf$$.file
18403 if ln -s conf$$.file conf$$ 2>/dev/null; then
18404 # We could just check for DJGPP; but this test a) works b) is more generic
18405 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18406 if test -f conf$$.exe; then
18407 # Don't use ln at all; we don't have any links
18412 elif ln conf$$.file conf$$ 2>/dev/null; then
18417 rm -f conf$$ conf$$.exe conf$$.file
18419 as_executable_p="test -f"
18421 # Support unset when possible.
18422 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18429 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18430 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18431 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18432 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18433 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18434 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18435 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18436 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18439 # We need space, tab and new line, in precisely that order.
18445 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18451 # Files that config.status was made for.
18452 if test -n "$ac_config_files"; then
18453 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
18456 if test -n "$ac_config_headers"; then
18457 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
18460 if test -n "$ac_config_links"; then
18461 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
18464 if test -n "$ac_config_commands"; then
18465 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
18468 cat >>"$CONFIG_STATUS" <<\EOF
18471 \`$as_me' instantiates files from templates according to the
18472 current configuration.
18474 Usage: $0 [OPTIONS] [FILE]...
18476 -h, --help print this help, then exit
18477 -V, --version print version number, then exit
18478 -d, --debug don't remove temporary files
18479 --recheck update $as_me by reconfiguring in the same conditions
18480 --file=FILE[:TEMPLATE]
18481 instantiate the configuration file FILE
18482 --header=FILE[:TEMPLATE]
18483 instantiate the configuration header FILE
18485 Configuration files:
18488 Configuration headers:
18491 Configuration commands:
18494 Report bugs to <dickey@invisible-island.net>."
18497 cat >>"$CONFIG_STATUS" <<EOF
18500 configured by $0, generated by GNU Autoconf 2.52.20210509,
18501 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18503 Copyright 2003-2020,2021 Thomas E. Dickey
18504 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18505 Free Software Foundation, Inc.
18506 This config.status script is free software; the Free Software Foundation
18507 gives unlimited permission to copy, distribute and modify it."
18512 cat >>"$CONFIG_STATUS" <<\EOF
18513 # If no file are specified by the user, then we need to provide default
18514 # value. By we need to know if files were specified by the user.
18520 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18521 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18523 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18527 *) # This is not an option, so the user has probably given explicit
18529 ac_need_defaults=false;;
18533 # Handling of the options.
18535 cat >>"$CONFIG_STATUS" <<EOF
18536 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18537 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18538 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18540 cat >>"$CONFIG_STATUS" <<\EOF
18541 --version | --vers* | -V )
18542 echo "$ac_cs_version"; exit 0 ;;
18544 # Conflict between --help and --header
18545 { { echo "$as_me:18545: error: ambiguous option: $1
18546 Try \`$0 --help' for more information." >&5
18547 echo "$as_me: error: ambiguous option: $1
18548 Try \`$0 --help' for more information." >&2;}
18549 { (exit 1); exit 1; }; };;
18550 --help | --hel | -h )
18551 echo "$ac_cs_usage"; exit 0 ;;
18552 --debug | --d* | -d )
18554 --file | --fil | --fi | --f )
18556 CONFIG_FILES="$CONFIG_FILES $1"
18557 ac_need_defaults=false;;
18558 --header | --heade | --head | --hea )
18560 CONFIG_HEADERS="$CONFIG_HEADERS $1"
18561 ac_need_defaults=false;;
18563 # This is an error.
18564 -*) { { echo "$as_me:18564: error: unrecognized option: $1
18565 Try \`$0 --help' for more information." >&5
18566 echo "$as_me: error: unrecognized option: $1
18567 Try \`$0 --help' for more information." >&2;}
18568 { (exit 1); exit 1; }; } ;;
18570 *) ac_config_targets="$ac_config_targets $1" ;;
18579 ## ----------------------- ##
18580 ## Running config.status. ##
18581 ## ----------------------- ##
18583 This file was extended by $as_me 2.52.20210509, executed with
18584 CONFIG_FILES = $CONFIG_FILES
18585 CONFIG_HEADERS = $CONFIG_HEADERS
18586 CONFIG_LINKS = $CONFIG_LINKS
18587 CONFIG_COMMANDS = $CONFIG_COMMANDS
18588 > "$ac_cs_invocation"
18589 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18594 cat >>"$CONFIG_STATUS" <<EOF
18596 # INIT-COMMANDS section.
18599 ### Special initialization commands, used to pass information from the
18600 ### configuration-run into config.status
18603 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
18604 DFT_LWR_MODEL="$DFT_LWR_MODEL"
18605 LIB_NAME="$LIB_NAME"
18606 LIB_PREFIX="$LIB_PREFIX"
18607 LIB_SUFFIX="$LIB_SUFFIX"
18609 NCURSES_MAJOR="$NCURSES_MAJOR"
18610 NCURSES_MINOR="$NCURSES_MINOR"
18611 NCURSES_PATCH="$NCURSES_PATCH"
18612 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
18613 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
18614 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
18615 cf_cv_abi_version="$cf_cv_abi_version"
18616 cf_cv_rel_version="$cf_cv_rel_version"
18617 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
18618 cf_cv_shared_soname='$cf_cv_shared_soname'
18619 cf_cv_shlib_version="$cf_cv_shlib_version"
18620 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
18621 cf_cv_system_name="$cf_cv_system_name"
18627 cat >>"$CONFIG_STATUS" <<\EOF
18628 for ac_config_target in $ac_config_targets
18630 case "$ac_config_target" in
18631 # Handling of arguments.
18632 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
18633 "src/library.gpr" ) CONFIG_FILES="$CONFIG_FILES src/library.gpr:src/library.gpr.in" ;;
18634 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
18635 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18636 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18637 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
18638 *) { { echo "$as_me:18638: error: invalid argument: $ac_config_target" >&5
18639 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18640 { (exit 1); exit 1; }; };;
18644 # If the user did not use the arguments to specify the items to instantiate,
18645 # then the envvar interface is used. Set only those that are not.
18646 # We use the long form for the default assignment because of an extremely
18647 # bizarre bug on SunOS 4.1.3.
18648 if "$ac_need_defaults"; then
18649 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18650 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18651 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18654 # Create a temporary directory, and hook for its removal unless debugging.
18657 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18658 trap '{ (exit 1); exit 1; }' 1 2 13 15
18661 # Create a (secure) tmp directory for tmp files.
18664 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18665 test -n "$tmp" && test -d "$tmp"
18668 tmp=$TMPDIR/cs$$-$RANDOM
18669 (umask 077 && mkdir $tmp)
18672 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18673 { (exit 1); exit 1; }
18678 cat >>"$CONFIG_STATUS" <<EOF
18681 # CONFIG_FILES section.
18684 # No need to generate the scripts if there are no CONFIG_FILES.
18685 # This happens for instance when ./config.status config.h
18686 if test -n "\$CONFIG_FILES"; then
18687 # Protect against being on the right side of a sed subst in config.status.
18688 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18689 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18690 s,@SHELL@,$SHELL,;t t
18691 s,@exec_prefix@,$exec_prefix,;t t
18692 s,@prefix@,$prefix,;t t
18693 s,@program_transform_name@,$program_transform_name,;t t
18694 s,@bindir@,$bindir,;t t
18695 s,@sbindir@,$sbindir,;t t
18696 s,@libexecdir@,$libexecdir,;t t
18697 s,@datarootdir@,$datarootdir,;t t
18698 s,@datadir@,$datadir,;t t
18699 s,@sysconfdir@,$sysconfdir,;t t
18700 s,@sharedstatedir@,$sharedstatedir,;t t
18701 s,@localstatedir@,$localstatedir,;t t
18702 s,@runstatedir@,$runstatedir,;t t
18703 s,@libdir@,$libdir,;t t
18704 s,@includedir@,$includedir,;t t
18705 s,@oldincludedir@,$oldincludedir,;t t
18706 s,@infodir@,$infodir,;t t
18707 s,@mandir@,$mandir,;t t
18708 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18709 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18710 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18711 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18712 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18713 s,@build_alias@,$build_alias,;t t
18714 s,@host_alias@,$host_alias,;t t
18715 s,@target_alias@,$target_alias,;t t
18716 s,@ECHO_C@,$ECHO_C,;t t
18717 s,@ECHO_N@,$ECHO_N,;t t
18718 s,@ECHO_T@,$ECHO_T,;t t
18719 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18720 s,@DEFS@,$DEFS,;t t
18721 s,@LIBS@,$LIBS,;t t
18722 s,@top_builddir@,$top_builddir,;t t
18723 s,@build@,$build,;t t
18724 s,@build_cpu@,$build_cpu,;t t
18725 s,@build_vendor@,$build_vendor,;t t
18726 s,@build_os@,$build_os,;t t
18727 s,@host@,$host,;t t
18728 s,@host_cpu@,$host_cpu,;t t
18729 s,@host_vendor@,$host_vendor,;t t
18730 s,@host_os@,$host_os,;t t
18731 s,@target@,$target,;t t
18732 s,@target_cpu@,$target_cpu,;t t
18733 s,@target_vendor@,$target_vendor,;t t
18734 s,@target_os@,$target_os,;t t
18735 s,@GREP@,$GREP,;t t
18736 s,@FGREP@,$FGREP,;t t
18738 s,@CFLAGS@,$CFLAGS,;t t
18739 s,@LDFLAGS@,$LDFLAGS,;t t
18740 s,@CPPFLAGS@,$CPPFLAGS,;t t
18741 s,@ac_ct_CC@,$ac_ct_CC,;t t
18742 s,@EXEEXT@,$EXEEXT,;t t
18743 s,@OBJEXT@,$OBJEXT,;t t
18744 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18746 s,@EGREP@,$EGREP,;t t
18748 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18749 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18750 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18751 s,@LN_S@,$LN_S,;t t
18752 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
18753 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
18754 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18755 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
18756 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
18757 s,@SET_MAKE@,$SET_MAKE,;t t
18758 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
18759 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
18760 s,@CTAGS@,$CTAGS,;t t
18761 s,@ETAGS@,$ETAGS,;t t
18762 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18763 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18764 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
18765 s,@RANLIB@,$RANLIB,;t t
18766 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18768 s,@ac_ct_LD@,$ac_ct_LD,;t t
18770 s,@ac_ct_AR@,$ac_ct_AR,;t t
18771 s,@ARFLAGS@,$ARFLAGS,;t t
18772 s,@DESTDIR@,$DESTDIR,;t t
18773 s,@BUILD_CC@,$BUILD_CC,;t t
18774 s,@BUILD_CPP@,$BUILD_CPP,;t t
18775 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
18776 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
18777 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
18778 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
18779 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
18780 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
18781 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
18782 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
18783 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
18784 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
18785 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
18786 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
18787 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
18788 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18789 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18790 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
18791 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
18792 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
18793 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
18794 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
18795 s,@CC_G_OPT@,$CC_G_OPT,;t t
18796 s,@LD_MODEL@,$LD_MODEL,;t t
18797 s,@shlibdir@,$shlibdir,;t t
18798 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
18799 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
18800 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
18801 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
18802 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
18803 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
18804 s,@LINK_PROGS@,$LINK_PROGS,;t t
18805 s,@LINK_TESTS@,$LINK_TESTS,;t t
18806 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
18807 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
18808 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
18809 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
18810 s,@RPATH_LIST@,$RPATH_LIST,;t t
18811 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
18812 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
18813 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
18814 s,@PTHREAD@,$PTHREAD,;t t
18815 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
18816 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18817 s,@ECHO_LT@,$ECHO_LT,;t t
18818 s,@ECHO_LD@,$ECHO_LD,;t t
18819 s,@RULE_CC@,$RULE_CC,;t t
18820 s,@SHOW_CC@,$SHOW_CC,;t t
18821 s,@ECHO_CC@,$ECHO_CC,;t t
18822 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18823 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
18824 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
18825 s,@ADAFLAGS@,$ADAFLAGS,;t t
18826 s,@ADA_TRACE@,$ADA_TRACE,;t t
18827 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
18828 s,@M4_exists@,$M4_exists,;t t
18829 s,@cf_ada_make@,$cf_ada_make,;t t
18830 s,@cf_ada_config@,$cf_ada_config,;t t
18831 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
18832 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
18833 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
18834 s,@cf_compile_generics@,$cf_compile_generics,;t t
18835 s,@cf_generic_objects@,$cf_generic_objects,;t t
18836 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
18837 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
18838 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
18839 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
18840 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
18841 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
18842 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
18843 s,@cf_ada_package@,$cf_ada_package,;t t
18844 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
18845 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
18846 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
18847 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
18848 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
18849 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
18850 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
18851 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
18852 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
18853 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18854 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18855 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
18856 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
18857 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
18858 s,@TEST_ARG2@,$TEST_ARG2,;t t
18859 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
18860 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
18861 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
18862 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
18863 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
18864 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
18865 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
18870 cat >>"$CONFIG_STATUS" <<\EOF
18871 # Split the substitutions into bite-sized pieces for seds with
18872 # small command number limits, like on Digital OSF/1 and HP-UX.
18873 ac_max_sed_lines=48
18874 ac_sed_frag=1 # Number of current file.
18875 ac_beg=1 # First line for current file.
18876 ac_end=$ac_max_sed_lines # Line after last line for current file.
18879 while "$ac_more_lines"; do
18880 if test "$ac_beg" -gt 1; then
18881 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18883 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18885 if test ! -s $tmp/subs.frag; then
18886 ac_more_lines=false
18888 # The purpose of the label and of the branching condition is to
18889 # speed up the sed processing (if there are no `@' at all, there
18890 # is no need to browse any of the substitutions).
18891 # These are the two extra sed commands mentioned above.
18893 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18894 # It is possible to make a multiline substitution using escaped newlines.
18895 # Ensure that we do not split the substitution between script fragments.
18897 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
18898 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
18899 if test -s $tmp/subs.next; then
18900 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
18901 if test ! -s $tmp/subs.edit; then
18902 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
18903 if test ! -s $tmp/subs.edit; then
18904 if test "$ac_beg" -gt 1; then
18905 ac_end=`expr "$ac_end" - 1`
18912 if test -z "$ac_sed_cmds"; then
18913 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18915 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18917 ac_sed_frag=`expr "$ac_sed_frag" + 1`
18919 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
18922 if test -z "$ac_sed_cmds"; then
18925 fi # test -n "$CONFIG_FILES"
18928 cat >>"$CONFIG_STATUS" <<\EOF
18929 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18930 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18932 - | *:- | *:-:* ) # input from stdin
18934 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18935 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18936 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18937 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18938 * ) ac_file_in=$ac_file.in ;;
18941 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18942 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18943 X"$ac_file" : 'X\(//\)[^/]' \| \
18944 X"$ac_file" : 'X\(//\)$' \| \
18945 X"$ac_file" : 'X\(/\)' \| \
18946 . : '\(.\)' 2>/dev/null ||
18948 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18949 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18950 /^X\(\/\/\)$/{ s//\1/; q; }
18951 /^X\(\/\).*/{ s//\1/; q; }
18953 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18954 { case "$ac_dir" in
18955 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18959 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18960 case $as_mkdir_dir in
18961 # Skip DOS drivespec
18962 ?:) as_incr_dir=$as_mkdir_dir ;;
18964 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18965 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18970 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18971 # A "../" for each directory in $ac_dir_suffix.
18972 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18974 ac_dir_suffix= ac_dots=
18979 if test -z "$ac_dots"; then
18982 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
18984 [\\/]* | ?:[\\/]* )
18985 ac_srcdir="$srcdir$ac_dir_suffix";
18986 ac_top_srcdir="$srcdir" ;;
18987 *) # Relative path.
18988 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
18989 ac_top_srcdir="$ac_dots$srcdir" ;;
18993 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18994 *) ac_INSTALL=$ac_dots$INSTALL ;;
18997 if test x"$ac_file" != x-; then
18998 { echo "$as_me:18998: creating $ac_file" >&5
18999 echo "$as_me: creating $ac_file" >&6;}
19002 # Let's still pretend it is `configure' which instantiates (i.e., don't
19003 # use $as_me), people would be surprised to read:
19004 # /* config.h. Generated automatically by config.status. */
19005 configure_input="Generated automatically from `echo $ac_file_in |
19006 sed 's,.*/,,'` by configure."
19008 # First look for the input files in the build tree, otherwise in the
19010 ac_file_inputs=`IFS=:
19011 for f in $ac_file_in; do
19013 -) echo $tmp/stdin ;;
19015 # Absolute (can't be DOS-style, as IFS=:)
19016 test -f "$f" || { { echo "$as_me:19016: error: cannot find input file: $f" >&5
19017 echo "$as_me: error: cannot find input file: $f" >&2;}
19018 { (exit 1); exit 1; }; }
19021 if test -f "$f"; then
19024 elif test -f "$srcdir/$f"; then
19029 { { echo "$as_me:19029: error: cannot find input file: $f" >&5
19030 echo "$as_me: error: cannot find input file: $f" >&2;}
19031 { (exit 1); exit 1; }; }
19034 done` || { (exit 1); exit 1; }
19036 cat >>"$CONFIG_STATUS" <<\EOF
19037 ac_warn_datarootdir=no
19038 if test x"$ac_file" != x-; then
19039 for ac_item in $ac_file_inputs
19041 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
19042 if test -n "$ac_seen"; then
19043 ac_used=`grep '@datarootdir@' "$ac_item"`
19044 if test -z "$ac_used"; then
19045 { echo "$as_me:19045: WARNING: datarootdir was used implicitly but not set:
19047 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
19049 ac_warn_datarootdir=yes
19052 ac_seen=`grep '${datarootdir}' "$ac_item"`
19053 if test -n "$ac_seen"; then
19054 { echo "$as_me:19054: WARNING: datarootdir was used explicitly but not set:
19056 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
19058 ac_warn_datarootdir=yes
19063 if test "x$ac_warn_datarootdir" = xyes; then
19064 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
19068 cat >>"$CONFIG_STATUS" <<EOF
19072 cat >>"$CONFIG_STATUS" <<\EOF
19074 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19075 s,@configure_input@,$configure_input,;t t
19076 s,@srcdir@,$ac_srcdir,;t t
19077 s,@top_srcdir@,$ac_top_srcdir,;t t
19078 s,@INSTALL@,$ac_INSTALL,;t t
19079 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19081 if test x"$ac_file" != x-; then
19082 cp "$tmp/out" "$ac_file"
19084 for ac_name in prefix exec_prefix datarootdir
19086 ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
19087 if test -n "$ac_seen"; then
19088 ac_init=`${EGREP-egrep} '[ ]*'$ac_name'[ ]*=' "$ac_file"`
19089 if test -z "$ac_init"; then
19090 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
19091 { echo "$as_me:19091: WARNING: Variable $ac_name is used but was not set:
19093 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
19098 ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
19099 ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
19100 if test -s $tmp/out; then
19101 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
19102 { echo "$as_me:19102: WARNING: Some variables may not be substituted:
19104 echo "$as_me: WARNING: Some variables may not be substituted:
19114 cat >>"$CONFIG_STATUS" <<\EOF
19117 # CONFIG_HEADER section.
19120 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19121 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19123 # ac_d sets the value in "#define NAME VALUE" lines.
19124 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19125 ac_dB='[ ].*$,\1#\2'
19128 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19129 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19130 ac_iB='\([ ]\),\1#\2define\3'
19133 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19134 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19135 ac_uB='$,\1#\2define\3'
19139 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19140 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19142 - | *:- | *:-:* ) # input from stdin
19144 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19145 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19146 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19147 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19148 * ) ac_file_in=$ac_file.in ;;
19151 test x"$ac_file" != x- && { echo "$as_me:19151: creating $ac_file" >&5
19152 echo "$as_me: creating $ac_file" >&6;}
19154 # First look for the input files in the build tree, otherwise in the
19156 ac_file_inputs=`IFS=:
19157 for f in $ac_file_in; do
19159 -) echo $tmp/stdin ;;
19161 # Absolute (can't be DOS-style, as IFS=:)
19162 test -f "$f" || { { echo "$as_me:19162: error: cannot find input file: $f" >&5
19163 echo "$as_me: error: cannot find input file: $f" >&2;}
19164 { (exit 1); exit 1; }; }
19167 if test -f "$f"; then
19170 elif test -f "$srcdir/$f"; then
19175 { { echo "$as_me:19175: error: cannot find input file: $f" >&5
19176 echo "$as_me: error: cannot find input file: $f" >&2;}
19177 { (exit 1); exit 1; }; }
19180 done` || { (exit 1); exit 1; }
19181 # Remove the trailing spaces.
19182 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
19186 # Transform confdefs.h into a list of #define's. We won't use it as a sed
19187 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
19188 # be either 'cat' or 'sort'.
19189 cat confdefs.h | uniq >conftest.vals
19191 # Break up conftest.vals because some shells have a limit on
19192 # the size of here documents, and old seds have small limits too.
19194 rm -f conftest.tail
19195 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
19196 while grep . conftest.vals >/dev/null
19198 # Write chunks of a limited-size here document to conftest.frag.
19199 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
19200 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
19201 echo 'CEOF' >> "$CONFIG_STATUS"
19202 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
19203 rm -f conftest.vals
19204 mv conftest.tail conftest.vals
19206 rm -f conftest.vals
19208 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19210 echo ' cat >> conftest.edit <<CEOF
19211 /@DEFS@/r conftest.frag
19214 sed -f conftest.edit $tmp/in > $tmp/out
19216 mv $tmp/out $tmp/in
19217 rm -f conftest.edit conftest.frag
19218 ' >> "$CONFIG_STATUS"
19220 cat >>"$CONFIG_STATUS" <<\EOF
19221 # Let's still pretend it is `configure' which instantiates (i.e., don't
19222 # use $as_me), people would be surprised to read:
19223 # /* config.h. Generated automatically by config.status. */
19224 if test x"$ac_file" = x-; then
19225 echo "/* Generated automatically by configure. */" >$tmp/config.h
19227 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
19229 cat $tmp/in >>$tmp/config.h
19231 if test x"$ac_file" != x-; then
19232 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
19233 { echo "$as_me:19233: $ac_file is unchanged" >&5
19234 echo "$as_me: $ac_file is unchanged" >&6;}
19236 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19237 X"$ac_file" : 'X\(//\)[^/]' \| \
19238 X"$ac_file" : 'X\(//\)$' \| \
19239 X"$ac_file" : 'X\(/\)' \| \
19240 . : '\(.\)' 2>/dev/null ||
19242 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19243 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19244 /^X\(\/\/\)$/{ s//\1/; q; }
19245 /^X\(\/\).*/{ s//\1/; q; }
19247 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19248 { case "$ac_dir" in
19249 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19253 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19254 case $as_mkdir_dir in
19255 # Skip DOS drivespec
19256 ?:) as_incr_dir=$as_mkdir_dir ;;
19258 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19259 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19266 mv "$tmp/config.h" "$ac_file"
19270 rm -f $tmp/config.h
19274 cat >>"$CONFIG_STATUS" <<\EOF
19276 # CONFIG_COMMANDS section.
19278 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19279 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19280 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19284 if test -z "$USE_OLD_MAKERULES" ; then
19285 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
19292 cat >>"$CONFIG_STATUS" <<\EOF
19294 { (exit 0); exit 0; }
19296 chmod +x "$CONFIG_STATUS"
19297 ac_clean_files=$ac_clean_files_save
19299 # configure is writing to config.log, and then calls config.status.
19300 # config.status does its own redirection, appending to config.log.
19301 # Unfortunately, on DOS this fails, as config.log is still kept open
19302 # by configure, so config.status won't be able to write to it; its
19303 # output is simply discarded. So we exec the FD to /dev/null,
19304 # effectively closing config.log, so it can be properly (re)opened and
19305 # appended to by config.status. When coming back to configure, we
19306 # need to make the FD available again.
19307 if test "$no_create" != yes; then
19310 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
19312 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19313 # would make configure fail if this is the last instruction.
19314 "$ac_cs_success" || { (exit 1); exit 1; }
19316 ${MAKE:-make} preinstall