2 # From configure.in Revision: 1.84 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20210509.
6 # Copyright 2003-2020,2021 Thomas E. Dickey
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
12 # Avoid depending upon Character Ranges.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
36 if expr a : '\(a\)' >/dev/null 2>&1; then
42 rm -f conf$$ conf$$.exe conf$$.file
44 if ln -s conf$$.file conf$$ 2>/dev/null; then
45 # We could just check for DJGPP; but this test a) works b) is more generic
46 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47 if test -f conf$$.exe; then
48 # Don't use ln at all; we don't have any links
53 elif ln conf$$.file conf$$ 2>/dev/null; then
58 rm -f conf$$ conf$$.exe conf$$.file
60 as_executable_p="test -f"
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
70 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
80 # We need space, tab and new line, in precisely that order.
86 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
89 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90 # so uname gets run too.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
98 ac_default_prefix=/usr/local
103 SHELL=${CONFIG_SHELL-/bin/sh}
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete. It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : "${ac_max_here_lines=38}"
110 ac_unique_file="gen/gen.c"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
115 # include <sys/types.h>
118 # include <sys/stat.h>
129 # if !STDC_HEADERS && HAVE_MEMORY_H
135 # include <strings.h>
138 # include <inttypes.h>
148 # Initialize some variables set by options.
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
160 program_transform_name=s,x,x,
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
188 # Identity of this package.
198 # If the previous option needs an argument, assign it.
199 if test -n "$ac_prev"; then
200 eval "$ac_prev=\$ac_option"
205 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
207 # Accept the important Cygnus configure options, so we can diagnose typos.
211 -bindir | --bindir | --bindi | --bind | --bin | --bi)
213 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
216 -build | --build | --buil | --bui | --bu)
217 ac_prev=build_alias ;;
218 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219 build_alias=$ac_optarg ;;
221 -cache-file | --cache-file | --cache-fil | --cache-fi \
222 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223 ac_prev=cache_file ;;
224 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226 cache_file=$ac_optarg ;;
229 cache_file=config.cache ;;
231 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
233 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
235 datadir=$ac_optarg ;;
237 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238 | --dataroo | --dataro | --datar)
239 ac_prev=datarootdir ;;
240 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242 datarootdir=$ac_optarg ;;
244 -disable-* | --disable-*)
245 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246 # Reject names that are not valid shell variable names.
247 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249 { (exit 1); exit 1; }; }
250 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251 eval "enable_$ac_feature=no" ;;
253 -enable-* | --enable-*)
254 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255 # Reject names that are not valid shell variable names.
256 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258 { (exit 1); exit 1; }; }
259 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
261 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
264 eval "enable_$ac_feature='$ac_optarg'" ;;
266 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268 | --exec | --exe | --ex)
269 ac_prev=exec_prefix ;;
270 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272 | --exec=* | --exe=* | --ex=*)
273 exec_prefix=$ac_optarg ;;
275 -gas | --gas | --ga | --g)
276 # Obsolete; use --with-gas.
279 -help | --help | --hel | --he | -h)
281 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282 ac_init_help=recursive ;;
283 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284 ac_init_help=short ;;
286 -host | --host | --hos | --ho)
287 ac_prev=host_alias ;;
288 -host=* | --host=* | --hos=* | --ho=*)
289 host_alias=$ac_optarg ;;
291 -includedir | --includedir | --includedi | --included | --include \
292 | --includ | --inclu | --incl | --inc)
293 ac_prev=includedir ;;
294 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295 | --includ=* | --inclu=* | --incl=* | --inc=*)
296 includedir=$ac_optarg ;;
298 -infodir | --infodir | --infodi | --infod | --info | --inf)
300 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301 infodir=$ac_optarg ;;
303 -libdir | --libdir | --libdi | --libd)
305 -libdir=* | --libdir=* | --libdi=* | --libd=*)
308 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309 | --libexe | --libex | --libe)
310 ac_prev=libexecdir ;;
311 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312 | --libexe=* | --libex=* | --libe=*)
313 libexecdir=$ac_optarg ;;
315 -localstatedir | --localstatedir | --localstatedi | --localstated \
316 | --localstate | --localstat | --localsta | --localst \
317 | --locals | --local | --loca | --loc | --lo)
318 ac_prev=localstatedir ;;
319 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322 localstatedir=$ac_optarg ;;
324 -runstatedir | --runstatedir | --runstatedi | --runstated \
325 | --runstate | --runstat | --runsta | --runst \
326 | --runs | --run | --ru)
327 ac_prev=runstatedir ;;
328 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329 | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330 | --runs=* | --run=* | --ru=*)
331 runstatedir=$ac_optarg ;;
333 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
335 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
339 # Obsolete; use --without-fp.
342 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
346 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
350 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352 | --oldin | --oldi | --old | --ol | --o)
353 ac_prev=oldincludedir ;;
354 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357 oldincludedir=$ac_optarg ;;
359 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
361 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
364 -program-prefix | --program-prefix | --program-prefi | --program-pref \
365 | --program-pre | --program-pr | --program-p)
366 ac_prev=program_prefix ;;
367 -program-prefix=* | --program-prefix=* | --program-prefi=* \
368 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369 program_prefix=$ac_optarg ;;
371 -program-suffix | --program-suffix | --program-suffi | --program-suff \
372 | --program-suf | --program-su | --program-s)
373 ac_prev=program_suffix ;;
374 -program-suffix=* | --program-suffix=* | --program-suffi=* \
375 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376 program_suffix=$ac_optarg ;;
378 -program-transform-name | --program-transform-name \
379 | --program-transform-nam | --program-transform-na \
380 | --program-transform-n | --program-transform- \
381 | --program-transform | --program-transfor \
382 | --program-transfo | --program-transf \
383 | --program-trans | --program-tran \
384 | --progr-tra | --program-tr | --program-t)
385 ac_prev=program_transform_name ;;
386 -program-transform-name=* | --program-transform-name=* \
387 | --program-transform-nam=* | --program-transform-na=* \
388 | --program-transform-n=* | --program-transform-=* \
389 | --program-transform=* | --program-transfor=* \
390 | --program-transfo=* | --program-transf=* \
391 | --program-trans=* | --program-tran=* \
392 | --progr-tra=* | --program-tr=* | --program-t=*)
393 program_transform_name=$ac_optarg ;;
395 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396 | -silent | --silent | --silen | --sile | --sil)
399 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
401 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
403 sbindir=$ac_optarg ;;
405 -sharedstatedir | --sharedstatedir | --sharedstatedi \
406 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407 | --sharedst | --shareds | --shared | --share | --shar \
409 ac_prev=sharedstatedir ;;
410 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
414 sharedstatedir=$ac_optarg ;;
416 -site | --site | --sit)
418 -site=* | --site=* | --sit=*)
421 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
423 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
426 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427 | --syscon | --sysco | --sysc | --sys | --sy)
428 ac_prev=sysconfdir ;;
429 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431 sysconfdir=$ac_optarg ;;
433 -target | --target | --targe | --targ | --tar | --ta | --t)
434 ac_prev=target_alias ;;
435 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436 target_alias=$ac_optarg ;;
438 -v | -verbose | --verbose | --verbos | --verbo | --verb)
441 -version | --version | --versio | --versi | --vers | -V)
445 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446 # Reject names that are not valid shell variable names.
447 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448 { echo "$as_me: error: invalid package name: $ac_package" >&2
449 { (exit 1); exit 1; }; }
450 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
452 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
455 eval "with_$ac_package='$ac_optarg'" ;;
457 -without-* | --without-*)
458 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459 # Reject names that are not valid shell variable names.
460 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461 { echo "$as_me: error: invalid package name: $ac_package" >&2
462 { (exit 1); exit 1; }; }
463 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464 eval "with_$ac_package=no" ;;
467 # Obsolete; use --with-x.
470 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471 | --x-incl | --x-inc | --x-in | --x-i)
472 ac_prev=x_includes ;;
473 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475 x_includes=$ac_optarg ;;
477 -x-libraries | --x-libraries | --x-librarie | --x-librari \
478 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479 ac_prev=x_libraries ;;
480 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482 x_libraries=$ac_optarg ;;
484 -*) { echo "$as_me: error: unrecognized option: $ac_option
485 Try \`$0 --help' for more information." >&2
486 { (exit 1); exit 1; }; }
490 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491 # Reject names that are not valid shell variable names.
492 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494 { (exit 1); exit 1; }; }
495 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496 eval "$ac_envvar='$ac_optarg'"
497 export "$ac_envvar" ;;
500 # FIXME: should be removed in autoconf 3.0.
501 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
504 : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
510 if test -n "$ac_prev"; then
511 ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
512 { echo "$as_me: error: missing argument to $ac_option" >&2
513 { (exit 1); exit 1; }; }
516 # Be sure to have absolute paths.
517 for ac_var in exec_prefix prefix
519 eval ac_val=$`echo "$ac_var"`
521 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523 { (exit 1); exit 1; }; };;
527 # Be sure to have absolute paths.
528 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
529 localstatedir libdir includedir oldincludedir infodir mandir
531 eval ac_val=$`echo "$ac_var"`
533 [\\/$]* | ?:[\\/]* ) ;;
534 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535 { (exit 1); exit 1; }; };;
539 # There might be people who depend on the old broken behavior: `$host'
540 # used to hold the argument of --host etc.
545 # FIXME: should be removed in autoconf 3.0.
546 if test "x$host_alias" != x; then
547 if test "x$build_alias" = x; then
548 cross_compiling=maybe
549 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550 If a cross compiler is detected then cross compile mode will be used." >&2
551 elif test "x$build_alias" != "x$host_alias"; then
557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
559 test "$silent" = yes && exec 6>/dev/null
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563 ac_srcdir_defaulted=yes
564 # Try the directory containing this script, then its parent.
566 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
569 if test ! -r "$srcdir/$ac_unique_file"; then
573 ac_srcdir_defaulted=no
575 if test ! -r "$srcdir/$ac_unique_file"; then
576 if test "$ac_srcdir_defaulted" = yes; then
577 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578 { (exit 1); exit 1; }; }
580 { echo "$as_me: error: cannot find sources in $srcdir" >&2
581 { (exit 1); exit 1; }; }
584 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585 ac_env_build_alias_set=${build_alias+set}
586 ac_env_build_alias_value=$build_alias
587 ac_cv_env_build_alias_set=${build_alias+set}
588 ac_cv_env_build_alias_value=$build_alias
589 ac_env_host_alias_set=${host_alias+set}
590 ac_env_host_alias_value=$host_alias
591 ac_cv_env_host_alias_set=${host_alias+set}
592 ac_cv_env_host_alias_value=$host_alias
593 ac_env_target_alias_set=${target_alias+set}
594 ac_env_target_alias_value=$target_alias
595 ac_cv_env_target_alias_set=${target_alias+set}
596 ac_cv_env_target_alias_value=$target_alias
597 ac_env_CC_set=${CC+set}
599 ac_cv_env_CC_set=${CC+set}
600 ac_cv_env_CC_value=$CC
601 ac_env_CFLAGS_set=${CFLAGS+set}
602 ac_env_CFLAGS_value=$CFLAGS
603 ac_cv_env_CFLAGS_set=${CFLAGS+set}
604 ac_cv_env_CFLAGS_value=$CFLAGS
605 ac_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_env_LDFLAGS_value=$LDFLAGS
607 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608 ac_cv_env_LDFLAGS_value=$LDFLAGS
609 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_env_CPPFLAGS_value=$CPPFLAGS
611 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613 ac_env_CPP_set=${CPP+set}
614 ac_env_CPP_value=$CPP
615 ac_cv_env_CPP_set=${CPP+set}
616 ac_cv_env_CPP_value=$CPP
619 # Report the --help message.
621 if test "$ac_init_help" = "long"; then
622 # Omit some internal or obsolete options to make the list less imposing.
623 # This message is too long to be a string in the A/UX 3.1 sh.
625 \`configure' configures this package to adapt to many kinds of systems.
627 Usage: $0 [OPTION]... [VAR=VALUE]...
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE. See below for descriptions of some of the useful variables.
632 Defaults for the options are specified in brackets.
635 -h, --help display this help and exit
636 --help=short display options specific to this package
637 --help=recursive display the short help of all the included packages
638 -V, --version display version information and exit
639 -q, --quiet, --silent do not print \`checking...' messages
640 --cache-file=FILE cache test results in FILE [disabled]
641 -C, --config-cache alias for \`--cache-file=config.cache'
642 -n, --no-create do not create output files
643 --srcdir=DIR find the sources in DIR [configure dir or \`..']
648 Installation directories:
649 --prefix=PREFIX install architecture-independent files in PREFIX
651 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
659 For better control, use the options below.
661 Fine tuning of the installation directories:
662 --bindir=DIR user executables [EPREFIX/bin]
663 --sbindir=DIR system admin executables [EPREFIX/sbin]
664 --libexecdir=DIR program executables [EPREFIX/libexec]
665 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
666 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
667 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
668 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
669 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
670 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
671 --libdir=DIR object code libraries [EPREFIX/lib]
672 --includedir=DIR C header files [PREFIX/include]
673 --oldincludedir=DIR C header files for non-gcc [/usr/include]
674 --infodir=DIR info documentation [DATAROOTDIR/info]
675 --mandir=DIR man documentation [DATAROOTDIR/man]
681 --program-prefix=PREFIX prepend PREFIX to installed program names
682 --program-suffix=SUFFIX append SUFFIX to installed program names
683 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
686 --build=BUILD configure for building on BUILD [guessed]
687 --host=HOST build programs to run on HOST [BUILD]
688 --target=TARGET configure for building compilers for TARGET [HOST]
692 if test -n "$ac_init_help"; then
697 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
698 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
701 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
702 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
705 --with-system-type=XXX test: override derived host system-type
706 --disable-stripping do not strip (debug info) installed executables
707 --with-pkg-config{=path} enable/disable use of pkg-config
708 --with-pkg-config-libdir=XXX use given directory for installing pc-files
709 --without-tests suppress build with test-programs
710 --enable-mixed-case tic should assume mixed-case filenames
711 --with-install-prefix prefixes actual install-location ($DESTDIR)
712 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
713 --with-build-cc=XXX the build C compiler ($BUILD_CC)
714 --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
715 --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
716 --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
717 --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
718 --with-build-libs=XXX the build libraries (${BUILD_LIBS})
719 Options to Specify the Libraries Built/Used:
720 --with-shared generate shared C-objects (needed for --with-ada-sharedlib)
721 --with-curses-dir=DIR directory in which (n)curses is installed
722 --enable-widec compile with wide-char/UTF-8 code
723 --with-lib-prefix override library-prefix
724 --with-shlib-version=X Specify rel or abi version for shared libs
725 --enable-rpath-link link sample programs with rpath option
726 Fine-Tuning Your Configuration:
727 --enable-broken_linker compile with broken-linker support code
728 --disable-largefile omit support for large files
729 --with-rcs-ids compile-in RCS identifiers
731 --disable-ext-funcs disable function-extensions
732 --enable-const compile with extra/non-standard const
734 --without-develop disable development options
736 --with-pthread use POSIX thread library
737 --enable-weak-symbols enable weak-symbols for pthreads
738 --enable-reentrant compile with experimental reentrant code
739 --with-wrap-prefix=XXX override prefix used for public variables
740 Testing/development Options:
741 --disable-echo do not display "compiling" commands
742 --enable-warnings test: turn on gcc compiler warnings
743 --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics
744 --enable-assertions test: turn on generation of assertion code
745 --enable-expanded test: generate functions for certain macros
746 --disable-macros test: use functions rather than macros
747 --with-trace test: add trace() function to all models of ncurses
748 --disable-gnat-projects test: disable GNAT projects even if usable
749 Ada95 Binding Options:
750 --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
751 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
752 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
753 --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
754 --with-ada-libname=XXX override default Ada library-name
756 Some influential environment variables:
757 CC C compiler command
758 CFLAGS C compiler flags
759 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
760 nonstandard directory <lib dir>
761 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
762 headers in a nonstandard directory <include dir>
765 Use these variables to override the choices made by `configure' or to help
766 it to find libraries and programs with nonstandard names/locations.
771 if test "$ac_init_help" = "recursive"; then
772 # If there are subdirs, report their specific --help.
774 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
776 # A "../" for each directory in /$ac_subdir.
777 ac_dots=`echo "$ac_subdir" |
778 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
781 .) # No --srcdir option. We are building in place.
782 ac_sub_srcdir="$srcdir" ;;
783 [\\/]* | ?:[\\/]* ) # Absolute path.
784 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
786 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
789 # Check for guested configure; otherwise get Cygnus style configure.
790 if test -f "$ac_sub_srcdir/configure.gnu"; then
792 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
793 elif test -f "$ac_sub_srcdir/configure"; then
795 $SHELL "$ac_sub_srcdir/configure" --help=recursive
796 elif test -f "$ac_sub_srcdir/configure.ac" ||
797 test -f "$ac_sub_srcdir/configure.in"; then
799 "$ac_configure" --help
801 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
807 test -n "$ac_init_help" && exit 0
808 if "$ac_init_version"; then
811 Copyright 2003-2020,2021 Thomas E. Dickey
812 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
813 Free Software Foundation, Inc.
814 This configure script is free software; the Free Software Foundation
815 gives unlimited permission to copy, distribute and modify it.
821 This file contains any messages produced by compilers while
822 running configure, to aid debugging if configure makes a mistake.
824 It was created by $as_me, which was
825 generated by GNU Autoconf 2.52.20210509. Invocation command line was
836 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
837 uname -m = `(uname -m) 2>/dev/null || echo unknown`
838 uname -r = `(uname -r) 2>/dev/null || echo unknown`
839 uname -s = `(uname -s) 2>/dev/null || echo unknown`
840 uname -v = `(uname -v) 2>/dev/null || echo unknown`
842 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
843 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
845 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
846 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
847 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
848 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
849 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
850 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
851 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
865 # Keep a trace of the command line.
866 # Strip out --no-create and --no-recursion so they do not pile up.
867 # Also quote any args containing shell meta-characters.
873 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
874 | --no-cr | --no-c) ;;
875 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
876 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
877 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
878 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
879 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
881 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
884 # Get rid of the leading space.
887 # When interrupted or exit'd, cleanup temporary files, and complete
888 # config.log. We remove comments because anyway the quotes in there
889 # would cause problems or look ugly.
891 # Save into config.log some information that might help in debugging.
893 echo "## ----------------- ##" >&5
894 echo "## Cache variables. ##" >&5
895 echo "## ----------------- ##" >&5
897 # The following way of writing the cache mishandles newlines in values,
900 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
903 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
904 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
908 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
912 sed "/^$/d" confdefs.h >conftest.log
913 if test -s conftest.log; then
915 echo "## ------------ ##" >&5
916 echo "## confdefs.h. ##" >&5
917 echo "## ------------ ##" >&5
922 test "$ac_signal" != 0 &&
923 echo "$as_me: caught signal $ac_signal" >&5
924 echo "$as_me: exit $exit_status" >&5
925 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
928 for ac_signal in 1 2 13 15; do
929 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
933 # confdefs.h avoids OS command line length limits that DEFS can exceed.
934 rm -rf conftest* confdefs.h
935 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
938 # Let the site file select an alternate cache file if it wants to.
939 # Prefer explicitly selected file to automatically selected ones.
940 if test -z "$CONFIG_SITE"; then
941 if test "x$prefix" != xNONE; then
942 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
944 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
947 for ac_site_file in $CONFIG_SITE; do
948 if test -r "$ac_site_file"; then
949 { echo "$as_me:949: loading site script $ac_site_file" >&5
950 echo "$as_me: loading site script $ac_site_file" >&6;}
951 cat "$ac_site_file" >&5
956 if test -r "$cache_file"; then
957 # Some versions of bash will fail to source /dev/null (special
958 # files actually), so we avoid doing that.
959 if test -f "$cache_file"; then
960 { echo "$as_me:960: loading cache $cache_file" >&5
961 echo "$as_me: loading cache $cache_file" >&6;}
963 [\\/]* | ?:[\\/]* ) . $cache_file;;
968 { echo "$as_me:968: creating cache $cache_file" >&5
969 echo "$as_me: creating cache $cache_file" >&6;}
973 # Check that the precious variables saved in the cache have kept the same
975 ac_cache_corrupted=false
976 for ac_var in `(set) 2>&1 |
977 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
978 eval ac_old_set=\$ac_cv_env_${ac_var}_set
979 eval ac_new_set=\$ac_env_${ac_var}_set
980 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
981 eval ac_new_val="\$ac_env_${ac_var}_value"
982 case "$ac_old_set,$ac_new_set" in
984 { echo "$as_me:984: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
985 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
986 ac_cache_corrupted=: ;;
988 { echo "$as_me:988: error: \`$ac_var' was not set in the previous run" >&5
989 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
990 ac_cache_corrupted=: ;;
993 if test "x$ac_old_val" != "x$ac_new_val"; then
994 { echo "$as_me:994: error: \`$ac_var' has changed since the previous run:" >&5
995 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
996 { echo "$as_me:996: former value: $ac_old_val" >&5
997 echo "$as_me: former value: $ac_old_val" >&2;}
998 { echo "$as_me:998: current value: $ac_new_val" >&5
999 echo "$as_me: current value: $ac_new_val" >&2;}
1000 ac_cache_corrupted=:
1003 # Pass precious variables to config.status. It doesn't matter if
1004 # we pass some twice (in addition to the command line arguments).
1005 if test "$ac_new_set" = set; then
1006 case "$ac_new_val" in
1007 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1008 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1009 ac_configure_args="$ac_configure_args '$ac_arg'"
1011 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1016 if "$ac_cache_corrupted"; then
1017 { echo "$as_me:1017: error: changes in the environment can compromise the build" >&5
1018 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1019 { { echo "$as_me:1019: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1020 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1021 { (exit 1); exit 1; }; }
1025 ac_cpp='$CPP $CPPFLAGS'
1026 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1027 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1028 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1029 ac_main_return="return"
1031 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1033 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1045 echo "#! $SHELL" >conftest.sh
1046 echo "exit 0" >>conftest.sh
1047 chmod +x conftest.sh
1048 if { (echo "$as_me:1048: PATH=\".;.\"; conftest.sh") >&5
1049 (PATH=".;."; conftest.sh) 2>&5
1051 echo "$as_me:1051: \$? = $ac_status" >&5
1052 (exit "$ac_status"); }; then
1053 ac_path_separator=';'
1057 PATH_SEPARATOR="$ac_path_separator"
1060 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1065 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1066 if test -f "$ac_dir/install-sh"; then
1068 ac_install_sh="$ac_aux_dir/install-sh -c"
1070 elif test -f "$ac_dir/install.sh"; then
1072 ac_install_sh="$ac_aux_dir/install.sh -c"
1074 elif test -f "$ac_dir/shtool"; then
1076 ac_install_sh="$ac_aux_dir/shtool install -c"
1080 if test -z "$ac_aux_dir"; then
1081 { { echo "$as_me:1081: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1082 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1083 { (exit 1); exit 1; }; }
1085 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1086 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1087 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1089 # Make sure we can run config.sub.
1090 $ac_config_sub sun4 >/dev/null 2>&1 ||
1091 { { echo "$as_me:1091: error: cannot run $ac_config_sub" >&5
1092 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1093 { (exit 1); exit 1; }; }
1095 echo "$as_me:1095: checking build system type" >&5
1096 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1097 if test "${ac_cv_build+set}" = set; then
1098 echo $ECHO_N "(cached) $ECHO_C" >&6
1100 ac_cv_build_alias=$build_alias
1101 test -z "$ac_cv_build_alias" &&
1102 ac_cv_build_alias=`$ac_config_guess`
1103 test -z "$ac_cv_build_alias" &&
1104 { { echo "$as_me:1104: error: cannot guess build type; you must specify one" >&5
1105 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1106 { (exit 1); exit 1; }; }
1107 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1108 { { echo "$as_me:1108: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1109 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1110 { (exit 1); exit 1; }; }
1113 echo "$as_me:1113: result: $ac_cv_build" >&5
1114 echo "${ECHO_T}$ac_cv_build" >&6
1116 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1117 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1118 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1120 echo "$as_me:1120: checking host system type" >&5
1121 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1122 if test "${ac_cv_host+set}" = set; then
1123 echo $ECHO_N "(cached) $ECHO_C" >&6
1125 ac_cv_host_alias=$host_alias
1126 test -z "$ac_cv_host_alias" &&
1127 ac_cv_host_alias=$ac_cv_build_alias
1128 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1129 { { echo "$as_me:1129: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1130 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1131 { (exit 1); exit 1; }; }
1134 echo "$as_me:1134: result: $ac_cv_host" >&5
1135 echo "${ECHO_T}$ac_cv_host" >&6
1137 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1138 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1139 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1141 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1142 echo "$as_me:1142: checking target system type" >&5
1143 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1144 if test "${ac_cv_target+set}" = set; then
1145 echo $ECHO_N "(cached) $ECHO_C" >&6
1147 ac_cv_target_alias=$target_alias
1148 test "x$ac_cv_target_alias" = "x" &&
1149 ac_cv_target_alias=$ac_cv_host_alias
1150 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1151 { { echo "$as_me:1151: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1152 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1153 { (exit 1); exit 1; }; }
1156 echo "$as_me:1156: result: $ac_cv_target" >&5
1157 echo "${ECHO_T}$ac_cv_target" >&6
1158 target=$ac_cv_target
1159 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1160 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1161 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1163 # The aliases save the names the user supplied, while $host etc.
1164 # will get canonicalized.
1165 test -n "$target_alias" &&
1166 test "$program_prefix$program_suffix$program_transform_name" = \
1168 program_prefix=${target_alias}-
1169 system_name="$host_os"
1171 system_name="`(uname -s -r) 2>/dev/null`"
1172 if test -z "$system_name" ; then
1173 system_name="`(hostname) 2>/dev/null`"
1176 test -n "$system_name" &&
1177 cat >>confdefs.h <<EOF
1178 #define SYSTEM_NAME "$system_name"
1181 if test "${cf_cv_system_name+set}" = set; then
1182 echo $ECHO_N "(cached) $ECHO_C" >&6
1184 cf_cv_system_name="$system_name"
1187 test -z "$system_name" && system_name="$cf_cv_system_name"
1188 test -n "$cf_cv_system_name" && echo "$as_me:1188: result: Configuring for $cf_cv_system_name" >&5
1189 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1191 if test ".$system_name" != ".$cf_cv_system_name" ; then
1192 echo "$as_me:1192: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1193 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1194 { { echo "$as_me:1194: error: \"Please remove config.cache and try again.\"" >&5
1195 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1196 { (exit 1); exit 1; }; }
1199 # Check whether --with-system-type or --without-system-type was given.
1200 if test "${with_system_type+set}" = set; then
1201 withval="$with_system_type"
1202 { echo "$as_me:1202: WARNING: overriding system type to $withval" >&5
1203 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1204 cf_cv_system_name=$withval
1209 ### Save the given $CFLAGS to allow user-override.
1210 cf_user_CFLAGS="$CFLAGS"
1212 ### Default install-location
1213 for ac_prog in ggrep grep
1215 # Extract the first word of "$ac_prog", so it can be a program name with args.
1216 set dummy $ac_prog; ac_word=$2
1217 echo "$as_me:1217: checking for $ac_word" >&5
1218 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1219 if test "${ac_cv_prog_GREP+set}" = set; then
1220 echo $ECHO_N "(cached) $ECHO_C" >&6
1222 if test -n "$GREP"; then
1223 ac_cv_prog_GREP="$GREP" # Let the user override the test.
1225 ac_save_IFS=$IFS; IFS=$ac_path_separator
1227 for ac_dir in $ac_dummy; do
1229 test -z "$ac_dir" && ac_dir=.
1230 $as_executable_p "$ac_dir/$ac_word" || continue
1231 ac_cv_prog_GREP="$ac_prog"
1232 echo "$as_me:1232: found $ac_dir/$ac_word" >&5
1238 GREP=$ac_cv_prog_GREP
1239 if test -n "$GREP"; then
1240 echo "$as_me:1240: result: $GREP" >&5
1241 echo "${ECHO_T}$GREP" >&6
1243 echo "$as_me:1243: result: no" >&5
1244 echo "${ECHO_T}no" >&6
1247 test -n "$GREP" && break
1249 test -n "$GREP" || GREP=": "
1251 echo "$as_me:1251: checking for fgrep" >&5
1252 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1253 if test "${ac_cv_path_FGREP+set}" = set; then
1254 echo $ECHO_N "(cached) $ECHO_C" >&6
1256 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1257 then ac_cv_path_FGREP="$GREP -F"
1259 for ac_prog in gfgrep fgrep
1261 # Extract the first word of "$ac_prog", so it can be a program name with args.
1262 set dummy $ac_prog; ac_word=$2
1263 echo "$as_me:1263: checking for $ac_word" >&5
1264 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1265 if test "${ac_cv_path_FGREP+set}" = set; then
1266 echo $ECHO_N "(cached) $ECHO_C" >&6
1270 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1273 ac_save_IFS=$IFS; IFS=$ac_path_separator
1275 for ac_dir in $ac_dummy; do
1277 test -z "$ac_dir" && ac_dir=.
1278 if $as_executable_p "$ac_dir/$ac_word"; then
1279 ac_cv_path_FGREP="$ac_dir/$ac_word"
1280 echo "$as_me:1280: found $ac_dir/$ac_word" >&5
1288 FGREP=$ac_cv_path_FGREP
1290 if test -n "$FGREP"; then
1291 echo "$as_me:1291: result: $FGREP" >&5
1292 echo "${ECHO_T}$FGREP" >&6
1294 echo "$as_me:1294: result: no" >&5
1295 echo "${ECHO_T}no" >&6
1298 test -n "$FGREP" && break
1300 test -n "$FGREP" || FGREP=": "
1302 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1302: error: cannot find workable fgrep" >&5
1303 echo "$as_me: error: cannot find workable fgrep" >&2;}
1304 { (exit 1); exit 1; }; }
1307 echo "$as_me:1307: result: $ac_cv_path_FGREP" >&5
1308 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1309 FGREP="$ac_cv_path_FGREP"
1311 echo "$as_me:1311: checking for prefix" >&5
1312 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1313 if test "x$prefix" = "xNONE" ; then
1314 case "$cf_cv_system_name" in
1315 # non-vendor systems don't have a conflict
1316 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1319 (*) prefix=$ac_default_prefix
1323 echo "$as_me:1323: result: $prefix" >&5
1324 echo "${ECHO_T}$prefix" >&6
1326 if test "x$prefix" = "xNONE" ; then
1327 echo "$as_me:1327: checking for default include-directory" >&5
1328 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1329 test -n "$verbose" && echo 1>&6
1332 "$includedir/ncurses" \
1334 "$prefix/include/ncurses" \
1335 /usr/local/include \
1336 /usr/local/include/ncurses \
1338 /usr/include/ncurses
1340 cf_dir=`eval echo "$cf_symbol"`
1341 if test -f "$cf_dir/curses.h" ; then
1342 if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1343 includedir="$cf_symbol"
1344 test -n "$verbose" && echo $ECHO_N " found " 1>&6
1348 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1350 echo "$as_me:1350: result: $includedir" >&5
1351 echo "${ECHO_T}$includedir" >&6
1354 ### Checks for programs.
1357 ac_cpp='$CPP $CPPFLAGS'
1358 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1359 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1360 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1361 ac_main_return="return"
1362 if test -n "$ac_tool_prefix"; then
1363 for ac_prog in gnatgcc gcc cc
1365 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1366 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1367 echo "$as_me:1367: checking for $ac_word" >&5
1368 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1369 if test "${ac_cv_prog_CC+set}" = set; then
1370 echo $ECHO_N "(cached) $ECHO_C" >&6
1372 if test -n "$CC"; then
1373 ac_cv_prog_CC="$CC" # Let the user override the test.
1375 ac_save_IFS=$IFS; IFS=$ac_path_separator
1377 for ac_dir in $ac_dummy; do
1379 test -z "$ac_dir" && ac_dir=.
1380 $as_executable_p "$ac_dir/$ac_word" || continue
1381 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1382 echo "$as_me:1382: found $ac_dir/$ac_word" >&5
1389 if test -n "$CC"; then
1390 echo "$as_me:1390: result: $CC" >&5
1391 echo "${ECHO_T}$CC" >&6
1393 echo "$as_me:1393: result: no" >&5
1394 echo "${ECHO_T}no" >&6
1397 test -n "$CC" && break
1400 if test -z "$CC"; then
1402 for ac_prog in gnatgcc gcc cc
1404 # Extract the first word of "$ac_prog", so it can be a program name with args.
1405 set dummy $ac_prog; ac_word=$2
1406 echo "$as_me:1406: checking for $ac_word" >&5
1407 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1408 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1409 echo $ECHO_N "(cached) $ECHO_C" >&6
1411 if test -n "$ac_ct_CC"; then
1412 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1414 ac_save_IFS=$IFS; IFS=$ac_path_separator
1416 for ac_dir in $ac_dummy; do
1418 test -z "$ac_dir" && ac_dir=.
1419 $as_executable_p "$ac_dir/$ac_word" || continue
1420 ac_cv_prog_ac_ct_CC="$ac_prog"
1421 echo "$as_me:1421: found $ac_dir/$ac_word" >&5
1427 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1428 if test -n "$ac_ct_CC"; then
1429 echo "$as_me:1429: result: $ac_ct_CC" >&5
1430 echo "${ECHO_T}$ac_ct_CC" >&6
1432 echo "$as_me:1432: result: no" >&5
1433 echo "${ECHO_T}no" >&6
1436 test -n "$ac_ct_CC" && break
1442 test -z "$CC" && { { echo "$as_me:1442: error: no acceptable cc found in \$PATH" >&5
1443 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1444 { (exit 1); exit 1; }; }
1446 # Provide some information about the compiler.
1447 echo "$as_me:1447:" \
1448 "checking for C compiler version" >&5
1449 ac_compiler=`set X $ac_compile; echo "$2"`
1450 { (eval echo "$as_me:1450: \"$ac_compiler --version </dev/null >&5\"") >&5
1451 (eval $ac_compiler --version </dev/null >&5) 2>&5
1453 echo "$as_me:1453: \$? = $ac_status" >&5
1454 (exit "$ac_status"); }
1455 { (eval echo "$as_me:1455: \"$ac_compiler -v </dev/null >&5\"") >&5
1456 (eval $ac_compiler -v </dev/null >&5) 2>&5
1458 echo "$as_me:1458: \$? = $ac_status" >&5
1459 (exit "$ac_status"); }
1460 { (eval echo "$as_me:1460: \"$ac_compiler -V </dev/null >&5\"") >&5
1461 (eval $ac_compiler -V </dev/null >&5) 2>&5
1463 echo "$as_me:1463: \$? = $ac_status" >&5
1464 (exit "$ac_status"); }
1466 cat >"conftest.$ac_ext" <<_ACEOF
1467 #line 1467 "configure"
1468 #include "confdefs.h"
1478 ac_clean_files_save=$ac_clean_files
1479 ac_clean_files="$ac_clean_files a.out a.exe"
1480 # Try to create an executable without -o first, disregard a.out.
1481 # It will help us diagnose broken compilers, and finding out an intuition
1483 echo "$as_me:1483: checking for C compiler default output" >&5
1484 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1485 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1486 if { (eval echo "$as_me:1486: \"$ac_link_default\"") >&5
1487 (eval $ac_link_default) 2>&5
1489 echo "$as_me:1489: \$? = $ac_status" >&5
1490 (exit "$ac_status"); }; then
1491 # Find the output, starting from the most likely. This scheme is
1492 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1494 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1495 ls a.out conftest 2>/dev/null;
1496 ls a.* conftest.* 2>/dev/null`; do
1498 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1499 a.out ) # We found the default executable, but exeext='' is most
1502 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1503 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1510 echo "$as_me: failed program was:" >&5
1511 cat "conftest.$ac_ext" >&5
1512 { { echo "$as_me:1512: error: C compiler cannot create executables" >&5
1513 echo "$as_me: error: C compiler cannot create executables" >&2;}
1514 { (exit 77); exit 77; }; }
1517 ac_exeext=$ac_cv_exeext
1518 echo "$as_me:1518: result: $ac_file" >&5
1519 echo "${ECHO_T}$ac_file" >&6
1521 # Check the compiler produces executables we can run. If not, either
1522 # the compiler is broken, or we cross compile.
1523 echo "$as_me:1523: checking whether the C compiler works" >&5
1524 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1525 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1526 # If not cross compiling, check that we can run a simple program.
1527 if test "$cross_compiling" != yes; then
1528 if { ac_try='./$ac_file'
1529 { (eval echo "$as_me:1529: \"$ac_try\"") >&5
1532 echo "$as_me:1532: \$? = $ac_status" >&5
1533 (exit "$ac_status"); }; }; then
1536 if test "$cross_compiling" = maybe; then
1539 { { echo "$as_me:1539: error: cannot run C compiled programs.
1540 If you meant to cross compile, use \`--host'." >&5
1541 echo "$as_me: error: cannot run C compiled programs.
1542 If you meant to cross compile, use \`--host'." >&2;}
1543 { (exit 1); exit 1; }; }
1547 echo "$as_me:1547: result: yes" >&5
1548 echo "${ECHO_T}yes" >&6
1550 rm -f a.out a.exe "conftest$ac_cv_exeext"
1551 ac_clean_files=$ac_clean_files_save
1552 # Check the compiler produces executables we can run. If not, either
1553 # the compiler is broken, or we cross compile.
1554 echo "$as_me:1554: checking whether we are cross compiling" >&5
1555 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1556 echo "$as_me:1556: result: $cross_compiling" >&5
1557 echo "${ECHO_T}$cross_compiling" >&6
1559 echo "$as_me:1559: checking for executable suffix" >&5
1560 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1561 if { (eval echo "$as_me:1561: \"$ac_link\"") >&5
1562 (eval $ac_link) 2>&5
1564 echo "$as_me:1564: \$? = $ac_status" >&5
1565 (exit "$ac_status"); }; then
1566 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1567 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1568 # work properly (i.e., refer to `conftest.exe'), while it won't with
1570 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1572 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1573 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1580 { { echo "$as_me:1580: error: cannot compute EXEEXT: cannot compile and link" >&5
1581 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1582 { (exit 1); exit 1; }; }
1585 rm -f "conftest$ac_cv_exeext"
1586 echo "$as_me:1586: result: $ac_cv_exeext" >&5
1587 echo "${ECHO_T}$ac_cv_exeext" >&6
1589 rm -f "conftest.$ac_ext"
1590 EXEEXT=$ac_cv_exeext
1592 echo "$as_me:1592: checking for object suffix" >&5
1593 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1594 if test "${ac_cv_objext+set}" = set; then
1595 echo $ECHO_N "(cached) $ECHO_C" >&6
1597 cat >"conftest.$ac_ext" <<_ACEOF
1598 #line 1598 "configure"
1599 #include "confdefs.h"
1609 rm -f conftest.o conftest.obj
1610 if { (eval echo "$as_me:1610: \"$ac_compile\"") >&5
1611 (eval $ac_compile) 2>&5
1613 echo "$as_me:1613: \$? = $ac_status" >&5
1614 (exit "$ac_status"); }; then
1615 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1617 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1618 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1623 echo "$as_me: failed program was:" >&5
1624 cat "conftest.$ac_ext" >&5
1625 { { echo "$as_me:1625: error: cannot compute OBJEXT: cannot compile" >&5
1626 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1627 { (exit 1); exit 1; }; }
1630 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1632 echo "$as_me:1632: result: $ac_cv_objext" >&5
1633 echo "${ECHO_T}$ac_cv_objext" >&6
1634 OBJEXT=$ac_cv_objext
1636 echo "$as_me:1636: checking whether we are using the GNU C compiler" >&5
1637 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1638 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1639 echo $ECHO_N "(cached) $ECHO_C" >&6
1641 cat >"conftest.$ac_ext" <<_ACEOF
1642 #line 1642 "configure"
1643 #include "confdefs.h"
1656 rm -f "conftest.$ac_objext"
1657 if { (eval echo "$as_me:1657: \"$ac_compile\"") >&5
1658 (eval $ac_compile) 2>&5
1660 echo "$as_me:1660: \$? = $ac_status" >&5
1661 (exit "$ac_status"); } &&
1662 { ac_try='test -s "conftest.$ac_objext"'
1663 { (eval echo "$as_me:1663: \"$ac_try\"") >&5
1666 echo "$as_me:1666: \$? = $ac_status" >&5
1667 (exit "$ac_status"); }; }; then
1670 echo "$as_me: failed program was:" >&5
1671 cat "conftest.$ac_ext" >&5
1674 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1675 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1678 echo "$as_me:1678: result: $ac_cv_c_compiler_gnu" >&5
1679 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1680 GCC=`test $ac_compiler_gnu = yes && echo yes`
1681 ac_test_CFLAGS=${CFLAGS+set}
1682 ac_save_CFLAGS=$CFLAGS
1684 echo "$as_me:1684: checking whether $CC accepts -g" >&5
1685 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1686 if test "${ac_cv_prog_cc_g+set}" = set; then
1687 echo $ECHO_N "(cached) $ECHO_C" >&6
1689 cat >"conftest.$ac_ext" <<_ACEOF
1690 #line 1690 "configure"
1691 #include "confdefs.h"
1701 rm -f "conftest.$ac_objext"
1702 if { (eval echo "$as_me:1702: \"$ac_compile\"") >&5
1703 (eval $ac_compile) 2>&5
1705 echo "$as_me:1705: \$? = $ac_status" >&5
1706 (exit "$ac_status"); } &&
1707 { ac_try='test -s "conftest.$ac_objext"'
1708 { (eval echo "$as_me:1708: \"$ac_try\"") >&5
1711 echo "$as_me:1711: \$? = $ac_status" >&5
1712 (exit "$ac_status"); }; }; then
1715 echo "$as_me: failed program was:" >&5
1716 cat "conftest.$ac_ext" >&5
1719 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1721 echo "$as_me:1721: result: $ac_cv_prog_cc_g" >&5
1722 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1723 if test "$ac_test_CFLAGS" = set; then
1724 CFLAGS=$ac_save_CFLAGS
1725 elif test $ac_cv_prog_cc_g = yes; then
1726 if test "$GCC" = yes; then
1732 if test "$GCC" = yes; then
1738 # Some people use a C++ compiler to compile C. Since we use `exit',
1739 # in C++ we need to declare it. In case someone uses the same compiler
1740 # for both compiling C and C++ we need to have the C++ compiler decide
1741 # the declaration of exit, since it's the most demanding environment.
1742 cat >"conftest.$ac_ext" <<_ACEOF
1747 rm -f "conftest.$ac_objext"
1748 if { (eval echo "$as_me:1748: \"$ac_compile\"") >&5
1749 (eval $ac_compile) 2>&5
1751 echo "$as_me:1751: \$? = $ac_status" >&5
1752 (exit "$ac_status"); } &&
1753 { ac_try='test -s "conftest.$ac_objext"'
1754 { (eval echo "$as_me:1754: \"$ac_try\"") >&5
1757 echo "$as_me:1757: \$? = $ac_status" >&5
1758 (exit "$ac_status"); }; }; then
1759 for ac_declaration in \
1761 '#include <stdlib.h>' \
1762 'extern "C" void std::exit (int) throw (); using std::exit;' \
1763 'extern "C" void std::exit (int); using std::exit;' \
1764 'extern "C" void exit (int) throw ();' \
1765 'extern "C" void exit (int);' \
1768 cat >"conftest.$ac_ext" <<_ACEOF
1769 #line 1769 "configure"
1770 #include "confdefs.h"
1781 rm -f "conftest.$ac_objext"
1782 if { (eval echo "$as_me:1782: \"$ac_compile\"") >&5
1783 (eval $ac_compile) 2>&5
1785 echo "$as_me:1785: \$? = $ac_status" >&5
1786 (exit "$ac_status"); } &&
1787 { ac_try='test -s "conftest.$ac_objext"'
1788 { (eval echo "$as_me:1788: \"$ac_try\"") >&5
1791 echo "$as_me:1791: \$? = $ac_status" >&5
1792 (exit "$ac_status"); }; }; then
1795 echo "$as_me: failed program was:" >&5
1796 cat "conftest.$ac_ext" >&5
1799 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1800 cat >"conftest.$ac_ext" <<_ACEOF
1801 #line 1801 "configure"
1802 #include "confdefs.h"
1812 rm -f "conftest.$ac_objext"
1813 if { (eval echo "$as_me:1813: \"$ac_compile\"") >&5
1814 (eval $ac_compile) 2>&5
1816 echo "$as_me:1816: \$? = $ac_status" >&5
1817 (exit "$ac_status"); } &&
1818 { ac_try='test -s "conftest.$ac_objext"'
1819 { (eval echo "$as_me:1819: \"$ac_try\"") >&5
1822 echo "$as_me:1822: \$? = $ac_status" >&5
1823 (exit "$ac_status"); }; }; then
1826 echo "$as_me: failed program was:" >&5
1827 cat "conftest.$ac_ext" >&5
1829 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1832 if test -n "$ac_declaration"; then
1833 echo '#ifdef __cplusplus' >>confdefs.h
1834 echo "$ac_declaration" >>confdefs.h
1835 echo '#endif' >>confdefs.h
1839 echo "$as_me: failed program was:" >&5
1840 cat "conftest.$ac_ext" >&5
1842 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1844 ac_cpp='$CPP $CPPFLAGS'
1845 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1846 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1847 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1848 ac_main_return="return"
1851 if test "$GCC" = yes ; then
1852 echo "$as_me:1852: checking version of $CC" >&5
1853 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1854 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1855 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1856 echo "$as_me:1856: result: $GCC_VERSION" >&5
1857 echo "${ECHO_T}$GCC_VERSION" >&6
1862 if test "$GCC" = yes ; then
1865 echo "$as_me:1865: checking if this is really Intel C compiler" >&5
1866 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1867 cf_save_CFLAGS="$CFLAGS"
1868 CFLAGS="$CFLAGS -no-gcc"
1869 cat >"conftest.$ac_ext" <<_ACEOF
1870 #line 1870 "configure"
1871 #include "confdefs.h"
1877 #ifdef __INTEL_COMPILER
1886 rm -f "conftest.$ac_objext"
1887 if { (eval echo "$as_me:1887: \"$ac_compile\"") >&5
1888 (eval $ac_compile) 2>&5
1890 echo "$as_me:1890: \$? = $ac_status" >&5
1891 (exit "$ac_status"); } &&
1892 { ac_try='test -s "conftest.$ac_objext"'
1893 { (eval echo "$as_me:1893: \"$ac_try\"") >&5
1896 echo "$as_me:1896: \$? = $ac_status" >&5
1897 (exit "$ac_status"); }; }; then
1899 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1902 echo "$as_me: failed program was:" >&5
1903 cat "conftest.$ac_ext" >&5
1905 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1906 CFLAGS="$cf_save_CFLAGS"
1907 echo "$as_me:1907: result: $INTEL_COMPILER" >&5
1908 echo "${ECHO_T}$INTEL_COMPILER" >&6
1915 if test "$GCC" = yes ; then
1916 echo "$as_me:1916: checking if this is really Clang C compiler" >&5
1917 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1918 cf_save_CFLAGS="$CFLAGS"
1919 cat >"conftest.$ac_ext" <<_ACEOF
1920 #line 1920 "configure"
1921 #include "confdefs.h"
1936 rm -f "conftest.$ac_objext"
1937 if { (eval echo "$as_me:1937: \"$ac_compile\"") >&5
1938 (eval $ac_compile) 2>&5
1940 echo "$as_me:1940: \$? = $ac_status" >&5
1941 (exit "$ac_status"); } &&
1942 { ac_try='test -s "conftest.$ac_objext"'
1943 { (eval echo "$as_me:1943: \"$ac_try\"") >&5
1946 echo "$as_me:1946: \$? = $ac_status" >&5
1947 (exit "$ac_status"); }; }; then
1951 echo "$as_me: failed program was:" >&5
1952 cat "conftest.$ac_ext" >&5
1954 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1955 CFLAGS="$cf_save_CFLAGS"
1956 echo "$as_me:1956: result: $CLANG_COMPILER" >&5
1957 echo "${ECHO_T}$CLANG_COMPILER" >&6
1962 if test "x$CLANG_COMPILER" = "xyes" ; then
1964 (c[1-9][0-9]|*/c[1-9][0-9])
1965 { echo "$as_me:1965: WARNING: replacing broken compiler alias $CC" >&5
1966 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
1967 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
1972 echo "$as_me:1972: checking version of $CC" >&5
1973 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1974 CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1975 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
1976 echo "$as_me:1976: result: $CLANG_VERSION" >&5
1977 echo "${ECHO_T}$CLANG_VERSION" >&6
1979 for cf_clang_opt in \
1980 -Qunused-arguments \
1981 -Wno-error=implicit-function-declaration
1983 echo "$as_me:1983: checking if option $cf_clang_opt works" >&5
1984 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
1985 cf_save_CFLAGS="$CFLAGS"
1986 CFLAGS="$CFLAGS $cf_clang_opt"
1987 cat >"conftest.$ac_ext" <<_ACEOF
1988 #line 1988 "configure"
1989 #include "confdefs.h"
1996 printf("hello!\\n");
2001 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2002 if { (eval echo "$as_me:2002: \"$ac_link\"") >&5
2003 (eval $ac_link) 2>&5
2005 echo "$as_me:2005: \$? = $ac_status" >&5
2006 (exit "$ac_status"); } &&
2007 { ac_try='test -s "conftest$ac_exeext"'
2008 { (eval echo "$as_me:2008: \"$ac_try\"") >&5
2011 echo "$as_me:2011: \$? = $ac_status" >&5
2012 (exit "$ac_status"); }; }; then
2016 echo "$as_me: failed program was:" >&5
2017 cat "conftest.$ac_ext" >&5
2021 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2022 echo "$as_me:2022: result: $cf_clang_optok" >&5
2023 echo "${ECHO_T}$cf_clang_optok" >&6
2024 CFLAGS="$cf_save_CFLAGS"
2025 if test "$cf_clang_optok" = yes; then
2026 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2028 echo "${as_me:-configure}:2028: testing adding option $cf_clang_opt ..." 1>&5
2030 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2031 CFLAGS="${CFLAGS}$cf_clang_opt"
2037 echo "$as_me:2037: checking for $CC option to accept ANSI C" >&5
2038 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2039 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2040 echo $ECHO_N "(cached) $ECHO_C" >&6
2042 ac_cv_prog_cc_stdc=no
2044 cat >"conftest.$ac_ext" <<_ACEOF
2045 #line 2045 "configure"
2046 #include "confdefs.h"
2049 #include <sys/types.h>
2050 #include <sys/stat.h>
2051 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2052 struct buf { int x; };
2053 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2054 static char *e (p, i)
2060 static char *f (char * (*g) (char **, int), char **p, ...)
2065 s = g (p, va_arg (v,int));
2069 int test (int i, double x);
2070 struct s1 {int (*f) (int a);};
2071 struct s2 {int (*f) (double a);};
2072 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2078 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2083 # Don't try gcc -ansi; that turns off useful extensions and
2084 # breaks some systems' header files.
2085 # AIX -qlanglvl=ansi
2086 # Ultrix and OSF/1 -std1
2087 # HP-UX 10.20 and later -Ae
2088 # HP-UX older versions -Aa -D_HPUX_SOURCE
2089 # SVR4 -Xc -D__EXTENSIONS__
2090 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2092 CC="$ac_save_CC $ac_arg"
2093 rm -f "conftest.$ac_objext"
2094 if { (eval echo "$as_me:2094: \"$ac_compile\"") >&5
2095 (eval $ac_compile) 2>&5
2097 echo "$as_me:2097: \$? = $ac_status" >&5
2098 (exit "$ac_status"); } &&
2099 { ac_try='test -s "conftest.$ac_objext"'
2100 { (eval echo "$as_me:2100: \"$ac_try\"") >&5
2103 echo "$as_me:2103: \$? = $ac_status" >&5
2104 (exit "$ac_status"); }; }; then
2105 ac_cv_prog_cc_stdc=$ac_arg
2108 echo "$as_me: failed program was:" >&5
2109 cat "conftest.$ac_ext" >&5
2111 rm -f "conftest.$ac_objext"
2113 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2118 case "x$ac_cv_prog_cc_stdc" in
2120 echo "$as_me:2120: result: none needed" >&5
2121 echo "${ECHO_T}none needed" >&6 ;;
2123 echo "$as_me:2123: result: $ac_cv_prog_cc_stdc" >&5
2124 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2125 CC="$CC $ac_cv_prog_cc_stdc" ;;
2128 # This should have been defined by AC_PROG_CC
2131 echo "$as_me:2131: checking \$CFLAGS variable" >&5
2132 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2135 echo "$as_me:2135: result: broken" >&5
2136 echo "${ECHO_T}broken" >&6
2137 { echo "$as_me:2137: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2138 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2141 for cf_arg in $cf_flags
2147 cf_new_extra_cppflags=
2149 for cf_add_cflags in $cf_arg
2151 case "$cf_fix_cppflags" in
2153 case "$cf_add_cflags" in
2154 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2155 case "$cf_add_cflags" in
2157 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2159 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2160 && test -z "${cf_tst_cflags}" \
2161 && cf_fix_cppflags=yes
2163 if test "$cf_fix_cppflags" = yes ; then
2165 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2166 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2169 elif test "${cf_tst_cflags}" = "\"'" ; then
2171 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2172 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2182 case "$cf_add_cflags" in
2184 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2186 CPPFLAGS=`echo "$CPPFLAGS" | \
2187 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2188 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2193 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2194 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2201 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2202 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2209 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2210 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2212 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2214 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2215 && test -z "${cf_tst_cflags}" \
2216 && cf_fix_cppflags=no
2221 if test -n "$cf_new_cflags" ; then
2223 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2224 CFLAGS="${CFLAGS}$cf_new_cflags"
2228 if test -n "$cf_new_cppflags" ; then
2230 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2231 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2235 if test -n "$cf_new_extra_cppflags" ; then
2237 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2238 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2245 echo "$as_me:2245: result: ok" >&5
2246 echo "${ECHO_T}ok" >&6
2250 echo "$as_me:2250: checking \$CC variable" >&5
2251 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2254 echo "$as_me:2254: result: broken" >&5
2255 echo "${ECHO_T}broken" >&6
2256 { echo "$as_me:2256: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2257 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2259 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2260 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2262 for cf_arg in $cf_flags
2270 cf_new_extra_cppflags=
2272 for cf_add_cflags in $cf_arg
2274 case "$cf_fix_cppflags" in
2276 case "$cf_add_cflags" in
2277 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2278 case "$cf_add_cflags" in
2280 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2282 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2283 && test -z "${cf_tst_cflags}" \
2284 && cf_fix_cppflags=yes
2286 if test "$cf_fix_cppflags" = yes ; then
2288 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2289 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2292 elif test "${cf_tst_cflags}" = "\"'" ; then
2294 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2295 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2305 case "$cf_add_cflags" in
2307 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2309 CPPFLAGS=`echo "$CPPFLAGS" | \
2310 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2311 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2316 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2317 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2324 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2325 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2332 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2333 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2335 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2337 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2338 && test -z "${cf_tst_cflags}" \
2339 && cf_fix_cppflags=no
2344 if test -n "$cf_new_cflags" ; then
2346 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2347 CFLAGS="${CFLAGS}$cf_new_cflags"
2351 if test -n "$cf_new_cppflags" ; then
2353 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2354 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2358 if test -n "$cf_new_extra_cppflags" ; then
2360 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2361 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2371 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2373 echo "${as_me:-configure}:2373: testing resulting CC: '$CC' ..." 1>&5
2375 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2377 echo "${as_me:-configure}:2377: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2379 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2381 echo "${as_me:-configure}:2381: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2385 echo "$as_me:2385: result: ok" >&5
2386 echo "${ECHO_T}ok" >&6
2390 echo "$as_me:2390: checking for egrep" >&5
2391 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2392 if test "${ac_cv_path_EGREP+set}" = set; then
2393 echo $ECHO_N "(cached) $ECHO_C" >&6
2395 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2396 then ac_cv_path_EGREP="$GREP -E"
2398 for ac_prog in gegrep egrep
2400 # Extract the first word of "$ac_prog", so it can be a program name with args.
2401 set dummy $ac_prog; ac_word=$2
2402 echo "$as_me:2402: checking for $ac_word" >&5
2403 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2404 if test "${ac_cv_path_EGREP+set}" = set; then
2405 echo $ECHO_N "(cached) $ECHO_C" >&6
2409 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2412 ac_save_IFS=$IFS; IFS=$ac_path_separator
2414 for ac_dir in $ac_dummy; do
2416 test -z "$ac_dir" && ac_dir=.
2417 if $as_executable_p "$ac_dir/$ac_word"; then
2418 ac_cv_path_EGREP="$ac_dir/$ac_word"
2419 echo "$as_me:2419: found $ac_dir/$ac_word" >&5
2427 EGREP=$ac_cv_path_EGREP
2429 if test -n "$EGREP"; then
2430 echo "$as_me:2430: result: $EGREP" >&5
2431 echo "${ECHO_T}$EGREP" >&6
2433 echo "$as_me:2433: result: no" >&5
2434 echo "${ECHO_T}no" >&6
2437 test -n "$EGREP" && break
2439 test -n "$EGREP" || EGREP=": "
2441 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2441: error: cannot find workable egrep" >&5
2442 echo "$as_me: error: cannot find workable egrep" >&2;}
2443 { (exit 1); exit 1; }; }
2446 echo "$as_me:2446: result: $ac_cv_path_EGREP" >&5
2447 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2448 EGREP="$ac_cv_path_EGREP"
2451 ac_cpp='$CPP $CPPFLAGS'
2452 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2453 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2454 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2455 ac_main_return="return"
2456 echo "$as_me:2456: checking how to run the C preprocessor" >&5
2457 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2458 # On Suns, sometimes $CPP names a directory.
2459 if test -n "$CPP" && test -d "$CPP"; then
2462 if test -z "$CPP"; then
2463 if test "${ac_cv_prog_CPP+set}" = set; then
2464 echo $ECHO_N "(cached) $ECHO_C" >&6
2466 # Double quotes because CPP needs to be expanded
2467 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2470 for ac_c_preproc_warn_flag in '' yes
2472 # Use a header file that comes with gcc, so configuring glibc
2473 # with a fresh cross-compiler works.
2474 # On the NeXT, cc -E runs the code through the compiler's parser,
2475 # not just through cpp. "Syntax error" is here to catch this case.
2476 cat >"conftest.$ac_ext" <<_ACEOF
2477 #line 2477 "configure"
2478 #include "confdefs.h"
2482 if { (eval echo "$as_me:2482: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2483 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2485 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2487 cat conftest.err >&5
2488 echo "$as_me:2488: \$? = $ac_status" >&5
2489 (exit "$ac_status"); } >/dev/null; then
2490 if test -s conftest.err; then
2491 ac_cpp_err=$ac_c_preproc_warn_flag
2498 if test -z "$ac_cpp_err"; then
2501 echo "$as_me: failed program was:" >&5
2502 cat "conftest.$ac_ext" >&5
2503 # Broken: fails on valid input.
2506 rm -f conftest.err "conftest.$ac_ext"
2508 # OK, works on sane cases. Now check whether non-existent headers
2509 # can be detected and how.
2510 cat >"conftest.$ac_ext" <<_ACEOF
2511 #line 2511 "configure"
2512 #include "confdefs.h"
2513 #include <ac_nonexistent.h>
2515 if { (eval echo "$as_me:2515: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2516 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2518 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2520 cat conftest.err >&5
2521 echo "$as_me:2521: \$? = $ac_status" >&5
2522 (exit "$ac_status"); } >/dev/null; then
2523 if test -s conftest.err; then
2524 ac_cpp_err=$ac_c_preproc_warn_flag
2531 if test -z "$ac_cpp_err"; then
2532 # Broken: success on invalid input.
2535 echo "$as_me: failed program was:" >&5
2536 cat "conftest.$ac_ext" >&5
2537 # Passes both tests.
2541 rm -f conftest.err "conftest.$ac_ext"
2544 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2545 rm -f conftest.err "conftest.$ac_ext"
2546 if $ac_preproc_ok; then
2558 echo "$as_me:2558: result: $CPP" >&5
2559 echo "${ECHO_T}$CPP" >&6
2561 for ac_c_preproc_warn_flag in '' yes
2563 # Use a header file that comes with gcc, so configuring glibc
2564 # with a fresh cross-compiler works.
2565 # On the NeXT, cc -E runs the code through the compiler's parser,
2566 # not just through cpp. "Syntax error" is here to catch this case.
2567 cat >"conftest.$ac_ext" <<_ACEOF
2568 #line 2568 "configure"
2569 #include "confdefs.h"
2573 if { (eval echo "$as_me:2573: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2574 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2576 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2578 cat conftest.err >&5
2579 echo "$as_me:2579: \$? = $ac_status" >&5
2580 (exit "$ac_status"); } >/dev/null; then
2581 if test -s conftest.err; then
2582 ac_cpp_err=$ac_c_preproc_warn_flag
2589 if test -z "$ac_cpp_err"; then
2592 echo "$as_me: failed program was:" >&5
2593 cat "conftest.$ac_ext" >&5
2594 # Broken: fails on valid input.
2597 rm -f conftest.err "conftest.$ac_ext"
2599 # OK, works on sane cases. Now check whether non-existent headers
2600 # can be detected and how.
2601 cat >"conftest.$ac_ext" <<_ACEOF
2602 #line 2602 "configure"
2603 #include "confdefs.h"
2604 #include <ac_nonexistent.h>
2606 if { (eval echo "$as_me:2606: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2607 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2609 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2611 cat conftest.err >&5
2612 echo "$as_me:2612: \$? = $ac_status" >&5
2613 (exit "$ac_status"); } >/dev/null; then
2614 if test -s conftest.err; then
2615 ac_cpp_err=$ac_c_preproc_warn_flag
2622 if test -z "$ac_cpp_err"; then
2623 # Broken: success on invalid input.
2626 echo "$as_me: failed program was:" >&5
2627 cat "conftest.$ac_ext" >&5
2628 # Passes both tests.
2632 rm -f conftest.err "conftest.$ac_ext"
2635 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2636 rm -f conftest.err "conftest.$ac_ext"
2637 if $ac_preproc_ok; then
2640 { { echo "$as_me:2640: error: C preprocessor \"$CPP\" fails sanity check" >&5
2641 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2642 { (exit 1); exit 1; }; }
2646 ac_cpp='$CPP $CPPFLAGS'
2647 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2648 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2649 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2650 ac_main_return="return"
2652 if test $ac_cv_c_compiler_gnu = yes; then
2653 echo "$as_me:2653: checking whether $CC needs -traditional" >&5
2654 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2655 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2656 echo $ECHO_N "(cached) $ECHO_C" >&6
2658 ac_pattern="Autoconf.*'x'"
2659 cat >"conftest.$ac_ext" <<_ACEOF
2660 #line 2660 "configure"
2661 #include "confdefs.h"
2663 int Autoconf = TIOCGETP;
2665 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2666 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2667 ac_cv_prog_gcc_traditional=yes
2669 ac_cv_prog_gcc_traditional=no
2673 if test $ac_cv_prog_gcc_traditional = no; then
2674 cat >"conftest.$ac_ext" <<_ACEOF
2675 #line 2675 "configure"
2676 #include "confdefs.h"
2678 int Autoconf = TCGETA;
2680 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2681 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2682 ac_cv_prog_gcc_traditional=yes
2688 echo "$as_me:2688: result: $ac_cv_prog_gcc_traditional" >&5
2689 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2690 if test $ac_cv_prog_gcc_traditional = yes; then
2691 CC="$CC -traditional"
2695 echo "$as_me:2695: checking whether $CC understands -c and -o together" >&5
2696 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2697 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2698 echo $ECHO_N "(cached) $ECHO_C" >&6
2701 cat > conftest.$ac_ext <<CF_EOF
2704 ${cf_cv_main_return:-return}(0);
2707 # We do the test twice because some compilers refuse to overwrite an
2708 # existing .o file with -o, though they will create one.
2709 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2710 if { (eval echo "$as_me:2710: \"$ac_try\"") >&5
2713 echo "$as_me:2713: \$? = $ac_status" >&5
2714 (exit "$ac_status"); } &&
2715 test -f conftest2.$ac_objext && { (eval echo "$as_me:2715: \"$ac_try\"") >&5
2718 echo "$as_me:2718: \$? = $ac_status" >&5
2719 (exit "$ac_status"); };
2721 eval cf_cv_prog_CC_c_o=yes
2723 eval cf_cv_prog_CC_c_o=no
2728 if test "$cf_cv_prog_CC_c_o" = yes; then
2729 echo "$as_me:2729: result: yes" >&5
2730 echo "${ECHO_T}yes" >&6
2732 echo "$as_me:2732: result: no" >&5
2733 echo "${ECHO_T}no" >&6
2736 test "$program_prefix" != NONE &&
2737 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2738 # Use a double $ so make ignores it.
2739 test "$program_suffix" != NONE &&
2740 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2741 # Double any \ or $. echo might interpret backslashes.
2742 # By default was `s,x,x', remove it if useless.
2743 cat <<\_ACEOF >conftest.sed
2744 s/[\\$]/&&/g;s/;s,x,x,$//
2746 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2749 for ac_prog in mawk gawk nawk awk
2751 # Extract the first word of "$ac_prog", so it can be a program name with args.
2752 set dummy $ac_prog; ac_word=$2
2753 echo "$as_me:2753: checking for $ac_word" >&5
2754 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2755 if test "${ac_cv_prog_AWK+set}" = set; then
2756 echo $ECHO_N "(cached) $ECHO_C" >&6
2758 if test -n "$AWK"; then
2759 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2761 ac_save_IFS=$IFS; IFS=$ac_path_separator
2763 for ac_dir in $ac_dummy; do
2765 test -z "$ac_dir" && ac_dir=.
2766 $as_executable_p "$ac_dir/$ac_word" || continue
2767 ac_cv_prog_AWK="$ac_prog"
2768 echo "$as_me:2768: found $ac_dir/$ac_word" >&5
2775 if test -n "$AWK"; then
2776 echo "$as_me:2776: result: $AWK" >&5
2777 echo "${ECHO_T}$AWK" >&6
2779 echo "$as_me:2779: result: no" >&5
2780 echo "${ECHO_T}no" >&6
2783 test -n "$AWK" && break
2786 test -z "$AWK" && { { echo "$as_me:2786: error: No awk program found" >&5
2787 echo "$as_me: error: No awk program found" >&2;}
2788 { (exit 1); exit 1; }; }
2790 echo "$as_me:2790: checking for egrep" >&5
2791 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2792 if test "${ac_cv_prog_egrep+set}" = set; then
2793 echo $ECHO_N "(cached) $ECHO_C" >&6
2795 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2796 then ac_cv_prog_egrep='grep -E'
2797 else ac_cv_prog_egrep='egrep'
2800 echo "$as_me:2800: result: $ac_cv_prog_egrep" >&5
2801 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2802 EGREP=$ac_cv_prog_egrep
2804 test -z "$EGREP" && { { echo "$as_me:2804: error: No egrep program found" >&5
2805 echo "$as_me: error: No egrep program found" >&2;}
2806 { (exit 1); exit 1; }; }
2808 # Find a good install program. We prefer a C program (faster),
2809 # so one script is as good as another. But avoid the broken or
2810 # incompatible versions:
2811 # SysV /etc/install, /usr/sbin/install
2812 # SunOS /usr/etc/install
2813 # IRIX /sbin/install
2815 # AmigaOS /C/install, which installs bootblocks on floppy discs
2816 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2817 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2818 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2819 # ./install, which can be erroneously created by make from ./install.sh.
2820 echo "$as_me:2820: checking for a BSD compatible install" >&5
2821 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2822 if test -z "$INSTALL"; then
2823 if test "${ac_cv_path_install+set}" = set; then
2824 echo $ECHO_N "(cached) $ECHO_C" >&6
2826 ac_save_IFS=$IFS; IFS=$ac_path_separator
2827 for ac_dir in $PATH; do
2829 # Account for people who put trailing slashes in PATH elements.
2831 / | ./ | .// | /cC/* \
2832 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2835 # OSF1 and SCO ODT 3.0 have their own names for install.
2836 # Don't use installbsd from OSF since it installs stuff as root
2838 for ac_prog in ginstall scoinst install; do
2839 if $as_executable_p "$ac_dir/$ac_prog"; then
2840 if test $ac_prog = install &&
2841 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2842 # AIX install. It has an incompatible calling convention.
2844 elif test $ac_prog = install &&
2845 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2846 # program-specific install script used by HP pwplus--don't use.
2849 ac_cv_path_install="$ac_dir/$ac_prog -c"
2859 if test "${ac_cv_path_install+set}" = set; then
2860 INSTALL=$ac_cv_path_install
2862 # As a last resort, use the slow shell script. We don't cache a
2863 # path for INSTALL within a source directory, because that will
2864 # break other packages using the cache if that directory is
2865 # removed, or if the path is relative.
2866 INSTALL=$ac_install_sh
2869 echo "$as_me:2869: result: $INSTALL" >&5
2870 echo "${ECHO_T}$INSTALL" >&6
2872 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2873 # It thinks the first close brace ends the variable substitution.
2874 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2876 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2878 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2880 echo "$as_me:2880: checking whether ln -s works" >&5
2881 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2883 if test "$LN_S" = "ln -s"; then
2884 echo "$as_me:2884: result: yes" >&5
2885 echo "${ECHO_T}yes" >&6
2887 echo "$as_me:2887: result: no, using $LN_S" >&5
2888 echo "${ECHO_T}no, using $LN_S" >&6
2891 echo "$as_me:2891: checking if $LN_S -f options work" >&5
2892 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2894 rm -f conf$$.src conf$$dst
2896 echo first >conf$$.src
2897 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2902 rm -f conf$$.dst conf$$src
2903 echo "$as_me:2903: result: $cf_prog_ln_sf" >&5
2904 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2906 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2908 # Find a good install program. We prefer a C program (faster),
2909 # so one script is as good as another. But avoid the broken or
2910 # incompatible versions:
2911 # SysV /etc/install, /usr/sbin/install
2912 # SunOS /usr/etc/install
2913 # IRIX /sbin/install
2915 # AmigaOS /C/install, which installs bootblocks on floppy discs
2916 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2917 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2918 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2919 # ./install, which can be erroneously created by make from ./install.sh.
2920 echo "$as_me:2920: checking for a BSD compatible install" >&5
2921 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2922 if test -z "$INSTALL"; then
2923 if test "${ac_cv_path_install+set}" = set; then
2924 echo $ECHO_N "(cached) $ECHO_C" >&6
2926 ac_save_IFS=$IFS; IFS=$ac_path_separator
2927 for ac_dir in $PATH; do
2929 # Account for people who put trailing slashes in PATH elements.
2931 / | ./ | .// | /cC/* \
2932 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2935 # OSF1 and SCO ODT 3.0 have their own names for install.
2936 # Don't use installbsd from OSF since it installs stuff as root
2938 for ac_prog in ginstall scoinst install; do
2939 if $as_executable_p "$ac_dir/$ac_prog"; then
2940 if test $ac_prog = install &&
2941 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2942 # AIX install. It has an incompatible calling convention.
2944 elif test $ac_prog = install &&
2945 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2946 # program-specific install script used by HP pwplus--don't use.
2949 ac_cv_path_install="$ac_dir/$ac_prog -c"
2959 if test "${ac_cv_path_install+set}" = set; then
2960 INSTALL=$ac_cv_path_install
2962 # As a last resort, use the slow shell script. We don't cache a
2963 # path for INSTALL within a source directory, because that will
2964 # break other packages using the cache if that directory is
2965 # removed, or if the path is relative.
2966 INSTALL=$ac_install_sh
2969 echo "$as_me:2969: result: $INSTALL" >&5
2970 echo "${ECHO_T}$INSTALL" >&6
2972 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2973 # It thinks the first close brace ends the variable substitution.
2974 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2976 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2978 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2984 cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
2985 test -z "$cf_dir" && cf_dir=.
2986 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
2990 echo "$as_me:2990: checking if you want to install stripped executables" >&5
2991 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2993 # Check whether --enable-stripping or --disable-stripping was given.
2994 if test "${enable_stripping+set}" = set; then
2995 enableval="$enable_stripping"
2996 test "$enableval" != no && enableval=yes
2997 if test "$enableval" != "yes" ; then
3000 enable_stripping=yes
3004 enable_stripping=yes
3007 echo "$as_me:3007: result: $enable_stripping" >&5
3008 echo "${ECHO_T}$enable_stripping" >&6
3010 if test "$enable_stripping" = yes
3017 : "${INSTALL:=install}"
3018 echo "$as_me:3018: checking if install accepts -p option" >&5
3019 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
3020 if test "${cf_cv_install_p+set}" = set; then
3021 echo $ECHO_N "(cached) $ECHO_C" >&6
3028 if $INSTALL -p conftest.in conftest.out 2>/dev/null
3030 if test -f conftest.out/conftest.in
3032 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
3033 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
3034 if test -s conftest.err
3049 echo "$as_me:3049: result: $cf_cv_install_p" >&5
3050 echo "${ECHO_T}$cf_cv_install_p" >&6
3052 echo "$as_me:3052: checking if install needs to be told about ownership" >&5
3053 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
3054 case `$ac_config_guess` in
3063 echo "$as_me:3063: result: $with_install_o" >&5
3064 echo "${ECHO_T}$with_install_o" >&6
3065 if test "x$with_install_o" = xyes
3067 INSTALL_OPT_O="`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`"
3072 echo "$as_me:3072: checking for long file names" >&5
3073 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3074 if test "${ac_cv_sys_long_file_names+set}" = set; then
3075 echo $ECHO_N "(cached) $ECHO_C" >&6
3077 ac_cv_sys_long_file_names=yes
3078 # Test for long file names in all the places we know might matter:
3079 # . the current directory, where building will happen
3080 # $prefix/lib where we will be installing things
3081 # $exec_prefix/lib likewise
3082 # eval it to expand exec_prefix.
3083 # $TMPDIR if set, where it might want to write temporary files
3084 # if $TMPDIR is not set:
3085 # /tmp where it might want to write temporary files
3088 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3091 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3093 for ac_dir in . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3094 test -d "$ac_dir" || continue
3095 test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3096 ac_xdir=$ac_dir/cf$$
3097 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3098 ac_tf1=$ac_xdir/conftest9012345
3099 ac_tf2=$ac_xdir/conftest9012346
3100 (echo 1 >"$ac_tf1") 2>/dev/null
3101 (echo 2 >"$ac_tf2") 2>/dev/null
3102 ac_val=`cat "$ac_tf1" 2>/dev/null`
3103 if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3104 ac_cv_sys_long_file_names=no
3105 rm -rf "$ac_xdir" 2>/dev/null
3108 rm -rf "$ac_xdir" 2>/dev/null
3111 echo "$as_me:3111: result: $ac_cv_sys_long_file_names" >&5
3112 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3113 if test "$ac_cv_sys_long_file_names" = yes; then
3115 cat >>confdefs.h <<\EOF
3116 #define HAVE_LONG_FILE_NAMES 1
3121 # if we find pkg-config, check if we should install the ".pc" files.
3123 echo "$as_me:3123: checking if you want to use pkg-config" >&5
3124 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3126 # Check whether --with-pkg-config or --without-pkg-config was given.
3127 if test "${with_pkg_config+set}" = set; then
3128 withval="$with_pkg_config"
3129 cf_pkg_config=$withval
3133 echo "$as_me:3133: result: $cf_pkg_config" >&5
3134 echo "${ECHO_T}$cf_pkg_config" >&6
3136 case "$cf_pkg_config" in
3142 if test -n "$ac_tool_prefix"; then
3143 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3144 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3145 echo "$as_me:3145: checking for $ac_word" >&5
3146 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3147 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3148 echo $ECHO_N "(cached) $ECHO_C" >&6
3152 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3155 ac_save_IFS=$IFS; IFS=$ac_path_separator
3157 for ac_dir in $ac_dummy; do
3159 test -z "$ac_dir" && ac_dir=.
3160 if $as_executable_p "$ac_dir/$ac_word"; then
3161 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3162 echo "$as_me:3162: found $ac_dir/$ac_word" >&5
3170 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3172 if test -n "$PKG_CONFIG"; then
3173 echo "$as_me:3173: result: $PKG_CONFIG" >&5
3174 echo "${ECHO_T}$PKG_CONFIG" >&6
3176 echo "$as_me:3176: result: no" >&5
3177 echo "${ECHO_T}no" >&6
3181 if test -z "$ac_cv_path_PKG_CONFIG"; then
3182 ac_pt_PKG_CONFIG=$PKG_CONFIG
3183 # Extract the first word of "pkg-config", so it can be a program name with args.
3184 set dummy pkg-config; ac_word=$2
3185 echo "$as_me:3185: checking for $ac_word" >&5
3186 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3187 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3188 echo $ECHO_N "(cached) $ECHO_C" >&6
3190 case $ac_pt_PKG_CONFIG in
3192 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3195 ac_save_IFS=$IFS; IFS=$ac_path_separator
3197 for ac_dir in $ac_dummy; do
3199 test -z "$ac_dir" && ac_dir=.
3200 if $as_executable_p "$ac_dir/$ac_word"; then
3201 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3202 echo "$as_me:3202: found $ac_dir/$ac_word" >&5
3207 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3211 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3213 if test -n "$ac_pt_PKG_CONFIG"; then
3214 echo "$as_me:3214: result: $ac_pt_PKG_CONFIG" >&5
3215 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3217 echo "$as_me:3217: result: no" >&5
3218 echo "${ECHO_T}no" >&6
3221 PKG_CONFIG=$ac_pt_PKG_CONFIG
3223 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3232 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3233 if test "$PKG_CONFIG" != none ; then
3235 if test "x$prefix" != xNONE; then
3236 cf_path_syntax="$prefix"
3238 cf_path_syntax="$ac_default_prefix"
3241 case ".$PKG_CONFIG" in
3246 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3248 (.\$\{*prefix\}*|.\$\{*dir\}*)
3249 eval PKG_CONFIG="$PKG_CONFIG"
3250 case ".$PKG_CONFIG" in
3252 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3257 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3260 { { echo "$as_me:3260: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3261 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3262 { (exit 1); exit 1; }; }
3266 elif test "x$cf_pkg_config" != xno ; then
3267 { echo "$as_me:3267: WARNING: pkg-config is not installed" >&5
3268 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3271 case "$PKG_CONFIG" in
3273 echo "$as_me:3273: checking for pkg-config library directory" >&5
3274 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3277 echo "$as_me:3277: checking for $PKG_CONFIG library directory" >&5
3278 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3282 # if $PKG_CONFIG_LIBDIR is set, try to use that
3283 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[ ]*,,'`
3285 # if the option is used, let that override. otherwise default to "libdir"
3287 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3288 if test "${with_pkg_config_libdir+set}" = set; then
3289 withval="$with_pkg_config_libdir"
3290 cf_search_path=$withval
3292 test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
3295 case x$cf_search_path in
3297 PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
3298 echo "$as_me:3298: result: $PKG_CONFIG_LIBDIR" >&5
3299 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3305 PKG_CONFIG_LIBDIR="$cf_search_path"
3306 echo "$as_me:3306: result: $PKG_CONFIG_LIBDIR" >&5
3307 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3311 echo "$as_me:3311: result: auto" >&5
3312 echo "${ECHO_T}auto" >&6
3314 # Look for the library directory using the same prefix as the executable
3315 echo "$as_me:3315: checking for search-list" >&5
3316 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
3317 if test "x$PKG_CONFIG" != xnone
3319 # works for pkg-config since version 0.24 (2009)
3320 # works for pkgconf since version 0.8.3 (2012)
3321 for cf_pkg_program in \
3322 `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
3326 cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
3327 test -n "$cf_search_path" && break
3330 # works for pkg-config since import in 2005 of original 2001 HP code.
3331 test -z "$cf_search_path" && \
3333 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
3334 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
3335 sub(\"^[^']*'\",\"\"); \
3336 sub(\"'.*\",\"\"); \
3337 printf \" %s\", \\$0; } \
3342 echo "$as_me:3342: result: $cf_search_path" >&5
3343 echo "${ECHO_T}$cf_search_path" >&6
3346 { { echo "$as_me:3346: error: Unexpected option value: $cf_search_path" >&5
3347 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
3348 { (exit 1); exit 1; }; }
3352 if test -n "$cf_search_path"
3354 echo "$as_me:3354: checking for first directory" >&5
3355 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
3356 cf_pkg_config_path=none
3357 for cf_config in $cf_search_path
3359 if test -d "$cf_config"
3361 cf_pkg_config_path=$cf_config
3365 echo "$as_me:3365: result: $cf_pkg_config_path" >&5
3366 echo "${ECHO_T}$cf_pkg_config_path" >&6
3368 if test "x$cf_pkg_config_path" != xnone ; then
3369 # limit this to the first directory found
3370 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
3373 if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
3375 echo "$as_me:3375: checking for workaround" >&5
3376 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
3377 if test "$prefix" = "NONE" ; then
3378 cf_prefix="$ac_default_prefix"
3382 eval cf_libdir=$libdir
3383 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
3385 for cf_config in $cf_search_path
3388 $cf_libdir/pkgconfig)
3389 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
3393 test -z "$cf_backup" && cf_backup=$cf_config
3397 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
3398 echo "$as_me:3398: result: $PKG_CONFIG_LIBDIR" >&5
3399 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3403 echo "$as_me:3403: checking if you want to build test-programs" >&5
3404 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3406 # Check whether --with-tests or --without-tests was given.
3407 if test "${with_tests+set}" = set; then
3408 withval="$with_tests"
3409 cf_with_tests=$withval
3413 echo "$as_me:3413: result: $cf_with_tests" >&5
3414 echo "${ECHO_T}$cf_with_tests" >&6
3416 echo "$as_me:3416: checking if we should assume mixed-case filenames" >&5
3417 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3419 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3420 if test "${enable_mixed_case+set}" = set; then
3421 enableval="$enable_mixed_case"
3422 enable_mixedcase=$enableval
3424 enable_mixedcase=auto
3426 echo "$as_me:3426: result: $enable_mixedcase" >&5
3427 echo "${ECHO_T}$enable_mixedcase" >&6
3428 if test "$enable_mixedcase" = "auto" ; then
3430 echo "$as_me:3430: checking if filesystem supports mixed-case filenames" >&5
3431 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3432 if test "${cf_cv_mixedcase+set}" = set; then
3433 echo $ECHO_N "(cached) $ECHO_C" >&6
3436 if test "$cross_compiling" = yes ; then
3437 case "$target_alias" in
3438 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3446 rm -f conftest CONFTEST
3448 if test -f CONFTEST ; then
3453 rm -f conftest CONFTEST
3457 echo "$as_me:3457: result: $cf_cv_mixedcase" >&5
3458 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3459 test "$cf_cv_mixedcase" = yes &&
3460 cat >>confdefs.h <<\EOF
3461 #define MIXEDCASE_FILENAMES 1
3465 cf_cv_mixedcase=$enable_mixedcase
3466 if test "$enable_mixedcase" = "yes" ; then
3467 cat >>confdefs.h <<\EOF
3468 #define MIXEDCASE_FILENAMES 1
3474 # do this after mixed-case option (tags/TAGS is not as important as tic).
3475 echo "$as_me:3475: checking whether ${MAKE-make} sets \${MAKE}" >&5
3476 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3477 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3478 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3479 echo $ECHO_N "(cached) $ECHO_C" >&6
3481 cat >conftest.make <<\EOF
3483 @echo 'ac_maketemp="${MAKE}"'
3485 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3486 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3487 if test -n "$ac_maketemp"; then
3488 eval ac_cv_prog_make_${ac_make}_set=yes
3490 eval ac_cv_prog_make_${ac_make}_set=no
3494 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3495 echo "$as_me:3495: result: yes" >&5
3496 echo "${ECHO_T}yes" >&6
3499 echo "$as_me:3499: result: no" >&5
3500 echo "${ECHO_T}no" >&6
3501 SET_MAKE="MAKE=${MAKE-make}"
3504 echo "$as_me:3504: checking for \".PHONY\" make-support" >&5
3505 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
3506 if test "${cf_cv_make_PHONY+set}" = set; then
3507 echo $ECHO_N "(cached) $ECHO_C" >&6
3512 mkdir conftest || exit 1
3514 cat >makefile <<'CF_EOF'
3518 @echo "** making $@ $(DATA)"
3520 @echo "** making $@ $(DATA)"
3522 @echo "** making $@ $(DATA)"
3525 @echo "** making $@ $(DATA)"
3528 for cf_data in 1 2 3
3530 ${MAKE:-make} always DATA=$cf_data
3531 ${MAKE:-make} once DATA=$cf_data
3532 ${MAKE:-make} -t always once
3533 if test -f always ; then
3534 echo "no (case 1)" > ../conftest.tmp
3535 elif test ! -f always.out ; then
3536 echo "no (case 2)" > ../conftest.tmp
3537 elif test ! -f once.out ; then
3538 echo "no (case 3)" > ../conftest.tmp
3539 elif ! cmp -s always.out once.out ; then
3540 echo "no (case 4)" > ../conftest.tmp
3541 diff always.out once.out
3543 cf_check="`cat always.out`"
3544 if test "x$cf_check" != "x$cf_data" ; then
3545 echo "no (case 5)" > ../conftest.tmp
3547 echo yes > ../conftest.tmp
3555 cf_cv_make_PHONY="`cat conftest.tmp`"
3559 echo "$as_me:3559: result: $cf_cv_make_PHONY" >&5
3560 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
3563 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
3564 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
3566 for ac_prog in exctags ctags
3568 # Extract the first word of "$ac_prog", so it can be a program name with args.
3569 set dummy $ac_prog; ac_word=$2
3570 echo "$as_me:3570: checking for $ac_word" >&5
3571 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3572 if test "${ac_cv_prog_CTAGS+set}" = set; then
3573 echo $ECHO_N "(cached) $ECHO_C" >&6
3575 if test -n "$CTAGS"; then
3576 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3578 ac_save_IFS=$IFS; IFS=$ac_path_separator
3580 for ac_dir in $ac_dummy; do
3582 test -z "$ac_dir" && ac_dir=.
3583 $as_executable_p "$ac_dir/$ac_word" || continue
3584 ac_cv_prog_CTAGS="$ac_prog"
3585 echo "$as_me:3585: found $ac_dir/$ac_word" >&5
3591 CTAGS=$ac_cv_prog_CTAGS
3592 if test -n "$CTAGS"; then
3593 echo "$as_me:3593: result: $CTAGS" >&5
3594 echo "${ECHO_T}$CTAGS" >&6
3596 echo "$as_me:3596: result: no" >&5
3597 echo "${ECHO_T}no" >&6
3600 test -n "$CTAGS" && break
3603 for ac_prog in exetags etags
3605 # Extract the first word of "$ac_prog", so it can be a program name with args.
3606 set dummy $ac_prog; ac_word=$2
3607 echo "$as_me:3607: checking for $ac_word" >&5
3608 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3609 if test "${ac_cv_prog_ETAGS+set}" = set; then
3610 echo $ECHO_N "(cached) $ECHO_C" >&6
3612 if test -n "$ETAGS"; then
3613 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3615 ac_save_IFS=$IFS; IFS=$ac_path_separator
3617 for ac_dir in $ac_dummy; do
3619 test -z "$ac_dir" && ac_dir=.
3620 $as_executable_p "$ac_dir/$ac_word" || continue
3621 ac_cv_prog_ETAGS="$ac_prog"
3622 echo "$as_me:3622: found $ac_dir/$ac_word" >&5
3628 ETAGS=$ac_cv_prog_ETAGS
3629 if test -n "$ETAGS"; then
3630 echo "$as_me:3630: result: $ETAGS" >&5
3631 echo "${ECHO_T}$ETAGS" >&6
3633 echo "$as_me:3633: result: no" >&5
3634 echo "${ECHO_T}no" >&6
3637 test -n "$ETAGS" && break
3640 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3641 set dummy ${CTAGS:-ctags}; ac_word=$2
3642 echo "$as_me:3642: checking for $ac_word" >&5
3643 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3644 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3645 echo $ECHO_N "(cached) $ECHO_C" >&6
3647 if test -n "$MAKE_LOWER_TAGS"; then
3648 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3650 ac_save_IFS=$IFS; IFS=$ac_path_separator
3652 for ac_dir in $ac_dummy; do
3654 test -z "$ac_dir" && ac_dir=.
3655 $as_executable_p "$ac_dir/$ac_word" || continue
3656 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3657 echo "$as_me:3657: found $ac_dir/$ac_word" >&5
3661 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3664 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3665 if test -n "$MAKE_LOWER_TAGS"; then
3666 echo "$as_me:3666: result: $MAKE_LOWER_TAGS" >&5
3667 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3669 echo "$as_me:3669: result: no" >&5
3670 echo "${ECHO_T}no" >&6
3673 if test "$cf_cv_mixedcase" = yes ; then
3674 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3675 set dummy ${ETAGS:-etags}; ac_word=$2
3676 echo "$as_me:3676: checking for $ac_word" >&5
3677 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3678 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3679 echo $ECHO_N "(cached) $ECHO_C" >&6
3681 if test -n "$MAKE_UPPER_TAGS"; then
3682 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3684 ac_save_IFS=$IFS; IFS=$ac_path_separator
3686 for ac_dir in $ac_dummy; do
3688 test -z "$ac_dir" && ac_dir=.
3689 $as_executable_p "$ac_dir/$ac_word" || continue
3690 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3691 echo "$as_me:3691: found $ac_dir/$ac_word" >&5
3695 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3698 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3699 if test -n "$MAKE_UPPER_TAGS"; then
3700 echo "$as_me:3700: result: $MAKE_UPPER_TAGS" >&5
3701 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3703 echo "$as_me:3703: result: no" >&5
3704 echo "${ECHO_T}no" >&6
3711 if test "$MAKE_UPPER_TAGS" = yes ; then
3717 if test "$MAKE_LOWER_TAGS" = yes ; then
3723 echo "$as_me:3723: checking for makeflags variable" >&5
3724 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3725 if test "${cf_cv_makeflags+set}" = set; then
3726 echo $ECHO_N "(cached) $ECHO_C" >&6
3730 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3732 cat >cf_makeflags.tmp <<CF_EOF
3735 @ echo '.$cf_option'
3737 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[ ]*$,,'`
3738 case "$cf_result" in
3740 cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
3741 case "$cf_result" in
3742 (.*CC=*) cf_cv_makeflags=
3744 (*) cf_cv_makeflags=$cf_option
3753 echo "${as_me:-configure}:3753: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3758 rm -f cf_makeflags.tmp
3761 echo "$as_me:3761: result: $cf_cv_makeflags" >&5
3762 echo "${ECHO_T}$cf_cv_makeflags" >&6
3764 if test -n "$ac_tool_prefix"; then
3765 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3766 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3767 echo "$as_me:3767: checking for $ac_word" >&5
3768 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3769 if test "${ac_cv_prog_RANLIB+set}" = set; then
3770 echo $ECHO_N "(cached) $ECHO_C" >&6
3772 if test -n "$RANLIB"; then
3773 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3775 ac_save_IFS=$IFS; IFS=$ac_path_separator
3777 for ac_dir in $ac_dummy; do
3779 test -z "$ac_dir" && ac_dir=.
3780 $as_executable_p "$ac_dir/$ac_word" || continue
3781 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3782 echo "$as_me:3782: found $ac_dir/$ac_word" >&5
3788 RANLIB=$ac_cv_prog_RANLIB
3789 if test -n "$RANLIB"; then
3790 echo "$as_me:3790: result: $RANLIB" >&5
3791 echo "${ECHO_T}$RANLIB" >&6
3793 echo "$as_me:3793: result: no" >&5
3794 echo "${ECHO_T}no" >&6
3798 if test -z "$ac_cv_prog_RANLIB"; then
3799 ac_ct_RANLIB=$RANLIB
3800 # Extract the first word of "ranlib", so it can be a program name with args.
3801 set dummy ranlib; ac_word=$2
3802 echo "$as_me:3802: checking for $ac_word" >&5
3803 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3804 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3805 echo $ECHO_N "(cached) $ECHO_C" >&6
3807 if test -n "$ac_ct_RANLIB"; then
3808 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3810 ac_save_IFS=$IFS; IFS=$ac_path_separator
3812 for ac_dir in $ac_dummy; do
3814 test -z "$ac_dir" && ac_dir=.
3815 $as_executable_p "$ac_dir/$ac_word" || continue
3816 ac_cv_prog_ac_ct_RANLIB="ranlib"
3817 echo "$as_me:3817: found $ac_dir/$ac_word" >&5
3821 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3824 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3825 if test -n "$ac_ct_RANLIB"; then
3826 echo "$as_me:3826: result: $ac_ct_RANLIB" >&5
3827 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3829 echo "$as_me:3829: result: no" >&5
3830 echo "${ECHO_T}no" >&6
3833 RANLIB=$ac_ct_RANLIB
3835 RANLIB="$ac_cv_prog_RANLIB"
3838 if test -n "$ac_tool_prefix"; then
3839 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3840 set dummy ${ac_tool_prefix}ld; ac_word=$2
3841 echo "$as_me:3841: checking for $ac_word" >&5
3842 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3843 if test "${ac_cv_prog_LD+set}" = set; then
3844 echo $ECHO_N "(cached) $ECHO_C" >&6
3846 if test -n "$LD"; then
3847 ac_cv_prog_LD="$LD" # Let the user override the test.
3849 ac_save_IFS=$IFS; IFS=$ac_path_separator
3851 for ac_dir in $ac_dummy; do
3853 test -z "$ac_dir" && ac_dir=.
3854 $as_executable_p "$ac_dir/$ac_word" || continue
3855 ac_cv_prog_LD="${ac_tool_prefix}ld"
3856 echo "$as_me:3856: found $ac_dir/$ac_word" >&5
3863 if test -n "$LD"; then
3864 echo "$as_me:3864: result: $LD" >&5
3865 echo "${ECHO_T}$LD" >&6
3867 echo "$as_me:3867: result: no" >&5
3868 echo "${ECHO_T}no" >&6
3872 if test -z "$ac_cv_prog_LD"; then
3874 # Extract the first word of "ld", so it can be a program name with args.
3875 set dummy ld; ac_word=$2
3876 echo "$as_me:3876: checking for $ac_word" >&5
3877 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3878 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3879 echo $ECHO_N "(cached) $ECHO_C" >&6
3881 if test -n "$ac_ct_LD"; then
3882 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3884 ac_save_IFS=$IFS; IFS=$ac_path_separator
3886 for ac_dir in $ac_dummy; do
3888 test -z "$ac_dir" && ac_dir=.
3889 $as_executable_p "$ac_dir/$ac_word" || continue
3890 ac_cv_prog_ac_ct_LD="ld"
3891 echo "$as_me:3891: found $ac_dir/$ac_word" >&5
3895 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3898 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3899 if test -n "$ac_ct_LD"; then
3900 echo "$as_me:3900: result: $ac_ct_LD" >&5
3901 echo "${ECHO_T}$ac_ct_LD" >&6
3903 echo "$as_me:3903: result: no" >&5
3904 echo "${ECHO_T}no" >&6
3912 if test -n "$ac_tool_prefix"; then
3913 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3914 set dummy ${ac_tool_prefix}ar; ac_word=$2
3915 echo "$as_me:3915: checking for $ac_word" >&5
3916 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3917 if test "${ac_cv_prog_AR+set}" = set; then
3918 echo $ECHO_N "(cached) $ECHO_C" >&6
3920 if test -n "$AR"; then
3921 ac_cv_prog_AR="$AR" # Let the user override the test.
3923 ac_save_IFS=$IFS; IFS=$ac_path_separator
3925 for ac_dir in $ac_dummy; do
3927 test -z "$ac_dir" && ac_dir=.
3928 $as_executable_p "$ac_dir/$ac_word" || continue
3929 ac_cv_prog_AR="${ac_tool_prefix}ar"
3930 echo "$as_me:3930: found $ac_dir/$ac_word" >&5
3937 if test -n "$AR"; then
3938 echo "$as_me:3938: result: $AR" >&5
3939 echo "${ECHO_T}$AR" >&6
3941 echo "$as_me:3941: result: no" >&5
3942 echo "${ECHO_T}no" >&6
3946 if test -z "$ac_cv_prog_AR"; then
3948 # Extract the first word of "ar", so it can be a program name with args.
3949 set dummy ar; ac_word=$2
3950 echo "$as_me:3950: checking for $ac_word" >&5
3951 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3952 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3953 echo $ECHO_N "(cached) $ECHO_C" >&6
3955 if test -n "$ac_ct_AR"; then
3956 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3958 ac_save_IFS=$IFS; IFS=$ac_path_separator
3960 for ac_dir in $ac_dummy; do
3962 test -z "$ac_dir" && ac_dir=.
3963 $as_executable_p "$ac_dir/$ac_word" || continue
3964 ac_cv_prog_ac_ct_AR="ar"
3965 echo "$as_me:3965: found $ac_dir/$ac_word" >&5
3969 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3972 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3973 if test -n "$ac_ct_AR"; then
3974 echo "$as_me:3974: result: $ac_ct_AR" >&5
3975 echo "${ECHO_T}$ac_ct_AR" >&6
3977 echo "$as_me:3977: result: no" >&5
3978 echo "${ECHO_T}no" >&6
3986 if test -n "$ac_tool_prefix"; then
3987 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3988 set dummy ${ac_tool_prefix}ar; ac_word=$2
3989 echo "$as_me:3989: checking for $ac_word" >&5
3990 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3991 if test "${ac_cv_prog_AR+set}" = set; then
3992 echo $ECHO_N "(cached) $ECHO_C" >&6
3994 if test -n "$AR"; then
3995 ac_cv_prog_AR="$AR" # Let the user override the test.
3997 ac_save_IFS=$IFS; IFS=$ac_path_separator
3999 for ac_dir in $ac_dummy; do
4001 test -z "$ac_dir" && ac_dir=.
4002 $as_executable_p "$ac_dir/$ac_word" || continue
4003 ac_cv_prog_AR="${ac_tool_prefix}ar"
4004 echo "$as_me:4004: found $ac_dir/$ac_word" >&5
4011 if test -n "$AR"; then
4012 echo "$as_me:4012: result: $AR" >&5
4013 echo "${ECHO_T}$AR" >&6
4015 echo "$as_me:4015: result: no" >&5
4016 echo "${ECHO_T}no" >&6
4020 if test -z "$ac_cv_prog_AR"; then
4022 # Extract the first word of "ar", so it can be a program name with args.
4023 set dummy ar; ac_word=$2
4024 echo "$as_me:4024: checking for $ac_word" >&5
4025 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4026 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4027 echo $ECHO_N "(cached) $ECHO_C" >&6
4029 if test -n "$ac_ct_AR"; then
4030 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4032 ac_save_IFS=$IFS; IFS=$ac_path_separator
4034 for ac_dir in $ac_dummy; do
4036 test -z "$ac_dir" && ac_dir=.
4037 $as_executable_p "$ac_dir/$ac_word" || continue
4038 ac_cv_prog_ac_ct_AR="ar"
4039 echo "$as_me:4039: found $ac_dir/$ac_word" >&5
4043 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4046 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4047 if test -n "$ac_ct_AR"; then
4048 echo "$as_me:4048: result: $ac_ct_AR" >&5
4049 echo "${ECHO_T}$ac_ct_AR" >&6
4051 echo "$as_me:4051: result: no" >&5
4052 echo "${ECHO_T}no" >&6
4060 echo "$as_me:4060: checking for options to update archives" >&5
4061 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4062 if test "${cf_cv_ar_flags+set}" = set; then
4063 echo $ECHO_N "(cached) $ECHO_C" >&6
4066 case "$cf_cv_system_name" in
4069 cat >mk_static_lib.sh <<-EOF
4074 exec \$MSVC_BIN -out:"\$out" \$@
4076 chmod +x mk_static_lib.sh
4077 AR=`pwd`/mk_static_lib.sh
4080 cf_cv_ar_flags=unknown
4081 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4084 # check if $ARFLAGS already contains this choice
4085 if test "x$ARFLAGS" != "x" ; then
4086 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4087 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4093 rm -f "conftest.$ac_cv_objext"
4096 cat >"conftest.$ac_ext" <<EOF
4097 #line 4097 "configure"
4098 int testdata[3] = { 123, 456, 789 };
4100 if { (eval echo "$as_me:4100: \"$ac_compile\"") >&5
4101 (eval $ac_compile) 2>&5
4103 echo "$as_me:4103: \$? = $ac_status" >&5
4104 (exit "$ac_status"); } ; then
4105 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4106 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
4107 if test -f conftest.a ; then
4108 cf_cv_ar_flags="$cf_ar_flags"
4112 test -n "$verbose" && echo " cannot compile test-program" 1>&6
4114 echo "${as_me:-configure}:4114: testing cannot compile test-program ..." 1>&5
4119 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
4124 echo "$as_me:4124: result: $cf_cv_ar_flags" >&5
4125 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4127 if test -n "$ARFLAGS" ; then
4128 if test -n "$cf_cv_ar_flags" ; then
4129 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4132 ARFLAGS=$cf_cv_ar_flags
4135 echo "$as_me:4135: checking for PATH separator" >&5
4136 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4137 case "$cf_cv_system_name" in
4138 (os2*) PATH_SEPARATOR=';' ;;
4139 (*) ${PATH_SEPARATOR:=':'} ;;
4142 echo "$as_me:4142: result: $PATH_SEPARATOR" >&5
4143 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4145 echo "$as_me:4145: checking if you have specified an install-prefix" >&5
4146 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4148 # Check whether --with-install-prefix or --without-install-prefix was given.
4149 if test "${with_install_prefix+set}" = set; then
4150 withval="$with_install_prefix"
4154 (*) DESTDIR="$withval"
4158 echo "$as_me:4158: result: $DESTDIR" >&5
4159 echo "${ECHO_T}$DESTDIR" >&6
4161 ###############################################################################
4163 # If we're cross-compiling, allow the user to override the tools and their
4164 # options. The configure script is oriented toward identifying the host
4165 # compiler, etc., but we need a build compiler to generate parts of the source.
4167 if test "$cross_compiling" = yes ; then
4169 # defaults that we might want to override
4170 : ${BUILD_CFLAGS:=''}
4171 : ${BUILD_CPPFLAGS:=''}
4172 : ${BUILD_LDFLAGS:=''}
4174 : ${BUILD_EXEEXT:='$x'}
4175 : ${BUILD_OBJEXT:='o'}
4177 # Check whether --with-build-cc or --without-build-cc was given.
4178 if test "${with_build_cc+set}" = set; then
4179 withval="$with_build_cc"
4182 for ac_prog in gcc clang c99 c89 cc cl
4184 # Extract the first word of "$ac_prog", so it can be a program name with args.
4185 set dummy $ac_prog; ac_word=$2
4186 echo "$as_me:4186: checking for $ac_word" >&5
4187 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4188 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4189 echo $ECHO_N "(cached) $ECHO_C" >&6
4191 if test -n "$BUILD_CC"; then
4192 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4194 ac_save_IFS=$IFS; IFS=$ac_path_separator
4196 for ac_dir in $ac_dummy; do
4198 test -z "$ac_dir" && ac_dir=.
4199 $as_executable_p "$ac_dir/$ac_word" || continue
4200 ac_cv_prog_BUILD_CC="$ac_prog"
4201 echo "$as_me:4201: found $ac_dir/$ac_word" >&5
4207 BUILD_CC=$ac_cv_prog_BUILD_CC
4208 if test -n "$BUILD_CC"; then
4209 echo "$as_me:4209: result: $BUILD_CC" >&5
4210 echo "${ECHO_T}$BUILD_CC" >&6
4212 echo "$as_me:4212: result: no" >&5
4213 echo "${ECHO_T}no" >&6
4216 test -n "$BUILD_CC" && break
4218 test -n "$BUILD_CC" || BUILD_CC="none"
4221 echo "$as_me:4221: checking for native build C compiler" >&5
4222 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4223 echo "$as_me:4223: result: $BUILD_CC" >&5
4224 echo "${ECHO_T}$BUILD_CC" >&6
4226 echo "$as_me:4226: checking for native build C preprocessor" >&5
4227 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4229 # Check whether --with-build-cpp or --without-build-cpp was given.
4230 if test "${with_build_cpp+set}" = set; then
4231 withval="$with_build_cpp"
4232 BUILD_CPP="$withval"
4234 BUILD_CPP='${BUILD_CC} -E'
4236 echo "$as_me:4236: result: $BUILD_CPP" >&5
4237 echo "${ECHO_T}$BUILD_CPP" >&6
4239 echo "$as_me:4239: checking for native build C flags" >&5
4240 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4242 # Check whether --with-build-cflags or --without-build-cflags was given.
4243 if test "${with_build_cflags+set}" = set; then
4244 withval="$with_build_cflags"
4245 BUILD_CFLAGS="$withval"
4247 echo "$as_me:4247: result: $BUILD_CFLAGS" >&5
4248 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4250 echo "$as_me:4250: checking for native build C preprocessor-flags" >&5
4251 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4253 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4254 if test "${with_build_cppflags+set}" = set; then
4255 withval="$with_build_cppflags"
4256 BUILD_CPPFLAGS="$withval"
4258 echo "$as_me:4258: result: $BUILD_CPPFLAGS" >&5
4259 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4261 echo "$as_me:4261: checking for native build linker-flags" >&5
4262 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4264 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4265 if test "${with_build_ldflags+set}" = set; then
4266 withval="$with_build_ldflags"
4267 BUILD_LDFLAGS="$withval"
4269 echo "$as_me:4269: result: $BUILD_LDFLAGS" >&5
4270 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4272 echo "$as_me:4272: checking for native build linker-libraries" >&5
4273 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4275 # Check whether --with-build-libs or --without-build-libs was given.
4276 if test "${with_build_libs+set}" = set; then
4277 withval="$with_build_libs"
4278 BUILD_LIBS="$withval"
4280 echo "$as_me:4280: result: $BUILD_LIBS" >&5
4281 echo "${ECHO_T}$BUILD_LIBS" >&6
4283 # this assumes we're on Unix.
4287 : ${BUILD_CC:='${CC}'}
4289 if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
4290 { { echo "$as_me:4290: error: Cross-build requires two compilers.
4291 Use --with-build-cc to specify the native compiler." >&5
4292 echo "$as_me: error: Cross-build requires two compilers.
4293 Use --with-build-cc to specify the native compiler." >&2;}
4294 { (exit 1); exit 1; }; }
4298 : ${BUILD_CC:='${CC}'}
4299 : ${BUILD_CPP:='${CPP}'}
4300 : ${BUILD_CFLAGS:='${CFLAGS}'}
4301 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4302 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4303 : ${BUILD_LIBS:='${LIBS}'}
4304 : ${BUILD_EXEEXT:='$x'}
4305 : ${BUILD_OBJEXT:='o'}
4308 ###############################################################################
4310 ### Options to allow the user to specify the set of libraries which are used.
4311 ### Use "--without-normal --with-shared" to allow the default model to be
4312 ### shared, for example.
4315 echo "$as_me:4315: checking if you want to build shared C-objects" >&5
4316 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
4318 # Check whether --with-shared or --without-shared was given.
4319 if test "${with_shared+set}" = set; then
4320 withval="$with_shared"
4321 with_shared=$withval
4325 echo "$as_me:4325: result: $with_shared" >&5
4326 echo "${ECHO_T}$with_shared" >&6
4327 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4329 echo "$as_me:4329: checking for specified models" >&5
4330 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4331 test -z "$cf_list_models" && cf_list_models=normal
4332 echo "$as_me:4332: result: $cf_list_models" >&5
4333 echo "${ECHO_T}$cf_list_models" >&6
4335 ### Use the first model as the default, and save its suffix for use in building
4336 ### up test-applications.
4337 echo "$as_me:4337: checking for default model" >&5
4338 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4339 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4340 echo "$as_me:4340: result: $DFT_LWR_MODEL" >&5
4341 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4343 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4345 echo "$as_me:4345: checking for specific curses-directory" >&5
4346 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4348 # Check whether --with-curses-dir or --without-curses-dir was given.
4349 if test "${with_curses_dir+set}" = set; then
4350 withval="$with_curses_dir"
4351 cf_cv_curses_dir=$withval
4355 echo "$as_me:4355: result: $cf_cv_curses_dir" >&5
4356 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4358 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
4361 if test "x$prefix" != xNONE; then
4362 cf_path_syntax="$prefix"
4364 cf_path_syntax="$ac_default_prefix"
4372 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4374 (.\$\{*prefix\}*|.\$\{*dir\}*)
4375 eval withval="$withval"
4378 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4383 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4386 { { echo "$as_me:4386: error: expected a pathname, not \"$withval\"" >&5
4387 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4388 { (exit 1); exit 1; }; }
4392 if test -d "$cf_cv_curses_dir"
4395 if test -n "$cf_cv_curses_dir/include" ; then
4396 for cf_add_incdir in $cf_cv_curses_dir/include
4398 while test "$cf_add_incdir" != /usr/include
4400 if test -d "$cf_add_incdir"
4403 if test -n "$CFLAGS$CPPFLAGS" ; then
4404 # a loop is needed to ensure we can add subdirs of existing dirs
4405 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4406 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4407 cf_have_incdir=yes; break
4412 if test "$cf_have_incdir" = no ; then
4413 if test "$cf_add_incdir" = /usr/local/include ; then
4414 if test "$GCC" = yes
4416 cf_save_CPPFLAGS=$CPPFLAGS
4418 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4419 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4421 cat >"conftest.$ac_ext" <<_ACEOF
4422 #line 4422 "configure"
4423 #include "confdefs.h"
4433 rm -f "conftest.$ac_objext"
4434 if { (eval echo "$as_me:4434: \"$ac_compile\"") >&5
4435 (eval $ac_compile) 2>&5
4437 echo "$as_me:4437: \$? = $ac_status" >&5
4438 (exit "$ac_status"); } &&
4439 { ac_try='test -s "conftest.$ac_objext"'
4440 { (eval echo "$as_me:4440: \"$ac_try\"") >&5
4443 echo "$as_me:4443: \$? = $ac_status" >&5
4444 (exit "$ac_status"); }; }; then
4447 echo "$as_me: failed program was:" >&5
4448 cat "conftest.$ac_ext" >&5
4451 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4452 CPPFLAGS=$cf_save_CPPFLAGS
4457 if test "$cf_have_incdir" = no ; then
4458 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4460 echo "${as_me:-configure}:4460: testing adding $cf_add_incdir to include-path ..." 1>&5
4462 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4464 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
4465 test "$cf_top_incdir" = "$cf_add_incdir" && break
4466 cf_add_incdir="$cf_top_incdir"
4477 if test -n "$cf_cv_curses_dir/lib" ; then
4478 for cf_add_libdir in $cf_cv_curses_dir/lib
4480 if test "$cf_add_libdir" = /usr/lib ; then
4482 elif test -d "$cf_add_libdir"
4485 if test -n "$LDFLAGS$LIBS" ; then
4486 # a loop is needed to ensure we can add subdirs of existing dirs
4487 for cf_test_libdir in $LDFLAGS $LIBS ; do
4488 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4489 cf_have_libdir=yes; break
4493 if test "$cf_have_libdir" = no ; then
4494 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4496 echo "${as_me:-configure}:4496: testing adding $cf_add_libdir to library-path ..." 1>&5
4498 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4507 cf_ncuconfig_root=ncurses
4508 cf_have_ncuconfig=no
4510 if test "x${PKG_CONFIG:=none}" != xnone; then
4511 echo "$as_me:4511: checking pkg-config for $cf_ncuconfig_root" >&5
4512 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
4513 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
4514 echo "$as_me:4514: result: yes" >&5
4515 echo "${ECHO_T}yes" >&6
4517 echo "$as_me:4517: checking if the $cf_ncuconfig_root package files work" >&5
4518 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
4519 cf_have_ncuconfig=unknown
4521 cf_save_CFLAGS="$CFLAGS"
4522 cf_save_CPPFLAGS="$CPPFLAGS"
4523 cf_save_LIBS="$LIBS"
4525 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
4526 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
4528 # while -W for passing linker flags is prevalent, it is not "standard".
4529 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
4530 # incompatible _and_ non-standard -W option which gives an error. Work
4531 # around that pitfall.
4532 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
4538 cf_new_extra_cppflags=
4540 for cf_add_cflags in $cf_pkg_cflags
4542 case "$cf_fix_cppflags" in
4544 case "$cf_add_cflags" in
4545 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4546 case "$cf_add_cflags" in
4548 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4550 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4551 && test -z "${cf_tst_cflags}" \
4552 && cf_fix_cppflags=yes
4554 if test "$cf_fix_cppflags" = yes ; then
4556 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4557 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4560 elif test "${cf_tst_cflags}" = "\"'" ; then
4562 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4563 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4573 case "$cf_add_cflags" in
4575 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4577 CPPFLAGS=`echo "$CPPFLAGS" | \
4578 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4579 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4584 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4585 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4592 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4593 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4600 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4601 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4603 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4605 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4606 && test -z "${cf_tst_cflags}" \
4607 && cf_fix_cppflags=no
4612 if test -n "$cf_new_cflags" ; then
4614 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4615 CFLAGS="${CFLAGS}$cf_new_cflags"
4619 if test -n "$cf_new_cppflags" ; then
4621 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4622 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4626 if test -n "$cf_new_extra_cppflags" ; then
4628 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4629 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4636 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4638 for cf_add_1lib in $cf_add_0lib; do
4639 for cf_add_2lib in $cf_add_libs; do
4640 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4645 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4649 cat >"conftest.$ac_ext" <<_ACEOF
4650 #line 4650 "configure"
4651 #include "confdefs.h"
4652 #include <${cf_cv_ncurses_header:-curses.h}>
4656 initscr(); mousemask(0,0); tigetstr((char *)0);
4661 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4662 if { (eval echo "$as_me:4662: \"$ac_link\"") >&5
4663 (eval $ac_link) 2>&5
4665 echo "$as_me:4665: \$? = $ac_status" >&5
4666 (exit "$ac_status"); } &&
4667 { ac_try='test -s "conftest$ac_exeext"'
4668 { (eval echo "$as_me:4668: \"$ac_try\"") >&5
4671 echo "$as_me:4671: \$? = $ac_status" >&5
4672 (exit "$ac_status"); }; }; then
4673 if test "$cross_compiling" = yes; then
4674 cf_test_ncuconfig=maybe
4676 cat >"conftest.$ac_ext" <<_ACEOF
4677 #line 4677 "configure"
4678 #include "confdefs.h"
4679 #include <${cf_cv_ncurses_header:-curses.h}>
4681 { const char *xx = curses_version(); return (xx == 0); }
4683 rm -f "conftest$ac_exeext"
4684 if { (eval echo "$as_me:4684: \"$ac_link\"") >&5
4685 (eval $ac_link) 2>&5
4687 echo "$as_me:4687: \$? = $ac_status" >&5
4688 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4689 { (eval echo "$as_me:4689: \"$ac_try\"") >&5
4692 echo "$as_me:4692: \$? = $ac_status" >&5
4693 (exit "$ac_status"); }; }; then
4694 cf_test_ncuconfig=yes
4696 echo "$as_me: program exited with status $ac_status" >&5
4697 echo "$as_me: failed program was:" >&5
4698 cat "conftest.$ac_ext" >&5
4699 cf_test_ncuconfig=no
4701 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4704 echo "$as_me: failed program was:" >&5
4705 cat "conftest.$ac_ext" >&5
4706 cf_test_ncuconfig=no
4708 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4710 CFLAGS="$cf_save_CFLAGS"
4711 CPPFLAGS="$cf_save_CPPFLAGS"
4712 LIBS="$cf_save_LIBS"
4714 if test "x$cf_test_ncuconfig" != xyes; then
4715 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4716 cf_pkg_cflags="$cf_temp"
4717 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4718 cf_pkg_libs="$cf_temp"
4723 for cf_add_cflags in $cf_pkg_cflags
4725 case "x$cf_add_cflags" in
4728 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4731 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'`
4732 test "$CFLAGS" != "$cf_old_cflag" || break
4734 CFLAGS="$cf_old_cflag"
4737 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4740 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'`
4741 test "$CPPFLAGS" != "$cf_old_cflag" || break
4743 CPPFLAGS="$cf_old_cflag"
4752 cf_new_extra_cppflags=
4754 for cf_add_cflags in $cf_add_cflags
4756 case "$cf_fix_cppflags" in
4758 case "$cf_add_cflags" in
4759 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4760 case "$cf_add_cflags" in
4762 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4764 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4765 && test -z "${cf_tst_cflags}" \
4766 && cf_fix_cppflags=yes
4768 if test "$cf_fix_cppflags" = yes ; then
4770 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4771 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4774 elif test "${cf_tst_cflags}" = "\"'" ; then
4776 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4777 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4787 case "$cf_add_cflags" in
4789 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4791 CPPFLAGS=`echo "$CPPFLAGS" | \
4792 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4793 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4798 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4799 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4806 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4807 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4814 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4815 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4817 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4819 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4820 && test -z "${cf_tst_cflags}" \
4821 && cf_fix_cppflags=no
4826 if test -n "$cf_new_cflags" ; then
4828 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4829 CFLAGS="${CFLAGS}$cf_new_cflags"
4833 if test -n "$cf_new_cppflags" ; then
4835 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4836 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4840 if test -n "$cf_new_extra_cppflags" ; then
4842 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4843 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4852 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4854 for cf_add_1lib in $cf_add_0lib; do
4855 for cf_add_2lib in $cf_add_libs; do
4856 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4861 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4865 cat >"conftest.$ac_ext" <<_ACEOF
4866 #line 4866 "configure"
4867 #include "confdefs.h"
4868 #include <${cf_cv_ncurses_header:-curses.h}>
4872 initscr(); mousemask(0,0); tigetstr((char *)0);
4877 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4878 if { (eval echo "$as_me:4878: \"$ac_link\"") >&5
4879 (eval $ac_link) 2>&5
4881 echo "$as_me:4881: \$? = $ac_status" >&5
4882 (exit "$ac_status"); } &&
4883 { ac_try='test -s "conftest$ac_exeext"'
4884 { (eval echo "$as_me:4884: \"$ac_try\"") >&5
4887 echo "$as_me:4887: \$? = $ac_status" >&5
4888 (exit "$ac_status"); }; }; then
4889 if test "$cross_compiling" = yes; then
4890 cf_have_ncuconfig=maybe
4892 cat >"conftest.$ac_ext" <<_ACEOF
4893 #line 4893 "configure"
4894 #include "confdefs.h"
4895 #include <${cf_cv_ncurses_header:-curses.h}>
4897 { const char *xx = curses_version(); return (xx == 0); }
4899 rm -f "conftest$ac_exeext"
4900 if { (eval echo "$as_me:4900: \"$ac_link\"") >&5
4901 (eval $ac_link) 2>&5
4903 echo "$as_me:4903: \$? = $ac_status" >&5
4904 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4905 { (eval echo "$as_me:4905: \"$ac_try\"") >&5
4908 echo "$as_me:4908: \$? = $ac_status" >&5
4909 (exit "$ac_status"); }; }; then
4910 cf_have_ncuconfig=yes
4912 echo "$as_me: program exited with status $ac_status" >&5
4913 echo "$as_me: failed program was:" >&5
4914 cat "conftest.$ac_ext" >&5
4915 cf_have_ncuconfig=no
4917 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4920 echo "$as_me: failed program was:" >&5
4921 cat "conftest.$ac_ext" >&5
4922 cf_have_ncuconfig=no
4924 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4925 echo "$as_me:4925: result: $cf_have_ncuconfig" >&5
4926 echo "${ECHO_T}$cf_have_ncuconfig" >&6
4927 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
4928 if test "$cf_have_ncuconfig" != "yes"
4930 CPPFLAGS="$cf_save_CPPFLAGS"
4931 LIBS="$cf_save_LIBS"
4932 NCURSES_CONFIG_PKG=none
4935 cat >>confdefs.h <<\EOF
4939 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
4941 echo "$as_me:4941: checking for terminfo header" >&5
4942 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4943 if test "${cf_cv_term_header+set}" = set; then
4944 echo $ECHO_N "(cached) $ECHO_C" >&6
4947 case "${cf_cv_ncurses_header}" in
4948 (*/ncurses.h|*/ncursesw.h)
4949 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4952 cf_term_header=term.h
4956 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4958 cat >"conftest.$ac_ext" <<_ACEOF
4959 #line 4959 "configure"
4960 #include "confdefs.h"
4962 #include <${cf_cv_ncurses_header:-curses.h}>
4968 int x = auto_left_margin; (void)x
4973 rm -f "conftest.$ac_objext"
4974 if { (eval echo "$as_me:4974: \"$ac_compile\"") >&5
4975 (eval $ac_compile) 2>&5
4977 echo "$as_me:4977: \$? = $ac_status" >&5
4978 (exit "$ac_status"); } &&
4979 { ac_try='test -s "conftest.$ac_objext"'
4980 { (eval echo "$as_me:4980: \"$ac_try\"") >&5
4983 echo "$as_me:4983: \$? = $ac_status" >&5
4984 (exit "$ac_status"); }; }; then
4986 cf_cv_term_header="$cf_test"
4988 echo "$as_me: failed program was:" >&5
4989 cat "conftest.$ac_ext" >&5
4991 cf_cv_term_header=unknown
4994 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4995 test "$cf_cv_term_header" != unknown && break
4999 echo "$as_me:4999: result: $cf_cv_term_header" >&5
5000 echo "${ECHO_T}$cf_cv_term_header" >&6
5002 # Set definitions to allow ifdef'ing to accommodate subdirectories
5004 case "$cf_cv_term_header" in
5007 cat >>confdefs.h <<\EOF
5008 #define HAVE_TERM_H 1
5014 case "$cf_cv_term_header" in
5017 cat >>confdefs.h <<\EOF
5018 #define HAVE_NCURSES_TERM_H 1
5024 cat >>confdefs.h <<\EOF
5025 #define HAVE_NCURSESW_TERM_H 1
5034 echo "$as_me:5034: result: no" >&5
5035 echo "${ECHO_T}no" >&6
5036 NCURSES_CONFIG_PKG=none
5039 NCURSES_CONFIG_PKG=none
5042 if test "x$cf_have_ncuconfig" = "xno"; then
5043 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
5045 if test -n "$ac_tool_prefix"; then
5046 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5048 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5049 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5050 echo "$as_me:5050: checking for $ac_word" >&5
5051 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5052 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5053 echo $ECHO_N "(cached) $ECHO_C" >&6
5055 if test -n "$NCURSES_CONFIG"; then
5056 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5058 ac_save_IFS=$IFS; IFS=$ac_path_separator
5060 for ac_dir in $ac_dummy; do
5062 test -z "$ac_dir" && ac_dir=.
5063 $as_executable_p "$ac_dir/$ac_word" || continue
5064 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5065 echo "$as_me:5065: found $ac_dir/$ac_word" >&5
5071 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5072 if test -n "$NCURSES_CONFIG"; then
5073 echo "$as_me:5073: result: $NCURSES_CONFIG" >&5
5074 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5076 echo "$as_me:5076: result: no" >&5
5077 echo "${ECHO_T}no" >&6
5080 test -n "$NCURSES_CONFIG" && break
5083 if test -z "$NCURSES_CONFIG"; then
5084 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5085 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5087 # Extract the first word of "$ac_prog", so it can be a program name with args.
5088 set dummy $ac_prog; ac_word=$2
5089 echo "$as_me:5089: checking for $ac_word" >&5
5090 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5091 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5092 echo $ECHO_N "(cached) $ECHO_C" >&6
5094 if test -n "$ac_ct_NCURSES_CONFIG"; then
5095 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5097 ac_save_IFS=$IFS; IFS=$ac_path_separator
5099 for ac_dir in $ac_dummy; do
5101 test -z "$ac_dir" && ac_dir=.
5102 $as_executable_p "$ac_dir/$ac_word" || continue
5103 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5104 echo "$as_me:5104: found $ac_dir/$ac_word" >&5
5110 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5111 if test -n "$ac_ct_NCURSES_CONFIG"; then
5112 echo "$as_me:5112: result: $ac_ct_NCURSES_CONFIG" >&5
5113 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5115 echo "$as_me:5115: result: no" >&5
5116 echo "${ECHO_T}no" >&6
5119 test -n "$ac_ct_NCURSES_CONFIG" && break
5121 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5123 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5126 if test "$NCURSES_CONFIG" != none ; then
5128 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
5130 case "x$cf_add_cflags" in
5133 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5136 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'`
5137 test "$CFLAGS" != "$cf_old_cflag" || break
5139 CFLAGS="$cf_old_cflag"
5142 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5145 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'`
5146 test "$CPPFLAGS" != "$cf_old_cflag" || break
5148 CPPFLAGS="$cf_old_cflag"
5157 cf_new_extra_cppflags=
5159 for cf_add_cflags in $cf_add_cflags
5161 case "$cf_fix_cppflags" in
5163 case "$cf_add_cflags" in
5164 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5165 case "$cf_add_cflags" in
5167 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5169 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5170 && test -z "${cf_tst_cflags}" \
5171 && cf_fix_cppflags=yes
5173 if test "$cf_fix_cppflags" = yes ; then
5175 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5176 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5179 elif test "${cf_tst_cflags}" = "\"'" ; then
5181 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5182 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5192 case "$cf_add_cflags" in
5194 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5196 CPPFLAGS=`echo "$CPPFLAGS" | \
5197 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5198 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5203 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5204 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5211 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5212 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5219 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5220 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5222 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5224 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5225 && test -z "${cf_tst_cflags}" \
5226 && cf_fix_cppflags=no
5231 if test -n "$cf_new_cflags" ; then
5233 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5234 CFLAGS="${CFLAGS}$cf_new_cflags"
5238 if test -n "$cf_new_cppflags" ; then
5240 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5241 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5245 if test -n "$cf_new_extra_cppflags" ; then
5247 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5248 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5257 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5259 for cf_add_1lib in $cf_add_0lib; do
5260 for cf_add_2lib in $cf_add_libs; do
5261 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5266 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5270 # even with config script, some packages use no-override for curses.h
5272 echo "$as_me:5272: checking if we have identified curses headers" >&5
5273 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5274 if test "${cf_cv_ncurses_header+set}" = set; then
5275 echo $ECHO_N "(cached) $ECHO_C" >&6
5278 cf_cv_ncurses_header=none
5280 ncurses.h ncurses/ncurses.h \
5281 curses.h ncurses/curses.h
5283 cat >"conftest.$ac_ext" <<_ACEOF
5284 #line 5284 "configure"
5285 #include "confdefs.h"
5286 #include <${cf_header}>
5290 initscr(); tgoto("?", 0,0)
5295 rm -f "conftest.$ac_objext"
5296 if { (eval echo "$as_me:5296: \"$ac_compile\"") >&5
5297 (eval $ac_compile) 2>&5
5299 echo "$as_me:5299: \$? = $ac_status" >&5
5300 (exit "$ac_status"); } &&
5301 { ac_try='test -s "conftest.$ac_objext"'
5302 { (eval echo "$as_me:5302: \"$ac_try\"") >&5
5305 echo "$as_me:5305: \$? = $ac_status" >&5
5306 (exit "$ac_status"); }; }; then
5307 cf_cv_ncurses_header=$cf_header; break
5309 echo "$as_me: failed program was:" >&5
5310 cat "conftest.$ac_ext" >&5
5312 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5316 echo "$as_me:5316: result: $cf_cv_ncurses_header" >&5
5317 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5319 if test "$cf_cv_ncurses_header" = none ; then
5320 { { echo "$as_me:5320: error: No curses header-files found" >&5
5321 echo "$as_me: error: No curses header-files found" >&2;}
5322 { (exit 1); exit 1; }; }
5325 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5327 for ac_header in $cf_cv_ncurses_header
5329 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5330 echo "$as_me:5330: checking for $ac_header" >&5
5331 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5332 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5333 echo $ECHO_N "(cached) $ECHO_C" >&6
5335 cat >"conftest.$ac_ext" <<_ACEOF
5336 #line 5336 "configure"
5337 #include "confdefs.h"
5338 #include <$ac_header>
5340 if { (eval echo "$as_me:5340: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5341 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5343 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5345 cat conftest.err >&5
5346 echo "$as_me:5346: \$? = $ac_status" >&5
5347 (exit "$ac_status"); } >/dev/null; then
5348 if test -s conftest.err; then
5349 ac_cpp_err=$ac_c_preproc_warn_flag
5356 if test -z "$ac_cpp_err"; then
5357 eval "$as_ac_Header=yes"
5359 echo "$as_me: failed program was:" >&5
5360 cat "conftest.$ac_ext" >&5
5361 eval "$as_ac_Header=no"
5363 rm -f conftest.err "conftest.$ac_ext"
5365 echo "$as_me:5365: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5366 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5367 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5368 cat >>confdefs.h <<EOF
5369 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5375 cat >>confdefs.h <<\EOF
5379 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5381 cat >>confdefs.h <<EOF
5382 #define $cf_nculib_ROOT 1
5385 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
5389 cf_ncuhdr_root=ncurses
5391 test -n "$cf_cv_curses_dir" && \
5392 test "$cf_cv_curses_dir" != "no" && { \
5394 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5395 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5397 while test "$cf_add_incdir" != /usr/include
5399 if test -d "$cf_add_incdir"
5402 if test -n "$CFLAGS$CPPFLAGS" ; then
5403 # a loop is needed to ensure we can add subdirs of existing dirs
5404 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5405 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5406 cf_have_incdir=yes; break
5411 if test "$cf_have_incdir" = no ; then
5412 if test "$cf_add_incdir" = /usr/local/include ; then
5413 if test "$GCC" = yes
5415 cf_save_CPPFLAGS=$CPPFLAGS
5417 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5418 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5420 cat >"conftest.$ac_ext" <<_ACEOF
5421 #line 5421 "configure"
5422 #include "confdefs.h"
5432 rm -f "conftest.$ac_objext"
5433 if { (eval echo "$as_me:5433: \"$ac_compile\"") >&5
5434 (eval $ac_compile) 2>&5
5436 echo "$as_me:5436: \$? = $ac_status" >&5
5437 (exit "$ac_status"); } &&
5438 { ac_try='test -s "conftest.$ac_objext"'
5439 { (eval echo "$as_me:5439: \"$ac_try\"") >&5
5442 echo "$as_me:5442: \$? = $ac_status" >&5
5443 (exit "$ac_status"); }; }; then
5446 echo "$as_me: failed program was:" >&5
5447 cat "conftest.$ac_ext" >&5
5450 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5451 CPPFLAGS=$cf_save_CPPFLAGS
5456 if test "$cf_have_incdir" = no ; then
5457 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5459 echo "${as_me:-configure}:5459: testing adding $cf_add_incdir to include-path ..." 1>&5
5461 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5463 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5464 test "$cf_top_incdir" = "$cf_add_incdir" && break
5465 cf_add_incdir="$cf_top_incdir"
5478 echo "$as_me:5478: checking for $cf_ncuhdr_root header in include-path" >&5
5479 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5480 if test "${cf_cv_ncurses_h+set}" = set; then
5481 echo $ECHO_N "(cached) $ECHO_C" >&6
5484 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5485 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
5486 for cf_header in $cf_header_list
5489 cat >"conftest.$ac_ext" <<_ACEOF
5490 #line 5490 "configure"
5491 #include "confdefs.h"
5493 #include <$cf_header>
5498 #ifdef NCURSES_VERSION
5500 printf("%s\\n", NCURSES_VERSION);
5513 rm -f "conftest.$ac_objext"
5514 if { (eval echo "$as_me:5514: \"$ac_compile\"") >&5
5515 (eval $ac_compile) 2>&5
5517 echo "$as_me:5517: \$? = $ac_status" >&5
5518 (exit "$ac_status"); } &&
5519 { ac_try='test -s "conftest.$ac_objext"'
5520 { (eval echo "$as_me:5520: \"$ac_try\"") >&5
5523 echo "$as_me:5523: \$? = $ac_status" >&5
5524 (exit "$ac_status"); }; }; then
5525 cf_cv_ncurses_h=$cf_header
5528 echo "$as_me: failed program was:" >&5
5529 cat "conftest.$ac_ext" >&5
5532 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5534 test "$cf_cv_ncurses_h" != no && break
5538 echo "$as_me:5538: result: $cf_cv_ncurses_h" >&5
5539 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5541 if test "$cf_cv_ncurses_h" != no ; then
5542 cf_cv_ncurses_header=$cf_cv_ncurses_h
5545 echo "$as_me:5545: checking for $cf_ncuhdr_root include-path" >&5
5546 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5547 if test "${cf_cv_ncurses_h2+set}" = set; then
5548 echo $ECHO_N "(cached) $ECHO_C" >&6
5551 test -n "$verbose" && echo
5555 # collect the current set of include-directories from compiler flags
5556 cf_header_path_list=""
5557 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5558 for cf_header_path in $CPPFLAGS $CFLAGS
5560 case "$cf_header_path" in
5562 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5564 test "x$cf_header_path" != "xNONE" && \
5565 test -d "$cf_header_path" && \
5567 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5568 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
5569 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5570 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5571 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5572 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"
5575 cf_header_path_list="$cf_header_path_list $cf_search"
5581 # add the variations for the package we are looking for
5585 test "x$prefix" != "xNONE" && \
5586 test -d "$prefix" && \
5588 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5589 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
5590 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5591 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5592 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5593 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5596 for cf_subdir_prefix in \
5605 test "x$cf_subdir_prefix" != "x$prefix" && \
5606 test -d "$cf_subdir_prefix" && \
5607 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
5608 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5609 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
5610 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
5611 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
5612 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
5613 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"
5618 test "$includedir" != NONE && \
5619 test "$includedir" != "/usr/include" && \
5620 test -d "$includedir" && {
5621 test -d "$includedir" && cf_search="$cf_search $includedir"
5622 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5625 test "$oldincludedir" != NONE && \
5626 test "$oldincludedir" != "/usr/include" && \
5627 test -d "$oldincludedir" && {
5628 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
5629 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5632 cf_search="$cf_search $cf_header_path_list"
5634 test -n "$verbose" && echo "search path $cf_search"
5635 cf_save2_CPPFLAGS="$CPPFLAGS"
5636 for cf_incdir in $cf_search
5639 if test -n "$cf_incdir" ; then
5640 for cf_add_incdir in $cf_incdir
5642 while test "$cf_add_incdir" != /usr/include
5644 if test -d "$cf_add_incdir"
5647 if test -n "$CFLAGS$CPPFLAGS" ; then
5648 # a loop is needed to ensure we can add subdirs of existing dirs
5649 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5650 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5651 cf_have_incdir=yes; break
5656 if test "$cf_have_incdir" = no ; then
5657 if test "$cf_add_incdir" = /usr/local/include ; then
5658 if test "$GCC" = yes
5660 cf_save_CPPFLAGS=$CPPFLAGS
5662 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5663 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5665 cat >"conftest.$ac_ext" <<_ACEOF
5666 #line 5666 "configure"
5667 #include "confdefs.h"
5677 rm -f "conftest.$ac_objext"
5678 if { (eval echo "$as_me:5678: \"$ac_compile\"") >&5
5679 (eval $ac_compile) 2>&5
5681 echo "$as_me:5681: \$? = $ac_status" >&5
5682 (exit "$ac_status"); } &&
5683 { ac_try='test -s "conftest.$ac_objext"'
5684 { (eval echo "$as_me:5684: \"$ac_try\"") >&5
5687 echo "$as_me:5687: \$? = $ac_status" >&5
5688 (exit "$ac_status"); }; }; then
5691 echo "$as_me: failed program was:" >&5
5692 cat "conftest.$ac_ext" >&5
5695 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5696 CPPFLAGS=$cf_save_CPPFLAGS
5701 if test "$cf_have_incdir" = no ; then
5702 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5704 echo "${as_me:-configure}:5704: testing adding $cf_add_incdir to include-path ..." 1>&5
5706 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5708 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5709 test "$cf_top_incdir" = "$cf_add_incdir" && break
5710 cf_add_incdir="$cf_top_incdir"
5726 cat >"conftest.$ac_ext" <<_ACEOF
5727 #line 5727 "configure"
5728 #include "confdefs.h"
5730 #include <$cf_header>
5735 #ifdef NCURSES_VERSION
5737 printf("%s\\n", NCURSES_VERSION);
5750 rm -f "conftest.$ac_objext"
5751 if { (eval echo "$as_me:5751: \"$ac_compile\"") >&5
5752 (eval $ac_compile) 2>&5
5754 echo "$as_me:5754: \$? = $ac_status" >&5
5755 (exit "$ac_status"); } &&
5756 { ac_try='test -s "conftest.$ac_objext"'
5757 { (eval echo "$as_me:5757: \"$ac_try\"") >&5
5760 echo "$as_me:5760: \$? = $ac_status" >&5
5761 (exit "$ac_status"); }; }; then
5762 cf_cv_ncurses_h2=$cf_header
5765 echo "$as_me: failed program was:" >&5
5766 cat "conftest.$ac_ext" >&5
5769 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5771 if test "$cf_cv_ncurses_h2" != no ; then
5772 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5773 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
5776 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5778 CPPFLAGS="$cf_save2_CPPFLAGS"
5779 test "$cf_cv_ncurses_h2" != no && break
5781 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5781: error: not found" >&5
5782 echo "$as_me: error: not found" >&2;}
5783 { (exit 1); exit 1; }; }
5786 echo "$as_me:5786: result: $cf_cv_ncurses_h2" >&5
5787 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5789 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
5790 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
5791 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
5792 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
5795 if test -n "$cf_1st_incdir" ; then
5796 for cf_add_incdir in $cf_1st_incdir
5798 while test "$cf_add_incdir" != /usr/include
5800 if test -d "$cf_add_incdir"
5803 if test -n "$CFLAGS$CPPFLAGS" ; then
5804 # a loop is needed to ensure we can add subdirs of existing dirs
5805 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5806 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5807 cf_have_incdir=yes; break
5812 if test "$cf_have_incdir" = no ; then
5813 if test "$cf_add_incdir" = /usr/local/include ; then
5814 if test "$GCC" = yes
5816 cf_save_CPPFLAGS=$CPPFLAGS
5818 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5819 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5821 cat >"conftest.$ac_ext" <<_ACEOF
5822 #line 5822 "configure"
5823 #include "confdefs.h"
5833 rm -f "conftest.$ac_objext"
5834 if { (eval echo "$as_me:5834: \"$ac_compile\"") >&5
5835 (eval $ac_compile) 2>&5
5837 echo "$as_me:5837: \$? = $ac_status" >&5
5838 (exit "$ac_status"); } &&
5839 { ac_try='test -s "conftest.$ac_objext"'
5840 { (eval echo "$as_me:5840: \"$ac_try\"") >&5
5843 echo "$as_me:5843: \$? = $ac_status" >&5
5844 (exit "$ac_status"); }; }; then
5847 echo "$as_me: failed program was:" >&5
5848 cat "conftest.$ac_ext" >&5
5851 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5852 CPPFLAGS=$cf_save_CPPFLAGS
5857 if test "$cf_have_incdir" = no ; then
5858 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5860 echo "${as_me:-configure}:5860: testing adding $cf_add_incdir to include-path ..." 1>&5
5862 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5864 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5865 test "$cf_top_incdir" = "$cf_add_incdir" && break
5866 cf_add_incdir="$cf_top_incdir"
5879 # Set definitions to allow ifdef'ing for ncurses.h
5881 case "$cf_cv_ncurses_header" in
5884 cat >>confdefs.h <<\EOF
5885 #define HAVE_NCURSES_H 1
5891 case "$cf_cv_ncurses_header" in
5892 (ncurses/curses.h|ncurses/ncurses.h)
5894 cat >>confdefs.h <<\EOF
5895 #define HAVE_NCURSES_NCURSES_H 1
5899 (ncursesw/curses.h|ncursesw/ncurses.h)
5901 cat >>confdefs.h <<\EOF
5902 #define HAVE_NCURSESW_NCURSES_H 1
5908 echo "$as_me:5908: checking for terminfo header" >&5
5909 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5910 if test "${cf_cv_term_header+set}" = set; then
5911 echo $ECHO_N "(cached) $ECHO_C" >&6
5914 case "${cf_cv_ncurses_header}" in
5915 (*/ncurses.h|*/ncursesw.h)
5916 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5919 cf_term_header=term.h
5923 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5925 cat >"conftest.$ac_ext" <<_ACEOF
5926 #line 5926 "configure"
5927 #include "confdefs.h"
5929 #include <${cf_cv_ncurses_header:-curses.h}>
5935 int x = auto_left_margin; (void)x
5940 rm -f "conftest.$ac_objext"
5941 if { (eval echo "$as_me:5941: \"$ac_compile\"") >&5
5942 (eval $ac_compile) 2>&5
5944 echo "$as_me:5944: \$? = $ac_status" >&5
5945 (exit "$ac_status"); } &&
5946 { ac_try='test -s "conftest.$ac_objext"'
5947 { (eval echo "$as_me:5947: \"$ac_try\"") >&5
5950 echo "$as_me:5950: \$? = $ac_status" >&5
5951 (exit "$ac_status"); }; }; then
5953 cf_cv_term_header="$cf_test"
5955 echo "$as_me: failed program was:" >&5
5956 cat "conftest.$ac_ext" >&5
5958 cf_cv_term_header=unknown
5961 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5962 test "$cf_cv_term_header" != unknown && break
5966 echo "$as_me:5966: result: $cf_cv_term_header" >&5
5967 echo "${ECHO_T}$cf_cv_term_header" >&6
5969 # Set definitions to allow ifdef'ing to accommodate subdirectories
5971 case "$cf_cv_term_header" in
5974 cat >>confdefs.h <<\EOF
5975 #define HAVE_TERM_H 1
5981 case "$cf_cv_term_header" in
5984 cat >>confdefs.h <<\EOF
5985 #define HAVE_NCURSES_TERM_H 1
5991 cat >>confdefs.h <<\EOF
5992 #define HAVE_NCURSESW_TERM_H 1
5998 # some applications need this, but should check for NCURSES_VERSION
6000 cat >>confdefs.h <<\EOF
6004 echo "$as_me:6004: checking for ncurses version" >&5
6005 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6006 if test "${cf_cv_ncurses_version+set}" = set; then
6007 echo $ECHO_N "(cached) $ECHO_C" >&6
6010 cf_cv_ncurses_version=no
6012 rm -f "$cf_tempfile"
6013 if test "$cross_compiling" = yes; then
6015 # This will not work if the preprocessor splits the line after the
6016 # Autoconf token. The 'unproto' program does that.
6017 cat > "conftest.$ac_ext" <<EOF
6018 #include <${cf_cv_ncurses_header:-curses.h}>
6020 #ifdef NCURSES_VERSION
6021 Autoconf NCURSES_VERSION
6029 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6030 { (eval echo "$as_me:6030: \"$cf_try\"") >&5
6033 echo "$as_me:6033: \$? = $ac_status" >&5
6034 (exit "$ac_status"); }
6035 if test -f conftest.out ; then
6036 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
6037 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6042 cat >"conftest.$ac_ext" <<_ACEOF
6043 #line 6043 "configure"
6044 #include "confdefs.h"
6046 #include <${cf_cv_ncurses_header:-curses.h}>
6050 FILE *fp = fopen("$cf_tempfile", "w");
6051 #ifdef NCURSES_VERSION
6052 # ifdef NCURSES_VERSION_PATCH
6053 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6055 fprintf(fp, "%s\\n", NCURSES_VERSION);
6059 fprintf(fp, "old\\n");
6064 ${cf_cv_main_return:-return}(0);
6067 rm -f "conftest$ac_exeext"
6068 if { (eval echo "$as_me:6068: \"$ac_link\"") >&5
6069 (eval $ac_link) 2>&5
6071 echo "$as_me:6071: \$? = $ac_status" >&5
6072 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6073 { (eval echo "$as_me:6073: \"$ac_try\"") >&5
6076 echo "$as_me:6076: \$? = $ac_status" >&5
6077 (exit "$ac_status"); }; }; then
6079 cf_cv_ncurses_version=`cat $cf_tempfile`
6081 echo "$as_me: program exited with status $ac_status" >&5
6082 echo "$as_me: failed program was:" >&5
6083 cat "conftest.$ac_ext" >&5
6085 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6087 rm -f "$cf_tempfile"
6090 echo "$as_me:6090: result: $cf_cv_ncurses_version" >&5
6091 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6092 test "$cf_cv_ncurses_version" = no ||
6093 cat >>confdefs.h <<\EOF
6097 cf_nculib_root=ncurses
6098 # This works, except for the special case where we find gpm, but
6099 # ncurses is in a nonstandard location via $LIBS, and we really want
6102 cf_ncurses_SAVE="$LIBS"
6103 echo "$as_me:6103: checking for Gpm_Open in -lgpm" >&5
6104 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6105 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6106 echo $ECHO_N "(cached) $ECHO_C" >&6
6108 ac_check_lib_save_LIBS=$LIBS
6110 cat >"conftest.$ac_ext" <<_ACEOF
6111 #line 6111 "configure"
6112 #include "confdefs.h"
6114 /* Override any gcc2 internal prototype to avoid an error. */
6118 /* We use char because int might match the return type of a gcc2
6119 builtin and then its argument prototype would still apply. */
6129 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6130 if { (eval echo "$as_me:6130: \"$ac_link\"") >&5
6131 (eval $ac_link) 2>&5
6133 echo "$as_me:6133: \$? = $ac_status" >&5
6134 (exit "$ac_status"); } &&
6135 { ac_try='test -s "conftest$ac_exeext"'
6136 { (eval echo "$as_me:6136: \"$ac_try\"") >&5
6139 echo "$as_me:6139: \$? = $ac_status" >&5
6140 (exit "$ac_status"); }; }; then
6141 ac_cv_lib_gpm_Gpm_Open=yes
6143 echo "$as_me: failed program was:" >&5
6144 cat "conftest.$ac_ext" >&5
6145 ac_cv_lib_gpm_Gpm_Open=no
6147 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6148 LIBS=$ac_check_lib_save_LIBS
6150 echo "$as_me:6150: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6151 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6152 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
6153 echo "$as_me:6153: checking for initscr in -lgpm" >&5
6154 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6155 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6156 echo $ECHO_N "(cached) $ECHO_C" >&6
6158 ac_check_lib_save_LIBS=$LIBS
6160 cat >"conftest.$ac_ext" <<_ACEOF
6161 #line 6161 "configure"
6162 #include "confdefs.h"
6164 /* Override any gcc2 internal prototype to avoid an error. */
6168 /* We use char because int might match the return type of a gcc2
6169 builtin and then its argument prototype would still apply. */
6179 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6180 if { (eval echo "$as_me:6180: \"$ac_link\"") >&5
6181 (eval $ac_link) 2>&5
6183 echo "$as_me:6183: \$? = $ac_status" >&5
6184 (exit "$ac_status"); } &&
6185 { ac_try='test -s "conftest$ac_exeext"'
6186 { (eval echo "$as_me:6186: \"$ac_try\"") >&5
6189 echo "$as_me:6189: \$? = $ac_status" >&5
6190 (exit "$ac_status"); }; }; then
6191 ac_cv_lib_gpm_initscr=yes
6193 echo "$as_me: failed program was:" >&5
6194 cat "conftest.$ac_ext" >&5
6195 ac_cv_lib_gpm_initscr=no
6197 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6198 LIBS=$ac_check_lib_save_LIBS
6200 echo "$as_me:6200: result: $ac_cv_lib_gpm_initscr" >&5
6201 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6202 if test "$ac_cv_lib_gpm_initscr" = yes; then
6203 LIBS="$cf_ncurses_SAVE"
6205 cf_ncurses_LIBS="-lgpm"
6212 # This is only necessary if you are linking against an obsolete
6213 # version of ncurses (but it should do no harm, since it is static).
6214 if test "$cf_nculib_root" = ncurses ; then
6215 echo "$as_me:6215: checking for tgoto in -lmytinfo" >&5
6216 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6217 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6218 echo $ECHO_N "(cached) $ECHO_C" >&6
6220 ac_check_lib_save_LIBS=$LIBS
6221 LIBS="-lmytinfo $LIBS"
6222 cat >"conftest.$ac_ext" <<_ACEOF
6223 #line 6223 "configure"
6224 #include "confdefs.h"
6226 /* Override any gcc2 internal prototype to avoid an error. */
6230 /* We use char because int might match the return type of a gcc2
6231 builtin and then its argument prototype would still apply. */
6241 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6242 if { (eval echo "$as_me:6242: \"$ac_link\"") >&5
6243 (eval $ac_link) 2>&5
6245 echo "$as_me:6245: \$? = $ac_status" >&5
6246 (exit "$ac_status"); } &&
6247 { ac_try='test -s "conftest$ac_exeext"'
6248 { (eval echo "$as_me:6248: \"$ac_try\"") >&5
6251 echo "$as_me:6251: \$? = $ac_status" >&5
6252 (exit "$ac_status"); }; }; then
6253 ac_cv_lib_mytinfo_tgoto=yes
6255 echo "$as_me: failed program was:" >&5
6256 cat "conftest.$ac_ext" >&5
6257 ac_cv_lib_mytinfo_tgoto=no
6259 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6260 LIBS=$ac_check_lib_save_LIBS
6262 echo "$as_me:6262: result: $ac_cv_lib_mytinfo_tgoto" >&5
6263 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6264 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6265 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6275 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6277 for cf_add_1lib in $cf_add_0lib; do
6278 for cf_add_2lib in $cf_add_libs; do
6279 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6284 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6288 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6294 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6296 for cf_add_1lib in $cf_add_0lib; do
6297 for cf_add_2lib in $cf_add_libs; do
6298 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6303 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6309 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
6311 echo "$as_me:6311: checking for initscr" >&5
6312 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6313 if test "${ac_cv_func_initscr+set}" = set; then
6314 echo $ECHO_N "(cached) $ECHO_C" >&6
6316 cat >"conftest.$ac_ext" <<_ACEOF
6317 #line 6317 "configure"
6318 #include "confdefs.h"
6319 #define initscr autoconf_temporary
6320 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6327 /* We use char because int might match the return type of a gcc2
6328 builtin and then its argument prototype would still apply. */
6329 char initscr (void);
6335 /* The GNU C library defines stubs for functions which it implements
6336 to always fail with ENOSYS. Some functions are actually named
6337 something starting with __ and the normal name is an alias. */
6338 #if defined (__stub_initscr) || defined (__stub___initscr)
6339 #error found stub for initscr
6347 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6348 if { (eval echo "$as_me:6348: \"$ac_link\"") >&5
6349 (eval $ac_link) 2>&5
6351 echo "$as_me:6351: \$? = $ac_status" >&5
6352 (exit "$ac_status"); } &&
6353 { ac_try='test -s "conftest$ac_exeext"'
6354 { (eval echo "$as_me:6354: \"$ac_try\"") >&5
6357 echo "$as_me:6357: \$? = $ac_status" >&5
6358 (exit "$ac_status"); }; }; then
6359 ac_cv_func_initscr=yes
6361 echo "$as_me: failed program was:" >&5
6362 cat "conftest.$ac_ext" >&5
6363 ac_cv_func_initscr=no
6365 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6367 echo "$as_me:6367: result: $ac_cv_func_initscr" >&5
6368 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6369 if test "$ac_cv_func_initscr" = yes; then
6370 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6373 cf_save_LIBS="$LIBS"
6374 echo "$as_me:6374: checking for initscr in -l$cf_nculib_root" >&5
6375 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6376 LIBS="-l$cf_nculib_root $LIBS"
6377 cat >"conftest.$ac_ext" <<_ACEOF
6378 #line 6378 "configure"
6379 #include "confdefs.h"
6380 #include <${cf_cv_ncurses_header:-curses.h}>
6389 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6390 if { (eval echo "$as_me:6390: \"$ac_link\"") >&5
6391 (eval $ac_link) 2>&5
6393 echo "$as_me:6393: \$? = $ac_status" >&5
6394 (exit "$ac_status"); } &&
6395 { ac_try='test -s "conftest$ac_exeext"'
6396 { (eval echo "$as_me:6396: \"$ac_try\"") >&5
6399 echo "$as_me:6399: \$? = $ac_status" >&5
6400 (exit "$ac_status"); }; }; then
6401 echo "$as_me:6401: result: yes" >&5
6402 echo "${ECHO_T}yes" >&6
6403 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6406 echo "$as_me: failed program was:" >&5
6407 cat "conftest.$ac_ext" >&5
6408 echo "$as_me:6408: result: no" >&5
6409 echo "${ECHO_T}no" >&6
6412 cf_library_path_list=""
6413 if test -n "${LDFLAGS}${LIBS}" ; then
6414 for cf_library_path in $LDFLAGS $LIBS
6416 case "$cf_library_path" in
6418 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6420 test "x$cf_library_path" != "xNONE" && \
6421 test -d "$cf_library_path" && \
6423 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6424 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6425 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6426 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6427 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6428 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"
6431 cf_library_path_list="$cf_library_path_list $cf_search"
6439 test "x$prefix" != "xNONE" && \
6440 test -d "$prefix" && \
6442 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6443 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6444 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6445 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6446 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6447 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6450 for cf_subdir_prefix in \
6459 test "x$cf_subdir_prefix" != "x$prefix" && \
6460 test -d "$cf_subdir_prefix" && \
6461 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6462 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6463 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6464 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
6465 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
6466 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
6467 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"
6472 cf_search="$cf_library_path_list $cf_search"
6474 for cf_libdir in $cf_search
6476 echo "$as_me:6476: checking for -l$cf_nculib_root in $cf_libdir" >&5
6477 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6478 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6479 cat >"conftest.$ac_ext" <<_ACEOF
6480 #line 6480 "configure"
6481 #include "confdefs.h"
6482 #include <${cf_cv_ncurses_header:-curses.h}>
6491 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6492 if { (eval echo "$as_me:6492: \"$ac_link\"") >&5
6493 (eval $ac_link) 2>&5
6495 echo "$as_me:6495: \$? = $ac_status" >&5
6496 (exit "$ac_status"); } &&
6497 { ac_try='test -s "conftest$ac_exeext"'
6498 { (eval echo "$as_me:6498: \"$ac_try\"") >&5
6501 echo "$as_me:6501: \$? = $ac_status" >&5
6502 (exit "$ac_status"); }; }; then
6503 echo "$as_me:6503: result: yes" >&5
6504 echo "${ECHO_T}yes" >&6
6505 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6508 echo "$as_me: failed program was:" >&5
6509 cat "conftest.$ac_ext" >&5
6510 echo "$as_me:6510: result: no" >&5
6511 echo "${ECHO_T}no" >&6
6512 LIBS="$cf_save_LIBS"
6514 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6518 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6522 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
6524 if test "$cf_found_library" = no ; then
6525 { { echo "$as_me:6525: error: Cannot link $cf_nculib_root library" >&5
6526 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6527 { (exit 1); exit 1; }; }
6532 if test -n "$cf_ncurses_LIBS" ; then
6533 echo "$as_me:6533: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6534 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6535 cf_ncurses_SAVE="$LIBS"
6536 for p in $cf_ncurses_LIBS ; do
6537 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
6538 if test "$q" != "$LIBS" ; then
6542 cat >"conftest.$ac_ext" <<_ACEOF
6543 #line 6543 "configure"
6544 #include "confdefs.h"
6545 #include <${cf_cv_ncurses_header:-curses.h}>
6549 initscr(); mousemask(0,0); tigetstr((char *)0);
6554 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6555 if { (eval echo "$as_me:6555: \"$ac_link\"") >&5
6556 (eval $ac_link) 2>&5
6558 echo "$as_me:6558: \$? = $ac_status" >&5
6559 (exit "$ac_status"); } &&
6560 { ac_try='test -s "conftest$ac_exeext"'
6561 { (eval echo "$as_me:6561: \"$ac_try\"") >&5
6564 echo "$as_me:6564: \$? = $ac_status" >&5
6565 (exit "$ac_status"); }; }; then
6566 echo "$as_me:6566: result: yes" >&5
6567 echo "${ECHO_T}yes" >&6
6569 echo "$as_me: failed program was:" >&5
6570 cat "conftest.$ac_ext" >&5
6571 echo "$as_me:6571: result: no" >&5
6572 echo "${ECHO_T}no" >&6
6573 LIBS="$cf_ncurses_SAVE"
6575 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6578 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6580 cat >>confdefs.h <<EOF
6581 #define $cf_nculib_ROOT 1
6589 echo "$as_me:6589: checking if you want wide-character code" >&5
6590 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6592 # Check whether --enable-widec or --disable-widec was given.
6593 if test "${enable_widec+set}" = set; then
6594 enableval="$enable_widec"
6595 with_widec=$enableval
6599 echo "$as_me:6599: result: $with_widec" >&5
6600 echo "${ECHO_T}$with_widec" >&6
6601 if test "$with_widec" = yes ; then
6603 for ac_header in wchar.h
6605 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6606 echo "$as_me:6606: checking for $ac_header" >&5
6607 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6608 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6609 echo $ECHO_N "(cached) $ECHO_C" >&6
6611 cat >"conftest.$ac_ext" <<_ACEOF
6612 #line 6612 "configure"
6613 #include "confdefs.h"
6614 #include <$ac_header>
6616 if { (eval echo "$as_me:6616: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6617 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6619 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6621 cat conftest.err >&5
6622 echo "$as_me:6622: \$? = $ac_status" >&5
6623 (exit "$ac_status"); } >/dev/null; then
6624 if test -s conftest.err; then
6625 ac_cpp_err=$ac_c_preproc_warn_flag
6632 if test -z "$ac_cpp_err"; then
6633 eval "$as_ac_Header=yes"
6635 echo "$as_me: failed program was:" >&5
6636 cat "conftest.$ac_ext" >&5
6637 eval "$as_ac_Header=no"
6639 rm -f conftest.err "conftest.$ac_ext"
6641 echo "$as_me:6641: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6642 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6643 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6644 cat >>confdefs.h <<EOF
6645 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6651 echo "$as_me:6651: checking for multibyte character support" >&5
6652 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6653 if test "${cf_cv_utf8_lib+set}" = set; then
6654 echo $ECHO_N "(cached) $ECHO_C" >&6
6657 cf_save_LIBS="$LIBS"
6658 cat >"conftest.$ac_ext" <<_ACEOF
6659 #line 6659 "configure"
6660 #include "confdefs.h"
6676 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6677 if { (eval echo "$as_me:6677: \"$ac_link\"") >&5
6678 (eval $ac_link) 2>&5
6680 echo "$as_me:6680: \$? = $ac_status" >&5
6681 (exit "$ac_status"); } &&
6682 { ac_try='test -s "conftest$ac_exeext"'
6683 { (eval echo "$as_me:6683: \"$ac_try\"") >&5
6686 echo "$as_me:6686: \$? = $ac_status" >&5
6687 (exit "$ac_status"); }; }; then
6690 echo "$as_me: failed program was:" >&5
6691 cat "conftest.$ac_ext" >&5
6693 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6694 # will be set on completion of the AC_TRY_LINK below.
6695 cf_cv_header_path_utf8=
6696 cf_cv_library_path_utf8=
6698 echo "${as_me:-configure}:6698: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6700 cf_save_LIBS="$LIBS"
6702 cat >"conftest.$ac_ext" <<_ACEOF
6703 #line 6703 "configure"
6704 #include "confdefs.h"
6706 #include <libutf8.h>
6715 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6716 if { (eval echo "$as_me:6716: \"$ac_link\"") >&5
6717 (eval $ac_link) 2>&5
6719 echo "$as_me:6719: \$? = $ac_status" >&5
6720 (exit "$ac_status"); } &&
6721 { ac_try='test -s "conftest$ac_exeext"'
6722 { (eval echo "$as_me:6722: \"$ac_try\"") >&5
6725 echo "$as_me:6725: \$? = $ac_status" >&5
6726 (exit "$ac_status"); }; }; then
6728 cf_cv_find_linkage_utf8=yes
6729 cf_cv_header_path_utf8=/usr/include
6730 cf_cv_library_path_utf8=/usr/lib
6733 echo "$as_me: failed program was:" >&5
6734 cat "conftest.$ac_ext" >&5
6736 LIBS="-lutf8 $cf_save_LIBS"
6738 cat >"conftest.$ac_ext" <<_ACEOF
6739 #line 6739 "configure"
6740 #include "confdefs.h"
6742 #include <libutf8.h>
6751 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6752 if { (eval echo "$as_me:6752: \"$ac_link\"") >&5
6753 (eval $ac_link) 2>&5
6755 echo "$as_me:6755: \$? = $ac_status" >&5
6756 (exit "$ac_status"); } &&
6757 { ac_try='test -s "conftest$ac_exeext"'
6758 { (eval echo "$as_me:6758: \"$ac_try\"") >&5
6761 echo "$as_me:6761: \$? = $ac_status" >&5
6762 (exit "$ac_status"); }; }; then
6764 cf_cv_find_linkage_utf8=yes
6765 cf_cv_header_path_utf8=/usr/include
6766 cf_cv_library_path_utf8=/usr/lib
6767 cf_cv_library_file_utf8="-lutf8"
6770 echo "$as_me: failed program was:" >&5
6771 cat "conftest.$ac_ext" >&5
6773 cf_cv_find_linkage_utf8=no
6774 LIBS="$cf_save_LIBS"
6776 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6778 echo "${as_me:-configure}:6778: testing find linkage for utf8 library ..." 1>&5
6780 echo "${as_me:-configure}:6780: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6782 cf_save_CPPFLAGS="$CPPFLAGS"
6783 cf_test_CPPFLAGS="$CPPFLAGS"
6787 # collect the current set of include-directories from compiler flags
6788 cf_header_path_list=""
6789 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6790 for cf_header_path in $CPPFLAGS $CFLAGS
6792 case "$cf_header_path" in
6794 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6796 test "x$cf_header_path" != "xNONE" && \
6797 test -d "$cf_header_path" && \
6799 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6800 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
6801 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
6802 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
6803 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
6804 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6807 cf_header_path_list="$cf_header_path_list $cf_search"
6813 # add the variations for the package we are looking for
6817 test "x$prefix" != "xNONE" && \
6818 test -d "$prefix" && \
6820 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6821 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
6822 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
6823 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
6824 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
6825 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
6828 for cf_subdir_prefix in \
6837 test "x$cf_subdir_prefix" != "x$prefix" && \
6838 test -d "$cf_subdir_prefix" && \
6839 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6840 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6841 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
6842 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6843 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6844 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6845 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6850 test "$includedir" != NONE && \
6851 test "$includedir" != "/usr/include" && \
6852 test -d "$includedir" && {
6853 test -d "$includedir" && cf_search="$cf_search $includedir"
6854 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
6857 test "$oldincludedir" != NONE && \
6858 test "$oldincludedir" != "/usr/include" && \
6859 test -d "$oldincludedir" && {
6860 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
6861 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
6864 cf_search="$cf_search $cf_header_path_list"
6866 for cf_cv_header_path_utf8 in $cf_search
6868 if test -d "$cf_cv_header_path_utf8" ; then
6869 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6871 echo "${as_me:-configure}:6871: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6873 CPPFLAGS="$cf_save_CPPFLAGS"
6875 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6876 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
6878 cat >"conftest.$ac_ext" <<_ACEOF
6879 #line 6879 "configure"
6880 #include "confdefs.h"
6882 #include <libutf8.h>
6891 rm -f "conftest.$ac_objext"
6892 if { (eval echo "$as_me:6892: \"$ac_compile\"") >&5
6893 (eval $ac_compile) 2>&5
6895 echo "$as_me:6895: \$? = $ac_status" >&5
6896 (exit "$ac_status"); } &&
6897 { ac_try='test -s "conftest.$ac_objext"'
6898 { (eval echo "$as_me:6898: \"$ac_try\"") >&5
6901 echo "$as_me:6901: \$? = $ac_status" >&5
6902 (exit "$ac_status"); }; }; then
6904 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6906 echo "${as_me:-configure}:6906: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6908 cf_cv_find_linkage_utf8=maybe
6909 cf_test_CPPFLAGS="$CPPFLAGS"
6912 echo "$as_me: failed program was:" >&5
6913 cat "conftest.$ac_ext" >&5
6915 CPPFLAGS="$cf_save_CPPFLAGS"
6918 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6922 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6924 echo "${as_me:-configure}:6924: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6926 cf_save_LIBS="$LIBS"
6927 cf_save_LDFLAGS="$LDFLAGS"
6929 if test "$cf_cv_find_linkage_utf8" != yes ; then
6932 cf_library_path_list=""
6933 if test -n "${LDFLAGS}${LIBS}" ; then
6934 for cf_library_path in $LDFLAGS $LIBS
6936 case "$cf_library_path" in
6938 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6940 test "x$cf_library_path" != "xNONE" && \
6941 test -d "$cf_library_path" && \
6943 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6944 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6945 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
6946 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6947 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
6948 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6951 cf_library_path_list="$cf_library_path_list $cf_search"
6959 test "x$prefix" != "xNONE" && \
6960 test -d "$prefix" && \
6962 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6963 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6964 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
6965 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
6966 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
6967 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
6970 for cf_subdir_prefix in \
6979 test "x$cf_subdir_prefix" != "x$prefix" && \
6980 test -d "$cf_subdir_prefix" && \
6981 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6982 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6983 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6984 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6985 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6986 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6987 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6992 cf_search="$cf_library_path_list $cf_search"
6994 for cf_cv_library_path_utf8 in $cf_search
6996 if test -d "$cf_cv_library_path_utf8" ; then
6997 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6999 echo "${as_me:-configure}:6999: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7001 CPPFLAGS="$cf_test_CPPFLAGS"
7002 LIBS="-lutf8 $cf_save_LIBS"
7003 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7004 cat >"conftest.$ac_ext" <<_ACEOF
7005 #line 7005 "configure"
7006 #include "confdefs.h"
7008 #include <libutf8.h>
7017 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7018 if { (eval echo "$as_me:7018: \"$ac_link\"") >&5
7019 (eval $ac_link) 2>&5
7021 echo "$as_me:7021: \$? = $ac_status" >&5
7022 (exit "$ac_status"); } &&
7023 { ac_try='test -s "conftest$ac_exeext"'
7024 { (eval echo "$as_me:7024: \"$ac_try\"") >&5
7027 echo "$as_me:7027: \$? = $ac_status" >&5
7028 (exit "$ac_status"); }; }; then
7030 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7032 echo "${as_me:-configure}:7032: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7034 cf_cv_find_linkage_utf8=yes
7035 cf_cv_library_file_utf8="-lutf8"
7038 echo "$as_me: failed program was:" >&5
7039 cat "conftest.$ac_ext" >&5
7041 CPPFLAGS="$cf_save_CPPFLAGS"
7042 LIBS="$cf_save_LIBS"
7043 LDFLAGS="$cf_save_LDFLAGS"
7046 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7049 CPPFLAGS="$cf_save_CPPFLAGS"
7050 LDFLAGS="$cf_save_LDFLAGS"
7054 cf_cv_find_linkage_utf8=no
7058 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7061 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7063 LIBS="$cf_save_LIBS"
7065 if test "$cf_cv_find_linkage_utf8" = yes ; then
7066 cf_cv_utf8_lib=add-on
7072 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7074 echo "$as_me:7074: result: $cf_cv_utf8_lib" >&5
7075 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7077 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7079 if test "$cf_cv_utf8_lib" = "add-on" ; then
7081 cat >>confdefs.h <<\EOF
7082 #define HAVE_LIBUTF8_H 1
7085 if test -n "$cf_cv_header_path_utf8" ; then
7086 for cf_add_incdir in $cf_cv_header_path_utf8
7088 while test "$cf_add_incdir" != /usr/include
7090 if test -d "$cf_add_incdir"
7093 if test -n "$CFLAGS$CPPFLAGS" ; then
7094 # a loop is needed to ensure we can add subdirs of existing dirs
7095 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7096 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7097 cf_have_incdir=yes; break
7102 if test "$cf_have_incdir" = no ; then
7103 if test "$cf_add_incdir" = /usr/local/include ; then
7104 if test "$GCC" = yes
7106 cf_save_CPPFLAGS=$CPPFLAGS
7108 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7109 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7111 cat >"conftest.$ac_ext" <<_ACEOF
7112 #line 7112 "configure"
7113 #include "confdefs.h"
7123 rm -f "conftest.$ac_objext"
7124 if { (eval echo "$as_me:7124: \"$ac_compile\"") >&5
7125 (eval $ac_compile) 2>&5
7127 echo "$as_me:7127: \$? = $ac_status" >&5
7128 (exit "$ac_status"); } &&
7129 { ac_try='test -s "conftest.$ac_objext"'
7130 { (eval echo "$as_me:7130: \"$ac_try\"") >&5
7133 echo "$as_me:7133: \$? = $ac_status" >&5
7134 (exit "$ac_status"); }; }; then
7137 echo "$as_me: failed program was:" >&5
7138 cat "conftest.$ac_ext" >&5
7141 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7142 CPPFLAGS=$cf_save_CPPFLAGS
7147 if test "$cf_have_incdir" = no ; then
7148 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7150 echo "${as_me:-configure}:7150: testing adding $cf_add_incdir to include-path ..." 1>&5
7152 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7154 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7155 test "$cf_top_incdir" = "$cf_add_incdir" && break
7156 cf_add_incdir="$cf_top_incdir"
7167 if test -n "$cf_cv_library_path_utf8" ; then
7168 for cf_add_libdir in $cf_cv_library_path_utf8
7170 if test "$cf_add_libdir" = /usr/lib ; then
7172 elif test -d "$cf_add_libdir"
7175 if test -n "$LDFLAGS$LIBS" ; then
7176 # a loop is needed to ensure we can add subdirs of existing dirs
7177 for cf_test_libdir in $LDFLAGS $LIBS ; do
7178 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7179 cf_have_libdir=yes; break
7183 if test "$cf_have_libdir" = no ; then
7184 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7186 echo "${as_me:-configure}:7186: testing adding $cf_add_libdir to library-path ..." 1>&5
7188 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7197 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7199 for cf_add_1lib in $cf_add_0lib; do
7200 for cf_add_2lib in $cf_add_libs; do
7201 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7206 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7212 cf_ncuconfig_root=ncursesw
7213 cf_have_ncuconfig=no
7215 if test "x${PKG_CONFIG:=none}" != xnone; then
7216 echo "$as_me:7216: checking pkg-config for $cf_ncuconfig_root" >&5
7217 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7218 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7219 echo "$as_me:7219: result: yes" >&5
7220 echo "${ECHO_T}yes" >&6
7222 echo "$as_me:7222: checking if the $cf_ncuconfig_root package files work" >&5
7223 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7224 cf_have_ncuconfig=unknown
7226 cf_save_CFLAGS="$CFLAGS"
7227 cf_save_CPPFLAGS="$CPPFLAGS"
7228 cf_save_LIBS="$LIBS"
7230 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7231 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7233 # while -W for passing linker flags is prevalent, it is not "standard".
7234 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7235 # incompatible _and_ non-standard -W option which gives an error. Work
7236 # around that pitfall.
7237 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7243 cf_new_extra_cppflags=
7245 for cf_add_cflags in $cf_pkg_cflags
7247 case "$cf_fix_cppflags" in
7249 case "$cf_add_cflags" in
7250 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7251 case "$cf_add_cflags" in
7253 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7255 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7256 && test -z "${cf_tst_cflags}" \
7257 && cf_fix_cppflags=yes
7259 if test "$cf_fix_cppflags" = yes ; then
7261 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7262 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7265 elif test "${cf_tst_cflags}" = "\"'" ; then
7267 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7268 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7278 case "$cf_add_cflags" in
7280 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7282 CPPFLAGS=`echo "$CPPFLAGS" | \
7283 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7284 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7289 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7290 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7297 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7298 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7305 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7306 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7308 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7310 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7311 && test -z "${cf_tst_cflags}" \
7312 && cf_fix_cppflags=no
7317 if test -n "$cf_new_cflags" ; then
7319 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7320 CFLAGS="${CFLAGS}$cf_new_cflags"
7324 if test -n "$cf_new_cppflags" ; then
7326 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7327 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7331 if test -n "$cf_new_extra_cppflags" ; then
7333 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7334 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7341 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7343 for cf_add_1lib in $cf_add_0lib; do
7344 for cf_add_2lib in $cf_add_libs; do
7345 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7350 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7354 cat >"conftest.$ac_ext" <<_ACEOF
7355 #line 7355 "configure"
7356 #include "confdefs.h"
7357 #include <${cf_cv_ncurses_header:-curses.h}>
7361 initscr(); mousemask(0,0); tigetstr((char *)0);
7366 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7367 if { (eval echo "$as_me:7367: \"$ac_link\"") >&5
7368 (eval $ac_link) 2>&5
7370 echo "$as_me:7370: \$? = $ac_status" >&5
7371 (exit "$ac_status"); } &&
7372 { ac_try='test -s "conftest$ac_exeext"'
7373 { (eval echo "$as_me:7373: \"$ac_try\"") >&5
7376 echo "$as_me:7376: \$? = $ac_status" >&5
7377 (exit "$ac_status"); }; }; then
7378 if test "$cross_compiling" = yes; then
7379 cf_test_ncuconfig=maybe
7381 cat >"conftest.$ac_ext" <<_ACEOF
7382 #line 7382 "configure"
7383 #include "confdefs.h"
7384 #include <${cf_cv_ncurses_header:-curses.h}>
7386 { const char *xx = curses_version(); return (xx == 0); }
7388 rm -f "conftest$ac_exeext"
7389 if { (eval echo "$as_me:7389: \"$ac_link\"") >&5
7390 (eval $ac_link) 2>&5
7392 echo "$as_me:7392: \$? = $ac_status" >&5
7393 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7394 { (eval echo "$as_me:7394: \"$ac_try\"") >&5
7397 echo "$as_me:7397: \$? = $ac_status" >&5
7398 (exit "$ac_status"); }; }; then
7399 cf_test_ncuconfig=yes
7401 echo "$as_me: program exited with status $ac_status" >&5
7402 echo "$as_me: failed program was:" >&5
7403 cat "conftest.$ac_ext" >&5
7404 cf_test_ncuconfig=no
7406 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7409 echo "$as_me: failed program was:" >&5
7410 cat "conftest.$ac_ext" >&5
7411 cf_test_ncuconfig=no
7413 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7415 CFLAGS="$cf_save_CFLAGS"
7416 CPPFLAGS="$cf_save_CPPFLAGS"
7417 LIBS="$cf_save_LIBS"
7419 if test "x$cf_test_ncuconfig" != xyes; then
7420 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7421 cf_pkg_cflags="$cf_temp"
7422 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7423 cf_pkg_libs="$cf_temp"
7428 for cf_add_cflags in $cf_pkg_cflags
7430 case "x$cf_add_cflags" in
7433 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7436 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'`
7437 test "$CFLAGS" != "$cf_old_cflag" || break
7439 CFLAGS="$cf_old_cflag"
7442 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7445 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'`
7446 test "$CPPFLAGS" != "$cf_old_cflag" || break
7448 CPPFLAGS="$cf_old_cflag"
7457 cf_new_extra_cppflags=
7459 for cf_add_cflags in $cf_add_cflags
7461 case "$cf_fix_cppflags" in
7463 case "$cf_add_cflags" in
7464 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7465 case "$cf_add_cflags" in
7467 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7469 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7470 && test -z "${cf_tst_cflags}" \
7471 && cf_fix_cppflags=yes
7473 if test "$cf_fix_cppflags" = yes ; then
7475 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7476 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7479 elif test "${cf_tst_cflags}" = "\"'" ; then
7481 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7482 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7492 case "$cf_add_cflags" in
7494 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7496 CPPFLAGS=`echo "$CPPFLAGS" | \
7497 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7498 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7503 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7504 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7511 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7512 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7519 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7520 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7522 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7524 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7525 && test -z "${cf_tst_cflags}" \
7526 && cf_fix_cppflags=no
7531 if test -n "$cf_new_cflags" ; then
7533 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7534 CFLAGS="${CFLAGS}$cf_new_cflags"
7538 if test -n "$cf_new_cppflags" ; then
7540 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7541 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7545 if test -n "$cf_new_extra_cppflags" ; then
7547 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7548 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7557 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7559 for cf_add_1lib in $cf_add_0lib; do
7560 for cf_add_2lib in $cf_add_libs; do
7561 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7566 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7570 cat >"conftest.$ac_ext" <<_ACEOF
7571 #line 7571 "configure"
7572 #include "confdefs.h"
7573 #include <${cf_cv_ncurses_header:-curses.h}>
7577 initscr(); mousemask(0,0); tigetstr((char *)0);
7582 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7583 if { (eval echo "$as_me:7583: \"$ac_link\"") >&5
7584 (eval $ac_link) 2>&5
7586 echo "$as_me:7586: \$? = $ac_status" >&5
7587 (exit "$ac_status"); } &&
7588 { ac_try='test -s "conftest$ac_exeext"'
7589 { (eval echo "$as_me:7589: \"$ac_try\"") >&5
7592 echo "$as_me:7592: \$? = $ac_status" >&5
7593 (exit "$ac_status"); }; }; then
7594 if test "$cross_compiling" = yes; then
7595 cf_have_ncuconfig=maybe
7597 cat >"conftest.$ac_ext" <<_ACEOF
7598 #line 7598 "configure"
7599 #include "confdefs.h"
7600 #include <${cf_cv_ncurses_header:-curses.h}>
7602 { const char *xx = curses_version(); return (xx == 0); }
7604 rm -f "conftest$ac_exeext"
7605 if { (eval echo "$as_me:7605: \"$ac_link\"") >&5
7606 (eval $ac_link) 2>&5
7608 echo "$as_me:7608: \$? = $ac_status" >&5
7609 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7610 { (eval echo "$as_me:7610: \"$ac_try\"") >&5
7613 echo "$as_me:7613: \$? = $ac_status" >&5
7614 (exit "$ac_status"); }; }; then
7615 cf_have_ncuconfig=yes
7617 echo "$as_me: program exited with status $ac_status" >&5
7618 echo "$as_me: failed program was:" >&5
7619 cat "conftest.$ac_ext" >&5
7620 cf_have_ncuconfig=no
7622 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7625 echo "$as_me: failed program was:" >&5
7626 cat "conftest.$ac_ext" >&5
7627 cf_have_ncuconfig=no
7629 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7630 echo "$as_me:7630: result: $cf_have_ncuconfig" >&5
7631 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7632 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7633 if test "$cf_have_ncuconfig" != "yes"
7635 CPPFLAGS="$cf_save_CPPFLAGS"
7636 LIBS="$cf_save_LIBS"
7637 NCURSES_CONFIG_PKG=none
7640 cat >>confdefs.h <<\EOF
7644 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7646 echo "$as_me:7646: checking for terminfo header" >&5
7647 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7648 if test "${cf_cv_term_header+set}" = set; then
7649 echo $ECHO_N "(cached) $ECHO_C" >&6
7652 case "${cf_cv_ncurses_header}" in
7653 (*/ncurses.h|*/ncursesw.h)
7654 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7657 cf_term_header=term.h
7661 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7663 cat >"conftest.$ac_ext" <<_ACEOF
7664 #line 7664 "configure"
7665 #include "confdefs.h"
7667 #include <${cf_cv_ncurses_header:-curses.h}>
7673 int x = auto_left_margin; (void)x
7678 rm -f "conftest.$ac_objext"
7679 if { (eval echo "$as_me:7679: \"$ac_compile\"") >&5
7680 (eval $ac_compile) 2>&5
7682 echo "$as_me:7682: \$? = $ac_status" >&5
7683 (exit "$ac_status"); } &&
7684 { ac_try='test -s "conftest.$ac_objext"'
7685 { (eval echo "$as_me:7685: \"$ac_try\"") >&5
7688 echo "$as_me:7688: \$? = $ac_status" >&5
7689 (exit "$ac_status"); }; }; then
7691 cf_cv_term_header="$cf_test"
7693 echo "$as_me: failed program was:" >&5
7694 cat "conftest.$ac_ext" >&5
7696 cf_cv_term_header=unknown
7699 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7700 test "$cf_cv_term_header" != unknown && break
7704 echo "$as_me:7704: result: $cf_cv_term_header" >&5
7705 echo "${ECHO_T}$cf_cv_term_header" >&6
7707 # Set definitions to allow ifdef'ing to accommodate subdirectories
7709 case "$cf_cv_term_header" in
7712 cat >>confdefs.h <<\EOF
7713 #define HAVE_TERM_H 1
7719 case "$cf_cv_term_header" in
7722 cat >>confdefs.h <<\EOF
7723 #define HAVE_NCURSES_TERM_H 1
7729 cat >>confdefs.h <<\EOF
7730 #define HAVE_NCURSESW_TERM_H 1
7739 echo "$as_me:7739: result: no" >&5
7740 echo "${ECHO_T}no" >&6
7741 NCURSES_CONFIG_PKG=none
7744 NCURSES_CONFIG_PKG=none
7747 if test "x$cf_have_ncuconfig" = "xno"; then
7748 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7750 if test -n "$ac_tool_prefix"; then
7751 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7753 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7754 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7755 echo "$as_me:7755: checking for $ac_word" >&5
7756 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7757 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7758 echo $ECHO_N "(cached) $ECHO_C" >&6
7760 if test -n "$NCURSES_CONFIG"; then
7761 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7763 ac_save_IFS=$IFS; IFS=$ac_path_separator
7765 for ac_dir in $ac_dummy; do
7767 test -z "$ac_dir" && ac_dir=.
7768 $as_executable_p "$ac_dir/$ac_word" || continue
7769 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7770 echo "$as_me:7770: found $ac_dir/$ac_word" >&5
7776 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7777 if test -n "$NCURSES_CONFIG"; then
7778 echo "$as_me:7778: result: $NCURSES_CONFIG" >&5
7779 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7781 echo "$as_me:7781: result: no" >&5
7782 echo "${ECHO_T}no" >&6
7785 test -n "$NCURSES_CONFIG" && break
7788 if test -z "$NCURSES_CONFIG"; then
7789 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7790 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7792 # Extract the first word of "$ac_prog", so it can be a program name with args.
7793 set dummy $ac_prog; ac_word=$2
7794 echo "$as_me:7794: checking for $ac_word" >&5
7795 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7796 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7797 echo $ECHO_N "(cached) $ECHO_C" >&6
7799 if test -n "$ac_ct_NCURSES_CONFIG"; then
7800 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7802 ac_save_IFS=$IFS; IFS=$ac_path_separator
7804 for ac_dir in $ac_dummy; do
7806 test -z "$ac_dir" && ac_dir=.
7807 $as_executable_p "$ac_dir/$ac_word" || continue
7808 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7809 echo "$as_me:7809: found $ac_dir/$ac_word" >&5
7815 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7816 if test -n "$ac_ct_NCURSES_CONFIG"; then
7817 echo "$as_me:7817: result: $ac_ct_NCURSES_CONFIG" >&5
7818 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7820 echo "$as_me:7820: result: no" >&5
7821 echo "${ECHO_T}no" >&6
7824 test -n "$ac_ct_NCURSES_CONFIG" && break
7826 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7828 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7831 if test "$NCURSES_CONFIG" != none ; then
7833 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7835 case "x$cf_add_cflags" in
7838 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7841 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'`
7842 test "$CFLAGS" != "$cf_old_cflag" || break
7844 CFLAGS="$cf_old_cflag"
7847 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7850 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'`
7851 test "$CPPFLAGS" != "$cf_old_cflag" || break
7853 CPPFLAGS="$cf_old_cflag"
7862 cf_new_extra_cppflags=
7864 for cf_add_cflags in $cf_add_cflags
7866 case "$cf_fix_cppflags" in
7868 case "$cf_add_cflags" in
7869 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7870 case "$cf_add_cflags" in
7872 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7874 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7875 && test -z "${cf_tst_cflags}" \
7876 && cf_fix_cppflags=yes
7878 if test "$cf_fix_cppflags" = yes ; then
7880 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7881 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7884 elif test "${cf_tst_cflags}" = "\"'" ; then
7886 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7887 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7897 case "$cf_add_cflags" in
7899 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7901 CPPFLAGS=`echo "$CPPFLAGS" | \
7902 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7903 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7908 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7909 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7916 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7917 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7924 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7925 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7927 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7929 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7930 && test -z "${cf_tst_cflags}" \
7931 && cf_fix_cppflags=no
7936 if test -n "$cf_new_cflags" ; then
7938 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7939 CFLAGS="${CFLAGS}$cf_new_cflags"
7943 if test -n "$cf_new_cppflags" ; then
7945 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7946 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7950 if test -n "$cf_new_extra_cppflags" ; then
7952 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7953 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7962 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7964 for cf_add_1lib in $cf_add_0lib; do
7965 for cf_add_2lib in $cf_add_libs; do
7966 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7971 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7975 # even with config script, some packages use no-override for curses.h
7977 echo "$as_me:7977: checking if we have identified curses headers" >&5
7978 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7979 if test "${cf_cv_ncurses_header+set}" = set; then
7980 echo $ECHO_N "(cached) $ECHO_C" >&6
7983 cf_cv_ncurses_header=none
7985 ncurses.h ncursesw/ncurses.h \
7986 curses.h ncursesw/curses.h
7988 cat >"conftest.$ac_ext" <<_ACEOF
7989 #line 7989 "configure"
7990 #include "confdefs.h"
7991 #include <${cf_header}>
7995 initscr(); tgoto("?", 0,0)
8000 rm -f "conftest.$ac_objext"
8001 if { (eval echo "$as_me:8001: \"$ac_compile\"") >&5
8002 (eval $ac_compile) 2>&5
8004 echo "$as_me:8004: \$? = $ac_status" >&5
8005 (exit "$ac_status"); } &&
8006 { ac_try='test -s "conftest.$ac_objext"'
8007 { (eval echo "$as_me:8007: \"$ac_try\"") >&5
8010 echo "$as_me:8010: \$? = $ac_status" >&5
8011 (exit "$ac_status"); }; }; then
8012 cf_cv_ncurses_header=$cf_header; break
8014 echo "$as_me: failed program was:" >&5
8015 cat "conftest.$ac_ext" >&5
8017 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8021 echo "$as_me:8021: result: $cf_cv_ncurses_header" >&5
8022 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8024 if test "$cf_cv_ncurses_header" = none ; then
8025 { { echo "$as_me:8025: error: No curses header-files found" >&5
8026 echo "$as_me: error: No curses header-files found" >&2;}
8027 { (exit 1); exit 1; }; }
8030 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8032 for ac_header in $cf_cv_ncurses_header
8034 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8035 echo "$as_me:8035: checking for $ac_header" >&5
8036 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8037 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8038 echo $ECHO_N "(cached) $ECHO_C" >&6
8040 cat >"conftest.$ac_ext" <<_ACEOF
8041 #line 8041 "configure"
8042 #include "confdefs.h"
8043 #include <$ac_header>
8045 if { (eval echo "$as_me:8045: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8046 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8048 $EGREP -v '^ *\+' conftest.er1 >conftest.err
8050 cat conftest.err >&5
8051 echo "$as_me:8051: \$? = $ac_status" >&5
8052 (exit "$ac_status"); } >/dev/null; then
8053 if test -s conftest.err; then
8054 ac_cpp_err=$ac_c_preproc_warn_flag
8061 if test -z "$ac_cpp_err"; then
8062 eval "$as_ac_Header=yes"
8064 echo "$as_me: failed program was:" >&5
8065 cat "conftest.$ac_ext" >&5
8066 eval "$as_ac_Header=no"
8068 rm -f conftest.err "conftest.$ac_ext"
8070 echo "$as_me:8070: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8071 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8072 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8073 cat >>confdefs.h <<EOF
8074 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8080 cat >>confdefs.h <<\EOF
8084 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8086 cat >>confdefs.h <<EOF
8087 #define $cf_nculib_ROOT 1
8090 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
8094 cf_ncuhdr_root=ncursesw
8096 test -n "$cf_cv_curses_dir" && \
8097 test "$cf_cv_curses_dir" != "no" && { \
8099 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8100 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8102 while test "$cf_add_incdir" != /usr/include
8104 if test -d "$cf_add_incdir"
8107 if test -n "$CFLAGS$CPPFLAGS" ; then
8108 # a loop is needed to ensure we can add subdirs of existing dirs
8109 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8110 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8111 cf_have_incdir=yes; break
8116 if test "$cf_have_incdir" = no ; then
8117 if test "$cf_add_incdir" = /usr/local/include ; then
8118 if test "$GCC" = yes
8120 cf_save_CPPFLAGS=$CPPFLAGS
8122 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8123 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8125 cat >"conftest.$ac_ext" <<_ACEOF
8126 #line 8126 "configure"
8127 #include "confdefs.h"
8137 rm -f "conftest.$ac_objext"
8138 if { (eval echo "$as_me:8138: \"$ac_compile\"") >&5
8139 (eval $ac_compile) 2>&5
8141 echo "$as_me:8141: \$? = $ac_status" >&5
8142 (exit "$ac_status"); } &&
8143 { ac_try='test -s "conftest.$ac_objext"'
8144 { (eval echo "$as_me:8144: \"$ac_try\"") >&5
8147 echo "$as_me:8147: \$? = $ac_status" >&5
8148 (exit "$ac_status"); }; }; then
8151 echo "$as_me: failed program was:" >&5
8152 cat "conftest.$ac_ext" >&5
8155 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8156 CPPFLAGS=$cf_save_CPPFLAGS
8161 if test "$cf_have_incdir" = no ; then
8162 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8164 echo "${as_me:-configure}:8164: testing adding $cf_add_incdir to include-path ..." 1>&5
8166 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8168 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8169 test "$cf_top_incdir" = "$cf_add_incdir" && break
8170 cf_add_incdir="$cf_top_incdir"
8183 echo "$as_me:8183: checking for $cf_ncuhdr_root header in include-path" >&5
8184 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8185 if test "${cf_cv_ncurses_h+set}" = set; then
8186 echo $ECHO_N "(cached) $ECHO_C" >&6
8189 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8190 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
8191 for cf_header in $cf_header_list
8194 cat >"conftest.$ac_ext" <<_ACEOF
8195 #line 8195 "configure"
8196 #include "confdefs.h"
8198 #define _XOPEN_SOURCE_EXTENDED
8199 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
8200 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
8202 #include <$cf_header>
8207 #ifdef NCURSES_VERSION
8213 printf("%s\\n", NCURSES_VERSION);
8226 rm -f "conftest.$ac_objext"
8227 if { (eval echo "$as_me:8227: \"$ac_compile\"") >&5
8228 (eval $ac_compile) 2>&5
8230 echo "$as_me:8230: \$? = $ac_status" >&5
8231 (exit "$ac_status"); } &&
8232 { ac_try='test -s "conftest.$ac_objext"'
8233 { (eval echo "$as_me:8233: \"$ac_try\"") >&5
8236 echo "$as_me:8236: \$? = $ac_status" >&5
8237 (exit "$ac_status"); }; }; then
8238 cf_cv_ncurses_h=$cf_header
8241 echo "$as_me: failed program was:" >&5
8242 cat "conftest.$ac_ext" >&5
8245 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8247 test "$cf_cv_ncurses_h" != no && break
8251 echo "$as_me:8251: result: $cf_cv_ncurses_h" >&5
8252 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8254 if test "$cf_cv_ncurses_h" != no ; then
8255 cf_cv_ncurses_header=$cf_cv_ncurses_h
8258 echo "$as_me:8258: checking for $cf_ncuhdr_root include-path" >&5
8259 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8260 if test "${cf_cv_ncurses_h2+set}" = set; then
8261 echo $ECHO_N "(cached) $ECHO_C" >&6
8264 test -n "$verbose" && echo
8268 # collect the current set of include-directories from compiler flags
8269 cf_header_path_list=""
8270 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8271 for cf_header_path in $CPPFLAGS $CFLAGS
8273 case "$cf_header_path" in
8275 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8277 test "x$cf_header_path" != "xNONE" && \
8278 test -d "$cf_header_path" && \
8280 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8281 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8282 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8283 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8284 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8285 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"
8288 cf_header_path_list="$cf_header_path_list $cf_search"
8294 # add the variations for the package we are looking for
8298 test "x$prefix" != "xNONE" && \
8299 test -d "$prefix" && \
8301 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8302 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8303 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8304 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8305 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8306 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8309 for cf_subdir_prefix in \
8318 test "x$cf_subdir_prefix" != "x$prefix" && \
8319 test -d "$cf_subdir_prefix" && \
8320 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8321 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8322 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8323 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8324 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8325 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8326 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"
8331 test "$includedir" != NONE && \
8332 test "$includedir" != "/usr/include" && \
8333 test -d "$includedir" && {
8334 test -d "$includedir" && cf_search="$cf_search $includedir"
8335 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8338 test "$oldincludedir" != NONE && \
8339 test "$oldincludedir" != "/usr/include" && \
8340 test -d "$oldincludedir" && {
8341 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8342 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8345 cf_search="$cf_search $cf_header_path_list"
8347 test -n "$verbose" && echo "search path $cf_search"
8348 cf_save2_CPPFLAGS="$CPPFLAGS"
8349 for cf_incdir in $cf_search
8352 if test -n "$cf_incdir" ; then
8353 for cf_add_incdir in $cf_incdir
8355 while test "$cf_add_incdir" != /usr/include
8357 if test -d "$cf_add_incdir"
8360 if test -n "$CFLAGS$CPPFLAGS" ; then
8361 # a loop is needed to ensure we can add subdirs of existing dirs
8362 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8363 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8364 cf_have_incdir=yes; break
8369 if test "$cf_have_incdir" = no ; then
8370 if test "$cf_add_incdir" = /usr/local/include ; then
8371 if test "$GCC" = yes
8373 cf_save_CPPFLAGS=$CPPFLAGS
8375 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8376 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8378 cat >"conftest.$ac_ext" <<_ACEOF
8379 #line 8379 "configure"
8380 #include "confdefs.h"
8390 rm -f "conftest.$ac_objext"
8391 if { (eval echo "$as_me:8391: \"$ac_compile\"") >&5
8392 (eval $ac_compile) 2>&5
8394 echo "$as_me:8394: \$? = $ac_status" >&5
8395 (exit "$ac_status"); } &&
8396 { ac_try='test -s "conftest.$ac_objext"'
8397 { (eval echo "$as_me:8397: \"$ac_try\"") >&5
8400 echo "$as_me:8400: \$? = $ac_status" >&5
8401 (exit "$ac_status"); }; }; then
8404 echo "$as_me: failed program was:" >&5
8405 cat "conftest.$ac_ext" >&5
8408 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8409 CPPFLAGS=$cf_save_CPPFLAGS
8414 if test "$cf_have_incdir" = no ; then
8415 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8417 echo "${as_me:-configure}:8417: testing adding $cf_add_incdir to include-path ..." 1>&5
8419 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8421 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8422 test "$cf_top_incdir" = "$cf_add_incdir" && break
8423 cf_add_incdir="$cf_top_incdir"
8439 cat >"conftest.$ac_ext" <<_ACEOF
8440 #line 8440 "configure"
8441 #include "confdefs.h"
8443 #include <$cf_header>
8448 #ifdef NCURSES_VERSION
8450 printf("%s\\n", NCURSES_VERSION);
8463 rm -f "conftest.$ac_objext"
8464 if { (eval echo "$as_me:8464: \"$ac_compile\"") >&5
8465 (eval $ac_compile) 2>&5
8467 echo "$as_me:8467: \$? = $ac_status" >&5
8468 (exit "$ac_status"); } &&
8469 { ac_try='test -s "conftest.$ac_objext"'
8470 { (eval echo "$as_me:8470: \"$ac_try\"") >&5
8473 echo "$as_me:8473: \$? = $ac_status" >&5
8474 (exit "$ac_status"); }; }; then
8475 cf_cv_ncurses_h2=$cf_header
8478 echo "$as_me: failed program was:" >&5
8479 cat "conftest.$ac_ext" >&5
8482 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8484 if test "$cf_cv_ncurses_h2" != no ; then
8485 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8486 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
8489 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8491 CPPFLAGS="$cf_save2_CPPFLAGS"
8492 test "$cf_cv_ncurses_h2" != no && break
8494 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8494: error: not found" >&5
8495 echo "$as_me: error: not found" >&2;}
8496 { (exit 1); exit 1; }; }
8499 echo "$as_me:8499: result: $cf_cv_ncurses_h2" >&5
8500 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8502 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
8503 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
8504 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
8505 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
8508 if test -n "$cf_1st_incdir" ; then
8509 for cf_add_incdir in $cf_1st_incdir
8511 while test "$cf_add_incdir" != /usr/include
8513 if test -d "$cf_add_incdir"
8516 if test -n "$CFLAGS$CPPFLAGS" ; then
8517 # a loop is needed to ensure we can add subdirs of existing dirs
8518 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8519 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8520 cf_have_incdir=yes; break
8525 if test "$cf_have_incdir" = no ; then
8526 if test "$cf_add_incdir" = /usr/local/include ; then
8527 if test "$GCC" = yes
8529 cf_save_CPPFLAGS=$CPPFLAGS
8531 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8532 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8534 cat >"conftest.$ac_ext" <<_ACEOF
8535 #line 8535 "configure"
8536 #include "confdefs.h"
8546 rm -f "conftest.$ac_objext"
8547 if { (eval echo "$as_me:8547: \"$ac_compile\"") >&5
8548 (eval $ac_compile) 2>&5
8550 echo "$as_me:8550: \$? = $ac_status" >&5
8551 (exit "$ac_status"); } &&
8552 { ac_try='test -s "conftest.$ac_objext"'
8553 { (eval echo "$as_me:8553: \"$ac_try\"") >&5
8556 echo "$as_me:8556: \$? = $ac_status" >&5
8557 (exit "$ac_status"); }; }; then
8560 echo "$as_me: failed program was:" >&5
8561 cat "conftest.$ac_ext" >&5
8564 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8565 CPPFLAGS=$cf_save_CPPFLAGS
8570 if test "$cf_have_incdir" = no ; then
8571 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8573 echo "${as_me:-configure}:8573: testing adding $cf_add_incdir to include-path ..." 1>&5
8575 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8577 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8578 test "$cf_top_incdir" = "$cf_add_incdir" && break
8579 cf_add_incdir="$cf_top_incdir"
8592 # Set definitions to allow ifdef'ing for ncurses.h
8594 case "$cf_cv_ncurses_header" in
8597 cat >>confdefs.h <<\EOF
8598 #define HAVE_NCURSES_H 1
8604 case "$cf_cv_ncurses_header" in
8605 (ncurses/curses.h|ncurses/ncurses.h)
8607 cat >>confdefs.h <<\EOF
8608 #define HAVE_NCURSES_NCURSES_H 1
8612 (ncursesw/curses.h|ncursesw/ncurses.h)
8614 cat >>confdefs.h <<\EOF
8615 #define HAVE_NCURSESW_NCURSES_H 1
8621 echo "$as_me:8621: checking for terminfo header" >&5
8622 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8623 if test "${cf_cv_term_header+set}" = set; then
8624 echo $ECHO_N "(cached) $ECHO_C" >&6
8627 case "${cf_cv_ncurses_header}" in
8628 (*/ncurses.h|*/ncursesw.h)
8629 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8632 cf_term_header=term.h
8636 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8638 cat >"conftest.$ac_ext" <<_ACEOF
8639 #line 8639 "configure"
8640 #include "confdefs.h"
8642 #include <${cf_cv_ncurses_header:-curses.h}>
8648 int x = auto_left_margin; (void)x
8653 rm -f "conftest.$ac_objext"
8654 if { (eval echo "$as_me:8654: \"$ac_compile\"") >&5
8655 (eval $ac_compile) 2>&5
8657 echo "$as_me:8657: \$? = $ac_status" >&5
8658 (exit "$ac_status"); } &&
8659 { ac_try='test -s "conftest.$ac_objext"'
8660 { (eval echo "$as_me:8660: \"$ac_try\"") >&5
8663 echo "$as_me:8663: \$? = $ac_status" >&5
8664 (exit "$ac_status"); }; }; then
8666 cf_cv_term_header="$cf_test"
8668 echo "$as_me: failed program was:" >&5
8669 cat "conftest.$ac_ext" >&5
8671 cf_cv_term_header=unknown
8674 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8675 test "$cf_cv_term_header" != unknown && break
8679 echo "$as_me:8679: result: $cf_cv_term_header" >&5
8680 echo "${ECHO_T}$cf_cv_term_header" >&6
8682 # Set definitions to allow ifdef'ing to accommodate subdirectories
8684 case "$cf_cv_term_header" in
8687 cat >>confdefs.h <<\EOF
8688 #define HAVE_TERM_H 1
8694 case "$cf_cv_term_header" in
8697 cat >>confdefs.h <<\EOF
8698 #define HAVE_NCURSES_TERM_H 1
8704 cat >>confdefs.h <<\EOF
8705 #define HAVE_NCURSESW_TERM_H 1
8711 # some applications need this, but should check for NCURSES_VERSION
8713 cat >>confdefs.h <<\EOF
8717 echo "$as_me:8717: checking for ncurses version" >&5
8718 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8719 if test "${cf_cv_ncurses_version+set}" = set; then
8720 echo $ECHO_N "(cached) $ECHO_C" >&6
8723 cf_cv_ncurses_version=no
8725 rm -f "$cf_tempfile"
8726 if test "$cross_compiling" = yes; then
8728 # This will not work if the preprocessor splits the line after the
8729 # Autoconf token. The 'unproto' program does that.
8730 cat > "conftest.$ac_ext" <<EOF
8731 #include <${cf_cv_ncurses_header:-curses.h}>
8733 #ifdef NCURSES_VERSION
8734 Autoconf NCURSES_VERSION
8742 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8743 { (eval echo "$as_me:8743: \"$cf_try\"") >&5
8746 echo "$as_me:8746: \$? = $ac_status" >&5
8747 (exit "$ac_status"); }
8748 if test -f conftest.out ; then
8749 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
8750 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8755 cat >"conftest.$ac_ext" <<_ACEOF
8756 #line 8756 "configure"
8757 #include "confdefs.h"
8759 #include <${cf_cv_ncurses_header:-curses.h}>
8763 FILE *fp = fopen("$cf_tempfile", "w");
8764 #ifdef NCURSES_VERSION
8765 # ifdef NCURSES_VERSION_PATCH
8766 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8768 fprintf(fp, "%s\\n", NCURSES_VERSION);
8772 fprintf(fp, "old\\n");
8777 ${cf_cv_main_return:-return}(0);
8780 rm -f "conftest$ac_exeext"
8781 if { (eval echo "$as_me:8781: \"$ac_link\"") >&5
8782 (eval $ac_link) 2>&5
8784 echo "$as_me:8784: \$? = $ac_status" >&5
8785 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8786 { (eval echo "$as_me:8786: \"$ac_try\"") >&5
8789 echo "$as_me:8789: \$? = $ac_status" >&5
8790 (exit "$ac_status"); }; }; then
8792 cf_cv_ncurses_version=`cat $cf_tempfile`
8794 echo "$as_me: program exited with status $ac_status" >&5
8795 echo "$as_me: failed program was:" >&5
8796 cat "conftest.$ac_ext" >&5
8798 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8800 rm -f "$cf_tempfile"
8803 echo "$as_me:8803: result: $cf_cv_ncurses_version" >&5
8804 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8805 test "$cf_cv_ncurses_version" = no ||
8806 cat >>confdefs.h <<\EOF
8810 cf_nculib_root=ncursesw
8811 # This works, except for the special case where we find gpm, but
8812 # ncurses is in a nonstandard location via $LIBS, and we really want
8815 cf_ncurses_SAVE="$LIBS"
8816 echo "$as_me:8816: checking for Gpm_Open in -lgpm" >&5
8817 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8818 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8819 echo $ECHO_N "(cached) $ECHO_C" >&6
8821 ac_check_lib_save_LIBS=$LIBS
8823 cat >"conftest.$ac_ext" <<_ACEOF
8824 #line 8824 "configure"
8825 #include "confdefs.h"
8827 /* Override any gcc2 internal prototype to avoid an error. */
8831 /* We use char because int might match the return type of a gcc2
8832 builtin and then its argument prototype would still apply. */
8842 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8843 if { (eval echo "$as_me:8843: \"$ac_link\"") >&5
8844 (eval $ac_link) 2>&5
8846 echo "$as_me:8846: \$? = $ac_status" >&5
8847 (exit "$ac_status"); } &&
8848 { ac_try='test -s "conftest$ac_exeext"'
8849 { (eval echo "$as_me:8849: \"$ac_try\"") >&5
8852 echo "$as_me:8852: \$? = $ac_status" >&5
8853 (exit "$ac_status"); }; }; then
8854 ac_cv_lib_gpm_Gpm_Open=yes
8856 echo "$as_me: failed program was:" >&5
8857 cat "conftest.$ac_ext" >&5
8858 ac_cv_lib_gpm_Gpm_Open=no
8860 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8861 LIBS=$ac_check_lib_save_LIBS
8863 echo "$as_me:8863: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8864 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8865 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
8866 echo "$as_me:8866: checking for initscr in -lgpm" >&5
8867 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8868 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8869 echo $ECHO_N "(cached) $ECHO_C" >&6
8871 ac_check_lib_save_LIBS=$LIBS
8873 cat >"conftest.$ac_ext" <<_ACEOF
8874 #line 8874 "configure"
8875 #include "confdefs.h"
8877 /* Override any gcc2 internal prototype to avoid an error. */
8881 /* We use char because int might match the return type of a gcc2
8882 builtin and then its argument prototype would still apply. */
8892 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8893 if { (eval echo "$as_me:8893: \"$ac_link\"") >&5
8894 (eval $ac_link) 2>&5
8896 echo "$as_me:8896: \$? = $ac_status" >&5
8897 (exit "$ac_status"); } &&
8898 { ac_try='test -s "conftest$ac_exeext"'
8899 { (eval echo "$as_me:8899: \"$ac_try\"") >&5
8902 echo "$as_me:8902: \$? = $ac_status" >&5
8903 (exit "$ac_status"); }; }; then
8904 ac_cv_lib_gpm_initscr=yes
8906 echo "$as_me: failed program was:" >&5
8907 cat "conftest.$ac_ext" >&5
8908 ac_cv_lib_gpm_initscr=no
8910 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8911 LIBS=$ac_check_lib_save_LIBS
8913 echo "$as_me:8913: result: $ac_cv_lib_gpm_initscr" >&5
8914 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8915 if test "$ac_cv_lib_gpm_initscr" = yes; then
8916 LIBS="$cf_ncurses_SAVE"
8918 cf_ncurses_LIBS="-lgpm"
8925 # This is only necessary if you are linking against an obsolete
8926 # version of ncurses (but it should do no harm, since it is static).
8927 if test "$cf_nculib_root" = ncurses ; then
8928 echo "$as_me:8928: checking for tgoto in -lmytinfo" >&5
8929 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8930 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8931 echo $ECHO_N "(cached) $ECHO_C" >&6
8933 ac_check_lib_save_LIBS=$LIBS
8934 LIBS="-lmytinfo $LIBS"
8935 cat >"conftest.$ac_ext" <<_ACEOF
8936 #line 8936 "configure"
8937 #include "confdefs.h"
8939 /* Override any gcc2 internal prototype to avoid an error. */
8943 /* We use char because int might match the return type of a gcc2
8944 builtin and then its argument prototype would still apply. */
8954 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8955 if { (eval echo "$as_me:8955: \"$ac_link\"") >&5
8956 (eval $ac_link) 2>&5
8958 echo "$as_me:8958: \$? = $ac_status" >&5
8959 (exit "$ac_status"); } &&
8960 { ac_try='test -s "conftest$ac_exeext"'
8961 { (eval echo "$as_me:8961: \"$ac_try\"") >&5
8964 echo "$as_me:8964: \$? = $ac_status" >&5
8965 (exit "$ac_status"); }; }; then
8966 ac_cv_lib_mytinfo_tgoto=yes
8968 echo "$as_me: failed program was:" >&5
8969 cat "conftest.$ac_ext" >&5
8970 ac_cv_lib_mytinfo_tgoto=no
8972 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8973 LIBS=$ac_check_lib_save_LIBS
8975 echo "$as_me:8975: result: $ac_cv_lib_mytinfo_tgoto" >&5
8976 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8977 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
8978 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8988 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8990 for cf_add_1lib in $cf_add_0lib; do
8991 for cf_add_2lib in $cf_add_libs; do
8992 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8997 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9001 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
9007 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9009 for cf_add_1lib in $cf_add_0lib; do
9010 for cf_add_2lib in $cf_add_libs; do
9011 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9016 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9022 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
9024 echo "$as_me:9024: checking for initscr" >&5
9025 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9026 if test "${ac_cv_func_initscr+set}" = set; then
9027 echo $ECHO_N "(cached) $ECHO_C" >&6
9029 cat >"conftest.$ac_ext" <<_ACEOF
9030 #line 9030 "configure"
9031 #include "confdefs.h"
9032 #define initscr autoconf_temporary
9033 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9040 /* We use char because int might match the return type of a gcc2
9041 builtin and then its argument prototype would still apply. */
9042 char initscr (void);
9048 /* The GNU C library defines stubs for functions which it implements
9049 to always fail with ENOSYS. Some functions are actually named
9050 something starting with __ and the normal name is an alias. */
9051 #if defined (__stub_initscr) || defined (__stub___initscr)
9052 #error found stub for initscr
9060 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9061 if { (eval echo "$as_me:9061: \"$ac_link\"") >&5
9062 (eval $ac_link) 2>&5
9064 echo "$as_me:9064: \$? = $ac_status" >&5
9065 (exit "$ac_status"); } &&
9066 { ac_try='test -s "conftest$ac_exeext"'
9067 { (eval echo "$as_me:9067: \"$ac_try\"") >&5
9070 echo "$as_me:9070: \$? = $ac_status" >&5
9071 (exit "$ac_status"); }; }; then
9072 ac_cv_func_initscr=yes
9074 echo "$as_me: failed program was:" >&5
9075 cat "conftest.$ac_ext" >&5
9076 ac_cv_func_initscr=no
9078 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9080 echo "$as_me:9080: result: $ac_cv_func_initscr" >&5
9081 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9082 if test "$ac_cv_func_initscr" = yes; then
9083 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9086 cf_save_LIBS="$LIBS"
9087 echo "$as_me:9087: checking for initscr in -l$cf_nculib_root" >&5
9088 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9089 LIBS="-l$cf_nculib_root $LIBS"
9090 cat >"conftest.$ac_ext" <<_ACEOF
9091 #line 9091 "configure"
9092 #include "confdefs.h"
9093 #include <${cf_cv_ncurses_header:-curses.h}>
9102 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9103 if { (eval echo "$as_me:9103: \"$ac_link\"") >&5
9104 (eval $ac_link) 2>&5
9106 echo "$as_me:9106: \$? = $ac_status" >&5
9107 (exit "$ac_status"); } &&
9108 { ac_try='test -s "conftest$ac_exeext"'
9109 { (eval echo "$as_me:9109: \"$ac_try\"") >&5
9112 echo "$as_me:9112: \$? = $ac_status" >&5
9113 (exit "$ac_status"); }; }; then
9114 echo "$as_me:9114: result: yes" >&5
9115 echo "${ECHO_T}yes" >&6
9116 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9119 echo "$as_me: failed program was:" >&5
9120 cat "conftest.$ac_ext" >&5
9121 echo "$as_me:9121: result: no" >&5
9122 echo "${ECHO_T}no" >&6
9125 cf_library_path_list=""
9126 if test -n "${LDFLAGS}${LIBS}" ; then
9127 for cf_library_path in $LDFLAGS $LIBS
9129 case "$cf_library_path" in
9131 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9133 test "x$cf_library_path" != "xNONE" && \
9134 test -d "$cf_library_path" && \
9136 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9137 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
9138 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9139 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9140 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9141 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"
9144 cf_library_path_list="$cf_library_path_list $cf_search"
9152 test "x$prefix" != "xNONE" && \
9153 test -d "$prefix" && \
9155 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9156 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
9157 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9158 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9159 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9160 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9163 for cf_subdir_prefix in \
9172 test "x$cf_subdir_prefix" != "x$prefix" && \
9173 test -d "$cf_subdir_prefix" && \
9174 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9175 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9176 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
9177 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9178 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9179 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9180 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"
9185 cf_search="$cf_library_path_list $cf_search"
9187 for cf_libdir in $cf_search
9189 echo "$as_me:9189: checking for -l$cf_nculib_root in $cf_libdir" >&5
9190 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9191 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9192 cat >"conftest.$ac_ext" <<_ACEOF
9193 #line 9193 "configure"
9194 #include "confdefs.h"
9195 #include <${cf_cv_ncurses_header:-curses.h}>
9204 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9205 if { (eval echo "$as_me:9205: \"$ac_link\"") >&5
9206 (eval $ac_link) 2>&5
9208 echo "$as_me:9208: \$? = $ac_status" >&5
9209 (exit "$ac_status"); } &&
9210 { ac_try='test -s "conftest$ac_exeext"'
9211 { (eval echo "$as_me:9211: \"$ac_try\"") >&5
9214 echo "$as_me:9214: \$? = $ac_status" >&5
9215 (exit "$ac_status"); }; }; then
9216 echo "$as_me:9216: result: yes" >&5
9217 echo "${ECHO_T}yes" >&6
9218 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9221 echo "$as_me: failed program was:" >&5
9222 cat "conftest.$ac_ext" >&5
9223 echo "$as_me:9223: result: no" >&5
9224 echo "${ECHO_T}no" >&6
9225 LIBS="$cf_save_LIBS"
9227 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9231 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9235 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
9237 if test "$cf_found_library" = no ; then
9238 { { echo "$as_me:9238: error: Cannot link $cf_nculib_root library" >&5
9239 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9240 { (exit 1); exit 1; }; }
9245 if test -n "$cf_ncurses_LIBS" ; then
9246 echo "$as_me:9246: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9247 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9248 cf_ncurses_SAVE="$LIBS"
9249 for p in $cf_ncurses_LIBS ; do
9250 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
9251 if test "$q" != "$LIBS" ; then
9255 cat >"conftest.$ac_ext" <<_ACEOF
9256 #line 9256 "configure"
9257 #include "confdefs.h"
9258 #include <${cf_cv_ncurses_header:-curses.h}>
9262 initscr(); mousemask(0,0); tigetstr((char *)0);
9267 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9268 if { (eval echo "$as_me:9268: \"$ac_link\"") >&5
9269 (eval $ac_link) 2>&5
9271 echo "$as_me:9271: \$? = $ac_status" >&5
9272 (exit "$ac_status"); } &&
9273 { ac_try='test -s "conftest$ac_exeext"'
9274 { (eval echo "$as_me:9274: \"$ac_try\"") >&5
9277 echo "$as_me:9277: \$? = $ac_status" >&5
9278 (exit "$ac_status"); }; }; then
9279 echo "$as_me:9279: result: yes" >&5
9280 echo "${ECHO_T}yes" >&6
9282 echo "$as_me: failed program was:" >&5
9283 cat "conftest.$ac_ext" >&5
9284 echo "$as_me:9284: result: no" >&5
9285 echo "${ECHO_T}no" >&6
9286 LIBS="$cf_ncurses_SAVE"
9288 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9291 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9293 cat >>confdefs.h <<EOF
9294 #define $cf_nculib_ROOT 1
9304 cf_ncuconfig_root=ncurses
9305 cf_have_ncuconfig=no
9307 if test "x${PKG_CONFIG:=none}" != xnone; then
9308 echo "$as_me:9308: checking pkg-config for $cf_ncuconfig_root" >&5
9309 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9310 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9311 echo "$as_me:9311: result: yes" >&5
9312 echo "${ECHO_T}yes" >&6
9314 echo "$as_me:9314: checking if the $cf_ncuconfig_root package files work" >&5
9315 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9316 cf_have_ncuconfig=unknown
9318 cf_save_CFLAGS="$CFLAGS"
9319 cf_save_CPPFLAGS="$CPPFLAGS"
9320 cf_save_LIBS="$LIBS"
9322 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
9323 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9325 # while -W for passing linker flags is prevalent, it is not "standard".
9326 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9327 # incompatible _and_ non-standard -W option which gives an error. Work
9328 # around that pitfall.
9329 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9335 cf_new_extra_cppflags=
9337 for cf_add_cflags in $cf_pkg_cflags
9339 case "$cf_fix_cppflags" in
9341 case "$cf_add_cflags" in
9342 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9343 case "$cf_add_cflags" in
9345 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9347 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9348 && test -z "${cf_tst_cflags}" \
9349 && cf_fix_cppflags=yes
9351 if test "$cf_fix_cppflags" = yes ; then
9353 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9354 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9357 elif test "${cf_tst_cflags}" = "\"'" ; then
9359 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9360 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9370 case "$cf_add_cflags" in
9372 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9374 CPPFLAGS=`echo "$CPPFLAGS" | \
9375 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9376 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9381 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9382 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9389 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9390 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9397 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9398 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9400 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9402 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9403 && test -z "${cf_tst_cflags}" \
9404 && cf_fix_cppflags=no
9409 if test -n "$cf_new_cflags" ; then
9411 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9412 CFLAGS="${CFLAGS}$cf_new_cflags"
9416 if test -n "$cf_new_cppflags" ; then
9418 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9419 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9423 if test -n "$cf_new_extra_cppflags" ; then
9425 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9426 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9433 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9435 for cf_add_1lib in $cf_add_0lib; do
9436 for cf_add_2lib in $cf_add_libs; do
9437 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9442 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9446 cat >"conftest.$ac_ext" <<_ACEOF
9447 #line 9447 "configure"
9448 #include "confdefs.h"
9449 #include <${cf_cv_ncurses_header:-curses.h}>
9453 initscr(); mousemask(0,0); tigetstr((char *)0);
9458 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9459 if { (eval echo "$as_me:9459: \"$ac_link\"") >&5
9460 (eval $ac_link) 2>&5
9462 echo "$as_me:9462: \$? = $ac_status" >&5
9463 (exit "$ac_status"); } &&
9464 { ac_try='test -s "conftest$ac_exeext"'
9465 { (eval echo "$as_me:9465: \"$ac_try\"") >&5
9468 echo "$as_me:9468: \$? = $ac_status" >&5
9469 (exit "$ac_status"); }; }; then
9470 if test "$cross_compiling" = yes; then
9471 cf_test_ncuconfig=maybe
9473 cat >"conftest.$ac_ext" <<_ACEOF
9474 #line 9474 "configure"
9475 #include "confdefs.h"
9476 #include <${cf_cv_ncurses_header:-curses.h}>
9478 { const char *xx = curses_version(); return (xx == 0); }
9480 rm -f "conftest$ac_exeext"
9481 if { (eval echo "$as_me:9481: \"$ac_link\"") >&5
9482 (eval $ac_link) 2>&5
9484 echo "$as_me:9484: \$? = $ac_status" >&5
9485 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9486 { (eval echo "$as_me:9486: \"$ac_try\"") >&5
9489 echo "$as_me:9489: \$? = $ac_status" >&5
9490 (exit "$ac_status"); }; }; then
9491 cf_test_ncuconfig=yes
9493 echo "$as_me: program exited with status $ac_status" >&5
9494 echo "$as_me: failed program was:" >&5
9495 cat "conftest.$ac_ext" >&5
9496 cf_test_ncuconfig=no
9498 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9501 echo "$as_me: failed program was:" >&5
9502 cat "conftest.$ac_ext" >&5
9503 cf_test_ncuconfig=no
9505 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9507 CFLAGS="$cf_save_CFLAGS"
9508 CPPFLAGS="$cf_save_CPPFLAGS"
9509 LIBS="$cf_save_LIBS"
9511 if test "x$cf_test_ncuconfig" != xyes; then
9512 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9513 cf_pkg_cflags="$cf_temp"
9514 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9515 cf_pkg_libs="$cf_temp"
9520 for cf_add_cflags in $cf_pkg_cflags
9522 case "x$cf_add_cflags" in
9525 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9528 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'`
9529 test "$CFLAGS" != "$cf_old_cflag" || break
9531 CFLAGS="$cf_old_cflag"
9534 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9537 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'`
9538 test "$CPPFLAGS" != "$cf_old_cflag" || break
9540 CPPFLAGS="$cf_old_cflag"
9549 cf_new_extra_cppflags=
9551 for cf_add_cflags in $cf_add_cflags
9553 case "$cf_fix_cppflags" in
9555 case "$cf_add_cflags" in
9556 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9557 case "$cf_add_cflags" in
9559 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9561 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9562 && test -z "${cf_tst_cflags}" \
9563 && cf_fix_cppflags=yes
9565 if test "$cf_fix_cppflags" = yes ; then
9567 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9568 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9571 elif test "${cf_tst_cflags}" = "\"'" ; then
9573 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9574 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9584 case "$cf_add_cflags" in
9586 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9588 CPPFLAGS=`echo "$CPPFLAGS" | \
9589 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9590 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9595 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9596 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9603 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9604 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9611 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9612 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9614 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9616 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9617 && test -z "${cf_tst_cflags}" \
9618 && cf_fix_cppflags=no
9623 if test -n "$cf_new_cflags" ; then
9625 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9626 CFLAGS="${CFLAGS}$cf_new_cflags"
9630 if test -n "$cf_new_cppflags" ; then
9632 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9633 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9637 if test -n "$cf_new_extra_cppflags" ; then
9639 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9640 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9649 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9651 for cf_add_1lib in $cf_add_0lib; do
9652 for cf_add_2lib in $cf_add_libs; do
9653 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9658 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9662 cat >"conftest.$ac_ext" <<_ACEOF
9663 #line 9663 "configure"
9664 #include "confdefs.h"
9665 #include <${cf_cv_ncurses_header:-curses.h}>
9669 initscr(); mousemask(0,0); tigetstr((char *)0);
9674 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9675 if { (eval echo "$as_me:9675: \"$ac_link\"") >&5
9676 (eval $ac_link) 2>&5
9678 echo "$as_me:9678: \$? = $ac_status" >&5
9679 (exit "$ac_status"); } &&
9680 { ac_try='test -s "conftest$ac_exeext"'
9681 { (eval echo "$as_me:9681: \"$ac_try\"") >&5
9684 echo "$as_me:9684: \$? = $ac_status" >&5
9685 (exit "$ac_status"); }; }; then
9686 if test "$cross_compiling" = yes; then
9687 cf_have_ncuconfig=maybe
9689 cat >"conftest.$ac_ext" <<_ACEOF
9690 #line 9690 "configure"
9691 #include "confdefs.h"
9692 #include <${cf_cv_ncurses_header:-curses.h}>
9694 { const char *xx = curses_version(); return (xx == 0); }
9696 rm -f "conftest$ac_exeext"
9697 if { (eval echo "$as_me:9697: \"$ac_link\"") >&5
9698 (eval $ac_link) 2>&5
9700 echo "$as_me:9700: \$? = $ac_status" >&5
9701 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9702 { (eval echo "$as_me:9702: \"$ac_try\"") >&5
9705 echo "$as_me:9705: \$? = $ac_status" >&5
9706 (exit "$ac_status"); }; }; then
9707 cf_have_ncuconfig=yes
9709 echo "$as_me: program exited with status $ac_status" >&5
9710 echo "$as_me: failed program was:" >&5
9711 cat "conftest.$ac_ext" >&5
9712 cf_have_ncuconfig=no
9714 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9717 echo "$as_me: failed program was:" >&5
9718 cat "conftest.$ac_ext" >&5
9719 cf_have_ncuconfig=no
9721 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9722 echo "$as_me:9722: result: $cf_have_ncuconfig" >&5
9723 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9724 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9725 if test "$cf_have_ncuconfig" != "yes"
9727 CPPFLAGS="$cf_save_CPPFLAGS"
9728 LIBS="$cf_save_LIBS"
9729 NCURSES_CONFIG_PKG=none
9732 cat >>confdefs.h <<\EOF
9736 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9738 echo "$as_me:9738: checking for terminfo header" >&5
9739 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9740 if test "${cf_cv_term_header+set}" = set; then
9741 echo $ECHO_N "(cached) $ECHO_C" >&6
9744 case "${cf_cv_ncurses_header}" in
9745 (*/ncurses.h|*/ncursesw.h)
9746 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9749 cf_term_header=term.h
9753 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9755 cat >"conftest.$ac_ext" <<_ACEOF
9756 #line 9756 "configure"
9757 #include "confdefs.h"
9759 #include <${cf_cv_ncurses_header:-curses.h}>
9765 int x = auto_left_margin; (void)x
9770 rm -f "conftest.$ac_objext"
9771 if { (eval echo "$as_me:9771: \"$ac_compile\"") >&5
9772 (eval $ac_compile) 2>&5
9774 echo "$as_me:9774: \$? = $ac_status" >&5
9775 (exit "$ac_status"); } &&
9776 { ac_try='test -s "conftest.$ac_objext"'
9777 { (eval echo "$as_me:9777: \"$ac_try\"") >&5
9780 echo "$as_me:9780: \$? = $ac_status" >&5
9781 (exit "$ac_status"); }; }; then
9783 cf_cv_term_header="$cf_test"
9785 echo "$as_me: failed program was:" >&5
9786 cat "conftest.$ac_ext" >&5
9788 cf_cv_term_header=unknown
9791 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9792 test "$cf_cv_term_header" != unknown && break
9796 echo "$as_me:9796: result: $cf_cv_term_header" >&5
9797 echo "${ECHO_T}$cf_cv_term_header" >&6
9799 # Set definitions to allow ifdef'ing to accommodate subdirectories
9801 case "$cf_cv_term_header" in
9804 cat >>confdefs.h <<\EOF
9805 #define HAVE_TERM_H 1
9811 case "$cf_cv_term_header" in
9814 cat >>confdefs.h <<\EOF
9815 #define HAVE_NCURSES_TERM_H 1
9821 cat >>confdefs.h <<\EOF
9822 #define HAVE_NCURSESW_TERM_H 1
9831 echo "$as_me:9831: result: no" >&5
9832 echo "${ECHO_T}no" >&6
9833 NCURSES_CONFIG_PKG=none
9836 NCURSES_CONFIG_PKG=none
9839 if test "x$cf_have_ncuconfig" = "xno"; then
9840 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9842 if test -n "$ac_tool_prefix"; then
9843 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9845 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9846 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9847 echo "$as_me:9847: checking for $ac_word" >&5
9848 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9849 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9850 echo $ECHO_N "(cached) $ECHO_C" >&6
9852 if test -n "$NCURSES_CONFIG"; then
9853 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9855 ac_save_IFS=$IFS; IFS=$ac_path_separator
9857 for ac_dir in $ac_dummy; do
9859 test -z "$ac_dir" && ac_dir=.
9860 $as_executable_p "$ac_dir/$ac_word" || continue
9861 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9862 echo "$as_me:9862: found $ac_dir/$ac_word" >&5
9868 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9869 if test -n "$NCURSES_CONFIG"; then
9870 echo "$as_me:9870: result: $NCURSES_CONFIG" >&5
9871 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9873 echo "$as_me:9873: result: no" >&5
9874 echo "${ECHO_T}no" >&6
9877 test -n "$NCURSES_CONFIG" && break
9880 if test -z "$NCURSES_CONFIG"; then
9881 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9882 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9884 # Extract the first word of "$ac_prog", so it can be a program name with args.
9885 set dummy $ac_prog; ac_word=$2
9886 echo "$as_me:9886: checking for $ac_word" >&5
9887 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9888 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9889 echo $ECHO_N "(cached) $ECHO_C" >&6
9891 if test -n "$ac_ct_NCURSES_CONFIG"; then
9892 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9894 ac_save_IFS=$IFS; IFS=$ac_path_separator
9896 for ac_dir in $ac_dummy; do
9898 test -z "$ac_dir" && ac_dir=.
9899 $as_executable_p "$ac_dir/$ac_word" || continue
9900 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9901 echo "$as_me:9901: found $ac_dir/$ac_word" >&5
9907 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9908 if test -n "$ac_ct_NCURSES_CONFIG"; then
9909 echo "$as_me:9909: result: $ac_ct_NCURSES_CONFIG" >&5
9910 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9912 echo "$as_me:9912: result: no" >&5
9913 echo "${ECHO_T}no" >&6
9916 test -n "$ac_ct_NCURSES_CONFIG" && break
9918 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9920 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9923 if test "$NCURSES_CONFIG" != none ; then
9925 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9927 case "x$cf_add_cflags" in
9930 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9933 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'`
9934 test "$CFLAGS" != "$cf_old_cflag" || break
9936 CFLAGS="$cf_old_cflag"
9939 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9942 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'`
9943 test "$CPPFLAGS" != "$cf_old_cflag" || break
9945 CPPFLAGS="$cf_old_cflag"
9954 cf_new_extra_cppflags=
9956 for cf_add_cflags in $cf_add_cflags
9958 case "$cf_fix_cppflags" in
9960 case "$cf_add_cflags" in
9961 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9962 case "$cf_add_cflags" in
9964 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9966 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9967 && test -z "${cf_tst_cflags}" \
9968 && cf_fix_cppflags=yes
9970 if test "$cf_fix_cppflags" = yes ; then
9972 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9973 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9976 elif test "${cf_tst_cflags}" = "\"'" ; then
9978 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9979 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9989 case "$cf_add_cflags" in
9991 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9993 CPPFLAGS=`echo "$CPPFLAGS" | \
9994 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9995 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10000 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10001 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10008 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10009 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10016 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10017 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10019 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10021 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10022 && test -z "${cf_tst_cflags}" \
10023 && cf_fix_cppflags=no
10028 if test -n "$cf_new_cflags" ; then
10030 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10031 CFLAGS="${CFLAGS}$cf_new_cflags"
10035 if test -n "$cf_new_cppflags" ; then
10037 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10038 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10042 if test -n "$cf_new_extra_cppflags" ; then
10044 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10045 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10051 cf_add_libs="$LIBS"
10054 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10055 # filter duplicates
10056 for cf_add_1lib in $cf_add_0lib; do
10057 for cf_add_2lib in $cf_add_libs; do
10058 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10063 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10065 LIBS="$cf_add_libs"
10067 # even with config script, some packages use no-override for curses.h
10069 echo "$as_me:10069: checking if we have identified curses headers" >&5
10070 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10071 if test "${cf_cv_ncurses_header+set}" = set; then
10072 echo $ECHO_N "(cached) $ECHO_C" >&6
10075 cf_cv_ncurses_header=none
10077 ncurses.h ncurses/ncurses.h \
10078 curses.h ncurses/curses.h
10080 cat >"conftest.$ac_ext" <<_ACEOF
10081 #line 10081 "configure"
10082 #include "confdefs.h"
10083 #include <${cf_header}>
10087 initscr(); tgoto("?", 0,0)
10092 rm -f "conftest.$ac_objext"
10093 if { (eval echo "$as_me:10093: \"$ac_compile\"") >&5
10094 (eval $ac_compile) 2>&5
10096 echo "$as_me:10096: \$? = $ac_status" >&5
10097 (exit "$ac_status"); } &&
10098 { ac_try='test -s "conftest.$ac_objext"'
10099 { (eval echo "$as_me:10099: \"$ac_try\"") >&5
10100 (eval $ac_try) 2>&5
10102 echo "$as_me:10102: \$? = $ac_status" >&5
10103 (exit "$ac_status"); }; }; then
10104 cf_cv_ncurses_header=$cf_header; break
10106 echo "$as_me: failed program was:" >&5
10107 cat "conftest.$ac_ext" >&5
10109 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10113 echo "$as_me:10113: result: $cf_cv_ncurses_header" >&5
10114 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10116 if test "$cf_cv_ncurses_header" = none ; then
10117 { { echo "$as_me:10117: error: No curses header-files found" >&5
10118 echo "$as_me: error: No curses header-files found" >&2;}
10119 { (exit 1); exit 1; }; }
10122 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10124 for ac_header in $cf_cv_ncurses_header
10126 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10127 echo "$as_me:10127: checking for $ac_header" >&5
10128 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10129 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10130 echo $ECHO_N "(cached) $ECHO_C" >&6
10132 cat >"conftest.$ac_ext" <<_ACEOF
10133 #line 10133 "configure"
10134 #include "confdefs.h"
10135 #include <$ac_header>
10137 if { (eval echo "$as_me:10137: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10138 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10140 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10142 cat conftest.err >&5
10143 echo "$as_me:10143: \$? = $ac_status" >&5
10144 (exit "$ac_status"); } >/dev/null; then
10145 if test -s conftest.err; then
10146 ac_cpp_err=$ac_c_preproc_warn_flag
10153 if test -z "$ac_cpp_err"; then
10154 eval "$as_ac_Header=yes"
10156 echo "$as_me: failed program was:" >&5
10157 cat "conftest.$ac_ext" >&5
10158 eval "$as_ac_Header=no"
10160 rm -f conftest.err "conftest.$ac_ext"
10162 echo "$as_me:10162: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10163 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10164 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10165 cat >>confdefs.h <<EOF
10166 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10172 cat >>confdefs.h <<\EOF
10176 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10178 cat >>confdefs.h <<EOF
10179 #define $cf_nculib_ROOT 1
10182 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
10186 cf_ncuhdr_root=ncurses
10188 test -n "$cf_cv_curses_dir" && \
10189 test "$cf_cv_curses_dir" != "no" && { \
10191 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
10192 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
10194 while test "$cf_add_incdir" != /usr/include
10196 if test -d "$cf_add_incdir"
10199 if test -n "$CFLAGS$CPPFLAGS" ; then
10200 # a loop is needed to ensure we can add subdirs of existing dirs
10201 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10202 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10203 cf_have_incdir=yes; break
10208 if test "$cf_have_incdir" = no ; then
10209 if test "$cf_add_incdir" = /usr/local/include ; then
10210 if test "$GCC" = yes
10212 cf_save_CPPFLAGS=$CPPFLAGS
10214 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10215 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10217 cat >"conftest.$ac_ext" <<_ACEOF
10218 #line 10218 "configure"
10219 #include "confdefs.h"
10229 rm -f "conftest.$ac_objext"
10230 if { (eval echo "$as_me:10230: \"$ac_compile\"") >&5
10231 (eval $ac_compile) 2>&5
10233 echo "$as_me:10233: \$? = $ac_status" >&5
10234 (exit "$ac_status"); } &&
10235 { ac_try='test -s "conftest.$ac_objext"'
10236 { (eval echo "$as_me:10236: \"$ac_try\"") >&5
10237 (eval $ac_try) 2>&5
10239 echo "$as_me:10239: \$? = $ac_status" >&5
10240 (exit "$ac_status"); }; }; then
10243 echo "$as_me: failed program was:" >&5
10244 cat "conftest.$ac_ext" >&5
10247 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10248 CPPFLAGS=$cf_save_CPPFLAGS
10253 if test "$cf_have_incdir" = no ; then
10254 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10256 echo "${as_me:-configure}:10256: testing adding $cf_add_incdir to include-path ..." 1>&5
10258 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10260 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10261 test "$cf_top_incdir" = "$cf_add_incdir" && break
10262 cf_add_incdir="$cf_top_incdir"
10275 echo "$as_me:10275: checking for $cf_ncuhdr_root header in include-path" >&5
10276 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10277 if test "${cf_cv_ncurses_h+set}" = set; then
10278 echo $ECHO_N "(cached) $ECHO_C" >&6
10281 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10282 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
10283 for cf_header in $cf_header_list
10286 cat >"conftest.$ac_ext" <<_ACEOF
10287 #line 10287 "configure"
10288 #include "confdefs.h"
10290 #include <$cf_header>
10295 #ifdef NCURSES_VERSION
10297 printf("%s\\n", NCURSES_VERSION);
10310 rm -f "conftest.$ac_objext"
10311 if { (eval echo "$as_me:10311: \"$ac_compile\"") >&5
10312 (eval $ac_compile) 2>&5
10314 echo "$as_me:10314: \$? = $ac_status" >&5
10315 (exit "$ac_status"); } &&
10316 { ac_try='test -s "conftest.$ac_objext"'
10317 { (eval echo "$as_me:10317: \"$ac_try\"") >&5
10318 (eval $ac_try) 2>&5
10320 echo "$as_me:10320: \$? = $ac_status" >&5
10321 (exit "$ac_status"); }; }; then
10322 cf_cv_ncurses_h=$cf_header
10325 echo "$as_me: failed program was:" >&5
10326 cat "conftest.$ac_ext" >&5
10329 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10331 test "$cf_cv_ncurses_h" != no && break
10335 echo "$as_me:10335: result: $cf_cv_ncurses_h" >&5
10336 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10338 if test "$cf_cv_ncurses_h" != no ; then
10339 cf_cv_ncurses_header=$cf_cv_ncurses_h
10342 echo "$as_me:10342: checking for $cf_ncuhdr_root include-path" >&5
10343 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10344 if test "${cf_cv_ncurses_h2+set}" = set; then
10345 echo $ECHO_N "(cached) $ECHO_C" >&6
10348 test -n "$verbose" && echo
10352 # collect the current set of include-directories from compiler flags
10353 cf_header_path_list=""
10354 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10355 for cf_header_path in $CPPFLAGS $CFLAGS
10357 case "$cf_header_path" in
10359 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10361 test "x$cf_header_path" != "xNONE" && \
10362 test -d "$cf_header_path" && \
10364 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10365 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
10366 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10367 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10368 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10369 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"
10372 cf_header_path_list="$cf_header_path_list $cf_search"
10378 # add the variations for the package we are looking for
10382 test "x$prefix" != "xNONE" && \
10383 test -d "$prefix" && \
10385 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10386 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
10387 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10388 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10389 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10390 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10393 for cf_subdir_prefix in \
10402 test "x$cf_subdir_prefix" != "x$prefix" && \
10403 test -d "$cf_subdir_prefix" && \
10404 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10405 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10406 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
10407 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10408 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10409 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10410 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"
10415 test "$includedir" != NONE && \
10416 test "$includedir" != "/usr/include" && \
10417 test -d "$includedir" && {
10418 test -d "$includedir" && cf_search="$cf_search $includedir"
10419 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10422 test "$oldincludedir" != NONE && \
10423 test "$oldincludedir" != "/usr/include" && \
10424 test -d "$oldincludedir" && {
10425 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
10426 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10429 cf_search="$cf_search $cf_header_path_list"
10431 test -n "$verbose" && echo "search path $cf_search"
10432 cf_save2_CPPFLAGS="$CPPFLAGS"
10433 for cf_incdir in $cf_search
10436 if test -n "$cf_incdir" ; then
10437 for cf_add_incdir in $cf_incdir
10439 while test "$cf_add_incdir" != /usr/include
10441 if test -d "$cf_add_incdir"
10444 if test -n "$CFLAGS$CPPFLAGS" ; then
10445 # a loop is needed to ensure we can add subdirs of existing dirs
10446 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10447 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10448 cf_have_incdir=yes; break
10453 if test "$cf_have_incdir" = no ; then
10454 if test "$cf_add_incdir" = /usr/local/include ; then
10455 if test "$GCC" = yes
10457 cf_save_CPPFLAGS=$CPPFLAGS
10459 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10460 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10462 cat >"conftest.$ac_ext" <<_ACEOF
10463 #line 10463 "configure"
10464 #include "confdefs.h"
10474 rm -f "conftest.$ac_objext"
10475 if { (eval echo "$as_me:10475: \"$ac_compile\"") >&5
10476 (eval $ac_compile) 2>&5
10478 echo "$as_me:10478: \$? = $ac_status" >&5
10479 (exit "$ac_status"); } &&
10480 { ac_try='test -s "conftest.$ac_objext"'
10481 { (eval echo "$as_me:10481: \"$ac_try\"") >&5
10482 (eval $ac_try) 2>&5
10484 echo "$as_me:10484: \$? = $ac_status" >&5
10485 (exit "$ac_status"); }; }; then
10488 echo "$as_me: failed program was:" >&5
10489 cat "conftest.$ac_ext" >&5
10492 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10493 CPPFLAGS=$cf_save_CPPFLAGS
10498 if test "$cf_have_incdir" = no ; then
10499 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10501 echo "${as_me:-configure}:10501: testing adding $cf_add_incdir to include-path ..." 1>&5
10503 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10505 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10506 test "$cf_top_incdir" = "$cf_add_incdir" && break
10507 cf_add_incdir="$cf_top_incdir"
10523 cat >"conftest.$ac_ext" <<_ACEOF
10524 #line 10524 "configure"
10525 #include "confdefs.h"
10527 #include <$cf_header>
10532 #ifdef NCURSES_VERSION
10534 printf("%s\\n", NCURSES_VERSION);
10547 rm -f "conftest.$ac_objext"
10548 if { (eval echo "$as_me:10548: \"$ac_compile\"") >&5
10549 (eval $ac_compile) 2>&5
10551 echo "$as_me:10551: \$? = $ac_status" >&5
10552 (exit "$ac_status"); } &&
10553 { ac_try='test -s "conftest.$ac_objext"'
10554 { (eval echo "$as_me:10554: \"$ac_try\"") >&5
10555 (eval $ac_try) 2>&5
10557 echo "$as_me:10557: \$? = $ac_status" >&5
10558 (exit "$ac_status"); }; }; then
10559 cf_cv_ncurses_h2=$cf_header
10562 echo "$as_me: failed program was:" >&5
10563 cat "conftest.$ac_ext" >&5
10564 cf_cv_ncurses_h2=no
10566 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10568 if test "$cf_cv_ncurses_h2" != no ; then
10569 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10570 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
10573 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10575 CPPFLAGS="$cf_save2_CPPFLAGS"
10576 test "$cf_cv_ncurses_h2" != no && break
10578 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10578: error: not found" >&5
10579 echo "$as_me: error: not found" >&2;}
10580 { (exit 1); exit 1; }; }
10583 echo "$as_me:10583: result: $cf_cv_ncurses_h2" >&5
10584 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10586 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
10587 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
10588 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
10589 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
10592 if test -n "$cf_1st_incdir" ; then
10593 for cf_add_incdir in $cf_1st_incdir
10595 while test "$cf_add_incdir" != /usr/include
10597 if test -d "$cf_add_incdir"
10600 if test -n "$CFLAGS$CPPFLAGS" ; then
10601 # a loop is needed to ensure we can add subdirs of existing dirs
10602 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10603 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10604 cf_have_incdir=yes; break
10609 if test "$cf_have_incdir" = no ; then
10610 if test "$cf_add_incdir" = /usr/local/include ; then
10611 if test "$GCC" = yes
10613 cf_save_CPPFLAGS=$CPPFLAGS
10615 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10616 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10618 cat >"conftest.$ac_ext" <<_ACEOF
10619 #line 10619 "configure"
10620 #include "confdefs.h"
10630 rm -f "conftest.$ac_objext"
10631 if { (eval echo "$as_me:10631: \"$ac_compile\"") >&5
10632 (eval $ac_compile) 2>&5
10634 echo "$as_me:10634: \$? = $ac_status" >&5
10635 (exit "$ac_status"); } &&
10636 { ac_try='test -s "conftest.$ac_objext"'
10637 { (eval echo "$as_me:10637: \"$ac_try\"") >&5
10638 (eval $ac_try) 2>&5
10640 echo "$as_me:10640: \$? = $ac_status" >&5
10641 (exit "$ac_status"); }; }; then
10644 echo "$as_me: failed program was:" >&5
10645 cat "conftest.$ac_ext" >&5
10648 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10649 CPPFLAGS=$cf_save_CPPFLAGS
10654 if test "$cf_have_incdir" = no ; then
10655 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10657 echo "${as_me:-configure}:10657: testing adding $cf_add_incdir to include-path ..." 1>&5
10659 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10661 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10662 test "$cf_top_incdir" = "$cf_add_incdir" && break
10663 cf_add_incdir="$cf_top_incdir"
10676 # Set definitions to allow ifdef'ing for ncurses.h
10678 case "$cf_cv_ncurses_header" in
10681 cat >>confdefs.h <<\EOF
10682 #define HAVE_NCURSES_H 1
10688 case "$cf_cv_ncurses_header" in
10689 (ncurses/curses.h|ncurses/ncurses.h)
10691 cat >>confdefs.h <<\EOF
10692 #define HAVE_NCURSES_NCURSES_H 1
10696 (ncursesw/curses.h|ncursesw/ncurses.h)
10698 cat >>confdefs.h <<\EOF
10699 #define HAVE_NCURSESW_NCURSES_H 1
10705 echo "$as_me:10705: checking for terminfo header" >&5
10706 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10707 if test "${cf_cv_term_header+set}" = set; then
10708 echo $ECHO_N "(cached) $ECHO_C" >&6
10711 case "${cf_cv_ncurses_header}" in
10712 (*/ncurses.h|*/ncursesw.h)
10713 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10716 cf_term_header=term.h
10720 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10722 cat >"conftest.$ac_ext" <<_ACEOF
10723 #line 10723 "configure"
10724 #include "confdefs.h"
10726 #include <${cf_cv_ncurses_header:-curses.h}>
10727 #include <$cf_test>
10732 int x = auto_left_margin; (void)x
10737 rm -f "conftest.$ac_objext"
10738 if { (eval echo "$as_me:10738: \"$ac_compile\"") >&5
10739 (eval $ac_compile) 2>&5
10741 echo "$as_me:10741: \$? = $ac_status" >&5
10742 (exit "$ac_status"); } &&
10743 { ac_try='test -s "conftest.$ac_objext"'
10744 { (eval echo "$as_me:10744: \"$ac_try\"") >&5
10745 (eval $ac_try) 2>&5
10747 echo "$as_me:10747: \$? = $ac_status" >&5
10748 (exit "$ac_status"); }; }; then
10750 cf_cv_term_header="$cf_test"
10752 echo "$as_me: failed program was:" >&5
10753 cat "conftest.$ac_ext" >&5
10755 cf_cv_term_header=unknown
10758 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10759 test "$cf_cv_term_header" != unknown && break
10763 echo "$as_me:10763: result: $cf_cv_term_header" >&5
10764 echo "${ECHO_T}$cf_cv_term_header" >&6
10766 # Set definitions to allow ifdef'ing to accommodate subdirectories
10768 case "$cf_cv_term_header" in
10771 cat >>confdefs.h <<\EOF
10772 #define HAVE_TERM_H 1
10778 case "$cf_cv_term_header" in
10781 cat >>confdefs.h <<\EOF
10782 #define HAVE_NCURSES_TERM_H 1
10788 cat >>confdefs.h <<\EOF
10789 #define HAVE_NCURSESW_TERM_H 1
10795 # some applications need this, but should check for NCURSES_VERSION
10797 cat >>confdefs.h <<\EOF
10801 echo "$as_me:10801: checking for ncurses version" >&5
10802 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10803 if test "${cf_cv_ncurses_version+set}" = set; then
10804 echo $ECHO_N "(cached) $ECHO_C" >&6
10807 cf_cv_ncurses_version=no
10809 rm -f "$cf_tempfile"
10810 if test "$cross_compiling" = yes; then
10812 # This will not work if the preprocessor splits the line after the
10813 # Autoconf token. The 'unproto' program does that.
10814 cat > "conftest.$ac_ext" <<EOF
10815 #include <${cf_cv_ncurses_header:-curses.h}>
10817 #ifdef NCURSES_VERSION
10818 Autoconf NCURSES_VERSION
10826 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10827 { (eval echo "$as_me:10827: \"$cf_try\"") >&5
10828 (eval $cf_try) 2>&5
10830 echo "$as_me:10830: \$? = $ac_status" >&5
10831 (exit "$ac_status"); }
10832 if test -f conftest.out ; then
10833 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
10834 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10839 cat >"conftest.$ac_ext" <<_ACEOF
10840 #line 10840 "configure"
10841 #include "confdefs.h"
10843 #include <${cf_cv_ncurses_header:-curses.h}>
10847 FILE *fp = fopen("$cf_tempfile", "w");
10848 #ifdef NCURSES_VERSION
10849 # ifdef NCURSES_VERSION_PATCH
10850 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10852 fprintf(fp, "%s\\n", NCURSES_VERSION);
10855 # ifdef __NCURSES_H
10856 fprintf(fp, "old\\n");
10861 ${cf_cv_main_return:-return}(0);
10864 rm -f "conftest$ac_exeext"
10865 if { (eval echo "$as_me:10865: \"$ac_link\"") >&5
10866 (eval $ac_link) 2>&5
10868 echo "$as_me:10868: \$? = $ac_status" >&5
10869 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10870 { (eval echo "$as_me:10870: \"$ac_try\"") >&5
10871 (eval $ac_try) 2>&5
10873 echo "$as_me:10873: \$? = $ac_status" >&5
10874 (exit "$ac_status"); }; }; then
10876 cf_cv_ncurses_version=`cat $cf_tempfile`
10878 echo "$as_me: program exited with status $ac_status" >&5
10879 echo "$as_me: failed program was:" >&5
10880 cat "conftest.$ac_ext" >&5
10882 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10884 rm -f "$cf_tempfile"
10887 echo "$as_me:10887: result: $cf_cv_ncurses_version" >&5
10888 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10889 test "$cf_cv_ncurses_version" = no ||
10890 cat >>confdefs.h <<\EOF
10894 cf_nculib_root=ncurses
10895 # This works, except for the special case where we find gpm, but
10896 # ncurses is in a nonstandard location via $LIBS, and we really want
10899 cf_ncurses_SAVE="$LIBS"
10900 echo "$as_me:10900: checking for Gpm_Open in -lgpm" >&5
10901 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10902 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10903 echo $ECHO_N "(cached) $ECHO_C" >&6
10905 ac_check_lib_save_LIBS=$LIBS
10907 cat >"conftest.$ac_ext" <<_ACEOF
10908 #line 10908 "configure"
10909 #include "confdefs.h"
10911 /* Override any gcc2 internal prototype to avoid an error. */
10915 /* We use char because int might match the return type of a gcc2
10916 builtin and then its argument prototype would still apply. */
10926 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10927 if { (eval echo "$as_me:10927: \"$ac_link\"") >&5
10928 (eval $ac_link) 2>&5
10930 echo "$as_me:10930: \$? = $ac_status" >&5
10931 (exit "$ac_status"); } &&
10932 { ac_try='test -s "conftest$ac_exeext"'
10933 { (eval echo "$as_me:10933: \"$ac_try\"") >&5
10934 (eval $ac_try) 2>&5
10936 echo "$as_me:10936: \$? = $ac_status" >&5
10937 (exit "$ac_status"); }; }; then
10938 ac_cv_lib_gpm_Gpm_Open=yes
10940 echo "$as_me: failed program was:" >&5
10941 cat "conftest.$ac_ext" >&5
10942 ac_cv_lib_gpm_Gpm_Open=no
10944 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10945 LIBS=$ac_check_lib_save_LIBS
10947 echo "$as_me:10947: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10948 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
10949 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
10950 echo "$as_me:10950: checking for initscr in -lgpm" >&5
10951 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
10952 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
10953 echo $ECHO_N "(cached) $ECHO_C" >&6
10955 ac_check_lib_save_LIBS=$LIBS
10957 cat >"conftest.$ac_ext" <<_ACEOF
10958 #line 10958 "configure"
10959 #include "confdefs.h"
10961 /* Override any gcc2 internal prototype to avoid an error. */
10965 /* We use char because int might match the return type of a gcc2
10966 builtin and then its argument prototype would still apply. */
10976 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10977 if { (eval echo "$as_me:10977: \"$ac_link\"") >&5
10978 (eval $ac_link) 2>&5
10980 echo "$as_me:10980: \$? = $ac_status" >&5
10981 (exit "$ac_status"); } &&
10982 { ac_try='test -s "conftest$ac_exeext"'
10983 { (eval echo "$as_me:10983: \"$ac_try\"") >&5
10984 (eval $ac_try) 2>&5
10986 echo "$as_me:10986: \$? = $ac_status" >&5
10987 (exit "$ac_status"); }; }; then
10988 ac_cv_lib_gpm_initscr=yes
10990 echo "$as_me: failed program was:" >&5
10991 cat "conftest.$ac_ext" >&5
10992 ac_cv_lib_gpm_initscr=no
10994 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10995 LIBS=$ac_check_lib_save_LIBS
10997 echo "$as_me:10997: result: $ac_cv_lib_gpm_initscr" >&5
10998 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
10999 if test "$ac_cv_lib_gpm_initscr" = yes; then
11000 LIBS="$cf_ncurses_SAVE"
11002 cf_ncurses_LIBS="-lgpm"
11009 # This is only necessary if you are linking against an obsolete
11010 # version of ncurses (but it should do no harm, since it is static).
11011 if test "$cf_nculib_root" = ncurses ; then
11012 echo "$as_me:11012: checking for tgoto in -lmytinfo" >&5
11013 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
11014 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
11015 echo $ECHO_N "(cached) $ECHO_C" >&6
11017 ac_check_lib_save_LIBS=$LIBS
11018 LIBS="-lmytinfo $LIBS"
11019 cat >"conftest.$ac_ext" <<_ACEOF
11020 #line 11020 "configure"
11021 #include "confdefs.h"
11023 /* Override any gcc2 internal prototype to avoid an error. */
11027 /* We use char because int might match the return type of a gcc2
11028 builtin and then its argument prototype would still apply. */
11038 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11039 if { (eval echo "$as_me:11039: \"$ac_link\"") >&5
11040 (eval $ac_link) 2>&5
11042 echo "$as_me:11042: \$? = $ac_status" >&5
11043 (exit "$ac_status"); } &&
11044 { ac_try='test -s "conftest$ac_exeext"'
11045 { (eval echo "$as_me:11045: \"$ac_try\"") >&5
11046 (eval $ac_try) 2>&5
11048 echo "$as_me:11048: \$? = $ac_status" >&5
11049 (exit "$ac_status"); }; }; then
11050 ac_cv_lib_mytinfo_tgoto=yes
11052 echo "$as_me: failed program was:" >&5
11053 cat "conftest.$ac_ext" >&5
11054 ac_cv_lib_mytinfo_tgoto=no
11056 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11057 LIBS=$ac_check_lib_save_LIBS
11059 echo "$as_me:11059: result: $ac_cv_lib_mytinfo_tgoto" >&5
11060 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11061 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
11062 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
11069 cf_add_libs="$LIBS"
11072 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11073 # filter duplicates
11074 for cf_add_1lib in $cf_add_0lib; do
11075 for cf_add_2lib in $cf_add_libs; do
11076 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11081 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11083 LIBS="$cf_add_libs"
11085 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
11088 cf_add_libs="$LIBS"
11091 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11092 # filter duplicates
11093 for cf_add_1lib in $cf_add_0lib; do
11094 for cf_add_2lib in $cf_add_libs; do
11095 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11100 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11102 LIBS="$cf_add_libs"
11106 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
11108 echo "$as_me:11108: checking for initscr" >&5
11109 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
11110 if test "${ac_cv_func_initscr+set}" = set; then
11111 echo $ECHO_N "(cached) $ECHO_C" >&6
11113 cat >"conftest.$ac_ext" <<_ACEOF
11114 #line 11114 "configure"
11115 #include "confdefs.h"
11116 #define initscr autoconf_temporary
11117 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11124 /* We use char because int might match the return type of a gcc2
11125 builtin and then its argument prototype would still apply. */
11126 char initscr (void);
11132 /* The GNU C library defines stubs for functions which it implements
11133 to always fail with ENOSYS. Some functions are actually named
11134 something starting with __ and the normal name is an alias. */
11135 #if defined (__stub_initscr) || defined (__stub___initscr)
11136 #error found stub for initscr
11144 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11145 if { (eval echo "$as_me:11145: \"$ac_link\"") >&5
11146 (eval $ac_link) 2>&5
11148 echo "$as_me:11148: \$? = $ac_status" >&5
11149 (exit "$ac_status"); } &&
11150 { ac_try='test -s "conftest$ac_exeext"'
11151 { (eval echo "$as_me:11151: \"$ac_try\"") >&5
11152 (eval $ac_try) 2>&5
11154 echo "$as_me:11154: \$? = $ac_status" >&5
11155 (exit "$ac_status"); }; }; then
11156 ac_cv_func_initscr=yes
11158 echo "$as_me: failed program was:" >&5
11159 cat "conftest.$ac_ext" >&5
11160 ac_cv_func_initscr=no
11162 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11164 echo "$as_me:11164: result: $ac_cv_func_initscr" >&5
11165 echo "${ECHO_T}$ac_cv_func_initscr" >&6
11166 if test "$ac_cv_func_initscr" = yes; then
11167 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11170 cf_save_LIBS="$LIBS"
11171 echo "$as_me:11171: checking for initscr in -l$cf_nculib_root" >&5
11172 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
11173 LIBS="-l$cf_nculib_root $LIBS"
11174 cat >"conftest.$ac_ext" <<_ACEOF
11175 #line 11175 "configure"
11176 #include "confdefs.h"
11177 #include <${cf_cv_ncurses_header:-curses.h}>
11186 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11187 if { (eval echo "$as_me:11187: \"$ac_link\"") >&5
11188 (eval $ac_link) 2>&5
11190 echo "$as_me:11190: \$? = $ac_status" >&5
11191 (exit "$ac_status"); } &&
11192 { ac_try='test -s "conftest$ac_exeext"'
11193 { (eval echo "$as_me:11193: \"$ac_try\"") >&5
11194 (eval $ac_try) 2>&5
11196 echo "$as_me:11196: \$? = $ac_status" >&5
11197 (exit "$ac_status"); }; }; then
11198 echo "$as_me:11198: result: yes" >&5
11199 echo "${ECHO_T}yes" >&6
11200 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11203 echo "$as_me: failed program was:" >&5
11204 cat "conftest.$ac_ext" >&5
11205 echo "$as_me:11205: result: no" >&5
11206 echo "${ECHO_T}no" >&6
11209 cf_library_path_list=""
11210 if test -n "${LDFLAGS}${LIBS}" ; then
11211 for cf_library_path in $LDFLAGS $LIBS
11213 case "$cf_library_path" in
11215 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11217 test "x$cf_library_path" != "xNONE" && \
11218 test -d "$cf_library_path" && \
11220 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11221 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
11222 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11223 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11224 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11225 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"
11228 cf_library_path_list="$cf_library_path_list $cf_search"
11236 test "x$prefix" != "xNONE" && \
11237 test -d "$prefix" && \
11239 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11240 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
11241 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11242 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11243 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11244 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11247 for cf_subdir_prefix in \
11256 test "x$cf_subdir_prefix" != "x$prefix" && \
11257 test -d "$cf_subdir_prefix" && \
11258 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11259 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11260 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
11261 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11262 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11263 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11264 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"
11269 cf_search="$cf_library_path_list $cf_search"
11271 for cf_libdir in $cf_search
11273 echo "$as_me:11273: checking for -l$cf_nculib_root in $cf_libdir" >&5
11274 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11275 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11276 cat >"conftest.$ac_ext" <<_ACEOF
11277 #line 11277 "configure"
11278 #include "confdefs.h"
11279 #include <${cf_cv_ncurses_header:-curses.h}>
11288 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11289 if { (eval echo "$as_me:11289: \"$ac_link\"") >&5
11290 (eval $ac_link) 2>&5
11292 echo "$as_me:11292: \$? = $ac_status" >&5
11293 (exit "$ac_status"); } &&
11294 { ac_try='test -s "conftest$ac_exeext"'
11295 { (eval echo "$as_me:11295: \"$ac_try\"") >&5
11296 (eval $ac_try) 2>&5
11298 echo "$as_me:11298: \$? = $ac_status" >&5
11299 (exit "$ac_status"); }; }; then
11300 echo "$as_me:11300: result: yes" >&5
11301 echo "${ECHO_T}yes" >&6
11302 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11305 echo "$as_me: failed program was:" >&5
11306 cat "conftest.$ac_ext" >&5
11307 echo "$as_me:11307: result: no" >&5
11308 echo "${ECHO_T}no" >&6
11309 LIBS="$cf_save_LIBS"
11311 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11315 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11319 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
11321 if test "$cf_found_library" = no ; then
11322 { { echo "$as_me:11322: error: Cannot link $cf_nculib_root library" >&5
11323 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11324 { (exit 1); exit 1; }; }
11329 if test -n "$cf_ncurses_LIBS" ; then
11330 echo "$as_me:11330: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11331 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11332 cf_ncurses_SAVE="$LIBS"
11333 for p in $cf_ncurses_LIBS ; do
11334 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
11335 if test "$q" != "$LIBS" ; then
11339 cat >"conftest.$ac_ext" <<_ACEOF
11340 #line 11340 "configure"
11341 #include "confdefs.h"
11342 #include <${cf_cv_ncurses_header:-curses.h}>
11346 initscr(); mousemask(0,0); tigetstr((char *)0);
11351 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11352 if { (eval echo "$as_me:11352: \"$ac_link\"") >&5
11353 (eval $ac_link) 2>&5
11355 echo "$as_me:11355: \$? = $ac_status" >&5
11356 (exit "$ac_status"); } &&
11357 { ac_try='test -s "conftest$ac_exeext"'
11358 { (eval echo "$as_me:11358: \"$ac_try\"") >&5
11359 (eval $ac_try) 2>&5
11361 echo "$as_me:11361: \$? = $ac_status" >&5
11362 (exit "$ac_status"); }; }; then
11363 echo "$as_me:11363: result: yes" >&5
11364 echo "${ECHO_T}yes" >&6
11366 echo "$as_me: failed program was:" >&5
11367 cat "conftest.$ac_ext" >&5
11368 echo "$as_me:11368: result: no" >&5
11369 echo "${ECHO_T}no" >&6
11370 LIBS="$cf_ncurses_SAVE"
11372 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11375 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11377 cat >>confdefs.h <<EOF
11378 #define $cf_nculib_ROOT 1
11383 NCURSES_CONFIG=none
11388 if test "$NCURSES_CONFIG_PKG" != none ; then
11389 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
11391 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11392 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11393 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11395 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
11396 if test -z "$cf_cv_abi_version"
11398 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
11401 elif test "$NCURSES_CONFIG" != none ; then
11403 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
11405 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11406 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11407 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11409 # ABI version is not available from headers
11410 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
11414 for cf_name in MAJOR MINOR PATCH
11416 cat >conftest.$ac_ext <<CF_EOF
11417 #include <${cf_cv_ncurses_header:-curses.h}>
11418 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
11420 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
11421 { (eval echo "$as_me:11421: \"$cf_try\"") >&5
11422 (eval $cf_try) 2>&5
11424 echo "$as_me:11424: \$? = $ac_status" >&5
11425 (exit "$ac_status"); }
11426 if test -f conftest.out ; then
11427 cf_result=`sed -e "s/^.*AUTOCONF_${cf_name}[ ][ ]*//" conftest.out`
11428 eval NCURSES_$cf_name=\"$cf_result\"
11429 # cat conftest.$ac_ext
11434 cf_cv_abi_version=${NCURSES_MAJOR}
11438 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
11440 cf_cv_timestamp=`date`
11442 echo "$as_me:11442: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
11443 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
11445 echo "$as_me:11445: checking if you want to have a library-prefix" >&5
11446 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
11448 # Check whether --with-lib-prefix or --without-lib-prefix was given.
11449 if test "${with_lib_prefix+set}" = set; then
11450 withval="$with_lib_prefix"
11451 with_lib_prefix=$withval
11453 with_lib_prefix=auto
11455 echo "$as_me:11455: result: $with_lib_prefix" >&5
11456 echo "${ECHO_T}$with_lib_prefix" >&6
11458 if test "$with_lib_prefix" = auto
11461 case "$cf_cv_system_name" in
11463 if test "$DFT_LWR_MODEL" = libtool; then
11472 (*) LIB_PREFIX='lib'
11475 cf_prefix=$LIB_PREFIX
11477 elif test "$with_lib_prefix" = no
11481 LIB_PREFIX=$with_lib_prefix
11486 ###############################################################################
11488 if test X"$CC_G_OPT" = X"" ; then
11490 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
11493 echo "$as_me:11493: checking for default loader flags" >&5
11494 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
11495 case $DFT_LWR_MODEL in
11496 (normal) LD_MODEL='' ;;
11497 (debug) LD_MODEL=$CC_G_OPT ;;
11498 (profile) LD_MODEL='-pg';;
11499 (shared) LD_MODEL='' ;;
11501 echo "$as_me:11501: result: $LD_MODEL" >&5
11502 echo "${ECHO_T}$LD_MODEL" >&6
11505 if test "x$cf_cv_enable_rpath" != xno
11507 echo "$as_me:11507: checking for an rpath option" >&5
11508 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
11509 case "$cf_cv_system_name" in
11511 if test "$GCC" = yes; then
11512 LD_RPATH_OPT="-Wl,-rpath,"
11514 LD_RPATH_OPT="-rpath "
11517 (linux*|gnu*|k*bsd*-gnu|freebsd*)
11518 LD_RPATH_OPT="-Wl,-rpath,"
11520 (openbsd[2-9].*|mirbsd*)
11521 LD_RPATH_OPT="-Wl,-rpath,"
11524 LD_RPATH_OPT="-rpath "
11527 LD_RPATH_OPT="-Wl,-rpath,"
11530 LD_RPATH_OPT="-rpath "
11538 echo "$as_me:11538: result: $LD_RPATH_OPT" >&5
11539 echo "${ECHO_T}$LD_RPATH_OPT" >&6
11541 case "x$LD_RPATH_OPT" in
11543 echo "$as_me:11543: checking if we need a space after rpath option" >&5
11544 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
11545 cf_save_LIBS="$LIBS"
11547 cf_add_libs="$LIBS"
11550 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11551 # filter duplicates
11552 for cf_add_1lib in $cf_add_0lib; do
11553 for cf_add_2lib in $cf_add_libs; do
11554 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11559 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11561 LIBS="$cf_add_libs"
11563 cat >"conftest.$ac_ext" <<_ACEOF
11564 #line 11564 "configure"
11565 #include "confdefs.h"
11575 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11576 if { (eval echo "$as_me:11576: \"$ac_link\"") >&5
11577 (eval $ac_link) 2>&5
11579 echo "$as_me:11579: \$? = $ac_status" >&5
11580 (exit "$ac_status"); } &&
11581 { ac_try='test -s "conftest$ac_exeext"'
11582 { (eval echo "$as_me:11582: \"$ac_try\"") >&5
11583 (eval $ac_try) 2>&5
11585 echo "$as_me:11585: \$? = $ac_status" >&5
11586 (exit "$ac_status"); }; }; then
11589 echo "$as_me: failed program was:" >&5
11590 cat "conftest.$ac_ext" >&5
11593 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11594 LIBS="$cf_save_LIBS"
11595 echo "$as_me:11595: result: $cf_rpath_space" >&5
11596 echo "${ECHO_T}$cf_rpath_space" >&6
11597 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
11606 INSTALL_LIB="-m 644"
11607 : ${rel_builddir:=.}
11613 cf_cv_do_symlinks=no
11615 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
11617 echo "$as_me:11617: checking if release/abi version should be used for shared libs" >&5
11618 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
11620 # Check whether --with-shlib-version or --without-shlib-version was given.
11621 if test "${with_shlib_version+set}" = set; then
11622 withval="$with_shlib_version"
11623 test -z "$withval" && withval=auto
11626 cf_cv_shlib_version=auto
11629 cf_cv_shlib_version=$withval
11632 echo "$as_me:11632: result: $withval" >&5
11633 echo "${ECHO_T}$withval" >&6
11634 { { echo "$as_me:11634: error: option value must be one of: rel, abi, or auto" >&5
11635 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
11636 { (exit 1); exit 1; }; }
11641 cf_cv_shlib_version=auto
11643 echo "$as_me:11643: result: $cf_cv_shlib_version" >&5
11644 echo "${ECHO_T}$cf_cv_shlib_version" >&6
11646 cf_cv_rm_so_locs=no
11649 # Some less-capable ports of gcc support only -fpic
11653 if test "$GCC" = yes
11657 case "$cf_cv_system_name" in
11658 (*linux*) # e.g., PGI compiler
11664 if test "$cf_try_fPIC" = yes
11666 echo "$as_me:11666: checking which $CC option to use" >&5
11667 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
11668 cf_save_CFLAGS="$CFLAGS"
11669 for CC_SHARED_OPTS in -fPIC -fpic ''
11671 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
11672 cat >"conftest.$ac_ext" <<_ACEOF
11673 #line 11673 "configure"
11674 #include "confdefs.h"
11684 rm -f "conftest.$ac_objext"
11685 if { (eval echo "$as_me:11685: \"$ac_compile\"") >&5
11686 (eval $ac_compile) 2>&5
11688 echo "$as_me:11688: \$? = $ac_status" >&5
11689 (exit "$ac_status"); } &&
11690 { ac_try='test -s "conftest.$ac_objext"'
11691 { (eval echo "$as_me:11691: \"$ac_try\"") >&5
11692 (eval $ac_try) 2>&5
11694 echo "$as_me:11694: \$? = $ac_status" >&5
11695 (exit "$ac_status"); }; }; then
11698 echo "$as_me: failed program was:" >&5
11699 cat "conftest.$ac_ext" >&5
11701 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11703 echo "$as_me:11703: result: $CC_SHARED_OPTS" >&5
11704 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
11705 CFLAGS="$cf_save_CFLAGS"
11708 cf_cv_shlib_version_infix=no
11710 case "$cf_cv_system_name" in
11711 (aix4.3-9*|aix[5-7]*)
11712 if test "$GCC" = yes; then
11713 CC_SHARED_OPTS='-Wl,-brtl'
11714 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11716 CC_SHARED_OPTS='-brtl'
11717 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
11718 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11722 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
11726 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11727 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11728 cf_cv_shlib_version=cygdll
11729 cf_cv_shlib_version_infix=cygdll
11732 cat >mk_shared_lib.sh <<-CF_EOF
11735 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11738 Linking shared library
11739 ** SHARED_LIB \$SHARED_LIB
11740 ** IMPORT_LIB \$IMPORT_LIB
11742 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11744 chmod +x mk_shared_lib.sh
11748 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11749 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11750 cf_cv_shlib_version=msysdll
11751 cf_cv_shlib_version_infix=msysdll
11754 cat >mk_shared_lib.sh <<-CF_EOF
11757 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11760 Linking shared library
11761 ** SHARED_LIB \$SHARED_LIB
11762 ** IMPORT_LIB \$IMPORT_LIB
11764 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11766 chmod +x mk_shared_lib.sh
11769 cf_try_cflags="no-cpp-precomp"
11770 CC_SHARED_OPTS="-dynamic"
11771 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
11772 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
11773 cf_cv_shlib_version_infix=yes
11774 echo "$as_me:11774: checking if ld -search_paths_first works" >&5
11775 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
11776 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
11777 echo $ECHO_N "(cached) $ECHO_C" >&6
11780 cf_save_LDFLAGS=$LDFLAGS
11781 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11782 cat >"conftest.$ac_ext" <<_ACEOF
11783 #line 11783 "configure"
11784 #include "confdefs.h"
11794 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11795 if { (eval echo "$as_me:11795: \"$ac_link\"") >&5
11796 (eval $ac_link) 2>&5
11798 echo "$as_me:11798: \$? = $ac_status" >&5
11799 (exit "$ac_status"); } &&
11800 { ac_try='test -s "conftest$ac_exeext"'
11801 { (eval echo "$as_me:11801: \"$ac_try\"") >&5
11802 (eval $ac_try) 2>&5
11804 echo "$as_me:11804: \$? = $ac_status" >&5
11805 (exit "$ac_status"); }; }; then
11806 cf_cv_ldflags_search_paths_first=yes
11808 echo "$as_me: failed program was:" >&5
11809 cat "conftest.$ac_ext" >&5
11810 cf_cv_ldflags_search_paths_first=no
11812 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11813 LDFLAGS=$cf_save_LDFLAGS
11815 echo "$as_me:11815: result: $cf_cv_ldflags_search_paths_first" >&5
11816 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
11817 if test "$cf_cv_ldflags_search_paths_first" = yes; then
11818 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11823 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11824 if test "$cf_cv_shlib_version" = rel; then
11825 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11827 cf_cv_shared_soname='`basename $@`'
11830 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11833 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
11834 if test "$GCC" != yes; then
11835 CC_SHARED_OPTS='+Z'
11837 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
11838 INSTALL_LIB="-m 555"
11841 # (tested with gcc 2.7.2 -- I don't have c89)
11842 if test "$GCC" = yes; then
11843 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
11845 CC_SHARED_OPTS='+Z'
11846 LD_SHARED_OPTS='-Wl,+b,${libdir}'
11848 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
11849 # HP-UX shared libraries must be executable, and should be
11850 # readonly to exploit a quirk in the memory manager.
11851 INSTALL_LIB="-m 555"
11854 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11855 if test "$cf_cv_shlib_version" = rel; then
11856 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11858 cf_shared_soname='`basename $@`'
11861 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
11864 if test "$cf_cv_enable_rpath" = yes ; then
11865 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11867 # tested with IRIX 5.2 and 'cc'.
11868 if test "$GCC" != yes; then
11869 CC_SHARED_OPTS='-KPIC'
11870 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
11872 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
11874 cf_cv_rm_so_locs=yes
11876 (linux*|gnu*|k*bsd*-gnu)
11877 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11878 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11879 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11881 if test "$cf_cv_enable_rpath" = yes ; then
11882 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11885 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11886 if test "$cf_cv_shlib_version" = rel; then
11887 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11889 cf_cv_shared_soname='`basename $@`'
11892 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11895 cf_cv_shlib_version=msvcdll
11896 cf_cv_shlib_version_infix=msvcdll
11899 if test "$DFT_LWR_MODEL" = "shared" ; then
11900 LOCAL_LDFLAGS="-link -dll"
11901 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11902 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
11905 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
11906 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
11907 cat >mk_shared_lib.sh <<-CF_EOF
11910 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
11915 Linking shared library
11916 ** SHARED LIB \$SHARED_LIB
11917 ** IMPORT_LIB \$IMPORT_LIB
11919 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
11920 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
11921 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
11923 chmod +x mk_shared_lib.sh
11924 cat >mk_prog.sh <<-CF_EOF
11927 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
11930 ldopts=("/subsystem:console")
11933 while test \$# -gt 0; do
11936 # ignore -link argument
11939 # ignore runtime-library option
11954 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
11957 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
11963 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
11964 ldopts+=("\${linkarg}")
11972 ldopts+=("-out:\$1")
11981 if [ "\$isdll" -ne 0 ]; then
11982 for lib in \${libs[*]}; do
11983 ldopts+=("\$lib.dll.lib")
11986 for lib in \${libs[*]}; do
11987 ldopts+=("\$lib.lib")
11992 ** ld options: "\${ldopts[@]}"
11994 exec \$LD \${ldopts[@]}
11996 chmod +x mk_prog.sh
11997 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
11998 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
12001 cf_cv_shlib_version=mingw
12002 cf_cv_shlib_version_infix=mingw
12005 if test "$DFT_LWR_MODEL" = "shared" ; then
12006 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
12007 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12008 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
12011 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
12012 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
12013 cat >mk_shared_lib.sh <<-CF_EOF
12016 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
12019 Linking shared library
12020 ** SHARED_LIB \$SHARED_LIB
12021 ** IMPORT_LIB \$IMPORT_LIB
12023 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
12025 chmod +x mk_shared_lib.sh
12027 (openbsd[2-9].*|mirbsd*)
12028 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12029 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12030 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12032 if test "$cf_cv_enable_rpath" = yes ; then
12033 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12035 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12037 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12038 if test "$cf_cv_shlib_version" = rel; then
12039 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12041 cf_cv_shared_soname='`basename $@`'
12044 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12048 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
12052 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
12054 (nto-qnx*|openbsd*|freebsd[12].*)
12055 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12056 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
12057 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12059 (dragonfly*|freebsd*)
12060 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12061 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12062 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12063 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
12064 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12067 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12068 if test "$cf_cv_shlib_version" = rel; then
12069 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12071 cf_cv_shared_soname='`basename $@`'
12074 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12077 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12078 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12079 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12080 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12081 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12082 if test "$cf_cv_shlib_version" = auto; then
12083 if test -f /usr/libexec/ld.elf_so; then
12084 cf_cv_shlib_version=abi
12086 cf_cv_shlib_version=rel
12090 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12091 if test "$cf_cv_shlib_version" = rel; then
12092 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12094 cf_cv_shared_soname='`basename $@`'
12097 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
12099 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
12103 # tested with OSF/1 V3.2 and 'cc'
12104 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
12105 # link with shared libs).
12106 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
12109 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
12112 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
12113 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12114 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12115 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12117 cf_cv_rm_so_locs=yes
12119 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
12120 # tested with osr5.0.5
12121 if test "$GCC" != yes; then
12122 CC_SHARED_OPTS='-belf -KPIC'
12124 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
12125 if test "$cf_cv_enable_rpath" = yes ; then
12126 # only way is to set LD_RUN_PATH but no switch for it
12129 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12130 LINK_PROGS='LD_RUN_PATH=${libdir}'
12131 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
12134 # tested with SunOS 4.1.1 and gcc 2.7.0
12135 if test "$GCC" != yes; then
12136 CC_SHARED_OPTS='-KPIC'
12138 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
12139 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12142 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
12143 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
12144 if test "$DFT_LWR_MODEL" = "shared" ; then
12145 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
12146 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12148 if test "$cf_cv_enable_rpath" = yes ; then
12149 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
12152 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12153 if test "$cf_cv_shlib_version" = rel; then
12154 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12156 cf_cv_shared_soname='`basename $@`'
12159 if test "$GCC" != yes; then
12160 cf_save_CFLAGS="$CFLAGS"
12161 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
12163 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
12164 cat >"conftest.$ac_ext" <<_ACEOF
12165 #line 12165 "configure"
12166 #include "confdefs.h"
12171 printf("Hello\\n");
12176 rm -f "conftest.$ac_objext"
12177 if { (eval echo "$as_me:12177: \"$ac_compile\"") >&5
12178 (eval $ac_compile) 2>&5
12180 echo "$as_me:12180: \$? = $ac_status" >&5
12181 (exit "$ac_status"); } &&
12182 { ac_try='test -s "conftest.$ac_objext"'
12183 { (eval echo "$as_me:12183: \"$ac_try\"") >&5
12184 (eval $ac_try) 2>&5
12186 echo "$as_me:12186: \$? = $ac_status" >&5
12187 (exit "$ac_status"); }; }; then
12190 echo "$as_me: failed program was:" >&5
12191 cat "conftest.$ac_ext" >&5
12193 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12195 CFLAGS="$cf_save_CFLAGS"
12196 CC_SHARED_OPTS=$cf_shared_opts
12197 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
12199 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
12202 (sysv5uw7*|unix_sv*)
12203 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
12204 if test "$GCC" != yes; then
12205 CC_SHARED_OPTS='-KPIC'
12207 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
12210 CC_SHARED_OPTS='unknown'
12211 MK_SHARED_LIB='echo unknown'
12215 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
12216 case "$cf_cv_shlib_version" in
12218 case "$MK_SHARED_LIB" in
12220 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
12223 { echo "$as_me:12223: WARNING: ignored --with-shlib-version" >&5
12224 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
12230 if test -n "$cf_try_cflags"
12232 cat > conftest.$ac_ext <<EOF
12233 #line 12233 "${as_me:-configure}"
12235 int main(int argc, char *argv[])
12237 printf("hello\\n");
12238 return (argv[argc-1] == 0) ;
12241 cf_save_CFLAGS="$CFLAGS"
12242 for cf_opt in $cf_try_cflags
12244 CFLAGS="$cf_save_CFLAGS -$cf_opt"
12245 echo "$as_me:12245: checking if CFLAGS option -$cf_opt works" >&5
12246 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
12247 if { (eval echo "$as_me:12247: \"$ac_compile\"") >&5
12248 (eval $ac_compile) 2>&5
12250 echo "$as_me:12250: \$? = $ac_status" >&5
12251 (exit "$ac_status"); }; then
12252 echo "$as_me:12252: result: yes" >&5
12253 echo "${ECHO_T}yes" >&6
12254 cf_save_CFLAGS="$CFLAGS"
12256 echo "$as_me:12256: result: no" >&5
12257 echo "${ECHO_T}no" >&6
12260 CFLAGS="$cf_save_CFLAGS"
12263 # RPATH_LIST is a colon-separated list of directories
12264 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
12265 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
12267 test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
12269 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
12271 echo "${as_me:-configure}:12271: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
12273 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
12275 echo "${as_me:-configure}:12275: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
12277 # The test/sample programs in the original tree link using rpath option.
12278 # Make it optional for packagers.
12279 if test -n "$LOCAL_LDFLAGS"
12281 echo "$as_me:12281: checking if you want to link sample programs with rpath option" >&5
12282 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
12284 # Check whether --enable-rpath-link or --disable-rpath-link was given.
12285 if test "${enable_rpath_link+set}" = set; then
12286 enableval="$enable_rpath_link"
12287 with_rpath_link=$enableval
12289 with_rpath_link=yes
12291 echo "$as_me:12291: result: $with_rpath_link" >&5
12292 echo "${ECHO_T}$with_rpath_link" >&6
12293 if test "$with_rpath_link" = no
12300 ###############################################################################
12302 ### use option --enable-broken-linker to force on use of broken-linker support
12304 echo "$as_me:12304: checking if you want broken-linker support code" >&5
12305 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
12307 # Check whether --enable-broken_linker or --disable-broken_linker was given.
12308 if test "${enable_broken_linker+set}" = set; then
12309 enableval="$enable_broken_linker"
12310 with_broken_linker=$enableval
12312 with_broken_linker=no
12314 echo "$as_me:12314: result: $with_broken_linker" >&5
12315 echo "${ECHO_T}$with_broken_linker" >&6
12317 : "${BROKEN_LINKER:=0}"
12318 if test "x$with_broken_linker" = xyes ; then
12320 cat >>confdefs.h <<\EOF
12321 #define BROKEN_LINKER 1
12327 # Check to define _XOPEN_SOURCE "automatically"
12329 echo "$as_me:12329: checking if the POSIX test-macros are already defined" >&5
12330 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
12331 if test "${cf_cv_posix_visible+set}" = set; then
12332 echo $ECHO_N "(cached) $ECHO_C" >&6
12335 cat >"conftest.$ac_ext" <<_ACEOF
12336 #line 12336 "configure"
12337 #include "confdefs.h"
12343 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
12344 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
12345 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
12346 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
12347 #error conflicting symbols found
12354 rm -f "conftest.$ac_objext"
12355 if { (eval echo "$as_me:12355: \"$ac_compile\"") >&5
12356 (eval $ac_compile) 2>&5
12358 echo "$as_me:12358: \$? = $ac_status" >&5
12359 (exit "$ac_status"); } &&
12360 { ac_try='test -s "conftest.$ac_objext"'
12361 { (eval echo "$as_me:12361: \"$ac_try\"") >&5
12362 (eval $ac_try) 2>&5
12364 echo "$as_me:12364: \$? = $ac_status" >&5
12365 (exit "$ac_status"); }; }; then
12366 cf_cv_posix_visible=no
12368 echo "$as_me: failed program was:" >&5
12369 cat "conftest.$ac_ext" >&5
12370 cf_cv_posix_visible=yes
12372 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12375 echo "$as_me:12375: result: $cf_cv_posix_visible" >&5
12376 echo "${ECHO_T}$cf_cv_posix_visible" >&6
12378 if test "$cf_cv_posix_visible" = no; then
12380 cf_XOPEN_SOURCE=600
12381 cf_POSIX_C_SOURCE=199506L
12386 cf_xopen_source="-D_ALL_SOURCE"
12389 cf_XOPEN_SOURCE=600
12392 cf_xopen_source="-D_APPLE_C_SOURCE"
12395 cf_xopen_source="-D_DARWIN_C_SOURCE"
12398 (freebsd*|dragonfly*|midnightbsd*)
12399 # 5.x headers associate
12400 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
12401 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
12402 cf_POSIX_C_SOURCE=200112L
12403 cf_XOPEN_SOURCE=600
12404 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12407 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
12410 cf_xopen_source="-D_HPUX_SOURCE"
12413 cf_xopen_source="-D_SGI_SOURCE"
12416 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
12418 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
12420 echo "$as_me:12420: checking if this is the GNU C library" >&5
12421 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
12422 if test "${cf_cv_gnu_library+set}" = set; then
12423 echo $ECHO_N "(cached) $ECHO_C" >&6
12426 cat >"conftest.$ac_ext" <<_ACEOF
12427 #line 12427 "configure"
12428 #include "confdefs.h"
12429 #include <sys/types.h>
12434 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
12436 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
12439 # error not GNU C library
12445 rm -f "conftest.$ac_objext"
12446 if { (eval echo "$as_me:12446: \"$ac_compile\"") >&5
12447 (eval $ac_compile) 2>&5
12449 echo "$as_me:12449: \$? = $ac_status" >&5
12450 (exit "$ac_status"); } &&
12451 { ac_try='test -s "conftest.$ac_objext"'
12452 { (eval echo "$as_me:12452: \"$ac_try\"") >&5
12453 (eval $ac_try) 2>&5
12455 echo "$as_me:12455: \$? = $ac_status" >&5
12456 (exit "$ac_status"); }; }; then
12457 cf_cv_gnu_library=yes
12459 echo "$as_me: failed program was:" >&5
12460 cat "conftest.$ac_ext" >&5
12461 cf_cv_gnu_library=no
12463 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12466 echo "$as_me:12466: result: $cf_cv_gnu_library" >&5
12467 echo "${ECHO_T}$cf_cv_gnu_library" >&6
12469 if test x$cf_cv_gnu_library = xyes; then
12471 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
12472 # was changed to help a little. newlib incorporated the change about 4
12474 echo "$as_me:12474: checking if _DEFAULT_SOURCE can be used as a basis" >&5
12475 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
12476 if test "${cf_cv_gnu_library_219+set}" = set; then
12477 echo $ECHO_N "(cached) $ECHO_C" >&6
12480 cf_save="$CPPFLAGS"
12482 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12483 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12485 cat >"conftest.$ac_ext" <<_ACEOF
12486 #line 12486 "configure"
12487 #include "confdefs.h"
12488 #include <sys/types.h>
12493 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
12495 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
12498 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
12504 rm -f "conftest.$ac_objext"
12505 if { (eval echo "$as_me:12505: \"$ac_compile\"") >&5
12506 (eval $ac_compile) 2>&5
12508 echo "$as_me:12508: \$? = $ac_status" >&5
12509 (exit "$ac_status"); } &&
12510 { ac_try='test -s "conftest.$ac_objext"'
12511 { (eval echo "$as_me:12511: \"$ac_try\"") >&5
12512 (eval $ac_try) 2>&5
12514 echo "$as_me:12514: \$? = $ac_status" >&5
12515 (exit "$ac_status"); }; }; then
12516 cf_cv_gnu_library_219=yes
12518 echo "$as_me: failed program was:" >&5
12519 cat "conftest.$ac_ext" >&5
12520 cf_cv_gnu_library_219=no
12522 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12523 CPPFLAGS="$cf_save"
12526 echo "$as_me:12526: result: $cf_cv_gnu_library_219" >&5
12527 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
12529 if test "x$cf_cv_gnu_library_219" = xyes; then
12530 cf_save="$CPPFLAGS"
12531 echo "$as_me:12531: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
12532 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
12533 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
12534 echo $ECHO_N "(cached) $ECHO_C" >&6
12540 cf_new_extra_cppflags=
12542 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
12544 case "$cf_fix_cppflags" in
12546 case "$cf_add_cflags" in
12547 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12548 case "$cf_add_cflags" in
12550 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12552 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12553 && test -z "${cf_tst_cflags}" \
12554 && cf_fix_cppflags=yes
12556 if test "$cf_fix_cppflags" = yes ; then
12558 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12559 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12562 elif test "${cf_tst_cflags}" = "\"'" ; then
12564 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12565 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12571 case "$CPPFLAGS" in
12575 case "$cf_add_cflags" in
12577 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12579 CPPFLAGS=`echo "$CPPFLAGS" | \
12580 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12581 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12586 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12587 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12594 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12595 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12602 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12603 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12605 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12607 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12608 && test -z "${cf_tst_cflags}" \
12609 && cf_fix_cppflags=no
12614 if test -n "$cf_new_cflags" ; then
12616 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12617 CFLAGS="${CFLAGS}$cf_new_cflags"
12621 if test -n "$cf_new_cppflags" ; then
12623 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12624 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12628 if test -n "$cf_new_extra_cppflags" ; then
12630 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12631 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12635 cat >"conftest.$ac_ext" <<_ACEOF
12636 #line 12636 "configure"
12637 #include "confdefs.h"
12639 #include <limits.h>
12640 #include <sys/types.h>
12646 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
12649 # error GNU C library is too old
12655 rm -f "conftest.$ac_objext"
12656 if { (eval echo "$as_me:12656: \"$ac_compile\"") >&5
12657 (eval $ac_compile) 2>&5
12659 echo "$as_me:12659: \$? = $ac_status" >&5
12660 (exit "$ac_status"); } &&
12661 { ac_try='test -s "conftest.$ac_objext"'
12662 { (eval echo "$as_me:12662: \"$ac_try\"") >&5
12663 (eval $ac_try) 2>&5
12665 echo "$as_me:12665: \$? = $ac_status" >&5
12666 (exit "$ac_status"); }; }; then
12667 cf_cv_gnu_dftsrc_219=yes
12669 echo "$as_me: failed program was:" >&5
12670 cat "conftest.$ac_ext" >&5
12671 cf_cv_gnu_dftsrc_219=no
12673 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12676 echo "$as_me:12676: result: $cf_cv_gnu_dftsrc_219" >&5
12677 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
12678 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
12680 cf_cv_gnu_dftsrc_219=maybe
12683 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
12685 echo "$as_me:12685: checking if we must define _GNU_SOURCE" >&5
12686 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
12687 if test "${cf_cv_gnu_source+set}" = set; then
12688 echo $ECHO_N "(cached) $ECHO_C" >&6
12691 cat >"conftest.$ac_ext" <<_ACEOF
12692 #line 12692 "configure"
12693 #include "confdefs.h"
12694 #include <sys/types.h>
12699 #ifndef _XOPEN_SOURCE
12700 #error expected _XOPEN_SOURCE to be defined
12706 rm -f "conftest.$ac_objext"
12707 if { (eval echo "$as_me:12707: \"$ac_compile\"") >&5
12708 (eval $ac_compile) 2>&5
12710 echo "$as_me:12710: \$? = $ac_status" >&5
12711 (exit "$ac_status"); } &&
12712 { ac_try='test -s "conftest.$ac_objext"'
12713 { (eval echo "$as_me:12713: \"$ac_try\"") >&5
12714 (eval $ac_try) 2>&5
12716 echo "$as_me:12716: \$? = $ac_status" >&5
12717 (exit "$ac_status"); }; }; then
12718 cf_cv_gnu_source=no
12720 echo "$as_me: failed program was:" >&5
12721 cat "conftest.$ac_ext" >&5
12722 cf_save="$CPPFLAGS"
12727 cf_new_extra_cppflags=
12729 for cf_add_cflags in -D_GNU_SOURCE
12731 case "$cf_fix_cppflags" in
12733 case "$cf_add_cflags" in
12734 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12735 case "$cf_add_cflags" in
12737 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12739 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12740 && test -z "${cf_tst_cflags}" \
12741 && cf_fix_cppflags=yes
12743 if test "$cf_fix_cppflags" = yes ; then
12745 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12746 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12749 elif test "${cf_tst_cflags}" = "\"'" ; then
12751 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12752 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12758 case "$CPPFLAGS" in
12762 case "$cf_add_cflags" in
12764 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12766 CPPFLAGS=`echo "$CPPFLAGS" | \
12767 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12768 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12773 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12774 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12781 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12782 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12789 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12790 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12792 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12794 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12795 && test -z "${cf_tst_cflags}" \
12796 && cf_fix_cppflags=no
12801 if test -n "$cf_new_cflags" ; then
12803 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12804 CFLAGS="${CFLAGS}$cf_new_cflags"
12808 if test -n "$cf_new_cppflags" ; then
12810 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12811 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12815 if test -n "$cf_new_extra_cppflags" ; then
12817 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12818 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12822 cat >"conftest.$ac_ext" <<_ACEOF
12823 #line 12823 "configure"
12824 #include "confdefs.h"
12825 #include <sys/types.h>
12830 #ifdef _XOPEN_SOURCE
12831 #error expected _XOPEN_SOURCE to be undefined
12837 rm -f "conftest.$ac_objext"
12838 if { (eval echo "$as_me:12838: \"$ac_compile\"") >&5
12839 (eval $ac_compile) 2>&5
12841 echo "$as_me:12841: \$? = $ac_status" >&5
12842 (exit "$ac_status"); } &&
12843 { ac_try='test -s "conftest.$ac_objext"'
12844 { (eval echo "$as_me:12844: \"$ac_try\"") >&5
12845 (eval $ac_try) 2>&5
12847 echo "$as_me:12847: \$? = $ac_status" >&5
12848 (exit "$ac_status"); }; }; then
12849 cf_cv_gnu_source=no
12851 echo "$as_me: failed program was:" >&5
12852 cat "conftest.$ac_ext" >&5
12853 cf_cv_gnu_source=yes
12855 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12856 CPPFLAGS="$cf_save"
12859 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12862 echo "$as_me:12862: result: $cf_cv_gnu_source" >&5
12863 echo "${ECHO_T}$cf_cv_gnu_source" >&6
12865 if test "$cf_cv_gnu_source" = yes
12867 echo "$as_me:12867: checking if we should also define _DEFAULT_SOURCE" >&5
12868 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
12869 if test "${cf_cv_default_source+set}" = set; then
12870 echo $ECHO_N "(cached) $ECHO_C" >&6
12873 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12874 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
12876 cat >"conftest.$ac_ext" <<_ACEOF
12877 #line 12877 "configure"
12878 #include "confdefs.h"
12879 #include <sys/types.h>
12884 #ifdef _DEFAULT_SOURCE
12885 #error expected _DEFAULT_SOURCE to be undefined
12891 rm -f "conftest.$ac_objext"
12892 if { (eval echo "$as_me:12892: \"$ac_compile\"") >&5
12893 (eval $ac_compile) 2>&5
12895 echo "$as_me:12895: \$? = $ac_status" >&5
12896 (exit "$ac_status"); } &&
12897 { ac_try='test -s "conftest.$ac_objext"'
12898 { (eval echo "$as_me:12898: \"$ac_try\"") >&5
12899 (eval $ac_try) 2>&5
12901 echo "$as_me:12901: \$? = $ac_status" >&5
12902 (exit "$ac_status"); }; }; then
12903 cf_cv_default_source=no
12905 echo "$as_me: failed program was:" >&5
12906 cat "conftest.$ac_ext" >&5
12907 cf_cv_default_source=yes
12909 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12912 echo "$as_me:12912: result: $cf_cv_default_source" >&5
12913 echo "${ECHO_T}$cf_cv_default_source" >&6
12914 if test "$cf_cv_default_source" = yes
12917 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12918 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12928 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
12931 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
12934 if test "$cf_cv_posix_visible" = no; then
12936 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
12938 cf_save_CFLAGS="$CFLAGS"
12939 cf_save_CPPFLAGS="$CPPFLAGS"
12941 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
12942 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12943 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12945 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
12946 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12947 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12949 echo "$as_me:12949: checking if we should define _POSIX_C_SOURCE" >&5
12950 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
12951 if test "${cf_cv_posix_c_source+set}" = set; then
12952 echo $ECHO_N "(cached) $ECHO_C" >&6
12955 echo "${as_me:-configure}:12955: testing if the symbol is already defined go no further ..." 1>&5
12957 cat >"conftest.$ac_ext" <<_ACEOF
12958 #line 12958 "configure"
12959 #include "confdefs.h"
12960 #include <sys/types.h>
12965 #ifndef _POSIX_C_SOURCE
12972 rm -f "conftest.$ac_objext"
12973 if { (eval echo "$as_me:12973: \"$ac_compile\"") >&5
12974 (eval $ac_compile) 2>&5
12976 echo "$as_me:12976: \$? = $ac_status" >&5
12977 (exit "$ac_status"); } &&
12978 { ac_try='test -s "conftest.$ac_objext"'
12979 { (eval echo "$as_me:12979: \"$ac_try\"") >&5
12980 (eval $ac_try) 2>&5
12982 echo "$as_me:12982: \$? = $ac_status" >&5
12983 (exit "$ac_status"); }; }; then
12984 cf_cv_posix_c_source=no
12986 echo "$as_me: failed program was:" >&5
12987 cat "conftest.$ac_ext" >&5
12988 cf_want_posix_source=no
12989 case .$cf_POSIX_C_SOURCE in
12991 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12994 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12995 cf_want_posix_source=yes
12998 cf_want_posix_source=yes
13001 if test "$cf_want_posix_source" = yes ; then
13002 cat >"conftest.$ac_ext" <<_ACEOF
13003 #line 13003 "configure"
13004 #include "confdefs.h"
13005 #include <sys/types.h>
13010 #ifdef _POSIX_SOURCE
13017 rm -f "conftest.$ac_objext"
13018 if { (eval echo "$as_me:13018: \"$ac_compile\"") >&5
13019 (eval $ac_compile) 2>&5
13021 echo "$as_me:13021: \$? = $ac_status" >&5
13022 (exit "$ac_status"); } &&
13023 { ac_try='test -s "conftest.$ac_objext"'
13024 { (eval echo "$as_me:13024: \"$ac_try\"") >&5
13025 (eval $ac_try) 2>&5
13027 echo "$as_me:13027: \$? = $ac_status" >&5
13028 (exit "$ac_status"); }; }; then
13031 echo "$as_me: failed program was:" >&5
13032 cat "conftest.$ac_ext" >&5
13033 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13035 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13038 echo "${as_me:-configure}:13038: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13040 CFLAGS="$cf_trim_CFLAGS"
13041 CPPFLAGS="$cf_trim_CPPFLAGS"
13043 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13044 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13046 echo "${as_me:-configure}:13046: testing if the second compile does not leave our definition intact error ..." 1>&5
13048 cat >"conftest.$ac_ext" <<_ACEOF
13049 #line 13049 "configure"
13050 #include "confdefs.h"
13051 #include <sys/types.h>
13056 #ifndef _POSIX_C_SOURCE
13063 rm -f "conftest.$ac_objext"
13064 if { (eval echo "$as_me:13064: \"$ac_compile\"") >&5
13065 (eval $ac_compile) 2>&5
13067 echo "$as_me:13067: \$? = $ac_status" >&5
13068 (exit "$ac_status"); } &&
13069 { ac_try='test -s "conftest.$ac_objext"'
13070 { (eval echo "$as_me:13070: \"$ac_try\"") >&5
13071 (eval $ac_try) 2>&5
13073 echo "$as_me:13073: \$? = $ac_status" >&5
13074 (exit "$ac_status"); }; }; then
13077 echo "$as_me: failed program was:" >&5
13078 cat "conftest.$ac_ext" >&5
13079 cf_cv_posix_c_source=no
13081 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13082 CFLAGS="$cf_save_CFLAGS"
13083 CPPFLAGS="$cf_save_CPPFLAGS"
13086 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13089 echo "$as_me:13089: result: $cf_cv_posix_c_source" >&5
13090 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13092 if test "$cf_cv_posix_c_source" != no ; then
13093 CFLAGS="$cf_trim_CFLAGS"
13094 CPPFLAGS="$cf_trim_CPPFLAGS"
13099 cf_new_extra_cppflags=
13101 for cf_add_cflags in $cf_cv_posix_c_source
13103 case "$cf_fix_cppflags" in
13105 case "$cf_add_cflags" in
13106 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13107 case "$cf_add_cflags" in
13109 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13111 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13112 && test -z "${cf_tst_cflags}" \
13113 && cf_fix_cppflags=yes
13115 if test "$cf_fix_cppflags" = yes ; then
13117 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13118 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13121 elif test "${cf_tst_cflags}" = "\"'" ; then
13123 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13124 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13130 case "$CPPFLAGS" in
13134 case "$cf_add_cflags" in
13136 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13138 CPPFLAGS=`echo "$CPPFLAGS" | \
13139 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13140 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13145 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13146 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13153 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13154 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13161 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13162 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13164 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13166 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13167 && test -z "${cf_tst_cflags}" \
13168 && cf_fix_cppflags=no
13173 if test -n "$cf_new_cflags" ; then
13175 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13176 CFLAGS="${CFLAGS}$cf_new_cflags"
13180 if test -n "$cf_new_cppflags" ; then
13182 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13183 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13187 if test -n "$cf_new_extra_cppflags" ; then
13189 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13190 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13196 fi # cf_cv_posix_visible
13200 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
13203 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
13204 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
13205 # Abusing the conformance level is a workaround.
13206 { echo "$as_me:13206: WARNING: this system does not provide usable locale support" >&5
13207 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
13208 cf_xopen_source="-D_BSD_SOURCE"
13209 cf_XOPEN_SOURCE=700
13212 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
13213 cf_xopen_source="-D_BSD_SOURCE"
13214 cf_XOPEN_SOURCE=600
13217 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
13220 cf_xopen_source="-D_OSF_SOURCE"
13223 cf_xopen_source="-D_QNX_SOURCE"
13226 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
13229 cf_xopen_source="-D__EXTENSIONS__"
13230 cf_cv_xopen_source=broken
13232 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
13238 echo "$as_me:13238: checking if we should define _XOPEN_SOURCE" >&5
13239 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13240 if test "${cf_cv_xopen_source+set}" = set; then
13241 echo $ECHO_N "(cached) $ECHO_C" >&6
13244 cat >"conftest.$ac_ext" <<_ACEOF
13245 #line 13245 "configure"
13246 #include "confdefs.h"
13248 #include <stdlib.h>
13249 #include <string.h>
13250 #include <sys/types.h>
13256 #ifndef _XOPEN_SOURCE
13263 rm -f "conftest.$ac_objext"
13264 if { (eval echo "$as_me:13264: \"$ac_compile\"") >&5
13265 (eval $ac_compile) 2>&5
13267 echo "$as_me:13267: \$? = $ac_status" >&5
13268 (exit "$ac_status"); } &&
13269 { ac_try='test -s "conftest.$ac_objext"'
13270 { (eval echo "$as_me:13270: \"$ac_try\"") >&5
13271 (eval $ac_try) 2>&5
13273 echo "$as_me:13273: \$? = $ac_status" >&5
13274 (exit "$ac_status"); }; }; then
13275 cf_cv_xopen_source=no
13277 echo "$as_me: failed program was:" >&5
13278 cat "conftest.$ac_ext" >&5
13279 cf_save="$CPPFLAGS"
13281 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13282 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13284 cat >"conftest.$ac_ext" <<_ACEOF
13285 #line 13285 "configure"
13286 #include "confdefs.h"
13288 #include <stdlib.h>
13289 #include <string.h>
13290 #include <sys/types.h>
13296 #ifdef _XOPEN_SOURCE
13303 rm -f "conftest.$ac_objext"
13304 if { (eval echo "$as_me:13304: \"$ac_compile\"") >&5
13305 (eval $ac_compile) 2>&5
13307 echo "$as_me:13307: \$? = $ac_status" >&5
13308 (exit "$ac_status"); } &&
13309 { ac_try='test -s "conftest.$ac_objext"'
13310 { (eval echo "$as_me:13310: \"$ac_try\"") >&5
13311 (eval $ac_try) 2>&5
13313 echo "$as_me:13313: \$? = $ac_status" >&5
13314 (exit "$ac_status"); }; }; then
13315 cf_cv_xopen_source=no
13317 echo "$as_me: failed program was:" >&5
13318 cat "conftest.$ac_ext" >&5
13319 cf_cv_xopen_source=$cf_XOPEN_SOURCE
13321 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13322 CPPFLAGS="$cf_save"
13325 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13328 echo "$as_me:13328: result: $cf_cv_xopen_source" >&5
13329 echo "${ECHO_T}$cf_cv_xopen_source" >&6
13331 if test "$cf_cv_xopen_source" != no ; then
13333 CFLAGS=`echo "$CFLAGS" | \
13334 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13335 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13337 CPPFLAGS=`echo "$CPPFLAGS" | \
13338 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13339 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13341 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13343 for cf_add_cflags in $cf_temp_xopen_source
13345 case "x$cf_add_cflags" in
13348 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13351 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'`
13352 test "$CFLAGS" != "$cf_old_cflag" || break
13354 CFLAGS="$cf_old_cflag"
13357 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13360 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'`
13361 test "$CPPFLAGS" != "$cf_old_cflag" || break
13363 CPPFLAGS="$cf_old_cflag"
13372 cf_new_extra_cppflags=
13374 for cf_add_cflags in $cf_add_cflags
13376 case "$cf_fix_cppflags" in
13378 case "$cf_add_cflags" in
13379 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13380 case "$cf_add_cflags" in
13382 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13384 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13385 && test -z "${cf_tst_cflags}" \
13386 && cf_fix_cppflags=yes
13388 if test "$cf_fix_cppflags" = yes ; then
13390 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13391 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13394 elif test "${cf_tst_cflags}" = "\"'" ; then
13396 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13397 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13403 case "$CPPFLAGS" in
13407 case "$cf_add_cflags" in
13409 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13411 CPPFLAGS=`echo "$CPPFLAGS" | \
13412 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13413 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13418 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13419 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13426 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13427 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13434 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13435 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13437 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13439 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13440 && test -z "${cf_tst_cflags}" \
13441 && cf_fix_cppflags=no
13446 if test -n "$cf_new_cflags" ; then
13448 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13449 CFLAGS="${CFLAGS}$cf_new_cflags"
13453 if test -n "$cf_new_cppflags" ; then
13455 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13456 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13460 if test -n "$cf_new_extra_cppflags" ; then
13462 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13463 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13471 if test "$cf_cv_posix_visible" = no; then
13473 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
13475 cf_save_CFLAGS="$CFLAGS"
13476 cf_save_CPPFLAGS="$CPPFLAGS"
13478 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13479 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13480 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13482 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13483 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13484 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13486 echo "$as_me:13486: checking if we should define _POSIX_C_SOURCE" >&5
13487 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13488 if test "${cf_cv_posix_c_source+set}" = set; then
13489 echo $ECHO_N "(cached) $ECHO_C" >&6
13492 echo "${as_me:-configure}:13492: testing if the symbol is already defined go no further ..." 1>&5
13494 cat >"conftest.$ac_ext" <<_ACEOF
13495 #line 13495 "configure"
13496 #include "confdefs.h"
13497 #include <sys/types.h>
13502 #ifndef _POSIX_C_SOURCE
13509 rm -f "conftest.$ac_objext"
13510 if { (eval echo "$as_me:13510: \"$ac_compile\"") >&5
13511 (eval $ac_compile) 2>&5
13513 echo "$as_me:13513: \$? = $ac_status" >&5
13514 (exit "$ac_status"); } &&
13515 { ac_try='test -s "conftest.$ac_objext"'
13516 { (eval echo "$as_me:13516: \"$ac_try\"") >&5
13517 (eval $ac_try) 2>&5
13519 echo "$as_me:13519: \$? = $ac_status" >&5
13520 (exit "$ac_status"); }; }; then
13521 cf_cv_posix_c_source=no
13523 echo "$as_me: failed program was:" >&5
13524 cat "conftest.$ac_ext" >&5
13525 cf_want_posix_source=no
13526 case .$cf_POSIX_C_SOURCE in
13528 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13531 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13532 cf_want_posix_source=yes
13535 cf_want_posix_source=yes
13538 if test "$cf_want_posix_source" = yes ; then
13539 cat >"conftest.$ac_ext" <<_ACEOF
13540 #line 13540 "configure"
13541 #include "confdefs.h"
13542 #include <sys/types.h>
13547 #ifdef _POSIX_SOURCE
13554 rm -f "conftest.$ac_objext"
13555 if { (eval echo "$as_me:13555: \"$ac_compile\"") >&5
13556 (eval $ac_compile) 2>&5
13558 echo "$as_me:13558: \$? = $ac_status" >&5
13559 (exit "$ac_status"); } &&
13560 { ac_try='test -s "conftest.$ac_objext"'
13561 { (eval echo "$as_me:13561: \"$ac_try\"") >&5
13562 (eval $ac_try) 2>&5
13564 echo "$as_me:13564: \$? = $ac_status" >&5
13565 (exit "$ac_status"); }; }; then
13568 echo "$as_me: failed program was:" >&5
13569 cat "conftest.$ac_ext" >&5
13570 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13572 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13575 echo "${as_me:-configure}:13575: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13577 CFLAGS="$cf_trim_CFLAGS"
13578 CPPFLAGS="$cf_trim_CPPFLAGS"
13580 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13581 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13583 echo "${as_me:-configure}:13583: testing if the second compile does not leave our definition intact error ..." 1>&5
13585 cat >"conftest.$ac_ext" <<_ACEOF
13586 #line 13586 "configure"
13587 #include "confdefs.h"
13588 #include <sys/types.h>
13593 #ifndef _POSIX_C_SOURCE
13600 rm -f "conftest.$ac_objext"
13601 if { (eval echo "$as_me:13601: \"$ac_compile\"") >&5
13602 (eval $ac_compile) 2>&5
13604 echo "$as_me:13604: \$? = $ac_status" >&5
13605 (exit "$ac_status"); } &&
13606 { ac_try='test -s "conftest.$ac_objext"'
13607 { (eval echo "$as_me:13607: \"$ac_try\"") >&5
13608 (eval $ac_try) 2>&5
13610 echo "$as_me:13610: \$? = $ac_status" >&5
13611 (exit "$ac_status"); }; }; then
13614 echo "$as_me: failed program was:" >&5
13615 cat "conftest.$ac_ext" >&5
13616 cf_cv_posix_c_source=no
13618 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13619 CFLAGS="$cf_save_CFLAGS"
13620 CPPFLAGS="$cf_save_CPPFLAGS"
13623 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13626 echo "$as_me:13626: result: $cf_cv_posix_c_source" >&5
13627 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13629 if test "$cf_cv_posix_c_source" != no ; then
13630 CFLAGS="$cf_trim_CFLAGS"
13631 CPPFLAGS="$cf_trim_CPPFLAGS"
13636 cf_new_extra_cppflags=
13638 for cf_add_cflags in $cf_cv_posix_c_source
13640 case "$cf_fix_cppflags" in
13642 case "$cf_add_cflags" in
13643 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13644 case "$cf_add_cflags" in
13646 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13648 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13649 && test -z "${cf_tst_cflags}" \
13650 && cf_fix_cppflags=yes
13652 if test "$cf_fix_cppflags" = yes ; then
13654 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13655 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13658 elif test "${cf_tst_cflags}" = "\"'" ; then
13660 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13661 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13667 case "$CPPFLAGS" in
13671 case "$cf_add_cflags" in
13673 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13675 CPPFLAGS=`echo "$CPPFLAGS" | \
13676 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13677 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13682 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13683 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13690 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13691 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13698 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13699 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13701 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13703 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13704 && test -z "${cf_tst_cflags}" \
13705 && cf_fix_cppflags=no
13710 if test -n "$cf_new_cflags" ; then
13712 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13713 CFLAGS="${CFLAGS}$cf_new_cflags"
13717 if test -n "$cf_new_cppflags" ; then
13719 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13720 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13724 if test -n "$cf_new_extra_cppflags" ; then
13726 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13727 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13733 fi # cf_cv_posix_visible
13738 if test -n "$cf_xopen_source" ; then
13740 for cf_add_cflags in $cf_xopen_source
13742 case "x$cf_add_cflags" in
13745 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13748 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'`
13749 test "$CFLAGS" != "$cf_old_cflag" || break
13750 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
13752 echo "${as_me:-configure}:13752: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
13754 CFLAGS="$cf_old_cflag"
13757 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13760 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'`
13761 test "$CPPFLAGS" != "$cf_old_cflag" || break
13762 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
13764 echo "${as_me:-configure}:13764: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
13766 CPPFLAGS="$cf_old_cflag"
13775 cf_new_extra_cppflags=
13777 for cf_add_cflags in $cf_add_cflags
13779 case "$cf_fix_cppflags" in
13781 case "$cf_add_cflags" in
13782 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13783 case "$cf_add_cflags" in
13785 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13787 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13788 && test -z "${cf_tst_cflags}" \
13789 && cf_fix_cppflags=yes
13791 if test "$cf_fix_cppflags" = yes ; then
13793 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13794 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13797 elif test "${cf_tst_cflags}" = "\"'" ; then
13799 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13800 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13806 case "$CPPFLAGS" in
13810 case "$cf_add_cflags" in
13812 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13814 CPPFLAGS=`echo "$CPPFLAGS" | \
13815 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13816 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13821 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13822 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13829 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13830 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13837 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13838 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13840 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13842 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13843 && test -z "${cf_tst_cflags}" \
13844 && cf_fix_cppflags=no
13849 if test -n "$cf_new_cflags" ; then
13850 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13852 echo "${as_me:-configure}:13852: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13854 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13855 CFLAGS="${CFLAGS}$cf_new_cflags"
13859 if test -n "$cf_new_cppflags" ; then
13860 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13862 echo "${as_me:-configure}:13862: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13864 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13865 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13869 if test -n "$cf_new_extra_cppflags" ; then
13870 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13872 echo "${as_me:-configure}:13872: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13874 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13875 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13883 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
13884 echo "$as_me:13884: checking if _XOPEN_SOURCE really is set" >&5
13885 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
13886 cat >"conftest.$ac_ext" <<_ACEOF
13887 #line 13887 "configure"
13888 #include "confdefs.h"
13889 #include <stdlib.h>
13894 #ifndef _XOPEN_SOURCE
13901 rm -f "conftest.$ac_objext"
13902 if { (eval echo "$as_me:13902: \"$ac_compile\"") >&5
13903 (eval $ac_compile) 2>&5
13905 echo "$as_me:13905: \$? = $ac_status" >&5
13906 (exit "$ac_status"); } &&
13907 { ac_try='test -s "conftest.$ac_objext"'
13908 { (eval echo "$as_me:13908: \"$ac_try\"") >&5
13909 (eval $ac_try) 2>&5
13911 echo "$as_me:13911: \$? = $ac_status" >&5
13912 (exit "$ac_status"); }; }; then
13913 cf_XOPEN_SOURCE_set=yes
13915 echo "$as_me: failed program was:" >&5
13916 cat "conftest.$ac_ext" >&5
13917 cf_XOPEN_SOURCE_set=no
13919 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13920 echo "$as_me:13920: result: $cf_XOPEN_SOURCE_set" >&5
13921 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
13922 if test "$cf_XOPEN_SOURCE_set" = yes
13924 cat >"conftest.$ac_ext" <<_ACEOF
13925 #line 13925 "configure"
13926 #include "confdefs.h"
13927 #include <stdlib.h>
13932 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
13939 rm -f "conftest.$ac_objext"
13940 if { (eval echo "$as_me:13940: \"$ac_compile\"") >&5
13941 (eval $ac_compile) 2>&5
13943 echo "$as_me:13943: \$? = $ac_status" >&5
13944 (exit "$ac_status"); } &&
13945 { ac_try='test -s "conftest.$ac_objext"'
13946 { (eval echo "$as_me:13946: \"$ac_try\"") >&5
13947 (eval $ac_try) 2>&5
13949 echo "$as_me:13949: \$? = $ac_status" >&5
13950 (exit "$ac_status"); }; }; then
13951 cf_XOPEN_SOURCE_set_ok=yes
13953 echo "$as_me: failed program was:" >&5
13954 cat "conftest.$ac_ext" >&5
13955 cf_XOPEN_SOURCE_set_ok=no
13957 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13958 if test "$cf_XOPEN_SOURCE_set_ok" = no
13960 { echo "$as_me:13960: WARNING: _XOPEN_SOURCE is lower than requested" >&5
13961 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
13965 echo "$as_me:13965: checking if we should define _XOPEN_SOURCE" >&5
13966 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13967 if test "${cf_cv_xopen_source+set}" = set; then
13968 echo $ECHO_N "(cached) $ECHO_C" >&6
13971 cat >"conftest.$ac_ext" <<_ACEOF
13972 #line 13972 "configure"
13973 #include "confdefs.h"
13975 #include <stdlib.h>
13976 #include <string.h>
13977 #include <sys/types.h>
13983 #ifndef _XOPEN_SOURCE
13990 rm -f "conftest.$ac_objext"
13991 if { (eval echo "$as_me:13991: \"$ac_compile\"") >&5
13992 (eval $ac_compile) 2>&5
13994 echo "$as_me:13994: \$? = $ac_status" >&5
13995 (exit "$ac_status"); } &&
13996 { ac_try='test -s "conftest.$ac_objext"'
13997 { (eval echo "$as_me:13997: \"$ac_try\"") >&5
13998 (eval $ac_try) 2>&5
14000 echo "$as_me:14000: \$? = $ac_status" >&5
14001 (exit "$ac_status"); }; }; then
14002 cf_cv_xopen_source=no
14004 echo "$as_me: failed program was:" >&5
14005 cat "conftest.$ac_ext" >&5
14006 cf_save="$CPPFLAGS"
14008 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14009 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
14011 cat >"conftest.$ac_ext" <<_ACEOF
14012 #line 14012 "configure"
14013 #include "confdefs.h"
14015 #include <stdlib.h>
14016 #include <string.h>
14017 #include <sys/types.h>
14023 #ifdef _XOPEN_SOURCE
14030 rm -f "conftest.$ac_objext"
14031 if { (eval echo "$as_me:14031: \"$ac_compile\"") >&5
14032 (eval $ac_compile) 2>&5
14034 echo "$as_me:14034: \$? = $ac_status" >&5
14035 (exit "$ac_status"); } &&
14036 { ac_try='test -s "conftest.$ac_objext"'
14037 { (eval echo "$as_me:14037: \"$ac_try\"") >&5
14038 (eval $ac_try) 2>&5
14040 echo "$as_me:14040: \$? = $ac_status" >&5
14041 (exit "$ac_status"); }; }; then
14042 cf_cv_xopen_source=no
14044 echo "$as_me: failed program was:" >&5
14045 cat "conftest.$ac_ext" >&5
14046 cf_cv_xopen_source=$cf_XOPEN_SOURCE
14048 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14049 CPPFLAGS="$cf_save"
14052 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14055 echo "$as_me:14055: result: $cf_cv_xopen_source" >&5
14056 echo "${ECHO_T}$cf_cv_xopen_source" >&6
14058 if test "$cf_cv_xopen_source" != no ; then
14060 CFLAGS=`echo "$CFLAGS" | \
14061 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14062 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14064 CPPFLAGS=`echo "$CPPFLAGS" | \
14065 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14066 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14068 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
14070 for cf_add_cflags in $cf_temp_xopen_source
14072 case "x$cf_add_cflags" in
14075 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14078 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'`
14079 test "$CFLAGS" != "$cf_old_cflag" || break
14081 CFLAGS="$cf_old_cflag"
14084 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14087 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'`
14088 test "$CPPFLAGS" != "$cf_old_cflag" || break
14090 CPPFLAGS="$cf_old_cflag"
14099 cf_new_extra_cppflags=
14101 for cf_add_cflags in $cf_add_cflags
14103 case "$cf_fix_cppflags" in
14105 case "$cf_add_cflags" in
14106 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14107 case "$cf_add_cflags" in
14109 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14111 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14112 && test -z "${cf_tst_cflags}" \
14113 && cf_fix_cppflags=yes
14115 if test "$cf_fix_cppflags" = yes ; then
14117 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14118 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14121 elif test "${cf_tst_cflags}" = "\"'" ; then
14123 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14124 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14130 case "$CPPFLAGS" in
14134 case "$cf_add_cflags" in
14136 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14138 CPPFLAGS=`echo "$CPPFLAGS" | \
14139 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14140 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14145 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14146 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14153 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14154 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14161 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14162 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14164 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14166 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14167 && test -z "${cf_tst_cflags}" \
14168 && cf_fix_cppflags=no
14173 if test -n "$cf_new_cflags" ; then
14175 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14176 CFLAGS="${CFLAGS}$cf_new_cflags"
14180 if test -n "$cf_new_cppflags" ; then
14182 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14183 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14187 if test -n "$cf_new_extra_cppflags" ; then
14189 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14190 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14200 fi # cf_cv_posix_visible
14202 # Check whether --enable-largefile or --disable-largefile was given.
14203 if test "${enable_largefile+set}" = set; then
14204 enableval="$enable_largefile"
14207 if test "$enable_largefile" != no; then
14209 echo "$as_me:14209: checking for special C compiler options needed for large files" >&5
14210 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
14211 if test "${ac_cv_sys_largefile_CC+set}" = set; then
14212 echo $ECHO_N "(cached) $ECHO_C" >&6
14214 ac_cv_sys_largefile_CC=no
14215 if test "$GCC" != yes; then
14218 # IRIX 6.2 and later do not support large files by default,
14219 # so use the C compiler's -n32 option if that helps.
14220 cat >"conftest.$ac_ext" <<_ACEOF
14221 #line 14221 "configure"
14222 #include "confdefs.h"
14223 #include <sys/types.h>
14224 /* Check that off_t can represent 2**63 - 1 correctly.
14225 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14226 since some C++ compilers masquerading as C compilers
14227 incorrectly reject 9223372036854775807. */
14228 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14229 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14230 && LARGE_OFF_T % 2147483647 == 1)
14240 rm -f "conftest.$ac_objext"
14241 if { (eval echo "$as_me:14241: \"$ac_compile\"") >&5
14242 (eval $ac_compile) 2>&5
14244 echo "$as_me:14244: \$? = $ac_status" >&5
14245 (exit "$ac_status"); } &&
14246 { ac_try='test -s "conftest.$ac_objext"'
14247 { (eval echo "$as_me:14247: \"$ac_try\"") >&5
14248 (eval $ac_try) 2>&5
14250 echo "$as_me:14250: \$? = $ac_status" >&5
14251 (exit "$ac_status"); }; }; then
14254 echo "$as_me: failed program was:" >&5
14255 cat "conftest.$ac_ext" >&5
14257 rm -f "conftest.$ac_objext"
14259 rm -f "conftest.$ac_objext"
14260 if { (eval echo "$as_me:14260: \"$ac_compile\"") >&5
14261 (eval $ac_compile) 2>&5
14263 echo "$as_me:14263: \$? = $ac_status" >&5
14264 (exit "$ac_status"); } &&
14265 { ac_try='test -s "conftest.$ac_objext"'
14266 { (eval echo "$as_me:14266: \"$ac_try\"") >&5
14267 (eval $ac_try) 2>&5
14269 echo "$as_me:14269: \$? = $ac_status" >&5
14270 (exit "$ac_status"); }; }; then
14271 ac_cv_sys_largefile_CC=' -n32'; break
14273 echo "$as_me: failed program was:" >&5
14274 cat "conftest.$ac_ext" >&5
14276 rm -f "conftest.$ac_objext"
14280 rm -f "conftest.$ac_ext"
14283 echo "$as_me:14283: result: $ac_cv_sys_largefile_CC" >&5
14284 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
14285 if test "$ac_cv_sys_largefile_CC" != no; then
14286 CC=$CC$ac_cv_sys_largefile_CC
14289 echo "$as_me:14289: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14290 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
14291 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
14292 echo $ECHO_N "(cached) $ECHO_C" >&6
14295 ac_cv_sys_file_offset_bits=no
14296 cat >"conftest.$ac_ext" <<_ACEOF
14297 #line 14297 "configure"
14298 #include "confdefs.h"
14299 #include <sys/types.h>
14300 /* Check that off_t can represent 2**63 - 1 correctly.
14301 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14302 since some C++ compilers masquerading as C compilers
14303 incorrectly reject 9223372036854775807. */
14304 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14305 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14306 && LARGE_OFF_T % 2147483647 == 1)
14316 rm -f "conftest.$ac_objext"
14317 if { (eval echo "$as_me:14317: \"$ac_compile\"") >&5
14318 (eval $ac_compile) 2>&5
14320 echo "$as_me:14320: \$? = $ac_status" >&5
14321 (exit "$ac_status"); } &&
14322 { ac_try='test -s "conftest.$ac_objext"'
14323 { (eval echo "$as_me:14323: \"$ac_try\"") >&5
14324 (eval $ac_try) 2>&5
14326 echo "$as_me:14326: \$? = $ac_status" >&5
14327 (exit "$ac_status"); }; }; then
14330 echo "$as_me: failed program was:" >&5
14331 cat "conftest.$ac_ext" >&5
14333 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14334 cat >"conftest.$ac_ext" <<_ACEOF
14335 #line 14335 "configure"
14336 #include "confdefs.h"
14337 #define _FILE_OFFSET_BITS 64
14338 #include <sys/types.h>
14339 /* Check that off_t can represent 2**63 - 1 correctly.
14340 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14341 since some C++ compilers masquerading as C compilers
14342 incorrectly reject 9223372036854775807. */
14343 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14344 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14345 && LARGE_OFF_T % 2147483647 == 1)
14355 rm -f "conftest.$ac_objext"
14356 if { (eval echo "$as_me:14356: \"$ac_compile\"") >&5
14357 (eval $ac_compile) 2>&5
14359 echo "$as_me:14359: \$? = $ac_status" >&5
14360 (exit "$ac_status"); } &&
14361 { ac_try='test -s "conftest.$ac_objext"'
14362 { (eval echo "$as_me:14362: \"$ac_try\"") >&5
14363 (eval $ac_try) 2>&5
14365 echo "$as_me:14365: \$? = $ac_status" >&5
14366 (exit "$ac_status"); }; }; then
14367 ac_cv_sys_file_offset_bits=64; break
14369 echo "$as_me: failed program was:" >&5
14370 cat "conftest.$ac_ext" >&5
14372 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14376 echo "$as_me:14376: result: $ac_cv_sys_file_offset_bits" >&5
14377 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14378 if test "$ac_cv_sys_file_offset_bits" != no; then
14380 cat >>confdefs.h <<EOF
14381 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14386 echo "$as_me:14386: checking for _LARGE_FILES value needed for large files" >&5
14387 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14388 if test "${ac_cv_sys_large_files+set}" = set; then
14389 echo $ECHO_N "(cached) $ECHO_C" >&6
14392 ac_cv_sys_large_files=no
14393 cat >"conftest.$ac_ext" <<_ACEOF
14394 #line 14394 "configure"
14395 #include "confdefs.h"
14396 #include <sys/types.h>
14397 /* Check that off_t can represent 2**63 - 1 correctly.
14398 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14399 since some C++ compilers masquerading as C compilers
14400 incorrectly reject 9223372036854775807. */
14401 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14402 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14403 && LARGE_OFF_T % 2147483647 == 1)
14413 rm -f "conftest.$ac_objext"
14414 if { (eval echo "$as_me:14414: \"$ac_compile\"") >&5
14415 (eval $ac_compile) 2>&5
14417 echo "$as_me:14417: \$? = $ac_status" >&5
14418 (exit "$ac_status"); } &&
14419 { ac_try='test -s "conftest.$ac_objext"'
14420 { (eval echo "$as_me:14420: \"$ac_try\"") >&5
14421 (eval $ac_try) 2>&5
14423 echo "$as_me:14423: \$? = $ac_status" >&5
14424 (exit "$ac_status"); }; }; then
14427 echo "$as_me: failed program was:" >&5
14428 cat "conftest.$ac_ext" >&5
14430 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14431 cat >"conftest.$ac_ext" <<_ACEOF
14432 #line 14432 "configure"
14433 #include "confdefs.h"
14434 #define _LARGE_FILES 1
14435 #include <sys/types.h>
14436 /* Check that off_t can represent 2**63 - 1 correctly.
14437 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14438 since some C++ compilers masquerading as C compilers
14439 incorrectly reject 9223372036854775807. */
14440 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14441 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14442 && LARGE_OFF_T % 2147483647 == 1)
14452 rm -f "conftest.$ac_objext"
14453 if { (eval echo "$as_me:14453: \"$ac_compile\"") >&5
14454 (eval $ac_compile) 2>&5
14456 echo "$as_me:14456: \$? = $ac_status" >&5
14457 (exit "$ac_status"); } &&
14458 { ac_try='test -s "conftest.$ac_objext"'
14459 { (eval echo "$as_me:14459: \"$ac_try\"") >&5
14460 (eval $ac_try) 2>&5
14462 echo "$as_me:14462: \$? = $ac_status" >&5
14463 (exit "$ac_status"); }; }; then
14464 ac_cv_sys_large_files=1; break
14466 echo "$as_me: failed program was:" >&5
14467 cat "conftest.$ac_ext" >&5
14469 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14473 echo "$as_me:14473: result: $ac_cv_sys_large_files" >&5
14474 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14475 if test "$ac_cv_sys_large_files" != no; then
14477 cat >>confdefs.h <<EOF
14478 #define _LARGE_FILES $ac_cv_sys_large_files
14485 if test "$enable_largefile" != no ; then
14486 echo "$as_me:14486: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14487 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14488 if test "${ac_cv_sys_largefile_source+set}" = set; then
14489 echo $ECHO_N "(cached) $ECHO_C" >&6
14492 ac_cv_sys_largefile_source=no
14493 cat >"conftest.$ac_ext" <<_ACEOF
14494 #line 14494 "configure"
14495 #include "confdefs.h"
14505 rm -f "conftest.$ac_objext"
14506 if { (eval echo "$as_me:14506: \"$ac_compile\"") >&5
14507 (eval $ac_compile) 2>&5
14509 echo "$as_me:14509: \$? = $ac_status" >&5
14510 (exit "$ac_status"); } &&
14511 { ac_try='test -s "conftest.$ac_objext"'
14512 { (eval echo "$as_me:14512: \"$ac_try\"") >&5
14513 (eval $ac_try) 2>&5
14515 echo "$as_me:14515: \$? = $ac_status" >&5
14516 (exit "$ac_status"); }; }; then
14519 echo "$as_me: failed program was:" >&5
14520 cat "conftest.$ac_ext" >&5
14522 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14523 cat >"conftest.$ac_ext" <<_ACEOF
14524 #line 14524 "configure"
14525 #include "confdefs.h"
14526 #define _LARGEFILE_SOURCE 1
14536 rm -f "conftest.$ac_objext"
14537 if { (eval echo "$as_me:14537: \"$ac_compile\"") >&5
14538 (eval $ac_compile) 2>&5
14540 echo "$as_me:14540: \$? = $ac_status" >&5
14541 (exit "$ac_status"); } &&
14542 { ac_try='test -s "conftest.$ac_objext"'
14543 { (eval echo "$as_me:14543: \"$ac_try\"") >&5
14544 (eval $ac_try) 2>&5
14546 echo "$as_me:14546: \$? = $ac_status" >&5
14547 (exit "$ac_status"); }; }; then
14548 ac_cv_sys_largefile_source=1; break
14550 echo "$as_me: failed program was:" >&5
14551 cat "conftest.$ac_ext" >&5
14553 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14557 echo "$as_me:14557: result: $ac_cv_sys_largefile_source" >&5
14558 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14559 if test "$ac_cv_sys_largefile_source" != no; then
14561 cat >>confdefs.h <<EOF
14562 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14568 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14569 # in glibc 2.1.3, but that breaks too many other things.
14570 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14571 echo "$as_me:14571: checking for fseeko" >&5
14572 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14573 if test "${ac_cv_func_fseeko+set}" = set; then
14574 echo $ECHO_N "(cached) $ECHO_C" >&6
14576 cat >"conftest.$ac_ext" <<_ACEOF
14577 #line 14577 "configure"
14578 #include "confdefs.h"
14583 return fseeko && fseeko (stdin, 0, 0);
14588 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14589 if { (eval echo "$as_me:14589: \"$ac_link\"") >&5
14590 (eval $ac_link) 2>&5
14592 echo "$as_me:14592: \$? = $ac_status" >&5
14593 (exit "$ac_status"); } &&
14594 { ac_try='test -s "conftest$ac_exeext"'
14595 { (eval echo "$as_me:14595: \"$ac_try\"") >&5
14596 (eval $ac_try) 2>&5
14598 echo "$as_me:14598: \$? = $ac_status" >&5
14599 (exit "$ac_status"); }; }; then
14600 ac_cv_func_fseeko=yes
14602 echo "$as_me: failed program was:" >&5
14603 cat "conftest.$ac_ext" >&5
14604 ac_cv_func_fseeko=no
14606 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14608 echo "$as_me:14608: result: $ac_cv_func_fseeko" >&5
14609 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14610 if test $ac_cv_func_fseeko = yes; then
14612 cat >>confdefs.h <<\EOF
14613 #define HAVE_FSEEKO 1
14618 # Normally we would collect these definitions in the config.h,
14619 # but (like _XOPEN_SOURCE), some environments rely on having these
14620 # defined before any of the system headers are included. Another
14621 # case comes up with C++, e.g., on AIX the compiler compiles the
14622 # header files by themselves before looking at the body files it is
14623 # told to compile. For ncurses, those header files do not include
14625 if test "$ac_cv_sys_large_files" != no
14628 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14629 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14632 if test "$ac_cv_sys_largefile_source" != no
14635 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14636 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14639 if test "$ac_cv_sys_file_offset_bits" != no
14642 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14643 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14647 echo "$as_me:14647: checking whether to use struct dirent64" >&5
14648 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14649 if test "${cf_cv_struct_dirent64+set}" = set; then
14650 echo $ECHO_N "(cached) $ECHO_C" >&6
14653 cat >"conftest.$ac_ext" <<_ACEOF
14654 #line 14654 "configure"
14655 #include "confdefs.h"
14657 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14658 #include <sys/types.h>
14659 #include <dirent.h>
14665 /* if transitional largefile support is setup, this is true */
14666 extern struct dirent64 * readdir(DIR *);
14667 struct dirent64 *x = readdir((DIR *)0);
14668 struct dirent *y = readdir((DIR *)0);
14676 rm -f "conftest.$ac_objext"
14677 if { (eval echo "$as_me:14677: \"$ac_compile\"") >&5
14678 (eval $ac_compile) 2>&5
14680 echo "$as_me:14680: \$? = $ac_status" >&5
14681 (exit "$ac_status"); } &&
14682 { ac_try='test -s "conftest.$ac_objext"'
14683 { (eval echo "$as_me:14683: \"$ac_try\"") >&5
14684 (eval $ac_try) 2>&5
14686 echo "$as_me:14686: \$? = $ac_status" >&5
14687 (exit "$ac_status"); }; }; then
14688 cf_cv_struct_dirent64=yes
14690 echo "$as_me: failed program was:" >&5
14691 cat "conftest.$ac_ext" >&5
14692 cf_cv_struct_dirent64=no
14694 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14697 echo "$as_me:14697: result: $cf_cv_struct_dirent64" >&5
14698 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14699 test "$cf_cv_struct_dirent64" = yes &&
14700 cat >>confdefs.h <<\EOF
14701 #define HAVE_STRUCT_DIRENT64 1
14706 ### Enable compiling-in rcs id's
14707 echo "$as_me:14707: checking if RCS identifiers should be compiled-in" >&5
14708 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14710 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14711 if test "${with_rcs_ids+set}" = set; then
14712 withval="$with_rcs_ids"
14713 with_rcs_ids=$withval
14717 echo "$as_me:14717: result: $with_rcs_ids" >&5
14718 echo "${ECHO_T}$with_rcs_ids" >&6
14719 test "$with_rcs_ids" = yes &&
14720 cat >>confdefs.h <<\EOF
14721 #define USE_RCS_IDS 1
14724 ###############################################################################
14726 ### Note that some functions (such as const) are normally disabled anyway.
14727 echo "$as_me:14727: checking if you want to build with function extensions" >&5
14728 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14730 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14731 if test "${enable_ext_funcs+set}" = set; then
14732 enableval="$enable_ext_funcs"
14733 with_ext_funcs=$enableval
14737 echo "$as_me:14737: result: $with_ext_funcs" >&5
14738 echo "${ECHO_T}$with_ext_funcs" >&6
14739 if test "$with_ext_funcs" = yes ; then
14740 NCURSES_EXT_FUNCS=1
14742 cat >>confdefs.h <<\EOF
14743 #define HAVE_USE_DEFAULT_COLORS 1
14746 cat >>confdefs.h <<\EOF
14747 #define NCURSES_EXT_FUNCS 1
14751 NCURSES_EXT_FUNCS=0
14754 ### use option --enable-const to turn on use of const beyond that in XSI.
14755 echo "$as_me:14755: checking for extended use of const keyword" >&5
14756 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14758 # Check whether --enable-const or --disable-const was given.
14759 if test "${enable_const+set}" = set; then
14760 enableval="$enable_const"
14761 with_ext_const=$enableval
14765 echo "$as_me:14765: result: $with_ext_const" >&5
14766 echo "${ECHO_T}$with_ext_const" >&6
14767 NCURSES_CONST='/*nothing*/'
14768 if test "$with_ext_const" = yes ; then
14769 NCURSES_CONST=const
14772 ###############################################################################
14773 # These options are relatively safe to experiment with.
14775 echo "$as_me:14775: checking if you want all development code" >&5
14776 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14778 # Check whether --with-develop or --without-develop was given.
14779 if test "${with_develop+set}" = set; then
14780 withval="$with_develop"
14781 with_develop=$withval
14785 echo "$as_me:14785: result: $with_develop" >&5
14786 echo "${ECHO_T}$with_develop" >&6
14788 ###############################################################################
14789 # These are just experimental, probably should not be in a package:
14791 # This is still experimental (20080329), but should ultimately be moved to
14792 # the script-block --with-normal, etc.
14794 echo "$as_me:14794: checking if you want to link with the pthread library" >&5
14795 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14797 # Check whether --with-pthread or --without-pthread was given.
14798 if test "${with_pthread+set}" = set; then
14799 withval="$with_pthread"
14800 with_pthread=$withval
14804 echo "$as_me:14804: result: $with_pthread" >&5
14805 echo "${ECHO_T}$with_pthread" >&6
14807 if test "$with_pthread" != no ; then
14808 echo "$as_me:14808: checking for pthread.h" >&5
14809 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14810 if test "${ac_cv_header_pthread_h+set}" = set; then
14811 echo $ECHO_N "(cached) $ECHO_C" >&6
14813 cat >"conftest.$ac_ext" <<_ACEOF
14814 #line 14814 "configure"
14815 #include "confdefs.h"
14816 #include <pthread.h>
14818 if { (eval echo "$as_me:14818: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14819 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14821 $EGREP -v '^ *\+' conftest.er1 >conftest.err
14823 cat conftest.err >&5
14824 echo "$as_me:14824: \$? = $ac_status" >&5
14825 (exit "$ac_status"); } >/dev/null; then
14826 if test -s conftest.err; then
14827 ac_cpp_err=$ac_c_preproc_warn_flag
14834 if test -z "$ac_cpp_err"; then
14835 ac_cv_header_pthread_h=yes
14837 echo "$as_me: failed program was:" >&5
14838 cat "conftest.$ac_ext" >&5
14839 ac_cv_header_pthread_h=no
14841 rm -f conftest.err "conftest.$ac_ext"
14843 echo "$as_me:14843: result: $ac_cv_header_pthread_h" >&5
14844 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14845 if test "$ac_cv_header_pthread_h" = yes; then
14847 cat >>confdefs.h <<\EOF
14848 #define HAVE_PTHREADS_H 1
14851 for cf_lib_pthread in pthread c_r
14853 echo "$as_me:14853: checking if we can link with the $cf_lib_pthread library" >&5
14854 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14855 cf_save_LIBS="$LIBS"
14857 cf_add_libs="$LIBS"
14860 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14861 # filter duplicates
14862 for cf_add_1lib in $cf_add_0lib; do
14863 for cf_add_2lib in $cf_add_libs; do
14864 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14869 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14871 LIBS="$cf_add_libs"
14873 cat >"conftest.$ac_ext" <<_ACEOF
14874 #line 14874 "configure"
14875 #include "confdefs.h"
14877 #include <pthread.h>
14883 int rc = pthread_create(0,0,0,0);
14884 int r2 = pthread_mutexattr_settype(0, 0);
14890 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14891 if { (eval echo "$as_me:14891: \"$ac_link\"") >&5
14892 (eval $ac_link) 2>&5
14894 echo "$as_me:14894: \$? = $ac_status" >&5
14895 (exit "$ac_status"); } &&
14896 { ac_try='test -s "conftest$ac_exeext"'
14897 { (eval echo "$as_me:14897: \"$ac_try\"") >&5
14898 (eval $ac_try) 2>&5
14900 echo "$as_me:14900: \$? = $ac_status" >&5
14901 (exit "$ac_status"); }; }; then
14904 echo "$as_me: failed program was:" >&5
14905 cat "conftest.$ac_ext" >&5
14908 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14909 LIBS="$cf_save_LIBS"
14910 echo "$as_me:14910: result: $with_pthread" >&5
14911 echo "${ECHO_T}$with_pthread" >&6
14912 test "$with_pthread" = yes && break
14915 if test "$with_pthread" = yes ; then
14917 cf_add_libs="$LIBS"
14920 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14921 # filter duplicates
14922 for cf_add_1lib in $cf_add_0lib; do
14923 for cf_add_2lib in $cf_add_libs; do
14924 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14929 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14931 LIBS="$cf_add_libs"
14933 cat >>confdefs.h <<\EOF
14934 #define HAVE_LIBPTHREADS 1
14938 { { echo "$as_me:14938: error: Cannot link with pthread library" >&5
14939 echo "$as_me: error: Cannot link with pthread library" >&2;}
14940 { (exit 1); exit 1; }; }
14947 echo "$as_me:14947: checking if you want to use weak-symbols for pthreads" >&5
14948 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14950 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14951 if test "${enable_weak_symbols+set}" = set; then
14952 enableval="$enable_weak_symbols"
14953 use_weak_symbols=$withval
14955 use_weak_symbols=no
14957 echo "$as_me:14957: result: $use_weak_symbols" >&5
14958 echo "${ECHO_T}$use_weak_symbols" >&6
14959 if test "$use_weak_symbols" = yes ; then
14961 echo "$as_me:14961: checking if $CC supports weak symbols" >&5
14962 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14963 if test "${cf_cv_weak_symbols+set}" = set; then
14964 echo $ECHO_N "(cached) $ECHO_C" >&6
14967 cat >"conftest.$ac_ext" <<_ACEOF
14968 #line 14968 "configure"
14969 #include "confdefs.h"
14976 #if defined(__GNUC__)
14977 # if defined __USE_ISOC99
14978 # define _cat_pragma(exp) _Pragma(#exp)
14979 # define _weak_pragma(exp) _cat_pragma(weak name)
14981 # define _weak_pragma(exp)
14983 # define _declare(name) __extension__ extern __typeof__(name) name
14984 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
14987 weak_symbol(fopen);
14993 rm -f "conftest.$ac_objext"
14994 if { (eval echo "$as_me:14994: \"$ac_compile\"") >&5
14995 (eval $ac_compile) 2>&5
14997 echo "$as_me:14997: \$? = $ac_status" >&5
14998 (exit "$ac_status"); } &&
14999 { ac_try='test -s "conftest.$ac_objext"'
15000 { (eval echo "$as_me:15000: \"$ac_try\"") >&5
15001 (eval $ac_try) 2>&5
15003 echo "$as_me:15003: \$? = $ac_status" >&5
15004 (exit "$ac_status"); }; }; then
15005 cf_cv_weak_symbols=yes
15007 echo "$as_me: failed program was:" >&5
15008 cat "conftest.$ac_ext" >&5
15009 cf_cv_weak_symbols=no
15011 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15014 echo "$as_me:15014: result: $cf_cv_weak_symbols" >&5
15015 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15018 cf_cv_weak_symbols=no
15021 if test $cf_cv_weak_symbols = yes ; then
15023 cat >>confdefs.h <<\EOF
15024 #define USE_WEAK_SYMBOLS 1
15030 if test "$with_pthread" = "yes" ; then
15032 cat >>confdefs.h <<\EOF
15033 #define USE_PTHREADS 1
15036 enable_reentrant=yes
15037 if test $cf_cv_weak_symbols = yes ; then
15042 # OpenSUSE is installing ncurses6, using reentrant option.
15043 echo "$as_me:15043: checking for _nc_TABSIZE" >&5
15044 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
15045 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
15046 echo $ECHO_N "(cached) $ECHO_C" >&6
15048 cat >"conftest.$ac_ext" <<_ACEOF
15049 #line 15049 "configure"
15050 #include "confdefs.h"
15051 #define _nc_TABSIZE autoconf_temporary
15052 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15059 /* We use char because int might match the return type of a gcc2
15060 builtin and then its argument prototype would still apply. */
15061 char _nc_TABSIZE (void);
15067 /* The GNU C library defines stubs for functions which it implements
15068 to always fail with ENOSYS. Some functions are actually named
15069 something starting with __ and the normal name is an alias. */
15070 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
15071 #error found stub for _nc_TABSIZE
15074 return _nc_TABSIZE ();
15079 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15080 if { (eval echo "$as_me:15080: \"$ac_link\"") >&5
15081 (eval $ac_link) 2>&5
15083 echo "$as_me:15083: \$? = $ac_status" >&5
15084 (exit "$ac_status"); } &&
15085 { ac_try='test -s "conftest$ac_exeext"'
15086 { (eval echo "$as_me:15086: \"$ac_try\"") >&5
15087 (eval $ac_try) 2>&5
15089 echo "$as_me:15089: \$? = $ac_status" >&5
15090 (exit "$ac_status"); }; }; then
15091 ac_cv_func__nc_TABSIZE=yes
15093 echo "$as_me: failed program was:" >&5
15094 cat "conftest.$ac_ext" >&5
15095 ac_cv_func__nc_TABSIZE=no
15097 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15099 echo "$as_me:15099: result: $ac_cv_func__nc_TABSIZE" >&5
15100 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
15101 if test "$ac_cv_func__nc_TABSIZE" = yes; then
15102 assume_reentrant=yes
15104 assume_reentrant=no
15107 # Reentrant code has to be opaque; there's little advantage to making ncurses
15108 # opaque outside of that, so there is no --enable-opaque option. We can use
15109 # this option without --with-pthreads, but this will be always set for
15111 echo "$as_me:15111: checking if you want experimental reentrant code" >&5
15112 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
15114 # Check whether --enable-reentrant or --disable-reentrant was given.
15115 if test "${enable_reentrant+set}" = set; then
15116 enableval="$enable_reentrant"
15117 with_reentrant=$enableval
15119 with_reentrant=$assume_reentrant
15121 echo "$as_me:15121: result: $with_reentrant" >&5
15122 echo "${ECHO_T}$with_reentrant" >&6
15123 if test "$with_reentrant" = yes ; then
15124 cf_cv_enable_reentrant=1
15125 if test $cf_cv_weak_symbols = yes ; then
15127 # remove pthread library from $LIBS
15128 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
15130 elif test "$assume_reentrant" = no ; then
15131 LIB_SUFFIX="t${LIB_SUFFIX}"
15134 cat >>confdefs.h <<\EOF
15135 #define USE_REENTRANT 1
15139 cf_cv_enable_reentrant=0
15142 ### Allow using a different wrap-prefix
15143 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15144 echo "$as_me:15144: checking for prefix used to wrap public variables" >&5
15145 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15147 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15148 if test "${with_wrap_prefix+set}" = set; then
15149 withval="$with_wrap_prefix"
15150 NCURSES_WRAP_PREFIX=$withval
15152 NCURSES_WRAP_PREFIX=_nc_
15154 echo "$as_me:15154: result: $NCURSES_WRAP_PREFIX" >&5
15155 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15157 NCURSES_WRAP_PREFIX=_nc_
15160 cat >>confdefs.h <<EOF
15161 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15164 ###############################################################################
15166 ### use option --disable-echo to suppress full display compiling commands
15168 echo "$as_me:15168: checking if you want to see long compiling messages" >&5
15169 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15171 # Check whether --enable-echo or --disable-echo was given.
15172 if test "${enable_echo+set}" = set; then
15173 enableval="$enable_echo"
15174 test "$enableval" != no && enableval=yes
15175 if test "$enableval" != "yes" ; then
15178 ECHO_LD='@echo linking $@;'
15179 RULE_CC='@echo compiling $<'
15180 SHOW_CC='@echo compiling $@'
15202 echo "$as_me:15202: result: $enableval" >&5
15203 echo "${ECHO_T}$enableval" >&6
15205 echo "$as_me:15205: checking if you want to use C11 _Noreturn feature" >&5
15206 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
15208 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
15209 if test "${enable_stdnoreturn+set}" = set; then
15210 enableval="$enable_stdnoreturn"
15211 test "$enableval" != yes && enableval=no
15212 if test "$enableval" != "no" ; then
15213 enable_stdnoreturn=yes
15215 enable_stdnoreturn=no
15219 enable_stdnoreturn=no
15222 echo "$as_me:15222: result: $enable_stdnoreturn" >&5
15223 echo "${ECHO_T}$enable_stdnoreturn" >&6
15225 if test $enable_stdnoreturn = yes; then
15226 echo "$as_me:15226: checking for C11 _Noreturn feature" >&5
15227 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
15228 if test "${cf_cv_c11_noreturn+set}" = set; then
15229 echo $ECHO_N "(cached) $ECHO_C" >&6
15231 cat >"conftest.$ac_ext" <<_ACEOF
15232 #line 15232 "configure"
15233 #include "confdefs.h"
15236 #include <stdlib.h>
15237 #include <stdnoreturn.h>
15238 static _Noreturn void giveup(void) { exit(0); }
15243 if (feof(stdin)) giveup()
15248 rm -f "conftest.$ac_objext"
15249 if { (eval echo "$as_me:15249: \"$ac_compile\"") >&5
15250 (eval $ac_compile) 2>&5
15252 echo "$as_me:15252: \$? = $ac_status" >&5
15253 (exit "$ac_status"); } &&
15254 { ac_try='test -s "conftest.$ac_objext"'
15255 { (eval echo "$as_me:15255: \"$ac_try\"") >&5
15256 (eval $ac_try) 2>&5
15258 echo "$as_me:15258: \$? = $ac_status" >&5
15259 (exit "$ac_status"); }; }; then
15260 cf_cv_c11_noreturn=yes
15262 echo "$as_me: failed program was:" >&5
15263 cat "conftest.$ac_ext" >&5
15264 cf_cv_c11_noreturn=no
15266 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15269 echo "$as_me:15269: result: $cf_cv_c11_noreturn" >&5
15270 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
15272 cf_cv_c11_noreturn=no,
15275 if test "$cf_cv_c11_noreturn" = yes; then
15277 cat >>confdefs.h <<\EOF
15278 #define HAVE_STDNORETURN_H 1
15281 cat >>confdefs.h <<EOF
15282 #define STDC_NORETURN _Noreturn
15285 HAVE_STDNORETURN_H=1
15287 HAVE_STDNORETURN_H=0
15290 if test "$GCC" = yes || test "$GXX" = yes
15293 if test "$GCC" = yes || test "$GXX" = yes
15298 for cf_temp_scan in $CFLAGS
15300 case "x$cf_temp_scan" in
15303 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15304 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15309 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15310 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15315 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15316 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15321 if test "x$CFLAGS" != "x$cf_temp_flags"
15323 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
15325 echo "${as_me:-configure}:15325: testing repairing CFLAGS: $CFLAGS ..." 1>&5
15327 CFLAGS="$cf_temp_flags"
15328 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
15330 echo "${as_me:-configure}:15330: testing ... fixed $CFLAGS ..." 1>&5
15332 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15334 echo "${as_me:-configure}:15334: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15341 if test "$GCC" = yes || test "$GXX" = yes
15346 for cf_temp_scan in $CPPFLAGS
15348 case "x$cf_temp_scan" in
15351 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15352 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15357 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15358 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15363 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15364 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15369 if test "x$CPPFLAGS" != "x$cf_temp_flags"
15371 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
15373 echo "${as_me:-configure}:15373: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
15375 CPPFLAGS="$cf_temp_flags"
15376 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
15378 echo "${as_me:-configure}:15378: testing ... fixed $CPPFLAGS ..." 1>&5
15380 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15382 echo "${as_me:-configure}:15382: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15389 if test "$GCC" = yes || test "$GXX" = yes
15394 for cf_temp_scan in $LDFLAGS
15396 case "x$cf_temp_scan" in
15399 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15400 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15405 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15406 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15411 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15412 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15417 if test "x$LDFLAGS" != "x$cf_temp_flags"
15419 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
15421 echo "${as_me:-configure}:15421: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
15423 LDFLAGS="$cf_temp_flags"
15424 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
15426 echo "${as_me:-configure}:15426: testing ... fixed $LDFLAGS ..." 1>&5
15428 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15430 echo "${as_me:-configure}:15430: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15437 echo "$as_me:15437: checking if you want to turn on gcc warnings" >&5
15438 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
15440 # Check whether --enable-warnings or --disable-warnings was given.
15441 if test "${enable_warnings+set}" = set; then
15442 enableval="$enable_warnings"
15443 test "$enableval" != yes && enableval=no
15444 if test "$enableval" != "no" ; then
15445 enable_warnings=yes
15454 echo "$as_me:15454: result: $enable_warnings" >&5
15455 echo "${ECHO_T}$enable_warnings" >&6
15456 if test "$enable_warnings" = "yes"
15459 if test "x$have_x" = xyes; then
15461 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15462 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15463 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15464 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15465 for cf_X_CFLAGS in $X_CFLAGS
15467 case "x$cf_X_CFLAGS" in
15469 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15472 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15477 cat >"conftest.$ac_ext" <<_ACEOF
15478 #line 15478 "configure"
15479 #include "confdefs.h"
15481 #include <stdlib.h>
15482 #include <X11/Intrinsic.h>
15487 String foo = malloc(1); free((void*)foo)
15492 rm -f "conftest.$ac_objext"
15493 if { (eval echo "$as_me:15493: \"$ac_compile\"") >&5
15494 (eval $ac_compile) 2>&5
15496 echo "$as_me:15496: \$? = $ac_status" >&5
15497 (exit "$ac_status"); } &&
15498 { ac_try='test -s "conftest.$ac_objext"'
15499 { (eval echo "$as_me:15499: \"$ac_try\"") >&5
15500 (eval $ac_try) 2>&5
15502 echo "$as_me:15502: \$? = $ac_status" >&5
15503 (exit "$ac_status"); }; }; then
15505 echo "$as_me:15505: checking for X11/Xt const-feature" >&5
15506 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15507 if test "${cf_cv_const_x_string+set}" = set; then
15508 echo $ECHO_N "(cached) $ECHO_C" >&6
15511 cat >"conftest.$ac_ext" <<_ACEOF
15512 #line 15512 "configure"
15513 #include "confdefs.h"
15515 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15516 #undef XTSTRINGDEFINES /* X11R5 and later */
15517 #include <stdlib.h>
15518 #include <X11/Intrinsic.h>
15523 String foo = malloc(1); *foo = 0
15528 rm -f "conftest.$ac_objext"
15529 if { (eval echo "$as_me:15529: \"$ac_compile\"") >&5
15530 (eval $ac_compile) 2>&5
15532 echo "$as_me:15532: \$? = $ac_status" >&5
15533 (exit "$ac_status"); } &&
15534 { ac_try='test -s "conftest.$ac_objext"'
15535 { (eval echo "$as_me:15535: \"$ac_try\"") >&5
15536 (eval $ac_try) 2>&5
15538 echo "$as_me:15538: \$? = $ac_status" >&5
15539 (exit "$ac_status"); }; }; then
15541 cf_cv_const_x_string=no
15544 echo "$as_me: failed program was:" >&5
15545 cat "conftest.$ac_ext" >&5
15547 cf_cv_const_x_string=yes
15550 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15553 echo "$as_me:15553: result: $cf_cv_const_x_string" >&5
15554 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15556 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
15557 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
15558 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
15560 case "$cf_cv_const_x_string" in
15563 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15564 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15569 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15570 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15576 echo "$as_me: failed program was:" >&5
15577 cat "conftest.$ac_ext" >&5
15579 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15581 cat > "conftest.$ac_ext" <<EOF
15582 #line 15582 "${as_me:-configure}"
15583 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15585 if test "$INTEL_COMPILER" = yes
15587 # The "-wdXXX" options suppress warnings:
15588 # remark #1419: external declaration in primary source file
15589 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15590 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15591 # remark #193: zero used for undefined preprocessing identifier
15592 # remark #593: variable "curs_sb_left_arrow" was set but never used
15593 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15594 # remark #869: parameter "tw" was never referenced
15595 # remark #981: operands are evaluated in unspecified order
15596 # warning #279: controlling expression is constant
15598 { echo "$as_me:15598: checking for $CC warning options..." >&5
15599 echo "$as_me: checking for $CC warning options..." >&6;}
15600 cf_save_CFLAGS="$CFLAGS"
15601 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
15613 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15614 if { (eval echo "$as_me:15614: \"$ac_compile\"") >&5
15615 (eval $ac_compile) 2>&5
15617 echo "$as_me:15617: \$? = $ac_status" >&5
15618 (exit "$ac_status"); }; then
15619 test -n "$verbose" && echo "$as_me:15619: result: ... -$cf_opt" >&5
15620 echo "${ECHO_T}... -$cf_opt" >&6
15621 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15624 CFLAGS="$cf_save_CFLAGS"
15625 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
15627 { echo "$as_me:15627: checking for $CC warning options..." >&5
15628 echo "$as_me: checking for $CC warning options..." >&6;}
15629 cf_save_CFLAGS="$CFLAGS"
15631 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15632 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15633 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15634 for cf_opt in W Wall \
15635 Wbad-function-cast \
15638 Wdeclaration-after-statement \
15641 Wmissing-declarations \
15642 Wmissing-prototypes \
15646 Wstrict-prototypes \
15647 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15649 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15650 if { (eval echo "$as_me:15650: \"$ac_compile\"") >&5
15651 (eval $ac_compile) 2>&5
15653 echo "$as_me:15653: \$? = $ac_status" >&5
15654 (exit "$ac_status"); }; then
15655 test -n "$verbose" && echo "$as_me:15655: result: ... -$cf_opt" >&5
15656 echo "${ECHO_T}... -$cf_opt" >&6
15659 case "$GCC_VERSION" in
15661 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15663 echo "${as_me:-configure}:15663: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15669 case "$GCC_VERSION" in
15671 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15673 echo "${as_me:-configure}:15673: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15679 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15682 CFLAGS="$cf_save_CFLAGS"
15688 if test "$GCC" = yes || test "$GXX" = yes
15690 cat > conftest.i <<EOF
15692 #define GCC_PRINTF 0
15695 #define GCC_SCANF 0
15697 #ifndef GCC_NORETURN
15698 #define GCC_NORETURN /* nothing */
15701 #define GCC_UNUSED /* nothing */
15704 if test "$GCC" = yes
15706 { echo "$as_me:15706: checking for $CC __attribute__ directives..." >&5
15707 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15708 cat > "conftest.$ac_ext" <<EOF
15709 #line 15709 "${as_me:-configure}"
15710 #include "confdefs.h"
15711 #include "conftest.h"
15712 #include "conftest.i"
15714 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15716 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15719 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
15721 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
15723 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15724 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
15725 extern GCC_NORETURN void foo(void);
15726 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
15728 cf_printf_attribute=no
15729 cf_scanf_attribute=no
15730 for cf_attribute in scanf printf unused noreturn
15733 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15735 cf_directive="__attribute__(($cf_attribute))"
15736 echo "checking for $CC $cf_directive" 1>&5
15738 case "$cf_attribute" in
15740 cf_printf_attribute=yes
15741 cat >conftest.h <<EOF
15742 #define GCC_$cf_ATTRIBUTE 1
15746 cf_scanf_attribute=yes
15747 cat >conftest.h <<EOF
15748 #define GCC_$cf_ATTRIBUTE 1
15752 cat >conftest.h <<EOF
15753 #define GCC_$cf_ATTRIBUTE $cf_directive
15758 if { (eval echo "$as_me:15758: \"$ac_compile\"") >&5
15759 (eval $ac_compile) 2>&5
15761 echo "$as_me:15761: \$? = $ac_status" >&5
15762 (exit "$ac_status"); }; then
15763 test -n "$verbose" && echo "$as_me:15763: result: ... $cf_attribute" >&5
15764 echo "${ECHO_T}... $cf_attribute" >&6
15765 cat conftest.h >>confdefs.h
15766 case "$cf_attribute" in
15769 cat >>confdefs.h <<EOF
15770 #define GCC_NORETURN $cf_directive
15775 cf_value='/* nothing */'
15776 if test "$cf_printf_attribute" != no ; then
15777 cf_value='__attribute__((format(printf,fmt,var)))'
15779 cat >>confdefs.h <<\EOF
15780 #define GCC_PRINTF 1
15785 cat >>confdefs.h <<EOF
15786 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15791 cf_value='/* nothing */'
15792 if test "$cf_scanf_attribute" != no ; then
15793 cf_value='__attribute__((format(scanf,fmt,var)))'
15795 cat >>confdefs.h <<\EOF
15796 #define GCC_SCANF 1
15801 cat >>confdefs.h <<EOF
15802 #define GCC_SCANFLIKE(fmt,var) $cf_value
15808 cat >>confdefs.h <<EOF
15809 #define GCC_UNUSED $cf_directive
15817 ${FGREP-fgrep} define conftest.i >>confdefs.h
15824 if test "x$enable_warnings" = "xyes"; then
15826 ADAFLAGS="$ADAFLAGS -gnatg"
15830 ### use option --enable-assertions to turn on generation of assertion code
15831 echo "$as_me:15831: checking if you want to enable runtime assertions" >&5
15832 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15834 # Check whether --enable-assertions or --disable-assertions was given.
15835 if test "${enable_assertions+set}" = set; then
15836 enableval="$enable_assertions"
15837 with_assertions=$enableval
15841 echo "$as_me:15841: result: $with_assertions" >&5
15842 echo "${ECHO_T}$with_assertions" >&6
15845 if test "$with_assertions" = no
15847 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15850 ADAFLAGS="$ADAFLAGS -gnata"
15855 ### use option --disable-leaks to suppress "permanent" leaks, for testing
15857 cat >>confdefs.h <<\EOF
15858 #define HAVE_NC_ALLOC_H 1
15861 ### use option --enable-expanded to generate certain macros as functions
15863 # Check whether --enable-expanded or --disable-expanded was given.
15864 if test "${enable_expanded+set}" = set; then
15865 enableval="$enable_expanded"
15866 test "$enableval" = yes &&
15867 cat >>confdefs.h <<\EOF
15868 #define NCURSES_EXPANDED 1
15873 ### use option --disable-macros to suppress macros in favor of functions
15875 # Check whether --enable-macros or --disable-macros was given.
15876 if test "${enable_macros+set}" = set; then
15877 enableval="$enable_macros"
15878 test "$enableval" = no &&
15879 cat >>confdefs.h <<\EOF
15880 #define NCURSES_NOMACROS 1
15885 # Normally we only add trace() to the debug-library. Allow this to be
15886 # extended to all models of the ncurses library:
15888 case "$CFLAGS $CPPFLAGS" in
15894 echo "$as_me:15894: checking whether to add trace feature to all models" >&5
15895 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
15897 # Check whether --with-trace or --without-trace was given.
15898 if test "${with_trace+set}" = set; then
15899 withval="$with_trace"
15900 cf_with_trace=$withval
15902 cf_with_trace=$cf_all_traces
15904 echo "$as_me:15904: result: $cf_with_trace" >&5
15905 echo "${ECHO_T}$cf_with_trace" >&6
15907 if test "$cf_with_trace" = yes ; then
15913 cf_new_extra_cppflags=
15915 for cf_add_cflags in -DTRACE
15917 case "$cf_fix_cppflags" in
15919 case "$cf_add_cflags" in
15920 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15921 case "$cf_add_cflags" in
15923 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15925 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15926 && test -z "${cf_tst_cflags}" \
15927 && cf_fix_cppflags=yes
15929 if test "$cf_fix_cppflags" = yes ; then
15931 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15932 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15935 elif test "${cf_tst_cflags}" = "\"'" ; then
15937 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15938 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15944 case "$CPPFLAGS" in
15948 case "$cf_add_cflags" in
15950 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15952 CPPFLAGS=`echo "$CPPFLAGS" | \
15953 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15954 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15959 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15960 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15967 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15968 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15975 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15976 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15978 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15980 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15981 && test -z "${cf_tst_cflags}" \
15982 && cf_fix_cppflags=no
15987 if test -n "$cf_new_cflags" ; then
15989 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15990 CFLAGS="${CFLAGS}$cf_new_cflags"
15994 if test -n "$cf_new_cppflags" ; then
15996 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15997 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16001 if test -n "$cf_new_extra_cppflags" ; then
16003 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16004 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16012 echo "$as_me:16012: checking if we want to use GNAT projects" >&5
16013 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
16015 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
16016 if test "${enable_gnat_projects+set}" = set; then
16017 enableval="$enable_gnat_projects"
16018 test "$enableval" != no && enableval=yes
16019 if test "$enableval" != "yes" ; then
16020 enable_gnat_projects=no
16022 enable_gnat_projects=yes
16026 enable_gnat_projects=yes
16029 echo "$as_me:16029: result: $enable_gnat_projects" >&5
16030 echo "${ECHO_T}$enable_gnat_projects" >&6
16032 ### Checks for libraries.
16033 case $cf_cv_system_name in
16036 echo "$as_me:16036: checking if ssp library is needed" >&5
16037 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
16038 if test "${cf_cv_need_libssp+set}" = set; then
16039 echo $ECHO_N "(cached) $ECHO_C" >&6
16042 cat >"conftest.$ac_ext" <<_ACEOF
16043 #line 16043 "configure"
16044 #include "confdefs.h"
16046 #include <sys/types.h>
16047 #include <dirent.h>
16053 DIR *dp = opendir(".");
16059 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16060 if { (eval echo "$as_me:16060: \"$ac_link\"") >&5
16061 (eval $ac_link) 2>&5
16063 echo "$as_me:16063: \$? = $ac_status" >&5
16064 (exit "$ac_status"); } &&
16065 { ac_try='test -s "conftest$ac_exeext"'
16066 { (eval echo "$as_me:16066: \"$ac_try\"") >&5
16067 (eval $ac_try) 2>&5
16069 echo "$as_me:16069: \$? = $ac_status" >&5
16070 (exit "$ac_status"); }; }; then
16071 cf_cv_need_libssp=no
16073 echo "$as_me: failed program was:" >&5
16074 cat "conftest.$ac_ext" >&5
16076 cf_save_LIBS="$LIBS"
16078 cat >"conftest.$ac_ext" <<_ACEOF
16079 #line 16079 "configure"
16080 #include "confdefs.h"
16082 #include <sys/types.h>
16083 #include <dirent.h>
16089 DIR *dp = opendir(".");
16095 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16096 if { (eval echo "$as_me:16096: \"$ac_link\"") >&5
16097 (eval $ac_link) 2>&5
16099 echo "$as_me:16099: \$? = $ac_status" >&5
16100 (exit "$ac_status"); } &&
16101 { ac_try='test -s "conftest$ac_exeext"'
16102 { (eval echo "$as_me:16102: \"$ac_try\"") >&5
16103 (eval $ac_try) 2>&5
16105 echo "$as_me:16105: \$? = $ac_status" >&5
16106 (exit "$ac_status"); }; }; then
16107 cf_cv_need_libssp=yes
16109 echo "$as_me: failed program was:" >&5
16110 cat "conftest.$ac_ext" >&5
16111 cf_cv_need_libssp=maybe
16113 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16114 LIBS="$cf_save_LIBS"
16117 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16119 echo "$as_me:16119: result: $cf_cv_need_libssp" >&5
16120 echo "${ECHO_T}$cf_cv_need_libssp" >&6
16122 if test "x$cf_cv_need_libssp" = xyes
16125 cf_add_libs="$LIBS"
16128 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16129 # filter duplicates
16130 for cf_add_1lib in $cf_add_0lib; do
16131 for cf_add_2lib in $cf_add_libs; do
16132 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16137 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16139 LIBS="$cf_add_libs"
16145 echo "$as_me:16145: checking for gettimeofday" >&5
16146 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
16147 if test "${ac_cv_func_gettimeofday+set}" = set; then
16148 echo $ECHO_N "(cached) $ECHO_C" >&6
16150 cat >"conftest.$ac_ext" <<_ACEOF
16151 #line 16151 "configure"
16152 #include "confdefs.h"
16153 #define gettimeofday autoconf_temporary
16154 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16155 #undef gettimeofday
16161 /* We use char because int might match the return type of a gcc2
16162 builtin and then its argument prototype would still apply. */
16163 char gettimeofday (void);
16169 /* The GNU C library defines stubs for functions which it implements
16170 to always fail with ENOSYS. Some functions are actually named
16171 something starting with __ and the normal name is an alias. */
16172 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16173 #error found stub for gettimeofday
16176 return gettimeofday ();
16181 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16182 if { (eval echo "$as_me:16182: \"$ac_link\"") >&5
16183 (eval $ac_link) 2>&5
16185 echo "$as_me:16185: \$? = $ac_status" >&5
16186 (exit "$ac_status"); } &&
16187 { ac_try='test -s "conftest$ac_exeext"'
16188 { (eval echo "$as_me:16188: \"$ac_try\"") >&5
16189 (eval $ac_try) 2>&5
16191 echo "$as_me:16191: \$? = $ac_status" >&5
16192 (exit "$ac_status"); }; }; then
16193 ac_cv_func_gettimeofday=yes
16195 echo "$as_me: failed program was:" >&5
16196 cat "conftest.$ac_ext" >&5
16197 ac_cv_func_gettimeofday=no
16199 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16201 echo "$as_me:16201: result: $ac_cv_func_gettimeofday" >&5
16202 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16203 if test "$ac_cv_func_gettimeofday" = yes; then
16204 cat >>confdefs.h <<\EOF
16205 #define HAVE_GETTIMEOFDAY 1
16210 echo "$as_me:16210: checking for gettimeofday in -lbsd" >&5
16211 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
16212 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
16213 echo $ECHO_N "(cached) $ECHO_C" >&6
16215 ac_check_lib_save_LIBS=$LIBS
16217 cat >"conftest.$ac_ext" <<_ACEOF
16218 #line 16218 "configure"
16219 #include "confdefs.h"
16221 /* Override any gcc2 internal prototype to avoid an error. */
16225 /* We use char because int might match the return type of a gcc2
16226 builtin and then its argument prototype would still apply. */
16227 char gettimeofday ();
16236 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16237 if { (eval echo "$as_me:16237: \"$ac_link\"") >&5
16238 (eval $ac_link) 2>&5
16240 echo "$as_me:16240: \$? = $ac_status" >&5
16241 (exit "$ac_status"); } &&
16242 { ac_try='test -s "conftest$ac_exeext"'
16243 { (eval echo "$as_me:16243: \"$ac_try\"") >&5
16244 (eval $ac_try) 2>&5
16246 echo "$as_me:16246: \$? = $ac_status" >&5
16247 (exit "$ac_status"); }; }; then
16248 ac_cv_lib_bsd_gettimeofday=yes
16250 echo "$as_me: failed program was:" >&5
16251 cat "conftest.$ac_ext" >&5
16252 ac_cv_lib_bsd_gettimeofday=no
16254 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16255 LIBS=$ac_check_lib_save_LIBS
16257 echo "$as_me:16257: result: $ac_cv_lib_bsd_gettimeofday" >&5
16258 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
16259 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
16261 cat >>confdefs.h <<\EOF
16262 #define HAVE_GETTIMEOFDAY 1
16272 ### Checks for header files.
16273 echo "$as_me:16273: checking for ANSI C header files" >&5
16274 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16275 if test "${ac_cv_header_stdc+set}" = set; then
16276 echo $ECHO_N "(cached) $ECHO_C" >&6
16278 cat >"conftest.$ac_ext" <<_ACEOF
16279 #line 16279 "configure"
16280 #include "confdefs.h"
16281 #include <stdlib.h>
16282 #include <stdarg.h>
16283 #include <string.h>
16287 if { (eval echo "$as_me:16287: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16288 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16290 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16292 cat conftest.err >&5
16293 echo "$as_me:16293: \$? = $ac_status" >&5
16294 (exit "$ac_status"); } >/dev/null; then
16295 if test -s conftest.err; then
16296 ac_cpp_err=$ac_c_preproc_warn_flag
16303 if test -z "$ac_cpp_err"; then
16304 ac_cv_header_stdc=yes
16306 echo "$as_me: failed program was:" >&5
16307 cat "conftest.$ac_ext" >&5
16308 ac_cv_header_stdc=no
16310 rm -f conftest.err "conftest.$ac_ext"
16312 if test $ac_cv_header_stdc = yes; then
16313 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16314 cat >"conftest.$ac_ext" <<_ACEOF
16315 #line 16315 "configure"
16316 #include "confdefs.h"
16317 #include <string.h>
16320 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16321 $EGREP "memchr" >/dev/null 2>&1; then
16324 ac_cv_header_stdc=no
16330 if test $ac_cv_header_stdc = yes; then
16331 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16332 cat >"conftest.$ac_ext" <<_ACEOF
16333 #line 16333 "configure"
16334 #include "confdefs.h"
16335 #include <stdlib.h>
16338 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16339 $EGREP "free" >/dev/null 2>&1; then
16342 ac_cv_header_stdc=no
16348 if test $ac_cv_header_stdc = yes; then
16349 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16350 if test "$cross_compiling" = yes; then
16353 cat >"conftest.$ac_ext" <<_ACEOF
16354 #line 16354 "configure"
16355 #include "confdefs.h"
16357 #if ((' ' & 0x0FF) == 0x020)
16358 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16359 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16361 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16362 || ('j' <= (c) && (c) <= 'r') \
16363 || ('s' <= (c) && (c) <= 'z'))
16364 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16367 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16372 for (i = 0; i < 256; i++)
16373 if (XOR (islower (i), ISLOWER (i))
16374 || toupper (i) != TOUPPER (i))
16375 $ac_main_return(2);
16376 $ac_main_return (0);
16379 rm -f "conftest$ac_exeext"
16380 if { (eval echo "$as_me:16380: \"$ac_link\"") >&5
16381 (eval $ac_link) 2>&5
16383 echo "$as_me:16383: \$? = $ac_status" >&5
16384 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16385 { (eval echo "$as_me:16385: \"$ac_try\"") >&5
16386 (eval $ac_try) 2>&5
16388 echo "$as_me:16388: \$? = $ac_status" >&5
16389 (exit "$ac_status"); }; }; then
16392 echo "$as_me: program exited with status $ac_status" >&5
16393 echo "$as_me: failed program was:" >&5
16394 cat "conftest.$ac_ext" >&5
16395 ac_cv_header_stdc=no
16397 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16401 echo "$as_me:16401: result: $ac_cv_header_stdc" >&5
16402 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16403 if test $ac_cv_header_stdc = yes; then
16405 cat >>confdefs.h <<\EOF
16406 #define STDC_HEADERS 1
16411 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
16413 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
16414 inttypes.h stdint.h unistd.h
16416 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16417 echo "$as_me:16417: checking for $ac_header" >&5
16418 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16419 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16420 echo $ECHO_N "(cached) $ECHO_C" >&6
16422 cat >"conftest.$ac_ext" <<_ACEOF
16423 #line 16423 "configure"
16424 #include "confdefs.h"
16425 $ac_includes_default
16426 #include <$ac_header>
16428 rm -f "conftest.$ac_objext"
16429 if { (eval echo "$as_me:16429: \"$ac_compile\"") >&5
16430 (eval $ac_compile) 2>&5
16432 echo "$as_me:16432: \$? = $ac_status" >&5
16433 (exit "$ac_status"); } &&
16434 { ac_try='test -s "conftest.$ac_objext"'
16435 { (eval echo "$as_me:16435: \"$ac_try\"") >&5
16436 (eval $ac_try) 2>&5
16438 echo "$as_me:16438: \$? = $ac_status" >&5
16439 (exit "$ac_status"); }; }; then
16440 eval "$as_ac_Header=yes"
16442 echo "$as_me: failed program was:" >&5
16443 cat "conftest.$ac_ext" >&5
16444 eval "$as_ac_Header=no"
16446 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16448 echo "$as_me:16448: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16449 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16450 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16451 cat >>confdefs.h <<EOF
16452 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16458 echo "$as_me:16458: checking for signed char" >&5
16459 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
16460 if test "${ac_cv_type_signed_char+set}" = set; then
16461 echo $ECHO_N "(cached) $ECHO_C" >&6
16463 cat >"conftest.$ac_ext" <<_ACEOF
16464 #line 16464 "configure"
16465 #include "confdefs.h"
16466 $ac_includes_default
16470 if ((signed char *) 0)
16472 if (sizeof (signed char))
16478 rm -f "conftest.$ac_objext"
16479 if { (eval echo "$as_me:16479: \"$ac_compile\"") >&5
16480 (eval $ac_compile) 2>&5
16482 echo "$as_me:16482: \$? = $ac_status" >&5
16483 (exit "$ac_status"); } &&
16484 { ac_try='test -s "conftest.$ac_objext"'
16485 { (eval echo "$as_me:16485: \"$ac_try\"") >&5
16486 (eval $ac_try) 2>&5
16488 echo "$as_me:16488: \$? = $ac_status" >&5
16489 (exit "$ac_status"); }; }; then
16490 ac_cv_type_signed_char=yes
16492 echo "$as_me: failed program was:" >&5
16493 cat "conftest.$ac_ext" >&5
16494 ac_cv_type_signed_char=no
16496 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16498 echo "$as_me:16498: result: $ac_cv_type_signed_char" >&5
16499 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
16501 echo "$as_me:16501: checking size of signed char" >&5
16502 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
16503 if test "${ac_cv_sizeof_signed_char+set}" = set; then
16504 echo $ECHO_N "(cached) $ECHO_C" >&6
16506 if test "$ac_cv_type_signed_char" = yes; then
16507 if test "$cross_compiling" = yes; then
16508 # Depending upon the size, compute the lo and hi bounds.
16509 cat >"conftest.$ac_ext" <<_ACEOF
16510 #line 16510 "configure"
16511 #include "confdefs.h"
16512 $ac_includes_default
16516 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
16521 rm -f "conftest.$ac_objext"
16522 if { (eval echo "$as_me:16522: \"$ac_compile\"") >&5
16523 (eval $ac_compile) 2>&5
16525 echo "$as_me:16525: \$? = $ac_status" >&5
16526 (exit "$ac_status"); } &&
16527 { ac_try='test -s "conftest.$ac_objext"'
16528 { (eval echo "$as_me:16528: \"$ac_try\"") >&5
16529 (eval $ac_try) 2>&5
16531 echo "$as_me:16531: \$? = $ac_status" >&5
16532 (exit "$ac_status"); }; }; then
16535 cat >"conftest.$ac_ext" <<_ACEOF
16536 #line 16536 "configure"
16537 #include "confdefs.h"
16538 $ac_includes_default
16542 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16547 rm -f "conftest.$ac_objext"
16548 if { (eval echo "$as_me:16548: \"$ac_compile\"") >&5
16549 (eval $ac_compile) 2>&5
16551 echo "$as_me:16551: \$? = $ac_status" >&5
16552 (exit "$ac_status"); } &&
16553 { ac_try='test -s "conftest.$ac_objext"'
16554 { (eval echo "$as_me:16554: \"$ac_try\"") >&5
16555 (eval $ac_try) 2>&5
16557 echo "$as_me:16557: \$? = $ac_status" >&5
16558 (exit "$ac_status"); }; }; then
16559 ac_hi=$ac_mid; break
16561 echo "$as_me: failed program was:" >&5
16562 cat "conftest.$ac_ext" >&5
16563 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
16565 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16568 echo "$as_me: failed program was:" >&5
16569 cat "conftest.$ac_ext" >&5
16572 cat >"conftest.$ac_ext" <<_ACEOF
16573 #line 16573 "configure"
16574 #include "confdefs.h"
16575 $ac_includes_default
16579 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
16584 rm -f "conftest.$ac_objext"
16585 if { (eval echo "$as_me:16585: \"$ac_compile\"") >&5
16586 (eval $ac_compile) 2>&5
16588 echo "$as_me:16588: \$? = $ac_status" >&5
16589 (exit "$ac_status"); } &&
16590 { ac_try='test -s "conftest.$ac_objext"'
16591 { (eval echo "$as_me:16591: \"$ac_try\"") >&5
16592 (eval $ac_try) 2>&5
16594 echo "$as_me:16594: \$? = $ac_status" >&5
16595 (exit "$ac_status"); }; }; then
16596 ac_lo=$ac_mid; break
16598 echo "$as_me: failed program was:" >&5
16599 cat "conftest.$ac_ext" >&5
16600 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
16602 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16605 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16606 # Binary search between lo and hi bounds.
16607 while test "x$ac_lo" != "x$ac_hi"; do
16608 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
16609 cat >"conftest.$ac_ext" <<_ACEOF
16610 #line 16610 "configure"
16611 #include "confdefs.h"
16612 $ac_includes_default
16616 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16621 rm -f "conftest.$ac_objext"
16622 if { (eval echo "$as_me:16622: \"$ac_compile\"") >&5
16623 (eval $ac_compile) 2>&5
16625 echo "$as_me:16625: \$? = $ac_status" >&5
16626 (exit "$ac_status"); } &&
16627 { ac_try='test -s "conftest.$ac_objext"'
16628 { (eval echo "$as_me:16628: \"$ac_try\"") >&5
16629 (eval $ac_try) 2>&5
16631 echo "$as_me:16631: \$? = $ac_status" >&5
16632 (exit "$ac_status"); }; }; then
16635 echo "$as_me: failed program was:" >&5
16636 cat "conftest.$ac_ext" >&5
16637 ac_lo=`expr "$ac_mid" + 1`
16639 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16641 ac_cv_sizeof_signed_char=$ac_lo
16643 if test "$cross_compiling" = yes; then
16644 { { echo "$as_me:16644: error: cannot run test program while cross compiling" >&5
16645 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16646 { (exit 1); exit 1; }; }
16648 cat >"conftest.$ac_ext" <<_ACEOF
16649 #line 16649 "configure"
16650 #include "confdefs.h"
16651 $ac_includes_default
16655 FILE *f = fopen ("conftest.val", "w");
16657 $ac_main_return (1);
16658 fprintf (f, "%ld", (long)(sizeof (signed char)));
16664 rm -f "conftest$ac_exeext"
16665 if { (eval echo "$as_me:16665: \"$ac_link\"") >&5
16666 (eval $ac_link) 2>&5
16668 echo "$as_me:16668: \$? = $ac_status" >&5
16669 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16670 { (eval echo "$as_me:16670: \"$ac_try\"") >&5
16671 (eval $ac_try) 2>&5
16673 echo "$as_me:16673: \$? = $ac_status" >&5
16674 (exit "$ac_status"); }; }; then
16675 ac_cv_sizeof_signed_char=`cat conftest.val`
16677 echo "$as_me: program exited with status $ac_status" >&5
16678 echo "$as_me: failed program was:" >&5
16679 cat "conftest.$ac_ext" >&5
16681 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16686 ac_cv_sizeof_signed_char=0
16689 echo "$as_me:16689: result: $ac_cv_sizeof_signed_char" >&5
16690 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
16691 cat >>confdefs.h <<EOF
16692 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
16695 echo "$as_me:16695: checking for ANSI C header files" >&5
16696 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16697 if test "${ac_cv_header_stdc+set}" = set; then
16698 echo $ECHO_N "(cached) $ECHO_C" >&6
16700 cat >"conftest.$ac_ext" <<_ACEOF
16701 #line 16701 "configure"
16702 #include "confdefs.h"
16703 #include <stdlib.h>
16704 #include <stdarg.h>
16705 #include <string.h>
16709 if { (eval echo "$as_me:16709: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16710 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16712 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16714 cat conftest.err >&5
16715 echo "$as_me:16715: \$? = $ac_status" >&5
16716 (exit "$ac_status"); } >/dev/null; then
16717 if test -s conftest.err; then
16718 ac_cpp_err=$ac_c_preproc_warn_flag
16725 if test -z "$ac_cpp_err"; then
16726 ac_cv_header_stdc=yes
16728 echo "$as_me: failed program was:" >&5
16729 cat "conftest.$ac_ext" >&5
16730 ac_cv_header_stdc=no
16732 rm -f conftest.err "conftest.$ac_ext"
16734 if test $ac_cv_header_stdc = yes; then
16735 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16736 cat >"conftest.$ac_ext" <<_ACEOF
16737 #line 16737 "configure"
16738 #include "confdefs.h"
16739 #include <string.h>
16742 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16743 $EGREP "memchr" >/dev/null 2>&1; then
16746 ac_cv_header_stdc=no
16752 if test $ac_cv_header_stdc = yes; then
16753 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16754 cat >"conftest.$ac_ext" <<_ACEOF
16755 #line 16755 "configure"
16756 #include "confdefs.h"
16757 #include <stdlib.h>
16760 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16761 $EGREP "free" >/dev/null 2>&1; then
16764 ac_cv_header_stdc=no
16770 if test $ac_cv_header_stdc = yes; then
16771 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16772 if test "$cross_compiling" = yes; then
16775 cat >"conftest.$ac_ext" <<_ACEOF
16776 #line 16776 "configure"
16777 #include "confdefs.h"
16779 #if ((' ' & 0x0FF) == 0x020)
16780 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16781 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16783 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16784 || ('j' <= (c) && (c) <= 'r') \
16785 || ('s' <= (c) && (c) <= 'z'))
16786 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16789 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16794 for (i = 0; i < 256; i++)
16795 if (XOR (islower (i), ISLOWER (i))
16796 || toupper (i) != TOUPPER (i))
16797 $ac_main_return(2);
16798 $ac_main_return (0);
16801 rm -f "conftest$ac_exeext"
16802 if { (eval echo "$as_me:16802: \"$ac_link\"") >&5
16803 (eval $ac_link) 2>&5
16805 echo "$as_me:16805: \$? = $ac_status" >&5
16806 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16807 { (eval echo "$as_me:16807: \"$ac_try\"") >&5
16808 (eval $ac_try) 2>&5
16810 echo "$as_me:16810: \$? = $ac_status" >&5
16811 (exit "$ac_status"); }; }; then
16814 echo "$as_me: program exited with status $ac_status" >&5
16815 echo "$as_me: failed program was:" >&5
16816 cat "conftest.$ac_ext" >&5
16817 ac_cv_header_stdc=no
16819 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16823 echo "$as_me:16823: result: $ac_cv_header_stdc" >&5
16824 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16825 if test $ac_cv_header_stdc = yes; then
16827 cat >>confdefs.h <<\EOF
16828 #define STDC_HEADERS 1
16833 ac_header_dirent=no
16834 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16835 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16836 echo "$as_me:16836: checking for $ac_hdr that defines DIR" >&5
16837 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16838 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16839 echo $ECHO_N "(cached) $ECHO_C" >&6
16841 cat >"conftest.$ac_ext" <<_ACEOF
16842 #line 16842 "configure"
16843 #include "confdefs.h"
16844 #include <sys/types.h>
16856 rm -f "conftest.$ac_objext"
16857 if { (eval echo "$as_me:16857: \"$ac_compile\"") >&5
16858 (eval $ac_compile) 2>&5
16860 echo "$as_me:16860: \$? = $ac_status" >&5
16861 (exit "$ac_status"); } &&
16862 { ac_try='test -s "conftest.$ac_objext"'
16863 { (eval echo "$as_me:16863: \"$ac_try\"") >&5
16864 (eval $ac_try) 2>&5
16866 echo "$as_me:16866: \$? = $ac_status" >&5
16867 (exit "$ac_status"); }; }; then
16868 eval "$as_ac_Header=yes"
16870 echo "$as_me: failed program was:" >&5
16871 cat "conftest.$ac_ext" >&5
16872 eval "$as_ac_Header=no"
16874 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16876 echo "$as_me:16876: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16877 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16878 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16879 cat >>confdefs.h <<EOF
16880 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16883 ac_header_dirent=$ac_hdr; break
16887 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
16888 if test $ac_header_dirent = dirent.h; then
16889 echo "$as_me:16889: checking for opendir in -ldir" >&5
16890 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
16891 if test "${ac_cv_lib_dir_opendir+set}" = set; then
16892 echo $ECHO_N "(cached) $ECHO_C" >&6
16894 ac_check_lib_save_LIBS=$LIBS
16896 cat >"conftest.$ac_ext" <<_ACEOF
16897 #line 16897 "configure"
16898 #include "confdefs.h"
16900 /* Override any gcc2 internal prototype to avoid an error. */
16904 /* We use char because int might match the return type of a gcc2
16905 builtin and then its argument prototype would still apply. */
16915 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16916 if { (eval echo "$as_me:16916: \"$ac_link\"") >&5
16917 (eval $ac_link) 2>&5
16919 echo "$as_me:16919: \$? = $ac_status" >&5
16920 (exit "$ac_status"); } &&
16921 { ac_try='test -s "conftest$ac_exeext"'
16922 { (eval echo "$as_me:16922: \"$ac_try\"") >&5
16923 (eval $ac_try) 2>&5
16925 echo "$as_me:16925: \$? = $ac_status" >&5
16926 (exit "$ac_status"); }; }; then
16927 ac_cv_lib_dir_opendir=yes
16929 echo "$as_me: failed program was:" >&5
16930 cat "conftest.$ac_ext" >&5
16931 ac_cv_lib_dir_opendir=no
16933 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16934 LIBS=$ac_check_lib_save_LIBS
16936 echo "$as_me:16936: result: $ac_cv_lib_dir_opendir" >&5
16937 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
16938 if test "$ac_cv_lib_dir_opendir" = yes; then
16943 echo "$as_me:16943: checking for opendir in -lx" >&5
16944 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
16945 if test "${ac_cv_lib_x_opendir+set}" = set; then
16946 echo $ECHO_N "(cached) $ECHO_C" >&6
16948 ac_check_lib_save_LIBS=$LIBS
16950 cat >"conftest.$ac_ext" <<_ACEOF
16951 #line 16951 "configure"
16952 #include "confdefs.h"
16954 /* Override any gcc2 internal prototype to avoid an error. */
16958 /* We use char because int might match the return type of a gcc2
16959 builtin and then its argument prototype would still apply. */
16969 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16970 if { (eval echo "$as_me:16970: \"$ac_link\"") >&5
16971 (eval $ac_link) 2>&5
16973 echo "$as_me:16973: \$? = $ac_status" >&5
16974 (exit "$ac_status"); } &&
16975 { ac_try='test -s "conftest$ac_exeext"'
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
16981 ac_cv_lib_x_opendir=yes
16983 echo "$as_me: failed program was:" >&5
16984 cat "conftest.$ac_ext" >&5
16985 ac_cv_lib_x_opendir=no
16987 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16988 LIBS=$ac_check_lib_save_LIBS
16990 echo "$as_me:16990: result: $ac_cv_lib_x_opendir" >&5
16991 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
16992 if test "$ac_cv_lib_x_opendir" = yes; then
16998 echo "$as_me:16998: checking whether time.h and sys/time.h may both be included" >&5
16999 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17000 if test "${ac_cv_header_time+set}" = set; then
17001 echo $ECHO_N "(cached) $ECHO_C" >&6
17003 cat >"conftest.$ac_ext" <<_ACEOF
17004 #line 17004 "configure"
17005 #include "confdefs.h"
17006 #include <sys/types.h>
17007 #include <sys/time.h>
17013 if ((struct tm *) 0)
17019 rm -f "conftest.$ac_objext"
17020 if { (eval echo "$as_me:17020: \"$ac_compile\"") >&5
17021 (eval $ac_compile) 2>&5
17023 echo "$as_me:17023: \$? = $ac_status" >&5
17024 (exit "$ac_status"); } &&
17025 { ac_try='test -s "conftest.$ac_objext"'
17026 { (eval echo "$as_me:17026: \"$ac_try\"") >&5
17027 (eval $ac_try) 2>&5
17029 echo "$as_me:17029: \$? = $ac_status" >&5
17030 (exit "$ac_status"); }; }; then
17031 ac_cv_header_time=yes
17033 echo "$as_me: failed program was:" >&5
17034 cat "conftest.$ac_ext" >&5
17035 ac_cv_header_time=no
17037 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17039 echo "$as_me:17039: result: $ac_cv_header_time" >&5
17040 echo "${ECHO_T}$ac_cv_header_time" >&6
17041 if test $ac_cv_header_time = yes; then
17043 cat >>confdefs.h <<\EOF
17044 #define TIME_WITH_SYS_TIME 1
17049 ### checks for compiler characteristics
17051 ac_cpp='$CPP $CPPFLAGS'
17052 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17053 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17054 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17055 ac_main_return="return"
17057 echo "$as_me:17057: checking for an ANSI C-conforming const" >&5
17058 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17059 if test "${ac_cv_c_const+set}" = set; then
17060 echo $ECHO_N "(cached) $ECHO_C" >&6
17062 cat >"conftest.$ac_ext" <<_ACEOF
17063 #line 17063 "configure"
17064 #include "confdefs.h"
17069 /* FIXME: Include the comments suggested by Paul. */
17070 #ifndef __cplusplus
17071 /* Ultrix mips cc rejects this. */
17072 typedef int charset[2];
17074 /* SunOS 4.1.1 cc rejects this. */
17075 char const *const *ccp;
17077 /* NEC SVR4.0.2 mips cc rejects this. */
17078 struct point {int x, y;};
17079 static struct point const zero = {0,0};
17080 /* AIX XL C 1.02.0.0 rejects this.
17081 It does not let you subtract one const X* pointer from another in
17082 an arm of an if-expression whose if-part is not a constant
17084 const char *g = "string";
17085 ccp = &g + (g ? g-g : 0);
17086 /* HPUX 7.0 cc rejects these. */
17089 ccp = (char const *const *) p;
17090 { /* SCO 3.2v4 cc rejects this. */
17092 char const *s = 0 ? (char *) 0 : (char const *) 0;
17096 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
17097 int x[] = {25, 17};
17098 const int *foo = &x[0];
17101 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17102 typedef const int *iptr;
17106 { /* AIX XL C 1.02.0.0 rejects this saying
17107 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17108 struct s { int j; const int *ap[3]; };
17109 struct s *b; b->j = 5;
17111 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17112 const int foo = 10;
17120 rm -f "conftest.$ac_objext"
17121 if { (eval echo "$as_me:17121: \"$ac_compile\"") >&5
17122 (eval $ac_compile) 2>&5
17124 echo "$as_me:17124: \$? = $ac_status" >&5
17125 (exit "$ac_status"); } &&
17126 { ac_try='test -s "conftest.$ac_objext"'
17127 { (eval echo "$as_me:17127: \"$ac_try\"") >&5
17128 (eval $ac_try) 2>&5
17130 echo "$as_me:17130: \$? = $ac_status" >&5
17131 (exit "$ac_status"); }; }; then
17134 echo "$as_me: failed program was:" >&5
17135 cat "conftest.$ac_ext" >&5
17138 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17140 echo "$as_me:17140: result: $ac_cv_c_const" >&5
17141 echo "${ECHO_T}$ac_cv_c_const" >&6
17142 if test $ac_cv_c_const = no; then
17144 cat >>confdefs.h <<\EOF
17150 ### Checks for external-data
17152 echo "$as_me:17152: checking if data-only library module links" >&5
17153 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
17154 if test "${cf_cv_link_dataonly+set}" = set; then
17155 echo $ECHO_N "(cached) $ECHO_C" >&6
17159 cat >conftest.$ac_ext <<EOF
17160 #line 17160 "configure"
17161 int testdata[3] = { 123, 456, 789 };
17163 if { (eval echo "$as_me:17163: \"$ac_compile\"") >&5
17164 (eval $ac_compile) 2>&5
17166 echo "$as_me:17166: \$? = $ac_status" >&5
17167 (exit "$ac_status"); } ; then
17168 mv conftest.o data.o && \
17169 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
17171 rm -f conftest.$ac_ext data.o
17172 cat >conftest.$ac_ext <<EOF
17173 #line 17173 "configure"
17177 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
17179 extern int testdata[3];
17180 return testdata[0] == 123
17181 && testdata[1] == 456
17182 && testdata[2] == 789;
17186 if { (eval echo "$as_me:17186: \"$ac_compile\"") >&5
17187 (eval $ac_compile) 2>&5
17189 echo "$as_me:17189: \$? = $ac_status" >&5
17190 (exit "$ac_status"); }; then
17191 mv conftest.o func.o && \
17192 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17194 rm -f conftest.$ac_ext func.o
17195 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17196 cf_saveLIBS="$LIBS"
17197 LIBS="conftest.a $LIBS"
17198 if test "$cross_compiling" = yes; then
17199 cf_cv_link_dataonly=unknown
17201 cat >"conftest.$ac_ext" <<_ACEOF
17202 #line 17202 "configure"
17203 #include "confdefs.h"
17207 extern int testfunc();
17208 ${cf_cv_main_return:-return} (!testfunc());
17212 rm -f "conftest$ac_exeext"
17213 if { (eval echo "$as_me:17213: \"$ac_link\"") >&5
17214 (eval $ac_link) 2>&5
17216 echo "$as_me:17216: \$? = $ac_status" >&5
17217 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17218 { (eval echo "$as_me:17218: \"$ac_try\"") >&5
17219 (eval $ac_try) 2>&5
17221 echo "$as_me:17221: \$? = $ac_status" >&5
17222 (exit "$ac_status"); }; }; then
17223 cf_cv_link_dataonly=yes
17225 echo "$as_me: program exited with status $ac_status" >&5
17226 echo "$as_me: failed program was:" >&5
17227 cat "conftest.$ac_ext" >&5
17228 cf_cv_link_dataonly=no
17230 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17232 LIBS="$cf_saveLIBS"
17236 echo "$as_me:17236: result: $cf_cv_link_dataonly" >&5
17237 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17239 if test "$cf_cv_link_dataonly" = no ; then
17241 cat >>confdefs.h <<\EOF
17242 #define BROKEN_LINKER 1
17248 ### Checks for library functions.
17254 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17255 echo "$as_me:17255: checking for $ac_header" >&5
17256 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17257 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17258 echo $ECHO_N "(cached) $ECHO_C" >&6
17260 cat >"conftest.$ac_ext" <<_ACEOF
17261 #line 17261 "configure"
17262 #include "confdefs.h"
17263 #include <$ac_header>
17265 if { (eval echo "$as_me:17265: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17266 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17268 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17270 cat conftest.err >&5
17271 echo "$as_me:17271: \$? = $ac_status" >&5
17272 (exit "$ac_status"); } >/dev/null; then
17273 if test -s conftest.err; then
17274 ac_cpp_err=$ac_c_preproc_warn_flag
17281 if test -z "$ac_cpp_err"; then
17282 eval "$as_ac_Header=yes"
17284 echo "$as_me: failed program was:" >&5
17285 cat "conftest.$ac_ext" >&5
17286 eval "$as_ac_Header=no"
17288 rm -f conftest.err "conftest.$ac_ext"
17290 echo "$as_me:17290: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17291 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17292 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17293 cat >>confdefs.h <<EOF
17294 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17300 echo "$as_me:17300: checking for working mkstemp" >&5
17301 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17302 if test "${cf_cv_func_mkstemp+set}" = set; then
17303 echo $ECHO_N "(cached) $ECHO_C" >&6
17307 if test "$cross_compiling" = yes; then
17308 cf_cv_func_mkstemp=maybe
17310 cat >"conftest.$ac_ext" <<_ACEOF
17311 #line 17311 "configure"
17312 #include "confdefs.h"
17314 #include <sys/types.h>
17315 #ifdef HAVE_UNISTD_H
17316 #include <unistd.h>
17318 #include <stdlib.h>
17320 #include <string.h>
17321 #include <sys/stat.h>
17324 char *tmpl = "conftestXXXXXX";
17332 for (n = 0; n < 2; ++n) {
17333 strcpy(name[n], tmpl);
17334 if ((fd = mkstemp(name[n])) >= 0) {
17335 if (!strcmp(name[n], tmpl)
17336 || stat(name[n], &sb) != 0
17337 || (sb.st_mode & S_IFMT) != S_IFREG
17338 || (sb.st_mode & 077) != 0) {
17345 && !strcmp(name[0], name[1]))
17347 ${cf_cv_main_return:-return}(result);
17351 rm -f "conftest$ac_exeext"
17352 if { (eval echo "$as_me:17352: \"$ac_link\"") >&5
17353 (eval $ac_link) 2>&5
17355 echo "$as_me:17355: \$? = $ac_status" >&5
17356 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17357 { (eval echo "$as_me:17357: \"$ac_try\"") >&5
17358 (eval $ac_try) 2>&5
17360 echo "$as_me:17360: \$? = $ac_status" >&5
17361 (exit "$ac_status"); }; }; then
17362 cf_cv_func_mkstemp=yes
17365 echo "$as_me: program exited with status $ac_status" >&5
17366 echo "$as_me: failed program was:" >&5
17367 cat "conftest.$ac_ext" >&5
17368 cf_cv_func_mkstemp=no
17371 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17375 echo "$as_me:17375: result: $cf_cv_func_mkstemp" >&5
17376 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17377 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17378 echo "$as_me:17378: checking for mkstemp" >&5
17379 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17380 if test "${ac_cv_func_mkstemp+set}" = set; then
17381 echo $ECHO_N "(cached) $ECHO_C" >&6
17383 cat >"conftest.$ac_ext" <<_ACEOF
17384 #line 17384 "configure"
17385 #include "confdefs.h"
17386 #define mkstemp autoconf_temporary
17387 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17394 /* We use char because int might match the return type of a gcc2
17395 builtin and then its argument prototype would still apply. */
17396 char mkstemp (void);
17402 /* The GNU C library defines stubs for functions which it implements
17403 to always fail with ENOSYS. Some functions are actually named
17404 something starting with __ and the normal name is an alias. */
17405 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17406 #error found stub for mkstemp
17414 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17415 if { (eval echo "$as_me:17415: \"$ac_link\"") >&5
17416 (eval $ac_link) 2>&5
17418 echo "$as_me:17418: \$? = $ac_status" >&5
17419 (exit "$ac_status"); } &&
17420 { ac_try='test -s "conftest$ac_exeext"'
17421 { (eval echo "$as_me:17421: \"$ac_try\"") >&5
17422 (eval $ac_try) 2>&5
17424 echo "$as_me:17424: \$? = $ac_status" >&5
17425 (exit "$ac_status"); }; }; then
17426 ac_cv_func_mkstemp=yes
17428 echo "$as_me: failed program was:" >&5
17429 cat "conftest.$ac_ext" >&5
17430 ac_cv_func_mkstemp=no
17432 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17434 echo "$as_me:17434: result: $ac_cv_func_mkstemp" >&5
17435 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17438 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17440 cat >>confdefs.h <<\EOF
17441 #define HAVE_MKSTEMP 1
17446 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17447 CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17448 CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17452 if test "$cf_with_ada" != "no" ; then
17454 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
17457 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17459 unset ac_cv_path_cf_TEMP_gnat
17461 # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
17462 set dummy $cf_prog_gnat; ac_word=$2
17463 echo "$as_me:17463: checking for $ac_word" >&5
17464 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17465 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
17466 echo $ECHO_N "(cached) $ECHO_C" >&6
17468 case $cf_TEMP_gnat in
17470 ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
17473 ac_save_IFS=$IFS; IFS=$ac_path_separator
17475 for ac_dir in $ac_dummy; do
17477 test -z "$ac_dir" && ac_dir=.
17478 if $as_executable_p "$ac_dir/$ac_word"; then
17479 ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
17480 echo "$as_me:17480: found $ac_dir/$ac_word" >&5
17485 test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
17489 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
17491 if test -n "$cf_TEMP_gnat"; then
17492 echo "$as_me:17492: result: $cf_TEMP_gnat" >&5
17493 echo "${ECHO_T}$cf_TEMP_gnat" >&6
17495 echo "$as_me:17495: result: no" >&5
17496 echo "${ECHO_T}no" >&6
17499 eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
17501 if test "x$cf_TEMP_gnat" != xno; then
17502 unset cf_cv_gnat_version
17505 echo "$as_me:17505: checking for $cf_prog_gnat version" >&5
17506 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
17507 if test "${cf_cv_gnat_version+set}" = set; then
17508 echo $ECHO_N "(cached) $ECHO_C" >&6
17511 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
17512 grep '[0-9].[0-9][0-9]*' |\
17513 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17516 echo "$as_me:17516: result: $cf_cv_gnat_version" >&5
17517 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17518 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17519 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
17522 eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
17525 unset cf_cv_gnat_version
17526 unset ac_cv_path_cf_TEMP_gnat
17529 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
17531 cf_cv_prog_gnat_correct=no
17533 cf_ada_make=gnatmake
17534 if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
17535 # gprconfig is newer than gnatmake; we can continue...
17538 rm -rf ./conftest* ./*~conftest*
17539 if mkdir conftest.src
17543 for cf_gprconfig in Ada C
17545 echo "$as_me:17545: checking for gprconfig name for $cf_gprconfig" >&5
17546 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
17547 if test "$cf_gprconfig" = C
17549 for cf_gprconfig_param in \
17550 "$cf_gprconfig,,,,GNATGCC" \
17551 "$cf_gprconfig,,,,GCC" \
17554 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17555 test -n "$cf_gprconfig_value" && break
17558 cf_gprconfig_param=$cf_gprconfig
17559 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17561 if test -n "$cf_gprconfig_value"
17563 eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
17564 echo "$as_me:17564: result: $cf_gprconfig_value" >&5
17565 echo "${ECHO_T}$cf_gprconfig_value" >&6
17567 echo "$as_me:17567: result: missing" >&5
17568 echo "${ECHO_T}missing" >&6
17574 rm -rf ./conftest* ./*~conftest*
17577 if test "x$cf_ada_config" != "x#"
17580 echo "$as_me:17580: checking for gnat version" >&5
17581 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17582 if test "${cf_cv_gnat_version+set}" = set; then
17583 echo $ECHO_N "(cached) $ECHO_C" >&6
17586 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
17587 grep '[0-9].[0-9][0-9]*' |\
17588 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17591 echo "$as_me:17591: result: $cf_cv_gnat_version" >&5
17592 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17593 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17595 case "$cf_cv_gnat_version" in
17596 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17597 cf_cv_prog_gnat_correct=yes
17600 { echo "$as_me:17600: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
17601 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
17602 cf_cv_prog_gnat_correct=no
17606 # Extract the first word of "m4", so it can be a program name with args.
17607 set dummy m4; ac_word=$2
17608 echo "$as_me:17608: checking for $ac_word" >&5
17609 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17610 if test "${ac_cv_prog_M4_exists+set}" = set; then
17611 echo $ECHO_N "(cached) $ECHO_C" >&6
17613 if test -n "$M4_exists"; then
17614 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17616 ac_save_IFS=$IFS; IFS=$ac_path_separator
17618 for ac_dir in $ac_dummy; do
17620 test -z "$ac_dir" && ac_dir=.
17621 $as_executable_p "$ac_dir/$ac_word" || continue
17622 ac_cv_prog_M4_exists="yes"
17623 echo "$as_me:17623: found $ac_dir/$ac_word" >&5
17627 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17630 M4_exists=$ac_cv_prog_M4_exists
17631 if test -n "$M4_exists"; then
17632 echo "$as_me:17632: result: $M4_exists" >&5
17633 echo "${ECHO_T}$M4_exists" >&6
17635 echo "$as_me:17635: result: no" >&5
17636 echo "${ECHO_T}no" >&6
17639 if test "$ac_cv_prog_M4_exists" = no; then
17640 cf_cv_prog_gnat_correct=no
17641 { echo "$as_me:17641: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
17642 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
17644 if test "$cf_cv_prog_gnat_correct" = yes; then
17645 echo "$as_me:17645: checking if GNAT works" >&5
17646 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17648 rm -rf ./conftest* ./*~conftest*
17649 cat >>conftest.ads <<CF_EOF
17650 procedure conftest;
17652 cat >>conftest.adb <<CF_EOF
17655 procedure conftest is
17657 Text_IO.Put ("Hello World");
17659 GNAT.OS_Lib.OS_Exit (0);
17662 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17663 if ( ./conftest 1>&5 2>&1 ) ; then
17664 cf_cv_prog_gnat_correct=yes
17666 cf_cv_prog_gnat_correct=no
17669 cf_cv_prog_gnat_correct=no
17671 rm -rf ./conftest* ./*~conftest*
17673 echo "$as_me:17673: result: $cf_cv_prog_gnat_correct" >&5
17674 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17677 cf_cv_prog_gnat_correct=no
17681 if test "$cf_cv_prog_gnat_correct" = yes; then
17683 echo "$as_me:17683: checking optimization options for ADAFLAGS" >&5
17684 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
17688 ADAFLAGS="$ADAFLAGS -g"
17694 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
17696 ADAFLAGS="$ADAFLAGS $cf_O_flag"
17700 echo "$as_me:17700: result: $ADAFLAGS" >&5
17701 echo "${ECHO_T}$ADAFLAGS" >&6
17703 echo "$as_me:17703: checking if GNATPREP supports -T option" >&5
17704 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
17705 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
17706 echo $ECHO_N "(cached) $ECHO_C" >&6
17709 cf_cv_gnatprep_opt_t=no
17710 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
17713 echo "$as_me:17713: result: $cf_cv_gnatprep_opt_t" >&5
17714 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
17715 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
17717 echo "$as_me:17717: checking if GNAT supports generics" >&5
17718 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
17719 case "$cf_cv_gnat_version" in
17720 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17721 cf_gnat_generics=yes
17724 cf_gnat_generics=no
17727 echo "$as_me:17727: result: $cf_gnat_generics" >&5
17728 echo "${ECHO_T}$cf_gnat_generics" >&6
17730 if test "$cf_gnat_generics" = yes
17732 cf_compile_generics=generics
17733 cf_generic_objects="\${GENOBJS}"
17735 cf_compile_generics=
17736 cf_generic_objects=
17739 echo "$as_me:17739: checking if GNAT supports SIGINT" >&5
17740 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
17741 if test "${cf_cv_gnat_sigint+set}" = set; then
17742 echo $ECHO_N "(cached) $ECHO_C" >&6
17745 rm -rf ./conftest* ./*~conftest*
17746 cat >>conftest.ads <<CF_EOF
17747 with Ada.Interrupts.Names;
17749 package ConfTest is
17751 pragma Warnings (Off); -- the next pragma exists since 3.11p
17752 pragma Unreserve_All_Interrupts;
17753 pragma Warnings (On);
17755 protected Process is
17757 function Continue return Boolean;
17758 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
17760 Done : Boolean := False;
17765 cat >>conftest.adb <<CF_EOF
17766 package body ConfTest is
17767 protected body Process is
17772 function Continue return Boolean is
17779 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17780 cf_cv_gnat_sigint=yes
17782 cf_cv_gnat_sigint=no
17784 rm -rf ./conftest* ./*~conftest*
17787 echo "$as_me:17787: result: $cf_cv_gnat_sigint" >&5
17788 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
17790 if test "$cf_cv_gnat_sigint" = yes ; then
17793 USE_GNAT_SIGINT="#"
17796 cf_gnat_libraries=no
17797 cf_gnat_projects=no
17799 if test "$enable_gnat_projects" != no ; then
17800 echo "$as_me:17800: checking if GNAT supports project files" >&5
17801 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
17802 case "$cf_cv_gnat_version" in
17806 case "$cf_cv_system_name" in
17810 rm -rf ./conftest* ./*~conftest*
17811 if mkdir conftest.src conftest.bin conftest.lib
17814 rm -rf ./conftest* ./*~conftest*
17815 cat >>library.gpr <<CF_EOF
17817 Kind := External ("LIB_KIND");
17818 for Library_Name use "ConfTest";
17819 for Object_Dir use ".";
17820 for Library_ALI_Dir use External("LIBRARY_DIR");
17821 for Library_Version use External ("SONAME");
17822 for Library_Kind use Kind;
17823 for Library_Dir use External("BUILD_DIR");
17824 Source_Dir := External ("SOURCE_DIR");
17825 for Source_Dirs use (Source_Dir);
17828 cat >>confpackage.ads <<CF_EOF
17829 package ConfPackage is
17830 procedure conftest;
17833 cat >>confpackage.adb <<CF_EOF
17835 package body ConfPackage is
17836 procedure conftest is
17838 Text_IO.Put ("Hello World");
17843 if ( "$cf_ada_make" $ADAFLAGS \
17845 -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
17846 -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
17847 -XSOURCE_DIR="`pwd`" \
17848 -XSONAME=libConfTest.so.1 \
17849 -XLIB_KIND=static 1>&5 2>&1 ) ; then
17850 cf_gnat_projects=yes
17854 if test -f conftest.lib/confpackage.ali
17856 cf_gnat_libraries=yes
17858 rm -rf ./conftest* ./*~conftest*
17863 echo "$as_me:17863: result: $cf_gnat_projects" >&5
17864 echo "${ECHO_T}$cf_gnat_projects" >&6
17865 fi # enable_gnat_projects
17867 if test "$cf_gnat_projects" = yes
17869 echo "$as_me:17869: checking if GNAT supports libraries" >&5
17870 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
17871 echo "$as_me:17871: result: $cf_gnat_libraries" >&5
17872 echo "${ECHO_T}$cf_gnat_libraries" >&6
17875 USE_OLD_MAKERULES=""
17876 USE_GNAT_PROJECTS="#"
17877 USE_GNAT_MAKE_GPR="#"
17878 USE_GNAT_GPRBUILD="#"
17880 if test "$cf_gnat_projects" = yes
17882 USE_OLD_MAKERULES="#"
17883 USE_GNAT_PROJECTS=""
17884 if test "$cf_cv_VERSION_GPRBUILD" != no
17886 USE_GNAT_GPRBUILD=""
17887 elif test "$cf_cv_VERSION_GNATMAKE" != no
17889 USE_GNAT_MAKE_GPR=""
17891 { echo "$as_me:17891: WARNING: use old makefile rules since tools are missing" >&5
17892 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
17896 if test "$cf_gnat_libraries" = yes
17898 USE_GNAT_LIBRARIES=""
17900 USE_GNAT_LIBRARIES="#"
17903 echo "$as_me:17903: checking for ada-compiler" >&5
17904 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
17906 # Check whether --with-ada-compiler or --without-ada-compiler was given.
17907 if test "${with_ada_compiler+set}" = set; then
17908 withval="$with_ada_compiler"
17909 cf_ada_compiler=$withval
17911 cf_ada_compiler=gnatmake
17914 echo "$as_me:17914: result: $cf_ada_compiler" >&5
17915 echo "${ECHO_T}$cf_ada_compiler" >&6
17917 cf_ada_package=terminal_interface
17919 echo "$as_me:17919: checking for ada-include" >&5
17920 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
17922 # Check whether --with-ada-include or --without-ada-include was given.
17923 if test "${with_ada_include+set}" = set; then
17924 withval="$with_ada_include"
17927 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
17928 fi; if test -n "$prefix/share/ada/adainclude" ; then
17930 if test "x$prefix" != xNONE; then
17931 cf_path_syntax="$prefix"
17933 cf_path_syntax="$ac_default_prefix"
17936 case ".$withval" in
17937 (.\$\(*\)*|.\'*\'*)
17941 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17943 (.\$\{*prefix\}*|.\$\{*dir\}*)
17944 eval withval="$withval"
17945 case ".$withval" in
17947 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17952 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17955 { { echo "$as_me:17955: error: expected a pathname, not \"$withval\"" >&5
17956 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17957 { (exit 1); exit 1; }; }
17962 eval ADA_INCLUDE="$withval"
17964 echo "$as_me:17964: result: $ADA_INCLUDE" >&5
17965 echo "${ECHO_T}$ADA_INCLUDE" >&6
17967 echo "$as_me:17967: checking for ada-objects" >&5
17968 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
17970 # Check whether --with-ada-objects or --without-ada-objects was given.
17971 if test "${with_ada_objects+set}" = set; then
17972 withval="$with_ada_objects"
17975 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
17976 fi; if test -n "$prefix/lib/ada/adalib" ; then
17978 if test "x$prefix" != xNONE; then
17979 cf_path_syntax="$prefix"
17981 cf_path_syntax="$ac_default_prefix"
17984 case ".$withval" in
17985 (.\$\(*\)*|.\'*\'*)
17989 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17991 (.\$\{*prefix\}*|.\$\{*dir\}*)
17992 eval withval="$withval"
17993 case ".$withval" in
17995 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18000 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18003 { { echo "$as_me:18003: error: expected a pathname, not \"$withval\"" >&5
18004 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18005 { (exit 1); exit 1; }; }
18010 eval ADA_OBJECTS="$withval"
18012 echo "$as_me:18012: result: $ADA_OBJECTS" >&5
18013 echo "${ECHO_T}$ADA_OBJECTS" >&6
18015 echo "$as_me:18015: checking if an Ada95 shared-library should be built" >&5
18016 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
18018 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
18019 if test "${with_ada_sharedlib+set}" = set; then
18020 withval="$with_ada_sharedlib"
18021 with_ada_sharedlib=$withval
18023 with_ada_sharedlib=no
18025 echo "$as_me:18025: result: $with_ada_sharedlib" >&5
18026 echo "${ECHO_T}$with_ada_sharedlib" >&6
18028 if test "x$with_ada_sharedlib" != xno
18030 if test "x$cf_gnat_projects" != xyes
18032 { echo "$as_me:18032: WARNING: disabling shared-library since GNAT projects are not supported" >&5
18033 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
18034 with_ada_sharedlib=no
18038 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
18039 MAKE_ADA_SHAREDLIB="#"
18041 if test "x$with_ada_sharedlib" != xno
18043 MAKE_ADA_SHAREDLIB=
18044 if test "x$with_ada_sharedlib" != xyes
18046 ADA_SHAREDLIB="$with_ada_sharedlib"
18050 # allow the Ada binding to be renamed
18052 echo "$as_me:18052: checking for ada-libname" >&5
18053 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
18055 # Check whether --with-ada-libname or --without-ada-libname was given.
18056 if test "${with_ada_libname+set}" = set; then
18057 withval="$with_ada_libname"
18058 ADA_LIBNAME=$withval
18060 ADA_LIBNAME=AdaCurses
18062 case "x$ADA_LIBNAME" in
18064 ADA_LIBNAME=AdaCurses
18068 echo "$as_me:18068: result: $ADA_LIBNAME" >&5
18069 echo "${ECHO_T}$ADA_LIBNAME" >&6
18072 { { echo "$as_me:18072: error: No usable Ada compiler found" >&5
18073 echo "$as_me: error: No usable Ada compiler found" >&2;}
18074 { (exit 1); exit 1; }; }
18077 { { echo "$as_me:18077: error: The Ada compiler is needed for this package" >&5
18078 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
18079 { (exit 1); exit 1; }; }
18082 ################################################################################
18089 ### Construct the list of include-directories to be generated
18091 if test "$srcdir" != "."; then
18092 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
18094 CPPFLAGS="-I../include $CPPFLAGS"
18095 if test "$srcdir" != "."; then
18096 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
18098 CPPFLAGS="-I. $CPPFLAGS"
18100 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18101 if test "$srcdir" != "."; then
18102 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18104 if test "$GCC" != yes; then
18105 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18106 elif test "$includedir" != "/usr/include"; then
18107 if test "$includedir" = '${prefix}/include' ; then
18108 if test x$prefix != x/usr ; then
18109 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18112 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18116 ### Build up pieces for makefile rules
18117 echo "$as_me:18117: checking default library suffix" >&5
18118 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18120 case $DFT_LWR_MODEL in
18121 (libtool) DFT_ARG_SUFFIX='' ;;
18122 (normal) DFT_ARG_SUFFIX='' ;;
18123 (debug) DFT_ARG_SUFFIX='_g' ;;
18124 (profile) DFT_ARG_SUFFIX='_p' ;;
18125 (shared) DFT_ARG_SUFFIX='' ;;
18127 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18128 echo "$as_me:18128: result: $DFT_ARG_SUFFIX" >&5
18129 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18131 echo "$as_me:18131: checking default library-dependency suffix" >&5
18132 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18134 case X$DFT_LWR_MODEL in
18136 DFT_LIB_SUFFIX='.la'
18137 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18140 case "$cf_cv_system_name" in
18142 DFT_LIB_SUFFIX='_g.lib'
18145 DFT_LIB_SUFFIX='_g.a'
18148 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18151 case "$cf_cv_system_name" in
18153 DFT_LIB_SUFFIX='_p.lib'
18156 DFT_LIB_SUFFIX='_p.a'
18159 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18162 case "$cf_cv_system_name" in
18164 DFT_LIB_SUFFIX='.so'
18165 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18168 DFT_LIB_SUFFIX='.dll'
18169 DFT_DEP_SUFFIX='.dll.lib'
18171 (cygwin*|msys*|mingw*)
18172 DFT_LIB_SUFFIX='.dll'
18173 DFT_DEP_SUFFIX='.dll.a'
18176 DFT_LIB_SUFFIX='.dylib'
18177 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18182 DFT_LIB_SUFFIX='.so'
18183 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18186 DFT_LIB_SUFFIX='.sl'
18187 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18192 DFT_LIB_SUFFIX='.so'
18193 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18200 DFT_LIB_SUFFIX='.lib'
18203 DFT_LIB_SUFFIX='.a'
18206 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18209 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
18211 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
18212 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
18214 echo "$as_me:18214: result: $DFT_DEP_SUFFIX" >&5
18215 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18217 echo "$as_me:18217: checking default object directory" >&5
18218 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18220 case $DFT_LWR_MODEL in
18221 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
18222 (normal) DFT_OBJ_SUBDIR='objects' ;;
18223 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
18224 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
18226 case "$cf_cv_system_name" in
18228 DFT_OBJ_SUBDIR='objects' ;;
18230 DFT_OBJ_SUBDIR='obj_s' ;;
18233 echo "$as_me:18233: result: $DFT_OBJ_SUBDIR" >&5
18234 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18236 ### Set up low-level terminfo dependencies for makefiles.
18238 if test "$DFT_LWR_MODEL" = shared ; then
18239 case $cf_cv_system_name in
18241 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18244 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
18249 USE_ARG_SUFFIX=${DFT_ARG_SUFFIX}
18251 USE_LIB_SUFFIX=${DFT_ARG_SUFFIX}
18253 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
18255 ### Construct the list of subdirectories for which we'll customize makefiles
18256 ### with the appropriate compile-rules.
18258 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
18260 cat >>confdefs.h <<EOF
18261 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18264 ################################################################################
18270 NCURSES_SHLIB2="sh -c"
18272 ADA_SUBDIRS="include gen src doc"
18273 if test "x$cf_with_tests" != "xno" ; then
18274 ADA_SUBDIRS="$ADA_SUBDIRS samples"
18276 for cf_dir in $ADA_SUBDIRS
18278 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18285 # match layout used by make-tar.sh
18286 ADAHTML_DIR=../doc/ada
18288 if test "x$cross_compiling" = xyes ; then
18289 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
18291 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
18294 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"
18295 ac_config_commands="$ac_config_commands default"
18296 cat >confcache <<\_ACEOF
18297 # This file is a shell script that caches the results of configure
18298 # tests run on this system so they can be shared between configure
18299 # scripts and configure runs, see configure's option --config-cache.
18300 # It is not useful on other systems. If it contains results you don't
18301 # want to keep, you may remove or edit it.
18303 # config.status only pays attention to the cache file if you give it
18304 # the --recheck option to rerun configure.
18306 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18307 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18308 # following values.
18312 # The following way of writing the cache mishandles newlines in values,
18313 # but we know of no workaround that is simple, portable, and efficient.
18314 # So, don't put newlines in cache variables' values.
18315 # Ultrix sh set writes to stderr and can't be redirected directly,
18316 # and sets the high bit in the cache file unless we assign to the vars.
18319 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18321 # `set' does not quote correctly, so add quotes (double-quote
18322 # substitution turns \\\\ into \\, and sed turns \\ into \).
18325 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18328 # `set' quotes correctly as required by POSIX, so do not add quotes.
18330 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18337 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18339 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18341 if cmp -s $cache_file confcache; then :; else
18342 if test -w $cache_file; then
18343 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18344 cat confcache >$cache_file
18346 echo "not updating unwritable cache $cache_file"
18351 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18352 # Let make expand exec_prefix.
18353 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18355 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18356 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18357 # trailing colons and then remove the whole line if VPATH becomes empty
18358 # (actually we leave an empty line to preserve line numbers).
18359 if test "x$srcdir" = x.; then
18360 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18361 s/:*\$(srcdir):*/:/;
18362 s/:*\${srcdir}:*/:/;
18364 s/^\([^=]*=[ ]*\):*/\1/;
18370 DEFS=-DHAVE_CONFIG_H
18372 : "${CONFIG_STATUS=./config.status}"
18373 ac_clean_files_save=$ac_clean_files
18374 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18375 { echo "$as_me:18375: creating $CONFIG_STATUS" >&5
18376 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18377 cat >"$CONFIG_STATUS" <<_ACEOF
18379 # Generated automatically by configure.
18380 # Run this file to recreate the current configuration.
18381 # Compiler output produced by configure, useful for debugging
18382 # configure, is in config.log if it exists.
18385 SHELL=\${CONFIG_SHELL-$SHELL}
18386 ac_cs_invocation="\$0 \$@"
18388 CLICOLOR_FORCE= GREP_OPTIONS=
18389 unset CLICOLOR_FORCE GREP_OPTIONS
18392 cat >>"$CONFIG_STATUS" <<\_ACEOF
18393 # Be Bourne compatible
18394 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18397 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18401 # Name of the executable.
18402 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18404 if expr a : '\(a\)' >/dev/null 2>&1; then
18410 rm -f conf$$ conf$$.exe conf$$.file
18412 if ln -s conf$$.file conf$$ 2>/dev/null; then
18413 # We could just check for DJGPP; but this test a) works b) is more generic
18414 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18415 if test -f conf$$.exe; then
18416 # Don't use ln at all; we don't have any links
18421 elif ln conf$$.file conf$$ 2>/dev/null; then
18426 rm -f conf$$ conf$$.exe conf$$.file
18428 as_executable_p="test -f"
18430 # Support unset when possible.
18431 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18438 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18439 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18440 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18441 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18442 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18443 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18444 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18445 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18448 # We need space, tab and new line, in precisely that order.
18454 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18460 # Files that config.status was made for.
18461 if test -n "$ac_config_files"; then
18462 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
18465 if test -n "$ac_config_headers"; then
18466 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
18469 if test -n "$ac_config_links"; then
18470 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
18473 if test -n "$ac_config_commands"; then
18474 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
18477 cat >>"$CONFIG_STATUS" <<\EOF
18480 \`$as_me' instantiates files from templates according to the
18481 current configuration.
18483 Usage: $0 [OPTIONS] [FILE]...
18485 -h, --help print this help, then exit
18486 -V, --version print version number, then exit
18487 -d, --debug don't remove temporary files
18488 --recheck update $as_me by reconfiguring in the same conditions
18489 --file=FILE[:TEMPLATE]
18490 instantiate the configuration file FILE
18491 --header=FILE[:TEMPLATE]
18492 instantiate the configuration header FILE
18494 Configuration files:
18497 Configuration headers:
18500 Configuration commands:
18503 Report bugs to <dickey@invisible-island.net>."
18506 cat >>"$CONFIG_STATUS" <<EOF
18509 configured by $0, generated by GNU Autoconf 2.52.20210509,
18510 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18512 Copyright 2003-2020,2021 Thomas E. Dickey
18513 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18514 Free Software Foundation, Inc.
18515 This config.status script is free software; the Free Software Foundation
18516 gives unlimited permission to copy, distribute and modify it."
18521 cat >>"$CONFIG_STATUS" <<\EOF
18522 # If no file are specified by the user, then we need to provide default
18523 # value. By we need to know if files were specified by the user.
18529 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18530 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18532 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18536 *) # This is not an option, so the user has probably given explicit
18538 ac_need_defaults=false;;
18542 # Handling of the options.
18544 cat >>"$CONFIG_STATUS" <<EOF
18545 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18546 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18547 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18549 cat >>"$CONFIG_STATUS" <<\EOF
18550 --version | --vers* | -V )
18551 echo "$ac_cs_version"; exit 0 ;;
18553 # Conflict between --help and --header
18554 { { echo "$as_me:18554: error: ambiguous option: $1
18555 Try \`$0 --help' for more information." >&5
18556 echo "$as_me: error: ambiguous option: $1
18557 Try \`$0 --help' for more information." >&2;}
18558 { (exit 1); exit 1; }; };;
18559 --help | --hel | -h )
18560 echo "$ac_cs_usage"; exit 0 ;;
18561 --debug | --d* | -d )
18563 --file | --fil | --fi | --f )
18565 CONFIG_FILES="$CONFIG_FILES $1"
18566 ac_need_defaults=false;;
18567 --header | --heade | --head | --hea )
18569 CONFIG_HEADERS="$CONFIG_HEADERS $1"
18570 ac_need_defaults=false;;
18572 # This is an error.
18573 -*) { { echo "$as_me:18573: error: unrecognized option: $1
18574 Try \`$0 --help' for more information." >&5
18575 echo "$as_me: error: unrecognized option: $1
18576 Try \`$0 --help' for more information." >&2;}
18577 { (exit 1); exit 1; }; } ;;
18579 *) ac_config_targets="$ac_config_targets $1" ;;
18588 ## ----------------------- ##
18589 ## Running config.status. ##
18590 ## ----------------------- ##
18592 This file was extended by $as_me 2.52.20210509, executed with
18593 CONFIG_FILES = $CONFIG_FILES
18594 CONFIG_HEADERS = $CONFIG_HEADERS
18595 CONFIG_LINKS = $CONFIG_LINKS
18596 CONFIG_COMMANDS = $CONFIG_COMMANDS
18597 > "$ac_cs_invocation"
18598 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18603 cat >>"$CONFIG_STATUS" <<EOF
18605 # INIT-COMMANDS section.
18608 ### Special initialization commands, used to pass information from the
18609 ### configuration-run into config.status
18612 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
18613 DFT_LWR_MODEL="$DFT_LWR_MODEL"
18614 LIB_NAME="$LIB_NAME"
18615 LIB_PREFIX="$LIB_PREFIX"
18616 LIB_SUFFIX="$LIB_SUFFIX"
18618 NCURSES_MAJOR="$NCURSES_MAJOR"
18619 NCURSES_MINOR="$NCURSES_MINOR"
18620 NCURSES_PATCH="$NCURSES_PATCH"
18621 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
18622 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
18623 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
18624 cf_cv_abi_version="$cf_cv_abi_version"
18625 cf_cv_rel_version="$cf_cv_rel_version"
18626 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
18627 cf_cv_shared_soname='$cf_cv_shared_soname'
18628 cf_cv_shlib_version="$cf_cv_shlib_version"
18629 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
18630 cf_cv_system_name="$cf_cv_system_name"
18636 cat >>"$CONFIG_STATUS" <<\EOF
18637 for ac_config_target in $ac_config_targets
18639 case "$ac_config_target" in
18640 # Handling of arguments.
18641 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
18642 "src/library.gpr" ) CONFIG_FILES="$CONFIG_FILES src/library.gpr:src/library.gpr.in" ;;
18643 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
18644 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18645 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18646 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
18647 *) { { echo "$as_me:18647: error: invalid argument: $ac_config_target" >&5
18648 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18649 { (exit 1); exit 1; }; };;
18653 # If the user did not use the arguments to specify the items to instantiate,
18654 # then the envvar interface is used. Set only those that are not.
18655 # We use the long form for the default assignment because of an extremely
18656 # bizarre bug on SunOS 4.1.3.
18657 if "$ac_need_defaults"; then
18658 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18659 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18660 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18663 # Create a temporary directory, and hook for its removal unless debugging.
18666 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18667 trap '{ (exit 1); exit 1; }' 1 2 13 15
18670 # Create a (secure) tmp directory for tmp files.
18673 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18674 test -n "$tmp" && test -d "$tmp"
18677 tmp=$TMPDIR/cs$$-$RANDOM
18678 (umask 077 && mkdir $tmp)
18681 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18682 { (exit 1); exit 1; }
18687 cat >>"$CONFIG_STATUS" <<EOF
18690 # CONFIG_FILES section.
18693 # No need to generate the scripts if there are no CONFIG_FILES.
18694 # This happens for instance when ./config.status config.h
18695 if test -n "\$CONFIG_FILES"; then
18696 # Protect against being on the right side of a sed subst in config.status.
18697 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18698 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18699 s,@SHELL@,$SHELL,;t t
18700 s,@exec_prefix@,$exec_prefix,;t t
18701 s,@prefix@,$prefix,;t t
18702 s,@program_transform_name@,$program_transform_name,;t t
18703 s,@bindir@,$bindir,;t t
18704 s,@sbindir@,$sbindir,;t t
18705 s,@libexecdir@,$libexecdir,;t t
18706 s,@datarootdir@,$datarootdir,;t t
18707 s,@datadir@,$datadir,;t t
18708 s,@sysconfdir@,$sysconfdir,;t t
18709 s,@sharedstatedir@,$sharedstatedir,;t t
18710 s,@localstatedir@,$localstatedir,;t t
18711 s,@runstatedir@,$runstatedir,;t t
18712 s,@libdir@,$libdir,;t t
18713 s,@includedir@,$includedir,;t t
18714 s,@oldincludedir@,$oldincludedir,;t t
18715 s,@infodir@,$infodir,;t t
18716 s,@mandir@,$mandir,;t t
18717 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18718 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18719 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18720 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18721 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18722 s,@build_alias@,$build_alias,;t t
18723 s,@host_alias@,$host_alias,;t t
18724 s,@target_alias@,$target_alias,;t t
18725 s,@ECHO_C@,$ECHO_C,;t t
18726 s,@ECHO_N@,$ECHO_N,;t t
18727 s,@ECHO_T@,$ECHO_T,;t t
18728 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18729 s,@DEFS@,$DEFS,;t t
18730 s,@LIBS@,$LIBS,;t t
18731 s,@top_builddir@,$top_builddir,;t t
18732 s,@build@,$build,;t t
18733 s,@build_cpu@,$build_cpu,;t t
18734 s,@build_vendor@,$build_vendor,;t t
18735 s,@build_os@,$build_os,;t t
18736 s,@host@,$host,;t t
18737 s,@host_cpu@,$host_cpu,;t t
18738 s,@host_vendor@,$host_vendor,;t t
18739 s,@host_os@,$host_os,;t t
18740 s,@target@,$target,;t t
18741 s,@target_cpu@,$target_cpu,;t t
18742 s,@target_vendor@,$target_vendor,;t t
18743 s,@target_os@,$target_os,;t t
18744 s,@GREP@,$GREP,;t t
18745 s,@FGREP@,$FGREP,;t t
18747 s,@CFLAGS@,$CFLAGS,;t t
18748 s,@LDFLAGS@,$LDFLAGS,;t t
18749 s,@CPPFLAGS@,$CPPFLAGS,;t t
18750 s,@ac_ct_CC@,$ac_ct_CC,;t t
18751 s,@EXEEXT@,$EXEEXT,;t t
18752 s,@OBJEXT@,$OBJEXT,;t t
18753 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18755 s,@EGREP@,$EGREP,;t t
18757 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18758 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18759 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18760 s,@LN_S@,$LN_S,;t t
18761 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
18762 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
18763 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18764 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
18765 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
18766 s,@SET_MAKE@,$SET_MAKE,;t t
18767 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
18768 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
18769 s,@CTAGS@,$CTAGS,;t t
18770 s,@ETAGS@,$ETAGS,;t t
18771 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18772 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18773 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
18774 s,@RANLIB@,$RANLIB,;t t
18775 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18777 s,@ac_ct_LD@,$ac_ct_LD,;t t
18779 s,@ac_ct_AR@,$ac_ct_AR,;t t
18780 s,@ARFLAGS@,$ARFLAGS,;t t
18781 s,@DESTDIR@,$DESTDIR,;t t
18782 s,@BUILD_CC@,$BUILD_CC,;t t
18783 s,@BUILD_CPP@,$BUILD_CPP,;t t
18784 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
18785 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
18786 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
18787 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
18788 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
18789 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
18790 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
18791 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
18792 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
18793 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
18794 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
18795 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
18796 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
18797 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18798 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18799 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
18800 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
18801 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
18802 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
18803 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
18804 s,@CC_G_OPT@,$CC_G_OPT,;t t
18805 s,@LD_MODEL@,$LD_MODEL,;t t
18806 s,@shlibdir@,$shlibdir,;t t
18807 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
18808 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
18809 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
18810 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
18811 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
18812 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
18813 s,@LINK_PROGS@,$LINK_PROGS,;t t
18814 s,@LINK_TESTS@,$LINK_TESTS,;t t
18815 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
18816 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
18817 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
18818 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
18819 s,@RPATH_LIST@,$RPATH_LIST,;t t
18820 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
18821 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
18822 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
18823 s,@PTHREAD@,$PTHREAD,;t t
18824 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
18825 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18826 s,@ECHO_LT@,$ECHO_LT,;t t
18827 s,@ECHO_LD@,$ECHO_LD,;t t
18828 s,@RULE_CC@,$RULE_CC,;t t
18829 s,@SHOW_CC@,$SHOW_CC,;t t
18830 s,@ECHO_CC@,$ECHO_CC,;t t
18831 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18832 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
18833 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
18834 s,@ADAFLAGS@,$ADAFLAGS,;t t
18835 s,@ADA_TRACE@,$ADA_TRACE,;t t
18836 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
18837 s,@M4_exists@,$M4_exists,;t t
18838 s,@cf_ada_make@,$cf_ada_make,;t t
18839 s,@cf_ada_config@,$cf_ada_config,;t t
18840 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
18841 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
18842 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
18843 s,@cf_compile_generics@,$cf_compile_generics,;t t
18844 s,@cf_generic_objects@,$cf_generic_objects,;t t
18845 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
18846 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
18847 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
18848 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
18849 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
18850 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
18851 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
18852 s,@cf_ada_package@,$cf_ada_package,;t t
18853 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
18854 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
18855 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
18856 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
18857 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
18858 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
18859 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
18860 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
18861 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
18862 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18863 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18864 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
18865 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
18866 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
18867 s,@TEST_ARG2@,$TEST_ARG2,;t t
18868 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
18869 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
18870 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
18871 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
18872 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
18873 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
18874 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
18879 cat >>"$CONFIG_STATUS" <<\EOF
18880 # Split the substitutions into bite-sized pieces for seds with
18881 # small command number limits, like on Digital OSF/1 and HP-UX.
18882 ac_max_sed_lines=48
18883 ac_sed_frag=1 # Number of current file.
18884 ac_beg=1 # First line for current file.
18885 ac_end=$ac_max_sed_lines # Line after last line for current file.
18888 while "$ac_more_lines"; do
18889 if test "$ac_beg" -gt 1; then
18890 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18892 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18894 if test ! -s $tmp/subs.frag; then
18895 ac_more_lines=false
18897 # The purpose of the label and of the branching condition is to
18898 # speed up the sed processing (if there are no `@' at all, there
18899 # is no need to browse any of the substitutions).
18900 # These are the two extra sed commands mentioned above.
18902 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18903 # It is possible to make a multiline substitution using escaped newlines.
18904 # Ensure that we do not split the substitution between script fragments.
18906 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
18907 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
18908 if test -s $tmp/subs.next; then
18909 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
18910 if test ! -s $tmp/subs.edit; then
18911 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
18912 if test ! -s $tmp/subs.edit; then
18913 if test "$ac_beg" -gt 1; then
18914 ac_end=`expr "$ac_end" - 1`
18921 if test -z "$ac_sed_cmds"; then
18922 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18924 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18926 ac_sed_frag=`expr "$ac_sed_frag" + 1`
18928 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
18931 if test -z "$ac_sed_cmds"; then
18934 fi # test -n "$CONFIG_FILES"
18937 cat >>"$CONFIG_STATUS" <<\EOF
18938 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18939 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18941 - | *:- | *:-:* ) # input from stdin
18943 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18944 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18945 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18946 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18947 * ) ac_file_in=$ac_file.in ;;
18950 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18951 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18952 X"$ac_file" : 'X\(//\)[^/]' \| \
18953 X"$ac_file" : 'X\(//\)$' \| \
18954 X"$ac_file" : 'X\(/\)' \| \
18955 . : '\(.\)' 2>/dev/null ||
18957 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18958 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18959 /^X\(\/\/\)$/{ s//\1/; q; }
18960 /^X\(\/\).*/{ s//\1/; q; }
18962 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18963 { case "$ac_dir" in
18964 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18968 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18969 case $as_mkdir_dir in
18970 # Skip DOS drivespec
18971 ?:) as_incr_dir=$as_mkdir_dir ;;
18973 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18974 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18979 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18980 # A "../" for each directory in $ac_dir_suffix.
18981 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18983 ac_dir_suffix= ac_dots=
18988 if test -z "$ac_dots"; then
18991 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
18993 [\\/]* | ?:[\\/]* )
18994 ac_srcdir="$srcdir$ac_dir_suffix";
18995 ac_top_srcdir="$srcdir" ;;
18996 *) # Relative path.
18997 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
18998 ac_top_srcdir="$ac_dots$srcdir" ;;
19002 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19003 *) ac_INSTALL=$ac_dots$INSTALL ;;
19006 if test x"$ac_file" != x-; then
19007 { echo "$as_me:19007: creating $ac_file" >&5
19008 echo "$as_me: creating $ac_file" >&6;}
19011 # Let's still pretend it is `configure' which instantiates (i.e., don't
19012 # use $as_me), people would be surprised to read:
19013 # /* config.h. Generated automatically by config.status. */
19014 configure_input="Generated automatically from `echo $ac_file_in |
19015 sed 's,.*/,,'` by configure."
19017 # First look for the input files in the build tree, otherwise in the
19019 ac_file_inputs=`IFS=:
19020 for f in $ac_file_in; do
19022 -) echo $tmp/stdin ;;
19024 # Absolute (can't be DOS-style, as IFS=:)
19025 test -f "$f" || { { echo "$as_me:19025: error: cannot find input file: $f" >&5
19026 echo "$as_me: error: cannot find input file: $f" >&2;}
19027 { (exit 1); exit 1; }; }
19030 if test -f "$f"; then
19033 elif test -f "$srcdir/$f"; then
19038 { { echo "$as_me:19038: error: cannot find input file: $f" >&5
19039 echo "$as_me: error: cannot find input file: $f" >&2;}
19040 { (exit 1); exit 1; }; }
19043 done` || { (exit 1); exit 1; }
19045 cat >>"$CONFIG_STATUS" <<\EOF
19046 ac_warn_datarootdir=no
19047 if test x"$ac_file" != x-; then
19048 for ac_item in $ac_file_inputs
19050 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
19051 if test -n "$ac_seen"; then
19052 ac_used=`grep '@datarootdir@' "$ac_item"`
19053 if test -z "$ac_used"; then
19054 { echo "$as_me:19054: WARNING: datarootdir was used implicitly but not set:
19056 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
19058 ac_warn_datarootdir=yes
19061 ac_seen=`grep '${datarootdir}' "$ac_item"`
19062 if test -n "$ac_seen"; then
19063 { echo "$as_me:19063: WARNING: datarootdir was used explicitly but not set:
19065 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
19067 ac_warn_datarootdir=yes
19072 if test "x$ac_warn_datarootdir" = xyes; then
19073 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
19077 cat >>"$CONFIG_STATUS" <<EOF
19081 cat >>"$CONFIG_STATUS" <<\EOF
19083 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19084 s,@configure_input@,$configure_input,;t t
19085 s,@srcdir@,$ac_srcdir,;t t
19086 s,@top_srcdir@,$ac_top_srcdir,;t t
19087 s,@INSTALL@,$ac_INSTALL,;t t
19088 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19090 if test x"$ac_file" != x-; then
19091 cp "$tmp/out" "$ac_file"
19093 for ac_name in prefix exec_prefix datarootdir
19095 ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
19096 if test -n "$ac_seen"; then
19097 ac_init=`${EGREP-egrep} '[ ]*'$ac_name'[ ]*=' "$ac_file"`
19098 if test -z "$ac_init"; then
19099 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
19100 { echo "$as_me:19100: WARNING: Variable $ac_name is used but was not set:
19102 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
19107 ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
19108 ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
19109 if test -s $tmp/out; then
19110 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
19111 { echo "$as_me:19111: WARNING: Some variables may not be substituted:
19113 echo "$as_me: WARNING: Some variables may not be substituted:
19123 cat >>"$CONFIG_STATUS" <<\EOF
19126 # CONFIG_HEADER section.
19129 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19130 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19132 # ac_d sets the value in "#define NAME VALUE" lines.
19133 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19134 ac_dB='[ ].*$,\1#\2'
19137 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19138 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19139 ac_iB='\([ ]\),\1#\2define\3'
19142 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19143 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19144 ac_uB='$,\1#\2define\3'
19148 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19149 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19151 - | *:- | *:-:* ) # input from stdin
19153 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19154 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19155 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19156 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19157 * ) ac_file_in=$ac_file.in ;;
19160 test x"$ac_file" != x- && { echo "$as_me:19160: creating $ac_file" >&5
19161 echo "$as_me: creating $ac_file" >&6;}
19163 # First look for the input files in the build tree, otherwise in the
19165 ac_file_inputs=`IFS=:
19166 for f in $ac_file_in; do
19168 -) echo $tmp/stdin ;;
19170 # Absolute (can't be DOS-style, as IFS=:)
19171 test -f "$f" || { { echo "$as_me:19171: error: cannot find input file: $f" >&5
19172 echo "$as_me: error: cannot find input file: $f" >&2;}
19173 { (exit 1); exit 1; }; }
19176 if test -f "$f"; then
19179 elif test -f "$srcdir/$f"; then
19184 { { echo "$as_me:19184: error: cannot find input file: $f" >&5
19185 echo "$as_me: error: cannot find input file: $f" >&2;}
19186 { (exit 1); exit 1; }; }
19189 done` || { (exit 1); exit 1; }
19190 # Remove the trailing spaces.
19191 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
19195 # Transform confdefs.h into a list of #define's. We won't use it as a sed
19196 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
19197 # be either 'cat' or 'sort'.
19198 cat confdefs.h | uniq >conftest.vals
19200 # Break up conftest.vals because some shells have a limit on
19201 # the size of here documents, and old seds have small limits too.
19203 rm -f conftest.tail
19204 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
19205 while grep . conftest.vals >/dev/null
19207 # Write chunks of a limited-size here document to conftest.frag.
19208 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
19209 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
19210 echo 'CEOF' >> "$CONFIG_STATUS"
19211 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
19212 rm -f conftest.vals
19213 mv conftest.tail conftest.vals
19215 rm -f conftest.vals
19217 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19219 echo ' cat >> conftest.edit <<CEOF
19220 /@DEFS@/r conftest.frag
19223 sed -f conftest.edit $tmp/in > $tmp/out
19225 mv $tmp/out $tmp/in
19226 rm -f conftest.edit conftest.frag
19227 ' >> "$CONFIG_STATUS"
19229 cat >>"$CONFIG_STATUS" <<\EOF
19230 # Let's still pretend it is `configure' which instantiates (i.e., don't
19231 # use $as_me), people would be surprised to read:
19232 # /* config.h. Generated automatically by config.status. */
19233 if test x"$ac_file" = x-; then
19234 echo "/* Generated automatically by configure. */" >$tmp/config.h
19236 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
19238 cat $tmp/in >>$tmp/config.h
19240 if test x"$ac_file" != x-; then
19241 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
19242 { echo "$as_me:19242: $ac_file is unchanged" >&5
19243 echo "$as_me: $ac_file is unchanged" >&6;}
19245 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19246 X"$ac_file" : 'X\(//\)[^/]' \| \
19247 X"$ac_file" : 'X\(//\)$' \| \
19248 X"$ac_file" : 'X\(/\)' \| \
19249 . : '\(.\)' 2>/dev/null ||
19251 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19252 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19253 /^X\(\/\/\)$/{ s//\1/; q; }
19254 /^X\(\/\).*/{ s//\1/; q; }
19256 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19257 { case "$ac_dir" in
19258 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19262 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19263 case $as_mkdir_dir in
19264 # Skip DOS drivespec
19265 ?:) as_incr_dir=$as_mkdir_dir ;;
19267 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19268 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19275 mv "$tmp/config.h" "$ac_file"
19279 rm -f $tmp/config.h
19283 cat >>"$CONFIG_STATUS" <<\EOF
19285 # CONFIG_COMMANDS section.
19287 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19288 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19289 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19293 if test -z "$USE_OLD_MAKERULES" ; then
19294 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
19301 cat >>"$CONFIG_STATUS" <<\EOF
19303 { (exit 0); exit 0; }
19305 chmod +x "$CONFIG_STATUS"
19306 ac_clean_files=$ac_clean_files_save
19308 # configure is writing to config.log, and then calls config.status.
19309 # config.status does its own redirection, appending to config.log.
19310 # Unfortunately, on DOS this fails, as config.log is still kept open
19311 # by configure, so config.status won't be able to write to it; its
19312 # output is simply discarded. So we exec the FD to /dev/null,
19313 # effectively closing config.log, so it can be properly (re)opened and
19314 # appended to by config.status. When coming back to configure, we
19315 # need to make the FD available again.
19316 if test "$no_create" != yes; then
19319 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
19321 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19322 # would make configure fail if this is the last instruction.
19323 "$ac_cs_success" || { (exit 1); exit 1; }
19325 ${MAKE:-make} preinstall