2 # From configure.in Revision: 1.83 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20210509.
6 # Copyright 2003-2020,2021 Thomas E. Dickey
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
12 # Avoid depending upon Character Ranges.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
36 if expr a : '\(a\)' >/dev/null 2>&1; then
42 rm -f conf$$ conf$$.exe conf$$.file
44 if ln -s conf$$.file conf$$ 2>/dev/null; then
45 # We could just check for DJGPP; but this test a) works b) is more generic
46 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47 if test -f conf$$.exe; then
48 # Don't use ln at all; we don't have any links
53 elif ln conf$$.file conf$$ 2>/dev/null; then
58 rm -f conf$$ conf$$.exe conf$$.file
60 as_executable_p="test -f"
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
70 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
80 # We need space, tab and new line, in precisely that order.
86 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
89 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90 # so uname gets run too.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
98 ac_default_prefix=/usr/local
103 SHELL=${CONFIG_SHELL-/bin/sh}
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete. It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : "${ac_max_here_lines=38}"
110 ac_unique_file="gen/gen.c"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
115 # include <sys/types.h>
118 # include <sys/stat.h>
129 # if !STDC_HEADERS && HAVE_MEMORY_H
135 # include <strings.h>
138 # include <inttypes.h>
148 # Initialize some variables set by options.
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
160 program_transform_name=s,x,x,
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
188 # Identity of this package.
198 # If the previous option needs an argument, assign it.
199 if test -n "$ac_prev"; then
200 eval "$ac_prev=\$ac_option"
205 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
207 # Accept the important Cygnus configure options, so we can diagnose typos.
211 -bindir | --bindir | --bindi | --bind | --bin | --bi)
213 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
216 -build | --build | --buil | --bui | --bu)
217 ac_prev=build_alias ;;
218 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219 build_alias=$ac_optarg ;;
221 -cache-file | --cache-file | --cache-fil | --cache-fi \
222 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223 ac_prev=cache_file ;;
224 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226 cache_file=$ac_optarg ;;
229 cache_file=config.cache ;;
231 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
233 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
235 datadir=$ac_optarg ;;
237 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238 | --dataroo | --dataro | --datar)
239 ac_prev=datarootdir ;;
240 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242 datarootdir=$ac_optarg ;;
244 -disable-* | --disable-*)
245 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246 # Reject names that are not valid shell variable names.
247 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249 { (exit 1); exit 1; }; }
250 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251 eval "enable_$ac_feature=no" ;;
253 -enable-* | --enable-*)
254 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255 # Reject names that are not valid shell variable names.
256 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258 { (exit 1); exit 1; }; }
259 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
261 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
264 eval "enable_$ac_feature='$ac_optarg'" ;;
266 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268 | --exec | --exe | --ex)
269 ac_prev=exec_prefix ;;
270 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272 | --exec=* | --exe=* | --ex=*)
273 exec_prefix=$ac_optarg ;;
275 -gas | --gas | --ga | --g)
276 # Obsolete; use --with-gas.
279 -help | --help | --hel | --he | -h)
281 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282 ac_init_help=recursive ;;
283 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284 ac_init_help=short ;;
286 -host | --host | --hos | --ho)
287 ac_prev=host_alias ;;
288 -host=* | --host=* | --hos=* | --ho=*)
289 host_alias=$ac_optarg ;;
291 -includedir | --includedir | --includedi | --included | --include \
292 | --includ | --inclu | --incl | --inc)
293 ac_prev=includedir ;;
294 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295 | --includ=* | --inclu=* | --incl=* | --inc=*)
296 includedir=$ac_optarg ;;
298 -infodir | --infodir | --infodi | --infod | --info | --inf)
300 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301 infodir=$ac_optarg ;;
303 -libdir | --libdir | --libdi | --libd)
305 -libdir=* | --libdir=* | --libdi=* | --libd=*)
308 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309 | --libexe | --libex | --libe)
310 ac_prev=libexecdir ;;
311 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312 | --libexe=* | --libex=* | --libe=*)
313 libexecdir=$ac_optarg ;;
315 -localstatedir | --localstatedir | --localstatedi | --localstated \
316 | --localstate | --localstat | --localsta | --localst \
317 | --locals | --local | --loca | --loc | --lo)
318 ac_prev=localstatedir ;;
319 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322 localstatedir=$ac_optarg ;;
324 -runstatedir | --runstatedir | --runstatedi | --runstated \
325 | --runstate | --runstat | --runsta | --runst \
326 | --runs | --run | --ru)
327 ac_prev=runstatedir ;;
328 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329 | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330 | --runs=* | --run=* | --ru=*)
331 runstatedir=$ac_optarg ;;
333 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
335 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
339 # Obsolete; use --without-fp.
342 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
346 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
350 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352 | --oldin | --oldi | --old | --ol | --o)
353 ac_prev=oldincludedir ;;
354 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357 oldincludedir=$ac_optarg ;;
359 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
361 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
364 -program-prefix | --program-prefix | --program-prefi | --program-pref \
365 | --program-pre | --program-pr | --program-p)
366 ac_prev=program_prefix ;;
367 -program-prefix=* | --program-prefix=* | --program-prefi=* \
368 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369 program_prefix=$ac_optarg ;;
371 -program-suffix | --program-suffix | --program-suffi | --program-suff \
372 | --program-suf | --program-su | --program-s)
373 ac_prev=program_suffix ;;
374 -program-suffix=* | --program-suffix=* | --program-suffi=* \
375 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376 program_suffix=$ac_optarg ;;
378 -program-transform-name | --program-transform-name \
379 | --program-transform-nam | --program-transform-na \
380 | --program-transform-n | --program-transform- \
381 | --program-transform | --program-transfor \
382 | --program-transfo | --program-transf \
383 | --program-trans | --program-tran \
384 | --progr-tra | --program-tr | --program-t)
385 ac_prev=program_transform_name ;;
386 -program-transform-name=* | --program-transform-name=* \
387 | --program-transform-nam=* | --program-transform-na=* \
388 | --program-transform-n=* | --program-transform-=* \
389 | --program-transform=* | --program-transfor=* \
390 | --program-transfo=* | --program-transf=* \
391 | --program-trans=* | --program-tran=* \
392 | --progr-tra=* | --program-tr=* | --program-t=*)
393 program_transform_name=$ac_optarg ;;
395 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396 | -silent | --silent | --silen | --sile | --sil)
399 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
401 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
403 sbindir=$ac_optarg ;;
405 -sharedstatedir | --sharedstatedir | --sharedstatedi \
406 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407 | --sharedst | --shareds | --shared | --share | --shar \
409 ac_prev=sharedstatedir ;;
410 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
414 sharedstatedir=$ac_optarg ;;
416 -site | --site | --sit)
418 -site=* | --site=* | --sit=*)
421 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
423 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
426 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427 | --syscon | --sysco | --sysc | --sys | --sy)
428 ac_prev=sysconfdir ;;
429 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431 sysconfdir=$ac_optarg ;;
433 -target | --target | --targe | --targ | --tar | --ta | --t)
434 ac_prev=target_alias ;;
435 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436 target_alias=$ac_optarg ;;
438 -v | -verbose | --verbose | --verbos | --verbo | --verb)
441 -version | --version | --versio | --versi | --vers | -V)
445 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446 # Reject names that are not valid shell variable names.
447 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448 { echo "$as_me: error: invalid package name: $ac_package" >&2
449 { (exit 1); exit 1; }; }
450 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
452 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
455 eval "with_$ac_package='$ac_optarg'" ;;
457 -without-* | --without-*)
458 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459 # Reject names that are not valid shell variable names.
460 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461 { echo "$as_me: error: invalid package name: $ac_package" >&2
462 { (exit 1); exit 1; }; }
463 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464 eval "with_$ac_package=no" ;;
467 # Obsolete; use --with-x.
470 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471 | --x-incl | --x-inc | --x-in | --x-i)
472 ac_prev=x_includes ;;
473 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475 x_includes=$ac_optarg ;;
477 -x-libraries | --x-libraries | --x-librarie | --x-librari \
478 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479 ac_prev=x_libraries ;;
480 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482 x_libraries=$ac_optarg ;;
484 -*) { echo "$as_me: error: unrecognized option: $ac_option
485 Try \`$0 --help' for more information." >&2
486 { (exit 1); exit 1; }; }
490 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491 # Reject names that are not valid shell variable names.
492 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494 { (exit 1); exit 1; }; }
495 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496 eval "$ac_envvar='$ac_optarg'"
497 export "$ac_envvar" ;;
500 # FIXME: should be removed in autoconf 3.0.
501 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
504 : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
510 if test -n "$ac_prev"; then
511 ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
512 { echo "$as_me: error: missing argument to $ac_option" >&2
513 { (exit 1); exit 1; }; }
516 # Be sure to have absolute paths.
517 for ac_var in exec_prefix prefix
519 eval ac_val=$`echo "$ac_var"`
521 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523 { (exit 1); exit 1; }; };;
527 # Be sure to have absolute paths.
528 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
529 localstatedir libdir includedir oldincludedir infodir mandir
531 eval ac_val=$`echo "$ac_var"`
533 [\\/$]* | ?:[\\/]* ) ;;
534 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535 { (exit 1); exit 1; }; };;
539 # There might be people who depend on the old broken behavior: `$host'
540 # used to hold the argument of --host etc.
545 # FIXME: should be removed in autoconf 3.0.
546 if test "x$host_alias" != x; then
547 if test "x$build_alias" = x; then
548 cross_compiling=maybe
549 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550 If a cross compiler is detected then cross compile mode will be used." >&2
551 elif test "x$build_alias" != "x$host_alias"; then
557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
559 test "$silent" = yes && exec 6>/dev/null
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563 ac_srcdir_defaulted=yes
564 # Try the directory containing this script, then its parent.
566 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
569 if test ! -r "$srcdir/$ac_unique_file"; then
573 ac_srcdir_defaulted=no
575 if test ! -r "$srcdir/$ac_unique_file"; then
576 if test "$ac_srcdir_defaulted" = yes; then
577 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578 { (exit 1); exit 1; }; }
580 { echo "$as_me: error: cannot find sources in $srcdir" >&2
581 { (exit 1); exit 1; }; }
584 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585 ac_env_build_alias_set=${build_alias+set}
586 ac_env_build_alias_value=$build_alias
587 ac_cv_env_build_alias_set=${build_alias+set}
588 ac_cv_env_build_alias_value=$build_alias
589 ac_env_host_alias_set=${host_alias+set}
590 ac_env_host_alias_value=$host_alias
591 ac_cv_env_host_alias_set=${host_alias+set}
592 ac_cv_env_host_alias_value=$host_alias
593 ac_env_target_alias_set=${target_alias+set}
594 ac_env_target_alias_value=$target_alias
595 ac_cv_env_target_alias_set=${target_alias+set}
596 ac_cv_env_target_alias_value=$target_alias
597 ac_env_CC_set=${CC+set}
599 ac_cv_env_CC_set=${CC+set}
600 ac_cv_env_CC_value=$CC
601 ac_env_CFLAGS_set=${CFLAGS+set}
602 ac_env_CFLAGS_value=$CFLAGS
603 ac_cv_env_CFLAGS_set=${CFLAGS+set}
604 ac_cv_env_CFLAGS_value=$CFLAGS
605 ac_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_env_LDFLAGS_value=$LDFLAGS
607 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608 ac_cv_env_LDFLAGS_value=$LDFLAGS
609 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_env_CPPFLAGS_value=$CPPFLAGS
611 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613 ac_env_CPP_set=${CPP+set}
614 ac_env_CPP_value=$CPP
615 ac_cv_env_CPP_set=${CPP+set}
616 ac_cv_env_CPP_value=$CPP
619 # Report the --help message.
621 if test "$ac_init_help" = "long"; then
622 # Omit some internal or obsolete options to make the list less imposing.
623 # This message is too long to be a string in the A/UX 3.1 sh.
625 \`configure' configures this package to adapt to many kinds of systems.
627 Usage: $0 [OPTION]... [VAR=VALUE]...
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE. See below for descriptions of some of the useful variables.
632 Defaults for the options are specified in brackets.
635 -h, --help display this help and exit
636 --help=short display options specific to this package
637 --help=recursive display the short help of all the included packages
638 -V, --version display version information and exit
639 -q, --quiet, --silent do not print \`checking...' messages
640 --cache-file=FILE cache test results in FILE [disabled]
641 -C, --config-cache alias for \`--cache-file=config.cache'
642 -n, --no-create do not create output files
643 --srcdir=DIR find the sources in DIR [configure dir or \`..']
648 Installation directories:
649 --prefix=PREFIX install architecture-independent files in PREFIX
651 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
659 For better control, use the options below.
661 Fine tuning of the installation directories:
662 --bindir=DIR user executables [EPREFIX/bin]
663 --sbindir=DIR system admin executables [EPREFIX/sbin]
664 --libexecdir=DIR program executables [EPREFIX/libexec]
665 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
666 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
667 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
668 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
669 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
670 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
671 --libdir=DIR object code libraries [EPREFIX/lib]
672 --includedir=DIR C header files [PREFIX/include]
673 --oldincludedir=DIR C header files for non-gcc [/usr/include]
674 --infodir=DIR info documentation [DATAROOTDIR/info]
675 --mandir=DIR man documentation [DATAROOTDIR/man]
681 --program-prefix=PREFIX prepend PREFIX to installed program names
682 --program-suffix=SUFFIX append SUFFIX to installed program names
683 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
686 --build=BUILD configure for building on BUILD [guessed]
687 --host=HOST build programs to run on HOST [BUILD]
688 --target=TARGET configure for building compilers for TARGET [HOST]
692 if test -n "$ac_init_help"; then
697 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
698 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
701 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
702 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
705 --with-system-type=XXX test: override derived host system-type
706 --disable-stripping do not strip (debug info) installed executables
707 --with-pkg-config{=path} enable/disable use of pkg-config
708 --with-pkg-config-libdir=XXX use given directory for installing pc-files
709 --without-tests suppress build with test-programs
710 --enable-mixed-case tic should assume mixed-case filenames
711 --with-install-prefix prefixes actual install-location ($DESTDIR)
712 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
713 --with-build-cc=XXX the build C compiler ($BUILD_CC)
714 --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
715 --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
716 --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
717 --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
718 --with-build-libs=XXX the build libraries (${BUILD_LIBS})
719 Options to Specify the Libraries Built/Used:
720 --with-shared generate shared C-objects (needed for --with-ada-sharedlib)
721 --with-curses-dir=DIR directory in which (n)curses is installed
722 --enable-widec compile with wide-char/UTF-8 code
723 --with-lib-prefix override library-prefix
724 --with-shlib-version=X Specify rel or abi version for shared libs
725 --enable-rpath-link link sample programs with rpath option
726 Fine-Tuning Your Configuration:
727 --enable-broken_linker compile with broken-linker support code
728 --disable-largefile omit support for large files
729 --with-rcs-ids compile-in RCS identifiers
731 --disable-ext-funcs disable function-extensions
732 --enable-const compile with extra/non-standard const
734 --without-develop disable development options
736 --with-pthread use POSIX thread library
737 --enable-weak-symbols enable weak-symbols for pthreads
738 --enable-reentrant compile with experimental reentrant code
739 --with-wrap-prefix=XXX override prefix used for public variables
740 Testing/development Options:
741 --disable-echo do not display "compiling" commands
742 --enable-warnings test: turn on gcc compiler warnings
743 --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics
744 --enable-assertions test: turn on generation of assertion code
745 --enable-expanded test: generate functions for certain macros
746 --disable-macros test: use functions rather than macros
747 --with-trace test: add trace() function to all models of ncurses
748 --disable-gnat-projects test: disable GNAT projects even if usable
749 Ada95 Binding Options:
750 --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
751 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
752 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
753 --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
754 --with-ada-libname=XXX override default Ada library-name
756 Some influential environment variables:
757 CC C compiler command
758 CFLAGS C compiler flags
759 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
760 nonstandard directory <lib dir>
761 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
762 headers in a nonstandard directory <include dir>
765 Use these variables to override the choices made by `configure' or to help
766 it to find libraries and programs with nonstandard names/locations.
771 if test "$ac_init_help" = "recursive"; then
772 # If there are subdirs, report their specific --help.
774 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
776 # A "../" for each directory in /$ac_subdir.
777 ac_dots=`echo "$ac_subdir" |
778 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
781 .) # No --srcdir option. We are building in place.
782 ac_sub_srcdir="$srcdir" ;;
783 [\\/]* | ?:[\\/]* ) # Absolute path.
784 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
786 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
789 # Check for guested configure; otherwise get Cygnus style configure.
790 if test -f "$ac_sub_srcdir/configure.gnu"; then
792 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
793 elif test -f "$ac_sub_srcdir/configure"; then
795 $SHELL "$ac_sub_srcdir/configure" --help=recursive
796 elif test -f "$ac_sub_srcdir/configure.ac" ||
797 test -f "$ac_sub_srcdir/configure.in"; then
799 "$ac_configure" --help
801 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
807 test -n "$ac_init_help" && exit 0
808 if "$ac_init_version"; then
811 Copyright 2003-2020,2021 Thomas E. Dickey
812 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
813 Free Software Foundation, Inc.
814 This configure script is free software; the Free Software Foundation
815 gives unlimited permission to copy, distribute and modify it.
821 This file contains any messages produced by compilers while
822 running configure, to aid debugging if configure makes a mistake.
824 It was created by $as_me, which was
825 generated by GNU Autoconf 2.52.20210509. Invocation command line was
836 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
837 uname -m = `(uname -m) 2>/dev/null || echo unknown`
838 uname -r = `(uname -r) 2>/dev/null || echo unknown`
839 uname -s = `(uname -s) 2>/dev/null || echo unknown`
840 uname -v = `(uname -v) 2>/dev/null || echo unknown`
842 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
843 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
845 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
846 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
847 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
848 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
849 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
850 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
851 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
865 # Keep a trace of the command line.
866 # Strip out --no-create and --no-recursion so they do not pile up.
867 # Also quote any args containing shell meta-characters.
873 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
874 | --no-cr | --no-c) ;;
875 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
876 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
877 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
878 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
879 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
881 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
884 # Get rid of the leading space.
887 # When interrupted or exit'd, cleanup temporary files, and complete
888 # config.log. We remove comments because anyway the quotes in there
889 # would cause problems or look ugly.
891 # Save into config.log some information that might help in debugging.
893 echo "## ----------------- ##" >&5
894 echo "## Cache variables. ##" >&5
895 echo "## ----------------- ##" >&5
897 # The following way of writing the cache mishandles newlines in values,
900 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
903 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
904 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
908 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
912 sed "/^$/d" confdefs.h >conftest.log
913 if test -s conftest.log; then
915 echo "## ------------ ##" >&5
916 echo "## confdefs.h. ##" >&5
917 echo "## ------------ ##" >&5
922 test "$ac_signal" != 0 &&
923 echo "$as_me: caught signal $ac_signal" >&5
924 echo "$as_me: exit $exit_status" >&5
925 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
928 for ac_signal in 1 2 13 15; do
929 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
933 # confdefs.h avoids OS command line length limits that DEFS can exceed.
934 rm -rf conftest* confdefs.h
935 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
938 # Let the site file select an alternate cache file if it wants to.
939 # Prefer explicitly selected file to automatically selected ones.
940 if test -z "$CONFIG_SITE"; then
941 if test "x$prefix" != xNONE; then
942 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
944 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
947 for ac_site_file in $CONFIG_SITE; do
948 if test -r "$ac_site_file"; then
949 { echo "$as_me:949: loading site script $ac_site_file" >&5
950 echo "$as_me: loading site script $ac_site_file" >&6;}
951 cat "$ac_site_file" >&5
956 if test -r "$cache_file"; then
957 # Some versions of bash will fail to source /dev/null (special
958 # files actually), so we avoid doing that.
959 if test -f "$cache_file"; then
960 { echo "$as_me:960: loading cache $cache_file" >&5
961 echo "$as_me: loading cache $cache_file" >&6;}
963 [\\/]* | ?:[\\/]* ) . $cache_file;;
968 { echo "$as_me:968: creating cache $cache_file" >&5
969 echo "$as_me: creating cache $cache_file" >&6;}
973 # Check that the precious variables saved in the cache have kept the same
975 ac_cache_corrupted=false
976 for ac_var in `(set) 2>&1 |
977 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
978 eval ac_old_set=\$ac_cv_env_${ac_var}_set
979 eval ac_new_set=\$ac_env_${ac_var}_set
980 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
981 eval ac_new_val="\$ac_env_${ac_var}_value"
982 case "$ac_old_set,$ac_new_set" in
984 { echo "$as_me:984: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
985 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
986 ac_cache_corrupted=: ;;
988 { echo "$as_me:988: error: \`$ac_var' was not set in the previous run" >&5
989 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
990 ac_cache_corrupted=: ;;
993 if test "x$ac_old_val" != "x$ac_new_val"; then
994 { echo "$as_me:994: error: \`$ac_var' has changed since the previous run:" >&5
995 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
996 { echo "$as_me:996: former value: $ac_old_val" >&5
997 echo "$as_me: former value: $ac_old_val" >&2;}
998 { echo "$as_me:998: current value: $ac_new_val" >&5
999 echo "$as_me: current value: $ac_new_val" >&2;}
1000 ac_cache_corrupted=:
1003 # Pass precious variables to config.status. It doesn't matter if
1004 # we pass some twice (in addition to the command line arguments).
1005 if test "$ac_new_set" = set; then
1006 case "$ac_new_val" in
1007 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1008 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1009 ac_configure_args="$ac_configure_args '$ac_arg'"
1011 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1016 if "$ac_cache_corrupted"; then
1017 { echo "$as_me:1017: error: changes in the environment can compromise the build" >&5
1018 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1019 { { echo "$as_me:1019: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1020 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1021 { (exit 1); exit 1; }; }
1025 ac_cpp='$CPP $CPPFLAGS'
1026 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1027 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1028 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1029 ac_main_return="return"
1031 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1033 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1045 echo "#! $SHELL" >conftest.sh
1046 echo "exit 0" >>conftest.sh
1047 chmod +x conftest.sh
1048 if { (echo "$as_me:1048: PATH=\".;.\"; conftest.sh") >&5
1049 (PATH=".;."; conftest.sh) 2>&5
1051 echo "$as_me:1051: \$? = $ac_status" >&5
1052 (exit "$ac_status"); }; then
1053 ac_path_separator=';'
1057 PATH_SEPARATOR="$ac_path_separator"
1060 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1065 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1066 if test -f "$ac_dir/install-sh"; then
1068 ac_install_sh="$ac_aux_dir/install-sh -c"
1070 elif test -f "$ac_dir/install.sh"; then
1072 ac_install_sh="$ac_aux_dir/install.sh -c"
1074 elif test -f "$ac_dir/shtool"; then
1076 ac_install_sh="$ac_aux_dir/shtool install -c"
1080 if test -z "$ac_aux_dir"; then
1081 { { echo "$as_me:1081: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1082 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1083 { (exit 1); exit 1; }; }
1085 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1086 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1087 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1089 # Make sure we can run config.sub.
1090 $ac_config_sub sun4 >/dev/null 2>&1 ||
1091 { { echo "$as_me:1091: error: cannot run $ac_config_sub" >&5
1092 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1093 { (exit 1); exit 1; }; }
1095 echo "$as_me:1095: checking build system type" >&5
1096 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1097 if test "${ac_cv_build+set}" = set; then
1098 echo $ECHO_N "(cached) $ECHO_C" >&6
1100 ac_cv_build_alias=$build_alias
1101 test -z "$ac_cv_build_alias" &&
1102 ac_cv_build_alias=`$ac_config_guess`
1103 test -z "$ac_cv_build_alias" &&
1104 { { echo "$as_me:1104: error: cannot guess build type; you must specify one" >&5
1105 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1106 { (exit 1); exit 1; }; }
1107 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1108 { { echo "$as_me:1108: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1109 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1110 { (exit 1); exit 1; }; }
1113 echo "$as_me:1113: result: $ac_cv_build" >&5
1114 echo "${ECHO_T}$ac_cv_build" >&6
1116 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1117 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1118 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1120 echo "$as_me:1120: checking host system type" >&5
1121 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1122 if test "${ac_cv_host+set}" = set; then
1123 echo $ECHO_N "(cached) $ECHO_C" >&6
1125 ac_cv_host_alias=$host_alias
1126 test -z "$ac_cv_host_alias" &&
1127 ac_cv_host_alias=$ac_cv_build_alias
1128 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1129 { { echo "$as_me:1129: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1130 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1131 { (exit 1); exit 1; }; }
1134 echo "$as_me:1134: result: $ac_cv_host" >&5
1135 echo "${ECHO_T}$ac_cv_host" >&6
1137 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1138 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1139 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1141 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1142 echo "$as_me:1142: checking target system type" >&5
1143 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1144 if test "${ac_cv_target+set}" = set; then
1145 echo $ECHO_N "(cached) $ECHO_C" >&6
1147 ac_cv_target_alias=$target_alias
1148 test "x$ac_cv_target_alias" = "x" &&
1149 ac_cv_target_alias=$ac_cv_host_alias
1150 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1151 { { echo "$as_me:1151: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1152 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1153 { (exit 1); exit 1; }; }
1156 echo "$as_me:1156: result: $ac_cv_target" >&5
1157 echo "${ECHO_T}$ac_cv_target" >&6
1158 target=$ac_cv_target
1159 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1160 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1161 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1163 # The aliases save the names the user supplied, while $host etc.
1164 # will get canonicalized.
1165 test -n "$target_alias" &&
1166 test "$program_prefix$program_suffix$program_transform_name" = \
1168 program_prefix=${target_alias}-
1169 system_name="$host_os"
1171 system_name="`(uname -s -r) 2>/dev/null`"
1172 if test -z "$system_name" ; then
1173 system_name="`(hostname) 2>/dev/null`"
1176 test -n "$system_name" &&
1177 cat >>confdefs.h <<EOF
1178 #define SYSTEM_NAME "$system_name"
1181 if test "${cf_cv_system_name+set}" = set; then
1182 echo $ECHO_N "(cached) $ECHO_C" >&6
1184 cf_cv_system_name="$system_name"
1187 test -z "$system_name" && system_name="$cf_cv_system_name"
1188 test -n "$cf_cv_system_name" && echo "$as_me:1188: result: Configuring for $cf_cv_system_name" >&5
1189 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1191 if test ".$system_name" != ".$cf_cv_system_name" ; then
1192 echo "$as_me:1192: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1193 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1194 { { echo "$as_me:1194: error: \"Please remove config.cache and try again.\"" >&5
1195 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1196 { (exit 1); exit 1; }; }
1199 # Check whether --with-system-type or --without-system-type was given.
1200 if test "${with_system_type+set}" = set; then
1201 withval="$with_system_type"
1202 { echo "$as_me:1202: WARNING: overriding system type to $withval" >&5
1203 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1204 cf_cv_system_name=$withval
1209 ### Save the given $CFLAGS to allow user-override.
1210 cf_user_CFLAGS="$CFLAGS"
1212 ### Default install-location
1213 for ac_prog in ggrep grep
1215 # Extract the first word of "$ac_prog", so it can be a program name with args.
1216 set dummy $ac_prog; ac_word=$2
1217 echo "$as_me:1217: checking for $ac_word" >&5
1218 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1219 if test "${ac_cv_prog_GREP+set}" = set; then
1220 echo $ECHO_N "(cached) $ECHO_C" >&6
1222 if test -n "$GREP"; then
1223 ac_cv_prog_GREP="$GREP" # Let the user override the test.
1225 ac_save_IFS=$IFS; IFS=$ac_path_separator
1227 for ac_dir in $ac_dummy; do
1229 test -z "$ac_dir" && ac_dir=.
1230 $as_executable_p "$ac_dir/$ac_word" || continue
1231 ac_cv_prog_GREP="$ac_prog"
1232 echo "$as_me:1232: found $ac_dir/$ac_word" >&5
1238 GREP=$ac_cv_prog_GREP
1239 if test -n "$GREP"; then
1240 echo "$as_me:1240: result: $GREP" >&5
1241 echo "${ECHO_T}$GREP" >&6
1243 echo "$as_me:1243: result: no" >&5
1244 echo "${ECHO_T}no" >&6
1247 test -n "$GREP" && break
1249 test -n "$GREP" || GREP=": "
1251 echo "$as_me:1251: checking for fgrep" >&5
1252 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1253 if test "${ac_cv_path_FGREP+set}" = set; then
1254 echo $ECHO_N "(cached) $ECHO_C" >&6
1256 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1257 then ac_cv_path_FGREP="$GREP -F"
1259 for ac_prog in gfgrep fgrep
1261 # Extract the first word of "$ac_prog", so it can be a program name with args.
1262 set dummy $ac_prog; ac_word=$2
1263 echo "$as_me:1263: checking for $ac_word" >&5
1264 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1265 if test "${ac_cv_path_FGREP+set}" = set; then
1266 echo $ECHO_N "(cached) $ECHO_C" >&6
1270 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1273 ac_save_IFS=$IFS; IFS=$ac_path_separator
1275 for ac_dir in $ac_dummy; do
1277 test -z "$ac_dir" && ac_dir=.
1278 if $as_executable_p "$ac_dir/$ac_word"; then
1279 ac_cv_path_FGREP="$ac_dir/$ac_word"
1280 echo "$as_me:1280: found $ac_dir/$ac_word" >&5
1288 FGREP=$ac_cv_path_FGREP
1290 if test -n "$FGREP"; then
1291 echo "$as_me:1291: result: $FGREP" >&5
1292 echo "${ECHO_T}$FGREP" >&6
1294 echo "$as_me:1294: result: no" >&5
1295 echo "${ECHO_T}no" >&6
1298 test -n "$FGREP" && break
1300 test -n "$FGREP" || FGREP=": "
1302 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1302: error: cannot find workable fgrep" >&5
1303 echo "$as_me: error: cannot find workable fgrep" >&2;}
1304 { (exit 1); exit 1; }; }
1307 echo "$as_me:1307: result: $ac_cv_path_FGREP" >&5
1308 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1309 FGREP="$ac_cv_path_FGREP"
1311 echo "$as_me:1311: checking for prefix" >&5
1312 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1313 if test "x$prefix" = "xNONE" ; then
1314 case "$cf_cv_system_name" in
1315 # non-vendor systems don't have a conflict
1316 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1319 (*) prefix=$ac_default_prefix
1323 echo "$as_me:1323: result: $prefix" >&5
1324 echo "${ECHO_T}$prefix" >&6
1326 if test "x$prefix" = "xNONE" ; then
1327 echo "$as_me:1327: checking for default include-directory" >&5
1328 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1329 test -n "$verbose" && echo 1>&6
1332 "$includedir/ncurses" \
1334 "$prefix/include/ncurses" \
1335 /usr/local/include \
1336 /usr/local/include/ncurses \
1338 /usr/include/ncurses
1340 cf_dir=`eval echo "$cf_symbol"`
1341 if test -f "$cf_dir/curses.h" ; then
1342 if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1343 includedir="$cf_symbol"
1344 test -n "$verbose" && echo $ECHO_N " found " 1>&6
1348 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1350 echo "$as_me:1350: result: $includedir" >&5
1351 echo "${ECHO_T}$includedir" >&6
1354 ### Checks for programs.
1357 ac_cpp='$CPP $CPPFLAGS'
1358 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1359 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1360 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1361 ac_main_return="return"
1362 if test -n "$ac_tool_prefix"; then
1363 for ac_prog in gnatgcc gcc cc
1365 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1366 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1367 echo "$as_me:1367: checking for $ac_word" >&5
1368 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1369 if test "${ac_cv_prog_CC+set}" = set; then
1370 echo $ECHO_N "(cached) $ECHO_C" >&6
1372 if test -n "$CC"; then
1373 ac_cv_prog_CC="$CC" # Let the user override the test.
1375 ac_save_IFS=$IFS; IFS=$ac_path_separator
1377 for ac_dir in $ac_dummy; do
1379 test -z "$ac_dir" && ac_dir=.
1380 $as_executable_p "$ac_dir/$ac_word" || continue
1381 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1382 echo "$as_me:1382: found $ac_dir/$ac_word" >&5
1389 if test -n "$CC"; then
1390 echo "$as_me:1390: result: $CC" >&5
1391 echo "${ECHO_T}$CC" >&6
1393 echo "$as_me:1393: result: no" >&5
1394 echo "${ECHO_T}no" >&6
1397 test -n "$CC" && break
1400 if test -z "$CC"; then
1402 for ac_prog in gnatgcc gcc cc
1404 # Extract the first word of "$ac_prog", so it can be a program name with args.
1405 set dummy $ac_prog; ac_word=$2
1406 echo "$as_me:1406: checking for $ac_word" >&5
1407 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1408 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1409 echo $ECHO_N "(cached) $ECHO_C" >&6
1411 if test -n "$ac_ct_CC"; then
1412 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1414 ac_save_IFS=$IFS; IFS=$ac_path_separator
1416 for ac_dir in $ac_dummy; do
1418 test -z "$ac_dir" && ac_dir=.
1419 $as_executable_p "$ac_dir/$ac_word" || continue
1420 ac_cv_prog_ac_ct_CC="$ac_prog"
1421 echo "$as_me:1421: found $ac_dir/$ac_word" >&5
1427 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1428 if test -n "$ac_ct_CC"; then
1429 echo "$as_me:1429: result: $ac_ct_CC" >&5
1430 echo "${ECHO_T}$ac_ct_CC" >&6
1432 echo "$as_me:1432: result: no" >&5
1433 echo "${ECHO_T}no" >&6
1436 test -n "$ac_ct_CC" && break
1442 test -z "$CC" && { { echo "$as_me:1442: error: no acceptable cc found in \$PATH" >&5
1443 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1444 { (exit 1); exit 1; }; }
1446 # Provide some information about the compiler.
1447 echo "$as_me:1447:" \
1448 "checking for C compiler version" >&5
1449 ac_compiler=`set X $ac_compile; echo "$2"`
1450 { (eval echo "$as_me:1450: \"$ac_compiler --version </dev/null >&5\"") >&5
1451 (eval $ac_compiler --version </dev/null >&5) 2>&5
1453 echo "$as_me:1453: \$? = $ac_status" >&5
1454 (exit "$ac_status"); }
1455 { (eval echo "$as_me:1455: \"$ac_compiler -v </dev/null >&5\"") >&5
1456 (eval $ac_compiler -v </dev/null >&5) 2>&5
1458 echo "$as_me:1458: \$? = $ac_status" >&5
1459 (exit "$ac_status"); }
1460 { (eval echo "$as_me:1460: \"$ac_compiler -V </dev/null >&5\"") >&5
1461 (eval $ac_compiler -V </dev/null >&5) 2>&5
1463 echo "$as_me:1463: \$? = $ac_status" >&5
1464 (exit "$ac_status"); }
1466 cat >"conftest.$ac_ext" <<_ACEOF
1467 #line 1467 "configure"
1468 #include "confdefs.h"
1478 ac_clean_files_save=$ac_clean_files
1479 ac_clean_files="$ac_clean_files a.out a.exe"
1480 # Try to create an executable without -o first, disregard a.out.
1481 # It will help us diagnose broken compilers, and finding out an intuition
1483 echo "$as_me:1483: checking for C compiler default output" >&5
1484 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1485 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1486 if { (eval echo "$as_me:1486: \"$ac_link_default\"") >&5
1487 (eval $ac_link_default) 2>&5
1489 echo "$as_me:1489: \$? = $ac_status" >&5
1490 (exit "$ac_status"); }; then
1491 # Find the output, starting from the most likely. This scheme is
1492 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1494 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1495 ls a.out conftest 2>/dev/null;
1496 ls a.* conftest.* 2>/dev/null`; do
1498 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1499 a.out ) # We found the default executable, but exeext='' is most
1502 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1503 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1510 echo "$as_me: failed program was:" >&5
1511 cat "conftest.$ac_ext" >&5
1512 { { echo "$as_me:1512: error: C compiler cannot create executables" >&5
1513 echo "$as_me: error: C compiler cannot create executables" >&2;}
1514 { (exit 77); exit 77; }; }
1517 ac_exeext=$ac_cv_exeext
1518 echo "$as_me:1518: result: $ac_file" >&5
1519 echo "${ECHO_T}$ac_file" >&6
1521 # Check the compiler produces executables we can run. If not, either
1522 # the compiler is broken, or we cross compile.
1523 echo "$as_me:1523: checking whether the C compiler works" >&5
1524 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1525 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1526 # If not cross compiling, check that we can run a simple program.
1527 if test "$cross_compiling" != yes; then
1528 if { ac_try='./$ac_file'
1529 { (eval echo "$as_me:1529: \"$ac_try\"") >&5
1532 echo "$as_me:1532: \$? = $ac_status" >&5
1533 (exit "$ac_status"); }; }; then
1536 if test "$cross_compiling" = maybe; then
1539 { { echo "$as_me:1539: error: cannot run C compiled programs.
1540 If you meant to cross compile, use \`--host'." >&5
1541 echo "$as_me: error: cannot run C compiled programs.
1542 If you meant to cross compile, use \`--host'." >&2;}
1543 { (exit 1); exit 1; }; }
1547 echo "$as_me:1547: result: yes" >&5
1548 echo "${ECHO_T}yes" >&6
1550 rm -f a.out a.exe "conftest$ac_cv_exeext"
1551 ac_clean_files=$ac_clean_files_save
1552 # Check the compiler produces executables we can run. If not, either
1553 # the compiler is broken, or we cross compile.
1554 echo "$as_me:1554: checking whether we are cross compiling" >&5
1555 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1556 echo "$as_me:1556: result: $cross_compiling" >&5
1557 echo "${ECHO_T}$cross_compiling" >&6
1559 echo "$as_me:1559: checking for executable suffix" >&5
1560 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1561 if { (eval echo "$as_me:1561: \"$ac_link\"") >&5
1562 (eval $ac_link) 2>&5
1564 echo "$as_me:1564: \$? = $ac_status" >&5
1565 (exit "$ac_status"); }; then
1566 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1567 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1568 # work properly (i.e., refer to `conftest.exe'), while it won't with
1570 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1572 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1573 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1580 { { echo "$as_me:1580: error: cannot compute EXEEXT: cannot compile and link" >&5
1581 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1582 { (exit 1); exit 1; }; }
1585 rm -f "conftest$ac_cv_exeext"
1586 echo "$as_me:1586: result: $ac_cv_exeext" >&5
1587 echo "${ECHO_T}$ac_cv_exeext" >&6
1589 rm -f "conftest.$ac_ext"
1590 EXEEXT=$ac_cv_exeext
1592 echo "$as_me:1592: checking for object suffix" >&5
1593 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1594 if test "${ac_cv_objext+set}" = set; then
1595 echo $ECHO_N "(cached) $ECHO_C" >&6
1597 cat >"conftest.$ac_ext" <<_ACEOF
1598 #line 1598 "configure"
1599 #include "confdefs.h"
1609 rm -f conftest.o conftest.obj
1610 if { (eval echo "$as_me:1610: \"$ac_compile\"") >&5
1611 (eval $ac_compile) 2>&5
1613 echo "$as_me:1613: \$? = $ac_status" >&5
1614 (exit "$ac_status"); }; then
1615 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1617 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1618 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1623 echo "$as_me: failed program was:" >&5
1624 cat "conftest.$ac_ext" >&5
1625 { { echo "$as_me:1625: error: cannot compute OBJEXT: cannot compile" >&5
1626 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1627 { (exit 1); exit 1; }; }
1630 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1632 echo "$as_me:1632: result: $ac_cv_objext" >&5
1633 echo "${ECHO_T}$ac_cv_objext" >&6
1634 OBJEXT=$ac_cv_objext
1636 echo "$as_me:1636: checking whether we are using the GNU C compiler" >&5
1637 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1638 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1639 echo $ECHO_N "(cached) $ECHO_C" >&6
1641 cat >"conftest.$ac_ext" <<_ACEOF
1642 #line 1642 "configure"
1643 #include "confdefs.h"
1656 rm -f "conftest.$ac_objext"
1657 if { (eval echo "$as_me:1657: \"$ac_compile\"") >&5
1658 (eval $ac_compile) 2>&5
1660 echo "$as_me:1660: \$? = $ac_status" >&5
1661 (exit "$ac_status"); } &&
1662 { ac_try='test -s "conftest.$ac_objext"'
1663 { (eval echo "$as_me:1663: \"$ac_try\"") >&5
1666 echo "$as_me:1666: \$? = $ac_status" >&5
1667 (exit "$ac_status"); }; }; then
1670 echo "$as_me: failed program was:" >&5
1671 cat "conftest.$ac_ext" >&5
1674 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1675 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1678 echo "$as_me:1678: result: $ac_cv_c_compiler_gnu" >&5
1679 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1680 GCC=`test $ac_compiler_gnu = yes && echo yes`
1681 ac_test_CFLAGS=${CFLAGS+set}
1682 ac_save_CFLAGS=$CFLAGS
1684 echo "$as_me:1684: checking whether $CC accepts -g" >&5
1685 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1686 if test "${ac_cv_prog_cc_g+set}" = set; then
1687 echo $ECHO_N "(cached) $ECHO_C" >&6
1689 cat >"conftest.$ac_ext" <<_ACEOF
1690 #line 1690 "configure"
1691 #include "confdefs.h"
1701 rm -f "conftest.$ac_objext"
1702 if { (eval echo "$as_me:1702: \"$ac_compile\"") >&5
1703 (eval $ac_compile) 2>&5
1705 echo "$as_me:1705: \$? = $ac_status" >&5
1706 (exit "$ac_status"); } &&
1707 { ac_try='test -s "conftest.$ac_objext"'
1708 { (eval echo "$as_me:1708: \"$ac_try\"") >&5
1711 echo "$as_me:1711: \$? = $ac_status" >&5
1712 (exit "$ac_status"); }; }; then
1715 echo "$as_me: failed program was:" >&5
1716 cat "conftest.$ac_ext" >&5
1719 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1721 echo "$as_me:1721: result: $ac_cv_prog_cc_g" >&5
1722 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1723 if test "$ac_test_CFLAGS" = set; then
1724 CFLAGS=$ac_save_CFLAGS
1725 elif test $ac_cv_prog_cc_g = yes; then
1726 if test "$GCC" = yes; then
1732 if test "$GCC" = yes; then
1738 # Some people use a C++ compiler to compile C. Since we use `exit',
1739 # in C++ we need to declare it. In case someone uses the same compiler
1740 # for both compiling C and C++ we need to have the C++ compiler decide
1741 # the declaration of exit, since it's the most demanding environment.
1742 cat >"conftest.$ac_ext" <<_ACEOF
1747 rm -f "conftest.$ac_objext"
1748 if { (eval echo "$as_me:1748: \"$ac_compile\"") >&5
1749 (eval $ac_compile) 2>&5
1751 echo "$as_me:1751: \$? = $ac_status" >&5
1752 (exit "$ac_status"); } &&
1753 { ac_try='test -s "conftest.$ac_objext"'
1754 { (eval echo "$as_me:1754: \"$ac_try\"") >&5
1757 echo "$as_me:1757: \$? = $ac_status" >&5
1758 (exit "$ac_status"); }; }; then
1759 for ac_declaration in \
1761 '#include <stdlib.h>' \
1762 'extern "C" void std::exit (int) throw (); using std::exit;' \
1763 'extern "C" void std::exit (int); using std::exit;' \
1764 'extern "C" void exit (int) throw ();' \
1765 'extern "C" void exit (int);' \
1768 cat >"conftest.$ac_ext" <<_ACEOF
1769 #line 1769 "configure"
1770 #include "confdefs.h"
1781 rm -f "conftest.$ac_objext"
1782 if { (eval echo "$as_me:1782: \"$ac_compile\"") >&5
1783 (eval $ac_compile) 2>&5
1785 echo "$as_me:1785: \$? = $ac_status" >&5
1786 (exit "$ac_status"); } &&
1787 { ac_try='test -s "conftest.$ac_objext"'
1788 { (eval echo "$as_me:1788: \"$ac_try\"") >&5
1791 echo "$as_me:1791: \$? = $ac_status" >&5
1792 (exit "$ac_status"); }; }; then
1795 echo "$as_me: failed program was:" >&5
1796 cat "conftest.$ac_ext" >&5
1799 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1800 cat >"conftest.$ac_ext" <<_ACEOF
1801 #line 1801 "configure"
1802 #include "confdefs.h"
1812 rm -f "conftest.$ac_objext"
1813 if { (eval echo "$as_me:1813: \"$ac_compile\"") >&5
1814 (eval $ac_compile) 2>&5
1816 echo "$as_me:1816: \$? = $ac_status" >&5
1817 (exit "$ac_status"); } &&
1818 { ac_try='test -s "conftest.$ac_objext"'
1819 { (eval echo "$as_me:1819: \"$ac_try\"") >&5
1822 echo "$as_me:1822: \$? = $ac_status" >&5
1823 (exit "$ac_status"); }; }; then
1826 echo "$as_me: failed program was:" >&5
1827 cat "conftest.$ac_ext" >&5
1829 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1832 if test -n "$ac_declaration"; then
1833 echo '#ifdef __cplusplus' >>confdefs.h
1834 echo "$ac_declaration" >>confdefs.h
1835 echo '#endif' >>confdefs.h
1839 echo "$as_me: failed program was:" >&5
1840 cat "conftest.$ac_ext" >&5
1842 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1844 ac_cpp='$CPP $CPPFLAGS'
1845 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1846 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1847 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1848 ac_main_return="return"
1851 if test "$GCC" = yes ; then
1852 echo "$as_me:1852: checking version of $CC" >&5
1853 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1854 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1855 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1856 echo "$as_me:1856: result: $GCC_VERSION" >&5
1857 echo "${ECHO_T}$GCC_VERSION" >&6
1862 if test "$GCC" = yes ; then
1865 echo "$as_me:1865: checking if this is really Intel C compiler" >&5
1866 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1867 cf_save_CFLAGS="$CFLAGS"
1868 CFLAGS="$CFLAGS -no-gcc"
1869 cat >"conftest.$ac_ext" <<_ACEOF
1870 #line 1870 "configure"
1871 #include "confdefs.h"
1877 #ifdef __INTEL_COMPILER
1886 rm -f "conftest.$ac_objext"
1887 if { (eval echo "$as_me:1887: \"$ac_compile\"") >&5
1888 (eval $ac_compile) 2>&5
1890 echo "$as_me:1890: \$? = $ac_status" >&5
1891 (exit "$ac_status"); } &&
1892 { ac_try='test -s "conftest.$ac_objext"'
1893 { (eval echo "$as_me:1893: \"$ac_try\"") >&5
1896 echo "$as_me:1896: \$? = $ac_status" >&5
1897 (exit "$ac_status"); }; }; then
1899 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1902 echo "$as_me: failed program was:" >&5
1903 cat "conftest.$ac_ext" >&5
1905 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1906 CFLAGS="$cf_save_CFLAGS"
1907 echo "$as_me:1907: result: $INTEL_COMPILER" >&5
1908 echo "${ECHO_T}$INTEL_COMPILER" >&6
1915 if test "$GCC" = yes ; then
1916 echo "$as_me:1916: checking if this is really Clang C compiler" >&5
1917 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1918 cf_save_CFLAGS="$CFLAGS"
1919 cat >"conftest.$ac_ext" <<_ACEOF
1920 #line 1920 "configure"
1921 #include "confdefs.h"
1936 rm -f "conftest.$ac_objext"
1937 if { (eval echo "$as_me:1937: \"$ac_compile\"") >&5
1938 (eval $ac_compile) 2>&5
1940 echo "$as_me:1940: \$? = $ac_status" >&5
1941 (exit "$ac_status"); } &&
1942 { ac_try='test -s "conftest.$ac_objext"'
1943 { (eval echo "$as_me:1943: \"$ac_try\"") >&5
1946 echo "$as_me:1946: \$? = $ac_status" >&5
1947 (exit "$ac_status"); }; }; then
1951 echo "$as_me: failed program was:" >&5
1952 cat "conftest.$ac_ext" >&5
1954 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1955 CFLAGS="$cf_save_CFLAGS"
1956 echo "$as_me:1956: result: $CLANG_COMPILER" >&5
1957 echo "${ECHO_T}$CLANG_COMPILER" >&6
1962 if test "x$CLANG_COMPILER" = "xyes" ; then
1964 (c[1-9][0-9]|*/c[1-9][0-9])
1965 { echo "$as_me:1965: WARNING: replacing broken compiler alias $CC" >&5
1966 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
1967 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
1972 echo "$as_me:1972: checking version of $CC" >&5
1973 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1974 CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1975 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
1976 echo "$as_me:1976: result: $CLANG_VERSION" >&5
1977 echo "${ECHO_T}$CLANG_VERSION" >&6
1979 for cf_clang_opt in \
1980 -Qunused-arguments \
1981 -Wno-error=implicit-function-declaration
1983 echo "$as_me:1983: checking if option $cf_clang_opt works" >&5
1984 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
1985 cf_save_CFLAGS="$CFLAGS"
1986 CFLAGS="$CFLAGS $cf_clang_opt"
1987 cat >"conftest.$ac_ext" <<_ACEOF
1988 #line 1988 "configure"
1989 #include "confdefs.h"
1996 printf("hello!\\n");
2001 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2002 if { (eval echo "$as_me:2002: \"$ac_link\"") >&5
2003 (eval $ac_link) 2>&5
2005 echo "$as_me:2005: \$? = $ac_status" >&5
2006 (exit "$ac_status"); } &&
2007 { ac_try='test -s "conftest$ac_exeext"'
2008 { (eval echo "$as_me:2008: \"$ac_try\"") >&5
2011 echo "$as_me:2011: \$? = $ac_status" >&5
2012 (exit "$ac_status"); }; }; then
2016 echo "$as_me: failed program was:" >&5
2017 cat "conftest.$ac_ext" >&5
2021 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2022 echo "$as_me:2022: result: $cf_clang_optok" >&5
2023 echo "${ECHO_T}$cf_clang_optok" >&6
2024 CFLAGS="$cf_save_CFLAGS"
2025 if test "$cf_clang_optok" = yes; then
2026 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2028 echo "${as_me:-configure}:2028: testing adding option $cf_clang_opt ..." 1>&5
2030 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2031 CFLAGS="${CFLAGS}$cf_clang_opt"
2037 echo "$as_me:2037: checking for $CC option to accept ANSI C" >&5
2038 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2039 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2040 echo $ECHO_N "(cached) $ECHO_C" >&6
2042 ac_cv_prog_cc_stdc=no
2044 cat >"conftest.$ac_ext" <<_ACEOF
2045 #line 2045 "configure"
2046 #include "confdefs.h"
2049 #include <sys/types.h>
2050 #include <sys/stat.h>
2051 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2052 struct buf { int x; };
2053 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2054 static char *e (p, i)
2060 static char *f (char * (*g) (char **, int), char **p, ...)
2065 s = g (p, va_arg (v,int));
2069 int test (int i, double x);
2070 struct s1 {int (*f) (int a);};
2071 struct s2 {int (*f) (double a);};
2072 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2078 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2083 # Don't try gcc -ansi; that turns off useful extensions and
2084 # breaks some systems' header files.
2085 # AIX -qlanglvl=ansi
2086 # Ultrix and OSF/1 -std1
2087 # HP-UX 10.20 and later -Ae
2088 # HP-UX older versions -Aa -D_HPUX_SOURCE
2089 # SVR4 -Xc -D__EXTENSIONS__
2090 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2092 CC="$ac_save_CC $ac_arg"
2093 rm -f "conftest.$ac_objext"
2094 if { (eval echo "$as_me:2094: \"$ac_compile\"") >&5
2095 (eval $ac_compile) 2>&5
2097 echo "$as_me:2097: \$? = $ac_status" >&5
2098 (exit "$ac_status"); } &&
2099 { ac_try='test -s "conftest.$ac_objext"'
2100 { (eval echo "$as_me:2100: \"$ac_try\"") >&5
2103 echo "$as_me:2103: \$? = $ac_status" >&5
2104 (exit "$ac_status"); }; }; then
2105 ac_cv_prog_cc_stdc=$ac_arg
2108 echo "$as_me: failed program was:" >&5
2109 cat "conftest.$ac_ext" >&5
2111 rm -f "conftest.$ac_objext"
2113 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2118 case "x$ac_cv_prog_cc_stdc" in
2120 echo "$as_me:2120: result: none needed" >&5
2121 echo "${ECHO_T}none needed" >&6 ;;
2123 echo "$as_me:2123: result: $ac_cv_prog_cc_stdc" >&5
2124 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2125 CC="$CC $ac_cv_prog_cc_stdc" ;;
2128 # This should have been defined by AC_PROG_CC
2131 echo "$as_me:2131: checking \$CFLAGS variable" >&5
2132 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2135 echo "$as_me:2135: result: broken" >&5
2136 echo "${ECHO_T}broken" >&6
2137 { echo "$as_me:2137: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2138 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2141 for cf_arg in $cf_flags
2147 cf_new_extra_cppflags=
2149 for cf_add_cflags in $cf_arg
2151 case "$cf_fix_cppflags" in
2153 case "$cf_add_cflags" in
2154 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2155 case "$cf_add_cflags" in
2157 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2159 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2160 && test -z "${cf_tst_cflags}" \
2161 && cf_fix_cppflags=yes
2163 if test "$cf_fix_cppflags" = yes ; then
2165 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2166 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2169 elif test "${cf_tst_cflags}" = "\"'" ; then
2171 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2172 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2182 case "$cf_add_cflags" in
2184 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2186 CPPFLAGS=`echo "$CPPFLAGS" | \
2187 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2188 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2193 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2194 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2201 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2202 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2209 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2210 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2212 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2214 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2215 && test -z "${cf_tst_cflags}" \
2216 && cf_fix_cppflags=no
2221 if test -n "$cf_new_cflags" ; then
2223 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2224 CFLAGS="${CFLAGS}$cf_new_cflags"
2228 if test -n "$cf_new_cppflags" ; then
2230 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2231 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2235 if test -n "$cf_new_extra_cppflags" ; then
2237 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2238 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2245 echo "$as_me:2245: result: ok" >&5
2246 echo "${ECHO_T}ok" >&6
2250 echo "$as_me:2250: checking \$CC variable" >&5
2251 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2254 echo "$as_me:2254: result: broken" >&5
2255 echo "${ECHO_T}broken" >&6
2256 { echo "$as_me:2256: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2257 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2259 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2260 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2262 for cf_arg in $cf_flags
2270 cf_new_extra_cppflags=
2272 for cf_add_cflags in $cf_arg
2274 case "$cf_fix_cppflags" in
2276 case "$cf_add_cflags" in
2277 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2278 case "$cf_add_cflags" in
2280 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2282 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2283 && test -z "${cf_tst_cflags}" \
2284 && cf_fix_cppflags=yes
2286 if test "$cf_fix_cppflags" = yes ; then
2288 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2289 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2292 elif test "${cf_tst_cflags}" = "\"'" ; then
2294 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2295 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2305 case "$cf_add_cflags" in
2307 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2309 CPPFLAGS=`echo "$CPPFLAGS" | \
2310 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2311 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2316 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2317 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2324 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2325 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2332 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2333 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2335 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2337 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2338 && test -z "${cf_tst_cflags}" \
2339 && cf_fix_cppflags=no
2344 if test -n "$cf_new_cflags" ; then
2346 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2347 CFLAGS="${CFLAGS}$cf_new_cflags"
2351 if test -n "$cf_new_cppflags" ; then
2353 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2354 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2358 if test -n "$cf_new_extra_cppflags" ; then
2360 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2361 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2371 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2373 echo "${as_me:-configure}:2373: testing resulting CC: '$CC' ..." 1>&5
2375 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2377 echo "${as_me:-configure}:2377: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2379 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2381 echo "${as_me:-configure}:2381: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2385 echo "$as_me:2385: result: ok" >&5
2386 echo "${ECHO_T}ok" >&6
2390 echo "$as_me:2390: checking for egrep" >&5
2391 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2392 if test "${ac_cv_path_EGREP+set}" = set; then
2393 echo $ECHO_N "(cached) $ECHO_C" >&6
2395 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2396 then ac_cv_path_EGREP="$GREP -E"
2398 for ac_prog in gegrep egrep
2400 # Extract the first word of "$ac_prog", so it can be a program name with args.
2401 set dummy $ac_prog; ac_word=$2
2402 echo "$as_me:2402: checking for $ac_word" >&5
2403 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2404 if test "${ac_cv_path_EGREP+set}" = set; then
2405 echo $ECHO_N "(cached) $ECHO_C" >&6
2409 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2412 ac_save_IFS=$IFS; IFS=$ac_path_separator
2414 for ac_dir in $ac_dummy; do
2416 test -z "$ac_dir" && ac_dir=.
2417 if $as_executable_p "$ac_dir/$ac_word"; then
2418 ac_cv_path_EGREP="$ac_dir/$ac_word"
2419 echo "$as_me:2419: found $ac_dir/$ac_word" >&5
2427 EGREP=$ac_cv_path_EGREP
2429 if test -n "$EGREP"; then
2430 echo "$as_me:2430: result: $EGREP" >&5
2431 echo "${ECHO_T}$EGREP" >&6
2433 echo "$as_me:2433: result: no" >&5
2434 echo "${ECHO_T}no" >&6
2437 test -n "$EGREP" && break
2439 test -n "$EGREP" || EGREP=": "
2441 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2441: error: cannot find workable egrep" >&5
2442 echo "$as_me: error: cannot find workable egrep" >&2;}
2443 { (exit 1); exit 1; }; }
2446 echo "$as_me:2446: result: $ac_cv_path_EGREP" >&5
2447 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2448 EGREP="$ac_cv_path_EGREP"
2451 ac_cpp='$CPP $CPPFLAGS'
2452 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2453 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2454 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2455 ac_main_return="return"
2456 echo "$as_me:2456: checking how to run the C preprocessor" >&5
2457 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2458 # On Suns, sometimes $CPP names a directory.
2459 if test -n "$CPP" && test -d "$CPP"; then
2462 if test -z "$CPP"; then
2463 if test "${ac_cv_prog_CPP+set}" = set; then
2464 echo $ECHO_N "(cached) $ECHO_C" >&6
2466 # Double quotes because CPP needs to be expanded
2467 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2470 for ac_c_preproc_warn_flag in '' yes
2472 # Use a header file that comes with gcc, so configuring glibc
2473 # with a fresh cross-compiler works.
2474 # On the NeXT, cc -E runs the code through the compiler's parser,
2475 # not just through cpp. "Syntax error" is here to catch this case.
2476 cat >"conftest.$ac_ext" <<_ACEOF
2477 #line 2477 "configure"
2478 #include "confdefs.h"
2482 if { (eval echo "$as_me:2482: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2483 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2485 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2487 cat conftest.err >&5
2488 echo "$as_me:2488: \$? = $ac_status" >&5
2489 (exit "$ac_status"); } >/dev/null; then
2490 if test -s conftest.err; then
2491 ac_cpp_err=$ac_c_preproc_warn_flag
2498 if test -z "$ac_cpp_err"; then
2501 echo "$as_me: failed program was:" >&5
2502 cat "conftest.$ac_ext" >&5
2503 # Broken: fails on valid input.
2506 rm -f conftest.err "conftest.$ac_ext"
2508 # OK, works on sane cases. Now check whether non-existent headers
2509 # can be detected and how.
2510 cat >"conftest.$ac_ext" <<_ACEOF
2511 #line 2511 "configure"
2512 #include "confdefs.h"
2513 #include <ac_nonexistent.h>
2515 if { (eval echo "$as_me:2515: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2516 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2518 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2520 cat conftest.err >&5
2521 echo "$as_me:2521: \$? = $ac_status" >&5
2522 (exit "$ac_status"); } >/dev/null; then
2523 if test -s conftest.err; then
2524 ac_cpp_err=$ac_c_preproc_warn_flag
2531 if test -z "$ac_cpp_err"; then
2532 # Broken: success on invalid input.
2535 echo "$as_me: failed program was:" >&5
2536 cat "conftest.$ac_ext" >&5
2537 # Passes both tests.
2541 rm -f conftest.err "conftest.$ac_ext"
2544 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2545 rm -f conftest.err "conftest.$ac_ext"
2546 if $ac_preproc_ok; then
2558 echo "$as_me:2558: result: $CPP" >&5
2559 echo "${ECHO_T}$CPP" >&6
2561 for ac_c_preproc_warn_flag in '' yes
2563 # Use a header file that comes with gcc, so configuring glibc
2564 # with a fresh cross-compiler works.
2565 # On the NeXT, cc -E runs the code through the compiler's parser,
2566 # not just through cpp. "Syntax error" is here to catch this case.
2567 cat >"conftest.$ac_ext" <<_ACEOF
2568 #line 2568 "configure"
2569 #include "confdefs.h"
2573 if { (eval echo "$as_me:2573: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2574 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2576 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2578 cat conftest.err >&5
2579 echo "$as_me:2579: \$? = $ac_status" >&5
2580 (exit "$ac_status"); } >/dev/null; then
2581 if test -s conftest.err; then
2582 ac_cpp_err=$ac_c_preproc_warn_flag
2589 if test -z "$ac_cpp_err"; then
2592 echo "$as_me: failed program was:" >&5
2593 cat "conftest.$ac_ext" >&5
2594 # Broken: fails on valid input.
2597 rm -f conftest.err "conftest.$ac_ext"
2599 # OK, works on sane cases. Now check whether non-existent headers
2600 # can be detected and how.
2601 cat >"conftest.$ac_ext" <<_ACEOF
2602 #line 2602 "configure"
2603 #include "confdefs.h"
2604 #include <ac_nonexistent.h>
2606 if { (eval echo "$as_me:2606: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2607 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2609 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2611 cat conftest.err >&5
2612 echo "$as_me:2612: \$? = $ac_status" >&5
2613 (exit "$ac_status"); } >/dev/null; then
2614 if test -s conftest.err; then
2615 ac_cpp_err=$ac_c_preproc_warn_flag
2622 if test -z "$ac_cpp_err"; then
2623 # Broken: success on invalid input.
2626 echo "$as_me: failed program was:" >&5
2627 cat "conftest.$ac_ext" >&5
2628 # Passes both tests.
2632 rm -f conftest.err "conftest.$ac_ext"
2635 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2636 rm -f conftest.err "conftest.$ac_ext"
2637 if $ac_preproc_ok; then
2640 { { echo "$as_me:2640: error: C preprocessor \"$CPP\" fails sanity check" >&5
2641 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2642 { (exit 1); exit 1; }; }
2646 ac_cpp='$CPP $CPPFLAGS'
2647 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2648 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2649 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2650 ac_main_return="return"
2652 if test $ac_cv_c_compiler_gnu = yes; then
2653 echo "$as_me:2653: checking whether $CC needs -traditional" >&5
2654 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2655 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2656 echo $ECHO_N "(cached) $ECHO_C" >&6
2658 ac_pattern="Autoconf.*'x'"
2659 cat >"conftest.$ac_ext" <<_ACEOF
2660 #line 2660 "configure"
2661 #include "confdefs.h"
2663 int Autoconf = TIOCGETP;
2665 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2666 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2667 ac_cv_prog_gcc_traditional=yes
2669 ac_cv_prog_gcc_traditional=no
2673 if test $ac_cv_prog_gcc_traditional = no; then
2674 cat >"conftest.$ac_ext" <<_ACEOF
2675 #line 2675 "configure"
2676 #include "confdefs.h"
2678 int Autoconf = TCGETA;
2680 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2681 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2682 ac_cv_prog_gcc_traditional=yes
2688 echo "$as_me:2688: result: $ac_cv_prog_gcc_traditional" >&5
2689 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2690 if test $ac_cv_prog_gcc_traditional = yes; then
2691 CC="$CC -traditional"
2695 echo "$as_me:2695: checking whether $CC understands -c and -o together" >&5
2696 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2697 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2698 echo $ECHO_N "(cached) $ECHO_C" >&6
2701 cat > conftest.$ac_ext <<CF_EOF
2704 ${cf_cv_main_return:-return}(0);
2707 # We do the test twice because some compilers refuse to overwrite an
2708 # existing .o file with -o, though they will create one.
2709 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2710 if { (eval echo "$as_me:2710: \"$ac_try\"") >&5
2713 echo "$as_me:2713: \$? = $ac_status" >&5
2714 (exit "$ac_status"); } &&
2715 test -f conftest2.$ac_objext && { (eval echo "$as_me:2715: \"$ac_try\"") >&5
2718 echo "$as_me:2718: \$? = $ac_status" >&5
2719 (exit "$ac_status"); };
2721 eval cf_cv_prog_CC_c_o=yes
2723 eval cf_cv_prog_CC_c_o=no
2728 if test "$cf_cv_prog_CC_c_o" = yes; then
2729 echo "$as_me:2729: result: yes" >&5
2730 echo "${ECHO_T}yes" >&6
2732 echo "$as_me:2732: result: no" >&5
2733 echo "${ECHO_T}no" >&6
2736 test "$program_prefix" != NONE &&
2737 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2738 # Use a double $ so make ignores it.
2739 test "$program_suffix" != NONE &&
2740 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2741 # Double any \ or $. echo might interpret backslashes.
2742 # By default was `s,x,x', remove it if useless.
2743 cat <<\_ACEOF >conftest.sed
2744 s/[\\$]/&&/g;s/;s,x,x,$//
2746 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2749 for ac_prog in mawk gawk nawk awk
2751 # Extract the first word of "$ac_prog", so it can be a program name with args.
2752 set dummy $ac_prog; ac_word=$2
2753 echo "$as_me:2753: checking for $ac_word" >&5
2754 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2755 if test "${ac_cv_prog_AWK+set}" = set; then
2756 echo $ECHO_N "(cached) $ECHO_C" >&6
2758 if test -n "$AWK"; then
2759 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2761 ac_save_IFS=$IFS; IFS=$ac_path_separator
2763 for ac_dir in $ac_dummy; do
2765 test -z "$ac_dir" && ac_dir=.
2766 $as_executable_p "$ac_dir/$ac_word" || continue
2767 ac_cv_prog_AWK="$ac_prog"
2768 echo "$as_me:2768: found $ac_dir/$ac_word" >&5
2775 if test -n "$AWK"; then
2776 echo "$as_me:2776: result: $AWK" >&5
2777 echo "${ECHO_T}$AWK" >&6
2779 echo "$as_me:2779: result: no" >&5
2780 echo "${ECHO_T}no" >&6
2783 test -n "$AWK" && break
2786 test -z "$AWK" && { { echo "$as_me:2786: error: No awk program found" >&5
2787 echo "$as_me: error: No awk program found" >&2;}
2788 { (exit 1); exit 1; }; }
2790 echo "$as_me:2790: checking for egrep" >&5
2791 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2792 if test "${ac_cv_prog_egrep+set}" = set; then
2793 echo $ECHO_N "(cached) $ECHO_C" >&6
2795 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2796 then ac_cv_prog_egrep='grep -E'
2797 else ac_cv_prog_egrep='egrep'
2800 echo "$as_me:2800: result: $ac_cv_prog_egrep" >&5
2801 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2802 EGREP=$ac_cv_prog_egrep
2804 test -z "$EGREP" && { { echo "$as_me:2804: error: No egrep program found" >&5
2805 echo "$as_me: error: No egrep program found" >&2;}
2806 { (exit 1); exit 1; }; }
2808 # Find a good install program. We prefer a C program (faster),
2809 # so one script is as good as another. But avoid the broken or
2810 # incompatible versions:
2811 # SysV /etc/install, /usr/sbin/install
2812 # SunOS /usr/etc/install
2813 # IRIX /sbin/install
2815 # AmigaOS /C/install, which installs bootblocks on floppy discs
2816 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2817 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2818 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2819 # ./install, which can be erroneously created by make from ./install.sh.
2820 echo "$as_me:2820: checking for a BSD compatible install" >&5
2821 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2822 if test -z "$INSTALL"; then
2823 if test "${ac_cv_path_install+set}" = set; then
2824 echo $ECHO_N "(cached) $ECHO_C" >&6
2826 ac_save_IFS=$IFS; IFS=$ac_path_separator
2827 for ac_dir in $PATH; do
2829 # Account for people who put trailing slashes in PATH elements.
2831 / | ./ | .// | /cC/* \
2832 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2835 # OSF1 and SCO ODT 3.0 have their own names for install.
2836 # Don't use installbsd from OSF since it installs stuff as root
2838 for ac_prog in ginstall scoinst install; do
2839 if $as_executable_p "$ac_dir/$ac_prog"; then
2840 if test $ac_prog = install &&
2841 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2842 # AIX install. It has an incompatible calling convention.
2844 elif test $ac_prog = install &&
2845 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2846 # program-specific install script used by HP pwplus--don't use.
2849 ac_cv_path_install="$ac_dir/$ac_prog -c"
2859 if test "${ac_cv_path_install+set}" = set; then
2860 INSTALL=$ac_cv_path_install
2862 # As a last resort, use the slow shell script. We don't cache a
2863 # path for INSTALL within a source directory, because that will
2864 # break other packages using the cache if that directory is
2865 # removed, or if the path is relative.
2866 INSTALL=$ac_install_sh
2869 echo "$as_me:2869: result: $INSTALL" >&5
2870 echo "${ECHO_T}$INSTALL" >&6
2872 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2873 # It thinks the first close brace ends the variable substitution.
2874 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2876 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2878 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2880 echo "$as_me:2880: checking whether ln -s works" >&5
2881 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2883 if test "$LN_S" = "ln -s"; then
2884 echo "$as_me:2884: result: yes" >&5
2885 echo "${ECHO_T}yes" >&6
2887 echo "$as_me:2887: result: no, using $LN_S" >&5
2888 echo "${ECHO_T}no, using $LN_S" >&6
2891 echo "$as_me:2891: checking if $LN_S -f options work" >&5
2892 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2894 rm -f conf$$.src conf$$dst
2896 echo first >conf$$.src
2897 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2902 rm -f conf$$.dst conf$$src
2903 echo "$as_me:2903: result: $cf_prog_ln_sf" >&5
2904 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2906 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2908 # Find a good install program. We prefer a C program (faster),
2909 # so one script is as good as another. But avoid the broken or
2910 # incompatible versions:
2911 # SysV /etc/install, /usr/sbin/install
2912 # SunOS /usr/etc/install
2913 # IRIX /sbin/install
2915 # AmigaOS /C/install, which installs bootblocks on floppy discs
2916 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2917 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2918 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2919 # ./install, which can be erroneously created by make from ./install.sh.
2920 echo "$as_me:2920: checking for a BSD compatible install" >&5
2921 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2922 if test -z "$INSTALL"; then
2923 if test "${ac_cv_path_install+set}" = set; then
2924 echo $ECHO_N "(cached) $ECHO_C" >&6
2926 ac_save_IFS=$IFS; IFS=$ac_path_separator
2927 for ac_dir in $PATH; do
2929 # Account for people who put trailing slashes in PATH elements.
2931 / | ./ | .// | /cC/* \
2932 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2935 # OSF1 and SCO ODT 3.0 have their own names for install.
2936 # Don't use installbsd from OSF since it installs stuff as root
2938 for ac_prog in ginstall scoinst install; do
2939 if $as_executable_p "$ac_dir/$ac_prog"; then
2940 if test $ac_prog = install &&
2941 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2942 # AIX install. It has an incompatible calling convention.
2944 elif test $ac_prog = install &&
2945 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2946 # program-specific install script used by HP pwplus--don't use.
2949 ac_cv_path_install="$ac_dir/$ac_prog -c"
2959 if test "${ac_cv_path_install+set}" = set; then
2960 INSTALL=$ac_cv_path_install
2962 # As a last resort, use the slow shell script. We don't cache a
2963 # path for INSTALL within a source directory, because that will
2964 # break other packages using the cache if that directory is
2965 # removed, or if the path is relative.
2966 INSTALL=$ac_install_sh
2969 echo "$as_me:2969: result: $INSTALL" >&5
2970 echo "${ECHO_T}$INSTALL" >&6
2972 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2973 # It thinks the first close brace ends the variable substitution.
2974 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2976 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2978 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2984 cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
2985 test -z "$cf_dir" && cf_dir=.
2986 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
2990 echo "$as_me:2990: checking if you want to install stripped executables" >&5
2991 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2993 # Check whether --enable-stripping or --disable-stripping was given.
2994 if test "${enable_stripping+set}" = set; then
2995 enableval="$enable_stripping"
2996 test "$enableval" != no && enableval=yes
2997 if test "$enableval" != "yes" ; then
3000 enable_stripping=yes
3004 enable_stripping=yes
3007 echo "$as_me:3007: result: $enable_stripping" >&5
3008 echo "${ECHO_T}$enable_stripping" >&6
3010 if test "$enable_stripping" = yes
3017 : "${INSTALL:=install}"
3018 echo "$as_me:3018: checking if install accepts -p option" >&5
3019 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
3020 if test "${cf_cv_install_p+set}" = set; then
3021 echo $ECHO_N "(cached) $ECHO_C" >&6
3028 if $INSTALL -p conftest.in conftest.out 2>/dev/null
3030 if test -f conftest.out/conftest.in
3032 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
3033 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
3034 if test -s conftest.err
3049 echo "$as_me:3049: result: $cf_cv_install_p" >&5
3050 echo "${ECHO_T}$cf_cv_install_p" >&6
3052 echo "$as_me:3052: checking if install needs to be told about ownership" >&5
3053 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
3054 case `$ac_config_guess` in
3063 echo "$as_me:3063: result: $with_install_o" >&5
3064 echo "${ECHO_T}$with_install_o" >&6
3065 if test "x$with_install_o" = xyes
3067 INSTALL_OPT_O="`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`"
3072 echo "$as_me:3072: checking for long file names" >&5
3073 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3074 if test "${ac_cv_sys_long_file_names+set}" = set; then
3075 echo $ECHO_N "(cached) $ECHO_C" >&6
3077 ac_cv_sys_long_file_names=yes
3078 # Test for long file names in all the places we know might matter:
3079 # . the current directory, where building will happen
3080 # $prefix/lib where we will be installing things
3081 # $exec_prefix/lib likewise
3082 # eval it to expand exec_prefix.
3083 # $TMPDIR if set, where it might want to write temporary files
3084 # if $TMPDIR is not set:
3085 # /tmp where it might want to write temporary files
3088 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3091 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3093 for ac_dir in . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3094 test -d "$ac_dir" || continue
3095 test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3096 ac_xdir=$ac_dir/cf$$
3097 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3098 ac_tf1=$ac_xdir/conftest9012345
3099 ac_tf2=$ac_xdir/conftest9012346
3100 (echo 1 >"$ac_tf1") 2>/dev/null
3101 (echo 2 >"$ac_tf2") 2>/dev/null
3102 ac_val=`cat "$ac_tf1" 2>/dev/null`
3103 if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3104 ac_cv_sys_long_file_names=no
3105 rm -rf "$ac_xdir" 2>/dev/null
3108 rm -rf "$ac_xdir" 2>/dev/null
3111 echo "$as_me:3111: result: $ac_cv_sys_long_file_names" >&5
3112 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3113 if test "$ac_cv_sys_long_file_names" = yes; then
3115 cat >>confdefs.h <<\EOF
3116 #define HAVE_LONG_FILE_NAMES 1
3121 # if we find pkg-config, check if we should install the ".pc" files.
3123 echo "$as_me:3123: checking if you want to use pkg-config" >&5
3124 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3126 # Check whether --with-pkg-config or --without-pkg-config was given.
3127 if test "${with_pkg_config+set}" = set; then
3128 withval="$with_pkg_config"
3129 cf_pkg_config=$withval
3133 echo "$as_me:3133: result: $cf_pkg_config" >&5
3134 echo "${ECHO_T}$cf_pkg_config" >&6
3136 case "$cf_pkg_config" in
3142 if test -n "$ac_tool_prefix"; then
3143 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3144 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3145 echo "$as_me:3145: checking for $ac_word" >&5
3146 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3147 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3148 echo $ECHO_N "(cached) $ECHO_C" >&6
3152 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3155 ac_save_IFS=$IFS; IFS=$ac_path_separator
3157 for ac_dir in $ac_dummy; do
3159 test -z "$ac_dir" && ac_dir=.
3160 if $as_executable_p "$ac_dir/$ac_word"; then
3161 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3162 echo "$as_me:3162: found $ac_dir/$ac_word" >&5
3170 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3172 if test -n "$PKG_CONFIG"; then
3173 echo "$as_me:3173: result: $PKG_CONFIG" >&5
3174 echo "${ECHO_T}$PKG_CONFIG" >&6
3176 echo "$as_me:3176: result: no" >&5
3177 echo "${ECHO_T}no" >&6
3181 if test -z "$ac_cv_path_PKG_CONFIG"; then
3182 ac_pt_PKG_CONFIG=$PKG_CONFIG
3183 # Extract the first word of "pkg-config", so it can be a program name with args.
3184 set dummy pkg-config; ac_word=$2
3185 echo "$as_me:3185: checking for $ac_word" >&5
3186 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3187 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3188 echo $ECHO_N "(cached) $ECHO_C" >&6
3190 case $ac_pt_PKG_CONFIG in
3192 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3195 ac_save_IFS=$IFS; IFS=$ac_path_separator
3197 for ac_dir in $ac_dummy; do
3199 test -z "$ac_dir" && ac_dir=.
3200 if $as_executable_p "$ac_dir/$ac_word"; then
3201 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3202 echo "$as_me:3202: found $ac_dir/$ac_word" >&5
3207 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3211 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3213 if test -n "$ac_pt_PKG_CONFIG"; then
3214 echo "$as_me:3214: result: $ac_pt_PKG_CONFIG" >&5
3215 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3217 echo "$as_me:3217: result: no" >&5
3218 echo "${ECHO_T}no" >&6
3221 PKG_CONFIG=$ac_pt_PKG_CONFIG
3223 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3232 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3233 if test "$PKG_CONFIG" != none ; then
3235 if test "x$prefix" != xNONE; then
3236 cf_path_syntax="$prefix"
3238 cf_path_syntax="$ac_default_prefix"
3241 case ".$PKG_CONFIG" in
3246 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3248 (.\$\{*prefix\}*|.\$\{*dir\}*)
3249 eval PKG_CONFIG="$PKG_CONFIG"
3250 case ".$PKG_CONFIG" in
3252 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3257 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3260 { { echo "$as_me:3260: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3261 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3262 { (exit 1); exit 1; }; }
3266 elif test "x$cf_pkg_config" != xno ; then
3267 { echo "$as_me:3267: WARNING: pkg-config is not installed" >&5
3268 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3271 case "$PKG_CONFIG" in
3273 echo "$as_me:3273: checking for pkg-config library directory" >&5
3274 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3277 echo "$as_me:3277: checking for $PKG_CONFIG library directory" >&5
3278 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3282 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[ ]*,,'`
3284 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3285 if test "${with_pkg_config_libdir+set}" = set; then
3286 withval="$with_pkg_config_libdir"
3287 cf_search_path=$withval
3289 test "x$PKG_CONFIG" != xnone && cf_search_path=yes
3292 case x$cf_search_path in
3297 test -n "$verbose" && echo " auto..." 1>&6
3299 echo "${as_me:-configure}:3299: testing auto... ..." 1>&5
3301 # Look for the library directory using the same prefix as the executable
3302 echo "$as_me:3302: checking for search-list" >&5
3303 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
3304 if test "x$PKG_CONFIG" = xnone
3308 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3310 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | awk "\
3311 /^Scanning directory #[1-9][0-9]* '.*'$/{ \
3312 sub(\"^[^']*'\",\"\"); \
3313 sub(\"'.*\",\"\"); \
3314 printf \" %s\", \\$0; } \
3316 sub(\"^.* trying path: \",\"\");
3317 sub(\" for no-such-package.*$\",\"\");
3318 printf \" %s\", \\$0;
3324 if test -z "$cf_search_path"
3326 # If you don't like using the default architecture, you have to specify
3327 # the intended library directory and corresponding compiler/linker
3330 # This case allows for Debian's 2014-flavor of multiarch, along with
3331 # the most common variations before that point. Some other variants
3332 # spell the directory differently, e.g., "pkg-config", and put it in
3335 # pkg-config has always been poorly standardized, which is ironic...
3336 case x`(arch) 2>/dev/null` in
3339 $cf_path/lib/*64-linux-gnu \
3347 $cf_path/lib/*-linux-gnu \
3354 for cf_config in $cf_test_path
3356 test -d "$cf_config/pkgconfig" && cf_search_path="$cf_search_path $cf_config/pkgconfig"
3360 echo "$as_me:3360: result: $cf_search_path" >&5
3361 echo "${ECHO_T}$cf_search_path" >&6
3368 echo "$as_me:3368: checking for first directory" >&5
3369 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
3370 cf_pkg_config_path=none
3371 for cf_config in $cf_search_path
3373 if test -d "$cf_config"
3375 cf_pkg_config_path=$cf_config
3379 echo "$as_me:3379: result: $cf_pkg_config_path" >&5
3380 echo "${ECHO_T}$cf_pkg_config_path" >&6
3382 if test "x$cf_pkg_config_path" != xnone ; then
3383 # limit this to the first directory found
3384 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
3387 echo "$as_me:3387: checking if you want to build test-programs" >&5
3388 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3390 # Check whether --with-tests or --without-tests was given.
3391 if test "${with_tests+set}" = set; then
3392 withval="$with_tests"
3393 cf_with_tests=$withval
3397 echo "$as_me:3397: result: $cf_with_tests" >&5
3398 echo "${ECHO_T}$cf_with_tests" >&6
3400 echo "$as_me:3400: checking if we should assume mixed-case filenames" >&5
3401 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3403 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3404 if test "${enable_mixed_case+set}" = set; then
3405 enableval="$enable_mixed_case"
3406 enable_mixedcase=$enableval
3408 enable_mixedcase=auto
3410 echo "$as_me:3410: result: $enable_mixedcase" >&5
3411 echo "${ECHO_T}$enable_mixedcase" >&6
3412 if test "$enable_mixedcase" = "auto" ; then
3414 echo "$as_me:3414: checking if filesystem supports mixed-case filenames" >&5
3415 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3416 if test "${cf_cv_mixedcase+set}" = set; then
3417 echo $ECHO_N "(cached) $ECHO_C" >&6
3420 if test "$cross_compiling" = yes ; then
3421 case "$target_alias" in
3422 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3430 rm -f conftest CONFTEST
3432 if test -f CONFTEST ; then
3437 rm -f conftest CONFTEST
3441 echo "$as_me:3441: result: $cf_cv_mixedcase" >&5
3442 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3443 test "$cf_cv_mixedcase" = yes &&
3444 cat >>confdefs.h <<\EOF
3445 #define MIXEDCASE_FILENAMES 1
3449 cf_cv_mixedcase=$enable_mixedcase
3450 if test "$enable_mixedcase" = "yes" ; then
3451 cat >>confdefs.h <<\EOF
3452 #define MIXEDCASE_FILENAMES 1
3458 # do this after mixed-case option (tags/TAGS is not as important as tic).
3459 echo "$as_me:3459: checking whether ${MAKE-make} sets \${MAKE}" >&5
3460 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3461 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3462 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3463 echo $ECHO_N "(cached) $ECHO_C" >&6
3465 cat >conftest.make <<\EOF
3467 @echo 'ac_maketemp="${MAKE}"'
3469 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3470 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3471 if test -n "$ac_maketemp"; then
3472 eval ac_cv_prog_make_${ac_make}_set=yes
3474 eval ac_cv_prog_make_${ac_make}_set=no
3478 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3479 echo "$as_me:3479: result: yes" >&5
3480 echo "${ECHO_T}yes" >&6
3483 echo "$as_me:3483: result: no" >&5
3484 echo "${ECHO_T}no" >&6
3485 SET_MAKE="MAKE=${MAKE-make}"
3488 echo "$as_me:3488: checking for \".PHONY\" make-support" >&5
3489 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
3490 if test "${cf_cv_make_PHONY+set}" = set; then
3491 echo $ECHO_N "(cached) $ECHO_C" >&6
3496 mkdir conftest || exit 1
3498 cat >makefile <<'CF_EOF'
3502 @echo "** making $@ $(DATA)"
3504 @echo "** making $@ $(DATA)"
3506 @echo "** making $@ $(DATA)"
3509 @echo "** making $@ $(DATA)"
3512 for cf_data in 1 2 3
3514 ${MAKE:-make} always DATA=$cf_data
3515 ${MAKE:-make} once DATA=$cf_data
3516 ${MAKE:-make} -t always once
3517 if test -f always ; then
3518 echo "no (case 1)" > ../conftest.tmp
3519 elif test ! -f always.out ; then
3520 echo "no (case 2)" > ../conftest.tmp
3521 elif test ! -f once.out ; then
3522 echo "no (case 3)" > ../conftest.tmp
3523 elif ! cmp -s always.out once.out ; then
3524 echo "no (case 4)" > ../conftest.tmp
3525 diff always.out once.out
3527 cf_check="`cat always.out`"
3528 if test "x$cf_check" != "x$cf_data" ; then
3529 echo "no (case 5)" > ../conftest.tmp
3531 echo yes > ../conftest.tmp
3539 cf_cv_make_PHONY="`cat conftest.tmp`"
3543 echo "$as_me:3543: result: $cf_cv_make_PHONY" >&5
3544 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
3547 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
3548 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
3550 for ac_prog in exctags ctags
3552 # Extract the first word of "$ac_prog", so it can be a program name with args.
3553 set dummy $ac_prog; ac_word=$2
3554 echo "$as_me:3554: checking for $ac_word" >&5
3555 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3556 if test "${ac_cv_prog_CTAGS+set}" = set; then
3557 echo $ECHO_N "(cached) $ECHO_C" >&6
3559 if test -n "$CTAGS"; then
3560 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3562 ac_save_IFS=$IFS; IFS=$ac_path_separator
3564 for ac_dir in $ac_dummy; do
3566 test -z "$ac_dir" && ac_dir=.
3567 $as_executable_p "$ac_dir/$ac_word" || continue
3568 ac_cv_prog_CTAGS="$ac_prog"
3569 echo "$as_me:3569: found $ac_dir/$ac_word" >&5
3575 CTAGS=$ac_cv_prog_CTAGS
3576 if test -n "$CTAGS"; then
3577 echo "$as_me:3577: result: $CTAGS" >&5
3578 echo "${ECHO_T}$CTAGS" >&6
3580 echo "$as_me:3580: result: no" >&5
3581 echo "${ECHO_T}no" >&6
3584 test -n "$CTAGS" && break
3587 for ac_prog in exetags etags
3589 # Extract the first word of "$ac_prog", so it can be a program name with args.
3590 set dummy $ac_prog; ac_word=$2
3591 echo "$as_me:3591: checking for $ac_word" >&5
3592 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3593 if test "${ac_cv_prog_ETAGS+set}" = set; then
3594 echo $ECHO_N "(cached) $ECHO_C" >&6
3596 if test -n "$ETAGS"; then
3597 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3599 ac_save_IFS=$IFS; IFS=$ac_path_separator
3601 for ac_dir in $ac_dummy; do
3603 test -z "$ac_dir" && ac_dir=.
3604 $as_executable_p "$ac_dir/$ac_word" || continue
3605 ac_cv_prog_ETAGS="$ac_prog"
3606 echo "$as_me:3606: found $ac_dir/$ac_word" >&5
3612 ETAGS=$ac_cv_prog_ETAGS
3613 if test -n "$ETAGS"; then
3614 echo "$as_me:3614: result: $ETAGS" >&5
3615 echo "${ECHO_T}$ETAGS" >&6
3617 echo "$as_me:3617: result: no" >&5
3618 echo "${ECHO_T}no" >&6
3621 test -n "$ETAGS" && break
3624 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3625 set dummy ${CTAGS:-ctags}; ac_word=$2
3626 echo "$as_me:3626: checking for $ac_word" >&5
3627 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3628 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3629 echo $ECHO_N "(cached) $ECHO_C" >&6
3631 if test -n "$MAKE_LOWER_TAGS"; then
3632 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3634 ac_save_IFS=$IFS; IFS=$ac_path_separator
3636 for ac_dir in $ac_dummy; do
3638 test -z "$ac_dir" && ac_dir=.
3639 $as_executable_p "$ac_dir/$ac_word" || continue
3640 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3641 echo "$as_me:3641: found $ac_dir/$ac_word" >&5
3645 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3648 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3649 if test -n "$MAKE_LOWER_TAGS"; then
3650 echo "$as_me:3650: result: $MAKE_LOWER_TAGS" >&5
3651 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3653 echo "$as_me:3653: result: no" >&5
3654 echo "${ECHO_T}no" >&6
3657 if test "$cf_cv_mixedcase" = yes ; then
3658 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3659 set dummy ${ETAGS:-etags}; ac_word=$2
3660 echo "$as_me:3660: checking for $ac_word" >&5
3661 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3662 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3663 echo $ECHO_N "(cached) $ECHO_C" >&6
3665 if test -n "$MAKE_UPPER_TAGS"; then
3666 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3668 ac_save_IFS=$IFS; IFS=$ac_path_separator
3670 for ac_dir in $ac_dummy; do
3672 test -z "$ac_dir" && ac_dir=.
3673 $as_executable_p "$ac_dir/$ac_word" || continue
3674 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3675 echo "$as_me:3675: found $ac_dir/$ac_word" >&5
3679 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3682 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3683 if test -n "$MAKE_UPPER_TAGS"; then
3684 echo "$as_me:3684: result: $MAKE_UPPER_TAGS" >&5
3685 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3687 echo "$as_me:3687: result: no" >&5
3688 echo "${ECHO_T}no" >&6
3695 if test "$MAKE_UPPER_TAGS" = yes ; then
3701 if test "$MAKE_LOWER_TAGS" = yes ; then
3707 echo "$as_me:3707: checking for makeflags variable" >&5
3708 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3709 if test "${cf_cv_makeflags+set}" = set; then
3710 echo $ECHO_N "(cached) $ECHO_C" >&6
3714 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3716 cat >cf_makeflags.tmp <<CF_EOF
3719 @ echo '.$cf_option'
3721 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[ ]*$,,'`
3722 case "$cf_result" in
3724 cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
3725 case "$cf_result" in
3726 (.*CC=*) cf_cv_makeflags=
3728 (*) cf_cv_makeflags=$cf_option
3737 echo "${as_me:-configure}:3737: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3742 rm -f cf_makeflags.tmp
3745 echo "$as_me:3745: result: $cf_cv_makeflags" >&5
3746 echo "${ECHO_T}$cf_cv_makeflags" >&6
3748 if test -n "$ac_tool_prefix"; then
3749 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3750 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3751 echo "$as_me:3751: checking for $ac_word" >&5
3752 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3753 if test "${ac_cv_prog_RANLIB+set}" = set; then
3754 echo $ECHO_N "(cached) $ECHO_C" >&6
3756 if test -n "$RANLIB"; then
3757 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3759 ac_save_IFS=$IFS; IFS=$ac_path_separator
3761 for ac_dir in $ac_dummy; do
3763 test -z "$ac_dir" && ac_dir=.
3764 $as_executable_p "$ac_dir/$ac_word" || continue
3765 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3766 echo "$as_me:3766: found $ac_dir/$ac_word" >&5
3772 RANLIB=$ac_cv_prog_RANLIB
3773 if test -n "$RANLIB"; then
3774 echo "$as_me:3774: result: $RANLIB" >&5
3775 echo "${ECHO_T}$RANLIB" >&6
3777 echo "$as_me:3777: result: no" >&5
3778 echo "${ECHO_T}no" >&6
3782 if test -z "$ac_cv_prog_RANLIB"; then
3783 ac_ct_RANLIB=$RANLIB
3784 # Extract the first word of "ranlib", so it can be a program name with args.
3785 set dummy ranlib; ac_word=$2
3786 echo "$as_me:3786: checking for $ac_word" >&5
3787 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3788 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3789 echo $ECHO_N "(cached) $ECHO_C" >&6
3791 if test -n "$ac_ct_RANLIB"; then
3792 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3794 ac_save_IFS=$IFS; IFS=$ac_path_separator
3796 for ac_dir in $ac_dummy; do
3798 test -z "$ac_dir" && ac_dir=.
3799 $as_executable_p "$ac_dir/$ac_word" || continue
3800 ac_cv_prog_ac_ct_RANLIB="ranlib"
3801 echo "$as_me:3801: found $ac_dir/$ac_word" >&5
3805 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3808 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3809 if test -n "$ac_ct_RANLIB"; then
3810 echo "$as_me:3810: result: $ac_ct_RANLIB" >&5
3811 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3813 echo "$as_me:3813: result: no" >&5
3814 echo "${ECHO_T}no" >&6
3817 RANLIB=$ac_ct_RANLIB
3819 RANLIB="$ac_cv_prog_RANLIB"
3822 if test -n "$ac_tool_prefix"; then
3823 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3824 set dummy ${ac_tool_prefix}ld; ac_word=$2
3825 echo "$as_me:3825: checking for $ac_word" >&5
3826 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3827 if test "${ac_cv_prog_LD+set}" = set; then
3828 echo $ECHO_N "(cached) $ECHO_C" >&6
3830 if test -n "$LD"; then
3831 ac_cv_prog_LD="$LD" # Let the user override the test.
3833 ac_save_IFS=$IFS; IFS=$ac_path_separator
3835 for ac_dir in $ac_dummy; do
3837 test -z "$ac_dir" && ac_dir=.
3838 $as_executable_p "$ac_dir/$ac_word" || continue
3839 ac_cv_prog_LD="${ac_tool_prefix}ld"
3840 echo "$as_me:3840: found $ac_dir/$ac_word" >&5
3847 if test -n "$LD"; then
3848 echo "$as_me:3848: result: $LD" >&5
3849 echo "${ECHO_T}$LD" >&6
3851 echo "$as_me:3851: result: no" >&5
3852 echo "${ECHO_T}no" >&6
3856 if test -z "$ac_cv_prog_LD"; then
3858 # Extract the first word of "ld", so it can be a program name with args.
3859 set dummy ld; ac_word=$2
3860 echo "$as_me:3860: checking for $ac_word" >&5
3861 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3862 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3863 echo $ECHO_N "(cached) $ECHO_C" >&6
3865 if test -n "$ac_ct_LD"; then
3866 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3868 ac_save_IFS=$IFS; IFS=$ac_path_separator
3870 for ac_dir in $ac_dummy; do
3872 test -z "$ac_dir" && ac_dir=.
3873 $as_executable_p "$ac_dir/$ac_word" || continue
3874 ac_cv_prog_ac_ct_LD="ld"
3875 echo "$as_me:3875: found $ac_dir/$ac_word" >&5
3879 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3882 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3883 if test -n "$ac_ct_LD"; then
3884 echo "$as_me:3884: result: $ac_ct_LD" >&5
3885 echo "${ECHO_T}$ac_ct_LD" >&6
3887 echo "$as_me:3887: result: no" >&5
3888 echo "${ECHO_T}no" >&6
3896 if test -n "$ac_tool_prefix"; then
3897 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3898 set dummy ${ac_tool_prefix}ar; ac_word=$2
3899 echo "$as_me:3899: checking for $ac_word" >&5
3900 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3901 if test "${ac_cv_prog_AR+set}" = set; then
3902 echo $ECHO_N "(cached) $ECHO_C" >&6
3904 if test -n "$AR"; then
3905 ac_cv_prog_AR="$AR" # Let the user override the test.
3907 ac_save_IFS=$IFS; IFS=$ac_path_separator
3909 for ac_dir in $ac_dummy; do
3911 test -z "$ac_dir" && ac_dir=.
3912 $as_executable_p "$ac_dir/$ac_word" || continue
3913 ac_cv_prog_AR="${ac_tool_prefix}ar"
3914 echo "$as_me:3914: found $ac_dir/$ac_word" >&5
3921 if test -n "$AR"; then
3922 echo "$as_me:3922: result: $AR" >&5
3923 echo "${ECHO_T}$AR" >&6
3925 echo "$as_me:3925: result: no" >&5
3926 echo "${ECHO_T}no" >&6
3930 if test -z "$ac_cv_prog_AR"; then
3932 # Extract the first word of "ar", so it can be a program name with args.
3933 set dummy ar; ac_word=$2
3934 echo "$as_me:3934: checking for $ac_word" >&5
3935 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3936 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3937 echo $ECHO_N "(cached) $ECHO_C" >&6
3939 if test -n "$ac_ct_AR"; then
3940 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3942 ac_save_IFS=$IFS; IFS=$ac_path_separator
3944 for ac_dir in $ac_dummy; do
3946 test -z "$ac_dir" && ac_dir=.
3947 $as_executable_p "$ac_dir/$ac_word" || continue
3948 ac_cv_prog_ac_ct_AR="ar"
3949 echo "$as_me:3949: found $ac_dir/$ac_word" >&5
3953 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3956 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3957 if test -n "$ac_ct_AR"; then
3958 echo "$as_me:3958: result: $ac_ct_AR" >&5
3959 echo "${ECHO_T}$ac_ct_AR" >&6
3961 echo "$as_me:3961: result: no" >&5
3962 echo "${ECHO_T}no" >&6
3970 if test -n "$ac_tool_prefix"; then
3971 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3972 set dummy ${ac_tool_prefix}ar; ac_word=$2
3973 echo "$as_me:3973: checking for $ac_word" >&5
3974 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3975 if test "${ac_cv_prog_AR+set}" = set; then
3976 echo $ECHO_N "(cached) $ECHO_C" >&6
3978 if test -n "$AR"; then
3979 ac_cv_prog_AR="$AR" # Let the user override the test.
3981 ac_save_IFS=$IFS; IFS=$ac_path_separator
3983 for ac_dir in $ac_dummy; do
3985 test -z "$ac_dir" && ac_dir=.
3986 $as_executable_p "$ac_dir/$ac_word" || continue
3987 ac_cv_prog_AR="${ac_tool_prefix}ar"
3988 echo "$as_me:3988: found $ac_dir/$ac_word" >&5
3995 if test -n "$AR"; then
3996 echo "$as_me:3996: result: $AR" >&5
3997 echo "${ECHO_T}$AR" >&6
3999 echo "$as_me:3999: result: no" >&5
4000 echo "${ECHO_T}no" >&6
4004 if test -z "$ac_cv_prog_AR"; then
4006 # Extract the first word of "ar", so it can be a program name with args.
4007 set dummy ar; ac_word=$2
4008 echo "$as_me:4008: checking for $ac_word" >&5
4009 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4010 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4011 echo $ECHO_N "(cached) $ECHO_C" >&6
4013 if test -n "$ac_ct_AR"; then
4014 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4016 ac_save_IFS=$IFS; IFS=$ac_path_separator
4018 for ac_dir in $ac_dummy; do
4020 test -z "$ac_dir" && ac_dir=.
4021 $as_executable_p "$ac_dir/$ac_word" || continue
4022 ac_cv_prog_ac_ct_AR="ar"
4023 echo "$as_me:4023: found $ac_dir/$ac_word" >&5
4027 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4030 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4031 if test -n "$ac_ct_AR"; then
4032 echo "$as_me:4032: result: $ac_ct_AR" >&5
4033 echo "${ECHO_T}$ac_ct_AR" >&6
4035 echo "$as_me:4035: result: no" >&5
4036 echo "${ECHO_T}no" >&6
4044 echo "$as_me:4044: checking for options to update archives" >&5
4045 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4046 if test "${cf_cv_ar_flags+set}" = set; then
4047 echo $ECHO_N "(cached) $ECHO_C" >&6
4050 case "$cf_cv_system_name" in
4053 cat >mk_static_lib.sh <<-EOF
4058 exec \$MSVC_BIN -out:"\$out" \$@
4060 chmod +x mk_static_lib.sh
4061 AR=`pwd`/mk_static_lib.sh
4064 cf_cv_ar_flags=unknown
4065 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4068 # check if $ARFLAGS already contains this choice
4069 if test "x$ARFLAGS" != "x" ; then
4070 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4071 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4077 rm -f "conftest.$ac_cv_objext"
4080 cat >"conftest.$ac_ext" <<EOF
4081 #line 4081 "configure"
4082 int testdata[3] = { 123, 456, 789 };
4084 if { (eval echo "$as_me:4084: \"$ac_compile\"") >&5
4085 (eval $ac_compile) 2>&5
4087 echo "$as_me:4087: \$? = $ac_status" >&5
4088 (exit "$ac_status"); } ; then
4089 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4090 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
4091 if test -f conftest.a ; then
4092 cf_cv_ar_flags="$cf_ar_flags"
4096 test -n "$verbose" && echo " cannot compile test-program" 1>&6
4098 echo "${as_me:-configure}:4098: testing cannot compile test-program ..." 1>&5
4103 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
4108 echo "$as_me:4108: result: $cf_cv_ar_flags" >&5
4109 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4111 if test -n "$ARFLAGS" ; then
4112 if test -n "$cf_cv_ar_flags" ; then
4113 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4116 ARFLAGS=$cf_cv_ar_flags
4119 echo "$as_me:4119: checking for PATH separator" >&5
4120 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4121 case "$cf_cv_system_name" in
4122 (os2*) PATH_SEPARATOR=';' ;;
4123 (*) ${PATH_SEPARATOR:=':'} ;;
4126 echo "$as_me:4126: result: $PATH_SEPARATOR" >&5
4127 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4129 echo "$as_me:4129: checking if you have specified an install-prefix" >&5
4130 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4132 # Check whether --with-install-prefix or --without-install-prefix was given.
4133 if test "${with_install_prefix+set}" = set; then
4134 withval="$with_install_prefix"
4138 (*) DESTDIR="$withval"
4142 echo "$as_me:4142: result: $DESTDIR" >&5
4143 echo "${ECHO_T}$DESTDIR" >&6
4145 ###############################################################################
4147 # If we're cross-compiling, allow the user to override the tools and their
4148 # options. The configure script is oriented toward identifying the host
4149 # compiler, etc., but we need a build compiler to generate parts of the source.
4151 if test "$cross_compiling" = yes ; then
4153 # defaults that we might want to override
4154 : ${BUILD_CFLAGS:=''}
4155 : ${BUILD_CPPFLAGS:=''}
4156 : ${BUILD_LDFLAGS:=''}
4158 : ${BUILD_EXEEXT:='$x'}
4159 : ${BUILD_OBJEXT:='o'}
4161 # Check whether --with-build-cc or --without-build-cc was given.
4162 if test "${with_build_cc+set}" = set; then
4163 withval="$with_build_cc"
4166 for ac_prog in gcc clang c99 c89 cc cl
4168 # Extract the first word of "$ac_prog", so it can be a program name with args.
4169 set dummy $ac_prog; ac_word=$2
4170 echo "$as_me:4170: checking for $ac_word" >&5
4171 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4172 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4173 echo $ECHO_N "(cached) $ECHO_C" >&6
4175 if test -n "$BUILD_CC"; then
4176 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4178 ac_save_IFS=$IFS; IFS=$ac_path_separator
4180 for ac_dir in $ac_dummy; do
4182 test -z "$ac_dir" && ac_dir=.
4183 $as_executable_p "$ac_dir/$ac_word" || continue
4184 ac_cv_prog_BUILD_CC="$ac_prog"
4185 echo "$as_me:4185: found $ac_dir/$ac_word" >&5
4191 BUILD_CC=$ac_cv_prog_BUILD_CC
4192 if test -n "$BUILD_CC"; then
4193 echo "$as_me:4193: result: $BUILD_CC" >&5
4194 echo "${ECHO_T}$BUILD_CC" >&6
4196 echo "$as_me:4196: result: no" >&5
4197 echo "${ECHO_T}no" >&6
4200 test -n "$BUILD_CC" && break
4202 test -n "$BUILD_CC" || BUILD_CC="none"
4205 echo "$as_me:4205: checking for native build C compiler" >&5
4206 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4207 echo "$as_me:4207: result: $BUILD_CC" >&5
4208 echo "${ECHO_T}$BUILD_CC" >&6
4210 echo "$as_me:4210: checking for native build C preprocessor" >&5
4211 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4213 # Check whether --with-build-cpp or --without-build-cpp was given.
4214 if test "${with_build_cpp+set}" = set; then
4215 withval="$with_build_cpp"
4216 BUILD_CPP="$withval"
4218 BUILD_CPP='${BUILD_CC} -E'
4220 echo "$as_me:4220: result: $BUILD_CPP" >&5
4221 echo "${ECHO_T}$BUILD_CPP" >&6
4223 echo "$as_me:4223: checking for native build C flags" >&5
4224 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4226 # Check whether --with-build-cflags or --without-build-cflags was given.
4227 if test "${with_build_cflags+set}" = set; then
4228 withval="$with_build_cflags"
4229 BUILD_CFLAGS="$withval"
4231 echo "$as_me:4231: result: $BUILD_CFLAGS" >&5
4232 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4234 echo "$as_me:4234: checking for native build C preprocessor-flags" >&5
4235 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4237 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4238 if test "${with_build_cppflags+set}" = set; then
4239 withval="$with_build_cppflags"
4240 BUILD_CPPFLAGS="$withval"
4242 echo "$as_me:4242: result: $BUILD_CPPFLAGS" >&5
4243 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4245 echo "$as_me:4245: checking for native build linker-flags" >&5
4246 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4248 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4249 if test "${with_build_ldflags+set}" = set; then
4250 withval="$with_build_ldflags"
4251 BUILD_LDFLAGS="$withval"
4253 echo "$as_me:4253: result: $BUILD_LDFLAGS" >&5
4254 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4256 echo "$as_me:4256: checking for native build linker-libraries" >&5
4257 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4259 # Check whether --with-build-libs or --without-build-libs was given.
4260 if test "${with_build_libs+set}" = set; then
4261 withval="$with_build_libs"
4262 BUILD_LIBS="$withval"
4264 echo "$as_me:4264: result: $BUILD_LIBS" >&5
4265 echo "${ECHO_T}$BUILD_LIBS" >&6
4267 # this assumes we're on Unix.
4271 : ${BUILD_CC:='${CC}'}
4273 if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
4274 { { echo "$as_me:4274: error: Cross-build requires two compilers.
4275 Use --with-build-cc to specify the native compiler." >&5
4276 echo "$as_me: error: Cross-build requires two compilers.
4277 Use --with-build-cc to specify the native compiler." >&2;}
4278 { (exit 1); exit 1; }; }
4282 : ${BUILD_CC:='${CC}'}
4283 : ${BUILD_CPP:='${CPP}'}
4284 : ${BUILD_CFLAGS:='${CFLAGS}'}
4285 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4286 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4287 : ${BUILD_LIBS:='${LIBS}'}
4288 : ${BUILD_EXEEXT:='$x'}
4289 : ${BUILD_OBJEXT:='o'}
4292 ###############################################################################
4294 ### Options to allow the user to specify the set of libraries which are used.
4295 ### Use "--without-normal --with-shared" to allow the default model to be
4296 ### shared, for example.
4299 echo "$as_me:4299: checking if you want to build shared C-objects" >&5
4300 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
4302 # Check whether --with-shared or --without-shared was given.
4303 if test "${with_shared+set}" = set; then
4304 withval="$with_shared"
4305 with_shared=$withval
4309 echo "$as_me:4309: result: $with_shared" >&5
4310 echo "${ECHO_T}$with_shared" >&6
4311 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4313 echo "$as_me:4313: checking for specified models" >&5
4314 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4315 test -z "$cf_list_models" && cf_list_models=normal
4316 echo "$as_me:4316: result: $cf_list_models" >&5
4317 echo "${ECHO_T}$cf_list_models" >&6
4319 ### Use the first model as the default, and save its suffix for use in building
4320 ### up test-applications.
4321 echo "$as_me:4321: checking for default model" >&5
4322 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4323 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4324 echo "$as_me:4324: result: $DFT_LWR_MODEL" >&5
4325 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4327 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4329 echo "$as_me:4329: checking for specific curses-directory" >&5
4330 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4332 # Check whether --with-curses-dir or --without-curses-dir was given.
4333 if test "${with_curses_dir+set}" = set; then
4334 withval="$with_curses_dir"
4335 cf_cv_curses_dir=$withval
4339 echo "$as_me:4339: result: $cf_cv_curses_dir" >&5
4340 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4342 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
4345 if test "x$prefix" != xNONE; then
4346 cf_path_syntax="$prefix"
4348 cf_path_syntax="$ac_default_prefix"
4356 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4358 (.\$\{*prefix\}*|.\$\{*dir\}*)
4359 eval withval="$withval"
4362 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4367 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4370 { { echo "$as_me:4370: error: expected a pathname, not \"$withval\"" >&5
4371 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4372 { (exit 1); exit 1; }; }
4376 if test -d "$cf_cv_curses_dir"
4379 if test -n "$cf_cv_curses_dir/include" ; then
4380 for cf_add_incdir in $cf_cv_curses_dir/include
4382 while test "$cf_add_incdir" != /usr/include
4384 if test -d "$cf_add_incdir"
4387 if test -n "$CFLAGS$CPPFLAGS" ; then
4388 # a loop is needed to ensure we can add subdirs of existing dirs
4389 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4390 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4391 cf_have_incdir=yes; break
4396 if test "$cf_have_incdir" = no ; then
4397 if test "$cf_add_incdir" = /usr/local/include ; then
4398 if test "$GCC" = yes
4400 cf_save_CPPFLAGS=$CPPFLAGS
4402 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4403 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4405 cat >"conftest.$ac_ext" <<_ACEOF
4406 #line 4406 "configure"
4407 #include "confdefs.h"
4417 rm -f "conftest.$ac_objext"
4418 if { (eval echo "$as_me:4418: \"$ac_compile\"") >&5
4419 (eval $ac_compile) 2>&5
4421 echo "$as_me:4421: \$? = $ac_status" >&5
4422 (exit "$ac_status"); } &&
4423 { ac_try='test -s "conftest.$ac_objext"'
4424 { (eval echo "$as_me:4424: \"$ac_try\"") >&5
4427 echo "$as_me:4427: \$? = $ac_status" >&5
4428 (exit "$ac_status"); }; }; then
4431 echo "$as_me: failed program was:" >&5
4432 cat "conftest.$ac_ext" >&5
4435 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4436 CPPFLAGS=$cf_save_CPPFLAGS
4441 if test "$cf_have_incdir" = no ; then
4442 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4444 echo "${as_me:-configure}:4444: testing adding $cf_add_incdir to include-path ..." 1>&5
4446 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4448 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
4449 test "$cf_top_incdir" = "$cf_add_incdir" && break
4450 cf_add_incdir="$cf_top_incdir"
4461 if test -n "$cf_cv_curses_dir/lib" ; then
4462 for cf_add_libdir in $cf_cv_curses_dir/lib
4464 if test "$cf_add_libdir" = /usr/lib ; then
4466 elif test -d "$cf_add_libdir"
4469 if test -n "$LDFLAGS$LIBS" ; then
4470 # a loop is needed to ensure we can add subdirs of existing dirs
4471 for cf_test_libdir in $LDFLAGS $LIBS ; do
4472 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4473 cf_have_libdir=yes; break
4477 if test "$cf_have_libdir" = no ; then
4478 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4480 echo "${as_me:-configure}:4480: testing adding $cf_add_libdir to library-path ..." 1>&5
4482 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4491 cf_ncuconfig_root=ncurses
4492 cf_have_ncuconfig=no
4494 if test "x${PKG_CONFIG:=none}" != xnone; then
4495 echo "$as_me:4495: checking pkg-config for $cf_ncuconfig_root" >&5
4496 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
4497 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
4498 echo "$as_me:4498: result: yes" >&5
4499 echo "${ECHO_T}yes" >&6
4501 echo "$as_me:4501: checking if the $cf_ncuconfig_root package files work" >&5
4502 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
4503 cf_have_ncuconfig=unknown
4505 cf_save_CFLAGS="$CFLAGS"
4506 cf_save_CPPFLAGS="$CPPFLAGS"
4507 cf_save_LIBS="$LIBS"
4509 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
4510 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
4512 # while -W for passing linker flags is prevalent, it is not "standard".
4513 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
4514 # incompatible _and_ non-standard -W option which gives an error. Work
4515 # around that pitfall.
4516 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
4522 cf_new_extra_cppflags=
4524 for cf_add_cflags in $cf_pkg_cflags
4526 case "$cf_fix_cppflags" in
4528 case "$cf_add_cflags" in
4529 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4530 case "$cf_add_cflags" in
4532 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4534 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4535 && test -z "${cf_tst_cflags}" \
4536 && cf_fix_cppflags=yes
4538 if test "$cf_fix_cppflags" = yes ; then
4540 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4541 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4544 elif test "${cf_tst_cflags}" = "\"'" ; then
4546 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4547 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4557 case "$cf_add_cflags" in
4559 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4561 CPPFLAGS=`echo "$CPPFLAGS" | \
4562 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4563 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4568 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4569 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4576 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4577 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4584 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4585 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4587 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4589 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4590 && test -z "${cf_tst_cflags}" \
4591 && cf_fix_cppflags=no
4596 if test -n "$cf_new_cflags" ; then
4598 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4599 CFLAGS="${CFLAGS}$cf_new_cflags"
4603 if test -n "$cf_new_cppflags" ; then
4605 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4606 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4610 if test -n "$cf_new_extra_cppflags" ; then
4612 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4613 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4620 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4622 for cf_add_1lib in $cf_add_0lib; do
4623 for cf_add_2lib in $cf_add_libs; do
4624 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4629 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4633 cat >"conftest.$ac_ext" <<_ACEOF
4634 #line 4634 "configure"
4635 #include "confdefs.h"
4636 #include <${cf_cv_ncurses_header:-curses.h}>
4640 initscr(); mousemask(0,0); tigetstr((char *)0);
4645 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4646 if { (eval echo "$as_me:4646: \"$ac_link\"") >&5
4647 (eval $ac_link) 2>&5
4649 echo "$as_me:4649: \$? = $ac_status" >&5
4650 (exit "$ac_status"); } &&
4651 { ac_try='test -s "conftest$ac_exeext"'
4652 { (eval echo "$as_me:4652: \"$ac_try\"") >&5
4655 echo "$as_me:4655: \$? = $ac_status" >&5
4656 (exit "$ac_status"); }; }; then
4657 if test "$cross_compiling" = yes; then
4658 cf_test_ncuconfig=maybe
4660 cat >"conftest.$ac_ext" <<_ACEOF
4661 #line 4661 "configure"
4662 #include "confdefs.h"
4663 #include <${cf_cv_ncurses_header:-curses.h}>
4665 { const char *xx = curses_version(); return (xx == 0); }
4667 rm -f "conftest$ac_exeext"
4668 if { (eval echo "$as_me:4668: \"$ac_link\"") >&5
4669 (eval $ac_link) 2>&5
4671 echo "$as_me:4671: \$? = $ac_status" >&5
4672 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4673 { (eval echo "$as_me:4673: \"$ac_try\"") >&5
4676 echo "$as_me:4676: \$? = $ac_status" >&5
4677 (exit "$ac_status"); }; }; then
4678 cf_test_ncuconfig=yes
4680 echo "$as_me: program exited with status $ac_status" >&5
4681 echo "$as_me: failed program was:" >&5
4682 cat "conftest.$ac_ext" >&5
4683 cf_test_ncuconfig=no
4685 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4688 echo "$as_me: failed program was:" >&5
4689 cat "conftest.$ac_ext" >&5
4690 cf_test_ncuconfig=no
4692 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4694 CFLAGS="$cf_save_CFLAGS"
4695 CPPFLAGS="$cf_save_CPPFLAGS"
4696 LIBS="$cf_save_LIBS"
4698 if test "x$cf_test_ncuconfig" != xyes; then
4699 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4700 cf_pkg_cflags="$cf_temp"
4701 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4702 cf_pkg_libs="$cf_temp"
4707 for cf_add_cflags in $cf_pkg_cflags
4709 case "x$cf_add_cflags" in
4712 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4715 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'`
4716 test "$CFLAGS" != "$cf_old_cflag" || break
4718 CFLAGS="$cf_old_cflag"
4721 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4724 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'`
4725 test "$CPPFLAGS" != "$cf_old_cflag" || break
4727 CPPFLAGS="$cf_old_cflag"
4736 cf_new_extra_cppflags=
4738 for cf_add_cflags in $cf_add_cflags
4740 case "$cf_fix_cppflags" in
4742 case "$cf_add_cflags" in
4743 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4744 case "$cf_add_cflags" in
4746 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4748 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4749 && test -z "${cf_tst_cflags}" \
4750 && cf_fix_cppflags=yes
4752 if test "$cf_fix_cppflags" = yes ; then
4754 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4755 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4758 elif test "${cf_tst_cflags}" = "\"'" ; then
4760 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4761 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4771 case "$cf_add_cflags" in
4773 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4775 CPPFLAGS=`echo "$CPPFLAGS" | \
4776 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4777 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4782 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4783 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4790 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4791 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4798 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4799 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4801 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4803 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4804 && test -z "${cf_tst_cflags}" \
4805 && cf_fix_cppflags=no
4810 if test -n "$cf_new_cflags" ; then
4812 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4813 CFLAGS="${CFLAGS}$cf_new_cflags"
4817 if test -n "$cf_new_cppflags" ; then
4819 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4820 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4824 if test -n "$cf_new_extra_cppflags" ; then
4826 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4827 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4836 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4838 for cf_add_1lib in $cf_add_0lib; do
4839 for cf_add_2lib in $cf_add_libs; do
4840 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4845 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4849 cat >"conftest.$ac_ext" <<_ACEOF
4850 #line 4850 "configure"
4851 #include "confdefs.h"
4852 #include <${cf_cv_ncurses_header:-curses.h}>
4856 initscr(); mousemask(0,0); tigetstr((char *)0);
4861 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4862 if { (eval echo "$as_me:4862: \"$ac_link\"") >&5
4863 (eval $ac_link) 2>&5
4865 echo "$as_me:4865: \$? = $ac_status" >&5
4866 (exit "$ac_status"); } &&
4867 { ac_try='test -s "conftest$ac_exeext"'
4868 { (eval echo "$as_me:4868: \"$ac_try\"") >&5
4871 echo "$as_me:4871: \$? = $ac_status" >&5
4872 (exit "$ac_status"); }; }; then
4873 if test "$cross_compiling" = yes; then
4874 cf_have_ncuconfig=maybe
4876 cat >"conftest.$ac_ext" <<_ACEOF
4877 #line 4877 "configure"
4878 #include "confdefs.h"
4879 #include <${cf_cv_ncurses_header:-curses.h}>
4881 { const char *xx = curses_version(); return (xx == 0); }
4883 rm -f "conftest$ac_exeext"
4884 if { (eval echo "$as_me:4884: \"$ac_link\"") >&5
4885 (eval $ac_link) 2>&5
4887 echo "$as_me:4887: \$? = $ac_status" >&5
4888 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4889 { (eval echo "$as_me:4889: \"$ac_try\"") >&5
4892 echo "$as_me:4892: \$? = $ac_status" >&5
4893 (exit "$ac_status"); }; }; then
4894 cf_have_ncuconfig=yes
4896 echo "$as_me: program exited with status $ac_status" >&5
4897 echo "$as_me: failed program was:" >&5
4898 cat "conftest.$ac_ext" >&5
4899 cf_have_ncuconfig=no
4901 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4904 echo "$as_me: failed program was:" >&5
4905 cat "conftest.$ac_ext" >&5
4906 cf_have_ncuconfig=no
4908 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4909 echo "$as_me:4909: result: $cf_have_ncuconfig" >&5
4910 echo "${ECHO_T}$cf_have_ncuconfig" >&6
4911 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
4912 if test "$cf_have_ncuconfig" != "yes"
4914 CPPFLAGS="$cf_save_CPPFLAGS"
4915 LIBS="$cf_save_LIBS"
4916 NCURSES_CONFIG_PKG=none
4919 cat >>confdefs.h <<\EOF
4923 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
4925 echo "$as_me:4925: checking for terminfo header" >&5
4926 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4927 if test "${cf_cv_term_header+set}" = set; then
4928 echo $ECHO_N "(cached) $ECHO_C" >&6
4931 case "${cf_cv_ncurses_header}" in
4932 (*/ncurses.h|*/ncursesw.h)
4933 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4936 cf_term_header=term.h
4940 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4942 cat >"conftest.$ac_ext" <<_ACEOF
4943 #line 4943 "configure"
4944 #include "confdefs.h"
4946 #include <${cf_cv_ncurses_header:-curses.h}>
4952 int x = auto_left_margin; (void)x
4957 rm -f "conftest.$ac_objext"
4958 if { (eval echo "$as_me:4958: \"$ac_compile\"") >&5
4959 (eval $ac_compile) 2>&5
4961 echo "$as_me:4961: \$? = $ac_status" >&5
4962 (exit "$ac_status"); } &&
4963 { ac_try='test -s "conftest.$ac_objext"'
4964 { (eval echo "$as_me:4964: \"$ac_try\"") >&5
4967 echo "$as_me:4967: \$? = $ac_status" >&5
4968 (exit "$ac_status"); }; }; then
4970 cf_cv_term_header="$cf_test"
4972 echo "$as_me: failed program was:" >&5
4973 cat "conftest.$ac_ext" >&5
4975 cf_cv_term_header=unknown
4978 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4979 test "$cf_cv_term_header" != unknown && break
4983 echo "$as_me:4983: result: $cf_cv_term_header" >&5
4984 echo "${ECHO_T}$cf_cv_term_header" >&6
4986 # Set definitions to allow ifdef'ing to accommodate subdirectories
4988 case "$cf_cv_term_header" in
4991 cat >>confdefs.h <<\EOF
4992 #define HAVE_TERM_H 1
4998 case "$cf_cv_term_header" in
5001 cat >>confdefs.h <<\EOF
5002 #define HAVE_NCURSES_TERM_H 1
5008 cat >>confdefs.h <<\EOF
5009 #define HAVE_NCURSESW_TERM_H 1
5018 echo "$as_me:5018: result: no" >&5
5019 echo "${ECHO_T}no" >&6
5020 NCURSES_CONFIG_PKG=none
5023 NCURSES_CONFIG_PKG=none
5026 if test "x$cf_have_ncuconfig" = "xno"; then
5027 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
5029 if test -n "$ac_tool_prefix"; then
5030 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5032 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5033 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5034 echo "$as_me:5034: checking for $ac_word" >&5
5035 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5036 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5037 echo $ECHO_N "(cached) $ECHO_C" >&6
5039 if test -n "$NCURSES_CONFIG"; then
5040 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5042 ac_save_IFS=$IFS; IFS=$ac_path_separator
5044 for ac_dir in $ac_dummy; do
5046 test -z "$ac_dir" && ac_dir=.
5047 $as_executable_p "$ac_dir/$ac_word" || continue
5048 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5049 echo "$as_me:5049: found $ac_dir/$ac_word" >&5
5055 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5056 if test -n "$NCURSES_CONFIG"; then
5057 echo "$as_me:5057: result: $NCURSES_CONFIG" >&5
5058 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5060 echo "$as_me:5060: result: no" >&5
5061 echo "${ECHO_T}no" >&6
5064 test -n "$NCURSES_CONFIG" && break
5067 if test -z "$NCURSES_CONFIG"; then
5068 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5069 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5071 # Extract the first word of "$ac_prog", so it can be a program name with args.
5072 set dummy $ac_prog; ac_word=$2
5073 echo "$as_me:5073: checking for $ac_word" >&5
5074 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5075 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5076 echo $ECHO_N "(cached) $ECHO_C" >&6
5078 if test -n "$ac_ct_NCURSES_CONFIG"; then
5079 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5081 ac_save_IFS=$IFS; IFS=$ac_path_separator
5083 for ac_dir in $ac_dummy; do
5085 test -z "$ac_dir" && ac_dir=.
5086 $as_executable_p "$ac_dir/$ac_word" || continue
5087 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5088 echo "$as_me:5088: found $ac_dir/$ac_word" >&5
5094 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5095 if test -n "$ac_ct_NCURSES_CONFIG"; then
5096 echo "$as_me:5096: result: $ac_ct_NCURSES_CONFIG" >&5
5097 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5099 echo "$as_me:5099: result: no" >&5
5100 echo "${ECHO_T}no" >&6
5103 test -n "$ac_ct_NCURSES_CONFIG" && break
5105 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5107 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5110 if test "$NCURSES_CONFIG" != none ; then
5112 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
5114 case "x$cf_add_cflags" in
5117 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5120 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'`
5121 test "$CFLAGS" != "$cf_old_cflag" || break
5123 CFLAGS="$cf_old_cflag"
5126 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5129 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'`
5130 test "$CPPFLAGS" != "$cf_old_cflag" || break
5132 CPPFLAGS="$cf_old_cflag"
5141 cf_new_extra_cppflags=
5143 for cf_add_cflags in $cf_add_cflags
5145 case "$cf_fix_cppflags" in
5147 case "$cf_add_cflags" in
5148 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5149 case "$cf_add_cflags" in
5151 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5153 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5154 && test -z "${cf_tst_cflags}" \
5155 && cf_fix_cppflags=yes
5157 if test "$cf_fix_cppflags" = yes ; then
5159 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5160 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5163 elif test "${cf_tst_cflags}" = "\"'" ; then
5165 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5166 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5176 case "$cf_add_cflags" in
5178 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5180 CPPFLAGS=`echo "$CPPFLAGS" | \
5181 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5182 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5187 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5188 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5195 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5196 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5203 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5204 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5206 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5208 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5209 && test -z "${cf_tst_cflags}" \
5210 && cf_fix_cppflags=no
5215 if test -n "$cf_new_cflags" ; then
5217 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5218 CFLAGS="${CFLAGS}$cf_new_cflags"
5222 if test -n "$cf_new_cppflags" ; then
5224 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5225 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5229 if test -n "$cf_new_extra_cppflags" ; then
5231 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5232 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5241 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5243 for cf_add_1lib in $cf_add_0lib; do
5244 for cf_add_2lib in $cf_add_libs; do
5245 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5250 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5254 # even with config script, some packages use no-override for curses.h
5256 echo "$as_me:5256: checking if we have identified curses headers" >&5
5257 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5258 if test "${cf_cv_ncurses_header+set}" = set; then
5259 echo $ECHO_N "(cached) $ECHO_C" >&6
5262 cf_cv_ncurses_header=none
5264 ncurses.h ncurses/ncurses.h \
5265 curses.h ncurses/curses.h
5267 cat >"conftest.$ac_ext" <<_ACEOF
5268 #line 5268 "configure"
5269 #include "confdefs.h"
5270 #include <${cf_header}>
5274 initscr(); tgoto("?", 0,0)
5279 rm -f "conftest.$ac_objext"
5280 if { (eval echo "$as_me:5280: \"$ac_compile\"") >&5
5281 (eval $ac_compile) 2>&5
5283 echo "$as_me:5283: \$? = $ac_status" >&5
5284 (exit "$ac_status"); } &&
5285 { ac_try='test -s "conftest.$ac_objext"'
5286 { (eval echo "$as_me:5286: \"$ac_try\"") >&5
5289 echo "$as_me:5289: \$? = $ac_status" >&5
5290 (exit "$ac_status"); }; }; then
5291 cf_cv_ncurses_header=$cf_header; break
5293 echo "$as_me: failed program was:" >&5
5294 cat "conftest.$ac_ext" >&5
5296 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5300 echo "$as_me:5300: result: $cf_cv_ncurses_header" >&5
5301 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5303 if test "$cf_cv_ncurses_header" = none ; then
5304 { { echo "$as_me:5304: error: No curses header-files found" >&5
5305 echo "$as_me: error: No curses header-files found" >&2;}
5306 { (exit 1); exit 1; }; }
5309 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5311 for ac_header in $cf_cv_ncurses_header
5313 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5314 echo "$as_me:5314: checking for $ac_header" >&5
5315 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5316 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5317 echo $ECHO_N "(cached) $ECHO_C" >&6
5319 cat >"conftest.$ac_ext" <<_ACEOF
5320 #line 5320 "configure"
5321 #include "confdefs.h"
5322 #include <$ac_header>
5324 if { (eval echo "$as_me:5324: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5325 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5327 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5329 cat conftest.err >&5
5330 echo "$as_me:5330: \$? = $ac_status" >&5
5331 (exit "$ac_status"); } >/dev/null; then
5332 if test -s conftest.err; then
5333 ac_cpp_err=$ac_c_preproc_warn_flag
5340 if test -z "$ac_cpp_err"; then
5341 eval "$as_ac_Header=yes"
5343 echo "$as_me: failed program was:" >&5
5344 cat "conftest.$ac_ext" >&5
5345 eval "$as_ac_Header=no"
5347 rm -f conftest.err "conftest.$ac_ext"
5349 echo "$as_me:5349: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5350 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5351 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5352 cat >>confdefs.h <<EOF
5353 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5359 cat >>confdefs.h <<\EOF
5363 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5365 cat >>confdefs.h <<EOF
5366 #define $cf_nculib_ROOT 1
5369 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
5373 cf_ncuhdr_root=ncurses
5375 test -n "$cf_cv_curses_dir" && \
5376 test "$cf_cv_curses_dir" != "no" && { \
5378 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5379 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5381 while test "$cf_add_incdir" != /usr/include
5383 if test -d "$cf_add_incdir"
5386 if test -n "$CFLAGS$CPPFLAGS" ; then
5387 # a loop is needed to ensure we can add subdirs of existing dirs
5388 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5389 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5390 cf_have_incdir=yes; break
5395 if test "$cf_have_incdir" = no ; then
5396 if test "$cf_add_incdir" = /usr/local/include ; then
5397 if test "$GCC" = yes
5399 cf_save_CPPFLAGS=$CPPFLAGS
5401 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5402 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5404 cat >"conftest.$ac_ext" <<_ACEOF
5405 #line 5405 "configure"
5406 #include "confdefs.h"
5416 rm -f "conftest.$ac_objext"
5417 if { (eval echo "$as_me:5417: \"$ac_compile\"") >&5
5418 (eval $ac_compile) 2>&5
5420 echo "$as_me:5420: \$? = $ac_status" >&5
5421 (exit "$ac_status"); } &&
5422 { ac_try='test -s "conftest.$ac_objext"'
5423 { (eval echo "$as_me:5423: \"$ac_try\"") >&5
5426 echo "$as_me:5426: \$? = $ac_status" >&5
5427 (exit "$ac_status"); }; }; then
5430 echo "$as_me: failed program was:" >&5
5431 cat "conftest.$ac_ext" >&5
5434 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5435 CPPFLAGS=$cf_save_CPPFLAGS
5440 if test "$cf_have_incdir" = no ; then
5441 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5443 echo "${as_me:-configure}:5443: testing adding $cf_add_incdir to include-path ..." 1>&5
5445 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5447 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5448 test "$cf_top_incdir" = "$cf_add_incdir" && break
5449 cf_add_incdir="$cf_top_incdir"
5462 echo "$as_me:5462: checking for $cf_ncuhdr_root header in include-path" >&5
5463 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5464 if test "${cf_cv_ncurses_h+set}" = set; then
5465 echo $ECHO_N "(cached) $ECHO_C" >&6
5468 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5469 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
5470 for cf_header in $cf_header_list
5473 cat >"conftest.$ac_ext" <<_ACEOF
5474 #line 5474 "configure"
5475 #include "confdefs.h"
5477 #include <$cf_header>
5482 #ifdef NCURSES_VERSION
5484 printf("%s\\n", NCURSES_VERSION);
5497 rm -f "conftest.$ac_objext"
5498 if { (eval echo "$as_me:5498: \"$ac_compile\"") >&5
5499 (eval $ac_compile) 2>&5
5501 echo "$as_me:5501: \$? = $ac_status" >&5
5502 (exit "$ac_status"); } &&
5503 { ac_try='test -s "conftest.$ac_objext"'
5504 { (eval echo "$as_me:5504: \"$ac_try\"") >&5
5507 echo "$as_me:5507: \$? = $ac_status" >&5
5508 (exit "$ac_status"); }; }; then
5509 cf_cv_ncurses_h=$cf_header
5512 echo "$as_me: failed program was:" >&5
5513 cat "conftest.$ac_ext" >&5
5516 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5518 test "$cf_cv_ncurses_h" != no && break
5522 echo "$as_me:5522: result: $cf_cv_ncurses_h" >&5
5523 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5525 if test "$cf_cv_ncurses_h" != no ; then
5526 cf_cv_ncurses_header=$cf_cv_ncurses_h
5529 echo "$as_me:5529: checking for $cf_ncuhdr_root include-path" >&5
5530 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5531 if test "${cf_cv_ncurses_h2+set}" = set; then
5532 echo $ECHO_N "(cached) $ECHO_C" >&6
5535 test -n "$verbose" && echo
5539 # collect the current set of include-directories from compiler flags
5540 cf_header_path_list=""
5541 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5542 for cf_header_path in $CPPFLAGS $CFLAGS
5544 case "$cf_header_path" in
5546 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5548 test "x$cf_header_path" != "xNONE" && \
5549 test -d "$cf_header_path" && \
5551 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5552 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
5553 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5554 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5555 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5556 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"
5559 cf_header_path_list="$cf_header_path_list $cf_search"
5565 # add the variations for the package we are looking for
5569 test "x$prefix" != "xNONE" && \
5570 test -d "$prefix" && \
5572 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5573 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
5574 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5575 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5576 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5577 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5580 for cf_subdir_prefix in \
5589 test "x$cf_subdir_prefix" != "x$prefix" && \
5590 test -d "$cf_subdir_prefix" && \
5591 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
5592 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5593 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
5594 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
5595 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
5596 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
5597 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"
5602 test "$includedir" != NONE && \
5603 test "$includedir" != "/usr/include" && \
5604 test -d "$includedir" && {
5605 test -d "$includedir" && cf_search="$cf_search $includedir"
5606 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5609 test "$oldincludedir" != NONE && \
5610 test "$oldincludedir" != "/usr/include" && \
5611 test -d "$oldincludedir" && {
5612 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
5613 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5616 cf_search="$cf_search $cf_header_path_list"
5618 test -n "$verbose" && echo "search path $cf_search"
5619 cf_save2_CPPFLAGS="$CPPFLAGS"
5620 for cf_incdir in $cf_search
5623 if test -n "$cf_incdir" ; then
5624 for cf_add_incdir in $cf_incdir
5626 while test "$cf_add_incdir" != /usr/include
5628 if test -d "$cf_add_incdir"
5631 if test -n "$CFLAGS$CPPFLAGS" ; then
5632 # a loop is needed to ensure we can add subdirs of existing dirs
5633 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5634 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5635 cf_have_incdir=yes; break
5640 if test "$cf_have_incdir" = no ; then
5641 if test "$cf_add_incdir" = /usr/local/include ; then
5642 if test "$GCC" = yes
5644 cf_save_CPPFLAGS=$CPPFLAGS
5646 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5647 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5649 cat >"conftest.$ac_ext" <<_ACEOF
5650 #line 5650 "configure"
5651 #include "confdefs.h"
5661 rm -f "conftest.$ac_objext"
5662 if { (eval echo "$as_me:5662: \"$ac_compile\"") >&5
5663 (eval $ac_compile) 2>&5
5665 echo "$as_me:5665: \$? = $ac_status" >&5
5666 (exit "$ac_status"); } &&
5667 { ac_try='test -s "conftest.$ac_objext"'
5668 { (eval echo "$as_me:5668: \"$ac_try\"") >&5
5671 echo "$as_me:5671: \$? = $ac_status" >&5
5672 (exit "$ac_status"); }; }; then
5675 echo "$as_me: failed program was:" >&5
5676 cat "conftest.$ac_ext" >&5
5679 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5680 CPPFLAGS=$cf_save_CPPFLAGS
5685 if test "$cf_have_incdir" = no ; then
5686 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5688 echo "${as_me:-configure}:5688: testing adding $cf_add_incdir to include-path ..." 1>&5
5690 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5692 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5693 test "$cf_top_incdir" = "$cf_add_incdir" && break
5694 cf_add_incdir="$cf_top_incdir"
5710 cat >"conftest.$ac_ext" <<_ACEOF
5711 #line 5711 "configure"
5712 #include "confdefs.h"
5714 #include <$cf_header>
5719 #ifdef NCURSES_VERSION
5721 printf("%s\\n", NCURSES_VERSION);
5734 rm -f "conftest.$ac_objext"
5735 if { (eval echo "$as_me:5735: \"$ac_compile\"") >&5
5736 (eval $ac_compile) 2>&5
5738 echo "$as_me:5738: \$? = $ac_status" >&5
5739 (exit "$ac_status"); } &&
5740 { ac_try='test -s "conftest.$ac_objext"'
5741 { (eval echo "$as_me:5741: \"$ac_try\"") >&5
5744 echo "$as_me:5744: \$? = $ac_status" >&5
5745 (exit "$ac_status"); }; }; then
5746 cf_cv_ncurses_h2=$cf_header
5749 echo "$as_me: failed program was:" >&5
5750 cat "conftest.$ac_ext" >&5
5753 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5755 if test "$cf_cv_ncurses_h2" != no ; then
5756 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5757 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
5760 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5762 CPPFLAGS="$cf_save2_CPPFLAGS"
5763 test "$cf_cv_ncurses_h2" != no && break
5765 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5765: error: not found" >&5
5766 echo "$as_me: error: not found" >&2;}
5767 { (exit 1); exit 1; }; }
5770 echo "$as_me:5770: result: $cf_cv_ncurses_h2" >&5
5771 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5773 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
5774 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
5775 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
5776 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
5779 if test -n "$cf_1st_incdir" ; then
5780 for cf_add_incdir in $cf_1st_incdir
5782 while test "$cf_add_incdir" != /usr/include
5784 if test -d "$cf_add_incdir"
5787 if test -n "$CFLAGS$CPPFLAGS" ; then
5788 # a loop is needed to ensure we can add subdirs of existing dirs
5789 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5790 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5791 cf_have_incdir=yes; break
5796 if test "$cf_have_incdir" = no ; then
5797 if test "$cf_add_incdir" = /usr/local/include ; then
5798 if test "$GCC" = yes
5800 cf_save_CPPFLAGS=$CPPFLAGS
5802 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5803 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5805 cat >"conftest.$ac_ext" <<_ACEOF
5806 #line 5806 "configure"
5807 #include "confdefs.h"
5817 rm -f "conftest.$ac_objext"
5818 if { (eval echo "$as_me:5818: \"$ac_compile\"") >&5
5819 (eval $ac_compile) 2>&5
5821 echo "$as_me:5821: \$? = $ac_status" >&5
5822 (exit "$ac_status"); } &&
5823 { ac_try='test -s "conftest.$ac_objext"'
5824 { (eval echo "$as_me:5824: \"$ac_try\"") >&5
5827 echo "$as_me:5827: \$? = $ac_status" >&5
5828 (exit "$ac_status"); }; }; then
5831 echo "$as_me: failed program was:" >&5
5832 cat "conftest.$ac_ext" >&5
5835 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5836 CPPFLAGS=$cf_save_CPPFLAGS
5841 if test "$cf_have_incdir" = no ; then
5842 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5844 echo "${as_me:-configure}:5844: testing adding $cf_add_incdir to include-path ..." 1>&5
5846 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5848 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5849 test "$cf_top_incdir" = "$cf_add_incdir" && break
5850 cf_add_incdir="$cf_top_incdir"
5863 # Set definitions to allow ifdef'ing for ncurses.h
5865 case "$cf_cv_ncurses_header" in
5868 cat >>confdefs.h <<\EOF
5869 #define HAVE_NCURSES_H 1
5875 case "$cf_cv_ncurses_header" in
5876 (ncurses/curses.h|ncurses/ncurses.h)
5878 cat >>confdefs.h <<\EOF
5879 #define HAVE_NCURSES_NCURSES_H 1
5883 (ncursesw/curses.h|ncursesw/ncurses.h)
5885 cat >>confdefs.h <<\EOF
5886 #define HAVE_NCURSESW_NCURSES_H 1
5892 echo "$as_me:5892: checking for terminfo header" >&5
5893 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5894 if test "${cf_cv_term_header+set}" = set; then
5895 echo $ECHO_N "(cached) $ECHO_C" >&6
5898 case "${cf_cv_ncurses_header}" in
5899 (*/ncurses.h|*/ncursesw.h)
5900 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5903 cf_term_header=term.h
5907 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5909 cat >"conftest.$ac_ext" <<_ACEOF
5910 #line 5910 "configure"
5911 #include "confdefs.h"
5913 #include <${cf_cv_ncurses_header:-curses.h}>
5919 int x = auto_left_margin; (void)x
5924 rm -f "conftest.$ac_objext"
5925 if { (eval echo "$as_me:5925: \"$ac_compile\"") >&5
5926 (eval $ac_compile) 2>&5
5928 echo "$as_me:5928: \$? = $ac_status" >&5
5929 (exit "$ac_status"); } &&
5930 { ac_try='test -s "conftest.$ac_objext"'
5931 { (eval echo "$as_me:5931: \"$ac_try\"") >&5
5934 echo "$as_me:5934: \$? = $ac_status" >&5
5935 (exit "$ac_status"); }; }; then
5937 cf_cv_term_header="$cf_test"
5939 echo "$as_me: failed program was:" >&5
5940 cat "conftest.$ac_ext" >&5
5942 cf_cv_term_header=unknown
5945 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5946 test "$cf_cv_term_header" != unknown && break
5950 echo "$as_me:5950: result: $cf_cv_term_header" >&5
5951 echo "${ECHO_T}$cf_cv_term_header" >&6
5953 # Set definitions to allow ifdef'ing to accommodate subdirectories
5955 case "$cf_cv_term_header" in
5958 cat >>confdefs.h <<\EOF
5959 #define HAVE_TERM_H 1
5965 case "$cf_cv_term_header" in
5968 cat >>confdefs.h <<\EOF
5969 #define HAVE_NCURSES_TERM_H 1
5975 cat >>confdefs.h <<\EOF
5976 #define HAVE_NCURSESW_TERM_H 1
5982 # some applications need this, but should check for NCURSES_VERSION
5984 cat >>confdefs.h <<\EOF
5988 echo "$as_me:5988: checking for ncurses version" >&5
5989 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5990 if test "${cf_cv_ncurses_version+set}" = set; then
5991 echo $ECHO_N "(cached) $ECHO_C" >&6
5994 cf_cv_ncurses_version=no
5996 rm -f "$cf_tempfile"
5997 if test "$cross_compiling" = yes; then
5999 # This will not work if the preprocessor splits the line after the
6000 # Autoconf token. The 'unproto' program does that.
6001 cat > "conftest.$ac_ext" <<EOF
6002 #include <${cf_cv_ncurses_header:-curses.h}>
6004 #ifdef NCURSES_VERSION
6005 Autoconf NCURSES_VERSION
6013 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6014 { (eval echo "$as_me:6014: \"$cf_try\"") >&5
6017 echo "$as_me:6017: \$? = $ac_status" >&5
6018 (exit "$ac_status"); }
6019 if test -f conftest.out ; then
6020 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
6021 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6026 cat >"conftest.$ac_ext" <<_ACEOF
6027 #line 6027 "configure"
6028 #include "confdefs.h"
6030 #include <${cf_cv_ncurses_header:-curses.h}>
6034 FILE *fp = fopen("$cf_tempfile", "w");
6035 #ifdef NCURSES_VERSION
6036 # ifdef NCURSES_VERSION_PATCH
6037 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6039 fprintf(fp, "%s\\n", NCURSES_VERSION);
6043 fprintf(fp, "old\\n");
6048 ${cf_cv_main_return:-return}(0);
6051 rm -f "conftest$ac_exeext"
6052 if { (eval echo "$as_me:6052: \"$ac_link\"") >&5
6053 (eval $ac_link) 2>&5
6055 echo "$as_me:6055: \$? = $ac_status" >&5
6056 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6057 { (eval echo "$as_me:6057: \"$ac_try\"") >&5
6060 echo "$as_me:6060: \$? = $ac_status" >&5
6061 (exit "$ac_status"); }; }; then
6063 cf_cv_ncurses_version=`cat $cf_tempfile`
6065 echo "$as_me: program exited with status $ac_status" >&5
6066 echo "$as_me: failed program was:" >&5
6067 cat "conftest.$ac_ext" >&5
6069 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6071 rm -f "$cf_tempfile"
6074 echo "$as_me:6074: result: $cf_cv_ncurses_version" >&5
6075 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6076 test "$cf_cv_ncurses_version" = no ||
6077 cat >>confdefs.h <<\EOF
6081 cf_nculib_root=ncurses
6082 # This works, except for the special case where we find gpm, but
6083 # ncurses is in a nonstandard location via $LIBS, and we really want
6086 cf_ncurses_SAVE="$LIBS"
6087 echo "$as_me:6087: checking for Gpm_Open in -lgpm" >&5
6088 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6089 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6090 echo $ECHO_N "(cached) $ECHO_C" >&6
6092 ac_check_lib_save_LIBS=$LIBS
6094 cat >"conftest.$ac_ext" <<_ACEOF
6095 #line 6095 "configure"
6096 #include "confdefs.h"
6098 /* Override any gcc2 internal prototype to avoid an error. */
6102 /* We use char because int might match the return type of a gcc2
6103 builtin and then its argument prototype would still apply. */
6113 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6114 if { (eval echo "$as_me:6114: \"$ac_link\"") >&5
6115 (eval $ac_link) 2>&5
6117 echo "$as_me:6117: \$? = $ac_status" >&5
6118 (exit "$ac_status"); } &&
6119 { ac_try='test -s "conftest$ac_exeext"'
6120 { (eval echo "$as_me:6120: \"$ac_try\"") >&5
6123 echo "$as_me:6123: \$? = $ac_status" >&5
6124 (exit "$ac_status"); }; }; then
6125 ac_cv_lib_gpm_Gpm_Open=yes
6127 echo "$as_me: failed program was:" >&5
6128 cat "conftest.$ac_ext" >&5
6129 ac_cv_lib_gpm_Gpm_Open=no
6131 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6132 LIBS=$ac_check_lib_save_LIBS
6134 echo "$as_me:6134: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6135 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6136 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
6137 echo "$as_me:6137: checking for initscr in -lgpm" >&5
6138 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6139 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6140 echo $ECHO_N "(cached) $ECHO_C" >&6
6142 ac_check_lib_save_LIBS=$LIBS
6144 cat >"conftest.$ac_ext" <<_ACEOF
6145 #line 6145 "configure"
6146 #include "confdefs.h"
6148 /* Override any gcc2 internal prototype to avoid an error. */
6152 /* We use char because int might match the return type of a gcc2
6153 builtin and then its argument prototype would still apply. */
6163 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6164 if { (eval echo "$as_me:6164: \"$ac_link\"") >&5
6165 (eval $ac_link) 2>&5
6167 echo "$as_me:6167: \$? = $ac_status" >&5
6168 (exit "$ac_status"); } &&
6169 { ac_try='test -s "conftest$ac_exeext"'
6170 { (eval echo "$as_me:6170: \"$ac_try\"") >&5
6173 echo "$as_me:6173: \$? = $ac_status" >&5
6174 (exit "$ac_status"); }; }; then
6175 ac_cv_lib_gpm_initscr=yes
6177 echo "$as_me: failed program was:" >&5
6178 cat "conftest.$ac_ext" >&5
6179 ac_cv_lib_gpm_initscr=no
6181 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6182 LIBS=$ac_check_lib_save_LIBS
6184 echo "$as_me:6184: result: $ac_cv_lib_gpm_initscr" >&5
6185 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6186 if test "$ac_cv_lib_gpm_initscr" = yes; then
6187 LIBS="$cf_ncurses_SAVE"
6189 cf_ncurses_LIBS="-lgpm"
6196 # This is only necessary if you are linking against an obsolete
6197 # version of ncurses (but it should do no harm, since it is static).
6198 if test "$cf_nculib_root" = ncurses ; then
6199 echo "$as_me:6199: checking for tgoto in -lmytinfo" >&5
6200 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6201 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6202 echo $ECHO_N "(cached) $ECHO_C" >&6
6204 ac_check_lib_save_LIBS=$LIBS
6205 LIBS="-lmytinfo $LIBS"
6206 cat >"conftest.$ac_ext" <<_ACEOF
6207 #line 6207 "configure"
6208 #include "confdefs.h"
6210 /* Override any gcc2 internal prototype to avoid an error. */
6214 /* We use char because int might match the return type of a gcc2
6215 builtin and then its argument prototype would still apply. */
6225 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6226 if { (eval echo "$as_me:6226: \"$ac_link\"") >&5
6227 (eval $ac_link) 2>&5
6229 echo "$as_me:6229: \$? = $ac_status" >&5
6230 (exit "$ac_status"); } &&
6231 { ac_try='test -s "conftest$ac_exeext"'
6232 { (eval echo "$as_me:6232: \"$ac_try\"") >&5
6235 echo "$as_me:6235: \$? = $ac_status" >&5
6236 (exit "$ac_status"); }; }; then
6237 ac_cv_lib_mytinfo_tgoto=yes
6239 echo "$as_me: failed program was:" >&5
6240 cat "conftest.$ac_ext" >&5
6241 ac_cv_lib_mytinfo_tgoto=no
6243 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6244 LIBS=$ac_check_lib_save_LIBS
6246 echo "$as_me:6246: result: $ac_cv_lib_mytinfo_tgoto" >&5
6247 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6248 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6249 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6259 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6261 for cf_add_1lib in $cf_add_0lib; do
6262 for cf_add_2lib in $cf_add_libs; do
6263 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6268 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6272 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6278 for cf_add_1lib in -l$cf_nculib_root; 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"
6293 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
6295 echo "$as_me:6295: checking for initscr" >&5
6296 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6297 if test "${ac_cv_func_initscr+set}" = set; then
6298 echo $ECHO_N "(cached) $ECHO_C" >&6
6300 cat >"conftest.$ac_ext" <<_ACEOF
6301 #line 6301 "configure"
6302 #include "confdefs.h"
6303 #define initscr autoconf_temporary
6304 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6311 /* We use char because int might match the return type of a gcc2
6312 builtin and then its argument prototype would still apply. */
6313 char initscr (void);
6319 /* The GNU C library defines stubs for functions which it implements
6320 to always fail with ENOSYS. Some functions are actually named
6321 something starting with __ and the normal name is an alias. */
6322 #if defined (__stub_initscr) || defined (__stub___initscr)
6323 #error found stub for initscr
6331 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6332 if { (eval echo "$as_me:6332: \"$ac_link\"") >&5
6333 (eval $ac_link) 2>&5
6335 echo "$as_me:6335: \$? = $ac_status" >&5
6336 (exit "$ac_status"); } &&
6337 { ac_try='test -s "conftest$ac_exeext"'
6338 { (eval echo "$as_me:6338: \"$ac_try\"") >&5
6341 echo "$as_me:6341: \$? = $ac_status" >&5
6342 (exit "$ac_status"); }; }; then
6343 ac_cv_func_initscr=yes
6345 echo "$as_me: failed program was:" >&5
6346 cat "conftest.$ac_ext" >&5
6347 ac_cv_func_initscr=no
6349 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6351 echo "$as_me:6351: result: $ac_cv_func_initscr" >&5
6352 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6353 if test "$ac_cv_func_initscr" = yes; then
6354 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6357 cf_save_LIBS="$LIBS"
6358 echo "$as_me:6358: checking for initscr in -l$cf_nculib_root" >&5
6359 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6360 LIBS="-l$cf_nculib_root $LIBS"
6361 cat >"conftest.$ac_ext" <<_ACEOF
6362 #line 6362 "configure"
6363 #include "confdefs.h"
6364 #include <${cf_cv_ncurses_header:-curses.h}>
6373 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6374 if { (eval echo "$as_me:6374: \"$ac_link\"") >&5
6375 (eval $ac_link) 2>&5
6377 echo "$as_me:6377: \$? = $ac_status" >&5
6378 (exit "$ac_status"); } &&
6379 { ac_try='test -s "conftest$ac_exeext"'
6380 { (eval echo "$as_me:6380: \"$ac_try\"") >&5
6383 echo "$as_me:6383: \$? = $ac_status" >&5
6384 (exit "$ac_status"); }; }; then
6385 echo "$as_me:6385: result: yes" >&5
6386 echo "${ECHO_T}yes" >&6
6387 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6390 echo "$as_me: failed program was:" >&5
6391 cat "conftest.$ac_ext" >&5
6392 echo "$as_me:6392: result: no" >&5
6393 echo "${ECHO_T}no" >&6
6396 cf_library_path_list=""
6397 if test -n "${LDFLAGS}${LIBS}" ; then
6398 for cf_library_path in $LDFLAGS $LIBS
6400 case "$cf_library_path" in
6402 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6404 test "x$cf_library_path" != "xNONE" && \
6405 test -d "$cf_library_path" && \
6407 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6408 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6409 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6410 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6411 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6412 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"
6415 cf_library_path_list="$cf_library_path_list $cf_search"
6423 test "x$prefix" != "xNONE" && \
6424 test -d "$prefix" && \
6426 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6427 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6428 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6429 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6430 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6431 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6434 for cf_subdir_prefix in \
6443 test "x$cf_subdir_prefix" != "x$prefix" && \
6444 test -d "$cf_subdir_prefix" && \
6445 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6446 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6447 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6448 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
6449 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
6450 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
6451 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"
6456 cf_search="$cf_library_path_list $cf_search"
6458 for cf_libdir in $cf_search
6460 echo "$as_me:6460: checking for -l$cf_nculib_root in $cf_libdir" >&5
6461 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6462 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6463 cat >"conftest.$ac_ext" <<_ACEOF
6464 #line 6464 "configure"
6465 #include "confdefs.h"
6466 #include <${cf_cv_ncurses_header:-curses.h}>
6475 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6476 if { (eval echo "$as_me:6476: \"$ac_link\"") >&5
6477 (eval $ac_link) 2>&5
6479 echo "$as_me:6479: \$? = $ac_status" >&5
6480 (exit "$ac_status"); } &&
6481 { ac_try='test -s "conftest$ac_exeext"'
6482 { (eval echo "$as_me:6482: \"$ac_try\"") >&5
6485 echo "$as_me:6485: \$? = $ac_status" >&5
6486 (exit "$ac_status"); }; }; then
6487 echo "$as_me:6487: result: yes" >&5
6488 echo "${ECHO_T}yes" >&6
6489 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6492 echo "$as_me: failed program was:" >&5
6493 cat "conftest.$ac_ext" >&5
6494 echo "$as_me:6494: result: no" >&5
6495 echo "${ECHO_T}no" >&6
6496 LIBS="$cf_save_LIBS"
6498 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6502 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6506 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
6508 if test "$cf_found_library" = no ; then
6509 { { echo "$as_me:6509: error: Cannot link $cf_nculib_root library" >&5
6510 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6511 { (exit 1); exit 1; }; }
6516 if test -n "$cf_ncurses_LIBS" ; then
6517 echo "$as_me:6517: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6518 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6519 cf_ncurses_SAVE="$LIBS"
6520 for p in $cf_ncurses_LIBS ; do
6521 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
6522 if test "$q" != "$LIBS" ; then
6526 cat >"conftest.$ac_ext" <<_ACEOF
6527 #line 6527 "configure"
6528 #include "confdefs.h"
6529 #include <${cf_cv_ncurses_header:-curses.h}>
6533 initscr(); mousemask(0,0); tigetstr((char *)0);
6538 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6539 if { (eval echo "$as_me:6539: \"$ac_link\"") >&5
6540 (eval $ac_link) 2>&5
6542 echo "$as_me:6542: \$? = $ac_status" >&5
6543 (exit "$ac_status"); } &&
6544 { ac_try='test -s "conftest$ac_exeext"'
6545 { (eval echo "$as_me:6545: \"$ac_try\"") >&5
6548 echo "$as_me:6548: \$? = $ac_status" >&5
6549 (exit "$ac_status"); }; }; then
6550 echo "$as_me:6550: result: yes" >&5
6551 echo "${ECHO_T}yes" >&6
6553 echo "$as_me: failed program was:" >&5
6554 cat "conftest.$ac_ext" >&5
6555 echo "$as_me:6555: result: no" >&5
6556 echo "${ECHO_T}no" >&6
6557 LIBS="$cf_ncurses_SAVE"
6559 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6562 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6564 cat >>confdefs.h <<EOF
6565 #define $cf_nculib_ROOT 1
6573 echo "$as_me:6573: checking if you want wide-character code" >&5
6574 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6576 # Check whether --enable-widec or --disable-widec was given.
6577 if test "${enable_widec+set}" = set; then
6578 enableval="$enable_widec"
6579 with_widec=$enableval
6583 echo "$as_me:6583: result: $with_widec" >&5
6584 echo "${ECHO_T}$with_widec" >&6
6585 if test "$with_widec" = yes ; then
6587 for ac_header in wchar.h
6589 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6590 echo "$as_me:6590: checking for $ac_header" >&5
6591 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6592 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6593 echo $ECHO_N "(cached) $ECHO_C" >&6
6595 cat >"conftest.$ac_ext" <<_ACEOF
6596 #line 6596 "configure"
6597 #include "confdefs.h"
6598 #include <$ac_header>
6600 if { (eval echo "$as_me:6600: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6601 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6603 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6605 cat conftest.err >&5
6606 echo "$as_me:6606: \$? = $ac_status" >&5
6607 (exit "$ac_status"); } >/dev/null; then
6608 if test -s conftest.err; then
6609 ac_cpp_err=$ac_c_preproc_warn_flag
6616 if test -z "$ac_cpp_err"; then
6617 eval "$as_ac_Header=yes"
6619 echo "$as_me: failed program was:" >&5
6620 cat "conftest.$ac_ext" >&5
6621 eval "$as_ac_Header=no"
6623 rm -f conftest.err "conftest.$ac_ext"
6625 echo "$as_me:6625: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6626 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6627 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6628 cat >>confdefs.h <<EOF
6629 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6635 echo "$as_me:6635: checking for multibyte character support" >&5
6636 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6637 if test "${cf_cv_utf8_lib+set}" = set; then
6638 echo $ECHO_N "(cached) $ECHO_C" >&6
6641 cf_save_LIBS="$LIBS"
6642 cat >"conftest.$ac_ext" <<_ACEOF
6643 #line 6643 "configure"
6644 #include "confdefs.h"
6660 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6661 if { (eval echo "$as_me:6661: \"$ac_link\"") >&5
6662 (eval $ac_link) 2>&5
6664 echo "$as_me:6664: \$? = $ac_status" >&5
6665 (exit "$ac_status"); } &&
6666 { ac_try='test -s "conftest$ac_exeext"'
6667 { (eval echo "$as_me:6667: \"$ac_try\"") >&5
6670 echo "$as_me:6670: \$? = $ac_status" >&5
6671 (exit "$ac_status"); }; }; then
6674 echo "$as_me: failed program was:" >&5
6675 cat "conftest.$ac_ext" >&5
6677 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6678 # will be set on completion of the AC_TRY_LINK below.
6679 cf_cv_header_path_utf8=
6680 cf_cv_library_path_utf8=
6682 echo "${as_me:-configure}:6682: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6684 cf_save_LIBS="$LIBS"
6686 cat >"conftest.$ac_ext" <<_ACEOF
6687 #line 6687 "configure"
6688 #include "confdefs.h"
6690 #include <libutf8.h>
6699 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6700 if { (eval echo "$as_me:6700: \"$ac_link\"") >&5
6701 (eval $ac_link) 2>&5
6703 echo "$as_me:6703: \$? = $ac_status" >&5
6704 (exit "$ac_status"); } &&
6705 { ac_try='test -s "conftest$ac_exeext"'
6706 { (eval echo "$as_me:6706: \"$ac_try\"") >&5
6709 echo "$as_me:6709: \$? = $ac_status" >&5
6710 (exit "$ac_status"); }; }; then
6712 cf_cv_find_linkage_utf8=yes
6713 cf_cv_header_path_utf8=/usr/include
6714 cf_cv_library_path_utf8=/usr/lib
6717 echo "$as_me: failed program was:" >&5
6718 cat "conftest.$ac_ext" >&5
6720 LIBS="-lutf8 $cf_save_LIBS"
6722 cat >"conftest.$ac_ext" <<_ACEOF
6723 #line 6723 "configure"
6724 #include "confdefs.h"
6726 #include <libutf8.h>
6735 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6736 if { (eval echo "$as_me:6736: \"$ac_link\"") >&5
6737 (eval $ac_link) 2>&5
6739 echo "$as_me:6739: \$? = $ac_status" >&5
6740 (exit "$ac_status"); } &&
6741 { ac_try='test -s "conftest$ac_exeext"'
6742 { (eval echo "$as_me:6742: \"$ac_try\"") >&5
6745 echo "$as_me:6745: \$? = $ac_status" >&5
6746 (exit "$ac_status"); }; }; then
6748 cf_cv_find_linkage_utf8=yes
6749 cf_cv_header_path_utf8=/usr/include
6750 cf_cv_library_path_utf8=/usr/lib
6751 cf_cv_library_file_utf8="-lutf8"
6754 echo "$as_me: failed program was:" >&5
6755 cat "conftest.$ac_ext" >&5
6757 cf_cv_find_linkage_utf8=no
6758 LIBS="$cf_save_LIBS"
6760 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6762 echo "${as_me:-configure}:6762: testing find linkage for utf8 library ..." 1>&5
6764 echo "${as_me:-configure}:6764: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6766 cf_save_CPPFLAGS="$CPPFLAGS"
6767 cf_test_CPPFLAGS="$CPPFLAGS"
6771 # collect the current set of include-directories from compiler flags
6772 cf_header_path_list=""
6773 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6774 for cf_header_path in $CPPFLAGS $CFLAGS
6776 case "$cf_header_path" in
6778 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6780 test "x$cf_header_path" != "xNONE" && \
6781 test -d "$cf_header_path" && \
6783 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6784 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
6785 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
6786 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
6787 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
6788 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6791 cf_header_path_list="$cf_header_path_list $cf_search"
6797 # add the variations for the package we are looking for
6801 test "x$prefix" != "xNONE" && \
6802 test -d "$prefix" && \
6804 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6805 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
6806 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
6807 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
6808 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
6809 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
6812 for cf_subdir_prefix in \
6821 test "x$cf_subdir_prefix" != "x$prefix" && \
6822 test -d "$cf_subdir_prefix" && \
6823 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6824 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6825 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
6826 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6827 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6828 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6829 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6834 test "$includedir" != NONE && \
6835 test "$includedir" != "/usr/include" && \
6836 test -d "$includedir" && {
6837 test -d "$includedir" && cf_search="$cf_search $includedir"
6838 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
6841 test "$oldincludedir" != NONE && \
6842 test "$oldincludedir" != "/usr/include" && \
6843 test -d "$oldincludedir" && {
6844 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
6845 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
6848 cf_search="$cf_search $cf_header_path_list"
6850 for cf_cv_header_path_utf8 in $cf_search
6852 if test -d "$cf_cv_header_path_utf8" ; then
6853 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6855 echo "${as_me:-configure}:6855: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6857 CPPFLAGS="$cf_save_CPPFLAGS"
6859 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6860 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
6862 cat >"conftest.$ac_ext" <<_ACEOF
6863 #line 6863 "configure"
6864 #include "confdefs.h"
6866 #include <libutf8.h>
6875 rm -f "conftest.$ac_objext"
6876 if { (eval echo "$as_me:6876: \"$ac_compile\"") >&5
6877 (eval $ac_compile) 2>&5
6879 echo "$as_me:6879: \$? = $ac_status" >&5
6880 (exit "$ac_status"); } &&
6881 { ac_try='test -s "conftest.$ac_objext"'
6882 { (eval echo "$as_me:6882: \"$ac_try\"") >&5
6885 echo "$as_me:6885: \$? = $ac_status" >&5
6886 (exit "$ac_status"); }; }; then
6888 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6890 echo "${as_me:-configure}:6890: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6892 cf_cv_find_linkage_utf8=maybe
6893 cf_test_CPPFLAGS="$CPPFLAGS"
6896 echo "$as_me: failed program was:" >&5
6897 cat "conftest.$ac_ext" >&5
6899 CPPFLAGS="$cf_save_CPPFLAGS"
6902 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6906 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6908 echo "${as_me:-configure}:6908: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6910 cf_save_LIBS="$LIBS"
6911 cf_save_LDFLAGS="$LDFLAGS"
6913 if test "$cf_cv_find_linkage_utf8" != yes ; then
6916 cf_library_path_list=""
6917 if test -n "${LDFLAGS}${LIBS}" ; then
6918 for cf_library_path in $LDFLAGS $LIBS
6920 case "$cf_library_path" in
6922 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6924 test "x$cf_library_path" != "xNONE" && \
6925 test -d "$cf_library_path" && \
6927 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6928 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6929 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
6930 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6931 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
6932 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6935 cf_library_path_list="$cf_library_path_list $cf_search"
6943 test "x$prefix" != "xNONE" && \
6944 test -d "$prefix" && \
6946 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6947 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6948 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
6949 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
6950 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
6951 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
6954 for cf_subdir_prefix in \
6963 test "x$cf_subdir_prefix" != "x$prefix" && \
6964 test -d "$cf_subdir_prefix" && \
6965 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6966 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6967 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6968 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6969 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6970 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6971 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6976 cf_search="$cf_library_path_list $cf_search"
6978 for cf_cv_library_path_utf8 in $cf_search
6980 if test -d "$cf_cv_library_path_utf8" ; then
6981 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6983 echo "${as_me:-configure}:6983: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6985 CPPFLAGS="$cf_test_CPPFLAGS"
6986 LIBS="-lutf8 $cf_save_LIBS"
6987 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6988 cat >"conftest.$ac_ext" <<_ACEOF
6989 #line 6989 "configure"
6990 #include "confdefs.h"
6992 #include <libutf8.h>
7001 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7002 if { (eval echo "$as_me:7002: \"$ac_link\"") >&5
7003 (eval $ac_link) 2>&5
7005 echo "$as_me:7005: \$? = $ac_status" >&5
7006 (exit "$ac_status"); } &&
7007 { ac_try='test -s "conftest$ac_exeext"'
7008 { (eval echo "$as_me:7008: \"$ac_try\"") >&5
7011 echo "$as_me:7011: \$? = $ac_status" >&5
7012 (exit "$ac_status"); }; }; then
7014 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7016 echo "${as_me:-configure}:7016: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7018 cf_cv_find_linkage_utf8=yes
7019 cf_cv_library_file_utf8="-lutf8"
7022 echo "$as_me: failed program was:" >&5
7023 cat "conftest.$ac_ext" >&5
7025 CPPFLAGS="$cf_save_CPPFLAGS"
7026 LIBS="$cf_save_LIBS"
7027 LDFLAGS="$cf_save_LDFLAGS"
7030 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7033 CPPFLAGS="$cf_save_CPPFLAGS"
7034 LDFLAGS="$cf_save_LDFLAGS"
7038 cf_cv_find_linkage_utf8=no
7042 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7045 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7047 LIBS="$cf_save_LIBS"
7049 if test "$cf_cv_find_linkage_utf8" = yes ; then
7050 cf_cv_utf8_lib=add-on
7056 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7058 echo "$as_me:7058: result: $cf_cv_utf8_lib" >&5
7059 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7061 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7063 if test "$cf_cv_utf8_lib" = "add-on" ; then
7065 cat >>confdefs.h <<\EOF
7066 #define HAVE_LIBUTF8_H 1
7069 if test -n "$cf_cv_header_path_utf8" ; then
7070 for cf_add_incdir in $cf_cv_header_path_utf8
7072 while test "$cf_add_incdir" != /usr/include
7074 if test -d "$cf_add_incdir"
7077 if test -n "$CFLAGS$CPPFLAGS" ; then
7078 # a loop is needed to ensure we can add subdirs of existing dirs
7079 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7080 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7081 cf_have_incdir=yes; break
7086 if test "$cf_have_incdir" = no ; then
7087 if test "$cf_add_incdir" = /usr/local/include ; then
7088 if test "$GCC" = yes
7090 cf_save_CPPFLAGS=$CPPFLAGS
7092 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7093 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7095 cat >"conftest.$ac_ext" <<_ACEOF
7096 #line 7096 "configure"
7097 #include "confdefs.h"
7107 rm -f "conftest.$ac_objext"
7108 if { (eval echo "$as_me:7108: \"$ac_compile\"") >&5
7109 (eval $ac_compile) 2>&5
7111 echo "$as_me:7111: \$? = $ac_status" >&5
7112 (exit "$ac_status"); } &&
7113 { ac_try='test -s "conftest.$ac_objext"'
7114 { (eval echo "$as_me:7114: \"$ac_try\"") >&5
7117 echo "$as_me:7117: \$? = $ac_status" >&5
7118 (exit "$ac_status"); }; }; then
7121 echo "$as_me: failed program was:" >&5
7122 cat "conftest.$ac_ext" >&5
7125 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7126 CPPFLAGS=$cf_save_CPPFLAGS
7131 if test "$cf_have_incdir" = no ; then
7132 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7134 echo "${as_me:-configure}:7134: testing adding $cf_add_incdir to include-path ..." 1>&5
7136 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7138 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7139 test "$cf_top_incdir" = "$cf_add_incdir" && break
7140 cf_add_incdir="$cf_top_incdir"
7151 if test -n "$cf_cv_library_path_utf8" ; then
7152 for cf_add_libdir in $cf_cv_library_path_utf8
7154 if test "$cf_add_libdir" = /usr/lib ; then
7156 elif test -d "$cf_add_libdir"
7159 if test -n "$LDFLAGS$LIBS" ; then
7160 # a loop is needed to ensure we can add subdirs of existing dirs
7161 for cf_test_libdir in $LDFLAGS $LIBS ; do
7162 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7163 cf_have_libdir=yes; break
7167 if test "$cf_have_libdir" = no ; then
7168 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7170 echo "${as_me:-configure}:7170: testing adding $cf_add_libdir to library-path ..." 1>&5
7172 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7181 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7183 for cf_add_1lib in $cf_add_0lib; do
7184 for cf_add_2lib in $cf_add_libs; do
7185 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7190 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7196 cf_ncuconfig_root=ncursesw
7197 cf_have_ncuconfig=no
7199 if test "x${PKG_CONFIG:=none}" != xnone; then
7200 echo "$as_me:7200: checking pkg-config for $cf_ncuconfig_root" >&5
7201 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7202 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7203 echo "$as_me:7203: result: yes" >&5
7204 echo "${ECHO_T}yes" >&6
7206 echo "$as_me:7206: checking if the $cf_ncuconfig_root package files work" >&5
7207 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7208 cf_have_ncuconfig=unknown
7210 cf_save_CFLAGS="$CFLAGS"
7211 cf_save_CPPFLAGS="$CPPFLAGS"
7212 cf_save_LIBS="$LIBS"
7214 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7215 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7217 # while -W for passing linker flags is prevalent, it is not "standard".
7218 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7219 # incompatible _and_ non-standard -W option which gives an error. Work
7220 # around that pitfall.
7221 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7227 cf_new_extra_cppflags=
7229 for cf_add_cflags in $cf_pkg_cflags
7231 case "$cf_fix_cppflags" in
7233 case "$cf_add_cflags" in
7234 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7235 case "$cf_add_cflags" in
7237 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7239 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7240 && test -z "${cf_tst_cflags}" \
7241 && cf_fix_cppflags=yes
7243 if test "$cf_fix_cppflags" = yes ; then
7245 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7246 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7249 elif test "${cf_tst_cflags}" = "\"'" ; then
7251 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7252 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7262 case "$cf_add_cflags" in
7264 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7266 CPPFLAGS=`echo "$CPPFLAGS" | \
7267 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7268 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7273 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7274 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7281 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7282 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7289 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7290 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7292 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7294 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7295 && test -z "${cf_tst_cflags}" \
7296 && cf_fix_cppflags=no
7301 if test -n "$cf_new_cflags" ; then
7303 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7304 CFLAGS="${CFLAGS}$cf_new_cflags"
7308 if test -n "$cf_new_cppflags" ; then
7310 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7311 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7315 if test -n "$cf_new_extra_cppflags" ; then
7317 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7318 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7325 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7327 for cf_add_1lib in $cf_add_0lib; do
7328 for cf_add_2lib in $cf_add_libs; do
7329 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7334 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7338 cat >"conftest.$ac_ext" <<_ACEOF
7339 #line 7339 "configure"
7340 #include "confdefs.h"
7341 #include <${cf_cv_ncurses_header:-curses.h}>
7345 initscr(); mousemask(0,0); tigetstr((char *)0);
7350 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7351 if { (eval echo "$as_me:7351: \"$ac_link\"") >&5
7352 (eval $ac_link) 2>&5
7354 echo "$as_me:7354: \$? = $ac_status" >&5
7355 (exit "$ac_status"); } &&
7356 { ac_try='test -s "conftest$ac_exeext"'
7357 { (eval echo "$as_me:7357: \"$ac_try\"") >&5
7360 echo "$as_me:7360: \$? = $ac_status" >&5
7361 (exit "$ac_status"); }; }; then
7362 if test "$cross_compiling" = yes; then
7363 cf_test_ncuconfig=maybe
7365 cat >"conftest.$ac_ext" <<_ACEOF
7366 #line 7366 "configure"
7367 #include "confdefs.h"
7368 #include <${cf_cv_ncurses_header:-curses.h}>
7370 { const char *xx = curses_version(); return (xx == 0); }
7372 rm -f "conftest$ac_exeext"
7373 if { (eval echo "$as_me:7373: \"$ac_link\"") >&5
7374 (eval $ac_link) 2>&5
7376 echo "$as_me:7376: \$? = $ac_status" >&5
7377 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7378 { (eval echo "$as_me:7378: \"$ac_try\"") >&5
7381 echo "$as_me:7381: \$? = $ac_status" >&5
7382 (exit "$ac_status"); }; }; then
7383 cf_test_ncuconfig=yes
7385 echo "$as_me: program exited with status $ac_status" >&5
7386 echo "$as_me: failed program was:" >&5
7387 cat "conftest.$ac_ext" >&5
7388 cf_test_ncuconfig=no
7390 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7393 echo "$as_me: failed program was:" >&5
7394 cat "conftest.$ac_ext" >&5
7395 cf_test_ncuconfig=no
7397 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7399 CFLAGS="$cf_save_CFLAGS"
7400 CPPFLAGS="$cf_save_CPPFLAGS"
7401 LIBS="$cf_save_LIBS"
7403 if test "x$cf_test_ncuconfig" != xyes; then
7404 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7405 cf_pkg_cflags="$cf_temp"
7406 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7407 cf_pkg_libs="$cf_temp"
7412 for cf_add_cflags in $cf_pkg_cflags
7414 case "x$cf_add_cflags" in
7417 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7420 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'`
7421 test "$CFLAGS" != "$cf_old_cflag" || break
7423 CFLAGS="$cf_old_cflag"
7426 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7429 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'`
7430 test "$CPPFLAGS" != "$cf_old_cflag" || break
7432 CPPFLAGS="$cf_old_cflag"
7441 cf_new_extra_cppflags=
7443 for cf_add_cflags in $cf_add_cflags
7445 case "$cf_fix_cppflags" in
7447 case "$cf_add_cflags" in
7448 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7449 case "$cf_add_cflags" in
7451 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7453 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7454 && test -z "${cf_tst_cflags}" \
7455 && cf_fix_cppflags=yes
7457 if test "$cf_fix_cppflags" = yes ; then
7459 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7460 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7463 elif test "${cf_tst_cflags}" = "\"'" ; then
7465 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7466 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7476 case "$cf_add_cflags" in
7478 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7480 CPPFLAGS=`echo "$CPPFLAGS" | \
7481 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7482 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7487 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7488 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7495 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7496 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7503 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7504 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7506 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7508 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7509 && test -z "${cf_tst_cflags}" \
7510 && cf_fix_cppflags=no
7515 if test -n "$cf_new_cflags" ; then
7517 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7518 CFLAGS="${CFLAGS}$cf_new_cflags"
7522 if test -n "$cf_new_cppflags" ; then
7524 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7525 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7529 if test -n "$cf_new_extra_cppflags" ; then
7531 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7532 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7541 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7543 for cf_add_1lib in $cf_add_0lib; do
7544 for cf_add_2lib in $cf_add_libs; do
7545 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7550 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7554 cat >"conftest.$ac_ext" <<_ACEOF
7555 #line 7555 "configure"
7556 #include "confdefs.h"
7557 #include <${cf_cv_ncurses_header:-curses.h}>
7561 initscr(); mousemask(0,0); tigetstr((char *)0);
7566 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7567 if { (eval echo "$as_me:7567: \"$ac_link\"") >&5
7568 (eval $ac_link) 2>&5
7570 echo "$as_me:7570: \$? = $ac_status" >&5
7571 (exit "$ac_status"); } &&
7572 { ac_try='test -s "conftest$ac_exeext"'
7573 { (eval echo "$as_me:7573: \"$ac_try\"") >&5
7576 echo "$as_me:7576: \$? = $ac_status" >&5
7577 (exit "$ac_status"); }; }; then
7578 if test "$cross_compiling" = yes; then
7579 cf_have_ncuconfig=maybe
7581 cat >"conftest.$ac_ext" <<_ACEOF
7582 #line 7582 "configure"
7583 #include "confdefs.h"
7584 #include <${cf_cv_ncurses_header:-curses.h}>
7586 { const char *xx = curses_version(); return (xx == 0); }
7588 rm -f "conftest$ac_exeext"
7589 if { (eval echo "$as_me:7589: \"$ac_link\"") >&5
7590 (eval $ac_link) 2>&5
7592 echo "$as_me:7592: \$? = $ac_status" >&5
7593 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7594 { (eval echo "$as_me:7594: \"$ac_try\"") >&5
7597 echo "$as_me:7597: \$? = $ac_status" >&5
7598 (exit "$ac_status"); }; }; then
7599 cf_have_ncuconfig=yes
7601 echo "$as_me: program exited with status $ac_status" >&5
7602 echo "$as_me: failed program was:" >&5
7603 cat "conftest.$ac_ext" >&5
7604 cf_have_ncuconfig=no
7606 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7609 echo "$as_me: failed program was:" >&5
7610 cat "conftest.$ac_ext" >&5
7611 cf_have_ncuconfig=no
7613 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7614 echo "$as_me:7614: result: $cf_have_ncuconfig" >&5
7615 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7616 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7617 if test "$cf_have_ncuconfig" != "yes"
7619 CPPFLAGS="$cf_save_CPPFLAGS"
7620 LIBS="$cf_save_LIBS"
7621 NCURSES_CONFIG_PKG=none
7624 cat >>confdefs.h <<\EOF
7628 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7630 echo "$as_me:7630: checking for terminfo header" >&5
7631 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7632 if test "${cf_cv_term_header+set}" = set; then
7633 echo $ECHO_N "(cached) $ECHO_C" >&6
7636 case "${cf_cv_ncurses_header}" in
7637 (*/ncurses.h|*/ncursesw.h)
7638 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7641 cf_term_header=term.h
7645 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7647 cat >"conftest.$ac_ext" <<_ACEOF
7648 #line 7648 "configure"
7649 #include "confdefs.h"
7651 #include <${cf_cv_ncurses_header:-curses.h}>
7657 int x = auto_left_margin; (void)x
7662 rm -f "conftest.$ac_objext"
7663 if { (eval echo "$as_me:7663: \"$ac_compile\"") >&5
7664 (eval $ac_compile) 2>&5
7666 echo "$as_me:7666: \$? = $ac_status" >&5
7667 (exit "$ac_status"); } &&
7668 { ac_try='test -s "conftest.$ac_objext"'
7669 { (eval echo "$as_me:7669: \"$ac_try\"") >&5
7672 echo "$as_me:7672: \$? = $ac_status" >&5
7673 (exit "$ac_status"); }; }; then
7675 cf_cv_term_header="$cf_test"
7677 echo "$as_me: failed program was:" >&5
7678 cat "conftest.$ac_ext" >&5
7680 cf_cv_term_header=unknown
7683 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7684 test "$cf_cv_term_header" != unknown && break
7688 echo "$as_me:7688: result: $cf_cv_term_header" >&5
7689 echo "${ECHO_T}$cf_cv_term_header" >&6
7691 # Set definitions to allow ifdef'ing to accommodate subdirectories
7693 case "$cf_cv_term_header" in
7696 cat >>confdefs.h <<\EOF
7697 #define HAVE_TERM_H 1
7703 case "$cf_cv_term_header" in
7706 cat >>confdefs.h <<\EOF
7707 #define HAVE_NCURSES_TERM_H 1
7713 cat >>confdefs.h <<\EOF
7714 #define HAVE_NCURSESW_TERM_H 1
7723 echo "$as_me:7723: result: no" >&5
7724 echo "${ECHO_T}no" >&6
7725 NCURSES_CONFIG_PKG=none
7728 NCURSES_CONFIG_PKG=none
7731 if test "x$cf_have_ncuconfig" = "xno"; then
7732 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7734 if test -n "$ac_tool_prefix"; then
7735 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7737 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7738 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7739 echo "$as_me:7739: checking for $ac_word" >&5
7740 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7741 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7742 echo $ECHO_N "(cached) $ECHO_C" >&6
7744 if test -n "$NCURSES_CONFIG"; then
7745 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7747 ac_save_IFS=$IFS; IFS=$ac_path_separator
7749 for ac_dir in $ac_dummy; do
7751 test -z "$ac_dir" && ac_dir=.
7752 $as_executable_p "$ac_dir/$ac_word" || continue
7753 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7754 echo "$as_me:7754: found $ac_dir/$ac_word" >&5
7760 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7761 if test -n "$NCURSES_CONFIG"; then
7762 echo "$as_me:7762: result: $NCURSES_CONFIG" >&5
7763 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7765 echo "$as_me:7765: result: no" >&5
7766 echo "${ECHO_T}no" >&6
7769 test -n "$NCURSES_CONFIG" && break
7772 if test -z "$NCURSES_CONFIG"; then
7773 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7774 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7776 # Extract the first word of "$ac_prog", so it can be a program name with args.
7777 set dummy $ac_prog; ac_word=$2
7778 echo "$as_me:7778: checking for $ac_word" >&5
7779 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7780 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7781 echo $ECHO_N "(cached) $ECHO_C" >&6
7783 if test -n "$ac_ct_NCURSES_CONFIG"; then
7784 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7786 ac_save_IFS=$IFS; IFS=$ac_path_separator
7788 for ac_dir in $ac_dummy; do
7790 test -z "$ac_dir" && ac_dir=.
7791 $as_executable_p "$ac_dir/$ac_word" || continue
7792 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7793 echo "$as_me:7793: found $ac_dir/$ac_word" >&5
7799 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7800 if test -n "$ac_ct_NCURSES_CONFIG"; then
7801 echo "$as_me:7801: result: $ac_ct_NCURSES_CONFIG" >&5
7802 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7804 echo "$as_me:7804: result: no" >&5
7805 echo "${ECHO_T}no" >&6
7808 test -n "$ac_ct_NCURSES_CONFIG" && break
7810 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7812 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7815 if test "$NCURSES_CONFIG" != none ; then
7817 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7819 case "x$cf_add_cflags" in
7822 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7825 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'`
7826 test "$CFLAGS" != "$cf_old_cflag" || break
7828 CFLAGS="$cf_old_cflag"
7831 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7834 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'`
7835 test "$CPPFLAGS" != "$cf_old_cflag" || break
7837 CPPFLAGS="$cf_old_cflag"
7846 cf_new_extra_cppflags=
7848 for cf_add_cflags in $cf_add_cflags
7850 case "$cf_fix_cppflags" in
7852 case "$cf_add_cflags" in
7853 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7854 case "$cf_add_cflags" in
7856 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7858 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7859 && test -z "${cf_tst_cflags}" \
7860 && cf_fix_cppflags=yes
7862 if test "$cf_fix_cppflags" = yes ; then
7864 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7865 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7868 elif test "${cf_tst_cflags}" = "\"'" ; then
7870 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7871 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7881 case "$cf_add_cflags" in
7883 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7885 CPPFLAGS=`echo "$CPPFLAGS" | \
7886 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7887 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7892 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7893 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7900 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7901 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7908 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7909 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7911 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7913 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7914 && test -z "${cf_tst_cflags}" \
7915 && cf_fix_cppflags=no
7920 if test -n "$cf_new_cflags" ; then
7922 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7923 CFLAGS="${CFLAGS}$cf_new_cflags"
7927 if test -n "$cf_new_cppflags" ; then
7929 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7930 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7934 if test -n "$cf_new_extra_cppflags" ; then
7936 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7937 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7946 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7948 for cf_add_1lib in $cf_add_0lib; do
7949 for cf_add_2lib in $cf_add_libs; do
7950 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7955 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7959 # even with config script, some packages use no-override for curses.h
7961 echo "$as_me:7961: checking if we have identified curses headers" >&5
7962 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7963 if test "${cf_cv_ncurses_header+set}" = set; then
7964 echo $ECHO_N "(cached) $ECHO_C" >&6
7967 cf_cv_ncurses_header=none
7969 ncurses.h ncursesw/ncurses.h \
7970 curses.h ncursesw/curses.h
7972 cat >"conftest.$ac_ext" <<_ACEOF
7973 #line 7973 "configure"
7974 #include "confdefs.h"
7975 #include <${cf_header}>
7979 initscr(); tgoto("?", 0,0)
7984 rm -f "conftest.$ac_objext"
7985 if { (eval echo "$as_me:7985: \"$ac_compile\"") >&5
7986 (eval $ac_compile) 2>&5
7988 echo "$as_me:7988: \$? = $ac_status" >&5
7989 (exit "$ac_status"); } &&
7990 { ac_try='test -s "conftest.$ac_objext"'
7991 { (eval echo "$as_me:7991: \"$ac_try\"") >&5
7994 echo "$as_me:7994: \$? = $ac_status" >&5
7995 (exit "$ac_status"); }; }; then
7996 cf_cv_ncurses_header=$cf_header; break
7998 echo "$as_me: failed program was:" >&5
7999 cat "conftest.$ac_ext" >&5
8001 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8005 echo "$as_me:8005: result: $cf_cv_ncurses_header" >&5
8006 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8008 if test "$cf_cv_ncurses_header" = none ; then
8009 { { echo "$as_me:8009: error: No curses header-files found" >&5
8010 echo "$as_me: error: No curses header-files found" >&2;}
8011 { (exit 1); exit 1; }; }
8014 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8016 for ac_header in $cf_cv_ncurses_header
8018 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8019 echo "$as_me:8019: checking for $ac_header" >&5
8020 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8021 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8022 echo $ECHO_N "(cached) $ECHO_C" >&6
8024 cat >"conftest.$ac_ext" <<_ACEOF
8025 #line 8025 "configure"
8026 #include "confdefs.h"
8027 #include <$ac_header>
8029 if { (eval echo "$as_me:8029: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8030 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8032 $EGREP -v '^ *\+' conftest.er1 >conftest.err
8034 cat conftest.err >&5
8035 echo "$as_me:8035: \$? = $ac_status" >&5
8036 (exit "$ac_status"); } >/dev/null; then
8037 if test -s conftest.err; then
8038 ac_cpp_err=$ac_c_preproc_warn_flag
8045 if test -z "$ac_cpp_err"; then
8046 eval "$as_ac_Header=yes"
8048 echo "$as_me: failed program was:" >&5
8049 cat "conftest.$ac_ext" >&5
8050 eval "$as_ac_Header=no"
8052 rm -f conftest.err "conftest.$ac_ext"
8054 echo "$as_me:8054: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8055 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8056 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8057 cat >>confdefs.h <<EOF
8058 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8064 cat >>confdefs.h <<\EOF
8068 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8070 cat >>confdefs.h <<EOF
8071 #define $cf_nculib_ROOT 1
8074 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
8078 cf_ncuhdr_root=ncursesw
8080 test -n "$cf_cv_curses_dir" && \
8081 test "$cf_cv_curses_dir" != "no" && { \
8083 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8084 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8086 while test "$cf_add_incdir" != /usr/include
8088 if test -d "$cf_add_incdir"
8091 if test -n "$CFLAGS$CPPFLAGS" ; then
8092 # a loop is needed to ensure we can add subdirs of existing dirs
8093 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8094 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8095 cf_have_incdir=yes; break
8100 if test "$cf_have_incdir" = no ; then
8101 if test "$cf_add_incdir" = /usr/local/include ; then
8102 if test "$GCC" = yes
8104 cf_save_CPPFLAGS=$CPPFLAGS
8106 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8107 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8109 cat >"conftest.$ac_ext" <<_ACEOF
8110 #line 8110 "configure"
8111 #include "confdefs.h"
8121 rm -f "conftest.$ac_objext"
8122 if { (eval echo "$as_me:8122: \"$ac_compile\"") >&5
8123 (eval $ac_compile) 2>&5
8125 echo "$as_me:8125: \$? = $ac_status" >&5
8126 (exit "$ac_status"); } &&
8127 { ac_try='test -s "conftest.$ac_objext"'
8128 { (eval echo "$as_me:8128: \"$ac_try\"") >&5
8131 echo "$as_me:8131: \$? = $ac_status" >&5
8132 (exit "$ac_status"); }; }; then
8135 echo "$as_me: failed program was:" >&5
8136 cat "conftest.$ac_ext" >&5
8139 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8140 CPPFLAGS=$cf_save_CPPFLAGS
8145 if test "$cf_have_incdir" = no ; then
8146 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8148 echo "${as_me:-configure}:8148: testing adding $cf_add_incdir to include-path ..." 1>&5
8150 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8152 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8153 test "$cf_top_incdir" = "$cf_add_incdir" && break
8154 cf_add_incdir="$cf_top_incdir"
8167 echo "$as_me:8167: checking for $cf_ncuhdr_root header in include-path" >&5
8168 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8169 if test "${cf_cv_ncurses_h+set}" = set; then
8170 echo $ECHO_N "(cached) $ECHO_C" >&6
8173 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8174 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
8175 for cf_header in $cf_header_list
8178 cat >"conftest.$ac_ext" <<_ACEOF
8179 #line 8179 "configure"
8180 #include "confdefs.h"
8182 #define _XOPEN_SOURCE_EXTENDED
8183 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
8184 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
8186 #include <$cf_header>
8191 #ifdef NCURSES_VERSION
8197 printf("%s\\n", NCURSES_VERSION);
8210 rm -f "conftest.$ac_objext"
8211 if { (eval echo "$as_me:8211: \"$ac_compile\"") >&5
8212 (eval $ac_compile) 2>&5
8214 echo "$as_me:8214: \$? = $ac_status" >&5
8215 (exit "$ac_status"); } &&
8216 { ac_try='test -s "conftest.$ac_objext"'
8217 { (eval echo "$as_me:8217: \"$ac_try\"") >&5
8220 echo "$as_me:8220: \$? = $ac_status" >&5
8221 (exit "$ac_status"); }; }; then
8222 cf_cv_ncurses_h=$cf_header
8225 echo "$as_me: failed program was:" >&5
8226 cat "conftest.$ac_ext" >&5
8229 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8231 test "$cf_cv_ncurses_h" != no && break
8235 echo "$as_me:8235: result: $cf_cv_ncurses_h" >&5
8236 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8238 if test "$cf_cv_ncurses_h" != no ; then
8239 cf_cv_ncurses_header=$cf_cv_ncurses_h
8242 echo "$as_me:8242: checking for $cf_ncuhdr_root include-path" >&5
8243 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8244 if test "${cf_cv_ncurses_h2+set}" = set; then
8245 echo $ECHO_N "(cached) $ECHO_C" >&6
8248 test -n "$verbose" && echo
8252 # collect the current set of include-directories from compiler flags
8253 cf_header_path_list=""
8254 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8255 for cf_header_path in $CPPFLAGS $CFLAGS
8257 case "$cf_header_path" in
8259 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8261 test "x$cf_header_path" != "xNONE" && \
8262 test -d "$cf_header_path" && \
8264 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8265 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8266 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8267 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8268 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8269 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"
8272 cf_header_path_list="$cf_header_path_list $cf_search"
8278 # add the variations for the package we are looking for
8282 test "x$prefix" != "xNONE" && \
8283 test -d "$prefix" && \
8285 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8286 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8287 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8288 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8289 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8290 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8293 for cf_subdir_prefix in \
8302 test "x$cf_subdir_prefix" != "x$prefix" && \
8303 test -d "$cf_subdir_prefix" && \
8304 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8305 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8306 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8307 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8308 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8309 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8310 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"
8315 test "$includedir" != NONE && \
8316 test "$includedir" != "/usr/include" && \
8317 test -d "$includedir" && {
8318 test -d "$includedir" && cf_search="$cf_search $includedir"
8319 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8322 test "$oldincludedir" != NONE && \
8323 test "$oldincludedir" != "/usr/include" && \
8324 test -d "$oldincludedir" && {
8325 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8326 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8329 cf_search="$cf_search $cf_header_path_list"
8331 test -n "$verbose" && echo "search path $cf_search"
8332 cf_save2_CPPFLAGS="$CPPFLAGS"
8333 for cf_incdir in $cf_search
8336 if test -n "$cf_incdir" ; then
8337 for cf_add_incdir in $cf_incdir
8339 while test "$cf_add_incdir" != /usr/include
8341 if test -d "$cf_add_incdir"
8344 if test -n "$CFLAGS$CPPFLAGS" ; then
8345 # a loop is needed to ensure we can add subdirs of existing dirs
8346 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8347 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8348 cf_have_incdir=yes; break
8353 if test "$cf_have_incdir" = no ; then
8354 if test "$cf_add_incdir" = /usr/local/include ; then
8355 if test "$GCC" = yes
8357 cf_save_CPPFLAGS=$CPPFLAGS
8359 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8360 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8362 cat >"conftest.$ac_ext" <<_ACEOF
8363 #line 8363 "configure"
8364 #include "confdefs.h"
8374 rm -f "conftest.$ac_objext"
8375 if { (eval echo "$as_me:8375: \"$ac_compile\"") >&5
8376 (eval $ac_compile) 2>&5
8378 echo "$as_me:8378: \$? = $ac_status" >&5
8379 (exit "$ac_status"); } &&
8380 { ac_try='test -s "conftest.$ac_objext"'
8381 { (eval echo "$as_me:8381: \"$ac_try\"") >&5
8384 echo "$as_me:8384: \$? = $ac_status" >&5
8385 (exit "$ac_status"); }; }; then
8388 echo "$as_me: failed program was:" >&5
8389 cat "conftest.$ac_ext" >&5
8392 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8393 CPPFLAGS=$cf_save_CPPFLAGS
8398 if test "$cf_have_incdir" = no ; then
8399 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8401 echo "${as_me:-configure}:8401: testing adding $cf_add_incdir to include-path ..." 1>&5
8403 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8405 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8406 test "$cf_top_incdir" = "$cf_add_incdir" && break
8407 cf_add_incdir="$cf_top_incdir"
8423 cat >"conftest.$ac_ext" <<_ACEOF
8424 #line 8424 "configure"
8425 #include "confdefs.h"
8427 #include <$cf_header>
8432 #ifdef NCURSES_VERSION
8434 printf("%s\\n", NCURSES_VERSION);
8447 rm -f "conftest.$ac_objext"
8448 if { (eval echo "$as_me:8448: \"$ac_compile\"") >&5
8449 (eval $ac_compile) 2>&5
8451 echo "$as_me:8451: \$? = $ac_status" >&5
8452 (exit "$ac_status"); } &&
8453 { ac_try='test -s "conftest.$ac_objext"'
8454 { (eval echo "$as_me:8454: \"$ac_try\"") >&5
8457 echo "$as_me:8457: \$? = $ac_status" >&5
8458 (exit "$ac_status"); }; }; then
8459 cf_cv_ncurses_h2=$cf_header
8462 echo "$as_me: failed program was:" >&5
8463 cat "conftest.$ac_ext" >&5
8466 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8468 if test "$cf_cv_ncurses_h2" != no ; then
8469 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8470 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
8473 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8475 CPPFLAGS="$cf_save2_CPPFLAGS"
8476 test "$cf_cv_ncurses_h2" != no && break
8478 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8478: error: not found" >&5
8479 echo "$as_me: error: not found" >&2;}
8480 { (exit 1); exit 1; }; }
8483 echo "$as_me:8483: result: $cf_cv_ncurses_h2" >&5
8484 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8486 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
8487 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
8488 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
8489 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
8492 if test -n "$cf_1st_incdir" ; then
8493 for cf_add_incdir in $cf_1st_incdir
8495 while test "$cf_add_incdir" != /usr/include
8497 if test -d "$cf_add_incdir"
8500 if test -n "$CFLAGS$CPPFLAGS" ; then
8501 # a loop is needed to ensure we can add subdirs of existing dirs
8502 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8503 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8504 cf_have_incdir=yes; break
8509 if test "$cf_have_incdir" = no ; then
8510 if test "$cf_add_incdir" = /usr/local/include ; then
8511 if test "$GCC" = yes
8513 cf_save_CPPFLAGS=$CPPFLAGS
8515 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8516 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8518 cat >"conftest.$ac_ext" <<_ACEOF
8519 #line 8519 "configure"
8520 #include "confdefs.h"
8530 rm -f "conftest.$ac_objext"
8531 if { (eval echo "$as_me:8531: \"$ac_compile\"") >&5
8532 (eval $ac_compile) 2>&5
8534 echo "$as_me:8534: \$? = $ac_status" >&5
8535 (exit "$ac_status"); } &&
8536 { ac_try='test -s "conftest.$ac_objext"'
8537 { (eval echo "$as_me:8537: \"$ac_try\"") >&5
8540 echo "$as_me:8540: \$? = $ac_status" >&5
8541 (exit "$ac_status"); }; }; then
8544 echo "$as_me: failed program was:" >&5
8545 cat "conftest.$ac_ext" >&5
8548 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8549 CPPFLAGS=$cf_save_CPPFLAGS
8554 if test "$cf_have_incdir" = no ; then
8555 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8557 echo "${as_me:-configure}:8557: testing adding $cf_add_incdir to include-path ..." 1>&5
8559 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8561 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8562 test "$cf_top_incdir" = "$cf_add_incdir" && break
8563 cf_add_incdir="$cf_top_incdir"
8576 # Set definitions to allow ifdef'ing for ncurses.h
8578 case "$cf_cv_ncurses_header" in
8581 cat >>confdefs.h <<\EOF
8582 #define HAVE_NCURSES_H 1
8588 case "$cf_cv_ncurses_header" in
8589 (ncurses/curses.h|ncurses/ncurses.h)
8591 cat >>confdefs.h <<\EOF
8592 #define HAVE_NCURSES_NCURSES_H 1
8596 (ncursesw/curses.h|ncursesw/ncurses.h)
8598 cat >>confdefs.h <<\EOF
8599 #define HAVE_NCURSESW_NCURSES_H 1
8605 echo "$as_me:8605: checking for terminfo header" >&5
8606 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8607 if test "${cf_cv_term_header+set}" = set; then
8608 echo $ECHO_N "(cached) $ECHO_C" >&6
8611 case "${cf_cv_ncurses_header}" in
8612 (*/ncurses.h|*/ncursesw.h)
8613 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8616 cf_term_header=term.h
8620 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8622 cat >"conftest.$ac_ext" <<_ACEOF
8623 #line 8623 "configure"
8624 #include "confdefs.h"
8626 #include <${cf_cv_ncurses_header:-curses.h}>
8632 int x = auto_left_margin; (void)x
8637 rm -f "conftest.$ac_objext"
8638 if { (eval echo "$as_me:8638: \"$ac_compile\"") >&5
8639 (eval $ac_compile) 2>&5
8641 echo "$as_me:8641: \$? = $ac_status" >&5
8642 (exit "$ac_status"); } &&
8643 { ac_try='test -s "conftest.$ac_objext"'
8644 { (eval echo "$as_me:8644: \"$ac_try\"") >&5
8647 echo "$as_me:8647: \$? = $ac_status" >&5
8648 (exit "$ac_status"); }; }; then
8650 cf_cv_term_header="$cf_test"
8652 echo "$as_me: failed program was:" >&5
8653 cat "conftest.$ac_ext" >&5
8655 cf_cv_term_header=unknown
8658 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8659 test "$cf_cv_term_header" != unknown && break
8663 echo "$as_me:8663: result: $cf_cv_term_header" >&5
8664 echo "${ECHO_T}$cf_cv_term_header" >&6
8666 # Set definitions to allow ifdef'ing to accommodate subdirectories
8668 case "$cf_cv_term_header" in
8671 cat >>confdefs.h <<\EOF
8672 #define HAVE_TERM_H 1
8678 case "$cf_cv_term_header" in
8681 cat >>confdefs.h <<\EOF
8682 #define HAVE_NCURSES_TERM_H 1
8688 cat >>confdefs.h <<\EOF
8689 #define HAVE_NCURSESW_TERM_H 1
8695 # some applications need this, but should check for NCURSES_VERSION
8697 cat >>confdefs.h <<\EOF
8701 echo "$as_me:8701: checking for ncurses version" >&5
8702 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8703 if test "${cf_cv_ncurses_version+set}" = set; then
8704 echo $ECHO_N "(cached) $ECHO_C" >&6
8707 cf_cv_ncurses_version=no
8709 rm -f "$cf_tempfile"
8710 if test "$cross_compiling" = yes; then
8712 # This will not work if the preprocessor splits the line after the
8713 # Autoconf token. The 'unproto' program does that.
8714 cat > "conftest.$ac_ext" <<EOF
8715 #include <${cf_cv_ncurses_header:-curses.h}>
8717 #ifdef NCURSES_VERSION
8718 Autoconf NCURSES_VERSION
8726 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8727 { (eval echo "$as_me:8727: \"$cf_try\"") >&5
8730 echo "$as_me:8730: \$? = $ac_status" >&5
8731 (exit "$ac_status"); }
8732 if test -f conftest.out ; then
8733 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
8734 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8739 cat >"conftest.$ac_ext" <<_ACEOF
8740 #line 8740 "configure"
8741 #include "confdefs.h"
8743 #include <${cf_cv_ncurses_header:-curses.h}>
8747 FILE *fp = fopen("$cf_tempfile", "w");
8748 #ifdef NCURSES_VERSION
8749 # ifdef NCURSES_VERSION_PATCH
8750 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8752 fprintf(fp, "%s\\n", NCURSES_VERSION);
8756 fprintf(fp, "old\\n");
8761 ${cf_cv_main_return:-return}(0);
8764 rm -f "conftest$ac_exeext"
8765 if { (eval echo "$as_me:8765: \"$ac_link\"") >&5
8766 (eval $ac_link) 2>&5
8768 echo "$as_me:8768: \$? = $ac_status" >&5
8769 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8770 { (eval echo "$as_me:8770: \"$ac_try\"") >&5
8773 echo "$as_me:8773: \$? = $ac_status" >&5
8774 (exit "$ac_status"); }; }; then
8776 cf_cv_ncurses_version=`cat $cf_tempfile`
8778 echo "$as_me: program exited with status $ac_status" >&5
8779 echo "$as_me: failed program was:" >&5
8780 cat "conftest.$ac_ext" >&5
8782 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8784 rm -f "$cf_tempfile"
8787 echo "$as_me:8787: result: $cf_cv_ncurses_version" >&5
8788 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8789 test "$cf_cv_ncurses_version" = no ||
8790 cat >>confdefs.h <<\EOF
8794 cf_nculib_root=ncursesw
8795 # This works, except for the special case where we find gpm, but
8796 # ncurses is in a nonstandard location via $LIBS, and we really want
8799 cf_ncurses_SAVE="$LIBS"
8800 echo "$as_me:8800: checking for Gpm_Open in -lgpm" >&5
8801 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8802 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8803 echo $ECHO_N "(cached) $ECHO_C" >&6
8805 ac_check_lib_save_LIBS=$LIBS
8807 cat >"conftest.$ac_ext" <<_ACEOF
8808 #line 8808 "configure"
8809 #include "confdefs.h"
8811 /* Override any gcc2 internal prototype to avoid an error. */
8815 /* We use char because int might match the return type of a gcc2
8816 builtin and then its argument prototype would still apply. */
8826 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8827 if { (eval echo "$as_me:8827: \"$ac_link\"") >&5
8828 (eval $ac_link) 2>&5
8830 echo "$as_me:8830: \$? = $ac_status" >&5
8831 (exit "$ac_status"); } &&
8832 { ac_try='test -s "conftest$ac_exeext"'
8833 { (eval echo "$as_me:8833: \"$ac_try\"") >&5
8836 echo "$as_me:8836: \$? = $ac_status" >&5
8837 (exit "$ac_status"); }; }; then
8838 ac_cv_lib_gpm_Gpm_Open=yes
8840 echo "$as_me: failed program was:" >&5
8841 cat "conftest.$ac_ext" >&5
8842 ac_cv_lib_gpm_Gpm_Open=no
8844 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8845 LIBS=$ac_check_lib_save_LIBS
8847 echo "$as_me:8847: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8848 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8849 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
8850 echo "$as_me:8850: checking for initscr in -lgpm" >&5
8851 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8852 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8853 echo $ECHO_N "(cached) $ECHO_C" >&6
8855 ac_check_lib_save_LIBS=$LIBS
8857 cat >"conftest.$ac_ext" <<_ACEOF
8858 #line 8858 "configure"
8859 #include "confdefs.h"
8861 /* Override any gcc2 internal prototype to avoid an error. */
8865 /* We use char because int might match the return type of a gcc2
8866 builtin and then its argument prototype would still apply. */
8876 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8877 if { (eval echo "$as_me:8877: \"$ac_link\"") >&5
8878 (eval $ac_link) 2>&5
8880 echo "$as_me:8880: \$? = $ac_status" >&5
8881 (exit "$ac_status"); } &&
8882 { ac_try='test -s "conftest$ac_exeext"'
8883 { (eval echo "$as_me:8883: \"$ac_try\"") >&5
8886 echo "$as_me:8886: \$? = $ac_status" >&5
8887 (exit "$ac_status"); }; }; then
8888 ac_cv_lib_gpm_initscr=yes
8890 echo "$as_me: failed program was:" >&5
8891 cat "conftest.$ac_ext" >&5
8892 ac_cv_lib_gpm_initscr=no
8894 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8895 LIBS=$ac_check_lib_save_LIBS
8897 echo "$as_me:8897: result: $ac_cv_lib_gpm_initscr" >&5
8898 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8899 if test "$ac_cv_lib_gpm_initscr" = yes; then
8900 LIBS="$cf_ncurses_SAVE"
8902 cf_ncurses_LIBS="-lgpm"
8909 # This is only necessary if you are linking against an obsolete
8910 # version of ncurses (but it should do no harm, since it is static).
8911 if test "$cf_nculib_root" = ncurses ; then
8912 echo "$as_me:8912: checking for tgoto in -lmytinfo" >&5
8913 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8914 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8915 echo $ECHO_N "(cached) $ECHO_C" >&6
8917 ac_check_lib_save_LIBS=$LIBS
8918 LIBS="-lmytinfo $LIBS"
8919 cat >"conftest.$ac_ext" <<_ACEOF
8920 #line 8920 "configure"
8921 #include "confdefs.h"
8923 /* Override any gcc2 internal prototype to avoid an error. */
8927 /* We use char because int might match the return type of a gcc2
8928 builtin and then its argument prototype would still apply. */
8938 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8939 if { (eval echo "$as_me:8939: \"$ac_link\"") >&5
8940 (eval $ac_link) 2>&5
8942 echo "$as_me:8942: \$? = $ac_status" >&5
8943 (exit "$ac_status"); } &&
8944 { ac_try='test -s "conftest$ac_exeext"'
8945 { (eval echo "$as_me:8945: \"$ac_try\"") >&5
8948 echo "$as_me:8948: \$? = $ac_status" >&5
8949 (exit "$ac_status"); }; }; then
8950 ac_cv_lib_mytinfo_tgoto=yes
8952 echo "$as_me: failed program was:" >&5
8953 cat "conftest.$ac_ext" >&5
8954 ac_cv_lib_mytinfo_tgoto=no
8956 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8957 LIBS=$ac_check_lib_save_LIBS
8959 echo "$as_me:8959: result: $ac_cv_lib_mytinfo_tgoto" >&5
8960 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8961 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
8962 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8972 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8974 for cf_add_1lib in $cf_add_0lib; do
8975 for cf_add_2lib in $cf_add_libs; do
8976 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8981 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8985 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
8991 for cf_add_1lib in -l$cf_nculib_root; 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"
9006 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
9008 echo "$as_me:9008: checking for initscr" >&5
9009 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9010 if test "${ac_cv_func_initscr+set}" = set; then
9011 echo $ECHO_N "(cached) $ECHO_C" >&6
9013 cat >"conftest.$ac_ext" <<_ACEOF
9014 #line 9014 "configure"
9015 #include "confdefs.h"
9016 #define initscr autoconf_temporary
9017 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9024 /* We use char because int might match the return type of a gcc2
9025 builtin and then its argument prototype would still apply. */
9026 char initscr (void);
9032 /* The GNU C library defines stubs for functions which it implements
9033 to always fail with ENOSYS. Some functions are actually named
9034 something starting with __ and the normal name is an alias. */
9035 #if defined (__stub_initscr) || defined (__stub___initscr)
9036 #error found stub for initscr
9044 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9045 if { (eval echo "$as_me:9045: \"$ac_link\"") >&5
9046 (eval $ac_link) 2>&5
9048 echo "$as_me:9048: \$? = $ac_status" >&5
9049 (exit "$ac_status"); } &&
9050 { ac_try='test -s "conftest$ac_exeext"'
9051 { (eval echo "$as_me:9051: \"$ac_try\"") >&5
9054 echo "$as_me:9054: \$? = $ac_status" >&5
9055 (exit "$ac_status"); }; }; then
9056 ac_cv_func_initscr=yes
9058 echo "$as_me: failed program was:" >&5
9059 cat "conftest.$ac_ext" >&5
9060 ac_cv_func_initscr=no
9062 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9064 echo "$as_me:9064: result: $ac_cv_func_initscr" >&5
9065 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9066 if test "$ac_cv_func_initscr" = yes; then
9067 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9070 cf_save_LIBS="$LIBS"
9071 echo "$as_me:9071: checking for initscr in -l$cf_nculib_root" >&5
9072 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9073 LIBS="-l$cf_nculib_root $LIBS"
9074 cat >"conftest.$ac_ext" <<_ACEOF
9075 #line 9075 "configure"
9076 #include "confdefs.h"
9077 #include <${cf_cv_ncurses_header:-curses.h}>
9086 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9087 if { (eval echo "$as_me:9087: \"$ac_link\"") >&5
9088 (eval $ac_link) 2>&5
9090 echo "$as_me:9090: \$? = $ac_status" >&5
9091 (exit "$ac_status"); } &&
9092 { ac_try='test -s "conftest$ac_exeext"'
9093 { (eval echo "$as_me:9093: \"$ac_try\"") >&5
9096 echo "$as_me:9096: \$? = $ac_status" >&5
9097 (exit "$ac_status"); }; }; then
9098 echo "$as_me:9098: result: yes" >&5
9099 echo "${ECHO_T}yes" >&6
9100 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9103 echo "$as_me: failed program was:" >&5
9104 cat "conftest.$ac_ext" >&5
9105 echo "$as_me:9105: result: no" >&5
9106 echo "${ECHO_T}no" >&6
9109 cf_library_path_list=""
9110 if test -n "${LDFLAGS}${LIBS}" ; then
9111 for cf_library_path in $LDFLAGS $LIBS
9113 case "$cf_library_path" in
9115 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9117 test "x$cf_library_path" != "xNONE" && \
9118 test -d "$cf_library_path" && \
9120 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9121 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
9122 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9123 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9124 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9125 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"
9128 cf_library_path_list="$cf_library_path_list $cf_search"
9136 test "x$prefix" != "xNONE" && \
9137 test -d "$prefix" && \
9139 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9140 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
9141 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9142 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9143 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9144 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9147 for cf_subdir_prefix in \
9156 test "x$cf_subdir_prefix" != "x$prefix" && \
9157 test -d "$cf_subdir_prefix" && \
9158 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9159 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9160 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
9161 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9162 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9163 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9164 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"
9169 cf_search="$cf_library_path_list $cf_search"
9171 for cf_libdir in $cf_search
9173 echo "$as_me:9173: checking for -l$cf_nculib_root in $cf_libdir" >&5
9174 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9175 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9176 cat >"conftest.$ac_ext" <<_ACEOF
9177 #line 9177 "configure"
9178 #include "confdefs.h"
9179 #include <${cf_cv_ncurses_header:-curses.h}>
9188 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9189 if { (eval echo "$as_me:9189: \"$ac_link\"") >&5
9190 (eval $ac_link) 2>&5
9192 echo "$as_me:9192: \$? = $ac_status" >&5
9193 (exit "$ac_status"); } &&
9194 { ac_try='test -s "conftest$ac_exeext"'
9195 { (eval echo "$as_me:9195: \"$ac_try\"") >&5
9198 echo "$as_me:9198: \$? = $ac_status" >&5
9199 (exit "$ac_status"); }; }; then
9200 echo "$as_me:9200: result: yes" >&5
9201 echo "${ECHO_T}yes" >&6
9202 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9205 echo "$as_me: failed program was:" >&5
9206 cat "conftest.$ac_ext" >&5
9207 echo "$as_me:9207: result: no" >&5
9208 echo "${ECHO_T}no" >&6
9209 LIBS="$cf_save_LIBS"
9211 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9215 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9219 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
9221 if test "$cf_found_library" = no ; then
9222 { { echo "$as_me:9222: error: Cannot link $cf_nculib_root library" >&5
9223 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9224 { (exit 1); exit 1; }; }
9229 if test -n "$cf_ncurses_LIBS" ; then
9230 echo "$as_me:9230: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9231 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9232 cf_ncurses_SAVE="$LIBS"
9233 for p in $cf_ncurses_LIBS ; do
9234 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
9235 if test "$q" != "$LIBS" ; then
9239 cat >"conftest.$ac_ext" <<_ACEOF
9240 #line 9240 "configure"
9241 #include "confdefs.h"
9242 #include <${cf_cv_ncurses_header:-curses.h}>
9246 initscr(); mousemask(0,0); tigetstr((char *)0);
9251 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9252 if { (eval echo "$as_me:9252: \"$ac_link\"") >&5
9253 (eval $ac_link) 2>&5
9255 echo "$as_me:9255: \$? = $ac_status" >&5
9256 (exit "$ac_status"); } &&
9257 { ac_try='test -s "conftest$ac_exeext"'
9258 { (eval echo "$as_me:9258: \"$ac_try\"") >&5
9261 echo "$as_me:9261: \$? = $ac_status" >&5
9262 (exit "$ac_status"); }; }; then
9263 echo "$as_me:9263: result: yes" >&5
9264 echo "${ECHO_T}yes" >&6
9266 echo "$as_me: failed program was:" >&5
9267 cat "conftest.$ac_ext" >&5
9268 echo "$as_me:9268: result: no" >&5
9269 echo "${ECHO_T}no" >&6
9270 LIBS="$cf_ncurses_SAVE"
9272 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9275 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9277 cat >>confdefs.h <<EOF
9278 #define $cf_nculib_ROOT 1
9288 cf_ncuconfig_root=ncurses
9289 cf_have_ncuconfig=no
9291 if test "x${PKG_CONFIG:=none}" != xnone; then
9292 echo "$as_me:9292: checking pkg-config for $cf_ncuconfig_root" >&5
9293 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9294 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9295 echo "$as_me:9295: result: yes" >&5
9296 echo "${ECHO_T}yes" >&6
9298 echo "$as_me:9298: checking if the $cf_ncuconfig_root package files work" >&5
9299 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9300 cf_have_ncuconfig=unknown
9302 cf_save_CFLAGS="$CFLAGS"
9303 cf_save_CPPFLAGS="$CPPFLAGS"
9304 cf_save_LIBS="$LIBS"
9306 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
9307 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9309 # while -W for passing linker flags is prevalent, it is not "standard".
9310 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9311 # incompatible _and_ non-standard -W option which gives an error. Work
9312 # around that pitfall.
9313 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9319 cf_new_extra_cppflags=
9321 for cf_add_cflags in $cf_pkg_cflags
9323 case "$cf_fix_cppflags" in
9325 case "$cf_add_cflags" in
9326 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9327 case "$cf_add_cflags" in
9329 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9331 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9332 && test -z "${cf_tst_cflags}" \
9333 && cf_fix_cppflags=yes
9335 if test "$cf_fix_cppflags" = yes ; then
9337 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9338 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9341 elif test "${cf_tst_cflags}" = "\"'" ; then
9343 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9344 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9354 case "$cf_add_cflags" in
9356 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9358 CPPFLAGS=`echo "$CPPFLAGS" | \
9359 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9360 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9365 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9366 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9373 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9374 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9381 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9382 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9384 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9386 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9387 && test -z "${cf_tst_cflags}" \
9388 && cf_fix_cppflags=no
9393 if test -n "$cf_new_cflags" ; then
9395 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9396 CFLAGS="${CFLAGS}$cf_new_cflags"
9400 if test -n "$cf_new_cppflags" ; then
9402 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9403 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9407 if test -n "$cf_new_extra_cppflags" ; then
9409 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9410 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9417 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9419 for cf_add_1lib in $cf_add_0lib; do
9420 for cf_add_2lib in $cf_add_libs; do
9421 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9426 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9430 cat >"conftest.$ac_ext" <<_ACEOF
9431 #line 9431 "configure"
9432 #include "confdefs.h"
9433 #include <${cf_cv_ncurses_header:-curses.h}>
9437 initscr(); mousemask(0,0); tigetstr((char *)0);
9442 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9443 if { (eval echo "$as_me:9443: \"$ac_link\"") >&5
9444 (eval $ac_link) 2>&5
9446 echo "$as_me:9446: \$? = $ac_status" >&5
9447 (exit "$ac_status"); } &&
9448 { ac_try='test -s "conftest$ac_exeext"'
9449 { (eval echo "$as_me:9449: \"$ac_try\"") >&5
9452 echo "$as_me:9452: \$? = $ac_status" >&5
9453 (exit "$ac_status"); }; }; then
9454 if test "$cross_compiling" = yes; then
9455 cf_test_ncuconfig=maybe
9457 cat >"conftest.$ac_ext" <<_ACEOF
9458 #line 9458 "configure"
9459 #include "confdefs.h"
9460 #include <${cf_cv_ncurses_header:-curses.h}>
9462 { const char *xx = curses_version(); return (xx == 0); }
9464 rm -f "conftest$ac_exeext"
9465 if { (eval echo "$as_me:9465: \"$ac_link\"") >&5
9466 (eval $ac_link) 2>&5
9468 echo "$as_me:9468: \$? = $ac_status" >&5
9469 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9470 { (eval echo "$as_me:9470: \"$ac_try\"") >&5
9473 echo "$as_me:9473: \$? = $ac_status" >&5
9474 (exit "$ac_status"); }; }; then
9475 cf_test_ncuconfig=yes
9477 echo "$as_me: program exited with status $ac_status" >&5
9478 echo "$as_me: failed program was:" >&5
9479 cat "conftest.$ac_ext" >&5
9480 cf_test_ncuconfig=no
9482 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9485 echo "$as_me: failed program was:" >&5
9486 cat "conftest.$ac_ext" >&5
9487 cf_test_ncuconfig=no
9489 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9491 CFLAGS="$cf_save_CFLAGS"
9492 CPPFLAGS="$cf_save_CPPFLAGS"
9493 LIBS="$cf_save_LIBS"
9495 if test "x$cf_test_ncuconfig" != xyes; then
9496 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9497 cf_pkg_cflags="$cf_temp"
9498 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9499 cf_pkg_libs="$cf_temp"
9504 for cf_add_cflags in $cf_pkg_cflags
9506 case "x$cf_add_cflags" in
9509 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9512 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'`
9513 test "$CFLAGS" != "$cf_old_cflag" || break
9515 CFLAGS="$cf_old_cflag"
9518 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9521 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'`
9522 test "$CPPFLAGS" != "$cf_old_cflag" || break
9524 CPPFLAGS="$cf_old_cflag"
9533 cf_new_extra_cppflags=
9535 for cf_add_cflags in $cf_add_cflags
9537 case "$cf_fix_cppflags" in
9539 case "$cf_add_cflags" in
9540 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9541 case "$cf_add_cflags" in
9543 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9545 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9546 && test -z "${cf_tst_cflags}" \
9547 && cf_fix_cppflags=yes
9549 if test "$cf_fix_cppflags" = yes ; then
9551 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9552 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9555 elif test "${cf_tst_cflags}" = "\"'" ; then
9557 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9558 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9568 case "$cf_add_cflags" in
9570 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9572 CPPFLAGS=`echo "$CPPFLAGS" | \
9573 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9574 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9579 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9580 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9587 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9588 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9595 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9596 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9598 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9600 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9601 && test -z "${cf_tst_cflags}" \
9602 && cf_fix_cppflags=no
9607 if test -n "$cf_new_cflags" ; then
9609 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9610 CFLAGS="${CFLAGS}$cf_new_cflags"
9614 if test -n "$cf_new_cppflags" ; then
9616 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9617 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9621 if test -n "$cf_new_extra_cppflags" ; then
9623 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9624 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9633 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9635 for cf_add_1lib in $cf_add_0lib; do
9636 for cf_add_2lib in $cf_add_libs; do
9637 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9642 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9646 cat >"conftest.$ac_ext" <<_ACEOF
9647 #line 9647 "configure"
9648 #include "confdefs.h"
9649 #include <${cf_cv_ncurses_header:-curses.h}>
9653 initscr(); mousemask(0,0); tigetstr((char *)0);
9658 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9659 if { (eval echo "$as_me:9659: \"$ac_link\"") >&5
9660 (eval $ac_link) 2>&5
9662 echo "$as_me:9662: \$? = $ac_status" >&5
9663 (exit "$ac_status"); } &&
9664 { ac_try='test -s "conftest$ac_exeext"'
9665 { (eval echo "$as_me:9665: \"$ac_try\"") >&5
9668 echo "$as_me:9668: \$? = $ac_status" >&5
9669 (exit "$ac_status"); }; }; then
9670 if test "$cross_compiling" = yes; then
9671 cf_have_ncuconfig=maybe
9673 cat >"conftest.$ac_ext" <<_ACEOF
9674 #line 9674 "configure"
9675 #include "confdefs.h"
9676 #include <${cf_cv_ncurses_header:-curses.h}>
9678 { const char *xx = curses_version(); return (xx == 0); }
9680 rm -f "conftest$ac_exeext"
9681 if { (eval echo "$as_me:9681: \"$ac_link\"") >&5
9682 (eval $ac_link) 2>&5
9684 echo "$as_me:9684: \$? = $ac_status" >&5
9685 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9686 { (eval echo "$as_me:9686: \"$ac_try\"") >&5
9689 echo "$as_me:9689: \$? = $ac_status" >&5
9690 (exit "$ac_status"); }; }; then
9691 cf_have_ncuconfig=yes
9693 echo "$as_me: program exited with status $ac_status" >&5
9694 echo "$as_me: failed program was:" >&5
9695 cat "conftest.$ac_ext" >&5
9696 cf_have_ncuconfig=no
9698 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9701 echo "$as_me: failed program was:" >&5
9702 cat "conftest.$ac_ext" >&5
9703 cf_have_ncuconfig=no
9705 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9706 echo "$as_me:9706: result: $cf_have_ncuconfig" >&5
9707 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9708 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9709 if test "$cf_have_ncuconfig" != "yes"
9711 CPPFLAGS="$cf_save_CPPFLAGS"
9712 LIBS="$cf_save_LIBS"
9713 NCURSES_CONFIG_PKG=none
9716 cat >>confdefs.h <<\EOF
9720 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9722 echo "$as_me:9722: checking for terminfo header" >&5
9723 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9724 if test "${cf_cv_term_header+set}" = set; then
9725 echo $ECHO_N "(cached) $ECHO_C" >&6
9728 case "${cf_cv_ncurses_header}" in
9729 (*/ncurses.h|*/ncursesw.h)
9730 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9733 cf_term_header=term.h
9737 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9739 cat >"conftest.$ac_ext" <<_ACEOF
9740 #line 9740 "configure"
9741 #include "confdefs.h"
9743 #include <${cf_cv_ncurses_header:-curses.h}>
9749 int x = auto_left_margin; (void)x
9754 rm -f "conftest.$ac_objext"
9755 if { (eval echo "$as_me:9755: \"$ac_compile\"") >&5
9756 (eval $ac_compile) 2>&5
9758 echo "$as_me:9758: \$? = $ac_status" >&5
9759 (exit "$ac_status"); } &&
9760 { ac_try='test -s "conftest.$ac_objext"'
9761 { (eval echo "$as_me:9761: \"$ac_try\"") >&5
9764 echo "$as_me:9764: \$? = $ac_status" >&5
9765 (exit "$ac_status"); }; }; then
9767 cf_cv_term_header="$cf_test"
9769 echo "$as_me: failed program was:" >&5
9770 cat "conftest.$ac_ext" >&5
9772 cf_cv_term_header=unknown
9775 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9776 test "$cf_cv_term_header" != unknown && break
9780 echo "$as_me:9780: result: $cf_cv_term_header" >&5
9781 echo "${ECHO_T}$cf_cv_term_header" >&6
9783 # Set definitions to allow ifdef'ing to accommodate subdirectories
9785 case "$cf_cv_term_header" in
9788 cat >>confdefs.h <<\EOF
9789 #define HAVE_TERM_H 1
9795 case "$cf_cv_term_header" in
9798 cat >>confdefs.h <<\EOF
9799 #define HAVE_NCURSES_TERM_H 1
9805 cat >>confdefs.h <<\EOF
9806 #define HAVE_NCURSESW_TERM_H 1
9815 echo "$as_me:9815: result: no" >&5
9816 echo "${ECHO_T}no" >&6
9817 NCURSES_CONFIG_PKG=none
9820 NCURSES_CONFIG_PKG=none
9823 if test "x$cf_have_ncuconfig" = "xno"; then
9824 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9826 if test -n "$ac_tool_prefix"; then
9827 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9829 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9830 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9831 echo "$as_me:9831: checking for $ac_word" >&5
9832 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9833 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9834 echo $ECHO_N "(cached) $ECHO_C" >&6
9836 if test -n "$NCURSES_CONFIG"; then
9837 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9839 ac_save_IFS=$IFS; IFS=$ac_path_separator
9841 for ac_dir in $ac_dummy; do
9843 test -z "$ac_dir" && ac_dir=.
9844 $as_executable_p "$ac_dir/$ac_word" || continue
9845 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9846 echo "$as_me:9846: found $ac_dir/$ac_word" >&5
9852 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9853 if test -n "$NCURSES_CONFIG"; then
9854 echo "$as_me:9854: result: $NCURSES_CONFIG" >&5
9855 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9857 echo "$as_me:9857: result: no" >&5
9858 echo "${ECHO_T}no" >&6
9861 test -n "$NCURSES_CONFIG" && break
9864 if test -z "$NCURSES_CONFIG"; then
9865 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9866 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9868 # Extract the first word of "$ac_prog", so it can be a program name with args.
9869 set dummy $ac_prog; ac_word=$2
9870 echo "$as_me:9870: checking for $ac_word" >&5
9871 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9872 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9873 echo $ECHO_N "(cached) $ECHO_C" >&6
9875 if test -n "$ac_ct_NCURSES_CONFIG"; then
9876 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9878 ac_save_IFS=$IFS; IFS=$ac_path_separator
9880 for ac_dir in $ac_dummy; do
9882 test -z "$ac_dir" && ac_dir=.
9883 $as_executable_p "$ac_dir/$ac_word" || continue
9884 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9885 echo "$as_me:9885: found $ac_dir/$ac_word" >&5
9891 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9892 if test -n "$ac_ct_NCURSES_CONFIG"; then
9893 echo "$as_me:9893: result: $ac_ct_NCURSES_CONFIG" >&5
9894 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9896 echo "$as_me:9896: result: no" >&5
9897 echo "${ECHO_T}no" >&6
9900 test -n "$ac_ct_NCURSES_CONFIG" && break
9902 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9904 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9907 if test "$NCURSES_CONFIG" != none ; then
9909 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9911 case "x$cf_add_cflags" in
9914 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9917 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'`
9918 test "$CFLAGS" != "$cf_old_cflag" || break
9920 CFLAGS="$cf_old_cflag"
9923 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9926 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'`
9927 test "$CPPFLAGS" != "$cf_old_cflag" || break
9929 CPPFLAGS="$cf_old_cflag"
9938 cf_new_extra_cppflags=
9940 for cf_add_cflags in $cf_add_cflags
9942 case "$cf_fix_cppflags" in
9944 case "$cf_add_cflags" in
9945 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9946 case "$cf_add_cflags" in
9948 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9950 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9951 && test -z "${cf_tst_cflags}" \
9952 && cf_fix_cppflags=yes
9954 if test "$cf_fix_cppflags" = yes ; then
9956 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9957 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9960 elif test "${cf_tst_cflags}" = "\"'" ; then
9962 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9963 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9973 case "$cf_add_cflags" in
9975 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9977 CPPFLAGS=`echo "$CPPFLAGS" | \
9978 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9979 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9984 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9985 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9992 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9993 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10000 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10001 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10003 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10005 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10006 && test -z "${cf_tst_cflags}" \
10007 && cf_fix_cppflags=no
10012 if test -n "$cf_new_cflags" ; then
10014 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10015 CFLAGS="${CFLAGS}$cf_new_cflags"
10019 if test -n "$cf_new_cppflags" ; then
10021 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10022 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10026 if test -n "$cf_new_extra_cppflags" ; then
10028 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10029 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10035 cf_add_libs="$LIBS"
10038 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10039 # filter duplicates
10040 for cf_add_1lib in $cf_add_0lib; do
10041 for cf_add_2lib in $cf_add_libs; do
10042 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10047 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10049 LIBS="$cf_add_libs"
10051 # even with config script, some packages use no-override for curses.h
10053 echo "$as_me:10053: checking if we have identified curses headers" >&5
10054 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10055 if test "${cf_cv_ncurses_header+set}" = set; then
10056 echo $ECHO_N "(cached) $ECHO_C" >&6
10059 cf_cv_ncurses_header=none
10061 ncurses.h ncurses/ncurses.h \
10062 curses.h ncurses/curses.h
10064 cat >"conftest.$ac_ext" <<_ACEOF
10065 #line 10065 "configure"
10066 #include "confdefs.h"
10067 #include <${cf_header}>
10071 initscr(); tgoto("?", 0,0)
10076 rm -f "conftest.$ac_objext"
10077 if { (eval echo "$as_me:10077: \"$ac_compile\"") >&5
10078 (eval $ac_compile) 2>&5
10080 echo "$as_me:10080: \$? = $ac_status" >&5
10081 (exit "$ac_status"); } &&
10082 { ac_try='test -s "conftest.$ac_objext"'
10083 { (eval echo "$as_me:10083: \"$ac_try\"") >&5
10084 (eval $ac_try) 2>&5
10086 echo "$as_me:10086: \$? = $ac_status" >&5
10087 (exit "$ac_status"); }; }; then
10088 cf_cv_ncurses_header=$cf_header; break
10090 echo "$as_me: failed program was:" >&5
10091 cat "conftest.$ac_ext" >&5
10093 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10097 echo "$as_me:10097: result: $cf_cv_ncurses_header" >&5
10098 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10100 if test "$cf_cv_ncurses_header" = none ; then
10101 { { echo "$as_me:10101: error: No curses header-files found" >&5
10102 echo "$as_me: error: No curses header-files found" >&2;}
10103 { (exit 1); exit 1; }; }
10106 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10108 for ac_header in $cf_cv_ncurses_header
10110 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10111 echo "$as_me:10111: checking for $ac_header" >&5
10112 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10113 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10114 echo $ECHO_N "(cached) $ECHO_C" >&6
10116 cat >"conftest.$ac_ext" <<_ACEOF
10117 #line 10117 "configure"
10118 #include "confdefs.h"
10119 #include <$ac_header>
10121 if { (eval echo "$as_me:10121: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10122 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10124 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10126 cat conftest.err >&5
10127 echo "$as_me:10127: \$? = $ac_status" >&5
10128 (exit "$ac_status"); } >/dev/null; then
10129 if test -s conftest.err; then
10130 ac_cpp_err=$ac_c_preproc_warn_flag
10137 if test -z "$ac_cpp_err"; then
10138 eval "$as_ac_Header=yes"
10140 echo "$as_me: failed program was:" >&5
10141 cat "conftest.$ac_ext" >&5
10142 eval "$as_ac_Header=no"
10144 rm -f conftest.err "conftest.$ac_ext"
10146 echo "$as_me:10146: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10147 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10148 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10149 cat >>confdefs.h <<EOF
10150 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10156 cat >>confdefs.h <<\EOF
10160 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10162 cat >>confdefs.h <<EOF
10163 #define $cf_nculib_ROOT 1
10166 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
10170 cf_ncuhdr_root=ncurses
10172 test -n "$cf_cv_curses_dir" && \
10173 test "$cf_cv_curses_dir" != "no" && { \
10175 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
10176 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
10178 while test "$cf_add_incdir" != /usr/include
10180 if test -d "$cf_add_incdir"
10183 if test -n "$CFLAGS$CPPFLAGS" ; then
10184 # a loop is needed to ensure we can add subdirs of existing dirs
10185 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10186 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10187 cf_have_incdir=yes; break
10192 if test "$cf_have_incdir" = no ; then
10193 if test "$cf_add_incdir" = /usr/local/include ; then
10194 if test "$GCC" = yes
10196 cf_save_CPPFLAGS=$CPPFLAGS
10198 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10199 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10201 cat >"conftest.$ac_ext" <<_ACEOF
10202 #line 10202 "configure"
10203 #include "confdefs.h"
10213 rm -f "conftest.$ac_objext"
10214 if { (eval echo "$as_me:10214: \"$ac_compile\"") >&5
10215 (eval $ac_compile) 2>&5
10217 echo "$as_me:10217: \$? = $ac_status" >&5
10218 (exit "$ac_status"); } &&
10219 { ac_try='test -s "conftest.$ac_objext"'
10220 { (eval echo "$as_me:10220: \"$ac_try\"") >&5
10221 (eval $ac_try) 2>&5
10223 echo "$as_me:10223: \$? = $ac_status" >&5
10224 (exit "$ac_status"); }; }; then
10227 echo "$as_me: failed program was:" >&5
10228 cat "conftest.$ac_ext" >&5
10231 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10232 CPPFLAGS=$cf_save_CPPFLAGS
10237 if test "$cf_have_incdir" = no ; then
10238 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10240 echo "${as_me:-configure}:10240: testing adding $cf_add_incdir to include-path ..." 1>&5
10242 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10244 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10245 test "$cf_top_incdir" = "$cf_add_incdir" && break
10246 cf_add_incdir="$cf_top_incdir"
10259 echo "$as_me:10259: checking for $cf_ncuhdr_root header in include-path" >&5
10260 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10261 if test "${cf_cv_ncurses_h+set}" = set; then
10262 echo $ECHO_N "(cached) $ECHO_C" >&6
10265 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10266 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
10267 for cf_header in $cf_header_list
10270 cat >"conftest.$ac_ext" <<_ACEOF
10271 #line 10271 "configure"
10272 #include "confdefs.h"
10274 #include <$cf_header>
10279 #ifdef NCURSES_VERSION
10281 printf("%s\\n", NCURSES_VERSION);
10294 rm -f "conftest.$ac_objext"
10295 if { (eval echo "$as_me:10295: \"$ac_compile\"") >&5
10296 (eval $ac_compile) 2>&5
10298 echo "$as_me:10298: \$? = $ac_status" >&5
10299 (exit "$ac_status"); } &&
10300 { ac_try='test -s "conftest.$ac_objext"'
10301 { (eval echo "$as_me:10301: \"$ac_try\"") >&5
10302 (eval $ac_try) 2>&5
10304 echo "$as_me:10304: \$? = $ac_status" >&5
10305 (exit "$ac_status"); }; }; then
10306 cf_cv_ncurses_h=$cf_header
10309 echo "$as_me: failed program was:" >&5
10310 cat "conftest.$ac_ext" >&5
10313 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10315 test "$cf_cv_ncurses_h" != no && break
10319 echo "$as_me:10319: result: $cf_cv_ncurses_h" >&5
10320 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10322 if test "$cf_cv_ncurses_h" != no ; then
10323 cf_cv_ncurses_header=$cf_cv_ncurses_h
10326 echo "$as_me:10326: checking for $cf_ncuhdr_root include-path" >&5
10327 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10328 if test "${cf_cv_ncurses_h2+set}" = set; then
10329 echo $ECHO_N "(cached) $ECHO_C" >&6
10332 test -n "$verbose" && echo
10336 # collect the current set of include-directories from compiler flags
10337 cf_header_path_list=""
10338 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10339 for cf_header_path in $CPPFLAGS $CFLAGS
10341 case "$cf_header_path" in
10343 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10345 test "x$cf_header_path" != "xNONE" && \
10346 test -d "$cf_header_path" && \
10348 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10349 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
10350 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10351 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10352 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10353 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"
10356 cf_header_path_list="$cf_header_path_list $cf_search"
10362 # add the variations for the package we are looking for
10366 test "x$prefix" != "xNONE" && \
10367 test -d "$prefix" && \
10369 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10370 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
10371 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10372 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10373 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10374 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10377 for cf_subdir_prefix in \
10386 test "x$cf_subdir_prefix" != "x$prefix" && \
10387 test -d "$cf_subdir_prefix" && \
10388 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10389 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10390 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
10391 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10392 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10393 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10394 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"
10399 test "$includedir" != NONE && \
10400 test "$includedir" != "/usr/include" && \
10401 test -d "$includedir" && {
10402 test -d "$includedir" && cf_search="$cf_search $includedir"
10403 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10406 test "$oldincludedir" != NONE && \
10407 test "$oldincludedir" != "/usr/include" && \
10408 test -d "$oldincludedir" && {
10409 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
10410 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10413 cf_search="$cf_search $cf_header_path_list"
10415 test -n "$verbose" && echo "search path $cf_search"
10416 cf_save2_CPPFLAGS="$CPPFLAGS"
10417 for cf_incdir in $cf_search
10420 if test -n "$cf_incdir" ; then
10421 for cf_add_incdir in $cf_incdir
10423 while test "$cf_add_incdir" != /usr/include
10425 if test -d "$cf_add_incdir"
10428 if test -n "$CFLAGS$CPPFLAGS" ; then
10429 # a loop is needed to ensure we can add subdirs of existing dirs
10430 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10431 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10432 cf_have_incdir=yes; break
10437 if test "$cf_have_incdir" = no ; then
10438 if test "$cf_add_incdir" = /usr/local/include ; then
10439 if test "$GCC" = yes
10441 cf_save_CPPFLAGS=$CPPFLAGS
10443 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10444 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10446 cat >"conftest.$ac_ext" <<_ACEOF
10447 #line 10447 "configure"
10448 #include "confdefs.h"
10458 rm -f "conftest.$ac_objext"
10459 if { (eval echo "$as_me:10459: \"$ac_compile\"") >&5
10460 (eval $ac_compile) 2>&5
10462 echo "$as_me:10462: \$? = $ac_status" >&5
10463 (exit "$ac_status"); } &&
10464 { ac_try='test -s "conftest.$ac_objext"'
10465 { (eval echo "$as_me:10465: \"$ac_try\"") >&5
10466 (eval $ac_try) 2>&5
10468 echo "$as_me:10468: \$? = $ac_status" >&5
10469 (exit "$ac_status"); }; }; then
10472 echo "$as_me: failed program was:" >&5
10473 cat "conftest.$ac_ext" >&5
10476 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10477 CPPFLAGS=$cf_save_CPPFLAGS
10482 if test "$cf_have_incdir" = no ; then
10483 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10485 echo "${as_me:-configure}:10485: testing adding $cf_add_incdir to include-path ..." 1>&5
10487 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10489 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10490 test "$cf_top_incdir" = "$cf_add_incdir" && break
10491 cf_add_incdir="$cf_top_incdir"
10507 cat >"conftest.$ac_ext" <<_ACEOF
10508 #line 10508 "configure"
10509 #include "confdefs.h"
10511 #include <$cf_header>
10516 #ifdef NCURSES_VERSION
10518 printf("%s\\n", NCURSES_VERSION);
10531 rm -f "conftest.$ac_objext"
10532 if { (eval echo "$as_me:10532: \"$ac_compile\"") >&5
10533 (eval $ac_compile) 2>&5
10535 echo "$as_me:10535: \$? = $ac_status" >&5
10536 (exit "$ac_status"); } &&
10537 { ac_try='test -s "conftest.$ac_objext"'
10538 { (eval echo "$as_me:10538: \"$ac_try\"") >&5
10539 (eval $ac_try) 2>&5
10541 echo "$as_me:10541: \$? = $ac_status" >&5
10542 (exit "$ac_status"); }; }; then
10543 cf_cv_ncurses_h2=$cf_header
10546 echo "$as_me: failed program was:" >&5
10547 cat "conftest.$ac_ext" >&5
10548 cf_cv_ncurses_h2=no
10550 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10552 if test "$cf_cv_ncurses_h2" != no ; then
10553 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10554 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
10557 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10559 CPPFLAGS="$cf_save2_CPPFLAGS"
10560 test "$cf_cv_ncurses_h2" != no && break
10562 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10562: error: not found" >&5
10563 echo "$as_me: error: not found" >&2;}
10564 { (exit 1); exit 1; }; }
10567 echo "$as_me:10567: result: $cf_cv_ncurses_h2" >&5
10568 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10570 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
10571 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
10572 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
10573 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
10576 if test -n "$cf_1st_incdir" ; then
10577 for cf_add_incdir in $cf_1st_incdir
10579 while test "$cf_add_incdir" != /usr/include
10581 if test -d "$cf_add_incdir"
10584 if test -n "$CFLAGS$CPPFLAGS" ; then
10585 # a loop is needed to ensure we can add subdirs of existing dirs
10586 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10587 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10588 cf_have_incdir=yes; break
10593 if test "$cf_have_incdir" = no ; then
10594 if test "$cf_add_incdir" = /usr/local/include ; then
10595 if test "$GCC" = yes
10597 cf_save_CPPFLAGS=$CPPFLAGS
10599 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10600 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10602 cat >"conftest.$ac_ext" <<_ACEOF
10603 #line 10603 "configure"
10604 #include "confdefs.h"
10614 rm -f "conftest.$ac_objext"
10615 if { (eval echo "$as_me:10615: \"$ac_compile\"") >&5
10616 (eval $ac_compile) 2>&5
10618 echo "$as_me:10618: \$? = $ac_status" >&5
10619 (exit "$ac_status"); } &&
10620 { ac_try='test -s "conftest.$ac_objext"'
10621 { (eval echo "$as_me:10621: \"$ac_try\"") >&5
10622 (eval $ac_try) 2>&5
10624 echo "$as_me:10624: \$? = $ac_status" >&5
10625 (exit "$ac_status"); }; }; then
10628 echo "$as_me: failed program was:" >&5
10629 cat "conftest.$ac_ext" >&5
10632 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10633 CPPFLAGS=$cf_save_CPPFLAGS
10638 if test "$cf_have_incdir" = no ; then
10639 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10641 echo "${as_me:-configure}:10641: testing adding $cf_add_incdir to include-path ..." 1>&5
10643 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10645 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10646 test "$cf_top_incdir" = "$cf_add_incdir" && break
10647 cf_add_incdir="$cf_top_incdir"
10660 # Set definitions to allow ifdef'ing for ncurses.h
10662 case "$cf_cv_ncurses_header" in
10665 cat >>confdefs.h <<\EOF
10666 #define HAVE_NCURSES_H 1
10672 case "$cf_cv_ncurses_header" in
10673 (ncurses/curses.h|ncurses/ncurses.h)
10675 cat >>confdefs.h <<\EOF
10676 #define HAVE_NCURSES_NCURSES_H 1
10680 (ncursesw/curses.h|ncursesw/ncurses.h)
10682 cat >>confdefs.h <<\EOF
10683 #define HAVE_NCURSESW_NCURSES_H 1
10689 echo "$as_me:10689: checking for terminfo header" >&5
10690 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10691 if test "${cf_cv_term_header+set}" = set; then
10692 echo $ECHO_N "(cached) $ECHO_C" >&6
10695 case "${cf_cv_ncurses_header}" in
10696 (*/ncurses.h|*/ncursesw.h)
10697 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10700 cf_term_header=term.h
10704 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10706 cat >"conftest.$ac_ext" <<_ACEOF
10707 #line 10707 "configure"
10708 #include "confdefs.h"
10710 #include <${cf_cv_ncurses_header:-curses.h}>
10711 #include <$cf_test>
10716 int x = auto_left_margin; (void)x
10721 rm -f "conftest.$ac_objext"
10722 if { (eval echo "$as_me:10722: \"$ac_compile\"") >&5
10723 (eval $ac_compile) 2>&5
10725 echo "$as_me:10725: \$? = $ac_status" >&5
10726 (exit "$ac_status"); } &&
10727 { ac_try='test -s "conftest.$ac_objext"'
10728 { (eval echo "$as_me:10728: \"$ac_try\"") >&5
10729 (eval $ac_try) 2>&5
10731 echo "$as_me:10731: \$? = $ac_status" >&5
10732 (exit "$ac_status"); }; }; then
10734 cf_cv_term_header="$cf_test"
10736 echo "$as_me: failed program was:" >&5
10737 cat "conftest.$ac_ext" >&5
10739 cf_cv_term_header=unknown
10742 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10743 test "$cf_cv_term_header" != unknown && break
10747 echo "$as_me:10747: result: $cf_cv_term_header" >&5
10748 echo "${ECHO_T}$cf_cv_term_header" >&6
10750 # Set definitions to allow ifdef'ing to accommodate subdirectories
10752 case "$cf_cv_term_header" in
10755 cat >>confdefs.h <<\EOF
10756 #define HAVE_TERM_H 1
10762 case "$cf_cv_term_header" in
10765 cat >>confdefs.h <<\EOF
10766 #define HAVE_NCURSES_TERM_H 1
10772 cat >>confdefs.h <<\EOF
10773 #define HAVE_NCURSESW_TERM_H 1
10779 # some applications need this, but should check for NCURSES_VERSION
10781 cat >>confdefs.h <<\EOF
10785 echo "$as_me:10785: checking for ncurses version" >&5
10786 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10787 if test "${cf_cv_ncurses_version+set}" = set; then
10788 echo $ECHO_N "(cached) $ECHO_C" >&6
10791 cf_cv_ncurses_version=no
10793 rm -f "$cf_tempfile"
10794 if test "$cross_compiling" = yes; then
10796 # This will not work if the preprocessor splits the line after the
10797 # Autoconf token. The 'unproto' program does that.
10798 cat > "conftest.$ac_ext" <<EOF
10799 #include <${cf_cv_ncurses_header:-curses.h}>
10801 #ifdef NCURSES_VERSION
10802 Autoconf NCURSES_VERSION
10810 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10811 { (eval echo "$as_me:10811: \"$cf_try\"") >&5
10812 (eval $cf_try) 2>&5
10814 echo "$as_me:10814: \$? = $ac_status" >&5
10815 (exit "$ac_status"); }
10816 if test -f conftest.out ; then
10817 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
10818 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10823 cat >"conftest.$ac_ext" <<_ACEOF
10824 #line 10824 "configure"
10825 #include "confdefs.h"
10827 #include <${cf_cv_ncurses_header:-curses.h}>
10831 FILE *fp = fopen("$cf_tempfile", "w");
10832 #ifdef NCURSES_VERSION
10833 # ifdef NCURSES_VERSION_PATCH
10834 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10836 fprintf(fp, "%s\\n", NCURSES_VERSION);
10839 # ifdef __NCURSES_H
10840 fprintf(fp, "old\\n");
10845 ${cf_cv_main_return:-return}(0);
10848 rm -f "conftest$ac_exeext"
10849 if { (eval echo "$as_me:10849: \"$ac_link\"") >&5
10850 (eval $ac_link) 2>&5
10852 echo "$as_me:10852: \$? = $ac_status" >&5
10853 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10854 { (eval echo "$as_me:10854: \"$ac_try\"") >&5
10855 (eval $ac_try) 2>&5
10857 echo "$as_me:10857: \$? = $ac_status" >&5
10858 (exit "$ac_status"); }; }; then
10860 cf_cv_ncurses_version=`cat $cf_tempfile`
10862 echo "$as_me: program exited with status $ac_status" >&5
10863 echo "$as_me: failed program was:" >&5
10864 cat "conftest.$ac_ext" >&5
10866 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10868 rm -f "$cf_tempfile"
10871 echo "$as_me:10871: result: $cf_cv_ncurses_version" >&5
10872 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10873 test "$cf_cv_ncurses_version" = no ||
10874 cat >>confdefs.h <<\EOF
10878 cf_nculib_root=ncurses
10879 # This works, except for the special case where we find gpm, but
10880 # ncurses is in a nonstandard location via $LIBS, and we really want
10883 cf_ncurses_SAVE="$LIBS"
10884 echo "$as_me:10884: checking for Gpm_Open in -lgpm" >&5
10885 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10886 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10887 echo $ECHO_N "(cached) $ECHO_C" >&6
10889 ac_check_lib_save_LIBS=$LIBS
10891 cat >"conftest.$ac_ext" <<_ACEOF
10892 #line 10892 "configure"
10893 #include "confdefs.h"
10895 /* Override any gcc2 internal prototype to avoid an error. */
10899 /* We use char because int might match the return type of a gcc2
10900 builtin and then its argument prototype would still apply. */
10910 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10911 if { (eval echo "$as_me:10911: \"$ac_link\"") >&5
10912 (eval $ac_link) 2>&5
10914 echo "$as_me:10914: \$? = $ac_status" >&5
10915 (exit "$ac_status"); } &&
10916 { ac_try='test -s "conftest$ac_exeext"'
10917 { (eval echo "$as_me:10917: \"$ac_try\"") >&5
10918 (eval $ac_try) 2>&5
10920 echo "$as_me:10920: \$? = $ac_status" >&5
10921 (exit "$ac_status"); }; }; then
10922 ac_cv_lib_gpm_Gpm_Open=yes
10924 echo "$as_me: failed program was:" >&5
10925 cat "conftest.$ac_ext" >&5
10926 ac_cv_lib_gpm_Gpm_Open=no
10928 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10929 LIBS=$ac_check_lib_save_LIBS
10931 echo "$as_me:10931: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10932 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
10933 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
10934 echo "$as_me:10934: checking for initscr in -lgpm" >&5
10935 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
10936 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
10937 echo $ECHO_N "(cached) $ECHO_C" >&6
10939 ac_check_lib_save_LIBS=$LIBS
10941 cat >"conftest.$ac_ext" <<_ACEOF
10942 #line 10942 "configure"
10943 #include "confdefs.h"
10945 /* Override any gcc2 internal prototype to avoid an error. */
10949 /* We use char because int might match the return type of a gcc2
10950 builtin and then its argument prototype would still apply. */
10960 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10961 if { (eval echo "$as_me:10961: \"$ac_link\"") >&5
10962 (eval $ac_link) 2>&5
10964 echo "$as_me:10964: \$? = $ac_status" >&5
10965 (exit "$ac_status"); } &&
10966 { ac_try='test -s "conftest$ac_exeext"'
10967 { (eval echo "$as_me:10967: \"$ac_try\"") >&5
10968 (eval $ac_try) 2>&5
10970 echo "$as_me:10970: \$? = $ac_status" >&5
10971 (exit "$ac_status"); }; }; then
10972 ac_cv_lib_gpm_initscr=yes
10974 echo "$as_me: failed program was:" >&5
10975 cat "conftest.$ac_ext" >&5
10976 ac_cv_lib_gpm_initscr=no
10978 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10979 LIBS=$ac_check_lib_save_LIBS
10981 echo "$as_me:10981: result: $ac_cv_lib_gpm_initscr" >&5
10982 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
10983 if test "$ac_cv_lib_gpm_initscr" = yes; then
10984 LIBS="$cf_ncurses_SAVE"
10986 cf_ncurses_LIBS="-lgpm"
10993 # This is only necessary if you are linking against an obsolete
10994 # version of ncurses (but it should do no harm, since it is static).
10995 if test "$cf_nculib_root" = ncurses ; then
10996 echo "$as_me:10996: checking for tgoto in -lmytinfo" >&5
10997 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
10998 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
10999 echo $ECHO_N "(cached) $ECHO_C" >&6
11001 ac_check_lib_save_LIBS=$LIBS
11002 LIBS="-lmytinfo $LIBS"
11003 cat >"conftest.$ac_ext" <<_ACEOF
11004 #line 11004 "configure"
11005 #include "confdefs.h"
11007 /* Override any gcc2 internal prototype to avoid an error. */
11011 /* We use char because int might match the return type of a gcc2
11012 builtin and then its argument prototype would still apply. */
11022 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11023 if { (eval echo "$as_me:11023: \"$ac_link\"") >&5
11024 (eval $ac_link) 2>&5
11026 echo "$as_me:11026: \$? = $ac_status" >&5
11027 (exit "$ac_status"); } &&
11028 { ac_try='test -s "conftest$ac_exeext"'
11029 { (eval echo "$as_me:11029: \"$ac_try\"") >&5
11030 (eval $ac_try) 2>&5
11032 echo "$as_me:11032: \$? = $ac_status" >&5
11033 (exit "$ac_status"); }; }; then
11034 ac_cv_lib_mytinfo_tgoto=yes
11036 echo "$as_me: failed program was:" >&5
11037 cat "conftest.$ac_ext" >&5
11038 ac_cv_lib_mytinfo_tgoto=no
11040 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11041 LIBS=$ac_check_lib_save_LIBS
11043 echo "$as_me:11043: result: $ac_cv_lib_mytinfo_tgoto" >&5
11044 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11045 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
11046 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
11053 cf_add_libs="$LIBS"
11056 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11057 # filter duplicates
11058 for cf_add_1lib in $cf_add_0lib; do
11059 for cf_add_2lib in $cf_add_libs; do
11060 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11065 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11067 LIBS="$cf_add_libs"
11069 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
11072 cf_add_libs="$LIBS"
11075 for cf_add_1lib in -l$cf_nculib_root; 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"
11090 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
11092 echo "$as_me:11092: checking for initscr" >&5
11093 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
11094 if test "${ac_cv_func_initscr+set}" = set; then
11095 echo $ECHO_N "(cached) $ECHO_C" >&6
11097 cat >"conftest.$ac_ext" <<_ACEOF
11098 #line 11098 "configure"
11099 #include "confdefs.h"
11100 #define initscr autoconf_temporary
11101 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11108 /* We use char because int might match the return type of a gcc2
11109 builtin and then its argument prototype would still apply. */
11110 char initscr (void);
11116 /* The GNU C library defines stubs for functions which it implements
11117 to always fail with ENOSYS. Some functions are actually named
11118 something starting with __ and the normal name is an alias. */
11119 #if defined (__stub_initscr) || defined (__stub___initscr)
11120 #error found stub for initscr
11128 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11129 if { (eval echo "$as_me:11129: \"$ac_link\"") >&5
11130 (eval $ac_link) 2>&5
11132 echo "$as_me:11132: \$? = $ac_status" >&5
11133 (exit "$ac_status"); } &&
11134 { ac_try='test -s "conftest$ac_exeext"'
11135 { (eval echo "$as_me:11135: \"$ac_try\"") >&5
11136 (eval $ac_try) 2>&5
11138 echo "$as_me:11138: \$? = $ac_status" >&5
11139 (exit "$ac_status"); }; }; then
11140 ac_cv_func_initscr=yes
11142 echo "$as_me: failed program was:" >&5
11143 cat "conftest.$ac_ext" >&5
11144 ac_cv_func_initscr=no
11146 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11148 echo "$as_me:11148: result: $ac_cv_func_initscr" >&5
11149 echo "${ECHO_T}$ac_cv_func_initscr" >&6
11150 if test "$ac_cv_func_initscr" = yes; then
11151 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11154 cf_save_LIBS="$LIBS"
11155 echo "$as_me:11155: checking for initscr in -l$cf_nculib_root" >&5
11156 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
11157 LIBS="-l$cf_nculib_root $LIBS"
11158 cat >"conftest.$ac_ext" <<_ACEOF
11159 #line 11159 "configure"
11160 #include "confdefs.h"
11161 #include <${cf_cv_ncurses_header:-curses.h}>
11170 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11171 if { (eval echo "$as_me:11171: \"$ac_link\"") >&5
11172 (eval $ac_link) 2>&5
11174 echo "$as_me:11174: \$? = $ac_status" >&5
11175 (exit "$ac_status"); } &&
11176 { ac_try='test -s "conftest$ac_exeext"'
11177 { (eval echo "$as_me:11177: \"$ac_try\"") >&5
11178 (eval $ac_try) 2>&5
11180 echo "$as_me:11180: \$? = $ac_status" >&5
11181 (exit "$ac_status"); }; }; then
11182 echo "$as_me:11182: result: yes" >&5
11183 echo "${ECHO_T}yes" >&6
11184 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11187 echo "$as_me: failed program was:" >&5
11188 cat "conftest.$ac_ext" >&5
11189 echo "$as_me:11189: result: no" >&5
11190 echo "${ECHO_T}no" >&6
11193 cf_library_path_list=""
11194 if test -n "${LDFLAGS}${LIBS}" ; then
11195 for cf_library_path in $LDFLAGS $LIBS
11197 case "$cf_library_path" in
11199 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11201 test "x$cf_library_path" != "xNONE" && \
11202 test -d "$cf_library_path" && \
11204 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11205 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
11206 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11207 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11208 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11209 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"
11212 cf_library_path_list="$cf_library_path_list $cf_search"
11220 test "x$prefix" != "xNONE" && \
11221 test -d "$prefix" && \
11223 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11224 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
11225 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11226 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11227 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11228 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11231 for cf_subdir_prefix in \
11240 test "x$cf_subdir_prefix" != "x$prefix" && \
11241 test -d "$cf_subdir_prefix" && \
11242 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11243 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11244 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
11245 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11246 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11247 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11248 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"
11253 cf_search="$cf_library_path_list $cf_search"
11255 for cf_libdir in $cf_search
11257 echo "$as_me:11257: checking for -l$cf_nculib_root in $cf_libdir" >&5
11258 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11259 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11260 cat >"conftest.$ac_ext" <<_ACEOF
11261 #line 11261 "configure"
11262 #include "confdefs.h"
11263 #include <${cf_cv_ncurses_header:-curses.h}>
11272 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11273 if { (eval echo "$as_me:11273: \"$ac_link\"") >&5
11274 (eval $ac_link) 2>&5
11276 echo "$as_me:11276: \$? = $ac_status" >&5
11277 (exit "$ac_status"); } &&
11278 { ac_try='test -s "conftest$ac_exeext"'
11279 { (eval echo "$as_me:11279: \"$ac_try\"") >&5
11280 (eval $ac_try) 2>&5
11282 echo "$as_me:11282: \$? = $ac_status" >&5
11283 (exit "$ac_status"); }; }; then
11284 echo "$as_me:11284: result: yes" >&5
11285 echo "${ECHO_T}yes" >&6
11286 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11289 echo "$as_me: failed program was:" >&5
11290 cat "conftest.$ac_ext" >&5
11291 echo "$as_me:11291: result: no" >&5
11292 echo "${ECHO_T}no" >&6
11293 LIBS="$cf_save_LIBS"
11295 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11299 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11303 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
11305 if test "$cf_found_library" = no ; then
11306 { { echo "$as_me:11306: error: Cannot link $cf_nculib_root library" >&5
11307 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11308 { (exit 1); exit 1; }; }
11313 if test -n "$cf_ncurses_LIBS" ; then
11314 echo "$as_me:11314: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11315 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11316 cf_ncurses_SAVE="$LIBS"
11317 for p in $cf_ncurses_LIBS ; do
11318 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
11319 if test "$q" != "$LIBS" ; then
11323 cat >"conftest.$ac_ext" <<_ACEOF
11324 #line 11324 "configure"
11325 #include "confdefs.h"
11326 #include <${cf_cv_ncurses_header:-curses.h}>
11330 initscr(); mousemask(0,0); tigetstr((char *)0);
11335 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11336 if { (eval echo "$as_me:11336: \"$ac_link\"") >&5
11337 (eval $ac_link) 2>&5
11339 echo "$as_me:11339: \$? = $ac_status" >&5
11340 (exit "$ac_status"); } &&
11341 { ac_try='test -s "conftest$ac_exeext"'
11342 { (eval echo "$as_me:11342: \"$ac_try\"") >&5
11343 (eval $ac_try) 2>&5
11345 echo "$as_me:11345: \$? = $ac_status" >&5
11346 (exit "$ac_status"); }; }; then
11347 echo "$as_me:11347: result: yes" >&5
11348 echo "${ECHO_T}yes" >&6
11350 echo "$as_me: failed program was:" >&5
11351 cat "conftest.$ac_ext" >&5
11352 echo "$as_me:11352: result: no" >&5
11353 echo "${ECHO_T}no" >&6
11354 LIBS="$cf_ncurses_SAVE"
11356 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11359 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11361 cat >>confdefs.h <<EOF
11362 #define $cf_nculib_ROOT 1
11367 NCURSES_CONFIG=none
11372 if test "$NCURSES_CONFIG_PKG" != none ; then
11373 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
11375 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11376 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11377 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11379 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
11380 if test -z "$cf_cv_abi_version"
11382 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
11385 elif test "$NCURSES_CONFIG" != none ; then
11387 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
11389 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11390 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11391 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11393 # ABI version is not available from headers
11394 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
11398 for cf_name in MAJOR MINOR PATCH
11400 cat >conftest.$ac_ext <<CF_EOF
11401 #include <${cf_cv_ncurses_header:-curses.h}>
11402 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
11404 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
11405 { (eval echo "$as_me:11405: \"$cf_try\"") >&5
11406 (eval $cf_try) 2>&5
11408 echo "$as_me:11408: \$? = $ac_status" >&5
11409 (exit "$ac_status"); }
11410 if test -f conftest.out ; then
11411 cf_result=`sed -e "s/^.*AUTOCONF_${cf_name}[ ][ ]*//" conftest.out`
11412 eval NCURSES_$cf_name=\"$cf_result\"
11413 # cat conftest.$ac_ext
11418 cf_cv_abi_version=${NCURSES_MAJOR}
11422 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
11424 cf_cv_timestamp=`date`
11426 echo "$as_me:11426: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
11427 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
11429 echo "$as_me:11429: checking if you want to have a library-prefix" >&5
11430 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
11432 # Check whether --with-lib-prefix or --without-lib-prefix was given.
11433 if test "${with_lib_prefix+set}" = set; then
11434 withval="$with_lib_prefix"
11435 with_lib_prefix=$withval
11437 with_lib_prefix=auto
11439 echo "$as_me:11439: result: $with_lib_prefix" >&5
11440 echo "${ECHO_T}$with_lib_prefix" >&6
11442 if test "$with_lib_prefix" = auto
11445 case "$cf_cv_system_name" in
11447 if test "$DFT_LWR_MODEL" = libtool; then
11456 (*) LIB_PREFIX='lib'
11459 cf_prefix=$LIB_PREFIX
11461 elif test "$with_lib_prefix" = no
11465 LIB_PREFIX=$with_lib_prefix
11470 ###############################################################################
11472 if test X"$CC_G_OPT" = X"" ; then
11474 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
11477 echo "$as_me:11477: checking for default loader flags" >&5
11478 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
11479 case $DFT_LWR_MODEL in
11480 (normal) LD_MODEL='' ;;
11481 (debug) LD_MODEL=$CC_G_OPT ;;
11482 (profile) LD_MODEL='-pg';;
11483 (shared) LD_MODEL='' ;;
11485 echo "$as_me:11485: result: $LD_MODEL" >&5
11486 echo "${ECHO_T}$LD_MODEL" >&6
11489 if test "x$cf_cv_enable_rpath" != xno
11491 echo "$as_me:11491: checking for an rpath option" >&5
11492 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
11493 case "$cf_cv_system_name" in
11495 if test "$GCC" = yes; then
11496 LD_RPATH_OPT="-Wl,-rpath,"
11498 LD_RPATH_OPT="-rpath "
11501 (linux*|gnu*|k*bsd*-gnu|freebsd*)
11502 LD_RPATH_OPT="-Wl,-rpath,"
11504 (openbsd[2-9].*|mirbsd*)
11505 LD_RPATH_OPT="-Wl,-rpath,"
11508 LD_RPATH_OPT="-rpath "
11511 LD_RPATH_OPT="-Wl,-rpath,"
11514 LD_RPATH_OPT="-rpath "
11522 echo "$as_me:11522: result: $LD_RPATH_OPT" >&5
11523 echo "${ECHO_T}$LD_RPATH_OPT" >&6
11525 case "x$LD_RPATH_OPT" in
11527 echo "$as_me:11527: checking if we need a space after rpath option" >&5
11528 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
11529 cf_save_LIBS="$LIBS"
11531 cf_add_libs="$LIBS"
11534 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11535 # filter duplicates
11536 for cf_add_1lib in $cf_add_0lib; do
11537 for cf_add_2lib in $cf_add_libs; do
11538 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11543 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11545 LIBS="$cf_add_libs"
11547 cat >"conftest.$ac_ext" <<_ACEOF
11548 #line 11548 "configure"
11549 #include "confdefs.h"
11559 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11560 if { (eval echo "$as_me:11560: \"$ac_link\"") >&5
11561 (eval $ac_link) 2>&5
11563 echo "$as_me:11563: \$? = $ac_status" >&5
11564 (exit "$ac_status"); } &&
11565 { ac_try='test -s "conftest$ac_exeext"'
11566 { (eval echo "$as_me:11566: \"$ac_try\"") >&5
11567 (eval $ac_try) 2>&5
11569 echo "$as_me:11569: \$? = $ac_status" >&5
11570 (exit "$ac_status"); }; }; then
11573 echo "$as_me: failed program was:" >&5
11574 cat "conftest.$ac_ext" >&5
11577 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11578 LIBS="$cf_save_LIBS"
11579 echo "$as_me:11579: result: $cf_rpath_space" >&5
11580 echo "${ECHO_T}$cf_rpath_space" >&6
11581 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
11590 INSTALL_LIB="-m 644"
11591 : ${rel_builddir:=.}
11597 cf_cv_do_symlinks=no
11599 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
11601 echo "$as_me:11601: checking if release/abi version should be used for shared libs" >&5
11602 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
11604 # Check whether --with-shlib-version or --without-shlib-version was given.
11605 if test "${with_shlib_version+set}" = set; then
11606 withval="$with_shlib_version"
11607 test -z "$withval" && withval=auto
11610 cf_cv_shlib_version=auto
11613 cf_cv_shlib_version=$withval
11616 echo "$as_me:11616: result: $withval" >&5
11617 echo "${ECHO_T}$withval" >&6
11618 { { echo "$as_me:11618: error: option value must be one of: rel, abi, or auto" >&5
11619 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
11620 { (exit 1); exit 1; }; }
11625 cf_cv_shlib_version=auto
11627 echo "$as_me:11627: result: $cf_cv_shlib_version" >&5
11628 echo "${ECHO_T}$cf_cv_shlib_version" >&6
11630 cf_cv_rm_so_locs=no
11633 # Some less-capable ports of gcc support only -fpic
11637 if test "$GCC" = yes
11641 case "$cf_cv_system_name" in
11642 (*linux*) # e.g., PGI compiler
11648 if test "$cf_try_fPIC" = yes
11650 echo "$as_me:11650: checking which $CC option to use" >&5
11651 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
11652 cf_save_CFLAGS="$CFLAGS"
11653 for CC_SHARED_OPTS in -fPIC -fpic ''
11655 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
11656 cat >"conftest.$ac_ext" <<_ACEOF
11657 #line 11657 "configure"
11658 #include "confdefs.h"
11668 rm -f "conftest.$ac_objext"
11669 if { (eval echo "$as_me:11669: \"$ac_compile\"") >&5
11670 (eval $ac_compile) 2>&5
11672 echo "$as_me:11672: \$? = $ac_status" >&5
11673 (exit "$ac_status"); } &&
11674 { ac_try='test -s "conftest.$ac_objext"'
11675 { (eval echo "$as_me:11675: \"$ac_try\"") >&5
11676 (eval $ac_try) 2>&5
11678 echo "$as_me:11678: \$? = $ac_status" >&5
11679 (exit "$ac_status"); }; }; then
11682 echo "$as_me: failed program was:" >&5
11683 cat "conftest.$ac_ext" >&5
11685 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11687 echo "$as_me:11687: result: $CC_SHARED_OPTS" >&5
11688 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
11689 CFLAGS="$cf_save_CFLAGS"
11692 cf_cv_shlib_version_infix=no
11694 case "$cf_cv_system_name" in
11695 (aix4.3-9*|aix[5-7]*)
11696 if test "$GCC" = yes; then
11697 CC_SHARED_OPTS='-Wl,-brtl'
11698 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11700 CC_SHARED_OPTS='-brtl'
11701 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
11702 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11706 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
11710 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11711 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11712 cf_cv_shlib_version=cygdll
11713 cf_cv_shlib_version_infix=cygdll
11716 cat >mk_shared_lib.sh <<-CF_EOF
11719 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11722 Linking shared library
11723 ** SHARED_LIB \$SHARED_LIB
11724 ** IMPORT_LIB \$IMPORT_LIB
11726 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11728 chmod +x mk_shared_lib.sh
11732 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11733 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11734 cf_cv_shlib_version=msysdll
11735 cf_cv_shlib_version_infix=msysdll
11738 cat >mk_shared_lib.sh <<-CF_EOF
11741 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11744 Linking shared library
11745 ** SHARED_LIB \$SHARED_LIB
11746 ** IMPORT_LIB \$IMPORT_LIB
11748 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11750 chmod +x mk_shared_lib.sh
11753 cf_try_cflags="no-cpp-precomp"
11754 CC_SHARED_OPTS="-dynamic"
11755 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
11756 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
11757 cf_cv_shlib_version_infix=yes
11758 echo "$as_me:11758: checking if ld -search_paths_first works" >&5
11759 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
11760 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
11761 echo $ECHO_N "(cached) $ECHO_C" >&6
11764 cf_save_LDFLAGS=$LDFLAGS
11765 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11766 cat >"conftest.$ac_ext" <<_ACEOF
11767 #line 11767 "configure"
11768 #include "confdefs.h"
11778 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11779 if { (eval echo "$as_me:11779: \"$ac_link\"") >&5
11780 (eval $ac_link) 2>&5
11782 echo "$as_me:11782: \$? = $ac_status" >&5
11783 (exit "$ac_status"); } &&
11784 { ac_try='test -s "conftest$ac_exeext"'
11785 { (eval echo "$as_me:11785: \"$ac_try\"") >&5
11786 (eval $ac_try) 2>&5
11788 echo "$as_me:11788: \$? = $ac_status" >&5
11789 (exit "$ac_status"); }; }; then
11790 cf_cv_ldflags_search_paths_first=yes
11792 echo "$as_me: failed program was:" >&5
11793 cat "conftest.$ac_ext" >&5
11794 cf_cv_ldflags_search_paths_first=no
11796 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11797 LDFLAGS=$cf_save_LDFLAGS
11799 echo "$as_me:11799: result: $cf_cv_ldflags_search_paths_first" >&5
11800 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
11801 if test "$cf_cv_ldflags_search_paths_first" = yes; then
11802 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11807 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11808 if test "$cf_cv_shlib_version" = rel; then
11809 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11811 cf_cv_shared_soname='`basename $@`'
11814 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11817 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
11818 if test "$GCC" != yes; then
11819 CC_SHARED_OPTS='+Z'
11821 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
11822 INSTALL_LIB="-m 555"
11825 # (tested with gcc 2.7.2 -- I don't have c89)
11826 if test "$GCC" = yes; then
11827 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
11829 CC_SHARED_OPTS='+Z'
11830 LD_SHARED_OPTS='-Wl,+b,${libdir}'
11832 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
11833 # HP-UX shared libraries must be executable, and should be
11834 # readonly to exploit a quirk in the memory manager.
11835 INSTALL_LIB="-m 555"
11838 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11839 if test "$cf_cv_shlib_version" = rel; then
11840 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11842 cf_shared_soname='`basename $@`'
11845 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
11848 if test "$cf_cv_enable_rpath" = yes ; then
11849 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11851 # tested with IRIX 5.2 and 'cc'.
11852 if test "$GCC" != yes; then
11853 CC_SHARED_OPTS='-KPIC'
11854 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
11856 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
11858 cf_cv_rm_so_locs=yes
11860 (linux*|gnu*|k*bsd*-gnu)
11861 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11862 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11863 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11865 if test "$cf_cv_enable_rpath" = yes ; then
11866 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11869 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11870 if test "$cf_cv_shlib_version" = rel; then
11871 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11873 cf_cv_shared_soname='`basename $@`'
11876 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11879 cf_cv_shlib_version=msvcdll
11880 cf_cv_shlib_version_infix=msvcdll
11883 if test "$DFT_LWR_MODEL" = "shared" ; then
11884 LOCAL_LDFLAGS="-link -dll"
11885 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11886 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
11889 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
11890 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
11891 cat >mk_shared_lib.sh <<-CF_EOF
11894 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
11899 Linking shared library
11900 ** SHARED LIB \$SHARED_LIB
11901 ** IMPORT_LIB \$IMPORT_LIB
11903 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
11904 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
11905 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
11907 chmod +x mk_shared_lib.sh
11908 cat >mk_prog.sh <<-CF_EOF
11911 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
11914 ldopts=("/subsystem:console")
11917 while test \$# -gt 0; do
11920 # ignore -link argument
11923 # ignore runtime-library option
11938 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
11941 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
11947 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
11948 ldopts+=("\${linkarg}")
11956 ldopts+=("-out:\$1")
11965 if [ "\$isdll" -ne 0 ]; then
11966 for lib in \${libs[*]}; do
11967 ldopts+=("\$lib.dll.lib")
11970 for lib in \${libs[*]}; do
11971 ldopts+=("\$lib.lib")
11976 ** ld options: "\${ldopts[@]}"
11978 exec \$LD \${ldopts[@]}
11980 chmod +x mk_prog.sh
11981 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
11982 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
11985 cf_cv_shlib_version=mingw
11986 cf_cv_shlib_version_infix=mingw
11989 if test "$DFT_LWR_MODEL" = "shared" ; then
11990 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
11991 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11992 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
11995 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11996 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11997 cat >mk_shared_lib.sh <<-CF_EOF
12000 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
12003 Linking shared library
12004 ** SHARED_LIB \$SHARED_LIB
12005 ** IMPORT_LIB \$IMPORT_LIB
12007 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
12009 chmod +x mk_shared_lib.sh
12011 (openbsd[2-9].*|mirbsd*)
12012 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12013 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12014 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12016 if test "$cf_cv_enable_rpath" = yes ; then
12017 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12019 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12021 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12022 if test "$cf_cv_shlib_version" = rel; then
12023 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12025 cf_cv_shared_soname='`basename $@`'
12028 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12032 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
12036 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
12038 (nto-qnx*|openbsd*|freebsd[12].*)
12039 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12040 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
12041 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12043 (dragonfly*|freebsd*)
12044 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12045 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12046 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12047 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
12048 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12051 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12052 if test "$cf_cv_shlib_version" = rel; then
12053 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12055 cf_cv_shared_soname='`basename $@`'
12058 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12061 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12062 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12063 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12064 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12065 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12066 if test "$cf_cv_shlib_version" = auto; then
12067 if test -f /usr/libexec/ld.elf_so; then
12068 cf_cv_shlib_version=abi
12070 cf_cv_shlib_version=rel
12074 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12075 if test "$cf_cv_shlib_version" = rel; then
12076 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12078 cf_cv_shared_soname='`basename $@`'
12081 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
12083 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
12087 # tested with OSF/1 V3.2 and 'cc'
12088 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
12089 # link with shared libs).
12090 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
12093 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
12096 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
12097 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12098 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12099 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12101 cf_cv_rm_so_locs=yes
12103 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
12104 # tested with osr5.0.5
12105 if test "$GCC" != yes; then
12106 CC_SHARED_OPTS='-belf -KPIC'
12108 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
12109 if test "$cf_cv_enable_rpath" = yes ; then
12110 # only way is to set LD_RUN_PATH but no switch for it
12113 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12114 LINK_PROGS='LD_RUN_PATH=${libdir}'
12115 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
12118 # tested with SunOS 4.1.1 and gcc 2.7.0
12119 if test "$GCC" != yes; then
12120 CC_SHARED_OPTS='-KPIC'
12122 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
12123 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12126 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
12127 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
12128 if test "$DFT_LWR_MODEL" = "shared" ; then
12129 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
12130 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12132 if test "$cf_cv_enable_rpath" = yes ; then
12133 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
12136 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12137 if test "$cf_cv_shlib_version" = rel; then
12138 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12140 cf_cv_shared_soname='`basename $@`'
12143 if test "$GCC" != yes; then
12144 cf_save_CFLAGS="$CFLAGS"
12145 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
12147 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
12148 cat >"conftest.$ac_ext" <<_ACEOF
12149 #line 12149 "configure"
12150 #include "confdefs.h"
12155 printf("Hello\\n");
12160 rm -f "conftest.$ac_objext"
12161 if { (eval echo "$as_me:12161: \"$ac_compile\"") >&5
12162 (eval $ac_compile) 2>&5
12164 echo "$as_me:12164: \$? = $ac_status" >&5
12165 (exit "$ac_status"); } &&
12166 { ac_try='test -s "conftest.$ac_objext"'
12167 { (eval echo "$as_me:12167: \"$ac_try\"") >&5
12168 (eval $ac_try) 2>&5
12170 echo "$as_me:12170: \$? = $ac_status" >&5
12171 (exit "$ac_status"); }; }; then
12174 echo "$as_me: failed program was:" >&5
12175 cat "conftest.$ac_ext" >&5
12177 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12179 CFLAGS="$cf_save_CFLAGS"
12180 CC_SHARED_OPTS=$cf_shared_opts
12181 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
12183 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
12186 (sysv5uw7*|unix_sv*)
12187 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
12188 if test "$GCC" != yes; then
12189 CC_SHARED_OPTS='-KPIC'
12191 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
12194 CC_SHARED_OPTS='unknown'
12195 MK_SHARED_LIB='echo unknown'
12199 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
12200 case "$cf_cv_shlib_version" in
12202 case "$MK_SHARED_LIB" in
12204 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
12207 { echo "$as_me:12207: WARNING: ignored --with-shlib-version" >&5
12208 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
12214 if test -n "$cf_try_cflags"
12216 cat > conftest.$ac_ext <<EOF
12217 #line 12217 "${as_me:-configure}"
12219 int main(int argc, char *argv[])
12221 printf("hello\\n");
12222 return (argv[argc-1] == 0) ;
12225 cf_save_CFLAGS="$CFLAGS"
12226 for cf_opt in $cf_try_cflags
12228 CFLAGS="$cf_save_CFLAGS -$cf_opt"
12229 echo "$as_me:12229: checking if CFLAGS option -$cf_opt works" >&5
12230 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
12231 if { (eval echo "$as_me:12231: \"$ac_compile\"") >&5
12232 (eval $ac_compile) 2>&5
12234 echo "$as_me:12234: \$? = $ac_status" >&5
12235 (exit "$ac_status"); }; then
12236 echo "$as_me:12236: result: yes" >&5
12237 echo "${ECHO_T}yes" >&6
12238 cf_save_CFLAGS="$CFLAGS"
12240 echo "$as_me:12240: result: no" >&5
12241 echo "${ECHO_T}no" >&6
12244 CFLAGS="$cf_save_CFLAGS"
12247 # RPATH_LIST is a colon-separated list of directories
12248 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
12249 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
12251 test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
12253 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
12255 echo "${as_me:-configure}:12255: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
12257 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
12259 echo "${as_me:-configure}:12259: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
12261 # The test/sample programs in the original tree link using rpath option.
12262 # Make it optional for packagers.
12263 if test -n "$LOCAL_LDFLAGS"
12265 echo "$as_me:12265: checking if you want to link sample programs with rpath option" >&5
12266 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
12268 # Check whether --enable-rpath-link or --disable-rpath-link was given.
12269 if test "${enable_rpath_link+set}" = set; then
12270 enableval="$enable_rpath_link"
12271 with_rpath_link=$enableval
12273 with_rpath_link=yes
12275 echo "$as_me:12275: result: $with_rpath_link" >&5
12276 echo "${ECHO_T}$with_rpath_link" >&6
12277 if test "$with_rpath_link" = no
12284 ###############################################################################
12286 ### use option --enable-broken-linker to force on use of broken-linker support
12288 echo "$as_me:12288: checking if you want broken-linker support code" >&5
12289 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
12291 # Check whether --enable-broken_linker or --disable-broken_linker was given.
12292 if test "${enable_broken_linker+set}" = set; then
12293 enableval="$enable_broken_linker"
12294 with_broken_linker=$enableval
12296 with_broken_linker=no
12298 echo "$as_me:12298: result: $with_broken_linker" >&5
12299 echo "${ECHO_T}$with_broken_linker" >&6
12301 : "${BROKEN_LINKER:=0}"
12302 if test "x$with_broken_linker" = xyes ; then
12304 cat >>confdefs.h <<\EOF
12305 #define BROKEN_LINKER 1
12311 # Check to define _XOPEN_SOURCE "automatically"
12313 echo "$as_me:12313: checking if the POSIX test-macros are already defined" >&5
12314 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
12315 if test "${cf_cv_posix_visible+set}" = set; then
12316 echo $ECHO_N "(cached) $ECHO_C" >&6
12319 cat >"conftest.$ac_ext" <<_ACEOF
12320 #line 12320 "configure"
12321 #include "confdefs.h"
12327 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
12328 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
12329 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
12330 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
12331 #error conflicting symbols found
12338 rm -f "conftest.$ac_objext"
12339 if { (eval echo "$as_me:12339: \"$ac_compile\"") >&5
12340 (eval $ac_compile) 2>&5
12342 echo "$as_me:12342: \$? = $ac_status" >&5
12343 (exit "$ac_status"); } &&
12344 { ac_try='test -s "conftest.$ac_objext"'
12345 { (eval echo "$as_me:12345: \"$ac_try\"") >&5
12346 (eval $ac_try) 2>&5
12348 echo "$as_me:12348: \$? = $ac_status" >&5
12349 (exit "$ac_status"); }; }; then
12350 cf_cv_posix_visible=no
12352 echo "$as_me: failed program was:" >&5
12353 cat "conftest.$ac_ext" >&5
12354 cf_cv_posix_visible=yes
12356 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12359 echo "$as_me:12359: result: $cf_cv_posix_visible" >&5
12360 echo "${ECHO_T}$cf_cv_posix_visible" >&6
12362 if test "$cf_cv_posix_visible" = no; then
12364 cf_XOPEN_SOURCE=600
12365 cf_POSIX_C_SOURCE=199506L
12370 cf_xopen_source="-D_ALL_SOURCE"
12373 cf_XOPEN_SOURCE=600
12376 cf_xopen_source="-D_APPLE_C_SOURCE"
12379 cf_xopen_source="-D_DARWIN_C_SOURCE"
12382 (freebsd*|dragonfly*|midnightbsd*)
12383 # 5.x headers associate
12384 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
12385 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
12386 cf_POSIX_C_SOURCE=200112L
12387 cf_XOPEN_SOURCE=600
12388 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12391 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
12394 cf_xopen_source="-D_HPUX_SOURCE"
12397 cf_xopen_source="-D_SGI_SOURCE"
12400 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
12402 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
12404 echo "$as_me:12404: checking if this is the GNU C library" >&5
12405 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
12406 if test "${cf_cv_gnu_library+set}" = set; then
12407 echo $ECHO_N "(cached) $ECHO_C" >&6
12410 cat >"conftest.$ac_ext" <<_ACEOF
12411 #line 12411 "configure"
12412 #include "confdefs.h"
12413 #include <sys/types.h>
12418 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
12420 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
12423 # error not GNU C library
12429 rm -f "conftest.$ac_objext"
12430 if { (eval echo "$as_me:12430: \"$ac_compile\"") >&5
12431 (eval $ac_compile) 2>&5
12433 echo "$as_me:12433: \$? = $ac_status" >&5
12434 (exit "$ac_status"); } &&
12435 { ac_try='test -s "conftest.$ac_objext"'
12436 { (eval echo "$as_me:12436: \"$ac_try\"") >&5
12437 (eval $ac_try) 2>&5
12439 echo "$as_me:12439: \$? = $ac_status" >&5
12440 (exit "$ac_status"); }; }; then
12441 cf_cv_gnu_library=yes
12443 echo "$as_me: failed program was:" >&5
12444 cat "conftest.$ac_ext" >&5
12445 cf_cv_gnu_library=no
12447 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12450 echo "$as_me:12450: result: $cf_cv_gnu_library" >&5
12451 echo "${ECHO_T}$cf_cv_gnu_library" >&6
12453 if test x$cf_cv_gnu_library = xyes; then
12455 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
12456 # was changed to help a little. newlib incorporated the change about 4
12458 echo "$as_me:12458: checking if _DEFAULT_SOURCE can be used as a basis" >&5
12459 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
12460 if test "${cf_cv_gnu_library_219+set}" = set; then
12461 echo $ECHO_N "(cached) $ECHO_C" >&6
12464 cf_save="$CPPFLAGS"
12466 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12467 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12469 cat >"conftest.$ac_ext" <<_ACEOF
12470 #line 12470 "configure"
12471 #include "confdefs.h"
12472 #include <sys/types.h>
12477 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
12479 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
12482 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
12488 rm -f "conftest.$ac_objext"
12489 if { (eval echo "$as_me:12489: \"$ac_compile\"") >&5
12490 (eval $ac_compile) 2>&5
12492 echo "$as_me:12492: \$? = $ac_status" >&5
12493 (exit "$ac_status"); } &&
12494 { ac_try='test -s "conftest.$ac_objext"'
12495 { (eval echo "$as_me:12495: \"$ac_try\"") >&5
12496 (eval $ac_try) 2>&5
12498 echo "$as_me:12498: \$? = $ac_status" >&5
12499 (exit "$ac_status"); }; }; then
12500 cf_cv_gnu_library_219=yes
12502 echo "$as_me: failed program was:" >&5
12503 cat "conftest.$ac_ext" >&5
12504 cf_cv_gnu_library_219=no
12506 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12507 CPPFLAGS="$cf_save"
12510 echo "$as_me:12510: result: $cf_cv_gnu_library_219" >&5
12511 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
12513 if test "x$cf_cv_gnu_library_219" = xyes; then
12514 cf_save="$CPPFLAGS"
12515 echo "$as_me:12515: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
12516 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
12517 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
12518 echo $ECHO_N "(cached) $ECHO_C" >&6
12524 cf_new_extra_cppflags=
12526 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
12528 case "$cf_fix_cppflags" in
12530 case "$cf_add_cflags" in
12531 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12532 case "$cf_add_cflags" in
12534 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12536 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12537 && test -z "${cf_tst_cflags}" \
12538 && cf_fix_cppflags=yes
12540 if test "$cf_fix_cppflags" = yes ; then
12542 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12543 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12546 elif test "${cf_tst_cflags}" = "\"'" ; then
12548 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12549 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12555 case "$CPPFLAGS" in
12559 case "$cf_add_cflags" in
12561 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12563 CPPFLAGS=`echo "$CPPFLAGS" | \
12564 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12565 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12570 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12571 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12578 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12579 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12586 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12587 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12589 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12591 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12592 && test -z "${cf_tst_cflags}" \
12593 && cf_fix_cppflags=no
12598 if test -n "$cf_new_cflags" ; then
12600 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12601 CFLAGS="${CFLAGS}$cf_new_cflags"
12605 if test -n "$cf_new_cppflags" ; then
12607 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12608 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12612 if test -n "$cf_new_extra_cppflags" ; then
12614 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12615 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12619 cat >"conftest.$ac_ext" <<_ACEOF
12620 #line 12620 "configure"
12621 #include "confdefs.h"
12623 #include <limits.h>
12624 #include <sys/types.h>
12630 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
12633 # error GNU C library is too old
12639 rm -f "conftest.$ac_objext"
12640 if { (eval echo "$as_me:12640: \"$ac_compile\"") >&5
12641 (eval $ac_compile) 2>&5
12643 echo "$as_me:12643: \$? = $ac_status" >&5
12644 (exit "$ac_status"); } &&
12645 { ac_try='test -s "conftest.$ac_objext"'
12646 { (eval echo "$as_me:12646: \"$ac_try\"") >&5
12647 (eval $ac_try) 2>&5
12649 echo "$as_me:12649: \$? = $ac_status" >&5
12650 (exit "$ac_status"); }; }; then
12651 cf_cv_gnu_dftsrc_219=yes
12653 echo "$as_me: failed program was:" >&5
12654 cat "conftest.$ac_ext" >&5
12655 cf_cv_gnu_dftsrc_219=no
12657 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12660 echo "$as_me:12660: result: $cf_cv_gnu_dftsrc_219" >&5
12661 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
12662 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
12664 cf_cv_gnu_dftsrc_219=maybe
12667 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
12669 echo "$as_me:12669: checking if we must define _GNU_SOURCE" >&5
12670 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
12671 if test "${cf_cv_gnu_source+set}" = set; then
12672 echo $ECHO_N "(cached) $ECHO_C" >&6
12675 cat >"conftest.$ac_ext" <<_ACEOF
12676 #line 12676 "configure"
12677 #include "confdefs.h"
12678 #include <sys/types.h>
12683 #ifndef _XOPEN_SOURCE
12684 #error expected _XOPEN_SOURCE to be defined
12690 rm -f "conftest.$ac_objext"
12691 if { (eval echo "$as_me:12691: \"$ac_compile\"") >&5
12692 (eval $ac_compile) 2>&5
12694 echo "$as_me:12694: \$? = $ac_status" >&5
12695 (exit "$ac_status"); } &&
12696 { ac_try='test -s "conftest.$ac_objext"'
12697 { (eval echo "$as_me:12697: \"$ac_try\"") >&5
12698 (eval $ac_try) 2>&5
12700 echo "$as_me:12700: \$? = $ac_status" >&5
12701 (exit "$ac_status"); }; }; then
12702 cf_cv_gnu_source=no
12704 echo "$as_me: failed program was:" >&5
12705 cat "conftest.$ac_ext" >&5
12706 cf_save="$CPPFLAGS"
12711 cf_new_extra_cppflags=
12713 for cf_add_cflags in -D_GNU_SOURCE
12715 case "$cf_fix_cppflags" in
12717 case "$cf_add_cflags" in
12718 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12719 case "$cf_add_cflags" in
12721 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12723 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12724 && test -z "${cf_tst_cflags}" \
12725 && cf_fix_cppflags=yes
12727 if test "$cf_fix_cppflags" = yes ; then
12729 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12730 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12733 elif test "${cf_tst_cflags}" = "\"'" ; then
12735 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12736 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12742 case "$CPPFLAGS" in
12746 case "$cf_add_cflags" in
12748 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12750 CPPFLAGS=`echo "$CPPFLAGS" | \
12751 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12752 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12757 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12758 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12765 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12766 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12773 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12774 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12776 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12778 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12779 && test -z "${cf_tst_cflags}" \
12780 && cf_fix_cppflags=no
12785 if test -n "$cf_new_cflags" ; then
12787 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12788 CFLAGS="${CFLAGS}$cf_new_cflags"
12792 if test -n "$cf_new_cppflags" ; then
12794 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12795 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12799 if test -n "$cf_new_extra_cppflags" ; then
12801 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12802 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12806 cat >"conftest.$ac_ext" <<_ACEOF
12807 #line 12807 "configure"
12808 #include "confdefs.h"
12809 #include <sys/types.h>
12814 #ifdef _XOPEN_SOURCE
12815 #error expected _XOPEN_SOURCE to be undefined
12821 rm -f "conftest.$ac_objext"
12822 if { (eval echo "$as_me:12822: \"$ac_compile\"") >&5
12823 (eval $ac_compile) 2>&5
12825 echo "$as_me:12825: \$? = $ac_status" >&5
12826 (exit "$ac_status"); } &&
12827 { ac_try='test -s "conftest.$ac_objext"'
12828 { (eval echo "$as_me:12828: \"$ac_try\"") >&5
12829 (eval $ac_try) 2>&5
12831 echo "$as_me:12831: \$? = $ac_status" >&5
12832 (exit "$ac_status"); }; }; then
12833 cf_cv_gnu_source=no
12835 echo "$as_me: failed program was:" >&5
12836 cat "conftest.$ac_ext" >&5
12837 cf_cv_gnu_source=yes
12839 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12840 CPPFLAGS="$cf_save"
12843 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12846 echo "$as_me:12846: result: $cf_cv_gnu_source" >&5
12847 echo "${ECHO_T}$cf_cv_gnu_source" >&6
12849 if test "$cf_cv_gnu_source" = yes
12851 echo "$as_me:12851: checking if we should also define _DEFAULT_SOURCE" >&5
12852 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
12853 if test "${cf_cv_default_source+set}" = set; then
12854 echo $ECHO_N "(cached) $ECHO_C" >&6
12857 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12858 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
12860 cat >"conftest.$ac_ext" <<_ACEOF
12861 #line 12861 "configure"
12862 #include "confdefs.h"
12863 #include <sys/types.h>
12868 #ifdef _DEFAULT_SOURCE
12869 #error expected _DEFAULT_SOURCE to be undefined
12875 rm -f "conftest.$ac_objext"
12876 if { (eval echo "$as_me:12876: \"$ac_compile\"") >&5
12877 (eval $ac_compile) 2>&5
12879 echo "$as_me:12879: \$? = $ac_status" >&5
12880 (exit "$ac_status"); } &&
12881 { ac_try='test -s "conftest.$ac_objext"'
12882 { (eval echo "$as_me:12882: \"$ac_try\"") >&5
12883 (eval $ac_try) 2>&5
12885 echo "$as_me:12885: \$? = $ac_status" >&5
12886 (exit "$ac_status"); }; }; then
12887 cf_cv_default_source=no
12889 echo "$as_me: failed program was:" >&5
12890 cat "conftest.$ac_ext" >&5
12891 cf_cv_default_source=yes
12893 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12896 echo "$as_me:12896: result: $cf_cv_default_source" >&5
12897 echo "${ECHO_T}$cf_cv_default_source" >&6
12898 if test "$cf_cv_default_source" = yes
12901 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12902 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12912 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
12915 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
12918 if test "$cf_cv_posix_visible" = no; then
12920 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
12922 cf_save_CFLAGS="$CFLAGS"
12923 cf_save_CPPFLAGS="$CPPFLAGS"
12925 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
12926 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12927 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12929 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
12930 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12931 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12933 echo "$as_me:12933: checking if we should define _POSIX_C_SOURCE" >&5
12934 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
12935 if test "${cf_cv_posix_c_source+set}" = set; then
12936 echo $ECHO_N "(cached) $ECHO_C" >&6
12939 echo "${as_me:-configure}:12939: testing if the symbol is already defined go no further ..." 1>&5
12941 cat >"conftest.$ac_ext" <<_ACEOF
12942 #line 12942 "configure"
12943 #include "confdefs.h"
12944 #include <sys/types.h>
12949 #ifndef _POSIX_C_SOURCE
12956 rm -f "conftest.$ac_objext"
12957 if { (eval echo "$as_me:12957: \"$ac_compile\"") >&5
12958 (eval $ac_compile) 2>&5
12960 echo "$as_me:12960: \$? = $ac_status" >&5
12961 (exit "$ac_status"); } &&
12962 { ac_try='test -s "conftest.$ac_objext"'
12963 { (eval echo "$as_me:12963: \"$ac_try\"") >&5
12964 (eval $ac_try) 2>&5
12966 echo "$as_me:12966: \$? = $ac_status" >&5
12967 (exit "$ac_status"); }; }; then
12968 cf_cv_posix_c_source=no
12970 echo "$as_me: failed program was:" >&5
12971 cat "conftest.$ac_ext" >&5
12972 cf_want_posix_source=no
12973 case .$cf_POSIX_C_SOURCE in
12975 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12978 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12979 cf_want_posix_source=yes
12982 cf_want_posix_source=yes
12985 if test "$cf_want_posix_source" = yes ; then
12986 cat >"conftest.$ac_ext" <<_ACEOF
12987 #line 12987 "configure"
12988 #include "confdefs.h"
12989 #include <sys/types.h>
12994 #ifdef _POSIX_SOURCE
13001 rm -f "conftest.$ac_objext"
13002 if { (eval echo "$as_me:13002: \"$ac_compile\"") >&5
13003 (eval $ac_compile) 2>&5
13005 echo "$as_me:13005: \$? = $ac_status" >&5
13006 (exit "$ac_status"); } &&
13007 { ac_try='test -s "conftest.$ac_objext"'
13008 { (eval echo "$as_me:13008: \"$ac_try\"") >&5
13009 (eval $ac_try) 2>&5
13011 echo "$as_me:13011: \$? = $ac_status" >&5
13012 (exit "$ac_status"); }; }; then
13015 echo "$as_me: failed program was:" >&5
13016 cat "conftest.$ac_ext" >&5
13017 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13019 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13022 echo "${as_me:-configure}:13022: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13024 CFLAGS="$cf_trim_CFLAGS"
13025 CPPFLAGS="$cf_trim_CPPFLAGS"
13027 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13028 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13030 echo "${as_me:-configure}:13030: testing if the second compile does not leave our definition intact error ..." 1>&5
13032 cat >"conftest.$ac_ext" <<_ACEOF
13033 #line 13033 "configure"
13034 #include "confdefs.h"
13035 #include <sys/types.h>
13040 #ifndef _POSIX_C_SOURCE
13047 rm -f "conftest.$ac_objext"
13048 if { (eval echo "$as_me:13048: \"$ac_compile\"") >&5
13049 (eval $ac_compile) 2>&5
13051 echo "$as_me:13051: \$? = $ac_status" >&5
13052 (exit "$ac_status"); } &&
13053 { ac_try='test -s "conftest.$ac_objext"'
13054 { (eval echo "$as_me:13054: \"$ac_try\"") >&5
13055 (eval $ac_try) 2>&5
13057 echo "$as_me:13057: \$? = $ac_status" >&5
13058 (exit "$ac_status"); }; }; then
13061 echo "$as_me: failed program was:" >&5
13062 cat "conftest.$ac_ext" >&5
13063 cf_cv_posix_c_source=no
13065 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13066 CFLAGS="$cf_save_CFLAGS"
13067 CPPFLAGS="$cf_save_CPPFLAGS"
13070 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13073 echo "$as_me:13073: result: $cf_cv_posix_c_source" >&5
13074 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13076 if test "$cf_cv_posix_c_source" != no ; then
13077 CFLAGS="$cf_trim_CFLAGS"
13078 CPPFLAGS="$cf_trim_CPPFLAGS"
13083 cf_new_extra_cppflags=
13085 for cf_add_cflags in $cf_cv_posix_c_source
13087 case "$cf_fix_cppflags" in
13089 case "$cf_add_cflags" in
13090 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13091 case "$cf_add_cflags" in
13093 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13095 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13096 && test -z "${cf_tst_cflags}" \
13097 && cf_fix_cppflags=yes
13099 if test "$cf_fix_cppflags" = yes ; then
13101 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13102 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13105 elif test "${cf_tst_cflags}" = "\"'" ; then
13107 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13108 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13114 case "$CPPFLAGS" in
13118 case "$cf_add_cflags" in
13120 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13122 CPPFLAGS=`echo "$CPPFLAGS" | \
13123 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13124 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13129 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13130 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13137 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13138 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13145 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13146 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13148 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13150 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13151 && test -z "${cf_tst_cflags}" \
13152 && cf_fix_cppflags=no
13157 if test -n "$cf_new_cflags" ; then
13159 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13160 CFLAGS="${CFLAGS}$cf_new_cflags"
13164 if test -n "$cf_new_cppflags" ; then
13166 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13167 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13171 if test -n "$cf_new_extra_cppflags" ; then
13173 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13174 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13180 fi # cf_cv_posix_visible
13184 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
13187 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
13188 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
13189 # Abusing the conformance level is a workaround.
13190 { echo "$as_me:13190: WARNING: this system does not provide usable locale support" >&5
13191 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
13192 cf_xopen_source="-D_BSD_SOURCE"
13193 cf_XOPEN_SOURCE=700
13196 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
13197 cf_xopen_source="-D_BSD_SOURCE"
13198 cf_XOPEN_SOURCE=600
13201 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
13204 cf_xopen_source="-D_OSF_SOURCE"
13207 cf_xopen_source="-D_QNX_SOURCE"
13210 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
13213 cf_xopen_source="-D__EXTENSIONS__"
13214 cf_cv_xopen_source=broken
13216 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
13222 echo "$as_me:13222: checking if we should define _XOPEN_SOURCE" >&5
13223 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13224 if test "${cf_cv_xopen_source+set}" = set; then
13225 echo $ECHO_N "(cached) $ECHO_C" >&6
13228 cat >"conftest.$ac_ext" <<_ACEOF
13229 #line 13229 "configure"
13230 #include "confdefs.h"
13232 #include <stdlib.h>
13233 #include <string.h>
13234 #include <sys/types.h>
13240 #ifndef _XOPEN_SOURCE
13247 rm -f "conftest.$ac_objext"
13248 if { (eval echo "$as_me:13248: \"$ac_compile\"") >&5
13249 (eval $ac_compile) 2>&5
13251 echo "$as_me:13251: \$? = $ac_status" >&5
13252 (exit "$ac_status"); } &&
13253 { ac_try='test -s "conftest.$ac_objext"'
13254 { (eval echo "$as_me:13254: \"$ac_try\"") >&5
13255 (eval $ac_try) 2>&5
13257 echo "$as_me:13257: \$? = $ac_status" >&5
13258 (exit "$ac_status"); }; }; then
13259 cf_cv_xopen_source=no
13261 echo "$as_me: failed program was:" >&5
13262 cat "conftest.$ac_ext" >&5
13263 cf_save="$CPPFLAGS"
13265 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13266 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13268 cat >"conftest.$ac_ext" <<_ACEOF
13269 #line 13269 "configure"
13270 #include "confdefs.h"
13272 #include <stdlib.h>
13273 #include <string.h>
13274 #include <sys/types.h>
13280 #ifdef _XOPEN_SOURCE
13287 rm -f "conftest.$ac_objext"
13288 if { (eval echo "$as_me:13288: \"$ac_compile\"") >&5
13289 (eval $ac_compile) 2>&5
13291 echo "$as_me:13291: \$? = $ac_status" >&5
13292 (exit "$ac_status"); } &&
13293 { ac_try='test -s "conftest.$ac_objext"'
13294 { (eval echo "$as_me:13294: \"$ac_try\"") >&5
13295 (eval $ac_try) 2>&5
13297 echo "$as_me:13297: \$? = $ac_status" >&5
13298 (exit "$ac_status"); }; }; then
13299 cf_cv_xopen_source=no
13301 echo "$as_me: failed program was:" >&5
13302 cat "conftest.$ac_ext" >&5
13303 cf_cv_xopen_source=$cf_XOPEN_SOURCE
13305 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13306 CPPFLAGS="$cf_save"
13309 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13312 echo "$as_me:13312: result: $cf_cv_xopen_source" >&5
13313 echo "${ECHO_T}$cf_cv_xopen_source" >&6
13315 if test "$cf_cv_xopen_source" != no ; then
13317 CFLAGS=`echo "$CFLAGS" | \
13318 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13319 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13321 CPPFLAGS=`echo "$CPPFLAGS" | \
13322 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13323 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13325 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13327 for cf_add_cflags in $cf_temp_xopen_source
13329 case "x$cf_add_cflags" in
13332 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13335 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'`
13336 test "$CFLAGS" != "$cf_old_cflag" || break
13338 CFLAGS="$cf_old_cflag"
13341 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13344 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'`
13345 test "$CPPFLAGS" != "$cf_old_cflag" || break
13347 CPPFLAGS="$cf_old_cflag"
13356 cf_new_extra_cppflags=
13358 for cf_add_cflags in $cf_add_cflags
13360 case "$cf_fix_cppflags" in
13362 case "$cf_add_cflags" in
13363 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13364 case "$cf_add_cflags" in
13366 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13368 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13369 && test -z "${cf_tst_cflags}" \
13370 && cf_fix_cppflags=yes
13372 if test "$cf_fix_cppflags" = yes ; then
13374 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13375 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13378 elif test "${cf_tst_cflags}" = "\"'" ; then
13380 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13381 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13387 case "$CPPFLAGS" in
13391 case "$cf_add_cflags" in
13393 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13395 CPPFLAGS=`echo "$CPPFLAGS" | \
13396 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13397 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13402 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13403 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13410 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13411 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13418 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13419 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13421 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13423 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13424 && test -z "${cf_tst_cflags}" \
13425 && cf_fix_cppflags=no
13430 if test -n "$cf_new_cflags" ; then
13432 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13433 CFLAGS="${CFLAGS}$cf_new_cflags"
13437 if test -n "$cf_new_cppflags" ; then
13439 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13440 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13444 if test -n "$cf_new_extra_cppflags" ; then
13446 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13447 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13455 if test "$cf_cv_posix_visible" = no; then
13457 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
13459 cf_save_CFLAGS="$CFLAGS"
13460 cf_save_CPPFLAGS="$CPPFLAGS"
13462 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13463 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13464 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13466 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13467 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13468 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13470 echo "$as_me:13470: checking if we should define _POSIX_C_SOURCE" >&5
13471 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13472 if test "${cf_cv_posix_c_source+set}" = set; then
13473 echo $ECHO_N "(cached) $ECHO_C" >&6
13476 echo "${as_me:-configure}:13476: testing if the symbol is already defined go no further ..." 1>&5
13478 cat >"conftest.$ac_ext" <<_ACEOF
13479 #line 13479 "configure"
13480 #include "confdefs.h"
13481 #include <sys/types.h>
13486 #ifndef _POSIX_C_SOURCE
13493 rm -f "conftest.$ac_objext"
13494 if { (eval echo "$as_me:13494: \"$ac_compile\"") >&5
13495 (eval $ac_compile) 2>&5
13497 echo "$as_me:13497: \$? = $ac_status" >&5
13498 (exit "$ac_status"); } &&
13499 { ac_try='test -s "conftest.$ac_objext"'
13500 { (eval echo "$as_me:13500: \"$ac_try\"") >&5
13501 (eval $ac_try) 2>&5
13503 echo "$as_me:13503: \$? = $ac_status" >&5
13504 (exit "$ac_status"); }; }; then
13505 cf_cv_posix_c_source=no
13507 echo "$as_me: failed program was:" >&5
13508 cat "conftest.$ac_ext" >&5
13509 cf_want_posix_source=no
13510 case .$cf_POSIX_C_SOURCE in
13512 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13515 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13516 cf_want_posix_source=yes
13519 cf_want_posix_source=yes
13522 if test "$cf_want_posix_source" = yes ; then
13523 cat >"conftest.$ac_ext" <<_ACEOF
13524 #line 13524 "configure"
13525 #include "confdefs.h"
13526 #include <sys/types.h>
13531 #ifdef _POSIX_SOURCE
13538 rm -f "conftest.$ac_objext"
13539 if { (eval echo "$as_me:13539: \"$ac_compile\"") >&5
13540 (eval $ac_compile) 2>&5
13542 echo "$as_me:13542: \$? = $ac_status" >&5
13543 (exit "$ac_status"); } &&
13544 { ac_try='test -s "conftest.$ac_objext"'
13545 { (eval echo "$as_me:13545: \"$ac_try\"") >&5
13546 (eval $ac_try) 2>&5
13548 echo "$as_me:13548: \$? = $ac_status" >&5
13549 (exit "$ac_status"); }; }; then
13552 echo "$as_me: failed program was:" >&5
13553 cat "conftest.$ac_ext" >&5
13554 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13556 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13559 echo "${as_me:-configure}:13559: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13561 CFLAGS="$cf_trim_CFLAGS"
13562 CPPFLAGS="$cf_trim_CPPFLAGS"
13564 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13565 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13567 echo "${as_me:-configure}:13567: testing if the second compile does not leave our definition intact error ..." 1>&5
13569 cat >"conftest.$ac_ext" <<_ACEOF
13570 #line 13570 "configure"
13571 #include "confdefs.h"
13572 #include <sys/types.h>
13577 #ifndef _POSIX_C_SOURCE
13584 rm -f "conftest.$ac_objext"
13585 if { (eval echo "$as_me:13585: \"$ac_compile\"") >&5
13586 (eval $ac_compile) 2>&5
13588 echo "$as_me:13588: \$? = $ac_status" >&5
13589 (exit "$ac_status"); } &&
13590 { ac_try='test -s "conftest.$ac_objext"'
13591 { (eval echo "$as_me:13591: \"$ac_try\"") >&5
13592 (eval $ac_try) 2>&5
13594 echo "$as_me:13594: \$? = $ac_status" >&5
13595 (exit "$ac_status"); }; }; then
13598 echo "$as_me: failed program was:" >&5
13599 cat "conftest.$ac_ext" >&5
13600 cf_cv_posix_c_source=no
13602 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13603 CFLAGS="$cf_save_CFLAGS"
13604 CPPFLAGS="$cf_save_CPPFLAGS"
13607 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13610 echo "$as_me:13610: result: $cf_cv_posix_c_source" >&5
13611 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13613 if test "$cf_cv_posix_c_source" != no ; then
13614 CFLAGS="$cf_trim_CFLAGS"
13615 CPPFLAGS="$cf_trim_CPPFLAGS"
13620 cf_new_extra_cppflags=
13622 for cf_add_cflags in $cf_cv_posix_c_source
13624 case "$cf_fix_cppflags" in
13626 case "$cf_add_cflags" in
13627 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13628 case "$cf_add_cflags" in
13630 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13632 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13633 && test -z "${cf_tst_cflags}" \
13634 && cf_fix_cppflags=yes
13636 if test "$cf_fix_cppflags" = yes ; then
13638 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13639 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13642 elif test "${cf_tst_cflags}" = "\"'" ; then
13644 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13645 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13651 case "$CPPFLAGS" in
13655 case "$cf_add_cflags" in
13657 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13659 CPPFLAGS=`echo "$CPPFLAGS" | \
13660 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13661 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13666 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13667 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13674 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13675 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13682 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13683 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13685 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13687 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13688 && test -z "${cf_tst_cflags}" \
13689 && cf_fix_cppflags=no
13694 if test -n "$cf_new_cflags" ; then
13696 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13697 CFLAGS="${CFLAGS}$cf_new_cflags"
13701 if test -n "$cf_new_cppflags" ; then
13703 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13704 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13708 if test -n "$cf_new_extra_cppflags" ; then
13710 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13711 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13717 fi # cf_cv_posix_visible
13722 if test -n "$cf_xopen_source" ; then
13724 for cf_add_cflags in $cf_xopen_source
13726 case "x$cf_add_cflags" in
13729 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13732 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'`
13733 test "$CFLAGS" != "$cf_old_cflag" || break
13734 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
13736 echo "${as_me:-configure}:13736: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
13738 CFLAGS="$cf_old_cflag"
13741 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13744 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'`
13745 test "$CPPFLAGS" != "$cf_old_cflag" || break
13746 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
13748 echo "${as_me:-configure}:13748: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
13750 CPPFLAGS="$cf_old_cflag"
13759 cf_new_extra_cppflags=
13761 for cf_add_cflags in $cf_add_cflags
13763 case "$cf_fix_cppflags" in
13765 case "$cf_add_cflags" in
13766 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13767 case "$cf_add_cflags" in
13769 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13771 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13772 && test -z "${cf_tst_cflags}" \
13773 && cf_fix_cppflags=yes
13775 if test "$cf_fix_cppflags" = yes ; then
13777 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13778 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13781 elif test "${cf_tst_cflags}" = "\"'" ; then
13783 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13784 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13790 case "$CPPFLAGS" in
13794 case "$cf_add_cflags" in
13796 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13798 CPPFLAGS=`echo "$CPPFLAGS" | \
13799 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13800 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13805 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13806 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13813 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13814 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13821 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13822 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13824 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13826 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13827 && test -z "${cf_tst_cflags}" \
13828 && cf_fix_cppflags=no
13833 if test -n "$cf_new_cflags" ; then
13834 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13836 echo "${as_me:-configure}:13836: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13838 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13839 CFLAGS="${CFLAGS}$cf_new_cflags"
13843 if test -n "$cf_new_cppflags" ; then
13844 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13846 echo "${as_me:-configure}:13846: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13848 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13849 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13853 if test -n "$cf_new_extra_cppflags" ; then
13854 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13856 echo "${as_me:-configure}:13856: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13858 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13859 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13867 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
13868 echo "$as_me:13868: checking if _XOPEN_SOURCE really is set" >&5
13869 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
13870 cat >"conftest.$ac_ext" <<_ACEOF
13871 #line 13871 "configure"
13872 #include "confdefs.h"
13873 #include <stdlib.h>
13878 #ifndef _XOPEN_SOURCE
13885 rm -f "conftest.$ac_objext"
13886 if { (eval echo "$as_me:13886: \"$ac_compile\"") >&5
13887 (eval $ac_compile) 2>&5
13889 echo "$as_me:13889: \$? = $ac_status" >&5
13890 (exit "$ac_status"); } &&
13891 { ac_try='test -s "conftest.$ac_objext"'
13892 { (eval echo "$as_me:13892: \"$ac_try\"") >&5
13893 (eval $ac_try) 2>&5
13895 echo "$as_me:13895: \$? = $ac_status" >&5
13896 (exit "$ac_status"); }; }; then
13897 cf_XOPEN_SOURCE_set=yes
13899 echo "$as_me: failed program was:" >&5
13900 cat "conftest.$ac_ext" >&5
13901 cf_XOPEN_SOURCE_set=no
13903 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13904 echo "$as_me:13904: result: $cf_XOPEN_SOURCE_set" >&5
13905 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
13906 if test "$cf_XOPEN_SOURCE_set" = yes
13908 cat >"conftest.$ac_ext" <<_ACEOF
13909 #line 13909 "configure"
13910 #include "confdefs.h"
13911 #include <stdlib.h>
13916 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
13923 rm -f "conftest.$ac_objext"
13924 if { (eval echo "$as_me:13924: \"$ac_compile\"") >&5
13925 (eval $ac_compile) 2>&5
13927 echo "$as_me:13927: \$? = $ac_status" >&5
13928 (exit "$ac_status"); } &&
13929 { ac_try='test -s "conftest.$ac_objext"'
13930 { (eval echo "$as_me:13930: \"$ac_try\"") >&5
13931 (eval $ac_try) 2>&5
13933 echo "$as_me:13933: \$? = $ac_status" >&5
13934 (exit "$ac_status"); }; }; then
13935 cf_XOPEN_SOURCE_set_ok=yes
13937 echo "$as_me: failed program was:" >&5
13938 cat "conftest.$ac_ext" >&5
13939 cf_XOPEN_SOURCE_set_ok=no
13941 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13942 if test "$cf_XOPEN_SOURCE_set_ok" = no
13944 { echo "$as_me:13944: WARNING: _XOPEN_SOURCE is lower than requested" >&5
13945 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
13949 echo "$as_me:13949: checking if we should define _XOPEN_SOURCE" >&5
13950 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13951 if test "${cf_cv_xopen_source+set}" = set; then
13952 echo $ECHO_N "(cached) $ECHO_C" >&6
13955 cat >"conftest.$ac_ext" <<_ACEOF
13956 #line 13956 "configure"
13957 #include "confdefs.h"
13959 #include <stdlib.h>
13960 #include <string.h>
13961 #include <sys/types.h>
13967 #ifndef _XOPEN_SOURCE
13974 rm -f "conftest.$ac_objext"
13975 if { (eval echo "$as_me:13975: \"$ac_compile\"") >&5
13976 (eval $ac_compile) 2>&5
13978 echo "$as_me:13978: \$? = $ac_status" >&5
13979 (exit "$ac_status"); } &&
13980 { ac_try='test -s "conftest.$ac_objext"'
13981 { (eval echo "$as_me:13981: \"$ac_try\"") >&5
13982 (eval $ac_try) 2>&5
13984 echo "$as_me:13984: \$? = $ac_status" >&5
13985 (exit "$ac_status"); }; }; then
13986 cf_cv_xopen_source=no
13988 echo "$as_me: failed program was:" >&5
13989 cat "conftest.$ac_ext" >&5
13990 cf_save="$CPPFLAGS"
13992 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13993 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13995 cat >"conftest.$ac_ext" <<_ACEOF
13996 #line 13996 "configure"
13997 #include "confdefs.h"
13999 #include <stdlib.h>
14000 #include <string.h>
14001 #include <sys/types.h>
14007 #ifdef _XOPEN_SOURCE
14014 rm -f "conftest.$ac_objext"
14015 if { (eval echo "$as_me:14015: \"$ac_compile\"") >&5
14016 (eval $ac_compile) 2>&5
14018 echo "$as_me:14018: \$? = $ac_status" >&5
14019 (exit "$ac_status"); } &&
14020 { ac_try='test -s "conftest.$ac_objext"'
14021 { (eval echo "$as_me:14021: \"$ac_try\"") >&5
14022 (eval $ac_try) 2>&5
14024 echo "$as_me:14024: \$? = $ac_status" >&5
14025 (exit "$ac_status"); }; }; then
14026 cf_cv_xopen_source=no
14028 echo "$as_me: failed program was:" >&5
14029 cat "conftest.$ac_ext" >&5
14030 cf_cv_xopen_source=$cf_XOPEN_SOURCE
14032 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14033 CPPFLAGS="$cf_save"
14036 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14039 echo "$as_me:14039: result: $cf_cv_xopen_source" >&5
14040 echo "${ECHO_T}$cf_cv_xopen_source" >&6
14042 if test "$cf_cv_xopen_source" != no ; then
14044 CFLAGS=`echo "$CFLAGS" | \
14045 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14046 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14048 CPPFLAGS=`echo "$CPPFLAGS" | \
14049 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14050 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14052 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
14054 for cf_add_cflags in $cf_temp_xopen_source
14056 case "x$cf_add_cflags" in
14059 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14062 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'`
14063 test "$CFLAGS" != "$cf_old_cflag" || break
14065 CFLAGS="$cf_old_cflag"
14068 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14071 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'`
14072 test "$CPPFLAGS" != "$cf_old_cflag" || break
14074 CPPFLAGS="$cf_old_cflag"
14083 cf_new_extra_cppflags=
14085 for cf_add_cflags in $cf_add_cflags
14087 case "$cf_fix_cppflags" in
14089 case "$cf_add_cflags" in
14090 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14091 case "$cf_add_cflags" in
14093 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14095 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14096 && test -z "${cf_tst_cflags}" \
14097 && cf_fix_cppflags=yes
14099 if test "$cf_fix_cppflags" = yes ; then
14101 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14102 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14105 elif test "${cf_tst_cflags}" = "\"'" ; then
14107 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14108 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14114 case "$CPPFLAGS" in
14118 case "$cf_add_cflags" in
14120 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14122 CPPFLAGS=`echo "$CPPFLAGS" | \
14123 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14124 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14129 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14130 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14137 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14138 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14145 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14146 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14148 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14150 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14151 && test -z "${cf_tst_cflags}" \
14152 && cf_fix_cppflags=no
14157 if test -n "$cf_new_cflags" ; then
14159 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14160 CFLAGS="${CFLAGS}$cf_new_cflags"
14164 if test -n "$cf_new_cppflags" ; then
14166 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14167 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14171 if test -n "$cf_new_extra_cppflags" ; then
14173 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14174 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14184 fi # cf_cv_posix_visible
14186 # Check whether --enable-largefile or --disable-largefile was given.
14187 if test "${enable_largefile+set}" = set; then
14188 enableval="$enable_largefile"
14191 if test "$enable_largefile" != no; then
14193 echo "$as_me:14193: checking for special C compiler options needed for large files" >&5
14194 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
14195 if test "${ac_cv_sys_largefile_CC+set}" = set; then
14196 echo $ECHO_N "(cached) $ECHO_C" >&6
14198 ac_cv_sys_largefile_CC=no
14199 if test "$GCC" != yes; then
14202 # IRIX 6.2 and later do not support large files by default,
14203 # so use the C compiler's -n32 option if that helps.
14204 cat >"conftest.$ac_ext" <<_ACEOF
14205 #line 14205 "configure"
14206 #include "confdefs.h"
14207 #include <sys/types.h>
14208 /* Check that off_t can represent 2**63 - 1 correctly.
14209 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14210 since some C++ compilers masquerading as C compilers
14211 incorrectly reject 9223372036854775807. */
14212 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14213 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14214 && LARGE_OFF_T % 2147483647 == 1)
14224 rm -f "conftest.$ac_objext"
14225 if { (eval echo "$as_me:14225: \"$ac_compile\"") >&5
14226 (eval $ac_compile) 2>&5
14228 echo "$as_me:14228: \$? = $ac_status" >&5
14229 (exit "$ac_status"); } &&
14230 { ac_try='test -s "conftest.$ac_objext"'
14231 { (eval echo "$as_me:14231: \"$ac_try\"") >&5
14232 (eval $ac_try) 2>&5
14234 echo "$as_me:14234: \$? = $ac_status" >&5
14235 (exit "$ac_status"); }; }; then
14238 echo "$as_me: failed program was:" >&5
14239 cat "conftest.$ac_ext" >&5
14241 rm -f "conftest.$ac_objext"
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
14255 ac_cv_sys_largefile_CC=' -n32'; break
14257 echo "$as_me: failed program was:" >&5
14258 cat "conftest.$ac_ext" >&5
14260 rm -f "conftest.$ac_objext"
14264 rm -f "conftest.$ac_ext"
14267 echo "$as_me:14267: result: $ac_cv_sys_largefile_CC" >&5
14268 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
14269 if test "$ac_cv_sys_largefile_CC" != no; then
14270 CC=$CC$ac_cv_sys_largefile_CC
14273 echo "$as_me:14273: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14274 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
14275 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
14276 echo $ECHO_N "(cached) $ECHO_C" >&6
14279 ac_cv_sys_file_offset_bits=no
14280 cat >"conftest.$ac_ext" <<_ACEOF
14281 #line 14281 "configure"
14282 #include "confdefs.h"
14283 #include <sys/types.h>
14284 /* Check that off_t can represent 2**63 - 1 correctly.
14285 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14286 since some C++ compilers masquerading as C compilers
14287 incorrectly reject 9223372036854775807. */
14288 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14289 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14290 && LARGE_OFF_T % 2147483647 == 1)
14300 rm -f "conftest.$ac_objext"
14301 if { (eval echo "$as_me:14301: \"$ac_compile\"") >&5
14302 (eval $ac_compile) 2>&5
14304 echo "$as_me:14304: \$? = $ac_status" >&5
14305 (exit "$ac_status"); } &&
14306 { ac_try='test -s "conftest.$ac_objext"'
14307 { (eval echo "$as_me:14307: \"$ac_try\"") >&5
14308 (eval $ac_try) 2>&5
14310 echo "$as_me:14310: \$? = $ac_status" >&5
14311 (exit "$ac_status"); }; }; then
14314 echo "$as_me: failed program was:" >&5
14315 cat "conftest.$ac_ext" >&5
14317 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14318 cat >"conftest.$ac_ext" <<_ACEOF
14319 #line 14319 "configure"
14320 #include "confdefs.h"
14321 #define _FILE_OFFSET_BITS 64
14322 #include <sys/types.h>
14323 /* Check that off_t can represent 2**63 - 1 correctly.
14324 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14325 since some C++ compilers masquerading as C compilers
14326 incorrectly reject 9223372036854775807. */
14327 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14328 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14329 && LARGE_OFF_T % 2147483647 == 1)
14339 rm -f "conftest.$ac_objext"
14340 if { (eval echo "$as_me:14340: \"$ac_compile\"") >&5
14341 (eval $ac_compile) 2>&5
14343 echo "$as_me:14343: \$? = $ac_status" >&5
14344 (exit "$ac_status"); } &&
14345 { ac_try='test -s "conftest.$ac_objext"'
14346 { (eval echo "$as_me:14346: \"$ac_try\"") >&5
14347 (eval $ac_try) 2>&5
14349 echo "$as_me:14349: \$? = $ac_status" >&5
14350 (exit "$ac_status"); }; }; then
14351 ac_cv_sys_file_offset_bits=64; break
14353 echo "$as_me: failed program was:" >&5
14354 cat "conftest.$ac_ext" >&5
14356 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14360 echo "$as_me:14360: result: $ac_cv_sys_file_offset_bits" >&5
14361 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14362 if test "$ac_cv_sys_file_offset_bits" != no; then
14364 cat >>confdefs.h <<EOF
14365 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14370 echo "$as_me:14370: checking for _LARGE_FILES value needed for large files" >&5
14371 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14372 if test "${ac_cv_sys_large_files+set}" = set; then
14373 echo $ECHO_N "(cached) $ECHO_C" >&6
14376 ac_cv_sys_large_files=no
14377 cat >"conftest.$ac_ext" <<_ACEOF
14378 #line 14378 "configure"
14379 #include "confdefs.h"
14380 #include <sys/types.h>
14381 /* Check that off_t can represent 2**63 - 1 correctly.
14382 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14383 since some C++ compilers masquerading as C compilers
14384 incorrectly reject 9223372036854775807. */
14385 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14386 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14387 && LARGE_OFF_T % 2147483647 == 1)
14397 rm -f "conftest.$ac_objext"
14398 if { (eval echo "$as_me:14398: \"$ac_compile\"") >&5
14399 (eval $ac_compile) 2>&5
14401 echo "$as_me:14401: \$? = $ac_status" >&5
14402 (exit "$ac_status"); } &&
14403 { ac_try='test -s "conftest.$ac_objext"'
14404 { (eval echo "$as_me:14404: \"$ac_try\"") >&5
14405 (eval $ac_try) 2>&5
14407 echo "$as_me:14407: \$? = $ac_status" >&5
14408 (exit "$ac_status"); }; }; then
14411 echo "$as_me: failed program was:" >&5
14412 cat "conftest.$ac_ext" >&5
14414 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14415 cat >"conftest.$ac_ext" <<_ACEOF
14416 #line 14416 "configure"
14417 #include "confdefs.h"
14418 #define _LARGE_FILES 1
14419 #include <sys/types.h>
14420 /* Check that off_t can represent 2**63 - 1 correctly.
14421 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14422 since some C++ compilers masquerading as C compilers
14423 incorrectly reject 9223372036854775807. */
14424 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14425 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14426 && LARGE_OFF_T % 2147483647 == 1)
14436 rm -f "conftest.$ac_objext"
14437 if { (eval echo "$as_me:14437: \"$ac_compile\"") >&5
14438 (eval $ac_compile) 2>&5
14440 echo "$as_me:14440: \$? = $ac_status" >&5
14441 (exit "$ac_status"); } &&
14442 { ac_try='test -s "conftest.$ac_objext"'
14443 { (eval echo "$as_me:14443: \"$ac_try\"") >&5
14444 (eval $ac_try) 2>&5
14446 echo "$as_me:14446: \$? = $ac_status" >&5
14447 (exit "$ac_status"); }; }; then
14448 ac_cv_sys_large_files=1; break
14450 echo "$as_me: failed program was:" >&5
14451 cat "conftest.$ac_ext" >&5
14453 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14457 echo "$as_me:14457: result: $ac_cv_sys_large_files" >&5
14458 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14459 if test "$ac_cv_sys_large_files" != no; then
14461 cat >>confdefs.h <<EOF
14462 #define _LARGE_FILES $ac_cv_sys_large_files
14469 if test "$enable_largefile" != no ; then
14470 echo "$as_me:14470: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14471 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14472 if test "${ac_cv_sys_largefile_source+set}" = set; then
14473 echo $ECHO_N "(cached) $ECHO_C" >&6
14476 ac_cv_sys_largefile_source=no
14477 cat >"conftest.$ac_ext" <<_ACEOF
14478 #line 14478 "configure"
14479 #include "confdefs.h"
14489 rm -f "conftest.$ac_objext"
14490 if { (eval echo "$as_me:14490: \"$ac_compile\"") >&5
14491 (eval $ac_compile) 2>&5
14493 echo "$as_me:14493: \$? = $ac_status" >&5
14494 (exit "$ac_status"); } &&
14495 { ac_try='test -s "conftest.$ac_objext"'
14496 { (eval echo "$as_me:14496: \"$ac_try\"") >&5
14497 (eval $ac_try) 2>&5
14499 echo "$as_me:14499: \$? = $ac_status" >&5
14500 (exit "$ac_status"); }; }; then
14503 echo "$as_me: failed program was:" >&5
14504 cat "conftest.$ac_ext" >&5
14506 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14507 cat >"conftest.$ac_ext" <<_ACEOF
14508 #line 14508 "configure"
14509 #include "confdefs.h"
14510 #define _LARGEFILE_SOURCE 1
14520 rm -f "conftest.$ac_objext"
14521 if { (eval echo "$as_me:14521: \"$ac_compile\"") >&5
14522 (eval $ac_compile) 2>&5
14524 echo "$as_me:14524: \$? = $ac_status" >&5
14525 (exit "$ac_status"); } &&
14526 { ac_try='test -s "conftest.$ac_objext"'
14527 { (eval echo "$as_me:14527: \"$ac_try\"") >&5
14528 (eval $ac_try) 2>&5
14530 echo "$as_me:14530: \$? = $ac_status" >&5
14531 (exit "$ac_status"); }; }; then
14532 ac_cv_sys_largefile_source=1; break
14534 echo "$as_me: failed program was:" >&5
14535 cat "conftest.$ac_ext" >&5
14537 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14541 echo "$as_me:14541: result: $ac_cv_sys_largefile_source" >&5
14542 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14543 if test "$ac_cv_sys_largefile_source" != no; then
14545 cat >>confdefs.h <<EOF
14546 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14552 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14553 # in glibc 2.1.3, but that breaks too many other things.
14554 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14555 echo "$as_me:14555: checking for fseeko" >&5
14556 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14557 if test "${ac_cv_func_fseeko+set}" = set; then
14558 echo $ECHO_N "(cached) $ECHO_C" >&6
14560 cat >"conftest.$ac_ext" <<_ACEOF
14561 #line 14561 "configure"
14562 #include "confdefs.h"
14567 return fseeko && fseeko (stdin, 0, 0);
14572 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14573 if { (eval echo "$as_me:14573: \"$ac_link\"") >&5
14574 (eval $ac_link) 2>&5
14576 echo "$as_me:14576: \$? = $ac_status" >&5
14577 (exit "$ac_status"); } &&
14578 { ac_try='test -s "conftest$ac_exeext"'
14579 { (eval echo "$as_me:14579: \"$ac_try\"") >&5
14580 (eval $ac_try) 2>&5
14582 echo "$as_me:14582: \$? = $ac_status" >&5
14583 (exit "$ac_status"); }; }; then
14584 ac_cv_func_fseeko=yes
14586 echo "$as_me: failed program was:" >&5
14587 cat "conftest.$ac_ext" >&5
14588 ac_cv_func_fseeko=no
14590 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14592 echo "$as_me:14592: result: $ac_cv_func_fseeko" >&5
14593 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14594 if test $ac_cv_func_fseeko = yes; then
14596 cat >>confdefs.h <<\EOF
14597 #define HAVE_FSEEKO 1
14602 # Normally we would collect these definitions in the config.h,
14603 # but (like _XOPEN_SOURCE), some environments rely on having these
14604 # defined before any of the system headers are included. Another
14605 # case comes up with C++, e.g., on AIX the compiler compiles the
14606 # header files by themselves before looking at the body files it is
14607 # told to compile. For ncurses, those header files do not include
14609 if test "$ac_cv_sys_large_files" != no
14612 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14613 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14616 if test "$ac_cv_sys_largefile_source" != no
14619 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14620 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14623 if test "$ac_cv_sys_file_offset_bits" != no
14626 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14627 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14631 echo "$as_me:14631: checking whether to use struct dirent64" >&5
14632 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14633 if test "${cf_cv_struct_dirent64+set}" = set; then
14634 echo $ECHO_N "(cached) $ECHO_C" >&6
14637 cat >"conftest.$ac_ext" <<_ACEOF
14638 #line 14638 "configure"
14639 #include "confdefs.h"
14641 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14642 #include <sys/types.h>
14643 #include <dirent.h>
14649 /* if transitional largefile support is setup, this is true */
14650 extern struct dirent64 * readdir(DIR *);
14651 struct dirent64 *x = readdir((DIR *)0);
14652 struct dirent *y = readdir((DIR *)0);
14660 rm -f "conftest.$ac_objext"
14661 if { (eval echo "$as_me:14661: \"$ac_compile\"") >&5
14662 (eval $ac_compile) 2>&5
14664 echo "$as_me:14664: \$? = $ac_status" >&5
14665 (exit "$ac_status"); } &&
14666 { ac_try='test -s "conftest.$ac_objext"'
14667 { (eval echo "$as_me:14667: \"$ac_try\"") >&5
14668 (eval $ac_try) 2>&5
14670 echo "$as_me:14670: \$? = $ac_status" >&5
14671 (exit "$ac_status"); }; }; then
14672 cf_cv_struct_dirent64=yes
14674 echo "$as_me: failed program was:" >&5
14675 cat "conftest.$ac_ext" >&5
14676 cf_cv_struct_dirent64=no
14678 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14681 echo "$as_me:14681: result: $cf_cv_struct_dirent64" >&5
14682 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14683 test "$cf_cv_struct_dirent64" = yes &&
14684 cat >>confdefs.h <<\EOF
14685 #define HAVE_STRUCT_DIRENT64 1
14690 ### Enable compiling-in rcs id's
14691 echo "$as_me:14691: checking if RCS identifiers should be compiled-in" >&5
14692 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14694 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14695 if test "${with_rcs_ids+set}" = set; then
14696 withval="$with_rcs_ids"
14697 with_rcs_ids=$withval
14701 echo "$as_me:14701: result: $with_rcs_ids" >&5
14702 echo "${ECHO_T}$with_rcs_ids" >&6
14703 test "$with_rcs_ids" = yes &&
14704 cat >>confdefs.h <<\EOF
14705 #define USE_RCS_IDS 1
14708 ###############################################################################
14710 ### Note that some functions (such as const) are normally disabled anyway.
14711 echo "$as_me:14711: checking if you want to build with function extensions" >&5
14712 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14714 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14715 if test "${enable_ext_funcs+set}" = set; then
14716 enableval="$enable_ext_funcs"
14717 with_ext_funcs=$enableval
14721 echo "$as_me:14721: result: $with_ext_funcs" >&5
14722 echo "${ECHO_T}$with_ext_funcs" >&6
14723 if test "$with_ext_funcs" = yes ; then
14724 NCURSES_EXT_FUNCS=1
14726 cat >>confdefs.h <<\EOF
14727 #define HAVE_USE_DEFAULT_COLORS 1
14730 cat >>confdefs.h <<\EOF
14731 #define NCURSES_EXT_FUNCS 1
14735 NCURSES_EXT_FUNCS=0
14738 ### use option --enable-const to turn on use of const beyond that in XSI.
14739 echo "$as_me:14739: checking for extended use of const keyword" >&5
14740 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14742 # Check whether --enable-const or --disable-const was given.
14743 if test "${enable_const+set}" = set; then
14744 enableval="$enable_const"
14745 with_ext_const=$enableval
14749 echo "$as_me:14749: result: $with_ext_const" >&5
14750 echo "${ECHO_T}$with_ext_const" >&6
14751 NCURSES_CONST='/*nothing*/'
14752 if test "$with_ext_const" = yes ; then
14753 NCURSES_CONST=const
14756 ###############################################################################
14757 # These options are relatively safe to experiment with.
14759 echo "$as_me:14759: checking if you want all development code" >&5
14760 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14762 # Check whether --with-develop or --without-develop was given.
14763 if test "${with_develop+set}" = set; then
14764 withval="$with_develop"
14765 with_develop=$withval
14769 echo "$as_me:14769: result: $with_develop" >&5
14770 echo "${ECHO_T}$with_develop" >&6
14772 ###############################################################################
14773 # These are just experimental, probably should not be in a package:
14775 # This is still experimental (20080329), but should ultimately be moved to
14776 # the script-block --with-normal, etc.
14778 echo "$as_me:14778: checking if you want to link with the pthread library" >&5
14779 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14781 # Check whether --with-pthread or --without-pthread was given.
14782 if test "${with_pthread+set}" = set; then
14783 withval="$with_pthread"
14784 with_pthread=$withval
14788 echo "$as_me:14788: result: $with_pthread" >&5
14789 echo "${ECHO_T}$with_pthread" >&6
14791 if test "$with_pthread" != no ; then
14792 echo "$as_me:14792: checking for pthread.h" >&5
14793 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14794 if test "${ac_cv_header_pthread_h+set}" = set; then
14795 echo $ECHO_N "(cached) $ECHO_C" >&6
14797 cat >"conftest.$ac_ext" <<_ACEOF
14798 #line 14798 "configure"
14799 #include "confdefs.h"
14800 #include <pthread.h>
14802 if { (eval echo "$as_me:14802: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14803 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14805 $EGREP -v '^ *\+' conftest.er1 >conftest.err
14807 cat conftest.err >&5
14808 echo "$as_me:14808: \$? = $ac_status" >&5
14809 (exit "$ac_status"); } >/dev/null; then
14810 if test -s conftest.err; then
14811 ac_cpp_err=$ac_c_preproc_warn_flag
14818 if test -z "$ac_cpp_err"; then
14819 ac_cv_header_pthread_h=yes
14821 echo "$as_me: failed program was:" >&5
14822 cat "conftest.$ac_ext" >&5
14823 ac_cv_header_pthread_h=no
14825 rm -f conftest.err "conftest.$ac_ext"
14827 echo "$as_me:14827: result: $ac_cv_header_pthread_h" >&5
14828 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14829 if test "$ac_cv_header_pthread_h" = yes; then
14831 cat >>confdefs.h <<\EOF
14832 #define HAVE_PTHREADS_H 1
14835 for cf_lib_pthread in pthread c_r
14837 echo "$as_me:14837: checking if we can link with the $cf_lib_pthread library" >&5
14838 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14839 cf_save_LIBS="$LIBS"
14841 cf_add_libs="$LIBS"
14844 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14845 # filter duplicates
14846 for cf_add_1lib in $cf_add_0lib; do
14847 for cf_add_2lib in $cf_add_libs; do
14848 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14853 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14855 LIBS="$cf_add_libs"
14857 cat >"conftest.$ac_ext" <<_ACEOF
14858 #line 14858 "configure"
14859 #include "confdefs.h"
14861 #include <pthread.h>
14867 int rc = pthread_create(0,0,0,0);
14868 int r2 = pthread_mutexattr_settype(0, 0);
14874 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14875 if { (eval echo "$as_me:14875: \"$ac_link\"") >&5
14876 (eval $ac_link) 2>&5
14878 echo "$as_me:14878: \$? = $ac_status" >&5
14879 (exit "$ac_status"); } &&
14880 { ac_try='test -s "conftest$ac_exeext"'
14881 { (eval echo "$as_me:14881: \"$ac_try\"") >&5
14882 (eval $ac_try) 2>&5
14884 echo "$as_me:14884: \$? = $ac_status" >&5
14885 (exit "$ac_status"); }; }; then
14888 echo "$as_me: failed program was:" >&5
14889 cat "conftest.$ac_ext" >&5
14892 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14893 LIBS="$cf_save_LIBS"
14894 echo "$as_me:14894: result: $with_pthread" >&5
14895 echo "${ECHO_T}$with_pthread" >&6
14896 test "$with_pthread" = yes && break
14899 if test "$with_pthread" = yes ; then
14901 cf_add_libs="$LIBS"
14904 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14905 # filter duplicates
14906 for cf_add_1lib in $cf_add_0lib; do
14907 for cf_add_2lib in $cf_add_libs; do
14908 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14913 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14915 LIBS="$cf_add_libs"
14917 cat >>confdefs.h <<\EOF
14918 #define HAVE_LIBPTHREADS 1
14922 { { echo "$as_me:14922: error: Cannot link with pthread library" >&5
14923 echo "$as_me: error: Cannot link with pthread library" >&2;}
14924 { (exit 1); exit 1; }; }
14931 echo "$as_me:14931: checking if you want to use weak-symbols for pthreads" >&5
14932 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14934 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14935 if test "${enable_weak_symbols+set}" = set; then
14936 enableval="$enable_weak_symbols"
14937 use_weak_symbols=$withval
14939 use_weak_symbols=no
14941 echo "$as_me:14941: result: $use_weak_symbols" >&5
14942 echo "${ECHO_T}$use_weak_symbols" >&6
14943 if test "$use_weak_symbols" = yes ; then
14945 echo "$as_me:14945: checking if $CC supports weak symbols" >&5
14946 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14947 if test "${cf_cv_weak_symbols+set}" = set; then
14948 echo $ECHO_N "(cached) $ECHO_C" >&6
14951 cat >"conftest.$ac_ext" <<_ACEOF
14952 #line 14952 "configure"
14953 #include "confdefs.h"
14960 #if defined(__GNUC__)
14961 # if defined __USE_ISOC99
14962 # define _cat_pragma(exp) _Pragma(#exp)
14963 # define _weak_pragma(exp) _cat_pragma(weak name)
14965 # define _weak_pragma(exp)
14967 # define _declare(name) __extension__ extern __typeof__(name) name
14968 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
14971 weak_symbol(fopen);
14977 rm -f "conftest.$ac_objext"
14978 if { (eval echo "$as_me:14978: \"$ac_compile\"") >&5
14979 (eval $ac_compile) 2>&5
14981 echo "$as_me:14981: \$? = $ac_status" >&5
14982 (exit "$ac_status"); } &&
14983 { ac_try='test -s "conftest.$ac_objext"'
14984 { (eval echo "$as_me:14984: \"$ac_try\"") >&5
14985 (eval $ac_try) 2>&5
14987 echo "$as_me:14987: \$? = $ac_status" >&5
14988 (exit "$ac_status"); }; }; then
14989 cf_cv_weak_symbols=yes
14991 echo "$as_me: failed program was:" >&5
14992 cat "conftest.$ac_ext" >&5
14993 cf_cv_weak_symbols=no
14995 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14998 echo "$as_me:14998: result: $cf_cv_weak_symbols" >&5
14999 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15002 cf_cv_weak_symbols=no
15005 if test $cf_cv_weak_symbols = yes ; then
15007 cat >>confdefs.h <<\EOF
15008 #define USE_WEAK_SYMBOLS 1
15014 if test "$with_pthread" = "yes" ; then
15016 cat >>confdefs.h <<\EOF
15017 #define USE_PTHREADS 1
15020 enable_reentrant=yes
15021 if test $cf_cv_weak_symbols = yes ; then
15026 # OpenSUSE is installing ncurses6, using reentrant option.
15027 echo "$as_me:15027: checking for _nc_TABSIZE" >&5
15028 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
15029 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
15030 echo $ECHO_N "(cached) $ECHO_C" >&6
15032 cat >"conftest.$ac_ext" <<_ACEOF
15033 #line 15033 "configure"
15034 #include "confdefs.h"
15035 #define _nc_TABSIZE autoconf_temporary
15036 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15043 /* We use char because int might match the return type of a gcc2
15044 builtin and then its argument prototype would still apply. */
15045 char _nc_TABSIZE (void);
15051 /* The GNU C library defines stubs for functions which it implements
15052 to always fail with ENOSYS. Some functions are actually named
15053 something starting with __ and the normal name is an alias. */
15054 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
15055 #error found stub for _nc_TABSIZE
15058 return _nc_TABSIZE ();
15063 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15064 if { (eval echo "$as_me:15064: \"$ac_link\"") >&5
15065 (eval $ac_link) 2>&5
15067 echo "$as_me:15067: \$? = $ac_status" >&5
15068 (exit "$ac_status"); } &&
15069 { ac_try='test -s "conftest$ac_exeext"'
15070 { (eval echo "$as_me:15070: \"$ac_try\"") >&5
15071 (eval $ac_try) 2>&5
15073 echo "$as_me:15073: \$? = $ac_status" >&5
15074 (exit "$ac_status"); }; }; then
15075 ac_cv_func__nc_TABSIZE=yes
15077 echo "$as_me: failed program was:" >&5
15078 cat "conftest.$ac_ext" >&5
15079 ac_cv_func__nc_TABSIZE=no
15081 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15083 echo "$as_me:15083: result: $ac_cv_func__nc_TABSIZE" >&5
15084 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
15085 if test "$ac_cv_func__nc_TABSIZE" = yes; then
15086 assume_reentrant=yes
15088 assume_reentrant=no
15091 # Reentrant code has to be opaque; there's little advantage to making ncurses
15092 # opaque outside of that, so there is no --enable-opaque option. We can use
15093 # this option without --with-pthreads, but this will be always set for
15095 echo "$as_me:15095: checking if you want experimental reentrant code" >&5
15096 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
15098 # Check whether --enable-reentrant or --disable-reentrant was given.
15099 if test "${enable_reentrant+set}" = set; then
15100 enableval="$enable_reentrant"
15101 with_reentrant=$enableval
15103 with_reentrant=$assume_reentrant
15105 echo "$as_me:15105: result: $with_reentrant" >&5
15106 echo "${ECHO_T}$with_reentrant" >&6
15107 if test "$with_reentrant" = yes ; then
15108 cf_cv_enable_reentrant=1
15109 if test $cf_cv_weak_symbols = yes ; then
15111 # remove pthread library from $LIBS
15112 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
15114 elif test "$assume_reentrant" = no ; then
15115 LIB_SUFFIX="t${LIB_SUFFIX}"
15118 cat >>confdefs.h <<\EOF
15119 #define USE_REENTRANT 1
15123 cf_cv_enable_reentrant=0
15126 ### Allow using a different wrap-prefix
15127 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15128 echo "$as_me:15128: checking for prefix used to wrap public variables" >&5
15129 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15131 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15132 if test "${with_wrap_prefix+set}" = set; then
15133 withval="$with_wrap_prefix"
15134 NCURSES_WRAP_PREFIX=$withval
15136 NCURSES_WRAP_PREFIX=_nc_
15138 echo "$as_me:15138: result: $NCURSES_WRAP_PREFIX" >&5
15139 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15141 NCURSES_WRAP_PREFIX=_nc_
15144 cat >>confdefs.h <<EOF
15145 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15148 ###############################################################################
15150 ### use option --disable-echo to suppress full display compiling commands
15152 echo "$as_me:15152: checking if you want to see long compiling messages" >&5
15153 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15155 # Check whether --enable-echo or --disable-echo was given.
15156 if test "${enable_echo+set}" = set; then
15157 enableval="$enable_echo"
15158 test "$enableval" != no && enableval=yes
15159 if test "$enableval" != "yes" ; then
15162 ECHO_LD='@echo linking $@;'
15163 RULE_CC='@echo compiling $<'
15164 SHOW_CC='@echo compiling $@'
15186 echo "$as_me:15186: result: $enableval" >&5
15187 echo "${ECHO_T}$enableval" >&6
15189 echo "$as_me:15189: checking if you want to use C11 _Noreturn feature" >&5
15190 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
15192 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
15193 if test "${enable_stdnoreturn+set}" = set; then
15194 enableval="$enable_stdnoreturn"
15195 test "$enableval" != yes && enableval=no
15196 if test "$enableval" != "no" ; then
15197 enable_stdnoreturn=yes
15199 enable_stdnoreturn=no
15203 enable_stdnoreturn=no
15206 echo "$as_me:15206: result: $enable_stdnoreturn" >&5
15207 echo "${ECHO_T}$enable_stdnoreturn" >&6
15209 if test $enable_stdnoreturn = yes; then
15210 echo "$as_me:15210: checking for C11 _Noreturn feature" >&5
15211 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
15212 if test "${cf_cv_c11_noreturn+set}" = set; then
15213 echo $ECHO_N "(cached) $ECHO_C" >&6
15215 cat >"conftest.$ac_ext" <<_ACEOF
15216 #line 15216 "configure"
15217 #include "confdefs.h"
15220 #include <stdlib.h>
15221 #include <stdnoreturn.h>
15222 static _Noreturn void giveup(void) { exit(0); }
15227 if (feof(stdin)) giveup()
15232 rm -f "conftest.$ac_objext"
15233 if { (eval echo "$as_me:15233: \"$ac_compile\"") >&5
15234 (eval $ac_compile) 2>&5
15236 echo "$as_me:15236: \$? = $ac_status" >&5
15237 (exit "$ac_status"); } &&
15238 { ac_try='test -s "conftest.$ac_objext"'
15239 { (eval echo "$as_me:15239: \"$ac_try\"") >&5
15240 (eval $ac_try) 2>&5
15242 echo "$as_me:15242: \$? = $ac_status" >&5
15243 (exit "$ac_status"); }; }; then
15244 cf_cv_c11_noreturn=yes
15246 echo "$as_me: failed program was:" >&5
15247 cat "conftest.$ac_ext" >&5
15248 cf_cv_c11_noreturn=no
15250 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15253 echo "$as_me:15253: result: $cf_cv_c11_noreturn" >&5
15254 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
15256 cf_cv_c11_noreturn=no,
15259 if test "$cf_cv_c11_noreturn" = yes; then
15261 cat >>confdefs.h <<\EOF
15262 #define HAVE_STDNORETURN_H 1
15265 cat >>confdefs.h <<EOF
15266 #define STDC_NORETURN _Noreturn
15269 HAVE_STDNORETURN_H=1
15271 HAVE_STDNORETURN_H=0
15274 if test "$GCC" = yes || test "$GXX" = yes
15277 if test "$GCC" = yes || test "$GXX" = yes
15281 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
15283 echo "${as_me:-configure}:15283: testing repairing CFLAGS: $CFLAGS ..." 1>&5
15286 for cf_temp_scan in $CFLAGS
15288 case "x$cf_temp_scan" in
15291 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15292 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15297 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15298 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15303 CFLAGS="$cf_temp_flags"
15304 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
15306 echo "${as_me:-configure}:15306: testing ... fixed $CFLAGS ..." 1>&5
15308 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15310 echo "${as_me:-configure}:15310: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15316 if test "$GCC" = yes || test "$GXX" = yes
15320 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
15322 echo "${as_me:-configure}:15322: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
15325 for cf_temp_scan in $CPPFLAGS
15327 case "x$cf_temp_scan" in
15330 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15331 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15336 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15337 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15342 CPPFLAGS="$cf_temp_flags"
15343 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
15345 echo "${as_me:-configure}:15345: testing ... fixed $CPPFLAGS ..." 1>&5
15347 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15349 echo "${as_me:-configure}:15349: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15355 if test "$GCC" = yes || test "$GXX" = yes
15359 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
15361 echo "${as_me:-configure}:15361: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
15364 for cf_temp_scan in $LDFLAGS
15366 case "x$cf_temp_scan" in
15369 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15370 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15375 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15376 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15381 LDFLAGS="$cf_temp_flags"
15382 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
15384 echo "${as_me:-configure}:15384: testing ... fixed $LDFLAGS ..." 1>&5
15386 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15388 echo "${as_me:-configure}:15388: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15394 echo "$as_me:15394: checking if you want to turn on gcc warnings" >&5
15395 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
15397 # Check whether --enable-warnings or --disable-warnings was given.
15398 if test "${enable_warnings+set}" = set; then
15399 enableval="$enable_warnings"
15400 test "$enableval" != yes && enableval=no
15401 if test "$enableval" != "no" ; then
15402 enable_warnings=yes
15411 echo "$as_me:15411: result: $enable_warnings" >&5
15412 echo "${ECHO_T}$enable_warnings" >&6
15413 if test "$enable_warnings" = "yes"
15416 if test "x$have_x" = xyes; then
15418 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15419 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15420 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15421 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15422 for cf_X_CFLAGS in $X_CFLAGS
15424 case "x$cf_X_CFLAGS" in
15426 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15429 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15434 cat >"conftest.$ac_ext" <<_ACEOF
15435 #line 15435 "configure"
15436 #include "confdefs.h"
15438 #include <stdlib.h>
15439 #include <X11/Intrinsic.h>
15444 String foo = malloc(1); free((void*)foo)
15449 rm -f "conftest.$ac_objext"
15450 if { (eval echo "$as_me:15450: \"$ac_compile\"") >&5
15451 (eval $ac_compile) 2>&5
15453 echo "$as_me:15453: \$? = $ac_status" >&5
15454 (exit "$ac_status"); } &&
15455 { ac_try='test -s "conftest.$ac_objext"'
15456 { (eval echo "$as_me:15456: \"$ac_try\"") >&5
15457 (eval $ac_try) 2>&5
15459 echo "$as_me:15459: \$? = $ac_status" >&5
15460 (exit "$ac_status"); }; }; then
15462 echo "$as_me:15462: checking for X11/Xt const-feature" >&5
15463 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15464 if test "${cf_cv_const_x_string+set}" = set; then
15465 echo $ECHO_N "(cached) $ECHO_C" >&6
15468 cat >"conftest.$ac_ext" <<_ACEOF
15469 #line 15469 "configure"
15470 #include "confdefs.h"
15472 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15473 #undef XTSTRINGDEFINES /* X11R5 and later */
15474 #include <stdlib.h>
15475 #include <X11/Intrinsic.h>
15480 String foo = malloc(1); *foo = 0
15485 rm -f "conftest.$ac_objext"
15486 if { (eval echo "$as_me:15486: \"$ac_compile\"") >&5
15487 (eval $ac_compile) 2>&5
15489 echo "$as_me:15489: \$? = $ac_status" >&5
15490 (exit "$ac_status"); } &&
15491 { ac_try='test -s "conftest.$ac_objext"'
15492 { (eval echo "$as_me:15492: \"$ac_try\"") >&5
15493 (eval $ac_try) 2>&5
15495 echo "$as_me:15495: \$? = $ac_status" >&5
15496 (exit "$ac_status"); }; }; then
15498 cf_cv_const_x_string=no
15501 echo "$as_me: failed program was:" >&5
15502 cat "conftest.$ac_ext" >&5
15504 cf_cv_const_x_string=yes
15507 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15510 echo "$as_me:15510: result: $cf_cv_const_x_string" >&5
15511 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15513 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
15514 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
15515 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
15517 case "$cf_cv_const_x_string" in
15520 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15521 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15526 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15527 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15533 echo "$as_me: failed program was:" >&5
15534 cat "conftest.$ac_ext" >&5
15536 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15538 cat > "conftest.$ac_ext" <<EOF
15539 #line 15539 "${as_me:-configure}"
15540 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15542 if test "$INTEL_COMPILER" = yes
15544 # The "-wdXXX" options suppress warnings:
15545 # remark #1419: external declaration in primary source file
15546 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15547 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15548 # remark #193: zero used for undefined preprocessing identifier
15549 # remark #593: variable "curs_sb_left_arrow" was set but never used
15550 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15551 # remark #869: parameter "tw" was never referenced
15552 # remark #981: operands are evaluated in unspecified order
15553 # warning #279: controlling expression is constant
15555 { echo "$as_me:15555: checking for $CC warning options..." >&5
15556 echo "$as_me: checking for $CC warning options..." >&6;}
15557 cf_save_CFLAGS="$CFLAGS"
15558 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
15570 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15571 if { (eval echo "$as_me:15571: \"$ac_compile\"") >&5
15572 (eval $ac_compile) 2>&5
15574 echo "$as_me:15574: \$? = $ac_status" >&5
15575 (exit "$ac_status"); }; then
15576 test -n "$verbose" && echo "$as_me:15576: result: ... -$cf_opt" >&5
15577 echo "${ECHO_T}... -$cf_opt" >&6
15578 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15581 CFLAGS="$cf_save_CFLAGS"
15582 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
15584 { echo "$as_me:15584: checking for $CC warning options..." >&5
15585 echo "$as_me: checking for $CC warning options..." >&6;}
15586 cf_save_CFLAGS="$CFLAGS"
15588 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15589 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15590 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15591 for cf_opt in W Wall \
15592 Wbad-function-cast \
15595 Wdeclaration-after-statement \
15598 Wmissing-declarations \
15599 Wmissing-prototypes \
15603 Wstrict-prototypes \
15604 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15606 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15607 if { (eval echo "$as_me:15607: \"$ac_compile\"") >&5
15608 (eval $ac_compile) 2>&5
15610 echo "$as_me:15610: \$? = $ac_status" >&5
15611 (exit "$ac_status"); }; then
15612 test -n "$verbose" && echo "$as_me:15612: result: ... -$cf_opt" >&5
15613 echo "${ECHO_T}... -$cf_opt" >&6
15616 case "$GCC_VERSION" in
15618 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15620 echo "${as_me:-configure}:15620: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15626 case "$GCC_VERSION" in
15628 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15630 echo "${as_me:-configure}:15630: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15636 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15639 CFLAGS="$cf_save_CFLAGS"
15645 if test "$GCC" = yes || test "$GXX" = yes
15647 cat > conftest.i <<EOF
15649 #define GCC_PRINTF 0
15652 #define GCC_SCANF 0
15654 #ifndef GCC_NORETURN
15655 #define GCC_NORETURN /* nothing */
15658 #define GCC_UNUSED /* nothing */
15661 if test "$GCC" = yes
15663 { echo "$as_me:15663: checking for $CC __attribute__ directives..." >&5
15664 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15665 cat > "conftest.$ac_ext" <<EOF
15666 #line 15666 "${as_me:-configure}"
15667 #include "confdefs.h"
15668 #include "conftest.h"
15669 #include "conftest.i"
15671 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15673 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15676 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
15678 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
15680 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15681 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
15682 extern GCC_NORETURN void foo(void);
15683 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
15685 cf_printf_attribute=no
15686 cf_scanf_attribute=no
15687 for cf_attribute in scanf printf unused noreturn
15690 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15692 cf_directive="__attribute__(($cf_attribute))"
15693 echo "checking for $CC $cf_directive" 1>&5
15695 case "$cf_attribute" in
15697 cf_printf_attribute=yes
15698 cat >conftest.h <<EOF
15699 #define GCC_$cf_ATTRIBUTE 1
15703 cf_scanf_attribute=yes
15704 cat >conftest.h <<EOF
15705 #define GCC_$cf_ATTRIBUTE 1
15709 cat >conftest.h <<EOF
15710 #define GCC_$cf_ATTRIBUTE $cf_directive
15715 if { (eval echo "$as_me:15715: \"$ac_compile\"") >&5
15716 (eval $ac_compile) 2>&5
15718 echo "$as_me:15718: \$? = $ac_status" >&5
15719 (exit "$ac_status"); }; then
15720 test -n "$verbose" && echo "$as_me:15720: result: ... $cf_attribute" >&5
15721 echo "${ECHO_T}... $cf_attribute" >&6
15722 cat conftest.h >>confdefs.h
15723 case "$cf_attribute" in
15726 cat >>confdefs.h <<EOF
15727 #define GCC_NORETURN $cf_directive
15732 cf_value='/* nothing */'
15733 if test "$cf_printf_attribute" != no ; then
15734 cf_value='__attribute__((format(printf,fmt,var)))'
15736 cat >>confdefs.h <<\EOF
15737 #define GCC_PRINTF 1
15742 cat >>confdefs.h <<EOF
15743 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15748 cf_value='/* nothing */'
15749 if test "$cf_scanf_attribute" != no ; then
15750 cf_value='__attribute__((format(scanf,fmt,var)))'
15752 cat >>confdefs.h <<\EOF
15753 #define GCC_SCANF 1
15758 cat >>confdefs.h <<EOF
15759 #define GCC_SCANFLIKE(fmt,var) $cf_value
15765 cat >>confdefs.h <<EOF
15766 #define GCC_UNUSED $cf_directive
15774 ${FGREP-fgrep} define conftest.i >>confdefs.h
15781 if test "x$enable_warnings" = "xyes"; then
15783 ADAFLAGS="$ADAFLAGS -gnatg"
15787 ### use option --enable-assertions to turn on generation of assertion code
15788 echo "$as_me:15788: checking if you want to enable runtime assertions" >&5
15789 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15791 # Check whether --enable-assertions or --disable-assertions was given.
15792 if test "${enable_assertions+set}" = set; then
15793 enableval="$enable_assertions"
15794 with_assertions=$enableval
15798 echo "$as_me:15798: result: $with_assertions" >&5
15799 echo "${ECHO_T}$with_assertions" >&6
15802 if test "$with_assertions" = no
15804 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15807 ADAFLAGS="$ADAFLAGS -gnata"
15812 ### use option --disable-leaks to suppress "permanent" leaks, for testing
15814 cat >>confdefs.h <<\EOF
15815 #define HAVE_NC_ALLOC_H 1
15818 ### use option --enable-expanded to generate certain macros as functions
15820 # Check whether --enable-expanded or --disable-expanded was given.
15821 if test "${enable_expanded+set}" = set; then
15822 enableval="$enable_expanded"
15823 test "$enableval" = yes &&
15824 cat >>confdefs.h <<\EOF
15825 #define NCURSES_EXPANDED 1
15830 ### use option --disable-macros to suppress macros in favor of functions
15832 # Check whether --enable-macros or --disable-macros was given.
15833 if test "${enable_macros+set}" = set; then
15834 enableval="$enable_macros"
15835 test "$enableval" = no &&
15836 cat >>confdefs.h <<\EOF
15837 #define NCURSES_NOMACROS 1
15842 # Normally we only add trace() to the debug-library. Allow this to be
15843 # extended to all models of the ncurses library:
15845 case "$CFLAGS $CPPFLAGS" in
15851 echo "$as_me:15851: checking whether to add trace feature to all models" >&5
15852 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
15854 # Check whether --with-trace or --without-trace was given.
15855 if test "${with_trace+set}" = set; then
15856 withval="$with_trace"
15857 cf_with_trace=$withval
15859 cf_with_trace=$cf_all_traces
15861 echo "$as_me:15861: result: $cf_with_trace" >&5
15862 echo "${ECHO_T}$cf_with_trace" >&6
15864 if test "$cf_with_trace" = yes ; then
15870 cf_new_extra_cppflags=
15872 for cf_add_cflags in -DTRACE
15874 case "$cf_fix_cppflags" in
15876 case "$cf_add_cflags" in
15877 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15878 case "$cf_add_cflags" in
15880 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15882 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15883 && test -z "${cf_tst_cflags}" \
15884 && cf_fix_cppflags=yes
15886 if test "$cf_fix_cppflags" = yes ; then
15888 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15889 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15892 elif test "${cf_tst_cflags}" = "\"'" ; then
15894 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15895 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15901 case "$CPPFLAGS" in
15905 case "$cf_add_cflags" in
15907 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15909 CPPFLAGS=`echo "$CPPFLAGS" | \
15910 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15911 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15916 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15917 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15924 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15925 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15932 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15933 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15935 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15937 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15938 && test -z "${cf_tst_cflags}" \
15939 && cf_fix_cppflags=no
15944 if test -n "$cf_new_cflags" ; then
15946 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15947 CFLAGS="${CFLAGS}$cf_new_cflags"
15951 if test -n "$cf_new_cppflags" ; then
15953 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15954 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15958 if test -n "$cf_new_extra_cppflags" ; then
15960 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15961 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15969 echo "$as_me:15969: checking if we want to use GNAT projects" >&5
15970 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
15972 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
15973 if test "${enable_gnat_projects+set}" = set; then
15974 enableval="$enable_gnat_projects"
15975 test "$enableval" != no && enableval=yes
15976 if test "$enableval" != "yes" ; then
15977 enable_gnat_projects=no
15979 enable_gnat_projects=yes
15983 enable_gnat_projects=yes
15986 echo "$as_me:15986: result: $enable_gnat_projects" >&5
15987 echo "${ECHO_T}$enable_gnat_projects" >&6
15989 ### Checks for libraries.
15990 case $cf_cv_system_name in
15994 echo "$as_me:15994: checking for gettimeofday" >&5
15995 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
15996 if test "${ac_cv_func_gettimeofday+set}" = set; then
15997 echo $ECHO_N "(cached) $ECHO_C" >&6
15999 cat >"conftest.$ac_ext" <<_ACEOF
16000 #line 16000 "configure"
16001 #include "confdefs.h"
16002 #define gettimeofday autoconf_temporary
16003 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16004 #undef gettimeofday
16010 /* We use char because int might match the return type of a gcc2
16011 builtin and then its argument prototype would still apply. */
16012 char gettimeofday (void);
16018 /* The GNU C library defines stubs for functions which it implements
16019 to always fail with ENOSYS. Some functions are actually named
16020 something starting with __ and the normal name is an alias. */
16021 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16022 #error found stub for gettimeofday
16025 return gettimeofday ();
16030 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16031 if { (eval echo "$as_me:16031: \"$ac_link\"") >&5
16032 (eval $ac_link) 2>&5
16034 echo "$as_me:16034: \$? = $ac_status" >&5
16035 (exit "$ac_status"); } &&
16036 { ac_try='test -s "conftest$ac_exeext"'
16037 { (eval echo "$as_me:16037: \"$ac_try\"") >&5
16038 (eval $ac_try) 2>&5
16040 echo "$as_me:16040: \$? = $ac_status" >&5
16041 (exit "$ac_status"); }; }; then
16042 ac_cv_func_gettimeofday=yes
16044 echo "$as_me: failed program was:" >&5
16045 cat "conftest.$ac_ext" >&5
16046 ac_cv_func_gettimeofday=no
16048 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16050 echo "$as_me:16050: result: $ac_cv_func_gettimeofday" >&5
16051 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16052 if test "$ac_cv_func_gettimeofday" = yes; then
16053 cat >>confdefs.h <<\EOF
16054 #define HAVE_GETTIMEOFDAY 1
16059 echo "$as_me:16059: checking for gettimeofday in -lbsd" >&5
16060 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
16061 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
16062 echo $ECHO_N "(cached) $ECHO_C" >&6
16064 ac_check_lib_save_LIBS=$LIBS
16066 cat >"conftest.$ac_ext" <<_ACEOF
16067 #line 16067 "configure"
16068 #include "confdefs.h"
16070 /* Override any gcc2 internal prototype to avoid an error. */
16074 /* We use char because int might match the return type of a gcc2
16075 builtin and then its argument prototype would still apply. */
16076 char gettimeofday ();
16085 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16086 if { (eval echo "$as_me:16086: \"$ac_link\"") >&5
16087 (eval $ac_link) 2>&5
16089 echo "$as_me:16089: \$? = $ac_status" >&5
16090 (exit "$ac_status"); } &&
16091 { ac_try='test -s "conftest$ac_exeext"'
16092 { (eval echo "$as_me:16092: \"$ac_try\"") >&5
16093 (eval $ac_try) 2>&5
16095 echo "$as_me:16095: \$? = $ac_status" >&5
16096 (exit "$ac_status"); }; }; then
16097 ac_cv_lib_bsd_gettimeofday=yes
16099 echo "$as_me: failed program was:" >&5
16100 cat "conftest.$ac_ext" >&5
16101 ac_cv_lib_bsd_gettimeofday=no
16103 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16104 LIBS=$ac_check_lib_save_LIBS
16106 echo "$as_me:16106: result: $ac_cv_lib_bsd_gettimeofday" >&5
16107 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
16108 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
16110 cat >>confdefs.h <<\EOF
16111 #define HAVE_GETTIMEOFDAY 1
16121 ### Checks for header files.
16122 echo "$as_me:16122: checking for ANSI C header files" >&5
16123 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16124 if test "${ac_cv_header_stdc+set}" = set; then
16125 echo $ECHO_N "(cached) $ECHO_C" >&6
16127 cat >"conftest.$ac_ext" <<_ACEOF
16128 #line 16128 "configure"
16129 #include "confdefs.h"
16130 #include <stdlib.h>
16131 #include <stdarg.h>
16132 #include <string.h>
16136 if { (eval echo "$as_me:16136: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16137 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16139 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16141 cat conftest.err >&5
16142 echo "$as_me:16142: \$? = $ac_status" >&5
16143 (exit "$ac_status"); } >/dev/null; then
16144 if test -s conftest.err; then
16145 ac_cpp_err=$ac_c_preproc_warn_flag
16152 if test -z "$ac_cpp_err"; then
16153 ac_cv_header_stdc=yes
16155 echo "$as_me: failed program was:" >&5
16156 cat "conftest.$ac_ext" >&5
16157 ac_cv_header_stdc=no
16159 rm -f conftest.err "conftest.$ac_ext"
16161 if test $ac_cv_header_stdc = yes; then
16162 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16163 cat >"conftest.$ac_ext" <<_ACEOF
16164 #line 16164 "configure"
16165 #include "confdefs.h"
16166 #include <string.h>
16169 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16170 $EGREP "memchr" >/dev/null 2>&1; then
16173 ac_cv_header_stdc=no
16179 if test $ac_cv_header_stdc = yes; then
16180 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16181 cat >"conftest.$ac_ext" <<_ACEOF
16182 #line 16182 "configure"
16183 #include "confdefs.h"
16184 #include <stdlib.h>
16187 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16188 $EGREP "free" >/dev/null 2>&1; then
16191 ac_cv_header_stdc=no
16197 if test $ac_cv_header_stdc = yes; then
16198 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16199 if test "$cross_compiling" = yes; then
16202 cat >"conftest.$ac_ext" <<_ACEOF
16203 #line 16203 "configure"
16204 #include "confdefs.h"
16206 #if ((' ' & 0x0FF) == 0x020)
16207 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16208 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16210 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16211 || ('j' <= (c) && (c) <= 'r') \
16212 || ('s' <= (c) && (c) <= 'z'))
16213 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16216 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16221 for (i = 0; i < 256; i++)
16222 if (XOR (islower (i), ISLOWER (i))
16223 || toupper (i) != TOUPPER (i))
16224 $ac_main_return(2);
16225 $ac_main_return (0);
16228 rm -f "conftest$ac_exeext"
16229 if { (eval echo "$as_me:16229: \"$ac_link\"") >&5
16230 (eval $ac_link) 2>&5
16232 echo "$as_me:16232: \$? = $ac_status" >&5
16233 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16234 { (eval echo "$as_me:16234: \"$ac_try\"") >&5
16235 (eval $ac_try) 2>&5
16237 echo "$as_me:16237: \$? = $ac_status" >&5
16238 (exit "$ac_status"); }; }; then
16241 echo "$as_me: program exited with status $ac_status" >&5
16242 echo "$as_me: failed program was:" >&5
16243 cat "conftest.$ac_ext" >&5
16244 ac_cv_header_stdc=no
16246 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16250 echo "$as_me:16250: result: $ac_cv_header_stdc" >&5
16251 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16252 if test $ac_cv_header_stdc = yes; then
16254 cat >>confdefs.h <<\EOF
16255 #define STDC_HEADERS 1
16260 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
16262 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
16263 inttypes.h stdint.h unistd.h
16265 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16266 echo "$as_me:16266: checking for $ac_header" >&5
16267 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16268 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16269 echo $ECHO_N "(cached) $ECHO_C" >&6
16271 cat >"conftest.$ac_ext" <<_ACEOF
16272 #line 16272 "configure"
16273 #include "confdefs.h"
16274 $ac_includes_default
16275 #include <$ac_header>
16277 rm -f "conftest.$ac_objext"
16278 if { (eval echo "$as_me:16278: \"$ac_compile\"") >&5
16279 (eval $ac_compile) 2>&5
16281 echo "$as_me:16281: \$? = $ac_status" >&5
16282 (exit "$ac_status"); } &&
16283 { ac_try='test -s "conftest.$ac_objext"'
16284 { (eval echo "$as_me:16284: \"$ac_try\"") >&5
16285 (eval $ac_try) 2>&5
16287 echo "$as_me:16287: \$? = $ac_status" >&5
16288 (exit "$ac_status"); }; }; then
16289 eval "$as_ac_Header=yes"
16291 echo "$as_me: failed program was:" >&5
16292 cat "conftest.$ac_ext" >&5
16293 eval "$as_ac_Header=no"
16295 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16297 echo "$as_me:16297: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16298 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16299 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16300 cat >>confdefs.h <<EOF
16301 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16307 echo "$as_me:16307: checking for signed char" >&5
16308 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
16309 if test "${ac_cv_type_signed_char+set}" = set; then
16310 echo $ECHO_N "(cached) $ECHO_C" >&6
16312 cat >"conftest.$ac_ext" <<_ACEOF
16313 #line 16313 "configure"
16314 #include "confdefs.h"
16315 $ac_includes_default
16319 if ((signed char *) 0)
16321 if (sizeof (signed char))
16327 rm -f "conftest.$ac_objext"
16328 if { (eval echo "$as_me:16328: \"$ac_compile\"") >&5
16329 (eval $ac_compile) 2>&5
16331 echo "$as_me:16331: \$? = $ac_status" >&5
16332 (exit "$ac_status"); } &&
16333 { ac_try='test -s "conftest.$ac_objext"'
16334 { (eval echo "$as_me:16334: \"$ac_try\"") >&5
16335 (eval $ac_try) 2>&5
16337 echo "$as_me:16337: \$? = $ac_status" >&5
16338 (exit "$ac_status"); }; }; then
16339 ac_cv_type_signed_char=yes
16341 echo "$as_me: failed program was:" >&5
16342 cat "conftest.$ac_ext" >&5
16343 ac_cv_type_signed_char=no
16345 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16347 echo "$as_me:16347: result: $ac_cv_type_signed_char" >&5
16348 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
16350 echo "$as_me:16350: checking size of signed char" >&5
16351 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
16352 if test "${ac_cv_sizeof_signed_char+set}" = set; then
16353 echo $ECHO_N "(cached) $ECHO_C" >&6
16355 if test "$ac_cv_type_signed_char" = yes; then
16356 if test "$cross_compiling" = yes; then
16357 # Depending upon the size, compute the lo and hi bounds.
16358 cat >"conftest.$ac_ext" <<_ACEOF
16359 #line 16359 "configure"
16360 #include "confdefs.h"
16361 $ac_includes_default
16365 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
16370 rm -f "conftest.$ac_objext"
16371 if { (eval echo "$as_me:16371: \"$ac_compile\"") >&5
16372 (eval $ac_compile) 2>&5
16374 echo "$as_me:16374: \$? = $ac_status" >&5
16375 (exit "$ac_status"); } &&
16376 { ac_try='test -s "conftest.$ac_objext"'
16377 { (eval echo "$as_me:16377: \"$ac_try\"") >&5
16378 (eval $ac_try) 2>&5
16380 echo "$as_me:16380: \$? = $ac_status" >&5
16381 (exit "$ac_status"); }; }; then
16384 cat >"conftest.$ac_ext" <<_ACEOF
16385 #line 16385 "configure"
16386 #include "confdefs.h"
16387 $ac_includes_default
16391 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16396 rm -f "conftest.$ac_objext"
16397 if { (eval echo "$as_me:16397: \"$ac_compile\"") >&5
16398 (eval $ac_compile) 2>&5
16400 echo "$as_me:16400: \$? = $ac_status" >&5
16401 (exit "$ac_status"); } &&
16402 { ac_try='test -s "conftest.$ac_objext"'
16403 { (eval echo "$as_me:16403: \"$ac_try\"") >&5
16404 (eval $ac_try) 2>&5
16406 echo "$as_me:16406: \$? = $ac_status" >&5
16407 (exit "$ac_status"); }; }; then
16408 ac_hi=$ac_mid; break
16410 echo "$as_me: failed program was:" >&5
16411 cat "conftest.$ac_ext" >&5
16412 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
16414 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16417 echo "$as_me: failed program was:" >&5
16418 cat "conftest.$ac_ext" >&5
16421 cat >"conftest.$ac_ext" <<_ACEOF
16422 #line 16422 "configure"
16423 #include "confdefs.h"
16424 $ac_includes_default
16428 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
16433 rm -f "conftest.$ac_objext"
16434 if { (eval echo "$as_me:16434: \"$ac_compile\"") >&5
16435 (eval $ac_compile) 2>&5
16437 echo "$as_me:16437: \$? = $ac_status" >&5
16438 (exit "$ac_status"); } &&
16439 { ac_try='test -s "conftest.$ac_objext"'
16440 { (eval echo "$as_me:16440: \"$ac_try\"") >&5
16441 (eval $ac_try) 2>&5
16443 echo "$as_me:16443: \$? = $ac_status" >&5
16444 (exit "$ac_status"); }; }; then
16445 ac_lo=$ac_mid; break
16447 echo "$as_me: failed program was:" >&5
16448 cat "conftest.$ac_ext" >&5
16449 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
16451 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16454 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16455 # Binary search between lo and hi bounds.
16456 while test "x$ac_lo" != "x$ac_hi"; do
16457 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
16458 cat >"conftest.$ac_ext" <<_ACEOF
16459 #line 16459 "configure"
16460 #include "confdefs.h"
16461 $ac_includes_default
16465 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16470 rm -f "conftest.$ac_objext"
16471 if { (eval echo "$as_me:16471: \"$ac_compile\"") >&5
16472 (eval $ac_compile) 2>&5
16474 echo "$as_me:16474: \$? = $ac_status" >&5
16475 (exit "$ac_status"); } &&
16476 { ac_try='test -s "conftest.$ac_objext"'
16477 { (eval echo "$as_me:16477: \"$ac_try\"") >&5
16478 (eval $ac_try) 2>&5
16480 echo "$as_me:16480: \$? = $ac_status" >&5
16481 (exit "$ac_status"); }; }; then
16484 echo "$as_me: failed program was:" >&5
16485 cat "conftest.$ac_ext" >&5
16486 ac_lo=`expr "$ac_mid" + 1`
16488 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16490 ac_cv_sizeof_signed_char=$ac_lo
16492 if test "$cross_compiling" = yes; then
16493 { { echo "$as_me:16493: error: cannot run test program while cross compiling" >&5
16494 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16495 { (exit 1); exit 1; }; }
16497 cat >"conftest.$ac_ext" <<_ACEOF
16498 #line 16498 "configure"
16499 #include "confdefs.h"
16500 $ac_includes_default
16504 FILE *f = fopen ("conftest.val", "w");
16506 $ac_main_return (1);
16507 fprintf (f, "%ld", (long)(sizeof (signed char)));
16513 rm -f "conftest$ac_exeext"
16514 if { (eval echo "$as_me:16514: \"$ac_link\"") >&5
16515 (eval $ac_link) 2>&5
16517 echo "$as_me:16517: \$? = $ac_status" >&5
16518 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16519 { (eval echo "$as_me:16519: \"$ac_try\"") >&5
16520 (eval $ac_try) 2>&5
16522 echo "$as_me:16522: \$? = $ac_status" >&5
16523 (exit "$ac_status"); }; }; then
16524 ac_cv_sizeof_signed_char=`cat conftest.val`
16526 echo "$as_me: program exited with status $ac_status" >&5
16527 echo "$as_me: failed program was:" >&5
16528 cat "conftest.$ac_ext" >&5
16530 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16535 ac_cv_sizeof_signed_char=0
16538 echo "$as_me:16538: result: $ac_cv_sizeof_signed_char" >&5
16539 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
16540 cat >>confdefs.h <<EOF
16541 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
16544 echo "$as_me:16544: checking for ANSI C header files" >&5
16545 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16546 if test "${ac_cv_header_stdc+set}" = set; then
16547 echo $ECHO_N "(cached) $ECHO_C" >&6
16549 cat >"conftest.$ac_ext" <<_ACEOF
16550 #line 16550 "configure"
16551 #include "confdefs.h"
16552 #include <stdlib.h>
16553 #include <stdarg.h>
16554 #include <string.h>
16558 if { (eval echo "$as_me:16558: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16559 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16561 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16563 cat conftest.err >&5
16564 echo "$as_me:16564: \$? = $ac_status" >&5
16565 (exit "$ac_status"); } >/dev/null; then
16566 if test -s conftest.err; then
16567 ac_cpp_err=$ac_c_preproc_warn_flag
16574 if test -z "$ac_cpp_err"; then
16575 ac_cv_header_stdc=yes
16577 echo "$as_me: failed program was:" >&5
16578 cat "conftest.$ac_ext" >&5
16579 ac_cv_header_stdc=no
16581 rm -f conftest.err "conftest.$ac_ext"
16583 if test $ac_cv_header_stdc = yes; then
16584 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16585 cat >"conftest.$ac_ext" <<_ACEOF
16586 #line 16586 "configure"
16587 #include "confdefs.h"
16588 #include <string.h>
16591 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16592 $EGREP "memchr" >/dev/null 2>&1; then
16595 ac_cv_header_stdc=no
16601 if test $ac_cv_header_stdc = yes; then
16602 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16603 cat >"conftest.$ac_ext" <<_ACEOF
16604 #line 16604 "configure"
16605 #include "confdefs.h"
16606 #include <stdlib.h>
16609 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16610 $EGREP "free" >/dev/null 2>&1; then
16613 ac_cv_header_stdc=no
16619 if test $ac_cv_header_stdc = yes; then
16620 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16621 if test "$cross_compiling" = yes; then
16624 cat >"conftest.$ac_ext" <<_ACEOF
16625 #line 16625 "configure"
16626 #include "confdefs.h"
16628 #if ((' ' & 0x0FF) == 0x020)
16629 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16630 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16632 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16633 || ('j' <= (c) && (c) <= 'r') \
16634 || ('s' <= (c) && (c) <= 'z'))
16635 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16638 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16643 for (i = 0; i < 256; i++)
16644 if (XOR (islower (i), ISLOWER (i))
16645 || toupper (i) != TOUPPER (i))
16646 $ac_main_return(2);
16647 $ac_main_return (0);
16650 rm -f "conftest$ac_exeext"
16651 if { (eval echo "$as_me:16651: \"$ac_link\"") >&5
16652 (eval $ac_link) 2>&5
16654 echo "$as_me:16654: \$? = $ac_status" >&5
16655 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16656 { (eval echo "$as_me:16656: \"$ac_try\"") >&5
16657 (eval $ac_try) 2>&5
16659 echo "$as_me:16659: \$? = $ac_status" >&5
16660 (exit "$ac_status"); }; }; then
16663 echo "$as_me: program exited with status $ac_status" >&5
16664 echo "$as_me: failed program was:" >&5
16665 cat "conftest.$ac_ext" >&5
16666 ac_cv_header_stdc=no
16668 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16672 echo "$as_me:16672: result: $ac_cv_header_stdc" >&5
16673 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16674 if test $ac_cv_header_stdc = yes; then
16676 cat >>confdefs.h <<\EOF
16677 #define STDC_HEADERS 1
16682 ac_header_dirent=no
16683 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16684 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16685 echo "$as_me:16685: checking for $ac_hdr that defines DIR" >&5
16686 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16687 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16688 echo $ECHO_N "(cached) $ECHO_C" >&6
16690 cat >"conftest.$ac_ext" <<_ACEOF
16691 #line 16691 "configure"
16692 #include "confdefs.h"
16693 #include <sys/types.h>
16705 rm -f "conftest.$ac_objext"
16706 if { (eval echo "$as_me:16706: \"$ac_compile\"") >&5
16707 (eval $ac_compile) 2>&5
16709 echo "$as_me:16709: \$? = $ac_status" >&5
16710 (exit "$ac_status"); } &&
16711 { ac_try='test -s "conftest.$ac_objext"'
16712 { (eval echo "$as_me:16712: \"$ac_try\"") >&5
16713 (eval $ac_try) 2>&5
16715 echo "$as_me:16715: \$? = $ac_status" >&5
16716 (exit "$ac_status"); }; }; then
16717 eval "$as_ac_Header=yes"
16719 echo "$as_me: failed program was:" >&5
16720 cat "conftest.$ac_ext" >&5
16721 eval "$as_ac_Header=no"
16723 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16725 echo "$as_me:16725: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16726 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16727 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16728 cat >>confdefs.h <<EOF
16729 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16732 ac_header_dirent=$ac_hdr; break
16736 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
16737 if test $ac_header_dirent = dirent.h; then
16738 echo "$as_me:16738: checking for opendir in -ldir" >&5
16739 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
16740 if test "${ac_cv_lib_dir_opendir+set}" = set; then
16741 echo $ECHO_N "(cached) $ECHO_C" >&6
16743 ac_check_lib_save_LIBS=$LIBS
16745 cat >"conftest.$ac_ext" <<_ACEOF
16746 #line 16746 "configure"
16747 #include "confdefs.h"
16749 /* Override any gcc2 internal prototype to avoid an error. */
16753 /* We use char because int might match the return type of a gcc2
16754 builtin and then its argument prototype would still apply. */
16764 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16765 if { (eval echo "$as_me:16765: \"$ac_link\"") >&5
16766 (eval $ac_link) 2>&5
16768 echo "$as_me:16768: \$? = $ac_status" >&5
16769 (exit "$ac_status"); } &&
16770 { ac_try='test -s "conftest$ac_exeext"'
16771 { (eval echo "$as_me:16771: \"$ac_try\"") >&5
16772 (eval $ac_try) 2>&5
16774 echo "$as_me:16774: \$? = $ac_status" >&5
16775 (exit "$ac_status"); }; }; then
16776 ac_cv_lib_dir_opendir=yes
16778 echo "$as_me: failed program was:" >&5
16779 cat "conftest.$ac_ext" >&5
16780 ac_cv_lib_dir_opendir=no
16782 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16783 LIBS=$ac_check_lib_save_LIBS
16785 echo "$as_me:16785: result: $ac_cv_lib_dir_opendir" >&5
16786 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
16787 if test "$ac_cv_lib_dir_opendir" = yes; then
16792 echo "$as_me:16792: checking for opendir in -lx" >&5
16793 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
16794 if test "${ac_cv_lib_x_opendir+set}" = set; then
16795 echo $ECHO_N "(cached) $ECHO_C" >&6
16797 ac_check_lib_save_LIBS=$LIBS
16799 cat >"conftest.$ac_ext" <<_ACEOF
16800 #line 16800 "configure"
16801 #include "confdefs.h"
16803 /* Override any gcc2 internal prototype to avoid an error. */
16807 /* We use char because int might match the return type of a gcc2
16808 builtin and then its argument prototype would still apply. */
16818 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16819 if { (eval echo "$as_me:16819: \"$ac_link\"") >&5
16820 (eval $ac_link) 2>&5
16822 echo "$as_me:16822: \$? = $ac_status" >&5
16823 (exit "$ac_status"); } &&
16824 { ac_try='test -s "conftest$ac_exeext"'
16825 { (eval echo "$as_me:16825: \"$ac_try\"") >&5
16826 (eval $ac_try) 2>&5
16828 echo "$as_me:16828: \$? = $ac_status" >&5
16829 (exit "$ac_status"); }; }; then
16830 ac_cv_lib_x_opendir=yes
16832 echo "$as_me: failed program was:" >&5
16833 cat "conftest.$ac_ext" >&5
16834 ac_cv_lib_x_opendir=no
16836 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16837 LIBS=$ac_check_lib_save_LIBS
16839 echo "$as_me:16839: result: $ac_cv_lib_x_opendir" >&5
16840 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
16841 if test "$ac_cv_lib_x_opendir" = yes; then
16847 echo "$as_me:16847: checking whether time.h and sys/time.h may both be included" >&5
16848 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16849 if test "${ac_cv_header_time+set}" = set; then
16850 echo $ECHO_N "(cached) $ECHO_C" >&6
16852 cat >"conftest.$ac_ext" <<_ACEOF
16853 #line 16853 "configure"
16854 #include "confdefs.h"
16855 #include <sys/types.h>
16856 #include <sys/time.h>
16862 if ((struct tm *) 0)
16868 rm -f "conftest.$ac_objext"
16869 if { (eval echo "$as_me:16869: \"$ac_compile\"") >&5
16870 (eval $ac_compile) 2>&5
16872 echo "$as_me:16872: \$? = $ac_status" >&5
16873 (exit "$ac_status"); } &&
16874 { ac_try='test -s "conftest.$ac_objext"'
16875 { (eval echo "$as_me:16875: \"$ac_try\"") >&5
16876 (eval $ac_try) 2>&5
16878 echo "$as_me:16878: \$? = $ac_status" >&5
16879 (exit "$ac_status"); }; }; then
16880 ac_cv_header_time=yes
16882 echo "$as_me: failed program was:" >&5
16883 cat "conftest.$ac_ext" >&5
16884 ac_cv_header_time=no
16886 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16888 echo "$as_me:16888: result: $ac_cv_header_time" >&5
16889 echo "${ECHO_T}$ac_cv_header_time" >&6
16890 if test $ac_cv_header_time = yes; then
16892 cat >>confdefs.h <<\EOF
16893 #define TIME_WITH_SYS_TIME 1
16898 ### checks for compiler characteristics
16900 ac_cpp='$CPP $CPPFLAGS'
16901 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16902 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16903 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16904 ac_main_return="return"
16906 echo "$as_me:16906: checking for an ANSI C-conforming const" >&5
16907 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16908 if test "${ac_cv_c_const+set}" = set; then
16909 echo $ECHO_N "(cached) $ECHO_C" >&6
16911 cat >"conftest.$ac_ext" <<_ACEOF
16912 #line 16912 "configure"
16913 #include "confdefs.h"
16918 /* FIXME: Include the comments suggested by Paul. */
16919 #ifndef __cplusplus
16920 /* Ultrix mips cc rejects this. */
16921 typedef int charset[2];
16923 /* SunOS 4.1.1 cc rejects this. */
16924 char const *const *ccp;
16926 /* NEC SVR4.0.2 mips cc rejects this. */
16927 struct point {int x, y;};
16928 static struct point const zero = {0,0};
16929 /* AIX XL C 1.02.0.0 rejects this.
16930 It does not let you subtract one const X* pointer from another in
16931 an arm of an if-expression whose if-part is not a constant
16933 const char *g = "string";
16934 ccp = &g + (g ? g-g : 0);
16935 /* HPUX 7.0 cc rejects these. */
16938 ccp = (char const *const *) p;
16939 { /* SCO 3.2v4 cc rejects this. */
16941 char const *s = 0 ? (char *) 0 : (char const *) 0;
16945 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
16946 int x[] = {25, 17};
16947 const int *foo = &x[0];
16950 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16951 typedef const int *iptr;
16955 { /* AIX XL C 1.02.0.0 rejects this saying
16956 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16957 struct s { int j; const int *ap[3]; };
16958 struct s *b; b->j = 5;
16960 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16961 const int foo = 10;
16969 rm -f "conftest.$ac_objext"
16970 if { (eval echo "$as_me:16970: \"$ac_compile\"") >&5
16971 (eval $ac_compile) 2>&5
16973 echo "$as_me:16973: \$? = $ac_status" >&5
16974 (exit "$ac_status"); } &&
16975 { ac_try='test -s "conftest.$ac_objext"'
16976 { (eval echo "$as_me:16976: \"$ac_try\"") >&5
16977 (eval $ac_try) 2>&5
16979 echo "$as_me:16979: \$? = $ac_status" >&5
16980 (exit "$ac_status"); }; }; then
16983 echo "$as_me: failed program was:" >&5
16984 cat "conftest.$ac_ext" >&5
16987 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16989 echo "$as_me:16989: result: $ac_cv_c_const" >&5
16990 echo "${ECHO_T}$ac_cv_c_const" >&6
16991 if test $ac_cv_c_const = no; then
16993 cat >>confdefs.h <<\EOF
16999 ### Checks for external-data
17001 echo "$as_me:17001: checking if data-only library module links" >&5
17002 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
17003 if test "${cf_cv_link_dataonly+set}" = set; then
17004 echo $ECHO_N "(cached) $ECHO_C" >&6
17008 cat >conftest.$ac_ext <<EOF
17009 #line 17009 "configure"
17010 int testdata[3] = { 123, 456, 789 };
17012 if { (eval echo "$as_me:17012: \"$ac_compile\"") >&5
17013 (eval $ac_compile) 2>&5
17015 echo "$as_me:17015: \$? = $ac_status" >&5
17016 (exit "$ac_status"); } ; then
17017 mv conftest.o data.o && \
17018 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
17020 rm -f conftest.$ac_ext data.o
17021 cat >conftest.$ac_ext <<EOF
17022 #line 17022 "configure"
17026 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
17028 extern int testdata[3];
17029 return testdata[0] == 123
17030 && testdata[1] == 456
17031 && testdata[2] == 789;
17035 if { (eval echo "$as_me:17035: \"$ac_compile\"") >&5
17036 (eval $ac_compile) 2>&5
17038 echo "$as_me:17038: \$? = $ac_status" >&5
17039 (exit "$ac_status"); }; then
17040 mv conftest.o func.o && \
17041 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17043 rm -f conftest.$ac_ext func.o
17044 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17045 cf_saveLIBS="$LIBS"
17046 LIBS="conftest.a $LIBS"
17047 if test "$cross_compiling" = yes; then
17048 cf_cv_link_dataonly=unknown
17050 cat >"conftest.$ac_ext" <<_ACEOF
17051 #line 17051 "configure"
17052 #include "confdefs.h"
17056 extern int testfunc();
17057 ${cf_cv_main_return:-return} (!testfunc());
17061 rm -f "conftest$ac_exeext"
17062 if { (eval echo "$as_me:17062: \"$ac_link\"") >&5
17063 (eval $ac_link) 2>&5
17065 echo "$as_me:17065: \$? = $ac_status" >&5
17066 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17067 { (eval echo "$as_me:17067: \"$ac_try\"") >&5
17068 (eval $ac_try) 2>&5
17070 echo "$as_me:17070: \$? = $ac_status" >&5
17071 (exit "$ac_status"); }; }; then
17072 cf_cv_link_dataonly=yes
17074 echo "$as_me: program exited with status $ac_status" >&5
17075 echo "$as_me: failed program was:" >&5
17076 cat "conftest.$ac_ext" >&5
17077 cf_cv_link_dataonly=no
17079 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17081 LIBS="$cf_saveLIBS"
17085 echo "$as_me:17085: result: $cf_cv_link_dataonly" >&5
17086 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17088 if test "$cf_cv_link_dataonly" = no ; then
17090 cat >>confdefs.h <<\EOF
17091 #define BROKEN_LINKER 1
17097 ### Checks for library functions.
17103 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17104 echo "$as_me:17104: checking for $ac_header" >&5
17105 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17106 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17107 echo $ECHO_N "(cached) $ECHO_C" >&6
17109 cat >"conftest.$ac_ext" <<_ACEOF
17110 #line 17110 "configure"
17111 #include "confdefs.h"
17112 #include <$ac_header>
17114 if { (eval echo "$as_me:17114: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17115 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17117 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17119 cat conftest.err >&5
17120 echo "$as_me:17120: \$? = $ac_status" >&5
17121 (exit "$ac_status"); } >/dev/null; then
17122 if test -s conftest.err; then
17123 ac_cpp_err=$ac_c_preproc_warn_flag
17130 if test -z "$ac_cpp_err"; then
17131 eval "$as_ac_Header=yes"
17133 echo "$as_me: failed program was:" >&5
17134 cat "conftest.$ac_ext" >&5
17135 eval "$as_ac_Header=no"
17137 rm -f conftest.err "conftest.$ac_ext"
17139 echo "$as_me:17139: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17140 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17141 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17142 cat >>confdefs.h <<EOF
17143 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17149 echo "$as_me:17149: checking for working mkstemp" >&5
17150 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17151 if test "${cf_cv_func_mkstemp+set}" = set; then
17152 echo $ECHO_N "(cached) $ECHO_C" >&6
17156 if test "$cross_compiling" = yes; then
17157 cf_cv_func_mkstemp=maybe
17159 cat >"conftest.$ac_ext" <<_ACEOF
17160 #line 17160 "configure"
17161 #include "confdefs.h"
17163 #include <sys/types.h>
17164 #ifdef HAVE_UNISTD_H
17165 #include <unistd.h>
17167 #include <stdlib.h>
17169 #include <string.h>
17170 #include <sys/stat.h>
17173 char *tmpl = "conftestXXXXXX";
17181 for (n = 0; n < 2; ++n) {
17182 strcpy(name[n], tmpl);
17183 if ((fd = mkstemp(name[n])) >= 0) {
17184 if (!strcmp(name[n], tmpl)
17185 || stat(name[n], &sb) != 0
17186 || (sb.st_mode & S_IFMT) != S_IFREG
17187 || (sb.st_mode & 077) != 0) {
17194 && !strcmp(name[0], name[1]))
17196 ${cf_cv_main_return:-return}(result);
17200 rm -f "conftest$ac_exeext"
17201 if { (eval echo "$as_me:17201: \"$ac_link\"") >&5
17202 (eval $ac_link) 2>&5
17204 echo "$as_me:17204: \$? = $ac_status" >&5
17205 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17206 { (eval echo "$as_me:17206: \"$ac_try\"") >&5
17207 (eval $ac_try) 2>&5
17209 echo "$as_me:17209: \$? = $ac_status" >&5
17210 (exit "$ac_status"); }; }; then
17211 cf_cv_func_mkstemp=yes
17214 echo "$as_me: program exited with status $ac_status" >&5
17215 echo "$as_me: failed program was:" >&5
17216 cat "conftest.$ac_ext" >&5
17217 cf_cv_func_mkstemp=no
17220 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17224 echo "$as_me:17224: result: $cf_cv_func_mkstemp" >&5
17225 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17226 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17227 echo "$as_me:17227: checking for mkstemp" >&5
17228 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17229 if test "${ac_cv_func_mkstemp+set}" = set; then
17230 echo $ECHO_N "(cached) $ECHO_C" >&6
17232 cat >"conftest.$ac_ext" <<_ACEOF
17233 #line 17233 "configure"
17234 #include "confdefs.h"
17235 #define mkstemp autoconf_temporary
17236 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17243 /* We use char because int might match the return type of a gcc2
17244 builtin and then its argument prototype would still apply. */
17245 char mkstemp (void);
17251 /* The GNU C library defines stubs for functions which it implements
17252 to always fail with ENOSYS. Some functions are actually named
17253 something starting with __ and the normal name is an alias. */
17254 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17255 #error found stub for mkstemp
17263 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17264 if { (eval echo "$as_me:17264: \"$ac_link\"") >&5
17265 (eval $ac_link) 2>&5
17267 echo "$as_me:17267: \$? = $ac_status" >&5
17268 (exit "$ac_status"); } &&
17269 { ac_try='test -s "conftest$ac_exeext"'
17270 { (eval echo "$as_me:17270: \"$ac_try\"") >&5
17271 (eval $ac_try) 2>&5
17273 echo "$as_me:17273: \$? = $ac_status" >&5
17274 (exit "$ac_status"); }; }; then
17275 ac_cv_func_mkstemp=yes
17277 echo "$as_me: failed program was:" >&5
17278 cat "conftest.$ac_ext" >&5
17279 ac_cv_func_mkstemp=no
17281 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17283 echo "$as_me:17283: result: $ac_cv_func_mkstemp" >&5
17284 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17287 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17289 cat >>confdefs.h <<\EOF
17290 #define HAVE_MKSTEMP 1
17295 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17296 CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17297 CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17301 if test "$cf_with_ada" != "no" ; then
17303 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
17306 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17308 unset ac_cv_path_cf_TEMP_gnat
17310 # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
17311 set dummy $cf_prog_gnat; ac_word=$2
17312 echo "$as_me:17312: checking for $ac_word" >&5
17313 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17314 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
17315 echo $ECHO_N "(cached) $ECHO_C" >&6
17317 case $cf_TEMP_gnat in
17319 ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
17322 ac_save_IFS=$IFS; IFS=$ac_path_separator
17324 for ac_dir in $ac_dummy; do
17326 test -z "$ac_dir" && ac_dir=.
17327 if $as_executable_p "$ac_dir/$ac_word"; then
17328 ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
17329 echo "$as_me:17329: found $ac_dir/$ac_word" >&5
17334 test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
17338 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
17340 if test -n "$cf_TEMP_gnat"; then
17341 echo "$as_me:17341: result: $cf_TEMP_gnat" >&5
17342 echo "${ECHO_T}$cf_TEMP_gnat" >&6
17344 echo "$as_me:17344: result: no" >&5
17345 echo "${ECHO_T}no" >&6
17348 eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
17350 if test "x$cf_TEMP_gnat" != xno; then
17351 unset cf_cv_gnat_version
17354 echo "$as_me:17354: checking for $cf_prog_gnat version" >&5
17355 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
17356 if test "${cf_cv_gnat_version+set}" = set; then
17357 echo $ECHO_N "(cached) $ECHO_C" >&6
17360 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
17361 grep '[0-9].[0-9][0-9]*' |\
17362 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17365 echo "$as_me:17365: result: $cf_cv_gnat_version" >&5
17366 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17367 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17368 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
17371 eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
17374 unset cf_cv_gnat_version
17375 unset ac_cv_path_cf_TEMP_gnat
17378 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
17380 cf_cv_prog_gnat_correct=no
17382 cf_ada_make=gnatmake
17383 if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
17384 # gprconfig is newer than gnatmake; we can continue...
17387 rm -rf ./conftest* ./*~conftest*
17388 if mkdir conftest.src
17392 for cf_gprconfig in Ada C
17394 echo "$as_me:17394: checking for gprconfig name for $cf_gprconfig" >&5
17395 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
17396 if test "$cf_gprconfig" = C
17398 for cf_gprconfig_param in \
17399 "$cf_gprconfig,,,,GNATGCC" \
17400 "$cf_gprconfig,,,,GCC" \
17403 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17404 test -n "$cf_gprconfig_value" && break
17407 cf_gprconfig_param=$cf_gprconfig
17408 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17410 if test -n "$cf_gprconfig_value"
17412 eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
17413 echo "$as_me:17413: result: $cf_gprconfig_value" >&5
17414 echo "${ECHO_T}$cf_gprconfig_value" >&6
17416 echo "$as_me:17416: result: missing" >&5
17417 echo "${ECHO_T}missing" >&6
17423 rm -rf ./conftest* ./*~conftest*
17426 if test "x$cf_ada_config" != "x#"
17429 echo "$as_me:17429: checking for gnat version" >&5
17430 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17431 if test "${cf_cv_gnat_version+set}" = set; then
17432 echo $ECHO_N "(cached) $ECHO_C" >&6
17435 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
17436 grep '[0-9].[0-9][0-9]*' |\
17437 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17440 echo "$as_me:17440: result: $cf_cv_gnat_version" >&5
17441 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17442 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17444 case "$cf_cv_gnat_version" in
17445 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17446 cf_cv_prog_gnat_correct=yes
17449 { echo "$as_me:17449: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
17450 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
17451 cf_cv_prog_gnat_correct=no
17455 # Extract the first word of "m4", so it can be a program name with args.
17456 set dummy m4; ac_word=$2
17457 echo "$as_me:17457: checking for $ac_word" >&5
17458 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17459 if test "${ac_cv_prog_M4_exists+set}" = set; then
17460 echo $ECHO_N "(cached) $ECHO_C" >&6
17462 if test -n "$M4_exists"; then
17463 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17465 ac_save_IFS=$IFS; IFS=$ac_path_separator
17467 for ac_dir in $ac_dummy; do
17469 test -z "$ac_dir" && ac_dir=.
17470 $as_executable_p "$ac_dir/$ac_word" || continue
17471 ac_cv_prog_M4_exists="yes"
17472 echo "$as_me:17472: found $ac_dir/$ac_word" >&5
17476 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17479 M4_exists=$ac_cv_prog_M4_exists
17480 if test -n "$M4_exists"; then
17481 echo "$as_me:17481: result: $M4_exists" >&5
17482 echo "${ECHO_T}$M4_exists" >&6
17484 echo "$as_me:17484: result: no" >&5
17485 echo "${ECHO_T}no" >&6
17488 if test "$ac_cv_prog_M4_exists" = no; then
17489 cf_cv_prog_gnat_correct=no
17490 { echo "$as_me:17490: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
17491 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
17493 if test "$cf_cv_prog_gnat_correct" = yes; then
17494 echo "$as_me:17494: checking if GNAT works" >&5
17495 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17497 rm -rf ./conftest* ./*~conftest*
17498 cat >>conftest.ads <<CF_EOF
17499 procedure conftest;
17501 cat >>conftest.adb <<CF_EOF
17504 procedure conftest is
17506 Text_IO.Put ("Hello World");
17508 GNAT.OS_Lib.OS_Exit (0);
17511 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17512 if ( ./conftest 1>&5 2>&1 ) ; then
17513 cf_cv_prog_gnat_correct=yes
17515 cf_cv_prog_gnat_correct=no
17518 cf_cv_prog_gnat_correct=no
17520 rm -rf ./conftest* ./*~conftest*
17522 echo "$as_me:17522: result: $cf_cv_prog_gnat_correct" >&5
17523 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17526 cf_cv_prog_gnat_correct=no
17530 if test "$cf_cv_prog_gnat_correct" = yes; then
17532 echo "$as_me:17532: checking optimization options for ADAFLAGS" >&5
17533 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
17537 ADAFLAGS="$ADAFLAGS -g"
17543 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
17545 ADAFLAGS="$ADAFLAGS $cf_O_flag"
17549 echo "$as_me:17549: result: $ADAFLAGS" >&5
17550 echo "${ECHO_T}$ADAFLAGS" >&6
17552 echo "$as_me:17552: checking if GNATPREP supports -T option" >&5
17553 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
17554 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
17555 echo $ECHO_N "(cached) $ECHO_C" >&6
17558 cf_cv_gnatprep_opt_t=no
17559 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
17562 echo "$as_me:17562: result: $cf_cv_gnatprep_opt_t" >&5
17563 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
17564 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
17566 echo "$as_me:17566: checking if GNAT supports generics" >&5
17567 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
17568 case "$cf_cv_gnat_version" in
17569 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17570 cf_gnat_generics=yes
17573 cf_gnat_generics=no
17576 echo "$as_me:17576: result: $cf_gnat_generics" >&5
17577 echo "${ECHO_T}$cf_gnat_generics" >&6
17579 if test "$cf_gnat_generics" = yes
17581 cf_compile_generics=generics
17582 cf_generic_objects="\${GENOBJS}"
17584 cf_compile_generics=
17585 cf_generic_objects=
17588 echo "$as_me:17588: checking if GNAT supports SIGINT" >&5
17589 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
17590 if test "${cf_cv_gnat_sigint+set}" = set; then
17591 echo $ECHO_N "(cached) $ECHO_C" >&6
17594 rm -rf ./conftest* ./*~conftest*
17595 cat >>conftest.ads <<CF_EOF
17596 with Ada.Interrupts.Names;
17598 package ConfTest is
17600 pragma Warnings (Off); -- the next pragma exists since 3.11p
17601 pragma Unreserve_All_Interrupts;
17602 pragma Warnings (On);
17604 protected Process is
17606 function Continue return Boolean;
17607 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
17609 Done : Boolean := False;
17614 cat >>conftest.adb <<CF_EOF
17615 package body ConfTest is
17616 protected body Process is
17621 function Continue return Boolean is
17628 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17629 cf_cv_gnat_sigint=yes
17631 cf_cv_gnat_sigint=no
17633 rm -rf ./conftest* ./*~conftest*
17636 echo "$as_me:17636: result: $cf_cv_gnat_sigint" >&5
17637 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
17639 if test "$cf_cv_gnat_sigint" = yes ; then
17642 USE_GNAT_SIGINT="#"
17645 cf_gnat_libraries=no
17646 cf_gnat_projects=no
17648 if test "$enable_gnat_projects" != no ; then
17649 echo "$as_me:17649: checking if GNAT supports project files" >&5
17650 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
17651 case "$cf_cv_gnat_version" in
17655 case "$cf_cv_system_name" in
17659 rm -rf ./conftest* ./*~conftest*
17660 if mkdir conftest.src conftest.bin conftest.lib
17663 rm -rf ./conftest* ./*~conftest*
17664 cat >>library.gpr <<CF_EOF
17666 Kind := External ("LIB_KIND");
17667 for Library_Name use "ConfTest";
17668 for Object_Dir use ".";
17669 for Library_ALI_Dir use External("LIBRARY_DIR");
17670 for Library_Version use External ("SONAME");
17671 for Library_Kind use Kind;
17672 for Library_Dir use External("BUILD_DIR");
17673 Source_Dir := External ("SOURCE_DIR");
17674 for Source_Dirs use (Source_Dir);
17677 cat >>confpackage.ads <<CF_EOF
17678 package ConfPackage is
17679 procedure conftest;
17682 cat >>confpackage.adb <<CF_EOF
17684 package body ConfPackage is
17685 procedure conftest is
17687 Text_IO.Put ("Hello World");
17692 if ( "$cf_ada_make" $ADAFLAGS \
17694 -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
17695 -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
17696 -XSOURCE_DIR="`pwd`" \
17697 -XSONAME=libConfTest.so.1 \
17698 -XLIB_KIND=static 1>&5 2>&1 ) ; then
17699 cf_gnat_projects=yes
17703 if test -f conftest.lib/confpackage.ali
17705 cf_gnat_libraries=yes
17707 rm -rf ./conftest* ./*~conftest*
17712 echo "$as_me:17712: result: $cf_gnat_projects" >&5
17713 echo "${ECHO_T}$cf_gnat_projects" >&6
17714 fi # enable_gnat_projects
17716 if test "$cf_gnat_projects" = yes
17718 echo "$as_me:17718: checking if GNAT supports libraries" >&5
17719 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
17720 echo "$as_me:17720: result: $cf_gnat_libraries" >&5
17721 echo "${ECHO_T}$cf_gnat_libraries" >&6
17724 USE_OLD_MAKERULES=""
17725 USE_GNAT_PROJECTS="#"
17726 USE_GNAT_MAKE_GPR="#"
17727 USE_GNAT_GPRBUILD="#"
17729 if test "$cf_gnat_projects" = yes
17731 USE_OLD_MAKERULES="#"
17732 USE_GNAT_PROJECTS=""
17733 if test "$cf_cv_VERSION_GPRBUILD" != no
17735 USE_GNAT_GPRBUILD=""
17736 elif test "$cf_cv_VERSION_GNATMAKE" != no
17738 USE_GNAT_MAKE_GPR=""
17740 { echo "$as_me:17740: WARNING: use old makefile rules since tools are missing" >&5
17741 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
17745 if test "$cf_gnat_libraries" = yes
17747 USE_GNAT_LIBRARIES=""
17749 USE_GNAT_LIBRARIES="#"
17752 echo "$as_me:17752: checking for ada-compiler" >&5
17753 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
17755 # Check whether --with-ada-compiler or --without-ada-compiler was given.
17756 if test "${with_ada_compiler+set}" = set; then
17757 withval="$with_ada_compiler"
17758 cf_ada_compiler=$withval
17760 cf_ada_compiler=gnatmake
17763 echo "$as_me:17763: result: $cf_ada_compiler" >&5
17764 echo "${ECHO_T}$cf_ada_compiler" >&6
17766 cf_ada_package=terminal_interface
17768 echo "$as_me:17768: checking for ada-include" >&5
17769 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
17771 # Check whether --with-ada-include or --without-ada-include was given.
17772 if test "${with_ada_include+set}" = set; then
17773 withval="$with_ada_include"
17776 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
17777 fi; if test -n "$prefix/share/ada/adainclude" ; then
17779 if test "x$prefix" != xNONE; then
17780 cf_path_syntax="$prefix"
17782 cf_path_syntax="$ac_default_prefix"
17785 case ".$withval" in
17786 (.\$\(*\)*|.\'*\'*)
17790 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17792 (.\$\{*prefix\}*|.\$\{*dir\}*)
17793 eval withval="$withval"
17794 case ".$withval" in
17796 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17801 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17804 { { echo "$as_me:17804: error: expected a pathname, not \"$withval\"" >&5
17805 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17806 { (exit 1); exit 1; }; }
17811 eval ADA_INCLUDE="$withval"
17813 echo "$as_me:17813: result: $ADA_INCLUDE" >&5
17814 echo "${ECHO_T}$ADA_INCLUDE" >&6
17816 echo "$as_me:17816: checking for ada-objects" >&5
17817 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
17819 # Check whether --with-ada-objects or --without-ada-objects was given.
17820 if test "${with_ada_objects+set}" = set; then
17821 withval="$with_ada_objects"
17824 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
17825 fi; if test -n "$prefix/lib/ada/adalib" ; then
17827 if test "x$prefix" != xNONE; then
17828 cf_path_syntax="$prefix"
17830 cf_path_syntax="$ac_default_prefix"
17833 case ".$withval" in
17834 (.\$\(*\)*|.\'*\'*)
17838 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17840 (.\$\{*prefix\}*|.\$\{*dir\}*)
17841 eval withval="$withval"
17842 case ".$withval" in
17844 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17849 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17852 { { echo "$as_me:17852: error: expected a pathname, not \"$withval\"" >&5
17853 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17854 { (exit 1); exit 1; }; }
17859 eval ADA_OBJECTS="$withval"
17861 echo "$as_me:17861: result: $ADA_OBJECTS" >&5
17862 echo "${ECHO_T}$ADA_OBJECTS" >&6
17864 echo "$as_me:17864: checking if an Ada95 shared-library should be built" >&5
17865 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
17867 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
17868 if test "${with_ada_sharedlib+set}" = set; then
17869 withval="$with_ada_sharedlib"
17870 with_ada_sharedlib=$withval
17872 with_ada_sharedlib=no
17874 echo "$as_me:17874: result: $with_ada_sharedlib" >&5
17875 echo "${ECHO_T}$with_ada_sharedlib" >&6
17877 if test "x$with_ada_sharedlib" != xno
17879 if test "x$cf_gnat_projects" != xyes
17881 { echo "$as_me:17881: WARNING: disabling shared-library since GNAT projects are not supported" >&5
17882 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
17883 with_ada_sharedlib=no
17887 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
17888 MAKE_ADA_SHAREDLIB="#"
17890 if test "x$with_ada_sharedlib" != xno
17892 MAKE_ADA_SHAREDLIB=
17893 if test "x$with_ada_sharedlib" != xyes
17895 ADA_SHAREDLIB="$with_ada_sharedlib"
17899 # allow the Ada binding to be renamed
17901 echo "$as_me:17901: checking for ada-libname" >&5
17902 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
17904 # Check whether --with-ada-libname or --without-ada-libname was given.
17905 if test "${with_ada_libname+set}" = set; then
17906 withval="$with_ada_libname"
17907 ADA_LIBNAME=$withval
17909 ADA_LIBNAME=AdaCurses
17911 case "x$ADA_LIBNAME" in
17913 ADA_LIBNAME=AdaCurses
17917 echo "$as_me:17917: result: $ADA_LIBNAME" >&5
17918 echo "${ECHO_T}$ADA_LIBNAME" >&6
17921 { { echo "$as_me:17921: error: No usable Ada compiler found" >&5
17922 echo "$as_me: error: No usable Ada compiler found" >&2;}
17923 { (exit 1); exit 1; }; }
17926 { { echo "$as_me:17926: error: The Ada compiler is needed for this package" >&5
17927 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
17928 { (exit 1); exit 1; }; }
17931 ################################################################################
17938 ### Construct the list of include-directories to be generated
17940 if test "$srcdir" != "."; then
17941 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
17943 CPPFLAGS="-I../include $CPPFLAGS"
17944 if test "$srcdir" != "."; then
17945 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
17947 CPPFLAGS="-I. $CPPFLAGS"
17949 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
17950 if test "$srcdir" != "."; then
17951 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
17953 if test "$GCC" != yes; then
17954 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17955 elif test "$includedir" != "/usr/include"; then
17956 if test "$includedir" = '${prefix}/include' ; then
17957 if test x$prefix != x/usr ; then
17958 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17961 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17965 ### Build up pieces for makefile rules
17966 echo "$as_me:17966: checking default library suffix" >&5
17967 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
17969 case $DFT_LWR_MODEL in
17970 (libtool) DFT_ARG_SUFFIX='' ;;
17971 (normal) DFT_ARG_SUFFIX='' ;;
17972 (debug) DFT_ARG_SUFFIX='_g' ;;
17973 (profile) DFT_ARG_SUFFIX='_p' ;;
17974 (shared) DFT_ARG_SUFFIX='' ;;
17976 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
17977 echo "$as_me:17977: result: $DFT_ARG_SUFFIX" >&5
17978 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
17980 echo "$as_me:17980: checking default library-dependency suffix" >&5
17981 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
17983 case X$DFT_LWR_MODEL in
17985 DFT_LIB_SUFFIX='.la'
17986 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17989 case "$cf_cv_system_name" in
17991 DFT_LIB_SUFFIX='_g.lib'
17994 DFT_LIB_SUFFIX='_g.a'
17997 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18000 case "$cf_cv_system_name" in
18002 DFT_LIB_SUFFIX='_p.lib'
18005 DFT_LIB_SUFFIX='_p.a'
18008 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18011 case "$cf_cv_system_name" in
18013 DFT_LIB_SUFFIX='.so'
18014 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18017 DFT_LIB_SUFFIX='.dll'
18018 DFT_DEP_SUFFIX='.dll.lib'
18020 (cygwin*|msys*|mingw*)
18021 DFT_LIB_SUFFIX='.dll'
18022 DFT_DEP_SUFFIX='.dll.a'
18025 DFT_LIB_SUFFIX='.dylib'
18026 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18031 DFT_LIB_SUFFIX='.so'
18032 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18035 DFT_LIB_SUFFIX='.sl'
18036 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18041 DFT_LIB_SUFFIX='.so'
18042 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18049 DFT_LIB_SUFFIX='.lib'
18052 DFT_LIB_SUFFIX='.a'
18055 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18058 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
18060 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
18061 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
18063 echo "$as_me:18063: result: $DFT_DEP_SUFFIX" >&5
18064 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18066 echo "$as_me:18066: checking default object directory" >&5
18067 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18069 case $DFT_LWR_MODEL in
18070 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
18071 (normal) DFT_OBJ_SUBDIR='objects' ;;
18072 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
18073 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
18075 case "$cf_cv_system_name" in
18077 DFT_OBJ_SUBDIR='objects' ;;
18079 DFT_OBJ_SUBDIR='obj_s' ;;
18082 echo "$as_me:18082: result: $DFT_OBJ_SUBDIR" >&5
18083 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18085 ### Set up low-level terminfo dependencies for makefiles.
18087 if test "$DFT_LWR_MODEL" = shared ; then
18088 case $cf_cv_system_name in
18090 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18093 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
18098 USE_ARG_SUFFIX=${DFT_ARG_SUFFIX}
18100 USE_LIB_SUFFIX=${DFT_ARG_SUFFIX}
18102 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
18104 ### Construct the list of subdirectories for which we'll customize makefiles
18105 ### with the appropriate compile-rules.
18107 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
18109 cat >>confdefs.h <<EOF
18110 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18113 ################################################################################
18119 NCURSES_SHLIB2="sh -c"
18121 ADA_SUBDIRS="include gen src doc"
18122 if test "x$cf_with_tests" != "xno" ; then
18123 ADA_SUBDIRS="$ADA_SUBDIRS samples"
18125 for cf_dir in $ADA_SUBDIRS
18127 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18134 # match layout used by make-tar.sh
18135 ADAHTML_DIR=../doc/ada
18137 if test "x$cross_compiling" = xyes ; then
18138 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
18140 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
18143 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"
18144 ac_config_commands="$ac_config_commands default"
18145 cat >confcache <<\_ACEOF
18146 # This file is a shell script that caches the results of configure
18147 # tests run on this system so they can be shared between configure
18148 # scripts and configure runs, see configure's option --config-cache.
18149 # It is not useful on other systems. If it contains results you don't
18150 # want to keep, you may remove or edit it.
18152 # config.status only pays attention to the cache file if you give it
18153 # the --recheck option to rerun configure.
18155 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18156 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18157 # following values.
18161 # The following way of writing the cache mishandles newlines in values,
18162 # but we know of no workaround that is simple, portable, and efficient.
18163 # So, don't put newlines in cache variables' values.
18164 # Ultrix sh set writes to stderr and can't be redirected directly,
18165 # and sets the high bit in the cache file unless we assign to the vars.
18168 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18170 # `set' does not quote correctly, so add quotes (double-quote
18171 # substitution turns \\\\ into \\, and sed turns \\ into \).
18174 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18177 # `set' quotes correctly as required by POSIX, so do not add quotes.
18179 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18186 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18188 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18190 if cmp -s $cache_file confcache; then :; else
18191 if test -w $cache_file; then
18192 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18193 cat confcache >$cache_file
18195 echo "not updating unwritable cache $cache_file"
18200 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18201 # Let make expand exec_prefix.
18202 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18204 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18205 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18206 # trailing colons and then remove the whole line if VPATH becomes empty
18207 # (actually we leave an empty line to preserve line numbers).
18208 if test "x$srcdir" = x.; then
18209 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18210 s/:*\$(srcdir):*/:/;
18211 s/:*\${srcdir}:*/:/;
18213 s/^\([^=]*=[ ]*\):*/\1/;
18219 DEFS=-DHAVE_CONFIG_H
18221 : "${CONFIG_STATUS=./config.status}"
18222 ac_clean_files_save=$ac_clean_files
18223 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18224 { echo "$as_me:18224: creating $CONFIG_STATUS" >&5
18225 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18226 cat >"$CONFIG_STATUS" <<_ACEOF
18228 # Generated automatically by configure.
18229 # Run this file to recreate the current configuration.
18230 # Compiler output produced by configure, useful for debugging
18231 # configure, is in config.log if it exists.
18234 SHELL=\${CONFIG_SHELL-$SHELL}
18235 ac_cs_invocation="\$0 \$@"
18237 CLICOLOR_FORCE= GREP_OPTIONS=
18238 unset CLICOLOR_FORCE GREP_OPTIONS
18241 cat >>"$CONFIG_STATUS" <<\_ACEOF
18242 # Be Bourne compatible
18243 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18246 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18250 # Name of the executable.
18251 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18253 if expr a : '\(a\)' >/dev/null 2>&1; then
18259 rm -f conf$$ conf$$.exe conf$$.file
18261 if ln -s conf$$.file conf$$ 2>/dev/null; then
18262 # We could just check for DJGPP; but this test a) works b) is more generic
18263 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18264 if test -f conf$$.exe; then
18265 # Don't use ln at all; we don't have any links
18270 elif ln conf$$.file conf$$ 2>/dev/null; then
18275 rm -f conf$$ conf$$.exe conf$$.file
18277 as_executable_p="test -f"
18279 # Support unset when possible.
18280 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18287 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18288 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18289 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18290 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18291 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18292 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18293 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18294 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18297 # We need space, tab and new line, in precisely that order.
18303 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18309 # Files that config.status was made for.
18310 if test -n "$ac_config_files"; then
18311 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
18314 if test -n "$ac_config_headers"; then
18315 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
18318 if test -n "$ac_config_links"; then
18319 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
18322 if test -n "$ac_config_commands"; then
18323 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
18326 cat >>"$CONFIG_STATUS" <<\EOF
18329 \`$as_me' instantiates files from templates according to the
18330 current configuration.
18332 Usage: $0 [OPTIONS] [FILE]...
18334 -h, --help print this help, then exit
18335 -V, --version print version number, then exit
18336 -d, --debug don't remove temporary files
18337 --recheck update $as_me by reconfiguring in the same conditions
18338 --file=FILE[:TEMPLATE]
18339 instantiate the configuration file FILE
18340 --header=FILE[:TEMPLATE]
18341 instantiate the configuration header FILE
18343 Configuration files:
18346 Configuration headers:
18349 Configuration commands:
18352 Report bugs to <dickey@invisible-island.net>."
18355 cat >>"$CONFIG_STATUS" <<EOF
18358 configured by $0, generated by GNU Autoconf 2.52.20210509,
18359 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18361 Copyright 2003-2020,2021 Thomas E. Dickey
18362 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18363 Free Software Foundation, Inc.
18364 This config.status script is free software; the Free Software Foundation
18365 gives unlimited permission to copy, distribute and modify it."
18370 cat >>"$CONFIG_STATUS" <<\EOF
18371 # If no file are specified by the user, then we need to provide default
18372 # value. By we need to know if files were specified by the user.
18378 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18379 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18381 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18385 *) # This is not an option, so the user has probably given explicit
18387 ac_need_defaults=false;;
18391 # Handling of the options.
18393 cat >>"$CONFIG_STATUS" <<EOF
18394 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18395 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18396 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18398 cat >>"$CONFIG_STATUS" <<\EOF
18399 --version | --vers* | -V )
18400 echo "$ac_cs_version"; exit 0 ;;
18402 # Conflict between --help and --header
18403 { { echo "$as_me:18403: error: ambiguous option: $1
18404 Try \`$0 --help' for more information." >&5
18405 echo "$as_me: error: ambiguous option: $1
18406 Try \`$0 --help' for more information." >&2;}
18407 { (exit 1); exit 1; }; };;
18408 --help | --hel | -h )
18409 echo "$ac_cs_usage"; exit 0 ;;
18410 --debug | --d* | -d )
18412 --file | --fil | --fi | --f )
18414 CONFIG_FILES="$CONFIG_FILES $1"
18415 ac_need_defaults=false;;
18416 --header | --heade | --head | --hea )
18418 CONFIG_HEADERS="$CONFIG_HEADERS $1"
18419 ac_need_defaults=false;;
18421 # This is an error.
18422 -*) { { echo "$as_me:18422: error: unrecognized option: $1
18423 Try \`$0 --help' for more information." >&5
18424 echo "$as_me: error: unrecognized option: $1
18425 Try \`$0 --help' for more information." >&2;}
18426 { (exit 1); exit 1; }; } ;;
18428 *) ac_config_targets="$ac_config_targets $1" ;;
18437 ## ----------------------- ##
18438 ## Running config.status. ##
18439 ## ----------------------- ##
18441 This file was extended by $as_me 2.52.20210509, executed with
18442 CONFIG_FILES = $CONFIG_FILES
18443 CONFIG_HEADERS = $CONFIG_HEADERS
18444 CONFIG_LINKS = $CONFIG_LINKS
18445 CONFIG_COMMANDS = $CONFIG_COMMANDS
18446 > "$ac_cs_invocation"
18447 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18452 cat >>"$CONFIG_STATUS" <<EOF
18454 # INIT-COMMANDS section.
18457 ### Special initialization commands, used to pass information from the
18458 ### configuration-run into config.status
18461 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
18462 DFT_LWR_MODEL="$DFT_LWR_MODEL"
18463 LIB_NAME="$LIB_NAME"
18464 LIB_PREFIX="$LIB_PREFIX"
18465 LIB_SUFFIX="$LIB_SUFFIX"
18467 NCURSES_MAJOR="$NCURSES_MAJOR"
18468 NCURSES_MINOR="$NCURSES_MINOR"
18469 NCURSES_PATCH="$NCURSES_PATCH"
18470 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
18471 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
18472 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
18473 cf_cv_abi_version="$cf_cv_abi_version"
18474 cf_cv_rel_version="$cf_cv_rel_version"
18475 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
18476 cf_cv_shared_soname='$cf_cv_shared_soname'
18477 cf_cv_shlib_version="$cf_cv_shlib_version"
18478 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
18479 cf_cv_system_name="$cf_cv_system_name"
18485 cat >>"$CONFIG_STATUS" <<\EOF
18486 for ac_config_target in $ac_config_targets
18488 case "$ac_config_target" in
18489 # Handling of arguments.
18490 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
18491 "src/library.gpr" ) CONFIG_FILES="$CONFIG_FILES src/library.gpr:src/library.gpr.in" ;;
18492 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
18493 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18494 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18495 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
18496 *) { { echo "$as_me:18496: error: invalid argument: $ac_config_target" >&5
18497 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18498 { (exit 1); exit 1; }; };;
18502 # If the user did not use the arguments to specify the items to instantiate,
18503 # then the envvar interface is used. Set only those that are not.
18504 # We use the long form for the default assignment because of an extremely
18505 # bizarre bug on SunOS 4.1.3.
18506 if "$ac_need_defaults"; then
18507 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18508 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18509 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18512 # Create a temporary directory, and hook for its removal unless debugging.
18515 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18516 trap '{ (exit 1); exit 1; }' 1 2 13 15
18519 # Create a (secure) tmp directory for tmp files.
18522 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18523 test -n "$tmp" && test -d "$tmp"
18526 tmp=$TMPDIR/cs$$-$RANDOM
18527 (umask 077 && mkdir $tmp)
18530 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18531 { (exit 1); exit 1; }
18536 cat >>"$CONFIG_STATUS" <<EOF
18539 # CONFIG_FILES section.
18542 # No need to generate the scripts if there are no CONFIG_FILES.
18543 # This happens for instance when ./config.status config.h
18544 if test -n "\$CONFIG_FILES"; then
18545 # Protect against being on the right side of a sed subst in config.status.
18546 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18547 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18548 s,@SHELL@,$SHELL,;t t
18549 s,@exec_prefix@,$exec_prefix,;t t
18550 s,@prefix@,$prefix,;t t
18551 s,@program_transform_name@,$program_transform_name,;t t
18552 s,@bindir@,$bindir,;t t
18553 s,@sbindir@,$sbindir,;t t
18554 s,@libexecdir@,$libexecdir,;t t
18555 s,@datarootdir@,$datarootdir,;t t
18556 s,@datadir@,$datadir,;t t
18557 s,@sysconfdir@,$sysconfdir,;t t
18558 s,@sharedstatedir@,$sharedstatedir,;t t
18559 s,@localstatedir@,$localstatedir,;t t
18560 s,@runstatedir@,$runstatedir,;t t
18561 s,@libdir@,$libdir,;t t
18562 s,@includedir@,$includedir,;t t
18563 s,@oldincludedir@,$oldincludedir,;t t
18564 s,@infodir@,$infodir,;t t
18565 s,@mandir@,$mandir,;t t
18566 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18567 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18568 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18569 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18570 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18571 s,@build_alias@,$build_alias,;t t
18572 s,@host_alias@,$host_alias,;t t
18573 s,@target_alias@,$target_alias,;t t
18574 s,@ECHO_C@,$ECHO_C,;t t
18575 s,@ECHO_N@,$ECHO_N,;t t
18576 s,@ECHO_T@,$ECHO_T,;t t
18577 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18578 s,@DEFS@,$DEFS,;t t
18579 s,@LIBS@,$LIBS,;t t
18580 s,@top_builddir@,$top_builddir,;t t
18581 s,@build@,$build,;t t
18582 s,@build_cpu@,$build_cpu,;t t
18583 s,@build_vendor@,$build_vendor,;t t
18584 s,@build_os@,$build_os,;t t
18585 s,@host@,$host,;t t
18586 s,@host_cpu@,$host_cpu,;t t
18587 s,@host_vendor@,$host_vendor,;t t
18588 s,@host_os@,$host_os,;t t
18589 s,@target@,$target,;t t
18590 s,@target_cpu@,$target_cpu,;t t
18591 s,@target_vendor@,$target_vendor,;t t
18592 s,@target_os@,$target_os,;t t
18593 s,@GREP@,$GREP,;t t
18594 s,@FGREP@,$FGREP,;t t
18596 s,@CFLAGS@,$CFLAGS,;t t
18597 s,@LDFLAGS@,$LDFLAGS,;t t
18598 s,@CPPFLAGS@,$CPPFLAGS,;t t
18599 s,@ac_ct_CC@,$ac_ct_CC,;t t
18600 s,@EXEEXT@,$EXEEXT,;t t
18601 s,@OBJEXT@,$OBJEXT,;t t
18602 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18604 s,@EGREP@,$EGREP,;t t
18606 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18607 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18608 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18609 s,@LN_S@,$LN_S,;t t
18610 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
18611 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
18612 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18613 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
18614 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
18615 s,@SET_MAKE@,$SET_MAKE,;t t
18616 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
18617 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
18618 s,@CTAGS@,$CTAGS,;t t
18619 s,@ETAGS@,$ETAGS,;t t
18620 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18621 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18622 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
18623 s,@RANLIB@,$RANLIB,;t t
18624 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18626 s,@ac_ct_LD@,$ac_ct_LD,;t t
18628 s,@ac_ct_AR@,$ac_ct_AR,;t t
18629 s,@ARFLAGS@,$ARFLAGS,;t t
18630 s,@DESTDIR@,$DESTDIR,;t t
18631 s,@BUILD_CC@,$BUILD_CC,;t t
18632 s,@BUILD_CPP@,$BUILD_CPP,;t t
18633 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
18634 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
18635 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
18636 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
18637 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
18638 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
18639 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
18640 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
18641 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
18642 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
18643 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
18644 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
18645 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
18646 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18647 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18648 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
18649 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
18650 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
18651 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
18652 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
18653 s,@CC_G_OPT@,$CC_G_OPT,;t t
18654 s,@LD_MODEL@,$LD_MODEL,;t t
18655 s,@shlibdir@,$shlibdir,;t t
18656 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
18657 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
18658 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
18659 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
18660 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
18661 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
18662 s,@LINK_PROGS@,$LINK_PROGS,;t t
18663 s,@LINK_TESTS@,$LINK_TESTS,;t t
18664 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
18665 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
18666 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
18667 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
18668 s,@RPATH_LIST@,$RPATH_LIST,;t t
18669 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
18670 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
18671 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
18672 s,@PTHREAD@,$PTHREAD,;t t
18673 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
18674 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18675 s,@ECHO_LT@,$ECHO_LT,;t t
18676 s,@ECHO_LD@,$ECHO_LD,;t t
18677 s,@RULE_CC@,$RULE_CC,;t t
18678 s,@SHOW_CC@,$SHOW_CC,;t t
18679 s,@ECHO_CC@,$ECHO_CC,;t t
18680 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18681 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
18682 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
18683 s,@ADAFLAGS@,$ADAFLAGS,;t t
18684 s,@ADA_TRACE@,$ADA_TRACE,;t t
18685 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
18686 s,@M4_exists@,$M4_exists,;t t
18687 s,@cf_ada_make@,$cf_ada_make,;t t
18688 s,@cf_ada_config@,$cf_ada_config,;t t
18689 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
18690 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
18691 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
18692 s,@cf_compile_generics@,$cf_compile_generics,;t t
18693 s,@cf_generic_objects@,$cf_generic_objects,;t t
18694 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
18695 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
18696 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
18697 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
18698 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
18699 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
18700 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
18701 s,@cf_ada_package@,$cf_ada_package,;t t
18702 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
18703 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
18704 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
18705 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
18706 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
18707 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
18708 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
18709 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
18710 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
18711 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18712 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18713 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
18714 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
18715 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
18716 s,@TEST_ARG2@,$TEST_ARG2,;t t
18717 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
18718 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
18719 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
18720 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
18721 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
18722 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
18723 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
18728 cat >>"$CONFIG_STATUS" <<\EOF
18729 # Split the substitutions into bite-sized pieces for seds with
18730 # small command number limits, like on Digital OSF/1 and HP-UX.
18731 ac_max_sed_lines=48
18732 ac_sed_frag=1 # Number of current file.
18733 ac_beg=1 # First line for current file.
18734 ac_end=$ac_max_sed_lines # Line after last line for current file.
18737 while "$ac_more_lines"; do
18738 if test "$ac_beg" -gt 1; then
18739 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18741 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18743 if test ! -s $tmp/subs.frag; then
18744 ac_more_lines=false
18746 # The purpose of the label and of the branching condition is to
18747 # speed up the sed processing (if there are no `@' at all, there
18748 # is no need to browse any of the substitutions).
18749 # These are the two extra sed commands mentioned above.
18751 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18752 # It is possible to make a multiline substitution using escaped newlines.
18753 # Ensure that we do not split the substitution between script fragments.
18755 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
18756 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
18757 if test -s $tmp/subs.next; then
18758 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
18759 if test ! -s $tmp/subs.edit; then
18760 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
18761 if test ! -s $tmp/subs.edit; then
18762 if test "$ac_beg" -gt 1; then
18763 ac_end=`expr "$ac_end" - 1`
18770 if test -z "$ac_sed_cmds"; then
18771 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18773 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18775 ac_sed_frag=`expr "$ac_sed_frag" + 1`
18777 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
18780 if test -z "$ac_sed_cmds"; then
18783 fi # test -n "$CONFIG_FILES"
18786 cat >>"$CONFIG_STATUS" <<\EOF
18787 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18788 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18790 - | *:- | *:-:* ) # input from stdin
18792 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18793 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18794 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18795 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18796 * ) ac_file_in=$ac_file.in ;;
18799 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18800 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18801 X"$ac_file" : 'X\(//\)[^/]' \| \
18802 X"$ac_file" : 'X\(//\)$' \| \
18803 X"$ac_file" : 'X\(/\)' \| \
18804 . : '\(.\)' 2>/dev/null ||
18806 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18807 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18808 /^X\(\/\/\)$/{ s//\1/; q; }
18809 /^X\(\/\).*/{ s//\1/; q; }
18811 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18812 { case "$ac_dir" in
18813 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18817 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18818 case $as_mkdir_dir in
18819 # Skip DOS drivespec
18820 ?:) as_incr_dir=$as_mkdir_dir ;;
18822 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18823 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18828 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18829 # A "../" for each directory in $ac_dir_suffix.
18830 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18832 ac_dir_suffix= ac_dots=
18837 if test -z "$ac_dots"; then
18840 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
18842 [\\/]* | ?:[\\/]* )
18843 ac_srcdir="$srcdir$ac_dir_suffix";
18844 ac_top_srcdir="$srcdir" ;;
18845 *) # Relative path.
18846 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
18847 ac_top_srcdir="$ac_dots$srcdir" ;;
18851 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18852 *) ac_INSTALL=$ac_dots$INSTALL ;;
18855 if test x"$ac_file" != x-; then
18856 { echo "$as_me:18856: creating $ac_file" >&5
18857 echo "$as_me: creating $ac_file" >&6;}
18860 # Let's still pretend it is `configure' which instantiates (i.e., don't
18861 # use $as_me), people would be surprised to read:
18862 # /* config.h. Generated automatically by config.status. */
18863 configure_input="Generated automatically from `echo $ac_file_in |
18864 sed 's,.*/,,'` by configure."
18866 # First look for the input files in the build tree, otherwise in the
18868 ac_file_inputs=`IFS=:
18869 for f in $ac_file_in; do
18871 -) echo $tmp/stdin ;;
18873 # Absolute (can't be DOS-style, as IFS=:)
18874 test -f "$f" || { { echo "$as_me:18874: error: cannot find input file: $f" >&5
18875 echo "$as_me: error: cannot find input file: $f" >&2;}
18876 { (exit 1); exit 1; }; }
18879 if test -f "$f"; then
18882 elif test -f "$srcdir/$f"; then
18887 { { echo "$as_me:18887: error: cannot find input file: $f" >&5
18888 echo "$as_me: error: cannot find input file: $f" >&2;}
18889 { (exit 1); exit 1; }; }
18892 done` || { (exit 1); exit 1; }
18894 cat >>"$CONFIG_STATUS" <<\EOF
18895 ac_warn_datarootdir=no
18896 if test x"$ac_file" != x-; then
18897 for ac_item in $ac_file_inputs
18899 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
18900 if test -n "$ac_seen"; then
18901 ac_used=`grep '@datarootdir@' "$ac_item"`
18902 if test -z "$ac_used"; then
18903 { echo "$as_me:18903: WARNING: datarootdir was used implicitly but not set:
18905 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
18907 ac_warn_datarootdir=yes
18910 ac_seen=`grep '${datarootdir}' "$ac_item"`
18911 if test -n "$ac_seen"; then
18912 { echo "$as_me:18912: WARNING: datarootdir was used explicitly but not set:
18914 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
18916 ac_warn_datarootdir=yes
18921 if test "x$ac_warn_datarootdir" = xyes; then
18922 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
18926 cat >>"$CONFIG_STATUS" <<EOF
18930 cat >>"$CONFIG_STATUS" <<\EOF
18932 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18933 s,@configure_input@,$configure_input,;t t
18934 s,@srcdir@,$ac_srcdir,;t t
18935 s,@top_srcdir@,$ac_top_srcdir,;t t
18936 s,@INSTALL@,$ac_INSTALL,;t t
18937 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18939 if test x"$ac_file" != x-; then
18940 cp "$tmp/out" "$ac_file"
18942 for ac_name in prefix exec_prefix datarootdir
18944 ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
18945 if test -n "$ac_seen"; then
18946 ac_init=`${EGREP-egrep} '[ ]*'$ac_name'[ ]*=' "$ac_file"`
18947 if test -z "$ac_init"; then
18948 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
18949 { echo "$as_me:18949: WARNING: Variable $ac_name is used but was not set:
18951 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
18956 ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
18957 ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
18958 if test -s $tmp/out; then
18959 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
18960 { echo "$as_me:18960: WARNING: Some variables may not be substituted:
18962 echo "$as_me: WARNING: Some variables may not be substituted:
18972 cat >>"$CONFIG_STATUS" <<\EOF
18975 # CONFIG_HEADER section.
18978 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18979 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18981 # ac_d sets the value in "#define NAME VALUE" lines.
18982 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18983 ac_dB='[ ].*$,\1#\2'
18986 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18987 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18988 ac_iB='\([ ]\),\1#\2define\3'
18991 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18992 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18993 ac_uB='$,\1#\2define\3'
18997 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18998 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19000 - | *:- | *:-:* ) # input from stdin
19002 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19003 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19004 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19005 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19006 * ) ac_file_in=$ac_file.in ;;
19009 test x"$ac_file" != x- && { echo "$as_me:19009: creating $ac_file" >&5
19010 echo "$as_me: creating $ac_file" >&6;}
19012 # First look for the input files in the build tree, otherwise in the
19014 ac_file_inputs=`IFS=:
19015 for f in $ac_file_in; do
19017 -) echo $tmp/stdin ;;
19019 # Absolute (can't be DOS-style, as IFS=:)
19020 test -f "$f" || { { echo "$as_me:19020: error: cannot find input file: $f" >&5
19021 echo "$as_me: error: cannot find input file: $f" >&2;}
19022 { (exit 1); exit 1; }; }
19025 if test -f "$f"; then
19028 elif test -f "$srcdir/$f"; then
19033 { { echo "$as_me:19033: error: cannot find input file: $f" >&5
19034 echo "$as_me: error: cannot find input file: $f" >&2;}
19035 { (exit 1); exit 1; }; }
19038 done` || { (exit 1); exit 1; }
19039 # Remove the trailing spaces.
19040 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
19044 # Transform confdefs.h into a list of #define's. We won't use it as a sed
19045 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
19046 # be either 'cat' or 'sort'.
19047 cat confdefs.h | uniq >conftest.vals
19049 # Break up conftest.vals because some shells have a limit on
19050 # the size of here documents, and old seds have small limits too.
19052 rm -f conftest.tail
19053 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
19054 while grep . conftest.vals >/dev/null
19056 # Write chunks of a limited-size here document to conftest.frag.
19057 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
19058 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
19059 echo 'CEOF' >> "$CONFIG_STATUS"
19060 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
19061 rm -f conftest.vals
19062 mv conftest.tail conftest.vals
19064 rm -f conftest.vals
19066 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19068 echo ' cat >> conftest.edit <<CEOF
19069 /@DEFS@/r conftest.frag
19072 sed -f conftest.edit $tmp/in > $tmp/out
19074 mv $tmp/out $tmp/in
19075 rm -f conftest.edit conftest.frag
19076 ' >> "$CONFIG_STATUS"
19078 cat >>"$CONFIG_STATUS" <<\EOF
19079 # Let's still pretend it is `configure' which instantiates (i.e., don't
19080 # use $as_me), people would be surprised to read:
19081 # /* config.h. Generated automatically by config.status. */
19082 if test x"$ac_file" = x-; then
19083 echo "/* Generated automatically by configure. */" >$tmp/config.h
19085 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
19087 cat $tmp/in >>$tmp/config.h
19089 if test x"$ac_file" != x-; then
19090 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
19091 { echo "$as_me:19091: $ac_file is unchanged" >&5
19092 echo "$as_me: $ac_file is unchanged" >&6;}
19094 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19095 X"$ac_file" : 'X\(//\)[^/]' \| \
19096 X"$ac_file" : 'X\(//\)$' \| \
19097 X"$ac_file" : 'X\(/\)' \| \
19098 . : '\(.\)' 2>/dev/null ||
19100 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19101 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19102 /^X\(\/\/\)$/{ s//\1/; q; }
19103 /^X\(\/\).*/{ s//\1/; q; }
19105 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19106 { case "$ac_dir" in
19107 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19111 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19112 case $as_mkdir_dir in
19113 # Skip DOS drivespec
19114 ?:) as_incr_dir=$as_mkdir_dir ;;
19116 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19117 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19124 mv "$tmp/config.h" "$ac_file"
19128 rm -f $tmp/config.h
19132 cat >>"$CONFIG_STATUS" <<\EOF
19134 # CONFIG_COMMANDS section.
19136 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19137 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19138 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19142 if test -z "$USE_OLD_MAKERULES" ; then
19143 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
19150 cat >>"$CONFIG_STATUS" <<\EOF
19152 { (exit 0); exit 0; }
19154 chmod +x "$CONFIG_STATUS"
19155 ac_clean_files=$ac_clean_files_save
19157 # configure is writing to config.log, and then calls config.status.
19158 # config.status does its own redirection, appending to config.log.
19159 # Unfortunately, on DOS this fails, as config.log is still kept open
19160 # by configure, so config.status won't be able to write to it; its
19161 # output is simply discarded. So we exec the FD to /dev/null,
19162 # effectively closing config.log, so it can be properly (re)opened and
19163 # appended to by config.status. When coming back to configure, we
19164 # need to make the FD available again.
19165 if test "$no_create" != yes; then
19168 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
19170 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19171 # would make configure fail if this is the last instruction.
19172 "$ac_cs_success" || { (exit 1); exit 1; }
19174 ${MAKE:-make} preinstall