2 # From configure.in Revision: 1.84 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20210509.
6 # Copyright 2003-2020,2021 Thomas E. Dickey
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
12 # Avoid depending upon Character Ranges.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
36 if expr a : '\(a\)' >/dev/null 2>&1; then
42 rm -f conf$$ conf$$.exe conf$$.file
44 if ln -s conf$$.file conf$$ 2>/dev/null; then
45 # We could just check for DJGPP; but this test a) works b) is more generic
46 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47 if test -f conf$$.exe; then
48 # Don't use ln at all; we don't have any links
53 elif ln conf$$.file conf$$ 2>/dev/null; then
58 rm -f conf$$ conf$$.exe conf$$.file
60 as_executable_p="test -f"
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
70 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
80 # We need space, tab and new line, in precisely that order.
86 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
89 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90 # so uname gets run too.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
98 ac_default_prefix=/usr/local
103 SHELL=${CONFIG_SHELL-/bin/sh}
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete. It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : "${ac_max_here_lines=38}"
110 ac_unique_file="gen/gen.c"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
115 # include <sys/types.h>
118 # include <sys/stat.h>
129 # if !STDC_HEADERS && HAVE_MEMORY_H
135 # include <strings.h>
138 # include <inttypes.h>
148 # Initialize some variables set by options.
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
160 program_transform_name=s,x,x,
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
188 # Identity of this package.
198 # If the previous option needs an argument, assign it.
199 if test -n "$ac_prev"; then
200 eval "$ac_prev=\$ac_option"
205 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
207 # Accept the important Cygnus configure options, so we can diagnose typos.
211 -bindir | --bindir | --bindi | --bind | --bin | --bi)
213 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
216 -build | --build | --buil | --bui | --bu)
217 ac_prev=build_alias ;;
218 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219 build_alias=$ac_optarg ;;
221 -cache-file | --cache-file | --cache-fil | --cache-fi \
222 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223 ac_prev=cache_file ;;
224 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226 cache_file=$ac_optarg ;;
229 cache_file=config.cache ;;
231 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
233 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
235 datadir=$ac_optarg ;;
237 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238 | --dataroo | --dataro | --datar)
239 ac_prev=datarootdir ;;
240 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242 datarootdir=$ac_optarg ;;
244 -disable-* | --disable-*)
245 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246 # Reject names that are not valid shell variable names.
247 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249 { (exit 1); exit 1; }; }
250 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251 eval "enable_$ac_feature=no" ;;
253 -enable-* | --enable-*)
254 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255 # Reject names that are not valid shell variable names.
256 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258 { (exit 1); exit 1; }; }
259 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
261 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
264 eval "enable_$ac_feature='$ac_optarg'" ;;
266 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268 | --exec | --exe | --ex)
269 ac_prev=exec_prefix ;;
270 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272 | --exec=* | --exe=* | --ex=*)
273 exec_prefix=$ac_optarg ;;
275 -gas | --gas | --ga | --g)
276 # Obsolete; use --with-gas.
279 -help | --help | --hel | --he | -h)
281 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282 ac_init_help=recursive ;;
283 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284 ac_init_help=short ;;
286 -host | --host | --hos | --ho)
287 ac_prev=host_alias ;;
288 -host=* | --host=* | --hos=* | --ho=*)
289 host_alias=$ac_optarg ;;
291 -includedir | --includedir | --includedi | --included | --include \
292 | --includ | --inclu | --incl | --inc)
293 ac_prev=includedir ;;
294 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295 | --includ=* | --inclu=* | --incl=* | --inc=*)
296 includedir=$ac_optarg ;;
298 -infodir | --infodir | --infodi | --infod | --info | --inf)
300 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301 infodir=$ac_optarg ;;
303 -libdir | --libdir | --libdi | --libd)
305 -libdir=* | --libdir=* | --libdi=* | --libd=*)
308 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309 | --libexe | --libex | --libe)
310 ac_prev=libexecdir ;;
311 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312 | --libexe=* | --libex=* | --libe=*)
313 libexecdir=$ac_optarg ;;
315 -localstatedir | --localstatedir | --localstatedi | --localstated \
316 | --localstate | --localstat | --localsta | --localst \
317 | --locals | --local | --loca | --loc | --lo)
318 ac_prev=localstatedir ;;
319 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322 localstatedir=$ac_optarg ;;
324 -runstatedir | --runstatedir | --runstatedi | --runstated \
325 | --runstate | --runstat | --runsta | --runst \
326 | --runs | --run | --ru)
327 ac_prev=runstatedir ;;
328 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329 | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330 | --runs=* | --run=* | --ru=*)
331 runstatedir=$ac_optarg ;;
333 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
335 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
339 # Obsolete; use --without-fp.
342 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
346 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
350 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352 | --oldin | --oldi | --old | --ol | --o)
353 ac_prev=oldincludedir ;;
354 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357 oldincludedir=$ac_optarg ;;
359 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
361 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
364 -program-prefix | --program-prefix | --program-prefi | --program-pref \
365 | --program-pre | --program-pr | --program-p)
366 ac_prev=program_prefix ;;
367 -program-prefix=* | --program-prefix=* | --program-prefi=* \
368 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369 program_prefix=$ac_optarg ;;
371 -program-suffix | --program-suffix | --program-suffi | --program-suff \
372 | --program-suf | --program-su | --program-s)
373 ac_prev=program_suffix ;;
374 -program-suffix=* | --program-suffix=* | --program-suffi=* \
375 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376 program_suffix=$ac_optarg ;;
378 -program-transform-name | --program-transform-name \
379 | --program-transform-nam | --program-transform-na \
380 | --program-transform-n | --program-transform- \
381 | --program-transform | --program-transfor \
382 | --program-transfo | --program-transf \
383 | --program-trans | --program-tran \
384 | --progr-tra | --program-tr | --program-t)
385 ac_prev=program_transform_name ;;
386 -program-transform-name=* | --program-transform-name=* \
387 | --program-transform-nam=* | --program-transform-na=* \
388 | --program-transform-n=* | --program-transform-=* \
389 | --program-transform=* | --program-transfor=* \
390 | --program-transfo=* | --program-transf=* \
391 | --program-trans=* | --program-tran=* \
392 | --progr-tra=* | --program-tr=* | --program-t=*)
393 program_transform_name=$ac_optarg ;;
395 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396 | -silent | --silent | --silen | --sile | --sil)
399 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
401 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
403 sbindir=$ac_optarg ;;
405 -sharedstatedir | --sharedstatedir | --sharedstatedi \
406 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407 | --sharedst | --shareds | --shared | --share | --shar \
409 ac_prev=sharedstatedir ;;
410 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
414 sharedstatedir=$ac_optarg ;;
416 -site | --site | --sit)
418 -site=* | --site=* | --sit=*)
421 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
423 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
426 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427 | --syscon | --sysco | --sysc | --sys | --sy)
428 ac_prev=sysconfdir ;;
429 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431 sysconfdir=$ac_optarg ;;
433 -target | --target | --targe | --targ | --tar | --ta | --t)
434 ac_prev=target_alias ;;
435 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436 target_alias=$ac_optarg ;;
438 -v | -verbose | --verbose | --verbos | --verbo | --verb)
441 -version | --version | --versio | --versi | --vers | -V)
445 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446 # Reject names that are not valid shell variable names.
447 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448 { echo "$as_me: error: invalid package name: $ac_package" >&2
449 { (exit 1); exit 1; }; }
450 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
452 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
455 eval "with_$ac_package='$ac_optarg'" ;;
457 -without-* | --without-*)
458 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459 # Reject names that are not valid shell variable names.
460 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461 { echo "$as_me: error: invalid package name: $ac_package" >&2
462 { (exit 1); exit 1; }; }
463 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464 eval "with_$ac_package=no" ;;
467 # Obsolete; use --with-x.
470 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471 | --x-incl | --x-inc | --x-in | --x-i)
472 ac_prev=x_includes ;;
473 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475 x_includes=$ac_optarg ;;
477 -x-libraries | --x-libraries | --x-librarie | --x-librari \
478 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479 ac_prev=x_libraries ;;
480 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482 x_libraries=$ac_optarg ;;
484 -*) { echo "$as_me: error: unrecognized option: $ac_option
485 Try \`$0 --help' for more information." >&2
486 { (exit 1); exit 1; }; }
490 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491 # Reject names that are not valid shell variable names.
492 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494 { (exit 1); exit 1; }; }
495 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496 eval "$ac_envvar='$ac_optarg'"
497 export "$ac_envvar" ;;
500 # FIXME: should be removed in autoconf 3.0.
501 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
504 : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
510 if test -n "$ac_prev"; then
511 ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
512 { echo "$as_me: error: missing argument to $ac_option" >&2
513 { (exit 1); exit 1; }; }
516 # Be sure to have absolute paths.
517 for ac_var in exec_prefix prefix
519 eval ac_val=$`echo "$ac_var"`
521 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523 { (exit 1); exit 1; }; };;
527 # Be sure to have absolute paths.
528 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
529 localstatedir libdir includedir oldincludedir infodir mandir
531 eval ac_val=$`echo "$ac_var"`
533 [\\/$]* | ?:[\\/]* ) ;;
534 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535 { (exit 1); exit 1; }; };;
539 # There might be people who depend on the old broken behavior: `$host'
540 # used to hold the argument of --host etc.
545 # FIXME: should be removed in autoconf 3.0.
546 if test "x$host_alias" != x; then
547 if test "x$build_alias" = x; then
548 cross_compiling=maybe
549 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550 If a cross compiler is detected then cross compile mode will be used." >&2
551 elif test "x$build_alias" != "x$host_alias"; then
557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
559 test "$silent" = yes && exec 6>/dev/null
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563 ac_srcdir_defaulted=yes
564 # Try the directory containing this script, then its parent.
566 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
569 if test ! -r "$srcdir/$ac_unique_file"; then
573 ac_srcdir_defaulted=no
575 if test ! -r "$srcdir/$ac_unique_file"; then
576 if test "$ac_srcdir_defaulted" = yes; then
577 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578 { (exit 1); exit 1; }; }
580 { echo "$as_me: error: cannot find sources in $srcdir" >&2
581 { (exit 1); exit 1; }; }
584 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585 ac_env_build_alias_set=${build_alias+set}
586 ac_env_build_alias_value=$build_alias
587 ac_cv_env_build_alias_set=${build_alias+set}
588 ac_cv_env_build_alias_value=$build_alias
589 ac_env_host_alias_set=${host_alias+set}
590 ac_env_host_alias_value=$host_alias
591 ac_cv_env_host_alias_set=${host_alias+set}
592 ac_cv_env_host_alias_value=$host_alias
593 ac_env_target_alias_set=${target_alias+set}
594 ac_env_target_alias_value=$target_alias
595 ac_cv_env_target_alias_set=${target_alias+set}
596 ac_cv_env_target_alias_value=$target_alias
597 ac_env_CC_set=${CC+set}
599 ac_cv_env_CC_set=${CC+set}
600 ac_cv_env_CC_value=$CC
601 ac_env_CFLAGS_set=${CFLAGS+set}
602 ac_env_CFLAGS_value=$CFLAGS
603 ac_cv_env_CFLAGS_set=${CFLAGS+set}
604 ac_cv_env_CFLAGS_value=$CFLAGS
605 ac_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_env_LDFLAGS_value=$LDFLAGS
607 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608 ac_cv_env_LDFLAGS_value=$LDFLAGS
609 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_env_CPPFLAGS_value=$CPPFLAGS
611 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613 ac_env_CPP_set=${CPP+set}
614 ac_env_CPP_value=$CPP
615 ac_cv_env_CPP_set=${CPP+set}
616 ac_cv_env_CPP_value=$CPP
619 # Report the --help message.
621 if test "$ac_init_help" = "long"; then
622 # Omit some internal or obsolete options to make the list less imposing.
623 # This message is too long to be a string in the A/UX 3.1 sh.
625 \`configure' configures this package to adapt to many kinds of systems.
627 Usage: $0 [OPTION]... [VAR=VALUE]...
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE. See below for descriptions of some of the useful variables.
632 Defaults for the options are specified in brackets.
635 -h, --help display this help and exit
636 --help=short display options specific to this package
637 --help=recursive display the short help of all the included packages
638 -V, --version display version information and exit
639 -q, --quiet, --silent do not print \`checking...' messages
640 --cache-file=FILE cache test results in FILE [disabled]
641 -C, --config-cache alias for \`--cache-file=config.cache'
642 -n, --no-create do not create output files
643 --srcdir=DIR find the sources in DIR [configure dir or \`..']
648 Installation directories:
649 --prefix=PREFIX install architecture-independent files in PREFIX
651 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
659 For better control, use the options below.
661 Fine tuning of the installation directories:
662 --bindir=DIR user executables [EPREFIX/bin]
663 --sbindir=DIR system admin executables [EPREFIX/sbin]
664 --libexecdir=DIR program executables [EPREFIX/libexec]
665 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
666 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
667 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
668 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
669 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
670 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
671 --libdir=DIR object code libraries [EPREFIX/lib]
672 --includedir=DIR C header files [PREFIX/include]
673 --oldincludedir=DIR C header files for non-gcc [/usr/include]
674 --infodir=DIR info documentation [DATAROOTDIR/info]
675 --mandir=DIR man documentation [DATAROOTDIR/man]
681 --program-prefix=PREFIX prepend PREFIX to installed program names
682 --program-suffix=SUFFIX append SUFFIX to installed program names
683 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
686 --build=BUILD configure for building on BUILD [guessed]
687 --host=HOST build programs to run on HOST [BUILD]
688 --target=TARGET configure for building compilers for TARGET [HOST]
692 if test -n "$ac_init_help"; then
697 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
698 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
701 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
702 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
705 --with-system-type=XXX test: override derived host system-type
706 --disable-stripping do not strip (debug info) installed executables
707 --with-pkg-config{=path} enable/disable use of pkg-config
708 --with-pkg-config-libdir=XXX use given directory for installing pc-files
709 --without-tests suppress build with test-programs
710 --enable-mixed-case tic should assume mixed-case filenames
711 --with-install-prefix prefixes actual install-location ($DESTDIR)
712 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
713 --with-build-cc=XXX the build C compiler ($BUILD_CC)
714 --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
715 --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
716 --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
717 --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
718 --with-build-libs=XXX the build libraries (${BUILD_LIBS})
719 Options to Specify the Libraries Built/Used:
720 --with-shared generate shared C-objects (needed for --with-ada-sharedlib)
721 --with-curses-dir=DIR directory in which (n)curses is installed
722 --enable-widec compile with wide-char/UTF-8 code
723 --with-lib-prefix override library-prefix
724 --with-shlib-version=X Specify rel or abi version for shared libs
725 --enable-rpath-link link sample programs with rpath option
726 Fine-Tuning Your Configuration:
727 --enable-broken_linker compile with broken-linker support code
728 --disable-largefile omit support for large files
729 --with-rcs-ids compile-in RCS identifiers
731 --disable-ext-funcs disable function-extensions
732 --enable-const compile with extra/non-standard const
734 --without-develop disable development options
736 --with-pthread use POSIX thread library
737 --enable-weak-symbols enable weak-symbols for pthreads
738 --enable-reentrant compile with experimental reentrant code
739 --with-wrap-prefix=XXX override prefix used for public variables
740 Testing/development Options:
741 --disable-echo do not display "compiling" commands
742 --enable-warnings test: turn on gcc compiler warnings
743 --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics
744 --enable-assertions test: turn on generation of assertion code
745 --enable-expanded test: generate functions for certain macros
746 --disable-macros test: use functions rather than macros
747 --with-trace test: add trace() function to all models of ncurses
748 --disable-gnat-projects test: disable GNAT projects even if usable
749 Ada95 Binding Options:
750 --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
751 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
752 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
753 --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
754 --with-ada-libname=XXX override default Ada library-name
756 Some influential environment variables:
757 CC C compiler command
758 CFLAGS C compiler flags
759 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
760 nonstandard directory <lib dir>
761 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
762 headers in a nonstandard directory <include dir>
765 Use these variables to override the choices made by `configure' or to help
766 it to find libraries and programs with nonstandard names/locations.
771 if test "$ac_init_help" = "recursive"; then
772 # If there are subdirs, report their specific --help.
774 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
776 # A "../" for each directory in /$ac_subdir.
777 ac_dots=`echo "$ac_subdir" |
778 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
781 .) # No --srcdir option. We are building in place.
782 ac_sub_srcdir="$srcdir" ;;
783 [\\/]* | ?:[\\/]* ) # Absolute path.
784 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
786 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
789 # Check for guested configure; otherwise get Cygnus style configure.
790 if test -f "$ac_sub_srcdir/configure.gnu"; then
792 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
793 elif test -f "$ac_sub_srcdir/configure"; then
795 $SHELL "$ac_sub_srcdir/configure" --help=recursive
796 elif test -f "$ac_sub_srcdir/configure.ac" ||
797 test -f "$ac_sub_srcdir/configure.in"; then
799 "$ac_configure" --help
801 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
807 test -n "$ac_init_help" && exit 0
808 if "$ac_init_version"; then
811 Copyright 2003-2020,2021 Thomas E. Dickey
812 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
813 Free Software Foundation, Inc.
814 This configure script is free software; the Free Software Foundation
815 gives unlimited permission to copy, distribute and modify it.
821 This file contains any messages produced by compilers while
822 running configure, to aid debugging if configure makes a mistake.
824 It was created by $as_me, which was
825 generated by GNU Autoconf 2.52.20210509. Invocation command line was
836 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
837 uname -m = `(uname -m) 2>/dev/null || echo unknown`
838 uname -r = `(uname -r) 2>/dev/null || echo unknown`
839 uname -s = `(uname -s) 2>/dev/null || echo unknown`
840 uname -v = `(uname -v) 2>/dev/null || echo unknown`
842 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
843 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
845 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
846 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
847 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
848 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
849 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
850 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
851 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
865 # Keep a trace of the command line.
866 # Strip out --no-create and --no-recursion so they do not pile up.
867 # Also quote any args containing shell meta-characters.
873 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
874 | --no-cr | --no-c) ;;
875 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
876 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
877 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
878 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
879 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
881 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
884 # Get rid of the leading space.
887 # When interrupted or exit'd, cleanup temporary files, and complete
888 # config.log. We remove comments because anyway the quotes in there
889 # would cause problems or look ugly.
891 # Save into config.log some information that might help in debugging.
893 echo "## ----------------- ##" >&5
894 echo "## Cache variables. ##" >&5
895 echo "## ----------------- ##" >&5
897 # The following way of writing the cache mishandles newlines in values,
900 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
903 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
904 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
908 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
912 sed "/^$/d" confdefs.h >conftest.log
913 if test -s conftest.log; then
915 echo "## ------------ ##" >&5
916 echo "## confdefs.h. ##" >&5
917 echo "## ------------ ##" >&5
922 test "$ac_signal" != 0 &&
923 echo "$as_me: caught signal $ac_signal" >&5
924 echo "$as_me: exit $exit_status" >&5
925 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
928 for ac_signal in 1 2 13 15; do
929 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
933 # confdefs.h avoids OS command line length limits that DEFS can exceed.
934 rm -rf conftest* confdefs.h
935 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
938 # Let the site file select an alternate cache file if it wants to.
939 # Prefer explicitly selected file to automatically selected ones.
940 if test -z "$CONFIG_SITE"; then
941 if test "x$prefix" != xNONE; then
942 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
944 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
947 for ac_site_file in $CONFIG_SITE; do
948 if test -r "$ac_site_file"; then
949 { echo "$as_me:949: loading site script $ac_site_file" >&5
950 echo "$as_me: loading site script $ac_site_file" >&6;}
951 cat "$ac_site_file" >&5
956 if test -r "$cache_file"; then
957 # Some versions of bash will fail to source /dev/null (special
958 # files actually), so we avoid doing that.
959 if test -f "$cache_file"; then
960 { echo "$as_me:960: loading cache $cache_file" >&5
961 echo "$as_me: loading cache $cache_file" >&6;}
963 [\\/]* | ?:[\\/]* ) . $cache_file;;
968 { echo "$as_me:968: creating cache $cache_file" >&5
969 echo "$as_me: creating cache $cache_file" >&6;}
973 # Check that the precious variables saved in the cache have kept the same
975 ac_cache_corrupted=false
976 for ac_var in `(set) 2>&1 |
977 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
978 eval ac_old_set=\$ac_cv_env_${ac_var}_set
979 eval ac_new_set=\$ac_env_${ac_var}_set
980 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
981 eval ac_new_val="\$ac_env_${ac_var}_value"
982 case "$ac_old_set,$ac_new_set" in
984 { echo "$as_me:984: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
985 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
986 ac_cache_corrupted=: ;;
988 { echo "$as_me:988: error: \`$ac_var' was not set in the previous run" >&5
989 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
990 ac_cache_corrupted=: ;;
993 if test "x$ac_old_val" != "x$ac_new_val"; then
994 { echo "$as_me:994: error: \`$ac_var' has changed since the previous run:" >&5
995 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
996 { echo "$as_me:996: former value: $ac_old_val" >&5
997 echo "$as_me: former value: $ac_old_val" >&2;}
998 { echo "$as_me:998: current value: $ac_new_val" >&5
999 echo "$as_me: current value: $ac_new_val" >&2;}
1000 ac_cache_corrupted=:
1003 # Pass precious variables to config.status. It doesn't matter if
1004 # we pass some twice (in addition to the command line arguments).
1005 if test "$ac_new_set" = set; then
1006 case "$ac_new_val" in
1007 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1008 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1009 ac_configure_args="$ac_configure_args '$ac_arg'"
1011 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1016 if "$ac_cache_corrupted"; then
1017 { echo "$as_me:1017: error: changes in the environment can compromise the build" >&5
1018 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1019 { { echo "$as_me:1019: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1020 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1021 { (exit 1); exit 1; }; }
1025 ac_cpp='$CPP $CPPFLAGS'
1026 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1027 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1028 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1029 ac_main_return="return"
1031 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1033 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1045 echo "#! $SHELL" >conftest.sh
1046 echo "exit 0" >>conftest.sh
1047 chmod +x conftest.sh
1048 if { (echo "$as_me:1048: PATH=\".;.\"; conftest.sh") >&5
1049 (PATH=".;."; conftest.sh) 2>&5
1051 echo "$as_me:1051: \$? = $ac_status" >&5
1052 (exit "$ac_status"); }; then
1053 ac_path_separator=';'
1057 PATH_SEPARATOR="$ac_path_separator"
1060 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1065 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1066 if test -f "$ac_dir/install-sh"; then
1068 ac_install_sh="$ac_aux_dir/install-sh -c"
1070 elif test -f "$ac_dir/install.sh"; then
1072 ac_install_sh="$ac_aux_dir/install.sh -c"
1074 elif test -f "$ac_dir/shtool"; then
1076 ac_install_sh="$ac_aux_dir/shtool install -c"
1080 if test -z "$ac_aux_dir"; then
1081 { { echo "$as_me:1081: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1082 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1083 { (exit 1); exit 1; }; }
1085 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1086 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1087 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1089 # Make sure we can run config.sub.
1090 $ac_config_sub sun4 >/dev/null 2>&1 ||
1091 { { echo "$as_me:1091: error: cannot run $ac_config_sub" >&5
1092 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1093 { (exit 1); exit 1; }; }
1095 echo "$as_me:1095: checking build system type" >&5
1096 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1097 if test "${ac_cv_build+set}" = set; then
1098 echo $ECHO_N "(cached) $ECHO_C" >&6
1100 ac_cv_build_alias=$build_alias
1101 test -z "$ac_cv_build_alias" &&
1102 ac_cv_build_alias=`$ac_config_guess`
1103 test -z "$ac_cv_build_alias" &&
1104 { { echo "$as_me:1104: error: cannot guess build type; you must specify one" >&5
1105 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1106 { (exit 1); exit 1; }; }
1107 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1108 { { echo "$as_me:1108: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1109 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1110 { (exit 1); exit 1; }; }
1113 echo "$as_me:1113: result: $ac_cv_build" >&5
1114 echo "${ECHO_T}$ac_cv_build" >&6
1116 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1117 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1118 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1120 echo "$as_me:1120: checking host system type" >&5
1121 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1122 if test "${ac_cv_host+set}" = set; then
1123 echo $ECHO_N "(cached) $ECHO_C" >&6
1125 ac_cv_host_alias=$host_alias
1126 test -z "$ac_cv_host_alias" &&
1127 ac_cv_host_alias=$ac_cv_build_alias
1128 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1129 { { echo "$as_me:1129: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1130 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1131 { (exit 1); exit 1; }; }
1134 echo "$as_me:1134: result: $ac_cv_host" >&5
1135 echo "${ECHO_T}$ac_cv_host" >&6
1137 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1138 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1139 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1141 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1142 echo "$as_me:1142: checking target system type" >&5
1143 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1144 if test "${ac_cv_target+set}" = set; then
1145 echo $ECHO_N "(cached) $ECHO_C" >&6
1147 ac_cv_target_alias=$target_alias
1148 test "x$ac_cv_target_alias" = "x" &&
1149 ac_cv_target_alias=$ac_cv_host_alias
1150 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1151 { { echo "$as_me:1151: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1152 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1153 { (exit 1); exit 1; }; }
1156 echo "$as_me:1156: result: $ac_cv_target" >&5
1157 echo "${ECHO_T}$ac_cv_target" >&6
1158 target=$ac_cv_target
1159 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1160 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1161 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1163 # The aliases save the names the user supplied, while $host etc.
1164 # will get canonicalized.
1165 test -n "$target_alias" &&
1166 test "$program_prefix$program_suffix$program_transform_name" = \
1168 program_prefix=${target_alias}-
1169 system_name="$host_os"
1171 system_name="`(uname -s -r) 2>/dev/null`"
1172 if test -z "$system_name" ; then
1173 system_name="`(hostname) 2>/dev/null`"
1176 test -n "$system_name" &&
1177 cat >>confdefs.h <<EOF
1178 #define SYSTEM_NAME "$system_name"
1181 if test "${cf_cv_system_name+set}" = set; then
1182 echo $ECHO_N "(cached) $ECHO_C" >&6
1184 cf_cv_system_name="$system_name"
1187 test -z "$system_name" && system_name="$cf_cv_system_name"
1188 test -n "$cf_cv_system_name" && echo "$as_me:1188: result: Configuring for $cf_cv_system_name" >&5
1189 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1191 if test ".$system_name" != ".$cf_cv_system_name" ; then
1192 echo "$as_me:1192: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1193 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1194 { { echo "$as_me:1194: error: \"Please remove config.cache and try again.\"" >&5
1195 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1196 { (exit 1); exit 1; }; }
1199 # Check whether --with-system-type or --without-system-type was given.
1200 if test "${with_system_type+set}" = set; then
1201 withval="$with_system_type"
1202 { echo "$as_me:1202: WARNING: overriding system type to $withval" >&5
1203 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1204 cf_cv_system_name=$withval
1209 ### Save the given $CFLAGS to allow user-override.
1210 cf_user_CFLAGS="$CFLAGS"
1212 ### Default install-location
1213 for ac_prog in ggrep grep
1215 # Extract the first word of "$ac_prog", so it can be a program name with args.
1216 set dummy $ac_prog; ac_word=$2
1217 echo "$as_me:1217: checking for $ac_word" >&5
1218 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1219 if test "${ac_cv_prog_GREP+set}" = set; then
1220 echo $ECHO_N "(cached) $ECHO_C" >&6
1222 if test -n "$GREP"; then
1223 ac_cv_prog_GREP="$GREP" # Let the user override the test.
1225 ac_save_IFS=$IFS; IFS=$ac_path_separator
1227 for ac_dir in $ac_dummy; do
1229 test -z "$ac_dir" && ac_dir=.
1230 $as_executable_p "$ac_dir/$ac_word" || continue
1231 ac_cv_prog_GREP="$ac_prog"
1232 echo "$as_me:1232: found $ac_dir/$ac_word" >&5
1238 GREP=$ac_cv_prog_GREP
1239 if test -n "$GREP"; then
1240 echo "$as_me:1240: result: $GREP" >&5
1241 echo "${ECHO_T}$GREP" >&6
1243 echo "$as_me:1243: result: no" >&5
1244 echo "${ECHO_T}no" >&6
1247 test -n "$GREP" && break
1249 test -n "$GREP" || GREP=": "
1251 echo "$as_me:1251: checking for fgrep" >&5
1252 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1253 if test "${ac_cv_path_FGREP+set}" = set; then
1254 echo $ECHO_N "(cached) $ECHO_C" >&6
1256 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1257 then ac_cv_path_FGREP="$GREP -F"
1259 for ac_prog in gfgrep fgrep
1261 # Extract the first word of "$ac_prog", so it can be a program name with args.
1262 set dummy $ac_prog; ac_word=$2
1263 echo "$as_me:1263: checking for $ac_word" >&5
1264 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1265 if test "${ac_cv_path_FGREP+set}" = set; then
1266 echo $ECHO_N "(cached) $ECHO_C" >&6
1270 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1273 ac_save_IFS=$IFS; IFS=$ac_path_separator
1275 for ac_dir in $ac_dummy; do
1277 test -z "$ac_dir" && ac_dir=.
1278 if $as_executable_p "$ac_dir/$ac_word"; then
1279 ac_cv_path_FGREP="$ac_dir/$ac_word"
1280 echo "$as_me:1280: found $ac_dir/$ac_word" >&5
1288 FGREP=$ac_cv_path_FGREP
1290 if test -n "$FGREP"; then
1291 echo "$as_me:1291: result: $FGREP" >&5
1292 echo "${ECHO_T}$FGREP" >&6
1294 echo "$as_me:1294: result: no" >&5
1295 echo "${ECHO_T}no" >&6
1298 test -n "$FGREP" && break
1300 test -n "$FGREP" || FGREP=": "
1302 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1302: error: cannot find workable fgrep" >&5
1303 echo "$as_me: error: cannot find workable fgrep" >&2;}
1304 { (exit 1); exit 1; }; }
1307 echo "$as_me:1307: result: $ac_cv_path_FGREP" >&5
1308 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1309 FGREP="$ac_cv_path_FGREP"
1311 echo "$as_me:1311: checking for prefix" >&5
1312 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1313 if test "x$prefix" = "xNONE" ; then
1314 case "$cf_cv_system_name" in
1315 # non-vendor systems don't have a conflict
1316 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1319 (*) prefix=$ac_default_prefix
1323 echo "$as_me:1323: result: $prefix" >&5
1324 echo "${ECHO_T}$prefix" >&6
1326 if test "x$prefix" = "xNONE" ; then
1327 echo "$as_me:1327: checking for default include-directory" >&5
1328 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1329 test -n "$verbose" && echo 1>&6
1332 "$includedir/ncurses" \
1334 "$prefix/include/ncurses" \
1335 /usr/local/include \
1336 /usr/local/include/ncurses \
1338 /usr/include/ncurses
1340 cf_dir=`eval echo "$cf_symbol"`
1341 if test -f "$cf_dir/curses.h" ; then
1342 if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1343 includedir="$cf_symbol"
1344 test -n "$verbose" && echo $ECHO_N " found " 1>&6
1348 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1350 echo "$as_me:1350: result: $includedir" >&5
1351 echo "${ECHO_T}$includedir" >&6
1354 ### Checks for programs.
1357 ac_cpp='$CPP $CPPFLAGS'
1358 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1359 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1360 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1361 ac_main_return="return"
1362 if test -n "$ac_tool_prefix"; then
1363 for ac_prog in gnatgcc gcc cc
1365 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1366 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1367 echo "$as_me:1367: checking for $ac_word" >&5
1368 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1369 if test "${ac_cv_prog_CC+set}" = set; then
1370 echo $ECHO_N "(cached) $ECHO_C" >&6
1372 if test -n "$CC"; then
1373 ac_cv_prog_CC="$CC" # Let the user override the test.
1375 ac_save_IFS=$IFS; IFS=$ac_path_separator
1377 for ac_dir in $ac_dummy; do
1379 test -z "$ac_dir" && ac_dir=.
1380 $as_executable_p "$ac_dir/$ac_word" || continue
1381 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1382 echo "$as_me:1382: found $ac_dir/$ac_word" >&5
1389 if test -n "$CC"; then
1390 echo "$as_me:1390: result: $CC" >&5
1391 echo "${ECHO_T}$CC" >&6
1393 echo "$as_me:1393: result: no" >&5
1394 echo "${ECHO_T}no" >&6
1397 test -n "$CC" && break
1400 if test -z "$CC"; then
1402 for ac_prog in gnatgcc gcc cc
1404 # Extract the first word of "$ac_prog", so it can be a program name with args.
1405 set dummy $ac_prog; ac_word=$2
1406 echo "$as_me:1406: checking for $ac_word" >&5
1407 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1408 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1409 echo $ECHO_N "(cached) $ECHO_C" >&6
1411 if test -n "$ac_ct_CC"; then
1412 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1414 ac_save_IFS=$IFS; IFS=$ac_path_separator
1416 for ac_dir in $ac_dummy; do
1418 test -z "$ac_dir" && ac_dir=.
1419 $as_executable_p "$ac_dir/$ac_word" || continue
1420 ac_cv_prog_ac_ct_CC="$ac_prog"
1421 echo "$as_me:1421: found $ac_dir/$ac_word" >&5
1427 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1428 if test -n "$ac_ct_CC"; then
1429 echo "$as_me:1429: result: $ac_ct_CC" >&5
1430 echo "${ECHO_T}$ac_ct_CC" >&6
1432 echo "$as_me:1432: result: no" >&5
1433 echo "${ECHO_T}no" >&6
1436 test -n "$ac_ct_CC" && break
1442 test -z "$CC" && { { echo "$as_me:1442: error: no acceptable cc found in \$PATH" >&5
1443 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1444 { (exit 1); exit 1; }; }
1446 # Provide some information about the compiler.
1447 echo "$as_me:1447:" \
1448 "checking for C compiler version" >&5
1449 ac_compiler=`set X $ac_compile; echo "$2"`
1450 { (eval echo "$as_me:1450: \"$ac_compiler --version </dev/null >&5\"") >&5
1451 (eval $ac_compiler --version </dev/null >&5) 2>&5
1453 echo "$as_me:1453: \$? = $ac_status" >&5
1454 (exit "$ac_status"); }
1455 { (eval echo "$as_me:1455: \"$ac_compiler -v </dev/null >&5\"") >&5
1456 (eval $ac_compiler -v </dev/null >&5) 2>&5
1458 echo "$as_me:1458: \$? = $ac_status" >&5
1459 (exit "$ac_status"); }
1460 { (eval echo "$as_me:1460: \"$ac_compiler -V </dev/null >&5\"") >&5
1461 (eval $ac_compiler -V </dev/null >&5) 2>&5
1463 echo "$as_me:1463: \$? = $ac_status" >&5
1464 (exit "$ac_status"); }
1466 cat >"conftest.$ac_ext" <<_ACEOF
1467 #line 1467 "configure"
1468 #include "confdefs.h"
1478 ac_clean_files_save=$ac_clean_files
1479 ac_clean_files="$ac_clean_files a.out a.exe"
1480 # Try to create an executable without -o first, disregard a.out.
1481 # It will help us diagnose broken compilers, and finding out an intuition
1483 echo "$as_me:1483: checking for C compiler default output" >&5
1484 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1485 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1486 if { (eval echo "$as_me:1486: \"$ac_link_default\"") >&5
1487 (eval $ac_link_default) 2>&5
1489 echo "$as_me:1489: \$? = $ac_status" >&5
1490 (exit "$ac_status"); }; then
1491 # Find the output, starting from the most likely. This scheme is
1492 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1494 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1495 ls a.out conftest 2>/dev/null;
1496 ls a.* conftest.* 2>/dev/null`; do
1498 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1499 a.out ) # We found the default executable, but exeext='' is most
1502 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1503 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1510 echo "$as_me: failed program was:" >&5
1511 cat "conftest.$ac_ext" >&5
1512 { { echo "$as_me:1512: error: C compiler cannot create executables" >&5
1513 echo "$as_me: error: C compiler cannot create executables" >&2;}
1514 { (exit 77); exit 77; }; }
1517 ac_exeext=$ac_cv_exeext
1518 echo "$as_me:1518: result: $ac_file" >&5
1519 echo "${ECHO_T}$ac_file" >&6
1521 # Check the compiler produces executables we can run. If not, either
1522 # the compiler is broken, or we cross compile.
1523 echo "$as_me:1523: checking whether the C compiler works" >&5
1524 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1525 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1526 # If not cross compiling, check that we can run a simple program.
1527 if test "$cross_compiling" != yes; then
1528 if { ac_try='./$ac_file'
1529 { (eval echo "$as_me:1529: \"$ac_try\"") >&5
1532 echo "$as_me:1532: \$? = $ac_status" >&5
1533 (exit "$ac_status"); }; }; then
1536 if test "$cross_compiling" = maybe; then
1539 { { echo "$as_me:1539: error: cannot run C compiled programs.
1540 If you meant to cross compile, use \`--host'." >&5
1541 echo "$as_me: error: cannot run C compiled programs.
1542 If you meant to cross compile, use \`--host'." >&2;}
1543 { (exit 1); exit 1; }; }
1547 echo "$as_me:1547: result: yes" >&5
1548 echo "${ECHO_T}yes" >&6
1550 rm -f a.out a.exe "conftest$ac_cv_exeext"
1551 ac_clean_files=$ac_clean_files_save
1552 # Check the compiler produces executables we can run. If not, either
1553 # the compiler is broken, or we cross compile.
1554 echo "$as_me:1554: checking whether we are cross compiling" >&5
1555 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1556 echo "$as_me:1556: result: $cross_compiling" >&5
1557 echo "${ECHO_T}$cross_compiling" >&6
1559 echo "$as_me:1559: checking for executable suffix" >&5
1560 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1561 if { (eval echo "$as_me:1561: \"$ac_link\"") >&5
1562 (eval $ac_link) 2>&5
1564 echo "$as_me:1564: \$? = $ac_status" >&5
1565 (exit "$ac_status"); }; then
1566 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1567 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1568 # work properly (i.e., refer to `conftest.exe'), while it won't with
1570 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1572 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1573 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1580 { { echo "$as_me:1580: error: cannot compute EXEEXT: cannot compile and link" >&5
1581 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1582 { (exit 1); exit 1; }; }
1585 rm -f "conftest$ac_cv_exeext"
1586 echo "$as_me:1586: result: $ac_cv_exeext" >&5
1587 echo "${ECHO_T}$ac_cv_exeext" >&6
1589 rm -f "conftest.$ac_ext"
1590 EXEEXT=$ac_cv_exeext
1592 echo "$as_me:1592: checking for object suffix" >&5
1593 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1594 if test "${ac_cv_objext+set}" = set; then
1595 echo $ECHO_N "(cached) $ECHO_C" >&6
1597 cat >"conftest.$ac_ext" <<_ACEOF
1598 #line 1598 "configure"
1599 #include "confdefs.h"
1609 rm -f conftest.o conftest.obj
1610 if { (eval echo "$as_me:1610: \"$ac_compile\"") >&5
1611 (eval $ac_compile) 2>&5
1613 echo "$as_me:1613: \$? = $ac_status" >&5
1614 (exit "$ac_status"); }; then
1615 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1617 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1618 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1623 echo "$as_me: failed program was:" >&5
1624 cat "conftest.$ac_ext" >&5
1625 { { echo "$as_me:1625: error: cannot compute OBJEXT: cannot compile" >&5
1626 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1627 { (exit 1); exit 1; }; }
1630 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1632 echo "$as_me:1632: result: $ac_cv_objext" >&5
1633 echo "${ECHO_T}$ac_cv_objext" >&6
1634 OBJEXT=$ac_cv_objext
1636 echo "$as_me:1636: checking whether we are using the GNU C compiler" >&5
1637 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1638 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1639 echo $ECHO_N "(cached) $ECHO_C" >&6
1641 cat >"conftest.$ac_ext" <<_ACEOF
1642 #line 1642 "configure"
1643 #include "confdefs.h"
1656 rm -f "conftest.$ac_objext"
1657 if { (eval echo "$as_me:1657: \"$ac_compile\"") >&5
1658 (eval $ac_compile) 2>&5
1660 echo "$as_me:1660: \$? = $ac_status" >&5
1661 (exit "$ac_status"); } &&
1662 { ac_try='test -s "conftest.$ac_objext"'
1663 { (eval echo "$as_me:1663: \"$ac_try\"") >&5
1666 echo "$as_me:1666: \$? = $ac_status" >&5
1667 (exit "$ac_status"); }; }; then
1670 echo "$as_me: failed program was:" >&5
1671 cat "conftest.$ac_ext" >&5
1674 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1675 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1678 echo "$as_me:1678: result: $ac_cv_c_compiler_gnu" >&5
1679 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1680 GCC=`test $ac_compiler_gnu = yes && echo yes`
1681 ac_test_CFLAGS=${CFLAGS+set}
1682 ac_save_CFLAGS=$CFLAGS
1684 echo "$as_me:1684: checking whether $CC accepts -g" >&5
1685 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1686 if test "${ac_cv_prog_cc_g+set}" = set; then
1687 echo $ECHO_N "(cached) $ECHO_C" >&6
1689 cat >"conftest.$ac_ext" <<_ACEOF
1690 #line 1690 "configure"
1691 #include "confdefs.h"
1701 rm -f "conftest.$ac_objext"
1702 if { (eval echo "$as_me:1702: \"$ac_compile\"") >&5
1703 (eval $ac_compile) 2>&5
1705 echo "$as_me:1705: \$? = $ac_status" >&5
1706 (exit "$ac_status"); } &&
1707 { ac_try='test -s "conftest.$ac_objext"'
1708 { (eval echo "$as_me:1708: \"$ac_try\"") >&5
1711 echo "$as_me:1711: \$? = $ac_status" >&5
1712 (exit "$ac_status"); }; }; then
1715 echo "$as_me: failed program was:" >&5
1716 cat "conftest.$ac_ext" >&5
1719 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1721 echo "$as_me:1721: result: $ac_cv_prog_cc_g" >&5
1722 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1723 if test "$ac_test_CFLAGS" = set; then
1724 CFLAGS=$ac_save_CFLAGS
1725 elif test $ac_cv_prog_cc_g = yes; then
1726 if test "$GCC" = yes; then
1732 if test "$GCC" = yes; then
1738 # Some people use a C++ compiler to compile C. Since we use `exit',
1739 # in C++ we need to declare it. In case someone uses the same compiler
1740 # for both compiling C and C++ we need to have the C++ compiler decide
1741 # the declaration of exit, since it's the most demanding environment.
1742 cat >"conftest.$ac_ext" <<_ACEOF
1747 rm -f "conftest.$ac_objext"
1748 if { (eval echo "$as_me:1748: \"$ac_compile\"") >&5
1749 (eval $ac_compile) 2>&5
1751 echo "$as_me:1751: \$? = $ac_status" >&5
1752 (exit "$ac_status"); } &&
1753 { ac_try='test -s "conftest.$ac_objext"'
1754 { (eval echo "$as_me:1754: \"$ac_try\"") >&5
1757 echo "$as_me:1757: \$? = $ac_status" >&5
1758 (exit "$ac_status"); }; }; then
1759 for ac_declaration in \
1761 '#include <stdlib.h>' \
1762 'extern "C" void std::exit (int) throw (); using std::exit;' \
1763 'extern "C" void std::exit (int); using std::exit;' \
1764 'extern "C" void exit (int) throw ();' \
1765 'extern "C" void exit (int);' \
1768 cat >"conftest.$ac_ext" <<_ACEOF
1769 #line 1769 "configure"
1770 #include "confdefs.h"
1781 rm -f "conftest.$ac_objext"
1782 if { (eval echo "$as_me:1782: \"$ac_compile\"") >&5
1783 (eval $ac_compile) 2>&5
1785 echo "$as_me:1785: \$? = $ac_status" >&5
1786 (exit "$ac_status"); } &&
1787 { ac_try='test -s "conftest.$ac_objext"'
1788 { (eval echo "$as_me:1788: \"$ac_try\"") >&5
1791 echo "$as_me:1791: \$? = $ac_status" >&5
1792 (exit "$ac_status"); }; }; then
1795 echo "$as_me: failed program was:" >&5
1796 cat "conftest.$ac_ext" >&5
1799 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1800 cat >"conftest.$ac_ext" <<_ACEOF
1801 #line 1801 "configure"
1802 #include "confdefs.h"
1812 rm -f "conftest.$ac_objext"
1813 if { (eval echo "$as_me:1813: \"$ac_compile\"") >&5
1814 (eval $ac_compile) 2>&5
1816 echo "$as_me:1816: \$? = $ac_status" >&5
1817 (exit "$ac_status"); } &&
1818 { ac_try='test -s "conftest.$ac_objext"'
1819 { (eval echo "$as_me:1819: \"$ac_try\"") >&5
1822 echo "$as_me:1822: \$? = $ac_status" >&5
1823 (exit "$ac_status"); }; }; then
1826 echo "$as_me: failed program was:" >&5
1827 cat "conftest.$ac_ext" >&5
1829 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1832 if test -n "$ac_declaration"; then
1833 echo '#ifdef __cplusplus' >>confdefs.h
1834 echo "$ac_declaration" >>confdefs.h
1835 echo '#endif' >>confdefs.h
1839 echo "$as_me: failed program was:" >&5
1840 cat "conftest.$ac_ext" >&5
1842 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1844 ac_cpp='$CPP $CPPFLAGS'
1845 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1846 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1847 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1848 ac_main_return="return"
1851 if test "$GCC" = yes ; then
1852 echo "$as_me:1852: checking version of $CC" >&5
1853 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1854 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1855 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1856 echo "$as_me:1856: result: $GCC_VERSION" >&5
1857 echo "${ECHO_T}$GCC_VERSION" >&6
1862 if test "$GCC" = yes ; then
1865 echo "$as_me:1865: checking if this is really Intel C compiler" >&5
1866 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1867 cf_save_CFLAGS="$CFLAGS"
1868 CFLAGS="$CFLAGS -no-gcc"
1869 cat >"conftest.$ac_ext" <<_ACEOF
1870 #line 1870 "configure"
1871 #include "confdefs.h"
1877 #ifdef __INTEL_COMPILER
1886 rm -f "conftest.$ac_objext"
1887 if { (eval echo "$as_me:1887: \"$ac_compile\"") >&5
1888 (eval $ac_compile) 2>&5
1890 echo "$as_me:1890: \$? = $ac_status" >&5
1891 (exit "$ac_status"); } &&
1892 { ac_try='test -s "conftest.$ac_objext"'
1893 { (eval echo "$as_me:1893: \"$ac_try\"") >&5
1896 echo "$as_me:1896: \$? = $ac_status" >&5
1897 (exit "$ac_status"); }; }; then
1899 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1902 echo "$as_me: failed program was:" >&5
1903 cat "conftest.$ac_ext" >&5
1905 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1906 CFLAGS="$cf_save_CFLAGS"
1907 echo "$as_me:1907: result: $INTEL_COMPILER" >&5
1908 echo "${ECHO_T}$INTEL_COMPILER" >&6
1915 if test "$GCC" = yes ; then
1916 echo "$as_me:1916: checking if this is really Clang C compiler" >&5
1917 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1918 cf_save_CFLAGS="$CFLAGS"
1919 cat >"conftest.$ac_ext" <<_ACEOF
1920 #line 1920 "configure"
1921 #include "confdefs.h"
1936 rm -f "conftest.$ac_objext"
1937 if { (eval echo "$as_me:1937: \"$ac_compile\"") >&5
1938 (eval $ac_compile) 2>&5
1940 echo "$as_me:1940: \$? = $ac_status" >&5
1941 (exit "$ac_status"); } &&
1942 { ac_try='test -s "conftest.$ac_objext"'
1943 { (eval echo "$as_me:1943: \"$ac_try\"") >&5
1946 echo "$as_me:1946: \$? = $ac_status" >&5
1947 (exit "$ac_status"); }; }; then
1951 echo "$as_me: failed program was:" >&5
1952 cat "conftest.$ac_ext" >&5
1954 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1955 CFLAGS="$cf_save_CFLAGS"
1956 echo "$as_me:1956: result: $CLANG_COMPILER" >&5
1957 echo "${ECHO_T}$CLANG_COMPILER" >&6
1962 if test "x$CLANG_COMPILER" = "xyes" ; then
1964 (c[1-9][0-9]|*/c[1-9][0-9])
1965 { echo "$as_me:1965: WARNING: replacing broken compiler alias $CC" >&5
1966 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
1967 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
1972 echo "$as_me:1972: checking version of $CC" >&5
1973 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1974 CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1975 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
1976 echo "$as_me:1976: result: $CLANG_VERSION" >&5
1977 echo "${ECHO_T}$CLANG_VERSION" >&6
1979 for cf_clang_opt in \
1980 -Qunused-arguments \
1981 -Wno-error=implicit-function-declaration
1983 echo "$as_me:1983: checking if option $cf_clang_opt works" >&5
1984 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
1985 cf_save_CFLAGS="$CFLAGS"
1986 CFLAGS="$CFLAGS $cf_clang_opt"
1987 cat >"conftest.$ac_ext" <<_ACEOF
1988 #line 1988 "configure"
1989 #include "confdefs.h"
1996 printf("hello!\\n");
2001 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2002 if { (eval echo "$as_me:2002: \"$ac_link\"") >&5
2003 (eval $ac_link) 2>&5
2005 echo "$as_me:2005: \$? = $ac_status" >&5
2006 (exit "$ac_status"); } &&
2007 { ac_try='test -s "conftest$ac_exeext"'
2008 { (eval echo "$as_me:2008: \"$ac_try\"") >&5
2011 echo "$as_me:2011: \$? = $ac_status" >&5
2012 (exit "$ac_status"); }; }; then
2016 echo "$as_me: failed program was:" >&5
2017 cat "conftest.$ac_ext" >&5
2021 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2022 echo "$as_me:2022: result: $cf_clang_optok" >&5
2023 echo "${ECHO_T}$cf_clang_optok" >&6
2024 CFLAGS="$cf_save_CFLAGS"
2025 if test "$cf_clang_optok" = yes; then
2026 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2028 echo "${as_me:-configure}:2028: testing adding option $cf_clang_opt ..." 1>&5
2030 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2031 CFLAGS="${CFLAGS}$cf_clang_opt"
2037 echo "$as_me:2037: checking for $CC option to accept ANSI C" >&5
2038 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2039 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2040 echo $ECHO_N "(cached) $ECHO_C" >&6
2042 ac_cv_prog_cc_stdc=no
2044 cat >"conftest.$ac_ext" <<_ACEOF
2045 #line 2045 "configure"
2046 #include "confdefs.h"
2049 #include <sys/types.h>
2050 #include <sys/stat.h>
2051 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2052 struct buf { int x; };
2053 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2054 static char *e (p, i)
2060 static char *f (char * (*g) (char **, int), char **p, ...)
2065 s = g (p, va_arg (v,int));
2069 int test (int i, double x);
2070 struct s1 {int (*f) (int a);};
2071 struct s2 {int (*f) (double a);};
2072 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2078 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2083 # Don't try gcc -ansi; that turns off useful extensions and
2084 # breaks some systems' header files.
2085 # AIX -qlanglvl=ansi
2086 # Ultrix and OSF/1 -std1
2087 # HP-UX 10.20 and later -Ae
2088 # HP-UX older versions -Aa -D_HPUX_SOURCE
2089 # SVR4 -Xc -D__EXTENSIONS__
2090 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2092 CC="$ac_save_CC $ac_arg"
2093 rm -f "conftest.$ac_objext"
2094 if { (eval echo "$as_me:2094: \"$ac_compile\"") >&5
2095 (eval $ac_compile) 2>&5
2097 echo "$as_me:2097: \$? = $ac_status" >&5
2098 (exit "$ac_status"); } &&
2099 { ac_try='test -s "conftest.$ac_objext"'
2100 { (eval echo "$as_me:2100: \"$ac_try\"") >&5
2103 echo "$as_me:2103: \$? = $ac_status" >&5
2104 (exit "$ac_status"); }; }; then
2105 ac_cv_prog_cc_stdc=$ac_arg
2108 echo "$as_me: failed program was:" >&5
2109 cat "conftest.$ac_ext" >&5
2111 rm -f "conftest.$ac_objext"
2113 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2118 case "x$ac_cv_prog_cc_stdc" in
2120 echo "$as_me:2120: result: none needed" >&5
2121 echo "${ECHO_T}none needed" >&6 ;;
2123 echo "$as_me:2123: result: $ac_cv_prog_cc_stdc" >&5
2124 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2125 CC="$CC $ac_cv_prog_cc_stdc" ;;
2128 # This should have been defined by AC_PROG_CC
2131 echo "$as_me:2131: checking \$CFLAGS variable" >&5
2132 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2135 echo "$as_me:2135: result: broken" >&5
2136 echo "${ECHO_T}broken" >&6
2137 { echo "$as_me:2137: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2138 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2141 for cf_arg in $cf_flags
2147 cf_new_extra_cppflags=
2149 for cf_add_cflags in $cf_arg
2151 case "$cf_fix_cppflags" in
2153 case "$cf_add_cflags" in
2154 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2155 case "$cf_add_cflags" in
2157 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2159 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2160 && test -z "${cf_tst_cflags}" \
2161 && cf_fix_cppflags=yes
2163 if test "$cf_fix_cppflags" = yes ; then
2165 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2166 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2169 elif test "${cf_tst_cflags}" = "\"'" ; then
2171 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2172 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2182 case "$cf_add_cflags" in
2184 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2186 CPPFLAGS=`echo "$CPPFLAGS" | \
2187 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2188 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2193 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2194 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2201 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2202 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2209 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2210 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2212 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2214 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2215 && test -z "${cf_tst_cflags}" \
2216 && cf_fix_cppflags=no
2221 if test -n "$cf_new_cflags" ; then
2223 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2224 CFLAGS="${CFLAGS}$cf_new_cflags"
2228 if test -n "$cf_new_cppflags" ; then
2230 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2231 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2235 if test -n "$cf_new_extra_cppflags" ; then
2237 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2238 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2245 echo "$as_me:2245: result: ok" >&5
2246 echo "${ECHO_T}ok" >&6
2250 echo "$as_me:2250: checking \$CC variable" >&5
2251 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2254 echo "$as_me:2254: result: broken" >&5
2255 echo "${ECHO_T}broken" >&6
2256 { echo "$as_me:2256: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2257 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2259 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2260 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2262 for cf_arg in $cf_flags
2270 cf_new_extra_cppflags=
2272 for cf_add_cflags in $cf_arg
2274 case "$cf_fix_cppflags" in
2276 case "$cf_add_cflags" in
2277 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2278 case "$cf_add_cflags" in
2280 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2282 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2283 && test -z "${cf_tst_cflags}" \
2284 && cf_fix_cppflags=yes
2286 if test "$cf_fix_cppflags" = yes ; then
2288 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2289 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2292 elif test "${cf_tst_cflags}" = "\"'" ; then
2294 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2295 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2305 case "$cf_add_cflags" in
2307 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2309 CPPFLAGS=`echo "$CPPFLAGS" | \
2310 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2311 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2316 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2317 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2324 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2325 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2332 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2333 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2335 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2337 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2338 && test -z "${cf_tst_cflags}" \
2339 && cf_fix_cppflags=no
2344 if test -n "$cf_new_cflags" ; then
2346 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2347 CFLAGS="${CFLAGS}$cf_new_cflags"
2351 if test -n "$cf_new_cppflags" ; then
2353 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2354 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2358 if test -n "$cf_new_extra_cppflags" ; then
2360 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2361 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2371 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2373 echo "${as_me:-configure}:2373: testing resulting CC: '$CC' ..." 1>&5
2375 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2377 echo "${as_me:-configure}:2377: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2379 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2381 echo "${as_me:-configure}:2381: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2385 echo "$as_me:2385: result: ok" >&5
2386 echo "${ECHO_T}ok" >&6
2390 echo "$as_me:2390: checking for egrep" >&5
2391 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2392 if test "${ac_cv_path_EGREP+set}" = set; then
2393 echo $ECHO_N "(cached) $ECHO_C" >&6
2395 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2396 then ac_cv_path_EGREP="$GREP -E"
2398 for ac_prog in gegrep egrep
2400 # Extract the first word of "$ac_prog", so it can be a program name with args.
2401 set dummy $ac_prog; ac_word=$2
2402 echo "$as_me:2402: checking for $ac_word" >&5
2403 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2404 if test "${ac_cv_path_EGREP+set}" = set; then
2405 echo $ECHO_N "(cached) $ECHO_C" >&6
2409 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2412 ac_save_IFS=$IFS; IFS=$ac_path_separator
2414 for ac_dir in $ac_dummy; do
2416 test -z "$ac_dir" && ac_dir=.
2417 if $as_executable_p "$ac_dir/$ac_word"; then
2418 ac_cv_path_EGREP="$ac_dir/$ac_word"
2419 echo "$as_me:2419: found $ac_dir/$ac_word" >&5
2427 EGREP=$ac_cv_path_EGREP
2429 if test -n "$EGREP"; then
2430 echo "$as_me:2430: result: $EGREP" >&5
2431 echo "${ECHO_T}$EGREP" >&6
2433 echo "$as_me:2433: result: no" >&5
2434 echo "${ECHO_T}no" >&6
2437 test -n "$EGREP" && break
2439 test -n "$EGREP" || EGREP=": "
2441 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2441: error: cannot find workable egrep" >&5
2442 echo "$as_me: error: cannot find workable egrep" >&2;}
2443 { (exit 1); exit 1; }; }
2446 echo "$as_me:2446: result: $ac_cv_path_EGREP" >&5
2447 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2448 EGREP="$ac_cv_path_EGREP"
2451 ac_cpp='$CPP $CPPFLAGS'
2452 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2453 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2454 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2455 ac_main_return="return"
2456 echo "$as_me:2456: checking how to run the C preprocessor" >&5
2457 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2458 # On Suns, sometimes $CPP names a directory.
2459 if test -n "$CPP" && test -d "$CPP"; then
2462 if test -z "$CPP"; then
2463 if test "${ac_cv_prog_CPP+set}" = set; then
2464 echo $ECHO_N "(cached) $ECHO_C" >&6
2466 # Double quotes because CPP needs to be expanded
2467 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2470 for ac_c_preproc_warn_flag in '' yes
2472 # Use a header file that comes with gcc, so configuring glibc
2473 # with a fresh cross-compiler works.
2474 # On the NeXT, cc -E runs the code through the compiler's parser,
2475 # not just through cpp. "Syntax error" is here to catch this case.
2476 cat >"conftest.$ac_ext" <<_ACEOF
2477 #line 2477 "configure"
2478 #include "confdefs.h"
2482 if { (eval echo "$as_me:2482: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2483 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2485 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2487 cat conftest.err >&5
2488 echo "$as_me:2488: \$? = $ac_status" >&5
2489 (exit "$ac_status"); } >/dev/null; then
2490 if test -s conftest.err; then
2491 ac_cpp_err=$ac_c_preproc_warn_flag
2498 if test -z "$ac_cpp_err"; then
2501 echo "$as_me: failed program was:" >&5
2502 cat "conftest.$ac_ext" >&5
2503 # Broken: fails on valid input.
2506 rm -f conftest.err "conftest.$ac_ext"
2508 # OK, works on sane cases. Now check whether non-existent headers
2509 # can be detected and how.
2510 cat >"conftest.$ac_ext" <<_ACEOF
2511 #line 2511 "configure"
2512 #include "confdefs.h"
2513 #include <ac_nonexistent.h>
2515 if { (eval echo "$as_me:2515: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2516 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2518 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2520 cat conftest.err >&5
2521 echo "$as_me:2521: \$? = $ac_status" >&5
2522 (exit "$ac_status"); } >/dev/null; then
2523 if test -s conftest.err; then
2524 ac_cpp_err=$ac_c_preproc_warn_flag
2531 if test -z "$ac_cpp_err"; then
2532 # Broken: success on invalid input.
2535 echo "$as_me: failed program was:" >&5
2536 cat "conftest.$ac_ext" >&5
2537 # Passes both tests.
2541 rm -f conftest.err "conftest.$ac_ext"
2544 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2545 rm -f conftest.err "conftest.$ac_ext"
2546 if $ac_preproc_ok; then
2558 echo "$as_me:2558: result: $CPP" >&5
2559 echo "${ECHO_T}$CPP" >&6
2561 for ac_c_preproc_warn_flag in '' yes
2563 # Use a header file that comes with gcc, so configuring glibc
2564 # with a fresh cross-compiler works.
2565 # On the NeXT, cc -E runs the code through the compiler's parser,
2566 # not just through cpp. "Syntax error" is here to catch this case.
2567 cat >"conftest.$ac_ext" <<_ACEOF
2568 #line 2568 "configure"
2569 #include "confdefs.h"
2573 if { (eval echo "$as_me:2573: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2574 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2576 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2578 cat conftest.err >&5
2579 echo "$as_me:2579: \$? = $ac_status" >&5
2580 (exit "$ac_status"); } >/dev/null; then
2581 if test -s conftest.err; then
2582 ac_cpp_err=$ac_c_preproc_warn_flag
2589 if test -z "$ac_cpp_err"; then
2592 echo "$as_me: failed program was:" >&5
2593 cat "conftest.$ac_ext" >&5
2594 # Broken: fails on valid input.
2597 rm -f conftest.err "conftest.$ac_ext"
2599 # OK, works on sane cases. Now check whether non-existent headers
2600 # can be detected and how.
2601 cat >"conftest.$ac_ext" <<_ACEOF
2602 #line 2602 "configure"
2603 #include "confdefs.h"
2604 #include <ac_nonexistent.h>
2606 if { (eval echo "$as_me:2606: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2607 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2609 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2611 cat conftest.err >&5
2612 echo "$as_me:2612: \$? = $ac_status" >&5
2613 (exit "$ac_status"); } >/dev/null; then
2614 if test -s conftest.err; then
2615 ac_cpp_err=$ac_c_preproc_warn_flag
2622 if test -z "$ac_cpp_err"; then
2623 # Broken: success on invalid input.
2626 echo "$as_me: failed program was:" >&5
2627 cat "conftest.$ac_ext" >&5
2628 # Passes both tests.
2632 rm -f conftest.err "conftest.$ac_ext"
2635 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2636 rm -f conftest.err "conftest.$ac_ext"
2637 if $ac_preproc_ok; then
2640 { { echo "$as_me:2640: error: C preprocessor \"$CPP\" fails sanity check" >&5
2641 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2642 { (exit 1); exit 1; }; }
2646 ac_cpp='$CPP $CPPFLAGS'
2647 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2648 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2649 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2650 ac_main_return="return"
2652 if test $ac_cv_c_compiler_gnu = yes; then
2653 echo "$as_me:2653: checking whether $CC needs -traditional" >&5
2654 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2655 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2656 echo $ECHO_N "(cached) $ECHO_C" >&6
2658 ac_pattern="Autoconf.*'x'"
2659 cat >"conftest.$ac_ext" <<_ACEOF
2660 #line 2660 "configure"
2661 #include "confdefs.h"
2663 int Autoconf = TIOCGETP;
2665 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2666 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2667 ac_cv_prog_gcc_traditional=yes
2669 ac_cv_prog_gcc_traditional=no
2673 if test $ac_cv_prog_gcc_traditional = no; then
2674 cat >"conftest.$ac_ext" <<_ACEOF
2675 #line 2675 "configure"
2676 #include "confdefs.h"
2678 int Autoconf = TCGETA;
2680 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2681 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2682 ac_cv_prog_gcc_traditional=yes
2688 echo "$as_me:2688: result: $ac_cv_prog_gcc_traditional" >&5
2689 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2690 if test $ac_cv_prog_gcc_traditional = yes; then
2691 CC="$CC -traditional"
2695 echo "$as_me:2695: checking whether $CC understands -c and -o together" >&5
2696 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2697 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2698 echo $ECHO_N "(cached) $ECHO_C" >&6
2701 cat > conftest.$ac_ext <<CF_EOF
2704 ${cf_cv_main_return:-return}(0);
2707 # We do the test twice because some compilers refuse to overwrite an
2708 # existing .o file with -o, though they will create one.
2709 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2710 if { (eval echo "$as_me:2710: \"$ac_try\"") >&5
2713 echo "$as_me:2713: \$? = $ac_status" >&5
2714 (exit "$ac_status"); } &&
2715 test -f conftest2.$ac_objext && { (eval echo "$as_me:2715: \"$ac_try\"") >&5
2718 echo "$as_me:2718: \$? = $ac_status" >&5
2719 (exit "$ac_status"); };
2721 eval cf_cv_prog_CC_c_o=yes
2723 eval cf_cv_prog_CC_c_o=no
2728 if test "$cf_cv_prog_CC_c_o" = yes; then
2729 echo "$as_me:2729: result: yes" >&5
2730 echo "${ECHO_T}yes" >&6
2732 echo "$as_me:2732: result: no" >&5
2733 echo "${ECHO_T}no" >&6
2736 test "$program_prefix" != NONE &&
2737 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2738 # Use a double $ so make ignores it.
2739 test "$program_suffix" != NONE &&
2740 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2741 # Double any \ or $. echo might interpret backslashes.
2742 # By default was `s,x,x', remove it if useless.
2743 cat <<\_ACEOF >conftest.sed
2744 s/[\\$]/&&/g;s/;s,x,x,$//
2746 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2749 for ac_prog in mawk gawk nawk awk
2751 # Extract the first word of "$ac_prog", so it can be a program name with args.
2752 set dummy $ac_prog; ac_word=$2
2753 echo "$as_me:2753: checking for $ac_word" >&5
2754 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2755 if test "${ac_cv_prog_AWK+set}" = set; then
2756 echo $ECHO_N "(cached) $ECHO_C" >&6
2758 if test -n "$AWK"; then
2759 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2761 ac_save_IFS=$IFS; IFS=$ac_path_separator
2763 for ac_dir in $ac_dummy; do
2765 test -z "$ac_dir" && ac_dir=.
2766 $as_executable_p "$ac_dir/$ac_word" || continue
2767 ac_cv_prog_AWK="$ac_prog"
2768 echo "$as_me:2768: found $ac_dir/$ac_word" >&5
2775 if test -n "$AWK"; then
2776 echo "$as_me:2776: result: $AWK" >&5
2777 echo "${ECHO_T}$AWK" >&6
2779 echo "$as_me:2779: result: no" >&5
2780 echo "${ECHO_T}no" >&6
2783 test -n "$AWK" && break
2786 test -z "$AWK" && { { echo "$as_me:2786: error: No awk program found" >&5
2787 echo "$as_me: error: No awk program found" >&2;}
2788 { (exit 1); exit 1; }; }
2790 echo "$as_me:2790: checking for egrep" >&5
2791 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2792 if test "${ac_cv_prog_egrep+set}" = set; then
2793 echo $ECHO_N "(cached) $ECHO_C" >&6
2795 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2796 then ac_cv_prog_egrep='grep -E'
2797 else ac_cv_prog_egrep='egrep'
2800 echo "$as_me:2800: result: $ac_cv_prog_egrep" >&5
2801 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2802 EGREP=$ac_cv_prog_egrep
2804 test -z "$EGREP" && { { echo "$as_me:2804: error: No egrep program found" >&5
2805 echo "$as_me: error: No egrep program found" >&2;}
2806 { (exit 1); exit 1; }; }
2808 # Find a good install program. We prefer a C program (faster),
2809 # so one script is as good as another. But avoid the broken or
2810 # incompatible versions:
2811 # SysV /etc/install, /usr/sbin/install
2812 # SunOS /usr/etc/install
2813 # IRIX /sbin/install
2815 # AmigaOS /C/install, which installs bootblocks on floppy discs
2816 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2817 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2818 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2819 # ./install, which can be erroneously created by make from ./install.sh.
2820 echo "$as_me:2820: checking for a BSD compatible install" >&5
2821 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2822 if test -z "$INSTALL"; then
2823 if test "${ac_cv_path_install+set}" = set; then
2824 echo $ECHO_N "(cached) $ECHO_C" >&6
2826 ac_save_IFS=$IFS; IFS=$ac_path_separator
2827 for ac_dir in $PATH; do
2829 # Account for people who put trailing slashes in PATH elements.
2831 / | ./ | .// | /cC/* \
2832 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2835 # OSF1 and SCO ODT 3.0 have their own names for install.
2836 # Don't use installbsd from OSF since it installs stuff as root
2838 for ac_prog in ginstall scoinst install; do
2839 if $as_executable_p "$ac_dir/$ac_prog"; then
2840 if test $ac_prog = install &&
2841 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2842 # AIX install. It has an incompatible calling convention.
2844 elif test $ac_prog = install &&
2845 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2846 # program-specific install script used by HP pwplus--don't use.
2849 ac_cv_path_install="$ac_dir/$ac_prog -c"
2859 if test "${ac_cv_path_install+set}" = set; then
2860 INSTALL=$ac_cv_path_install
2862 # As a last resort, use the slow shell script. We don't cache a
2863 # path for INSTALL within a source directory, because that will
2864 # break other packages using the cache if that directory is
2865 # removed, or if the path is relative.
2866 INSTALL=$ac_install_sh
2869 echo "$as_me:2869: result: $INSTALL" >&5
2870 echo "${ECHO_T}$INSTALL" >&6
2872 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2873 # It thinks the first close brace ends the variable substitution.
2874 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2876 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2878 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2880 echo "$as_me:2880: checking whether ln -s works" >&5
2881 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2883 if test "$LN_S" = "ln -s"; then
2884 echo "$as_me:2884: result: yes" >&5
2885 echo "${ECHO_T}yes" >&6
2887 echo "$as_me:2887: result: no, using $LN_S" >&5
2888 echo "${ECHO_T}no, using $LN_S" >&6
2891 echo "$as_me:2891: checking if $LN_S -f options work" >&5
2892 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2894 rm -f conf$$.src conf$$dst
2896 echo first >conf$$.src
2897 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2902 rm -f conf$$.dst conf$$src
2903 echo "$as_me:2903: result: $cf_prog_ln_sf" >&5
2904 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2906 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2908 # Find a good install program. We prefer a C program (faster),
2909 # so one script is as good as another. But avoid the broken or
2910 # incompatible versions:
2911 # SysV /etc/install, /usr/sbin/install
2912 # SunOS /usr/etc/install
2913 # IRIX /sbin/install
2915 # AmigaOS /C/install, which installs bootblocks on floppy discs
2916 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2917 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2918 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2919 # ./install, which can be erroneously created by make from ./install.sh.
2920 echo "$as_me:2920: checking for a BSD compatible install" >&5
2921 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2922 if test -z "$INSTALL"; then
2923 if test "${ac_cv_path_install+set}" = set; then
2924 echo $ECHO_N "(cached) $ECHO_C" >&6
2926 ac_save_IFS=$IFS; IFS=$ac_path_separator
2927 for ac_dir in $PATH; do
2929 # Account for people who put trailing slashes in PATH elements.
2931 / | ./ | .// | /cC/* \
2932 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2935 # OSF1 and SCO ODT 3.0 have their own names for install.
2936 # Don't use installbsd from OSF since it installs stuff as root
2938 for ac_prog in ginstall scoinst install; do
2939 if $as_executable_p "$ac_dir/$ac_prog"; then
2940 if test $ac_prog = install &&
2941 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2942 # AIX install. It has an incompatible calling convention.
2944 elif test $ac_prog = install &&
2945 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2946 # program-specific install script used by HP pwplus--don't use.
2949 ac_cv_path_install="$ac_dir/$ac_prog -c"
2959 if test "${ac_cv_path_install+set}" = set; then
2960 INSTALL=$ac_cv_path_install
2962 # As a last resort, use the slow shell script. We don't cache a
2963 # path for INSTALL within a source directory, because that will
2964 # break other packages using the cache if that directory is
2965 # removed, or if the path is relative.
2966 INSTALL=$ac_install_sh
2969 echo "$as_me:2969: result: $INSTALL" >&5
2970 echo "${ECHO_T}$INSTALL" >&6
2972 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2973 # It thinks the first close brace ends the variable substitution.
2974 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2976 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2978 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2984 cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
2985 test -z "$cf_dir" && cf_dir=.
2986 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
2990 echo "$as_me:2990: checking if you want to install stripped executables" >&5
2991 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2993 # Check whether --enable-stripping or --disable-stripping was given.
2994 if test "${enable_stripping+set}" = set; then
2995 enableval="$enable_stripping"
2996 test "$enableval" != no && enableval=yes
2997 if test "$enableval" != "yes" ; then
3000 enable_stripping=yes
3004 enable_stripping=yes
3007 echo "$as_me:3007: result: $enable_stripping" >&5
3008 echo "${ECHO_T}$enable_stripping" >&6
3010 if test "$enable_stripping" = yes
3017 : "${INSTALL:=install}"
3018 echo "$as_me:3018: checking if install accepts -p option" >&5
3019 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
3020 if test "${cf_cv_install_p+set}" = set; then
3021 echo $ECHO_N "(cached) $ECHO_C" >&6
3028 if $INSTALL -p conftest.in conftest.out 2>/dev/null
3030 if test -f conftest.out/conftest.in
3032 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
3033 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
3034 if test -s conftest.err
3049 echo "$as_me:3049: result: $cf_cv_install_p" >&5
3050 echo "${ECHO_T}$cf_cv_install_p" >&6
3052 echo "$as_me:3052: checking if install needs to be told about ownership" >&5
3053 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
3054 case `$ac_config_guess` in
3063 echo "$as_me:3063: result: $with_install_o" >&5
3064 echo "${ECHO_T}$with_install_o" >&6
3065 if test "x$with_install_o" = xyes
3067 INSTALL_OPT_O="`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`"
3072 echo "$as_me:3072: checking for long file names" >&5
3073 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3074 if test "${ac_cv_sys_long_file_names+set}" = set; then
3075 echo $ECHO_N "(cached) $ECHO_C" >&6
3077 ac_cv_sys_long_file_names=yes
3078 # Test for long file names in all the places we know might matter:
3079 # . the current directory, where building will happen
3080 # $prefix/lib where we will be installing things
3081 # $exec_prefix/lib likewise
3082 # eval it to expand exec_prefix.
3083 # $TMPDIR if set, where it might want to write temporary files
3084 # if $TMPDIR is not set:
3085 # /tmp where it might want to write temporary files
3088 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3091 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3093 for ac_dir in . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3094 test -d "$ac_dir" || continue
3095 test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3096 ac_xdir=$ac_dir/cf$$
3097 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3098 ac_tf1=$ac_xdir/conftest9012345
3099 ac_tf2=$ac_xdir/conftest9012346
3100 (echo 1 >"$ac_tf1") 2>/dev/null
3101 (echo 2 >"$ac_tf2") 2>/dev/null
3102 ac_val=`cat "$ac_tf1" 2>/dev/null`
3103 if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3104 ac_cv_sys_long_file_names=no
3105 rm -rf "$ac_xdir" 2>/dev/null
3108 rm -rf "$ac_xdir" 2>/dev/null
3111 echo "$as_me:3111: result: $ac_cv_sys_long_file_names" >&5
3112 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3113 if test "$ac_cv_sys_long_file_names" = yes; then
3115 cat >>confdefs.h <<\EOF
3116 #define HAVE_LONG_FILE_NAMES 1
3121 # if we find pkg-config, check if we should install the ".pc" files.
3123 echo "$as_me:3123: checking if you want to use pkg-config" >&5
3124 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3126 # Check whether --with-pkg-config or --without-pkg-config was given.
3127 if test "${with_pkg_config+set}" = set; then
3128 withval="$with_pkg_config"
3129 cf_pkg_config=$withval
3133 echo "$as_me:3133: result: $cf_pkg_config" >&5
3134 echo "${ECHO_T}$cf_pkg_config" >&6
3136 case "$cf_pkg_config" in
3142 if test -n "$ac_tool_prefix"; then
3143 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3144 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3145 echo "$as_me:3145: checking for $ac_word" >&5
3146 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3147 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3148 echo $ECHO_N "(cached) $ECHO_C" >&6
3152 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3155 ac_save_IFS=$IFS; IFS=$ac_path_separator
3157 for ac_dir in $ac_dummy; do
3159 test -z "$ac_dir" && ac_dir=.
3160 if $as_executable_p "$ac_dir/$ac_word"; then
3161 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3162 echo "$as_me:3162: found $ac_dir/$ac_word" >&5
3170 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3172 if test -n "$PKG_CONFIG"; then
3173 echo "$as_me:3173: result: $PKG_CONFIG" >&5
3174 echo "${ECHO_T}$PKG_CONFIG" >&6
3176 echo "$as_me:3176: result: no" >&5
3177 echo "${ECHO_T}no" >&6
3181 if test -z "$ac_cv_path_PKG_CONFIG"; then
3182 ac_pt_PKG_CONFIG=$PKG_CONFIG
3183 # Extract the first word of "pkg-config", so it can be a program name with args.
3184 set dummy pkg-config; ac_word=$2
3185 echo "$as_me:3185: checking for $ac_word" >&5
3186 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3187 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3188 echo $ECHO_N "(cached) $ECHO_C" >&6
3190 case $ac_pt_PKG_CONFIG in
3192 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3195 ac_save_IFS=$IFS; IFS=$ac_path_separator
3197 for ac_dir in $ac_dummy; do
3199 test -z "$ac_dir" && ac_dir=.
3200 if $as_executable_p "$ac_dir/$ac_word"; then
3201 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3202 echo "$as_me:3202: found $ac_dir/$ac_word" >&5
3207 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3211 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3213 if test -n "$ac_pt_PKG_CONFIG"; then
3214 echo "$as_me:3214: result: $ac_pt_PKG_CONFIG" >&5
3215 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3217 echo "$as_me:3217: result: no" >&5
3218 echo "${ECHO_T}no" >&6
3221 PKG_CONFIG=$ac_pt_PKG_CONFIG
3223 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3232 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3233 if test "$PKG_CONFIG" != none ; then
3235 if test "x$prefix" != xNONE; then
3236 cf_path_syntax="$prefix"
3238 cf_path_syntax="$ac_default_prefix"
3241 case ".$PKG_CONFIG" in
3246 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3248 (.\$\{*prefix\}*|.\$\{*dir\}*)
3249 eval PKG_CONFIG="$PKG_CONFIG"
3250 case ".$PKG_CONFIG" in
3252 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3257 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3260 { { echo "$as_me:3260: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3261 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3262 { (exit 1); exit 1; }; }
3266 elif test "x$cf_pkg_config" != xno ; then
3267 { echo "$as_me:3267: WARNING: pkg-config is not installed" >&5
3268 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3271 case "$PKG_CONFIG" in
3273 echo "$as_me:3273: checking for pkg-config library directory" >&5
3274 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3277 echo "$as_me:3277: checking for $PKG_CONFIG library directory" >&5
3278 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3282 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[ ]*,,'`
3284 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3285 if test "${with_pkg_config_libdir+set}" = set; then
3286 withval="$with_pkg_config_libdir"
3287 cf_search_path=$withval
3289 test "x$PKG_CONFIG" != xnone && cf_search_path=yes
3292 case x$cf_search_path in
3297 test -n "$verbose" && echo " auto..." 1>&6
3299 echo "${as_me:-configure}:3299: testing auto... ..." 1>&5
3301 # Look for the library directory using the same prefix as the executable
3302 echo "$as_me:3302: checking for search-list" >&5
3303 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
3304 if test "x$PKG_CONFIG" != xnone
3306 # works for pkg-config since version 0.24 (2009)
3307 cf_pkg_program=`echo "$PKG_CONFIG" | sed -e 's,^.*/,,'`
3308 cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
3310 # works for pkgconf since version 0.8.3 (2012)
3311 test -z "$cf_search_path" && \
3312 cf_search_path=`pkgconf --variable=pc_path pkgconf 2>/dev/null | tr : ' '`
3314 # works for pkg-config since import in 2005 of original 2001 HP code.
3315 test -z "$cf_search_path" && \
3317 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
3318 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
3319 sub(\"^[^']*'\",\"\"); \
3320 sub(\"'.*\",\"\"); \
3321 printf \" %s\", \\$0; } \
3326 echo "$as_me:3326: result: $cf_search_path" >&5
3327 echo "${ECHO_T}$cf_search_path" >&6
3334 echo "$as_me:3334: checking for first directory" >&5
3335 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
3336 cf_pkg_config_path=none
3337 for cf_config in $cf_search_path
3339 if test -d "$cf_config"
3341 cf_pkg_config_path=$cf_config
3345 echo "$as_me:3345: result: $cf_pkg_config_path" >&5
3346 echo "${ECHO_T}$cf_pkg_config_path" >&6
3348 if test "x$cf_pkg_config_path" != xnone ; then
3349 # limit this to the first directory found
3350 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
3353 if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
3355 echo "$as_me:3355: checking for workaround" >&5
3356 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
3357 if test "$prefix" = "NONE" ; then
3358 cf_prefix="$ac_default_prefix"
3362 eval cf_libdir=$libdir
3363 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
3365 for cf_config in $cf_search_path
3368 $cf_libdir/pkgconfig)
3369 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
3373 test -z "$cf_backup" && cf_backup=$cf_config
3377 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
3378 echo "$as_me:3378: result: $PKG_CONFIG_LIBDIR" >&5
3379 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3382 echo "$as_me:3382: checking if you want to build test-programs" >&5
3383 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3385 # Check whether --with-tests or --without-tests was given.
3386 if test "${with_tests+set}" = set; then
3387 withval="$with_tests"
3388 cf_with_tests=$withval
3392 echo "$as_me:3392: result: $cf_with_tests" >&5
3393 echo "${ECHO_T}$cf_with_tests" >&6
3395 echo "$as_me:3395: checking if we should assume mixed-case filenames" >&5
3396 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3398 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3399 if test "${enable_mixed_case+set}" = set; then
3400 enableval="$enable_mixed_case"
3401 enable_mixedcase=$enableval
3403 enable_mixedcase=auto
3405 echo "$as_me:3405: result: $enable_mixedcase" >&5
3406 echo "${ECHO_T}$enable_mixedcase" >&6
3407 if test "$enable_mixedcase" = "auto" ; then
3409 echo "$as_me:3409: checking if filesystem supports mixed-case filenames" >&5
3410 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3411 if test "${cf_cv_mixedcase+set}" = set; then
3412 echo $ECHO_N "(cached) $ECHO_C" >&6
3415 if test "$cross_compiling" = yes ; then
3416 case "$target_alias" in
3417 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3425 rm -f conftest CONFTEST
3427 if test -f CONFTEST ; then
3432 rm -f conftest CONFTEST
3436 echo "$as_me:3436: result: $cf_cv_mixedcase" >&5
3437 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3438 test "$cf_cv_mixedcase" = yes &&
3439 cat >>confdefs.h <<\EOF
3440 #define MIXEDCASE_FILENAMES 1
3444 cf_cv_mixedcase=$enable_mixedcase
3445 if test "$enable_mixedcase" = "yes" ; then
3446 cat >>confdefs.h <<\EOF
3447 #define MIXEDCASE_FILENAMES 1
3453 # do this after mixed-case option (tags/TAGS is not as important as tic).
3454 echo "$as_me:3454: checking whether ${MAKE-make} sets \${MAKE}" >&5
3455 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3456 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3457 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3458 echo $ECHO_N "(cached) $ECHO_C" >&6
3460 cat >conftest.make <<\EOF
3462 @echo 'ac_maketemp="${MAKE}"'
3464 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3465 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3466 if test -n "$ac_maketemp"; then
3467 eval ac_cv_prog_make_${ac_make}_set=yes
3469 eval ac_cv_prog_make_${ac_make}_set=no
3473 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3474 echo "$as_me:3474: result: yes" >&5
3475 echo "${ECHO_T}yes" >&6
3478 echo "$as_me:3478: result: no" >&5
3479 echo "${ECHO_T}no" >&6
3480 SET_MAKE="MAKE=${MAKE-make}"
3483 echo "$as_me:3483: checking for \".PHONY\" make-support" >&5
3484 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
3485 if test "${cf_cv_make_PHONY+set}" = set; then
3486 echo $ECHO_N "(cached) $ECHO_C" >&6
3491 mkdir conftest || exit 1
3493 cat >makefile <<'CF_EOF'
3497 @echo "** making $@ $(DATA)"
3499 @echo "** making $@ $(DATA)"
3501 @echo "** making $@ $(DATA)"
3504 @echo "** making $@ $(DATA)"
3507 for cf_data in 1 2 3
3509 ${MAKE:-make} always DATA=$cf_data
3510 ${MAKE:-make} once DATA=$cf_data
3511 ${MAKE:-make} -t always once
3512 if test -f always ; then
3513 echo "no (case 1)" > ../conftest.tmp
3514 elif test ! -f always.out ; then
3515 echo "no (case 2)" > ../conftest.tmp
3516 elif test ! -f once.out ; then
3517 echo "no (case 3)" > ../conftest.tmp
3518 elif ! cmp -s always.out once.out ; then
3519 echo "no (case 4)" > ../conftest.tmp
3520 diff always.out once.out
3522 cf_check="`cat always.out`"
3523 if test "x$cf_check" != "x$cf_data" ; then
3524 echo "no (case 5)" > ../conftest.tmp
3526 echo yes > ../conftest.tmp
3534 cf_cv_make_PHONY="`cat conftest.tmp`"
3538 echo "$as_me:3538: result: $cf_cv_make_PHONY" >&5
3539 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
3542 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
3543 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
3545 for ac_prog in exctags ctags
3547 # Extract the first word of "$ac_prog", so it can be a program name with args.
3548 set dummy $ac_prog; ac_word=$2
3549 echo "$as_me:3549: checking for $ac_word" >&5
3550 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3551 if test "${ac_cv_prog_CTAGS+set}" = set; then
3552 echo $ECHO_N "(cached) $ECHO_C" >&6
3554 if test -n "$CTAGS"; then
3555 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3557 ac_save_IFS=$IFS; IFS=$ac_path_separator
3559 for ac_dir in $ac_dummy; do
3561 test -z "$ac_dir" && ac_dir=.
3562 $as_executable_p "$ac_dir/$ac_word" || continue
3563 ac_cv_prog_CTAGS="$ac_prog"
3564 echo "$as_me:3564: found $ac_dir/$ac_word" >&5
3570 CTAGS=$ac_cv_prog_CTAGS
3571 if test -n "$CTAGS"; then
3572 echo "$as_me:3572: result: $CTAGS" >&5
3573 echo "${ECHO_T}$CTAGS" >&6
3575 echo "$as_me:3575: result: no" >&5
3576 echo "${ECHO_T}no" >&6
3579 test -n "$CTAGS" && break
3582 for ac_prog in exetags etags
3584 # Extract the first word of "$ac_prog", so it can be a program name with args.
3585 set dummy $ac_prog; ac_word=$2
3586 echo "$as_me:3586: checking for $ac_word" >&5
3587 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3588 if test "${ac_cv_prog_ETAGS+set}" = set; then
3589 echo $ECHO_N "(cached) $ECHO_C" >&6
3591 if test -n "$ETAGS"; then
3592 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3594 ac_save_IFS=$IFS; IFS=$ac_path_separator
3596 for ac_dir in $ac_dummy; do
3598 test -z "$ac_dir" && ac_dir=.
3599 $as_executable_p "$ac_dir/$ac_word" || continue
3600 ac_cv_prog_ETAGS="$ac_prog"
3601 echo "$as_me:3601: found $ac_dir/$ac_word" >&5
3607 ETAGS=$ac_cv_prog_ETAGS
3608 if test -n "$ETAGS"; then
3609 echo "$as_me:3609: result: $ETAGS" >&5
3610 echo "${ECHO_T}$ETAGS" >&6
3612 echo "$as_me:3612: result: no" >&5
3613 echo "${ECHO_T}no" >&6
3616 test -n "$ETAGS" && break
3619 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3620 set dummy ${CTAGS:-ctags}; ac_word=$2
3621 echo "$as_me:3621: checking for $ac_word" >&5
3622 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3623 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3624 echo $ECHO_N "(cached) $ECHO_C" >&6
3626 if test -n "$MAKE_LOWER_TAGS"; then
3627 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3629 ac_save_IFS=$IFS; IFS=$ac_path_separator
3631 for ac_dir in $ac_dummy; do
3633 test -z "$ac_dir" && ac_dir=.
3634 $as_executable_p "$ac_dir/$ac_word" || continue
3635 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3636 echo "$as_me:3636: found $ac_dir/$ac_word" >&5
3640 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3643 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3644 if test -n "$MAKE_LOWER_TAGS"; then
3645 echo "$as_me:3645: result: $MAKE_LOWER_TAGS" >&5
3646 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3648 echo "$as_me:3648: result: no" >&5
3649 echo "${ECHO_T}no" >&6
3652 if test "$cf_cv_mixedcase" = yes ; then
3653 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3654 set dummy ${ETAGS:-etags}; ac_word=$2
3655 echo "$as_me:3655: checking for $ac_word" >&5
3656 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3657 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3658 echo $ECHO_N "(cached) $ECHO_C" >&6
3660 if test -n "$MAKE_UPPER_TAGS"; then
3661 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3663 ac_save_IFS=$IFS; IFS=$ac_path_separator
3665 for ac_dir in $ac_dummy; do
3667 test -z "$ac_dir" && ac_dir=.
3668 $as_executable_p "$ac_dir/$ac_word" || continue
3669 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3670 echo "$as_me:3670: found $ac_dir/$ac_word" >&5
3674 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3677 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3678 if test -n "$MAKE_UPPER_TAGS"; then
3679 echo "$as_me:3679: result: $MAKE_UPPER_TAGS" >&5
3680 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3682 echo "$as_me:3682: result: no" >&5
3683 echo "${ECHO_T}no" >&6
3690 if test "$MAKE_UPPER_TAGS" = yes ; then
3696 if test "$MAKE_LOWER_TAGS" = yes ; then
3702 echo "$as_me:3702: checking for makeflags variable" >&5
3703 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3704 if test "${cf_cv_makeflags+set}" = set; then
3705 echo $ECHO_N "(cached) $ECHO_C" >&6
3709 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3711 cat >cf_makeflags.tmp <<CF_EOF
3714 @ echo '.$cf_option'
3716 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[ ]*$,,'`
3717 case "$cf_result" in
3719 cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
3720 case "$cf_result" in
3721 (.*CC=*) cf_cv_makeflags=
3723 (*) cf_cv_makeflags=$cf_option
3732 echo "${as_me:-configure}:3732: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3737 rm -f cf_makeflags.tmp
3740 echo "$as_me:3740: result: $cf_cv_makeflags" >&5
3741 echo "${ECHO_T}$cf_cv_makeflags" >&6
3743 if test -n "$ac_tool_prefix"; then
3744 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3745 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3746 echo "$as_me:3746: checking for $ac_word" >&5
3747 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3748 if test "${ac_cv_prog_RANLIB+set}" = set; then
3749 echo $ECHO_N "(cached) $ECHO_C" >&6
3751 if test -n "$RANLIB"; then
3752 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3754 ac_save_IFS=$IFS; IFS=$ac_path_separator
3756 for ac_dir in $ac_dummy; do
3758 test -z "$ac_dir" && ac_dir=.
3759 $as_executable_p "$ac_dir/$ac_word" || continue
3760 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3761 echo "$as_me:3761: found $ac_dir/$ac_word" >&5
3767 RANLIB=$ac_cv_prog_RANLIB
3768 if test -n "$RANLIB"; then
3769 echo "$as_me:3769: result: $RANLIB" >&5
3770 echo "${ECHO_T}$RANLIB" >&6
3772 echo "$as_me:3772: result: no" >&5
3773 echo "${ECHO_T}no" >&6
3777 if test -z "$ac_cv_prog_RANLIB"; then
3778 ac_ct_RANLIB=$RANLIB
3779 # Extract the first word of "ranlib", so it can be a program name with args.
3780 set dummy ranlib; ac_word=$2
3781 echo "$as_me:3781: checking for $ac_word" >&5
3782 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3783 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3784 echo $ECHO_N "(cached) $ECHO_C" >&6
3786 if test -n "$ac_ct_RANLIB"; then
3787 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3789 ac_save_IFS=$IFS; IFS=$ac_path_separator
3791 for ac_dir in $ac_dummy; do
3793 test -z "$ac_dir" && ac_dir=.
3794 $as_executable_p "$ac_dir/$ac_word" || continue
3795 ac_cv_prog_ac_ct_RANLIB="ranlib"
3796 echo "$as_me:3796: found $ac_dir/$ac_word" >&5
3800 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3803 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3804 if test -n "$ac_ct_RANLIB"; then
3805 echo "$as_me:3805: result: $ac_ct_RANLIB" >&5
3806 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3808 echo "$as_me:3808: result: no" >&5
3809 echo "${ECHO_T}no" >&6
3812 RANLIB=$ac_ct_RANLIB
3814 RANLIB="$ac_cv_prog_RANLIB"
3817 if test -n "$ac_tool_prefix"; then
3818 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3819 set dummy ${ac_tool_prefix}ld; ac_word=$2
3820 echo "$as_me:3820: checking for $ac_word" >&5
3821 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3822 if test "${ac_cv_prog_LD+set}" = set; then
3823 echo $ECHO_N "(cached) $ECHO_C" >&6
3825 if test -n "$LD"; then
3826 ac_cv_prog_LD="$LD" # Let the user override the test.
3828 ac_save_IFS=$IFS; IFS=$ac_path_separator
3830 for ac_dir in $ac_dummy; do
3832 test -z "$ac_dir" && ac_dir=.
3833 $as_executable_p "$ac_dir/$ac_word" || continue
3834 ac_cv_prog_LD="${ac_tool_prefix}ld"
3835 echo "$as_me:3835: found $ac_dir/$ac_word" >&5
3842 if test -n "$LD"; then
3843 echo "$as_me:3843: result: $LD" >&5
3844 echo "${ECHO_T}$LD" >&6
3846 echo "$as_me:3846: result: no" >&5
3847 echo "${ECHO_T}no" >&6
3851 if test -z "$ac_cv_prog_LD"; then
3853 # Extract the first word of "ld", so it can be a program name with args.
3854 set dummy ld; ac_word=$2
3855 echo "$as_me:3855: checking for $ac_word" >&5
3856 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3857 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3858 echo $ECHO_N "(cached) $ECHO_C" >&6
3860 if test -n "$ac_ct_LD"; then
3861 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3863 ac_save_IFS=$IFS; IFS=$ac_path_separator
3865 for ac_dir in $ac_dummy; do
3867 test -z "$ac_dir" && ac_dir=.
3868 $as_executable_p "$ac_dir/$ac_word" || continue
3869 ac_cv_prog_ac_ct_LD="ld"
3870 echo "$as_me:3870: found $ac_dir/$ac_word" >&5
3874 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3877 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3878 if test -n "$ac_ct_LD"; then
3879 echo "$as_me:3879: result: $ac_ct_LD" >&5
3880 echo "${ECHO_T}$ac_ct_LD" >&6
3882 echo "$as_me:3882: result: no" >&5
3883 echo "${ECHO_T}no" >&6
3891 if test -n "$ac_tool_prefix"; then
3892 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3893 set dummy ${ac_tool_prefix}ar; ac_word=$2
3894 echo "$as_me:3894: checking for $ac_word" >&5
3895 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3896 if test "${ac_cv_prog_AR+set}" = set; then
3897 echo $ECHO_N "(cached) $ECHO_C" >&6
3899 if test -n "$AR"; then
3900 ac_cv_prog_AR="$AR" # Let the user override the test.
3902 ac_save_IFS=$IFS; IFS=$ac_path_separator
3904 for ac_dir in $ac_dummy; do
3906 test -z "$ac_dir" && ac_dir=.
3907 $as_executable_p "$ac_dir/$ac_word" || continue
3908 ac_cv_prog_AR="${ac_tool_prefix}ar"
3909 echo "$as_me:3909: found $ac_dir/$ac_word" >&5
3916 if test -n "$AR"; then
3917 echo "$as_me:3917: result: $AR" >&5
3918 echo "${ECHO_T}$AR" >&6
3920 echo "$as_me:3920: result: no" >&5
3921 echo "${ECHO_T}no" >&6
3925 if test -z "$ac_cv_prog_AR"; then
3927 # Extract the first word of "ar", so it can be a program name with args.
3928 set dummy ar; ac_word=$2
3929 echo "$as_me:3929: checking for $ac_word" >&5
3930 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3931 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3932 echo $ECHO_N "(cached) $ECHO_C" >&6
3934 if test -n "$ac_ct_AR"; then
3935 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3937 ac_save_IFS=$IFS; IFS=$ac_path_separator
3939 for ac_dir in $ac_dummy; do
3941 test -z "$ac_dir" && ac_dir=.
3942 $as_executable_p "$ac_dir/$ac_word" || continue
3943 ac_cv_prog_ac_ct_AR="ar"
3944 echo "$as_me:3944: found $ac_dir/$ac_word" >&5
3948 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3951 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3952 if test -n "$ac_ct_AR"; then
3953 echo "$as_me:3953: result: $ac_ct_AR" >&5
3954 echo "${ECHO_T}$ac_ct_AR" >&6
3956 echo "$as_me:3956: result: no" >&5
3957 echo "${ECHO_T}no" >&6
3965 if test -n "$ac_tool_prefix"; then
3966 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3967 set dummy ${ac_tool_prefix}ar; ac_word=$2
3968 echo "$as_me:3968: checking for $ac_word" >&5
3969 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3970 if test "${ac_cv_prog_AR+set}" = set; then
3971 echo $ECHO_N "(cached) $ECHO_C" >&6
3973 if test -n "$AR"; then
3974 ac_cv_prog_AR="$AR" # Let the user override the test.
3976 ac_save_IFS=$IFS; IFS=$ac_path_separator
3978 for ac_dir in $ac_dummy; do
3980 test -z "$ac_dir" && ac_dir=.
3981 $as_executable_p "$ac_dir/$ac_word" || continue
3982 ac_cv_prog_AR="${ac_tool_prefix}ar"
3983 echo "$as_me:3983: found $ac_dir/$ac_word" >&5
3990 if test -n "$AR"; then
3991 echo "$as_me:3991: result: $AR" >&5
3992 echo "${ECHO_T}$AR" >&6
3994 echo "$as_me:3994: result: no" >&5
3995 echo "${ECHO_T}no" >&6
3999 if test -z "$ac_cv_prog_AR"; then
4001 # Extract the first word of "ar", so it can be a program name with args.
4002 set dummy ar; ac_word=$2
4003 echo "$as_me:4003: checking for $ac_word" >&5
4004 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4005 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4006 echo $ECHO_N "(cached) $ECHO_C" >&6
4008 if test -n "$ac_ct_AR"; then
4009 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4011 ac_save_IFS=$IFS; IFS=$ac_path_separator
4013 for ac_dir in $ac_dummy; do
4015 test -z "$ac_dir" && ac_dir=.
4016 $as_executable_p "$ac_dir/$ac_word" || continue
4017 ac_cv_prog_ac_ct_AR="ar"
4018 echo "$as_me:4018: found $ac_dir/$ac_word" >&5
4022 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4025 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4026 if test -n "$ac_ct_AR"; then
4027 echo "$as_me:4027: result: $ac_ct_AR" >&5
4028 echo "${ECHO_T}$ac_ct_AR" >&6
4030 echo "$as_me:4030: result: no" >&5
4031 echo "${ECHO_T}no" >&6
4039 echo "$as_me:4039: checking for options to update archives" >&5
4040 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4041 if test "${cf_cv_ar_flags+set}" = set; then
4042 echo $ECHO_N "(cached) $ECHO_C" >&6
4045 case "$cf_cv_system_name" in
4048 cat >mk_static_lib.sh <<-EOF
4053 exec \$MSVC_BIN -out:"\$out" \$@
4055 chmod +x mk_static_lib.sh
4056 AR=`pwd`/mk_static_lib.sh
4059 cf_cv_ar_flags=unknown
4060 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4063 # check if $ARFLAGS already contains this choice
4064 if test "x$ARFLAGS" != "x" ; then
4065 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4066 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4072 rm -f "conftest.$ac_cv_objext"
4075 cat >"conftest.$ac_ext" <<EOF
4076 #line 4076 "configure"
4077 int testdata[3] = { 123, 456, 789 };
4079 if { (eval echo "$as_me:4079: \"$ac_compile\"") >&5
4080 (eval $ac_compile) 2>&5
4082 echo "$as_me:4082: \$? = $ac_status" >&5
4083 (exit "$ac_status"); } ; then
4084 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4085 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
4086 if test -f conftest.a ; then
4087 cf_cv_ar_flags="$cf_ar_flags"
4091 test -n "$verbose" && echo " cannot compile test-program" 1>&6
4093 echo "${as_me:-configure}:4093: testing cannot compile test-program ..." 1>&5
4098 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
4103 echo "$as_me:4103: result: $cf_cv_ar_flags" >&5
4104 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4106 if test -n "$ARFLAGS" ; then
4107 if test -n "$cf_cv_ar_flags" ; then
4108 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4111 ARFLAGS=$cf_cv_ar_flags
4114 echo "$as_me:4114: checking for PATH separator" >&5
4115 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4116 case "$cf_cv_system_name" in
4117 (os2*) PATH_SEPARATOR=';' ;;
4118 (*) ${PATH_SEPARATOR:=':'} ;;
4121 echo "$as_me:4121: result: $PATH_SEPARATOR" >&5
4122 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4124 echo "$as_me:4124: checking if you have specified an install-prefix" >&5
4125 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4127 # Check whether --with-install-prefix or --without-install-prefix was given.
4128 if test "${with_install_prefix+set}" = set; then
4129 withval="$with_install_prefix"
4133 (*) DESTDIR="$withval"
4137 echo "$as_me:4137: result: $DESTDIR" >&5
4138 echo "${ECHO_T}$DESTDIR" >&6
4140 ###############################################################################
4142 # If we're cross-compiling, allow the user to override the tools and their
4143 # options. The configure script is oriented toward identifying the host
4144 # compiler, etc., but we need a build compiler to generate parts of the source.
4146 if test "$cross_compiling" = yes ; then
4148 # defaults that we might want to override
4149 : ${BUILD_CFLAGS:=''}
4150 : ${BUILD_CPPFLAGS:=''}
4151 : ${BUILD_LDFLAGS:=''}
4153 : ${BUILD_EXEEXT:='$x'}
4154 : ${BUILD_OBJEXT:='o'}
4156 # Check whether --with-build-cc or --without-build-cc was given.
4157 if test "${with_build_cc+set}" = set; then
4158 withval="$with_build_cc"
4161 for ac_prog in gcc clang c99 c89 cc cl
4163 # Extract the first word of "$ac_prog", so it can be a program name with args.
4164 set dummy $ac_prog; ac_word=$2
4165 echo "$as_me:4165: checking for $ac_word" >&5
4166 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4167 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4168 echo $ECHO_N "(cached) $ECHO_C" >&6
4170 if test -n "$BUILD_CC"; then
4171 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4173 ac_save_IFS=$IFS; IFS=$ac_path_separator
4175 for ac_dir in $ac_dummy; do
4177 test -z "$ac_dir" && ac_dir=.
4178 $as_executable_p "$ac_dir/$ac_word" || continue
4179 ac_cv_prog_BUILD_CC="$ac_prog"
4180 echo "$as_me:4180: found $ac_dir/$ac_word" >&5
4186 BUILD_CC=$ac_cv_prog_BUILD_CC
4187 if test -n "$BUILD_CC"; then
4188 echo "$as_me:4188: result: $BUILD_CC" >&5
4189 echo "${ECHO_T}$BUILD_CC" >&6
4191 echo "$as_me:4191: result: no" >&5
4192 echo "${ECHO_T}no" >&6
4195 test -n "$BUILD_CC" && break
4197 test -n "$BUILD_CC" || BUILD_CC="none"
4200 echo "$as_me:4200: checking for native build C compiler" >&5
4201 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4202 echo "$as_me:4202: result: $BUILD_CC" >&5
4203 echo "${ECHO_T}$BUILD_CC" >&6
4205 echo "$as_me:4205: checking for native build C preprocessor" >&5
4206 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4208 # Check whether --with-build-cpp or --without-build-cpp was given.
4209 if test "${with_build_cpp+set}" = set; then
4210 withval="$with_build_cpp"
4211 BUILD_CPP="$withval"
4213 BUILD_CPP='${BUILD_CC} -E'
4215 echo "$as_me:4215: result: $BUILD_CPP" >&5
4216 echo "${ECHO_T}$BUILD_CPP" >&6
4218 echo "$as_me:4218: checking for native build C flags" >&5
4219 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4221 # Check whether --with-build-cflags or --without-build-cflags was given.
4222 if test "${with_build_cflags+set}" = set; then
4223 withval="$with_build_cflags"
4224 BUILD_CFLAGS="$withval"
4226 echo "$as_me:4226: result: $BUILD_CFLAGS" >&5
4227 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4229 echo "$as_me:4229: checking for native build C preprocessor-flags" >&5
4230 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4232 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4233 if test "${with_build_cppflags+set}" = set; then
4234 withval="$with_build_cppflags"
4235 BUILD_CPPFLAGS="$withval"
4237 echo "$as_me:4237: result: $BUILD_CPPFLAGS" >&5
4238 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4240 echo "$as_me:4240: checking for native build linker-flags" >&5
4241 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4243 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4244 if test "${with_build_ldflags+set}" = set; then
4245 withval="$with_build_ldflags"
4246 BUILD_LDFLAGS="$withval"
4248 echo "$as_me:4248: result: $BUILD_LDFLAGS" >&5
4249 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4251 echo "$as_me:4251: checking for native build linker-libraries" >&5
4252 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4254 # Check whether --with-build-libs or --without-build-libs was given.
4255 if test "${with_build_libs+set}" = set; then
4256 withval="$with_build_libs"
4257 BUILD_LIBS="$withval"
4259 echo "$as_me:4259: result: $BUILD_LIBS" >&5
4260 echo "${ECHO_T}$BUILD_LIBS" >&6
4262 # this assumes we're on Unix.
4266 : ${BUILD_CC:='${CC}'}
4268 if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
4269 { { echo "$as_me:4269: error: Cross-build requires two compilers.
4270 Use --with-build-cc to specify the native compiler." >&5
4271 echo "$as_me: error: Cross-build requires two compilers.
4272 Use --with-build-cc to specify the native compiler." >&2;}
4273 { (exit 1); exit 1; }; }
4277 : ${BUILD_CC:='${CC}'}
4278 : ${BUILD_CPP:='${CPP}'}
4279 : ${BUILD_CFLAGS:='${CFLAGS}'}
4280 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4281 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4282 : ${BUILD_LIBS:='${LIBS}'}
4283 : ${BUILD_EXEEXT:='$x'}
4284 : ${BUILD_OBJEXT:='o'}
4287 ###############################################################################
4289 ### Options to allow the user to specify the set of libraries which are used.
4290 ### Use "--without-normal --with-shared" to allow the default model to be
4291 ### shared, for example.
4294 echo "$as_me:4294: checking if you want to build shared C-objects" >&5
4295 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
4297 # Check whether --with-shared or --without-shared was given.
4298 if test "${with_shared+set}" = set; then
4299 withval="$with_shared"
4300 with_shared=$withval
4304 echo "$as_me:4304: result: $with_shared" >&5
4305 echo "${ECHO_T}$with_shared" >&6
4306 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4308 echo "$as_me:4308: checking for specified models" >&5
4309 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4310 test -z "$cf_list_models" && cf_list_models=normal
4311 echo "$as_me:4311: result: $cf_list_models" >&5
4312 echo "${ECHO_T}$cf_list_models" >&6
4314 ### Use the first model as the default, and save its suffix for use in building
4315 ### up test-applications.
4316 echo "$as_me:4316: checking for default model" >&5
4317 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4318 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4319 echo "$as_me:4319: result: $DFT_LWR_MODEL" >&5
4320 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4322 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4324 echo "$as_me:4324: checking for specific curses-directory" >&5
4325 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4327 # Check whether --with-curses-dir or --without-curses-dir was given.
4328 if test "${with_curses_dir+set}" = set; then
4329 withval="$with_curses_dir"
4330 cf_cv_curses_dir=$withval
4334 echo "$as_me:4334: result: $cf_cv_curses_dir" >&5
4335 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4337 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
4340 if test "x$prefix" != xNONE; then
4341 cf_path_syntax="$prefix"
4343 cf_path_syntax="$ac_default_prefix"
4351 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4353 (.\$\{*prefix\}*|.\$\{*dir\}*)
4354 eval withval="$withval"
4357 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4362 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4365 { { echo "$as_me:4365: error: expected a pathname, not \"$withval\"" >&5
4366 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4367 { (exit 1); exit 1; }; }
4371 if test -d "$cf_cv_curses_dir"
4374 if test -n "$cf_cv_curses_dir/include" ; then
4375 for cf_add_incdir in $cf_cv_curses_dir/include
4377 while test "$cf_add_incdir" != /usr/include
4379 if test -d "$cf_add_incdir"
4382 if test -n "$CFLAGS$CPPFLAGS" ; then
4383 # a loop is needed to ensure we can add subdirs of existing dirs
4384 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4385 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4386 cf_have_incdir=yes; break
4391 if test "$cf_have_incdir" = no ; then
4392 if test "$cf_add_incdir" = /usr/local/include ; then
4393 if test "$GCC" = yes
4395 cf_save_CPPFLAGS=$CPPFLAGS
4397 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4398 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4400 cat >"conftest.$ac_ext" <<_ACEOF
4401 #line 4401 "configure"
4402 #include "confdefs.h"
4412 rm -f "conftest.$ac_objext"
4413 if { (eval echo "$as_me:4413: \"$ac_compile\"") >&5
4414 (eval $ac_compile) 2>&5
4416 echo "$as_me:4416: \$? = $ac_status" >&5
4417 (exit "$ac_status"); } &&
4418 { ac_try='test -s "conftest.$ac_objext"'
4419 { (eval echo "$as_me:4419: \"$ac_try\"") >&5
4422 echo "$as_me:4422: \$? = $ac_status" >&5
4423 (exit "$ac_status"); }; }; then
4426 echo "$as_me: failed program was:" >&5
4427 cat "conftest.$ac_ext" >&5
4430 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4431 CPPFLAGS=$cf_save_CPPFLAGS
4436 if test "$cf_have_incdir" = no ; then
4437 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4439 echo "${as_me:-configure}:4439: testing adding $cf_add_incdir to include-path ..." 1>&5
4441 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4443 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
4444 test "$cf_top_incdir" = "$cf_add_incdir" && break
4445 cf_add_incdir="$cf_top_incdir"
4456 if test -n "$cf_cv_curses_dir/lib" ; then
4457 for cf_add_libdir in $cf_cv_curses_dir/lib
4459 if test "$cf_add_libdir" = /usr/lib ; then
4461 elif test -d "$cf_add_libdir"
4464 if test -n "$LDFLAGS$LIBS" ; then
4465 # a loop is needed to ensure we can add subdirs of existing dirs
4466 for cf_test_libdir in $LDFLAGS $LIBS ; do
4467 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4468 cf_have_libdir=yes; break
4472 if test "$cf_have_libdir" = no ; then
4473 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4475 echo "${as_me:-configure}:4475: testing adding $cf_add_libdir to library-path ..." 1>&5
4477 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4486 cf_ncuconfig_root=ncurses
4487 cf_have_ncuconfig=no
4489 if test "x${PKG_CONFIG:=none}" != xnone; then
4490 echo "$as_me:4490: checking pkg-config for $cf_ncuconfig_root" >&5
4491 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
4492 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
4493 echo "$as_me:4493: result: yes" >&5
4494 echo "${ECHO_T}yes" >&6
4496 echo "$as_me:4496: checking if the $cf_ncuconfig_root package files work" >&5
4497 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
4498 cf_have_ncuconfig=unknown
4500 cf_save_CFLAGS="$CFLAGS"
4501 cf_save_CPPFLAGS="$CPPFLAGS"
4502 cf_save_LIBS="$LIBS"
4504 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
4505 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
4507 # while -W for passing linker flags is prevalent, it is not "standard".
4508 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
4509 # incompatible _and_ non-standard -W option which gives an error. Work
4510 # around that pitfall.
4511 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
4517 cf_new_extra_cppflags=
4519 for cf_add_cflags in $cf_pkg_cflags
4521 case "$cf_fix_cppflags" in
4523 case "$cf_add_cflags" in
4524 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4525 case "$cf_add_cflags" in
4527 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4529 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4530 && test -z "${cf_tst_cflags}" \
4531 && cf_fix_cppflags=yes
4533 if test "$cf_fix_cppflags" = yes ; then
4535 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4536 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4539 elif test "${cf_tst_cflags}" = "\"'" ; then
4541 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4542 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4552 case "$cf_add_cflags" in
4554 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4556 CPPFLAGS=`echo "$CPPFLAGS" | \
4557 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4558 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4563 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4564 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4571 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4572 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4579 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4580 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4582 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4584 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4585 && test -z "${cf_tst_cflags}" \
4586 && cf_fix_cppflags=no
4591 if test -n "$cf_new_cflags" ; then
4593 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4594 CFLAGS="${CFLAGS}$cf_new_cflags"
4598 if test -n "$cf_new_cppflags" ; then
4600 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4601 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4605 if test -n "$cf_new_extra_cppflags" ; then
4607 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4608 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4615 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4617 for cf_add_1lib in $cf_add_0lib; do
4618 for cf_add_2lib in $cf_add_libs; do
4619 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4624 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4628 cat >"conftest.$ac_ext" <<_ACEOF
4629 #line 4629 "configure"
4630 #include "confdefs.h"
4631 #include <${cf_cv_ncurses_header:-curses.h}>
4635 initscr(); mousemask(0,0); tigetstr((char *)0);
4640 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4641 if { (eval echo "$as_me:4641: \"$ac_link\"") >&5
4642 (eval $ac_link) 2>&5
4644 echo "$as_me:4644: \$? = $ac_status" >&5
4645 (exit "$ac_status"); } &&
4646 { ac_try='test -s "conftest$ac_exeext"'
4647 { (eval echo "$as_me:4647: \"$ac_try\"") >&5
4650 echo "$as_me:4650: \$? = $ac_status" >&5
4651 (exit "$ac_status"); }; }; then
4652 if test "$cross_compiling" = yes; then
4653 cf_test_ncuconfig=maybe
4655 cat >"conftest.$ac_ext" <<_ACEOF
4656 #line 4656 "configure"
4657 #include "confdefs.h"
4658 #include <${cf_cv_ncurses_header:-curses.h}>
4660 { const char *xx = curses_version(); return (xx == 0); }
4662 rm -f "conftest$ac_exeext"
4663 if { (eval echo "$as_me:4663: \"$ac_link\"") >&5
4664 (eval $ac_link) 2>&5
4666 echo "$as_me:4666: \$? = $ac_status" >&5
4667 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4668 { (eval echo "$as_me:4668: \"$ac_try\"") >&5
4671 echo "$as_me:4671: \$? = $ac_status" >&5
4672 (exit "$ac_status"); }; }; then
4673 cf_test_ncuconfig=yes
4675 echo "$as_me: program exited with status $ac_status" >&5
4676 echo "$as_me: failed program was:" >&5
4677 cat "conftest.$ac_ext" >&5
4678 cf_test_ncuconfig=no
4680 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4683 echo "$as_me: failed program was:" >&5
4684 cat "conftest.$ac_ext" >&5
4685 cf_test_ncuconfig=no
4687 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4689 CFLAGS="$cf_save_CFLAGS"
4690 CPPFLAGS="$cf_save_CPPFLAGS"
4691 LIBS="$cf_save_LIBS"
4693 if test "x$cf_test_ncuconfig" != xyes; then
4694 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4695 cf_pkg_cflags="$cf_temp"
4696 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4697 cf_pkg_libs="$cf_temp"
4702 for cf_add_cflags in $cf_pkg_cflags
4704 case "x$cf_add_cflags" in
4707 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4710 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
4711 test "$CFLAGS" != "$cf_old_cflag" || break
4713 CFLAGS="$cf_old_cflag"
4716 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4719 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
4720 test "$CPPFLAGS" != "$cf_old_cflag" || break
4722 CPPFLAGS="$cf_old_cflag"
4731 cf_new_extra_cppflags=
4733 for cf_add_cflags in $cf_add_cflags
4735 case "$cf_fix_cppflags" in
4737 case "$cf_add_cflags" in
4738 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4739 case "$cf_add_cflags" in
4741 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4743 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4744 && test -z "${cf_tst_cflags}" \
4745 && cf_fix_cppflags=yes
4747 if test "$cf_fix_cppflags" = yes ; then
4749 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4750 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4753 elif test "${cf_tst_cflags}" = "\"'" ; then
4755 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4756 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4766 case "$cf_add_cflags" in
4768 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4770 CPPFLAGS=`echo "$CPPFLAGS" | \
4771 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4772 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4777 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4778 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4785 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4786 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4793 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4794 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4796 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4798 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4799 && test -z "${cf_tst_cflags}" \
4800 && cf_fix_cppflags=no
4805 if test -n "$cf_new_cflags" ; then
4807 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4808 CFLAGS="${CFLAGS}$cf_new_cflags"
4812 if test -n "$cf_new_cppflags" ; then
4814 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4815 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4819 if test -n "$cf_new_extra_cppflags" ; then
4821 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4822 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4831 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4833 for cf_add_1lib in $cf_add_0lib; do
4834 for cf_add_2lib in $cf_add_libs; do
4835 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4840 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4844 cat >"conftest.$ac_ext" <<_ACEOF
4845 #line 4845 "configure"
4846 #include "confdefs.h"
4847 #include <${cf_cv_ncurses_header:-curses.h}>
4851 initscr(); mousemask(0,0); tigetstr((char *)0);
4856 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4857 if { (eval echo "$as_me:4857: \"$ac_link\"") >&5
4858 (eval $ac_link) 2>&5
4860 echo "$as_me:4860: \$? = $ac_status" >&5
4861 (exit "$ac_status"); } &&
4862 { ac_try='test -s "conftest$ac_exeext"'
4863 { (eval echo "$as_me:4863: \"$ac_try\"") >&5
4866 echo "$as_me:4866: \$? = $ac_status" >&5
4867 (exit "$ac_status"); }; }; then
4868 if test "$cross_compiling" = yes; then
4869 cf_have_ncuconfig=maybe
4871 cat >"conftest.$ac_ext" <<_ACEOF
4872 #line 4872 "configure"
4873 #include "confdefs.h"
4874 #include <${cf_cv_ncurses_header:-curses.h}>
4876 { const char *xx = curses_version(); return (xx == 0); }
4878 rm -f "conftest$ac_exeext"
4879 if { (eval echo "$as_me:4879: \"$ac_link\"") >&5
4880 (eval $ac_link) 2>&5
4882 echo "$as_me:4882: \$? = $ac_status" >&5
4883 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4884 { (eval echo "$as_me:4884: \"$ac_try\"") >&5
4887 echo "$as_me:4887: \$? = $ac_status" >&5
4888 (exit "$ac_status"); }; }; then
4889 cf_have_ncuconfig=yes
4891 echo "$as_me: program exited with status $ac_status" >&5
4892 echo "$as_me: failed program was:" >&5
4893 cat "conftest.$ac_ext" >&5
4894 cf_have_ncuconfig=no
4896 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4899 echo "$as_me: failed program was:" >&5
4900 cat "conftest.$ac_ext" >&5
4901 cf_have_ncuconfig=no
4903 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4904 echo "$as_me:4904: result: $cf_have_ncuconfig" >&5
4905 echo "${ECHO_T}$cf_have_ncuconfig" >&6
4906 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
4907 if test "$cf_have_ncuconfig" != "yes"
4909 CPPFLAGS="$cf_save_CPPFLAGS"
4910 LIBS="$cf_save_LIBS"
4911 NCURSES_CONFIG_PKG=none
4914 cat >>confdefs.h <<\EOF
4918 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
4920 echo "$as_me:4920: checking for terminfo header" >&5
4921 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4922 if test "${cf_cv_term_header+set}" = set; then
4923 echo $ECHO_N "(cached) $ECHO_C" >&6
4926 case "${cf_cv_ncurses_header}" in
4927 (*/ncurses.h|*/ncursesw.h)
4928 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4931 cf_term_header=term.h
4935 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4937 cat >"conftest.$ac_ext" <<_ACEOF
4938 #line 4938 "configure"
4939 #include "confdefs.h"
4941 #include <${cf_cv_ncurses_header:-curses.h}>
4947 int x = auto_left_margin; (void)x
4952 rm -f "conftest.$ac_objext"
4953 if { (eval echo "$as_me:4953: \"$ac_compile\"") >&5
4954 (eval $ac_compile) 2>&5
4956 echo "$as_me:4956: \$? = $ac_status" >&5
4957 (exit "$ac_status"); } &&
4958 { ac_try='test -s "conftest.$ac_objext"'
4959 { (eval echo "$as_me:4959: \"$ac_try\"") >&5
4962 echo "$as_me:4962: \$? = $ac_status" >&5
4963 (exit "$ac_status"); }; }; then
4965 cf_cv_term_header="$cf_test"
4967 echo "$as_me: failed program was:" >&5
4968 cat "conftest.$ac_ext" >&5
4970 cf_cv_term_header=unknown
4973 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4974 test "$cf_cv_term_header" != unknown && break
4978 echo "$as_me:4978: result: $cf_cv_term_header" >&5
4979 echo "${ECHO_T}$cf_cv_term_header" >&6
4981 # Set definitions to allow ifdef'ing to accommodate subdirectories
4983 case "$cf_cv_term_header" in
4986 cat >>confdefs.h <<\EOF
4987 #define HAVE_TERM_H 1
4993 case "$cf_cv_term_header" in
4996 cat >>confdefs.h <<\EOF
4997 #define HAVE_NCURSES_TERM_H 1
5003 cat >>confdefs.h <<\EOF
5004 #define HAVE_NCURSESW_TERM_H 1
5013 echo "$as_me:5013: result: no" >&5
5014 echo "${ECHO_T}no" >&6
5015 NCURSES_CONFIG_PKG=none
5018 NCURSES_CONFIG_PKG=none
5021 if test "x$cf_have_ncuconfig" = "xno"; then
5022 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
5024 if test -n "$ac_tool_prefix"; then
5025 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5027 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5028 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5029 echo "$as_me:5029: checking for $ac_word" >&5
5030 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5031 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5032 echo $ECHO_N "(cached) $ECHO_C" >&6
5034 if test -n "$NCURSES_CONFIG"; then
5035 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5037 ac_save_IFS=$IFS; IFS=$ac_path_separator
5039 for ac_dir in $ac_dummy; do
5041 test -z "$ac_dir" && ac_dir=.
5042 $as_executable_p "$ac_dir/$ac_word" || continue
5043 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5044 echo "$as_me:5044: found $ac_dir/$ac_word" >&5
5050 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5051 if test -n "$NCURSES_CONFIG"; then
5052 echo "$as_me:5052: result: $NCURSES_CONFIG" >&5
5053 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5055 echo "$as_me:5055: result: no" >&5
5056 echo "${ECHO_T}no" >&6
5059 test -n "$NCURSES_CONFIG" && break
5062 if test -z "$NCURSES_CONFIG"; then
5063 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5064 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5066 # Extract the first word of "$ac_prog", so it can be a program name with args.
5067 set dummy $ac_prog; ac_word=$2
5068 echo "$as_me:5068: checking for $ac_word" >&5
5069 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5070 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5071 echo $ECHO_N "(cached) $ECHO_C" >&6
5073 if test -n "$ac_ct_NCURSES_CONFIG"; then
5074 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5076 ac_save_IFS=$IFS; IFS=$ac_path_separator
5078 for ac_dir in $ac_dummy; do
5080 test -z "$ac_dir" && ac_dir=.
5081 $as_executable_p "$ac_dir/$ac_word" || continue
5082 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5083 echo "$as_me:5083: found $ac_dir/$ac_word" >&5
5089 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5090 if test -n "$ac_ct_NCURSES_CONFIG"; then
5091 echo "$as_me:5091: result: $ac_ct_NCURSES_CONFIG" >&5
5092 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5094 echo "$as_me:5094: result: no" >&5
5095 echo "${ECHO_T}no" >&6
5098 test -n "$ac_ct_NCURSES_CONFIG" && break
5100 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5102 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5105 if test "$NCURSES_CONFIG" != none ; then
5107 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
5109 case "x$cf_add_cflags" in
5112 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5115 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5116 test "$CFLAGS" != "$cf_old_cflag" || break
5118 CFLAGS="$cf_old_cflag"
5121 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5124 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5125 test "$CPPFLAGS" != "$cf_old_cflag" || break
5127 CPPFLAGS="$cf_old_cflag"
5136 cf_new_extra_cppflags=
5138 for cf_add_cflags in $cf_add_cflags
5140 case "$cf_fix_cppflags" in
5142 case "$cf_add_cflags" in
5143 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5144 case "$cf_add_cflags" in
5146 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5148 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5149 && test -z "${cf_tst_cflags}" \
5150 && cf_fix_cppflags=yes
5152 if test "$cf_fix_cppflags" = yes ; then
5154 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5155 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5158 elif test "${cf_tst_cflags}" = "\"'" ; then
5160 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5161 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5171 case "$cf_add_cflags" in
5173 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5175 CPPFLAGS=`echo "$CPPFLAGS" | \
5176 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5177 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5182 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5183 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5190 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5191 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5198 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5199 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5201 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5203 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5204 && test -z "${cf_tst_cflags}" \
5205 && cf_fix_cppflags=no
5210 if test -n "$cf_new_cflags" ; then
5212 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5213 CFLAGS="${CFLAGS}$cf_new_cflags"
5217 if test -n "$cf_new_cppflags" ; then
5219 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5220 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5224 if test -n "$cf_new_extra_cppflags" ; then
5226 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5227 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5236 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5238 for cf_add_1lib in $cf_add_0lib; do
5239 for cf_add_2lib in $cf_add_libs; do
5240 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5245 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5249 # even with config script, some packages use no-override for curses.h
5251 echo "$as_me:5251: checking if we have identified curses headers" >&5
5252 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5253 if test "${cf_cv_ncurses_header+set}" = set; then
5254 echo $ECHO_N "(cached) $ECHO_C" >&6
5257 cf_cv_ncurses_header=none
5259 ncurses.h ncurses/ncurses.h \
5260 curses.h ncurses/curses.h
5262 cat >"conftest.$ac_ext" <<_ACEOF
5263 #line 5263 "configure"
5264 #include "confdefs.h"
5265 #include <${cf_header}>
5269 initscr(); tgoto("?", 0,0)
5274 rm -f "conftest.$ac_objext"
5275 if { (eval echo "$as_me:5275: \"$ac_compile\"") >&5
5276 (eval $ac_compile) 2>&5
5278 echo "$as_me:5278: \$? = $ac_status" >&5
5279 (exit "$ac_status"); } &&
5280 { ac_try='test -s "conftest.$ac_objext"'
5281 { (eval echo "$as_me:5281: \"$ac_try\"") >&5
5284 echo "$as_me:5284: \$? = $ac_status" >&5
5285 (exit "$ac_status"); }; }; then
5286 cf_cv_ncurses_header=$cf_header; break
5288 echo "$as_me: failed program was:" >&5
5289 cat "conftest.$ac_ext" >&5
5291 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5295 echo "$as_me:5295: result: $cf_cv_ncurses_header" >&5
5296 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5298 if test "$cf_cv_ncurses_header" = none ; then
5299 { { echo "$as_me:5299: error: No curses header-files found" >&5
5300 echo "$as_me: error: No curses header-files found" >&2;}
5301 { (exit 1); exit 1; }; }
5304 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5306 for ac_header in $cf_cv_ncurses_header
5308 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5309 echo "$as_me:5309: checking for $ac_header" >&5
5310 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5311 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5312 echo $ECHO_N "(cached) $ECHO_C" >&6
5314 cat >"conftest.$ac_ext" <<_ACEOF
5315 #line 5315 "configure"
5316 #include "confdefs.h"
5317 #include <$ac_header>
5319 if { (eval echo "$as_me:5319: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5320 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5322 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5324 cat conftest.err >&5
5325 echo "$as_me:5325: \$? = $ac_status" >&5
5326 (exit "$ac_status"); } >/dev/null; then
5327 if test -s conftest.err; then
5328 ac_cpp_err=$ac_c_preproc_warn_flag
5335 if test -z "$ac_cpp_err"; then
5336 eval "$as_ac_Header=yes"
5338 echo "$as_me: failed program was:" >&5
5339 cat "conftest.$ac_ext" >&5
5340 eval "$as_ac_Header=no"
5342 rm -f conftest.err "conftest.$ac_ext"
5344 echo "$as_me:5344: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5345 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5346 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5347 cat >>confdefs.h <<EOF
5348 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5354 cat >>confdefs.h <<\EOF
5358 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5360 cat >>confdefs.h <<EOF
5361 #define $cf_nculib_ROOT 1
5364 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
5368 cf_ncuhdr_root=ncurses
5370 test -n "$cf_cv_curses_dir" && \
5371 test "$cf_cv_curses_dir" != "no" && { \
5373 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5374 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5376 while test "$cf_add_incdir" != /usr/include
5378 if test -d "$cf_add_incdir"
5381 if test -n "$CFLAGS$CPPFLAGS" ; then
5382 # a loop is needed to ensure we can add subdirs of existing dirs
5383 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5384 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5385 cf_have_incdir=yes; break
5390 if test "$cf_have_incdir" = no ; then
5391 if test "$cf_add_incdir" = /usr/local/include ; then
5392 if test "$GCC" = yes
5394 cf_save_CPPFLAGS=$CPPFLAGS
5396 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5397 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5399 cat >"conftest.$ac_ext" <<_ACEOF
5400 #line 5400 "configure"
5401 #include "confdefs.h"
5411 rm -f "conftest.$ac_objext"
5412 if { (eval echo "$as_me:5412: \"$ac_compile\"") >&5
5413 (eval $ac_compile) 2>&5
5415 echo "$as_me:5415: \$? = $ac_status" >&5
5416 (exit "$ac_status"); } &&
5417 { ac_try='test -s "conftest.$ac_objext"'
5418 { (eval echo "$as_me:5418: \"$ac_try\"") >&5
5421 echo "$as_me:5421: \$? = $ac_status" >&5
5422 (exit "$ac_status"); }; }; then
5425 echo "$as_me: failed program was:" >&5
5426 cat "conftest.$ac_ext" >&5
5429 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5430 CPPFLAGS=$cf_save_CPPFLAGS
5435 if test "$cf_have_incdir" = no ; then
5436 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5438 echo "${as_me:-configure}:5438: testing adding $cf_add_incdir to include-path ..." 1>&5
5440 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5442 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5443 test "$cf_top_incdir" = "$cf_add_incdir" && break
5444 cf_add_incdir="$cf_top_incdir"
5457 echo "$as_me:5457: checking for $cf_ncuhdr_root header in include-path" >&5
5458 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5459 if test "${cf_cv_ncurses_h+set}" = set; then
5460 echo $ECHO_N "(cached) $ECHO_C" >&6
5463 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5464 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
5465 for cf_header in $cf_header_list
5468 cat >"conftest.$ac_ext" <<_ACEOF
5469 #line 5469 "configure"
5470 #include "confdefs.h"
5472 #include <$cf_header>
5477 #ifdef NCURSES_VERSION
5479 printf("%s\\n", NCURSES_VERSION);
5492 rm -f "conftest.$ac_objext"
5493 if { (eval echo "$as_me:5493: \"$ac_compile\"") >&5
5494 (eval $ac_compile) 2>&5
5496 echo "$as_me:5496: \$? = $ac_status" >&5
5497 (exit "$ac_status"); } &&
5498 { ac_try='test -s "conftest.$ac_objext"'
5499 { (eval echo "$as_me:5499: \"$ac_try\"") >&5
5502 echo "$as_me:5502: \$? = $ac_status" >&5
5503 (exit "$ac_status"); }; }; then
5504 cf_cv_ncurses_h=$cf_header
5507 echo "$as_me: failed program was:" >&5
5508 cat "conftest.$ac_ext" >&5
5511 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5513 test "$cf_cv_ncurses_h" != no && break
5517 echo "$as_me:5517: result: $cf_cv_ncurses_h" >&5
5518 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5520 if test "$cf_cv_ncurses_h" != no ; then
5521 cf_cv_ncurses_header=$cf_cv_ncurses_h
5524 echo "$as_me:5524: checking for $cf_ncuhdr_root include-path" >&5
5525 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5526 if test "${cf_cv_ncurses_h2+set}" = set; then
5527 echo $ECHO_N "(cached) $ECHO_C" >&6
5530 test -n "$verbose" && echo
5534 # collect the current set of include-directories from compiler flags
5535 cf_header_path_list=""
5536 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5537 for cf_header_path in $CPPFLAGS $CFLAGS
5539 case "$cf_header_path" in
5541 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5543 test "x$cf_header_path" != "xNONE" && \
5544 test -d "$cf_header_path" && \
5546 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5547 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
5548 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5549 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5550 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5551 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"
5554 cf_header_path_list="$cf_header_path_list $cf_search"
5560 # add the variations for the package we are looking for
5564 test "x$prefix" != "xNONE" && \
5565 test -d "$prefix" && \
5567 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5568 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
5569 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5570 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5571 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5572 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5575 for cf_subdir_prefix in \
5584 test "x$cf_subdir_prefix" != "x$prefix" && \
5585 test -d "$cf_subdir_prefix" && \
5586 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
5587 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5588 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
5589 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
5590 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
5591 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
5592 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"
5597 test "$includedir" != NONE && \
5598 test "$includedir" != "/usr/include" && \
5599 test -d "$includedir" && {
5600 test -d "$includedir" && cf_search="$cf_search $includedir"
5601 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5604 test "$oldincludedir" != NONE && \
5605 test "$oldincludedir" != "/usr/include" && \
5606 test -d "$oldincludedir" && {
5607 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
5608 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5611 cf_search="$cf_search $cf_header_path_list"
5613 test -n "$verbose" && echo "search path $cf_search"
5614 cf_save2_CPPFLAGS="$CPPFLAGS"
5615 for cf_incdir in $cf_search
5618 if test -n "$cf_incdir" ; then
5619 for cf_add_incdir in $cf_incdir
5621 while test "$cf_add_incdir" != /usr/include
5623 if test -d "$cf_add_incdir"
5626 if test -n "$CFLAGS$CPPFLAGS" ; then
5627 # a loop is needed to ensure we can add subdirs of existing dirs
5628 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5629 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5630 cf_have_incdir=yes; break
5635 if test "$cf_have_incdir" = no ; then
5636 if test "$cf_add_incdir" = /usr/local/include ; then
5637 if test "$GCC" = yes
5639 cf_save_CPPFLAGS=$CPPFLAGS
5641 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5642 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5644 cat >"conftest.$ac_ext" <<_ACEOF
5645 #line 5645 "configure"
5646 #include "confdefs.h"
5656 rm -f "conftest.$ac_objext"
5657 if { (eval echo "$as_me:5657: \"$ac_compile\"") >&5
5658 (eval $ac_compile) 2>&5
5660 echo "$as_me:5660: \$? = $ac_status" >&5
5661 (exit "$ac_status"); } &&
5662 { ac_try='test -s "conftest.$ac_objext"'
5663 { (eval echo "$as_me:5663: \"$ac_try\"") >&5
5666 echo "$as_me:5666: \$? = $ac_status" >&5
5667 (exit "$ac_status"); }; }; then
5670 echo "$as_me: failed program was:" >&5
5671 cat "conftest.$ac_ext" >&5
5674 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5675 CPPFLAGS=$cf_save_CPPFLAGS
5680 if test "$cf_have_incdir" = no ; then
5681 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5683 echo "${as_me:-configure}:5683: testing adding $cf_add_incdir to include-path ..." 1>&5
5685 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5687 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5688 test "$cf_top_incdir" = "$cf_add_incdir" && break
5689 cf_add_incdir="$cf_top_incdir"
5705 cat >"conftest.$ac_ext" <<_ACEOF
5706 #line 5706 "configure"
5707 #include "confdefs.h"
5709 #include <$cf_header>
5714 #ifdef NCURSES_VERSION
5716 printf("%s\\n", NCURSES_VERSION);
5729 rm -f "conftest.$ac_objext"
5730 if { (eval echo "$as_me:5730: \"$ac_compile\"") >&5
5731 (eval $ac_compile) 2>&5
5733 echo "$as_me:5733: \$? = $ac_status" >&5
5734 (exit "$ac_status"); } &&
5735 { ac_try='test -s "conftest.$ac_objext"'
5736 { (eval echo "$as_me:5736: \"$ac_try\"") >&5
5739 echo "$as_me:5739: \$? = $ac_status" >&5
5740 (exit "$ac_status"); }; }; then
5741 cf_cv_ncurses_h2=$cf_header
5744 echo "$as_me: failed program was:" >&5
5745 cat "conftest.$ac_ext" >&5
5748 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5750 if test "$cf_cv_ncurses_h2" != no ; then
5751 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5752 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
5755 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5757 CPPFLAGS="$cf_save2_CPPFLAGS"
5758 test "$cf_cv_ncurses_h2" != no && break
5760 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5760: error: not found" >&5
5761 echo "$as_me: error: not found" >&2;}
5762 { (exit 1); exit 1; }; }
5765 echo "$as_me:5765: result: $cf_cv_ncurses_h2" >&5
5766 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5768 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
5769 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
5770 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
5771 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
5774 if test -n "$cf_1st_incdir" ; then
5775 for cf_add_incdir in $cf_1st_incdir
5777 while test "$cf_add_incdir" != /usr/include
5779 if test -d "$cf_add_incdir"
5782 if test -n "$CFLAGS$CPPFLAGS" ; then
5783 # a loop is needed to ensure we can add subdirs of existing dirs
5784 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5785 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5786 cf_have_incdir=yes; break
5791 if test "$cf_have_incdir" = no ; then
5792 if test "$cf_add_incdir" = /usr/local/include ; then
5793 if test "$GCC" = yes
5795 cf_save_CPPFLAGS=$CPPFLAGS
5797 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5798 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5800 cat >"conftest.$ac_ext" <<_ACEOF
5801 #line 5801 "configure"
5802 #include "confdefs.h"
5812 rm -f "conftest.$ac_objext"
5813 if { (eval echo "$as_me:5813: \"$ac_compile\"") >&5
5814 (eval $ac_compile) 2>&5
5816 echo "$as_me:5816: \$? = $ac_status" >&5
5817 (exit "$ac_status"); } &&
5818 { ac_try='test -s "conftest.$ac_objext"'
5819 { (eval echo "$as_me:5819: \"$ac_try\"") >&5
5822 echo "$as_me:5822: \$? = $ac_status" >&5
5823 (exit "$ac_status"); }; }; then
5826 echo "$as_me: failed program was:" >&5
5827 cat "conftest.$ac_ext" >&5
5830 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5831 CPPFLAGS=$cf_save_CPPFLAGS
5836 if test "$cf_have_incdir" = no ; then
5837 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5839 echo "${as_me:-configure}:5839: testing adding $cf_add_incdir to include-path ..." 1>&5
5841 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5843 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5844 test "$cf_top_incdir" = "$cf_add_incdir" && break
5845 cf_add_incdir="$cf_top_incdir"
5858 # Set definitions to allow ifdef'ing for ncurses.h
5860 case "$cf_cv_ncurses_header" in
5863 cat >>confdefs.h <<\EOF
5864 #define HAVE_NCURSES_H 1
5870 case "$cf_cv_ncurses_header" in
5871 (ncurses/curses.h|ncurses/ncurses.h)
5873 cat >>confdefs.h <<\EOF
5874 #define HAVE_NCURSES_NCURSES_H 1
5878 (ncursesw/curses.h|ncursesw/ncurses.h)
5880 cat >>confdefs.h <<\EOF
5881 #define HAVE_NCURSESW_NCURSES_H 1
5887 echo "$as_me:5887: checking for terminfo header" >&5
5888 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5889 if test "${cf_cv_term_header+set}" = set; then
5890 echo $ECHO_N "(cached) $ECHO_C" >&6
5893 case "${cf_cv_ncurses_header}" in
5894 (*/ncurses.h|*/ncursesw.h)
5895 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5898 cf_term_header=term.h
5902 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5904 cat >"conftest.$ac_ext" <<_ACEOF
5905 #line 5905 "configure"
5906 #include "confdefs.h"
5908 #include <${cf_cv_ncurses_header:-curses.h}>
5914 int x = auto_left_margin; (void)x
5919 rm -f "conftest.$ac_objext"
5920 if { (eval echo "$as_me:5920: \"$ac_compile\"") >&5
5921 (eval $ac_compile) 2>&5
5923 echo "$as_me:5923: \$? = $ac_status" >&5
5924 (exit "$ac_status"); } &&
5925 { ac_try='test -s "conftest.$ac_objext"'
5926 { (eval echo "$as_me:5926: \"$ac_try\"") >&5
5929 echo "$as_me:5929: \$? = $ac_status" >&5
5930 (exit "$ac_status"); }; }; then
5932 cf_cv_term_header="$cf_test"
5934 echo "$as_me: failed program was:" >&5
5935 cat "conftest.$ac_ext" >&5
5937 cf_cv_term_header=unknown
5940 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5941 test "$cf_cv_term_header" != unknown && break
5945 echo "$as_me:5945: result: $cf_cv_term_header" >&5
5946 echo "${ECHO_T}$cf_cv_term_header" >&6
5948 # Set definitions to allow ifdef'ing to accommodate subdirectories
5950 case "$cf_cv_term_header" in
5953 cat >>confdefs.h <<\EOF
5954 #define HAVE_TERM_H 1
5960 case "$cf_cv_term_header" in
5963 cat >>confdefs.h <<\EOF
5964 #define HAVE_NCURSES_TERM_H 1
5970 cat >>confdefs.h <<\EOF
5971 #define HAVE_NCURSESW_TERM_H 1
5977 # some applications need this, but should check for NCURSES_VERSION
5979 cat >>confdefs.h <<\EOF
5983 echo "$as_me:5983: checking for ncurses version" >&5
5984 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5985 if test "${cf_cv_ncurses_version+set}" = set; then
5986 echo $ECHO_N "(cached) $ECHO_C" >&6
5989 cf_cv_ncurses_version=no
5991 rm -f "$cf_tempfile"
5992 if test "$cross_compiling" = yes; then
5994 # This will not work if the preprocessor splits the line after the
5995 # Autoconf token. The 'unproto' program does that.
5996 cat > "conftest.$ac_ext" <<EOF
5997 #include <${cf_cv_ncurses_header:-curses.h}>
5999 #ifdef NCURSES_VERSION
6000 Autoconf NCURSES_VERSION
6008 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6009 { (eval echo "$as_me:6009: \"$cf_try\"") >&5
6012 echo "$as_me:6012: \$? = $ac_status" >&5
6013 (exit "$ac_status"); }
6014 if test -f conftest.out ; then
6015 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
6016 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6021 cat >"conftest.$ac_ext" <<_ACEOF
6022 #line 6022 "configure"
6023 #include "confdefs.h"
6025 #include <${cf_cv_ncurses_header:-curses.h}>
6029 FILE *fp = fopen("$cf_tempfile", "w");
6030 #ifdef NCURSES_VERSION
6031 # ifdef NCURSES_VERSION_PATCH
6032 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6034 fprintf(fp, "%s\\n", NCURSES_VERSION);
6038 fprintf(fp, "old\\n");
6043 ${cf_cv_main_return:-return}(0);
6046 rm -f "conftest$ac_exeext"
6047 if { (eval echo "$as_me:6047: \"$ac_link\"") >&5
6048 (eval $ac_link) 2>&5
6050 echo "$as_me:6050: \$? = $ac_status" >&5
6051 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6052 { (eval echo "$as_me:6052: \"$ac_try\"") >&5
6055 echo "$as_me:6055: \$? = $ac_status" >&5
6056 (exit "$ac_status"); }; }; then
6058 cf_cv_ncurses_version=`cat $cf_tempfile`
6060 echo "$as_me: program exited with status $ac_status" >&5
6061 echo "$as_me: failed program was:" >&5
6062 cat "conftest.$ac_ext" >&5
6064 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6066 rm -f "$cf_tempfile"
6069 echo "$as_me:6069: result: $cf_cv_ncurses_version" >&5
6070 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6071 test "$cf_cv_ncurses_version" = no ||
6072 cat >>confdefs.h <<\EOF
6076 cf_nculib_root=ncurses
6077 # This works, except for the special case where we find gpm, but
6078 # ncurses is in a nonstandard location via $LIBS, and we really want
6081 cf_ncurses_SAVE="$LIBS"
6082 echo "$as_me:6082: checking for Gpm_Open in -lgpm" >&5
6083 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6084 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6085 echo $ECHO_N "(cached) $ECHO_C" >&6
6087 ac_check_lib_save_LIBS=$LIBS
6089 cat >"conftest.$ac_ext" <<_ACEOF
6090 #line 6090 "configure"
6091 #include "confdefs.h"
6093 /* Override any gcc2 internal prototype to avoid an error. */
6097 /* We use char because int might match the return type of a gcc2
6098 builtin and then its argument prototype would still apply. */
6108 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6109 if { (eval echo "$as_me:6109: \"$ac_link\"") >&5
6110 (eval $ac_link) 2>&5
6112 echo "$as_me:6112: \$? = $ac_status" >&5
6113 (exit "$ac_status"); } &&
6114 { ac_try='test -s "conftest$ac_exeext"'
6115 { (eval echo "$as_me:6115: \"$ac_try\"") >&5
6118 echo "$as_me:6118: \$? = $ac_status" >&5
6119 (exit "$ac_status"); }; }; then
6120 ac_cv_lib_gpm_Gpm_Open=yes
6122 echo "$as_me: failed program was:" >&5
6123 cat "conftest.$ac_ext" >&5
6124 ac_cv_lib_gpm_Gpm_Open=no
6126 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6127 LIBS=$ac_check_lib_save_LIBS
6129 echo "$as_me:6129: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6130 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6131 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
6132 echo "$as_me:6132: checking for initscr in -lgpm" >&5
6133 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6134 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6135 echo $ECHO_N "(cached) $ECHO_C" >&6
6137 ac_check_lib_save_LIBS=$LIBS
6139 cat >"conftest.$ac_ext" <<_ACEOF
6140 #line 6140 "configure"
6141 #include "confdefs.h"
6143 /* Override any gcc2 internal prototype to avoid an error. */
6147 /* We use char because int might match the return type of a gcc2
6148 builtin and then its argument prototype would still apply. */
6158 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6159 if { (eval echo "$as_me:6159: \"$ac_link\"") >&5
6160 (eval $ac_link) 2>&5
6162 echo "$as_me:6162: \$? = $ac_status" >&5
6163 (exit "$ac_status"); } &&
6164 { ac_try='test -s "conftest$ac_exeext"'
6165 { (eval echo "$as_me:6165: \"$ac_try\"") >&5
6168 echo "$as_me:6168: \$? = $ac_status" >&5
6169 (exit "$ac_status"); }; }; then
6170 ac_cv_lib_gpm_initscr=yes
6172 echo "$as_me: failed program was:" >&5
6173 cat "conftest.$ac_ext" >&5
6174 ac_cv_lib_gpm_initscr=no
6176 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6177 LIBS=$ac_check_lib_save_LIBS
6179 echo "$as_me:6179: result: $ac_cv_lib_gpm_initscr" >&5
6180 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6181 if test "$ac_cv_lib_gpm_initscr" = yes; then
6182 LIBS="$cf_ncurses_SAVE"
6184 cf_ncurses_LIBS="-lgpm"
6191 # This is only necessary if you are linking against an obsolete
6192 # version of ncurses (but it should do no harm, since it is static).
6193 if test "$cf_nculib_root" = ncurses ; then
6194 echo "$as_me:6194: checking for tgoto in -lmytinfo" >&5
6195 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6196 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6197 echo $ECHO_N "(cached) $ECHO_C" >&6
6199 ac_check_lib_save_LIBS=$LIBS
6200 LIBS="-lmytinfo $LIBS"
6201 cat >"conftest.$ac_ext" <<_ACEOF
6202 #line 6202 "configure"
6203 #include "confdefs.h"
6205 /* Override any gcc2 internal prototype to avoid an error. */
6209 /* We use char because int might match the return type of a gcc2
6210 builtin and then its argument prototype would still apply. */
6220 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6221 if { (eval echo "$as_me:6221: \"$ac_link\"") >&5
6222 (eval $ac_link) 2>&5
6224 echo "$as_me:6224: \$? = $ac_status" >&5
6225 (exit "$ac_status"); } &&
6226 { ac_try='test -s "conftest$ac_exeext"'
6227 { (eval echo "$as_me:6227: \"$ac_try\"") >&5
6230 echo "$as_me:6230: \$? = $ac_status" >&5
6231 (exit "$ac_status"); }; }; then
6232 ac_cv_lib_mytinfo_tgoto=yes
6234 echo "$as_me: failed program was:" >&5
6235 cat "conftest.$ac_ext" >&5
6236 ac_cv_lib_mytinfo_tgoto=no
6238 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6239 LIBS=$ac_check_lib_save_LIBS
6241 echo "$as_me:6241: result: $ac_cv_lib_mytinfo_tgoto" >&5
6242 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6243 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6244 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6254 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6256 for cf_add_1lib in $cf_add_0lib; do
6257 for cf_add_2lib in $cf_add_libs; do
6258 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6263 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6267 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6273 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6275 for cf_add_1lib in $cf_add_0lib; do
6276 for cf_add_2lib in $cf_add_libs; do
6277 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6282 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6288 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
6290 echo "$as_me:6290: checking for initscr" >&5
6291 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6292 if test "${ac_cv_func_initscr+set}" = set; then
6293 echo $ECHO_N "(cached) $ECHO_C" >&6
6295 cat >"conftest.$ac_ext" <<_ACEOF
6296 #line 6296 "configure"
6297 #include "confdefs.h"
6298 #define initscr autoconf_temporary
6299 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6306 /* We use char because int might match the return type of a gcc2
6307 builtin and then its argument prototype would still apply. */
6308 char initscr (void);
6314 /* The GNU C library defines stubs for functions which it implements
6315 to always fail with ENOSYS. Some functions are actually named
6316 something starting with __ and the normal name is an alias. */
6317 #if defined (__stub_initscr) || defined (__stub___initscr)
6318 #error found stub for initscr
6326 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6327 if { (eval echo "$as_me:6327: \"$ac_link\"") >&5
6328 (eval $ac_link) 2>&5
6330 echo "$as_me:6330: \$? = $ac_status" >&5
6331 (exit "$ac_status"); } &&
6332 { ac_try='test -s "conftest$ac_exeext"'
6333 { (eval echo "$as_me:6333: \"$ac_try\"") >&5
6336 echo "$as_me:6336: \$? = $ac_status" >&5
6337 (exit "$ac_status"); }; }; then
6338 ac_cv_func_initscr=yes
6340 echo "$as_me: failed program was:" >&5
6341 cat "conftest.$ac_ext" >&5
6342 ac_cv_func_initscr=no
6344 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6346 echo "$as_me:6346: result: $ac_cv_func_initscr" >&5
6347 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6348 if test "$ac_cv_func_initscr" = yes; then
6349 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6352 cf_save_LIBS="$LIBS"
6353 echo "$as_me:6353: checking for initscr in -l$cf_nculib_root" >&5
6354 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6355 LIBS="-l$cf_nculib_root $LIBS"
6356 cat >"conftest.$ac_ext" <<_ACEOF
6357 #line 6357 "configure"
6358 #include "confdefs.h"
6359 #include <${cf_cv_ncurses_header:-curses.h}>
6368 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6369 if { (eval echo "$as_me:6369: \"$ac_link\"") >&5
6370 (eval $ac_link) 2>&5
6372 echo "$as_me:6372: \$? = $ac_status" >&5
6373 (exit "$ac_status"); } &&
6374 { ac_try='test -s "conftest$ac_exeext"'
6375 { (eval echo "$as_me:6375: \"$ac_try\"") >&5
6378 echo "$as_me:6378: \$? = $ac_status" >&5
6379 (exit "$ac_status"); }; }; then
6380 echo "$as_me:6380: result: yes" >&5
6381 echo "${ECHO_T}yes" >&6
6382 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6385 echo "$as_me: failed program was:" >&5
6386 cat "conftest.$ac_ext" >&5
6387 echo "$as_me:6387: result: no" >&5
6388 echo "${ECHO_T}no" >&6
6391 cf_library_path_list=""
6392 if test -n "${LDFLAGS}${LIBS}" ; then
6393 for cf_library_path in $LDFLAGS $LIBS
6395 case "$cf_library_path" in
6397 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6399 test "x$cf_library_path" != "xNONE" && \
6400 test -d "$cf_library_path" && \
6402 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6403 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6404 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6405 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6406 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6407 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"
6410 cf_library_path_list="$cf_library_path_list $cf_search"
6418 test "x$prefix" != "xNONE" && \
6419 test -d "$prefix" && \
6421 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6422 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6423 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6424 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6425 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6426 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6429 for cf_subdir_prefix in \
6438 test "x$cf_subdir_prefix" != "x$prefix" && \
6439 test -d "$cf_subdir_prefix" && \
6440 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6441 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6442 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6443 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
6444 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
6445 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
6446 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"
6451 cf_search="$cf_library_path_list $cf_search"
6453 for cf_libdir in $cf_search
6455 echo "$as_me:6455: checking for -l$cf_nculib_root in $cf_libdir" >&5
6456 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6457 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6458 cat >"conftest.$ac_ext" <<_ACEOF
6459 #line 6459 "configure"
6460 #include "confdefs.h"
6461 #include <${cf_cv_ncurses_header:-curses.h}>
6470 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6471 if { (eval echo "$as_me:6471: \"$ac_link\"") >&5
6472 (eval $ac_link) 2>&5
6474 echo "$as_me:6474: \$? = $ac_status" >&5
6475 (exit "$ac_status"); } &&
6476 { ac_try='test -s "conftest$ac_exeext"'
6477 { (eval echo "$as_me:6477: \"$ac_try\"") >&5
6480 echo "$as_me:6480: \$? = $ac_status" >&5
6481 (exit "$ac_status"); }; }; then
6482 echo "$as_me:6482: result: yes" >&5
6483 echo "${ECHO_T}yes" >&6
6484 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6487 echo "$as_me: failed program was:" >&5
6488 cat "conftest.$ac_ext" >&5
6489 echo "$as_me:6489: result: no" >&5
6490 echo "${ECHO_T}no" >&6
6491 LIBS="$cf_save_LIBS"
6493 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6497 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6501 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
6503 if test "$cf_found_library" = no ; then
6504 { { echo "$as_me:6504: error: Cannot link $cf_nculib_root library" >&5
6505 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6506 { (exit 1); exit 1; }; }
6511 if test -n "$cf_ncurses_LIBS" ; then
6512 echo "$as_me:6512: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6513 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6514 cf_ncurses_SAVE="$LIBS"
6515 for p in $cf_ncurses_LIBS ; do
6516 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
6517 if test "$q" != "$LIBS" ; then
6521 cat >"conftest.$ac_ext" <<_ACEOF
6522 #line 6522 "configure"
6523 #include "confdefs.h"
6524 #include <${cf_cv_ncurses_header:-curses.h}>
6528 initscr(); mousemask(0,0); tigetstr((char *)0);
6533 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6534 if { (eval echo "$as_me:6534: \"$ac_link\"") >&5
6535 (eval $ac_link) 2>&5
6537 echo "$as_me:6537: \$? = $ac_status" >&5
6538 (exit "$ac_status"); } &&
6539 { ac_try='test -s "conftest$ac_exeext"'
6540 { (eval echo "$as_me:6540: \"$ac_try\"") >&5
6543 echo "$as_me:6543: \$? = $ac_status" >&5
6544 (exit "$ac_status"); }; }; then
6545 echo "$as_me:6545: result: yes" >&5
6546 echo "${ECHO_T}yes" >&6
6548 echo "$as_me: failed program was:" >&5
6549 cat "conftest.$ac_ext" >&5
6550 echo "$as_me:6550: result: no" >&5
6551 echo "${ECHO_T}no" >&6
6552 LIBS="$cf_ncurses_SAVE"
6554 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6557 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6559 cat >>confdefs.h <<EOF
6560 #define $cf_nculib_ROOT 1
6568 echo "$as_me:6568: checking if you want wide-character code" >&5
6569 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6571 # Check whether --enable-widec or --disable-widec was given.
6572 if test "${enable_widec+set}" = set; then
6573 enableval="$enable_widec"
6574 with_widec=$enableval
6578 echo "$as_me:6578: result: $with_widec" >&5
6579 echo "${ECHO_T}$with_widec" >&6
6580 if test "$with_widec" = yes ; then
6582 for ac_header in wchar.h
6584 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6585 echo "$as_me:6585: checking for $ac_header" >&5
6586 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6587 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6588 echo $ECHO_N "(cached) $ECHO_C" >&6
6590 cat >"conftest.$ac_ext" <<_ACEOF
6591 #line 6591 "configure"
6592 #include "confdefs.h"
6593 #include <$ac_header>
6595 if { (eval echo "$as_me:6595: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6596 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6598 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6600 cat conftest.err >&5
6601 echo "$as_me:6601: \$? = $ac_status" >&5
6602 (exit "$ac_status"); } >/dev/null; then
6603 if test -s conftest.err; then
6604 ac_cpp_err=$ac_c_preproc_warn_flag
6611 if test -z "$ac_cpp_err"; then
6612 eval "$as_ac_Header=yes"
6614 echo "$as_me: failed program was:" >&5
6615 cat "conftest.$ac_ext" >&5
6616 eval "$as_ac_Header=no"
6618 rm -f conftest.err "conftest.$ac_ext"
6620 echo "$as_me:6620: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6621 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6622 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6623 cat >>confdefs.h <<EOF
6624 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6630 echo "$as_me:6630: checking for multibyte character support" >&5
6631 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6632 if test "${cf_cv_utf8_lib+set}" = set; then
6633 echo $ECHO_N "(cached) $ECHO_C" >&6
6636 cf_save_LIBS="$LIBS"
6637 cat >"conftest.$ac_ext" <<_ACEOF
6638 #line 6638 "configure"
6639 #include "confdefs.h"
6655 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6656 if { (eval echo "$as_me:6656: \"$ac_link\"") >&5
6657 (eval $ac_link) 2>&5
6659 echo "$as_me:6659: \$? = $ac_status" >&5
6660 (exit "$ac_status"); } &&
6661 { ac_try='test -s "conftest$ac_exeext"'
6662 { (eval echo "$as_me:6662: \"$ac_try\"") >&5
6665 echo "$as_me:6665: \$? = $ac_status" >&5
6666 (exit "$ac_status"); }; }; then
6669 echo "$as_me: failed program was:" >&5
6670 cat "conftest.$ac_ext" >&5
6672 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6673 # will be set on completion of the AC_TRY_LINK below.
6674 cf_cv_header_path_utf8=
6675 cf_cv_library_path_utf8=
6677 echo "${as_me:-configure}:6677: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6679 cf_save_LIBS="$LIBS"
6681 cat >"conftest.$ac_ext" <<_ACEOF
6682 #line 6682 "configure"
6683 #include "confdefs.h"
6685 #include <libutf8.h>
6694 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6695 if { (eval echo "$as_me:6695: \"$ac_link\"") >&5
6696 (eval $ac_link) 2>&5
6698 echo "$as_me:6698: \$? = $ac_status" >&5
6699 (exit "$ac_status"); } &&
6700 { ac_try='test -s "conftest$ac_exeext"'
6701 { (eval echo "$as_me:6701: \"$ac_try\"") >&5
6704 echo "$as_me:6704: \$? = $ac_status" >&5
6705 (exit "$ac_status"); }; }; then
6707 cf_cv_find_linkage_utf8=yes
6708 cf_cv_header_path_utf8=/usr/include
6709 cf_cv_library_path_utf8=/usr/lib
6712 echo "$as_me: failed program was:" >&5
6713 cat "conftest.$ac_ext" >&5
6715 LIBS="-lutf8 $cf_save_LIBS"
6717 cat >"conftest.$ac_ext" <<_ACEOF
6718 #line 6718 "configure"
6719 #include "confdefs.h"
6721 #include <libutf8.h>
6730 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6731 if { (eval echo "$as_me:6731: \"$ac_link\"") >&5
6732 (eval $ac_link) 2>&5
6734 echo "$as_me:6734: \$? = $ac_status" >&5
6735 (exit "$ac_status"); } &&
6736 { ac_try='test -s "conftest$ac_exeext"'
6737 { (eval echo "$as_me:6737: \"$ac_try\"") >&5
6740 echo "$as_me:6740: \$? = $ac_status" >&5
6741 (exit "$ac_status"); }; }; then
6743 cf_cv_find_linkage_utf8=yes
6744 cf_cv_header_path_utf8=/usr/include
6745 cf_cv_library_path_utf8=/usr/lib
6746 cf_cv_library_file_utf8="-lutf8"
6749 echo "$as_me: failed program was:" >&5
6750 cat "conftest.$ac_ext" >&5
6752 cf_cv_find_linkage_utf8=no
6753 LIBS="$cf_save_LIBS"
6755 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6757 echo "${as_me:-configure}:6757: testing find linkage for utf8 library ..." 1>&5
6759 echo "${as_me:-configure}:6759: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6761 cf_save_CPPFLAGS="$CPPFLAGS"
6762 cf_test_CPPFLAGS="$CPPFLAGS"
6766 # collect the current set of include-directories from compiler flags
6767 cf_header_path_list=""
6768 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6769 for cf_header_path in $CPPFLAGS $CFLAGS
6771 case "$cf_header_path" in
6773 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6775 test "x$cf_header_path" != "xNONE" && \
6776 test -d "$cf_header_path" && \
6778 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6779 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
6780 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
6781 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
6782 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
6783 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6786 cf_header_path_list="$cf_header_path_list $cf_search"
6792 # add the variations for the package we are looking for
6796 test "x$prefix" != "xNONE" && \
6797 test -d "$prefix" && \
6799 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6800 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
6801 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
6802 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
6803 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
6804 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
6807 for cf_subdir_prefix in \
6816 test "x$cf_subdir_prefix" != "x$prefix" && \
6817 test -d "$cf_subdir_prefix" && \
6818 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6819 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6820 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
6821 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6822 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6823 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6824 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6829 test "$includedir" != NONE && \
6830 test "$includedir" != "/usr/include" && \
6831 test -d "$includedir" && {
6832 test -d "$includedir" && cf_search="$cf_search $includedir"
6833 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
6836 test "$oldincludedir" != NONE && \
6837 test "$oldincludedir" != "/usr/include" && \
6838 test -d "$oldincludedir" && {
6839 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
6840 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
6843 cf_search="$cf_search $cf_header_path_list"
6845 for cf_cv_header_path_utf8 in $cf_search
6847 if test -d "$cf_cv_header_path_utf8" ; then
6848 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6850 echo "${as_me:-configure}:6850: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6852 CPPFLAGS="$cf_save_CPPFLAGS"
6854 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6855 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
6857 cat >"conftest.$ac_ext" <<_ACEOF
6858 #line 6858 "configure"
6859 #include "confdefs.h"
6861 #include <libutf8.h>
6870 rm -f "conftest.$ac_objext"
6871 if { (eval echo "$as_me:6871: \"$ac_compile\"") >&5
6872 (eval $ac_compile) 2>&5
6874 echo "$as_me:6874: \$? = $ac_status" >&5
6875 (exit "$ac_status"); } &&
6876 { ac_try='test -s "conftest.$ac_objext"'
6877 { (eval echo "$as_me:6877: \"$ac_try\"") >&5
6880 echo "$as_me:6880: \$? = $ac_status" >&5
6881 (exit "$ac_status"); }; }; then
6883 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6885 echo "${as_me:-configure}:6885: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6887 cf_cv_find_linkage_utf8=maybe
6888 cf_test_CPPFLAGS="$CPPFLAGS"
6891 echo "$as_me: failed program was:" >&5
6892 cat "conftest.$ac_ext" >&5
6894 CPPFLAGS="$cf_save_CPPFLAGS"
6897 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6901 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6903 echo "${as_me:-configure}:6903: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6905 cf_save_LIBS="$LIBS"
6906 cf_save_LDFLAGS="$LDFLAGS"
6908 if test "$cf_cv_find_linkage_utf8" != yes ; then
6911 cf_library_path_list=""
6912 if test -n "${LDFLAGS}${LIBS}" ; then
6913 for cf_library_path in $LDFLAGS $LIBS
6915 case "$cf_library_path" in
6917 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6919 test "x$cf_library_path" != "xNONE" && \
6920 test -d "$cf_library_path" && \
6922 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6923 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6924 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
6925 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6926 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
6927 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6930 cf_library_path_list="$cf_library_path_list $cf_search"
6938 test "x$prefix" != "xNONE" && \
6939 test -d "$prefix" && \
6941 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6942 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6943 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
6944 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
6945 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
6946 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
6949 for cf_subdir_prefix in \
6958 test "x$cf_subdir_prefix" != "x$prefix" && \
6959 test -d "$cf_subdir_prefix" && \
6960 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6961 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6962 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6963 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6964 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6965 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6966 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6971 cf_search="$cf_library_path_list $cf_search"
6973 for cf_cv_library_path_utf8 in $cf_search
6975 if test -d "$cf_cv_library_path_utf8" ; then
6976 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6978 echo "${as_me:-configure}:6978: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6980 CPPFLAGS="$cf_test_CPPFLAGS"
6981 LIBS="-lutf8 $cf_save_LIBS"
6982 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6983 cat >"conftest.$ac_ext" <<_ACEOF
6984 #line 6984 "configure"
6985 #include "confdefs.h"
6987 #include <libutf8.h>
6996 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6997 if { (eval echo "$as_me:6997: \"$ac_link\"") >&5
6998 (eval $ac_link) 2>&5
7000 echo "$as_me:7000: \$? = $ac_status" >&5
7001 (exit "$ac_status"); } &&
7002 { ac_try='test -s "conftest$ac_exeext"'
7003 { (eval echo "$as_me:7003: \"$ac_try\"") >&5
7006 echo "$as_me:7006: \$? = $ac_status" >&5
7007 (exit "$ac_status"); }; }; then
7009 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7011 echo "${as_me:-configure}:7011: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7013 cf_cv_find_linkage_utf8=yes
7014 cf_cv_library_file_utf8="-lutf8"
7017 echo "$as_me: failed program was:" >&5
7018 cat "conftest.$ac_ext" >&5
7020 CPPFLAGS="$cf_save_CPPFLAGS"
7021 LIBS="$cf_save_LIBS"
7022 LDFLAGS="$cf_save_LDFLAGS"
7025 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7028 CPPFLAGS="$cf_save_CPPFLAGS"
7029 LDFLAGS="$cf_save_LDFLAGS"
7033 cf_cv_find_linkage_utf8=no
7037 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7040 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7042 LIBS="$cf_save_LIBS"
7044 if test "$cf_cv_find_linkage_utf8" = yes ; then
7045 cf_cv_utf8_lib=add-on
7051 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7053 echo "$as_me:7053: result: $cf_cv_utf8_lib" >&5
7054 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7056 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7058 if test "$cf_cv_utf8_lib" = "add-on" ; then
7060 cat >>confdefs.h <<\EOF
7061 #define HAVE_LIBUTF8_H 1
7064 if test -n "$cf_cv_header_path_utf8" ; then
7065 for cf_add_incdir in $cf_cv_header_path_utf8
7067 while test "$cf_add_incdir" != /usr/include
7069 if test -d "$cf_add_incdir"
7072 if test -n "$CFLAGS$CPPFLAGS" ; then
7073 # a loop is needed to ensure we can add subdirs of existing dirs
7074 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7075 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7076 cf_have_incdir=yes; break
7081 if test "$cf_have_incdir" = no ; then
7082 if test "$cf_add_incdir" = /usr/local/include ; then
7083 if test "$GCC" = yes
7085 cf_save_CPPFLAGS=$CPPFLAGS
7087 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7088 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7090 cat >"conftest.$ac_ext" <<_ACEOF
7091 #line 7091 "configure"
7092 #include "confdefs.h"
7102 rm -f "conftest.$ac_objext"
7103 if { (eval echo "$as_me:7103: \"$ac_compile\"") >&5
7104 (eval $ac_compile) 2>&5
7106 echo "$as_me:7106: \$? = $ac_status" >&5
7107 (exit "$ac_status"); } &&
7108 { ac_try='test -s "conftest.$ac_objext"'
7109 { (eval echo "$as_me:7109: \"$ac_try\"") >&5
7112 echo "$as_me:7112: \$? = $ac_status" >&5
7113 (exit "$ac_status"); }; }; then
7116 echo "$as_me: failed program was:" >&5
7117 cat "conftest.$ac_ext" >&5
7120 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7121 CPPFLAGS=$cf_save_CPPFLAGS
7126 if test "$cf_have_incdir" = no ; then
7127 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7129 echo "${as_me:-configure}:7129: testing adding $cf_add_incdir to include-path ..." 1>&5
7131 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7133 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7134 test "$cf_top_incdir" = "$cf_add_incdir" && break
7135 cf_add_incdir="$cf_top_incdir"
7146 if test -n "$cf_cv_library_path_utf8" ; then
7147 for cf_add_libdir in $cf_cv_library_path_utf8
7149 if test "$cf_add_libdir" = /usr/lib ; then
7151 elif test -d "$cf_add_libdir"
7154 if test -n "$LDFLAGS$LIBS" ; then
7155 # a loop is needed to ensure we can add subdirs of existing dirs
7156 for cf_test_libdir in $LDFLAGS $LIBS ; do
7157 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7158 cf_have_libdir=yes; break
7162 if test "$cf_have_libdir" = no ; then
7163 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7165 echo "${as_me:-configure}:7165: testing adding $cf_add_libdir to library-path ..." 1>&5
7167 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7176 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7178 for cf_add_1lib in $cf_add_0lib; do
7179 for cf_add_2lib in $cf_add_libs; do
7180 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7185 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7191 cf_ncuconfig_root=ncursesw
7192 cf_have_ncuconfig=no
7194 if test "x${PKG_CONFIG:=none}" != xnone; then
7195 echo "$as_me:7195: checking pkg-config for $cf_ncuconfig_root" >&5
7196 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7197 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7198 echo "$as_me:7198: result: yes" >&5
7199 echo "${ECHO_T}yes" >&6
7201 echo "$as_me:7201: checking if the $cf_ncuconfig_root package files work" >&5
7202 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7203 cf_have_ncuconfig=unknown
7205 cf_save_CFLAGS="$CFLAGS"
7206 cf_save_CPPFLAGS="$CPPFLAGS"
7207 cf_save_LIBS="$LIBS"
7209 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7210 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7212 # while -W for passing linker flags is prevalent, it is not "standard".
7213 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7214 # incompatible _and_ non-standard -W option which gives an error. Work
7215 # around that pitfall.
7216 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7222 cf_new_extra_cppflags=
7224 for cf_add_cflags in $cf_pkg_cflags
7226 case "$cf_fix_cppflags" in
7228 case "$cf_add_cflags" in
7229 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7230 case "$cf_add_cflags" in
7232 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7234 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7235 && test -z "${cf_tst_cflags}" \
7236 && cf_fix_cppflags=yes
7238 if test "$cf_fix_cppflags" = yes ; then
7240 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7241 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7244 elif test "${cf_tst_cflags}" = "\"'" ; then
7246 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7247 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7257 case "$cf_add_cflags" in
7259 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7261 CPPFLAGS=`echo "$CPPFLAGS" | \
7262 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7263 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7268 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7269 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7276 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7277 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7284 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7285 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7287 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7289 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7290 && test -z "${cf_tst_cflags}" \
7291 && cf_fix_cppflags=no
7296 if test -n "$cf_new_cflags" ; then
7298 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7299 CFLAGS="${CFLAGS}$cf_new_cflags"
7303 if test -n "$cf_new_cppflags" ; then
7305 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7306 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7310 if test -n "$cf_new_extra_cppflags" ; then
7312 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7313 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7320 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7322 for cf_add_1lib in $cf_add_0lib; do
7323 for cf_add_2lib in $cf_add_libs; do
7324 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7329 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7333 cat >"conftest.$ac_ext" <<_ACEOF
7334 #line 7334 "configure"
7335 #include "confdefs.h"
7336 #include <${cf_cv_ncurses_header:-curses.h}>
7340 initscr(); mousemask(0,0); tigetstr((char *)0);
7345 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7346 if { (eval echo "$as_me:7346: \"$ac_link\"") >&5
7347 (eval $ac_link) 2>&5
7349 echo "$as_me:7349: \$? = $ac_status" >&5
7350 (exit "$ac_status"); } &&
7351 { ac_try='test -s "conftest$ac_exeext"'
7352 { (eval echo "$as_me:7352: \"$ac_try\"") >&5
7355 echo "$as_me:7355: \$? = $ac_status" >&5
7356 (exit "$ac_status"); }; }; then
7357 if test "$cross_compiling" = yes; then
7358 cf_test_ncuconfig=maybe
7360 cat >"conftest.$ac_ext" <<_ACEOF
7361 #line 7361 "configure"
7362 #include "confdefs.h"
7363 #include <${cf_cv_ncurses_header:-curses.h}>
7365 { const char *xx = curses_version(); return (xx == 0); }
7367 rm -f "conftest$ac_exeext"
7368 if { (eval echo "$as_me:7368: \"$ac_link\"") >&5
7369 (eval $ac_link) 2>&5
7371 echo "$as_me:7371: \$? = $ac_status" >&5
7372 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7373 { (eval echo "$as_me:7373: \"$ac_try\"") >&5
7376 echo "$as_me:7376: \$? = $ac_status" >&5
7377 (exit "$ac_status"); }; }; then
7378 cf_test_ncuconfig=yes
7380 echo "$as_me: program exited with status $ac_status" >&5
7381 echo "$as_me: failed program was:" >&5
7382 cat "conftest.$ac_ext" >&5
7383 cf_test_ncuconfig=no
7385 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7388 echo "$as_me: failed program was:" >&5
7389 cat "conftest.$ac_ext" >&5
7390 cf_test_ncuconfig=no
7392 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7394 CFLAGS="$cf_save_CFLAGS"
7395 CPPFLAGS="$cf_save_CPPFLAGS"
7396 LIBS="$cf_save_LIBS"
7398 if test "x$cf_test_ncuconfig" != xyes; then
7399 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7400 cf_pkg_cflags="$cf_temp"
7401 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7402 cf_pkg_libs="$cf_temp"
7407 for cf_add_cflags in $cf_pkg_cflags
7409 case "x$cf_add_cflags" in
7412 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7415 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
7416 test "$CFLAGS" != "$cf_old_cflag" || break
7418 CFLAGS="$cf_old_cflag"
7421 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7424 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
7425 test "$CPPFLAGS" != "$cf_old_cflag" || break
7427 CPPFLAGS="$cf_old_cflag"
7436 cf_new_extra_cppflags=
7438 for cf_add_cflags in $cf_add_cflags
7440 case "$cf_fix_cppflags" in
7442 case "$cf_add_cflags" in
7443 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7444 case "$cf_add_cflags" in
7446 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7448 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7449 && test -z "${cf_tst_cflags}" \
7450 && cf_fix_cppflags=yes
7452 if test "$cf_fix_cppflags" = yes ; then
7454 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7455 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7458 elif test "${cf_tst_cflags}" = "\"'" ; then
7460 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7461 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7471 case "$cf_add_cflags" in
7473 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7475 CPPFLAGS=`echo "$CPPFLAGS" | \
7476 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7477 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7482 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7483 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7490 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7491 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7498 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7499 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7501 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7503 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7504 && test -z "${cf_tst_cflags}" \
7505 && cf_fix_cppflags=no
7510 if test -n "$cf_new_cflags" ; then
7512 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7513 CFLAGS="${CFLAGS}$cf_new_cflags"
7517 if test -n "$cf_new_cppflags" ; then
7519 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7520 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7524 if test -n "$cf_new_extra_cppflags" ; then
7526 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7527 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7536 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7538 for cf_add_1lib in $cf_add_0lib; do
7539 for cf_add_2lib in $cf_add_libs; do
7540 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7545 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7549 cat >"conftest.$ac_ext" <<_ACEOF
7550 #line 7550 "configure"
7551 #include "confdefs.h"
7552 #include <${cf_cv_ncurses_header:-curses.h}>
7556 initscr(); mousemask(0,0); tigetstr((char *)0);
7561 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7562 if { (eval echo "$as_me:7562: \"$ac_link\"") >&5
7563 (eval $ac_link) 2>&5
7565 echo "$as_me:7565: \$? = $ac_status" >&5
7566 (exit "$ac_status"); } &&
7567 { ac_try='test -s "conftest$ac_exeext"'
7568 { (eval echo "$as_me:7568: \"$ac_try\"") >&5
7571 echo "$as_me:7571: \$? = $ac_status" >&5
7572 (exit "$ac_status"); }; }; then
7573 if test "$cross_compiling" = yes; then
7574 cf_have_ncuconfig=maybe
7576 cat >"conftest.$ac_ext" <<_ACEOF
7577 #line 7577 "configure"
7578 #include "confdefs.h"
7579 #include <${cf_cv_ncurses_header:-curses.h}>
7581 { const char *xx = curses_version(); return (xx == 0); }
7583 rm -f "conftest$ac_exeext"
7584 if { (eval echo "$as_me:7584: \"$ac_link\"") >&5
7585 (eval $ac_link) 2>&5
7587 echo "$as_me:7587: \$? = $ac_status" >&5
7588 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7589 { (eval echo "$as_me:7589: \"$ac_try\"") >&5
7592 echo "$as_me:7592: \$? = $ac_status" >&5
7593 (exit "$ac_status"); }; }; then
7594 cf_have_ncuconfig=yes
7596 echo "$as_me: program exited with status $ac_status" >&5
7597 echo "$as_me: failed program was:" >&5
7598 cat "conftest.$ac_ext" >&5
7599 cf_have_ncuconfig=no
7601 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7604 echo "$as_me: failed program was:" >&5
7605 cat "conftest.$ac_ext" >&5
7606 cf_have_ncuconfig=no
7608 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7609 echo "$as_me:7609: result: $cf_have_ncuconfig" >&5
7610 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7611 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7612 if test "$cf_have_ncuconfig" != "yes"
7614 CPPFLAGS="$cf_save_CPPFLAGS"
7615 LIBS="$cf_save_LIBS"
7616 NCURSES_CONFIG_PKG=none
7619 cat >>confdefs.h <<\EOF
7623 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7625 echo "$as_me:7625: checking for terminfo header" >&5
7626 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7627 if test "${cf_cv_term_header+set}" = set; then
7628 echo $ECHO_N "(cached) $ECHO_C" >&6
7631 case "${cf_cv_ncurses_header}" in
7632 (*/ncurses.h|*/ncursesw.h)
7633 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7636 cf_term_header=term.h
7640 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7642 cat >"conftest.$ac_ext" <<_ACEOF
7643 #line 7643 "configure"
7644 #include "confdefs.h"
7646 #include <${cf_cv_ncurses_header:-curses.h}>
7652 int x = auto_left_margin; (void)x
7657 rm -f "conftest.$ac_objext"
7658 if { (eval echo "$as_me:7658: \"$ac_compile\"") >&5
7659 (eval $ac_compile) 2>&5
7661 echo "$as_me:7661: \$? = $ac_status" >&5
7662 (exit "$ac_status"); } &&
7663 { ac_try='test -s "conftest.$ac_objext"'
7664 { (eval echo "$as_me:7664: \"$ac_try\"") >&5
7667 echo "$as_me:7667: \$? = $ac_status" >&5
7668 (exit "$ac_status"); }; }; then
7670 cf_cv_term_header="$cf_test"
7672 echo "$as_me: failed program was:" >&5
7673 cat "conftest.$ac_ext" >&5
7675 cf_cv_term_header=unknown
7678 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7679 test "$cf_cv_term_header" != unknown && break
7683 echo "$as_me:7683: result: $cf_cv_term_header" >&5
7684 echo "${ECHO_T}$cf_cv_term_header" >&6
7686 # Set definitions to allow ifdef'ing to accommodate subdirectories
7688 case "$cf_cv_term_header" in
7691 cat >>confdefs.h <<\EOF
7692 #define HAVE_TERM_H 1
7698 case "$cf_cv_term_header" in
7701 cat >>confdefs.h <<\EOF
7702 #define HAVE_NCURSES_TERM_H 1
7708 cat >>confdefs.h <<\EOF
7709 #define HAVE_NCURSESW_TERM_H 1
7718 echo "$as_me:7718: result: no" >&5
7719 echo "${ECHO_T}no" >&6
7720 NCURSES_CONFIG_PKG=none
7723 NCURSES_CONFIG_PKG=none
7726 if test "x$cf_have_ncuconfig" = "xno"; then
7727 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7729 if test -n "$ac_tool_prefix"; then
7730 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7732 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7733 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7734 echo "$as_me:7734: checking for $ac_word" >&5
7735 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7736 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7737 echo $ECHO_N "(cached) $ECHO_C" >&6
7739 if test -n "$NCURSES_CONFIG"; then
7740 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7742 ac_save_IFS=$IFS; IFS=$ac_path_separator
7744 for ac_dir in $ac_dummy; do
7746 test -z "$ac_dir" && ac_dir=.
7747 $as_executable_p "$ac_dir/$ac_word" || continue
7748 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7749 echo "$as_me:7749: found $ac_dir/$ac_word" >&5
7755 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7756 if test -n "$NCURSES_CONFIG"; then
7757 echo "$as_me:7757: result: $NCURSES_CONFIG" >&5
7758 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7760 echo "$as_me:7760: result: no" >&5
7761 echo "${ECHO_T}no" >&6
7764 test -n "$NCURSES_CONFIG" && break
7767 if test -z "$NCURSES_CONFIG"; then
7768 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7769 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7771 # Extract the first word of "$ac_prog", so it can be a program name with args.
7772 set dummy $ac_prog; ac_word=$2
7773 echo "$as_me:7773: checking for $ac_word" >&5
7774 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7775 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7776 echo $ECHO_N "(cached) $ECHO_C" >&6
7778 if test -n "$ac_ct_NCURSES_CONFIG"; then
7779 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7781 ac_save_IFS=$IFS; IFS=$ac_path_separator
7783 for ac_dir in $ac_dummy; do
7785 test -z "$ac_dir" && ac_dir=.
7786 $as_executable_p "$ac_dir/$ac_word" || continue
7787 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7788 echo "$as_me:7788: found $ac_dir/$ac_word" >&5
7794 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7795 if test -n "$ac_ct_NCURSES_CONFIG"; then
7796 echo "$as_me:7796: result: $ac_ct_NCURSES_CONFIG" >&5
7797 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7799 echo "$as_me:7799: result: no" >&5
7800 echo "${ECHO_T}no" >&6
7803 test -n "$ac_ct_NCURSES_CONFIG" && break
7805 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7807 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7810 if test "$NCURSES_CONFIG" != none ; then
7812 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7814 case "x$cf_add_cflags" in
7817 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7820 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
7821 test "$CFLAGS" != "$cf_old_cflag" || break
7823 CFLAGS="$cf_old_cflag"
7826 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7829 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
7830 test "$CPPFLAGS" != "$cf_old_cflag" || break
7832 CPPFLAGS="$cf_old_cflag"
7841 cf_new_extra_cppflags=
7843 for cf_add_cflags in $cf_add_cflags
7845 case "$cf_fix_cppflags" in
7847 case "$cf_add_cflags" in
7848 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7849 case "$cf_add_cflags" in
7851 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7853 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7854 && test -z "${cf_tst_cflags}" \
7855 && cf_fix_cppflags=yes
7857 if test "$cf_fix_cppflags" = yes ; then
7859 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7860 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7863 elif test "${cf_tst_cflags}" = "\"'" ; then
7865 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7866 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7876 case "$cf_add_cflags" in
7878 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7880 CPPFLAGS=`echo "$CPPFLAGS" | \
7881 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7882 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7887 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7888 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7895 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7896 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7903 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7904 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7906 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7908 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7909 && test -z "${cf_tst_cflags}" \
7910 && cf_fix_cppflags=no
7915 if test -n "$cf_new_cflags" ; then
7917 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7918 CFLAGS="${CFLAGS}$cf_new_cflags"
7922 if test -n "$cf_new_cppflags" ; then
7924 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7925 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7929 if test -n "$cf_new_extra_cppflags" ; then
7931 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7932 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7941 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7943 for cf_add_1lib in $cf_add_0lib; do
7944 for cf_add_2lib in $cf_add_libs; do
7945 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7950 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7954 # even with config script, some packages use no-override for curses.h
7956 echo "$as_me:7956: checking if we have identified curses headers" >&5
7957 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7958 if test "${cf_cv_ncurses_header+set}" = set; then
7959 echo $ECHO_N "(cached) $ECHO_C" >&6
7962 cf_cv_ncurses_header=none
7964 ncurses.h ncursesw/ncurses.h \
7965 curses.h ncursesw/curses.h
7967 cat >"conftest.$ac_ext" <<_ACEOF
7968 #line 7968 "configure"
7969 #include "confdefs.h"
7970 #include <${cf_header}>
7974 initscr(); tgoto("?", 0,0)
7979 rm -f "conftest.$ac_objext"
7980 if { (eval echo "$as_me:7980: \"$ac_compile\"") >&5
7981 (eval $ac_compile) 2>&5
7983 echo "$as_me:7983: \$? = $ac_status" >&5
7984 (exit "$ac_status"); } &&
7985 { ac_try='test -s "conftest.$ac_objext"'
7986 { (eval echo "$as_me:7986: \"$ac_try\"") >&5
7989 echo "$as_me:7989: \$? = $ac_status" >&5
7990 (exit "$ac_status"); }; }; then
7991 cf_cv_ncurses_header=$cf_header; break
7993 echo "$as_me: failed program was:" >&5
7994 cat "conftest.$ac_ext" >&5
7996 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8000 echo "$as_me:8000: result: $cf_cv_ncurses_header" >&5
8001 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8003 if test "$cf_cv_ncurses_header" = none ; then
8004 { { echo "$as_me:8004: error: No curses header-files found" >&5
8005 echo "$as_me: error: No curses header-files found" >&2;}
8006 { (exit 1); exit 1; }; }
8009 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8011 for ac_header in $cf_cv_ncurses_header
8013 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8014 echo "$as_me:8014: checking for $ac_header" >&5
8015 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8016 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8017 echo $ECHO_N "(cached) $ECHO_C" >&6
8019 cat >"conftest.$ac_ext" <<_ACEOF
8020 #line 8020 "configure"
8021 #include "confdefs.h"
8022 #include <$ac_header>
8024 if { (eval echo "$as_me:8024: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8025 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8027 $EGREP -v '^ *\+' conftest.er1 >conftest.err
8029 cat conftest.err >&5
8030 echo "$as_me:8030: \$? = $ac_status" >&5
8031 (exit "$ac_status"); } >/dev/null; then
8032 if test -s conftest.err; then
8033 ac_cpp_err=$ac_c_preproc_warn_flag
8040 if test -z "$ac_cpp_err"; then
8041 eval "$as_ac_Header=yes"
8043 echo "$as_me: failed program was:" >&5
8044 cat "conftest.$ac_ext" >&5
8045 eval "$as_ac_Header=no"
8047 rm -f conftest.err "conftest.$ac_ext"
8049 echo "$as_me:8049: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8050 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8051 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8052 cat >>confdefs.h <<EOF
8053 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8059 cat >>confdefs.h <<\EOF
8063 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8065 cat >>confdefs.h <<EOF
8066 #define $cf_nculib_ROOT 1
8069 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
8073 cf_ncuhdr_root=ncursesw
8075 test -n "$cf_cv_curses_dir" && \
8076 test "$cf_cv_curses_dir" != "no" && { \
8078 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8079 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8081 while test "$cf_add_incdir" != /usr/include
8083 if test -d "$cf_add_incdir"
8086 if test -n "$CFLAGS$CPPFLAGS" ; then
8087 # a loop is needed to ensure we can add subdirs of existing dirs
8088 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8089 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8090 cf_have_incdir=yes; break
8095 if test "$cf_have_incdir" = no ; then
8096 if test "$cf_add_incdir" = /usr/local/include ; then
8097 if test "$GCC" = yes
8099 cf_save_CPPFLAGS=$CPPFLAGS
8101 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8102 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8104 cat >"conftest.$ac_ext" <<_ACEOF
8105 #line 8105 "configure"
8106 #include "confdefs.h"
8116 rm -f "conftest.$ac_objext"
8117 if { (eval echo "$as_me:8117: \"$ac_compile\"") >&5
8118 (eval $ac_compile) 2>&5
8120 echo "$as_me:8120: \$? = $ac_status" >&5
8121 (exit "$ac_status"); } &&
8122 { ac_try='test -s "conftest.$ac_objext"'
8123 { (eval echo "$as_me:8123: \"$ac_try\"") >&5
8126 echo "$as_me:8126: \$? = $ac_status" >&5
8127 (exit "$ac_status"); }; }; then
8130 echo "$as_me: failed program was:" >&5
8131 cat "conftest.$ac_ext" >&5
8134 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8135 CPPFLAGS=$cf_save_CPPFLAGS
8140 if test "$cf_have_incdir" = no ; then
8141 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8143 echo "${as_me:-configure}:8143: testing adding $cf_add_incdir to include-path ..." 1>&5
8145 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8147 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8148 test "$cf_top_incdir" = "$cf_add_incdir" && break
8149 cf_add_incdir="$cf_top_incdir"
8162 echo "$as_me:8162: checking for $cf_ncuhdr_root header in include-path" >&5
8163 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8164 if test "${cf_cv_ncurses_h+set}" = set; then
8165 echo $ECHO_N "(cached) $ECHO_C" >&6
8168 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8169 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
8170 for cf_header in $cf_header_list
8173 cat >"conftest.$ac_ext" <<_ACEOF
8174 #line 8174 "configure"
8175 #include "confdefs.h"
8177 #define _XOPEN_SOURCE_EXTENDED
8178 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
8179 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
8181 #include <$cf_header>
8186 #ifdef NCURSES_VERSION
8192 printf("%s\\n", NCURSES_VERSION);
8205 rm -f "conftest.$ac_objext"
8206 if { (eval echo "$as_me:8206: \"$ac_compile\"") >&5
8207 (eval $ac_compile) 2>&5
8209 echo "$as_me:8209: \$? = $ac_status" >&5
8210 (exit "$ac_status"); } &&
8211 { ac_try='test -s "conftest.$ac_objext"'
8212 { (eval echo "$as_me:8212: \"$ac_try\"") >&5
8215 echo "$as_me:8215: \$? = $ac_status" >&5
8216 (exit "$ac_status"); }; }; then
8217 cf_cv_ncurses_h=$cf_header
8220 echo "$as_me: failed program was:" >&5
8221 cat "conftest.$ac_ext" >&5
8224 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8226 test "$cf_cv_ncurses_h" != no && break
8230 echo "$as_me:8230: result: $cf_cv_ncurses_h" >&5
8231 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8233 if test "$cf_cv_ncurses_h" != no ; then
8234 cf_cv_ncurses_header=$cf_cv_ncurses_h
8237 echo "$as_me:8237: checking for $cf_ncuhdr_root include-path" >&5
8238 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8239 if test "${cf_cv_ncurses_h2+set}" = set; then
8240 echo $ECHO_N "(cached) $ECHO_C" >&6
8243 test -n "$verbose" && echo
8247 # collect the current set of include-directories from compiler flags
8248 cf_header_path_list=""
8249 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8250 for cf_header_path in $CPPFLAGS $CFLAGS
8252 case "$cf_header_path" in
8254 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8256 test "x$cf_header_path" != "xNONE" && \
8257 test -d "$cf_header_path" && \
8259 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8260 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8261 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8262 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8263 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8264 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"
8267 cf_header_path_list="$cf_header_path_list $cf_search"
8273 # add the variations for the package we are looking for
8277 test "x$prefix" != "xNONE" && \
8278 test -d "$prefix" && \
8280 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8281 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8282 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8283 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8284 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8285 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8288 for cf_subdir_prefix in \
8297 test "x$cf_subdir_prefix" != "x$prefix" && \
8298 test -d "$cf_subdir_prefix" && \
8299 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8300 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8301 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8302 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8303 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8304 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8305 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"
8310 test "$includedir" != NONE && \
8311 test "$includedir" != "/usr/include" && \
8312 test -d "$includedir" && {
8313 test -d "$includedir" && cf_search="$cf_search $includedir"
8314 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8317 test "$oldincludedir" != NONE && \
8318 test "$oldincludedir" != "/usr/include" && \
8319 test -d "$oldincludedir" && {
8320 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8321 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8324 cf_search="$cf_search $cf_header_path_list"
8326 test -n "$verbose" && echo "search path $cf_search"
8327 cf_save2_CPPFLAGS="$CPPFLAGS"
8328 for cf_incdir in $cf_search
8331 if test -n "$cf_incdir" ; then
8332 for cf_add_incdir in $cf_incdir
8334 while test "$cf_add_incdir" != /usr/include
8336 if test -d "$cf_add_incdir"
8339 if test -n "$CFLAGS$CPPFLAGS" ; then
8340 # a loop is needed to ensure we can add subdirs of existing dirs
8341 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8342 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8343 cf_have_incdir=yes; break
8348 if test "$cf_have_incdir" = no ; then
8349 if test "$cf_add_incdir" = /usr/local/include ; then
8350 if test "$GCC" = yes
8352 cf_save_CPPFLAGS=$CPPFLAGS
8354 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8355 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8357 cat >"conftest.$ac_ext" <<_ACEOF
8358 #line 8358 "configure"
8359 #include "confdefs.h"
8369 rm -f "conftest.$ac_objext"
8370 if { (eval echo "$as_me:8370: \"$ac_compile\"") >&5
8371 (eval $ac_compile) 2>&5
8373 echo "$as_me:8373: \$? = $ac_status" >&5
8374 (exit "$ac_status"); } &&
8375 { ac_try='test -s "conftest.$ac_objext"'
8376 { (eval echo "$as_me:8376: \"$ac_try\"") >&5
8379 echo "$as_me:8379: \$? = $ac_status" >&5
8380 (exit "$ac_status"); }; }; then
8383 echo "$as_me: failed program was:" >&5
8384 cat "conftest.$ac_ext" >&5
8387 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8388 CPPFLAGS=$cf_save_CPPFLAGS
8393 if test "$cf_have_incdir" = no ; then
8394 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8396 echo "${as_me:-configure}:8396: testing adding $cf_add_incdir to include-path ..." 1>&5
8398 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8400 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8401 test "$cf_top_incdir" = "$cf_add_incdir" && break
8402 cf_add_incdir="$cf_top_incdir"
8418 cat >"conftest.$ac_ext" <<_ACEOF
8419 #line 8419 "configure"
8420 #include "confdefs.h"
8422 #include <$cf_header>
8427 #ifdef NCURSES_VERSION
8429 printf("%s\\n", NCURSES_VERSION);
8442 rm -f "conftest.$ac_objext"
8443 if { (eval echo "$as_me:8443: \"$ac_compile\"") >&5
8444 (eval $ac_compile) 2>&5
8446 echo "$as_me:8446: \$? = $ac_status" >&5
8447 (exit "$ac_status"); } &&
8448 { ac_try='test -s "conftest.$ac_objext"'
8449 { (eval echo "$as_me:8449: \"$ac_try\"") >&5
8452 echo "$as_me:8452: \$? = $ac_status" >&5
8453 (exit "$ac_status"); }; }; then
8454 cf_cv_ncurses_h2=$cf_header
8457 echo "$as_me: failed program was:" >&5
8458 cat "conftest.$ac_ext" >&5
8461 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8463 if test "$cf_cv_ncurses_h2" != no ; then
8464 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8465 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
8468 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8470 CPPFLAGS="$cf_save2_CPPFLAGS"
8471 test "$cf_cv_ncurses_h2" != no && break
8473 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8473: error: not found" >&5
8474 echo "$as_me: error: not found" >&2;}
8475 { (exit 1); exit 1; }; }
8478 echo "$as_me:8478: result: $cf_cv_ncurses_h2" >&5
8479 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8481 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
8482 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
8483 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
8484 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
8487 if test -n "$cf_1st_incdir" ; then
8488 for cf_add_incdir in $cf_1st_incdir
8490 while test "$cf_add_incdir" != /usr/include
8492 if test -d "$cf_add_incdir"
8495 if test -n "$CFLAGS$CPPFLAGS" ; then
8496 # a loop is needed to ensure we can add subdirs of existing dirs
8497 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8498 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8499 cf_have_incdir=yes; break
8504 if test "$cf_have_incdir" = no ; then
8505 if test "$cf_add_incdir" = /usr/local/include ; then
8506 if test "$GCC" = yes
8508 cf_save_CPPFLAGS=$CPPFLAGS
8510 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8511 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8513 cat >"conftest.$ac_ext" <<_ACEOF
8514 #line 8514 "configure"
8515 #include "confdefs.h"
8525 rm -f "conftest.$ac_objext"
8526 if { (eval echo "$as_me:8526: \"$ac_compile\"") >&5
8527 (eval $ac_compile) 2>&5
8529 echo "$as_me:8529: \$? = $ac_status" >&5
8530 (exit "$ac_status"); } &&
8531 { ac_try='test -s "conftest.$ac_objext"'
8532 { (eval echo "$as_me:8532: \"$ac_try\"") >&5
8535 echo "$as_me:8535: \$? = $ac_status" >&5
8536 (exit "$ac_status"); }; }; then
8539 echo "$as_me: failed program was:" >&5
8540 cat "conftest.$ac_ext" >&5
8543 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8544 CPPFLAGS=$cf_save_CPPFLAGS
8549 if test "$cf_have_incdir" = no ; then
8550 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8552 echo "${as_me:-configure}:8552: testing adding $cf_add_incdir to include-path ..." 1>&5
8554 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8556 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8557 test "$cf_top_incdir" = "$cf_add_incdir" && break
8558 cf_add_incdir="$cf_top_incdir"
8571 # Set definitions to allow ifdef'ing for ncurses.h
8573 case "$cf_cv_ncurses_header" in
8576 cat >>confdefs.h <<\EOF
8577 #define HAVE_NCURSES_H 1
8583 case "$cf_cv_ncurses_header" in
8584 (ncurses/curses.h|ncurses/ncurses.h)
8586 cat >>confdefs.h <<\EOF
8587 #define HAVE_NCURSES_NCURSES_H 1
8591 (ncursesw/curses.h|ncursesw/ncurses.h)
8593 cat >>confdefs.h <<\EOF
8594 #define HAVE_NCURSESW_NCURSES_H 1
8600 echo "$as_me:8600: checking for terminfo header" >&5
8601 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8602 if test "${cf_cv_term_header+set}" = set; then
8603 echo $ECHO_N "(cached) $ECHO_C" >&6
8606 case "${cf_cv_ncurses_header}" in
8607 (*/ncurses.h|*/ncursesw.h)
8608 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8611 cf_term_header=term.h
8615 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8617 cat >"conftest.$ac_ext" <<_ACEOF
8618 #line 8618 "configure"
8619 #include "confdefs.h"
8621 #include <${cf_cv_ncurses_header:-curses.h}>
8627 int x = auto_left_margin; (void)x
8632 rm -f "conftest.$ac_objext"
8633 if { (eval echo "$as_me:8633: \"$ac_compile\"") >&5
8634 (eval $ac_compile) 2>&5
8636 echo "$as_me:8636: \$? = $ac_status" >&5
8637 (exit "$ac_status"); } &&
8638 { ac_try='test -s "conftest.$ac_objext"'
8639 { (eval echo "$as_me:8639: \"$ac_try\"") >&5
8642 echo "$as_me:8642: \$? = $ac_status" >&5
8643 (exit "$ac_status"); }; }; then
8645 cf_cv_term_header="$cf_test"
8647 echo "$as_me: failed program was:" >&5
8648 cat "conftest.$ac_ext" >&5
8650 cf_cv_term_header=unknown
8653 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8654 test "$cf_cv_term_header" != unknown && break
8658 echo "$as_me:8658: result: $cf_cv_term_header" >&5
8659 echo "${ECHO_T}$cf_cv_term_header" >&6
8661 # Set definitions to allow ifdef'ing to accommodate subdirectories
8663 case "$cf_cv_term_header" in
8666 cat >>confdefs.h <<\EOF
8667 #define HAVE_TERM_H 1
8673 case "$cf_cv_term_header" in
8676 cat >>confdefs.h <<\EOF
8677 #define HAVE_NCURSES_TERM_H 1
8683 cat >>confdefs.h <<\EOF
8684 #define HAVE_NCURSESW_TERM_H 1
8690 # some applications need this, but should check for NCURSES_VERSION
8692 cat >>confdefs.h <<\EOF
8696 echo "$as_me:8696: checking for ncurses version" >&5
8697 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8698 if test "${cf_cv_ncurses_version+set}" = set; then
8699 echo $ECHO_N "(cached) $ECHO_C" >&6
8702 cf_cv_ncurses_version=no
8704 rm -f "$cf_tempfile"
8705 if test "$cross_compiling" = yes; then
8707 # This will not work if the preprocessor splits the line after the
8708 # Autoconf token. The 'unproto' program does that.
8709 cat > "conftest.$ac_ext" <<EOF
8710 #include <${cf_cv_ncurses_header:-curses.h}>
8712 #ifdef NCURSES_VERSION
8713 Autoconf NCURSES_VERSION
8721 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8722 { (eval echo "$as_me:8722: \"$cf_try\"") >&5
8725 echo "$as_me:8725: \$? = $ac_status" >&5
8726 (exit "$ac_status"); }
8727 if test -f conftest.out ; then
8728 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
8729 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8734 cat >"conftest.$ac_ext" <<_ACEOF
8735 #line 8735 "configure"
8736 #include "confdefs.h"
8738 #include <${cf_cv_ncurses_header:-curses.h}>
8742 FILE *fp = fopen("$cf_tempfile", "w");
8743 #ifdef NCURSES_VERSION
8744 # ifdef NCURSES_VERSION_PATCH
8745 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8747 fprintf(fp, "%s\\n", NCURSES_VERSION);
8751 fprintf(fp, "old\\n");
8756 ${cf_cv_main_return:-return}(0);
8759 rm -f "conftest$ac_exeext"
8760 if { (eval echo "$as_me:8760: \"$ac_link\"") >&5
8761 (eval $ac_link) 2>&5
8763 echo "$as_me:8763: \$? = $ac_status" >&5
8764 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8765 { (eval echo "$as_me:8765: \"$ac_try\"") >&5
8768 echo "$as_me:8768: \$? = $ac_status" >&5
8769 (exit "$ac_status"); }; }; then
8771 cf_cv_ncurses_version=`cat $cf_tempfile`
8773 echo "$as_me: program exited with status $ac_status" >&5
8774 echo "$as_me: failed program was:" >&5
8775 cat "conftest.$ac_ext" >&5
8777 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8779 rm -f "$cf_tempfile"
8782 echo "$as_me:8782: result: $cf_cv_ncurses_version" >&5
8783 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8784 test "$cf_cv_ncurses_version" = no ||
8785 cat >>confdefs.h <<\EOF
8789 cf_nculib_root=ncursesw
8790 # This works, except for the special case where we find gpm, but
8791 # ncurses is in a nonstandard location via $LIBS, and we really want
8794 cf_ncurses_SAVE="$LIBS"
8795 echo "$as_me:8795: checking for Gpm_Open in -lgpm" >&5
8796 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8797 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8798 echo $ECHO_N "(cached) $ECHO_C" >&6
8800 ac_check_lib_save_LIBS=$LIBS
8802 cat >"conftest.$ac_ext" <<_ACEOF
8803 #line 8803 "configure"
8804 #include "confdefs.h"
8806 /* Override any gcc2 internal prototype to avoid an error. */
8810 /* We use char because int might match the return type of a gcc2
8811 builtin and then its argument prototype would still apply. */
8821 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8822 if { (eval echo "$as_me:8822: \"$ac_link\"") >&5
8823 (eval $ac_link) 2>&5
8825 echo "$as_me:8825: \$? = $ac_status" >&5
8826 (exit "$ac_status"); } &&
8827 { ac_try='test -s "conftest$ac_exeext"'
8828 { (eval echo "$as_me:8828: \"$ac_try\"") >&5
8831 echo "$as_me:8831: \$? = $ac_status" >&5
8832 (exit "$ac_status"); }; }; then
8833 ac_cv_lib_gpm_Gpm_Open=yes
8835 echo "$as_me: failed program was:" >&5
8836 cat "conftest.$ac_ext" >&5
8837 ac_cv_lib_gpm_Gpm_Open=no
8839 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8840 LIBS=$ac_check_lib_save_LIBS
8842 echo "$as_me:8842: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8843 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8844 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
8845 echo "$as_me:8845: checking for initscr in -lgpm" >&5
8846 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8847 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8848 echo $ECHO_N "(cached) $ECHO_C" >&6
8850 ac_check_lib_save_LIBS=$LIBS
8852 cat >"conftest.$ac_ext" <<_ACEOF
8853 #line 8853 "configure"
8854 #include "confdefs.h"
8856 /* Override any gcc2 internal prototype to avoid an error. */
8860 /* We use char because int might match the return type of a gcc2
8861 builtin and then its argument prototype would still apply. */
8871 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8872 if { (eval echo "$as_me:8872: \"$ac_link\"") >&5
8873 (eval $ac_link) 2>&5
8875 echo "$as_me:8875: \$? = $ac_status" >&5
8876 (exit "$ac_status"); } &&
8877 { ac_try='test -s "conftest$ac_exeext"'
8878 { (eval echo "$as_me:8878: \"$ac_try\"") >&5
8881 echo "$as_me:8881: \$? = $ac_status" >&5
8882 (exit "$ac_status"); }; }; then
8883 ac_cv_lib_gpm_initscr=yes
8885 echo "$as_me: failed program was:" >&5
8886 cat "conftest.$ac_ext" >&5
8887 ac_cv_lib_gpm_initscr=no
8889 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8890 LIBS=$ac_check_lib_save_LIBS
8892 echo "$as_me:8892: result: $ac_cv_lib_gpm_initscr" >&5
8893 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8894 if test "$ac_cv_lib_gpm_initscr" = yes; then
8895 LIBS="$cf_ncurses_SAVE"
8897 cf_ncurses_LIBS="-lgpm"
8904 # This is only necessary if you are linking against an obsolete
8905 # version of ncurses (but it should do no harm, since it is static).
8906 if test "$cf_nculib_root" = ncurses ; then
8907 echo "$as_me:8907: checking for tgoto in -lmytinfo" >&5
8908 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8909 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8910 echo $ECHO_N "(cached) $ECHO_C" >&6
8912 ac_check_lib_save_LIBS=$LIBS
8913 LIBS="-lmytinfo $LIBS"
8914 cat >"conftest.$ac_ext" <<_ACEOF
8915 #line 8915 "configure"
8916 #include "confdefs.h"
8918 /* Override any gcc2 internal prototype to avoid an error. */
8922 /* We use char because int might match the return type of a gcc2
8923 builtin and then its argument prototype would still apply. */
8933 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8934 if { (eval echo "$as_me:8934: \"$ac_link\"") >&5
8935 (eval $ac_link) 2>&5
8937 echo "$as_me:8937: \$? = $ac_status" >&5
8938 (exit "$ac_status"); } &&
8939 { ac_try='test -s "conftest$ac_exeext"'
8940 { (eval echo "$as_me:8940: \"$ac_try\"") >&5
8943 echo "$as_me:8943: \$? = $ac_status" >&5
8944 (exit "$ac_status"); }; }; then
8945 ac_cv_lib_mytinfo_tgoto=yes
8947 echo "$as_me: failed program was:" >&5
8948 cat "conftest.$ac_ext" >&5
8949 ac_cv_lib_mytinfo_tgoto=no
8951 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8952 LIBS=$ac_check_lib_save_LIBS
8954 echo "$as_me:8954: result: $ac_cv_lib_mytinfo_tgoto" >&5
8955 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8956 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
8957 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8967 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8969 for cf_add_1lib in $cf_add_0lib; do
8970 for cf_add_2lib in $cf_add_libs; do
8971 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8976 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8980 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
8986 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8988 for cf_add_1lib in $cf_add_0lib; do
8989 for cf_add_2lib in $cf_add_libs; do
8990 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8995 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9001 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
9003 echo "$as_me:9003: checking for initscr" >&5
9004 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9005 if test "${ac_cv_func_initscr+set}" = set; then
9006 echo $ECHO_N "(cached) $ECHO_C" >&6
9008 cat >"conftest.$ac_ext" <<_ACEOF
9009 #line 9009 "configure"
9010 #include "confdefs.h"
9011 #define initscr autoconf_temporary
9012 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9019 /* We use char because int might match the return type of a gcc2
9020 builtin and then its argument prototype would still apply. */
9021 char initscr (void);
9027 /* The GNU C library defines stubs for functions which it implements
9028 to always fail with ENOSYS. Some functions are actually named
9029 something starting with __ and the normal name is an alias. */
9030 #if defined (__stub_initscr) || defined (__stub___initscr)
9031 #error found stub for initscr
9039 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9040 if { (eval echo "$as_me:9040: \"$ac_link\"") >&5
9041 (eval $ac_link) 2>&5
9043 echo "$as_me:9043: \$? = $ac_status" >&5
9044 (exit "$ac_status"); } &&
9045 { ac_try='test -s "conftest$ac_exeext"'
9046 { (eval echo "$as_me:9046: \"$ac_try\"") >&5
9049 echo "$as_me:9049: \$? = $ac_status" >&5
9050 (exit "$ac_status"); }; }; then
9051 ac_cv_func_initscr=yes
9053 echo "$as_me: failed program was:" >&5
9054 cat "conftest.$ac_ext" >&5
9055 ac_cv_func_initscr=no
9057 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9059 echo "$as_me:9059: result: $ac_cv_func_initscr" >&5
9060 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9061 if test "$ac_cv_func_initscr" = yes; then
9062 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9065 cf_save_LIBS="$LIBS"
9066 echo "$as_me:9066: checking for initscr in -l$cf_nculib_root" >&5
9067 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9068 LIBS="-l$cf_nculib_root $LIBS"
9069 cat >"conftest.$ac_ext" <<_ACEOF
9070 #line 9070 "configure"
9071 #include "confdefs.h"
9072 #include <${cf_cv_ncurses_header:-curses.h}>
9081 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9082 if { (eval echo "$as_me:9082: \"$ac_link\"") >&5
9083 (eval $ac_link) 2>&5
9085 echo "$as_me:9085: \$? = $ac_status" >&5
9086 (exit "$ac_status"); } &&
9087 { ac_try='test -s "conftest$ac_exeext"'
9088 { (eval echo "$as_me:9088: \"$ac_try\"") >&5
9091 echo "$as_me:9091: \$? = $ac_status" >&5
9092 (exit "$ac_status"); }; }; then
9093 echo "$as_me:9093: result: yes" >&5
9094 echo "${ECHO_T}yes" >&6
9095 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9098 echo "$as_me: failed program was:" >&5
9099 cat "conftest.$ac_ext" >&5
9100 echo "$as_me:9100: result: no" >&5
9101 echo "${ECHO_T}no" >&6
9104 cf_library_path_list=""
9105 if test -n "${LDFLAGS}${LIBS}" ; then
9106 for cf_library_path in $LDFLAGS $LIBS
9108 case "$cf_library_path" in
9110 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9112 test "x$cf_library_path" != "xNONE" && \
9113 test -d "$cf_library_path" && \
9115 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9116 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
9117 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9118 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9119 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9120 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"
9123 cf_library_path_list="$cf_library_path_list $cf_search"
9131 test "x$prefix" != "xNONE" && \
9132 test -d "$prefix" && \
9134 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9135 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
9136 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9137 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9138 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9139 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9142 for cf_subdir_prefix in \
9151 test "x$cf_subdir_prefix" != "x$prefix" && \
9152 test -d "$cf_subdir_prefix" && \
9153 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9154 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9155 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
9156 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9157 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9158 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9159 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"
9164 cf_search="$cf_library_path_list $cf_search"
9166 for cf_libdir in $cf_search
9168 echo "$as_me:9168: checking for -l$cf_nculib_root in $cf_libdir" >&5
9169 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9170 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9171 cat >"conftest.$ac_ext" <<_ACEOF
9172 #line 9172 "configure"
9173 #include "confdefs.h"
9174 #include <${cf_cv_ncurses_header:-curses.h}>
9183 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9184 if { (eval echo "$as_me:9184: \"$ac_link\"") >&5
9185 (eval $ac_link) 2>&5
9187 echo "$as_me:9187: \$? = $ac_status" >&5
9188 (exit "$ac_status"); } &&
9189 { ac_try='test -s "conftest$ac_exeext"'
9190 { (eval echo "$as_me:9190: \"$ac_try\"") >&5
9193 echo "$as_me:9193: \$? = $ac_status" >&5
9194 (exit "$ac_status"); }; }; then
9195 echo "$as_me:9195: result: yes" >&5
9196 echo "${ECHO_T}yes" >&6
9197 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9200 echo "$as_me: failed program was:" >&5
9201 cat "conftest.$ac_ext" >&5
9202 echo "$as_me:9202: result: no" >&5
9203 echo "${ECHO_T}no" >&6
9204 LIBS="$cf_save_LIBS"
9206 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9210 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9214 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
9216 if test "$cf_found_library" = no ; then
9217 { { echo "$as_me:9217: error: Cannot link $cf_nculib_root library" >&5
9218 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9219 { (exit 1); exit 1; }; }
9224 if test -n "$cf_ncurses_LIBS" ; then
9225 echo "$as_me:9225: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9226 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9227 cf_ncurses_SAVE="$LIBS"
9228 for p in $cf_ncurses_LIBS ; do
9229 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
9230 if test "$q" != "$LIBS" ; then
9234 cat >"conftest.$ac_ext" <<_ACEOF
9235 #line 9235 "configure"
9236 #include "confdefs.h"
9237 #include <${cf_cv_ncurses_header:-curses.h}>
9241 initscr(); mousemask(0,0); tigetstr((char *)0);
9246 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9247 if { (eval echo "$as_me:9247: \"$ac_link\"") >&5
9248 (eval $ac_link) 2>&5
9250 echo "$as_me:9250: \$? = $ac_status" >&5
9251 (exit "$ac_status"); } &&
9252 { ac_try='test -s "conftest$ac_exeext"'
9253 { (eval echo "$as_me:9253: \"$ac_try\"") >&5
9256 echo "$as_me:9256: \$? = $ac_status" >&5
9257 (exit "$ac_status"); }; }; then
9258 echo "$as_me:9258: result: yes" >&5
9259 echo "${ECHO_T}yes" >&6
9261 echo "$as_me: failed program was:" >&5
9262 cat "conftest.$ac_ext" >&5
9263 echo "$as_me:9263: result: no" >&5
9264 echo "${ECHO_T}no" >&6
9265 LIBS="$cf_ncurses_SAVE"
9267 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9270 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9272 cat >>confdefs.h <<EOF
9273 #define $cf_nculib_ROOT 1
9283 cf_ncuconfig_root=ncurses
9284 cf_have_ncuconfig=no
9286 if test "x${PKG_CONFIG:=none}" != xnone; then
9287 echo "$as_me:9287: checking pkg-config for $cf_ncuconfig_root" >&5
9288 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9289 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9290 echo "$as_me:9290: result: yes" >&5
9291 echo "${ECHO_T}yes" >&6
9293 echo "$as_me:9293: checking if the $cf_ncuconfig_root package files work" >&5
9294 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9295 cf_have_ncuconfig=unknown
9297 cf_save_CFLAGS="$CFLAGS"
9298 cf_save_CPPFLAGS="$CPPFLAGS"
9299 cf_save_LIBS="$LIBS"
9301 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
9302 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9304 # while -W for passing linker flags is prevalent, it is not "standard".
9305 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9306 # incompatible _and_ non-standard -W option which gives an error. Work
9307 # around that pitfall.
9308 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9314 cf_new_extra_cppflags=
9316 for cf_add_cflags in $cf_pkg_cflags
9318 case "$cf_fix_cppflags" in
9320 case "$cf_add_cflags" in
9321 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9322 case "$cf_add_cflags" in
9324 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9326 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9327 && test -z "${cf_tst_cflags}" \
9328 && cf_fix_cppflags=yes
9330 if test "$cf_fix_cppflags" = yes ; then
9332 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9333 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9336 elif test "${cf_tst_cflags}" = "\"'" ; then
9338 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9339 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9349 case "$cf_add_cflags" in
9351 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9353 CPPFLAGS=`echo "$CPPFLAGS" | \
9354 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9355 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9360 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9361 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9368 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9369 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9376 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9377 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9379 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9381 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9382 && test -z "${cf_tst_cflags}" \
9383 && cf_fix_cppflags=no
9388 if test -n "$cf_new_cflags" ; then
9390 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9391 CFLAGS="${CFLAGS}$cf_new_cflags"
9395 if test -n "$cf_new_cppflags" ; then
9397 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9398 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9402 if test -n "$cf_new_extra_cppflags" ; then
9404 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9405 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9412 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9414 for cf_add_1lib in $cf_add_0lib; do
9415 for cf_add_2lib in $cf_add_libs; do
9416 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9421 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9425 cat >"conftest.$ac_ext" <<_ACEOF
9426 #line 9426 "configure"
9427 #include "confdefs.h"
9428 #include <${cf_cv_ncurses_header:-curses.h}>
9432 initscr(); mousemask(0,0); tigetstr((char *)0);
9437 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9438 if { (eval echo "$as_me:9438: \"$ac_link\"") >&5
9439 (eval $ac_link) 2>&5
9441 echo "$as_me:9441: \$? = $ac_status" >&5
9442 (exit "$ac_status"); } &&
9443 { ac_try='test -s "conftest$ac_exeext"'
9444 { (eval echo "$as_me:9444: \"$ac_try\"") >&5
9447 echo "$as_me:9447: \$? = $ac_status" >&5
9448 (exit "$ac_status"); }; }; then
9449 if test "$cross_compiling" = yes; then
9450 cf_test_ncuconfig=maybe
9452 cat >"conftest.$ac_ext" <<_ACEOF
9453 #line 9453 "configure"
9454 #include "confdefs.h"
9455 #include <${cf_cv_ncurses_header:-curses.h}>
9457 { const char *xx = curses_version(); return (xx == 0); }
9459 rm -f "conftest$ac_exeext"
9460 if { (eval echo "$as_me:9460: \"$ac_link\"") >&5
9461 (eval $ac_link) 2>&5
9463 echo "$as_me:9463: \$? = $ac_status" >&5
9464 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9465 { (eval echo "$as_me:9465: \"$ac_try\"") >&5
9468 echo "$as_me:9468: \$? = $ac_status" >&5
9469 (exit "$ac_status"); }; }; then
9470 cf_test_ncuconfig=yes
9472 echo "$as_me: program exited with status $ac_status" >&5
9473 echo "$as_me: failed program was:" >&5
9474 cat "conftest.$ac_ext" >&5
9475 cf_test_ncuconfig=no
9477 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9480 echo "$as_me: failed program was:" >&5
9481 cat "conftest.$ac_ext" >&5
9482 cf_test_ncuconfig=no
9484 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9486 CFLAGS="$cf_save_CFLAGS"
9487 CPPFLAGS="$cf_save_CPPFLAGS"
9488 LIBS="$cf_save_LIBS"
9490 if test "x$cf_test_ncuconfig" != xyes; then
9491 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9492 cf_pkg_cflags="$cf_temp"
9493 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9494 cf_pkg_libs="$cf_temp"
9499 for cf_add_cflags in $cf_pkg_cflags
9501 case "x$cf_add_cflags" in
9504 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9507 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
9508 test "$CFLAGS" != "$cf_old_cflag" || break
9510 CFLAGS="$cf_old_cflag"
9513 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9516 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
9517 test "$CPPFLAGS" != "$cf_old_cflag" || break
9519 CPPFLAGS="$cf_old_cflag"
9528 cf_new_extra_cppflags=
9530 for cf_add_cflags in $cf_add_cflags
9532 case "$cf_fix_cppflags" in
9534 case "$cf_add_cflags" in
9535 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9536 case "$cf_add_cflags" in
9538 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9540 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9541 && test -z "${cf_tst_cflags}" \
9542 && cf_fix_cppflags=yes
9544 if test "$cf_fix_cppflags" = yes ; then
9546 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9547 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9550 elif test "${cf_tst_cflags}" = "\"'" ; then
9552 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9553 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9563 case "$cf_add_cflags" in
9565 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9567 CPPFLAGS=`echo "$CPPFLAGS" | \
9568 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9569 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9574 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9575 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9582 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9583 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9590 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9591 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9593 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9595 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9596 && test -z "${cf_tst_cflags}" \
9597 && cf_fix_cppflags=no
9602 if test -n "$cf_new_cflags" ; then
9604 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9605 CFLAGS="${CFLAGS}$cf_new_cflags"
9609 if test -n "$cf_new_cppflags" ; then
9611 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9612 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9616 if test -n "$cf_new_extra_cppflags" ; then
9618 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9619 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9628 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9630 for cf_add_1lib in $cf_add_0lib; do
9631 for cf_add_2lib in $cf_add_libs; do
9632 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9637 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9641 cat >"conftest.$ac_ext" <<_ACEOF
9642 #line 9642 "configure"
9643 #include "confdefs.h"
9644 #include <${cf_cv_ncurses_header:-curses.h}>
9648 initscr(); mousemask(0,0); tigetstr((char *)0);
9653 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9654 if { (eval echo "$as_me:9654: \"$ac_link\"") >&5
9655 (eval $ac_link) 2>&5
9657 echo "$as_me:9657: \$? = $ac_status" >&5
9658 (exit "$ac_status"); } &&
9659 { ac_try='test -s "conftest$ac_exeext"'
9660 { (eval echo "$as_me:9660: \"$ac_try\"") >&5
9663 echo "$as_me:9663: \$? = $ac_status" >&5
9664 (exit "$ac_status"); }; }; then
9665 if test "$cross_compiling" = yes; then
9666 cf_have_ncuconfig=maybe
9668 cat >"conftest.$ac_ext" <<_ACEOF
9669 #line 9669 "configure"
9670 #include "confdefs.h"
9671 #include <${cf_cv_ncurses_header:-curses.h}>
9673 { const char *xx = curses_version(); return (xx == 0); }
9675 rm -f "conftest$ac_exeext"
9676 if { (eval echo "$as_me:9676: \"$ac_link\"") >&5
9677 (eval $ac_link) 2>&5
9679 echo "$as_me:9679: \$? = $ac_status" >&5
9680 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9681 { (eval echo "$as_me:9681: \"$ac_try\"") >&5
9684 echo "$as_me:9684: \$? = $ac_status" >&5
9685 (exit "$ac_status"); }; }; then
9686 cf_have_ncuconfig=yes
9688 echo "$as_me: program exited with status $ac_status" >&5
9689 echo "$as_me: failed program was:" >&5
9690 cat "conftest.$ac_ext" >&5
9691 cf_have_ncuconfig=no
9693 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9696 echo "$as_me: failed program was:" >&5
9697 cat "conftest.$ac_ext" >&5
9698 cf_have_ncuconfig=no
9700 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9701 echo "$as_me:9701: result: $cf_have_ncuconfig" >&5
9702 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9703 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9704 if test "$cf_have_ncuconfig" != "yes"
9706 CPPFLAGS="$cf_save_CPPFLAGS"
9707 LIBS="$cf_save_LIBS"
9708 NCURSES_CONFIG_PKG=none
9711 cat >>confdefs.h <<\EOF
9715 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9717 echo "$as_me:9717: checking for terminfo header" >&5
9718 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9719 if test "${cf_cv_term_header+set}" = set; then
9720 echo $ECHO_N "(cached) $ECHO_C" >&6
9723 case "${cf_cv_ncurses_header}" in
9724 (*/ncurses.h|*/ncursesw.h)
9725 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9728 cf_term_header=term.h
9732 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9734 cat >"conftest.$ac_ext" <<_ACEOF
9735 #line 9735 "configure"
9736 #include "confdefs.h"
9738 #include <${cf_cv_ncurses_header:-curses.h}>
9744 int x = auto_left_margin; (void)x
9749 rm -f "conftest.$ac_objext"
9750 if { (eval echo "$as_me:9750: \"$ac_compile\"") >&5
9751 (eval $ac_compile) 2>&5
9753 echo "$as_me:9753: \$? = $ac_status" >&5
9754 (exit "$ac_status"); } &&
9755 { ac_try='test -s "conftest.$ac_objext"'
9756 { (eval echo "$as_me:9756: \"$ac_try\"") >&5
9759 echo "$as_me:9759: \$? = $ac_status" >&5
9760 (exit "$ac_status"); }; }; then
9762 cf_cv_term_header="$cf_test"
9764 echo "$as_me: failed program was:" >&5
9765 cat "conftest.$ac_ext" >&5
9767 cf_cv_term_header=unknown
9770 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9771 test "$cf_cv_term_header" != unknown && break
9775 echo "$as_me:9775: result: $cf_cv_term_header" >&5
9776 echo "${ECHO_T}$cf_cv_term_header" >&6
9778 # Set definitions to allow ifdef'ing to accommodate subdirectories
9780 case "$cf_cv_term_header" in
9783 cat >>confdefs.h <<\EOF
9784 #define HAVE_TERM_H 1
9790 case "$cf_cv_term_header" in
9793 cat >>confdefs.h <<\EOF
9794 #define HAVE_NCURSES_TERM_H 1
9800 cat >>confdefs.h <<\EOF
9801 #define HAVE_NCURSESW_TERM_H 1
9810 echo "$as_me:9810: result: no" >&5
9811 echo "${ECHO_T}no" >&6
9812 NCURSES_CONFIG_PKG=none
9815 NCURSES_CONFIG_PKG=none
9818 if test "x$cf_have_ncuconfig" = "xno"; then
9819 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9821 if test -n "$ac_tool_prefix"; then
9822 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9824 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9825 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9826 echo "$as_me:9826: checking for $ac_word" >&5
9827 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9828 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9829 echo $ECHO_N "(cached) $ECHO_C" >&6
9831 if test -n "$NCURSES_CONFIG"; then
9832 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9834 ac_save_IFS=$IFS; IFS=$ac_path_separator
9836 for ac_dir in $ac_dummy; do
9838 test -z "$ac_dir" && ac_dir=.
9839 $as_executable_p "$ac_dir/$ac_word" || continue
9840 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9841 echo "$as_me:9841: found $ac_dir/$ac_word" >&5
9847 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9848 if test -n "$NCURSES_CONFIG"; then
9849 echo "$as_me:9849: result: $NCURSES_CONFIG" >&5
9850 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9852 echo "$as_me:9852: result: no" >&5
9853 echo "${ECHO_T}no" >&6
9856 test -n "$NCURSES_CONFIG" && break
9859 if test -z "$NCURSES_CONFIG"; then
9860 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9861 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9863 # Extract the first word of "$ac_prog", so it can be a program name with args.
9864 set dummy $ac_prog; ac_word=$2
9865 echo "$as_me:9865: checking for $ac_word" >&5
9866 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9867 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9868 echo $ECHO_N "(cached) $ECHO_C" >&6
9870 if test -n "$ac_ct_NCURSES_CONFIG"; then
9871 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9873 ac_save_IFS=$IFS; IFS=$ac_path_separator
9875 for ac_dir in $ac_dummy; do
9877 test -z "$ac_dir" && ac_dir=.
9878 $as_executable_p "$ac_dir/$ac_word" || continue
9879 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9880 echo "$as_me:9880: found $ac_dir/$ac_word" >&5
9886 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9887 if test -n "$ac_ct_NCURSES_CONFIG"; then
9888 echo "$as_me:9888: result: $ac_ct_NCURSES_CONFIG" >&5
9889 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9891 echo "$as_me:9891: result: no" >&5
9892 echo "${ECHO_T}no" >&6
9895 test -n "$ac_ct_NCURSES_CONFIG" && break
9897 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9899 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9902 if test "$NCURSES_CONFIG" != none ; then
9904 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9906 case "x$cf_add_cflags" in
9909 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9912 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
9913 test "$CFLAGS" != "$cf_old_cflag" || break
9915 CFLAGS="$cf_old_cflag"
9918 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9921 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
9922 test "$CPPFLAGS" != "$cf_old_cflag" || break
9924 CPPFLAGS="$cf_old_cflag"
9933 cf_new_extra_cppflags=
9935 for cf_add_cflags in $cf_add_cflags
9937 case "$cf_fix_cppflags" in
9939 case "$cf_add_cflags" in
9940 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9941 case "$cf_add_cflags" in
9943 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9945 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9946 && test -z "${cf_tst_cflags}" \
9947 && cf_fix_cppflags=yes
9949 if test "$cf_fix_cppflags" = yes ; then
9951 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9952 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9955 elif test "${cf_tst_cflags}" = "\"'" ; then
9957 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9958 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9968 case "$cf_add_cflags" in
9970 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9972 CPPFLAGS=`echo "$CPPFLAGS" | \
9973 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9974 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9979 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9980 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9987 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9988 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9995 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9996 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9998 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10000 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10001 && test -z "${cf_tst_cflags}" \
10002 && cf_fix_cppflags=no
10007 if test -n "$cf_new_cflags" ; then
10009 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10010 CFLAGS="${CFLAGS}$cf_new_cflags"
10014 if test -n "$cf_new_cppflags" ; then
10016 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10017 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10021 if test -n "$cf_new_extra_cppflags" ; then
10023 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10024 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10030 cf_add_libs="$LIBS"
10033 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10034 # filter duplicates
10035 for cf_add_1lib in $cf_add_0lib; do
10036 for cf_add_2lib in $cf_add_libs; do
10037 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10042 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10044 LIBS="$cf_add_libs"
10046 # even with config script, some packages use no-override for curses.h
10048 echo "$as_me:10048: checking if we have identified curses headers" >&5
10049 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10050 if test "${cf_cv_ncurses_header+set}" = set; then
10051 echo $ECHO_N "(cached) $ECHO_C" >&6
10054 cf_cv_ncurses_header=none
10056 ncurses.h ncurses/ncurses.h \
10057 curses.h ncurses/curses.h
10059 cat >"conftest.$ac_ext" <<_ACEOF
10060 #line 10060 "configure"
10061 #include "confdefs.h"
10062 #include <${cf_header}>
10066 initscr(); tgoto("?", 0,0)
10071 rm -f "conftest.$ac_objext"
10072 if { (eval echo "$as_me:10072: \"$ac_compile\"") >&5
10073 (eval $ac_compile) 2>&5
10075 echo "$as_me:10075: \$? = $ac_status" >&5
10076 (exit "$ac_status"); } &&
10077 { ac_try='test -s "conftest.$ac_objext"'
10078 { (eval echo "$as_me:10078: \"$ac_try\"") >&5
10079 (eval $ac_try) 2>&5
10081 echo "$as_me:10081: \$? = $ac_status" >&5
10082 (exit "$ac_status"); }; }; then
10083 cf_cv_ncurses_header=$cf_header; break
10085 echo "$as_me: failed program was:" >&5
10086 cat "conftest.$ac_ext" >&5
10088 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10092 echo "$as_me:10092: result: $cf_cv_ncurses_header" >&5
10093 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10095 if test "$cf_cv_ncurses_header" = none ; then
10096 { { echo "$as_me:10096: error: No curses header-files found" >&5
10097 echo "$as_me: error: No curses header-files found" >&2;}
10098 { (exit 1); exit 1; }; }
10101 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10103 for ac_header in $cf_cv_ncurses_header
10105 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10106 echo "$as_me:10106: checking for $ac_header" >&5
10107 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10108 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10109 echo $ECHO_N "(cached) $ECHO_C" >&6
10111 cat >"conftest.$ac_ext" <<_ACEOF
10112 #line 10112 "configure"
10113 #include "confdefs.h"
10114 #include <$ac_header>
10116 if { (eval echo "$as_me:10116: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10117 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10119 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10121 cat conftest.err >&5
10122 echo "$as_me:10122: \$? = $ac_status" >&5
10123 (exit "$ac_status"); } >/dev/null; then
10124 if test -s conftest.err; then
10125 ac_cpp_err=$ac_c_preproc_warn_flag
10132 if test -z "$ac_cpp_err"; then
10133 eval "$as_ac_Header=yes"
10135 echo "$as_me: failed program was:" >&5
10136 cat "conftest.$ac_ext" >&5
10137 eval "$as_ac_Header=no"
10139 rm -f conftest.err "conftest.$ac_ext"
10141 echo "$as_me:10141: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10142 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10143 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10144 cat >>confdefs.h <<EOF
10145 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10151 cat >>confdefs.h <<\EOF
10155 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10157 cat >>confdefs.h <<EOF
10158 #define $cf_nculib_ROOT 1
10161 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
10165 cf_ncuhdr_root=ncurses
10167 test -n "$cf_cv_curses_dir" && \
10168 test "$cf_cv_curses_dir" != "no" && { \
10170 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
10171 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
10173 while test "$cf_add_incdir" != /usr/include
10175 if test -d "$cf_add_incdir"
10178 if test -n "$CFLAGS$CPPFLAGS" ; then
10179 # a loop is needed to ensure we can add subdirs of existing dirs
10180 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10181 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10182 cf_have_incdir=yes; break
10187 if test "$cf_have_incdir" = no ; then
10188 if test "$cf_add_incdir" = /usr/local/include ; then
10189 if test "$GCC" = yes
10191 cf_save_CPPFLAGS=$CPPFLAGS
10193 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10194 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10196 cat >"conftest.$ac_ext" <<_ACEOF
10197 #line 10197 "configure"
10198 #include "confdefs.h"
10208 rm -f "conftest.$ac_objext"
10209 if { (eval echo "$as_me:10209: \"$ac_compile\"") >&5
10210 (eval $ac_compile) 2>&5
10212 echo "$as_me:10212: \$? = $ac_status" >&5
10213 (exit "$ac_status"); } &&
10214 { ac_try='test -s "conftest.$ac_objext"'
10215 { (eval echo "$as_me:10215: \"$ac_try\"") >&5
10216 (eval $ac_try) 2>&5
10218 echo "$as_me:10218: \$? = $ac_status" >&5
10219 (exit "$ac_status"); }; }; then
10222 echo "$as_me: failed program was:" >&5
10223 cat "conftest.$ac_ext" >&5
10226 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10227 CPPFLAGS=$cf_save_CPPFLAGS
10232 if test "$cf_have_incdir" = no ; then
10233 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10235 echo "${as_me:-configure}:10235: testing adding $cf_add_incdir to include-path ..." 1>&5
10237 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10239 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10240 test "$cf_top_incdir" = "$cf_add_incdir" && break
10241 cf_add_incdir="$cf_top_incdir"
10254 echo "$as_me:10254: checking for $cf_ncuhdr_root header in include-path" >&5
10255 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10256 if test "${cf_cv_ncurses_h+set}" = set; then
10257 echo $ECHO_N "(cached) $ECHO_C" >&6
10260 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10261 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
10262 for cf_header in $cf_header_list
10265 cat >"conftest.$ac_ext" <<_ACEOF
10266 #line 10266 "configure"
10267 #include "confdefs.h"
10269 #include <$cf_header>
10274 #ifdef NCURSES_VERSION
10276 printf("%s\\n", NCURSES_VERSION);
10289 rm -f "conftest.$ac_objext"
10290 if { (eval echo "$as_me:10290: \"$ac_compile\"") >&5
10291 (eval $ac_compile) 2>&5
10293 echo "$as_me:10293: \$? = $ac_status" >&5
10294 (exit "$ac_status"); } &&
10295 { ac_try='test -s "conftest.$ac_objext"'
10296 { (eval echo "$as_me:10296: \"$ac_try\"") >&5
10297 (eval $ac_try) 2>&5
10299 echo "$as_me:10299: \$? = $ac_status" >&5
10300 (exit "$ac_status"); }; }; then
10301 cf_cv_ncurses_h=$cf_header
10304 echo "$as_me: failed program was:" >&5
10305 cat "conftest.$ac_ext" >&5
10308 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10310 test "$cf_cv_ncurses_h" != no && break
10314 echo "$as_me:10314: result: $cf_cv_ncurses_h" >&5
10315 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10317 if test "$cf_cv_ncurses_h" != no ; then
10318 cf_cv_ncurses_header=$cf_cv_ncurses_h
10321 echo "$as_me:10321: checking for $cf_ncuhdr_root include-path" >&5
10322 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10323 if test "${cf_cv_ncurses_h2+set}" = set; then
10324 echo $ECHO_N "(cached) $ECHO_C" >&6
10327 test -n "$verbose" && echo
10331 # collect the current set of include-directories from compiler flags
10332 cf_header_path_list=""
10333 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10334 for cf_header_path in $CPPFLAGS $CFLAGS
10336 case "$cf_header_path" in
10338 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10340 test "x$cf_header_path" != "xNONE" && \
10341 test -d "$cf_header_path" && \
10343 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10344 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
10345 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10346 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10347 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10348 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"
10351 cf_header_path_list="$cf_header_path_list $cf_search"
10357 # add the variations for the package we are looking for
10361 test "x$prefix" != "xNONE" && \
10362 test -d "$prefix" && \
10364 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10365 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
10366 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10367 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10368 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10369 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10372 for cf_subdir_prefix in \
10381 test "x$cf_subdir_prefix" != "x$prefix" && \
10382 test -d "$cf_subdir_prefix" && \
10383 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10384 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10385 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
10386 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10387 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10388 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10389 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"
10394 test "$includedir" != NONE && \
10395 test "$includedir" != "/usr/include" && \
10396 test -d "$includedir" && {
10397 test -d "$includedir" && cf_search="$cf_search $includedir"
10398 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10401 test "$oldincludedir" != NONE && \
10402 test "$oldincludedir" != "/usr/include" && \
10403 test -d "$oldincludedir" && {
10404 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
10405 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10408 cf_search="$cf_search $cf_header_path_list"
10410 test -n "$verbose" && echo "search path $cf_search"
10411 cf_save2_CPPFLAGS="$CPPFLAGS"
10412 for cf_incdir in $cf_search
10415 if test -n "$cf_incdir" ; then
10416 for cf_add_incdir in $cf_incdir
10418 while test "$cf_add_incdir" != /usr/include
10420 if test -d "$cf_add_incdir"
10423 if test -n "$CFLAGS$CPPFLAGS" ; then
10424 # a loop is needed to ensure we can add subdirs of existing dirs
10425 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10426 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10427 cf_have_incdir=yes; break
10432 if test "$cf_have_incdir" = no ; then
10433 if test "$cf_add_incdir" = /usr/local/include ; then
10434 if test "$GCC" = yes
10436 cf_save_CPPFLAGS=$CPPFLAGS
10438 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10439 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10441 cat >"conftest.$ac_ext" <<_ACEOF
10442 #line 10442 "configure"
10443 #include "confdefs.h"
10453 rm -f "conftest.$ac_objext"
10454 if { (eval echo "$as_me:10454: \"$ac_compile\"") >&5
10455 (eval $ac_compile) 2>&5
10457 echo "$as_me:10457: \$? = $ac_status" >&5
10458 (exit "$ac_status"); } &&
10459 { ac_try='test -s "conftest.$ac_objext"'
10460 { (eval echo "$as_me:10460: \"$ac_try\"") >&5
10461 (eval $ac_try) 2>&5
10463 echo "$as_me:10463: \$? = $ac_status" >&5
10464 (exit "$ac_status"); }; }; then
10467 echo "$as_me: failed program was:" >&5
10468 cat "conftest.$ac_ext" >&5
10471 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10472 CPPFLAGS=$cf_save_CPPFLAGS
10477 if test "$cf_have_incdir" = no ; then
10478 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10480 echo "${as_me:-configure}:10480: testing adding $cf_add_incdir to include-path ..." 1>&5
10482 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10484 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10485 test "$cf_top_incdir" = "$cf_add_incdir" && break
10486 cf_add_incdir="$cf_top_incdir"
10502 cat >"conftest.$ac_ext" <<_ACEOF
10503 #line 10503 "configure"
10504 #include "confdefs.h"
10506 #include <$cf_header>
10511 #ifdef NCURSES_VERSION
10513 printf("%s\\n", NCURSES_VERSION);
10526 rm -f "conftest.$ac_objext"
10527 if { (eval echo "$as_me:10527: \"$ac_compile\"") >&5
10528 (eval $ac_compile) 2>&5
10530 echo "$as_me:10530: \$? = $ac_status" >&5
10531 (exit "$ac_status"); } &&
10532 { ac_try='test -s "conftest.$ac_objext"'
10533 { (eval echo "$as_me:10533: \"$ac_try\"") >&5
10534 (eval $ac_try) 2>&5
10536 echo "$as_me:10536: \$? = $ac_status" >&5
10537 (exit "$ac_status"); }; }; then
10538 cf_cv_ncurses_h2=$cf_header
10541 echo "$as_me: failed program was:" >&5
10542 cat "conftest.$ac_ext" >&5
10543 cf_cv_ncurses_h2=no
10545 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10547 if test "$cf_cv_ncurses_h2" != no ; then
10548 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10549 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
10552 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10554 CPPFLAGS="$cf_save2_CPPFLAGS"
10555 test "$cf_cv_ncurses_h2" != no && break
10557 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10557: error: not found" >&5
10558 echo "$as_me: error: not found" >&2;}
10559 { (exit 1); exit 1; }; }
10562 echo "$as_me:10562: result: $cf_cv_ncurses_h2" >&5
10563 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10565 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
10566 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
10567 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
10568 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
10571 if test -n "$cf_1st_incdir" ; then
10572 for cf_add_incdir in $cf_1st_incdir
10574 while test "$cf_add_incdir" != /usr/include
10576 if test -d "$cf_add_incdir"
10579 if test -n "$CFLAGS$CPPFLAGS" ; then
10580 # a loop is needed to ensure we can add subdirs of existing dirs
10581 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10582 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10583 cf_have_incdir=yes; break
10588 if test "$cf_have_incdir" = no ; then
10589 if test "$cf_add_incdir" = /usr/local/include ; then
10590 if test "$GCC" = yes
10592 cf_save_CPPFLAGS=$CPPFLAGS
10594 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10595 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10597 cat >"conftest.$ac_ext" <<_ACEOF
10598 #line 10598 "configure"
10599 #include "confdefs.h"
10609 rm -f "conftest.$ac_objext"
10610 if { (eval echo "$as_me:10610: \"$ac_compile\"") >&5
10611 (eval $ac_compile) 2>&5
10613 echo "$as_me:10613: \$? = $ac_status" >&5
10614 (exit "$ac_status"); } &&
10615 { ac_try='test -s "conftest.$ac_objext"'
10616 { (eval echo "$as_me:10616: \"$ac_try\"") >&5
10617 (eval $ac_try) 2>&5
10619 echo "$as_me:10619: \$? = $ac_status" >&5
10620 (exit "$ac_status"); }; }; then
10623 echo "$as_me: failed program was:" >&5
10624 cat "conftest.$ac_ext" >&5
10627 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10628 CPPFLAGS=$cf_save_CPPFLAGS
10633 if test "$cf_have_incdir" = no ; then
10634 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10636 echo "${as_me:-configure}:10636: testing adding $cf_add_incdir to include-path ..." 1>&5
10638 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10640 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10641 test "$cf_top_incdir" = "$cf_add_incdir" && break
10642 cf_add_incdir="$cf_top_incdir"
10655 # Set definitions to allow ifdef'ing for ncurses.h
10657 case "$cf_cv_ncurses_header" in
10660 cat >>confdefs.h <<\EOF
10661 #define HAVE_NCURSES_H 1
10667 case "$cf_cv_ncurses_header" in
10668 (ncurses/curses.h|ncurses/ncurses.h)
10670 cat >>confdefs.h <<\EOF
10671 #define HAVE_NCURSES_NCURSES_H 1
10675 (ncursesw/curses.h|ncursesw/ncurses.h)
10677 cat >>confdefs.h <<\EOF
10678 #define HAVE_NCURSESW_NCURSES_H 1
10684 echo "$as_me:10684: checking for terminfo header" >&5
10685 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10686 if test "${cf_cv_term_header+set}" = set; then
10687 echo $ECHO_N "(cached) $ECHO_C" >&6
10690 case "${cf_cv_ncurses_header}" in
10691 (*/ncurses.h|*/ncursesw.h)
10692 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10695 cf_term_header=term.h
10699 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10701 cat >"conftest.$ac_ext" <<_ACEOF
10702 #line 10702 "configure"
10703 #include "confdefs.h"
10705 #include <${cf_cv_ncurses_header:-curses.h}>
10706 #include <$cf_test>
10711 int x = auto_left_margin; (void)x
10716 rm -f "conftest.$ac_objext"
10717 if { (eval echo "$as_me:10717: \"$ac_compile\"") >&5
10718 (eval $ac_compile) 2>&5
10720 echo "$as_me:10720: \$? = $ac_status" >&5
10721 (exit "$ac_status"); } &&
10722 { ac_try='test -s "conftest.$ac_objext"'
10723 { (eval echo "$as_me:10723: \"$ac_try\"") >&5
10724 (eval $ac_try) 2>&5
10726 echo "$as_me:10726: \$? = $ac_status" >&5
10727 (exit "$ac_status"); }; }; then
10729 cf_cv_term_header="$cf_test"
10731 echo "$as_me: failed program was:" >&5
10732 cat "conftest.$ac_ext" >&5
10734 cf_cv_term_header=unknown
10737 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10738 test "$cf_cv_term_header" != unknown && break
10742 echo "$as_me:10742: result: $cf_cv_term_header" >&5
10743 echo "${ECHO_T}$cf_cv_term_header" >&6
10745 # Set definitions to allow ifdef'ing to accommodate subdirectories
10747 case "$cf_cv_term_header" in
10750 cat >>confdefs.h <<\EOF
10751 #define HAVE_TERM_H 1
10757 case "$cf_cv_term_header" in
10760 cat >>confdefs.h <<\EOF
10761 #define HAVE_NCURSES_TERM_H 1
10767 cat >>confdefs.h <<\EOF
10768 #define HAVE_NCURSESW_TERM_H 1
10774 # some applications need this, but should check for NCURSES_VERSION
10776 cat >>confdefs.h <<\EOF
10780 echo "$as_me:10780: checking for ncurses version" >&5
10781 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10782 if test "${cf_cv_ncurses_version+set}" = set; then
10783 echo $ECHO_N "(cached) $ECHO_C" >&6
10786 cf_cv_ncurses_version=no
10788 rm -f "$cf_tempfile"
10789 if test "$cross_compiling" = yes; then
10791 # This will not work if the preprocessor splits the line after the
10792 # Autoconf token. The 'unproto' program does that.
10793 cat > "conftest.$ac_ext" <<EOF
10794 #include <${cf_cv_ncurses_header:-curses.h}>
10796 #ifdef NCURSES_VERSION
10797 Autoconf NCURSES_VERSION
10805 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10806 { (eval echo "$as_me:10806: \"$cf_try\"") >&5
10807 (eval $cf_try) 2>&5
10809 echo "$as_me:10809: \$? = $ac_status" >&5
10810 (exit "$ac_status"); }
10811 if test -f conftest.out ; then
10812 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
10813 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10818 cat >"conftest.$ac_ext" <<_ACEOF
10819 #line 10819 "configure"
10820 #include "confdefs.h"
10822 #include <${cf_cv_ncurses_header:-curses.h}>
10826 FILE *fp = fopen("$cf_tempfile", "w");
10827 #ifdef NCURSES_VERSION
10828 # ifdef NCURSES_VERSION_PATCH
10829 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10831 fprintf(fp, "%s\\n", NCURSES_VERSION);
10834 # ifdef __NCURSES_H
10835 fprintf(fp, "old\\n");
10840 ${cf_cv_main_return:-return}(0);
10843 rm -f "conftest$ac_exeext"
10844 if { (eval echo "$as_me:10844: \"$ac_link\"") >&5
10845 (eval $ac_link) 2>&5
10847 echo "$as_me:10847: \$? = $ac_status" >&5
10848 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10849 { (eval echo "$as_me:10849: \"$ac_try\"") >&5
10850 (eval $ac_try) 2>&5
10852 echo "$as_me:10852: \$? = $ac_status" >&5
10853 (exit "$ac_status"); }; }; then
10855 cf_cv_ncurses_version=`cat $cf_tempfile`
10857 echo "$as_me: program exited with status $ac_status" >&5
10858 echo "$as_me: failed program was:" >&5
10859 cat "conftest.$ac_ext" >&5
10861 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10863 rm -f "$cf_tempfile"
10866 echo "$as_me:10866: result: $cf_cv_ncurses_version" >&5
10867 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10868 test "$cf_cv_ncurses_version" = no ||
10869 cat >>confdefs.h <<\EOF
10873 cf_nculib_root=ncurses
10874 # This works, except for the special case where we find gpm, but
10875 # ncurses is in a nonstandard location via $LIBS, and we really want
10878 cf_ncurses_SAVE="$LIBS"
10879 echo "$as_me:10879: checking for Gpm_Open in -lgpm" >&5
10880 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10881 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10882 echo $ECHO_N "(cached) $ECHO_C" >&6
10884 ac_check_lib_save_LIBS=$LIBS
10886 cat >"conftest.$ac_ext" <<_ACEOF
10887 #line 10887 "configure"
10888 #include "confdefs.h"
10890 /* Override any gcc2 internal prototype to avoid an error. */
10894 /* We use char because int might match the return type of a gcc2
10895 builtin and then its argument prototype would still apply. */
10905 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10906 if { (eval echo "$as_me:10906: \"$ac_link\"") >&5
10907 (eval $ac_link) 2>&5
10909 echo "$as_me:10909: \$? = $ac_status" >&5
10910 (exit "$ac_status"); } &&
10911 { ac_try='test -s "conftest$ac_exeext"'
10912 { (eval echo "$as_me:10912: \"$ac_try\"") >&5
10913 (eval $ac_try) 2>&5
10915 echo "$as_me:10915: \$? = $ac_status" >&5
10916 (exit "$ac_status"); }; }; then
10917 ac_cv_lib_gpm_Gpm_Open=yes
10919 echo "$as_me: failed program was:" >&5
10920 cat "conftest.$ac_ext" >&5
10921 ac_cv_lib_gpm_Gpm_Open=no
10923 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10924 LIBS=$ac_check_lib_save_LIBS
10926 echo "$as_me:10926: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10927 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
10928 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
10929 echo "$as_me:10929: checking for initscr in -lgpm" >&5
10930 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
10931 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
10932 echo $ECHO_N "(cached) $ECHO_C" >&6
10934 ac_check_lib_save_LIBS=$LIBS
10936 cat >"conftest.$ac_ext" <<_ACEOF
10937 #line 10937 "configure"
10938 #include "confdefs.h"
10940 /* Override any gcc2 internal prototype to avoid an error. */
10944 /* We use char because int might match the return type of a gcc2
10945 builtin and then its argument prototype would still apply. */
10955 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10956 if { (eval echo "$as_me:10956: \"$ac_link\"") >&5
10957 (eval $ac_link) 2>&5
10959 echo "$as_me:10959: \$? = $ac_status" >&5
10960 (exit "$ac_status"); } &&
10961 { ac_try='test -s "conftest$ac_exeext"'
10962 { (eval echo "$as_me:10962: \"$ac_try\"") >&5
10963 (eval $ac_try) 2>&5
10965 echo "$as_me:10965: \$? = $ac_status" >&5
10966 (exit "$ac_status"); }; }; then
10967 ac_cv_lib_gpm_initscr=yes
10969 echo "$as_me: failed program was:" >&5
10970 cat "conftest.$ac_ext" >&5
10971 ac_cv_lib_gpm_initscr=no
10973 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10974 LIBS=$ac_check_lib_save_LIBS
10976 echo "$as_me:10976: result: $ac_cv_lib_gpm_initscr" >&5
10977 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
10978 if test "$ac_cv_lib_gpm_initscr" = yes; then
10979 LIBS="$cf_ncurses_SAVE"
10981 cf_ncurses_LIBS="-lgpm"
10988 # This is only necessary if you are linking against an obsolete
10989 # version of ncurses (but it should do no harm, since it is static).
10990 if test "$cf_nculib_root" = ncurses ; then
10991 echo "$as_me:10991: checking for tgoto in -lmytinfo" >&5
10992 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
10993 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
10994 echo $ECHO_N "(cached) $ECHO_C" >&6
10996 ac_check_lib_save_LIBS=$LIBS
10997 LIBS="-lmytinfo $LIBS"
10998 cat >"conftest.$ac_ext" <<_ACEOF
10999 #line 10999 "configure"
11000 #include "confdefs.h"
11002 /* Override any gcc2 internal prototype to avoid an error. */
11006 /* We use char because int might match the return type of a gcc2
11007 builtin and then its argument prototype would still apply. */
11017 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11018 if { (eval echo "$as_me:11018: \"$ac_link\"") >&5
11019 (eval $ac_link) 2>&5
11021 echo "$as_me:11021: \$? = $ac_status" >&5
11022 (exit "$ac_status"); } &&
11023 { ac_try='test -s "conftest$ac_exeext"'
11024 { (eval echo "$as_me:11024: \"$ac_try\"") >&5
11025 (eval $ac_try) 2>&5
11027 echo "$as_me:11027: \$? = $ac_status" >&5
11028 (exit "$ac_status"); }; }; then
11029 ac_cv_lib_mytinfo_tgoto=yes
11031 echo "$as_me: failed program was:" >&5
11032 cat "conftest.$ac_ext" >&5
11033 ac_cv_lib_mytinfo_tgoto=no
11035 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11036 LIBS=$ac_check_lib_save_LIBS
11038 echo "$as_me:11038: result: $ac_cv_lib_mytinfo_tgoto" >&5
11039 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11040 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
11041 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
11048 cf_add_libs="$LIBS"
11051 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11052 # filter duplicates
11053 for cf_add_1lib in $cf_add_0lib; do
11054 for cf_add_2lib in $cf_add_libs; do
11055 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11060 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11062 LIBS="$cf_add_libs"
11064 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
11067 cf_add_libs="$LIBS"
11070 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11071 # filter duplicates
11072 for cf_add_1lib in $cf_add_0lib; do
11073 for cf_add_2lib in $cf_add_libs; do
11074 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11079 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11081 LIBS="$cf_add_libs"
11085 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
11087 echo "$as_me:11087: checking for initscr" >&5
11088 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
11089 if test "${ac_cv_func_initscr+set}" = set; then
11090 echo $ECHO_N "(cached) $ECHO_C" >&6
11092 cat >"conftest.$ac_ext" <<_ACEOF
11093 #line 11093 "configure"
11094 #include "confdefs.h"
11095 #define initscr autoconf_temporary
11096 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11103 /* We use char because int might match the return type of a gcc2
11104 builtin and then its argument prototype would still apply. */
11105 char initscr (void);
11111 /* The GNU C library defines stubs for functions which it implements
11112 to always fail with ENOSYS. Some functions are actually named
11113 something starting with __ and the normal name is an alias. */
11114 #if defined (__stub_initscr) || defined (__stub___initscr)
11115 #error found stub for initscr
11123 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11124 if { (eval echo "$as_me:11124: \"$ac_link\"") >&5
11125 (eval $ac_link) 2>&5
11127 echo "$as_me:11127: \$? = $ac_status" >&5
11128 (exit "$ac_status"); } &&
11129 { ac_try='test -s "conftest$ac_exeext"'
11130 { (eval echo "$as_me:11130: \"$ac_try\"") >&5
11131 (eval $ac_try) 2>&5
11133 echo "$as_me:11133: \$? = $ac_status" >&5
11134 (exit "$ac_status"); }; }; then
11135 ac_cv_func_initscr=yes
11137 echo "$as_me: failed program was:" >&5
11138 cat "conftest.$ac_ext" >&5
11139 ac_cv_func_initscr=no
11141 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11143 echo "$as_me:11143: result: $ac_cv_func_initscr" >&5
11144 echo "${ECHO_T}$ac_cv_func_initscr" >&6
11145 if test "$ac_cv_func_initscr" = yes; then
11146 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11149 cf_save_LIBS="$LIBS"
11150 echo "$as_me:11150: checking for initscr in -l$cf_nculib_root" >&5
11151 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
11152 LIBS="-l$cf_nculib_root $LIBS"
11153 cat >"conftest.$ac_ext" <<_ACEOF
11154 #line 11154 "configure"
11155 #include "confdefs.h"
11156 #include <${cf_cv_ncurses_header:-curses.h}>
11165 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11166 if { (eval echo "$as_me:11166: \"$ac_link\"") >&5
11167 (eval $ac_link) 2>&5
11169 echo "$as_me:11169: \$? = $ac_status" >&5
11170 (exit "$ac_status"); } &&
11171 { ac_try='test -s "conftest$ac_exeext"'
11172 { (eval echo "$as_me:11172: \"$ac_try\"") >&5
11173 (eval $ac_try) 2>&5
11175 echo "$as_me:11175: \$? = $ac_status" >&5
11176 (exit "$ac_status"); }; }; then
11177 echo "$as_me:11177: result: yes" >&5
11178 echo "${ECHO_T}yes" >&6
11179 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11182 echo "$as_me: failed program was:" >&5
11183 cat "conftest.$ac_ext" >&5
11184 echo "$as_me:11184: result: no" >&5
11185 echo "${ECHO_T}no" >&6
11188 cf_library_path_list=""
11189 if test -n "${LDFLAGS}${LIBS}" ; then
11190 for cf_library_path in $LDFLAGS $LIBS
11192 case "$cf_library_path" in
11194 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11196 test "x$cf_library_path" != "xNONE" && \
11197 test -d "$cf_library_path" && \
11199 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11200 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
11201 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11202 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11203 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11204 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"
11207 cf_library_path_list="$cf_library_path_list $cf_search"
11215 test "x$prefix" != "xNONE" && \
11216 test -d "$prefix" && \
11218 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11219 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
11220 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11221 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11222 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11223 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11226 for cf_subdir_prefix in \
11235 test "x$cf_subdir_prefix" != "x$prefix" && \
11236 test -d "$cf_subdir_prefix" && \
11237 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11238 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11239 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
11240 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11241 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11242 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11243 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"
11248 cf_search="$cf_library_path_list $cf_search"
11250 for cf_libdir in $cf_search
11252 echo "$as_me:11252: checking for -l$cf_nculib_root in $cf_libdir" >&5
11253 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11254 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11255 cat >"conftest.$ac_ext" <<_ACEOF
11256 #line 11256 "configure"
11257 #include "confdefs.h"
11258 #include <${cf_cv_ncurses_header:-curses.h}>
11267 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11268 if { (eval echo "$as_me:11268: \"$ac_link\"") >&5
11269 (eval $ac_link) 2>&5
11271 echo "$as_me:11271: \$? = $ac_status" >&5
11272 (exit "$ac_status"); } &&
11273 { ac_try='test -s "conftest$ac_exeext"'
11274 { (eval echo "$as_me:11274: \"$ac_try\"") >&5
11275 (eval $ac_try) 2>&5
11277 echo "$as_me:11277: \$? = $ac_status" >&5
11278 (exit "$ac_status"); }; }; then
11279 echo "$as_me:11279: result: yes" >&5
11280 echo "${ECHO_T}yes" >&6
11281 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11284 echo "$as_me: failed program was:" >&5
11285 cat "conftest.$ac_ext" >&5
11286 echo "$as_me:11286: result: no" >&5
11287 echo "${ECHO_T}no" >&6
11288 LIBS="$cf_save_LIBS"
11290 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11294 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11298 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
11300 if test "$cf_found_library" = no ; then
11301 { { echo "$as_me:11301: error: Cannot link $cf_nculib_root library" >&5
11302 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11303 { (exit 1); exit 1; }; }
11308 if test -n "$cf_ncurses_LIBS" ; then
11309 echo "$as_me:11309: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11310 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11311 cf_ncurses_SAVE="$LIBS"
11312 for p in $cf_ncurses_LIBS ; do
11313 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
11314 if test "$q" != "$LIBS" ; then
11318 cat >"conftest.$ac_ext" <<_ACEOF
11319 #line 11319 "configure"
11320 #include "confdefs.h"
11321 #include <${cf_cv_ncurses_header:-curses.h}>
11325 initscr(); mousemask(0,0); tigetstr((char *)0);
11330 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11331 if { (eval echo "$as_me:11331: \"$ac_link\"") >&5
11332 (eval $ac_link) 2>&5
11334 echo "$as_me:11334: \$? = $ac_status" >&5
11335 (exit "$ac_status"); } &&
11336 { ac_try='test -s "conftest$ac_exeext"'
11337 { (eval echo "$as_me:11337: \"$ac_try\"") >&5
11338 (eval $ac_try) 2>&5
11340 echo "$as_me:11340: \$? = $ac_status" >&5
11341 (exit "$ac_status"); }; }; then
11342 echo "$as_me:11342: result: yes" >&5
11343 echo "${ECHO_T}yes" >&6
11345 echo "$as_me: failed program was:" >&5
11346 cat "conftest.$ac_ext" >&5
11347 echo "$as_me:11347: result: no" >&5
11348 echo "${ECHO_T}no" >&6
11349 LIBS="$cf_ncurses_SAVE"
11351 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11354 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11356 cat >>confdefs.h <<EOF
11357 #define $cf_nculib_ROOT 1
11362 NCURSES_CONFIG=none
11367 if test "$NCURSES_CONFIG_PKG" != none ; then
11368 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
11370 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11371 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11372 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11374 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
11375 if test -z "$cf_cv_abi_version"
11377 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
11380 elif test "$NCURSES_CONFIG" != none ; then
11382 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
11384 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11385 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11386 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11388 # ABI version is not available from headers
11389 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
11393 for cf_name in MAJOR MINOR PATCH
11395 cat >conftest.$ac_ext <<CF_EOF
11396 #include <${cf_cv_ncurses_header:-curses.h}>
11397 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
11399 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
11400 { (eval echo "$as_me:11400: \"$cf_try\"") >&5
11401 (eval $cf_try) 2>&5
11403 echo "$as_me:11403: \$? = $ac_status" >&5
11404 (exit "$ac_status"); }
11405 if test -f conftest.out ; then
11406 cf_result=`sed -e "s/^.*AUTOCONF_${cf_name}[ ][ ]*//" conftest.out`
11407 eval NCURSES_$cf_name=\"$cf_result\"
11408 # cat conftest.$ac_ext
11413 cf_cv_abi_version=${NCURSES_MAJOR}
11417 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
11419 cf_cv_timestamp=`date`
11421 echo "$as_me:11421: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
11422 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
11424 echo "$as_me:11424: checking if you want to have a library-prefix" >&5
11425 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
11427 # Check whether --with-lib-prefix or --without-lib-prefix was given.
11428 if test "${with_lib_prefix+set}" = set; then
11429 withval="$with_lib_prefix"
11430 with_lib_prefix=$withval
11432 with_lib_prefix=auto
11434 echo "$as_me:11434: result: $with_lib_prefix" >&5
11435 echo "${ECHO_T}$with_lib_prefix" >&6
11437 if test "$with_lib_prefix" = auto
11440 case "$cf_cv_system_name" in
11442 if test "$DFT_LWR_MODEL" = libtool; then
11451 (*) LIB_PREFIX='lib'
11454 cf_prefix=$LIB_PREFIX
11456 elif test "$with_lib_prefix" = no
11460 LIB_PREFIX=$with_lib_prefix
11465 ###############################################################################
11467 if test X"$CC_G_OPT" = X"" ; then
11469 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
11472 echo "$as_me:11472: checking for default loader flags" >&5
11473 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
11474 case $DFT_LWR_MODEL in
11475 (normal) LD_MODEL='' ;;
11476 (debug) LD_MODEL=$CC_G_OPT ;;
11477 (profile) LD_MODEL='-pg';;
11478 (shared) LD_MODEL='' ;;
11480 echo "$as_me:11480: result: $LD_MODEL" >&5
11481 echo "${ECHO_T}$LD_MODEL" >&6
11484 if test "x$cf_cv_enable_rpath" != xno
11486 echo "$as_me:11486: checking for an rpath option" >&5
11487 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
11488 case "$cf_cv_system_name" in
11490 if test "$GCC" = yes; then
11491 LD_RPATH_OPT="-Wl,-rpath,"
11493 LD_RPATH_OPT="-rpath "
11496 (linux*|gnu*|k*bsd*-gnu|freebsd*)
11497 LD_RPATH_OPT="-Wl,-rpath,"
11499 (openbsd[2-9].*|mirbsd*)
11500 LD_RPATH_OPT="-Wl,-rpath,"
11503 LD_RPATH_OPT="-rpath "
11506 LD_RPATH_OPT="-Wl,-rpath,"
11509 LD_RPATH_OPT="-rpath "
11517 echo "$as_me:11517: result: $LD_RPATH_OPT" >&5
11518 echo "${ECHO_T}$LD_RPATH_OPT" >&6
11520 case "x$LD_RPATH_OPT" in
11522 echo "$as_me:11522: checking if we need a space after rpath option" >&5
11523 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
11524 cf_save_LIBS="$LIBS"
11526 cf_add_libs="$LIBS"
11529 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11530 # filter duplicates
11531 for cf_add_1lib in $cf_add_0lib; do
11532 for cf_add_2lib in $cf_add_libs; do
11533 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11538 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11540 LIBS="$cf_add_libs"
11542 cat >"conftest.$ac_ext" <<_ACEOF
11543 #line 11543 "configure"
11544 #include "confdefs.h"
11554 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11555 if { (eval echo "$as_me:11555: \"$ac_link\"") >&5
11556 (eval $ac_link) 2>&5
11558 echo "$as_me:11558: \$? = $ac_status" >&5
11559 (exit "$ac_status"); } &&
11560 { ac_try='test -s "conftest$ac_exeext"'
11561 { (eval echo "$as_me:11561: \"$ac_try\"") >&5
11562 (eval $ac_try) 2>&5
11564 echo "$as_me:11564: \$? = $ac_status" >&5
11565 (exit "$ac_status"); }; }; then
11568 echo "$as_me: failed program was:" >&5
11569 cat "conftest.$ac_ext" >&5
11572 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11573 LIBS="$cf_save_LIBS"
11574 echo "$as_me:11574: result: $cf_rpath_space" >&5
11575 echo "${ECHO_T}$cf_rpath_space" >&6
11576 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
11585 INSTALL_LIB="-m 644"
11586 : ${rel_builddir:=.}
11592 cf_cv_do_symlinks=no
11594 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
11596 echo "$as_me:11596: checking if release/abi version should be used for shared libs" >&5
11597 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
11599 # Check whether --with-shlib-version or --without-shlib-version was given.
11600 if test "${with_shlib_version+set}" = set; then
11601 withval="$with_shlib_version"
11602 test -z "$withval" && withval=auto
11605 cf_cv_shlib_version=auto
11608 cf_cv_shlib_version=$withval
11611 echo "$as_me:11611: result: $withval" >&5
11612 echo "${ECHO_T}$withval" >&6
11613 { { echo "$as_me:11613: error: option value must be one of: rel, abi, or auto" >&5
11614 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
11615 { (exit 1); exit 1; }; }
11620 cf_cv_shlib_version=auto
11622 echo "$as_me:11622: result: $cf_cv_shlib_version" >&5
11623 echo "${ECHO_T}$cf_cv_shlib_version" >&6
11625 cf_cv_rm_so_locs=no
11628 # Some less-capable ports of gcc support only -fpic
11632 if test "$GCC" = yes
11636 case "$cf_cv_system_name" in
11637 (*linux*) # e.g., PGI compiler
11643 if test "$cf_try_fPIC" = yes
11645 echo "$as_me:11645: checking which $CC option to use" >&5
11646 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
11647 cf_save_CFLAGS="$CFLAGS"
11648 for CC_SHARED_OPTS in -fPIC -fpic ''
11650 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
11651 cat >"conftest.$ac_ext" <<_ACEOF
11652 #line 11652 "configure"
11653 #include "confdefs.h"
11663 rm -f "conftest.$ac_objext"
11664 if { (eval echo "$as_me:11664: \"$ac_compile\"") >&5
11665 (eval $ac_compile) 2>&5
11667 echo "$as_me:11667: \$? = $ac_status" >&5
11668 (exit "$ac_status"); } &&
11669 { ac_try='test -s "conftest.$ac_objext"'
11670 { (eval echo "$as_me:11670: \"$ac_try\"") >&5
11671 (eval $ac_try) 2>&5
11673 echo "$as_me:11673: \$? = $ac_status" >&5
11674 (exit "$ac_status"); }; }; then
11677 echo "$as_me: failed program was:" >&5
11678 cat "conftest.$ac_ext" >&5
11680 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11682 echo "$as_me:11682: result: $CC_SHARED_OPTS" >&5
11683 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
11684 CFLAGS="$cf_save_CFLAGS"
11687 cf_cv_shlib_version_infix=no
11689 case "$cf_cv_system_name" in
11690 (aix4.3-9*|aix[5-7]*)
11691 if test "$GCC" = yes; then
11692 CC_SHARED_OPTS='-Wl,-brtl'
11693 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11695 CC_SHARED_OPTS='-brtl'
11696 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
11697 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11701 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
11705 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11706 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11707 cf_cv_shlib_version=cygdll
11708 cf_cv_shlib_version_infix=cygdll
11711 cat >mk_shared_lib.sh <<-CF_EOF
11714 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11717 Linking shared library
11718 ** SHARED_LIB \$SHARED_LIB
11719 ** IMPORT_LIB \$IMPORT_LIB
11721 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11723 chmod +x mk_shared_lib.sh
11727 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11728 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11729 cf_cv_shlib_version=msysdll
11730 cf_cv_shlib_version_infix=msysdll
11733 cat >mk_shared_lib.sh <<-CF_EOF
11736 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11739 Linking shared library
11740 ** SHARED_LIB \$SHARED_LIB
11741 ** IMPORT_LIB \$IMPORT_LIB
11743 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11745 chmod +x mk_shared_lib.sh
11748 cf_try_cflags="no-cpp-precomp"
11749 CC_SHARED_OPTS="-dynamic"
11750 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
11751 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
11752 cf_cv_shlib_version_infix=yes
11753 echo "$as_me:11753: checking if ld -search_paths_first works" >&5
11754 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
11755 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
11756 echo $ECHO_N "(cached) $ECHO_C" >&6
11759 cf_save_LDFLAGS=$LDFLAGS
11760 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11761 cat >"conftest.$ac_ext" <<_ACEOF
11762 #line 11762 "configure"
11763 #include "confdefs.h"
11773 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11774 if { (eval echo "$as_me:11774: \"$ac_link\"") >&5
11775 (eval $ac_link) 2>&5
11777 echo "$as_me:11777: \$? = $ac_status" >&5
11778 (exit "$ac_status"); } &&
11779 { ac_try='test -s "conftest$ac_exeext"'
11780 { (eval echo "$as_me:11780: \"$ac_try\"") >&5
11781 (eval $ac_try) 2>&5
11783 echo "$as_me:11783: \$? = $ac_status" >&5
11784 (exit "$ac_status"); }; }; then
11785 cf_cv_ldflags_search_paths_first=yes
11787 echo "$as_me: failed program was:" >&5
11788 cat "conftest.$ac_ext" >&5
11789 cf_cv_ldflags_search_paths_first=no
11791 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11792 LDFLAGS=$cf_save_LDFLAGS
11794 echo "$as_me:11794: result: $cf_cv_ldflags_search_paths_first" >&5
11795 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
11796 if test "$cf_cv_ldflags_search_paths_first" = yes; then
11797 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11802 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11803 if test "$cf_cv_shlib_version" = rel; then
11804 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11806 cf_cv_shared_soname='`basename $@`'
11809 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11812 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
11813 if test "$GCC" != yes; then
11814 CC_SHARED_OPTS='+Z'
11816 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
11817 INSTALL_LIB="-m 555"
11820 # (tested with gcc 2.7.2 -- I don't have c89)
11821 if test "$GCC" = yes; then
11822 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
11824 CC_SHARED_OPTS='+Z'
11825 LD_SHARED_OPTS='-Wl,+b,${libdir}'
11827 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
11828 # HP-UX shared libraries must be executable, and should be
11829 # readonly to exploit a quirk in the memory manager.
11830 INSTALL_LIB="-m 555"
11833 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11834 if test "$cf_cv_shlib_version" = rel; then
11835 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11837 cf_shared_soname='`basename $@`'
11840 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
11843 if test "$cf_cv_enable_rpath" = yes ; then
11844 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11846 # tested with IRIX 5.2 and 'cc'.
11847 if test "$GCC" != yes; then
11848 CC_SHARED_OPTS='-KPIC'
11849 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
11851 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
11853 cf_cv_rm_so_locs=yes
11855 (linux*|gnu*|k*bsd*-gnu)
11856 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11857 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11858 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11860 if test "$cf_cv_enable_rpath" = yes ; then
11861 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11864 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11865 if test "$cf_cv_shlib_version" = rel; then
11866 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11868 cf_cv_shared_soname='`basename $@`'
11871 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11874 cf_cv_shlib_version=msvcdll
11875 cf_cv_shlib_version_infix=msvcdll
11878 if test "$DFT_LWR_MODEL" = "shared" ; then
11879 LOCAL_LDFLAGS="-link -dll"
11880 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11881 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
11884 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
11885 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
11886 cat >mk_shared_lib.sh <<-CF_EOF
11889 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
11894 Linking shared library
11895 ** SHARED LIB \$SHARED_LIB
11896 ** IMPORT_LIB \$IMPORT_LIB
11898 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
11899 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
11900 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
11902 chmod +x mk_shared_lib.sh
11903 cat >mk_prog.sh <<-CF_EOF
11906 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
11909 ldopts=("/subsystem:console")
11912 while test \$# -gt 0; do
11915 # ignore -link argument
11918 # ignore runtime-library option
11933 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
11936 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
11942 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
11943 ldopts+=("\${linkarg}")
11951 ldopts+=("-out:\$1")
11960 if [ "\$isdll" -ne 0 ]; then
11961 for lib in \${libs[*]}; do
11962 ldopts+=("\$lib.dll.lib")
11965 for lib in \${libs[*]}; do
11966 ldopts+=("\$lib.lib")
11971 ** ld options: "\${ldopts[@]}"
11973 exec \$LD \${ldopts[@]}
11975 chmod +x mk_prog.sh
11976 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
11977 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
11980 cf_cv_shlib_version=mingw
11981 cf_cv_shlib_version_infix=mingw
11984 if test "$DFT_LWR_MODEL" = "shared" ; then
11985 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
11986 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11987 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
11990 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11991 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11992 cat >mk_shared_lib.sh <<-CF_EOF
11995 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
11998 Linking shared library
11999 ** SHARED_LIB \$SHARED_LIB
12000 ** IMPORT_LIB \$IMPORT_LIB
12002 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
12004 chmod +x mk_shared_lib.sh
12006 (openbsd[2-9].*|mirbsd*)
12007 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12008 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12009 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12011 if test "$cf_cv_enable_rpath" = yes ; then
12012 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12014 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12016 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12017 if test "$cf_cv_shlib_version" = rel; then
12018 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12020 cf_cv_shared_soname='`basename $@`'
12023 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12027 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
12031 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
12033 (nto-qnx*|openbsd*|freebsd[12].*)
12034 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12035 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
12036 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12038 (dragonfly*|freebsd*)
12039 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12040 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12041 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12042 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
12043 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12046 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12047 if test "$cf_cv_shlib_version" = rel; then
12048 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12050 cf_cv_shared_soname='`basename $@`'
12053 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12056 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12057 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12058 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12059 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12060 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12061 if test "$cf_cv_shlib_version" = auto; then
12062 if test -f /usr/libexec/ld.elf_so; then
12063 cf_cv_shlib_version=abi
12065 cf_cv_shlib_version=rel
12069 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12070 if test "$cf_cv_shlib_version" = rel; then
12071 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12073 cf_cv_shared_soname='`basename $@`'
12076 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
12078 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
12082 # tested with OSF/1 V3.2 and 'cc'
12083 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
12084 # link with shared libs).
12085 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
12088 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
12091 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
12092 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12093 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12094 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12096 cf_cv_rm_so_locs=yes
12098 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
12099 # tested with osr5.0.5
12100 if test "$GCC" != yes; then
12101 CC_SHARED_OPTS='-belf -KPIC'
12103 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
12104 if test "$cf_cv_enable_rpath" = yes ; then
12105 # only way is to set LD_RUN_PATH but no switch for it
12108 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12109 LINK_PROGS='LD_RUN_PATH=${libdir}'
12110 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
12113 # tested with SunOS 4.1.1 and gcc 2.7.0
12114 if test "$GCC" != yes; then
12115 CC_SHARED_OPTS='-KPIC'
12117 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
12118 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12121 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
12122 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
12123 if test "$DFT_LWR_MODEL" = "shared" ; then
12124 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
12125 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12127 if test "$cf_cv_enable_rpath" = yes ; then
12128 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
12131 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12132 if test "$cf_cv_shlib_version" = rel; then
12133 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12135 cf_cv_shared_soname='`basename $@`'
12138 if test "$GCC" != yes; then
12139 cf_save_CFLAGS="$CFLAGS"
12140 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
12142 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
12143 cat >"conftest.$ac_ext" <<_ACEOF
12144 #line 12144 "configure"
12145 #include "confdefs.h"
12150 printf("Hello\\n");
12155 rm -f "conftest.$ac_objext"
12156 if { (eval echo "$as_me:12156: \"$ac_compile\"") >&5
12157 (eval $ac_compile) 2>&5
12159 echo "$as_me:12159: \$? = $ac_status" >&5
12160 (exit "$ac_status"); } &&
12161 { ac_try='test -s "conftest.$ac_objext"'
12162 { (eval echo "$as_me:12162: \"$ac_try\"") >&5
12163 (eval $ac_try) 2>&5
12165 echo "$as_me:12165: \$? = $ac_status" >&5
12166 (exit "$ac_status"); }; }; then
12169 echo "$as_me: failed program was:" >&5
12170 cat "conftest.$ac_ext" >&5
12172 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12174 CFLAGS="$cf_save_CFLAGS"
12175 CC_SHARED_OPTS=$cf_shared_opts
12176 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
12178 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
12181 (sysv5uw7*|unix_sv*)
12182 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
12183 if test "$GCC" != yes; then
12184 CC_SHARED_OPTS='-KPIC'
12186 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
12189 CC_SHARED_OPTS='unknown'
12190 MK_SHARED_LIB='echo unknown'
12194 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
12195 case "$cf_cv_shlib_version" in
12197 case "$MK_SHARED_LIB" in
12199 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
12202 { echo "$as_me:12202: WARNING: ignored --with-shlib-version" >&5
12203 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
12209 if test -n "$cf_try_cflags"
12211 cat > conftest.$ac_ext <<EOF
12212 #line 12212 "${as_me:-configure}"
12214 int main(int argc, char *argv[])
12216 printf("hello\\n");
12217 return (argv[argc-1] == 0) ;
12220 cf_save_CFLAGS="$CFLAGS"
12221 for cf_opt in $cf_try_cflags
12223 CFLAGS="$cf_save_CFLAGS -$cf_opt"
12224 echo "$as_me:12224: checking if CFLAGS option -$cf_opt works" >&5
12225 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
12226 if { (eval echo "$as_me:12226: \"$ac_compile\"") >&5
12227 (eval $ac_compile) 2>&5
12229 echo "$as_me:12229: \$? = $ac_status" >&5
12230 (exit "$ac_status"); }; then
12231 echo "$as_me:12231: result: yes" >&5
12232 echo "${ECHO_T}yes" >&6
12233 cf_save_CFLAGS="$CFLAGS"
12235 echo "$as_me:12235: result: no" >&5
12236 echo "${ECHO_T}no" >&6
12239 CFLAGS="$cf_save_CFLAGS"
12242 # RPATH_LIST is a colon-separated list of directories
12243 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
12244 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
12246 test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
12248 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
12250 echo "${as_me:-configure}:12250: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
12252 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
12254 echo "${as_me:-configure}:12254: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
12256 # The test/sample programs in the original tree link using rpath option.
12257 # Make it optional for packagers.
12258 if test -n "$LOCAL_LDFLAGS"
12260 echo "$as_me:12260: checking if you want to link sample programs with rpath option" >&5
12261 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
12263 # Check whether --enable-rpath-link or --disable-rpath-link was given.
12264 if test "${enable_rpath_link+set}" = set; then
12265 enableval="$enable_rpath_link"
12266 with_rpath_link=$enableval
12268 with_rpath_link=yes
12270 echo "$as_me:12270: result: $with_rpath_link" >&5
12271 echo "${ECHO_T}$with_rpath_link" >&6
12272 if test "$with_rpath_link" = no
12279 ###############################################################################
12281 ### use option --enable-broken-linker to force on use of broken-linker support
12283 echo "$as_me:12283: checking if you want broken-linker support code" >&5
12284 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
12286 # Check whether --enable-broken_linker or --disable-broken_linker was given.
12287 if test "${enable_broken_linker+set}" = set; then
12288 enableval="$enable_broken_linker"
12289 with_broken_linker=$enableval
12291 with_broken_linker=no
12293 echo "$as_me:12293: result: $with_broken_linker" >&5
12294 echo "${ECHO_T}$with_broken_linker" >&6
12296 : "${BROKEN_LINKER:=0}"
12297 if test "x$with_broken_linker" = xyes ; then
12299 cat >>confdefs.h <<\EOF
12300 #define BROKEN_LINKER 1
12306 # Check to define _XOPEN_SOURCE "automatically"
12308 echo "$as_me:12308: checking if the POSIX test-macros are already defined" >&5
12309 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
12310 if test "${cf_cv_posix_visible+set}" = set; then
12311 echo $ECHO_N "(cached) $ECHO_C" >&6
12314 cat >"conftest.$ac_ext" <<_ACEOF
12315 #line 12315 "configure"
12316 #include "confdefs.h"
12322 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
12323 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
12324 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
12325 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
12326 #error conflicting symbols found
12333 rm -f "conftest.$ac_objext"
12334 if { (eval echo "$as_me:12334: \"$ac_compile\"") >&5
12335 (eval $ac_compile) 2>&5
12337 echo "$as_me:12337: \$? = $ac_status" >&5
12338 (exit "$ac_status"); } &&
12339 { ac_try='test -s "conftest.$ac_objext"'
12340 { (eval echo "$as_me:12340: \"$ac_try\"") >&5
12341 (eval $ac_try) 2>&5
12343 echo "$as_me:12343: \$? = $ac_status" >&5
12344 (exit "$ac_status"); }; }; then
12345 cf_cv_posix_visible=no
12347 echo "$as_me: failed program was:" >&5
12348 cat "conftest.$ac_ext" >&5
12349 cf_cv_posix_visible=yes
12351 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12354 echo "$as_me:12354: result: $cf_cv_posix_visible" >&5
12355 echo "${ECHO_T}$cf_cv_posix_visible" >&6
12357 if test "$cf_cv_posix_visible" = no; then
12359 cf_XOPEN_SOURCE=600
12360 cf_POSIX_C_SOURCE=199506L
12365 cf_xopen_source="-D_ALL_SOURCE"
12368 cf_XOPEN_SOURCE=600
12371 cf_xopen_source="-D_APPLE_C_SOURCE"
12374 cf_xopen_source="-D_DARWIN_C_SOURCE"
12377 (freebsd*|dragonfly*|midnightbsd*)
12378 # 5.x headers associate
12379 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
12380 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
12381 cf_POSIX_C_SOURCE=200112L
12382 cf_XOPEN_SOURCE=600
12383 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12386 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
12389 cf_xopen_source="-D_HPUX_SOURCE"
12392 cf_xopen_source="-D_SGI_SOURCE"
12395 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
12397 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
12399 echo "$as_me:12399: checking if this is the GNU C library" >&5
12400 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
12401 if test "${cf_cv_gnu_library+set}" = set; then
12402 echo $ECHO_N "(cached) $ECHO_C" >&6
12405 cat >"conftest.$ac_ext" <<_ACEOF
12406 #line 12406 "configure"
12407 #include "confdefs.h"
12408 #include <sys/types.h>
12413 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
12415 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
12418 # error not GNU C library
12424 rm -f "conftest.$ac_objext"
12425 if { (eval echo "$as_me:12425: \"$ac_compile\"") >&5
12426 (eval $ac_compile) 2>&5
12428 echo "$as_me:12428: \$? = $ac_status" >&5
12429 (exit "$ac_status"); } &&
12430 { ac_try='test -s "conftest.$ac_objext"'
12431 { (eval echo "$as_me:12431: \"$ac_try\"") >&5
12432 (eval $ac_try) 2>&5
12434 echo "$as_me:12434: \$? = $ac_status" >&5
12435 (exit "$ac_status"); }; }; then
12436 cf_cv_gnu_library=yes
12438 echo "$as_me: failed program was:" >&5
12439 cat "conftest.$ac_ext" >&5
12440 cf_cv_gnu_library=no
12442 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12445 echo "$as_me:12445: result: $cf_cv_gnu_library" >&5
12446 echo "${ECHO_T}$cf_cv_gnu_library" >&6
12448 if test x$cf_cv_gnu_library = xyes; then
12450 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
12451 # was changed to help a little. newlib incorporated the change about 4
12453 echo "$as_me:12453: checking if _DEFAULT_SOURCE can be used as a basis" >&5
12454 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
12455 if test "${cf_cv_gnu_library_219+set}" = set; then
12456 echo $ECHO_N "(cached) $ECHO_C" >&6
12459 cf_save="$CPPFLAGS"
12461 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12462 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12464 cat >"conftest.$ac_ext" <<_ACEOF
12465 #line 12465 "configure"
12466 #include "confdefs.h"
12467 #include <sys/types.h>
12472 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
12474 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
12477 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
12483 rm -f "conftest.$ac_objext"
12484 if { (eval echo "$as_me:12484: \"$ac_compile\"") >&5
12485 (eval $ac_compile) 2>&5
12487 echo "$as_me:12487: \$? = $ac_status" >&5
12488 (exit "$ac_status"); } &&
12489 { ac_try='test -s "conftest.$ac_objext"'
12490 { (eval echo "$as_me:12490: \"$ac_try\"") >&5
12491 (eval $ac_try) 2>&5
12493 echo "$as_me:12493: \$? = $ac_status" >&5
12494 (exit "$ac_status"); }; }; then
12495 cf_cv_gnu_library_219=yes
12497 echo "$as_me: failed program was:" >&5
12498 cat "conftest.$ac_ext" >&5
12499 cf_cv_gnu_library_219=no
12501 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12502 CPPFLAGS="$cf_save"
12505 echo "$as_me:12505: result: $cf_cv_gnu_library_219" >&5
12506 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
12508 if test "x$cf_cv_gnu_library_219" = xyes; then
12509 cf_save="$CPPFLAGS"
12510 echo "$as_me:12510: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
12511 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
12512 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
12513 echo $ECHO_N "(cached) $ECHO_C" >&6
12519 cf_new_extra_cppflags=
12521 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
12523 case "$cf_fix_cppflags" in
12525 case "$cf_add_cflags" in
12526 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12527 case "$cf_add_cflags" in
12529 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12531 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12532 && test -z "${cf_tst_cflags}" \
12533 && cf_fix_cppflags=yes
12535 if test "$cf_fix_cppflags" = yes ; then
12537 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12538 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12541 elif test "${cf_tst_cflags}" = "\"'" ; then
12543 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12544 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12550 case "$CPPFLAGS" in
12554 case "$cf_add_cflags" in
12556 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12558 CPPFLAGS=`echo "$CPPFLAGS" | \
12559 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12560 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12565 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12566 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12573 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12574 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12581 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12582 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12584 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12586 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12587 && test -z "${cf_tst_cflags}" \
12588 && cf_fix_cppflags=no
12593 if test -n "$cf_new_cflags" ; then
12595 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12596 CFLAGS="${CFLAGS}$cf_new_cflags"
12600 if test -n "$cf_new_cppflags" ; then
12602 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12603 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12607 if test -n "$cf_new_extra_cppflags" ; then
12609 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12610 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12614 cat >"conftest.$ac_ext" <<_ACEOF
12615 #line 12615 "configure"
12616 #include "confdefs.h"
12618 #include <limits.h>
12619 #include <sys/types.h>
12625 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
12628 # error GNU C library is too old
12634 rm -f "conftest.$ac_objext"
12635 if { (eval echo "$as_me:12635: \"$ac_compile\"") >&5
12636 (eval $ac_compile) 2>&5
12638 echo "$as_me:12638: \$? = $ac_status" >&5
12639 (exit "$ac_status"); } &&
12640 { ac_try='test -s "conftest.$ac_objext"'
12641 { (eval echo "$as_me:12641: \"$ac_try\"") >&5
12642 (eval $ac_try) 2>&5
12644 echo "$as_me:12644: \$? = $ac_status" >&5
12645 (exit "$ac_status"); }; }; then
12646 cf_cv_gnu_dftsrc_219=yes
12648 echo "$as_me: failed program was:" >&5
12649 cat "conftest.$ac_ext" >&5
12650 cf_cv_gnu_dftsrc_219=no
12652 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12655 echo "$as_me:12655: result: $cf_cv_gnu_dftsrc_219" >&5
12656 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
12657 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
12659 cf_cv_gnu_dftsrc_219=maybe
12662 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
12664 echo "$as_me:12664: checking if we must define _GNU_SOURCE" >&5
12665 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
12666 if test "${cf_cv_gnu_source+set}" = set; then
12667 echo $ECHO_N "(cached) $ECHO_C" >&6
12670 cat >"conftest.$ac_ext" <<_ACEOF
12671 #line 12671 "configure"
12672 #include "confdefs.h"
12673 #include <sys/types.h>
12678 #ifndef _XOPEN_SOURCE
12679 #error expected _XOPEN_SOURCE to be defined
12685 rm -f "conftest.$ac_objext"
12686 if { (eval echo "$as_me:12686: \"$ac_compile\"") >&5
12687 (eval $ac_compile) 2>&5
12689 echo "$as_me:12689: \$? = $ac_status" >&5
12690 (exit "$ac_status"); } &&
12691 { ac_try='test -s "conftest.$ac_objext"'
12692 { (eval echo "$as_me:12692: \"$ac_try\"") >&5
12693 (eval $ac_try) 2>&5
12695 echo "$as_me:12695: \$? = $ac_status" >&5
12696 (exit "$ac_status"); }; }; then
12697 cf_cv_gnu_source=no
12699 echo "$as_me: failed program was:" >&5
12700 cat "conftest.$ac_ext" >&5
12701 cf_save="$CPPFLAGS"
12706 cf_new_extra_cppflags=
12708 for cf_add_cflags in -D_GNU_SOURCE
12710 case "$cf_fix_cppflags" in
12712 case "$cf_add_cflags" in
12713 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12714 case "$cf_add_cflags" in
12716 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12718 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12719 && test -z "${cf_tst_cflags}" \
12720 && cf_fix_cppflags=yes
12722 if test "$cf_fix_cppflags" = yes ; then
12724 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12725 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12728 elif test "${cf_tst_cflags}" = "\"'" ; then
12730 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12731 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12737 case "$CPPFLAGS" in
12741 case "$cf_add_cflags" in
12743 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12745 CPPFLAGS=`echo "$CPPFLAGS" | \
12746 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12747 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12752 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12753 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12760 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12761 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12768 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12769 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12771 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12773 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12774 && test -z "${cf_tst_cflags}" \
12775 && cf_fix_cppflags=no
12780 if test -n "$cf_new_cflags" ; then
12782 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12783 CFLAGS="${CFLAGS}$cf_new_cflags"
12787 if test -n "$cf_new_cppflags" ; then
12789 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12790 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12794 if test -n "$cf_new_extra_cppflags" ; then
12796 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12797 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12801 cat >"conftest.$ac_ext" <<_ACEOF
12802 #line 12802 "configure"
12803 #include "confdefs.h"
12804 #include <sys/types.h>
12809 #ifdef _XOPEN_SOURCE
12810 #error expected _XOPEN_SOURCE to be undefined
12816 rm -f "conftest.$ac_objext"
12817 if { (eval echo "$as_me:12817: \"$ac_compile\"") >&5
12818 (eval $ac_compile) 2>&5
12820 echo "$as_me:12820: \$? = $ac_status" >&5
12821 (exit "$ac_status"); } &&
12822 { ac_try='test -s "conftest.$ac_objext"'
12823 { (eval echo "$as_me:12823: \"$ac_try\"") >&5
12824 (eval $ac_try) 2>&5
12826 echo "$as_me:12826: \$? = $ac_status" >&5
12827 (exit "$ac_status"); }; }; then
12828 cf_cv_gnu_source=no
12830 echo "$as_me: failed program was:" >&5
12831 cat "conftest.$ac_ext" >&5
12832 cf_cv_gnu_source=yes
12834 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12835 CPPFLAGS="$cf_save"
12838 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12841 echo "$as_me:12841: result: $cf_cv_gnu_source" >&5
12842 echo "${ECHO_T}$cf_cv_gnu_source" >&6
12844 if test "$cf_cv_gnu_source" = yes
12846 echo "$as_me:12846: checking if we should also define _DEFAULT_SOURCE" >&5
12847 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
12848 if test "${cf_cv_default_source+set}" = set; then
12849 echo $ECHO_N "(cached) $ECHO_C" >&6
12852 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12853 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
12855 cat >"conftest.$ac_ext" <<_ACEOF
12856 #line 12856 "configure"
12857 #include "confdefs.h"
12858 #include <sys/types.h>
12863 #ifdef _DEFAULT_SOURCE
12864 #error expected _DEFAULT_SOURCE to be undefined
12870 rm -f "conftest.$ac_objext"
12871 if { (eval echo "$as_me:12871: \"$ac_compile\"") >&5
12872 (eval $ac_compile) 2>&5
12874 echo "$as_me:12874: \$? = $ac_status" >&5
12875 (exit "$ac_status"); } &&
12876 { ac_try='test -s "conftest.$ac_objext"'
12877 { (eval echo "$as_me:12877: \"$ac_try\"") >&5
12878 (eval $ac_try) 2>&5
12880 echo "$as_me:12880: \$? = $ac_status" >&5
12881 (exit "$ac_status"); }; }; then
12882 cf_cv_default_source=no
12884 echo "$as_me: failed program was:" >&5
12885 cat "conftest.$ac_ext" >&5
12886 cf_cv_default_source=yes
12888 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12891 echo "$as_me:12891: result: $cf_cv_default_source" >&5
12892 echo "${ECHO_T}$cf_cv_default_source" >&6
12893 if test "$cf_cv_default_source" = yes
12896 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12897 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12907 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
12910 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
12913 if test "$cf_cv_posix_visible" = no; then
12915 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
12917 cf_save_CFLAGS="$CFLAGS"
12918 cf_save_CPPFLAGS="$CPPFLAGS"
12920 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
12921 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12922 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12924 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
12925 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12926 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12928 echo "$as_me:12928: checking if we should define _POSIX_C_SOURCE" >&5
12929 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
12930 if test "${cf_cv_posix_c_source+set}" = set; then
12931 echo $ECHO_N "(cached) $ECHO_C" >&6
12934 echo "${as_me:-configure}:12934: testing if the symbol is already defined go no further ..." 1>&5
12936 cat >"conftest.$ac_ext" <<_ACEOF
12937 #line 12937 "configure"
12938 #include "confdefs.h"
12939 #include <sys/types.h>
12944 #ifndef _POSIX_C_SOURCE
12951 rm -f "conftest.$ac_objext"
12952 if { (eval echo "$as_me:12952: \"$ac_compile\"") >&5
12953 (eval $ac_compile) 2>&5
12955 echo "$as_me:12955: \$? = $ac_status" >&5
12956 (exit "$ac_status"); } &&
12957 { ac_try='test -s "conftest.$ac_objext"'
12958 { (eval echo "$as_me:12958: \"$ac_try\"") >&5
12959 (eval $ac_try) 2>&5
12961 echo "$as_me:12961: \$? = $ac_status" >&5
12962 (exit "$ac_status"); }; }; then
12963 cf_cv_posix_c_source=no
12965 echo "$as_me: failed program was:" >&5
12966 cat "conftest.$ac_ext" >&5
12967 cf_want_posix_source=no
12968 case .$cf_POSIX_C_SOURCE in
12970 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12973 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12974 cf_want_posix_source=yes
12977 cf_want_posix_source=yes
12980 if test "$cf_want_posix_source" = yes ; then
12981 cat >"conftest.$ac_ext" <<_ACEOF
12982 #line 12982 "configure"
12983 #include "confdefs.h"
12984 #include <sys/types.h>
12989 #ifdef _POSIX_SOURCE
12996 rm -f "conftest.$ac_objext"
12997 if { (eval echo "$as_me:12997: \"$ac_compile\"") >&5
12998 (eval $ac_compile) 2>&5
13000 echo "$as_me:13000: \$? = $ac_status" >&5
13001 (exit "$ac_status"); } &&
13002 { ac_try='test -s "conftest.$ac_objext"'
13003 { (eval echo "$as_me:13003: \"$ac_try\"") >&5
13004 (eval $ac_try) 2>&5
13006 echo "$as_me:13006: \$? = $ac_status" >&5
13007 (exit "$ac_status"); }; }; then
13010 echo "$as_me: failed program was:" >&5
13011 cat "conftest.$ac_ext" >&5
13012 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13014 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13017 echo "${as_me:-configure}:13017: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13019 CFLAGS="$cf_trim_CFLAGS"
13020 CPPFLAGS="$cf_trim_CPPFLAGS"
13022 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13023 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13025 echo "${as_me:-configure}:13025: testing if the second compile does not leave our definition intact error ..." 1>&5
13027 cat >"conftest.$ac_ext" <<_ACEOF
13028 #line 13028 "configure"
13029 #include "confdefs.h"
13030 #include <sys/types.h>
13035 #ifndef _POSIX_C_SOURCE
13042 rm -f "conftest.$ac_objext"
13043 if { (eval echo "$as_me:13043: \"$ac_compile\"") >&5
13044 (eval $ac_compile) 2>&5
13046 echo "$as_me:13046: \$? = $ac_status" >&5
13047 (exit "$ac_status"); } &&
13048 { ac_try='test -s "conftest.$ac_objext"'
13049 { (eval echo "$as_me:13049: \"$ac_try\"") >&5
13050 (eval $ac_try) 2>&5
13052 echo "$as_me:13052: \$? = $ac_status" >&5
13053 (exit "$ac_status"); }; }; then
13056 echo "$as_me: failed program was:" >&5
13057 cat "conftest.$ac_ext" >&5
13058 cf_cv_posix_c_source=no
13060 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13061 CFLAGS="$cf_save_CFLAGS"
13062 CPPFLAGS="$cf_save_CPPFLAGS"
13065 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13068 echo "$as_me:13068: result: $cf_cv_posix_c_source" >&5
13069 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13071 if test "$cf_cv_posix_c_source" != no ; then
13072 CFLAGS="$cf_trim_CFLAGS"
13073 CPPFLAGS="$cf_trim_CPPFLAGS"
13078 cf_new_extra_cppflags=
13080 for cf_add_cflags in $cf_cv_posix_c_source
13082 case "$cf_fix_cppflags" in
13084 case "$cf_add_cflags" in
13085 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13086 case "$cf_add_cflags" in
13088 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13090 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13091 && test -z "${cf_tst_cflags}" \
13092 && cf_fix_cppflags=yes
13094 if test "$cf_fix_cppflags" = yes ; then
13096 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13097 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13100 elif test "${cf_tst_cflags}" = "\"'" ; then
13102 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13103 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13109 case "$CPPFLAGS" in
13113 case "$cf_add_cflags" in
13115 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13117 CPPFLAGS=`echo "$CPPFLAGS" | \
13118 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13119 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13124 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13125 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13132 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13133 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13140 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13141 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13143 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13145 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13146 && test -z "${cf_tst_cflags}" \
13147 && cf_fix_cppflags=no
13152 if test -n "$cf_new_cflags" ; then
13154 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13155 CFLAGS="${CFLAGS}$cf_new_cflags"
13159 if test -n "$cf_new_cppflags" ; then
13161 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13162 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13166 if test -n "$cf_new_extra_cppflags" ; then
13168 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13169 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13175 fi # cf_cv_posix_visible
13179 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
13182 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
13183 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
13184 # Abusing the conformance level is a workaround.
13185 { echo "$as_me:13185: WARNING: this system does not provide usable locale support" >&5
13186 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
13187 cf_xopen_source="-D_BSD_SOURCE"
13188 cf_XOPEN_SOURCE=700
13191 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
13192 cf_xopen_source="-D_BSD_SOURCE"
13193 cf_XOPEN_SOURCE=600
13196 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
13199 cf_xopen_source="-D_OSF_SOURCE"
13202 cf_xopen_source="-D_QNX_SOURCE"
13205 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
13208 cf_xopen_source="-D__EXTENSIONS__"
13209 cf_cv_xopen_source=broken
13211 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
13217 echo "$as_me:13217: checking if we should define _XOPEN_SOURCE" >&5
13218 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13219 if test "${cf_cv_xopen_source+set}" = set; then
13220 echo $ECHO_N "(cached) $ECHO_C" >&6
13223 cat >"conftest.$ac_ext" <<_ACEOF
13224 #line 13224 "configure"
13225 #include "confdefs.h"
13227 #include <stdlib.h>
13228 #include <string.h>
13229 #include <sys/types.h>
13235 #ifndef _XOPEN_SOURCE
13242 rm -f "conftest.$ac_objext"
13243 if { (eval echo "$as_me:13243: \"$ac_compile\"") >&5
13244 (eval $ac_compile) 2>&5
13246 echo "$as_me:13246: \$? = $ac_status" >&5
13247 (exit "$ac_status"); } &&
13248 { ac_try='test -s "conftest.$ac_objext"'
13249 { (eval echo "$as_me:13249: \"$ac_try\"") >&5
13250 (eval $ac_try) 2>&5
13252 echo "$as_me:13252: \$? = $ac_status" >&5
13253 (exit "$ac_status"); }; }; then
13254 cf_cv_xopen_source=no
13256 echo "$as_me: failed program was:" >&5
13257 cat "conftest.$ac_ext" >&5
13258 cf_save="$CPPFLAGS"
13260 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13261 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13263 cat >"conftest.$ac_ext" <<_ACEOF
13264 #line 13264 "configure"
13265 #include "confdefs.h"
13267 #include <stdlib.h>
13268 #include <string.h>
13269 #include <sys/types.h>
13275 #ifdef _XOPEN_SOURCE
13282 rm -f "conftest.$ac_objext"
13283 if { (eval echo "$as_me:13283: \"$ac_compile\"") >&5
13284 (eval $ac_compile) 2>&5
13286 echo "$as_me:13286: \$? = $ac_status" >&5
13287 (exit "$ac_status"); } &&
13288 { ac_try='test -s "conftest.$ac_objext"'
13289 { (eval echo "$as_me:13289: \"$ac_try\"") >&5
13290 (eval $ac_try) 2>&5
13292 echo "$as_me:13292: \$? = $ac_status" >&5
13293 (exit "$ac_status"); }; }; then
13294 cf_cv_xopen_source=no
13296 echo "$as_me: failed program was:" >&5
13297 cat "conftest.$ac_ext" >&5
13298 cf_cv_xopen_source=$cf_XOPEN_SOURCE
13300 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13301 CPPFLAGS="$cf_save"
13304 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13307 echo "$as_me:13307: result: $cf_cv_xopen_source" >&5
13308 echo "${ECHO_T}$cf_cv_xopen_source" >&6
13310 if test "$cf_cv_xopen_source" != no ; then
13312 CFLAGS=`echo "$CFLAGS" | \
13313 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13314 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13316 CPPFLAGS=`echo "$CPPFLAGS" | \
13317 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13318 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13320 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13322 for cf_add_cflags in $cf_temp_xopen_source
13324 case "x$cf_add_cflags" in
13327 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13330 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
13331 test "$CFLAGS" != "$cf_old_cflag" || break
13333 CFLAGS="$cf_old_cflag"
13336 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13339 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
13340 test "$CPPFLAGS" != "$cf_old_cflag" || break
13342 CPPFLAGS="$cf_old_cflag"
13351 cf_new_extra_cppflags=
13353 for cf_add_cflags in $cf_add_cflags
13355 case "$cf_fix_cppflags" in
13357 case "$cf_add_cflags" in
13358 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13359 case "$cf_add_cflags" in
13361 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13363 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13364 && test -z "${cf_tst_cflags}" \
13365 && cf_fix_cppflags=yes
13367 if test "$cf_fix_cppflags" = yes ; then
13369 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13370 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13373 elif test "${cf_tst_cflags}" = "\"'" ; then
13375 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13376 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13382 case "$CPPFLAGS" in
13386 case "$cf_add_cflags" in
13388 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13390 CPPFLAGS=`echo "$CPPFLAGS" | \
13391 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13392 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13397 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13398 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13405 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13406 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13413 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13414 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13416 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13418 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13419 && test -z "${cf_tst_cflags}" \
13420 && cf_fix_cppflags=no
13425 if test -n "$cf_new_cflags" ; then
13427 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13428 CFLAGS="${CFLAGS}$cf_new_cflags"
13432 if test -n "$cf_new_cppflags" ; then
13434 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13435 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13439 if test -n "$cf_new_extra_cppflags" ; then
13441 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13442 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13450 if test "$cf_cv_posix_visible" = no; then
13452 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
13454 cf_save_CFLAGS="$CFLAGS"
13455 cf_save_CPPFLAGS="$CPPFLAGS"
13457 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13458 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13459 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13461 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13462 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13463 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13465 echo "$as_me:13465: checking if we should define _POSIX_C_SOURCE" >&5
13466 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13467 if test "${cf_cv_posix_c_source+set}" = set; then
13468 echo $ECHO_N "(cached) $ECHO_C" >&6
13471 echo "${as_me:-configure}:13471: testing if the symbol is already defined go no further ..." 1>&5
13473 cat >"conftest.$ac_ext" <<_ACEOF
13474 #line 13474 "configure"
13475 #include "confdefs.h"
13476 #include <sys/types.h>
13481 #ifndef _POSIX_C_SOURCE
13488 rm -f "conftest.$ac_objext"
13489 if { (eval echo "$as_me:13489: \"$ac_compile\"") >&5
13490 (eval $ac_compile) 2>&5
13492 echo "$as_me:13492: \$? = $ac_status" >&5
13493 (exit "$ac_status"); } &&
13494 { ac_try='test -s "conftest.$ac_objext"'
13495 { (eval echo "$as_me:13495: \"$ac_try\"") >&5
13496 (eval $ac_try) 2>&5
13498 echo "$as_me:13498: \$? = $ac_status" >&5
13499 (exit "$ac_status"); }; }; then
13500 cf_cv_posix_c_source=no
13502 echo "$as_me: failed program was:" >&5
13503 cat "conftest.$ac_ext" >&5
13504 cf_want_posix_source=no
13505 case .$cf_POSIX_C_SOURCE in
13507 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13510 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13511 cf_want_posix_source=yes
13514 cf_want_posix_source=yes
13517 if test "$cf_want_posix_source" = yes ; then
13518 cat >"conftest.$ac_ext" <<_ACEOF
13519 #line 13519 "configure"
13520 #include "confdefs.h"
13521 #include <sys/types.h>
13526 #ifdef _POSIX_SOURCE
13533 rm -f "conftest.$ac_objext"
13534 if { (eval echo "$as_me:13534: \"$ac_compile\"") >&5
13535 (eval $ac_compile) 2>&5
13537 echo "$as_me:13537: \$? = $ac_status" >&5
13538 (exit "$ac_status"); } &&
13539 { ac_try='test -s "conftest.$ac_objext"'
13540 { (eval echo "$as_me:13540: \"$ac_try\"") >&5
13541 (eval $ac_try) 2>&5
13543 echo "$as_me:13543: \$? = $ac_status" >&5
13544 (exit "$ac_status"); }; }; then
13547 echo "$as_me: failed program was:" >&5
13548 cat "conftest.$ac_ext" >&5
13549 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13551 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13554 echo "${as_me:-configure}:13554: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13556 CFLAGS="$cf_trim_CFLAGS"
13557 CPPFLAGS="$cf_trim_CPPFLAGS"
13559 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13560 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13562 echo "${as_me:-configure}:13562: testing if the second compile does not leave our definition intact error ..." 1>&5
13564 cat >"conftest.$ac_ext" <<_ACEOF
13565 #line 13565 "configure"
13566 #include "confdefs.h"
13567 #include <sys/types.h>
13572 #ifndef _POSIX_C_SOURCE
13579 rm -f "conftest.$ac_objext"
13580 if { (eval echo "$as_me:13580: \"$ac_compile\"") >&5
13581 (eval $ac_compile) 2>&5
13583 echo "$as_me:13583: \$? = $ac_status" >&5
13584 (exit "$ac_status"); } &&
13585 { ac_try='test -s "conftest.$ac_objext"'
13586 { (eval echo "$as_me:13586: \"$ac_try\"") >&5
13587 (eval $ac_try) 2>&5
13589 echo "$as_me:13589: \$? = $ac_status" >&5
13590 (exit "$ac_status"); }; }; then
13593 echo "$as_me: failed program was:" >&5
13594 cat "conftest.$ac_ext" >&5
13595 cf_cv_posix_c_source=no
13597 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13598 CFLAGS="$cf_save_CFLAGS"
13599 CPPFLAGS="$cf_save_CPPFLAGS"
13602 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13605 echo "$as_me:13605: result: $cf_cv_posix_c_source" >&5
13606 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13608 if test "$cf_cv_posix_c_source" != no ; then
13609 CFLAGS="$cf_trim_CFLAGS"
13610 CPPFLAGS="$cf_trim_CPPFLAGS"
13615 cf_new_extra_cppflags=
13617 for cf_add_cflags in $cf_cv_posix_c_source
13619 case "$cf_fix_cppflags" in
13621 case "$cf_add_cflags" in
13622 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13623 case "$cf_add_cflags" in
13625 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13627 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13628 && test -z "${cf_tst_cflags}" \
13629 && cf_fix_cppflags=yes
13631 if test "$cf_fix_cppflags" = yes ; then
13633 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13634 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13637 elif test "${cf_tst_cflags}" = "\"'" ; then
13639 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13640 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13646 case "$CPPFLAGS" in
13650 case "$cf_add_cflags" in
13652 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13654 CPPFLAGS=`echo "$CPPFLAGS" | \
13655 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13656 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13661 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13662 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13669 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13670 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13677 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13678 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13680 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13682 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13683 && test -z "${cf_tst_cflags}" \
13684 && cf_fix_cppflags=no
13689 if test -n "$cf_new_cflags" ; then
13691 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13692 CFLAGS="${CFLAGS}$cf_new_cflags"
13696 if test -n "$cf_new_cppflags" ; then
13698 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13699 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13703 if test -n "$cf_new_extra_cppflags" ; then
13705 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13706 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13712 fi # cf_cv_posix_visible
13717 if test -n "$cf_xopen_source" ; then
13719 for cf_add_cflags in $cf_xopen_source
13721 case "x$cf_add_cflags" in
13724 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13727 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
13728 test "$CFLAGS" != "$cf_old_cflag" || break
13729 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
13731 echo "${as_me:-configure}:13731: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
13733 CFLAGS="$cf_old_cflag"
13736 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13739 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
13740 test "$CPPFLAGS" != "$cf_old_cflag" || break
13741 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
13743 echo "${as_me:-configure}:13743: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
13745 CPPFLAGS="$cf_old_cflag"
13754 cf_new_extra_cppflags=
13756 for cf_add_cflags in $cf_add_cflags
13758 case "$cf_fix_cppflags" in
13760 case "$cf_add_cflags" in
13761 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13762 case "$cf_add_cflags" in
13764 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13766 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13767 && test -z "${cf_tst_cflags}" \
13768 && cf_fix_cppflags=yes
13770 if test "$cf_fix_cppflags" = yes ; then
13772 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13773 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13776 elif test "${cf_tst_cflags}" = "\"'" ; then
13778 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13779 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13785 case "$CPPFLAGS" in
13789 case "$cf_add_cflags" in
13791 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13793 CPPFLAGS=`echo "$CPPFLAGS" | \
13794 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13795 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13800 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13801 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13808 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13809 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13816 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13817 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13819 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13821 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13822 && test -z "${cf_tst_cflags}" \
13823 && cf_fix_cppflags=no
13828 if test -n "$cf_new_cflags" ; then
13829 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13831 echo "${as_me:-configure}:13831: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13833 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13834 CFLAGS="${CFLAGS}$cf_new_cflags"
13838 if test -n "$cf_new_cppflags" ; then
13839 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13841 echo "${as_me:-configure}:13841: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13843 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13844 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13848 if test -n "$cf_new_extra_cppflags" ; then
13849 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13851 echo "${as_me:-configure}:13851: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13853 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13854 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13862 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
13863 echo "$as_me:13863: checking if _XOPEN_SOURCE really is set" >&5
13864 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
13865 cat >"conftest.$ac_ext" <<_ACEOF
13866 #line 13866 "configure"
13867 #include "confdefs.h"
13868 #include <stdlib.h>
13873 #ifndef _XOPEN_SOURCE
13880 rm -f "conftest.$ac_objext"
13881 if { (eval echo "$as_me:13881: \"$ac_compile\"") >&5
13882 (eval $ac_compile) 2>&5
13884 echo "$as_me:13884: \$? = $ac_status" >&5
13885 (exit "$ac_status"); } &&
13886 { ac_try='test -s "conftest.$ac_objext"'
13887 { (eval echo "$as_me:13887: \"$ac_try\"") >&5
13888 (eval $ac_try) 2>&5
13890 echo "$as_me:13890: \$? = $ac_status" >&5
13891 (exit "$ac_status"); }; }; then
13892 cf_XOPEN_SOURCE_set=yes
13894 echo "$as_me: failed program was:" >&5
13895 cat "conftest.$ac_ext" >&5
13896 cf_XOPEN_SOURCE_set=no
13898 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13899 echo "$as_me:13899: result: $cf_XOPEN_SOURCE_set" >&5
13900 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
13901 if test "$cf_XOPEN_SOURCE_set" = yes
13903 cat >"conftest.$ac_ext" <<_ACEOF
13904 #line 13904 "configure"
13905 #include "confdefs.h"
13906 #include <stdlib.h>
13911 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
13918 rm -f "conftest.$ac_objext"
13919 if { (eval echo "$as_me:13919: \"$ac_compile\"") >&5
13920 (eval $ac_compile) 2>&5
13922 echo "$as_me:13922: \$? = $ac_status" >&5
13923 (exit "$ac_status"); } &&
13924 { ac_try='test -s "conftest.$ac_objext"'
13925 { (eval echo "$as_me:13925: \"$ac_try\"") >&5
13926 (eval $ac_try) 2>&5
13928 echo "$as_me:13928: \$? = $ac_status" >&5
13929 (exit "$ac_status"); }; }; then
13930 cf_XOPEN_SOURCE_set_ok=yes
13932 echo "$as_me: failed program was:" >&5
13933 cat "conftest.$ac_ext" >&5
13934 cf_XOPEN_SOURCE_set_ok=no
13936 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13937 if test "$cf_XOPEN_SOURCE_set_ok" = no
13939 { echo "$as_me:13939: WARNING: _XOPEN_SOURCE is lower than requested" >&5
13940 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
13944 echo "$as_me:13944: checking if we should define _XOPEN_SOURCE" >&5
13945 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13946 if test "${cf_cv_xopen_source+set}" = set; then
13947 echo $ECHO_N "(cached) $ECHO_C" >&6
13950 cat >"conftest.$ac_ext" <<_ACEOF
13951 #line 13951 "configure"
13952 #include "confdefs.h"
13954 #include <stdlib.h>
13955 #include <string.h>
13956 #include <sys/types.h>
13962 #ifndef _XOPEN_SOURCE
13969 rm -f "conftest.$ac_objext"
13970 if { (eval echo "$as_me:13970: \"$ac_compile\"") >&5
13971 (eval $ac_compile) 2>&5
13973 echo "$as_me:13973: \$? = $ac_status" >&5
13974 (exit "$ac_status"); } &&
13975 { ac_try='test -s "conftest.$ac_objext"'
13976 { (eval echo "$as_me:13976: \"$ac_try\"") >&5
13977 (eval $ac_try) 2>&5
13979 echo "$as_me:13979: \$? = $ac_status" >&5
13980 (exit "$ac_status"); }; }; then
13981 cf_cv_xopen_source=no
13983 echo "$as_me: failed program was:" >&5
13984 cat "conftest.$ac_ext" >&5
13985 cf_save="$CPPFLAGS"
13987 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13988 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13990 cat >"conftest.$ac_ext" <<_ACEOF
13991 #line 13991 "configure"
13992 #include "confdefs.h"
13994 #include <stdlib.h>
13995 #include <string.h>
13996 #include <sys/types.h>
14002 #ifdef _XOPEN_SOURCE
14009 rm -f "conftest.$ac_objext"
14010 if { (eval echo "$as_me:14010: \"$ac_compile\"") >&5
14011 (eval $ac_compile) 2>&5
14013 echo "$as_me:14013: \$? = $ac_status" >&5
14014 (exit "$ac_status"); } &&
14015 { ac_try='test -s "conftest.$ac_objext"'
14016 { (eval echo "$as_me:14016: \"$ac_try\"") >&5
14017 (eval $ac_try) 2>&5
14019 echo "$as_me:14019: \$? = $ac_status" >&5
14020 (exit "$ac_status"); }; }; then
14021 cf_cv_xopen_source=no
14023 echo "$as_me: failed program was:" >&5
14024 cat "conftest.$ac_ext" >&5
14025 cf_cv_xopen_source=$cf_XOPEN_SOURCE
14027 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14028 CPPFLAGS="$cf_save"
14031 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14034 echo "$as_me:14034: result: $cf_cv_xopen_source" >&5
14035 echo "${ECHO_T}$cf_cv_xopen_source" >&6
14037 if test "$cf_cv_xopen_source" != no ; then
14039 CFLAGS=`echo "$CFLAGS" | \
14040 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14041 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14043 CPPFLAGS=`echo "$CPPFLAGS" | \
14044 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14045 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14047 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
14049 for cf_add_cflags in $cf_temp_xopen_source
14051 case "x$cf_add_cflags" in
14054 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14057 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
14058 test "$CFLAGS" != "$cf_old_cflag" || break
14060 CFLAGS="$cf_old_cflag"
14063 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14066 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
14067 test "$CPPFLAGS" != "$cf_old_cflag" || break
14069 CPPFLAGS="$cf_old_cflag"
14078 cf_new_extra_cppflags=
14080 for cf_add_cflags in $cf_add_cflags
14082 case "$cf_fix_cppflags" in
14084 case "$cf_add_cflags" in
14085 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14086 case "$cf_add_cflags" in
14088 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14090 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14091 && test -z "${cf_tst_cflags}" \
14092 && cf_fix_cppflags=yes
14094 if test "$cf_fix_cppflags" = yes ; then
14096 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14097 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14100 elif test "${cf_tst_cflags}" = "\"'" ; then
14102 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14103 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14109 case "$CPPFLAGS" in
14113 case "$cf_add_cflags" in
14115 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14117 CPPFLAGS=`echo "$CPPFLAGS" | \
14118 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14119 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14124 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14125 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14132 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14133 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14140 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14141 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14143 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14145 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14146 && test -z "${cf_tst_cflags}" \
14147 && cf_fix_cppflags=no
14152 if test -n "$cf_new_cflags" ; then
14154 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14155 CFLAGS="${CFLAGS}$cf_new_cflags"
14159 if test -n "$cf_new_cppflags" ; then
14161 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14162 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14166 if test -n "$cf_new_extra_cppflags" ; then
14168 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14169 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14179 fi # cf_cv_posix_visible
14181 # Check whether --enable-largefile or --disable-largefile was given.
14182 if test "${enable_largefile+set}" = set; then
14183 enableval="$enable_largefile"
14186 if test "$enable_largefile" != no; then
14188 echo "$as_me:14188: checking for special C compiler options needed for large files" >&5
14189 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
14190 if test "${ac_cv_sys_largefile_CC+set}" = set; then
14191 echo $ECHO_N "(cached) $ECHO_C" >&6
14193 ac_cv_sys_largefile_CC=no
14194 if test "$GCC" != yes; then
14197 # IRIX 6.2 and later do not support large files by default,
14198 # so use the C compiler's -n32 option if that helps.
14199 cat >"conftest.$ac_ext" <<_ACEOF
14200 #line 14200 "configure"
14201 #include "confdefs.h"
14202 #include <sys/types.h>
14203 /* Check that off_t can represent 2**63 - 1 correctly.
14204 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14205 since some C++ compilers masquerading as C compilers
14206 incorrectly reject 9223372036854775807. */
14207 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14208 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14209 && LARGE_OFF_T % 2147483647 == 1)
14219 rm -f "conftest.$ac_objext"
14220 if { (eval echo "$as_me:14220: \"$ac_compile\"") >&5
14221 (eval $ac_compile) 2>&5
14223 echo "$as_me:14223: \$? = $ac_status" >&5
14224 (exit "$ac_status"); } &&
14225 { ac_try='test -s "conftest.$ac_objext"'
14226 { (eval echo "$as_me:14226: \"$ac_try\"") >&5
14227 (eval $ac_try) 2>&5
14229 echo "$as_me:14229: \$? = $ac_status" >&5
14230 (exit "$ac_status"); }; }; then
14233 echo "$as_me: failed program was:" >&5
14234 cat "conftest.$ac_ext" >&5
14236 rm -f "conftest.$ac_objext"
14238 rm -f "conftest.$ac_objext"
14239 if { (eval echo "$as_me:14239: \"$ac_compile\"") >&5
14240 (eval $ac_compile) 2>&5
14242 echo "$as_me:14242: \$? = $ac_status" >&5
14243 (exit "$ac_status"); } &&
14244 { ac_try='test -s "conftest.$ac_objext"'
14245 { (eval echo "$as_me:14245: \"$ac_try\"") >&5
14246 (eval $ac_try) 2>&5
14248 echo "$as_me:14248: \$? = $ac_status" >&5
14249 (exit "$ac_status"); }; }; then
14250 ac_cv_sys_largefile_CC=' -n32'; break
14252 echo "$as_me: failed program was:" >&5
14253 cat "conftest.$ac_ext" >&5
14255 rm -f "conftest.$ac_objext"
14259 rm -f "conftest.$ac_ext"
14262 echo "$as_me:14262: result: $ac_cv_sys_largefile_CC" >&5
14263 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
14264 if test "$ac_cv_sys_largefile_CC" != no; then
14265 CC=$CC$ac_cv_sys_largefile_CC
14268 echo "$as_me:14268: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14269 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
14270 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
14271 echo $ECHO_N "(cached) $ECHO_C" >&6
14274 ac_cv_sys_file_offset_bits=no
14275 cat >"conftest.$ac_ext" <<_ACEOF
14276 #line 14276 "configure"
14277 #include "confdefs.h"
14278 #include <sys/types.h>
14279 /* Check that off_t can represent 2**63 - 1 correctly.
14280 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14281 since some C++ compilers masquerading as C compilers
14282 incorrectly reject 9223372036854775807. */
14283 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14284 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14285 && LARGE_OFF_T % 2147483647 == 1)
14295 rm -f "conftest.$ac_objext"
14296 if { (eval echo "$as_me:14296: \"$ac_compile\"") >&5
14297 (eval $ac_compile) 2>&5
14299 echo "$as_me:14299: \$? = $ac_status" >&5
14300 (exit "$ac_status"); } &&
14301 { ac_try='test -s "conftest.$ac_objext"'
14302 { (eval echo "$as_me:14302: \"$ac_try\"") >&5
14303 (eval $ac_try) 2>&5
14305 echo "$as_me:14305: \$? = $ac_status" >&5
14306 (exit "$ac_status"); }; }; then
14309 echo "$as_me: failed program was:" >&5
14310 cat "conftest.$ac_ext" >&5
14312 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14313 cat >"conftest.$ac_ext" <<_ACEOF
14314 #line 14314 "configure"
14315 #include "confdefs.h"
14316 #define _FILE_OFFSET_BITS 64
14317 #include <sys/types.h>
14318 /* Check that off_t can represent 2**63 - 1 correctly.
14319 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14320 since some C++ compilers masquerading as C compilers
14321 incorrectly reject 9223372036854775807. */
14322 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14323 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14324 && LARGE_OFF_T % 2147483647 == 1)
14334 rm -f "conftest.$ac_objext"
14335 if { (eval echo "$as_me:14335: \"$ac_compile\"") >&5
14336 (eval $ac_compile) 2>&5
14338 echo "$as_me:14338: \$? = $ac_status" >&5
14339 (exit "$ac_status"); } &&
14340 { ac_try='test -s "conftest.$ac_objext"'
14341 { (eval echo "$as_me:14341: \"$ac_try\"") >&5
14342 (eval $ac_try) 2>&5
14344 echo "$as_me:14344: \$? = $ac_status" >&5
14345 (exit "$ac_status"); }; }; then
14346 ac_cv_sys_file_offset_bits=64; break
14348 echo "$as_me: failed program was:" >&5
14349 cat "conftest.$ac_ext" >&5
14351 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14355 echo "$as_me:14355: result: $ac_cv_sys_file_offset_bits" >&5
14356 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14357 if test "$ac_cv_sys_file_offset_bits" != no; then
14359 cat >>confdefs.h <<EOF
14360 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14365 echo "$as_me:14365: checking for _LARGE_FILES value needed for large files" >&5
14366 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14367 if test "${ac_cv_sys_large_files+set}" = set; then
14368 echo $ECHO_N "(cached) $ECHO_C" >&6
14371 ac_cv_sys_large_files=no
14372 cat >"conftest.$ac_ext" <<_ACEOF
14373 #line 14373 "configure"
14374 #include "confdefs.h"
14375 #include <sys/types.h>
14376 /* Check that off_t can represent 2**63 - 1 correctly.
14377 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14378 since some C++ compilers masquerading as C compilers
14379 incorrectly reject 9223372036854775807. */
14380 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14381 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14382 && LARGE_OFF_T % 2147483647 == 1)
14392 rm -f "conftest.$ac_objext"
14393 if { (eval echo "$as_me:14393: \"$ac_compile\"") >&5
14394 (eval $ac_compile) 2>&5
14396 echo "$as_me:14396: \$? = $ac_status" >&5
14397 (exit "$ac_status"); } &&
14398 { ac_try='test -s "conftest.$ac_objext"'
14399 { (eval echo "$as_me:14399: \"$ac_try\"") >&5
14400 (eval $ac_try) 2>&5
14402 echo "$as_me:14402: \$? = $ac_status" >&5
14403 (exit "$ac_status"); }; }; then
14406 echo "$as_me: failed program was:" >&5
14407 cat "conftest.$ac_ext" >&5
14409 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14410 cat >"conftest.$ac_ext" <<_ACEOF
14411 #line 14411 "configure"
14412 #include "confdefs.h"
14413 #define _LARGE_FILES 1
14414 #include <sys/types.h>
14415 /* Check that off_t can represent 2**63 - 1 correctly.
14416 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14417 since some C++ compilers masquerading as C compilers
14418 incorrectly reject 9223372036854775807. */
14419 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14420 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14421 && LARGE_OFF_T % 2147483647 == 1)
14431 rm -f "conftest.$ac_objext"
14432 if { (eval echo "$as_me:14432: \"$ac_compile\"") >&5
14433 (eval $ac_compile) 2>&5
14435 echo "$as_me:14435: \$? = $ac_status" >&5
14436 (exit "$ac_status"); } &&
14437 { ac_try='test -s "conftest.$ac_objext"'
14438 { (eval echo "$as_me:14438: \"$ac_try\"") >&5
14439 (eval $ac_try) 2>&5
14441 echo "$as_me:14441: \$? = $ac_status" >&5
14442 (exit "$ac_status"); }; }; then
14443 ac_cv_sys_large_files=1; break
14445 echo "$as_me: failed program was:" >&5
14446 cat "conftest.$ac_ext" >&5
14448 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14452 echo "$as_me:14452: result: $ac_cv_sys_large_files" >&5
14453 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14454 if test "$ac_cv_sys_large_files" != no; then
14456 cat >>confdefs.h <<EOF
14457 #define _LARGE_FILES $ac_cv_sys_large_files
14464 if test "$enable_largefile" != no ; then
14465 echo "$as_me:14465: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14466 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14467 if test "${ac_cv_sys_largefile_source+set}" = set; then
14468 echo $ECHO_N "(cached) $ECHO_C" >&6
14471 ac_cv_sys_largefile_source=no
14472 cat >"conftest.$ac_ext" <<_ACEOF
14473 #line 14473 "configure"
14474 #include "confdefs.h"
14484 rm -f "conftest.$ac_objext"
14485 if { (eval echo "$as_me:14485: \"$ac_compile\"") >&5
14486 (eval $ac_compile) 2>&5
14488 echo "$as_me:14488: \$? = $ac_status" >&5
14489 (exit "$ac_status"); } &&
14490 { ac_try='test -s "conftest.$ac_objext"'
14491 { (eval echo "$as_me:14491: \"$ac_try\"") >&5
14492 (eval $ac_try) 2>&5
14494 echo "$as_me:14494: \$? = $ac_status" >&5
14495 (exit "$ac_status"); }; }; then
14498 echo "$as_me: failed program was:" >&5
14499 cat "conftest.$ac_ext" >&5
14501 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14502 cat >"conftest.$ac_ext" <<_ACEOF
14503 #line 14503 "configure"
14504 #include "confdefs.h"
14505 #define _LARGEFILE_SOURCE 1
14515 rm -f "conftest.$ac_objext"
14516 if { (eval echo "$as_me:14516: \"$ac_compile\"") >&5
14517 (eval $ac_compile) 2>&5
14519 echo "$as_me:14519: \$? = $ac_status" >&5
14520 (exit "$ac_status"); } &&
14521 { ac_try='test -s "conftest.$ac_objext"'
14522 { (eval echo "$as_me:14522: \"$ac_try\"") >&5
14523 (eval $ac_try) 2>&5
14525 echo "$as_me:14525: \$? = $ac_status" >&5
14526 (exit "$ac_status"); }; }; then
14527 ac_cv_sys_largefile_source=1; break
14529 echo "$as_me: failed program was:" >&5
14530 cat "conftest.$ac_ext" >&5
14532 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14536 echo "$as_me:14536: result: $ac_cv_sys_largefile_source" >&5
14537 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14538 if test "$ac_cv_sys_largefile_source" != no; then
14540 cat >>confdefs.h <<EOF
14541 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14547 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14548 # in glibc 2.1.3, but that breaks too many other things.
14549 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14550 echo "$as_me:14550: checking for fseeko" >&5
14551 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14552 if test "${ac_cv_func_fseeko+set}" = set; then
14553 echo $ECHO_N "(cached) $ECHO_C" >&6
14555 cat >"conftest.$ac_ext" <<_ACEOF
14556 #line 14556 "configure"
14557 #include "confdefs.h"
14562 return fseeko && fseeko (stdin, 0, 0);
14567 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14568 if { (eval echo "$as_me:14568: \"$ac_link\"") >&5
14569 (eval $ac_link) 2>&5
14571 echo "$as_me:14571: \$? = $ac_status" >&5
14572 (exit "$ac_status"); } &&
14573 { ac_try='test -s "conftest$ac_exeext"'
14574 { (eval echo "$as_me:14574: \"$ac_try\"") >&5
14575 (eval $ac_try) 2>&5
14577 echo "$as_me:14577: \$? = $ac_status" >&5
14578 (exit "$ac_status"); }; }; then
14579 ac_cv_func_fseeko=yes
14581 echo "$as_me: failed program was:" >&5
14582 cat "conftest.$ac_ext" >&5
14583 ac_cv_func_fseeko=no
14585 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14587 echo "$as_me:14587: result: $ac_cv_func_fseeko" >&5
14588 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14589 if test $ac_cv_func_fseeko = yes; then
14591 cat >>confdefs.h <<\EOF
14592 #define HAVE_FSEEKO 1
14597 # Normally we would collect these definitions in the config.h,
14598 # but (like _XOPEN_SOURCE), some environments rely on having these
14599 # defined before any of the system headers are included. Another
14600 # case comes up with C++, e.g., on AIX the compiler compiles the
14601 # header files by themselves before looking at the body files it is
14602 # told to compile. For ncurses, those header files do not include
14604 if test "$ac_cv_sys_large_files" != no
14607 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14608 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14611 if test "$ac_cv_sys_largefile_source" != no
14614 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14615 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14618 if test "$ac_cv_sys_file_offset_bits" != no
14621 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14622 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14626 echo "$as_me:14626: checking whether to use struct dirent64" >&5
14627 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14628 if test "${cf_cv_struct_dirent64+set}" = set; then
14629 echo $ECHO_N "(cached) $ECHO_C" >&6
14632 cat >"conftest.$ac_ext" <<_ACEOF
14633 #line 14633 "configure"
14634 #include "confdefs.h"
14636 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14637 #include <sys/types.h>
14638 #include <dirent.h>
14644 /* if transitional largefile support is setup, this is true */
14645 extern struct dirent64 * readdir(DIR *);
14646 struct dirent64 *x = readdir((DIR *)0);
14647 struct dirent *y = readdir((DIR *)0);
14655 rm -f "conftest.$ac_objext"
14656 if { (eval echo "$as_me:14656: \"$ac_compile\"") >&5
14657 (eval $ac_compile) 2>&5
14659 echo "$as_me:14659: \$? = $ac_status" >&5
14660 (exit "$ac_status"); } &&
14661 { ac_try='test -s "conftest.$ac_objext"'
14662 { (eval echo "$as_me:14662: \"$ac_try\"") >&5
14663 (eval $ac_try) 2>&5
14665 echo "$as_me:14665: \$? = $ac_status" >&5
14666 (exit "$ac_status"); }; }; then
14667 cf_cv_struct_dirent64=yes
14669 echo "$as_me: failed program was:" >&5
14670 cat "conftest.$ac_ext" >&5
14671 cf_cv_struct_dirent64=no
14673 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14676 echo "$as_me:14676: result: $cf_cv_struct_dirent64" >&5
14677 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14678 test "$cf_cv_struct_dirent64" = yes &&
14679 cat >>confdefs.h <<\EOF
14680 #define HAVE_STRUCT_DIRENT64 1
14685 ### Enable compiling-in rcs id's
14686 echo "$as_me:14686: checking if RCS identifiers should be compiled-in" >&5
14687 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14689 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14690 if test "${with_rcs_ids+set}" = set; then
14691 withval="$with_rcs_ids"
14692 with_rcs_ids=$withval
14696 echo "$as_me:14696: result: $with_rcs_ids" >&5
14697 echo "${ECHO_T}$with_rcs_ids" >&6
14698 test "$with_rcs_ids" = yes &&
14699 cat >>confdefs.h <<\EOF
14700 #define USE_RCS_IDS 1
14703 ###############################################################################
14705 ### Note that some functions (such as const) are normally disabled anyway.
14706 echo "$as_me:14706: checking if you want to build with function extensions" >&5
14707 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14709 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14710 if test "${enable_ext_funcs+set}" = set; then
14711 enableval="$enable_ext_funcs"
14712 with_ext_funcs=$enableval
14716 echo "$as_me:14716: result: $with_ext_funcs" >&5
14717 echo "${ECHO_T}$with_ext_funcs" >&6
14718 if test "$with_ext_funcs" = yes ; then
14719 NCURSES_EXT_FUNCS=1
14721 cat >>confdefs.h <<\EOF
14722 #define HAVE_USE_DEFAULT_COLORS 1
14725 cat >>confdefs.h <<\EOF
14726 #define NCURSES_EXT_FUNCS 1
14730 NCURSES_EXT_FUNCS=0
14733 ### use option --enable-const to turn on use of const beyond that in XSI.
14734 echo "$as_me:14734: checking for extended use of const keyword" >&5
14735 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14737 # Check whether --enable-const or --disable-const was given.
14738 if test "${enable_const+set}" = set; then
14739 enableval="$enable_const"
14740 with_ext_const=$enableval
14744 echo "$as_me:14744: result: $with_ext_const" >&5
14745 echo "${ECHO_T}$with_ext_const" >&6
14746 NCURSES_CONST='/*nothing*/'
14747 if test "$with_ext_const" = yes ; then
14748 NCURSES_CONST=const
14751 ###############################################################################
14752 # These options are relatively safe to experiment with.
14754 echo "$as_me:14754: checking if you want all development code" >&5
14755 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14757 # Check whether --with-develop or --without-develop was given.
14758 if test "${with_develop+set}" = set; then
14759 withval="$with_develop"
14760 with_develop=$withval
14764 echo "$as_me:14764: result: $with_develop" >&5
14765 echo "${ECHO_T}$with_develop" >&6
14767 ###############################################################################
14768 # These are just experimental, probably should not be in a package:
14770 # This is still experimental (20080329), but should ultimately be moved to
14771 # the script-block --with-normal, etc.
14773 echo "$as_me:14773: checking if you want to link with the pthread library" >&5
14774 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14776 # Check whether --with-pthread or --without-pthread was given.
14777 if test "${with_pthread+set}" = set; then
14778 withval="$with_pthread"
14779 with_pthread=$withval
14783 echo "$as_me:14783: result: $with_pthread" >&5
14784 echo "${ECHO_T}$with_pthread" >&6
14786 if test "$with_pthread" != no ; then
14787 echo "$as_me:14787: checking for pthread.h" >&5
14788 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14789 if test "${ac_cv_header_pthread_h+set}" = set; then
14790 echo $ECHO_N "(cached) $ECHO_C" >&6
14792 cat >"conftest.$ac_ext" <<_ACEOF
14793 #line 14793 "configure"
14794 #include "confdefs.h"
14795 #include <pthread.h>
14797 if { (eval echo "$as_me:14797: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14798 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14800 $EGREP -v '^ *\+' conftest.er1 >conftest.err
14802 cat conftest.err >&5
14803 echo "$as_me:14803: \$? = $ac_status" >&5
14804 (exit "$ac_status"); } >/dev/null; then
14805 if test -s conftest.err; then
14806 ac_cpp_err=$ac_c_preproc_warn_flag
14813 if test -z "$ac_cpp_err"; then
14814 ac_cv_header_pthread_h=yes
14816 echo "$as_me: failed program was:" >&5
14817 cat "conftest.$ac_ext" >&5
14818 ac_cv_header_pthread_h=no
14820 rm -f conftest.err "conftest.$ac_ext"
14822 echo "$as_me:14822: result: $ac_cv_header_pthread_h" >&5
14823 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14824 if test "$ac_cv_header_pthread_h" = yes; then
14826 cat >>confdefs.h <<\EOF
14827 #define HAVE_PTHREADS_H 1
14830 for cf_lib_pthread in pthread c_r
14832 echo "$as_me:14832: checking if we can link with the $cf_lib_pthread library" >&5
14833 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14834 cf_save_LIBS="$LIBS"
14836 cf_add_libs="$LIBS"
14839 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14840 # filter duplicates
14841 for cf_add_1lib in $cf_add_0lib; do
14842 for cf_add_2lib in $cf_add_libs; do
14843 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14848 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14850 LIBS="$cf_add_libs"
14852 cat >"conftest.$ac_ext" <<_ACEOF
14853 #line 14853 "configure"
14854 #include "confdefs.h"
14856 #include <pthread.h>
14862 int rc = pthread_create(0,0,0,0);
14863 int r2 = pthread_mutexattr_settype(0, 0);
14869 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14870 if { (eval echo "$as_me:14870: \"$ac_link\"") >&5
14871 (eval $ac_link) 2>&5
14873 echo "$as_me:14873: \$? = $ac_status" >&5
14874 (exit "$ac_status"); } &&
14875 { ac_try='test -s "conftest$ac_exeext"'
14876 { (eval echo "$as_me:14876: \"$ac_try\"") >&5
14877 (eval $ac_try) 2>&5
14879 echo "$as_me:14879: \$? = $ac_status" >&5
14880 (exit "$ac_status"); }; }; then
14883 echo "$as_me: failed program was:" >&5
14884 cat "conftest.$ac_ext" >&5
14887 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14888 LIBS="$cf_save_LIBS"
14889 echo "$as_me:14889: result: $with_pthread" >&5
14890 echo "${ECHO_T}$with_pthread" >&6
14891 test "$with_pthread" = yes && break
14894 if test "$with_pthread" = yes ; then
14896 cf_add_libs="$LIBS"
14899 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14900 # filter duplicates
14901 for cf_add_1lib in $cf_add_0lib; do
14902 for cf_add_2lib in $cf_add_libs; do
14903 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14908 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14910 LIBS="$cf_add_libs"
14912 cat >>confdefs.h <<\EOF
14913 #define HAVE_LIBPTHREADS 1
14917 { { echo "$as_me:14917: error: Cannot link with pthread library" >&5
14918 echo "$as_me: error: Cannot link with pthread library" >&2;}
14919 { (exit 1); exit 1; }; }
14926 echo "$as_me:14926: checking if you want to use weak-symbols for pthreads" >&5
14927 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14929 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14930 if test "${enable_weak_symbols+set}" = set; then
14931 enableval="$enable_weak_symbols"
14932 use_weak_symbols=$withval
14934 use_weak_symbols=no
14936 echo "$as_me:14936: result: $use_weak_symbols" >&5
14937 echo "${ECHO_T}$use_weak_symbols" >&6
14938 if test "$use_weak_symbols" = yes ; then
14940 echo "$as_me:14940: checking if $CC supports weak symbols" >&5
14941 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14942 if test "${cf_cv_weak_symbols+set}" = set; then
14943 echo $ECHO_N "(cached) $ECHO_C" >&6
14946 cat >"conftest.$ac_ext" <<_ACEOF
14947 #line 14947 "configure"
14948 #include "confdefs.h"
14955 #if defined(__GNUC__)
14956 # if defined __USE_ISOC99
14957 # define _cat_pragma(exp) _Pragma(#exp)
14958 # define _weak_pragma(exp) _cat_pragma(weak name)
14960 # define _weak_pragma(exp)
14962 # define _declare(name) __extension__ extern __typeof__(name) name
14963 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
14966 weak_symbol(fopen);
14972 rm -f "conftest.$ac_objext"
14973 if { (eval echo "$as_me:14973: \"$ac_compile\"") >&5
14974 (eval $ac_compile) 2>&5
14976 echo "$as_me:14976: \$? = $ac_status" >&5
14977 (exit "$ac_status"); } &&
14978 { ac_try='test -s "conftest.$ac_objext"'
14979 { (eval echo "$as_me:14979: \"$ac_try\"") >&5
14980 (eval $ac_try) 2>&5
14982 echo "$as_me:14982: \$? = $ac_status" >&5
14983 (exit "$ac_status"); }; }; then
14984 cf_cv_weak_symbols=yes
14986 echo "$as_me: failed program was:" >&5
14987 cat "conftest.$ac_ext" >&5
14988 cf_cv_weak_symbols=no
14990 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14993 echo "$as_me:14993: result: $cf_cv_weak_symbols" >&5
14994 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14997 cf_cv_weak_symbols=no
15000 if test $cf_cv_weak_symbols = yes ; then
15002 cat >>confdefs.h <<\EOF
15003 #define USE_WEAK_SYMBOLS 1
15009 if test "$with_pthread" = "yes" ; then
15011 cat >>confdefs.h <<\EOF
15012 #define USE_PTHREADS 1
15015 enable_reentrant=yes
15016 if test $cf_cv_weak_symbols = yes ; then
15021 # OpenSUSE is installing ncurses6, using reentrant option.
15022 echo "$as_me:15022: checking for _nc_TABSIZE" >&5
15023 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
15024 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
15025 echo $ECHO_N "(cached) $ECHO_C" >&6
15027 cat >"conftest.$ac_ext" <<_ACEOF
15028 #line 15028 "configure"
15029 #include "confdefs.h"
15030 #define _nc_TABSIZE autoconf_temporary
15031 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15038 /* We use char because int might match the return type of a gcc2
15039 builtin and then its argument prototype would still apply. */
15040 char _nc_TABSIZE (void);
15046 /* The GNU C library defines stubs for functions which it implements
15047 to always fail with ENOSYS. Some functions are actually named
15048 something starting with __ and the normal name is an alias. */
15049 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
15050 #error found stub for _nc_TABSIZE
15053 return _nc_TABSIZE ();
15058 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15059 if { (eval echo "$as_me:15059: \"$ac_link\"") >&5
15060 (eval $ac_link) 2>&5
15062 echo "$as_me:15062: \$? = $ac_status" >&5
15063 (exit "$ac_status"); } &&
15064 { ac_try='test -s "conftest$ac_exeext"'
15065 { (eval echo "$as_me:15065: \"$ac_try\"") >&5
15066 (eval $ac_try) 2>&5
15068 echo "$as_me:15068: \$? = $ac_status" >&5
15069 (exit "$ac_status"); }; }; then
15070 ac_cv_func__nc_TABSIZE=yes
15072 echo "$as_me: failed program was:" >&5
15073 cat "conftest.$ac_ext" >&5
15074 ac_cv_func__nc_TABSIZE=no
15076 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15078 echo "$as_me:15078: result: $ac_cv_func__nc_TABSIZE" >&5
15079 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
15080 if test "$ac_cv_func__nc_TABSIZE" = yes; then
15081 assume_reentrant=yes
15083 assume_reentrant=no
15086 # Reentrant code has to be opaque; there's little advantage to making ncurses
15087 # opaque outside of that, so there is no --enable-opaque option. We can use
15088 # this option without --with-pthreads, but this will be always set for
15090 echo "$as_me:15090: checking if you want experimental reentrant code" >&5
15091 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
15093 # Check whether --enable-reentrant or --disable-reentrant was given.
15094 if test "${enable_reentrant+set}" = set; then
15095 enableval="$enable_reentrant"
15096 with_reentrant=$enableval
15098 with_reentrant=$assume_reentrant
15100 echo "$as_me:15100: result: $with_reentrant" >&5
15101 echo "${ECHO_T}$with_reentrant" >&6
15102 if test "$with_reentrant" = yes ; then
15103 cf_cv_enable_reentrant=1
15104 if test $cf_cv_weak_symbols = yes ; then
15106 # remove pthread library from $LIBS
15107 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
15109 elif test "$assume_reentrant" = no ; then
15110 LIB_SUFFIX="t${LIB_SUFFIX}"
15113 cat >>confdefs.h <<\EOF
15114 #define USE_REENTRANT 1
15118 cf_cv_enable_reentrant=0
15121 ### Allow using a different wrap-prefix
15122 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15123 echo "$as_me:15123: checking for prefix used to wrap public variables" >&5
15124 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15126 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15127 if test "${with_wrap_prefix+set}" = set; then
15128 withval="$with_wrap_prefix"
15129 NCURSES_WRAP_PREFIX=$withval
15131 NCURSES_WRAP_PREFIX=_nc_
15133 echo "$as_me:15133: result: $NCURSES_WRAP_PREFIX" >&5
15134 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15136 NCURSES_WRAP_PREFIX=_nc_
15139 cat >>confdefs.h <<EOF
15140 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15143 ###############################################################################
15145 ### use option --disable-echo to suppress full display compiling commands
15147 echo "$as_me:15147: checking if you want to see long compiling messages" >&5
15148 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15150 # Check whether --enable-echo or --disable-echo was given.
15151 if test "${enable_echo+set}" = set; then
15152 enableval="$enable_echo"
15153 test "$enableval" != no && enableval=yes
15154 if test "$enableval" != "yes" ; then
15157 ECHO_LD='@echo linking $@;'
15158 RULE_CC='@echo compiling $<'
15159 SHOW_CC='@echo compiling $@'
15181 echo "$as_me:15181: result: $enableval" >&5
15182 echo "${ECHO_T}$enableval" >&6
15184 echo "$as_me:15184: checking if you want to use C11 _Noreturn feature" >&5
15185 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
15187 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
15188 if test "${enable_stdnoreturn+set}" = set; then
15189 enableval="$enable_stdnoreturn"
15190 test "$enableval" != yes && enableval=no
15191 if test "$enableval" != "no" ; then
15192 enable_stdnoreturn=yes
15194 enable_stdnoreturn=no
15198 enable_stdnoreturn=no
15201 echo "$as_me:15201: result: $enable_stdnoreturn" >&5
15202 echo "${ECHO_T}$enable_stdnoreturn" >&6
15204 if test $enable_stdnoreturn = yes; then
15205 echo "$as_me:15205: checking for C11 _Noreturn feature" >&5
15206 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
15207 if test "${cf_cv_c11_noreturn+set}" = set; then
15208 echo $ECHO_N "(cached) $ECHO_C" >&6
15210 cat >"conftest.$ac_ext" <<_ACEOF
15211 #line 15211 "configure"
15212 #include "confdefs.h"
15215 #include <stdlib.h>
15216 #include <stdnoreturn.h>
15217 static _Noreturn void giveup(void) { exit(0); }
15222 if (feof(stdin)) giveup()
15227 rm -f "conftest.$ac_objext"
15228 if { (eval echo "$as_me:15228: \"$ac_compile\"") >&5
15229 (eval $ac_compile) 2>&5
15231 echo "$as_me:15231: \$? = $ac_status" >&5
15232 (exit "$ac_status"); } &&
15233 { ac_try='test -s "conftest.$ac_objext"'
15234 { (eval echo "$as_me:15234: \"$ac_try\"") >&5
15235 (eval $ac_try) 2>&5
15237 echo "$as_me:15237: \$? = $ac_status" >&5
15238 (exit "$ac_status"); }; }; then
15239 cf_cv_c11_noreturn=yes
15241 echo "$as_me: failed program was:" >&5
15242 cat "conftest.$ac_ext" >&5
15243 cf_cv_c11_noreturn=no
15245 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15248 echo "$as_me:15248: result: $cf_cv_c11_noreturn" >&5
15249 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
15251 cf_cv_c11_noreturn=no,
15254 if test "$cf_cv_c11_noreturn" = yes; then
15256 cat >>confdefs.h <<\EOF
15257 #define HAVE_STDNORETURN_H 1
15260 cat >>confdefs.h <<EOF
15261 #define STDC_NORETURN _Noreturn
15264 HAVE_STDNORETURN_H=1
15266 HAVE_STDNORETURN_H=0
15269 if test "$GCC" = yes || test "$GXX" = yes
15272 if test "$GCC" = yes || test "$GXX" = yes
15276 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
15278 echo "${as_me:-configure}:15278: testing repairing CFLAGS: $CFLAGS ..." 1>&5
15281 for cf_temp_scan in $CFLAGS
15283 case "x$cf_temp_scan" in
15286 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15287 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15292 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15293 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15298 CFLAGS="$cf_temp_flags"
15299 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
15301 echo "${as_me:-configure}:15301: testing ... fixed $CFLAGS ..." 1>&5
15303 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15305 echo "${as_me:-configure}:15305: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15311 if test "$GCC" = yes || test "$GXX" = yes
15315 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
15317 echo "${as_me:-configure}:15317: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
15320 for cf_temp_scan in $CPPFLAGS
15322 case "x$cf_temp_scan" in
15325 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15326 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15331 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15332 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15337 CPPFLAGS="$cf_temp_flags"
15338 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
15340 echo "${as_me:-configure}:15340: testing ... fixed $CPPFLAGS ..." 1>&5
15342 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15344 echo "${as_me:-configure}:15344: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15350 if test "$GCC" = yes || test "$GXX" = yes
15354 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
15356 echo "${as_me:-configure}:15356: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
15359 for cf_temp_scan in $LDFLAGS
15361 case "x$cf_temp_scan" in
15364 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15365 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15370 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15371 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15376 LDFLAGS="$cf_temp_flags"
15377 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
15379 echo "${as_me:-configure}:15379: testing ... fixed $LDFLAGS ..." 1>&5
15381 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15383 echo "${as_me:-configure}:15383: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15389 echo "$as_me:15389: checking if you want to turn on gcc warnings" >&5
15390 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
15392 # Check whether --enable-warnings or --disable-warnings was given.
15393 if test "${enable_warnings+set}" = set; then
15394 enableval="$enable_warnings"
15395 test "$enableval" != yes && enableval=no
15396 if test "$enableval" != "no" ; then
15397 enable_warnings=yes
15406 echo "$as_me:15406: result: $enable_warnings" >&5
15407 echo "${ECHO_T}$enable_warnings" >&6
15408 if test "$enable_warnings" = "yes"
15411 if test "x$have_x" = xyes; then
15413 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15414 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15415 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15416 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15417 for cf_X_CFLAGS in $X_CFLAGS
15419 case "x$cf_X_CFLAGS" in
15421 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15424 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15429 cat >"conftest.$ac_ext" <<_ACEOF
15430 #line 15430 "configure"
15431 #include "confdefs.h"
15433 #include <stdlib.h>
15434 #include <X11/Intrinsic.h>
15439 String foo = malloc(1); free((void*)foo)
15444 rm -f "conftest.$ac_objext"
15445 if { (eval echo "$as_me:15445: \"$ac_compile\"") >&5
15446 (eval $ac_compile) 2>&5
15448 echo "$as_me:15448: \$? = $ac_status" >&5
15449 (exit "$ac_status"); } &&
15450 { ac_try='test -s "conftest.$ac_objext"'
15451 { (eval echo "$as_me:15451: \"$ac_try\"") >&5
15452 (eval $ac_try) 2>&5
15454 echo "$as_me:15454: \$? = $ac_status" >&5
15455 (exit "$ac_status"); }; }; then
15457 echo "$as_me:15457: checking for X11/Xt const-feature" >&5
15458 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15459 if test "${cf_cv_const_x_string+set}" = set; then
15460 echo $ECHO_N "(cached) $ECHO_C" >&6
15463 cat >"conftest.$ac_ext" <<_ACEOF
15464 #line 15464 "configure"
15465 #include "confdefs.h"
15467 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15468 #undef XTSTRINGDEFINES /* X11R5 and later */
15469 #include <stdlib.h>
15470 #include <X11/Intrinsic.h>
15475 String foo = malloc(1); *foo = 0
15480 rm -f "conftest.$ac_objext"
15481 if { (eval echo "$as_me:15481: \"$ac_compile\"") >&5
15482 (eval $ac_compile) 2>&5
15484 echo "$as_me:15484: \$? = $ac_status" >&5
15485 (exit "$ac_status"); } &&
15486 { ac_try='test -s "conftest.$ac_objext"'
15487 { (eval echo "$as_me:15487: \"$ac_try\"") >&5
15488 (eval $ac_try) 2>&5
15490 echo "$as_me:15490: \$? = $ac_status" >&5
15491 (exit "$ac_status"); }; }; then
15493 cf_cv_const_x_string=no
15496 echo "$as_me: failed program was:" >&5
15497 cat "conftest.$ac_ext" >&5
15499 cf_cv_const_x_string=yes
15502 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15505 echo "$as_me:15505: result: $cf_cv_const_x_string" >&5
15506 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15508 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
15509 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
15510 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
15512 case "$cf_cv_const_x_string" in
15515 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15516 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15521 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15522 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15528 echo "$as_me: failed program was:" >&5
15529 cat "conftest.$ac_ext" >&5
15531 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15533 cat > "conftest.$ac_ext" <<EOF
15534 #line 15534 "${as_me:-configure}"
15535 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15537 if test "$INTEL_COMPILER" = yes
15539 # The "-wdXXX" options suppress warnings:
15540 # remark #1419: external declaration in primary source file
15541 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15542 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15543 # remark #193: zero used for undefined preprocessing identifier
15544 # remark #593: variable "curs_sb_left_arrow" was set but never used
15545 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15546 # remark #869: parameter "tw" was never referenced
15547 # remark #981: operands are evaluated in unspecified order
15548 # warning #279: controlling expression is constant
15550 { echo "$as_me:15550: checking for $CC warning options..." >&5
15551 echo "$as_me: checking for $CC warning options..." >&6;}
15552 cf_save_CFLAGS="$CFLAGS"
15553 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
15565 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15566 if { (eval echo "$as_me:15566: \"$ac_compile\"") >&5
15567 (eval $ac_compile) 2>&5
15569 echo "$as_me:15569: \$? = $ac_status" >&5
15570 (exit "$ac_status"); }; then
15571 test -n "$verbose" && echo "$as_me:15571: result: ... -$cf_opt" >&5
15572 echo "${ECHO_T}... -$cf_opt" >&6
15573 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15576 CFLAGS="$cf_save_CFLAGS"
15577 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
15579 { echo "$as_me:15579: checking for $CC warning options..." >&5
15580 echo "$as_me: checking for $CC warning options..." >&6;}
15581 cf_save_CFLAGS="$CFLAGS"
15583 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15584 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15585 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15586 for cf_opt in W Wall \
15587 Wbad-function-cast \
15590 Wdeclaration-after-statement \
15593 Wmissing-declarations \
15594 Wmissing-prototypes \
15598 Wstrict-prototypes \
15599 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15601 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15602 if { (eval echo "$as_me:15602: \"$ac_compile\"") >&5
15603 (eval $ac_compile) 2>&5
15605 echo "$as_me:15605: \$? = $ac_status" >&5
15606 (exit "$ac_status"); }; then
15607 test -n "$verbose" && echo "$as_me:15607: result: ... -$cf_opt" >&5
15608 echo "${ECHO_T}... -$cf_opt" >&6
15611 case "$GCC_VERSION" in
15613 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15615 echo "${as_me:-configure}:15615: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15621 case "$GCC_VERSION" in
15623 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15625 echo "${as_me:-configure}:15625: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15631 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15634 CFLAGS="$cf_save_CFLAGS"
15640 if test "$GCC" = yes || test "$GXX" = yes
15642 cat > conftest.i <<EOF
15644 #define GCC_PRINTF 0
15647 #define GCC_SCANF 0
15649 #ifndef GCC_NORETURN
15650 #define GCC_NORETURN /* nothing */
15653 #define GCC_UNUSED /* nothing */
15656 if test "$GCC" = yes
15658 { echo "$as_me:15658: checking for $CC __attribute__ directives..." >&5
15659 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15660 cat > "conftest.$ac_ext" <<EOF
15661 #line 15661 "${as_me:-configure}"
15662 #include "confdefs.h"
15663 #include "conftest.h"
15664 #include "conftest.i"
15666 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15668 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15671 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
15673 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
15675 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15676 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
15677 extern GCC_NORETURN void foo(void);
15678 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
15680 cf_printf_attribute=no
15681 cf_scanf_attribute=no
15682 for cf_attribute in scanf printf unused noreturn
15685 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15687 cf_directive="__attribute__(($cf_attribute))"
15688 echo "checking for $CC $cf_directive" 1>&5
15690 case "$cf_attribute" in
15692 cf_printf_attribute=yes
15693 cat >conftest.h <<EOF
15694 #define GCC_$cf_ATTRIBUTE 1
15698 cf_scanf_attribute=yes
15699 cat >conftest.h <<EOF
15700 #define GCC_$cf_ATTRIBUTE 1
15704 cat >conftest.h <<EOF
15705 #define GCC_$cf_ATTRIBUTE $cf_directive
15710 if { (eval echo "$as_me:15710: \"$ac_compile\"") >&5
15711 (eval $ac_compile) 2>&5
15713 echo "$as_me:15713: \$? = $ac_status" >&5
15714 (exit "$ac_status"); }; then
15715 test -n "$verbose" && echo "$as_me:15715: result: ... $cf_attribute" >&5
15716 echo "${ECHO_T}... $cf_attribute" >&6
15717 cat conftest.h >>confdefs.h
15718 case "$cf_attribute" in
15721 cat >>confdefs.h <<EOF
15722 #define GCC_NORETURN $cf_directive
15727 cf_value='/* nothing */'
15728 if test "$cf_printf_attribute" != no ; then
15729 cf_value='__attribute__((format(printf,fmt,var)))'
15731 cat >>confdefs.h <<\EOF
15732 #define GCC_PRINTF 1
15737 cat >>confdefs.h <<EOF
15738 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15743 cf_value='/* nothing */'
15744 if test "$cf_scanf_attribute" != no ; then
15745 cf_value='__attribute__((format(scanf,fmt,var)))'
15747 cat >>confdefs.h <<\EOF
15748 #define GCC_SCANF 1
15753 cat >>confdefs.h <<EOF
15754 #define GCC_SCANFLIKE(fmt,var) $cf_value
15760 cat >>confdefs.h <<EOF
15761 #define GCC_UNUSED $cf_directive
15769 ${FGREP-fgrep} define conftest.i >>confdefs.h
15776 if test "x$enable_warnings" = "xyes"; then
15778 ADAFLAGS="$ADAFLAGS -gnatg"
15782 ### use option --enable-assertions to turn on generation of assertion code
15783 echo "$as_me:15783: checking if you want to enable runtime assertions" >&5
15784 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15786 # Check whether --enable-assertions or --disable-assertions was given.
15787 if test "${enable_assertions+set}" = set; then
15788 enableval="$enable_assertions"
15789 with_assertions=$enableval
15793 echo "$as_me:15793: result: $with_assertions" >&5
15794 echo "${ECHO_T}$with_assertions" >&6
15797 if test "$with_assertions" = no
15799 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15802 ADAFLAGS="$ADAFLAGS -gnata"
15807 ### use option --disable-leaks to suppress "permanent" leaks, for testing
15809 cat >>confdefs.h <<\EOF
15810 #define HAVE_NC_ALLOC_H 1
15813 ### use option --enable-expanded to generate certain macros as functions
15815 # Check whether --enable-expanded or --disable-expanded was given.
15816 if test "${enable_expanded+set}" = set; then
15817 enableval="$enable_expanded"
15818 test "$enableval" = yes &&
15819 cat >>confdefs.h <<\EOF
15820 #define NCURSES_EXPANDED 1
15825 ### use option --disable-macros to suppress macros in favor of functions
15827 # Check whether --enable-macros or --disable-macros was given.
15828 if test "${enable_macros+set}" = set; then
15829 enableval="$enable_macros"
15830 test "$enableval" = no &&
15831 cat >>confdefs.h <<\EOF
15832 #define NCURSES_NOMACROS 1
15837 # Normally we only add trace() to the debug-library. Allow this to be
15838 # extended to all models of the ncurses library:
15840 case "$CFLAGS $CPPFLAGS" in
15846 echo "$as_me:15846: checking whether to add trace feature to all models" >&5
15847 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
15849 # Check whether --with-trace or --without-trace was given.
15850 if test "${with_trace+set}" = set; then
15851 withval="$with_trace"
15852 cf_with_trace=$withval
15854 cf_with_trace=$cf_all_traces
15856 echo "$as_me:15856: result: $cf_with_trace" >&5
15857 echo "${ECHO_T}$cf_with_trace" >&6
15859 if test "$cf_with_trace" = yes ; then
15865 cf_new_extra_cppflags=
15867 for cf_add_cflags in -DTRACE
15869 case "$cf_fix_cppflags" in
15871 case "$cf_add_cflags" in
15872 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15873 case "$cf_add_cflags" in
15875 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15877 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15878 && test -z "${cf_tst_cflags}" \
15879 && cf_fix_cppflags=yes
15881 if test "$cf_fix_cppflags" = yes ; then
15883 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15884 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15887 elif test "${cf_tst_cflags}" = "\"'" ; then
15889 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15890 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15896 case "$CPPFLAGS" in
15900 case "$cf_add_cflags" in
15902 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15904 CPPFLAGS=`echo "$CPPFLAGS" | \
15905 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15906 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15911 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15912 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15919 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15920 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15927 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15928 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15930 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15932 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15933 && test -z "${cf_tst_cflags}" \
15934 && cf_fix_cppflags=no
15939 if test -n "$cf_new_cflags" ; then
15941 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15942 CFLAGS="${CFLAGS}$cf_new_cflags"
15946 if test -n "$cf_new_cppflags" ; then
15948 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15949 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15953 if test -n "$cf_new_extra_cppflags" ; then
15955 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15956 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15964 echo "$as_me:15964: checking if we want to use GNAT projects" >&5
15965 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
15967 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
15968 if test "${enable_gnat_projects+set}" = set; then
15969 enableval="$enable_gnat_projects"
15970 test "$enableval" != no && enableval=yes
15971 if test "$enableval" != "yes" ; then
15972 enable_gnat_projects=no
15974 enable_gnat_projects=yes
15978 enable_gnat_projects=yes
15981 echo "$as_me:15981: result: $enable_gnat_projects" >&5
15982 echo "${ECHO_T}$enable_gnat_projects" >&6
15984 ### Checks for libraries.
15985 case $cf_cv_system_name in
15988 echo "$as_me:15988: checking if ssp library is needed" >&5
15989 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
15990 if test "${cf_cv_need_libssp+set}" = set; then
15991 echo $ECHO_N "(cached) $ECHO_C" >&6
15994 cat >"conftest.$ac_ext" <<_ACEOF
15995 #line 15995 "configure"
15996 #include "confdefs.h"
15998 #include <sys/types.h>
15999 #include <dirent.h>
16005 DIR *dp = opendir(".");
16011 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16012 if { (eval echo "$as_me:16012: \"$ac_link\"") >&5
16013 (eval $ac_link) 2>&5
16015 echo "$as_me:16015: \$? = $ac_status" >&5
16016 (exit "$ac_status"); } &&
16017 { ac_try='test -s "conftest$ac_exeext"'
16018 { (eval echo "$as_me:16018: \"$ac_try\"") >&5
16019 (eval $ac_try) 2>&5
16021 echo "$as_me:16021: \$? = $ac_status" >&5
16022 (exit "$ac_status"); }; }; then
16023 cf_cv_need_libssp=no
16025 echo "$as_me: failed program was:" >&5
16026 cat "conftest.$ac_ext" >&5
16028 cf_save_LIBS="$LIBS"
16030 cat >"conftest.$ac_ext" <<_ACEOF
16031 #line 16031 "configure"
16032 #include "confdefs.h"
16034 #include <sys/types.h>
16035 #include <dirent.h>
16041 DIR *dp = opendir(".");
16047 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16048 if { (eval echo "$as_me:16048: \"$ac_link\"") >&5
16049 (eval $ac_link) 2>&5
16051 echo "$as_me:16051: \$? = $ac_status" >&5
16052 (exit "$ac_status"); } &&
16053 { ac_try='test -s "conftest$ac_exeext"'
16054 { (eval echo "$as_me:16054: \"$ac_try\"") >&5
16055 (eval $ac_try) 2>&5
16057 echo "$as_me:16057: \$? = $ac_status" >&5
16058 (exit "$ac_status"); }; }; then
16059 cf_cv_need_libssp=yes
16061 echo "$as_me: failed program was:" >&5
16062 cat "conftest.$ac_ext" >&5
16063 cf_cv_need_libssp=maybe
16065 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16066 LIBS="$cf_save_LIBS"
16069 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16071 echo "$as_me:16071: result: $cf_cv_need_libssp" >&5
16072 echo "${ECHO_T}$cf_cv_need_libssp" >&6
16074 if test "x$cf_cv_need_libssp" = xyes
16077 cf_add_libs="$LIBS"
16080 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16081 # filter duplicates
16082 for cf_add_1lib in $cf_add_0lib; do
16083 for cf_add_2lib in $cf_add_libs; do
16084 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16089 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16091 LIBS="$cf_add_libs"
16097 echo "$as_me:16097: checking for gettimeofday" >&5
16098 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
16099 if test "${ac_cv_func_gettimeofday+set}" = set; then
16100 echo $ECHO_N "(cached) $ECHO_C" >&6
16102 cat >"conftest.$ac_ext" <<_ACEOF
16103 #line 16103 "configure"
16104 #include "confdefs.h"
16105 #define gettimeofday autoconf_temporary
16106 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16107 #undef gettimeofday
16113 /* We use char because int might match the return type of a gcc2
16114 builtin and then its argument prototype would still apply. */
16115 char gettimeofday (void);
16121 /* The GNU C library defines stubs for functions which it implements
16122 to always fail with ENOSYS. Some functions are actually named
16123 something starting with __ and the normal name is an alias. */
16124 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16125 #error found stub for gettimeofday
16128 return gettimeofday ();
16133 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16134 if { (eval echo "$as_me:16134: \"$ac_link\"") >&5
16135 (eval $ac_link) 2>&5
16137 echo "$as_me:16137: \$? = $ac_status" >&5
16138 (exit "$ac_status"); } &&
16139 { ac_try='test -s "conftest$ac_exeext"'
16140 { (eval echo "$as_me:16140: \"$ac_try\"") >&5
16141 (eval $ac_try) 2>&5
16143 echo "$as_me:16143: \$? = $ac_status" >&5
16144 (exit "$ac_status"); }; }; then
16145 ac_cv_func_gettimeofday=yes
16147 echo "$as_me: failed program was:" >&5
16148 cat "conftest.$ac_ext" >&5
16149 ac_cv_func_gettimeofday=no
16151 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16153 echo "$as_me:16153: result: $ac_cv_func_gettimeofday" >&5
16154 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16155 if test "$ac_cv_func_gettimeofday" = yes; then
16156 cat >>confdefs.h <<\EOF
16157 #define HAVE_GETTIMEOFDAY 1
16162 echo "$as_me:16162: checking for gettimeofday in -lbsd" >&5
16163 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
16164 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
16165 echo $ECHO_N "(cached) $ECHO_C" >&6
16167 ac_check_lib_save_LIBS=$LIBS
16169 cat >"conftest.$ac_ext" <<_ACEOF
16170 #line 16170 "configure"
16171 #include "confdefs.h"
16173 /* Override any gcc2 internal prototype to avoid an error. */
16177 /* We use char because int might match the return type of a gcc2
16178 builtin and then its argument prototype would still apply. */
16179 char gettimeofday ();
16188 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16189 if { (eval echo "$as_me:16189: \"$ac_link\"") >&5
16190 (eval $ac_link) 2>&5
16192 echo "$as_me:16192: \$? = $ac_status" >&5
16193 (exit "$ac_status"); } &&
16194 { ac_try='test -s "conftest$ac_exeext"'
16195 { (eval echo "$as_me:16195: \"$ac_try\"") >&5
16196 (eval $ac_try) 2>&5
16198 echo "$as_me:16198: \$? = $ac_status" >&5
16199 (exit "$ac_status"); }; }; then
16200 ac_cv_lib_bsd_gettimeofday=yes
16202 echo "$as_me: failed program was:" >&5
16203 cat "conftest.$ac_ext" >&5
16204 ac_cv_lib_bsd_gettimeofday=no
16206 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16207 LIBS=$ac_check_lib_save_LIBS
16209 echo "$as_me:16209: result: $ac_cv_lib_bsd_gettimeofday" >&5
16210 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
16211 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
16213 cat >>confdefs.h <<\EOF
16214 #define HAVE_GETTIMEOFDAY 1
16224 ### Checks for header files.
16225 echo "$as_me:16225: checking for ANSI C header files" >&5
16226 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16227 if test "${ac_cv_header_stdc+set}" = set; then
16228 echo $ECHO_N "(cached) $ECHO_C" >&6
16230 cat >"conftest.$ac_ext" <<_ACEOF
16231 #line 16231 "configure"
16232 #include "confdefs.h"
16233 #include <stdlib.h>
16234 #include <stdarg.h>
16235 #include <string.h>
16239 if { (eval echo "$as_me:16239: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16240 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16242 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16244 cat conftest.err >&5
16245 echo "$as_me:16245: \$? = $ac_status" >&5
16246 (exit "$ac_status"); } >/dev/null; then
16247 if test -s conftest.err; then
16248 ac_cpp_err=$ac_c_preproc_warn_flag
16255 if test -z "$ac_cpp_err"; then
16256 ac_cv_header_stdc=yes
16258 echo "$as_me: failed program was:" >&5
16259 cat "conftest.$ac_ext" >&5
16260 ac_cv_header_stdc=no
16262 rm -f conftest.err "conftest.$ac_ext"
16264 if test $ac_cv_header_stdc = yes; then
16265 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16266 cat >"conftest.$ac_ext" <<_ACEOF
16267 #line 16267 "configure"
16268 #include "confdefs.h"
16269 #include <string.h>
16272 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16273 $EGREP "memchr" >/dev/null 2>&1; then
16276 ac_cv_header_stdc=no
16282 if test $ac_cv_header_stdc = yes; then
16283 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16284 cat >"conftest.$ac_ext" <<_ACEOF
16285 #line 16285 "configure"
16286 #include "confdefs.h"
16287 #include <stdlib.h>
16290 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16291 $EGREP "free" >/dev/null 2>&1; then
16294 ac_cv_header_stdc=no
16300 if test $ac_cv_header_stdc = yes; then
16301 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16302 if test "$cross_compiling" = yes; then
16305 cat >"conftest.$ac_ext" <<_ACEOF
16306 #line 16306 "configure"
16307 #include "confdefs.h"
16309 #if ((' ' & 0x0FF) == 0x020)
16310 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16311 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16313 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16314 || ('j' <= (c) && (c) <= 'r') \
16315 || ('s' <= (c) && (c) <= 'z'))
16316 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16319 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16324 for (i = 0; i < 256; i++)
16325 if (XOR (islower (i), ISLOWER (i))
16326 || toupper (i) != TOUPPER (i))
16327 $ac_main_return(2);
16328 $ac_main_return (0);
16331 rm -f "conftest$ac_exeext"
16332 if { (eval echo "$as_me:16332: \"$ac_link\"") >&5
16333 (eval $ac_link) 2>&5
16335 echo "$as_me:16335: \$? = $ac_status" >&5
16336 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16337 { (eval echo "$as_me:16337: \"$ac_try\"") >&5
16338 (eval $ac_try) 2>&5
16340 echo "$as_me:16340: \$? = $ac_status" >&5
16341 (exit "$ac_status"); }; }; then
16344 echo "$as_me: program exited with status $ac_status" >&5
16345 echo "$as_me: failed program was:" >&5
16346 cat "conftest.$ac_ext" >&5
16347 ac_cv_header_stdc=no
16349 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16353 echo "$as_me:16353: result: $ac_cv_header_stdc" >&5
16354 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16355 if test $ac_cv_header_stdc = yes; then
16357 cat >>confdefs.h <<\EOF
16358 #define STDC_HEADERS 1
16363 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
16365 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
16366 inttypes.h stdint.h unistd.h
16368 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16369 echo "$as_me:16369: checking for $ac_header" >&5
16370 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16371 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16372 echo $ECHO_N "(cached) $ECHO_C" >&6
16374 cat >"conftest.$ac_ext" <<_ACEOF
16375 #line 16375 "configure"
16376 #include "confdefs.h"
16377 $ac_includes_default
16378 #include <$ac_header>
16380 rm -f "conftest.$ac_objext"
16381 if { (eval echo "$as_me:16381: \"$ac_compile\"") >&5
16382 (eval $ac_compile) 2>&5
16384 echo "$as_me:16384: \$? = $ac_status" >&5
16385 (exit "$ac_status"); } &&
16386 { ac_try='test -s "conftest.$ac_objext"'
16387 { (eval echo "$as_me:16387: \"$ac_try\"") >&5
16388 (eval $ac_try) 2>&5
16390 echo "$as_me:16390: \$? = $ac_status" >&5
16391 (exit "$ac_status"); }; }; then
16392 eval "$as_ac_Header=yes"
16394 echo "$as_me: failed program was:" >&5
16395 cat "conftest.$ac_ext" >&5
16396 eval "$as_ac_Header=no"
16398 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16400 echo "$as_me:16400: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16401 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16402 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16403 cat >>confdefs.h <<EOF
16404 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16410 echo "$as_me:16410: checking for signed char" >&5
16411 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
16412 if test "${ac_cv_type_signed_char+set}" = set; then
16413 echo $ECHO_N "(cached) $ECHO_C" >&6
16415 cat >"conftest.$ac_ext" <<_ACEOF
16416 #line 16416 "configure"
16417 #include "confdefs.h"
16418 $ac_includes_default
16422 if ((signed char *) 0)
16424 if (sizeof (signed char))
16430 rm -f "conftest.$ac_objext"
16431 if { (eval echo "$as_me:16431: \"$ac_compile\"") >&5
16432 (eval $ac_compile) 2>&5
16434 echo "$as_me:16434: \$? = $ac_status" >&5
16435 (exit "$ac_status"); } &&
16436 { ac_try='test -s "conftest.$ac_objext"'
16437 { (eval echo "$as_me:16437: \"$ac_try\"") >&5
16438 (eval $ac_try) 2>&5
16440 echo "$as_me:16440: \$? = $ac_status" >&5
16441 (exit "$ac_status"); }; }; then
16442 ac_cv_type_signed_char=yes
16444 echo "$as_me: failed program was:" >&5
16445 cat "conftest.$ac_ext" >&5
16446 ac_cv_type_signed_char=no
16448 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16450 echo "$as_me:16450: result: $ac_cv_type_signed_char" >&5
16451 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
16453 echo "$as_me:16453: checking size of signed char" >&5
16454 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
16455 if test "${ac_cv_sizeof_signed_char+set}" = set; then
16456 echo $ECHO_N "(cached) $ECHO_C" >&6
16458 if test "$ac_cv_type_signed_char" = yes; then
16459 if test "$cross_compiling" = yes; then
16460 # Depending upon the size, compute the lo and hi bounds.
16461 cat >"conftest.$ac_ext" <<_ACEOF
16462 #line 16462 "configure"
16463 #include "confdefs.h"
16464 $ac_includes_default
16468 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
16473 rm -f "conftest.$ac_objext"
16474 if { (eval echo "$as_me:16474: \"$ac_compile\"") >&5
16475 (eval $ac_compile) 2>&5
16477 echo "$as_me:16477: \$? = $ac_status" >&5
16478 (exit "$ac_status"); } &&
16479 { ac_try='test -s "conftest.$ac_objext"'
16480 { (eval echo "$as_me:16480: \"$ac_try\"") >&5
16481 (eval $ac_try) 2>&5
16483 echo "$as_me:16483: \$? = $ac_status" >&5
16484 (exit "$ac_status"); }; }; then
16487 cat >"conftest.$ac_ext" <<_ACEOF
16488 #line 16488 "configure"
16489 #include "confdefs.h"
16490 $ac_includes_default
16494 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16499 rm -f "conftest.$ac_objext"
16500 if { (eval echo "$as_me:16500: \"$ac_compile\"") >&5
16501 (eval $ac_compile) 2>&5
16503 echo "$as_me:16503: \$? = $ac_status" >&5
16504 (exit "$ac_status"); } &&
16505 { ac_try='test -s "conftest.$ac_objext"'
16506 { (eval echo "$as_me:16506: \"$ac_try\"") >&5
16507 (eval $ac_try) 2>&5
16509 echo "$as_me:16509: \$? = $ac_status" >&5
16510 (exit "$ac_status"); }; }; then
16511 ac_hi=$ac_mid; break
16513 echo "$as_me: failed program was:" >&5
16514 cat "conftest.$ac_ext" >&5
16515 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
16517 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16520 echo "$as_me: failed program was:" >&5
16521 cat "conftest.$ac_ext" >&5
16524 cat >"conftest.$ac_ext" <<_ACEOF
16525 #line 16525 "configure"
16526 #include "confdefs.h"
16527 $ac_includes_default
16531 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
16536 rm -f "conftest.$ac_objext"
16537 if { (eval echo "$as_me:16537: \"$ac_compile\"") >&5
16538 (eval $ac_compile) 2>&5
16540 echo "$as_me:16540: \$? = $ac_status" >&5
16541 (exit "$ac_status"); } &&
16542 { ac_try='test -s "conftest.$ac_objext"'
16543 { (eval echo "$as_me:16543: \"$ac_try\"") >&5
16544 (eval $ac_try) 2>&5
16546 echo "$as_me:16546: \$? = $ac_status" >&5
16547 (exit "$ac_status"); }; }; then
16548 ac_lo=$ac_mid; break
16550 echo "$as_me: failed program was:" >&5
16551 cat "conftest.$ac_ext" >&5
16552 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
16554 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16557 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16558 # Binary search between lo and hi bounds.
16559 while test "x$ac_lo" != "x$ac_hi"; do
16560 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
16561 cat >"conftest.$ac_ext" <<_ACEOF
16562 #line 16562 "configure"
16563 #include "confdefs.h"
16564 $ac_includes_default
16568 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16573 rm -f "conftest.$ac_objext"
16574 if { (eval echo "$as_me:16574: \"$ac_compile\"") >&5
16575 (eval $ac_compile) 2>&5
16577 echo "$as_me:16577: \$? = $ac_status" >&5
16578 (exit "$ac_status"); } &&
16579 { ac_try='test -s "conftest.$ac_objext"'
16580 { (eval echo "$as_me:16580: \"$ac_try\"") >&5
16581 (eval $ac_try) 2>&5
16583 echo "$as_me:16583: \$? = $ac_status" >&5
16584 (exit "$ac_status"); }; }; then
16587 echo "$as_me: failed program was:" >&5
16588 cat "conftest.$ac_ext" >&5
16589 ac_lo=`expr "$ac_mid" + 1`
16591 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16593 ac_cv_sizeof_signed_char=$ac_lo
16595 if test "$cross_compiling" = yes; then
16596 { { echo "$as_me:16596: error: cannot run test program while cross compiling" >&5
16597 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16598 { (exit 1); exit 1; }; }
16600 cat >"conftest.$ac_ext" <<_ACEOF
16601 #line 16601 "configure"
16602 #include "confdefs.h"
16603 $ac_includes_default
16607 FILE *f = fopen ("conftest.val", "w");
16609 $ac_main_return (1);
16610 fprintf (f, "%ld", (long)(sizeof (signed char)));
16616 rm -f "conftest$ac_exeext"
16617 if { (eval echo "$as_me:16617: \"$ac_link\"") >&5
16618 (eval $ac_link) 2>&5
16620 echo "$as_me:16620: \$? = $ac_status" >&5
16621 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16622 { (eval echo "$as_me:16622: \"$ac_try\"") >&5
16623 (eval $ac_try) 2>&5
16625 echo "$as_me:16625: \$? = $ac_status" >&5
16626 (exit "$ac_status"); }; }; then
16627 ac_cv_sizeof_signed_char=`cat conftest.val`
16629 echo "$as_me: program exited with status $ac_status" >&5
16630 echo "$as_me: failed program was:" >&5
16631 cat "conftest.$ac_ext" >&5
16633 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16638 ac_cv_sizeof_signed_char=0
16641 echo "$as_me:16641: result: $ac_cv_sizeof_signed_char" >&5
16642 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
16643 cat >>confdefs.h <<EOF
16644 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
16647 echo "$as_me:16647: checking for ANSI C header files" >&5
16648 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16649 if test "${ac_cv_header_stdc+set}" = set; then
16650 echo $ECHO_N "(cached) $ECHO_C" >&6
16652 cat >"conftest.$ac_ext" <<_ACEOF
16653 #line 16653 "configure"
16654 #include "confdefs.h"
16655 #include <stdlib.h>
16656 #include <stdarg.h>
16657 #include <string.h>
16661 if { (eval echo "$as_me:16661: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16662 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16664 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16666 cat conftest.err >&5
16667 echo "$as_me:16667: \$? = $ac_status" >&5
16668 (exit "$ac_status"); } >/dev/null; then
16669 if test -s conftest.err; then
16670 ac_cpp_err=$ac_c_preproc_warn_flag
16677 if test -z "$ac_cpp_err"; then
16678 ac_cv_header_stdc=yes
16680 echo "$as_me: failed program was:" >&5
16681 cat "conftest.$ac_ext" >&5
16682 ac_cv_header_stdc=no
16684 rm -f conftest.err "conftest.$ac_ext"
16686 if test $ac_cv_header_stdc = yes; then
16687 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16688 cat >"conftest.$ac_ext" <<_ACEOF
16689 #line 16689 "configure"
16690 #include "confdefs.h"
16691 #include <string.h>
16694 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16695 $EGREP "memchr" >/dev/null 2>&1; then
16698 ac_cv_header_stdc=no
16704 if test $ac_cv_header_stdc = yes; then
16705 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16706 cat >"conftest.$ac_ext" <<_ACEOF
16707 #line 16707 "configure"
16708 #include "confdefs.h"
16709 #include <stdlib.h>
16712 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16713 $EGREP "free" >/dev/null 2>&1; then
16716 ac_cv_header_stdc=no
16722 if test $ac_cv_header_stdc = yes; then
16723 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16724 if test "$cross_compiling" = yes; then
16727 cat >"conftest.$ac_ext" <<_ACEOF
16728 #line 16728 "configure"
16729 #include "confdefs.h"
16731 #if ((' ' & 0x0FF) == 0x020)
16732 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16733 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16735 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16736 || ('j' <= (c) && (c) <= 'r') \
16737 || ('s' <= (c) && (c) <= 'z'))
16738 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16741 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16746 for (i = 0; i < 256; i++)
16747 if (XOR (islower (i), ISLOWER (i))
16748 || toupper (i) != TOUPPER (i))
16749 $ac_main_return(2);
16750 $ac_main_return (0);
16753 rm -f "conftest$ac_exeext"
16754 if { (eval echo "$as_me:16754: \"$ac_link\"") >&5
16755 (eval $ac_link) 2>&5
16757 echo "$as_me:16757: \$? = $ac_status" >&5
16758 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16759 { (eval echo "$as_me:16759: \"$ac_try\"") >&5
16760 (eval $ac_try) 2>&5
16762 echo "$as_me:16762: \$? = $ac_status" >&5
16763 (exit "$ac_status"); }; }; then
16766 echo "$as_me: program exited with status $ac_status" >&5
16767 echo "$as_me: failed program was:" >&5
16768 cat "conftest.$ac_ext" >&5
16769 ac_cv_header_stdc=no
16771 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16775 echo "$as_me:16775: result: $ac_cv_header_stdc" >&5
16776 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16777 if test $ac_cv_header_stdc = yes; then
16779 cat >>confdefs.h <<\EOF
16780 #define STDC_HEADERS 1
16785 ac_header_dirent=no
16786 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16787 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16788 echo "$as_me:16788: checking for $ac_hdr that defines DIR" >&5
16789 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16790 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16791 echo $ECHO_N "(cached) $ECHO_C" >&6
16793 cat >"conftest.$ac_ext" <<_ACEOF
16794 #line 16794 "configure"
16795 #include "confdefs.h"
16796 #include <sys/types.h>
16808 rm -f "conftest.$ac_objext"
16809 if { (eval echo "$as_me:16809: \"$ac_compile\"") >&5
16810 (eval $ac_compile) 2>&5
16812 echo "$as_me:16812: \$? = $ac_status" >&5
16813 (exit "$ac_status"); } &&
16814 { ac_try='test -s "conftest.$ac_objext"'
16815 { (eval echo "$as_me:16815: \"$ac_try\"") >&5
16816 (eval $ac_try) 2>&5
16818 echo "$as_me:16818: \$? = $ac_status" >&5
16819 (exit "$ac_status"); }; }; then
16820 eval "$as_ac_Header=yes"
16822 echo "$as_me: failed program was:" >&5
16823 cat "conftest.$ac_ext" >&5
16824 eval "$as_ac_Header=no"
16826 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16828 echo "$as_me:16828: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16829 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16830 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16831 cat >>confdefs.h <<EOF
16832 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16835 ac_header_dirent=$ac_hdr; break
16839 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
16840 if test $ac_header_dirent = dirent.h; then
16841 echo "$as_me:16841: checking for opendir in -ldir" >&5
16842 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
16843 if test "${ac_cv_lib_dir_opendir+set}" = set; then
16844 echo $ECHO_N "(cached) $ECHO_C" >&6
16846 ac_check_lib_save_LIBS=$LIBS
16848 cat >"conftest.$ac_ext" <<_ACEOF
16849 #line 16849 "configure"
16850 #include "confdefs.h"
16852 /* Override any gcc2 internal prototype to avoid an error. */
16856 /* We use char because int might match the return type of a gcc2
16857 builtin and then its argument prototype would still apply. */
16867 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16868 if { (eval echo "$as_me:16868: \"$ac_link\"") >&5
16869 (eval $ac_link) 2>&5
16871 echo "$as_me:16871: \$? = $ac_status" >&5
16872 (exit "$ac_status"); } &&
16873 { ac_try='test -s "conftest$ac_exeext"'
16874 { (eval echo "$as_me:16874: \"$ac_try\"") >&5
16875 (eval $ac_try) 2>&5
16877 echo "$as_me:16877: \$? = $ac_status" >&5
16878 (exit "$ac_status"); }; }; then
16879 ac_cv_lib_dir_opendir=yes
16881 echo "$as_me: failed program was:" >&5
16882 cat "conftest.$ac_ext" >&5
16883 ac_cv_lib_dir_opendir=no
16885 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16886 LIBS=$ac_check_lib_save_LIBS
16888 echo "$as_me:16888: result: $ac_cv_lib_dir_opendir" >&5
16889 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
16890 if test "$ac_cv_lib_dir_opendir" = yes; then
16895 echo "$as_me:16895: checking for opendir in -lx" >&5
16896 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
16897 if test "${ac_cv_lib_x_opendir+set}" = set; then
16898 echo $ECHO_N "(cached) $ECHO_C" >&6
16900 ac_check_lib_save_LIBS=$LIBS
16902 cat >"conftest.$ac_ext" <<_ACEOF
16903 #line 16903 "configure"
16904 #include "confdefs.h"
16906 /* Override any gcc2 internal prototype to avoid an error. */
16910 /* We use char because int might match the return type of a gcc2
16911 builtin and then its argument prototype would still apply. */
16921 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16922 if { (eval echo "$as_me:16922: \"$ac_link\"") >&5
16923 (eval $ac_link) 2>&5
16925 echo "$as_me:16925: \$? = $ac_status" >&5
16926 (exit "$ac_status"); } &&
16927 { ac_try='test -s "conftest$ac_exeext"'
16928 { (eval echo "$as_me:16928: \"$ac_try\"") >&5
16929 (eval $ac_try) 2>&5
16931 echo "$as_me:16931: \$? = $ac_status" >&5
16932 (exit "$ac_status"); }; }; then
16933 ac_cv_lib_x_opendir=yes
16935 echo "$as_me: failed program was:" >&5
16936 cat "conftest.$ac_ext" >&5
16937 ac_cv_lib_x_opendir=no
16939 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16940 LIBS=$ac_check_lib_save_LIBS
16942 echo "$as_me:16942: result: $ac_cv_lib_x_opendir" >&5
16943 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
16944 if test "$ac_cv_lib_x_opendir" = yes; then
16950 echo "$as_me:16950: checking whether time.h and sys/time.h may both be included" >&5
16951 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16952 if test "${ac_cv_header_time+set}" = set; then
16953 echo $ECHO_N "(cached) $ECHO_C" >&6
16955 cat >"conftest.$ac_ext" <<_ACEOF
16956 #line 16956 "configure"
16957 #include "confdefs.h"
16958 #include <sys/types.h>
16959 #include <sys/time.h>
16965 if ((struct tm *) 0)
16971 rm -f "conftest.$ac_objext"
16972 if { (eval echo "$as_me:16972: \"$ac_compile\"") >&5
16973 (eval $ac_compile) 2>&5
16975 echo "$as_me:16975: \$? = $ac_status" >&5
16976 (exit "$ac_status"); } &&
16977 { ac_try='test -s "conftest.$ac_objext"'
16978 { (eval echo "$as_me:16978: \"$ac_try\"") >&5
16979 (eval $ac_try) 2>&5
16981 echo "$as_me:16981: \$? = $ac_status" >&5
16982 (exit "$ac_status"); }; }; then
16983 ac_cv_header_time=yes
16985 echo "$as_me: failed program was:" >&5
16986 cat "conftest.$ac_ext" >&5
16987 ac_cv_header_time=no
16989 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16991 echo "$as_me:16991: result: $ac_cv_header_time" >&5
16992 echo "${ECHO_T}$ac_cv_header_time" >&6
16993 if test $ac_cv_header_time = yes; then
16995 cat >>confdefs.h <<\EOF
16996 #define TIME_WITH_SYS_TIME 1
17001 ### checks for compiler characteristics
17003 ac_cpp='$CPP $CPPFLAGS'
17004 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17005 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17006 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17007 ac_main_return="return"
17009 echo "$as_me:17009: checking for an ANSI C-conforming const" >&5
17010 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17011 if test "${ac_cv_c_const+set}" = set; then
17012 echo $ECHO_N "(cached) $ECHO_C" >&6
17014 cat >"conftest.$ac_ext" <<_ACEOF
17015 #line 17015 "configure"
17016 #include "confdefs.h"
17021 /* FIXME: Include the comments suggested by Paul. */
17022 #ifndef __cplusplus
17023 /* Ultrix mips cc rejects this. */
17024 typedef int charset[2];
17026 /* SunOS 4.1.1 cc rejects this. */
17027 char const *const *ccp;
17029 /* NEC SVR4.0.2 mips cc rejects this. */
17030 struct point {int x, y;};
17031 static struct point const zero = {0,0};
17032 /* AIX XL C 1.02.0.0 rejects this.
17033 It does not let you subtract one const X* pointer from another in
17034 an arm of an if-expression whose if-part is not a constant
17036 const char *g = "string";
17037 ccp = &g + (g ? g-g : 0);
17038 /* HPUX 7.0 cc rejects these. */
17041 ccp = (char const *const *) p;
17042 { /* SCO 3.2v4 cc rejects this. */
17044 char const *s = 0 ? (char *) 0 : (char const *) 0;
17048 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
17049 int x[] = {25, 17};
17050 const int *foo = &x[0];
17053 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17054 typedef const int *iptr;
17058 { /* AIX XL C 1.02.0.0 rejects this saying
17059 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17060 struct s { int j; const int *ap[3]; };
17061 struct s *b; b->j = 5;
17063 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17064 const int foo = 10;
17072 rm -f "conftest.$ac_objext"
17073 if { (eval echo "$as_me:17073: \"$ac_compile\"") >&5
17074 (eval $ac_compile) 2>&5
17076 echo "$as_me:17076: \$? = $ac_status" >&5
17077 (exit "$ac_status"); } &&
17078 { ac_try='test -s "conftest.$ac_objext"'
17079 { (eval echo "$as_me:17079: \"$ac_try\"") >&5
17080 (eval $ac_try) 2>&5
17082 echo "$as_me:17082: \$? = $ac_status" >&5
17083 (exit "$ac_status"); }; }; then
17086 echo "$as_me: failed program was:" >&5
17087 cat "conftest.$ac_ext" >&5
17090 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17092 echo "$as_me:17092: result: $ac_cv_c_const" >&5
17093 echo "${ECHO_T}$ac_cv_c_const" >&6
17094 if test $ac_cv_c_const = no; then
17096 cat >>confdefs.h <<\EOF
17102 ### Checks for external-data
17104 echo "$as_me:17104: checking if data-only library module links" >&5
17105 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
17106 if test "${cf_cv_link_dataonly+set}" = set; then
17107 echo $ECHO_N "(cached) $ECHO_C" >&6
17111 cat >conftest.$ac_ext <<EOF
17112 #line 17112 "configure"
17113 int testdata[3] = { 123, 456, 789 };
17115 if { (eval echo "$as_me:17115: \"$ac_compile\"") >&5
17116 (eval $ac_compile) 2>&5
17118 echo "$as_me:17118: \$? = $ac_status" >&5
17119 (exit "$ac_status"); } ; then
17120 mv conftest.o data.o && \
17121 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
17123 rm -f conftest.$ac_ext data.o
17124 cat >conftest.$ac_ext <<EOF
17125 #line 17125 "configure"
17129 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
17131 extern int testdata[3];
17132 return testdata[0] == 123
17133 && testdata[1] == 456
17134 && testdata[2] == 789;
17138 if { (eval echo "$as_me:17138: \"$ac_compile\"") >&5
17139 (eval $ac_compile) 2>&5
17141 echo "$as_me:17141: \$? = $ac_status" >&5
17142 (exit "$ac_status"); }; then
17143 mv conftest.o func.o && \
17144 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17146 rm -f conftest.$ac_ext func.o
17147 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17148 cf_saveLIBS="$LIBS"
17149 LIBS="conftest.a $LIBS"
17150 if test "$cross_compiling" = yes; then
17151 cf_cv_link_dataonly=unknown
17153 cat >"conftest.$ac_ext" <<_ACEOF
17154 #line 17154 "configure"
17155 #include "confdefs.h"
17159 extern int testfunc();
17160 ${cf_cv_main_return:-return} (!testfunc());
17164 rm -f "conftest$ac_exeext"
17165 if { (eval echo "$as_me:17165: \"$ac_link\"") >&5
17166 (eval $ac_link) 2>&5
17168 echo "$as_me:17168: \$? = $ac_status" >&5
17169 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17170 { (eval echo "$as_me:17170: \"$ac_try\"") >&5
17171 (eval $ac_try) 2>&5
17173 echo "$as_me:17173: \$? = $ac_status" >&5
17174 (exit "$ac_status"); }; }; then
17175 cf_cv_link_dataonly=yes
17177 echo "$as_me: program exited with status $ac_status" >&5
17178 echo "$as_me: failed program was:" >&5
17179 cat "conftest.$ac_ext" >&5
17180 cf_cv_link_dataonly=no
17182 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17184 LIBS="$cf_saveLIBS"
17188 echo "$as_me:17188: result: $cf_cv_link_dataonly" >&5
17189 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17191 if test "$cf_cv_link_dataonly" = no ; then
17193 cat >>confdefs.h <<\EOF
17194 #define BROKEN_LINKER 1
17200 ### Checks for library functions.
17206 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17207 echo "$as_me:17207: checking for $ac_header" >&5
17208 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17209 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17210 echo $ECHO_N "(cached) $ECHO_C" >&6
17212 cat >"conftest.$ac_ext" <<_ACEOF
17213 #line 17213 "configure"
17214 #include "confdefs.h"
17215 #include <$ac_header>
17217 if { (eval echo "$as_me:17217: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17218 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17220 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17222 cat conftest.err >&5
17223 echo "$as_me:17223: \$? = $ac_status" >&5
17224 (exit "$ac_status"); } >/dev/null; then
17225 if test -s conftest.err; then
17226 ac_cpp_err=$ac_c_preproc_warn_flag
17233 if test -z "$ac_cpp_err"; then
17234 eval "$as_ac_Header=yes"
17236 echo "$as_me: failed program was:" >&5
17237 cat "conftest.$ac_ext" >&5
17238 eval "$as_ac_Header=no"
17240 rm -f conftest.err "conftest.$ac_ext"
17242 echo "$as_me:17242: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17243 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17244 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17245 cat >>confdefs.h <<EOF
17246 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17252 echo "$as_me:17252: checking for working mkstemp" >&5
17253 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17254 if test "${cf_cv_func_mkstemp+set}" = set; then
17255 echo $ECHO_N "(cached) $ECHO_C" >&6
17259 if test "$cross_compiling" = yes; then
17260 cf_cv_func_mkstemp=maybe
17262 cat >"conftest.$ac_ext" <<_ACEOF
17263 #line 17263 "configure"
17264 #include "confdefs.h"
17266 #include <sys/types.h>
17267 #ifdef HAVE_UNISTD_H
17268 #include <unistd.h>
17270 #include <stdlib.h>
17272 #include <string.h>
17273 #include <sys/stat.h>
17276 char *tmpl = "conftestXXXXXX";
17284 for (n = 0; n < 2; ++n) {
17285 strcpy(name[n], tmpl);
17286 if ((fd = mkstemp(name[n])) >= 0) {
17287 if (!strcmp(name[n], tmpl)
17288 || stat(name[n], &sb) != 0
17289 || (sb.st_mode & S_IFMT) != S_IFREG
17290 || (sb.st_mode & 077) != 0) {
17297 && !strcmp(name[0], name[1]))
17299 ${cf_cv_main_return:-return}(result);
17303 rm -f "conftest$ac_exeext"
17304 if { (eval echo "$as_me:17304: \"$ac_link\"") >&5
17305 (eval $ac_link) 2>&5
17307 echo "$as_me:17307: \$? = $ac_status" >&5
17308 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17309 { (eval echo "$as_me:17309: \"$ac_try\"") >&5
17310 (eval $ac_try) 2>&5
17312 echo "$as_me:17312: \$? = $ac_status" >&5
17313 (exit "$ac_status"); }; }; then
17314 cf_cv_func_mkstemp=yes
17317 echo "$as_me: program exited with status $ac_status" >&5
17318 echo "$as_me: failed program was:" >&5
17319 cat "conftest.$ac_ext" >&5
17320 cf_cv_func_mkstemp=no
17323 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17327 echo "$as_me:17327: result: $cf_cv_func_mkstemp" >&5
17328 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17329 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17330 echo "$as_me:17330: checking for mkstemp" >&5
17331 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17332 if test "${ac_cv_func_mkstemp+set}" = set; then
17333 echo $ECHO_N "(cached) $ECHO_C" >&6
17335 cat >"conftest.$ac_ext" <<_ACEOF
17336 #line 17336 "configure"
17337 #include "confdefs.h"
17338 #define mkstemp autoconf_temporary
17339 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17346 /* We use char because int might match the return type of a gcc2
17347 builtin and then its argument prototype would still apply. */
17348 char mkstemp (void);
17354 /* The GNU C library defines stubs for functions which it implements
17355 to always fail with ENOSYS. Some functions are actually named
17356 something starting with __ and the normal name is an alias. */
17357 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17358 #error found stub for mkstemp
17366 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17367 if { (eval echo "$as_me:17367: \"$ac_link\"") >&5
17368 (eval $ac_link) 2>&5
17370 echo "$as_me:17370: \$? = $ac_status" >&5
17371 (exit "$ac_status"); } &&
17372 { ac_try='test -s "conftest$ac_exeext"'
17373 { (eval echo "$as_me:17373: \"$ac_try\"") >&5
17374 (eval $ac_try) 2>&5
17376 echo "$as_me:17376: \$? = $ac_status" >&5
17377 (exit "$ac_status"); }; }; then
17378 ac_cv_func_mkstemp=yes
17380 echo "$as_me: failed program was:" >&5
17381 cat "conftest.$ac_ext" >&5
17382 ac_cv_func_mkstemp=no
17384 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17386 echo "$as_me:17386: result: $ac_cv_func_mkstemp" >&5
17387 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17390 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17392 cat >>confdefs.h <<\EOF
17393 #define HAVE_MKSTEMP 1
17398 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17399 CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17400 CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17404 if test "$cf_with_ada" != "no" ; then
17406 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
17409 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17411 unset ac_cv_path_cf_TEMP_gnat
17413 # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
17414 set dummy $cf_prog_gnat; ac_word=$2
17415 echo "$as_me:17415: checking for $ac_word" >&5
17416 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17417 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
17418 echo $ECHO_N "(cached) $ECHO_C" >&6
17420 case $cf_TEMP_gnat in
17422 ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
17425 ac_save_IFS=$IFS; IFS=$ac_path_separator
17427 for ac_dir in $ac_dummy; do
17429 test -z "$ac_dir" && ac_dir=.
17430 if $as_executable_p "$ac_dir/$ac_word"; then
17431 ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
17432 echo "$as_me:17432: found $ac_dir/$ac_word" >&5
17437 test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
17441 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
17443 if test -n "$cf_TEMP_gnat"; then
17444 echo "$as_me:17444: result: $cf_TEMP_gnat" >&5
17445 echo "${ECHO_T}$cf_TEMP_gnat" >&6
17447 echo "$as_me:17447: result: no" >&5
17448 echo "${ECHO_T}no" >&6
17451 eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
17453 if test "x$cf_TEMP_gnat" != xno; then
17454 unset cf_cv_gnat_version
17457 echo "$as_me:17457: checking for $cf_prog_gnat version" >&5
17458 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
17459 if test "${cf_cv_gnat_version+set}" = set; then
17460 echo $ECHO_N "(cached) $ECHO_C" >&6
17463 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
17464 grep '[0-9].[0-9][0-9]*' |\
17465 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17468 echo "$as_me:17468: result: $cf_cv_gnat_version" >&5
17469 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17470 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17471 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
17474 eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
17477 unset cf_cv_gnat_version
17478 unset ac_cv_path_cf_TEMP_gnat
17481 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
17483 cf_cv_prog_gnat_correct=no
17485 cf_ada_make=gnatmake
17486 if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
17487 # gprconfig is newer than gnatmake; we can continue...
17490 rm -rf ./conftest* ./*~conftest*
17491 if mkdir conftest.src
17495 for cf_gprconfig in Ada C
17497 echo "$as_me:17497: checking for gprconfig name for $cf_gprconfig" >&5
17498 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
17499 if test "$cf_gprconfig" = C
17501 for cf_gprconfig_param in \
17502 "$cf_gprconfig,,,,GNATGCC" \
17503 "$cf_gprconfig,,,,GCC" \
17506 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17507 test -n "$cf_gprconfig_value" && break
17510 cf_gprconfig_param=$cf_gprconfig
17511 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17513 if test -n "$cf_gprconfig_value"
17515 eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
17516 echo "$as_me:17516: result: $cf_gprconfig_value" >&5
17517 echo "${ECHO_T}$cf_gprconfig_value" >&6
17519 echo "$as_me:17519: result: missing" >&5
17520 echo "${ECHO_T}missing" >&6
17526 rm -rf ./conftest* ./*~conftest*
17529 if test "x$cf_ada_config" != "x#"
17532 echo "$as_me:17532: checking for gnat version" >&5
17533 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17534 if test "${cf_cv_gnat_version+set}" = set; then
17535 echo $ECHO_N "(cached) $ECHO_C" >&6
17538 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
17539 grep '[0-9].[0-9][0-9]*' |\
17540 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17543 echo "$as_me:17543: result: $cf_cv_gnat_version" >&5
17544 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17545 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17547 case "$cf_cv_gnat_version" in
17548 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17549 cf_cv_prog_gnat_correct=yes
17552 { echo "$as_me:17552: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
17553 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
17554 cf_cv_prog_gnat_correct=no
17558 # Extract the first word of "m4", so it can be a program name with args.
17559 set dummy m4; ac_word=$2
17560 echo "$as_me:17560: checking for $ac_word" >&5
17561 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17562 if test "${ac_cv_prog_M4_exists+set}" = set; then
17563 echo $ECHO_N "(cached) $ECHO_C" >&6
17565 if test -n "$M4_exists"; then
17566 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17568 ac_save_IFS=$IFS; IFS=$ac_path_separator
17570 for ac_dir in $ac_dummy; do
17572 test -z "$ac_dir" && ac_dir=.
17573 $as_executable_p "$ac_dir/$ac_word" || continue
17574 ac_cv_prog_M4_exists="yes"
17575 echo "$as_me:17575: found $ac_dir/$ac_word" >&5
17579 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17582 M4_exists=$ac_cv_prog_M4_exists
17583 if test -n "$M4_exists"; then
17584 echo "$as_me:17584: result: $M4_exists" >&5
17585 echo "${ECHO_T}$M4_exists" >&6
17587 echo "$as_me:17587: result: no" >&5
17588 echo "${ECHO_T}no" >&6
17591 if test "$ac_cv_prog_M4_exists" = no; then
17592 cf_cv_prog_gnat_correct=no
17593 { echo "$as_me:17593: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
17594 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
17596 if test "$cf_cv_prog_gnat_correct" = yes; then
17597 echo "$as_me:17597: checking if GNAT works" >&5
17598 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17600 rm -rf ./conftest* ./*~conftest*
17601 cat >>conftest.ads <<CF_EOF
17602 procedure conftest;
17604 cat >>conftest.adb <<CF_EOF
17607 procedure conftest is
17609 Text_IO.Put ("Hello World");
17611 GNAT.OS_Lib.OS_Exit (0);
17614 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17615 if ( ./conftest 1>&5 2>&1 ) ; then
17616 cf_cv_prog_gnat_correct=yes
17618 cf_cv_prog_gnat_correct=no
17621 cf_cv_prog_gnat_correct=no
17623 rm -rf ./conftest* ./*~conftest*
17625 echo "$as_me:17625: result: $cf_cv_prog_gnat_correct" >&5
17626 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17629 cf_cv_prog_gnat_correct=no
17633 if test "$cf_cv_prog_gnat_correct" = yes; then
17635 echo "$as_me:17635: checking optimization options for ADAFLAGS" >&5
17636 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
17640 ADAFLAGS="$ADAFLAGS -g"
17646 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
17648 ADAFLAGS="$ADAFLAGS $cf_O_flag"
17652 echo "$as_me:17652: result: $ADAFLAGS" >&5
17653 echo "${ECHO_T}$ADAFLAGS" >&6
17655 echo "$as_me:17655: checking if GNATPREP supports -T option" >&5
17656 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
17657 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
17658 echo $ECHO_N "(cached) $ECHO_C" >&6
17661 cf_cv_gnatprep_opt_t=no
17662 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
17665 echo "$as_me:17665: result: $cf_cv_gnatprep_opt_t" >&5
17666 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
17667 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
17669 echo "$as_me:17669: checking if GNAT supports generics" >&5
17670 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
17671 case "$cf_cv_gnat_version" in
17672 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17673 cf_gnat_generics=yes
17676 cf_gnat_generics=no
17679 echo "$as_me:17679: result: $cf_gnat_generics" >&5
17680 echo "${ECHO_T}$cf_gnat_generics" >&6
17682 if test "$cf_gnat_generics" = yes
17684 cf_compile_generics=generics
17685 cf_generic_objects="\${GENOBJS}"
17687 cf_compile_generics=
17688 cf_generic_objects=
17691 echo "$as_me:17691: checking if GNAT supports SIGINT" >&5
17692 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
17693 if test "${cf_cv_gnat_sigint+set}" = set; then
17694 echo $ECHO_N "(cached) $ECHO_C" >&6
17697 rm -rf ./conftest* ./*~conftest*
17698 cat >>conftest.ads <<CF_EOF
17699 with Ada.Interrupts.Names;
17701 package ConfTest is
17703 pragma Warnings (Off); -- the next pragma exists since 3.11p
17704 pragma Unreserve_All_Interrupts;
17705 pragma Warnings (On);
17707 protected Process is
17709 function Continue return Boolean;
17710 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
17712 Done : Boolean := False;
17717 cat >>conftest.adb <<CF_EOF
17718 package body ConfTest is
17719 protected body Process is
17724 function Continue return Boolean is
17731 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17732 cf_cv_gnat_sigint=yes
17734 cf_cv_gnat_sigint=no
17736 rm -rf ./conftest* ./*~conftest*
17739 echo "$as_me:17739: result: $cf_cv_gnat_sigint" >&5
17740 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
17742 if test "$cf_cv_gnat_sigint" = yes ; then
17745 USE_GNAT_SIGINT="#"
17748 cf_gnat_libraries=no
17749 cf_gnat_projects=no
17751 if test "$enable_gnat_projects" != no ; then
17752 echo "$as_me:17752: checking if GNAT supports project files" >&5
17753 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
17754 case "$cf_cv_gnat_version" in
17758 case "$cf_cv_system_name" in
17762 rm -rf ./conftest* ./*~conftest*
17763 if mkdir conftest.src conftest.bin conftest.lib
17766 rm -rf ./conftest* ./*~conftest*
17767 cat >>library.gpr <<CF_EOF
17769 Kind := External ("LIB_KIND");
17770 for Library_Name use "ConfTest";
17771 for Object_Dir use ".";
17772 for Library_ALI_Dir use External("LIBRARY_DIR");
17773 for Library_Version use External ("SONAME");
17774 for Library_Kind use Kind;
17775 for Library_Dir use External("BUILD_DIR");
17776 Source_Dir := External ("SOURCE_DIR");
17777 for Source_Dirs use (Source_Dir);
17780 cat >>confpackage.ads <<CF_EOF
17781 package ConfPackage is
17782 procedure conftest;
17785 cat >>confpackage.adb <<CF_EOF
17787 package body ConfPackage is
17788 procedure conftest is
17790 Text_IO.Put ("Hello World");
17795 if ( "$cf_ada_make" $ADAFLAGS \
17797 -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
17798 -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
17799 -XSOURCE_DIR="`pwd`" \
17800 -XSONAME=libConfTest.so.1 \
17801 -XLIB_KIND=static 1>&5 2>&1 ) ; then
17802 cf_gnat_projects=yes
17806 if test -f conftest.lib/confpackage.ali
17808 cf_gnat_libraries=yes
17810 rm -rf ./conftest* ./*~conftest*
17815 echo "$as_me:17815: result: $cf_gnat_projects" >&5
17816 echo "${ECHO_T}$cf_gnat_projects" >&6
17817 fi # enable_gnat_projects
17819 if test "$cf_gnat_projects" = yes
17821 echo "$as_me:17821: checking if GNAT supports libraries" >&5
17822 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
17823 echo "$as_me:17823: result: $cf_gnat_libraries" >&5
17824 echo "${ECHO_T}$cf_gnat_libraries" >&6
17827 USE_OLD_MAKERULES=""
17828 USE_GNAT_PROJECTS="#"
17829 USE_GNAT_MAKE_GPR="#"
17830 USE_GNAT_GPRBUILD="#"
17832 if test "$cf_gnat_projects" = yes
17834 USE_OLD_MAKERULES="#"
17835 USE_GNAT_PROJECTS=""
17836 if test "$cf_cv_VERSION_GPRBUILD" != no
17838 USE_GNAT_GPRBUILD=""
17839 elif test "$cf_cv_VERSION_GNATMAKE" != no
17841 USE_GNAT_MAKE_GPR=""
17843 { echo "$as_me:17843: WARNING: use old makefile rules since tools are missing" >&5
17844 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
17848 if test "$cf_gnat_libraries" = yes
17850 USE_GNAT_LIBRARIES=""
17852 USE_GNAT_LIBRARIES="#"
17855 echo "$as_me:17855: checking for ada-compiler" >&5
17856 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
17858 # Check whether --with-ada-compiler or --without-ada-compiler was given.
17859 if test "${with_ada_compiler+set}" = set; then
17860 withval="$with_ada_compiler"
17861 cf_ada_compiler=$withval
17863 cf_ada_compiler=gnatmake
17866 echo "$as_me:17866: result: $cf_ada_compiler" >&5
17867 echo "${ECHO_T}$cf_ada_compiler" >&6
17869 cf_ada_package=terminal_interface
17871 echo "$as_me:17871: checking for ada-include" >&5
17872 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
17874 # Check whether --with-ada-include or --without-ada-include was given.
17875 if test "${with_ada_include+set}" = set; then
17876 withval="$with_ada_include"
17879 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
17880 fi; if test -n "$prefix/share/ada/adainclude" ; then
17882 if test "x$prefix" != xNONE; then
17883 cf_path_syntax="$prefix"
17885 cf_path_syntax="$ac_default_prefix"
17888 case ".$withval" in
17889 (.\$\(*\)*|.\'*\'*)
17893 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17895 (.\$\{*prefix\}*|.\$\{*dir\}*)
17896 eval withval="$withval"
17897 case ".$withval" in
17899 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17904 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17907 { { echo "$as_me:17907: error: expected a pathname, not \"$withval\"" >&5
17908 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17909 { (exit 1); exit 1; }; }
17914 eval ADA_INCLUDE="$withval"
17916 echo "$as_me:17916: result: $ADA_INCLUDE" >&5
17917 echo "${ECHO_T}$ADA_INCLUDE" >&6
17919 echo "$as_me:17919: checking for ada-objects" >&5
17920 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
17922 # Check whether --with-ada-objects or --without-ada-objects was given.
17923 if test "${with_ada_objects+set}" = set; then
17924 withval="$with_ada_objects"
17927 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
17928 fi; if test -n "$prefix/lib/ada/adalib" ; then
17930 if test "x$prefix" != xNONE; then
17931 cf_path_syntax="$prefix"
17933 cf_path_syntax="$ac_default_prefix"
17936 case ".$withval" in
17937 (.\$\(*\)*|.\'*\'*)
17941 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17943 (.\$\{*prefix\}*|.\$\{*dir\}*)
17944 eval withval="$withval"
17945 case ".$withval" in
17947 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17952 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17955 { { echo "$as_me:17955: error: expected a pathname, not \"$withval\"" >&5
17956 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17957 { (exit 1); exit 1; }; }
17962 eval ADA_OBJECTS="$withval"
17964 echo "$as_me:17964: result: $ADA_OBJECTS" >&5
17965 echo "${ECHO_T}$ADA_OBJECTS" >&6
17967 echo "$as_me:17967: checking if an Ada95 shared-library should be built" >&5
17968 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
17970 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
17971 if test "${with_ada_sharedlib+set}" = set; then
17972 withval="$with_ada_sharedlib"
17973 with_ada_sharedlib=$withval
17975 with_ada_sharedlib=no
17977 echo "$as_me:17977: result: $with_ada_sharedlib" >&5
17978 echo "${ECHO_T}$with_ada_sharedlib" >&6
17980 if test "x$with_ada_sharedlib" != xno
17982 if test "x$cf_gnat_projects" != xyes
17984 { echo "$as_me:17984: WARNING: disabling shared-library since GNAT projects are not supported" >&5
17985 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
17986 with_ada_sharedlib=no
17990 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
17991 MAKE_ADA_SHAREDLIB="#"
17993 if test "x$with_ada_sharedlib" != xno
17995 MAKE_ADA_SHAREDLIB=
17996 if test "x$with_ada_sharedlib" != xyes
17998 ADA_SHAREDLIB="$with_ada_sharedlib"
18002 # allow the Ada binding to be renamed
18004 echo "$as_me:18004: checking for ada-libname" >&5
18005 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
18007 # Check whether --with-ada-libname or --without-ada-libname was given.
18008 if test "${with_ada_libname+set}" = set; then
18009 withval="$with_ada_libname"
18010 ADA_LIBNAME=$withval
18012 ADA_LIBNAME=AdaCurses
18014 case "x$ADA_LIBNAME" in
18016 ADA_LIBNAME=AdaCurses
18020 echo "$as_me:18020: result: $ADA_LIBNAME" >&5
18021 echo "${ECHO_T}$ADA_LIBNAME" >&6
18024 { { echo "$as_me:18024: error: No usable Ada compiler found" >&5
18025 echo "$as_me: error: No usable Ada compiler found" >&2;}
18026 { (exit 1); exit 1; }; }
18029 { { echo "$as_me:18029: error: The Ada compiler is needed for this package" >&5
18030 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
18031 { (exit 1); exit 1; }; }
18034 ################################################################################
18041 ### Construct the list of include-directories to be generated
18043 if test "$srcdir" != "."; then
18044 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
18046 CPPFLAGS="-I../include $CPPFLAGS"
18047 if test "$srcdir" != "."; then
18048 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
18050 CPPFLAGS="-I. $CPPFLAGS"
18052 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18053 if test "$srcdir" != "."; then
18054 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18056 if test "$GCC" != yes; then
18057 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18058 elif test "$includedir" != "/usr/include"; then
18059 if test "$includedir" = '${prefix}/include' ; then
18060 if test x$prefix != x/usr ; then
18061 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18064 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18068 ### Build up pieces for makefile rules
18069 echo "$as_me:18069: checking default library suffix" >&5
18070 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18072 case $DFT_LWR_MODEL in
18073 (libtool) DFT_ARG_SUFFIX='' ;;
18074 (normal) DFT_ARG_SUFFIX='' ;;
18075 (debug) DFT_ARG_SUFFIX='_g' ;;
18076 (profile) DFT_ARG_SUFFIX='_p' ;;
18077 (shared) DFT_ARG_SUFFIX='' ;;
18079 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18080 echo "$as_me:18080: result: $DFT_ARG_SUFFIX" >&5
18081 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18083 echo "$as_me:18083: checking default library-dependency suffix" >&5
18084 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18086 case X$DFT_LWR_MODEL in
18088 DFT_LIB_SUFFIX='.la'
18089 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18092 case "$cf_cv_system_name" in
18094 DFT_LIB_SUFFIX='_g.lib'
18097 DFT_LIB_SUFFIX='_g.a'
18100 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18103 case "$cf_cv_system_name" in
18105 DFT_LIB_SUFFIX='_p.lib'
18108 DFT_LIB_SUFFIX='_p.a'
18111 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18114 case "$cf_cv_system_name" in
18116 DFT_LIB_SUFFIX='.so'
18117 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18120 DFT_LIB_SUFFIX='.dll'
18121 DFT_DEP_SUFFIX='.dll.lib'
18123 (cygwin*|msys*|mingw*)
18124 DFT_LIB_SUFFIX='.dll'
18125 DFT_DEP_SUFFIX='.dll.a'
18128 DFT_LIB_SUFFIX='.dylib'
18129 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18134 DFT_LIB_SUFFIX='.so'
18135 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18138 DFT_LIB_SUFFIX='.sl'
18139 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18144 DFT_LIB_SUFFIX='.so'
18145 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18152 DFT_LIB_SUFFIX='.lib'
18155 DFT_LIB_SUFFIX='.a'
18158 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18161 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
18163 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
18164 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
18166 echo "$as_me:18166: result: $DFT_DEP_SUFFIX" >&5
18167 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18169 echo "$as_me:18169: checking default object directory" >&5
18170 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18172 case $DFT_LWR_MODEL in
18173 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
18174 (normal) DFT_OBJ_SUBDIR='objects' ;;
18175 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
18176 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
18178 case "$cf_cv_system_name" in
18180 DFT_OBJ_SUBDIR='objects' ;;
18182 DFT_OBJ_SUBDIR='obj_s' ;;
18185 echo "$as_me:18185: result: $DFT_OBJ_SUBDIR" >&5
18186 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18188 ### Set up low-level terminfo dependencies for makefiles.
18190 if test "$DFT_LWR_MODEL" = shared ; then
18191 case $cf_cv_system_name in
18193 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18196 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
18201 USE_ARG_SUFFIX=${DFT_ARG_SUFFIX}
18203 USE_LIB_SUFFIX=${DFT_ARG_SUFFIX}
18205 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
18207 ### Construct the list of subdirectories for which we'll customize makefiles
18208 ### with the appropriate compile-rules.
18210 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
18212 cat >>confdefs.h <<EOF
18213 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18216 ################################################################################
18222 NCURSES_SHLIB2="sh -c"
18224 ADA_SUBDIRS="include gen src doc"
18225 if test "x$cf_with_tests" != "xno" ; then
18226 ADA_SUBDIRS="$ADA_SUBDIRS samples"
18228 for cf_dir in $ADA_SUBDIRS
18230 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18237 # match layout used by make-tar.sh
18238 ADAHTML_DIR=../doc/ada
18240 if test "x$cross_compiling" = xyes ; then
18241 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
18243 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
18246 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"
18247 ac_config_commands="$ac_config_commands default"
18248 cat >confcache <<\_ACEOF
18249 # This file is a shell script that caches the results of configure
18250 # tests run on this system so they can be shared between configure
18251 # scripts and configure runs, see configure's option --config-cache.
18252 # It is not useful on other systems. If it contains results you don't
18253 # want to keep, you may remove or edit it.
18255 # config.status only pays attention to the cache file if you give it
18256 # the --recheck option to rerun configure.
18258 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18259 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18260 # following values.
18264 # The following way of writing the cache mishandles newlines in values,
18265 # but we know of no workaround that is simple, portable, and efficient.
18266 # So, don't put newlines in cache variables' values.
18267 # Ultrix sh set writes to stderr and can't be redirected directly,
18268 # and sets the high bit in the cache file unless we assign to the vars.
18271 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18273 # `set' does not quote correctly, so add quotes (double-quote
18274 # substitution turns \\\\ into \\, and sed turns \\ into \).
18277 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18280 # `set' quotes correctly as required by POSIX, so do not add quotes.
18282 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18289 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18291 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18293 if cmp -s $cache_file confcache; then :; else
18294 if test -w $cache_file; then
18295 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18296 cat confcache >$cache_file
18298 echo "not updating unwritable cache $cache_file"
18303 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18304 # Let make expand exec_prefix.
18305 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18307 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18308 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18309 # trailing colons and then remove the whole line if VPATH becomes empty
18310 # (actually we leave an empty line to preserve line numbers).
18311 if test "x$srcdir" = x.; then
18312 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18313 s/:*\$(srcdir):*/:/;
18314 s/:*\${srcdir}:*/:/;
18316 s/^\([^=]*=[ ]*\):*/\1/;
18322 DEFS=-DHAVE_CONFIG_H
18324 : "${CONFIG_STATUS=./config.status}"
18325 ac_clean_files_save=$ac_clean_files
18326 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18327 { echo "$as_me:18327: creating $CONFIG_STATUS" >&5
18328 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18329 cat >"$CONFIG_STATUS" <<_ACEOF
18331 # Generated automatically by configure.
18332 # Run this file to recreate the current configuration.
18333 # Compiler output produced by configure, useful for debugging
18334 # configure, is in config.log if it exists.
18337 SHELL=\${CONFIG_SHELL-$SHELL}
18338 ac_cs_invocation="\$0 \$@"
18340 CLICOLOR_FORCE= GREP_OPTIONS=
18341 unset CLICOLOR_FORCE GREP_OPTIONS
18344 cat >>"$CONFIG_STATUS" <<\_ACEOF
18345 # Be Bourne compatible
18346 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18349 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18353 # Name of the executable.
18354 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18356 if expr a : '\(a\)' >/dev/null 2>&1; then
18362 rm -f conf$$ conf$$.exe conf$$.file
18364 if ln -s conf$$.file conf$$ 2>/dev/null; then
18365 # We could just check for DJGPP; but this test a) works b) is more generic
18366 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18367 if test -f conf$$.exe; then
18368 # Don't use ln at all; we don't have any links
18373 elif ln conf$$.file conf$$ 2>/dev/null; then
18378 rm -f conf$$ conf$$.exe conf$$.file
18380 as_executable_p="test -f"
18382 # Support unset when possible.
18383 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18390 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18391 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18392 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18393 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18394 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18395 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18396 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18397 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18400 # We need space, tab and new line, in precisely that order.
18406 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18412 # Files that config.status was made for.
18413 if test -n "$ac_config_files"; then
18414 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
18417 if test -n "$ac_config_headers"; then
18418 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
18421 if test -n "$ac_config_links"; then
18422 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
18425 if test -n "$ac_config_commands"; then
18426 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
18429 cat >>"$CONFIG_STATUS" <<\EOF
18432 \`$as_me' instantiates files from templates according to the
18433 current configuration.
18435 Usage: $0 [OPTIONS] [FILE]...
18437 -h, --help print this help, then exit
18438 -V, --version print version number, then exit
18439 -d, --debug don't remove temporary files
18440 --recheck update $as_me by reconfiguring in the same conditions
18441 --file=FILE[:TEMPLATE]
18442 instantiate the configuration file FILE
18443 --header=FILE[:TEMPLATE]
18444 instantiate the configuration header FILE
18446 Configuration files:
18449 Configuration headers:
18452 Configuration commands:
18455 Report bugs to <dickey@invisible-island.net>."
18458 cat >>"$CONFIG_STATUS" <<EOF
18461 configured by $0, generated by GNU Autoconf 2.52.20210509,
18462 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18464 Copyright 2003-2020,2021 Thomas E. Dickey
18465 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18466 Free Software Foundation, Inc.
18467 This config.status script is free software; the Free Software Foundation
18468 gives unlimited permission to copy, distribute and modify it."
18473 cat >>"$CONFIG_STATUS" <<\EOF
18474 # If no file are specified by the user, then we need to provide default
18475 # value. By we need to know if files were specified by the user.
18481 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18482 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18484 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18488 *) # This is not an option, so the user has probably given explicit
18490 ac_need_defaults=false;;
18494 # Handling of the options.
18496 cat >>"$CONFIG_STATUS" <<EOF
18497 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18498 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18499 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18501 cat >>"$CONFIG_STATUS" <<\EOF
18502 --version | --vers* | -V )
18503 echo "$ac_cs_version"; exit 0 ;;
18505 # Conflict between --help and --header
18506 { { echo "$as_me:18506: error: ambiguous option: $1
18507 Try \`$0 --help' for more information." >&5
18508 echo "$as_me: error: ambiguous option: $1
18509 Try \`$0 --help' for more information." >&2;}
18510 { (exit 1); exit 1; }; };;
18511 --help | --hel | -h )
18512 echo "$ac_cs_usage"; exit 0 ;;
18513 --debug | --d* | -d )
18515 --file | --fil | --fi | --f )
18517 CONFIG_FILES="$CONFIG_FILES $1"
18518 ac_need_defaults=false;;
18519 --header | --heade | --head | --hea )
18521 CONFIG_HEADERS="$CONFIG_HEADERS $1"
18522 ac_need_defaults=false;;
18524 # This is an error.
18525 -*) { { echo "$as_me:18525: error: unrecognized option: $1
18526 Try \`$0 --help' for more information." >&5
18527 echo "$as_me: error: unrecognized option: $1
18528 Try \`$0 --help' for more information." >&2;}
18529 { (exit 1); exit 1; }; } ;;
18531 *) ac_config_targets="$ac_config_targets $1" ;;
18540 ## ----------------------- ##
18541 ## Running config.status. ##
18542 ## ----------------------- ##
18544 This file was extended by $as_me 2.52.20210509, executed with
18545 CONFIG_FILES = $CONFIG_FILES
18546 CONFIG_HEADERS = $CONFIG_HEADERS
18547 CONFIG_LINKS = $CONFIG_LINKS
18548 CONFIG_COMMANDS = $CONFIG_COMMANDS
18549 > "$ac_cs_invocation"
18550 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18555 cat >>"$CONFIG_STATUS" <<EOF
18557 # INIT-COMMANDS section.
18560 ### Special initialization commands, used to pass information from the
18561 ### configuration-run into config.status
18564 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
18565 DFT_LWR_MODEL="$DFT_LWR_MODEL"
18566 LIB_NAME="$LIB_NAME"
18567 LIB_PREFIX="$LIB_PREFIX"
18568 LIB_SUFFIX="$LIB_SUFFIX"
18570 NCURSES_MAJOR="$NCURSES_MAJOR"
18571 NCURSES_MINOR="$NCURSES_MINOR"
18572 NCURSES_PATCH="$NCURSES_PATCH"
18573 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
18574 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
18575 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
18576 cf_cv_abi_version="$cf_cv_abi_version"
18577 cf_cv_rel_version="$cf_cv_rel_version"
18578 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
18579 cf_cv_shared_soname='$cf_cv_shared_soname'
18580 cf_cv_shlib_version="$cf_cv_shlib_version"
18581 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
18582 cf_cv_system_name="$cf_cv_system_name"
18588 cat >>"$CONFIG_STATUS" <<\EOF
18589 for ac_config_target in $ac_config_targets
18591 case "$ac_config_target" in
18592 # Handling of arguments.
18593 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
18594 "src/library.gpr" ) CONFIG_FILES="$CONFIG_FILES src/library.gpr:src/library.gpr.in" ;;
18595 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
18596 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18597 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18598 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
18599 *) { { echo "$as_me:18599: error: invalid argument: $ac_config_target" >&5
18600 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18601 { (exit 1); exit 1; }; };;
18605 # If the user did not use the arguments to specify the items to instantiate,
18606 # then the envvar interface is used. Set only those that are not.
18607 # We use the long form for the default assignment because of an extremely
18608 # bizarre bug on SunOS 4.1.3.
18609 if "$ac_need_defaults"; then
18610 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18611 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18612 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18615 # Create a temporary directory, and hook for its removal unless debugging.
18618 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18619 trap '{ (exit 1); exit 1; }' 1 2 13 15
18622 # Create a (secure) tmp directory for tmp files.
18625 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18626 test -n "$tmp" && test -d "$tmp"
18629 tmp=$TMPDIR/cs$$-$RANDOM
18630 (umask 077 && mkdir $tmp)
18633 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18634 { (exit 1); exit 1; }
18639 cat >>"$CONFIG_STATUS" <<EOF
18642 # CONFIG_FILES section.
18645 # No need to generate the scripts if there are no CONFIG_FILES.
18646 # This happens for instance when ./config.status config.h
18647 if test -n "\$CONFIG_FILES"; then
18648 # Protect against being on the right side of a sed subst in config.status.
18649 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18650 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18651 s,@SHELL@,$SHELL,;t t
18652 s,@exec_prefix@,$exec_prefix,;t t
18653 s,@prefix@,$prefix,;t t
18654 s,@program_transform_name@,$program_transform_name,;t t
18655 s,@bindir@,$bindir,;t t
18656 s,@sbindir@,$sbindir,;t t
18657 s,@libexecdir@,$libexecdir,;t t
18658 s,@datarootdir@,$datarootdir,;t t
18659 s,@datadir@,$datadir,;t t
18660 s,@sysconfdir@,$sysconfdir,;t t
18661 s,@sharedstatedir@,$sharedstatedir,;t t
18662 s,@localstatedir@,$localstatedir,;t t
18663 s,@runstatedir@,$runstatedir,;t t
18664 s,@libdir@,$libdir,;t t
18665 s,@includedir@,$includedir,;t t
18666 s,@oldincludedir@,$oldincludedir,;t t
18667 s,@infodir@,$infodir,;t t
18668 s,@mandir@,$mandir,;t t
18669 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18670 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18671 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18672 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18673 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18674 s,@build_alias@,$build_alias,;t t
18675 s,@host_alias@,$host_alias,;t t
18676 s,@target_alias@,$target_alias,;t t
18677 s,@ECHO_C@,$ECHO_C,;t t
18678 s,@ECHO_N@,$ECHO_N,;t t
18679 s,@ECHO_T@,$ECHO_T,;t t
18680 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18681 s,@DEFS@,$DEFS,;t t
18682 s,@LIBS@,$LIBS,;t t
18683 s,@top_builddir@,$top_builddir,;t t
18684 s,@build@,$build,;t t
18685 s,@build_cpu@,$build_cpu,;t t
18686 s,@build_vendor@,$build_vendor,;t t
18687 s,@build_os@,$build_os,;t t
18688 s,@host@,$host,;t t
18689 s,@host_cpu@,$host_cpu,;t t
18690 s,@host_vendor@,$host_vendor,;t t
18691 s,@host_os@,$host_os,;t t
18692 s,@target@,$target,;t t
18693 s,@target_cpu@,$target_cpu,;t t
18694 s,@target_vendor@,$target_vendor,;t t
18695 s,@target_os@,$target_os,;t t
18696 s,@GREP@,$GREP,;t t
18697 s,@FGREP@,$FGREP,;t t
18699 s,@CFLAGS@,$CFLAGS,;t t
18700 s,@LDFLAGS@,$LDFLAGS,;t t
18701 s,@CPPFLAGS@,$CPPFLAGS,;t t
18702 s,@ac_ct_CC@,$ac_ct_CC,;t t
18703 s,@EXEEXT@,$EXEEXT,;t t
18704 s,@OBJEXT@,$OBJEXT,;t t
18705 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18707 s,@EGREP@,$EGREP,;t t
18709 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18710 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18711 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18712 s,@LN_S@,$LN_S,;t t
18713 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
18714 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
18715 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18716 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
18717 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
18718 s,@SET_MAKE@,$SET_MAKE,;t t
18719 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
18720 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
18721 s,@CTAGS@,$CTAGS,;t t
18722 s,@ETAGS@,$ETAGS,;t t
18723 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18724 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18725 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
18726 s,@RANLIB@,$RANLIB,;t t
18727 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18729 s,@ac_ct_LD@,$ac_ct_LD,;t t
18731 s,@ac_ct_AR@,$ac_ct_AR,;t t
18732 s,@ARFLAGS@,$ARFLAGS,;t t
18733 s,@DESTDIR@,$DESTDIR,;t t
18734 s,@BUILD_CC@,$BUILD_CC,;t t
18735 s,@BUILD_CPP@,$BUILD_CPP,;t t
18736 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
18737 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
18738 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
18739 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
18740 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
18741 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
18742 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
18743 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
18744 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
18745 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
18746 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
18747 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
18748 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
18749 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18750 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18751 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
18752 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
18753 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
18754 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
18755 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
18756 s,@CC_G_OPT@,$CC_G_OPT,;t t
18757 s,@LD_MODEL@,$LD_MODEL,;t t
18758 s,@shlibdir@,$shlibdir,;t t
18759 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
18760 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
18761 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
18762 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
18763 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
18764 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
18765 s,@LINK_PROGS@,$LINK_PROGS,;t t
18766 s,@LINK_TESTS@,$LINK_TESTS,;t t
18767 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
18768 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
18769 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
18770 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
18771 s,@RPATH_LIST@,$RPATH_LIST,;t t
18772 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
18773 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
18774 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
18775 s,@PTHREAD@,$PTHREAD,;t t
18776 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
18777 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18778 s,@ECHO_LT@,$ECHO_LT,;t t
18779 s,@ECHO_LD@,$ECHO_LD,;t t
18780 s,@RULE_CC@,$RULE_CC,;t t
18781 s,@SHOW_CC@,$SHOW_CC,;t t
18782 s,@ECHO_CC@,$ECHO_CC,;t t
18783 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18784 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
18785 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
18786 s,@ADAFLAGS@,$ADAFLAGS,;t t
18787 s,@ADA_TRACE@,$ADA_TRACE,;t t
18788 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
18789 s,@M4_exists@,$M4_exists,;t t
18790 s,@cf_ada_make@,$cf_ada_make,;t t
18791 s,@cf_ada_config@,$cf_ada_config,;t t
18792 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
18793 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
18794 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
18795 s,@cf_compile_generics@,$cf_compile_generics,;t t
18796 s,@cf_generic_objects@,$cf_generic_objects,;t t
18797 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
18798 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
18799 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
18800 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
18801 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
18802 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
18803 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
18804 s,@cf_ada_package@,$cf_ada_package,;t t
18805 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
18806 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
18807 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
18808 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
18809 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
18810 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
18811 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
18812 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
18813 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
18814 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18815 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18816 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
18817 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
18818 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
18819 s,@TEST_ARG2@,$TEST_ARG2,;t t
18820 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
18821 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
18822 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
18823 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
18824 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
18825 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
18826 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
18831 cat >>"$CONFIG_STATUS" <<\EOF
18832 # Split the substitutions into bite-sized pieces for seds with
18833 # small command number limits, like on Digital OSF/1 and HP-UX.
18834 ac_max_sed_lines=48
18835 ac_sed_frag=1 # Number of current file.
18836 ac_beg=1 # First line for current file.
18837 ac_end=$ac_max_sed_lines # Line after last line for current file.
18840 while "$ac_more_lines"; do
18841 if test "$ac_beg" -gt 1; then
18842 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18844 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18846 if test ! -s $tmp/subs.frag; then
18847 ac_more_lines=false
18849 # The purpose of the label and of the branching condition is to
18850 # speed up the sed processing (if there are no `@' at all, there
18851 # is no need to browse any of the substitutions).
18852 # These are the two extra sed commands mentioned above.
18854 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18855 # It is possible to make a multiline substitution using escaped newlines.
18856 # Ensure that we do not split the substitution between script fragments.
18858 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
18859 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
18860 if test -s $tmp/subs.next; then
18861 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
18862 if test ! -s $tmp/subs.edit; then
18863 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
18864 if test ! -s $tmp/subs.edit; then
18865 if test "$ac_beg" -gt 1; then
18866 ac_end=`expr "$ac_end" - 1`
18873 if test -z "$ac_sed_cmds"; then
18874 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18876 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18878 ac_sed_frag=`expr "$ac_sed_frag" + 1`
18880 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
18883 if test -z "$ac_sed_cmds"; then
18886 fi # test -n "$CONFIG_FILES"
18889 cat >>"$CONFIG_STATUS" <<\EOF
18890 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18891 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18893 - | *:- | *:-:* ) # input from stdin
18895 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18896 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18897 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18898 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18899 * ) ac_file_in=$ac_file.in ;;
18902 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18903 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18904 X"$ac_file" : 'X\(//\)[^/]' \| \
18905 X"$ac_file" : 'X\(//\)$' \| \
18906 X"$ac_file" : 'X\(/\)' \| \
18907 . : '\(.\)' 2>/dev/null ||
18909 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18910 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18911 /^X\(\/\/\)$/{ s//\1/; q; }
18912 /^X\(\/\).*/{ s//\1/; q; }
18914 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18915 { case "$ac_dir" in
18916 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18920 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18921 case $as_mkdir_dir in
18922 # Skip DOS drivespec
18923 ?:) as_incr_dir=$as_mkdir_dir ;;
18925 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18926 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18931 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18932 # A "../" for each directory in $ac_dir_suffix.
18933 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18935 ac_dir_suffix= ac_dots=
18940 if test -z "$ac_dots"; then
18943 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
18945 [\\/]* | ?:[\\/]* )
18946 ac_srcdir="$srcdir$ac_dir_suffix";
18947 ac_top_srcdir="$srcdir" ;;
18948 *) # Relative path.
18949 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
18950 ac_top_srcdir="$ac_dots$srcdir" ;;
18954 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18955 *) ac_INSTALL=$ac_dots$INSTALL ;;
18958 if test x"$ac_file" != x-; then
18959 { echo "$as_me:18959: creating $ac_file" >&5
18960 echo "$as_me: creating $ac_file" >&6;}
18963 # Let's still pretend it is `configure' which instantiates (i.e., don't
18964 # use $as_me), people would be surprised to read:
18965 # /* config.h. Generated automatically by config.status. */
18966 configure_input="Generated automatically from `echo $ac_file_in |
18967 sed 's,.*/,,'` by configure."
18969 # First look for the input files in the build tree, otherwise in the
18971 ac_file_inputs=`IFS=:
18972 for f in $ac_file_in; do
18974 -) echo $tmp/stdin ;;
18976 # Absolute (can't be DOS-style, as IFS=:)
18977 test -f "$f" || { { echo "$as_me:18977: error: cannot find input file: $f" >&5
18978 echo "$as_me: error: cannot find input file: $f" >&2;}
18979 { (exit 1); exit 1; }; }
18982 if test -f "$f"; then
18985 elif test -f "$srcdir/$f"; then
18990 { { echo "$as_me:18990: error: cannot find input file: $f" >&5
18991 echo "$as_me: error: cannot find input file: $f" >&2;}
18992 { (exit 1); exit 1; }; }
18995 done` || { (exit 1); exit 1; }
18997 cat >>"$CONFIG_STATUS" <<\EOF
18998 ac_warn_datarootdir=no
18999 if test x"$ac_file" != x-; then
19000 for ac_item in $ac_file_inputs
19002 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
19003 if test -n "$ac_seen"; then
19004 ac_used=`grep '@datarootdir@' "$ac_item"`
19005 if test -z "$ac_used"; then
19006 { echo "$as_me:19006: WARNING: datarootdir was used implicitly but not set:
19008 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
19010 ac_warn_datarootdir=yes
19013 ac_seen=`grep '${datarootdir}' "$ac_item"`
19014 if test -n "$ac_seen"; then
19015 { echo "$as_me:19015: WARNING: datarootdir was used explicitly but not set:
19017 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
19019 ac_warn_datarootdir=yes
19024 if test "x$ac_warn_datarootdir" = xyes; then
19025 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
19029 cat >>"$CONFIG_STATUS" <<EOF
19033 cat >>"$CONFIG_STATUS" <<\EOF
19035 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19036 s,@configure_input@,$configure_input,;t t
19037 s,@srcdir@,$ac_srcdir,;t t
19038 s,@top_srcdir@,$ac_top_srcdir,;t t
19039 s,@INSTALL@,$ac_INSTALL,;t t
19040 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19042 if test x"$ac_file" != x-; then
19043 cp "$tmp/out" "$ac_file"
19045 for ac_name in prefix exec_prefix datarootdir
19047 ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
19048 if test -n "$ac_seen"; then
19049 ac_init=`${EGREP-egrep} '[ ]*'$ac_name'[ ]*=' "$ac_file"`
19050 if test -z "$ac_init"; then
19051 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
19052 { echo "$as_me:19052: WARNING: Variable $ac_name is used but was not set:
19054 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
19059 ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
19060 ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
19061 if test -s $tmp/out; then
19062 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
19063 { echo "$as_me:19063: WARNING: Some variables may not be substituted:
19065 echo "$as_me: WARNING: Some variables may not be substituted:
19075 cat >>"$CONFIG_STATUS" <<\EOF
19078 # CONFIG_HEADER section.
19081 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19082 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19084 # ac_d sets the value in "#define NAME VALUE" lines.
19085 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19086 ac_dB='[ ].*$,\1#\2'
19089 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19090 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19091 ac_iB='\([ ]\),\1#\2define\3'
19094 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19095 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19096 ac_uB='$,\1#\2define\3'
19100 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19101 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19103 - | *:- | *:-:* ) # input from stdin
19105 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19106 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19107 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19108 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19109 * ) ac_file_in=$ac_file.in ;;
19112 test x"$ac_file" != x- && { echo "$as_me:19112: creating $ac_file" >&5
19113 echo "$as_me: creating $ac_file" >&6;}
19115 # First look for the input files in the build tree, otherwise in the
19117 ac_file_inputs=`IFS=:
19118 for f in $ac_file_in; do
19120 -) echo $tmp/stdin ;;
19122 # Absolute (can't be DOS-style, as IFS=:)
19123 test -f "$f" || { { echo "$as_me:19123: error: cannot find input file: $f" >&5
19124 echo "$as_me: error: cannot find input file: $f" >&2;}
19125 { (exit 1); exit 1; }; }
19128 if test -f "$f"; then
19131 elif test -f "$srcdir/$f"; then
19136 { { echo "$as_me:19136: error: cannot find input file: $f" >&5
19137 echo "$as_me: error: cannot find input file: $f" >&2;}
19138 { (exit 1); exit 1; }; }
19141 done` || { (exit 1); exit 1; }
19142 # Remove the trailing spaces.
19143 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
19147 # Transform confdefs.h into a list of #define's. We won't use it as a sed
19148 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
19149 # be either 'cat' or 'sort'.
19150 cat confdefs.h | uniq >conftest.vals
19152 # Break up conftest.vals because some shells have a limit on
19153 # the size of here documents, and old seds have small limits too.
19155 rm -f conftest.tail
19156 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
19157 while grep . conftest.vals >/dev/null
19159 # Write chunks of a limited-size here document to conftest.frag.
19160 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
19161 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
19162 echo 'CEOF' >> "$CONFIG_STATUS"
19163 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
19164 rm -f conftest.vals
19165 mv conftest.tail conftest.vals
19167 rm -f conftest.vals
19169 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19171 echo ' cat >> conftest.edit <<CEOF
19172 /@DEFS@/r conftest.frag
19175 sed -f conftest.edit $tmp/in > $tmp/out
19177 mv $tmp/out $tmp/in
19178 rm -f conftest.edit conftest.frag
19179 ' >> "$CONFIG_STATUS"
19181 cat >>"$CONFIG_STATUS" <<\EOF
19182 # Let's still pretend it is `configure' which instantiates (i.e., don't
19183 # use $as_me), people would be surprised to read:
19184 # /* config.h. Generated automatically by config.status. */
19185 if test x"$ac_file" = x-; then
19186 echo "/* Generated automatically by configure. */" >$tmp/config.h
19188 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
19190 cat $tmp/in >>$tmp/config.h
19192 if test x"$ac_file" != x-; then
19193 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
19194 { echo "$as_me:19194: $ac_file is unchanged" >&5
19195 echo "$as_me: $ac_file is unchanged" >&6;}
19197 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19198 X"$ac_file" : 'X\(//\)[^/]' \| \
19199 X"$ac_file" : 'X\(//\)$' \| \
19200 X"$ac_file" : 'X\(/\)' \| \
19201 . : '\(.\)' 2>/dev/null ||
19203 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19204 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19205 /^X\(\/\/\)$/{ s//\1/; q; }
19206 /^X\(\/\).*/{ s//\1/; q; }
19208 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19209 { case "$ac_dir" in
19210 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19214 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19215 case $as_mkdir_dir in
19216 # Skip DOS drivespec
19217 ?:) as_incr_dir=$as_mkdir_dir ;;
19219 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19220 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19227 mv "$tmp/config.h" "$ac_file"
19231 rm -f $tmp/config.h
19235 cat >>"$CONFIG_STATUS" <<\EOF
19237 # CONFIG_COMMANDS section.
19239 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19240 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19241 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19245 if test -z "$USE_OLD_MAKERULES" ; then
19246 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
19253 cat >>"$CONFIG_STATUS" <<\EOF
19255 { (exit 0); exit 0; }
19257 chmod +x "$CONFIG_STATUS"
19258 ac_clean_files=$ac_clean_files_save
19260 # configure is writing to config.log, and then calls config.status.
19261 # config.status does its own redirection, appending to config.log.
19262 # Unfortunately, on DOS this fails, as config.log is still kept open
19263 # by configure, so config.status won't be able to write to it; its
19264 # output is simply discarded. So we exec the FD to /dev/null,
19265 # effectively closing config.log, so it can be properly (re)opened and
19266 # appended to by config.status. When coming back to configure, we
19267 # need to make the FD available again.
19268 if test "$no_create" != yes; then
19271 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
19273 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19274 # would make configure fail if this is the last instruction.
19275 "$ac_cs_success" || { (exit 1); exit 1; }
19277 ${MAKE:-make} preinstall