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 # if $PKG_CONFIG_LIBDIR is set, try to use that
3283 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[ ]*,,'`
3285 # if the option is used, let that override. otherwise default to "libdir"
3287 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3288 if test "${with_pkg_config_libdir+set}" = set; then
3289 withval="$with_pkg_config_libdir"
3290 cf_search_path=$withval
3292 test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
3295 case "x$cf_search_path" in
3297 PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
3298 echo "$as_me:3298: result: $PKG_CONFIG_LIBDIR" >&5
3299 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3308 PKG_CONFIG_LIBDIR="$cf_search_path"
3309 echo "$as_me:3309: result: $PKG_CONFIG_LIBDIR" >&5
3310 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3314 echo "$as_me:3314: result: auto" >&5
3315 echo "${ECHO_T}auto" >&6
3317 # Look for the library directory using the same prefix as the executable
3318 echo "$as_me:3318: checking for search-list" >&5
3319 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
3320 if test "x$PKG_CONFIG" != xnone
3322 # works for pkg-config since version 0.24 (2009)
3323 # works for pkgconf since version 0.8.3 (2012)
3324 for cf_pkg_program in \
3325 `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
3329 cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
3330 test -n "$cf_search_path" && break
3333 # works for pkg-config since import in 2005 of original 2001 HP code.
3334 test -z "$cf_search_path" && \
3336 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
3337 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
3338 sub(\"^[^']*'\",\"\"); \
3339 sub(\"'.*\",\"\"); \
3340 printf \" %s\", \\$0; } \
3345 echo "$as_me:3345: result: $cf_search_path" >&5
3346 echo "${ECHO_T}$cf_search_path" >&6
3349 { { echo "$as_me:3349: error: Unexpected option value: $cf_search_path" >&5
3350 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
3351 { (exit 1); exit 1; }; }
3355 if test -n "$cf_search_path"
3357 echo "$as_me:3357: checking for first directory" >&5
3358 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
3359 cf_pkg_config_path=none
3360 for cf_config in $cf_search_path
3362 if test -d "$cf_config"
3364 cf_pkg_config_path=$cf_config
3368 echo "$as_me:3368: result: $cf_pkg_config_path" >&5
3369 echo "${ECHO_T}$cf_pkg_config_path" >&6
3371 if test "x$cf_pkg_config_path" != xnone ; then
3372 # limit this to the first directory found
3373 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
3376 if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
3378 echo "$as_me:3378: checking for workaround" >&5
3379 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
3380 if test "$prefix" = "NONE" ; then
3381 cf_prefix="$ac_default_prefix"
3385 eval cf_libdir=$libdir
3386 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
3388 for cf_config in $cf_search_path
3391 $cf_libdir/pkgconfig)
3392 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
3396 test -z "$cf_backup" && cf_backup=$cf_config
3400 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
3401 echo "$as_me:3401: result: $PKG_CONFIG_LIBDIR" >&5
3402 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3406 echo "$as_me:3406: checking if you want to build test-programs" >&5
3407 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3409 # Check whether --with-tests or --without-tests was given.
3410 if test "${with_tests+set}" = set; then
3411 withval="$with_tests"
3412 cf_with_tests=$withval
3416 echo "$as_me:3416: result: $cf_with_tests" >&5
3417 echo "${ECHO_T}$cf_with_tests" >&6
3419 echo "$as_me:3419: checking if we should assume mixed-case filenames" >&5
3420 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3422 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3423 if test "${enable_mixed_case+set}" = set; then
3424 enableval="$enable_mixed_case"
3425 enable_mixedcase=$enableval
3427 enable_mixedcase=auto
3429 echo "$as_me:3429: result: $enable_mixedcase" >&5
3430 echo "${ECHO_T}$enable_mixedcase" >&6
3431 if test "$enable_mixedcase" = "auto" ; then
3433 echo "$as_me:3433: checking if filesystem supports mixed-case filenames" >&5
3434 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3435 if test "${cf_cv_mixedcase+set}" = set; then
3436 echo $ECHO_N "(cached) $ECHO_C" >&6
3439 if test "$cross_compiling" = yes ; then
3440 case "$target_alias" in
3441 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3449 rm -f conftest CONFTEST
3451 if test -f CONFTEST ; then
3456 rm -f conftest CONFTEST
3460 echo "$as_me:3460: result: $cf_cv_mixedcase" >&5
3461 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3462 test "$cf_cv_mixedcase" = yes &&
3463 cat >>confdefs.h <<\EOF
3464 #define MIXEDCASE_FILENAMES 1
3468 cf_cv_mixedcase=$enable_mixedcase
3469 if test "$enable_mixedcase" = "yes" ; then
3470 cat >>confdefs.h <<\EOF
3471 #define MIXEDCASE_FILENAMES 1
3477 # do this after mixed-case option (tags/TAGS is not as important as tic).
3478 echo "$as_me:3478: checking whether ${MAKE-make} sets \${MAKE}" >&5
3479 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3480 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3481 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3482 echo $ECHO_N "(cached) $ECHO_C" >&6
3484 cat >conftest.make <<\EOF
3486 @echo 'ac_maketemp="${MAKE}"'
3488 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3489 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3490 if test -n "$ac_maketemp"; then
3491 eval ac_cv_prog_make_${ac_make}_set=yes
3493 eval ac_cv_prog_make_${ac_make}_set=no
3497 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3498 echo "$as_me:3498: result: yes" >&5
3499 echo "${ECHO_T}yes" >&6
3502 echo "$as_me:3502: result: no" >&5
3503 echo "${ECHO_T}no" >&6
3504 SET_MAKE="MAKE=${MAKE-make}"
3507 echo "$as_me:3507: checking for \".PHONY\" make-support" >&5
3508 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
3509 if test "${cf_cv_make_PHONY+set}" = set; then
3510 echo $ECHO_N "(cached) $ECHO_C" >&6
3515 mkdir conftest || exit 1
3517 cat >makefile <<'CF_EOF'
3521 @echo "** making $@ $(DATA)"
3523 @echo "** making $@ $(DATA)"
3525 @echo "** making $@ $(DATA)"
3528 @echo "** making $@ $(DATA)"
3531 for cf_data in 1 2 3
3533 ${MAKE:-make} always DATA=$cf_data
3534 ${MAKE:-make} once DATA=$cf_data
3535 ${MAKE:-make} -t always once
3536 if test -f always ; then
3537 echo "no (case 1)" > ../conftest.tmp
3538 elif test ! -f always.out ; then
3539 echo "no (case 2)" > ../conftest.tmp
3540 elif test ! -f once.out ; then
3541 echo "no (case 3)" > ../conftest.tmp
3542 elif ! cmp -s always.out once.out ; then
3543 echo "no (case 4)" > ../conftest.tmp
3544 diff always.out once.out
3546 cf_check="`cat always.out`"
3547 if test "x$cf_check" != "x$cf_data" ; then
3548 echo "no (case 5)" > ../conftest.tmp
3550 echo yes > ../conftest.tmp
3558 cf_cv_make_PHONY="`cat conftest.tmp`"
3562 echo "$as_me:3562: result: $cf_cv_make_PHONY" >&5
3563 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
3566 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
3567 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
3569 for ac_prog in exctags ctags
3571 # Extract the first word of "$ac_prog", so it can be a program name with args.
3572 set dummy $ac_prog; ac_word=$2
3573 echo "$as_me:3573: checking for $ac_word" >&5
3574 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3575 if test "${ac_cv_prog_CTAGS+set}" = set; then
3576 echo $ECHO_N "(cached) $ECHO_C" >&6
3578 if test -n "$CTAGS"; then
3579 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3581 ac_save_IFS=$IFS; IFS=$ac_path_separator
3583 for ac_dir in $ac_dummy; do
3585 test -z "$ac_dir" && ac_dir=.
3586 $as_executable_p "$ac_dir/$ac_word" || continue
3587 ac_cv_prog_CTAGS="$ac_prog"
3588 echo "$as_me:3588: found $ac_dir/$ac_word" >&5
3594 CTAGS=$ac_cv_prog_CTAGS
3595 if test -n "$CTAGS"; then
3596 echo "$as_me:3596: result: $CTAGS" >&5
3597 echo "${ECHO_T}$CTAGS" >&6
3599 echo "$as_me:3599: result: no" >&5
3600 echo "${ECHO_T}no" >&6
3603 test -n "$CTAGS" && break
3606 for ac_prog in exetags etags
3608 # Extract the first word of "$ac_prog", so it can be a program name with args.
3609 set dummy $ac_prog; ac_word=$2
3610 echo "$as_me:3610: checking for $ac_word" >&5
3611 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3612 if test "${ac_cv_prog_ETAGS+set}" = set; then
3613 echo $ECHO_N "(cached) $ECHO_C" >&6
3615 if test -n "$ETAGS"; then
3616 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3618 ac_save_IFS=$IFS; IFS=$ac_path_separator
3620 for ac_dir in $ac_dummy; do
3622 test -z "$ac_dir" && ac_dir=.
3623 $as_executable_p "$ac_dir/$ac_word" || continue
3624 ac_cv_prog_ETAGS="$ac_prog"
3625 echo "$as_me:3625: found $ac_dir/$ac_word" >&5
3631 ETAGS=$ac_cv_prog_ETAGS
3632 if test -n "$ETAGS"; then
3633 echo "$as_me:3633: result: $ETAGS" >&5
3634 echo "${ECHO_T}$ETAGS" >&6
3636 echo "$as_me:3636: result: no" >&5
3637 echo "${ECHO_T}no" >&6
3640 test -n "$ETAGS" && break
3643 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3644 set dummy ${CTAGS:-ctags}; ac_word=$2
3645 echo "$as_me:3645: checking for $ac_word" >&5
3646 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3647 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3648 echo $ECHO_N "(cached) $ECHO_C" >&6
3650 if test -n "$MAKE_LOWER_TAGS"; then
3651 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3653 ac_save_IFS=$IFS; IFS=$ac_path_separator
3655 for ac_dir in $ac_dummy; do
3657 test -z "$ac_dir" && ac_dir=.
3658 $as_executable_p "$ac_dir/$ac_word" || continue
3659 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3660 echo "$as_me:3660: found $ac_dir/$ac_word" >&5
3664 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3667 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3668 if test -n "$MAKE_LOWER_TAGS"; then
3669 echo "$as_me:3669: result: $MAKE_LOWER_TAGS" >&5
3670 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3672 echo "$as_me:3672: result: no" >&5
3673 echo "${ECHO_T}no" >&6
3676 if test "$cf_cv_mixedcase" = yes ; then
3677 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3678 set dummy ${ETAGS:-etags}; ac_word=$2
3679 echo "$as_me:3679: checking for $ac_word" >&5
3680 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3681 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3682 echo $ECHO_N "(cached) $ECHO_C" >&6
3684 if test -n "$MAKE_UPPER_TAGS"; then
3685 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3687 ac_save_IFS=$IFS; IFS=$ac_path_separator
3689 for ac_dir in $ac_dummy; do
3691 test -z "$ac_dir" && ac_dir=.
3692 $as_executable_p "$ac_dir/$ac_word" || continue
3693 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3694 echo "$as_me:3694: found $ac_dir/$ac_word" >&5
3698 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3701 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3702 if test -n "$MAKE_UPPER_TAGS"; then
3703 echo "$as_me:3703: result: $MAKE_UPPER_TAGS" >&5
3704 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3706 echo "$as_me:3706: result: no" >&5
3707 echo "${ECHO_T}no" >&6
3714 if test "$MAKE_UPPER_TAGS" = yes ; then
3720 if test "$MAKE_LOWER_TAGS" = yes ; then
3726 echo "$as_me:3726: checking for makeflags variable" >&5
3727 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3728 if test "${cf_cv_makeflags+set}" = set; then
3729 echo $ECHO_N "(cached) $ECHO_C" >&6
3733 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3735 cat >cf_makeflags.tmp <<CF_EOF
3738 @ echo '.$cf_option'
3740 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[ ]*$,,'`
3741 case "$cf_result" in
3743 cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
3744 case "$cf_result" in
3745 (.*CC=*) cf_cv_makeflags=
3747 (*) cf_cv_makeflags=$cf_option
3756 echo "${as_me:-configure}:3756: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3761 rm -f cf_makeflags.tmp
3764 echo "$as_me:3764: result: $cf_cv_makeflags" >&5
3765 echo "${ECHO_T}$cf_cv_makeflags" >&6
3767 if test -n "$ac_tool_prefix"; then
3768 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3769 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3770 echo "$as_me:3770: checking for $ac_word" >&5
3771 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3772 if test "${ac_cv_prog_RANLIB+set}" = set; then
3773 echo $ECHO_N "(cached) $ECHO_C" >&6
3775 if test -n "$RANLIB"; then
3776 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3778 ac_save_IFS=$IFS; IFS=$ac_path_separator
3780 for ac_dir in $ac_dummy; do
3782 test -z "$ac_dir" && ac_dir=.
3783 $as_executable_p "$ac_dir/$ac_word" || continue
3784 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3785 echo "$as_me:3785: found $ac_dir/$ac_word" >&5
3791 RANLIB=$ac_cv_prog_RANLIB
3792 if test -n "$RANLIB"; then
3793 echo "$as_me:3793: result: $RANLIB" >&5
3794 echo "${ECHO_T}$RANLIB" >&6
3796 echo "$as_me:3796: result: no" >&5
3797 echo "${ECHO_T}no" >&6
3801 if test -z "$ac_cv_prog_RANLIB"; then
3802 ac_ct_RANLIB=$RANLIB
3803 # Extract the first word of "ranlib", so it can be a program name with args.
3804 set dummy ranlib; ac_word=$2
3805 echo "$as_me:3805: checking for $ac_word" >&5
3806 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3807 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3808 echo $ECHO_N "(cached) $ECHO_C" >&6
3810 if test -n "$ac_ct_RANLIB"; then
3811 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3813 ac_save_IFS=$IFS; IFS=$ac_path_separator
3815 for ac_dir in $ac_dummy; do
3817 test -z "$ac_dir" && ac_dir=.
3818 $as_executable_p "$ac_dir/$ac_word" || continue
3819 ac_cv_prog_ac_ct_RANLIB="ranlib"
3820 echo "$as_me:3820: found $ac_dir/$ac_word" >&5
3824 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3827 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3828 if test -n "$ac_ct_RANLIB"; then
3829 echo "$as_me:3829: result: $ac_ct_RANLIB" >&5
3830 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3832 echo "$as_me:3832: result: no" >&5
3833 echo "${ECHO_T}no" >&6
3836 RANLIB=$ac_ct_RANLIB
3838 RANLIB="$ac_cv_prog_RANLIB"
3841 if test -n "$ac_tool_prefix"; then
3842 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3843 set dummy ${ac_tool_prefix}ld; ac_word=$2
3844 echo "$as_me:3844: checking for $ac_word" >&5
3845 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3846 if test "${ac_cv_prog_LD+set}" = set; then
3847 echo $ECHO_N "(cached) $ECHO_C" >&6
3849 if test -n "$LD"; then
3850 ac_cv_prog_LD="$LD" # Let the user override the test.
3852 ac_save_IFS=$IFS; IFS=$ac_path_separator
3854 for ac_dir in $ac_dummy; do
3856 test -z "$ac_dir" && ac_dir=.
3857 $as_executable_p "$ac_dir/$ac_word" || continue
3858 ac_cv_prog_LD="${ac_tool_prefix}ld"
3859 echo "$as_me:3859: found $ac_dir/$ac_word" >&5
3866 if test -n "$LD"; then
3867 echo "$as_me:3867: result: $LD" >&5
3868 echo "${ECHO_T}$LD" >&6
3870 echo "$as_me:3870: result: no" >&5
3871 echo "${ECHO_T}no" >&6
3875 if test -z "$ac_cv_prog_LD"; then
3877 # Extract the first word of "ld", so it can be a program name with args.
3878 set dummy ld; ac_word=$2
3879 echo "$as_me:3879: checking for $ac_word" >&5
3880 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3881 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3882 echo $ECHO_N "(cached) $ECHO_C" >&6
3884 if test -n "$ac_ct_LD"; then
3885 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3887 ac_save_IFS=$IFS; IFS=$ac_path_separator
3889 for ac_dir in $ac_dummy; do
3891 test -z "$ac_dir" && ac_dir=.
3892 $as_executable_p "$ac_dir/$ac_word" || continue
3893 ac_cv_prog_ac_ct_LD="ld"
3894 echo "$as_me:3894: found $ac_dir/$ac_word" >&5
3898 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3901 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3902 if test -n "$ac_ct_LD"; then
3903 echo "$as_me:3903: result: $ac_ct_LD" >&5
3904 echo "${ECHO_T}$ac_ct_LD" >&6
3906 echo "$as_me:3906: result: no" >&5
3907 echo "${ECHO_T}no" >&6
3915 if test -n "$ac_tool_prefix"; then
3916 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3917 set dummy ${ac_tool_prefix}ar; ac_word=$2
3918 echo "$as_me:3918: checking for $ac_word" >&5
3919 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3920 if test "${ac_cv_prog_AR+set}" = set; then
3921 echo $ECHO_N "(cached) $ECHO_C" >&6
3923 if test -n "$AR"; then
3924 ac_cv_prog_AR="$AR" # Let the user override the test.
3926 ac_save_IFS=$IFS; IFS=$ac_path_separator
3928 for ac_dir in $ac_dummy; do
3930 test -z "$ac_dir" && ac_dir=.
3931 $as_executable_p "$ac_dir/$ac_word" || continue
3932 ac_cv_prog_AR="${ac_tool_prefix}ar"
3933 echo "$as_me:3933: found $ac_dir/$ac_word" >&5
3940 if test -n "$AR"; then
3941 echo "$as_me:3941: result: $AR" >&5
3942 echo "${ECHO_T}$AR" >&6
3944 echo "$as_me:3944: result: no" >&5
3945 echo "${ECHO_T}no" >&6
3949 if test -z "$ac_cv_prog_AR"; then
3951 # Extract the first word of "ar", so it can be a program name with args.
3952 set dummy ar; ac_word=$2
3953 echo "$as_me:3953: checking for $ac_word" >&5
3954 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3955 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3956 echo $ECHO_N "(cached) $ECHO_C" >&6
3958 if test -n "$ac_ct_AR"; then
3959 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3961 ac_save_IFS=$IFS; IFS=$ac_path_separator
3963 for ac_dir in $ac_dummy; do
3965 test -z "$ac_dir" && ac_dir=.
3966 $as_executable_p "$ac_dir/$ac_word" || continue
3967 ac_cv_prog_ac_ct_AR="ar"
3968 echo "$as_me:3968: found $ac_dir/$ac_word" >&5
3972 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3975 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3976 if test -n "$ac_ct_AR"; then
3977 echo "$as_me:3977: result: $ac_ct_AR" >&5
3978 echo "${ECHO_T}$ac_ct_AR" >&6
3980 echo "$as_me:3980: result: no" >&5
3981 echo "${ECHO_T}no" >&6
3989 if test -n "$ac_tool_prefix"; then
3990 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3991 set dummy ${ac_tool_prefix}ar; ac_word=$2
3992 echo "$as_me:3992: checking for $ac_word" >&5
3993 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3994 if test "${ac_cv_prog_AR+set}" = set; then
3995 echo $ECHO_N "(cached) $ECHO_C" >&6
3997 if test -n "$AR"; then
3998 ac_cv_prog_AR="$AR" # Let the user override the test.
4000 ac_save_IFS=$IFS; IFS=$ac_path_separator
4002 for ac_dir in $ac_dummy; do
4004 test -z "$ac_dir" && ac_dir=.
4005 $as_executable_p "$ac_dir/$ac_word" || continue
4006 ac_cv_prog_AR="${ac_tool_prefix}ar"
4007 echo "$as_me:4007: found $ac_dir/$ac_word" >&5
4014 if test -n "$AR"; then
4015 echo "$as_me:4015: result: $AR" >&5
4016 echo "${ECHO_T}$AR" >&6
4018 echo "$as_me:4018: result: no" >&5
4019 echo "${ECHO_T}no" >&6
4023 if test -z "$ac_cv_prog_AR"; then
4025 # Extract the first word of "ar", so it can be a program name with args.
4026 set dummy ar; ac_word=$2
4027 echo "$as_me:4027: checking for $ac_word" >&5
4028 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4029 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4030 echo $ECHO_N "(cached) $ECHO_C" >&6
4032 if test -n "$ac_ct_AR"; then
4033 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4035 ac_save_IFS=$IFS; IFS=$ac_path_separator
4037 for ac_dir in $ac_dummy; do
4039 test -z "$ac_dir" && ac_dir=.
4040 $as_executable_p "$ac_dir/$ac_word" || continue
4041 ac_cv_prog_ac_ct_AR="ar"
4042 echo "$as_me:4042: found $ac_dir/$ac_word" >&5
4046 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4049 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4050 if test -n "$ac_ct_AR"; then
4051 echo "$as_me:4051: result: $ac_ct_AR" >&5
4052 echo "${ECHO_T}$ac_ct_AR" >&6
4054 echo "$as_me:4054: result: no" >&5
4055 echo "${ECHO_T}no" >&6
4063 echo "$as_me:4063: checking for options to update archives" >&5
4064 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4065 if test "${cf_cv_ar_flags+set}" = set; then
4066 echo $ECHO_N "(cached) $ECHO_C" >&6
4069 case "$cf_cv_system_name" in
4072 cat >mk_static_lib.sh <<-EOF
4077 exec \$MSVC_BIN -out:"\$out" \$@
4079 chmod +x mk_static_lib.sh
4080 AR=`pwd`/mk_static_lib.sh
4083 cf_cv_ar_flags=unknown
4084 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4087 # check if $ARFLAGS already contains this choice
4088 if test "x$ARFLAGS" != "x" ; then
4089 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4090 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4096 rm -f "conftest.$ac_cv_objext"
4099 cat >"conftest.$ac_ext" <<EOF
4100 #line 4100 "configure"
4101 int testdata[3] = { 123, 456, 789 };
4103 if { (eval echo "$as_me:4103: \"$ac_compile\"") >&5
4104 (eval $ac_compile) 2>&5
4106 echo "$as_me:4106: \$? = $ac_status" >&5
4107 (exit "$ac_status"); } ; then
4108 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4109 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
4110 if test -f conftest.a ; then
4111 cf_cv_ar_flags="$cf_ar_flags"
4115 test -n "$verbose" && echo " cannot compile test-program" 1>&6
4117 echo "${as_me:-configure}:4117: testing cannot compile test-program ..." 1>&5
4122 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
4127 echo "$as_me:4127: result: $cf_cv_ar_flags" >&5
4128 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4130 if test -n "$ARFLAGS" ; then
4131 if test -n "$cf_cv_ar_flags" ; then
4132 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4135 ARFLAGS=$cf_cv_ar_flags
4138 echo "$as_me:4138: checking for PATH separator" >&5
4139 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4140 case "$cf_cv_system_name" in
4141 (os2*) PATH_SEPARATOR=';' ;;
4142 (*) ${PATH_SEPARATOR:=':'} ;;
4145 echo "$as_me:4145: result: $PATH_SEPARATOR" >&5
4146 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4148 echo "$as_me:4148: checking if you have specified an install-prefix" >&5
4149 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4151 # Check whether --with-install-prefix or --without-install-prefix was given.
4152 if test "${with_install_prefix+set}" = set; then
4153 withval="$with_install_prefix"
4157 (*) DESTDIR="$withval"
4161 echo "$as_me:4161: result: $DESTDIR" >&5
4162 echo "${ECHO_T}$DESTDIR" >&6
4164 ###############################################################################
4166 # If we're cross-compiling, allow the user to override the tools and their
4167 # options. The configure script is oriented toward identifying the host
4168 # compiler, etc., but we need a build compiler to generate parts of the source.
4170 if test "$cross_compiling" = yes ; then
4172 # defaults that we might want to override
4173 : ${BUILD_CFLAGS:=''}
4174 : ${BUILD_CPPFLAGS:=''}
4175 : ${BUILD_LDFLAGS:=''}
4177 : ${BUILD_EXEEXT:='$x'}
4178 : ${BUILD_OBJEXT:='o'}
4180 # Check whether --with-build-cc or --without-build-cc was given.
4181 if test "${with_build_cc+set}" = set; then
4182 withval="$with_build_cc"
4185 for ac_prog in gcc clang c99 c89 cc cl
4187 # Extract the first word of "$ac_prog", so it can be a program name with args.
4188 set dummy $ac_prog; ac_word=$2
4189 echo "$as_me:4189: checking for $ac_word" >&5
4190 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4191 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4192 echo $ECHO_N "(cached) $ECHO_C" >&6
4194 if test -n "$BUILD_CC"; then
4195 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4197 ac_save_IFS=$IFS; IFS=$ac_path_separator
4199 for ac_dir in $ac_dummy; do
4201 test -z "$ac_dir" && ac_dir=.
4202 $as_executable_p "$ac_dir/$ac_word" || continue
4203 ac_cv_prog_BUILD_CC="$ac_prog"
4204 echo "$as_me:4204: found $ac_dir/$ac_word" >&5
4210 BUILD_CC=$ac_cv_prog_BUILD_CC
4211 if test -n "$BUILD_CC"; then
4212 echo "$as_me:4212: result: $BUILD_CC" >&5
4213 echo "${ECHO_T}$BUILD_CC" >&6
4215 echo "$as_me:4215: result: no" >&5
4216 echo "${ECHO_T}no" >&6
4219 test -n "$BUILD_CC" && break
4221 test -n "$BUILD_CC" || BUILD_CC="none"
4224 echo "$as_me:4224: checking for native build C compiler" >&5
4225 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4226 echo "$as_me:4226: result: $BUILD_CC" >&5
4227 echo "${ECHO_T}$BUILD_CC" >&6
4229 echo "$as_me:4229: checking for native build C preprocessor" >&5
4230 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4232 # Check whether --with-build-cpp or --without-build-cpp was given.
4233 if test "${with_build_cpp+set}" = set; then
4234 withval="$with_build_cpp"
4235 BUILD_CPP="$withval"
4237 BUILD_CPP='${BUILD_CC} -E'
4239 echo "$as_me:4239: result: $BUILD_CPP" >&5
4240 echo "${ECHO_T}$BUILD_CPP" >&6
4242 echo "$as_me:4242: checking for native build C flags" >&5
4243 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4245 # Check whether --with-build-cflags or --without-build-cflags was given.
4246 if test "${with_build_cflags+set}" = set; then
4247 withval="$with_build_cflags"
4248 BUILD_CFLAGS="$withval"
4250 echo "$as_me:4250: result: $BUILD_CFLAGS" >&5
4251 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4253 echo "$as_me:4253: checking for native build C preprocessor-flags" >&5
4254 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4256 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4257 if test "${with_build_cppflags+set}" = set; then
4258 withval="$with_build_cppflags"
4259 BUILD_CPPFLAGS="$withval"
4261 echo "$as_me:4261: result: $BUILD_CPPFLAGS" >&5
4262 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4264 echo "$as_me:4264: checking for native build linker-flags" >&5
4265 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4267 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4268 if test "${with_build_ldflags+set}" = set; then
4269 withval="$with_build_ldflags"
4270 BUILD_LDFLAGS="$withval"
4272 echo "$as_me:4272: result: $BUILD_LDFLAGS" >&5
4273 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4275 echo "$as_me:4275: checking for native build linker-libraries" >&5
4276 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4278 # Check whether --with-build-libs or --without-build-libs was given.
4279 if test "${with_build_libs+set}" = set; then
4280 withval="$with_build_libs"
4281 BUILD_LIBS="$withval"
4283 echo "$as_me:4283: result: $BUILD_LIBS" >&5
4284 echo "${ECHO_T}$BUILD_LIBS" >&6
4286 # this assumes we're on Unix.
4290 : ${BUILD_CC:='${CC}'}
4292 if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
4293 { { echo "$as_me:4293: error: Cross-build requires two compilers.
4294 Use --with-build-cc to specify the native compiler." >&5
4295 echo "$as_me: error: Cross-build requires two compilers.
4296 Use --with-build-cc to specify the native compiler." >&2;}
4297 { (exit 1); exit 1; }; }
4301 : ${BUILD_CC:='${CC}'}
4302 : ${BUILD_CPP:='${CPP}'}
4303 : ${BUILD_CFLAGS:='${CFLAGS}'}
4304 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4305 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4306 : ${BUILD_LIBS:='${LIBS}'}
4307 : ${BUILD_EXEEXT:='$x'}
4308 : ${BUILD_OBJEXT:='o'}
4311 ###############################################################################
4313 ### Options to allow the user to specify the set of libraries which are used.
4314 ### Use "--without-normal --with-shared" to allow the default model to be
4315 ### shared, for example.
4318 echo "$as_me:4318: checking if you want to build shared C-objects" >&5
4319 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
4321 # Check whether --with-shared or --without-shared was given.
4322 if test "${with_shared+set}" = set; then
4323 withval="$with_shared"
4324 with_shared=$withval
4328 echo "$as_me:4328: result: $with_shared" >&5
4329 echo "${ECHO_T}$with_shared" >&6
4330 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4332 echo "$as_me:4332: checking for specified models" >&5
4333 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4334 test -z "$cf_list_models" && cf_list_models=normal
4335 echo "$as_me:4335: result: $cf_list_models" >&5
4336 echo "${ECHO_T}$cf_list_models" >&6
4338 ### Use the first model as the default, and save its suffix for use in building
4339 ### up test-applications.
4340 echo "$as_me:4340: checking for default model" >&5
4341 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4342 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4343 echo "$as_me:4343: result: $DFT_LWR_MODEL" >&5
4344 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4346 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4348 echo "$as_me:4348: checking for specific curses-directory" >&5
4349 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4351 # Check whether --with-curses-dir or --without-curses-dir was given.
4352 if test "${with_curses_dir+set}" = set; then
4353 withval="$with_curses_dir"
4354 cf_cv_curses_dir=$withval
4358 echo "$as_me:4358: result: $cf_cv_curses_dir" >&5
4359 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4361 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
4364 if test "x$prefix" != xNONE; then
4365 cf_path_syntax="$prefix"
4367 cf_path_syntax="$ac_default_prefix"
4375 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4377 (.\$\{*prefix\}*|.\$\{*dir\}*)
4378 eval withval="$withval"
4381 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4386 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4389 { { echo "$as_me:4389: error: expected a pathname, not \"$withval\"" >&5
4390 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4391 { (exit 1); exit 1; }; }
4395 if test -d "$cf_cv_curses_dir"
4398 if test -n "$cf_cv_curses_dir/include" ; then
4399 for cf_add_incdir in $cf_cv_curses_dir/include
4401 while test "$cf_add_incdir" != /usr/include
4403 if test -d "$cf_add_incdir"
4406 if test -n "$CFLAGS$CPPFLAGS" ; then
4407 # a loop is needed to ensure we can add subdirs of existing dirs
4408 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4409 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4410 cf_have_incdir=yes; break
4415 if test "$cf_have_incdir" = no ; then
4416 if test "$cf_add_incdir" = /usr/local/include ; then
4417 if test "$GCC" = yes
4419 cf_save_CPPFLAGS=$CPPFLAGS
4421 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4422 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4424 cat >"conftest.$ac_ext" <<_ACEOF
4425 #line 4425 "configure"
4426 #include "confdefs.h"
4436 rm -f "conftest.$ac_objext"
4437 if { (eval echo "$as_me:4437: \"$ac_compile\"") >&5
4438 (eval $ac_compile) 2>&5
4440 echo "$as_me:4440: \$? = $ac_status" >&5
4441 (exit "$ac_status"); } &&
4442 { ac_try='test -s "conftest.$ac_objext"'
4443 { (eval echo "$as_me:4443: \"$ac_try\"") >&5
4446 echo "$as_me:4446: \$? = $ac_status" >&5
4447 (exit "$ac_status"); }; }; then
4450 echo "$as_me: failed program was:" >&5
4451 cat "conftest.$ac_ext" >&5
4454 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4455 CPPFLAGS=$cf_save_CPPFLAGS
4460 if test "$cf_have_incdir" = no ; then
4461 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4463 echo "${as_me:-configure}:4463: testing adding $cf_add_incdir to include-path ..." 1>&5
4465 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4467 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
4468 test "$cf_top_incdir" = "$cf_add_incdir" && break
4469 cf_add_incdir="$cf_top_incdir"
4480 if test -n "$cf_cv_curses_dir/lib" ; then
4481 for cf_add_libdir in $cf_cv_curses_dir/lib
4483 if test "$cf_add_libdir" = /usr/lib ; then
4485 elif test -d "$cf_add_libdir"
4488 if test -n "$LDFLAGS$LIBS" ; then
4489 # a loop is needed to ensure we can add subdirs of existing dirs
4490 for cf_test_libdir in $LDFLAGS $LIBS ; do
4491 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4492 cf_have_libdir=yes; break
4496 if test "$cf_have_libdir" = no ; then
4497 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4499 echo "${as_me:-configure}:4499: testing adding $cf_add_libdir to library-path ..." 1>&5
4501 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4510 cf_ncuconfig_root=ncurses
4511 cf_have_ncuconfig=no
4513 if test "x${PKG_CONFIG:=none}" != xnone; then
4514 echo "$as_me:4514: checking pkg-config for $cf_ncuconfig_root" >&5
4515 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
4516 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
4517 echo "$as_me:4517: result: yes" >&5
4518 echo "${ECHO_T}yes" >&6
4520 echo "$as_me:4520: checking if the $cf_ncuconfig_root package files work" >&5
4521 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
4522 cf_have_ncuconfig=unknown
4524 cf_save_CFLAGS="$CFLAGS"
4525 cf_save_CPPFLAGS="$CPPFLAGS"
4526 cf_save_LIBS="$LIBS"
4528 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
4529 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
4531 # while -W for passing linker flags is prevalent, it is not "standard".
4532 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
4533 # incompatible _and_ non-standard -W option which gives an error. Work
4534 # around that pitfall.
4535 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
4541 cf_new_extra_cppflags=
4543 for cf_add_cflags in $cf_pkg_cflags
4545 case "$cf_fix_cppflags" in
4547 case "$cf_add_cflags" in
4548 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4549 case "$cf_add_cflags" in
4551 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4553 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4554 && test -z "${cf_tst_cflags}" \
4555 && cf_fix_cppflags=yes
4557 if test "$cf_fix_cppflags" = yes ; then
4559 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4560 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4563 elif test "${cf_tst_cflags}" = "\"'" ; then
4565 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4566 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4576 case "$cf_add_cflags" in
4578 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4580 CPPFLAGS=`echo "$CPPFLAGS" | \
4581 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4582 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4587 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4588 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4595 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4596 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4603 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4604 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4606 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4608 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4609 && test -z "${cf_tst_cflags}" \
4610 && cf_fix_cppflags=no
4615 if test -n "$cf_new_cflags" ; then
4617 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4618 CFLAGS="${CFLAGS}$cf_new_cflags"
4622 if test -n "$cf_new_cppflags" ; then
4624 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4625 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4629 if test -n "$cf_new_extra_cppflags" ; then
4631 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4632 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4639 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4641 for cf_add_1lib in $cf_add_0lib; do
4642 for cf_add_2lib in $cf_add_libs; do
4643 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4648 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4652 cat >"conftest.$ac_ext" <<_ACEOF
4653 #line 4653 "configure"
4654 #include "confdefs.h"
4655 #include <${cf_cv_ncurses_header:-curses.h}>
4659 initscr(); mousemask(0,0); tigetstr((char *)0);
4664 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4665 if { (eval echo "$as_me:4665: \"$ac_link\"") >&5
4666 (eval $ac_link) 2>&5
4668 echo "$as_me:4668: \$? = $ac_status" >&5
4669 (exit "$ac_status"); } &&
4670 { ac_try='test -s "conftest$ac_exeext"'
4671 { (eval echo "$as_me:4671: \"$ac_try\"") >&5
4674 echo "$as_me:4674: \$? = $ac_status" >&5
4675 (exit "$ac_status"); }; }; then
4676 if test "$cross_compiling" = yes; then
4677 cf_test_ncuconfig=maybe
4679 cat >"conftest.$ac_ext" <<_ACEOF
4680 #line 4680 "configure"
4681 #include "confdefs.h"
4682 #include <${cf_cv_ncurses_header:-curses.h}>
4684 { const char *xx = curses_version(); return (xx == 0); }
4686 rm -f "conftest$ac_exeext"
4687 if { (eval echo "$as_me:4687: \"$ac_link\"") >&5
4688 (eval $ac_link) 2>&5
4690 echo "$as_me:4690: \$? = $ac_status" >&5
4691 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4692 { (eval echo "$as_me:4692: \"$ac_try\"") >&5
4695 echo "$as_me:4695: \$? = $ac_status" >&5
4696 (exit "$ac_status"); }; }; then
4697 cf_test_ncuconfig=yes
4699 echo "$as_me: program exited with status $ac_status" >&5
4700 echo "$as_me: failed program was:" >&5
4701 cat "conftest.$ac_ext" >&5
4702 cf_test_ncuconfig=no
4704 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4707 echo "$as_me: failed program was:" >&5
4708 cat "conftest.$ac_ext" >&5
4709 cf_test_ncuconfig=no
4711 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4713 CFLAGS="$cf_save_CFLAGS"
4714 CPPFLAGS="$cf_save_CPPFLAGS"
4715 LIBS="$cf_save_LIBS"
4717 if test "x$cf_test_ncuconfig" != xyes; then
4718 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4719 cf_pkg_cflags="$cf_temp"
4720 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4721 cf_pkg_libs="$cf_temp"
4726 for cf_add_cflags in $cf_pkg_cflags
4728 case "x$cf_add_cflags" in
4731 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4734 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
4735 test "$CFLAGS" != "$cf_old_cflag" || break
4737 CFLAGS="$cf_old_cflag"
4740 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4743 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
4744 test "$CPPFLAGS" != "$cf_old_cflag" || break
4746 CPPFLAGS="$cf_old_cflag"
4755 cf_new_extra_cppflags=
4757 for cf_add_cflags in $cf_add_cflags
4759 case "$cf_fix_cppflags" in
4761 case "$cf_add_cflags" in
4762 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4763 case "$cf_add_cflags" in
4765 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4767 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4768 && test -z "${cf_tst_cflags}" \
4769 && cf_fix_cppflags=yes
4771 if test "$cf_fix_cppflags" = yes ; then
4773 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4774 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4777 elif test "${cf_tst_cflags}" = "\"'" ; then
4779 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4780 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4790 case "$cf_add_cflags" in
4792 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4794 CPPFLAGS=`echo "$CPPFLAGS" | \
4795 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4796 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4801 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4802 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4809 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4810 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4817 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4818 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4820 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4822 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4823 && test -z "${cf_tst_cflags}" \
4824 && cf_fix_cppflags=no
4829 if test -n "$cf_new_cflags" ; then
4831 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4832 CFLAGS="${CFLAGS}$cf_new_cflags"
4836 if test -n "$cf_new_cppflags" ; then
4838 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4839 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4843 if test -n "$cf_new_extra_cppflags" ; then
4845 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4846 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4855 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4857 for cf_add_1lib in $cf_add_0lib; do
4858 for cf_add_2lib in $cf_add_libs; do
4859 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4864 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4868 cat >"conftest.$ac_ext" <<_ACEOF
4869 #line 4869 "configure"
4870 #include "confdefs.h"
4871 #include <${cf_cv_ncurses_header:-curses.h}>
4875 initscr(); mousemask(0,0); tigetstr((char *)0);
4880 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4881 if { (eval echo "$as_me:4881: \"$ac_link\"") >&5
4882 (eval $ac_link) 2>&5
4884 echo "$as_me:4884: \$? = $ac_status" >&5
4885 (exit "$ac_status"); } &&
4886 { ac_try='test -s "conftest$ac_exeext"'
4887 { (eval echo "$as_me:4887: \"$ac_try\"") >&5
4890 echo "$as_me:4890: \$? = $ac_status" >&5
4891 (exit "$ac_status"); }; }; then
4892 if test "$cross_compiling" = yes; then
4893 cf_have_ncuconfig=maybe
4895 cat >"conftest.$ac_ext" <<_ACEOF
4896 #line 4896 "configure"
4897 #include "confdefs.h"
4898 #include <${cf_cv_ncurses_header:-curses.h}>
4900 { const char *xx = curses_version(); return (xx == 0); }
4902 rm -f "conftest$ac_exeext"
4903 if { (eval echo "$as_me:4903: \"$ac_link\"") >&5
4904 (eval $ac_link) 2>&5
4906 echo "$as_me:4906: \$? = $ac_status" >&5
4907 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4908 { (eval echo "$as_me:4908: \"$ac_try\"") >&5
4911 echo "$as_me:4911: \$? = $ac_status" >&5
4912 (exit "$ac_status"); }; }; then
4913 cf_have_ncuconfig=yes
4915 echo "$as_me: program exited with status $ac_status" >&5
4916 echo "$as_me: failed program was:" >&5
4917 cat "conftest.$ac_ext" >&5
4918 cf_have_ncuconfig=no
4920 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4923 echo "$as_me: failed program was:" >&5
4924 cat "conftest.$ac_ext" >&5
4925 cf_have_ncuconfig=no
4927 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4928 echo "$as_me:4928: result: $cf_have_ncuconfig" >&5
4929 echo "${ECHO_T}$cf_have_ncuconfig" >&6
4930 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
4931 if test "$cf_have_ncuconfig" != "yes"
4933 CPPFLAGS="$cf_save_CPPFLAGS"
4934 LIBS="$cf_save_LIBS"
4935 NCURSES_CONFIG_PKG=none
4938 cat >>confdefs.h <<\EOF
4942 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
4944 echo "$as_me:4944: checking for terminfo header" >&5
4945 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4946 if test "${cf_cv_term_header+set}" = set; then
4947 echo $ECHO_N "(cached) $ECHO_C" >&6
4950 case "${cf_cv_ncurses_header}" in
4951 (*/ncurses.h|*/ncursesw.h)
4952 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4955 cf_term_header=term.h
4959 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4961 cat >"conftest.$ac_ext" <<_ACEOF
4962 #line 4962 "configure"
4963 #include "confdefs.h"
4965 #include <${cf_cv_ncurses_header:-curses.h}>
4971 int x = auto_left_margin; (void)x
4976 rm -f "conftest.$ac_objext"
4977 if { (eval echo "$as_me:4977: \"$ac_compile\"") >&5
4978 (eval $ac_compile) 2>&5
4980 echo "$as_me:4980: \$? = $ac_status" >&5
4981 (exit "$ac_status"); } &&
4982 { ac_try='test -s "conftest.$ac_objext"'
4983 { (eval echo "$as_me:4983: \"$ac_try\"") >&5
4986 echo "$as_me:4986: \$? = $ac_status" >&5
4987 (exit "$ac_status"); }; }; then
4989 cf_cv_term_header="$cf_test"
4991 echo "$as_me: failed program was:" >&5
4992 cat "conftest.$ac_ext" >&5
4994 cf_cv_term_header=unknown
4997 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4998 test "$cf_cv_term_header" != unknown && break
5002 echo "$as_me:5002: result: $cf_cv_term_header" >&5
5003 echo "${ECHO_T}$cf_cv_term_header" >&6
5005 # Set definitions to allow ifdef'ing to accommodate subdirectories
5007 case "$cf_cv_term_header" in
5010 cat >>confdefs.h <<\EOF
5011 #define HAVE_TERM_H 1
5017 case "$cf_cv_term_header" in
5020 cat >>confdefs.h <<\EOF
5021 #define HAVE_NCURSES_TERM_H 1
5027 cat >>confdefs.h <<\EOF
5028 #define HAVE_NCURSESW_TERM_H 1
5037 echo "$as_me:5037: result: no" >&5
5038 echo "${ECHO_T}no" >&6
5039 NCURSES_CONFIG_PKG=none
5042 NCURSES_CONFIG_PKG=none
5045 if test "x$cf_have_ncuconfig" = "xno"; then
5046 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
5048 if test -n "$ac_tool_prefix"; then
5049 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5051 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5052 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5053 echo "$as_me:5053: checking for $ac_word" >&5
5054 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5055 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5056 echo $ECHO_N "(cached) $ECHO_C" >&6
5058 if test -n "$NCURSES_CONFIG"; then
5059 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5061 ac_save_IFS=$IFS; IFS=$ac_path_separator
5063 for ac_dir in $ac_dummy; do
5065 test -z "$ac_dir" && ac_dir=.
5066 $as_executable_p "$ac_dir/$ac_word" || continue
5067 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5068 echo "$as_me:5068: found $ac_dir/$ac_word" >&5
5074 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5075 if test -n "$NCURSES_CONFIG"; then
5076 echo "$as_me:5076: result: $NCURSES_CONFIG" >&5
5077 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5079 echo "$as_me:5079: result: no" >&5
5080 echo "${ECHO_T}no" >&6
5083 test -n "$NCURSES_CONFIG" && break
5086 if test -z "$NCURSES_CONFIG"; then
5087 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5088 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5090 # Extract the first word of "$ac_prog", so it can be a program name with args.
5091 set dummy $ac_prog; ac_word=$2
5092 echo "$as_me:5092: checking for $ac_word" >&5
5093 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5094 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5095 echo $ECHO_N "(cached) $ECHO_C" >&6
5097 if test -n "$ac_ct_NCURSES_CONFIG"; then
5098 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5100 ac_save_IFS=$IFS; IFS=$ac_path_separator
5102 for ac_dir in $ac_dummy; do
5104 test -z "$ac_dir" && ac_dir=.
5105 $as_executable_p "$ac_dir/$ac_word" || continue
5106 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5107 echo "$as_me:5107: found $ac_dir/$ac_word" >&5
5113 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5114 if test -n "$ac_ct_NCURSES_CONFIG"; then
5115 echo "$as_me:5115: result: $ac_ct_NCURSES_CONFIG" >&5
5116 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5118 echo "$as_me:5118: result: no" >&5
5119 echo "${ECHO_T}no" >&6
5122 test -n "$ac_ct_NCURSES_CONFIG" && break
5124 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5126 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5129 if test "$NCURSES_CONFIG" != none ; then
5131 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
5133 case "x$cf_add_cflags" in
5136 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5139 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5140 test "$CFLAGS" != "$cf_old_cflag" || break
5142 CFLAGS="$cf_old_cflag"
5145 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5148 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5149 test "$CPPFLAGS" != "$cf_old_cflag" || break
5151 CPPFLAGS="$cf_old_cflag"
5160 cf_new_extra_cppflags=
5162 for cf_add_cflags in $cf_add_cflags
5164 case "$cf_fix_cppflags" in
5166 case "$cf_add_cflags" in
5167 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5168 case "$cf_add_cflags" in
5170 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5172 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5173 && test -z "${cf_tst_cflags}" \
5174 && cf_fix_cppflags=yes
5176 if test "$cf_fix_cppflags" = yes ; then
5178 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5179 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5182 elif test "${cf_tst_cflags}" = "\"'" ; then
5184 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5185 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5195 case "$cf_add_cflags" in
5197 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5199 CPPFLAGS=`echo "$CPPFLAGS" | \
5200 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5201 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5206 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5207 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5214 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5215 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5222 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5223 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5225 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5227 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5228 && test -z "${cf_tst_cflags}" \
5229 && cf_fix_cppflags=no
5234 if test -n "$cf_new_cflags" ; then
5236 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5237 CFLAGS="${CFLAGS}$cf_new_cflags"
5241 if test -n "$cf_new_cppflags" ; then
5243 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5244 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5248 if test -n "$cf_new_extra_cppflags" ; then
5250 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5251 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5260 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5262 for cf_add_1lib in $cf_add_0lib; do
5263 for cf_add_2lib in $cf_add_libs; do
5264 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5269 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5273 # even with config script, some packages use no-override for curses.h
5275 echo "$as_me:5275: checking if we have identified curses headers" >&5
5276 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5277 if test "${cf_cv_ncurses_header+set}" = set; then
5278 echo $ECHO_N "(cached) $ECHO_C" >&6
5281 cf_cv_ncurses_header=none
5283 ncurses.h ncurses/ncurses.h \
5284 curses.h ncurses/curses.h
5286 cat >"conftest.$ac_ext" <<_ACEOF
5287 #line 5287 "configure"
5288 #include "confdefs.h"
5289 #include <${cf_header}>
5293 initscr(); tgoto("?", 0,0)
5298 rm -f "conftest.$ac_objext"
5299 if { (eval echo "$as_me:5299: \"$ac_compile\"") >&5
5300 (eval $ac_compile) 2>&5
5302 echo "$as_me:5302: \$? = $ac_status" >&5
5303 (exit "$ac_status"); } &&
5304 { ac_try='test -s "conftest.$ac_objext"'
5305 { (eval echo "$as_me:5305: \"$ac_try\"") >&5
5308 echo "$as_me:5308: \$? = $ac_status" >&5
5309 (exit "$ac_status"); }; }; then
5310 cf_cv_ncurses_header=$cf_header; break
5312 echo "$as_me: failed program was:" >&5
5313 cat "conftest.$ac_ext" >&5
5315 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5319 echo "$as_me:5319: result: $cf_cv_ncurses_header" >&5
5320 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5322 if test "$cf_cv_ncurses_header" = none ; then
5323 { { echo "$as_me:5323: error: No curses header-files found" >&5
5324 echo "$as_me: error: No curses header-files found" >&2;}
5325 { (exit 1); exit 1; }; }
5328 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5330 for ac_header in $cf_cv_ncurses_header
5332 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5333 echo "$as_me:5333: checking for $ac_header" >&5
5334 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5335 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5336 echo $ECHO_N "(cached) $ECHO_C" >&6
5338 cat >"conftest.$ac_ext" <<_ACEOF
5339 #line 5339 "configure"
5340 #include "confdefs.h"
5341 #include <$ac_header>
5343 if { (eval echo "$as_me:5343: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5344 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5346 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5348 cat conftest.err >&5
5349 echo "$as_me:5349: \$? = $ac_status" >&5
5350 (exit "$ac_status"); } >/dev/null; then
5351 if test -s conftest.err; then
5352 ac_cpp_err=$ac_c_preproc_warn_flag
5359 if test -z "$ac_cpp_err"; then
5360 eval "$as_ac_Header=yes"
5362 echo "$as_me: failed program was:" >&5
5363 cat "conftest.$ac_ext" >&5
5364 eval "$as_ac_Header=no"
5366 rm -f conftest.err "conftest.$ac_ext"
5368 echo "$as_me:5368: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5369 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5370 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5371 cat >>confdefs.h <<EOF
5372 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5378 cat >>confdefs.h <<\EOF
5382 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5384 cat >>confdefs.h <<EOF
5385 #define $cf_nculib_ROOT 1
5388 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
5392 cf_ncuhdr_root=ncurses
5394 test -n "$cf_cv_curses_dir" && \
5395 test "$cf_cv_curses_dir" != "no" && { \
5397 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5398 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5400 while test "$cf_add_incdir" != /usr/include
5402 if test -d "$cf_add_incdir"
5405 if test -n "$CFLAGS$CPPFLAGS" ; then
5406 # a loop is needed to ensure we can add subdirs of existing dirs
5407 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5408 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5409 cf_have_incdir=yes; break
5414 if test "$cf_have_incdir" = no ; then
5415 if test "$cf_add_incdir" = /usr/local/include ; then
5416 if test "$GCC" = yes
5418 cf_save_CPPFLAGS=$CPPFLAGS
5420 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5421 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5423 cat >"conftest.$ac_ext" <<_ACEOF
5424 #line 5424 "configure"
5425 #include "confdefs.h"
5435 rm -f "conftest.$ac_objext"
5436 if { (eval echo "$as_me:5436: \"$ac_compile\"") >&5
5437 (eval $ac_compile) 2>&5
5439 echo "$as_me:5439: \$? = $ac_status" >&5
5440 (exit "$ac_status"); } &&
5441 { ac_try='test -s "conftest.$ac_objext"'
5442 { (eval echo "$as_me:5442: \"$ac_try\"") >&5
5445 echo "$as_me:5445: \$? = $ac_status" >&5
5446 (exit "$ac_status"); }; }; then
5449 echo "$as_me: failed program was:" >&5
5450 cat "conftest.$ac_ext" >&5
5453 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5454 CPPFLAGS=$cf_save_CPPFLAGS
5459 if test "$cf_have_incdir" = no ; then
5460 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5462 echo "${as_me:-configure}:5462: testing adding $cf_add_incdir to include-path ..." 1>&5
5464 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5466 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5467 test "$cf_top_incdir" = "$cf_add_incdir" && break
5468 cf_add_incdir="$cf_top_incdir"
5481 echo "$as_me:5481: checking for $cf_ncuhdr_root header in include-path" >&5
5482 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5483 if test "${cf_cv_ncurses_h+set}" = set; then
5484 echo $ECHO_N "(cached) $ECHO_C" >&6
5487 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5488 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
5489 for cf_header in $cf_header_list
5492 cat >"conftest.$ac_ext" <<_ACEOF
5493 #line 5493 "configure"
5494 #include "confdefs.h"
5496 #include <$cf_header>
5501 #ifdef NCURSES_VERSION
5503 printf("%s\\n", NCURSES_VERSION);
5516 rm -f "conftest.$ac_objext"
5517 if { (eval echo "$as_me:5517: \"$ac_compile\"") >&5
5518 (eval $ac_compile) 2>&5
5520 echo "$as_me:5520: \$? = $ac_status" >&5
5521 (exit "$ac_status"); } &&
5522 { ac_try='test -s "conftest.$ac_objext"'
5523 { (eval echo "$as_me:5523: \"$ac_try\"") >&5
5526 echo "$as_me:5526: \$? = $ac_status" >&5
5527 (exit "$ac_status"); }; }; then
5528 cf_cv_ncurses_h=$cf_header
5531 echo "$as_me: failed program was:" >&5
5532 cat "conftest.$ac_ext" >&5
5535 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5537 test "$cf_cv_ncurses_h" != no && break
5541 echo "$as_me:5541: result: $cf_cv_ncurses_h" >&5
5542 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5544 if test "$cf_cv_ncurses_h" != no ; then
5545 cf_cv_ncurses_header=$cf_cv_ncurses_h
5548 echo "$as_me:5548: checking for $cf_ncuhdr_root include-path" >&5
5549 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5550 if test "${cf_cv_ncurses_h2+set}" = set; then
5551 echo $ECHO_N "(cached) $ECHO_C" >&6
5554 test -n "$verbose" && echo
5558 # collect the current set of include-directories from compiler flags
5559 cf_header_path_list=""
5560 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5561 for cf_header_path in $CPPFLAGS $CFLAGS
5563 case "$cf_header_path" in
5565 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5567 test "x$cf_header_path" != "xNONE" && \
5568 test -d "$cf_header_path" && \
5570 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5571 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
5572 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5573 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5574 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5575 test -d "$cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5578 cf_header_path_list="$cf_header_path_list $cf_search"
5584 # add the variations for the package we are looking for
5588 test "x$prefix" != "xNONE" && \
5589 test -d "$prefix" && \
5591 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5592 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
5593 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5594 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5595 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5596 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5599 for cf_subdir_prefix in \
5608 test "x$cf_subdir_prefix" != "x$prefix" && \
5609 test -d "$cf_subdir_prefix" && \
5610 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
5611 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5612 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
5613 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
5614 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
5615 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
5616 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5621 test "$includedir" != NONE && \
5622 test "$includedir" != "/usr/include" && \
5623 test -d "$includedir" && {
5624 test -d "$includedir" && cf_search="$cf_search $includedir"
5625 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5628 test "$oldincludedir" != NONE && \
5629 test "$oldincludedir" != "/usr/include" && \
5630 test -d "$oldincludedir" && {
5631 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
5632 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5635 cf_search="$cf_search $cf_header_path_list"
5637 test -n "$verbose" && echo "search path $cf_search"
5638 cf_save2_CPPFLAGS="$CPPFLAGS"
5639 for cf_incdir in $cf_search
5642 if test -n "$cf_incdir" ; then
5643 for cf_add_incdir in $cf_incdir
5645 while test "$cf_add_incdir" != /usr/include
5647 if test -d "$cf_add_incdir"
5650 if test -n "$CFLAGS$CPPFLAGS" ; then
5651 # a loop is needed to ensure we can add subdirs of existing dirs
5652 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5653 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5654 cf_have_incdir=yes; break
5659 if test "$cf_have_incdir" = no ; then
5660 if test "$cf_add_incdir" = /usr/local/include ; then
5661 if test "$GCC" = yes
5663 cf_save_CPPFLAGS=$CPPFLAGS
5665 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5666 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5668 cat >"conftest.$ac_ext" <<_ACEOF
5669 #line 5669 "configure"
5670 #include "confdefs.h"
5680 rm -f "conftest.$ac_objext"
5681 if { (eval echo "$as_me:5681: \"$ac_compile\"") >&5
5682 (eval $ac_compile) 2>&5
5684 echo "$as_me:5684: \$? = $ac_status" >&5
5685 (exit "$ac_status"); } &&
5686 { ac_try='test -s "conftest.$ac_objext"'
5687 { (eval echo "$as_me:5687: \"$ac_try\"") >&5
5690 echo "$as_me:5690: \$? = $ac_status" >&5
5691 (exit "$ac_status"); }; }; then
5694 echo "$as_me: failed program was:" >&5
5695 cat "conftest.$ac_ext" >&5
5698 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5699 CPPFLAGS=$cf_save_CPPFLAGS
5704 if test "$cf_have_incdir" = no ; then
5705 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5707 echo "${as_me:-configure}:5707: testing adding $cf_add_incdir to include-path ..." 1>&5
5709 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5711 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5712 test "$cf_top_incdir" = "$cf_add_incdir" && break
5713 cf_add_incdir="$cf_top_incdir"
5729 cat >"conftest.$ac_ext" <<_ACEOF
5730 #line 5730 "configure"
5731 #include "confdefs.h"
5733 #include <$cf_header>
5738 #ifdef NCURSES_VERSION
5740 printf("%s\\n", NCURSES_VERSION);
5753 rm -f "conftest.$ac_objext"
5754 if { (eval echo "$as_me:5754: \"$ac_compile\"") >&5
5755 (eval $ac_compile) 2>&5
5757 echo "$as_me:5757: \$? = $ac_status" >&5
5758 (exit "$ac_status"); } &&
5759 { ac_try='test -s "conftest.$ac_objext"'
5760 { (eval echo "$as_me:5760: \"$ac_try\"") >&5
5763 echo "$as_me:5763: \$? = $ac_status" >&5
5764 (exit "$ac_status"); }; }; then
5765 cf_cv_ncurses_h2=$cf_header
5768 echo "$as_me: failed program was:" >&5
5769 cat "conftest.$ac_ext" >&5
5772 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5774 if test "$cf_cv_ncurses_h2" != no ; then
5775 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5776 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
5779 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5781 CPPFLAGS="$cf_save2_CPPFLAGS"
5782 test "$cf_cv_ncurses_h2" != no && break
5784 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5784: error: not found" >&5
5785 echo "$as_me: error: not found" >&2;}
5786 { (exit 1); exit 1; }; }
5789 echo "$as_me:5789: result: $cf_cv_ncurses_h2" >&5
5790 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5792 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
5793 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
5794 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
5795 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
5798 if test -n "$cf_1st_incdir" ; then
5799 for cf_add_incdir in $cf_1st_incdir
5801 while test "$cf_add_incdir" != /usr/include
5803 if test -d "$cf_add_incdir"
5806 if test -n "$CFLAGS$CPPFLAGS" ; then
5807 # a loop is needed to ensure we can add subdirs of existing dirs
5808 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5809 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5810 cf_have_incdir=yes; break
5815 if test "$cf_have_incdir" = no ; then
5816 if test "$cf_add_incdir" = /usr/local/include ; then
5817 if test "$GCC" = yes
5819 cf_save_CPPFLAGS=$CPPFLAGS
5821 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5822 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5824 cat >"conftest.$ac_ext" <<_ACEOF
5825 #line 5825 "configure"
5826 #include "confdefs.h"
5836 rm -f "conftest.$ac_objext"
5837 if { (eval echo "$as_me:5837: \"$ac_compile\"") >&5
5838 (eval $ac_compile) 2>&5
5840 echo "$as_me:5840: \$? = $ac_status" >&5
5841 (exit "$ac_status"); } &&
5842 { ac_try='test -s "conftest.$ac_objext"'
5843 { (eval echo "$as_me:5843: \"$ac_try\"") >&5
5846 echo "$as_me:5846: \$? = $ac_status" >&5
5847 (exit "$ac_status"); }; }; then
5850 echo "$as_me: failed program was:" >&5
5851 cat "conftest.$ac_ext" >&5
5854 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5855 CPPFLAGS=$cf_save_CPPFLAGS
5860 if test "$cf_have_incdir" = no ; then
5861 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5863 echo "${as_me:-configure}:5863: testing adding $cf_add_incdir to include-path ..." 1>&5
5865 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5867 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5868 test "$cf_top_incdir" = "$cf_add_incdir" && break
5869 cf_add_incdir="$cf_top_incdir"
5882 # Set definitions to allow ifdef'ing for ncurses.h
5884 case "$cf_cv_ncurses_header" in
5887 cat >>confdefs.h <<\EOF
5888 #define HAVE_NCURSES_H 1
5894 case "$cf_cv_ncurses_header" in
5895 (ncurses/curses.h|ncurses/ncurses.h)
5897 cat >>confdefs.h <<\EOF
5898 #define HAVE_NCURSES_NCURSES_H 1
5902 (ncursesw/curses.h|ncursesw/ncurses.h)
5904 cat >>confdefs.h <<\EOF
5905 #define HAVE_NCURSESW_NCURSES_H 1
5911 echo "$as_me:5911: checking for terminfo header" >&5
5912 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5913 if test "${cf_cv_term_header+set}" = set; then
5914 echo $ECHO_N "(cached) $ECHO_C" >&6
5917 case "${cf_cv_ncurses_header}" in
5918 (*/ncurses.h|*/ncursesw.h)
5919 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5922 cf_term_header=term.h
5926 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5928 cat >"conftest.$ac_ext" <<_ACEOF
5929 #line 5929 "configure"
5930 #include "confdefs.h"
5932 #include <${cf_cv_ncurses_header:-curses.h}>
5938 int x = auto_left_margin; (void)x
5943 rm -f "conftest.$ac_objext"
5944 if { (eval echo "$as_me:5944: \"$ac_compile\"") >&5
5945 (eval $ac_compile) 2>&5
5947 echo "$as_me:5947: \$? = $ac_status" >&5
5948 (exit "$ac_status"); } &&
5949 { ac_try='test -s "conftest.$ac_objext"'
5950 { (eval echo "$as_me:5950: \"$ac_try\"") >&5
5953 echo "$as_me:5953: \$? = $ac_status" >&5
5954 (exit "$ac_status"); }; }; then
5956 cf_cv_term_header="$cf_test"
5958 echo "$as_me: failed program was:" >&5
5959 cat "conftest.$ac_ext" >&5
5961 cf_cv_term_header=unknown
5964 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5965 test "$cf_cv_term_header" != unknown && break
5969 echo "$as_me:5969: result: $cf_cv_term_header" >&5
5970 echo "${ECHO_T}$cf_cv_term_header" >&6
5972 # Set definitions to allow ifdef'ing to accommodate subdirectories
5974 case "$cf_cv_term_header" in
5977 cat >>confdefs.h <<\EOF
5978 #define HAVE_TERM_H 1
5984 case "$cf_cv_term_header" in
5987 cat >>confdefs.h <<\EOF
5988 #define HAVE_NCURSES_TERM_H 1
5994 cat >>confdefs.h <<\EOF
5995 #define HAVE_NCURSESW_TERM_H 1
6001 # some applications need this, but should check for NCURSES_VERSION
6003 cat >>confdefs.h <<\EOF
6007 echo "$as_me:6007: checking for ncurses version" >&5
6008 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6009 if test "${cf_cv_ncurses_version+set}" = set; then
6010 echo $ECHO_N "(cached) $ECHO_C" >&6
6013 cf_cv_ncurses_version=no
6015 rm -f "$cf_tempfile"
6016 if test "$cross_compiling" = yes; then
6018 # This will not work if the preprocessor splits the line after the
6019 # Autoconf token. The 'unproto' program does that.
6020 cat > "conftest.$ac_ext" <<EOF
6021 #include <${cf_cv_ncurses_header:-curses.h}>
6023 #ifdef NCURSES_VERSION
6024 Autoconf NCURSES_VERSION
6032 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6033 { (eval echo "$as_me:6033: \"$cf_try\"") >&5
6036 echo "$as_me:6036: \$? = $ac_status" >&5
6037 (exit "$ac_status"); }
6038 if test -f conftest.out ; then
6039 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
6040 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6045 cat >"conftest.$ac_ext" <<_ACEOF
6046 #line 6046 "configure"
6047 #include "confdefs.h"
6049 #include <${cf_cv_ncurses_header:-curses.h}>
6053 FILE *fp = fopen("$cf_tempfile", "w");
6054 #ifdef NCURSES_VERSION
6055 # ifdef NCURSES_VERSION_PATCH
6056 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6058 fprintf(fp, "%s\\n", NCURSES_VERSION);
6062 fprintf(fp, "old\\n");
6067 ${cf_cv_main_return:-return}(0);
6070 rm -f "conftest$ac_exeext"
6071 if { (eval echo "$as_me:6071: \"$ac_link\"") >&5
6072 (eval $ac_link) 2>&5
6074 echo "$as_me:6074: \$? = $ac_status" >&5
6075 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6076 { (eval echo "$as_me:6076: \"$ac_try\"") >&5
6079 echo "$as_me:6079: \$? = $ac_status" >&5
6080 (exit "$ac_status"); }; }; then
6082 cf_cv_ncurses_version=`cat $cf_tempfile`
6084 echo "$as_me: program exited with status $ac_status" >&5
6085 echo "$as_me: failed program was:" >&5
6086 cat "conftest.$ac_ext" >&5
6088 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6090 rm -f "$cf_tempfile"
6093 echo "$as_me:6093: result: $cf_cv_ncurses_version" >&5
6094 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6095 test "$cf_cv_ncurses_version" = no ||
6096 cat >>confdefs.h <<\EOF
6100 cf_nculib_root=ncurses
6101 # This works, except for the special case where we find gpm, but
6102 # ncurses is in a nonstandard location via $LIBS, and we really want
6105 cf_ncurses_SAVE="$LIBS"
6106 echo "$as_me:6106: checking for Gpm_Open in -lgpm" >&5
6107 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6108 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6109 echo $ECHO_N "(cached) $ECHO_C" >&6
6111 ac_check_lib_save_LIBS=$LIBS
6113 cat >"conftest.$ac_ext" <<_ACEOF
6114 #line 6114 "configure"
6115 #include "confdefs.h"
6117 /* Override any gcc2 internal prototype to avoid an error. */
6121 /* We use char because int might match the return type of a gcc2
6122 builtin and then its argument prototype would still apply. */
6132 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6133 if { (eval echo "$as_me:6133: \"$ac_link\"") >&5
6134 (eval $ac_link) 2>&5
6136 echo "$as_me:6136: \$? = $ac_status" >&5
6137 (exit "$ac_status"); } &&
6138 { ac_try='test -s "conftest$ac_exeext"'
6139 { (eval echo "$as_me:6139: \"$ac_try\"") >&5
6142 echo "$as_me:6142: \$? = $ac_status" >&5
6143 (exit "$ac_status"); }; }; then
6144 ac_cv_lib_gpm_Gpm_Open=yes
6146 echo "$as_me: failed program was:" >&5
6147 cat "conftest.$ac_ext" >&5
6148 ac_cv_lib_gpm_Gpm_Open=no
6150 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6151 LIBS=$ac_check_lib_save_LIBS
6153 echo "$as_me:6153: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6154 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6155 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
6156 echo "$as_me:6156: checking for initscr in -lgpm" >&5
6157 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6158 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6159 echo $ECHO_N "(cached) $ECHO_C" >&6
6161 ac_check_lib_save_LIBS=$LIBS
6163 cat >"conftest.$ac_ext" <<_ACEOF
6164 #line 6164 "configure"
6165 #include "confdefs.h"
6167 /* Override any gcc2 internal prototype to avoid an error. */
6171 /* We use char because int might match the return type of a gcc2
6172 builtin and then its argument prototype would still apply. */
6182 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6183 if { (eval echo "$as_me:6183: \"$ac_link\"") >&5
6184 (eval $ac_link) 2>&5
6186 echo "$as_me:6186: \$? = $ac_status" >&5
6187 (exit "$ac_status"); } &&
6188 { ac_try='test -s "conftest$ac_exeext"'
6189 { (eval echo "$as_me:6189: \"$ac_try\"") >&5
6192 echo "$as_me:6192: \$? = $ac_status" >&5
6193 (exit "$ac_status"); }; }; then
6194 ac_cv_lib_gpm_initscr=yes
6196 echo "$as_me: failed program was:" >&5
6197 cat "conftest.$ac_ext" >&5
6198 ac_cv_lib_gpm_initscr=no
6200 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6201 LIBS=$ac_check_lib_save_LIBS
6203 echo "$as_me:6203: result: $ac_cv_lib_gpm_initscr" >&5
6204 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6205 if test "$ac_cv_lib_gpm_initscr" = yes; then
6206 LIBS="$cf_ncurses_SAVE"
6208 cf_ncurses_LIBS="-lgpm"
6215 # This is only necessary if you are linking against an obsolete
6216 # version of ncurses (but it should do no harm, since it is static).
6217 if test "$cf_nculib_root" = ncurses ; then
6218 echo "$as_me:6218: checking for tgoto in -lmytinfo" >&5
6219 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6220 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6221 echo $ECHO_N "(cached) $ECHO_C" >&6
6223 ac_check_lib_save_LIBS=$LIBS
6224 LIBS="-lmytinfo $LIBS"
6225 cat >"conftest.$ac_ext" <<_ACEOF
6226 #line 6226 "configure"
6227 #include "confdefs.h"
6229 /* Override any gcc2 internal prototype to avoid an error. */
6233 /* We use char because int might match the return type of a gcc2
6234 builtin and then its argument prototype would still apply. */
6244 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6245 if { (eval echo "$as_me:6245: \"$ac_link\"") >&5
6246 (eval $ac_link) 2>&5
6248 echo "$as_me:6248: \$? = $ac_status" >&5
6249 (exit "$ac_status"); } &&
6250 { ac_try='test -s "conftest$ac_exeext"'
6251 { (eval echo "$as_me:6251: \"$ac_try\"") >&5
6254 echo "$as_me:6254: \$? = $ac_status" >&5
6255 (exit "$ac_status"); }; }; then
6256 ac_cv_lib_mytinfo_tgoto=yes
6258 echo "$as_me: failed program was:" >&5
6259 cat "conftest.$ac_ext" >&5
6260 ac_cv_lib_mytinfo_tgoto=no
6262 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6263 LIBS=$ac_check_lib_save_LIBS
6265 echo "$as_me:6265: result: $ac_cv_lib_mytinfo_tgoto" >&5
6266 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6267 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6268 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6278 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6280 for cf_add_1lib in $cf_add_0lib; do
6281 for cf_add_2lib in $cf_add_libs; do
6282 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6287 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6291 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6297 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6299 for cf_add_1lib in $cf_add_0lib; do
6300 for cf_add_2lib in $cf_add_libs; do
6301 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6306 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6312 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
6314 echo "$as_me:6314: checking for initscr" >&5
6315 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6316 if test "${ac_cv_func_initscr+set}" = set; then
6317 echo $ECHO_N "(cached) $ECHO_C" >&6
6319 cat >"conftest.$ac_ext" <<_ACEOF
6320 #line 6320 "configure"
6321 #include "confdefs.h"
6322 #define initscr autoconf_temporary
6323 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6330 /* We use char because int might match the return type of a gcc2
6331 builtin and then its argument prototype would still apply. */
6332 char initscr (void);
6338 /* The GNU C library defines stubs for functions which it implements
6339 to always fail with ENOSYS. Some functions are actually named
6340 something starting with __ and the normal name is an alias. */
6341 #if defined (__stub_initscr) || defined (__stub___initscr)
6342 #error found stub for initscr
6350 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6351 if { (eval echo "$as_me:6351: \"$ac_link\"") >&5
6352 (eval $ac_link) 2>&5
6354 echo "$as_me:6354: \$? = $ac_status" >&5
6355 (exit "$ac_status"); } &&
6356 { ac_try='test -s "conftest$ac_exeext"'
6357 { (eval echo "$as_me:6357: \"$ac_try\"") >&5
6360 echo "$as_me:6360: \$? = $ac_status" >&5
6361 (exit "$ac_status"); }; }; then
6362 ac_cv_func_initscr=yes
6364 echo "$as_me: failed program was:" >&5
6365 cat "conftest.$ac_ext" >&5
6366 ac_cv_func_initscr=no
6368 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6370 echo "$as_me:6370: result: $ac_cv_func_initscr" >&5
6371 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6372 if test "$ac_cv_func_initscr" = yes; then
6373 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6376 cf_save_LIBS="$LIBS"
6377 echo "$as_me:6377: checking for initscr in -l$cf_nculib_root" >&5
6378 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6379 LIBS="-l$cf_nculib_root $LIBS"
6380 cat >"conftest.$ac_ext" <<_ACEOF
6381 #line 6381 "configure"
6382 #include "confdefs.h"
6383 #include <${cf_cv_ncurses_header:-curses.h}>
6392 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6393 if { (eval echo "$as_me:6393: \"$ac_link\"") >&5
6394 (eval $ac_link) 2>&5
6396 echo "$as_me:6396: \$? = $ac_status" >&5
6397 (exit "$ac_status"); } &&
6398 { ac_try='test -s "conftest$ac_exeext"'
6399 { (eval echo "$as_me:6399: \"$ac_try\"") >&5
6402 echo "$as_me:6402: \$? = $ac_status" >&5
6403 (exit "$ac_status"); }; }; then
6404 echo "$as_me:6404: result: yes" >&5
6405 echo "${ECHO_T}yes" >&6
6406 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6409 echo "$as_me: failed program was:" >&5
6410 cat "conftest.$ac_ext" >&5
6411 echo "$as_me:6411: result: no" >&5
6412 echo "${ECHO_T}no" >&6
6415 cf_library_path_list=""
6416 if test -n "${LDFLAGS}${LIBS}" ; then
6417 for cf_library_path in $LDFLAGS $LIBS
6419 case "$cf_library_path" in
6421 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6423 test "x$cf_library_path" != "xNONE" && \
6424 test -d "$cf_library_path" && \
6426 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6427 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6428 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6429 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6430 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6431 test -d "$cf_library_path/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
6434 cf_library_path_list="$cf_library_path_list $cf_search"
6442 test "x$prefix" != "xNONE" && \
6443 test -d "$prefix" && \
6445 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6446 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6447 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6448 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6449 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6450 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6453 for cf_subdir_prefix in \
6462 test "x$cf_subdir_prefix" != "x$prefix" && \
6463 test -d "$cf_subdir_prefix" && \
6464 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6465 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6466 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6467 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
6468 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
6469 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
6470 test -d "$cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
6475 cf_search="$cf_library_path_list $cf_search"
6477 for cf_libdir in $cf_search
6479 echo "$as_me:6479: checking for -l$cf_nculib_root in $cf_libdir" >&5
6480 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6481 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6482 cat >"conftest.$ac_ext" <<_ACEOF
6483 #line 6483 "configure"
6484 #include "confdefs.h"
6485 #include <${cf_cv_ncurses_header:-curses.h}>
6494 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6495 if { (eval echo "$as_me:6495: \"$ac_link\"") >&5
6496 (eval $ac_link) 2>&5
6498 echo "$as_me:6498: \$? = $ac_status" >&5
6499 (exit "$ac_status"); } &&
6500 { ac_try='test -s "conftest$ac_exeext"'
6501 { (eval echo "$as_me:6501: \"$ac_try\"") >&5
6504 echo "$as_me:6504: \$? = $ac_status" >&5
6505 (exit "$ac_status"); }; }; then
6506 echo "$as_me:6506: result: yes" >&5
6507 echo "${ECHO_T}yes" >&6
6508 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6511 echo "$as_me: failed program was:" >&5
6512 cat "conftest.$ac_ext" >&5
6513 echo "$as_me:6513: result: no" >&5
6514 echo "${ECHO_T}no" >&6
6515 LIBS="$cf_save_LIBS"
6517 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6521 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6525 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
6527 if test "$cf_found_library" = no ; then
6528 { { echo "$as_me:6528: error: Cannot link $cf_nculib_root library" >&5
6529 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6530 { (exit 1); exit 1; }; }
6535 if test -n "$cf_ncurses_LIBS" ; then
6536 echo "$as_me:6536: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6537 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6538 cf_ncurses_SAVE="$LIBS"
6539 for p in $cf_ncurses_LIBS ; do
6540 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
6541 if test "$q" != "$LIBS" ; then
6545 cat >"conftest.$ac_ext" <<_ACEOF
6546 #line 6546 "configure"
6547 #include "confdefs.h"
6548 #include <${cf_cv_ncurses_header:-curses.h}>
6552 initscr(); mousemask(0,0); tigetstr((char *)0);
6557 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6558 if { (eval echo "$as_me:6558: \"$ac_link\"") >&5
6559 (eval $ac_link) 2>&5
6561 echo "$as_me:6561: \$? = $ac_status" >&5
6562 (exit "$ac_status"); } &&
6563 { ac_try='test -s "conftest$ac_exeext"'
6564 { (eval echo "$as_me:6564: \"$ac_try\"") >&5
6567 echo "$as_me:6567: \$? = $ac_status" >&5
6568 (exit "$ac_status"); }; }; then
6569 echo "$as_me:6569: result: yes" >&5
6570 echo "${ECHO_T}yes" >&6
6572 echo "$as_me: failed program was:" >&5
6573 cat "conftest.$ac_ext" >&5
6574 echo "$as_me:6574: result: no" >&5
6575 echo "${ECHO_T}no" >&6
6576 LIBS="$cf_ncurses_SAVE"
6578 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6581 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6583 cat >>confdefs.h <<EOF
6584 #define $cf_nculib_ROOT 1
6592 echo "$as_me:6592: checking if you want wide-character code" >&5
6593 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6595 # Check whether --enable-widec or --disable-widec was given.
6596 if test "${enable_widec+set}" = set; then
6597 enableval="$enable_widec"
6598 with_widec=$enableval
6602 echo "$as_me:6602: result: $with_widec" >&5
6603 echo "${ECHO_T}$with_widec" >&6
6604 if test "$with_widec" = yes ; then
6606 for ac_header in wchar.h
6608 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6609 echo "$as_me:6609: checking for $ac_header" >&5
6610 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6611 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6612 echo $ECHO_N "(cached) $ECHO_C" >&6
6614 cat >"conftest.$ac_ext" <<_ACEOF
6615 #line 6615 "configure"
6616 #include "confdefs.h"
6617 #include <$ac_header>
6619 if { (eval echo "$as_me:6619: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6620 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6622 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6624 cat conftest.err >&5
6625 echo "$as_me:6625: \$? = $ac_status" >&5
6626 (exit "$ac_status"); } >/dev/null; then
6627 if test -s conftest.err; then
6628 ac_cpp_err=$ac_c_preproc_warn_flag
6635 if test -z "$ac_cpp_err"; then
6636 eval "$as_ac_Header=yes"
6638 echo "$as_me: failed program was:" >&5
6639 cat "conftest.$ac_ext" >&5
6640 eval "$as_ac_Header=no"
6642 rm -f conftest.err "conftest.$ac_ext"
6644 echo "$as_me:6644: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6645 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6646 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6647 cat >>confdefs.h <<EOF
6648 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6654 echo "$as_me:6654: checking for multibyte character support" >&5
6655 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6656 if test "${cf_cv_utf8_lib+set}" = set; then
6657 echo $ECHO_N "(cached) $ECHO_C" >&6
6660 cf_save_LIBS="$LIBS"
6661 cat >"conftest.$ac_ext" <<_ACEOF
6662 #line 6662 "configure"
6663 #include "confdefs.h"
6679 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6680 if { (eval echo "$as_me:6680: \"$ac_link\"") >&5
6681 (eval $ac_link) 2>&5
6683 echo "$as_me:6683: \$? = $ac_status" >&5
6684 (exit "$ac_status"); } &&
6685 { ac_try='test -s "conftest$ac_exeext"'
6686 { (eval echo "$as_me:6686: \"$ac_try\"") >&5
6689 echo "$as_me:6689: \$? = $ac_status" >&5
6690 (exit "$ac_status"); }; }; then
6693 echo "$as_me: failed program was:" >&5
6694 cat "conftest.$ac_ext" >&5
6696 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6697 # will be set on completion of the AC_TRY_LINK below.
6698 cf_cv_header_path_utf8=
6699 cf_cv_library_path_utf8=
6701 echo "${as_me:-configure}:6701: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6703 cf_save_LIBS="$LIBS"
6705 cat >"conftest.$ac_ext" <<_ACEOF
6706 #line 6706 "configure"
6707 #include "confdefs.h"
6709 #include <libutf8.h>
6718 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6719 if { (eval echo "$as_me:6719: \"$ac_link\"") >&5
6720 (eval $ac_link) 2>&5
6722 echo "$as_me:6722: \$? = $ac_status" >&5
6723 (exit "$ac_status"); } &&
6724 { ac_try='test -s "conftest$ac_exeext"'
6725 { (eval echo "$as_me:6725: \"$ac_try\"") >&5
6728 echo "$as_me:6728: \$? = $ac_status" >&5
6729 (exit "$ac_status"); }; }; then
6731 cf_cv_find_linkage_utf8=yes
6732 cf_cv_header_path_utf8=/usr/include
6733 cf_cv_library_path_utf8=/usr/lib
6736 echo "$as_me: failed program was:" >&5
6737 cat "conftest.$ac_ext" >&5
6739 LIBS="-lutf8 $cf_save_LIBS"
6741 cat >"conftest.$ac_ext" <<_ACEOF
6742 #line 6742 "configure"
6743 #include "confdefs.h"
6745 #include <libutf8.h>
6754 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6755 if { (eval echo "$as_me:6755: \"$ac_link\"") >&5
6756 (eval $ac_link) 2>&5
6758 echo "$as_me:6758: \$? = $ac_status" >&5
6759 (exit "$ac_status"); } &&
6760 { ac_try='test -s "conftest$ac_exeext"'
6761 { (eval echo "$as_me:6761: \"$ac_try\"") >&5
6764 echo "$as_me:6764: \$? = $ac_status" >&5
6765 (exit "$ac_status"); }; }; then
6767 cf_cv_find_linkage_utf8=yes
6768 cf_cv_header_path_utf8=/usr/include
6769 cf_cv_library_path_utf8=/usr/lib
6770 cf_cv_library_file_utf8="-lutf8"
6773 echo "$as_me: failed program was:" >&5
6774 cat "conftest.$ac_ext" >&5
6776 cf_cv_find_linkage_utf8=no
6777 LIBS="$cf_save_LIBS"
6779 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6781 echo "${as_me:-configure}:6781: testing find linkage for utf8 library ..." 1>&5
6783 echo "${as_me:-configure}:6783: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6785 cf_save_CPPFLAGS="$CPPFLAGS"
6786 cf_test_CPPFLAGS="$CPPFLAGS"
6790 # collect the current set of include-directories from compiler flags
6791 cf_header_path_list=""
6792 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6793 for cf_header_path in $CPPFLAGS $CFLAGS
6795 case "$cf_header_path" in
6797 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6799 test "x$cf_header_path" != "xNONE" && \
6800 test -d "$cf_header_path" && \
6802 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6803 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
6804 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
6805 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
6806 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
6807 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6810 cf_header_path_list="$cf_header_path_list $cf_search"
6816 # add the variations for the package we are looking for
6820 test "x$prefix" != "xNONE" && \
6821 test -d "$prefix" && \
6823 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6824 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
6825 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
6826 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
6827 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
6828 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
6831 for cf_subdir_prefix in \
6840 test "x$cf_subdir_prefix" != "x$prefix" && \
6841 test -d "$cf_subdir_prefix" && \
6842 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6843 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6844 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
6845 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6846 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6847 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6848 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6853 test "$includedir" != NONE && \
6854 test "$includedir" != "/usr/include" && \
6855 test -d "$includedir" && {
6856 test -d "$includedir" && cf_search="$cf_search $includedir"
6857 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
6860 test "$oldincludedir" != NONE && \
6861 test "$oldincludedir" != "/usr/include" && \
6862 test -d "$oldincludedir" && {
6863 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
6864 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
6867 cf_search="$cf_search $cf_header_path_list"
6869 for cf_cv_header_path_utf8 in $cf_search
6871 if test -d "$cf_cv_header_path_utf8" ; then
6872 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6874 echo "${as_me:-configure}:6874: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6876 CPPFLAGS="$cf_save_CPPFLAGS"
6878 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6879 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
6881 cat >"conftest.$ac_ext" <<_ACEOF
6882 #line 6882 "configure"
6883 #include "confdefs.h"
6885 #include <libutf8.h>
6894 rm -f "conftest.$ac_objext"
6895 if { (eval echo "$as_me:6895: \"$ac_compile\"") >&5
6896 (eval $ac_compile) 2>&5
6898 echo "$as_me:6898: \$? = $ac_status" >&5
6899 (exit "$ac_status"); } &&
6900 { ac_try='test -s "conftest.$ac_objext"'
6901 { (eval echo "$as_me:6901: \"$ac_try\"") >&5
6904 echo "$as_me:6904: \$? = $ac_status" >&5
6905 (exit "$ac_status"); }; }; then
6907 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6909 echo "${as_me:-configure}:6909: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6911 cf_cv_find_linkage_utf8=maybe
6912 cf_test_CPPFLAGS="$CPPFLAGS"
6915 echo "$as_me: failed program was:" >&5
6916 cat "conftest.$ac_ext" >&5
6918 CPPFLAGS="$cf_save_CPPFLAGS"
6921 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6925 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6927 echo "${as_me:-configure}:6927: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6929 cf_save_LIBS="$LIBS"
6930 cf_save_LDFLAGS="$LDFLAGS"
6932 if test "$cf_cv_find_linkage_utf8" != yes ; then
6935 cf_library_path_list=""
6936 if test -n "${LDFLAGS}${LIBS}" ; then
6937 for cf_library_path in $LDFLAGS $LIBS
6939 case "$cf_library_path" in
6941 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6943 test "x$cf_library_path" != "xNONE" && \
6944 test -d "$cf_library_path" && \
6946 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6947 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6948 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
6949 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6950 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
6951 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6954 cf_library_path_list="$cf_library_path_list $cf_search"
6962 test "x$prefix" != "xNONE" && \
6963 test -d "$prefix" && \
6965 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6966 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6967 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
6968 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
6969 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
6970 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
6973 for cf_subdir_prefix in \
6982 test "x$cf_subdir_prefix" != "x$prefix" && \
6983 test -d "$cf_subdir_prefix" && \
6984 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6985 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6986 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6987 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6988 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6989 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6990 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6995 cf_search="$cf_library_path_list $cf_search"
6997 for cf_cv_library_path_utf8 in $cf_search
6999 if test -d "$cf_cv_library_path_utf8" ; then
7000 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7002 echo "${as_me:-configure}:7002: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7004 CPPFLAGS="$cf_test_CPPFLAGS"
7005 LIBS="-lutf8 $cf_save_LIBS"
7006 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7007 cat >"conftest.$ac_ext" <<_ACEOF
7008 #line 7008 "configure"
7009 #include "confdefs.h"
7011 #include <libutf8.h>
7020 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7021 if { (eval echo "$as_me:7021: \"$ac_link\"") >&5
7022 (eval $ac_link) 2>&5
7024 echo "$as_me:7024: \$? = $ac_status" >&5
7025 (exit "$ac_status"); } &&
7026 { ac_try='test -s "conftest$ac_exeext"'
7027 { (eval echo "$as_me:7027: \"$ac_try\"") >&5
7030 echo "$as_me:7030: \$? = $ac_status" >&5
7031 (exit "$ac_status"); }; }; then
7033 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7035 echo "${as_me:-configure}:7035: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7037 cf_cv_find_linkage_utf8=yes
7038 cf_cv_library_file_utf8="-lutf8"
7041 echo "$as_me: failed program was:" >&5
7042 cat "conftest.$ac_ext" >&5
7044 CPPFLAGS="$cf_save_CPPFLAGS"
7045 LIBS="$cf_save_LIBS"
7046 LDFLAGS="$cf_save_LDFLAGS"
7049 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7052 CPPFLAGS="$cf_save_CPPFLAGS"
7053 LDFLAGS="$cf_save_LDFLAGS"
7057 cf_cv_find_linkage_utf8=no
7061 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7064 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7066 LIBS="$cf_save_LIBS"
7068 if test "$cf_cv_find_linkage_utf8" = yes ; then
7069 cf_cv_utf8_lib=add-on
7075 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7077 echo "$as_me:7077: result: $cf_cv_utf8_lib" >&5
7078 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7080 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7082 if test "$cf_cv_utf8_lib" = "add-on" ; then
7084 cat >>confdefs.h <<\EOF
7085 #define HAVE_LIBUTF8_H 1
7088 if test -n "$cf_cv_header_path_utf8" ; then
7089 for cf_add_incdir in $cf_cv_header_path_utf8
7091 while test "$cf_add_incdir" != /usr/include
7093 if test -d "$cf_add_incdir"
7096 if test -n "$CFLAGS$CPPFLAGS" ; then
7097 # a loop is needed to ensure we can add subdirs of existing dirs
7098 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7099 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7100 cf_have_incdir=yes; break
7105 if test "$cf_have_incdir" = no ; then
7106 if test "$cf_add_incdir" = /usr/local/include ; then
7107 if test "$GCC" = yes
7109 cf_save_CPPFLAGS=$CPPFLAGS
7111 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7112 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7114 cat >"conftest.$ac_ext" <<_ACEOF
7115 #line 7115 "configure"
7116 #include "confdefs.h"
7126 rm -f "conftest.$ac_objext"
7127 if { (eval echo "$as_me:7127: \"$ac_compile\"") >&5
7128 (eval $ac_compile) 2>&5
7130 echo "$as_me:7130: \$? = $ac_status" >&5
7131 (exit "$ac_status"); } &&
7132 { ac_try='test -s "conftest.$ac_objext"'
7133 { (eval echo "$as_me:7133: \"$ac_try\"") >&5
7136 echo "$as_me:7136: \$? = $ac_status" >&5
7137 (exit "$ac_status"); }; }; then
7140 echo "$as_me: failed program was:" >&5
7141 cat "conftest.$ac_ext" >&5
7144 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7145 CPPFLAGS=$cf_save_CPPFLAGS
7150 if test "$cf_have_incdir" = no ; then
7151 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7153 echo "${as_me:-configure}:7153: testing adding $cf_add_incdir to include-path ..." 1>&5
7155 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7157 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7158 test "$cf_top_incdir" = "$cf_add_incdir" && break
7159 cf_add_incdir="$cf_top_incdir"
7170 if test -n "$cf_cv_library_path_utf8" ; then
7171 for cf_add_libdir in $cf_cv_library_path_utf8
7173 if test "$cf_add_libdir" = /usr/lib ; then
7175 elif test -d "$cf_add_libdir"
7178 if test -n "$LDFLAGS$LIBS" ; then
7179 # a loop is needed to ensure we can add subdirs of existing dirs
7180 for cf_test_libdir in $LDFLAGS $LIBS ; do
7181 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7182 cf_have_libdir=yes; break
7186 if test "$cf_have_libdir" = no ; then
7187 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7189 echo "${as_me:-configure}:7189: testing adding $cf_add_libdir to library-path ..." 1>&5
7191 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7200 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7202 for cf_add_1lib in $cf_add_0lib; do
7203 for cf_add_2lib in $cf_add_libs; do
7204 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7209 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7215 cf_ncuconfig_root=ncursesw
7216 cf_have_ncuconfig=no
7218 if test "x${PKG_CONFIG:=none}" != xnone; then
7219 echo "$as_me:7219: checking pkg-config for $cf_ncuconfig_root" >&5
7220 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7221 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7222 echo "$as_me:7222: result: yes" >&5
7223 echo "${ECHO_T}yes" >&6
7225 echo "$as_me:7225: checking if the $cf_ncuconfig_root package files work" >&5
7226 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7227 cf_have_ncuconfig=unknown
7229 cf_save_CFLAGS="$CFLAGS"
7230 cf_save_CPPFLAGS="$CPPFLAGS"
7231 cf_save_LIBS="$LIBS"
7233 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7234 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7236 # while -W for passing linker flags is prevalent, it is not "standard".
7237 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7238 # incompatible _and_ non-standard -W option which gives an error. Work
7239 # around that pitfall.
7240 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7246 cf_new_extra_cppflags=
7248 for cf_add_cflags in $cf_pkg_cflags
7250 case "$cf_fix_cppflags" in
7252 case "$cf_add_cflags" in
7253 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7254 case "$cf_add_cflags" in
7256 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7258 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7259 && test -z "${cf_tst_cflags}" \
7260 && cf_fix_cppflags=yes
7262 if test "$cf_fix_cppflags" = yes ; then
7264 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7265 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7268 elif test "${cf_tst_cflags}" = "\"'" ; then
7270 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7271 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7281 case "$cf_add_cflags" in
7283 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7285 CPPFLAGS=`echo "$CPPFLAGS" | \
7286 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7287 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7292 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7293 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7300 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7301 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7308 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7309 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7311 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7313 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7314 && test -z "${cf_tst_cflags}" \
7315 && cf_fix_cppflags=no
7320 if test -n "$cf_new_cflags" ; then
7322 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7323 CFLAGS="${CFLAGS}$cf_new_cflags"
7327 if test -n "$cf_new_cppflags" ; then
7329 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7330 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7334 if test -n "$cf_new_extra_cppflags" ; then
7336 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7337 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7344 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7346 for cf_add_1lib in $cf_add_0lib; do
7347 for cf_add_2lib in $cf_add_libs; do
7348 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7353 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7357 cat >"conftest.$ac_ext" <<_ACEOF
7358 #line 7358 "configure"
7359 #include "confdefs.h"
7360 #include <${cf_cv_ncurses_header:-curses.h}>
7364 initscr(); mousemask(0,0); tigetstr((char *)0);
7369 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7370 if { (eval echo "$as_me:7370: \"$ac_link\"") >&5
7371 (eval $ac_link) 2>&5
7373 echo "$as_me:7373: \$? = $ac_status" >&5
7374 (exit "$ac_status"); } &&
7375 { ac_try='test -s "conftest$ac_exeext"'
7376 { (eval echo "$as_me:7376: \"$ac_try\"") >&5
7379 echo "$as_me:7379: \$? = $ac_status" >&5
7380 (exit "$ac_status"); }; }; then
7381 if test "$cross_compiling" = yes; then
7382 cf_test_ncuconfig=maybe
7384 cat >"conftest.$ac_ext" <<_ACEOF
7385 #line 7385 "configure"
7386 #include "confdefs.h"
7387 #include <${cf_cv_ncurses_header:-curses.h}>
7389 { const char *xx = curses_version(); return (xx == 0); }
7391 rm -f "conftest$ac_exeext"
7392 if { (eval echo "$as_me:7392: \"$ac_link\"") >&5
7393 (eval $ac_link) 2>&5
7395 echo "$as_me:7395: \$? = $ac_status" >&5
7396 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7397 { (eval echo "$as_me:7397: \"$ac_try\"") >&5
7400 echo "$as_me:7400: \$? = $ac_status" >&5
7401 (exit "$ac_status"); }; }; then
7402 cf_test_ncuconfig=yes
7404 echo "$as_me: program exited with status $ac_status" >&5
7405 echo "$as_me: failed program was:" >&5
7406 cat "conftest.$ac_ext" >&5
7407 cf_test_ncuconfig=no
7409 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7412 echo "$as_me: failed program was:" >&5
7413 cat "conftest.$ac_ext" >&5
7414 cf_test_ncuconfig=no
7416 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7418 CFLAGS="$cf_save_CFLAGS"
7419 CPPFLAGS="$cf_save_CPPFLAGS"
7420 LIBS="$cf_save_LIBS"
7422 if test "x$cf_test_ncuconfig" != xyes; then
7423 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7424 cf_pkg_cflags="$cf_temp"
7425 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7426 cf_pkg_libs="$cf_temp"
7431 for cf_add_cflags in $cf_pkg_cflags
7433 case "x$cf_add_cflags" in
7436 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7439 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
7440 test "$CFLAGS" != "$cf_old_cflag" || break
7442 CFLAGS="$cf_old_cflag"
7445 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7448 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
7449 test "$CPPFLAGS" != "$cf_old_cflag" || break
7451 CPPFLAGS="$cf_old_cflag"
7460 cf_new_extra_cppflags=
7462 for cf_add_cflags in $cf_add_cflags
7464 case "$cf_fix_cppflags" in
7466 case "$cf_add_cflags" in
7467 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7468 case "$cf_add_cflags" in
7470 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7472 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7473 && test -z "${cf_tst_cflags}" \
7474 && cf_fix_cppflags=yes
7476 if test "$cf_fix_cppflags" = yes ; then
7478 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7479 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7482 elif test "${cf_tst_cflags}" = "\"'" ; then
7484 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7485 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7495 case "$cf_add_cflags" in
7497 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7499 CPPFLAGS=`echo "$CPPFLAGS" | \
7500 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7501 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7506 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7507 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7514 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7515 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7522 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7523 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7525 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7527 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7528 && test -z "${cf_tst_cflags}" \
7529 && cf_fix_cppflags=no
7534 if test -n "$cf_new_cflags" ; then
7536 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7537 CFLAGS="${CFLAGS}$cf_new_cflags"
7541 if test -n "$cf_new_cppflags" ; then
7543 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7544 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7548 if test -n "$cf_new_extra_cppflags" ; then
7550 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7551 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7560 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7562 for cf_add_1lib in $cf_add_0lib; do
7563 for cf_add_2lib in $cf_add_libs; do
7564 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7569 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7573 cat >"conftest.$ac_ext" <<_ACEOF
7574 #line 7574 "configure"
7575 #include "confdefs.h"
7576 #include <${cf_cv_ncurses_header:-curses.h}>
7580 initscr(); mousemask(0,0); tigetstr((char *)0);
7585 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7586 if { (eval echo "$as_me:7586: \"$ac_link\"") >&5
7587 (eval $ac_link) 2>&5
7589 echo "$as_me:7589: \$? = $ac_status" >&5
7590 (exit "$ac_status"); } &&
7591 { ac_try='test -s "conftest$ac_exeext"'
7592 { (eval echo "$as_me:7592: \"$ac_try\"") >&5
7595 echo "$as_me:7595: \$? = $ac_status" >&5
7596 (exit "$ac_status"); }; }; then
7597 if test "$cross_compiling" = yes; then
7598 cf_have_ncuconfig=maybe
7600 cat >"conftest.$ac_ext" <<_ACEOF
7601 #line 7601 "configure"
7602 #include "confdefs.h"
7603 #include <${cf_cv_ncurses_header:-curses.h}>
7605 { const char *xx = curses_version(); return (xx == 0); }
7607 rm -f "conftest$ac_exeext"
7608 if { (eval echo "$as_me:7608: \"$ac_link\"") >&5
7609 (eval $ac_link) 2>&5
7611 echo "$as_me:7611: \$? = $ac_status" >&5
7612 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7613 { (eval echo "$as_me:7613: \"$ac_try\"") >&5
7616 echo "$as_me:7616: \$? = $ac_status" >&5
7617 (exit "$ac_status"); }; }; then
7618 cf_have_ncuconfig=yes
7620 echo "$as_me: program exited with status $ac_status" >&5
7621 echo "$as_me: failed program was:" >&5
7622 cat "conftest.$ac_ext" >&5
7623 cf_have_ncuconfig=no
7625 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7628 echo "$as_me: failed program was:" >&5
7629 cat "conftest.$ac_ext" >&5
7630 cf_have_ncuconfig=no
7632 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7633 echo "$as_me:7633: result: $cf_have_ncuconfig" >&5
7634 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7635 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7636 if test "$cf_have_ncuconfig" != "yes"
7638 CPPFLAGS="$cf_save_CPPFLAGS"
7639 LIBS="$cf_save_LIBS"
7640 NCURSES_CONFIG_PKG=none
7643 cat >>confdefs.h <<\EOF
7647 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7649 echo "$as_me:7649: checking for terminfo header" >&5
7650 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7651 if test "${cf_cv_term_header+set}" = set; then
7652 echo $ECHO_N "(cached) $ECHO_C" >&6
7655 case "${cf_cv_ncurses_header}" in
7656 (*/ncurses.h|*/ncursesw.h)
7657 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7660 cf_term_header=term.h
7664 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7666 cat >"conftest.$ac_ext" <<_ACEOF
7667 #line 7667 "configure"
7668 #include "confdefs.h"
7670 #include <${cf_cv_ncurses_header:-curses.h}>
7676 int x = auto_left_margin; (void)x
7681 rm -f "conftest.$ac_objext"
7682 if { (eval echo "$as_me:7682: \"$ac_compile\"") >&5
7683 (eval $ac_compile) 2>&5
7685 echo "$as_me:7685: \$? = $ac_status" >&5
7686 (exit "$ac_status"); } &&
7687 { ac_try='test -s "conftest.$ac_objext"'
7688 { (eval echo "$as_me:7688: \"$ac_try\"") >&5
7691 echo "$as_me:7691: \$? = $ac_status" >&5
7692 (exit "$ac_status"); }; }; then
7694 cf_cv_term_header="$cf_test"
7696 echo "$as_me: failed program was:" >&5
7697 cat "conftest.$ac_ext" >&5
7699 cf_cv_term_header=unknown
7702 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7703 test "$cf_cv_term_header" != unknown && break
7707 echo "$as_me:7707: result: $cf_cv_term_header" >&5
7708 echo "${ECHO_T}$cf_cv_term_header" >&6
7710 # Set definitions to allow ifdef'ing to accommodate subdirectories
7712 case "$cf_cv_term_header" in
7715 cat >>confdefs.h <<\EOF
7716 #define HAVE_TERM_H 1
7722 case "$cf_cv_term_header" in
7725 cat >>confdefs.h <<\EOF
7726 #define HAVE_NCURSES_TERM_H 1
7732 cat >>confdefs.h <<\EOF
7733 #define HAVE_NCURSESW_TERM_H 1
7742 echo "$as_me:7742: result: no" >&5
7743 echo "${ECHO_T}no" >&6
7744 NCURSES_CONFIG_PKG=none
7747 NCURSES_CONFIG_PKG=none
7750 if test "x$cf_have_ncuconfig" = "xno"; then
7751 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7753 if test -n "$ac_tool_prefix"; then
7754 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7756 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7757 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7758 echo "$as_me:7758: checking for $ac_word" >&5
7759 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7760 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7761 echo $ECHO_N "(cached) $ECHO_C" >&6
7763 if test -n "$NCURSES_CONFIG"; then
7764 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7766 ac_save_IFS=$IFS; IFS=$ac_path_separator
7768 for ac_dir in $ac_dummy; do
7770 test -z "$ac_dir" && ac_dir=.
7771 $as_executable_p "$ac_dir/$ac_word" || continue
7772 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7773 echo "$as_me:7773: found $ac_dir/$ac_word" >&5
7779 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7780 if test -n "$NCURSES_CONFIG"; then
7781 echo "$as_me:7781: result: $NCURSES_CONFIG" >&5
7782 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7784 echo "$as_me:7784: result: no" >&5
7785 echo "${ECHO_T}no" >&6
7788 test -n "$NCURSES_CONFIG" && break
7791 if test -z "$NCURSES_CONFIG"; then
7792 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7793 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7795 # Extract the first word of "$ac_prog", so it can be a program name with args.
7796 set dummy $ac_prog; ac_word=$2
7797 echo "$as_me:7797: checking for $ac_word" >&5
7798 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7799 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7800 echo $ECHO_N "(cached) $ECHO_C" >&6
7802 if test -n "$ac_ct_NCURSES_CONFIG"; then
7803 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7805 ac_save_IFS=$IFS; IFS=$ac_path_separator
7807 for ac_dir in $ac_dummy; do
7809 test -z "$ac_dir" && ac_dir=.
7810 $as_executable_p "$ac_dir/$ac_word" || continue
7811 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7812 echo "$as_me:7812: found $ac_dir/$ac_word" >&5
7818 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7819 if test -n "$ac_ct_NCURSES_CONFIG"; then
7820 echo "$as_me:7820: result: $ac_ct_NCURSES_CONFIG" >&5
7821 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7823 echo "$as_me:7823: result: no" >&5
7824 echo "${ECHO_T}no" >&6
7827 test -n "$ac_ct_NCURSES_CONFIG" && break
7829 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7831 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7834 if test "$NCURSES_CONFIG" != none ; then
7836 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7838 case "x$cf_add_cflags" in
7841 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7844 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
7845 test "$CFLAGS" != "$cf_old_cflag" || break
7847 CFLAGS="$cf_old_cflag"
7850 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7853 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
7854 test "$CPPFLAGS" != "$cf_old_cflag" || break
7856 CPPFLAGS="$cf_old_cflag"
7865 cf_new_extra_cppflags=
7867 for cf_add_cflags in $cf_add_cflags
7869 case "$cf_fix_cppflags" in
7871 case "$cf_add_cflags" in
7872 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7873 case "$cf_add_cflags" in
7875 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7877 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7878 && test -z "${cf_tst_cflags}" \
7879 && cf_fix_cppflags=yes
7881 if test "$cf_fix_cppflags" = yes ; then
7883 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7884 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7887 elif test "${cf_tst_cflags}" = "\"'" ; then
7889 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7890 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7900 case "$cf_add_cflags" in
7902 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7904 CPPFLAGS=`echo "$CPPFLAGS" | \
7905 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7906 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7911 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7912 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7919 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7920 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7927 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7928 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7930 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7932 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7933 && test -z "${cf_tst_cflags}" \
7934 && cf_fix_cppflags=no
7939 if test -n "$cf_new_cflags" ; then
7941 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7942 CFLAGS="${CFLAGS}$cf_new_cflags"
7946 if test -n "$cf_new_cppflags" ; then
7948 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7949 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7953 if test -n "$cf_new_extra_cppflags" ; then
7955 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7956 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7965 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7967 for cf_add_1lib in $cf_add_0lib; do
7968 for cf_add_2lib in $cf_add_libs; do
7969 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7974 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7978 # even with config script, some packages use no-override for curses.h
7980 echo "$as_me:7980: checking if we have identified curses headers" >&5
7981 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7982 if test "${cf_cv_ncurses_header+set}" = set; then
7983 echo $ECHO_N "(cached) $ECHO_C" >&6
7986 cf_cv_ncurses_header=none
7988 ncurses.h ncursesw/ncurses.h \
7989 curses.h ncursesw/curses.h
7991 cat >"conftest.$ac_ext" <<_ACEOF
7992 #line 7992 "configure"
7993 #include "confdefs.h"
7994 #include <${cf_header}>
7998 initscr(); tgoto("?", 0,0)
8003 rm -f "conftest.$ac_objext"
8004 if { (eval echo "$as_me:8004: \"$ac_compile\"") >&5
8005 (eval $ac_compile) 2>&5
8007 echo "$as_me:8007: \$? = $ac_status" >&5
8008 (exit "$ac_status"); } &&
8009 { ac_try='test -s "conftest.$ac_objext"'
8010 { (eval echo "$as_me:8010: \"$ac_try\"") >&5
8013 echo "$as_me:8013: \$? = $ac_status" >&5
8014 (exit "$ac_status"); }; }; then
8015 cf_cv_ncurses_header=$cf_header; break
8017 echo "$as_me: failed program was:" >&5
8018 cat "conftest.$ac_ext" >&5
8020 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8024 echo "$as_me:8024: result: $cf_cv_ncurses_header" >&5
8025 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8027 if test "$cf_cv_ncurses_header" = none ; then
8028 { { echo "$as_me:8028: error: No curses header-files found" >&5
8029 echo "$as_me: error: No curses header-files found" >&2;}
8030 { (exit 1); exit 1; }; }
8033 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8035 for ac_header in $cf_cv_ncurses_header
8037 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8038 echo "$as_me:8038: checking for $ac_header" >&5
8039 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8040 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8041 echo $ECHO_N "(cached) $ECHO_C" >&6
8043 cat >"conftest.$ac_ext" <<_ACEOF
8044 #line 8044 "configure"
8045 #include "confdefs.h"
8046 #include <$ac_header>
8048 if { (eval echo "$as_me:8048: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8049 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8051 $EGREP -v '^ *\+' conftest.er1 >conftest.err
8053 cat conftest.err >&5
8054 echo "$as_me:8054: \$? = $ac_status" >&5
8055 (exit "$ac_status"); } >/dev/null; then
8056 if test -s conftest.err; then
8057 ac_cpp_err=$ac_c_preproc_warn_flag
8064 if test -z "$ac_cpp_err"; then
8065 eval "$as_ac_Header=yes"
8067 echo "$as_me: failed program was:" >&5
8068 cat "conftest.$ac_ext" >&5
8069 eval "$as_ac_Header=no"
8071 rm -f conftest.err "conftest.$ac_ext"
8073 echo "$as_me:8073: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8074 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8075 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8076 cat >>confdefs.h <<EOF
8077 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8083 cat >>confdefs.h <<\EOF
8087 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8089 cat >>confdefs.h <<EOF
8090 #define $cf_nculib_ROOT 1
8093 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
8097 cf_ncuhdr_root=ncursesw
8099 test -n "$cf_cv_curses_dir" && \
8100 test "$cf_cv_curses_dir" != "no" && { \
8102 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8103 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8105 while test "$cf_add_incdir" != /usr/include
8107 if test -d "$cf_add_incdir"
8110 if test -n "$CFLAGS$CPPFLAGS" ; then
8111 # a loop is needed to ensure we can add subdirs of existing dirs
8112 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8113 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8114 cf_have_incdir=yes; break
8119 if test "$cf_have_incdir" = no ; then
8120 if test "$cf_add_incdir" = /usr/local/include ; then
8121 if test "$GCC" = yes
8123 cf_save_CPPFLAGS=$CPPFLAGS
8125 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8126 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8128 cat >"conftest.$ac_ext" <<_ACEOF
8129 #line 8129 "configure"
8130 #include "confdefs.h"
8140 rm -f "conftest.$ac_objext"
8141 if { (eval echo "$as_me:8141: \"$ac_compile\"") >&5
8142 (eval $ac_compile) 2>&5
8144 echo "$as_me:8144: \$? = $ac_status" >&5
8145 (exit "$ac_status"); } &&
8146 { ac_try='test -s "conftest.$ac_objext"'
8147 { (eval echo "$as_me:8147: \"$ac_try\"") >&5
8150 echo "$as_me:8150: \$? = $ac_status" >&5
8151 (exit "$ac_status"); }; }; then
8154 echo "$as_me: failed program was:" >&5
8155 cat "conftest.$ac_ext" >&5
8158 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8159 CPPFLAGS=$cf_save_CPPFLAGS
8164 if test "$cf_have_incdir" = no ; then
8165 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8167 echo "${as_me:-configure}:8167: testing adding $cf_add_incdir to include-path ..." 1>&5
8169 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8171 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8172 test "$cf_top_incdir" = "$cf_add_incdir" && break
8173 cf_add_incdir="$cf_top_incdir"
8186 echo "$as_me:8186: checking for $cf_ncuhdr_root header in include-path" >&5
8187 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8188 if test "${cf_cv_ncurses_h+set}" = set; then
8189 echo $ECHO_N "(cached) $ECHO_C" >&6
8192 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8193 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
8194 for cf_header in $cf_header_list
8197 cat >"conftest.$ac_ext" <<_ACEOF
8198 #line 8198 "configure"
8199 #include "confdefs.h"
8201 #define _XOPEN_SOURCE_EXTENDED
8202 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
8203 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
8205 #include <$cf_header>
8210 #ifdef NCURSES_VERSION
8216 printf("%s\\n", NCURSES_VERSION);
8229 rm -f "conftest.$ac_objext"
8230 if { (eval echo "$as_me:8230: \"$ac_compile\"") >&5
8231 (eval $ac_compile) 2>&5
8233 echo "$as_me:8233: \$? = $ac_status" >&5
8234 (exit "$ac_status"); } &&
8235 { ac_try='test -s "conftest.$ac_objext"'
8236 { (eval echo "$as_me:8236: \"$ac_try\"") >&5
8239 echo "$as_me:8239: \$? = $ac_status" >&5
8240 (exit "$ac_status"); }; }; then
8241 cf_cv_ncurses_h=$cf_header
8244 echo "$as_me: failed program was:" >&5
8245 cat "conftest.$ac_ext" >&5
8248 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8250 test "$cf_cv_ncurses_h" != no && break
8254 echo "$as_me:8254: result: $cf_cv_ncurses_h" >&5
8255 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8257 if test "$cf_cv_ncurses_h" != no ; then
8258 cf_cv_ncurses_header=$cf_cv_ncurses_h
8261 echo "$as_me:8261: checking for $cf_ncuhdr_root include-path" >&5
8262 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8263 if test "${cf_cv_ncurses_h2+set}" = set; then
8264 echo $ECHO_N "(cached) $ECHO_C" >&6
8267 test -n "$verbose" && echo
8271 # collect the current set of include-directories from compiler flags
8272 cf_header_path_list=""
8273 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8274 for cf_header_path in $CPPFLAGS $CFLAGS
8276 case "$cf_header_path" in
8278 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8280 test "x$cf_header_path" != "xNONE" && \
8281 test -d "$cf_header_path" && \
8283 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8284 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8285 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8286 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8287 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8288 test -d "$cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8291 cf_header_path_list="$cf_header_path_list $cf_search"
8297 # add the variations for the package we are looking for
8301 test "x$prefix" != "xNONE" && \
8302 test -d "$prefix" && \
8304 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8305 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8306 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8307 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8308 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8309 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8312 for cf_subdir_prefix in \
8321 test "x$cf_subdir_prefix" != "x$prefix" && \
8322 test -d "$cf_subdir_prefix" && \
8323 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8324 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8325 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8326 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8327 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8328 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8329 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8334 test "$includedir" != NONE && \
8335 test "$includedir" != "/usr/include" && \
8336 test -d "$includedir" && {
8337 test -d "$includedir" && cf_search="$cf_search $includedir"
8338 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8341 test "$oldincludedir" != NONE && \
8342 test "$oldincludedir" != "/usr/include" && \
8343 test -d "$oldincludedir" && {
8344 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8345 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8348 cf_search="$cf_search $cf_header_path_list"
8350 test -n "$verbose" && echo "search path $cf_search"
8351 cf_save2_CPPFLAGS="$CPPFLAGS"
8352 for cf_incdir in $cf_search
8355 if test -n "$cf_incdir" ; then
8356 for cf_add_incdir in $cf_incdir
8358 while test "$cf_add_incdir" != /usr/include
8360 if test -d "$cf_add_incdir"
8363 if test -n "$CFLAGS$CPPFLAGS" ; then
8364 # a loop is needed to ensure we can add subdirs of existing dirs
8365 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8366 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8367 cf_have_incdir=yes; break
8372 if test "$cf_have_incdir" = no ; then
8373 if test "$cf_add_incdir" = /usr/local/include ; then
8374 if test "$GCC" = yes
8376 cf_save_CPPFLAGS=$CPPFLAGS
8378 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8379 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8381 cat >"conftest.$ac_ext" <<_ACEOF
8382 #line 8382 "configure"
8383 #include "confdefs.h"
8393 rm -f "conftest.$ac_objext"
8394 if { (eval echo "$as_me:8394: \"$ac_compile\"") >&5
8395 (eval $ac_compile) 2>&5
8397 echo "$as_me:8397: \$? = $ac_status" >&5
8398 (exit "$ac_status"); } &&
8399 { ac_try='test -s "conftest.$ac_objext"'
8400 { (eval echo "$as_me:8400: \"$ac_try\"") >&5
8403 echo "$as_me:8403: \$? = $ac_status" >&5
8404 (exit "$ac_status"); }; }; then
8407 echo "$as_me: failed program was:" >&5
8408 cat "conftest.$ac_ext" >&5
8411 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8412 CPPFLAGS=$cf_save_CPPFLAGS
8417 if test "$cf_have_incdir" = no ; then
8418 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8420 echo "${as_me:-configure}:8420: testing adding $cf_add_incdir to include-path ..." 1>&5
8422 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8424 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8425 test "$cf_top_incdir" = "$cf_add_incdir" && break
8426 cf_add_incdir="$cf_top_incdir"
8442 cat >"conftest.$ac_ext" <<_ACEOF
8443 #line 8443 "configure"
8444 #include "confdefs.h"
8446 #include <$cf_header>
8451 #ifdef NCURSES_VERSION
8453 printf("%s\\n", NCURSES_VERSION);
8466 rm -f "conftest.$ac_objext"
8467 if { (eval echo "$as_me:8467: \"$ac_compile\"") >&5
8468 (eval $ac_compile) 2>&5
8470 echo "$as_me:8470: \$? = $ac_status" >&5
8471 (exit "$ac_status"); } &&
8472 { ac_try='test -s "conftest.$ac_objext"'
8473 { (eval echo "$as_me:8473: \"$ac_try\"") >&5
8476 echo "$as_me:8476: \$? = $ac_status" >&5
8477 (exit "$ac_status"); }; }; then
8478 cf_cv_ncurses_h2=$cf_header
8481 echo "$as_me: failed program was:" >&5
8482 cat "conftest.$ac_ext" >&5
8485 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8487 if test "$cf_cv_ncurses_h2" != no ; then
8488 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8489 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
8492 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8494 CPPFLAGS="$cf_save2_CPPFLAGS"
8495 test "$cf_cv_ncurses_h2" != no && break
8497 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8497: error: not found" >&5
8498 echo "$as_me: error: not found" >&2;}
8499 { (exit 1); exit 1; }; }
8502 echo "$as_me:8502: result: $cf_cv_ncurses_h2" >&5
8503 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8505 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
8506 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
8507 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
8508 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
8511 if test -n "$cf_1st_incdir" ; then
8512 for cf_add_incdir in $cf_1st_incdir
8514 while test "$cf_add_incdir" != /usr/include
8516 if test -d "$cf_add_incdir"
8519 if test -n "$CFLAGS$CPPFLAGS" ; then
8520 # a loop is needed to ensure we can add subdirs of existing dirs
8521 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8522 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8523 cf_have_incdir=yes; break
8528 if test "$cf_have_incdir" = no ; then
8529 if test "$cf_add_incdir" = /usr/local/include ; then
8530 if test "$GCC" = yes
8532 cf_save_CPPFLAGS=$CPPFLAGS
8534 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8535 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8537 cat >"conftest.$ac_ext" <<_ACEOF
8538 #line 8538 "configure"
8539 #include "confdefs.h"
8549 rm -f "conftest.$ac_objext"
8550 if { (eval echo "$as_me:8550: \"$ac_compile\"") >&5
8551 (eval $ac_compile) 2>&5
8553 echo "$as_me:8553: \$? = $ac_status" >&5
8554 (exit "$ac_status"); } &&
8555 { ac_try='test -s "conftest.$ac_objext"'
8556 { (eval echo "$as_me:8556: \"$ac_try\"") >&5
8559 echo "$as_me:8559: \$? = $ac_status" >&5
8560 (exit "$ac_status"); }; }; then
8563 echo "$as_me: failed program was:" >&5
8564 cat "conftest.$ac_ext" >&5
8567 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8568 CPPFLAGS=$cf_save_CPPFLAGS
8573 if test "$cf_have_incdir" = no ; then
8574 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8576 echo "${as_me:-configure}:8576: testing adding $cf_add_incdir to include-path ..." 1>&5
8578 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8580 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8581 test "$cf_top_incdir" = "$cf_add_incdir" && break
8582 cf_add_incdir="$cf_top_incdir"
8595 # Set definitions to allow ifdef'ing for ncurses.h
8597 case "$cf_cv_ncurses_header" in
8600 cat >>confdefs.h <<\EOF
8601 #define HAVE_NCURSES_H 1
8607 case "$cf_cv_ncurses_header" in
8608 (ncurses/curses.h|ncurses/ncurses.h)
8610 cat >>confdefs.h <<\EOF
8611 #define HAVE_NCURSES_NCURSES_H 1
8615 (ncursesw/curses.h|ncursesw/ncurses.h)
8617 cat >>confdefs.h <<\EOF
8618 #define HAVE_NCURSESW_NCURSES_H 1
8624 echo "$as_me:8624: checking for terminfo header" >&5
8625 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8626 if test "${cf_cv_term_header+set}" = set; then
8627 echo $ECHO_N "(cached) $ECHO_C" >&6
8630 case "${cf_cv_ncurses_header}" in
8631 (*/ncurses.h|*/ncursesw.h)
8632 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8635 cf_term_header=term.h
8639 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8641 cat >"conftest.$ac_ext" <<_ACEOF
8642 #line 8642 "configure"
8643 #include "confdefs.h"
8645 #include <${cf_cv_ncurses_header:-curses.h}>
8651 int x = auto_left_margin; (void)x
8656 rm -f "conftest.$ac_objext"
8657 if { (eval echo "$as_me:8657: \"$ac_compile\"") >&5
8658 (eval $ac_compile) 2>&5
8660 echo "$as_me:8660: \$? = $ac_status" >&5
8661 (exit "$ac_status"); } &&
8662 { ac_try='test -s "conftest.$ac_objext"'
8663 { (eval echo "$as_me:8663: \"$ac_try\"") >&5
8666 echo "$as_me:8666: \$? = $ac_status" >&5
8667 (exit "$ac_status"); }; }; then
8669 cf_cv_term_header="$cf_test"
8671 echo "$as_me: failed program was:" >&5
8672 cat "conftest.$ac_ext" >&5
8674 cf_cv_term_header=unknown
8677 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8678 test "$cf_cv_term_header" != unknown && break
8682 echo "$as_me:8682: result: $cf_cv_term_header" >&5
8683 echo "${ECHO_T}$cf_cv_term_header" >&6
8685 # Set definitions to allow ifdef'ing to accommodate subdirectories
8687 case "$cf_cv_term_header" in
8690 cat >>confdefs.h <<\EOF
8691 #define HAVE_TERM_H 1
8697 case "$cf_cv_term_header" in
8700 cat >>confdefs.h <<\EOF
8701 #define HAVE_NCURSES_TERM_H 1
8707 cat >>confdefs.h <<\EOF
8708 #define HAVE_NCURSESW_TERM_H 1
8714 # some applications need this, but should check for NCURSES_VERSION
8716 cat >>confdefs.h <<\EOF
8720 echo "$as_me:8720: checking for ncurses version" >&5
8721 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8722 if test "${cf_cv_ncurses_version+set}" = set; then
8723 echo $ECHO_N "(cached) $ECHO_C" >&6
8726 cf_cv_ncurses_version=no
8728 rm -f "$cf_tempfile"
8729 if test "$cross_compiling" = yes; then
8731 # This will not work if the preprocessor splits the line after the
8732 # Autoconf token. The 'unproto' program does that.
8733 cat > "conftest.$ac_ext" <<EOF
8734 #include <${cf_cv_ncurses_header:-curses.h}>
8736 #ifdef NCURSES_VERSION
8737 Autoconf NCURSES_VERSION
8745 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8746 { (eval echo "$as_me:8746: \"$cf_try\"") >&5
8749 echo "$as_me:8749: \$? = $ac_status" >&5
8750 (exit "$ac_status"); }
8751 if test -f conftest.out ; then
8752 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
8753 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8758 cat >"conftest.$ac_ext" <<_ACEOF
8759 #line 8759 "configure"
8760 #include "confdefs.h"
8762 #include <${cf_cv_ncurses_header:-curses.h}>
8766 FILE *fp = fopen("$cf_tempfile", "w");
8767 #ifdef NCURSES_VERSION
8768 # ifdef NCURSES_VERSION_PATCH
8769 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8771 fprintf(fp, "%s\\n", NCURSES_VERSION);
8775 fprintf(fp, "old\\n");
8780 ${cf_cv_main_return:-return}(0);
8783 rm -f "conftest$ac_exeext"
8784 if { (eval echo "$as_me:8784: \"$ac_link\"") >&5
8785 (eval $ac_link) 2>&5
8787 echo "$as_me:8787: \$? = $ac_status" >&5
8788 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8789 { (eval echo "$as_me:8789: \"$ac_try\"") >&5
8792 echo "$as_me:8792: \$? = $ac_status" >&5
8793 (exit "$ac_status"); }; }; then
8795 cf_cv_ncurses_version=`cat $cf_tempfile`
8797 echo "$as_me: program exited with status $ac_status" >&5
8798 echo "$as_me: failed program was:" >&5
8799 cat "conftest.$ac_ext" >&5
8801 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8803 rm -f "$cf_tempfile"
8806 echo "$as_me:8806: result: $cf_cv_ncurses_version" >&5
8807 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8808 test "$cf_cv_ncurses_version" = no ||
8809 cat >>confdefs.h <<\EOF
8813 cf_nculib_root=ncursesw
8814 # This works, except for the special case where we find gpm, but
8815 # ncurses is in a nonstandard location via $LIBS, and we really want
8818 cf_ncurses_SAVE="$LIBS"
8819 echo "$as_me:8819: checking for Gpm_Open in -lgpm" >&5
8820 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8821 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8822 echo $ECHO_N "(cached) $ECHO_C" >&6
8824 ac_check_lib_save_LIBS=$LIBS
8826 cat >"conftest.$ac_ext" <<_ACEOF
8827 #line 8827 "configure"
8828 #include "confdefs.h"
8830 /* Override any gcc2 internal prototype to avoid an error. */
8834 /* We use char because int might match the return type of a gcc2
8835 builtin and then its argument prototype would still apply. */
8845 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8846 if { (eval echo "$as_me:8846: \"$ac_link\"") >&5
8847 (eval $ac_link) 2>&5
8849 echo "$as_me:8849: \$? = $ac_status" >&5
8850 (exit "$ac_status"); } &&
8851 { ac_try='test -s "conftest$ac_exeext"'
8852 { (eval echo "$as_me:8852: \"$ac_try\"") >&5
8855 echo "$as_me:8855: \$? = $ac_status" >&5
8856 (exit "$ac_status"); }; }; then
8857 ac_cv_lib_gpm_Gpm_Open=yes
8859 echo "$as_me: failed program was:" >&5
8860 cat "conftest.$ac_ext" >&5
8861 ac_cv_lib_gpm_Gpm_Open=no
8863 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8864 LIBS=$ac_check_lib_save_LIBS
8866 echo "$as_me:8866: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8867 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8868 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
8869 echo "$as_me:8869: checking for initscr in -lgpm" >&5
8870 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8871 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8872 echo $ECHO_N "(cached) $ECHO_C" >&6
8874 ac_check_lib_save_LIBS=$LIBS
8876 cat >"conftest.$ac_ext" <<_ACEOF
8877 #line 8877 "configure"
8878 #include "confdefs.h"
8880 /* Override any gcc2 internal prototype to avoid an error. */
8884 /* We use char because int might match the return type of a gcc2
8885 builtin and then its argument prototype would still apply. */
8895 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8896 if { (eval echo "$as_me:8896: \"$ac_link\"") >&5
8897 (eval $ac_link) 2>&5
8899 echo "$as_me:8899: \$? = $ac_status" >&5
8900 (exit "$ac_status"); } &&
8901 { ac_try='test -s "conftest$ac_exeext"'
8902 { (eval echo "$as_me:8902: \"$ac_try\"") >&5
8905 echo "$as_me:8905: \$? = $ac_status" >&5
8906 (exit "$ac_status"); }; }; then
8907 ac_cv_lib_gpm_initscr=yes
8909 echo "$as_me: failed program was:" >&5
8910 cat "conftest.$ac_ext" >&5
8911 ac_cv_lib_gpm_initscr=no
8913 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8914 LIBS=$ac_check_lib_save_LIBS
8916 echo "$as_me:8916: result: $ac_cv_lib_gpm_initscr" >&5
8917 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8918 if test "$ac_cv_lib_gpm_initscr" = yes; then
8919 LIBS="$cf_ncurses_SAVE"
8921 cf_ncurses_LIBS="-lgpm"
8928 # This is only necessary if you are linking against an obsolete
8929 # version of ncurses (but it should do no harm, since it is static).
8930 if test "$cf_nculib_root" = ncurses ; then
8931 echo "$as_me:8931: checking for tgoto in -lmytinfo" >&5
8932 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8933 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8934 echo $ECHO_N "(cached) $ECHO_C" >&6
8936 ac_check_lib_save_LIBS=$LIBS
8937 LIBS="-lmytinfo $LIBS"
8938 cat >"conftest.$ac_ext" <<_ACEOF
8939 #line 8939 "configure"
8940 #include "confdefs.h"
8942 /* Override any gcc2 internal prototype to avoid an error. */
8946 /* We use char because int might match the return type of a gcc2
8947 builtin and then its argument prototype would still apply. */
8957 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8958 if { (eval echo "$as_me:8958: \"$ac_link\"") >&5
8959 (eval $ac_link) 2>&5
8961 echo "$as_me:8961: \$? = $ac_status" >&5
8962 (exit "$ac_status"); } &&
8963 { ac_try='test -s "conftest$ac_exeext"'
8964 { (eval echo "$as_me:8964: \"$ac_try\"") >&5
8967 echo "$as_me:8967: \$? = $ac_status" >&5
8968 (exit "$ac_status"); }; }; then
8969 ac_cv_lib_mytinfo_tgoto=yes
8971 echo "$as_me: failed program was:" >&5
8972 cat "conftest.$ac_ext" >&5
8973 ac_cv_lib_mytinfo_tgoto=no
8975 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8976 LIBS=$ac_check_lib_save_LIBS
8978 echo "$as_me:8978: result: $ac_cv_lib_mytinfo_tgoto" >&5
8979 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8980 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
8981 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8991 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8993 for cf_add_1lib in $cf_add_0lib; do
8994 for cf_add_2lib in $cf_add_libs; do
8995 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9000 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9004 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
9010 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9012 for cf_add_1lib in $cf_add_0lib; do
9013 for cf_add_2lib in $cf_add_libs; do
9014 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9019 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9025 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
9027 echo "$as_me:9027: checking for initscr" >&5
9028 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9029 if test "${ac_cv_func_initscr+set}" = set; then
9030 echo $ECHO_N "(cached) $ECHO_C" >&6
9032 cat >"conftest.$ac_ext" <<_ACEOF
9033 #line 9033 "configure"
9034 #include "confdefs.h"
9035 #define initscr autoconf_temporary
9036 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9043 /* We use char because int might match the return type of a gcc2
9044 builtin and then its argument prototype would still apply. */
9045 char initscr (void);
9051 /* The GNU C library defines stubs for functions which it implements
9052 to always fail with ENOSYS. Some functions are actually named
9053 something starting with __ and the normal name is an alias. */
9054 #if defined (__stub_initscr) || defined (__stub___initscr)
9055 #error found stub for initscr
9063 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9064 if { (eval echo "$as_me:9064: \"$ac_link\"") >&5
9065 (eval $ac_link) 2>&5
9067 echo "$as_me:9067: \$? = $ac_status" >&5
9068 (exit "$ac_status"); } &&
9069 { ac_try='test -s "conftest$ac_exeext"'
9070 { (eval echo "$as_me:9070: \"$ac_try\"") >&5
9073 echo "$as_me:9073: \$? = $ac_status" >&5
9074 (exit "$ac_status"); }; }; then
9075 ac_cv_func_initscr=yes
9077 echo "$as_me: failed program was:" >&5
9078 cat "conftest.$ac_ext" >&5
9079 ac_cv_func_initscr=no
9081 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9083 echo "$as_me:9083: result: $ac_cv_func_initscr" >&5
9084 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9085 if test "$ac_cv_func_initscr" = yes; then
9086 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9089 cf_save_LIBS="$LIBS"
9090 echo "$as_me:9090: checking for initscr in -l$cf_nculib_root" >&5
9091 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9092 LIBS="-l$cf_nculib_root $LIBS"
9093 cat >"conftest.$ac_ext" <<_ACEOF
9094 #line 9094 "configure"
9095 #include "confdefs.h"
9096 #include <${cf_cv_ncurses_header:-curses.h}>
9105 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9106 if { (eval echo "$as_me:9106: \"$ac_link\"") >&5
9107 (eval $ac_link) 2>&5
9109 echo "$as_me:9109: \$? = $ac_status" >&5
9110 (exit "$ac_status"); } &&
9111 { ac_try='test -s "conftest$ac_exeext"'
9112 { (eval echo "$as_me:9112: \"$ac_try\"") >&5
9115 echo "$as_me:9115: \$? = $ac_status" >&5
9116 (exit "$ac_status"); }; }; then
9117 echo "$as_me:9117: result: yes" >&5
9118 echo "${ECHO_T}yes" >&6
9119 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9122 echo "$as_me: failed program was:" >&5
9123 cat "conftest.$ac_ext" >&5
9124 echo "$as_me:9124: result: no" >&5
9125 echo "${ECHO_T}no" >&6
9128 cf_library_path_list=""
9129 if test -n "${LDFLAGS}${LIBS}" ; then
9130 for cf_library_path in $LDFLAGS $LIBS
9132 case "$cf_library_path" in
9134 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9136 test "x$cf_library_path" != "xNONE" && \
9137 test -d "$cf_library_path" && \
9139 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9140 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
9141 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9142 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9143 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9144 test -d "$cf_library_path/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
9147 cf_library_path_list="$cf_library_path_list $cf_search"
9155 test "x$prefix" != "xNONE" && \
9156 test -d "$prefix" && \
9158 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9159 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
9160 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9161 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9162 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9163 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9166 for cf_subdir_prefix in \
9175 test "x$cf_subdir_prefix" != "x$prefix" && \
9176 test -d "$cf_subdir_prefix" && \
9177 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9178 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9179 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
9180 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9181 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9182 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9183 test -d "$cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
9188 cf_search="$cf_library_path_list $cf_search"
9190 for cf_libdir in $cf_search
9192 echo "$as_me:9192: checking for -l$cf_nculib_root in $cf_libdir" >&5
9193 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9194 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9195 cat >"conftest.$ac_ext" <<_ACEOF
9196 #line 9196 "configure"
9197 #include "confdefs.h"
9198 #include <${cf_cv_ncurses_header:-curses.h}>
9207 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9208 if { (eval echo "$as_me:9208: \"$ac_link\"") >&5
9209 (eval $ac_link) 2>&5
9211 echo "$as_me:9211: \$? = $ac_status" >&5
9212 (exit "$ac_status"); } &&
9213 { ac_try='test -s "conftest$ac_exeext"'
9214 { (eval echo "$as_me:9214: \"$ac_try\"") >&5
9217 echo "$as_me:9217: \$? = $ac_status" >&5
9218 (exit "$ac_status"); }; }; then
9219 echo "$as_me:9219: result: yes" >&5
9220 echo "${ECHO_T}yes" >&6
9221 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9224 echo "$as_me: failed program was:" >&5
9225 cat "conftest.$ac_ext" >&5
9226 echo "$as_me:9226: result: no" >&5
9227 echo "${ECHO_T}no" >&6
9228 LIBS="$cf_save_LIBS"
9230 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9234 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9238 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
9240 if test "$cf_found_library" = no ; then
9241 { { echo "$as_me:9241: error: Cannot link $cf_nculib_root library" >&5
9242 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9243 { (exit 1); exit 1; }; }
9248 if test -n "$cf_ncurses_LIBS" ; then
9249 echo "$as_me:9249: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9250 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9251 cf_ncurses_SAVE="$LIBS"
9252 for p in $cf_ncurses_LIBS ; do
9253 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
9254 if test "$q" != "$LIBS" ; then
9258 cat >"conftest.$ac_ext" <<_ACEOF
9259 #line 9259 "configure"
9260 #include "confdefs.h"
9261 #include <${cf_cv_ncurses_header:-curses.h}>
9265 initscr(); mousemask(0,0); tigetstr((char *)0);
9270 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9271 if { (eval echo "$as_me:9271: \"$ac_link\"") >&5
9272 (eval $ac_link) 2>&5
9274 echo "$as_me:9274: \$? = $ac_status" >&5
9275 (exit "$ac_status"); } &&
9276 { ac_try='test -s "conftest$ac_exeext"'
9277 { (eval echo "$as_me:9277: \"$ac_try\"") >&5
9280 echo "$as_me:9280: \$? = $ac_status" >&5
9281 (exit "$ac_status"); }; }; then
9282 echo "$as_me:9282: result: yes" >&5
9283 echo "${ECHO_T}yes" >&6
9285 echo "$as_me: failed program was:" >&5
9286 cat "conftest.$ac_ext" >&5
9287 echo "$as_me:9287: result: no" >&5
9288 echo "${ECHO_T}no" >&6
9289 LIBS="$cf_ncurses_SAVE"
9291 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9294 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9296 cat >>confdefs.h <<EOF
9297 #define $cf_nculib_ROOT 1
9307 cf_ncuconfig_root=ncurses
9308 cf_have_ncuconfig=no
9310 if test "x${PKG_CONFIG:=none}" != xnone; then
9311 echo "$as_me:9311: checking pkg-config for $cf_ncuconfig_root" >&5
9312 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9313 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9314 echo "$as_me:9314: result: yes" >&5
9315 echo "${ECHO_T}yes" >&6
9317 echo "$as_me:9317: checking if the $cf_ncuconfig_root package files work" >&5
9318 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9319 cf_have_ncuconfig=unknown
9321 cf_save_CFLAGS="$CFLAGS"
9322 cf_save_CPPFLAGS="$CPPFLAGS"
9323 cf_save_LIBS="$LIBS"
9325 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
9326 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9328 # while -W for passing linker flags is prevalent, it is not "standard".
9329 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9330 # incompatible _and_ non-standard -W option which gives an error. Work
9331 # around that pitfall.
9332 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9338 cf_new_extra_cppflags=
9340 for cf_add_cflags in $cf_pkg_cflags
9342 case "$cf_fix_cppflags" in
9344 case "$cf_add_cflags" in
9345 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9346 case "$cf_add_cflags" in
9348 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9350 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9351 && test -z "${cf_tst_cflags}" \
9352 && cf_fix_cppflags=yes
9354 if test "$cf_fix_cppflags" = yes ; then
9356 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9357 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9360 elif test "${cf_tst_cflags}" = "\"'" ; then
9362 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9363 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9373 case "$cf_add_cflags" in
9375 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9377 CPPFLAGS=`echo "$CPPFLAGS" | \
9378 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9379 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9384 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9385 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9392 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9393 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9400 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9401 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9403 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9405 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9406 && test -z "${cf_tst_cflags}" \
9407 && cf_fix_cppflags=no
9412 if test -n "$cf_new_cflags" ; then
9414 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9415 CFLAGS="${CFLAGS}$cf_new_cflags"
9419 if test -n "$cf_new_cppflags" ; then
9421 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9422 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9426 if test -n "$cf_new_extra_cppflags" ; then
9428 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9429 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9436 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9438 for cf_add_1lib in $cf_add_0lib; do
9439 for cf_add_2lib in $cf_add_libs; do
9440 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9445 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9449 cat >"conftest.$ac_ext" <<_ACEOF
9450 #line 9450 "configure"
9451 #include "confdefs.h"
9452 #include <${cf_cv_ncurses_header:-curses.h}>
9456 initscr(); mousemask(0,0); tigetstr((char *)0);
9461 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9462 if { (eval echo "$as_me:9462: \"$ac_link\"") >&5
9463 (eval $ac_link) 2>&5
9465 echo "$as_me:9465: \$? = $ac_status" >&5
9466 (exit "$ac_status"); } &&
9467 { ac_try='test -s "conftest$ac_exeext"'
9468 { (eval echo "$as_me:9468: \"$ac_try\"") >&5
9471 echo "$as_me:9471: \$? = $ac_status" >&5
9472 (exit "$ac_status"); }; }; then
9473 if test "$cross_compiling" = yes; then
9474 cf_test_ncuconfig=maybe
9476 cat >"conftest.$ac_ext" <<_ACEOF
9477 #line 9477 "configure"
9478 #include "confdefs.h"
9479 #include <${cf_cv_ncurses_header:-curses.h}>
9481 { const char *xx = curses_version(); return (xx == 0); }
9483 rm -f "conftest$ac_exeext"
9484 if { (eval echo "$as_me:9484: \"$ac_link\"") >&5
9485 (eval $ac_link) 2>&5
9487 echo "$as_me:9487: \$? = $ac_status" >&5
9488 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9489 { (eval echo "$as_me:9489: \"$ac_try\"") >&5
9492 echo "$as_me:9492: \$? = $ac_status" >&5
9493 (exit "$ac_status"); }; }; then
9494 cf_test_ncuconfig=yes
9496 echo "$as_me: program exited with status $ac_status" >&5
9497 echo "$as_me: failed program was:" >&5
9498 cat "conftest.$ac_ext" >&5
9499 cf_test_ncuconfig=no
9501 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9504 echo "$as_me: failed program was:" >&5
9505 cat "conftest.$ac_ext" >&5
9506 cf_test_ncuconfig=no
9508 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9510 CFLAGS="$cf_save_CFLAGS"
9511 CPPFLAGS="$cf_save_CPPFLAGS"
9512 LIBS="$cf_save_LIBS"
9514 if test "x$cf_test_ncuconfig" != xyes; then
9515 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9516 cf_pkg_cflags="$cf_temp"
9517 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9518 cf_pkg_libs="$cf_temp"
9523 for cf_add_cflags in $cf_pkg_cflags
9525 case "x$cf_add_cflags" in
9528 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9531 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
9532 test "$CFLAGS" != "$cf_old_cflag" || break
9534 CFLAGS="$cf_old_cflag"
9537 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9540 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
9541 test "$CPPFLAGS" != "$cf_old_cflag" || break
9543 CPPFLAGS="$cf_old_cflag"
9552 cf_new_extra_cppflags=
9554 for cf_add_cflags in $cf_add_cflags
9556 case "$cf_fix_cppflags" in
9558 case "$cf_add_cflags" in
9559 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9560 case "$cf_add_cflags" in
9562 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9564 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9565 && test -z "${cf_tst_cflags}" \
9566 && cf_fix_cppflags=yes
9568 if test "$cf_fix_cppflags" = yes ; then
9570 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9571 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9574 elif test "${cf_tst_cflags}" = "\"'" ; then
9576 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9577 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9587 case "$cf_add_cflags" in
9589 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9591 CPPFLAGS=`echo "$CPPFLAGS" | \
9592 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9593 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9598 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9599 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9606 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9607 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9614 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9615 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9617 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9619 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9620 && test -z "${cf_tst_cflags}" \
9621 && cf_fix_cppflags=no
9626 if test -n "$cf_new_cflags" ; then
9628 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9629 CFLAGS="${CFLAGS}$cf_new_cflags"
9633 if test -n "$cf_new_cppflags" ; then
9635 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9636 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9640 if test -n "$cf_new_extra_cppflags" ; then
9642 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9643 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9652 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9654 for cf_add_1lib in $cf_add_0lib; do
9655 for cf_add_2lib in $cf_add_libs; do
9656 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9661 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9665 cat >"conftest.$ac_ext" <<_ACEOF
9666 #line 9666 "configure"
9667 #include "confdefs.h"
9668 #include <${cf_cv_ncurses_header:-curses.h}>
9672 initscr(); mousemask(0,0); tigetstr((char *)0);
9677 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9678 if { (eval echo "$as_me:9678: \"$ac_link\"") >&5
9679 (eval $ac_link) 2>&5
9681 echo "$as_me:9681: \$? = $ac_status" >&5
9682 (exit "$ac_status"); } &&
9683 { ac_try='test -s "conftest$ac_exeext"'
9684 { (eval echo "$as_me:9684: \"$ac_try\"") >&5
9687 echo "$as_me:9687: \$? = $ac_status" >&5
9688 (exit "$ac_status"); }; }; then
9689 if test "$cross_compiling" = yes; then
9690 cf_have_ncuconfig=maybe
9692 cat >"conftest.$ac_ext" <<_ACEOF
9693 #line 9693 "configure"
9694 #include "confdefs.h"
9695 #include <${cf_cv_ncurses_header:-curses.h}>
9697 { const char *xx = curses_version(); return (xx == 0); }
9699 rm -f "conftest$ac_exeext"
9700 if { (eval echo "$as_me:9700: \"$ac_link\"") >&5
9701 (eval $ac_link) 2>&5
9703 echo "$as_me:9703: \$? = $ac_status" >&5
9704 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9705 { (eval echo "$as_me:9705: \"$ac_try\"") >&5
9708 echo "$as_me:9708: \$? = $ac_status" >&5
9709 (exit "$ac_status"); }; }; then
9710 cf_have_ncuconfig=yes
9712 echo "$as_me: program exited with status $ac_status" >&5
9713 echo "$as_me: failed program was:" >&5
9714 cat "conftest.$ac_ext" >&5
9715 cf_have_ncuconfig=no
9717 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9720 echo "$as_me: failed program was:" >&5
9721 cat "conftest.$ac_ext" >&5
9722 cf_have_ncuconfig=no
9724 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9725 echo "$as_me:9725: result: $cf_have_ncuconfig" >&5
9726 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9727 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9728 if test "$cf_have_ncuconfig" != "yes"
9730 CPPFLAGS="$cf_save_CPPFLAGS"
9731 LIBS="$cf_save_LIBS"
9732 NCURSES_CONFIG_PKG=none
9735 cat >>confdefs.h <<\EOF
9739 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9741 echo "$as_me:9741: checking for terminfo header" >&5
9742 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9743 if test "${cf_cv_term_header+set}" = set; then
9744 echo $ECHO_N "(cached) $ECHO_C" >&6
9747 case "${cf_cv_ncurses_header}" in
9748 (*/ncurses.h|*/ncursesw.h)
9749 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9752 cf_term_header=term.h
9756 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9758 cat >"conftest.$ac_ext" <<_ACEOF
9759 #line 9759 "configure"
9760 #include "confdefs.h"
9762 #include <${cf_cv_ncurses_header:-curses.h}>
9768 int x = auto_left_margin; (void)x
9773 rm -f "conftest.$ac_objext"
9774 if { (eval echo "$as_me:9774: \"$ac_compile\"") >&5
9775 (eval $ac_compile) 2>&5
9777 echo "$as_me:9777: \$? = $ac_status" >&5
9778 (exit "$ac_status"); } &&
9779 { ac_try='test -s "conftest.$ac_objext"'
9780 { (eval echo "$as_me:9780: \"$ac_try\"") >&5
9783 echo "$as_me:9783: \$? = $ac_status" >&5
9784 (exit "$ac_status"); }; }; then
9786 cf_cv_term_header="$cf_test"
9788 echo "$as_me: failed program was:" >&5
9789 cat "conftest.$ac_ext" >&5
9791 cf_cv_term_header=unknown
9794 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9795 test "$cf_cv_term_header" != unknown && break
9799 echo "$as_me:9799: result: $cf_cv_term_header" >&5
9800 echo "${ECHO_T}$cf_cv_term_header" >&6
9802 # Set definitions to allow ifdef'ing to accommodate subdirectories
9804 case "$cf_cv_term_header" in
9807 cat >>confdefs.h <<\EOF
9808 #define HAVE_TERM_H 1
9814 case "$cf_cv_term_header" in
9817 cat >>confdefs.h <<\EOF
9818 #define HAVE_NCURSES_TERM_H 1
9824 cat >>confdefs.h <<\EOF
9825 #define HAVE_NCURSESW_TERM_H 1
9834 echo "$as_me:9834: result: no" >&5
9835 echo "${ECHO_T}no" >&6
9836 NCURSES_CONFIG_PKG=none
9839 NCURSES_CONFIG_PKG=none
9842 if test "x$cf_have_ncuconfig" = "xno"; then
9843 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9845 if test -n "$ac_tool_prefix"; then
9846 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9848 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9849 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9850 echo "$as_me:9850: checking for $ac_word" >&5
9851 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9852 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9853 echo $ECHO_N "(cached) $ECHO_C" >&6
9855 if test -n "$NCURSES_CONFIG"; then
9856 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9858 ac_save_IFS=$IFS; IFS=$ac_path_separator
9860 for ac_dir in $ac_dummy; do
9862 test -z "$ac_dir" && ac_dir=.
9863 $as_executable_p "$ac_dir/$ac_word" || continue
9864 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9865 echo "$as_me:9865: found $ac_dir/$ac_word" >&5
9871 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9872 if test -n "$NCURSES_CONFIG"; then
9873 echo "$as_me:9873: result: $NCURSES_CONFIG" >&5
9874 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9876 echo "$as_me:9876: result: no" >&5
9877 echo "${ECHO_T}no" >&6
9880 test -n "$NCURSES_CONFIG" && break
9883 if test -z "$NCURSES_CONFIG"; then
9884 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9885 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9887 # Extract the first word of "$ac_prog", so it can be a program name with args.
9888 set dummy $ac_prog; ac_word=$2
9889 echo "$as_me:9889: checking for $ac_word" >&5
9890 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9891 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9892 echo $ECHO_N "(cached) $ECHO_C" >&6
9894 if test -n "$ac_ct_NCURSES_CONFIG"; then
9895 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9897 ac_save_IFS=$IFS; IFS=$ac_path_separator
9899 for ac_dir in $ac_dummy; do
9901 test -z "$ac_dir" && ac_dir=.
9902 $as_executable_p "$ac_dir/$ac_word" || continue
9903 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9904 echo "$as_me:9904: found $ac_dir/$ac_word" >&5
9910 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9911 if test -n "$ac_ct_NCURSES_CONFIG"; then
9912 echo "$as_me:9912: result: $ac_ct_NCURSES_CONFIG" >&5
9913 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9915 echo "$as_me:9915: result: no" >&5
9916 echo "${ECHO_T}no" >&6
9919 test -n "$ac_ct_NCURSES_CONFIG" && break
9921 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9923 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9926 if test "$NCURSES_CONFIG" != none ; then
9928 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9930 case "x$cf_add_cflags" in
9933 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9936 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
9937 test "$CFLAGS" != "$cf_old_cflag" || break
9939 CFLAGS="$cf_old_cflag"
9942 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9945 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
9946 test "$CPPFLAGS" != "$cf_old_cflag" || break
9948 CPPFLAGS="$cf_old_cflag"
9957 cf_new_extra_cppflags=
9959 for cf_add_cflags in $cf_add_cflags
9961 case "$cf_fix_cppflags" in
9963 case "$cf_add_cflags" in
9964 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9965 case "$cf_add_cflags" in
9967 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9969 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9970 && test -z "${cf_tst_cflags}" \
9971 && cf_fix_cppflags=yes
9973 if test "$cf_fix_cppflags" = yes ; then
9975 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9976 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9979 elif test "${cf_tst_cflags}" = "\"'" ; then
9981 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9982 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9992 case "$cf_add_cflags" in
9994 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9996 CPPFLAGS=`echo "$CPPFLAGS" | \
9997 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9998 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10003 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10004 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10011 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10012 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10019 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10020 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10022 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10024 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10025 && test -z "${cf_tst_cflags}" \
10026 && cf_fix_cppflags=no
10031 if test -n "$cf_new_cflags" ; then
10033 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10034 CFLAGS="${CFLAGS}$cf_new_cflags"
10038 if test -n "$cf_new_cppflags" ; then
10040 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10041 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10045 if test -n "$cf_new_extra_cppflags" ; then
10047 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10048 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10054 cf_add_libs="$LIBS"
10057 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10058 # filter duplicates
10059 for cf_add_1lib in $cf_add_0lib; do
10060 for cf_add_2lib in $cf_add_libs; do
10061 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10066 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10068 LIBS="$cf_add_libs"
10070 # even with config script, some packages use no-override for curses.h
10072 echo "$as_me:10072: checking if we have identified curses headers" >&5
10073 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10074 if test "${cf_cv_ncurses_header+set}" = set; then
10075 echo $ECHO_N "(cached) $ECHO_C" >&6
10078 cf_cv_ncurses_header=none
10080 ncurses.h ncurses/ncurses.h \
10081 curses.h ncurses/curses.h
10083 cat >"conftest.$ac_ext" <<_ACEOF
10084 #line 10084 "configure"
10085 #include "confdefs.h"
10086 #include <${cf_header}>
10090 initscr(); tgoto("?", 0,0)
10095 rm -f "conftest.$ac_objext"
10096 if { (eval echo "$as_me:10096: \"$ac_compile\"") >&5
10097 (eval $ac_compile) 2>&5
10099 echo "$as_me:10099: \$? = $ac_status" >&5
10100 (exit "$ac_status"); } &&
10101 { ac_try='test -s "conftest.$ac_objext"'
10102 { (eval echo "$as_me:10102: \"$ac_try\"") >&5
10103 (eval $ac_try) 2>&5
10105 echo "$as_me:10105: \$? = $ac_status" >&5
10106 (exit "$ac_status"); }; }; then
10107 cf_cv_ncurses_header=$cf_header; break
10109 echo "$as_me: failed program was:" >&5
10110 cat "conftest.$ac_ext" >&5
10112 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10116 echo "$as_me:10116: result: $cf_cv_ncurses_header" >&5
10117 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10119 if test "$cf_cv_ncurses_header" = none ; then
10120 { { echo "$as_me:10120: error: No curses header-files found" >&5
10121 echo "$as_me: error: No curses header-files found" >&2;}
10122 { (exit 1); exit 1; }; }
10125 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10127 for ac_header in $cf_cv_ncurses_header
10129 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10130 echo "$as_me:10130: checking for $ac_header" >&5
10131 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10132 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10133 echo $ECHO_N "(cached) $ECHO_C" >&6
10135 cat >"conftest.$ac_ext" <<_ACEOF
10136 #line 10136 "configure"
10137 #include "confdefs.h"
10138 #include <$ac_header>
10140 if { (eval echo "$as_me:10140: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10141 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10143 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10145 cat conftest.err >&5
10146 echo "$as_me:10146: \$? = $ac_status" >&5
10147 (exit "$ac_status"); } >/dev/null; then
10148 if test -s conftest.err; then
10149 ac_cpp_err=$ac_c_preproc_warn_flag
10156 if test -z "$ac_cpp_err"; then
10157 eval "$as_ac_Header=yes"
10159 echo "$as_me: failed program was:" >&5
10160 cat "conftest.$ac_ext" >&5
10161 eval "$as_ac_Header=no"
10163 rm -f conftest.err "conftest.$ac_ext"
10165 echo "$as_me:10165: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10166 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10167 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10168 cat >>confdefs.h <<EOF
10169 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10175 cat >>confdefs.h <<\EOF
10179 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10181 cat >>confdefs.h <<EOF
10182 #define $cf_nculib_ROOT 1
10185 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
10189 cf_ncuhdr_root=ncurses
10191 test -n "$cf_cv_curses_dir" && \
10192 test "$cf_cv_curses_dir" != "no" && { \
10194 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
10195 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
10197 while test "$cf_add_incdir" != /usr/include
10199 if test -d "$cf_add_incdir"
10202 if test -n "$CFLAGS$CPPFLAGS" ; then
10203 # a loop is needed to ensure we can add subdirs of existing dirs
10204 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10205 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10206 cf_have_incdir=yes; break
10211 if test "$cf_have_incdir" = no ; then
10212 if test "$cf_add_incdir" = /usr/local/include ; then
10213 if test "$GCC" = yes
10215 cf_save_CPPFLAGS=$CPPFLAGS
10217 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10218 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10220 cat >"conftest.$ac_ext" <<_ACEOF
10221 #line 10221 "configure"
10222 #include "confdefs.h"
10232 rm -f "conftest.$ac_objext"
10233 if { (eval echo "$as_me:10233: \"$ac_compile\"") >&5
10234 (eval $ac_compile) 2>&5
10236 echo "$as_me:10236: \$? = $ac_status" >&5
10237 (exit "$ac_status"); } &&
10238 { ac_try='test -s "conftest.$ac_objext"'
10239 { (eval echo "$as_me:10239: \"$ac_try\"") >&5
10240 (eval $ac_try) 2>&5
10242 echo "$as_me:10242: \$? = $ac_status" >&5
10243 (exit "$ac_status"); }; }; then
10246 echo "$as_me: failed program was:" >&5
10247 cat "conftest.$ac_ext" >&5
10250 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10251 CPPFLAGS=$cf_save_CPPFLAGS
10256 if test "$cf_have_incdir" = no ; then
10257 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10259 echo "${as_me:-configure}:10259: testing adding $cf_add_incdir to include-path ..." 1>&5
10261 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10263 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10264 test "$cf_top_incdir" = "$cf_add_incdir" && break
10265 cf_add_incdir="$cf_top_incdir"
10278 echo "$as_me:10278: checking for $cf_ncuhdr_root header in include-path" >&5
10279 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10280 if test "${cf_cv_ncurses_h+set}" = set; then
10281 echo $ECHO_N "(cached) $ECHO_C" >&6
10284 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10285 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
10286 for cf_header in $cf_header_list
10289 cat >"conftest.$ac_ext" <<_ACEOF
10290 #line 10290 "configure"
10291 #include "confdefs.h"
10293 #include <$cf_header>
10298 #ifdef NCURSES_VERSION
10300 printf("%s\\n", NCURSES_VERSION);
10313 rm -f "conftest.$ac_objext"
10314 if { (eval echo "$as_me:10314: \"$ac_compile\"") >&5
10315 (eval $ac_compile) 2>&5
10317 echo "$as_me:10317: \$? = $ac_status" >&5
10318 (exit "$ac_status"); } &&
10319 { ac_try='test -s "conftest.$ac_objext"'
10320 { (eval echo "$as_me:10320: \"$ac_try\"") >&5
10321 (eval $ac_try) 2>&5
10323 echo "$as_me:10323: \$? = $ac_status" >&5
10324 (exit "$ac_status"); }; }; then
10325 cf_cv_ncurses_h=$cf_header
10328 echo "$as_me: failed program was:" >&5
10329 cat "conftest.$ac_ext" >&5
10332 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10334 test "$cf_cv_ncurses_h" != no && break
10338 echo "$as_me:10338: result: $cf_cv_ncurses_h" >&5
10339 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10341 if test "$cf_cv_ncurses_h" != no ; then
10342 cf_cv_ncurses_header=$cf_cv_ncurses_h
10345 echo "$as_me:10345: checking for $cf_ncuhdr_root include-path" >&5
10346 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10347 if test "${cf_cv_ncurses_h2+set}" = set; then
10348 echo $ECHO_N "(cached) $ECHO_C" >&6
10351 test -n "$verbose" && echo
10355 # collect the current set of include-directories from compiler flags
10356 cf_header_path_list=""
10357 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10358 for cf_header_path in $CPPFLAGS $CFLAGS
10360 case "$cf_header_path" in
10362 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10364 test "x$cf_header_path" != "xNONE" && \
10365 test -d "$cf_header_path" && \
10367 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10368 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
10369 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10370 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10371 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10372 test -d "$cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10375 cf_header_path_list="$cf_header_path_list $cf_search"
10381 # add the variations for the package we are looking for
10385 test "x$prefix" != "xNONE" && \
10386 test -d "$prefix" && \
10388 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10389 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
10390 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10391 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10392 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10393 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10396 for cf_subdir_prefix in \
10405 test "x$cf_subdir_prefix" != "x$prefix" && \
10406 test -d "$cf_subdir_prefix" && \
10407 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10408 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10409 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
10410 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10411 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10412 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10413 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10418 test "$includedir" != NONE && \
10419 test "$includedir" != "/usr/include" && \
10420 test -d "$includedir" && {
10421 test -d "$includedir" && cf_search="$cf_search $includedir"
10422 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10425 test "$oldincludedir" != NONE && \
10426 test "$oldincludedir" != "/usr/include" && \
10427 test -d "$oldincludedir" && {
10428 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
10429 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10432 cf_search="$cf_search $cf_header_path_list"
10434 test -n "$verbose" && echo "search path $cf_search"
10435 cf_save2_CPPFLAGS="$CPPFLAGS"
10436 for cf_incdir in $cf_search
10439 if test -n "$cf_incdir" ; then
10440 for cf_add_incdir in $cf_incdir
10442 while test "$cf_add_incdir" != /usr/include
10444 if test -d "$cf_add_incdir"
10447 if test -n "$CFLAGS$CPPFLAGS" ; then
10448 # a loop is needed to ensure we can add subdirs of existing dirs
10449 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10450 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10451 cf_have_incdir=yes; break
10456 if test "$cf_have_incdir" = no ; then
10457 if test "$cf_add_incdir" = /usr/local/include ; then
10458 if test "$GCC" = yes
10460 cf_save_CPPFLAGS=$CPPFLAGS
10462 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10463 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10465 cat >"conftest.$ac_ext" <<_ACEOF
10466 #line 10466 "configure"
10467 #include "confdefs.h"
10477 rm -f "conftest.$ac_objext"
10478 if { (eval echo "$as_me:10478: \"$ac_compile\"") >&5
10479 (eval $ac_compile) 2>&5
10481 echo "$as_me:10481: \$? = $ac_status" >&5
10482 (exit "$ac_status"); } &&
10483 { ac_try='test -s "conftest.$ac_objext"'
10484 { (eval echo "$as_me:10484: \"$ac_try\"") >&5
10485 (eval $ac_try) 2>&5
10487 echo "$as_me:10487: \$? = $ac_status" >&5
10488 (exit "$ac_status"); }; }; then
10491 echo "$as_me: failed program was:" >&5
10492 cat "conftest.$ac_ext" >&5
10495 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10496 CPPFLAGS=$cf_save_CPPFLAGS
10501 if test "$cf_have_incdir" = no ; then
10502 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10504 echo "${as_me:-configure}:10504: testing adding $cf_add_incdir to include-path ..." 1>&5
10506 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10508 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10509 test "$cf_top_incdir" = "$cf_add_incdir" && break
10510 cf_add_incdir="$cf_top_incdir"
10526 cat >"conftest.$ac_ext" <<_ACEOF
10527 #line 10527 "configure"
10528 #include "confdefs.h"
10530 #include <$cf_header>
10535 #ifdef NCURSES_VERSION
10537 printf("%s\\n", NCURSES_VERSION);
10550 rm -f "conftest.$ac_objext"
10551 if { (eval echo "$as_me:10551: \"$ac_compile\"") >&5
10552 (eval $ac_compile) 2>&5
10554 echo "$as_me:10554: \$? = $ac_status" >&5
10555 (exit "$ac_status"); } &&
10556 { ac_try='test -s "conftest.$ac_objext"'
10557 { (eval echo "$as_me:10557: \"$ac_try\"") >&5
10558 (eval $ac_try) 2>&5
10560 echo "$as_me:10560: \$? = $ac_status" >&5
10561 (exit "$ac_status"); }; }; then
10562 cf_cv_ncurses_h2=$cf_header
10565 echo "$as_me: failed program was:" >&5
10566 cat "conftest.$ac_ext" >&5
10567 cf_cv_ncurses_h2=no
10569 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10571 if test "$cf_cv_ncurses_h2" != no ; then
10572 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10573 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
10576 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10578 CPPFLAGS="$cf_save2_CPPFLAGS"
10579 test "$cf_cv_ncurses_h2" != no && break
10581 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10581: error: not found" >&5
10582 echo "$as_me: error: not found" >&2;}
10583 { (exit 1); exit 1; }; }
10586 echo "$as_me:10586: result: $cf_cv_ncurses_h2" >&5
10587 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10589 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
10590 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
10591 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
10592 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
10595 if test -n "$cf_1st_incdir" ; then
10596 for cf_add_incdir in $cf_1st_incdir
10598 while test "$cf_add_incdir" != /usr/include
10600 if test -d "$cf_add_incdir"
10603 if test -n "$CFLAGS$CPPFLAGS" ; then
10604 # a loop is needed to ensure we can add subdirs of existing dirs
10605 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10606 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10607 cf_have_incdir=yes; break
10612 if test "$cf_have_incdir" = no ; then
10613 if test "$cf_add_incdir" = /usr/local/include ; then
10614 if test "$GCC" = yes
10616 cf_save_CPPFLAGS=$CPPFLAGS
10618 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10619 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10621 cat >"conftest.$ac_ext" <<_ACEOF
10622 #line 10622 "configure"
10623 #include "confdefs.h"
10633 rm -f "conftest.$ac_objext"
10634 if { (eval echo "$as_me:10634: \"$ac_compile\"") >&5
10635 (eval $ac_compile) 2>&5
10637 echo "$as_me:10637: \$? = $ac_status" >&5
10638 (exit "$ac_status"); } &&
10639 { ac_try='test -s "conftest.$ac_objext"'
10640 { (eval echo "$as_me:10640: \"$ac_try\"") >&5
10641 (eval $ac_try) 2>&5
10643 echo "$as_me:10643: \$? = $ac_status" >&5
10644 (exit "$ac_status"); }; }; then
10647 echo "$as_me: failed program was:" >&5
10648 cat "conftest.$ac_ext" >&5
10651 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10652 CPPFLAGS=$cf_save_CPPFLAGS
10657 if test "$cf_have_incdir" = no ; then
10658 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10660 echo "${as_me:-configure}:10660: testing adding $cf_add_incdir to include-path ..." 1>&5
10662 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10664 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10665 test "$cf_top_incdir" = "$cf_add_incdir" && break
10666 cf_add_incdir="$cf_top_incdir"
10679 # Set definitions to allow ifdef'ing for ncurses.h
10681 case "$cf_cv_ncurses_header" in
10684 cat >>confdefs.h <<\EOF
10685 #define HAVE_NCURSES_H 1
10691 case "$cf_cv_ncurses_header" in
10692 (ncurses/curses.h|ncurses/ncurses.h)
10694 cat >>confdefs.h <<\EOF
10695 #define HAVE_NCURSES_NCURSES_H 1
10699 (ncursesw/curses.h|ncursesw/ncurses.h)
10701 cat >>confdefs.h <<\EOF
10702 #define HAVE_NCURSESW_NCURSES_H 1
10708 echo "$as_me:10708: checking for terminfo header" >&5
10709 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10710 if test "${cf_cv_term_header+set}" = set; then
10711 echo $ECHO_N "(cached) $ECHO_C" >&6
10714 case "${cf_cv_ncurses_header}" in
10715 (*/ncurses.h|*/ncursesw.h)
10716 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10719 cf_term_header=term.h
10723 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10725 cat >"conftest.$ac_ext" <<_ACEOF
10726 #line 10726 "configure"
10727 #include "confdefs.h"
10729 #include <${cf_cv_ncurses_header:-curses.h}>
10730 #include <$cf_test>
10735 int x = auto_left_margin; (void)x
10740 rm -f "conftest.$ac_objext"
10741 if { (eval echo "$as_me:10741: \"$ac_compile\"") >&5
10742 (eval $ac_compile) 2>&5
10744 echo "$as_me:10744: \$? = $ac_status" >&5
10745 (exit "$ac_status"); } &&
10746 { ac_try='test -s "conftest.$ac_objext"'
10747 { (eval echo "$as_me:10747: \"$ac_try\"") >&5
10748 (eval $ac_try) 2>&5
10750 echo "$as_me:10750: \$? = $ac_status" >&5
10751 (exit "$ac_status"); }; }; then
10753 cf_cv_term_header="$cf_test"
10755 echo "$as_me: failed program was:" >&5
10756 cat "conftest.$ac_ext" >&5
10758 cf_cv_term_header=unknown
10761 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10762 test "$cf_cv_term_header" != unknown && break
10766 echo "$as_me:10766: result: $cf_cv_term_header" >&5
10767 echo "${ECHO_T}$cf_cv_term_header" >&6
10769 # Set definitions to allow ifdef'ing to accommodate subdirectories
10771 case "$cf_cv_term_header" in
10774 cat >>confdefs.h <<\EOF
10775 #define HAVE_TERM_H 1
10781 case "$cf_cv_term_header" in
10784 cat >>confdefs.h <<\EOF
10785 #define HAVE_NCURSES_TERM_H 1
10791 cat >>confdefs.h <<\EOF
10792 #define HAVE_NCURSESW_TERM_H 1
10798 # some applications need this, but should check for NCURSES_VERSION
10800 cat >>confdefs.h <<\EOF
10804 echo "$as_me:10804: checking for ncurses version" >&5
10805 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10806 if test "${cf_cv_ncurses_version+set}" = set; then
10807 echo $ECHO_N "(cached) $ECHO_C" >&6
10810 cf_cv_ncurses_version=no
10812 rm -f "$cf_tempfile"
10813 if test "$cross_compiling" = yes; then
10815 # This will not work if the preprocessor splits the line after the
10816 # Autoconf token. The 'unproto' program does that.
10817 cat > "conftest.$ac_ext" <<EOF
10818 #include <${cf_cv_ncurses_header:-curses.h}>
10820 #ifdef NCURSES_VERSION
10821 Autoconf NCURSES_VERSION
10829 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10830 { (eval echo "$as_me:10830: \"$cf_try\"") >&5
10831 (eval $cf_try) 2>&5
10833 echo "$as_me:10833: \$? = $ac_status" >&5
10834 (exit "$ac_status"); }
10835 if test -f conftest.out ; then
10836 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
10837 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10842 cat >"conftest.$ac_ext" <<_ACEOF
10843 #line 10843 "configure"
10844 #include "confdefs.h"
10846 #include <${cf_cv_ncurses_header:-curses.h}>
10850 FILE *fp = fopen("$cf_tempfile", "w");
10851 #ifdef NCURSES_VERSION
10852 # ifdef NCURSES_VERSION_PATCH
10853 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10855 fprintf(fp, "%s\\n", NCURSES_VERSION);
10858 # ifdef __NCURSES_H
10859 fprintf(fp, "old\\n");
10864 ${cf_cv_main_return:-return}(0);
10867 rm -f "conftest$ac_exeext"
10868 if { (eval echo "$as_me:10868: \"$ac_link\"") >&5
10869 (eval $ac_link) 2>&5
10871 echo "$as_me:10871: \$? = $ac_status" >&5
10872 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10873 { (eval echo "$as_me:10873: \"$ac_try\"") >&5
10874 (eval $ac_try) 2>&5
10876 echo "$as_me:10876: \$? = $ac_status" >&5
10877 (exit "$ac_status"); }; }; then
10879 cf_cv_ncurses_version=`cat $cf_tempfile`
10881 echo "$as_me: program exited with status $ac_status" >&5
10882 echo "$as_me: failed program was:" >&5
10883 cat "conftest.$ac_ext" >&5
10885 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10887 rm -f "$cf_tempfile"
10890 echo "$as_me:10890: result: $cf_cv_ncurses_version" >&5
10891 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10892 test "$cf_cv_ncurses_version" = no ||
10893 cat >>confdefs.h <<\EOF
10897 cf_nculib_root=ncurses
10898 # This works, except for the special case where we find gpm, but
10899 # ncurses is in a nonstandard location via $LIBS, and we really want
10902 cf_ncurses_SAVE="$LIBS"
10903 echo "$as_me:10903: checking for Gpm_Open in -lgpm" >&5
10904 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10905 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10906 echo $ECHO_N "(cached) $ECHO_C" >&6
10908 ac_check_lib_save_LIBS=$LIBS
10910 cat >"conftest.$ac_ext" <<_ACEOF
10911 #line 10911 "configure"
10912 #include "confdefs.h"
10914 /* Override any gcc2 internal prototype to avoid an error. */
10918 /* We use char because int might match the return type of a gcc2
10919 builtin and then its argument prototype would still apply. */
10929 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10930 if { (eval echo "$as_me:10930: \"$ac_link\"") >&5
10931 (eval $ac_link) 2>&5
10933 echo "$as_me:10933: \$? = $ac_status" >&5
10934 (exit "$ac_status"); } &&
10935 { ac_try='test -s "conftest$ac_exeext"'
10936 { (eval echo "$as_me:10936: \"$ac_try\"") >&5
10937 (eval $ac_try) 2>&5
10939 echo "$as_me:10939: \$? = $ac_status" >&5
10940 (exit "$ac_status"); }; }; then
10941 ac_cv_lib_gpm_Gpm_Open=yes
10943 echo "$as_me: failed program was:" >&5
10944 cat "conftest.$ac_ext" >&5
10945 ac_cv_lib_gpm_Gpm_Open=no
10947 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10948 LIBS=$ac_check_lib_save_LIBS
10950 echo "$as_me:10950: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10951 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
10952 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
10953 echo "$as_me:10953: checking for initscr in -lgpm" >&5
10954 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
10955 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
10956 echo $ECHO_N "(cached) $ECHO_C" >&6
10958 ac_check_lib_save_LIBS=$LIBS
10960 cat >"conftest.$ac_ext" <<_ACEOF
10961 #line 10961 "configure"
10962 #include "confdefs.h"
10964 /* Override any gcc2 internal prototype to avoid an error. */
10968 /* We use char because int might match the return type of a gcc2
10969 builtin and then its argument prototype would still apply. */
10979 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10980 if { (eval echo "$as_me:10980: \"$ac_link\"") >&5
10981 (eval $ac_link) 2>&5
10983 echo "$as_me:10983: \$? = $ac_status" >&5
10984 (exit "$ac_status"); } &&
10985 { ac_try='test -s "conftest$ac_exeext"'
10986 { (eval echo "$as_me:10986: \"$ac_try\"") >&5
10987 (eval $ac_try) 2>&5
10989 echo "$as_me:10989: \$? = $ac_status" >&5
10990 (exit "$ac_status"); }; }; then
10991 ac_cv_lib_gpm_initscr=yes
10993 echo "$as_me: failed program was:" >&5
10994 cat "conftest.$ac_ext" >&5
10995 ac_cv_lib_gpm_initscr=no
10997 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10998 LIBS=$ac_check_lib_save_LIBS
11000 echo "$as_me:11000: result: $ac_cv_lib_gpm_initscr" >&5
11001 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
11002 if test "$ac_cv_lib_gpm_initscr" = yes; then
11003 LIBS="$cf_ncurses_SAVE"
11005 cf_ncurses_LIBS="-lgpm"
11012 # This is only necessary if you are linking against an obsolete
11013 # version of ncurses (but it should do no harm, since it is static).
11014 if test "$cf_nculib_root" = ncurses ; then
11015 echo "$as_me:11015: checking for tgoto in -lmytinfo" >&5
11016 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
11017 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
11018 echo $ECHO_N "(cached) $ECHO_C" >&6
11020 ac_check_lib_save_LIBS=$LIBS
11021 LIBS="-lmytinfo $LIBS"
11022 cat >"conftest.$ac_ext" <<_ACEOF
11023 #line 11023 "configure"
11024 #include "confdefs.h"
11026 /* Override any gcc2 internal prototype to avoid an error. */
11030 /* We use char because int might match the return type of a gcc2
11031 builtin and then its argument prototype would still apply. */
11041 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11042 if { (eval echo "$as_me:11042: \"$ac_link\"") >&5
11043 (eval $ac_link) 2>&5
11045 echo "$as_me:11045: \$? = $ac_status" >&5
11046 (exit "$ac_status"); } &&
11047 { ac_try='test -s "conftest$ac_exeext"'
11048 { (eval echo "$as_me:11048: \"$ac_try\"") >&5
11049 (eval $ac_try) 2>&5
11051 echo "$as_me:11051: \$? = $ac_status" >&5
11052 (exit "$ac_status"); }; }; then
11053 ac_cv_lib_mytinfo_tgoto=yes
11055 echo "$as_me: failed program was:" >&5
11056 cat "conftest.$ac_ext" >&5
11057 ac_cv_lib_mytinfo_tgoto=no
11059 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11060 LIBS=$ac_check_lib_save_LIBS
11062 echo "$as_me:11062: result: $ac_cv_lib_mytinfo_tgoto" >&5
11063 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11064 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
11065 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
11072 cf_add_libs="$LIBS"
11075 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11076 # filter duplicates
11077 for cf_add_1lib in $cf_add_0lib; do
11078 for cf_add_2lib in $cf_add_libs; do
11079 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11084 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11086 LIBS="$cf_add_libs"
11088 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
11091 cf_add_libs="$LIBS"
11094 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11095 # filter duplicates
11096 for cf_add_1lib in $cf_add_0lib; do
11097 for cf_add_2lib in $cf_add_libs; do
11098 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11103 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11105 LIBS="$cf_add_libs"
11109 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
11111 echo "$as_me:11111: checking for initscr" >&5
11112 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
11113 if test "${ac_cv_func_initscr+set}" = set; then
11114 echo $ECHO_N "(cached) $ECHO_C" >&6
11116 cat >"conftest.$ac_ext" <<_ACEOF
11117 #line 11117 "configure"
11118 #include "confdefs.h"
11119 #define initscr autoconf_temporary
11120 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11127 /* We use char because int might match the return type of a gcc2
11128 builtin and then its argument prototype would still apply. */
11129 char initscr (void);
11135 /* The GNU C library defines stubs for functions which it implements
11136 to always fail with ENOSYS. Some functions are actually named
11137 something starting with __ and the normal name is an alias. */
11138 #if defined (__stub_initscr) || defined (__stub___initscr)
11139 #error found stub for initscr
11147 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11148 if { (eval echo "$as_me:11148: \"$ac_link\"") >&5
11149 (eval $ac_link) 2>&5
11151 echo "$as_me:11151: \$? = $ac_status" >&5
11152 (exit "$ac_status"); } &&
11153 { ac_try='test -s "conftest$ac_exeext"'
11154 { (eval echo "$as_me:11154: \"$ac_try\"") >&5
11155 (eval $ac_try) 2>&5
11157 echo "$as_me:11157: \$? = $ac_status" >&5
11158 (exit "$ac_status"); }; }; then
11159 ac_cv_func_initscr=yes
11161 echo "$as_me: failed program was:" >&5
11162 cat "conftest.$ac_ext" >&5
11163 ac_cv_func_initscr=no
11165 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11167 echo "$as_me:11167: result: $ac_cv_func_initscr" >&5
11168 echo "${ECHO_T}$ac_cv_func_initscr" >&6
11169 if test "$ac_cv_func_initscr" = yes; then
11170 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11173 cf_save_LIBS="$LIBS"
11174 echo "$as_me:11174: checking for initscr in -l$cf_nculib_root" >&5
11175 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
11176 LIBS="-l$cf_nculib_root $LIBS"
11177 cat >"conftest.$ac_ext" <<_ACEOF
11178 #line 11178 "configure"
11179 #include "confdefs.h"
11180 #include <${cf_cv_ncurses_header:-curses.h}>
11189 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11190 if { (eval echo "$as_me:11190: \"$ac_link\"") >&5
11191 (eval $ac_link) 2>&5
11193 echo "$as_me:11193: \$? = $ac_status" >&5
11194 (exit "$ac_status"); } &&
11195 { ac_try='test -s "conftest$ac_exeext"'
11196 { (eval echo "$as_me:11196: \"$ac_try\"") >&5
11197 (eval $ac_try) 2>&5
11199 echo "$as_me:11199: \$? = $ac_status" >&5
11200 (exit "$ac_status"); }; }; then
11201 echo "$as_me:11201: result: yes" >&5
11202 echo "${ECHO_T}yes" >&6
11203 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11206 echo "$as_me: failed program was:" >&5
11207 cat "conftest.$ac_ext" >&5
11208 echo "$as_me:11208: result: no" >&5
11209 echo "${ECHO_T}no" >&6
11212 cf_library_path_list=""
11213 if test -n "${LDFLAGS}${LIBS}" ; then
11214 for cf_library_path in $LDFLAGS $LIBS
11216 case "$cf_library_path" in
11218 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11220 test "x$cf_library_path" != "xNONE" && \
11221 test -d "$cf_library_path" && \
11223 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11224 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
11225 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11226 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11227 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11228 test -d "$cf_library_path/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
11231 cf_library_path_list="$cf_library_path_list $cf_search"
11239 test "x$prefix" != "xNONE" && \
11240 test -d "$prefix" && \
11242 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11243 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
11244 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11245 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11246 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11247 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11250 for cf_subdir_prefix in \
11259 test "x$cf_subdir_prefix" != "x$prefix" && \
11260 test -d "$cf_subdir_prefix" && \
11261 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11262 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11263 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
11264 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11265 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11266 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11267 test -d "$cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
11272 cf_search="$cf_library_path_list $cf_search"
11274 for cf_libdir in $cf_search
11276 echo "$as_me:11276: checking for -l$cf_nculib_root in $cf_libdir" >&5
11277 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11278 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11279 cat >"conftest.$ac_ext" <<_ACEOF
11280 #line 11280 "configure"
11281 #include "confdefs.h"
11282 #include <${cf_cv_ncurses_header:-curses.h}>
11291 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11292 if { (eval echo "$as_me:11292: \"$ac_link\"") >&5
11293 (eval $ac_link) 2>&5
11295 echo "$as_me:11295: \$? = $ac_status" >&5
11296 (exit "$ac_status"); } &&
11297 { ac_try='test -s "conftest$ac_exeext"'
11298 { (eval echo "$as_me:11298: \"$ac_try\"") >&5
11299 (eval $ac_try) 2>&5
11301 echo "$as_me:11301: \$? = $ac_status" >&5
11302 (exit "$ac_status"); }; }; then
11303 echo "$as_me:11303: result: yes" >&5
11304 echo "${ECHO_T}yes" >&6
11305 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11308 echo "$as_me: failed program was:" >&5
11309 cat "conftest.$ac_ext" >&5
11310 echo "$as_me:11310: result: no" >&5
11311 echo "${ECHO_T}no" >&6
11312 LIBS="$cf_save_LIBS"
11314 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11318 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11322 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
11324 if test "$cf_found_library" = no ; then
11325 { { echo "$as_me:11325: error: Cannot link $cf_nculib_root library" >&5
11326 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11327 { (exit 1); exit 1; }; }
11332 if test -n "$cf_ncurses_LIBS" ; then
11333 echo "$as_me:11333: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11334 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11335 cf_ncurses_SAVE="$LIBS"
11336 for p in $cf_ncurses_LIBS ; do
11337 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
11338 if test "$q" != "$LIBS" ; then
11342 cat >"conftest.$ac_ext" <<_ACEOF
11343 #line 11343 "configure"
11344 #include "confdefs.h"
11345 #include <${cf_cv_ncurses_header:-curses.h}>
11349 initscr(); mousemask(0,0); tigetstr((char *)0);
11354 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11355 if { (eval echo "$as_me:11355: \"$ac_link\"") >&5
11356 (eval $ac_link) 2>&5
11358 echo "$as_me:11358: \$? = $ac_status" >&5
11359 (exit "$ac_status"); } &&
11360 { ac_try='test -s "conftest$ac_exeext"'
11361 { (eval echo "$as_me:11361: \"$ac_try\"") >&5
11362 (eval $ac_try) 2>&5
11364 echo "$as_me:11364: \$? = $ac_status" >&5
11365 (exit "$ac_status"); }; }; then
11366 echo "$as_me:11366: result: yes" >&5
11367 echo "${ECHO_T}yes" >&6
11369 echo "$as_me: failed program was:" >&5
11370 cat "conftest.$ac_ext" >&5
11371 echo "$as_me:11371: result: no" >&5
11372 echo "${ECHO_T}no" >&6
11373 LIBS="$cf_ncurses_SAVE"
11375 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11378 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11380 cat >>confdefs.h <<EOF
11381 #define $cf_nculib_ROOT 1
11386 NCURSES_CONFIG=none
11391 if test "$NCURSES_CONFIG_PKG" != none ; then
11392 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
11394 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11395 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11396 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11398 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
11399 if test -z "$cf_cv_abi_version"
11401 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
11404 elif test "$NCURSES_CONFIG" != none ; then
11406 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
11408 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11409 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11410 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11412 # ABI version is not available from headers
11413 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
11417 for cf_name in MAJOR MINOR PATCH
11419 cat >conftest.$ac_ext <<CF_EOF
11420 #include <${cf_cv_ncurses_header:-curses.h}>
11421 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
11423 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
11424 { (eval echo "$as_me:11424: \"$cf_try\"") >&5
11425 (eval $cf_try) 2>&5
11427 echo "$as_me:11427: \$? = $ac_status" >&5
11428 (exit "$ac_status"); }
11429 if test -f conftest.out ; then
11430 cf_result=`sed -e "s/^.*AUTOCONF_${cf_name}[ ][ ]*//" conftest.out`
11431 eval NCURSES_$cf_name=\"$cf_result\"
11432 # cat conftest.$ac_ext
11437 cf_cv_abi_version=${NCURSES_MAJOR}
11441 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
11443 cf_cv_timestamp=`date`
11445 echo "$as_me:11445: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
11446 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
11448 echo "$as_me:11448: checking if you want to have a library-prefix" >&5
11449 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
11451 # Check whether --with-lib-prefix or --without-lib-prefix was given.
11452 if test "${with_lib_prefix+set}" = set; then
11453 withval="$with_lib_prefix"
11454 with_lib_prefix=$withval
11456 with_lib_prefix=auto
11458 echo "$as_me:11458: result: $with_lib_prefix" >&5
11459 echo "${ECHO_T}$with_lib_prefix" >&6
11461 if test "$with_lib_prefix" = auto
11464 case "$cf_cv_system_name" in
11466 if test "$DFT_LWR_MODEL" = libtool; then
11475 (*) LIB_PREFIX='lib'
11478 cf_prefix=$LIB_PREFIX
11480 elif test "$with_lib_prefix" = no
11484 LIB_PREFIX=$with_lib_prefix
11489 ###############################################################################
11491 if test X"$CC_G_OPT" = X"" ; then
11493 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
11496 echo "$as_me:11496: checking for default loader flags" >&5
11497 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
11498 case $DFT_LWR_MODEL in
11499 (normal) LD_MODEL='' ;;
11500 (debug) LD_MODEL=$CC_G_OPT ;;
11501 (profile) LD_MODEL='-pg';;
11502 (shared) LD_MODEL='' ;;
11504 echo "$as_me:11504: result: $LD_MODEL" >&5
11505 echo "${ECHO_T}$LD_MODEL" >&6
11508 if test "x$cf_cv_enable_rpath" != xno
11510 echo "$as_me:11510: checking for an rpath option" >&5
11511 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
11512 case "$cf_cv_system_name" in
11514 if test "$GCC" = yes; then
11515 LD_RPATH_OPT="-Wl,-rpath,"
11517 LD_RPATH_OPT="-rpath "
11520 (linux*|gnu*|k*bsd*-gnu|freebsd*)
11521 LD_RPATH_OPT="-Wl,-rpath,"
11523 (openbsd[2-9].*|mirbsd*)
11524 LD_RPATH_OPT="-Wl,-rpath,"
11527 LD_RPATH_OPT="-rpath "
11530 LD_RPATH_OPT="-Wl,-rpath,"
11533 LD_RPATH_OPT="-rpath "
11541 echo "$as_me:11541: result: $LD_RPATH_OPT" >&5
11542 echo "${ECHO_T}$LD_RPATH_OPT" >&6
11544 case "x$LD_RPATH_OPT" in
11546 echo "$as_me:11546: checking if we need a space after rpath option" >&5
11547 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
11548 cf_save_LIBS="$LIBS"
11550 cf_add_libs="$LIBS"
11553 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11554 # filter duplicates
11555 for cf_add_1lib in $cf_add_0lib; do
11556 for cf_add_2lib in $cf_add_libs; do
11557 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11562 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11564 LIBS="$cf_add_libs"
11566 cat >"conftest.$ac_ext" <<_ACEOF
11567 #line 11567 "configure"
11568 #include "confdefs.h"
11578 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11579 if { (eval echo "$as_me:11579: \"$ac_link\"") >&5
11580 (eval $ac_link) 2>&5
11582 echo "$as_me:11582: \$? = $ac_status" >&5
11583 (exit "$ac_status"); } &&
11584 { ac_try='test -s "conftest$ac_exeext"'
11585 { (eval echo "$as_me:11585: \"$ac_try\"") >&5
11586 (eval $ac_try) 2>&5
11588 echo "$as_me:11588: \$? = $ac_status" >&5
11589 (exit "$ac_status"); }; }; then
11592 echo "$as_me: failed program was:" >&5
11593 cat "conftest.$ac_ext" >&5
11596 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11597 LIBS="$cf_save_LIBS"
11598 echo "$as_me:11598: result: $cf_rpath_space" >&5
11599 echo "${ECHO_T}$cf_rpath_space" >&6
11600 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
11609 INSTALL_LIB="-m 644"
11610 : ${rel_builddir:=.}
11616 cf_cv_do_symlinks=no
11618 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
11620 echo "$as_me:11620: checking if release/abi version should be used for shared libs" >&5
11621 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
11623 # Check whether --with-shlib-version or --without-shlib-version was given.
11624 if test "${with_shlib_version+set}" = set; then
11625 withval="$with_shlib_version"
11626 test -z "$withval" && withval=auto
11629 cf_cv_shlib_version=auto
11632 cf_cv_shlib_version=$withval
11635 echo "$as_me:11635: result: $withval" >&5
11636 echo "${ECHO_T}$withval" >&6
11637 { { echo "$as_me:11637: error: option value must be one of: rel, abi, or auto" >&5
11638 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
11639 { (exit 1); exit 1; }; }
11644 cf_cv_shlib_version=auto
11646 echo "$as_me:11646: result: $cf_cv_shlib_version" >&5
11647 echo "${ECHO_T}$cf_cv_shlib_version" >&6
11649 cf_cv_rm_so_locs=no
11652 # Some less-capable ports of gcc support only -fpic
11656 if test "$GCC" = yes
11660 case "$cf_cv_system_name" in
11661 (*linux*) # e.g., PGI compiler
11667 if test "$cf_try_fPIC" = yes
11669 echo "$as_me:11669: checking which $CC option to use" >&5
11670 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
11671 cf_save_CFLAGS="$CFLAGS"
11672 for CC_SHARED_OPTS in -fPIC -fpic ''
11674 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
11675 cat >"conftest.$ac_ext" <<_ACEOF
11676 #line 11676 "configure"
11677 #include "confdefs.h"
11687 rm -f "conftest.$ac_objext"
11688 if { (eval echo "$as_me:11688: \"$ac_compile\"") >&5
11689 (eval $ac_compile) 2>&5
11691 echo "$as_me:11691: \$? = $ac_status" >&5
11692 (exit "$ac_status"); } &&
11693 { ac_try='test -s "conftest.$ac_objext"'
11694 { (eval echo "$as_me:11694: \"$ac_try\"") >&5
11695 (eval $ac_try) 2>&5
11697 echo "$as_me:11697: \$? = $ac_status" >&5
11698 (exit "$ac_status"); }; }; then
11701 echo "$as_me: failed program was:" >&5
11702 cat "conftest.$ac_ext" >&5
11704 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11706 echo "$as_me:11706: result: $CC_SHARED_OPTS" >&5
11707 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
11708 CFLAGS="$cf_save_CFLAGS"
11711 cf_cv_shlib_version_infix=no
11713 case "$cf_cv_system_name" in
11714 (aix4.3-9*|aix[5-7]*)
11715 if test "$GCC" = yes; then
11716 CC_SHARED_OPTS='-Wl,-brtl'
11717 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11719 CC_SHARED_OPTS='-brtl'
11720 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
11721 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11725 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
11729 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11730 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11731 cf_cv_shlib_version=cygdll
11732 cf_cv_shlib_version_infix=cygdll
11735 cat >mk_shared_lib.sh <<-CF_EOF
11738 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11741 Linking shared library
11742 ** SHARED_LIB \$SHARED_LIB
11743 ** IMPORT_LIB \$IMPORT_LIB
11745 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11747 chmod +x mk_shared_lib.sh
11751 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11752 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11753 cf_cv_shlib_version=msysdll
11754 cf_cv_shlib_version_infix=msysdll
11757 cat >mk_shared_lib.sh <<-CF_EOF
11760 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11763 Linking shared library
11764 ** SHARED_LIB \$SHARED_LIB
11765 ** IMPORT_LIB \$IMPORT_LIB
11767 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11769 chmod +x mk_shared_lib.sh
11772 cf_try_cflags="no-cpp-precomp"
11773 CC_SHARED_OPTS="-dynamic"
11774 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
11775 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
11776 cf_cv_shlib_version_infix=yes
11777 echo "$as_me:11777: checking if ld -search_paths_first works" >&5
11778 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
11779 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
11780 echo $ECHO_N "(cached) $ECHO_C" >&6
11783 cf_save_LDFLAGS=$LDFLAGS
11784 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11785 cat >"conftest.$ac_ext" <<_ACEOF
11786 #line 11786 "configure"
11787 #include "confdefs.h"
11797 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11798 if { (eval echo "$as_me:11798: \"$ac_link\"") >&5
11799 (eval $ac_link) 2>&5
11801 echo "$as_me:11801: \$? = $ac_status" >&5
11802 (exit "$ac_status"); } &&
11803 { ac_try='test -s "conftest$ac_exeext"'
11804 { (eval echo "$as_me:11804: \"$ac_try\"") >&5
11805 (eval $ac_try) 2>&5
11807 echo "$as_me:11807: \$? = $ac_status" >&5
11808 (exit "$ac_status"); }; }; then
11809 cf_cv_ldflags_search_paths_first=yes
11811 echo "$as_me: failed program was:" >&5
11812 cat "conftest.$ac_ext" >&5
11813 cf_cv_ldflags_search_paths_first=no
11815 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11816 LDFLAGS=$cf_save_LDFLAGS
11818 echo "$as_me:11818: result: $cf_cv_ldflags_search_paths_first" >&5
11819 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
11820 if test "$cf_cv_ldflags_search_paths_first" = yes; then
11821 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11826 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11827 if test "$cf_cv_shlib_version" = rel; then
11828 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11830 cf_cv_shared_soname='`basename $@`'
11833 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11836 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
11837 if test "$GCC" != yes; then
11838 CC_SHARED_OPTS='+Z'
11840 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
11841 INSTALL_LIB="-m 555"
11844 # (tested with gcc 2.7.2 -- I don't have c89)
11845 if test "$GCC" = yes; then
11846 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
11848 CC_SHARED_OPTS='+Z'
11849 LD_SHARED_OPTS='-Wl,+b,${libdir}'
11851 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
11852 # HP-UX shared libraries must be executable, and should be
11853 # readonly to exploit a quirk in the memory manager.
11854 INSTALL_LIB="-m 555"
11857 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11858 if test "$cf_cv_shlib_version" = rel; then
11859 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11861 cf_shared_soname='`basename $@`'
11864 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
11867 if test "$cf_cv_enable_rpath" = yes ; then
11868 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11870 # tested with IRIX 5.2 and 'cc'.
11871 if test "$GCC" != yes; then
11872 CC_SHARED_OPTS='-KPIC'
11873 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
11875 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
11877 cf_cv_rm_so_locs=yes
11879 (linux*|gnu*|k*bsd*-gnu)
11880 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11881 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11882 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11884 if test "$cf_cv_enable_rpath" = yes ; then
11885 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11888 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11889 if test "$cf_cv_shlib_version" = rel; then
11890 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11892 cf_cv_shared_soname='`basename $@`'
11895 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11898 cf_cv_shlib_version=msvcdll
11899 cf_cv_shlib_version_infix=msvcdll
11902 if test "$DFT_LWR_MODEL" = "shared" ; then
11903 LOCAL_LDFLAGS="-link -dll"
11904 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11905 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
11908 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
11909 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
11910 cat >mk_shared_lib.sh <<-CF_EOF
11913 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
11918 Linking shared library
11919 ** SHARED LIB \$SHARED_LIB
11920 ** IMPORT_LIB \$IMPORT_LIB
11922 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
11923 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
11924 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
11926 chmod +x mk_shared_lib.sh
11927 cat >mk_prog.sh <<-CF_EOF
11930 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
11933 ldopts=("/subsystem:console")
11936 while test \$# -gt 0; do
11939 # ignore -link argument
11942 # ignore runtime-library option
11957 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
11960 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
11966 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
11967 ldopts+=("\${linkarg}")
11975 ldopts+=("-out:\$1")
11984 if [ "\$isdll" -ne 0 ]; then
11985 for lib in \${libs[*]}; do
11986 ldopts+=("\$lib.dll.lib")
11989 for lib in \${libs[*]}; do
11990 ldopts+=("\$lib.lib")
11995 ** ld options: "\${ldopts[@]}"
11997 exec \$LD \${ldopts[@]}
11999 chmod +x mk_prog.sh
12000 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
12001 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
12004 cf_cv_shlib_version=mingw
12005 cf_cv_shlib_version_infix=mingw
12008 if test "$DFT_LWR_MODEL" = "shared" ; then
12009 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
12010 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12011 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
12014 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
12015 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
12016 cat >mk_shared_lib.sh <<-CF_EOF
12019 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
12022 Linking shared library
12023 ** SHARED_LIB \$SHARED_LIB
12024 ** IMPORT_LIB \$IMPORT_LIB
12026 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
12028 chmod +x mk_shared_lib.sh
12030 (openbsd[2-9].*|mirbsd*)
12031 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12032 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12033 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12035 if test "$cf_cv_enable_rpath" = yes ; then
12036 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12038 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12040 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12041 if test "$cf_cv_shlib_version" = rel; then
12042 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12044 cf_cv_shared_soname='`basename $@`'
12047 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12051 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
12055 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
12057 (nto-qnx*|openbsd*|freebsd[12].*)
12058 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12059 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
12060 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12062 (dragonfly*|freebsd*)
12063 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12064 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12065 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12066 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
12067 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12070 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12071 if test "$cf_cv_shlib_version" = rel; then
12072 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12074 cf_cv_shared_soname='`basename $@`'
12077 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12080 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12081 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12082 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12083 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12084 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12085 if test "$cf_cv_shlib_version" = auto; then
12086 if test -f /usr/libexec/ld.elf_so; then
12087 cf_cv_shlib_version=abi
12089 cf_cv_shlib_version=rel
12093 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12094 if test "$cf_cv_shlib_version" = rel; then
12095 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12097 cf_cv_shared_soname='`basename $@`'
12100 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
12102 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
12106 # tested with OSF/1 V3.2 and 'cc'
12107 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
12108 # link with shared libs).
12109 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
12112 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
12115 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
12116 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12117 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12118 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12120 cf_cv_rm_so_locs=yes
12122 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
12123 # tested with osr5.0.5
12124 if test "$GCC" != yes; then
12125 CC_SHARED_OPTS='-belf -KPIC'
12127 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
12128 if test "$cf_cv_enable_rpath" = yes ; then
12129 # only way is to set LD_RUN_PATH but no switch for it
12132 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12133 LINK_PROGS='LD_RUN_PATH=${libdir}'
12134 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
12137 # tested with SunOS 4.1.1 and gcc 2.7.0
12138 if test "$GCC" != yes; then
12139 CC_SHARED_OPTS='-KPIC'
12141 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
12142 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12145 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
12146 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
12147 if test "$DFT_LWR_MODEL" = "shared" ; then
12148 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
12149 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12151 if test "$cf_cv_enable_rpath" = yes ; then
12152 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
12155 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12156 if test "$cf_cv_shlib_version" = rel; then
12157 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12159 cf_cv_shared_soname='`basename $@`'
12162 if test "$GCC" != yes; then
12163 cf_save_CFLAGS="$CFLAGS"
12164 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
12166 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
12167 cat >"conftest.$ac_ext" <<_ACEOF
12168 #line 12168 "configure"
12169 #include "confdefs.h"
12174 printf("Hello\\n");
12179 rm -f "conftest.$ac_objext"
12180 if { (eval echo "$as_me:12180: \"$ac_compile\"") >&5
12181 (eval $ac_compile) 2>&5
12183 echo "$as_me:12183: \$? = $ac_status" >&5
12184 (exit "$ac_status"); } &&
12185 { ac_try='test -s "conftest.$ac_objext"'
12186 { (eval echo "$as_me:12186: \"$ac_try\"") >&5
12187 (eval $ac_try) 2>&5
12189 echo "$as_me:12189: \$? = $ac_status" >&5
12190 (exit "$ac_status"); }; }; then
12193 echo "$as_me: failed program was:" >&5
12194 cat "conftest.$ac_ext" >&5
12196 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12198 CFLAGS="$cf_save_CFLAGS"
12199 CC_SHARED_OPTS=$cf_shared_opts
12200 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
12202 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
12205 (sysv5uw7*|unix_sv*)
12206 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
12207 if test "$GCC" != yes; then
12208 CC_SHARED_OPTS='-KPIC'
12210 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
12213 CC_SHARED_OPTS='unknown'
12214 MK_SHARED_LIB='echo unknown'
12218 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
12219 case "$cf_cv_shlib_version" in
12221 case "$MK_SHARED_LIB" in
12223 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
12226 { echo "$as_me:12226: WARNING: ignored --with-shlib-version" >&5
12227 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
12233 if test -n "$cf_try_cflags"
12235 cat > conftest.$ac_ext <<EOF
12236 #line 12236 "${as_me:-configure}"
12238 int main(int argc, char *argv[])
12240 printf("hello\\n");
12241 return (argv[argc-1] == 0) ;
12244 cf_save_CFLAGS="$CFLAGS"
12245 for cf_opt in $cf_try_cflags
12247 CFLAGS="$cf_save_CFLAGS -$cf_opt"
12248 echo "$as_me:12248: checking if CFLAGS option -$cf_opt works" >&5
12249 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
12250 if { (eval echo "$as_me:12250: \"$ac_compile\"") >&5
12251 (eval $ac_compile) 2>&5
12253 echo "$as_me:12253: \$? = $ac_status" >&5
12254 (exit "$ac_status"); }; then
12255 echo "$as_me:12255: result: yes" >&5
12256 echo "${ECHO_T}yes" >&6
12257 cf_save_CFLAGS="$CFLAGS"
12259 echo "$as_me:12259: result: no" >&5
12260 echo "${ECHO_T}no" >&6
12263 CFLAGS="$cf_save_CFLAGS"
12266 # RPATH_LIST is a colon-separated list of directories
12267 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
12268 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
12270 test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
12272 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
12274 echo "${as_me:-configure}:12274: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
12276 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
12278 echo "${as_me:-configure}:12278: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
12280 # The test/sample programs in the original tree link using rpath option.
12281 # Make it optional for packagers.
12282 if test -n "$LOCAL_LDFLAGS"
12284 echo "$as_me:12284: checking if you want to link sample programs with rpath option" >&5
12285 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
12287 # Check whether --enable-rpath-link or --disable-rpath-link was given.
12288 if test "${enable_rpath_link+set}" = set; then
12289 enableval="$enable_rpath_link"
12290 with_rpath_link=$enableval
12292 with_rpath_link=yes
12294 echo "$as_me:12294: result: $with_rpath_link" >&5
12295 echo "${ECHO_T}$with_rpath_link" >&6
12296 if test "$with_rpath_link" = no
12303 ###############################################################################
12305 ### use option --enable-broken-linker to force on use of broken-linker support
12307 echo "$as_me:12307: checking if you want broken-linker support code" >&5
12308 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
12310 # Check whether --enable-broken_linker or --disable-broken_linker was given.
12311 if test "${enable_broken_linker+set}" = set; then
12312 enableval="$enable_broken_linker"
12313 with_broken_linker=$enableval
12315 with_broken_linker=no
12317 echo "$as_me:12317: result: $with_broken_linker" >&5
12318 echo "${ECHO_T}$with_broken_linker" >&6
12320 : "${BROKEN_LINKER:=0}"
12321 if test "x$with_broken_linker" = xyes ; then
12323 cat >>confdefs.h <<\EOF
12324 #define BROKEN_LINKER 1
12330 # Check to define _XOPEN_SOURCE "automatically"
12332 echo "$as_me:12332: checking if the POSIX test-macros are already defined" >&5
12333 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
12334 if test "${cf_cv_posix_visible+set}" = set; then
12335 echo $ECHO_N "(cached) $ECHO_C" >&6
12338 cat >"conftest.$ac_ext" <<_ACEOF
12339 #line 12339 "configure"
12340 #include "confdefs.h"
12346 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
12347 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
12348 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
12349 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
12350 #error conflicting symbols found
12357 rm -f "conftest.$ac_objext"
12358 if { (eval echo "$as_me:12358: \"$ac_compile\"") >&5
12359 (eval $ac_compile) 2>&5
12361 echo "$as_me:12361: \$? = $ac_status" >&5
12362 (exit "$ac_status"); } &&
12363 { ac_try='test -s "conftest.$ac_objext"'
12364 { (eval echo "$as_me:12364: \"$ac_try\"") >&5
12365 (eval $ac_try) 2>&5
12367 echo "$as_me:12367: \$? = $ac_status" >&5
12368 (exit "$ac_status"); }; }; then
12369 cf_cv_posix_visible=no
12371 echo "$as_me: failed program was:" >&5
12372 cat "conftest.$ac_ext" >&5
12373 cf_cv_posix_visible=yes
12375 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12378 echo "$as_me:12378: result: $cf_cv_posix_visible" >&5
12379 echo "${ECHO_T}$cf_cv_posix_visible" >&6
12381 if test "$cf_cv_posix_visible" = no; then
12383 cf_XOPEN_SOURCE=600
12384 cf_POSIX_C_SOURCE=199506L
12389 cf_xopen_source="-D_ALL_SOURCE"
12392 cf_XOPEN_SOURCE=600
12395 cf_xopen_source="-D_APPLE_C_SOURCE"
12398 cf_xopen_source="-D_DARWIN_C_SOURCE"
12401 (freebsd*|dragonfly*|midnightbsd*)
12402 # 5.x headers associate
12403 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
12404 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
12405 cf_POSIX_C_SOURCE=200112L
12406 cf_XOPEN_SOURCE=600
12407 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12410 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
12413 cf_xopen_source="-D_HPUX_SOURCE"
12416 cf_xopen_source="-D_SGI_SOURCE"
12419 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
12421 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
12423 echo "$as_me:12423: checking if this is the GNU C library" >&5
12424 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
12425 if test "${cf_cv_gnu_library+set}" = set; then
12426 echo $ECHO_N "(cached) $ECHO_C" >&6
12429 cat >"conftest.$ac_ext" <<_ACEOF
12430 #line 12430 "configure"
12431 #include "confdefs.h"
12432 #include <sys/types.h>
12437 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
12439 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
12442 # error not GNU C library
12448 rm -f "conftest.$ac_objext"
12449 if { (eval echo "$as_me:12449: \"$ac_compile\"") >&5
12450 (eval $ac_compile) 2>&5
12452 echo "$as_me:12452: \$? = $ac_status" >&5
12453 (exit "$ac_status"); } &&
12454 { ac_try='test -s "conftest.$ac_objext"'
12455 { (eval echo "$as_me:12455: \"$ac_try\"") >&5
12456 (eval $ac_try) 2>&5
12458 echo "$as_me:12458: \$? = $ac_status" >&5
12459 (exit "$ac_status"); }; }; then
12460 cf_cv_gnu_library=yes
12462 echo "$as_me: failed program was:" >&5
12463 cat "conftest.$ac_ext" >&5
12464 cf_cv_gnu_library=no
12466 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12469 echo "$as_me:12469: result: $cf_cv_gnu_library" >&5
12470 echo "${ECHO_T}$cf_cv_gnu_library" >&6
12472 if test x$cf_cv_gnu_library = xyes; then
12474 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
12475 # was changed to help a little. newlib incorporated the change about 4
12477 echo "$as_me:12477: checking if _DEFAULT_SOURCE can be used as a basis" >&5
12478 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
12479 if test "${cf_cv_gnu_library_219+set}" = set; then
12480 echo $ECHO_N "(cached) $ECHO_C" >&6
12483 cf_save="$CPPFLAGS"
12485 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12486 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12488 cat >"conftest.$ac_ext" <<_ACEOF
12489 #line 12489 "configure"
12490 #include "confdefs.h"
12491 #include <sys/types.h>
12496 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
12498 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
12501 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
12507 rm -f "conftest.$ac_objext"
12508 if { (eval echo "$as_me:12508: \"$ac_compile\"") >&5
12509 (eval $ac_compile) 2>&5
12511 echo "$as_me:12511: \$? = $ac_status" >&5
12512 (exit "$ac_status"); } &&
12513 { ac_try='test -s "conftest.$ac_objext"'
12514 { (eval echo "$as_me:12514: \"$ac_try\"") >&5
12515 (eval $ac_try) 2>&5
12517 echo "$as_me:12517: \$? = $ac_status" >&5
12518 (exit "$ac_status"); }; }; then
12519 cf_cv_gnu_library_219=yes
12521 echo "$as_me: failed program was:" >&5
12522 cat "conftest.$ac_ext" >&5
12523 cf_cv_gnu_library_219=no
12525 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12526 CPPFLAGS="$cf_save"
12529 echo "$as_me:12529: result: $cf_cv_gnu_library_219" >&5
12530 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
12532 if test "x$cf_cv_gnu_library_219" = xyes; then
12533 cf_save="$CPPFLAGS"
12534 echo "$as_me:12534: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
12535 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
12536 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
12537 echo $ECHO_N "(cached) $ECHO_C" >&6
12543 cf_new_extra_cppflags=
12545 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
12547 case "$cf_fix_cppflags" in
12549 case "$cf_add_cflags" in
12550 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12551 case "$cf_add_cflags" in
12553 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12555 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12556 && test -z "${cf_tst_cflags}" \
12557 && cf_fix_cppflags=yes
12559 if test "$cf_fix_cppflags" = yes ; then
12561 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12562 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12565 elif test "${cf_tst_cflags}" = "\"'" ; then
12567 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12568 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12574 case "$CPPFLAGS" in
12578 case "$cf_add_cflags" in
12580 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12582 CPPFLAGS=`echo "$CPPFLAGS" | \
12583 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12584 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12589 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12590 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12597 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12598 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12605 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12606 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12608 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12610 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12611 && test -z "${cf_tst_cflags}" \
12612 && cf_fix_cppflags=no
12617 if test -n "$cf_new_cflags" ; then
12619 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12620 CFLAGS="${CFLAGS}$cf_new_cflags"
12624 if test -n "$cf_new_cppflags" ; then
12626 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12627 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12631 if test -n "$cf_new_extra_cppflags" ; then
12633 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12634 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12638 cat >"conftest.$ac_ext" <<_ACEOF
12639 #line 12639 "configure"
12640 #include "confdefs.h"
12642 #include <limits.h>
12643 #include <sys/types.h>
12649 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
12652 # error GNU C library is too old
12658 rm -f "conftest.$ac_objext"
12659 if { (eval echo "$as_me:12659: \"$ac_compile\"") >&5
12660 (eval $ac_compile) 2>&5
12662 echo "$as_me:12662: \$? = $ac_status" >&5
12663 (exit "$ac_status"); } &&
12664 { ac_try='test -s "conftest.$ac_objext"'
12665 { (eval echo "$as_me:12665: \"$ac_try\"") >&5
12666 (eval $ac_try) 2>&5
12668 echo "$as_me:12668: \$? = $ac_status" >&5
12669 (exit "$ac_status"); }; }; then
12670 cf_cv_gnu_dftsrc_219=yes
12672 echo "$as_me: failed program was:" >&5
12673 cat "conftest.$ac_ext" >&5
12674 cf_cv_gnu_dftsrc_219=no
12676 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12679 echo "$as_me:12679: result: $cf_cv_gnu_dftsrc_219" >&5
12680 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
12681 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
12683 cf_cv_gnu_dftsrc_219=maybe
12686 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
12688 echo "$as_me:12688: checking if we must define _GNU_SOURCE" >&5
12689 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
12690 if test "${cf_cv_gnu_source+set}" = set; then
12691 echo $ECHO_N "(cached) $ECHO_C" >&6
12694 cat >"conftest.$ac_ext" <<_ACEOF
12695 #line 12695 "configure"
12696 #include "confdefs.h"
12697 #include <sys/types.h>
12702 #ifndef _XOPEN_SOURCE
12703 #error expected _XOPEN_SOURCE to be defined
12709 rm -f "conftest.$ac_objext"
12710 if { (eval echo "$as_me:12710: \"$ac_compile\"") >&5
12711 (eval $ac_compile) 2>&5
12713 echo "$as_me:12713: \$? = $ac_status" >&5
12714 (exit "$ac_status"); } &&
12715 { ac_try='test -s "conftest.$ac_objext"'
12716 { (eval echo "$as_me:12716: \"$ac_try\"") >&5
12717 (eval $ac_try) 2>&5
12719 echo "$as_me:12719: \$? = $ac_status" >&5
12720 (exit "$ac_status"); }; }; then
12721 cf_cv_gnu_source=no
12723 echo "$as_me: failed program was:" >&5
12724 cat "conftest.$ac_ext" >&5
12725 cf_save="$CPPFLAGS"
12730 cf_new_extra_cppflags=
12732 for cf_add_cflags in -D_GNU_SOURCE
12734 case "$cf_fix_cppflags" in
12736 case "$cf_add_cflags" in
12737 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12738 case "$cf_add_cflags" in
12740 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12742 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12743 && test -z "${cf_tst_cflags}" \
12744 && cf_fix_cppflags=yes
12746 if test "$cf_fix_cppflags" = yes ; then
12748 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12749 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12752 elif test "${cf_tst_cflags}" = "\"'" ; then
12754 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12755 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12761 case "$CPPFLAGS" in
12765 case "$cf_add_cflags" in
12767 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12769 CPPFLAGS=`echo "$CPPFLAGS" | \
12770 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12771 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12776 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12777 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12784 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12785 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12792 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12793 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12795 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12797 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12798 && test -z "${cf_tst_cflags}" \
12799 && cf_fix_cppflags=no
12804 if test -n "$cf_new_cflags" ; then
12806 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12807 CFLAGS="${CFLAGS}$cf_new_cflags"
12811 if test -n "$cf_new_cppflags" ; then
12813 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12814 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12818 if test -n "$cf_new_extra_cppflags" ; then
12820 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12821 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12825 cat >"conftest.$ac_ext" <<_ACEOF
12826 #line 12826 "configure"
12827 #include "confdefs.h"
12828 #include <sys/types.h>
12833 #ifdef _XOPEN_SOURCE
12834 #error expected _XOPEN_SOURCE to be undefined
12840 rm -f "conftest.$ac_objext"
12841 if { (eval echo "$as_me:12841: \"$ac_compile\"") >&5
12842 (eval $ac_compile) 2>&5
12844 echo "$as_me:12844: \$? = $ac_status" >&5
12845 (exit "$ac_status"); } &&
12846 { ac_try='test -s "conftest.$ac_objext"'
12847 { (eval echo "$as_me:12847: \"$ac_try\"") >&5
12848 (eval $ac_try) 2>&5
12850 echo "$as_me:12850: \$? = $ac_status" >&5
12851 (exit "$ac_status"); }; }; then
12852 cf_cv_gnu_source=no
12854 echo "$as_me: failed program was:" >&5
12855 cat "conftest.$ac_ext" >&5
12856 cf_cv_gnu_source=yes
12858 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12859 CPPFLAGS="$cf_save"
12862 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12865 echo "$as_me:12865: result: $cf_cv_gnu_source" >&5
12866 echo "${ECHO_T}$cf_cv_gnu_source" >&6
12868 if test "$cf_cv_gnu_source" = yes
12870 echo "$as_me:12870: checking if we should also define _DEFAULT_SOURCE" >&5
12871 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
12872 if test "${cf_cv_default_source+set}" = set; then
12873 echo $ECHO_N "(cached) $ECHO_C" >&6
12876 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12877 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
12879 cat >"conftest.$ac_ext" <<_ACEOF
12880 #line 12880 "configure"
12881 #include "confdefs.h"
12882 #include <sys/types.h>
12887 #ifdef _DEFAULT_SOURCE
12888 #error expected _DEFAULT_SOURCE to be undefined
12894 rm -f "conftest.$ac_objext"
12895 if { (eval echo "$as_me:12895: \"$ac_compile\"") >&5
12896 (eval $ac_compile) 2>&5
12898 echo "$as_me:12898: \$? = $ac_status" >&5
12899 (exit "$ac_status"); } &&
12900 { ac_try='test -s "conftest.$ac_objext"'
12901 { (eval echo "$as_me:12901: \"$ac_try\"") >&5
12902 (eval $ac_try) 2>&5
12904 echo "$as_me:12904: \$? = $ac_status" >&5
12905 (exit "$ac_status"); }; }; then
12906 cf_cv_default_source=no
12908 echo "$as_me: failed program was:" >&5
12909 cat "conftest.$ac_ext" >&5
12910 cf_cv_default_source=yes
12912 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12915 echo "$as_me:12915: result: $cf_cv_default_source" >&5
12916 echo "${ECHO_T}$cf_cv_default_source" >&6
12917 if test "$cf_cv_default_source" = yes
12920 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12921 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12931 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
12934 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
12937 if test "$cf_cv_posix_visible" = no; then
12939 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
12941 cf_save_CFLAGS="$CFLAGS"
12942 cf_save_CPPFLAGS="$CPPFLAGS"
12944 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
12945 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12946 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12948 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
12949 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12950 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12952 echo "$as_me:12952: checking if we should define _POSIX_C_SOURCE" >&5
12953 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
12954 if test "${cf_cv_posix_c_source+set}" = set; then
12955 echo $ECHO_N "(cached) $ECHO_C" >&6
12958 echo "${as_me:-configure}:12958: testing if the symbol is already defined go no further ..." 1>&5
12960 cat >"conftest.$ac_ext" <<_ACEOF
12961 #line 12961 "configure"
12962 #include "confdefs.h"
12963 #include <sys/types.h>
12968 #ifndef _POSIX_C_SOURCE
12975 rm -f "conftest.$ac_objext"
12976 if { (eval echo "$as_me:12976: \"$ac_compile\"") >&5
12977 (eval $ac_compile) 2>&5
12979 echo "$as_me:12979: \$? = $ac_status" >&5
12980 (exit "$ac_status"); } &&
12981 { ac_try='test -s "conftest.$ac_objext"'
12982 { (eval echo "$as_me:12982: \"$ac_try\"") >&5
12983 (eval $ac_try) 2>&5
12985 echo "$as_me:12985: \$? = $ac_status" >&5
12986 (exit "$ac_status"); }; }; then
12987 cf_cv_posix_c_source=no
12989 echo "$as_me: failed program was:" >&5
12990 cat "conftest.$ac_ext" >&5
12991 cf_want_posix_source=no
12992 case .$cf_POSIX_C_SOURCE in
12994 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12997 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12998 cf_want_posix_source=yes
13001 cf_want_posix_source=yes
13004 if test "$cf_want_posix_source" = yes ; then
13005 cat >"conftest.$ac_ext" <<_ACEOF
13006 #line 13006 "configure"
13007 #include "confdefs.h"
13008 #include <sys/types.h>
13013 #ifdef _POSIX_SOURCE
13020 rm -f "conftest.$ac_objext"
13021 if { (eval echo "$as_me:13021: \"$ac_compile\"") >&5
13022 (eval $ac_compile) 2>&5
13024 echo "$as_me:13024: \$? = $ac_status" >&5
13025 (exit "$ac_status"); } &&
13026 { ac_try='test -s "conftest.$ac_objext"'
13027 { (eval echo "$as_me:13027: \"$ac_try\"") >&5
13028 (eval $ac_try) 2>&5
13030 echo "$as_me:13030: \$? = $ac_status" >&5
13031 (exit "$ac_status"); }; }; then
13034 echo "$as_me: failed program was:" >&5
13035 cat "conftest.$ac_ext" >&5
13036 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13038 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13041 echo "${as_me:-configure}:13041: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13043 CFLAGS="$cf_trim_CFLAGS"
13044 CPPFLAGS="$cf_trim_CPPFLAGS"
13046 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13047 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13049 echo "${as_me:-configure}:13049: testing if the second compile does not leave our definition intact error ..." 1>&5
13051 cat >"conftest.$ac_ext" <<_ACEOF
13052 #line 13052 "configure"
13053 #include "confdefs.h"
13054 #include <sys/types.h>
13059 #ifndef _POSIX_C_SOURCE
13066 rm -f "conftest.$ac_objext"
13067 if { (eval echo "$as_me:13067: \"$ac_compile\"") >&5
13068 (eval $ac_compile) 2>&5
13070 echo "$as_me:13070: \$? = $ac_status" >&5
13071 (exit "$ac_status"); } &&
13072 { ac_try='test -s "conftest.$ac_objext"'
13073 { (eval echo "$as_me:13073: \"$ac_try\"") >&5
13074 (eval $ac_try) 2>&5
13076 echo "$as_me:13076: \$? = $ac_status" >&5
13077 (exit "$ac_status"); }; }; then
13080 echo "$as_me: failed program was:" >&5
13081 cat "conftest.$ac_ext" >&5
13082 cf_cv_posix_c_source=no
13084 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13085 CFLAGS="$cf_save_CFLAGS"
13086 CPPFLAGS="$cf_save_CPPFLAGS"
13089 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13092 echo "$as_me:13092: result: $cf_cv_posix_c_source" >&5
13093 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13095 if test "$cf_cv_posix_c_source" != no ; then
13096 CFLAGS="$cf_trim_CFLAGS"
13097 CPPFLAGS="$cf_trim_CPPFLAGS"
13102 cf_new_extra_cppflags=
13104 for cf_add_cflags in $cf_cv_posix_c_source
13106 case "$cf_fix_cppflags" in
13108 case "$cf_add_cflags" in
13109 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13110 case "$cf_add_cflags" in
13112 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13114 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13115 && test -z "${cf_tst_cflags}" \
13116 && cf_fix_cppflags=yes
13118 if test "$cf_fix_cppflags" = yes ; then
13120 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13121 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13124 elif test "${cf_tst_cflags}" = "\"'" ; then
13126 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13127 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13133 case "$CPPFLAGS" in
13137 case "$cf_add_cflags" in
13139 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13141 CPPFLAGS=`echo "$CPPFLAGS" | \
13142 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13143 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13148 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13149 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13156 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13157 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13164 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13165 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13167 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13169 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13170 && test -z "${cf_tst_cflags}" \
13171 && cf_fix_cppflags=no
13176 if test -n "$cf_new_cflags" ; then
13178 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13179 CFLAGS="${CFLAGS}$cf_new_cflags"
13183 if test -n "$cf_new_cppflags" ; then
13185 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13186 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13190 if test -n "$cf_new_extra_cppflags" ; then
13192 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13193 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13199 fi # cf_cv_posix_visible
13203 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
13206 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
13207 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
13208 # Abusing the conformance level is a workaround.
13209 { echo "$as_me:13209: WARNING: this system does not provide usable locale support" >&5
13210 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
13211 cf_xopen_source="-D_BSD_SOURCE"
13212 cf_XOPEN_SOURCE=700
13215 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
13216 cf_xopen_source="-D_BSD_SOURCE"
13217 cf_XOPEN_SOURCE=600
13220 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
13223 cf_xopen_source="-D_OSF_SOURCE"
13226 cf_xopen_source="-D_QNX_SOURCE"
13229 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
13232 cf_xopen_source="-D__EXTENSIONS__"
13233 cf_cv_xopen_source=broken
13235 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
13241 echo "$as_me:13241: checking if we should define _XOPEN_SOURCE" >&5
13242 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13243 if test "${cf_cv_xopen_source+set}" = set; then
13244 echo $ECHO_N "(cached) $ECHO_C" >&6
13247 cat >"conftest.$ac_ext" <<_ACEOF
13248 #line 13248 "configure"
13249 #include "confdefs.h"
13251 #include <stdlib.h>
13252 #include <string.h>
13253 #include <sys/types.h>
13259 #ifndef _XOPEN_SOURCE
13266 rm -f "conftest.$ac_objext"
13267 if { (eval echo "$as_me:13267: \"$ac_compile\"") >&5
13268 (eval $ac_compile) 2>&5
13270 echo "$as_me:13270: \$? = $ac_status" >&5
13271 (exit "$ac_status"); } &&
13272 { ac_try='test -s "conftest.$ac_objext"'
13273 { (eval echo "$as_me:13273: \"$ac_try\"") >&5
13274 (eval $ac_try) 2>&5
13276 echo "$as_me:13276: \$? = $ac_status" >&5
13277 (exit "$ac_status"); }; }; then
13278 cf_cv_xopen_source=no
13280 echo "$as_me: failed program was:" >&5
13281 cat "conftest.$ac_ext" >&5
13282 cf_save="$CPPFLAGS"
13284 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13285 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13287 cat >"conftest.$ac_ext" <<_ACEOF
13288 #line 13288 "configure"
13289 #include "confdefs.h"
13291 #include <stdlib.h>
13292 #include <string.h>
13293 #include <sys/types.h>
13299 #ifdef _XOPEN_SOURCE
13306 rm -f "conftest.$ac_objext"
13307 if { (eval echo "$as_me:13307: \"$ac_compile\"") >&5
13308 (eval $ac_compile) 2>&5
13310 echo "$as_me:13310: \$? = $ac_status" >&5
13311 (exit "$ac_status"); } &&
13312 { ac_try='test -s "conftest.$ac_objext"'
13313 { (eval echo "$as_me:13313: \"$ac_try\"") >&5
13314 (eval $ac_try) 2>&5
13316 echo "$as_me:13316: \$? = $ac_status" >&5
13317 (exit "$ac_status"); }; }; then
13318 cf_cv_xopen_source=no
13320 echo "$as_me: failed program was:" >&5
13321 cat "conftest.$ac_ext" >&5
13322 cf_cv_xopen_source=$cf_XOPEN_SOURCE
13324 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13325 CPPFLAGS="$cf_save"
13328 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13331 echo "$as_me:13331: result: $cf_cv_xopen_source" >&5
13332 echo "${ECHO_T}$cf_cv_xopen_source" >&6
13334 if test "$cf_cv_xopen_source" != no ; then
13336 CFLAGS=`echo "$CFLAGS" | \
13337 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13338 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13340 CPPFLAGS=`echo "$CPPFLAGS" | \
13341 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13342 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13344 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13346 for cf_add_cflags in $cf_temp_xopen_source
13348 case "x$cf_add_cflags" in
13351 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13354 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'`
13355 test "$CFLAGS" != "$cf_old_cflag" || break
13357 CFLAGS="$cf_old_cflag"
13360 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13363 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'`
13364 test "$CPPFLAGS" != "$cf_old_cflag" || break
13366 CPPFLAGS="$cf_old_cflag"
13375 cf_new_extra_cppflags=
13377 for cf_add_cflags in $cf_add_cflags
13379 case "$cf_fix_cppflags" in
13381 case "$cf_add_cflags" in
13382 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13383 case "$cf_add_cflags" in
13385 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13387 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13388 && test -z "${cf_tst_cflags}" \
13389 && cf_fix_cppflags=yes
13391 if test "$cf_fix_cppflags" = yes ; then
13393 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13394 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13397 elif test "${cf_tst_cflags}" = "\"'" ; then
13399 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13400 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13406 case "$CPPFLAGS" in
13410 case "$cf_add_cflags" in
13412 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13414 CPPFLAGS=`echo "$CPPFLAGS" | \
13415 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13416 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13421 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13422 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13429 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13430 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13437 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13438 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13440 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13442 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13443 && test -z "${cf_tst_cflags}" \
13444 && cf_fix_cppflags=no
13449 if test -n "$cf_new_cflags" ; then
13451 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13452 CFLAGS="${CFLAGS}$cf_new_cflags"
13456 if test -n "$cf_new_cppflags" ; then
13458 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13459 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13463 if test -n "$cf_new_extra_cppflags" ; then
13465 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13466 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13474 if test "$cf_cv_posix_visible" = no; then
13476 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
13478 cf_save_CFLAGS="$CFLAGS"
13479 cf_save_CPPFLAGS="$CPPFLAGS"
13481 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13482 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13483 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13485 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13486 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13487 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13489 echo "$as_me:13489: checking if we should define _POSIX_C_SOURCE" >&5
13490 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13491 if test "${cf_cv_posix_c_source+set}" = set; then
13492 echo $ECHO_N "(cached) $ECHO_C" >&6
13495 echo "${as_me:-configure}:13495: testing if the symbol is already defined go no further ..." 1>&5
13497 cat >"conftest.$ac_ext" <<_ACEOF
13498 #line 13498 "configure"
13499 #include "confdefs.h"
13500 #include <sys/types.h>
13505 #ifndef _POSIX_C_SOURCE
13512 rm -f "conftest.$ac_objext"
13513 if { (eval echo "$as_me:13513: \"$ac_compile\"") >&5
13514 (eval $ac_compile) 2>&5
13516 echo "$as_me:13516: \$? = $ac_status" >&5
13517 (exit "$ac_status"); } &&
13518 { ac_try='test -s "conftest.$ac_objext"'
13519 { (eval echo "$as_me:13519: \"$ac_try\"") >&5
13520 (eval $ac_try) 2>&5
13522 echo "$as_me:13522: \$? = $ac_status" >&5
13523 (exit "$ac_status"); }; }; then
13524 cf_cv_posix_c_source=no
13526 echo "$as_me: failed program was:" >&5
13527 cat "conftest.$ac_ext" >&5
13528 cf_want_posix_source=no
13529 case .$cf_POSIX_C_SOURCE in
13531 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13534 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13535 cf_want_posix_source=yes
13538 cf_want_posix_source=yes
13541 if test "$cf_want_posix_source" = yes ; then
13542 cat >"conftest.$ac_ext" <<_ACEOF
13543 #line 13543 "configure"
13544 #include "confdefs.h"
13545 #include <sys/types.h>
13550 #ifdef _POSIX_SOURCE
13557 rm -f "conftest.$ac_objext"
13558 if { (eval echo "$as_me:13558: \"$ac_compile\"") >&5
13559 (eval $ac_compile) 2>&5
13561 echo "$as_me:13561: \$? = $ac_status" >&5
13562 (exit "$ac_status"); } &&
13563 { ac_try='test -s "conftest.$ac_objext"'
13564 { (eval echo "$as_me:13564: \"$ac_try\"") >&5
13565 (eval $ac_try) 2>&5
13567 echo "$as_me:13567: \$? = $ac_status" >&5
13568 (exit "$ac_status"); }; }; then
13571 echo "$as_me: failed program was:" >&5
13572 cat "conftest.$ac_ext" >&5
13573 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13575 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13578 echo "${as_me:-configure}:13578: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13580 CFLAGS="$cf_trim_CFLAGS"
13581 CPPFLAGS="$cf_trim_CPPFLAGS"
13583 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13584 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13586 echo "${as_me:-configure}:13586: testing if the second compile does not leave our definition intact error ..." 1>&5
13588 cat >"conftest.$ac_ext" <<_ACEOF
13589 #line 13589 "configure"
13590 #include "confdefs.h"
13591 #include <sys/types.h>
13596 #ifndef _POSIX_C_SOURCE
13603 rm -f "conftest.$ac_objext"
13604 if { (eval echo "$as_me:13604: \"$ac_compile\"") >&5
13605 (eval $ac_compile) 2>&5
13607 echo "$as_me:13607: \$? = $ac_status" >&5
13608 (exit "$ac_status"); } &&
13609 { ac_try='test -s "conftest.$ac_objext"'
13610 { (eval echo "$as_me:13610: \"$ac_try\"") >&5
13611 (eval $ac_try) 2>&5
13613 echo "$as_me:13613: \$? = $ac_status" >&5
13614 (exit "$ac_status"); }; }; then
13617 echo "$as_me: failed program was:" >&5
13618 cat "conftest.$ac_ext" >&5
13619 cf_cv_posix_c_source=no
13621 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13622 CFLAGS="$cf_save_CFLAGS"
13623 CPPFLAGS="$cf_save_CPPFLAGS"
13626 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13629 echo "$as_me:13629: result: $cf_cv_posix_c_source" >&5
13630 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13632 if test "$cf_cv_posix_c_source" != no ; then
13633 CFLAGS="$cf_trim_CFLAGS"
13634 CPPFLAGS="$cf_trim_CPPFLAGS"
13639 cf_new_extra_cppflags=
13641 for cf_add_cflags in $cf_cv_posix_c_source
13643 case "$cf_fix_cppflags" in
13645 case "$cf_add_cflags" in
13646 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13647 case "$cf_add_cflags" in
13649 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13651 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13652 && test -z "${cf_tst_cflags}" \
13653 && cf_fix_cppflags=yes
13655 if test "$cf_fix_cppflags" = yes ; then
13657 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13658 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13661 elif test "${cf_tst_cflags}" = "\"'" ; then
13663 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13664 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13670 case "$CPPFLAGS" in
13674 case "$cf_add_cflags" in
13676 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13678 CPPFLAGS=`echo "$CPPFLAGS" | \
13679 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13680 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13685 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13686 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13693 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13694 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13701 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13702 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13704 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13706 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13707 && test -z "${cf_tst_cflags}" \
13708 && cf_fix_cppflags=no
13713 if test -n "$cf_new_cflags" ; then
13715 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13716 CFLAGS="${CFLAGS}$cf_new_cflags"
13720 if test -n "$cf_new_cppflags" ; then
13722 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13723 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13727 if test -n "$cf_new_extra_cppflags" ; then
13729 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13730 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13736 fi # cf_cv_posix_visible
13741 if test -n "$cf_xopen_source" ; then
13743 for cf_add_cflags in $cf_xopen_source
13745 case "x$cf_add_cflags" in
13748 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13751 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'`
13752 test "$CFLAGS" != "$cf_old_cflag" || break
13753 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
13755 echo "${as_me:-configure}:13755: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
13757 CFLAGS="$cf_old_cflag"
13760 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13763 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'`
13764 test "$CPPFLAGS" != "$cf_old_cflag" || break
13765 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
13767 echo "${as_me:-configure}:13767: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
13769 CPPFLAGS="$cf_old_cflag"
13778 cf_new_extra_cppflags=
13780 for cf_add_cflags in $cf_add_cflags
13782 case "$cf_fix_cppflags" in
13784 case "$cf_add_cflags" in
13785 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13786 case "$cf_add_cflags" in
13788 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13790 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13791 && test -z "${cf_tst_cflags}" \
13792 && cf_fix_cppflags=yes
13794 if test "$cf_fix_cppflags" = yes ; then
13796 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13797 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13800 elif test "${cf_tst_cflags}" = "\"'" ; then
13802 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13803 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13809 case "$CPPFLAGS" in
13813 case "$cf_add_cflags" in
13815 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13817 CPPFLAGS=`echo "$CPPFLAGS" | \
13818 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13819 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13824 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13825 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13832 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13833 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13840 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13841 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13843 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13845 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13846 && test -z "${cf_tst_cflags}" \
13847 && cf_fix_cppflags=no
13852 if test -n "$cf_new_cflags" ; then
13853 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13855 echo "${as_me:-configure}:13855: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13857 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13858 CFLAGS="${CFLAGS}$cf_new_cflags"
13862 if test -n "$cf_new_cppflags" ; then
13863 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13865 echo "${as_me:-configure}:13865: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13867 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13868 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13872 if test -n "$cf_new_extra_cppflags" ; then
13873 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13875 echo "${as_me:-configure}:13875: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13877 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13878 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13886 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
13887 echo "$as_me:13887: checking if _XOPEN_SOURCE really is set" >&5
13888 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
13889 cat >"conftest.$ac_ext" <<_ACEOF
13890 #line 13890 "configure"
13891 #include "confdefs.h"
13892 #include <stdlib.h>
13897 #ifndef _XOPEN_SOURCE
13904 rm -f "conftest.$ac_objext"
13905 if { (eval echo "$as_me:13905: \"$ac_compile\"") >&5
13906 (eval $ac_compile) 2>&5
13908 echo "$as_me:13908: \$? = $ac_status" >&5
13909 (exit "$ac_status"); } &&
13910 { ac_try='test -s "conftest.$ac_objext"'
13911 { (eval echo "$as_me:13911: \"$ac_try\"") >&5
13912 (eval $ac_try) 2>&5
13914 echo "$as_me:13914: \$? = $ac_status" >&5
13915 (exit "$ac_status"); }; }; then
13916 cf_XOPEN_SOURCE_set=yes
13918 echo "$as_me: failed program was:" >&5
13919 cat "conftest.$ac_ext" >&5
13920 cf_XOPEN_SOURCE_set=no
13922 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13923 echo "$as_me:13923: result: $cf_XOPEN_SOURCE_set" >&5
13924 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
13925 if test "$cf_XOPEN_SOURCE_set" = yes
13927 cat >"conftest.$ac_ext" <<_ACEOF
13928 #line 13928 "configure"
13929 #include "confdefs.h"
13930 #include <stdlib.h>
13935 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
13942 rm -f "conftest.$ac_objext"
13943 if { (eval echo "$as_me:13943: \"$ac_compile\"") >&5
13944 (eval $ac_compile) 2>&5
13946 echo "$as_me:13946: \$? = $ac_status" >&5
13947 (exit "$ac_status"); } &&
13948 { ac_try='test -s "conftest.$ac_objext"'
13949 { (eval echo "$as_me:13949: \"$ac_try\"") >&5
13950 (eval $ac_try) 2>&5
13952 echo "$as_me:13952: \$? = $ac_status" >&5
13953 (exit "$ac_status"); }; }; then
13954 cf_XOPEN_SOURCE_set_ok=yes
13956 echo "$as_me: failed program was:" >&5
13957 cat "conftest.$ac_ext" >&5
13958 cf_XOPEN_SOURCE_set_ok=no
13960 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13961 if test "$cf_XOPEN_SOURCE_set_ok" = no
13963 { echo "$as_me:13963: WARNING: _XOPEN_SOURCE is lower than requested" >&5
13964 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
13968 echo "$as_me:13968: checking if we should define _XOPEN_SOURCE" >&5
13969 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13970 if test "${cf_cv_xopen_source+set}" = set; then
13971 echo $ECHO_N "(cached) $ECHO_C" >&6
13974 cat >"conftest.$ac_ext" <<_ACEOF
13975 #line 13975 "configure"
13976 #include "confdefs.h"
13978 #include <stdlib.h>
13979 #include <string.h>
13980 #include <sys/types.h>
13986 #ifndef _XOPEN_SOURCE
13993 rm -f "conftest.$ac_objext"
13994 if { (eval echo "$as_me:13994: \"$ac_compile\"") >&5
13995 (eval $ac_compile) 2>&5
13997 echo "$as_me:13997: \$? = $ac_status" >&5
13998 (exit "$ac_status"); } &&
13999 { ac_try='test -s "conftest.$ac_objext"'
14000 { (eval echo "$as_me:14000: \"$ac_try\"") >&5
14001 (eval $ac_try) 2>&5
14003 echo "$as_me:14003: \$? = $ac_status" >&5
14004 (exit "$ac_status"); }; }; then
14005 cf_cv_xopen_source=no
14007 echo "$as_me: failed program was:" >&5
14008 cat "conftest.$ac_ext" >&5
14009 cf_save="$CPPFLAGS"
14011 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14012 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
14014 cat >"conftest.$ac_ext" <<_ACEOF
14015 #line 14015 "configure"
14016 #include "confdefs.h"
14018 #include <stdlib.h>
14019 #include <string.h>
14020 #include <sys/types.h>
14026 #ifdef _XOPEN_SOURCE
14033 rm -f "conftest.$ac_objext"
14034 if { (eval echo "$as_me:14034: \"$ac_compile\"") >&5
14035 (eval $ac_compile) 2>&5
14037 echo "$as_me:14037: \$? = $ac_status" >&5
14038 (exit "$ac_status"); } &&
14039 { ac_try='test -s "conftest.$ac_objext"'
14040 { (eval echo "$as_me:14040: \"$ac_try\"") >&5
14041 (eval $ac_try) 2>&5
14043 echo "$as_me:14043: \$? = $ac_status" >&5
14044 (exit "$ac_status"); }; }; then
14045 cf_cv_xopen_source=no
14047 echo "$as_me: failed program was:" >&5
14048 cat "conftest.$ac_ext" >&5
14049 cf_cv_xopen_source=$cf_XOPEN_SOURCE
14051 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14052 CPPFLAGS="$cf_save"
14055 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14058 echo "$as_me:14058: result: $cf_cv_xopen_source" >&5
14059 echo "${ECHO_T}$cf_cv_xopen_source" >&6
14061 if test "$cf_cv_xopen_source" != no ; then
14063 CFLAGS=`echo "$CFLAGS" | \
14064 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14065 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14067 CPPFLAGS=`echo "$CPPFLAGS" | \
14068 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14069 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14071 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
14073 for cf_add_cflags in $cf_temp_xopen_source
14075 case "x$cf_add_cflags" in
14078 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14081 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'`
14082 test "$CFLAGS" != "$cf_old_cflag" || break
14084 CFLAGS="$cf_old_cflag"
14087 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14090 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'`
14091 test "$CPPFLAGS" != "$cf_old_cflag" || break
14093 CPPFLAGS="$cf_old_cflag"
14102 cf_new_extra_cppflags=
14104 for cf_add_cflags in $cf_add_cflags
14106 case "$cf_fix_cppflags" in
14108 case "$cf_add_cflags" in
14109 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14110 case "$cf_add_cflags" in
14112 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14114 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14115 && test -z "${cf_tst_cflags}" \
14116 && cf_fix_cppflags=yes
14118 if test "$cf_fix_cppflags" = yes ; then
14120 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14121 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14124 elif test "${cf_tst_cflags}" = "\"'" ; then
14126 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14127 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14133 case "$CPPFLAGS" in
14137 case "$cf_add_cflags" in
14139 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14141 CPPFLAGS=`echo "$CPPFLAGS" | \
14142 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14143 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14148 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14149 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14156 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14157 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14164 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14165 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14167 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14169 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14170 && test -z "${cf_tst_cflags}" \
14171 && cf_fix_cppflags=no
14176 if test -n "$cf_new_cflags" ; then
14178 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14179 CFLAGS="${CFLAGS}$cf_new_cflags"
14183 if test -n "$cf_new_cppflags" ; then
14185 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14186 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14190 if test -n "$cf_new_extra_cppflags" ; then
14192 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14193 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14203 fi # cf_cv_posix_visible
14205 # Check whether --enable-largefile or --disable-largefile was given.
14206 if test "${enable_largefile+set}" = set; then
14207 enableval="$enable_largefile"
14210 if test "$enable_largefile" != no; then
14212 echo "$as_me:14212: checking for special C compiler options needed for large files" >&5
14213 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
14214 if test "${ac_cv_sys_largefile_CC+set}" = set; then
14215 echo $ECHO_N "(cached) $ECHO_C" >&6
14217 ac_cv_sys_largefile_CC=no
14218 if test "$GCC" != yes; then
14221 # IRIX 6.2 and later do not support large files by default,
14222 # so use the C compiler's -n32 option if that helps.
14223 cat >"conftest.$ac_ext" <<_ACEOF
14224 #line 14224 "configure"
14225 #include "confdefs.h"
14226 #include <sys/types.h>
14227 /* Check that off_t can represent 2**63 - 1 correctly.
14228 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14229 since some C++ compilers masquerading as C compilers
14230 incorrectly reject 9223372036854775807. */
14231 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14232 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14233 && LARGE_OFF_T % 2147483647 == 1)
14243 rm -f "conftest.$ac_objext"
14244 if { (eval echo "$as_me:14244: \"$ac_compile\"") >&5
14245 (eval $ac_compile) 2>&5
14247 echo "$as_me:14247: \$? = $ac_status" >&5
14248 (exit "$ac_status"); } &&
14249 { ac_try='test -s "conftest.$ac_objext"'
14250 { (eval echo "$as_me:14250: \"$ac_try\"") >&5
14251 (eval $ac_try) 2>&5
14253 echo "$as_me:14253: \$? = $ac_status" >&5
14254 (exit "$ac_status"); }; }; then
14257 echo "$as_me: failed program was:" >&5
14258 cat "conftest.$ac_ext" >&5
14260 rm -f "conftest.$ac_objext"
14262 rm -f "conftest.$ac_objext"
14263 if { (eval echo "$as_me:14263: \"$ac_compile\"") >&5
14264 (eval $ac_compile) 2>&5
14266 echo "$as_me:14266: \$? = $ac_status" >&5
14267 (exit "$ac_status"); } &&
14268 { ac_try='test -s "conftest.$ac_objext"'
14269 { (eval echo "$as_me:14269: \"$ac_try\"") >&5
14270 (eval $ac_try) 2>&5
14272 echo "$as_me:14272: \$? = $ac_status" >&5
14273 (exit "$ac_status"); }; }; then
14274 ac_cv_sys_largefile_CC=' -n32'; break
14276 echo "$as_me: failed program was:" >&5
14277 cat "conftest.$ac_ext" >&5
14279 rm -f "conftest.$ac_objext"
14283 rm -f "conftest.$ac_ext"
14286 echo "$as_me:14286: result: $ac_cv_sys_largefile_CC" >&5
14287 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
14288 if test "$ac_cv_sys_largefile_CC" != no; then
14289 CC=$CC$ac_cv_sys_largefile_CC
14292 echo "$as_me:14292: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14293 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
14294 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
14295 echo $ECHO_N "(cached) $ECHO_C" >&6
14298 ac_cv_sys_file_offset_bits=no
14299 cat >"conftest.$ac_ext" <<_ACEOF
14300 #line 14300 "configure"
14301 #include "confdefs.h"
14302 #include <sys/types.h>
14303 /* Check that off_t can represent 2**63 - 1 correctly.
14304 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14305 since some C++ compilers masquerading as C compilers
14306 incorrectly reject 9223372036854775807. */
14307 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14308 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14309 && LARGE_OFF_T % 2147483647 == 1)
14319 rm -f "conftest.$ac_objext"
14320 if { (eval echo "$as_me:14320: \"$ac_compile\"") >&5
14321 (eval $ac_compile) 2>&5
14323 echo "$as_me:14323: \$? = $ac_status" >&5
14324 (exit "$ac_status"); } &&
14325 { ac_try='test -s "conftest.$ac_objext"'
14326 { (eval echo "$as_me:14326: \"$ac_try\"") >&5
14327 (eval $ac_try) 2>&5
14329 echo "$as_me:14329: \$? = $ac_status" >&5
14330 (exit "$ac_status"); }; }; then
14333 echo "$as_me: failed program was:" >&5
14334 cat "conftest.$ac_ext" >&5
14336 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14337 cat >"conftest.$ac_ext" <<_ACEOF
14338 #line 14338 "configure"
14339 #include "confdefs.h"
14340 #define _FILE_OFFSET_BITS 64
14341 #include <sys/types.h>
14342 /* Check that off_t can represent 2**63 - 1 correctly.
14343 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14344 since some C++ compilers masquerading as C compilers
14345 incorrectly reject 9223372036854775807. */
14346 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14347 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14348 && LARGE_OFF_T % 2147483647 == 1)
14358 rm -f "conftest.$ac_objext"
14359 if { (eval echo "$as_me:14359: \"$ac_compile\"") >&5
14360 (eval $ac_compile) 2>&5
14362 echo "$as_me:14362: \$? = $ac_status" >&5
14363 (exit "$ac_status"); } &&
14364 { ac_try='test -s "conftest.$ac_objext"'
14365 { (eval echo "$as_me:14365: \"$ac_try\"") >&5
14366 (eval $ac_try) 2>&5
14368 echo "$as_me:14368: \$? = $ac_status" >&5
14369 (exit "$ac_status"); }; }; then
14370 ac_cv_sys_file_offset_bits=64; break
14372 echo "$as_me: failed program was:" >&5
14373 cat "conftest.$ac_ext" >&5
14375 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14379 echo "$as_me:14379: result: $ac_cv_sys_file_offset_bits" >&5
14380 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14381 if test "$ac_cv_sys_file_offset_bits" != no; then
14383 cat >>confdefs.h <<EOF
14384 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14389 echo "$as_me:14389: checking for _LARGE_FILES value needed for large files" >&5
14390 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14391 if test "${ac_cv_sys_large_files+set}" = set; then
14392 echo $ECHO_N "(cached) $ECHO_C" >&6
14395 ac_cv_sys_large_files=no
14396 cat >"conftest.$ac_ext" <<_ACEOF
14397 #line 14397 "configure"
14398 #include "confdefs.h"
14399 #include <sys/types.h>
14400 /* Check that off_t can represent 2**63 - 1 correctly.
14401 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14402 since some C++ compilers masquerading as C compilers
14403 incorrectly reject 9223372036854775807. */
14404 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14405 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14406 && LARGE_OFF_T % 2147483647 == 1)
14416 rm -f "conftest.$ac_objext"
14417 if { (eval echo "$as_me:14417: \"$ac_compile\"") >&5
14418 (eval $ac_compile) 2>&5
14420 echo "$as_me:14420: \$? = $ac_status" >&5
14421 (exit "$ac_status"); } &&
14422 { ac_try='test -s "conftest.$ac_objext"'
14423 { (eval echo "$as_me:14423: \"$ac_try\"") >&5
14424 (eval $ac_try) 2>&5
14426 echo "$as_me:14426: \$? = $ac_status" >&5
14427 (exit "$ac_status"); }; }; then
14430 echo "$as_me: failed program was:" >&5
14431 cat "conftest.$ac_ext" >&5
14433 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14434 cat >"conftest.$ac_ext" <<_ACEOF
14435 #line 14435 "configure"
14436 #include "confdefs.h"
14437 #define _LARGE_FILES 1
14438 #include <sys/types.h>
14439 /* Check that off_t can represent 2**63 - 1 correctly.
14440 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14441 since some C++ compilers masquerading as C compilers
14442 incorrectly reject 9223372036854775807. */
14443 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14444 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14445 && LARGE_OFF_T % 2147483647 == 1)
14455 rm -f "conftest.$ac_objext"
14456 if { (eval echo "$as_me:14456: \"$ac_compile\"") >&5
14457 (eval $ac_compile) 2>&5
14459 echo "$as_me:14459: \$? = $ac_status" >&5
14460 (exit "$ac_status"); } &&
14461 { ac_try='test -s "conftest.$ac_objext"'
14462 { (eval echo "$as_me:14462: \"$ac_try\"") >&5
14463 (eval $ac_try) 2>&5
14465 echo "$as_me:14465: \$? = $ac_status" >&5
14466 (exit "$ac_status"); }; }; then
14467 ac_cv_sys_large_files=1; break
14469 echo "$as_me: failed program was:" >&5
14470 cat "conftest.$ac_ext" >&5
14472 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14476 echo "$as_me:14476: result: $ac_cv_sys_large_files" >&5
14477 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14478 if test "$ac_cv_sys_large_files" != no; then
14480 cat >>confdefs.h <<EOF
14481 #define _LARGE_FILES $ac_cv_sys_large_files
14488 if test "$enable_largefile" != no ; then
14489 echo "$as_me:14489: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14490 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14491 if test "${ac_cv_sys_largefile_source+set}" = set; then
14492 echo $ECHO_N "(cached) $ECHO_C" >&6
14495 ac_cv_sys_largefile_source=no
14496 cat >"conftest.$ac_ext" <<_ACEOF
14497 #line 14497 "configure"
14498 #include "confdefs.h"
14508 rm -f "conftest.$ac_objext"
14509 if { (eval echo "$as_me:14509: \"$ac_compile\"") >&5
14510 (eval $ac_compile) 2>&5
14512 echo "$as_me:14512: \$? = $ac_status" >&5
14513 (exit "$ac_status"); } &&
14514 { ac_try='test -s "conftest.$ac_objext"'
14515 { (eval echo "$as_me:14515: \"$ac_try\"") >&5
14516 (eval $ac_try) 2>&5
14518 echo "$as_me:14518: \$? = $ac_status" >&5
14519 (exit "$ac_status"); }; }; then
14522 echo "$as_me: failed program was:" >&5
14523 cat "conftest.$ac_ext" >&5
14525 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14526 cat >"conftest.$ac_ext" <<_ACEOF
14527 #line 14527 "configure"
14528 #include "confdefs.h"
14529 #define _LARGEFILE_SOURCE 1
14539 rm -f "conftest.$ac_objext"
14540 if { (eval echo "$as_me:14540: \"$ac_compile\"") >&5
14541 (eval $ac_compile) 2>&5
14543 echo "$as_me:14543: \$? = $ac_status" >&5
14544 (exit "$ac_status"); } &&
14545 { ac_try='test -s "conftest.$ac_objext"'
14546 { (eval echo "$as_me:14546: \"$ac_try\"") >&5
14547 (eval $ac_try) 2>&5
14549 echo "$as_me:14549: \$? = $ac_status" >&5
14550 (exit "$ac_status"); }; }; then
14551 ac_cv_sys_largefile_source=1; break
14553 echo "$as_me: failed program was:" >&5
14554 cat "conftest.$ac_ext" >&5
14556 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14560 echo "$as_me:14560: result: $ac_cv_sys_largefile_source" >&5
14561 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14562 if test "$ac_cv_sys_largefile_source" != no; then
14564 cat >>confdefs.h <<EOF
14565 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14571 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14572 # in glibc 2.1.3, but that breaks too many other things.
14573 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14574 echo "$as_me:14574: checking for fseeko" >&5
14575 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14576 if test "${ac_cv_func_fseeko+set}" = set; then
14577 echo $ECHO_N "(cached) $ECHO_C" >&6
14579 cat >"conftest.$ac_ext" <<_ACEOF
14580 #line 14580 "configure"
14581 #include "confdefs.h"
14586 return fseeko && fseeko (stdin, 0, 0);
14591 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14592 if { (eval echo "$as_me:14592: \"$ac_link\"") >&5
14593 (eval $ac_link) 2>&5
14595 echo "$as_me:14595: \$? = $ac_status" >&5
14596 (exit "$ac_status"); } &&
14597 { ac_try='test -s "conftest$ac_exeext"'
14598 { (eval echo "$as_me:14598: \"$ac_try\"") >&5
14599 (eval $ac_try) 2>&5
14601 echo "$as_me:14601: \$? = $ac_status" >&5
14602 (exit "$ac_status"); }; }; then
14603 ac_cv_func_fseeko=yes
14605 echo "$as_me: failed program was:" >&5
14606 cat "conftest.$ac_ext" >&5
14607 ac_cv_func_fseeko=no
14609 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14611 echo "$as_me:14611: result: $ac_cv_func_fseeko" >&5
14612 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14613 if test $ac_cv_func_fseeko = yes; then
14615 cat >>confdefs.h <<\EOF
14616 #define HAVE_FSEEKO 1
14621 # Normally we would collect these definitions in the config.h,
14622 # but (like _XOPEN_SOURCE), some environments rely on having these
14623 # defined before any of the system headers are included. Another
14624 # case comes up with C++, e.g., on AIX the compiler compiles the
14625 # header files by themselves before looking at the body files it is
14626 # told to compile. For ncurses, those header files do not include
14628 if test "$ac_cv_sys_large_files" != no
14631 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14632 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14635 if test "$ac_cv_sys_largefile_source" != no
14638 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14639 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14642 if test "$ac_cv_sys_file_offset_bits" != no
14645 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14646 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14650 echo "$as_me:14650: checking whether to use struct dirent64" >&5
14651 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14652 if test "${cf_cv_struct_dirent64+set}" = set; then
14653 echo $ECHO_N "(cached) $ECHO_C" >&6
14656 cat >"conftest.$ac_ext" <<_ACEOF
14657 #line 14657 "configure"
14658 #include "confdefs.h"
14660 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14661 #include <sys/types.h>
14662 #include <dirent.h>
14668 /* if transitional largefile support is setup, this is true */
14669 extern struct dirent64 * readdir(DIR *);
14670 struct dirent64 *x = readdir((DIR *)0);
14671 struct dirent *y = readdir((DIR *)0);
14679 rm -f "conftest.$ac_objext"
14680 if { (eval echo "$as_me:14680: \"$ac_compile\"") >&5
14681 (eval $ac_compile) 2>&5
14683 echo "$as_me:14683: \$? = $ac_status" >&5
14684 (exit "$ac_status"); } &&
14685 { ac_try='test -s "conftest.$ac_objext"'
14686 { (eval echo "$as_me:14686: \"$ac_try\"") >&5
14687 (eval $ac_try) 2>&5
14689 echo "$as_me:14689: \$? = $ac_status" >&5
14690 (exit "$ac_status"); }; }; then
14691 cf_cv_struct_dirent64=yes
14693 echo "$as_me: failed program was:" >&5
14694 cat "conftest.$ac_ext" >&5
14695 cf_cv_struct_dirent64=no
14697 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14700 echo "$as_me:14700: result: $cf_cv_struct_dirent64" >&5
14701 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14702 test "$cf_cv_struct_dirent64" = yes &&
14703 cat >>confdefs.h <<\EOF
14704 #define HAVE_STRUCT_DIRENT64 1
14709 ### Enable compiling-in rcs id's
14710 echo "$as_me:14710: checking if RCS identifiers should be compiled-in" >&5
14711 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14713 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14714 if test "${with_rcs_ids+set}" = set; then
14715 withval="$with_rcs_ids"
14716 with_rcs_ids=$withval
14720 echo "$as_me:14720: result: $with_rcs_ids" >&5
14721 echo "${ECHO_T}$with_rcs_ids" >&6
14722 test "$with_rcs_ids" = yes &&
14723 cat >>confdefs.h <<\EOF
14724 #define USE_RCS_IDS 1
14727 ###############################################################################
14729 ### Note that some functions (such as const) are normally disabled anyway.
14730 echo "$as_me:14730: checking if you want to build with function extensions" >&5
14731 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14733 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14734 if test "${enable_ext_funcs+set}" = set; then
14735 enableval="$enable_ext_funcs"
14736 with_ext_funcs=$enableval
14740 echo "$as_me:14740: result: $with_ext_funcs" >&5
14741 echo "${ECHO_T}$with_ext_funcs" >&6
14742 if test "$with_ext_funcs" = yes ; then
14743 NCURSES_EXT_FUNCS=1
14745 cat >>confdefs.h <<\EOF
14746 #define HAVE_USE_DEFAULT_COLORS 1
14749 cat >>confdefs.h <<\EOF
14750 #define NCURSES_EXT_FUNCS 1
14754 NCURSES_EXT_FUNCS=0
14757 ### use option --enable-const to turn on use of const beyond that in XSI.
14758 echo "$as_me:14758: checking for extended use of const keyword" >&5
14759 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14761 # Check whether --enable-const or --disable-const was given.
14762 if test "${enable_const+set}" = set; then
14763 enableval="$enable_const"
14764 with_ext_const=$enableval
14768 echo "$as_me:14768: result: $with_ext_const" >&5
14769 echo "${ECHO_T}$with_ext_const" >&6
14770 NCURSES_CONST='/*nothing*/'
14771 if test "$with_ext_const" = yes ; then
14772 NCURSES_CONST=const
14775 ###############################################################################
14776 # These options are relatively safe to experiment with.
14778 echo "$as_me:14778: checking if you want all development code" >&5
14779 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14781 # Check whether --with-develop or --without-develop was given.
14782 if test "${with_develop+set}" = set; then
14783 withval="$with_develop"
14784 with_develop=$withval
14788 echo "$as_me:14788: result: $with_develop" >&5
14789 echo "${ECHO_T}$with_develop" >&6
14791 ###############################################################################
14792 # These are just experimental, probably should not be in a package:
14794 # This is still experimental (20080329), but should ultimately be moved to
14795 # the script-block --with-normal, etc.
14797 echo "$as_me:14797: checking if you want to link with the pthread library" >&5
14798 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14800 # Check whether --with-pthread or --without-pthread was given.
14801 if test "${with_pthread+set}" = set; then
14802 withval="$with_pthread"
14803 with_pthread=$withval
14807 echo "$as_me:14807: result: $with_pthread" >&5
14808 echo "${ECHO_T}$with_pthread" >&6
14810 if test "$with_pthread" != no ; then
14811 echo "$as_me:14811: checking for pthread.h" >&5
14812 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14813 if test "${ac_cv_header_pthread_h+set}" = set; then
14814 echo $ECHO_N "(cached) $ECHO_C" >&6
14816 cat >"conftest.$ac_ext" <<_ACEOF
14817 #line 14817 "configure"
14818 #include "confdefs.h"
14819 #include <pthread.h>
14821 if { (eval echo "$as_me:14821: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14822 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14824 $EGREP -v '^ *\+' conftest.er1 >conftest.err
14826 cat conftest.err >&5
14827 echo "$as_me:14827: \$? = $ac_status" >&5
14828 (exit "$ac_status"); } >/dev/null; then
14829 if test -s conftest.err; then
14830 ac_cpp_err=$ac_c_preproc_warn_flag
14837 if test -z "$ac_cpp_err"; then
14838 ac_cv_header_pthread_h=yes
14840 echo "$as_me: failed program was:" >&5
14841 cat "conftest.$ac_ext" >&5
14842 ac_cv_header_pthread_h=no
14844 rm -f conftest.err "conftest.$ac_ext"
14846 echo "$as_me:14846: result: $ac_cv_header_pthread_h" >&5
14847 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14848 if test "$ac_cv_header_pthread_h" = yes; then
14850 cat >>confdefs.h <<\EOF
14851 #define HAVE_PTHREADS_H 1
14854 for cf_lib_pthread in pthread c_r
14856 echo "$as_me:14856: checking if we can link with the $cf_lib_pthread library" >&5
14857 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14858 cf_save_LIBS="$LIBS"
14860 cf_add_libs="$LIBS"
14863 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14864 # filter duplicates
14865 for cf_add_1lib in $cf_add_0lib; do
14866 for cf_add_2lib in $cf_add_libs; do
14867 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14872 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14874 LIBS="$cf_add_libs"
14876 cat >"conftest.$ac_ext" <<_ACEOF
14877 #line 14877 "configure"
14878 #include "confdefs.h"
14880 #include <pthread.h>
14886 int rc = pthread_create(0,0,0,0);
14887 int r2 = pthread_mutexattr_settype(0, 0);
14893 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14894 if { (eval echo "$as_me:14894: \"$ac_link\"") >&5
14895 (eval $ac_link) 2>&5
14897 echo "$as_me:14897: \$? = $ac_status" >&5
14898 (exit "$ac_status"); } &&
14899 { ac_try='test -s "conftest$ac_exeext"'
14900 { (eval echo "$as_me:14900: \"$ac_try\"") >&5
14901 (eval $ac_try) 2>&5
14903 echo "$as_me:14903: \$? = $ac_status" >&5
14904 (exit "$ac_status"); }; }; then
14907 echo "$as_me: failed program was:" >&5
14908 cat "conftest.$ac_ext" >&5
14911 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14912 LIBS="$cf_save_LIBS"
14913 echo "$as_me:14913: result: $with_pthread" >&5
14914 echo "${ECHO_T}$with_pthread" >&6
14915 test "$with_pthread" = yes && break
14918 if test "$with_pthread" = yes ; then
14920 cf_add_libs="$LIBS"
14923 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14924 # filter duplicates
14925 for cf_add_1lib in $cf_add_0lib; do
14926 for cf_add_2lib in $cf_add_libs; do
14927 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14932 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14934 LIBS="$cf_add_libs"
14936 cat >>confdefs.h <<\EOF
14937 #define HAVE_LIBPTHREADS 1
14941 { { echo "$as_me:14941: error: Cannot link with pthread library" >&5
14942 echo "$as_me: error: Cannot link with pthread library" >&2;}
14943 { (exit 1); exit 1; }; }
14950 echo "$as_me:14950: checking if you want to use weak-symbols for pthreads" >&5
14951 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14953 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14954 if test "${enable_weak_symbols+set}" = set; then
14955 enableval="$enable_weak_symbols"
14956 use_weak_symbols=$withval
14958 use_weak_symbols=no
14960 echo "$as_me:14960: result: $use_weak_symbols" >&5
14961 echo "${ECHO_T}$use_weak_symbols" >&6
14962 if test "$use_weak_symbols" = yes ; then
14964 echo "$as_me:14964: checking if $CC supports weak symbols" >&5
14965 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14966 if test "${cf_cv_weak_symbols+set}" = set; then
14967 echo $ECHO_N "(cached) $ECHO_C" >&6
14970 cat >"conftest.$ac_ext" <<_ACEOF
14971 #line 14971 "configure"
14972 #include "confdefs.h"
14979 #if defined(__GNUC__)
14980 # if defined __USE_ISOC99
14981 # define _cat_pragma(exp) _Pragma(#exp)
14982 # define _weak_pragma(exp) _cat_pragma(weak name)
14984 # define _weak_pragma(exp)
14986 # define _declare(name) __extension__ extern __typeof__(name) name
14987 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
14990 weak_symbol(fopen);
14996 rm -f "conftest.$ac_objext"
14997 if { (eval echo "$as_me:14997: \"$ac_compile\"") >&5
14998 (eval $ac_compile) 2>&5
15000 echo "$as_me:15000: \$? = $ac_status" >&5
15001 (exit "$ac_status"); } &&
15002 { ac_try='test -s "conftest.$ac_objext"'
15003 { (eval echo "$as_me:15003: \"$ac_try\"") >&5
15004 (eval $ac_try) 2>&5
15006 echo "$as_me:15006: \$? = $ac_status" >&5
15007 (exit "$ac_status"); }; }; then
15008 cf_cv_weak_symbols=yes
15010 echo "$as_me: failed program was:" >&5
15011 cat "conftest.$ac_ext" >&5
15012 cf_cv_weak_symbols=no
15014 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15017 echo "$as_me:15017: result: $cf_cv_weak_symbols" >&5
15018 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15021 cf_cv_weak_symbols=no
15024 if test $cf_cv_weak_symbols = yes ; then
15026 cat >>confdefs.h <<\EOF
15027 #define USE_WEAK_SYMBOLS 1
15033 if test "$with_pthread" = "yes" ; then
15035 cat >>confdefs.h <<\EOF
15036 #define USE_PTHREADS 1
15039 enable_reentrant=yes
15040 if test $cf_cv_weak_symbols = yes ; then
15045 # OpenSUSE is installing ncurses6, using reentrant option.
15046 echo "$as_me:15046: checking for _nc_TABSIZE" >&5
15047 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
15048 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
15049 echo $ECHO_N "(cached) $ECHO_C" >&6
15051 cat >"conftest.$ac_ext" <<_ACEOF
15052 #line 15052 "configure"
15053 #include "confdefs.h"
15054 #define _nc_TABSIZE autoconf_temporary
15055 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15062 /* We use char because int might match the return type of a gcc2
15063 builtin and then its argument prototype would still apply. */
15064 char _nc_TABSIZE (void);
15070 /* The GNU C library defines stubs for functions which it implements
15071 to always fail with ENOSYS. Some functions are actually named
15072 something starting with __ and the normal name is an alias. */
15073 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
15074 #error found stub for _nc_TABSIZE
15077 return _nc_TABSIZE ();
15082 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15083 if { (eval echo "$as_me:15083: \"$ac_link\"") >&5
15084 (eval $ac_link) 2>&5
15086 echo "$as_me:15086: \$? = $ac_status" >&5
15087 (exit "$ac_status"); } &&
15088 { ac_try='test -s "conftest$ac_exeext"'
15089 { (eval echo "$as_me:15089: \"$ac_try\"") >&5
15090 (eval $ac_try) 2>&5
15092 echo "$as_me:15092: \$? = $ac_status" >&5
15093 (exit "$ac_status"); }; }; then
15094 ac_cv_func__nc_TABSIZE=yes
15096 echo "$as_me: failed program was:" >&5
15097 cat "conftest.$ac_ext" >&5
15098 ac_cv_func__nc_TABSIZE=no
15100 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15102 echo "$as_me:15102: result: $ac_cv_func__nc_TABSIZE" >&5
15103 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
15104 if test "$ac_cv_func__nc_TABSIZE" = yes; then
15105 assume_reentrant=yes
15107 assume_reentrant=no
15110 # Reentrant code has to be opaque; there's little advantage to making ncurses
15111 # opaque outside of that, so there is no --enable-opaque option. We can use
15112 # this option without --with-pthreads, but this will be always set for
15114 echo "$as_me:15114: checking if you want experimental reentrant code" >&5
15115 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
15117 # Check whether --enable-reentrant or --disable-reentrant was given.
15118 if test "${enable_reentrant+set}" = set; then
15119 enableval="$enable_reentrant"
15120 with_reentrant=$enableval
15122 with_reentrant=$assume_reentrant
15124 echo "$as_me:15124: result: $with_reentrant" >&5
15125 echo "${ECHO_T}$with_reentrant" >&6
15126 if test "$with_reentrant" = yes ; then
15127 cf_cv_enable_reentrant=1
15128 if test $cf_cv_weak_symbols = yes ; then
15130 # remove pthread library from $LIBS
15131 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
15133 elif test "$assume_reentrant" = no ; then
15134 LIB_SUFFIX="t${LIB_SUFFIX}"
15137 cat >>confdefs.h <<\EOF
15138 #define USE_REENTRANT 1
15142 cf_cv_enable_reentrant=0
15145 ### Allow using a different wrap-prefix
15146 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15147 echo "$as_me:15147: checking for prefix used to wrap public variables" >&5
15148 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15150 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15151 if test "${with_wrap_prefix+set}" = set; then
15152 withval="$with_wrap_prefix"
15153 NCURSES_WRAP_PREFIX=$withval
15155 NCURSES_WRAP_PREFIX=_nc_
15157 echo "$as_me:15157: result: $NCURSES_WRAP_PREFIX" >&5
15158 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15160 NCURSES_WRAP_PREFIX=_nc_
15163 cat >>confdefs.h <<EOF
15164 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15167 ###############################################################################
15169 ### use option --disable-echo to suppress full display compiling commands
15171 echo "$as_me:15171: checking if you want to see long compiling messages" >&5
15172 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15174 # Check whether --enable-echo or --disable-echo was given.
15175 if test "${enable_echo+set}" = set; then
15176 enableval="$enable_echo"
15177 test "$enableval" != no && enableval=yes
15178 if test "$enableval" != "yes" ; then
15181 ECHO_LD='@echo linking $@;'
15182 RULE_CC='@echo compiling $<'
15183 SHOW_CC='@echo compiling $@'
15205 echo "$as_me:15205: result: $enableval" >&5
15206 echo "${ECHO_T}$enableval" >&6
15208 echo "$as_me:15208: checking if you want to use C11 _Noreturn feature" >&5
15209 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
15211 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
15212 if test "${enable_stdnoreturn+set}" = set; then
15213 enableval="$enable_stdnoreturn"
15214 test "$enableval" != yes && enableval=no
15215 if test "$enableval" != "no" ; then
15216 enable_stdnoreturn=yes
15218 enable_stdnoreturn=no
15222 enable_stdnoreturn=no
15225 echo "$as_me:15225: result: $enable_stdnoreturn" >&5
15226 echo "${ECHO_T}$enable_stdnoreturn" >&6
15228 if test $enable_stdnoreturn = yes; then
15229 echo "$as_me:15229: checking for C11 _Noreturn feature" >&5
15230 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
15231 if test "${cf_cv_c11_noreturn+set}" = set; then
15232 echo $ECHO_N "(cached) $ECHO_C" >&6
15234 cat >"conftest.$ac_ext" <<_ACEOF
15235 #line 15235 "configure"
15236 #include "confdefs.h"
15239 #include <stdlib.h>
15240 #include <stdnoreturn.h>
15241 static _Noreturn void giveup(void) { exit(0); }
15246 if (feof(stdin)) giveup()
15251 rm -f "conftest.$ac_objext"
15252 if { (eval echo "$as_me:15252: \"$ac_compile\"") >&5
15253 (eval $ac_compile) 2>&5
15255 echo "$as_me:15255: \$? = $ac_status" >&5
15256 (exit "$ac_status"); } &&
15257 { ac_try='test -s "conftest.$ac_objext"'
15258 { (eval echo "$as_me:15258: \"$ac_try\"") >&5
15259 (eval $ac_try) 2>&5
15261 echo "$as_me:15261: \$? = $ac_status" >&5
15262 (exit "$ac_status"); }; }; then
15263 cf_cv_c11_noreturn=yes
15265 echo "$as_me: failed program was:" >&5
15266 cat "conftest.$ac_ext" >&5
15267 cf_cv_c11_noreturn=no
15269 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15272 echo "$as_me:15272: result: $cf_cv_c11_noreturn" >&5
15273 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
15275 cf_cv_c11_noreturn=no,
15278 if test "$cf_cv_c11_noreturn" = yes; then
15280 cat >>confdefs.h <<\EOF
15281 #define HAVE_STDNORETURN_H 1
15284 cat >>confdefs.h <<EOF
15285 #define STDC_NORETURN _Noreturn
15288 HAVE_STDNORETURN_H=1
15290 HAVE_STDNORETURN_H=0
15293 if test "$GCC" = yes || test "$GXX" = yes
15296 if test "$GCC" = yes || test "$GXX" = yes
15301 for cf_temp_scan in $CFLAGS
15303 case "x$cf_temp_scan" in
15306 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15307 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15312 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15313 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15318 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15319 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15324 if test "x$CFLAGS" != "x$cf_temp_flags"
15326 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
15328 echo "${as_me:-configure}:15328: testing repairing CFLAGS: $CFLAGS ..." 1>&5
15330 CFLAGS="$cf_temp_flags"
15331 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
15333 echo "${as_me:-configure}:15333: testing ... fixed $CFLAGS ..." 1>&5
15335 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15337 echo "${as_me:-configure}:15337: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15344 if test "$GCC" = yes || test "$GXX" = yes
15349 for cf_temp_scan in $CPPFLAGS
15351 case "x$cf_temp_scan" in
15354 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15355 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15360 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15361 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15366 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15367 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15372 if test "x$CPPFLAGS" != "x$cf_temp_flags"
15374 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
15376 echo "${as_me:-configure}:15376: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
15378 CPPFLAGS="$cf_temp_flags"
15379 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
15381 echo "${as_me:-configure}:15381: testing ... fixed $CPPFLAGS ..." 1>&5
15383 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15385 echo "${as_me:-configure}:15385: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15392 if test "$GCC" = yes || test "$GXX" = yes
15397 for cf_temp_scan in $LDFLAGS
15399 case "x$cf_temp_scan" in
15402 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15403 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15408 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15409 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15414 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15415 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15420 if test "x$LDFLAGS" != "x$cf_temp_flags"
15422 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
15424 echo "${as_me:-configure}:15424: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
15426 LDFLAGS="$cf_temp_flags"
15427 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
15429 echo "${as_me:-configure}:15429: testing ... fixed $LDFLAGS ..." 1>&5
15431 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15433 echo "${as_me:-configure}:15433: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15440 echo "$as_me:15440: checking if you want to turn on gcc warnings" >&5
15441 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
15443 # Check whether --enable-warnings or --disable-warnings was given.
15444 if test "${enable_warnings+set}" = set; then
15445 enableval="$enable_warnings"
15446 test "$enableval" != yes && enableval=no
15447 if test "$enableval" != "no" ; then
15448 enable_warnings=yes
15457 echo "$as_me:15457: result: $enable_warnings" >&5
15458 echo "${ECHO_T}$enable_warnings" >&6
15459 if test "$enable_warnings" = "yes"
15462 if test "x$have_x" = xyes; then
15464 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15465 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15466 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15467 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15468 for cf_X_CFLAGS in $X_CFLAGS
15470 case "x$cf_X_CFLAGS" in
15472 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15475 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15480 cat >"conftest.$ac_ext" <<_ACEOF
15481 #line 15481 "configure"
15482 #include "confdefs.h"
15484 #include <stdlib.h>
15485 #include <X11/Intrinsic.h>
15490 String foo = malloc(1); free((void*)foo)
15495 rm -f "conftest.$ac_objext"
15496 if { (eval echo "$as_me:15496: \"$ac_compile\"") >&5
15497 (eval $ac_compile) 2>&5
15499 echo "$as_me:15499: \$? = $ac_status" >&5
15500 (exit "$ac_status"); } &&
15501 { ac_try='test -s "conftest.$ac_objext"'
15502 { (eval echo "$as_me:15502: \"$ac_try\"") >&5
15503 (eval $ac_try) 2>&5
15505 echo "$as_me:15505: \$? = $ac_status" >&5
15506 (exit "$ac_status"); }; }; then
15508 echo "$as_me:15508: checking for X11/Xt const-feature" >&5
15509 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15510 if test "${cf_cv_const_x_string+set}" = set; then
15511 echo $ECHO_N "(cached) $ECHO_C" >&6
15514 cat >"conftest.$ac_ext" <<_ACEOF
15515 #line 15515 "configure"
15516 #include "confdefs.h"
15518 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15519 #undef XTSTRINGDEFINES /* X11R5 and later */
15520 #include <stdlib.h>
15521 #include <X11/Intrinsic.h>
15526 String foo = malloc(1); *foo = 0
15531 rm -f "conftest.$ac_objext"
15532 if { (eval echo "$as_me:15532: \"$ac_compile\"") >&5
15533 (eval $ac_compile) 2>&5
15535 echo "$as_me:15535: \$? = $ac_status" >&5
15536 (exit "$ac_status"); } &&
15537 { ac_try='test -s "conftest.$ac_objext"'
15538 { (eval echo "$as_me:15538: \"$ac_try\"") >&5
15539 (eval $ac_try) 2>&5
15541 echo "$as_me:15541: \$? = $ac_status" >&5
15542 (exit "$ac_status"); }; }; then
15544 cf_cv_const_x_string=no
15547 echo "$as_me: failed program was:" >&5
15548 cat "conftest.$ac_ext" >&5
15550 cf_cv_const_x_string=yes
15553 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15556 echo "$as_me:15556: result: $cf_cv_const_x_string" >&5
15557 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15559 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
15560 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
15561 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
15563 case "$cf_cv_const_x_string" in
15566 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15567 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15572 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15573 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15579 echo "$as_me: failed program was:" >&5
15580 cat "conftest.$ac_ext" >&5
15582 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15584 cat > "conftest.$ac_ext" <<EOF
15585 #line 15585 "${as_me:-configure}"
15586 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15588 if test "$INTEL_COMPILER" = yes
15590 # The "-wdXXX" options suppress warnings:
15591 # remark #1419: external declaration in primary source file
15592 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15593 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15594 # remark #193: zero used for undefined preprocessing identifier
15595 # remark #593: variable "curs_sb_left_arrow" was set but never used
15596 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15597 # remark #869: parameter "tw" was never referenced
15598 # remark #981: operands are evaluated in unspecified order
15599 # warning #279: controlling expression is constant
15601 { echo "$as_me:15601: checking for $CC warning options..." >&5
15602 echo "$as_me: checking for $CC warning options..." >&6;}
15603 cf_save_CFLAGS="$CFLAGS"
15604 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
15616 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15617 if { (eval echo "$as_me:15617: \"$ac_compile\"") >&5
15618 (eval $ac_compile) 2>&5
15620 echo "$as_me:15620: \$? = $ac_status" >&5
15621 (exit "$ac_status"); }; then
15622 test -n "$verbose" && echo "$as_me:15622: result: ... -$cf_opt" >&5
15623 echo "${ECHO_T}... -$cf_opt" >&6
15624 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15627 CFLAGS="$cf_save_CFLAGS"
15628 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
15630 { echo "$as_me:15630: checking for $CC warning options..." >&5
15631 echo "$as_me: checking for $CC warning options..." >&6;}
15632 cf_save_CFLAGS="$CFLAGS"
15634 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15635 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15636 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15637 for cf_opt in W Wall \
15638 Wbad-function-cast \
15641 Wdeclaration-after-statement \
15644 Wmissing-declarations \
15645 Wmissing-prototypes \
15649 Wstrict-prototypes \
15650 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15652 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15653 if { (eval echo "$as_me:15653: \"$ac_compile\"") >&5
15654 (eval $ac_compile) 2>&5
15656 echo "$as_me:15656: \$? = $ac_status" >&5
15657 (exit "$ac_status"); }; then
15658 test -n "$verbose" && echo "$as_me:15658: result: ... -$cf_opt" >&5
15659 echo "${ECHO_T}... -$cf_opt" >&6
15662 case "$GCC_VERSION" in
15664 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15666 echo "${as_me:-configure}:15666: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15672 case "$GCC_VERSION" in
15674 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15676 echo "${as_me:-configure}:15676: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15682 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15685 CFLAGS="$cf_save_CFLAGS"
15691 if test "$GCC" = yes || test "$GXX" = yes
15693 cat > conftest.i <<EOF
15695 #define GCC_PRINTF 0
15698 #define GCC_SCANF 0
15700 #ifndef GCC_NORETURN
15701 #define GCC_NORETURN /* nothing */
15704 #define GCC_UNUSED /* nothing */
15707 if test "$GCC" = yes
15709 { echo "$as_me:15709: checking for $CC __attribute__ directives..." >&5
15710 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15711 cat > "conftest.$ac_ext" <<EOF
15712 #line 15712 "${as_me:-configure}"
15713 #include "confdefs.h"
15714 #include "conftest.h"
15715 #include "conftest.i"
15717 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15719 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15722 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
15724 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
15726 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15727 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
15728 extern GCC_NORETURN void foo(void);
15729 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
15731 cf_printf_attribute=no
15732 cf_scanf_attribute=no
15733 for cf_attribute in scanf printf unused noreturn
15736 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15738 cf_directive="__attribute__(($cf_attribute))"
15739 echo "checking for $CC $cf_directive" 1>&5
15741 case "$cf_attribute" in
15743 cf_printf_attribute=yes
15744 cat >conftest.h <<EOF
15745 #define GCC_$cf_ATTRIBUTE 1
15749 cf_scanf_attribute=yes
15750 cat >conftest.h <<EOF
15751 #define GCC_$cf_ATTRIBUTE 1
15755 cat >conftest.h <<EOF
15756 #define GCC_$cf_ATTRIBUTE $cf_directive
15761 if { (eval echo "$as_me:15761: \"$ac_compile\"") >&5
15762 (eval $ac_compile) 2>&5
15764 echo "$as_me:15764: \$? = $ac_status" >&5
15765 (exit "$ac_status"); }; then
15766 test -n "$verbose" && echo "$as_me:15766: result: ... $cf_attribute" >&5
15767 echo "${ECHO_T}... $cf_attribute" >&6
15768 cat conftest.h >>confdefs.h
15769 case "$cf_attribute" in
15772 cat >>confdefs.h <<EOF
15773 #define GCC_NORETURN $cf_directive
15778 cf_value='/* nothing */'
15779 if test "$cf_printf_attribute" != no ; then
15780 cf_value='__attribute__((format(printf,fmt,var)))'
15782 cat >>confdefs.h <<\EOF
15783 #define GCC_PRINTF 1
15788 cat >>confdefs.h <<EOF
15789 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15794 cf_value='/* nothing */'
15795 if test "$cf_scanf_attribute" != no ; then
15796 cf_value='__attribute__((format(scanf,fmt,var)))'
15798 cat >>confdefs.h <<\EOF
15799 #define GCC_SCANF 1
15804 cat >>confdefs.h <<EOF
15805 #define GCC_SCANFLIKE(fmt,var) $cf_value
15811 cat >>confdefs.h <<EOF
15812 #define GCC_UNUSED $cf_directive
15820 ${FGREP-fgrep} define conftest.i >>confdefs.h
15827 if test "x$enable_warnings" = "xyes"; then
15829 ADAFLAGS="$ADAFLAGS -gnatg"
15833 ### use option --enable-assertions to turn on generation of assertion code
15834 echo "$as_me:15834: checking if you want to enable runtime assertions" >&5
15835 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15837 # Check whether --enable-assertions or --disable-assertions was given.
15838 if test "${enable_assertions+set}" = set; then
15839 enableval="$enable_assertions"
15840 with_assertions=$enableval
15844 echo "$as_me:15844: result: $with_assertions" >&5
15845 echo "${ECHO_T}$with_assertions" >&6
15848 if test "$with_assertions" = no
15850 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15853 ADAFLAGS="$ADAFLAGS -gnata"
15858 ### use option --disable-leaks to suppress "permanent" leaks, for testing
15860 cat >>confdefs.h <<\EOF
15861 #define HAVE_NC_ALLOC_H 1
15864 ### use option --enable-expanded to generate certain macros as functions
15866 # Check whether --enable-expanded or --disable-expanded was given.
15867 if test "${enable_expanded+set}" = set; then
15868 enableval="$enable_expanded"
15869 test "$enableval" = yes &&
15870 cat >>confdefs.h <<\EOF
15871 #define NCURSES_EXPANDED 1
15876 ### use option --disable-macros to suppress macros in favor of functions
15878 # Check whether --enable-macros or --disable-macros was given.
15879 if test "${enable_macros+set}" = set; then
15880 enableval="$enable_macros"
15881 test "$enableval" = no &&
15882 cat >>confdefs.h <<\EOF
15883 #define NCURSES_NOMACROS 1
15888 # Normally we only add trace() to the debug-library. Allow this to be
15889 # extended to all models of the ncurses library:
15891 case "$CFLAGS $CPPFLAGS" in
15897 echo "$as_me:15897: checking whether to add trace feature to all models" >&5
15898 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
15900 # Check whether --with-trace or --without-trace was given.
15901 if test "${with_trace+set}" = set; then
15902 withval="$with_trace"
15903 cf_with_trace=$withval
15905 cf_with_trace=$cf_all_traces
15907 echo "$as_me:15907: result: $cf_with_trace" >&5
15908 echo "${ECHO_T}$cf_with_trace" >&6
15910 if test "$cf_with_trace" = yes ; then
15916 cf_new_extra_cppflags=
15918 for cf_add_cflags in -DTRACE
15920 case "$cf_fix_cppflags" in
15922 case "$cf_add_cflags" in
15923 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15924 case "$cf_add_cflags" in
15926 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15928 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15929 && test -z "${cf_tst_cflags}" \
15930 && cf_fix_cppflags=yes
15932 if test "$cf_fix_cppflags" = yes ; then
15934 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15935 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15938 elif test "${cf_tst_cflags}" = "\"'" ; then
15940 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15941 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15947 case "$CPPFLAGS" in
15951 case "$cf_add_cflags" in
15953 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15955 CPPFLAGS=`echo "$CPPFLAGS" | \
15956 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15957 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15962 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15963 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15970 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15971 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15978 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15979 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15981 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15983 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15984 && test -z "${cf_tst_cflags}" \
15985 && cf_fix_cppflags=no
15990 if test -n "$cf_new_cflags" ; then
15992 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15993 CFLAGS="${CFLAGS}$cf_new_cflags"
15997 if test -n "$cf_new_cppflags" ; then
15999 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16000 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16004 if test -n "$cf_new_extra_cppflags" ; then
16006 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16007 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16015 echo "$as_me:16015: checking if we want to use GNAT projects" >&5
16016 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
16018 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
16019 if test "${enable_gnat_projects+set}" = set; then
16020 enableval="$enable_gnat_projects"
16021 test "$enableval" != no && enableval=yes
16022 if test "$enableval" != "yes" ; then
16023 enable_gnat_projects=no
16025 enable_gnat_projects=yes
16029 enable_gnat_projects=yes
16032 echo "$as_me:16032: result: $enable_gnat_projects" >&5
16033 echo "${ECHO_T}$enable_gnat_projects" >&6
16035 ### Checks for libraries.
16036 case $cf_cv_system_name in
16039 echo "$as_me:16039: checking if ssp library is needed" >&5
16040 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
16041 if test "${cf_cv_need_libssp+set}" = set; then
16042 echo $ECHO_N "(cached) $ECHO_C" >&6
16045 cat >"conftest.$ac_ext" <<_ACEOF
16046 #line 16046 "configure"
16047 #include "confdefs.h"
16049 #include <sys/types.h>
16050 #include <dirent.h>
16056 DIR *dp = opendir(".");
16062 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16063 if { (eval echo "$as_me:16063: \"$ac_link\"") >&5
16064 (eval $ac_link) 2>&5
16066 echo "$as_me:16066: \$? = $ac_status" >&5
16067 (exit "$ac_status"); } &&
16068 { ac_try='test -s "conftest$ac_exeext"'
16069 { (eval echo "$as_me:16069: \"$ac_try\"") >&5
16070 (eval $ac_try) 2>&5
16072 echo "$as_me:16072: \$? = $ac_status" >&5
16073 (exit "$ac_status"); }; }; then
16074 cf_cv_need_libssp=no
16076 echo "$as_me: failed program was:" >&5
16077 cat "conftest.$ac_ext" >&5
16079 cf_save_LIBS="$LIBS"
16081 cat >"conftest.$ac_ext" <<_ACEOF
16082 #line 16082 "configure"
16083 #include "confdefs.h"
16085 #include <sys/types.h>
16086 #include <dirent.h>
16092 DIR *dp = opendir(".");
16098 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16099 if { (eval echo "$as_me:16099: \"$ac_link\"") >&5
16100 (eval $ac_link) 2>&5
16102 echo "$as_me:16102: \$? = $ac_status" >&5
16103 (exit "$ac_status"); } &&
16104 { ac_try='test -s "conftest$ac_exeext"'
16105 { (eval echo "$as_me:16105: \"$ac_try\"") >&5
16106 (eval $ac_try) 2>&5
16108 echo "$as_me:16108: \$? = $ac_status" >&5
16109 (exit "$ac_status"); }; }; then
16110 cf_cv_need_libssp=yes
16112 echo "$as_me: failed program was:" >&5
16113 cat "conftest.$ac_ext" >&5
16114 cf_cv_need_libssp=maybe
16116 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16117 LIBS="$cf_save_LIBS"
16120 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16122 echo "$as_me:16122: result: $cf_cv_need_libssp" >&5
16123 echo "${ECHO_T}$cf_cv_need_libssp" >&6
16125 if test "x$cf_cv_need_libssp" = xyes
16128 cf_add_libs="$LIBS"
16131 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16132 # filter duplicates
16133 for cf_add_1lib in $cf_add_0lib; do
16134 for cf_add_2lib in $cf_add_libs; do
16135 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16140 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16142 LIBS="$cf_add_libs"
16148 echo "$as_me:16148: checking for gettimeofday" >&5
16149 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
16150 if test "${ac_cv_func_gettimeofday+set}" = set; then
16151 echo $ECHO_N "(cached) $ECHO_C" >&6
16153 cat >"conftest.$ac_ext" <<_ACEOF
16154 #line 16154 "configure"
16155 #include "confdefs.h"
16156 #define gettimeofday autoconf_temporary
16157 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16158 #undef gettimeofday
16164 /* We use char because int might match the return type of a gcc2
16165 builtin and then its argument prototype would still apply. */
16166 char gettimeofday (void);
16172 /* The GNU C library defines stubs for functions which it implements
16173 to always fail with ENOSYS. Some functions are actually named
16174 something starting with __ and the normal name is an alias. */
16175 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16176 #error found stub for gettimeofday
16179 return gettimeofday ();
16184 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16185 if { (eval echo "$as_me:16185: \"$ac_link\"") >&5
16186 (eval $ac_link) 2>&5
16188 echo "$as_me:16188: \$? = $ac_status" >&5
16189 (exit "$ac_status"); } &&
16190 { ac_try='test -s "conftest$ac_exeext"'
16191 { (eval echo "$as_me:16191: \"$ac_try\"") >&5
16192 (eval $ac_try) 2>&5
16194 echo "$as_me:16194: \$? = $ac_status" >&5
16195 (exit "$ac_status"); }; }; then
16196 ac_cv_func_gettimeofday=yes
16198 echo "$as_me: failed program was:" >&5
16199 cat "conftest.$ac_ext" >&5
16200 ac_cv_func_gettimeofday=no
16202 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16204 echo "$as_me:16204: result: $ac_cv_func_gettimeofday" >&5
16205 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16206 if test "$ac_cv_func_gettimeofday" = yes; then
16207 cat >>confdefs.h <<\EOF
16208 #define HAVE_GETTIMEOFDAY 1
16213 echo "$as_me:16213: checking for gettimeofday in -lbsd" >&5
16214 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
16215 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
16216 echo $ECHO_N "(cached) $ECHO_C" >&6
16218 ac_check_lib_save_LIBS=$LIBS
16220 cat >"conftest.$ac_ext" <<_ACEOF
16221 #line 16221 "configure"
16222 #include "confdefs.h"
16224 /* Override any gcc2 internal prototype to avoid an error. */
16228 /* We use char because int might match the return type of a gcc2
16229 builtin and then its argument prototype would still apply. */
16230 char gettimeofday ();
16239 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16240 if { (eval echo "$as_me:16240: \"$ac_link\"") >&5
16241 (eval $ac_link) 2>&5
16243 echo "$as_me:16243: \$? = $ac_status" >&5
16244 (exit "$ac_status"); } &&
16245 { ac_try='test -s "conftest$ac_exeext"'
16246 { (eval echo "$as_me:16246: \"$ac_try\"") >&5
16247 (eval $ac_try) 2>&5
16249 echo "$as_me:16249: \$? = $ac_status" >&5
16250 (exit "$ac_status"); }; }; then
16251 ac_cv_lib_bsd_gettimeofday=yes
16253 echo "$as_me: failed program was:" >&5
16254 cat "conftest.$ac_ext" >&5
16255 ac_cv_lib_bsd_gettimeofday=no
16257 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16258 LIBS=$ac_check_lib_save_LIBS
16260 echo "$as_me:16260: result: $ac_cv_lib_bsd_gettimeofday" >&5
16261 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
16262 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
16264 cat >>confdefs.h <<\EOF
16265 #define HAVE_GETTIMEOFDAY 1
16275 ### Checks for header files.
16276 echo "$as_me:16276: checking for ANSI C header files" >&5
16277 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16278 if test "${ac_cv_header_stdc+set}" = set; then
16279 echo $ECHO_N "(cached) $ECHO_C" >&6
16281 cat >"conftest.$ac_ext" <<_ACEOF
16282 #line 16282 "configure"
16283 #include "confdefs.h"
16284 #include <stdlib.h>
16285 #include <stdarg.h>
16286 #include <string.h>
16290 if { (eval echo "$as_me:16290: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16291 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16293 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16295 cat conftest.err >&5
16296 echo "$as_me:16296: \$? = $ac_status" >&5
16297 (exit "$ac_status"); } >/dev/null; then
16298 if test -s conftest.err; then
16299 ac_cpp_err=$ac_c_preproc_warn_flag
16306 if test -z "$ac_cpp_err"; then
16307 ac_cv_header_stdc=yes
16309 echo "$as_me: failed program was:" >&5
16310 cat "conftest.$ac_ext" >&5
16311 ac_cv_header_stdc=no
16313 rm -f conftest.err "conftest.$ac_ext"
16315 if test $ac_cv_header_stdc = yes; then
16316 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16317 cat >"conftest.$ac_ext" <<_ACEOF
16318 #line 16318 "configure"
16319 #include "confdefs.h"
16320 #include <string.h>
16323 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16324 $EGREP "memchr" >/dev/null 2>&1; then
16327 ac_cv_header_stdc=no
16333 if test $ac_cv_header_stdc = yes; then
16334 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16335 cat >"conftest.$ac_ext" <<_ACEOF
16336 #line 16336 "configure"
16337 #include "confdefs.h"
16338 #include <stdlib.h>
16341 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16342 $EGREP "free" >/dev/null 2>&1; then
16345 ac_cv_header_stdc=no
16351 if test $ac_cv_header_stdc = yes; then
16352 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16353 if test "$cross_compiling" = yes; then
16356 cat >"conftest.$ac_ext" <<_ACEOF
16357 #line 16357 "configure"
16358 #include "confdefs.h"
16360 #if ((' ' & 0x0FF) == 0x020)
16361 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16362 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16364 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16365 || ('j' <= (c) && (c) <= 'r') \
16366 || ('s' <= (c) && (c) <= 'z'))
16367 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16370 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16375 for (i = 0; i < 256; i++)
16376 if (XOR (islower (i), ISLOWER (i))
16377 || toupper (i) != TOUPPER (i))
16378 $ac_main_return(2);
16379 $ac_main_return (0);
16382 rm -f "conftest$ac_exeext"
16383 if { (eval echo "$as_me:16383: \"$ac_link\"") >&5
16384 (eval $ac_link) 2>&5
16386 echo "$as_me:16386: \$? = $ac_status" >&5
16387 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16388 { (eval echo "$as_me:16388: \"$ac_try\"") >&5
16389 (eval $ac_try) 2>&5
16391 echo "$as_me:16391: \$? = $ac_status" >&5
16392 (exit "$ac_status"); }; }; then
16395 echo "$as_me: program exited with status $ac_status" >&5
16396 echo "$as_me: failed program was:" >&5
16397 cat "conftest.$ac_ext" >&5
16398 ac_cv_header_stdc=no
16400 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16404 echo "$as_me:16404: result: $ac_cv_header_stdc" >&5
16405 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16406 if test $ac_cv_header_stdc = yes; then
16408 cat >>confdefs.h <<\EOF
16409 #define STDC_HEADERS 1
16414 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
16416 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
16417 inttypes.h stdint.h unistd.h
16419 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16420 echo "$as_me:16420: checking for $ac_header" >&5
16421 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16422 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16423 echo $ECHO_N "(cached) $ECHO_C" >&6
16425 cat >"conftest.$ac_ext" <<_ACEOF
16426 #line 16426 "configure"
16427 #include "confdefs.h"
16428 $ac_includes_default
16429 #include <$ac_header>
16431 rm -f "conftest.$ac_objext"
16432 if { (eval echo "$as_me:16432: \"$ac_compile\"") >&5
16433 (eval $ac_compile) 2>&5
16435 echo "$as_me:16435: \$? = $ac_status" >&5
16436 (exit "$ac_status"); } &&
16437 { ac_try='test -s "conftest.$ac_objext"'
16438 { (eval echo "$as_me:16438: \"$ac_try\"") >&5
16439 (eval $ac_try) 2>&5
16441 echo "$as_me:16441: \$? = $ac_status" >&5
16442 (exit "$ac_status"); }; }; then
16443 eval "$as_ac_Header=yes"
16445 echo "$as_me: failed program was:" >&5
16446 cat "conftest.$ac_ext" >&5
16447 eval "$as_ac_Header=no"
16449 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16451 echo "$as_me:16451: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16452 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16453 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16454 cat >>confdefs.h <<EOF
16455 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16461 echo "$as_me:16461: checking for signed char" >&5
16462 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
16463 if test "${ac_cv_type_signed_char+set}" = set; then
16464 echo $ECHO_N "(cached) $ECHO_C" >&6
16466 cat >"conftest.$ac_ext" <<_ACEOF
16467 #line 16467 "configure"
16468 #include "confdefs.h"
16469 $ac_includes_default
16473 if ((signed char *) 0)
16475 if (sizeof (signed char))
16481 rm -f "conftest.$ac_objext"
16482 if { (eval echo "$as_me:16482: \"$ac_compile\"") >&5
16483 (eval $ac_compile) 2>&5
16485 echo "$as_me:16485: \$? = $ac_status" >&5
16486 (exit "$ac_status"); } &&
16487 { ac_try='test -s "conftest.$ac_objext"'
16488 { (eval echo "$as_me:16488: \"$ac_try\"") >&5
16489 (eval $ac_try) 2>&5
16491 echo "$as_me:16491: \$? = $ac_status" >&5
16492 (exit "$ac_status"); }; }; then
16493 ac_cv_type_signed_char=yes
16495 echo "$as_me: failed program was:" >&5
16496 cat "conftest.$ac_ext" >&5
16497 ac_cv_type_signed_char=no
16499 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16501 echo "$as_me:16501: result: $ac_cv_type_signed_char" >&5
16502 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
16504 echo "$as_me:16504: checking size of signed char" >&5
16505 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
16506 if test "${ac_cv_sizeof_signed_char+set}" = set; then
16507 echo $ECHO_N "(cached) $ECHO_C" >&6
16509 if test "$ac_cv_type_signed_char" = yes; then
16510 if test "$cross_compiling" = yes; then
16511 # Depending upon the size, compute the lo and hi bounds.
16512 cat >"conftest.$ac_ext" <<_ACEOF
16513 #line 16513 "configure"
16514 #include "confdefs.h"
16515 $ac_includes_default
16519 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
16524 rm -f "conftest.$ac_objext"
16525 if { (eval echo "$as_me:16525: \"$ac_compile\"") >&5
16526 (eval $ac_compile) 2>&5
16528 echo "$as_me:16528: \$? = $ac_status" >&5
16529 (exit "$ac_status"); } &&
16530 { ac_try='test -s "conftest.$ac_objext"'
16531 { (eval echo "$as_me:16531: \"$ac_try\"") >&5
16532 (eval $ac_try) 2>&5
16534 echo "$as_me:16534: \$? = $ac_status" >&5
16535 (exit "$ac_status"); }; }; then
16538 cat >"conftest.$ac_ext" <<_ACEOF
16539 #line 16539 "configure"
16540 #include "confdefs.h"
16541 $ac_includes_default
16545 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16550 rm -f "conftest.$ac_objext"
16551 if { (eval echo "$as_me:16551: \"$ac_compile\"") >&5
16552 (eval $ac_compile) 2>&5
16554 echo "$as_me:16554: \$? = $ac_status" >&5
16555 (exit "$ac_status"); } &&
16556 { ac_try='test -s "conftest.$ac_objext"'
16557 { (eval echo "$as_me:16557: \"$ac_try\"") >&5
16558 (eval $ac_try) 2>&5
16560 echo "$as_me:16560: \$? = $ac_status" >&5
16561 (exit "$ac_status"); }; }; then
16562 ac_hi=$ac_mid; break
16564 echo "$as_me: failed program was:" >&5
16565 cat "conftest.$ac_ext" >&5
16566 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
16568 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16571 echo "$as_me: failed program was:" >&5
16572 cat "conftest.$ac_ext" >&5
16575 cat >"conftest.$ac_ext" <<_ACEOF
16576 #line 16576 "configure"
16577 #include "confdefs.h"
16578 $ac_includes_default
16582 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
16587 rm -f "conftest.$ac_objext"
16588 if { (eval echo "$as_me:16588: \"$ac_compile\"") >&5
16589 (eval $ac_compile) 2>&5
16591 echo "$as_me:16591: \$? = $ac_status" >&5
16592 (exit "$ac_status"); } &&
16593 { ac_try='test -s "conftest.$ac_objext"'
16594 { (eval echo "$as_me:16594: \"$ac_try\"") >&5
16595 (eval $ac_try) 2>&5
16597 echo "$as_me:16597: \$? = $ac_status" >&5
16598 (exit "$ac_status"); }; }; then
16599 ac_lo=$ac_mid; break
16601 echo "$as_me: failed program was:" >&5
16602 cat "conftest.$ac_ext" >&5
16603 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
16605 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16608 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16609 # Binary search between lo and hi bounds.
16610 while test "x$ac_lo" != "x$ac_hi"; do
16611 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
16612 cat >"conftest.$ac_ext" <<_ACEOF
16613 #line 16613 "configure"
16614 #include "confdefs.h"
16615 $ac_includes_default
16619 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16624 rm -f "conftest.$ac_objext"
16625 if { (eval echo "$as_me:16625: \"$ac_compile\"") >&5
16626 (eval $ac_compile) 2>&5
16628 echo "$as_me:16628: \$? = $ac_status" >&5
16629 (exit "$ac_status"); } &&
16630 { ac_try='test -s "conftest.$ac_objext"'
16631 { (eval echo "$as_me:16631: \"$ac_try\"") >&5
16632 (eval $ac_try) 2>&5
16634 echo "$as_me:16634: \$? = $ac_status" >&5
16635 (exit "$ac_status"); }; }; then
16638 echo "$as_me: failed program was:" >&5
16639 cat "conftest.$ac_ext" >&5
16640 ac_lo=`expr "$ac_mid" + 1`
16642 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16644 ac_cv_sizeof_signed_char=$ac_lo
16646 if test "$cross_compiling" = yes; then
16647 { { echo "$as_me:16647: error: cannot run test program while cross compiling" >&5
16648 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16649 { (exit 1); exit 1; }; }
16651 cat >"conftest.$ac_ext" <<_ACEOF
16652 #line 16652 "configure"
16653 #include "confdefs.h"
16654 $ac_includes_default
16658 FILE *f = fopen ("conftest.val", "w");
16660 $ac_main_return (1);
16661 fprintf (f, "%ld", (long)(sizeof (signed char)));
16667 rm -f "conftest$ac_exeext"
16668 if { (eval echo "$as_me:16668: \"$ac_link\"") >&5
16669 (eval $ac_link) 2>&5
16671 echo "$as_me:16671: \$? = $ac_status" >&5
16672 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16673 { (eval echo "$as_me:16673: \"$ac_try\"") >&5
16674 (eval $ac_try) 2>&5
16676 echo "$as_me:16676: \$? = $ac_status" >&5
16677 (exit "$ac_status"); }; }; then
16678 ac_cv_sizeof_signed_char=`cat conftest.val`
16680 echo "$as_me: program exited with status $ac_status" >&5
16681 echo "$as_me: failed program was:" >&5
16682 cat "conftest.$ac_ext" >&5
16684 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16689 ac_cv_sizeof_signed_char=0
16692 echo "$as_me:16692: result: $ac_cv_sizeof_signed_char" >&5
16693 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
16694 cat >>confdefs.h <<EOF
16695 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
16698 echo "$as_me:16698: checking for ANSI C header files" >&5
16699 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16700 if test "${ac_cv_header_stdc+set}" = set; then
16701 echo $ECHO_N "(cached) $ECHO_C" >&6
16703 cat >"conftest.$ac_ext" <<_ACEOF
16704 #line 16704 "configure"
16705 #include "confdefs.h"
16706 #include <stdlib.h>
16707 #include <stdarg.h>
16708 #include <string.h>
16712 if { (eval echo "$as_me:16712: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16713 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16715 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16717 cat conftest.err >&5
16718 echo "$as_me:16718: \$? = $ac_status" >&5
16719 (exit "$ac_status"); } >/dev/null; then
16720 if test -s conftest.err; then
16721 ac_cpp_err=$ac_c_preproc_warn_flag
16728 if test -z "$ac_cpp_err"; then
16729 ac_cv_header_stdc=yes
16731 echo "$as_me: failed program was:" >&5
16732 cat "conftest.$ac_ext" >&5
16733 ac_cv_header_stdc=no
16735 rm -f conftest.err "conftest.$ac_ext"
16737 if test $ac_cv_header_stdc = yes; then
16738 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16739 cat >"conftest.$ac_ext" <<_ACEOF
16740 #line 16740 "configure"
16741 #include "confdefs.h"
16742 #include <string.h>
16745 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16746 $EGREP "memchr" >/dev/null 2>&1; then
16749 ac_cv_header_stdc=no
16755 if test $ac_cv_header_stdc = yes; then
16756 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16757 cat >"conftest.$ac_ext" <<_ACEOF
16758 #line 16758 "configure"
16759 #include "confdefs.h"
16760 #include <stdlib.h>
16763 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16764 $EGREP "free" >/dev/null 2>&1; then
16767 ac_cv_header_stdc=no
16773 if test $ac_cv_header_stdc = yes; then
16774 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16775 if test "$cross_compiling" = yes; then
16778 cat >"conftest.$ac_ext" <<_ACEOF
16779 #line 16779 "configure"
16780 #include "confdefs.h"
16782 #if ((' ' & 0x0FF) == 0x020)
16783 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16784 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16786 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16787 || ('j' <= (c) && (c) <= 'r') \
16788 || ('s' <= (c) && (c) <= 'z'))
16789 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16792 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16797 for (i = 0; i < 256; i++)
16798 if (XOR (islower (i), ISLOWER (i))
16799 || toupper (i) != TOUPPER (i))
16800 $ac_main_return(2);
16801 $ac_main_return (0);
16804 rm -f "conftest$ac_exeext"
16805 if { (eval echo "$as_me:16805: \"$ac_link\"") >&5
16806 (eval $ac_link) 2>&5
16808 echo "$as_me:16808: \$? = $ac_status" >&5
16809 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16810 { (eval echo "$as_me:16810: \"$ac_try\"") >&5
16811 (eval $ac_try) 2>&5
16813 echo "$as_me:16813: \$? = $ac_status" >&5
16814 (exit "$ac_status"); }; }; then
16817 echo "$as_me: program exited with status $ac_status" >&5
16818 echo "$as_me: failed program was:" >&5
16819 cat "conftest.$ac_ext" >&5
16820 ac_cv_header_stdc=no
16822 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16826 echo "$as_me:16826: result: $ac_cv_header_stdc" >&5
16827 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16828 if test $ac_cv_header_stdc = yes; then
16830 cat >>confdefs.h <<\EOF
16831 #define STDC_HEADERS 1
16836 ac_header_dirent=no
16837 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16838 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16839 echo "$as_me:16839: checking for $ac_hdr that defines DIR" >&5
16840 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16841 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16842 echo $ECHO_N "(cached) $ECHO_C" >&6
16844 cat >"conftest.$ac_ext" <<_ACEOF
16845 #line 16845 "configure"
16846 #include "confdefs.h"
16847 #include <sys/types.h>
16859 rm -f "conftest.$ac_objext"
16860 if { (eval echo "$as_me:16860: \"$ac_compile\"") >&5
16861 (eval $ac_compile) 2>&5
16863 echo "$as_me:16863: \$? = $ac_status" >&5
16864 (exit "$ac_status"); } &&
16865 { ac_try='test -s "conftest.$ac_objext"'
16866 { (eval echo "$as_me:16866: \"$ac_try\"") >&5
16867 (eval $ac_try) 2>&5
16869 echo "$as_me:16869: \$? = $ac_status" >&5
16870 (exit "$ac_status"); }; }; then
16871 eval "$as_ac_Header=yes"
16873 echo "$as_me: failed program was:" >&5
16874 cat "conftest.$ac_ext" >&5
16875 eval "$as_ac_Header=no"
16877 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16879 echo "$as_me:16879: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16880 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16881 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16882 cat >>confdefs.h <<EOF
16883 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16886 ac_header_dirent=$ac_hdr; break
16890 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
16891 if test $ac_header_dirent = dirent.h; then
16892 echo "$as_me:16892: checking for opendir in -ldir" >&5
16893 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
16894 if test "${ac_cv_lib_dir_opendir+set}" = set; then
16895 echo $ECHO_N "(cached) $ECHO_C" >&6
16897 ac_check_lib_save_LIBS=$LIBS
16899 cat >"conftest.$ac_ext" <<_ACEOF
16900 #line 16900 "configure"
16901 #include "confdefs.h"
16903 /* Override any gcc2 internal prototype to avoid an error. */
16907 /* We use char because int might match the return type of a gcc2
16908 builtin and then its argument prototype would still apply. */
16918 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16919 if { (eval echo "$as_me:16919: \"$ac_link\"") >&5
16920 (eval $ac_link) 2>&5
16922 echo "$as_me:16922: \$? = $ac_status" >&5
16923 (exit "$ac_status"); } &&
16924 { ac_try='test -s "conftest$ac_exeext"'
16925 { (eval echo "$as_me:16925: \"$ac_try\"") >&5
16926 (eval $ac_try) 2>&5
16928 echo "$as_me:16928: \$? = $ac_status" >&5
16929 (exit "$ac_status"); }; }; then
16930 ac_cv_lib_dir_opendir=yes
16932 echo "$as_me: failed program was:" >&5
16933 cat "conftest.$ac_ext" >&5
16934 ac_cv_lib_dir_opendir=no
16936 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16937 LIBS=$ac_check_lib_save_LIBS
16939 echo "$as_me:16939: result: $ac_cv_lib_dir_opendir" >&5
16940 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
16941 if test "$ac_cv_lib_dir_opendir" = yes; then
16946 echo "$as_me:16946: checking for opendir in -lx" >&5
16947 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
16948 if test "${ac_cv_lib_x_opendir+set}" = set; then
16949 echo $ECHO_N "(cached) $ECHO_C" >&6
16951 ac_check_lib_save_LIBS=$LIBS
16953 cat >"conftest.$ac_ext" <<_ACEOF
16954 #line 16954 "configure"
16955 #include "confdefs.h"
16957 /* Override any gcc2 internal prototype to avoid an error. */
16961 /* We use char because int might match the return type of a gcc2
16962 builtin and then its argument prototype would still apply. */
16972 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16973 if { (eval echo "$as_me:16973: \"$ac_link\"") >&5
16974 (eval $ac_link) 2>&5
16976 echo "$as_me:16976: \$? = $ac_status" >&5
16977 (exit "$ac_status"); } &&
16978 { ac_try='test -s "conftest$ac_exeext"'
16979 { (eval echo "$as_me:16979: \"$ac_try\"") >&5
16980 (eval $ac_try) 2>&5
16982 echo "$as_me:16982: \$? = $ac_status" >&5
16983 (exit "$ac_status"); }; }; then
16984 ac_cv_lib_x_opendir=yes
16986 echo "$as_me: failed program was:" >&5
16987 cat "conftest.$ac_ext" >&5
16988 ac_cv_lib_x_opendir=no
16990 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16991 LIBS=$ac_check_lib_save_LIBS
16993 echo "$as_me:16993: result: $ac_cv_lib_x_opendir" >&5
16994 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
16995 if test "$ac_cv_lib_x_opendir" = yes; then
17001 echo "$as_me:17001: checking whether time.h and sys/time.h may both be included" >&5
17002 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17003 if test "${ac_cv_header_time+set}" = set; then
17004 echo $ECHO_N "(cached) $ECHO_C" >&6
17006 cat >"conftest.$ac_ext" <<_ACEOF
17007 #line 17007 "configure"
17008 #include "confdefs.h"
17009 #include <sys/types.h>
17010 #include <sys/time.h>
17016 if ((struct tm *) 0)
17022 rm -f "conftest.$ac_objext"
17023 if { (eval echo "$as_me:17023: \"$ac_compile\"") >&5
17024 (eval $ac_compile) 2>&5
17026 echo "$as_me:17026: \$? = $ac_status" >&5
17027 (exit "$ac_status"); } &&
17028 { ac_try='test -s "conftest.$ac_objext"'
17029 { (eval echo "$as_me:17029: \"$ac_try\"") >&5
17030 (eval $ac_try) 2>&5
17032 echo "$as_me:17032: \$? = $ac_status" >&5
17033 (exit "$ac_status"); }; }; then
17034 ac_cv_header_time=yes
17036 echo "$as_me: failed program was:" >&5
17037 cat "conftest.$ac_ext" >&5
17038 ac_cv_header_time=no
17040 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17042 echo "$as_me:17042: result: $ac_cv_header_time" >&5
17043 echo "${ECHO_T}$ac_cv_header_time" >&6
17044 if test $ac_cv_header_time = yes; then
17046 cat >>confdefs.h <<\EOF
17047 #define TIME_WITH_SYS_TIME 1
17052 ### checks for compiler characteristics
17054 ac_cpp='$CPP $CPPFLAGS'
17055 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17056 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17057 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17058 ac_main_return="return"
17060 echo "$as_me:17060: checking for an ANSI C-conforming const" >&5
17061 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17062 if test "${ac_cv_c_const+set}" = set; then
17063 echo $ECHO_N "(cached) $ECHO_C" >&6
17065 cat >"conftest.$ac_ext" <<_ACEOF
17066 #line 17066 "configure"
17067 #include "confdefs.h"
17072 /* FIXME: Include the comments suggested by Paul. */
17073 #ifndef __cplusplus
17074 /* Ultrix mips cc rejects this. */
17075 typedef int charset[2];
17077 /* SunOS 4.1.1 cc rejects this. */
17078 char const *const *ccp;
17080 /* NEC SVR4.0.2 mips cc rejects this. */
17081 struct point {int x, y;};
17082 static struct point const zero = {0,0};
17083 /* AIX XL C 1.02.0.0 rejects this.
17084 It does not let you subtract one const X* pointer from another in
17085 an arm of an if-expression whose if-part is not a constant
17087 const char *g = "string";
17088 ccp = &g + (g ? g-g : 0);
17089 /* HPUX 7.0 cc rejects these. */
17092 ccp = (char const *const *) p;
17093 { /* SCO 3.2v4 cc rejects this. */
17095 char const *s = 0 ? (char *) 0 : (char const *) 0;
17099 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
17100 int x[] = {25, 17};
17101 const int *foo = &x[0];
17104 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17105 typedef const int *iptr;
17109 { /* AIX XL C 1.02.0.0 rejects this saying
17110 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17111 struct s { int j; const int *ap[3]; };
17112 struct s *b; b->j = 5;
17114 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17115 const int foo = 10;
17123 rm -f "conftest.$ac_objext"
17124 if { (eval echo "$as_me:17124: \"$ac_compile\"") >&5
17125 (eval $ac_compile) 2>&5
17127 echo "$as_me:17127: \$? = $ac_status" >&5
17128 (exit "$ac_status"); } &&
17129 { ac_try='test -s "conftest.$ac_objext"'
17130 { (eval echo "$as_me:17130: \"$ac_try\"") >&5
17131 (eval $ac_try) 2>&5
17133 echo "$as_me:17133: \$? = $ac_status" >&5
17134 (exit "$ac_status"); }; }; then
17137 echo "$as_me: failed program was:" >&5
17138 cat "conftest.$ac_ext" >&5
17141 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17143 echo "$as_me:17143: result: $ac_cv_c_const" >&5
17144 echo "${ECHO_T}$ac_cv_c_const" >&6
17145 if test $ac_cv_c_const = no; then
17147 cat >>confdefs.h <<\EOF
17153 ### Checks for external-data
17155 echo "$as_me:17155: checking if data-only library module links" >&5
17156 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
17157 if test "${cf_cv_link_dataonly+set}" = set; then
17158 echo $ECHO_N "(cached) $ECHO_C" >&6
17162 cat >conftest.$ac_ext <<EOF
17163 #line 17163 "configure"
17164 int testdata[3] = { 123, 456, 789 };
17166 if { (eval echo "$as_me:17166: \"$ac_compile\"") >&5
17167 (eval $ac_compile) 2>&5
17169 echo "$as_me:17169: \$? = $ac_status" >&5
17170 (exit "$ac_status"); } ; then
17171 mv conftest.o data.o && \
17172 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
17174 rm -f conftest.$ac_ext data.o
17175 cat >conftest.$ac_ext <<EOF
17176 #line 17176 "configure"
17180 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
17182 extern int testdata[3];
17183 return testdata[0] == 123
17184 && testdata[1] == 456
17185 && testdata[2] == 789;
17189 if { (eval echo "$as_me:17189: \"$ac_compile\"") >&5
17190 (eval $ac_compile) 2>&5
17192 echo "$as_me:17192: \$? = $ac_status" >&5
17193 (exit "$ac_status"); }; then
17194 mv conftest.o func.o && \
17195 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17197 rm -f conftest.$ac_ext func.o
17198 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17199 cf_saveLIBS="$LIBS"
17200 LIBS="conftest.a $LIBS"
17201 if test "$cross_compiling" = yes; then
17202 cf_cv_link_dataonly=unknown
17204 cat >"conftest.$ac_ext" <<_ACEOF
17205 #line 17205 "configure"
17206 #include "confdefs.h"
17210 extern int testfunc();
17211 ${cf_cv_main_return:-return} (!testfunc());
17215 rm -f "conftest$ac_exeext"
17216 if { (eval echo "$as_me:17216: \"$ac_link\"") >&5
17217 (eval $ac_link) 2>&5
17219 echo "$as_me:17219: \$? = $ac_status" >&5
17220 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17221 { (eval echo "$as_me:17221: \"$ac_try\"") >&5
17222 (eval $ac_try) 2>&5
17224 echo "$as_me:17224: \$? = $ac_status" >&5
17225 (exit "$ac_status"); }; }; then
17226 cf_cv_link_dataonly=yes
17228 echo "$as_me: program exited with status $ac_status" >&5
17229 echo "$as_me: failed program was:" >&5
17230 cat "conftest.$ac_ext" >&5
17231 cf_cv_link_dataonly=no
17233 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17235 LIBS="$cf_saveLIBS"
17239 echo "$as_me:17239: result: $cf_cv_link_dataonly" >&5
17240 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17242 if test "$cf_cv_link_dataonly" = no ; then
17244 cat >>confdefs.h <<\EOF
17245 #define BROKEN_LINKER 1
17251 ### Checks for library functions.
17257 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17258 echo "$as_me:17258: checking for $ac_header" >&5
17259 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17260 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17261 echo $ECHO_N "(cached) $ECHO_C" >&6
17263 cat >"conftest.$ac_ext" <<_ACEOF
17264 #line 17264 "configure"
17265 #include "confdefs.h"
17266 #include <$ac_header>
17268 if { (eval echo "$as_me:17268: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17269 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17271 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17273 cat conftest.err >&5
17274 echo "$as_me:17274: \$? = $ac_status" >&5
17275 (exit "$ac_status"); } >/dev/null; then
17276 if test -s conftest.err; then
17277 ac_cpp_err=$ac_c_preproc_warn_flag
17284 if test -z "$ac_cpp_err"; then
17285 eval "$as_ac_Header=yes"
17287 echo "$as_me: failed program was:" >&5
17288 cat "conftest.$ac_ext" >&5
17289 eval "$as_ac_Header=no"
17291 rm -f conftest.err "conftest.$ac_ext"
17293 echo "$as_me:17293: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17294 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17295 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17296 cat >>confdefs.h <<EOF
17297 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17303 echo "$as_me:17303: checking for working mkstemp" >&5
17304 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17305 if test "${cf_cv_func_mkstemp+set}" = set; then
17306 echo $ECHO_N "(cached) $ECHO_C" >&6
17310 if test "$cross_compiling" = yes; then
17311 cf_cv_func_mkstemp=maybe
17313 cat >"conftest.$ac_ext" <<_ACEOF
17314 #line 17314 "configure"
17315 #include "confdefs.h"
17317 #include <sys/types.h>
17318 #ifdef HAVE_UNISTD_H
17319 #include <unistd.h>
17321 #include <stdlib.h>
17323 #include <string.h>
17324 #include <sys/stat.h>
17327 char *tmpl = "conftestXXXXXX";
17335 for (n = 0; n < 2; ++n) {
17336 strcpy(name[n], tmpl);
17337 if ((fd = mkstemp(name[n])) >= 0) {
17338 if (!strcmp(name[n], tmpl)
17339 || stat(name[n], &sb) != 0
17340 || (sb.st_mode & S_IFMT) != S_IFREG
17341 || (sb.st_mode & 077) != 0) {
17348 && !strcmp(name[0], name[1]))
17350 ${cf_cv_main_return:-return}(result);
17354 rm -f "conftest$ac_exeext"
17355 if { (eval echo "$as_me:17355: \"$ac_link\"") >&5
17356 (eval $ac_link) 2>&5
17358 echo "$as_me:17358: \$? = $ac_status" >&5
17359 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17360 { (eval echo "$as_me:17360: \"$ac_try\"") >&5
17361 (eval $ac_try) 2>&5
17363 echo "$as_me:17363: \$? = $ac_status" >&5
17364 (exit "$ac_status"); }; }; then
17365 cf_cv_func_mkstemp=yes
17368 echo "$as_me: program exited with status $ac_status" >&5
17369 echo "$as_me: failed program was:" >&5
17370 cat "conftest.$ac_ext" >&5
17371 cf_cv_func_mkstemp=no
17374 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17378 echo "$as_me:17378: result: $cf_cv_func_mkstemp" >&5
17379 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17380 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17381 echo "$as_me:17381: checking for mkstemp" >&5
17382 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17383 if test "${ac_cv_func_mkstemp+set}" = set; then
17384 echo $ECHO_N "(cached) $ECHO_C" >&6
17386 cat >"conftest.$ac_ext" <<_ACEOF
17387 #line 17387 "configure"
17388 #include "confdefs.h"
17389 #define mkstemp autoconf_temporary
17390 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17397 /* We use char because int might match the return type of a gcc2
17398 builtin and then its argument prototype would still apply. */
17399 char mkstemp (void);
17405 /* The GNU C library defines stubs for functions which it implements
17406 to always fail with ENOSYS. Some functions are actually named
17407 something starting with __ and the normal name is an alias. */
17408 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17409 #error found stub for mkstemp
17417 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17418 if { (eval echo "$as_me:17418: \"$ac_link\"") >&5
17419 (eval $ac_link) 2>&5
17421 echo "$as_me:17421: \$? = $ac_status" >&5
17422 (exit "$ac_status"); } &&
17423 { ac_try='test -s "conftest$ac_exeext"'
17424 { (eval echo "$as_me:17424: \"$ac_try\"") >&5
17425 (eval $ac_try) 2>&5
17427 echo "$as_me:17427: \$? = $ac_status" >&5
17428 (exit "$ac_status"); }; }; then
17429 ac_cv_func_mkstemp=yes
17431 echo "$as_me: failed program was:" >&5
17432 cat "conftest.$ac_ext" >&5
17433 ac_cv_func_mkstemp=no
17435 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17437 echo "$as_me:17437: result: $ac_cv_func_mkstemp" >&5
17438 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17441 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17443 cat >>confdefs.h <<\EOF
17444 #define HAVE_MKSTEMP 1
17449 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17450 CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17451 CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17455 if test "$cf_with_ada" != "no" ; then
17457 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
17460 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17462 unset ac_cv_path_cf_TEMP_gnat
17464 # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
17465 set dummy $cf_prog_gnat; ac_word=$2
17466 echo "$as_me:17466: checking for $ac_word" >&5
17467 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17468 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
17469 echo $ECHO_N "(cached) $ECHO_C" >&6
17471 case $cf_TEMP_gnat in
17473 ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
17476 ac_save_IFS=$IFS; IFS=$ac_path_separator
17478 for ac_dir in $ac_dummy; do
17480 test -z "$ac_dir" && ac_dir=.
17481 if $as_executable_p "$ac_dir/$ac_word"; then
17482 ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
17483 echo "$as_me:17483: found $ac_dir/$ac_word" >&5
17488 test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
17492 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
17494 if test -n "$cf_TEMP_gnat"; then
17495 echo "$as_me:17495: result: $cf_TEMP_gnat" >&5
17496 echo "${ECHO_T}$cf_TEMP_gnat" >&6
17498 echo "$as_me:17498: result: no" >&5
17499 echo "${ECHO_T}no" >&6
17502 eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
17504 if test "x$cf_TEMP_gnat" != xno; then
17505 unset cf_cv_gnat_version
17508 echo "$as_me:17508: checking for $cf_prog_gnat version" >&5
17509 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
17510 if test "${cf_cv_gnat_version+set}" = set; then
17511 echo $ECHO_N "(cached) $ECHO_C" >&6
17514 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
17515 grep '[0-9].[0-9][0-9]*' |\
17516 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17519 echo "$as_me:17519: result: $cf_cv_gnat_version" >&5
17520 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17521 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17522 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
17525 eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
17528 unset cf_cv_gnat_version
17529 unset ac_cv_path_cf_TEMP_gnat
17532 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
17534 cf_cv_prog_gnat_correct=no
17536 cf_ada_make=gnatmake
17537 if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
17538 # gprconfig is newer than gnatmake; we can continue...
17541 rm -rf ./conftest* ./*~conftest*
17542 if mkdir conftest.src
17546 for cf_gprconfig in Ada C
17548 echo "$as_me:17548: checking for gprconfig name for $cf_gprconfig" >&5
17549 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
17550 if test "$cf_gprconfig" = C
17552 for cf_gprconfig_param in \
17553 "$cf_gprconfig,,,,GNATGCC" \
17554 "$cf_gprconfig,,,,GCC" \
17557 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17558 test -n "$cf_gprconfig_value" && break
17561 cf_gprconfig_param=$cf_gprconfig
17562 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17564 if test -n "$cf_gprconfig_value"
17566 eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
17567 echo "$as_me:17567: result: $cf_gprconfig_value" >&5
17568 echo "${ECHO_T}$cf_gprconfig_value" >&6
17570 echo "$as_me:17570: result: missing" >&5
17571 echo "${ECHO_T}missing" >&6
17577 rm -rf ./conftest* ./*~conftest*
17580 if test "x$cf_ada_config" != "x#"
17583 echo "$as_me:17583: checking for gnat version" >&5
17584 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17585 if test "${cf_cv_gnat_version+set}" = set; then
17586 echo $ECHO_N "(cached) $ECHO_C" >&6
17589 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
17590 grep '[0-9].[0-9][0-9]*' |\
17591 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17594 echo "$as_me:17594: result: $cf_cv_gnat_version" >&5
17595 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17596 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17598 case "$cf_cv_gnat_version" in
17599 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17600 cf_cv_prog_gnat_correct=yes
17603 { echo "$as_me:17603: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
17604 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
17605 cf_cv_prog_gnat_correct=no
17609 # Extract the first word of "m4", so it can be a program name with args.
17610 set dummy m4; ac_word=$2
17611 echo "$as_me:17611: checking for $ac_word" >&5
17612 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17613 if test "${ac_cv_prog_M4_exists+set}" = set; then
17614 echo $ECHO_N "(cached) $ECHO_C" >&6
17616 if test -n "$M4_exists"; then
17617 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17619 ac_save_IFS=$IFS; IFS=$ac_path_separator
17621 for ac_dir in $ac_dummy; do
17623 test -z "$ac_dir" && ac_dir=.
17624 $as_executable_p "$ac_dir/$ac_word" || continue
17625 ac_cv_prog_M4_exists="yes"
17626 echo "$as_me:17626: found $ac_dir/$ac_word" >&5
17630 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17633 M4_exists=$ac_cv_prog_M4_exists
17634 if test -n "$M4_exists"; then
17635 echo "$as_me:17635: result: $M4_exists" >&5
17636 echo "${ECHO_T}$M4_exists" >&6
17638 echo "$as_me:17638: result: no" >&5
17639 echo "${ECHO_T}no" >&6
17642 if test "$ac_cv_prog_M4_exists" = no; then
17643 cf_cv_prog_gnat_correct=no
17644 { echo "$as_me:17644: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
17645 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
17647 if test "$cf_cv_prog_gnat_correct" = yes; then
17648 echo "$as_me:17648: checking if GNAT works" >&5
17649 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17651 rm -rf ./conftest* ./*~conftest*
17652 cat >>conftest.ads <<CF_EOF
17653 procedure conftest;
17655 cat >>conftest.adb <<CF_EOF
17658 procedure conftest is
17660 Text_IO.Put ("Hello World");
17662 GNAT.OS_Lib.OS_Exit (0);
17665 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17666 if ( ./conftest 1>&5 2>&1 ) ; then
17667 cf_cv_prog_gnat_correct=yes
17669 cf_cv_prog_gnat_correct=no
17672 cf_cv_prog_gnat_correct=no
17674 rm -rf ./conftest* ./*~conftest*
17676 echo "$as_me:17676: result: $cf_cv_prog_gnat_correct" >&5
17677 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17680 cf_cv_prog_gnat_correct=no
17684 if test "$cf_cv_prog_gnat_correct" = yes; then
17686 echo "$as_me:17686: checking optimization options for ADAFLAGS" >&5
17687 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
17691 ADAFLAGS="$ADAFLAGS -g"
17697 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
17699 ADAFLAGS="$ADAFLAGS $cf_O_flag"
17703 echo "$as_me:17703: result: $ADAFLAGS" >&5
17704 echo "${ECHO_T}$ADAFLAGS" >&6
17706 echo "$as_me:17706: checking if GNATPREP supports -T option" >&5
17707 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
17708 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
17709 echo $ECHO_N "(cached) $ECHO_C" >&6
17712 cf_cv_gnatprep_opt_t=no
17713 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
17716 echo "$as_me:17716: result: $cf_cv_gnatprep_opt_t" >&5
17717 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
17718 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
17720 echo "$as_me:17720: checking if GNAT supports generics" >&5
17721 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
17722 case "$cf_cv_gnat_version" in
17723 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17724 cf_gnat_generics=yes
17727 cf_gnat_generics=no
17730 echo "$as_me:17730: result: $cf_gnat_generics" >&5
17731 echo "${ECHO_T}$cf_gnat_generics" >&6
17733 if test "$cf_gnat_generics" = yes
17735 cf_compile_generics=generics
17736 cf_generic_objects="\${GENOBJS}"
17738 cf_compile_generics=
17739 cf_generic_objects=
17742 echo "$as_me:17742: checking if GNAT supports SIGINT" >&5
17743 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
17744 if test "${cf_cv_gnat_sigint+set}" = set; then
17745 echo $ECHO_N "(cached) $ECHO_C" >&6
17748 rm -rf ./conftest* ./*~conftest*
17749 cat >>conftest.ads <<CF_EOF
17750 with Ada.Interrupts.Names;
17752 package ConfTest is
17754 pragma Warnings (Off); -- the next pragma exists since 3.11p
17755 pragma Unreserve_All_Interrupts;
17756 pragma Warnings (On);
17758 protected Process is
17760 function Continue return Boolean;
17761 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
17763 Done : Boolean := False;
17768 cat >>conftest.adb <<CF_EOF
17769 package body ConfTest is
17770 protected body Process is
17775 function Continue return Boolean is
17782 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17783 cf_cv_gnat_sigint=yes
17785 cf_cv_gnat_sigint=no
17787 rm -rf ./conftest* ./*~conftest*
17790 echo "$as_me:17790: result: $cf_cv_gnat_sigint" >&5
17791 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
17793 if test "$cf_cv_gnat_sigint" = yes ; then
17796 USE_GNAT_SIGINT="#"
17799 cf_gnat_libraries=no
17800 cf_gnat_projects=no
17802 if test "$enable_gnat_projects" != no ; then
17803 echo "$as_me:17803: checking if GNAT supports project files" >&5
17804 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
17805 case "$cf_cv_gnat_version" in
17809 case "$cf_cv_system_name" in
17813 rm -rf ./conftest* ./*~conftest*
17814 if mkdir conftest.src conftest.bin conftest.lib
17817 rm -rf ./conftest* ./*~conftest*
17818 cat >>library.gpr <<CF_EOF
17820 Kind := External ("LIB_KIND");
17821 for Library_Name use "ConfTest";
17822 for Object_Dir use ".";
17823 for Library_ALI_Dir use External("LIBRARY_DIR");
17824 for Library_Version use External ("SONAME");
17825 for Library_Kind use Kind;
17826 for Library_Dir use External("BUILD_DIR");
17827 Source_Dir := External ("SOURCE_DIR");
17828 for Source_Dirs use (Source_Dir);
17831 cat >>confpackage.ads <<CF_EOF
17832 package ConfPackage is
17833 procedure conftest;
17836 cat >>confpackage.adb <<CF_EOF
17838 package body ConfPackage is
17839 procedure conftest is
17841 Text_IO.Put ("Hello World");
17846 if ( "$cf_ada_make" $ADAFLAGS \
17848 -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
17849 -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
17850 -XSOURCE_DIR="`pwd`" \
17851 -XSONAME=libConfTest.so.1 \
17852 -XLIB_KIND=static 1>&5 2>&1 ) ; then
17853 cf_gnat_projects=yes
17857 if test -f conftest.lib/confpackage.ali
17859 cf_gnat_libraries=yes
17861 rm -rf ./conftest* ./*~conftest*
17866 echo "$as_me:17866: result: $cf_gnat_projects" >&5
17867 echo "${ECHO_T}$cf_gnat_projects" >&6
17868 fi # enable_gnat_projects
17870 if test "$cf_gnat_projects" = yes
17872 echo "$as_me:17872: checking if GNAT supports libraries" >&5
17873 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
17874 echo "$as_me:17874: result: $cf_gnat_libraries" >&5
17875 echo "${ECHO_T}$cf_gnat_libraries" >&6
17878 USE_OLD_MAKERULES=""
17879 USE_GNAT_PROJECTS="#"
17880 USE_GNAT_MAKE_GPR="#"
17881 USE_GNAT_GPRBUILD="#"
17883 if test "$cf_gnat_projects" = yes
17885 USE_OLD_MAKERULES="#"
17886 USE_GNAT_PROJECTS=""
17887 if test "$cf_cv_VERSION_GPRBUILD" != no
17889 USE_GNAT_GPRBUILD=""
17890 elif test "$cf_cv_VERSION_GNATMAKE" != no
17892 USE_GNAT_MAKE_GPR=""
17894 { echo "$as_me:17894: WARNING: use old makefile rules since tools are missing" >&5
17895 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
17899 if test "$cf_gnat_libraries" = yes
17901 USE_GNAT_LIBRARIES=""
17903 USE_GNAT_LIBRARIES="#"
17906 echo "$as_me:17906: checking for ada-compiler" >&5
17907 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
17909 # Check whether --with-ada-compiler or --without-ada-compiler was given.
17910 if test "${with_ada_compiler+set}" = set; then
17911 withval="$with_ada_compiler"
17912 cf_ada_compiler=$withval
17914 cf_ada_compiler=gnatmake
17917 echo "$as_me:17917: result: $cf_ada_compiler" >&5
17918 echo "${ECHO_T}$cf_ada_compiler" >&6
17920 cf_ada_package=terminal_interface
17922 echo "$as_me:17922: checking for ada-include" >&5
17923 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
17925 # Check whether --with-ada-include or --without-ada-include was given.
17926 if test "${with_ada_include+set}" = set; then
17927 withval="$with_ada_include"
17930 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
17931 fi; if test -n "$prefix/share/ada/adainclude" ; then
17933 if test "x$prefix" != xNONE; then
17934 cf_path_syntax="$prefix"
17936 cf_path_syntax="$ac_default_prefix"
17939 case ".$withval" in
17940 (.\$\(*\)*|.\'*\'*)
17944 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17946 (.\$\{*prefix\}*|.\$\{*dir\}*)
17947 eval withval="$withval"
17948 case ".$withval" in
17950 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17955 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17958 { { echo "$as_me:17958: error: expected a pathname, not \"$withval\"" >&5
17959 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17960 { (exit 1); exit 1; }; }
17965 eval ADA_INCLUDE="$withval"
17967 echo "$as_me:17967: result: $ADA_INCLUDE" >&5
17968 echo "${ECHO_T}$ADA_INCLUDE" >&6
17970 echo "$as_me:17970: checking for ada-objects" >&5
17971 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
17973 # Check whether --with-ada-objects or --without-ada-objects was given.
17974 if test "${with_ada_objects+set}" = set; then
17975 withval="$with_ada_objects"
17978 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
17979 fi; if test -n "$prefix/lib/ada/adalib" ; then
17981 if test "x$prefix" != xNONE; then
17982 cf_path_syntax="$prefix"
17984 cf_path_syntax="$ac_default_prefix"
17987 case ".$withval" in
17988 (.\$\(*\)*|.\'*\'*)
17992 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17994 (.\$\{*prefix\}*|.\$\{*dir\}*)
17995 eval withval="$withval"
17996 case ".$withval" in
17998 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18003 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18006 { { echo "$as_me:18006: error: expected a pathname, not \"$withval\"" >&5
18007 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18008 { (exit 1); exit 1; }; }
18013 eval ADA_OBJECTS="$withval"
18015 echo "$as_me:18015: result: $ADA_OBJECTS" >&5
18016 echo "${ECHO_T}$ADA_OBJECTS" >&6
18018 echo "$as_me:18018: checking if an Ada95 shared-library should be built" >&5
18019 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
18021 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
18022 if test "${with_ada_sharedlib+set}" = set; then
18023 withval="$with_ada_sharedlib"
18024 with_ada_sharedlib=$withval
18026 with_ada_sharedlib=no
18028 echo "$as_me:18028: result: $with_ada_sharedlib" >&5
18029 echo "${ECHO_T}$with_ada_sharedlib" >&6
18031 if test "x$with_ada_sharedlib" != xno
18033 if test "x$cf_gnat_projects" != xyes
18035 { echo "$as_me:18035: WARNING: disabling shared-library since GNAT projects are not supported" >&5
18036 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
18037 with_ada_sharedlib=no
18041 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
18042 MAKE_ADA_SHAREDLIB="#"
18044 if test "x$with_ada_sharedlib" != xno
18046 MAKE_ADA_SHAREDLIB=
18047 if test "x$with_ada_sharedlib" != xyes
18049 ADA_SHAREDLIB="$with_ada_sharedlib"
18053 # allow the Ada binding to be renamed
18055 echo "$as_me:18055: checking for ada-libname" >&5
18056 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
18058 # Check whether --with-ada-libname or --without-ada-libname was given.
18059 if test "${with_ada_libname+set}" = set; then
18060 withval="$with_ada_libname"
18061 ADA_LIBNAME=$withval
18063 ADA_LIBNAME=AdaCurses
18065 case "x$ADA_LIBNAME" in
18067 ADA_LIBNAME=AdaCurses
18071 echo "$as_me:18071: result: $ADA_LIBNAME" >&5
18072 echo "${ECHO_T}$ADA_LIBNAME" >&6
18075 { { echo "$as_me:18075: error: No usable Ada compiler found" >&5
18076 echo "$as_me: error: No usable Ada compiler found" >&2;}
18077 { (exit 1); exit 1; }; }
18080 { { echo "$as_me:18080: error: The Ada compiler is needed for this package" >&5
18081 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
18082 { (exit 1); exit 1; }; }
18085 ################################################################################
18092 ### Construct the list of include-directories to be generated
18094 if test "$srcdir" != "."; then
18095 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
18097 CPPFLAGS="-I../include $CPPFLAGS"
18098 if test "$srcdir" != "."; then
18099 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
18101 CPPFLAGS="-I. $CPPFLAGS"
18103 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18104 if test "$srcdir" != "."; then
18105 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18107 if test "$GCC" != yes; then
18108 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18109 elif test "$includedir" != "/usr/include"; then
18110 if test "$includedir" = '${prefix}/include' ; then
18111 if test x$prefix != x/usr ; then
18112 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18115 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18119 ### Build up pieces for makefile rules
18120 echo "$as_me:18120: checking default library suffix" >&5
18121 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18123 case $DFT_LWR_MODEL in
18124 (libtool) DFT_ARG_SUFFIX='' ;;
18125 (normal) DFT_ARG_SUFFIX='' ;;
18126 (debug) DFT_ARG_SUFFIX='_g' ;;
18127 (profile) DFT_ARG_SUFFIX='_p' ;;
18128 (shared) DFT_ARG_SUFFIX='' ;;
18130 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18131 echo "$as_me:18131: result: $DFT_ARG_SUFFIX" >&5
18132 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18134 echo "$as_me:18134: checking default library-dependency suffix" >&5
18135 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18137 case X$DFT_LWR_MODEL in
18139 DFT_LIB_SUFFIX='.la'
18140 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18143 case "$cf_cv_system_name" in
18145 DFT_LIB_SUFFIX='_g.lib'
18148 DFT_LIB_SUFFIX='_g.a'
18151 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18154 case "$cf_cv_system_name" in
18156 DFT_LIB_SUFFIX='_p.lib'
18159 DFT_LIB_SUFFIX='_p.a'
18162 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18165 case "$cf_cv_system_name" in
18167 DFT_LIB_SUFFIX='.so'
18168 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18171 DFT_LIB_SUFFIX='.dll'
18172 DFT_DEP_SUFFIX='.dll.lib'
18174 (cygwin*|msys*|mingw*)
18175 DFT_LIB_SUFFIX='.dll'
18176 DFT_DEP_SUFFIX='.dll.a'
18179 DFT_LIB_SUFFIX='.dylib'
18180 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18185 DFT_LIB_SUFFIX='.so'
18186 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18189 DFT_LIB_SUFFIX='.sl'
18190 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18195 DFT_LIB_SUFFIX='.so'
18196 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18203 DFT_LIB_SUFFIX='.lib'
18206 DFT_LIB_SUFFIX='.a'
18209 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18212 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
18214 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
18215 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
18217 echo "$as_me:18217: result: $DFT_DEP_SUFFIX" >&5
18218 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18220 echo "$as_me:18220: checking default object directory" >&5
18221 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18223 case $DFT_LWR_MODEL in
18224 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
18225 (normal) DFT_OBJ_SUBDIR='objects' ;;
18226 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
18227 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
18229 case "$cf_cv_system_name" in
18231 DFT_OBJ_SUBDIR='objects' ;;
18233 DFT_OBJ_SUBDIR='obj_s' ;;
18236 echo "$as_me:18236: result: $DFT_OBJ_SUBDIR" >&5
18237 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18239 ### Set up low-level terminfo dependencies for makefiles.
18241 if test "$DFT_LWR_MODEL" = shared ; then
18242 case $cf_cv_system_name in
18244 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18247 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
18252 USE_ARG_SUFFIX=${DFT_ARG_SUFFIX}
18254 USE_LIB_SUFFIX=${DFT_ARG_SUFFIX}
18256 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
18258 ### Construct the list of subdirectories for which we'll customize makefiles
18259 ### with the appropriate compile-rules.
18261 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
18263 cat >>confdefs.h <<EOF
18264 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18267 ################################################################################
18273 NCURSES_SHLIB2="sh -c"
18275 ADA_SUBDIRS="include gen src doc"
18276 if test "x$cf_with_tests" != "xno" ; then
18277 ADA_SUBDIRS="$ADA_SUBDIRS samples"
18279 for cf_dir in $ADA_SUBDIRS
18281 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18288 # match layout used by make-tar.sh
18289 ADAHTML_DIR=../doc/ada
18291 if test "x$cross_compiling" = xyes ; then
18292 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
18294 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
18297 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"
18298 ac_config_commands="$ac_config_commands default"
18299 cat >confcache <<\_ACEOF
18300 # This file is a shell script that caches the results of configure
18301 # tests run on this system so they can be shared between configure
18302 # scripts and configure runs, see configure's option --config-cache.
18303 # It is not useful on other systems. If it contains results you don't
18304 # want to keep, you may remove or edit it.
18306 # config.status only pays attention to the cache file if you give it
18307 # the --recheck option to rerun configure.
18309 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18310 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18311 # following values.
18315 # The following way of writing the cache mishandles newlines in values,
18316 # but we know of no workaround that is simple, portable, and efficient.
18317 # So, don't put newlines in cache variables' values.
18318 # Ultrix sh set writes to stderr and can't be redirected directly,
18319 # and sets the high bit in the cache file unless we assign to the vars.
18322 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18324 # `set' does not quote correctly, so add quotes (double-quote
18325 # substitution turns \\\\ into \\, and sed turns \\ into \).
18328 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18331 # `set' quotes correctly as required by POSIX, so do not add quotes.
18333 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18340 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18342 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18344 if cmp -s $cache_file confcache; then :; else
18345 if test -w $cache_file; then
18346 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18347 cat confcache >$cache_file
18349 echo "not updating unwritable cache $cache_file"
18354 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18355 # Let make expand exec_prefix.
18356 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18358 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18359 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18360 # trailing colons and then remove the whole line if VPATH becomes empty
18361 # (actually we leave an empty line to preserve line numbers).
18362 if test "x$srcdir" = x.; then
18363 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18364 s/:*\$(srcdir):*/:/;
18365 s/:*\${srcdir}:*/:/;
18367 s/^\([^=]*=[ ]*\):*/\1/;
18373 DEFS=-DHAVE_CONFIG_H
18375 : "${CONFIG_STATUS=./config.status}"
18376 ac_clean_files_save=$ac_clean_files
18377 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18378 { echo "$as_me:18378: creating $CONFIG_STATUS" >&5
18379 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18380 cat >"$CONFIG_STATUS" <<_ACEOF
18382 # Generated automatically by configure.
18383 # Run this file to recreate the current configuration.
18384 # Compiler output produced by configure, useful for debugging
18385 # configure, is in config.log if it exists.
18388 SHELL=\${CONFIG_SHELL-$SHELL}
18389 ac_cs_invocation="\$0 \$@"
18391 CLICOLOR_FORCE= GREP_OPTIONS=
18392 unset CLICOLOR_FORCE GREP_OPTIONS
18395 cat >>"$CONFIG_STATUS" <<\_ACEOF
18396 # Be Bourne compatible
18397 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18400 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18404 # Name of the executable.
18405 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18407 if expr a : '\(a\)' >/dev/null 2>&1; then
18413 rm -f conf$$ conf$$.exe conf$$.file
18415 if ln -s conf$$.file conf$$ 2>/dev/null; then
18416 # We could just check for DJGPP; but this test a) works b) is more generic
18417 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18418 if test -f conf$$.exe; then
18419 # Don't use ln at all; we don't have any links
18424 elif ln conf$$.file conf$$ 2>/dev/null; then
18429 rm -f conf$$ conf$$.exe conf$$.file
18431 as_executable_p="test -f"
18433 # Support unset when possible.
18434 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18441 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18442 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18443 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18444 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18445 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18446 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18447 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18448 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18451 # We need space, tab and new line, in precisely that order.
18457 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18463 # Files that config.status was made for.
18464 if test -n "$ac_config_files"; then
18465 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
18468 if test -n "$ac_config_headers"; then
18469 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
18472 if test -n "$ac_config_links"; then
18473 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
18476 if test -n "$ac_config_commands"; then
18477 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
18480 cat >>"$CONFIG_STATUS" <<\EOF
18483 \`$as_me' instantiates files from templates according to the
18484 current configuration.
18486 Usage: $0 [OPTIONS] [FILE]...
18488 -h, --help print this help, then exit
18489 -V, --version print version number, then exit
18490 -d, --debug don't remove temporary files
18491 --recheck update $as_me by reconfiguring in the same conditions
18492 --file=FILE[:TEMPLATE]
18493 instantiate the configuration file FILE
18494 --header=FILE[:TEMPLATE]
18495 instantiate the configuration header FILE
18497 Configuration files:
18500 Configuration headers:
18503 Configuration commands:
18506 Report bugs to <dickey@invisible-island.net>."
18509 cat >>"$CONFIG_STATUS" <<EOF
18512 configured by $0, generated by GNU Autoconf 2.52.20210509,
18513 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18515 Copyright 2003-2020,2021 Thomas E. Dickey
18516 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18517 Free Software Foundation, Inc.
18518 This config.status script is free software; the Free Software Foundation
18519 gives unlimited permission to copy, distribute and modify it."
18524 cat >>"$CONFIG_STATUS" <<\EOF
18525 # If no file are specified by the user, then we need to provide default
18526 # value. By we need to know if files were specified by the user.
18532 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18533 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18535 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18539 *) # This is not an option, so the user has probably given explicit
18541 ac_need_defaults=false;;
18545 # Handling of the options.
18547 cat >>"$CONFIG_STATUS" <<EOF
18548 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18549 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18550 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18552 cat >>"$CONFIG_STATUS" <<\EOF
18553 --version | --vers* | -V )
18554 echo "$ac_cs_version"; exit 0 ;;
18556 # Conflict between --help and --header
18557 { { echo "$as_me:18557: error: ambiguous option: $1
18558 Try \`$0 --help' for more information." >&5
18559 echo "$as_me: error: ambiguous option: $1
18560 Try \`$0 --help' for more information." >&2;}
18561 { (exit 1); exit 1; }; };;
18562 --help | --hel | -h )
18563 echo "$ac_cs_usage"; exit 0 ;;
18564 --debug | --d* | -d )
18566 --file | --fil | --fi | --f )
18568 CONFIG_FILES="$CONFIG_FILES $1"
18569 ac_need_defaults=false;;
18570 --header | --heade | --head | --hea )
18572 CONFIG_HEADERS="$CONFIG_HEADERS $1"
18573 ac_need_defaults=false;;
18575 # This is an error.
18576 -*) { { echo "$as_me:18576: error: unrecognized option: $1
18577 Try \`$0 --help' for more information." >&5
18578 echo "$as_me: error: unrecognized option: $1
18579 Try \`$0 --help' for more information." >&2;}
18580 { (exit 1); exit 1; }; } ;;
18582 *) ac_config_targets="$ac_config_targets $1" ;;
18591 ## ----------------------- ##
18592 ## Running config.status. ##
18593 ## ----------------------- ##
18595 This file was extended by $as_me 2.52.20210509, executed with
18596 CONFIG_FILES = $CONFIG_FILES
18597 CONFIG_HEADERS = $CONFIG_HEADERS
18598 CONFIG_LINKS = $CONFIG_LINKS
18599 CONFIG_COMMANDS = $CONFIG_COMMANDS
18600 > "$ac_cs_invocation"
18601 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18606 cat >>"$CONFIG_STATUS" <<EOF
18608 # INIT-COMMANDS section.
18611 ### Special initialization commands, used to pass information from the
18612 ### configuration-run into config.status
18615 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
18616 DFT_LWR_MODEL="$DFT_LWR_MODEL"
18617 LIB_NAME="$LIB_NAME"
18618 LIB_PREFIX="$LIB_PREFIX"
18619 LIB_SUFFIX="$LIB_SUFFIX"
18621 NCURSES_MAJOR="$NCURSES_MAJOR"
18622 NCURSES_MINOR="$NCURSES_MINOR"
18623 NCURSES_PATCH="$NCURSES_PATCH"
18624 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
18625 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
18626 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
18627 cf_cv_abi_version="$cf_cv_abi_version"
18628 cf_cv_rel_version="$cf_cv_rel_version"
18629 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
18630 cf_cv_shared_soname='$cf_cv_shared_soname'
18631 cf_cv_shlib_version="$cf_cv_shlib_version"
18632 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
18633 cf_cv_system_name="$cf_cv_system_name"
18639 cat >>"$CONFIG_STATUS" <<\EOF
18640 for ac_config_target in $ac_config_targets
18642 case "$ac_config_target" in
18643 # Handling of arguments.
18644 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
18645 "src/library.gpr" ) CONFIG_FILES="$CONFIG_FILES src/library.gpr:src/library.gpr.in" ;;
18646 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
18647 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18648 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18649 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
18650 *) { { echo "$as_me:18650: error: invalid argument: $ac_config_target" >&5
18651 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18652 { (exit 1); exit 1; }; };;
18656 # If the user did not use the arguments to specify the items to instantiate,
18657 # then the envvar interface is used. Set only those that are not.
18658 # We use the long form for the default assignment because of an extremely
18659 # bizarre bug on SunOS 4.1.3.
18660 if "$ac_need_defaults"; then
18661 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18662 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18663 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18666 # Create a temporary directory, and hook for its removal unless debugging.
18669 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18670 trap '{ (exit 1); exit 1; }' 1 2 13 15
18673 # Create a (secure) tmp directory for tmp files.
18676 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18677 test -n "$tmp" && test -d "$tmp"
18680 tmp=$TMPDIR/cs$$-$RANDOM
18681 (umask 077 && mkdir $tmp)
18684 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18685 { (exit 1); exit 1; }
18690 cat >>"$CONFIG_STATUS" <<EOF
18693 # CONFIG_FILES section.
18696 # No need to generate the scripts if there are no CONFIG_FILES.
18697 # This happens for instance when ./config.status config.h
18698 if test -n "\$CONFIG_FILES"; then
18699 # Protect against being on the right side of a sed subst in config.status.
18700 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18701 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18702 s,@SHELL@,$SHELL,;t t
18703 s,@exec_prefix@,$exec_prefix,;t t
18704 s,@prefix@,$prefix,;t t
18705 s,@program_transform_name@,$program_transform_name,;t t
18706 s,@bindir@,$bindir,;t t
18707 s,@sbindir@,$sbindir,;t t
18708 s,@libexecdir@,$libexecdir,;t t
18709 s,@datarootdir@,$datarootdir,;t t
18710 s,@datadir@,$datadir,;t t
18711 s,@sysconfdir@,$sysconfdir,;t t
18712 s,@sharedstatedir@,$sharedstatedir,;t t
18713 s,@localstatedir@,$localstatedir,;t t
18714 s,@runstatedir@,$runstatedir,;t t
18715 s,@libdir@,$libdir,;t t
18716 s,@includedir@,$includedir,;t t
18717 s,@oldincludedir@,$oldincludedir,;t t
18718 s,@infodir@,$infodir,;t t
18719 s,@mandir@,$mandir,;t t
18720 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18721 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18722 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18723 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18724 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18725 s,@build_alias@,$build_alias,;t t
18726 s,@host_alias@,$host_alias,;t t
18727 s,@target_alias@,$target_alias,;t t
18728 s,@ECHO_C@,$ECHO_C,;t t
18729 s,@ECHO_N@,$ECHO_N,;t t
18730 s,@ECHO_T@,$ECHO_T,;t t
18731 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18732 s,@DEFS@,$DEFS,;t t
18733 s,@LIBS@,$LIBS,;t t
18734 s,@top_builddir@,$top_builddir,;t t
18735 s,@build@,$build,;t t
18736 s,@build_cpu@,$build_cpu,;t t
18737 s,@build_vendor@,$build_vendor,;t t
18738 s,@build_os@,$build_os,;t t
18739 s,@host@,$host,;t t
18740 s,@host_cpu@,$host_cpu,;t t
18741 s,@host_vendor@,$host_vendor,;t t
18742 s,@host_os@,$host_os,;t t
18743 s,@target@,$target,;t t
18744 s,@target_cpu@,$target_cpu,;t t
18745 s,@target_vendor@,$target_vendor,;t t
18746 s,@target_os@,$target_os,;t t
18747 s,@GREP@,$GREP,;t t
18748 s,@FGREP@,$FGREP,;t t
18750 s,@CFLAGS@,$CFLAGS,;t t
18751 s,@LDFLAGS@,$LDFLAGS,;t t
18752 s,@CPPFLAGS@,$CPPFLAGS,;t t
18753 s,@ac_ct_CC@,$ac_ct_CC,;t t
18754 s,@EXEEXT@,$EXEEXT,;t t
18755 s,@OBJEXT@,$OBJEXT,;t t
18756 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18758 s,@EGREP@,$EGREP,;t t
18760 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18761 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18762 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18763 s,@LN_S@,$LN_S,;t t
18764 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
18765 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
18766 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18767 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
18768 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
18769 s,@SET_MAKE@,$SET_MAKE,;t t
18770 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
18771 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
18772 s,@CTAGS@,$CTAGS,;t t
18773 s,@ETAGS@,$ETAGS,;t t
18774 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18775 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18776 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
18777 s,@RANLIB@,$RANLIB,;t t
18778 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18780 s,@ac_ct_LD@,$ac_ct_LD,;t t
18782 s,@ac_ct_AR@,$ac_ct_AR,;t t
18783 s,@ARFLAGS@,$ARFLAGS,;t t
18784 s,@DESTDIR@,$DESTDIR,;t t
18785 s,@BUILD_CC@,$BUILD_CC,;t t
18786 s,@BUILD_CPP@,$BUILD_CPP,;t t
18787 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
18788 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
18789 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
18790 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
18791 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
18792 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
18793 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
18794 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
18795 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
18796 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
18797 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
18798 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
18799 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
18800 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18801 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18802 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
18803 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
18804 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
18805 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
18806 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
18807 s,@CC_G_OPT@,$CC_G_OPT,;t t
18808 s,@LD_MODEL@,$LD_MODEL,;t t
18809 s,@shlibdir@,$shlibdir,;t t
18810 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
18811 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
18812 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
18813 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
18814 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
18815 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
18816 s,@LINK_PROGS@,$LINK_PROGS,;t t
18817 s,@LINK_TESTS@,$LINK_TESTS,;t t
18818 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
18819 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
18820 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
18821 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
18822 s,@RPATH_LIST@,$RPATH_LIST,;t t
18823 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
18824 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
18825 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
18826 s,@PTHREAD@,$PTHREAD,;t t
18827 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
18828 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18829 s,@ECHO_LT@,$ECHO_LT,;t t
18830 s,@ECHO_LD@,$ECHO_LD,;t t
18831 s,@RULE_CC@,$RULE_CC,;t t
18832 s,@SHOW_CC@,$SHOW_CC,;t t
18833 s,@ECHO_CC@,$ECHO_CC,;t t
18834 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18835 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
18836 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
18837 s,@ADAFLAGS@,$ADAFLAGS,;t t
18838 s,@ADA_TRACE@,$ADA_TRACE,;t t
18839 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
18840 s,@M4_exists@,$M4_exists,;t t
18841 s,@cf_ada_make@,$cf_ada_make,;t t
18842 s,@cf_ada_config@,$cf_ada_config,;t t
18843 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
18844 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
18845 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
18846 s,@cf_compile_generics@,$cf_compile_generics,;t t
18847 s,@cf_generic_objects@,$cf_generic_objects,;t t
18848 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
18849 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
18850 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
18851 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
18852 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
18853 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
18854 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
18855 s,@cf_ada_package@,$cf_ada_package,;t t
18856 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
18857 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
18858 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
18859 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
18860 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
18861 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
18862 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
18863 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
18864 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
18865 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18866 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18867 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
18868 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
18869 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
18870 s,@TEST_ARG2@,$TEST_ARG2,;t t
18871 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
18872 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
18873 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
18874 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
18875 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
18876 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
18877 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
18882 cat >>"$CONFIG_STATUS" <<\EOF
18883 # Split the substitutions into bite-sized pieces for seds with
18884 # small command number limits, like on Digital OSF/1 and HP-UX.
18885 ac_max_sed_lines=48
18886 ac_sed_frag=1 # Number of current file.
18887 ac_beg=1 # First line for current file.
18888 ac_end=$ac_max_sed_lines # Line after last line for current file.
18891 while "$ac_more_lines"; do
18892 if test "$ac_beg" -gt 1; then
18893 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18895 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18897 if test ! -s $tmp/subs.frag; then
18898 ac_more_lines=false
18900 # The purpose of the label and of the branching condition is to
18901 # speed up the sed processing (if there are no `@' at all, there
18902 # is no need to browse any of the substitutions).
18903 # These are the two extra sed commands mentioned above.
18905 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18906 # It is possible to make a multiline substitution using escaped newlines.
18907 # Ensure that we do not split the substitution between script fragments.
18909 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
18910 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
18911 if test -s $tmp/subs.next; then
18912 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
18913 if test ! -s $tmp/subs.edit; then
18914 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
18915 if test ! -s $tmp/subs.edit; then
18916 if test "$ac_beg" -gt 1; then
18917 ac_end=`expr "$ac_end" - 1`
18924 if test -z "$ac_sed_cmds"; then
18925 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18927 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18929 ac_sed_frag=`expr "$ac_sed_frag" + 1`
18931 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
18934 if test -z "$ac_sed_cmds"; then
18937 fi # test -n "$CONFIG_FILES"
18940 cat >>"$CONFIG_STATUS" <<\EOF
18941 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18942 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18944 - | *:- | *:-:* ) # input from stdin
18946 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18947 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18948 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18949 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18950 * ) ac_file_in=$ac_file.in ;;
18953 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18954 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18955 X"$ac_file" : 'X\(//\)[^/]' \| \
18956 X"$ac_file" : 'X\(//\)$' \| \
18957 X"$ac_file" : 'X\(/\)' \| \
18958 . : '\(.\)' 2>/dev/null ||
18960 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18961 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18962 /^X\(\/\/\)$/{ s//\1/; q; }
18963 /^X\(\/\).*/{ s//\1/; q; }
18965 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18966 { case "$ac_dir" in
18967 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18971 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18972 case $as_mkdir_dir in
18973 # Skip DOS drivespec
18974 ?:) as_incr_dir=$as_mkdir_dir ;;
18976 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18977 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18982 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18983 # A "../" for each directory in $ac_dir_suffix.
18984 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18986 ac_dir_suffix= ac_dots=
18991 if test -z "$ac_dots"; then
18994 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
18996 [\\/]* | ?:[\\/]* )
18997 ac_srcdir="$srcdir$ac_dir_suffix";
18998 ac_top_srcdir="$srcdir" ;;
18999 *) # Relative path.
19000 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
19001 ac_top_srcdir="$ac_dots$srcdir" ;;
19005 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19006 *) ac_INSTALL=$ac_dots$INSTALL ;;
19009 if test x"$ac_file" != x-; then
19010 { echo "$as_me:19010: creating $ac_file" >&5
19011 echo "$as_me: creating $ac_file" >&6;}
19014 # Let's still pretend it is `configure' which instantiates (i.e., don't
19015 # use $as_me), people would be surprised to read:
19016 # /* config.h. Generated automatically by config.status. */
19017 configure_input="Generated automatically from `echo $ac_file_in |
19018 sed 's,.*/,,'` by configure."
19020 # First look for the input files in the build tree, otherwise in the
19022 ac_file_inputs=`IFS=:
19023 for f in $ac_file_in; do
19025 -) echo $tmp/stdin ;;
19027 # Absolute (can't be DOS-style, as IFS=:)
19028 test -f "$f" || { { echo "$as_me:19028: error: cannot find input file: $f" >&5
19029 echo "$as_me: error: cannot find input file: $f" >&2;}
19030 { (exit 1); exit 1; }; }
19033 if test -f "$f"; then
19036 elif test -f "$srcdir/$f"; then
19041 { { echo "$as_me:19041: error: cannot find input file: $f" >&5
19042 echo "$as_me: error: cannot find input file: $f" >&2;}
19043 { (exit 1); exit 1; }; }
19046 done` || { (exit 1); exit 1; }
19048 cat >>"$CONFIG_STATUS" <<\EOF
19049 ac_warn_datarootdir=no
19050 if test x"$ac_file" != x-; then
19051 for ac_item in $ac_file_inputs
19053 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
19054 if test -n "$ac_seen"; then
19055 ac_used=`grep '@datarootdir@' "$ac_item"`
19056 if test -z "$ac_used"; then
19057 { echo "$as_me:19057: WARNING: datarootdir was used implicitly but not set:
19059 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
19061 ac_warn_datarootdir=yes
19064 ac_seen=`grep '${datarootdir}' "$ac_item"`
19065 if test -n "$ac_seen"; then
19066 { echo "$as_me:19066: WARNING: datarootdir was used explicitly but not set:
19068 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
19070 ac_warn_datarootdir=yes
19075 if test "x$ac_warn_datarootdir" = xyes; then
19076 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
19080 cat >>"$CONFIG_STATUS" <<EOF
19084 cat >>"$CONFIG_STATUS" <<\EOF
19086 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19087 s,@configure_input@,$configure_input,;t t
19088 s,@srcdir@,$ac_srcdir,;t t
19089 s,@top_srcdir@,$ac_top_srcdir,;t t
19090 s,@INSTALL@,$ac_INSTALL,;t t
19091 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19093 if test x"$ac_file" != x-; then
19094 cp "$tmp/out" "$ac_file"
19096 for ac_name in prefix exec_prefix datarootdir
19098 ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
19099 if test -n "$ac_seen"; then
19100 ac_init=`${EGREP-egrep} '[ ]*'$ac_name'[ ]*=' "$ac_file"`
19101 if test -z "$ac_init"; then
19102 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
19103 { echo "$as_me:19103: WARNING: Variable $ac_name is used but was not set:
19105 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
19110 ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
19111 ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
19112 if test -s $tmp/out; then
19113 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
19114 { echo "$as_me:19114: WARNING: Some variables may not be substituted:
19116 echo "$as_me: WARNING: Some variables may not be substituted:
19126 cat >>"$CONFIG_STATUS" <<\EOF
19129 # CONFIG_HEADER section.
19132 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19133 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19135 # ac_d sets the value in "#define NAME VALUE" lines.
19136 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19137 ac_dB='[ ].*$,\1#\2'
19140 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19141 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19142 ac_iB='\([ ]\),\1#\2define\3'
19145 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19146 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19147 ac_uB='$,\1#\2define\3'
19151 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19152 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19154 - | *:- | *:-:* ) # input from stdin
19156 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19157 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19158 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19159 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19160 * ) ac_file_in=$ac_file.in ;;
19163 test x"$ac_file" != x- && { echo "$as_me:19163: creating $ac_file" >&5
19164 echo "$as_me: creating $ac_file" >&6;}
19166 # First look for the input files in the build tree, otherwise in the
19168 ac_file_inputs=`IFS=:
19169 for f in $ac_file_in; do
19171 -) echo $tmp/stdin ;;
19173 # Absolute (can't be DOS-style, as IFS=:)
19174 test -f "$f" || { { echo "$as_me:19174: error: cannot find input file: $f" >&5
19175 echo "$as_me: error: cannot find input file: $f" >&2;}
19176 { (exit 1); exit 1; }; }
19179 if test -f "$f"; then
19182 elif test -f "$srcdir/$f"; then
19187 { { echo "$as_me:19187: error: cannot find input file: $f" >&5
19188 echo "$as_me: error: cannot find input file: $f" >&2;}
19189 { (exit 1); exit 1; }; }
19192 done` || { (exit 1); exit 1; }
19193 # Remove the trailing spaces.
19194 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
19198 # Transform confdefs.h into a list of #define's. We won't use it as a sed
19199 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
19200 # be either 'cat' or 'sort'.
19201 cat confdefs.h | uniq >conftest.vals
19203 # Break up conftest.vals because some shells have a limit on
19204 # the size of here documents, and old seds have small limits too.
19206 rm -f conftest.tail
19207 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
19208 while grep . conftest.vals >/dev/null
19210 # Write chunks of a limited-size here document to conftest.frag.
19211 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
19212 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
19213 echo 'CEOF' >> "$CONFIG_STATUS"
19214 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
19215 rm -f conftest.vals
19216 mv conftest.tail conftest.vals
19218 rm -f conftest.vals
19220 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19222 echo ' cat >> conftest.edit <<CEOF
19223 /@DEFS@/r conftest.frag
19226 sed -f conftest.edit $tmp/in > $tmp/out
19228 mv $tmp/out $tmp/in
19229 rm -f conftest.edit conftest.frag
19230 ' >> "$CONFIG_STATUS"
19232 cat >>"$CONFIG_STATUS" <<\EOF
19233 # Let's still pretend it is `configure' which instantiates (i.e., don't
19234 # use $as_me), people would be surprised to read:
19235 # /* config.h. Generated automatically by config.status. */
19236 if test x"$ac_file" = x-; then
19237 echo "/* Generated automatically by configure. */" >$tmp/config.h
19239 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
19241 cat $tmp/in >>$tmp/config.h
19243 if test x"$ac_file" != x-; then
19244 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
19245 { echo "$as_me:19245: $ac_file is unchanged" >&5
19246 echo "$as_me: $ac_file is unchanged" >&6;}
19248 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19249 X"$ac_file" : 'X\(//\)[^/]' \| \
19250 X"$ac_file" : 'X\(//\)$' \| \
19251 X"$ac_file" : 'X\(/\)' \| \
19252 . : '\(.\)' 2>/dev/null ||
19254 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19255 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19256 /^X\(\/\/\)$/{ s//\1/; q; }
19257 /^X\(\/\).*/{ s//\1/; q; }
19259 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19260 { case "$ac_dir" in
19261 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19265 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19266 case $as_mkdir_dir in
19267 # Skip DOS drivespec
19268 ?:) as_incr_dir=$as_mkdir_dir ;;
19270 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19271 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19278 mv "$tmp/config.h" "$ac_file"
19282 rm -f $tmp/config.h
19286 cat >>"$CONFIG_STATUS" <<\EOF
19288 # CONFIG_COMMANDS section.
19290 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19291 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19292 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19296 if test -z "$USE_OLD_MAKERULES" ; then
19297 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
19304 cat >>"$CONFIG_STATUS" <<\EOF
19306 { (exit 0); exit 0; }
19308 chmod +x "$CONFIG_STATUS"
19309 ac_clean_files=$ac_clean_files_save
19311 # configure is writing to config.log, and then calls config.status.
19312 # config.status does its own redirection, appending to config.log.
19313 # Unfortunately, on DOS this fails, as config.log is still kept open
19314 # by configure, so config.status won't be able to write to it; its
19315 # output is simply discarded. So we exec the FD to /dev/null,
19316 # effectively closing config.log, so it can be properly (re)opened and
19317 # appended to by config.status. When coming back to configure, we
19318 # need to make the FD available again.
19319 if test "$no_create" != yes; then
19322 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
19324 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19325 # would make configure fail if this is the last instruction.
19326 "$ac_cs_success" || { (exit 1); exit 1; }
19328 ${MAKE:-make} preinstall