2 # From configure.in Revision: 1.93 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20231210.
6 # Copyright 2003-2022,2023 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 --without-ada suppress check for Ada compiler
707 --disable-stripping do not strip (debug info) installed executables
708 --with-strip-program=XX specify program to use when stripping in install
709 --with-pkg-config[=CMD] enable/disable use of pkg-config and its name CMD
710 --with-pkg-config-libdir[=XXX] use given directory for installing pc-files
711 --without-tests suppress build with test-programs
712 --enable-mixed-case tic should assume mixed-case filenames
713 --with-install-prefix prefixes actual install-location ($DESTDIR)
714 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
715 --with-build-cc=XXX the build C compiler ($BUILD_CC)
716 --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
717 --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
718 --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
719 --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
720 --with-build-libs=XXX the build libraries (${BUILD_LIBS})
721 Options to Specify the Libraries Built/Used:
722 --with-shared generate shared C-objects (needed for --with-ada-sharedlib)
723 --with-curses-dir=DIR directory in which (n)curses is installed
724 --with-screen=XXX use specified curses-libraries
725 --with-lib-prefix override library-prefix
726 --with-shlib-version[={rel|abi}] use release or ABI version in shared library file names
727 --enable-rpath-link link sample programs with rpath option
728 Fine-Tuning Your Configuration:
729 --enable-broken_linker compile with broken-linker support code
730 --disable-largefile omit support for large files
731 --with-rcs-ids compile-in RCS identifiers
733 --disable-ext-funcs disable function-extensions
734 --enable-const compile with extra/non-standard const
736 --without-develop disable development options
738 --with-pthread use POSIX thread library
739 --enable-weak-symbols enable weak-symbols for pthreads
740 --enable-reentrant compile with experimental reentrant code
741 --with-wrap-prefix=XXX override prefix used for public variables
742 Testing/development Options:
743 --disable-echo do not display "compiling" commands
744 --enable-warnings test: turn on gcc compiler warnings
745 --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics
746 --enable-assertions test: turn on generation of assertion code
747 --enable-expanded test: generate functions for certain macros
748 --disable-macros test: use functions rather than macros
749 --with-trace test: add trace() function to all models of ncurses
750 --disable-gnat-projects test: disable GNAT projects even if usable
751 Ada95 Binding Options:
752 --with-ada-compiler[=CMD] use CMD as Ada95 compiler (default: gnatmake)
753 --with-ada-include=DIR find Ada95 includes in DIR (default: PREFIX/share/ada/adainclude)
754 --with-ada-objects=DIR find Ada95 objects in DIR (default: PREFIX/lib/ada/adalib)
755 --with-ada-sharedlib build Ada95 shared library; requires GNAT project support
756 --with-ada-libname[=XXX] use XXX as Ada95 library name
758 Some influential environment variables:
759 CC C compiler command
760 CFLAGS C compiler flags
761 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
762 nonstandard directory <lib dir>
763 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
764 headers in a nonstandard directory <include dir>
767 Use these variables to override the choices made by `configure' or to help
768 it to find libraries and programs with nonstandard names/locations.
773 if test "$ac_init_help" = "recursive"; then
774 # If there are subdirs, report their specific --help.
776 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
778 # A "../" for each directory in /$ac_subdir.
779 ac_dots=`echo "$ac_subdir" |
780 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
783 .) # No --srcdir option. We are building in place.
784 ac_sub_srcdir="$srcdir" ;;
785 [\\/]* | ?:[\\/]* ) # Absolute path.
786 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
788 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
791 # Check for guested configure; otherwise get Cygnus style configure.
792 if test -f "$ac_sub_srcdir/configure.gnu"; then
794 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
795 elif test -f "$ac_sub_srcdir/configure"; then
797 $SHELL "$ac_sub_srcdir/configure" --help=recursive
798 elif test -f "$ac_sub_srcdir/configure.ac" ||
799 test -f "$ac_sub_srcdir/configure.in"; then
801 "$ac_configure" --help
803 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
809 test -n "$ac_init_help" && exit 0
810 if "$ac_init_version"; then
813 Copyright 2003-2022,2023 Thomas E. Dickey
814 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
815 Free Software Foundation, Inc.
816 This configure script is free software; the Free Software Foundation
817 gives unlimited permission to copy, distribute and modify it.
823 This file contains any messages produced by compilers while
824 running configure, to aid debugging if configure makes a mistake.
826 It was created by $as_me, which was
827 generated by GNU Autoconf 2.52.20231210. Invocation command line was
838 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
839 uname -m = `(uname -m) 2>/dev/null || echo unknown`
840 uname -r = `(uname -r) 2>/dev/null || echo unknown`
841 uname -s = `(uname -s) 2>/dev/null || echo unknown`
842 uname -v = `(uname -v) 2>/dev/null || echo unknown`
844 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
845 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
847 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
848 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
849 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
850 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
851 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
852 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
853 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
867 # Keep a trace of the command line.
868 # Strip out --no-create and --no-recursion so they do not pile up.
869 # Also quote any args containing shell meta-characters.
875 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
876 | --no-cr | --no-c) ;;
877 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
878 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
879 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
880 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
881 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
883 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
886 # Get rid of the leading space.
889 # When interrupted or exit'd, cleanup temporary files, and complete
890 # config.log. We remove comments because anyway the quotes in there
891 # would cause problems or look ugly.
893 # Save into config.log some information that might help in debugging.
895 echo "## ----------------- ##" >&5
896 echo "## Cache variables. ##" >&5
897 echo "## ----------------- ##" >&5
899 # The following way of writing the cache mishandles newlines in values,
902 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
905 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
906 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
910 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
914 sed "/^$/d" confdefs.h >conftest.log
915 if test -s conftest.log; then
917 echo "## ------------ ##" >&5
918 echo "## confdefs.h. ##" >&5
919 echo "## ------------ ##" >&5
924 test "$ac_signal" != 0 &&
925 echo "$as_me: caught signal $ac_signal" >&5
926 echo "$as_me: exit $exit_status" >&5
927 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
930 for ac_signal in 1 2 13 15; do
931 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
935 # confdefs.h avoids OS command line length limits that DEFS can exceed.
936 rm -rf conftest* confdefs.h
937 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
940 # Let the site file select an alternate cache file if it wants to.
941 # Prefer explicitly selected file to automatically selected ones.
942 if test -z "$CONFIG_SITE"; then
943 if test "x$prefix" != xNONE; then
944 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
946 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
949 for ac_site_file in $CONFIG_SITE; do
950 if test -r "$ac_site_file"; then
951 { echo "$as_me:951: loading site script $ac_site_file" >&5
952 echo "$as_me: loading site script $ac_site_file" >&6;}
953 cat "$ac_site_file" >&5
958 if test -r "$cache_file"; then
959 # Some versions of bash will fail to source /dev/null (special
960 # files actually), so we avoid doing that.
961 if test -f "$cache_file"; then
962 { echo "$as_me:962: loading cache $cache_file" >&5
963 echo "$as_me: loading cache $cache_file" >&6;}
965 [\\/]* | ?:[\\/]* ) . $cache_file;;
970 { echo "$as_me:970: creating cache $cache_file" >&5
971 echo "$as_me: creating cache $cache_file" >&6;}
975 # Check that the precious variables saved in the cache have kept the same
977 ac_cache_corrupted=false
978 for ac_var in `(set) 2>&1 |
979 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
980 eval ac_old_set=\$ac_cv_env_${ac_var}_set
981 eval ac_new_set=\$ac_env_${ac_var}_set
982 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
983 eval ac_new_val="\$ac_env_${ac_var}_value"
984 case "$ac_old_set,$ac_new_set" in
986 { echo "$as_me:986: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
987 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
988 ac_cache_corrupted=: ;;
990 { echo "$as_me:990: error: \`$ac_var' was not set in the previous run" >&5
991 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
992 ac_cache_corrupted=: ;;
995 if test "x$ac_old_val" != "x$ac_new_val"; then
996 { echo "$as_me:996: error: \`$ac_var' has changed since the previous run:" >&5
997 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
998 { echo "$as_me:998: former value: $ac_old_val" >&5
999 echo "$as_me: former value: $ac_old_val" >&2;}
1000 { echo "$as_me:1000: current value: $ac_new_val" >&5
1001 echo "$as_me: current value: $ac_new_val" >&2;}
1002 ac_cache_corrupted=:
1005 # Pass precious variables to config.status. It doesn't matter if
1006 # we pass some twice (in addition to the command line arguments).
1007 if test "$ac_new_set" = set; then
1008 case "$ac_new_val" in
1009 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1010 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1011 ac_configure_args="$ac_configure_args '$ac_arg'"
1013 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1018 if "$ac_cache_corrupted"; then
1019 { echo "$as_me:1019: error: changes in the environment can compromise the build" >&5
1020 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1021 { { echo "$as_me:1021: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1022 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1023 { (exit 1); exit 1; }; }
1027 ac_cpp='$CPP $CPPFLAGS'
1028 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1029 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1030 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1031 ac_main_return="return"
1033 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1035 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1047 echo "#! $SHELL" >conftest.sh
1048 echo "exit 0" >>conftest.sh
1049 chmod +x conftest.sh
1050 if { (echo "$as_me:1050: PATH=\".;.\"; conftest.sh") >&5
1051 (PATH=".;."; conftest.sh) 2>&5
1053 echo "$as_me:1053: \$? = $ac_status" >&5
1054 (exit "$ac_status"); }; then
1055 ac_path_separator=';'
1059 PATH_SEPARATOR="$ac_path_separator"
1062 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1069 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1070 if test -f "$ac_dir/install-sh"; then
1072 ac_install_sh="$ac_aux_dir/install-sh -c"
1074 elif test -f "$ac_dir/install.sh"; then
1076 ac_install_sh="$ac_aux_dir/install.sh -c"
1078 elif test -f "$ac_dir/shtool"; then
1080 ac_install_sh="$ac_aux_dir/shtool install -c"
1084 if test -z "$ac_aux_dir"; then
1085 { { echo "$as_me:1085: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1086 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1087 { (exit 1); exit 1; }; }
1089 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1090 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1091 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1093 # Make sure we can run config.sub.
1094 $ac_config_sub sun4 >/dev/null 2>&1 ||
1095 { { echo "$as_me:1095: error: cannot run $ac_config_sub" >&5
1096 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1097 { (exit 1); exit 1; }; }
1099 echo "$as_me:1099: checking build system type" >&5
1100 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1101 if test "${ac_cv_build+set}" = set; then
1102 echo $ECHO_N "(cached) $ECHO_C" >&6
1104 ac_cv_build_alias=$build_alias
1105 test -z "$ac_cv_build_alias" &&
1106 ac_cv_build_alias=`$ac_config_guess`
1107 test -z "$ac_cv_build_alias" &&
1108 { { echo "$as_me:1108: error: cannot guess build type; you must specify one" >&5
1109 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1110 { (exit 1); exit 1; }; }
1111 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1112 { { echo "$as_me:1112: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1113 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1114 { (exit 1); exit 1; }; }
1117 echo "$as_me:1117: result: $ac_cv_build" >&5
1118 echo "${ECHO_T}$ac_cv_build" >&6
1120 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1121 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1122 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1124 echo "$as_me:1124: checking host system type" >&5
1125 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1126 if test "${ac_cv_host+set}" = set; then
1127 echo $ECHO_N "(cached) $ECHO_C" >&6
1129 ac_cv_host_alias=$host_alias
1130 test -z "$ac_cv_host_alias" &&
1131 ac_cv_host_alias=$ac_cv_build_alias
1132 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1133 { { echo "$as_me:1133: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1134 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1135 { (exit 1); exit 1; }; }
1138 echo "$as_me:1138: result: $ac_cv_host" >&5
1139 echo "${ECHO_T}$ac_cv_host" >&6
1141 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1142 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1143 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1145 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1146 echo "$as_me:1146: checking target system type" >&5
1147 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1148 if test "${ac_cv_target+set}" = set; then
1149 echo $ECHO_N "(cached) $ECHO_C" >&6
1151 ac_cv_target_alias=$target_alias
1152 test "x$ac_cv_target_alias" = "x" &&
1153 ac_cv_target_alias=$ac_cv_host_alias
1154 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1155 { { echo "$as_me:1155: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1156 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1157 { (exit 1); exit 1; }; }
1160 echo "$as_me:1160: result: $ac_cv_target" >&5
1161 echo "${ECHO_T}$ac_cv_target" >&6
1162 target=$ac_cv_target
1163 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1164 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1165 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1167 # The aliases save the names the user supplied, while $host etc.
1168 # will get canonicalized.
1169 test -n "$target_alias" &&
1170 test "$program_prefix$program_suffix$program_transform_name" = \
1172 program_prefix=${target_alias}-
1173 system_name="$host_os"
1175 system_name="`(uname -s -r) 2>/dev/null`"
1176 if test -z "$system_name" ; then
1177 system_name="`(hostname) 2>/dev/null`"
1180 test -n "$system_name" &&
1181 cat >>confdefs.h <<EOF
1182 #define SYSTEM_NAME "$system_name"
1185 if test "${cf_cv_system_name+set}" = set; then
1186 echo $ECHO_N "(cached) $ECHO_C" >&6
1188 cf_cv_system_name="$system_name"
1191 test -z "$system_name" && system_name="$cf_cv_system_name"
1192 test -n "$cf_cv_system_name" && echo "$as_me:1192: result: Configuring for $cf_cv_system_name" >&5
1193 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1195 if test ".$system_name" != ".$cf_cv_system_name" ; then
1196 echo "$as_me:1196: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1197 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1198 { { echo "$as_me:1198: error: \"Please remove config.cache and try again.\"" >&5
1199 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1200 { (exit 1); exit 1; }; }
1203 # Check whether --with-system-type or --without-system-type was given.
1204 if test "${with_system_type+set}" = set; then
1205 withval="$with_system_type"
1206 { echo "$as_me:1206: WARNING: overriding system type to $withval" >&5
1207 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1208 cf_cv_system_name=$withval
1213 ### Save the given $CFLAGS to allow user-override.
1214 cf_user_CFLAGS="$CFLAGS"
1216 ### Default install-location
1217 for ac_prog in ggrep grep
1219 # Extract the first word of "$ac_prog", so it can be a program name with args.
1220 set dummy $ac_prog; ac_word=$2
1221 echo "$as_me:1221: checking for $ac_word" >&5
1222 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1223 if test "${ac_cv_prog_GREP+set}" = set; then
1224 echo $ECHO_N "(cached) $ECHO_C" >&6
1226 if test -n "$GREP"; then
1227 ac_cv_prog_GREP="$GREP" # Let the user override the test.
1229 ac_save_IFS=$IFS; IFS=$ac_path_separator
1231 for ac_dir in $ac_dummy; do
1233 test -z "$ac_dir" && ac_dir=.
1234 $as_executable_p "$ac_dir/$ac_word" || continue
1235 ac_cv_prog_GREP="$ac_prog"
1236 echo "$as_me:1236: found $ac_dir/$ac_word" >&5
1242 GREP=$ac_cv_prog_GREP
1243 if test -n "$GREP"; then
1244 echo "$as_me:1244: result: $GREP" >&5
1245 echo "${ECHO_T}$GREP" >&6
1247 echo "$as_me:1247: result: no" >&5
1248 echo "${ECHO_T}no" >&6
1251 test -n "$GREP" && break
1253 test -n "$GREP" || GREP=": "
1255 echo "$as_me:1255: checking for fgrep" >&5
1256 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1257 if test "${ac_cv_path_FGREP+set}" = set; then
1258 echo $ECHO_N "(cached) $ECHO_C" >&6
1260 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1261 then ac_cv_path_FGREP="$GREP -F"
1263 for ac_prog in gfgrep fgrep
1265 # Extract the first word of "$ac_prog", so it can be a program name with args.
1266 set dummy $ac_prog; ac_word=$2
1267 echo "$as_me:1267: checking for $ac_word" >&5
1268 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1269 if test "${ac_cv_path_FGREP+set}" = set; then
1270 echo $ECHO_N "(cached) $ECHO_C" >&6
1274 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1277 ac_save_IFS=$IFS; IFS=$ac_path_separator
1279 for ac_dir in $ac_dummy; do
1281 test -z "$ac_dir" && ac_dir=.
1282 if $as_executable_p "$ac_dir/$ac_word"; then
1283 ac_cv_path_FGREP="$ac_dir/$ac_word"
1284 echo "$as_me:1284: found $ac_dir/$ac_word" >&5
1292 FGREP=$ac_cv_path_FGREP
1294 if test -n "$FGREP"; then
1295 echo "$as_me:1295: result: $FGREP" >&5
1296 echo "${ECHO_T}$FGREP" >&6
1298 echo "$as_me:1298: result: no" >&5
1299 echo "${ECHO_T}no" >&6
1302 test -n "$FGREP" && break
1304 test -n "$FGREP" || FGREP=": "
1306 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1306: error: cannot find workable fgrep" >&5
1307 echo "$as_me: error: cannot find workable fgrep" >&2;}
1308 { (exit 1); exit 1; }; }
1311 echo "$as_me:1311: result: $ac_cv_path_FGREP" >&5
1312 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1313 FGREP="$ac_cv_path_FGREP"
1315 echo "$as_me:1315: checking for prefix" >&5
1316 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1317 if test "x$prefix" = "xNONE" ; then
1318 case "$cf_cv_system_name" in
1319 # non-vendor systems don't have a conflict
1320 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1323 (*) prefix=$ac_default_prefix
1327 echo "$as_me:1327: result: $prefix" >&5
1328 echo "${ECHO_T}$prefix" >&6
1330 if test "x$prefix" = "xNONE" ; then
1331 echo "$as_me:1331: checking for default include-directory" >&5
1332 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1333 test -n "$verbose" && echo 1>&6
1336 "$includedir/ncurses" \
1338 "$prefix/include/ncurses" \
1339 /usr/local/include \
1340 /usr/local/include/ncurses \
1342 /usr/include/ncurses
1344 cf_dir=`eval echo "$cf_symbol"`
1345 if test -f "$cf_dir/curses.h" ; then
1346 if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1347 includedir="$cf_symbol"
1348 test -n "$verbose" && echo $ECHO_N " found " 1>&6
1352 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1354 echo "$as_me:1354: result: $includedir" >&5
1355 echo "${ECHO_T}$includedir" >&6
1358 ### Checks for programs.
1360 # Check whether --with-ada or --without-ada was given.
1361 if test "${with_ada+set}" = set; then
1363 cf_with_ada=$withval
1369 if test "x$cf_with_ada" = xyes
1372 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
1375 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1377 unset ac_cv_path_cf_TEMP_gnat
1379 # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
1380 set dummy $cf_prog_gnat; ac_word=$2
1381 echo "$as_me:1381: checking for $ac_word" >&5
1382 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1383 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
1384 echo $ECHO_N "(cached) $ECHO_C" >&6
1386 case $cf_TEMP_gnat in
1388 ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
1391 ac_save_IFS=$IFS; IFS=$ac_path_separator
1393 for ac_dir in $ac_dummy; do
1395 test -z "$ac_dir" && ac_dir=.
1396 if $as_executable_p "$ac_dir/$ac_word"; then
1397 ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
1398 echo "$as_me:1398: found $ac_dir/$ac_word" >&5
1403 test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
1407 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
1409 if test -n "$cf_TEMP_gnat"; then
1410 echo "$as_me:1410: result: $cf_TEMP_gnat" >&5
1411 echo "${ECHO_T}$cf_TEMP_gnat" >&6
1413 echo "$as_me:1413: result: no" >&5
1414 echo "${ECHO_T}no" >&6
1417 eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
1419 if test "x$cf_TEMP_gnat" != xno; then
1420 unset cf_cv_gnat_version
1423 echo "$as_me:1423: checking for $cf_prog_gnat version" >&5
1424 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
1425 if test "${cf_cv_gnat_version+set}" = set; then
1426 echo $ECHO_N "(cached) $ECHO_C" >&6
1429 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
1430 grep '[0-9].[0-9][0-9]*' |\
1431 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
1434 echo "$as_me:1434: result: $cf_cv_gnat_version" >&5
1435 echo "${ECHO_T}$cf_cv_gnat_version" >&6
1436 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
1437 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
1440 eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
1443 unset cf_cv_gnat_version
1444 unset ac_cv_path_cf_TEMP_gnat
1447 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
1449 cf_cv_prog_gnat_correct=no
1451 cf_ada_make=gnatmake
1452 if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
1453 # gprconfig is newer than gnatmake; we can continue...
1456 rm -rf ./conftest* ./*~conftest*
1457 if mkdir conftest.src
1461 for cf_gprconfig in Ada C
1463 echo "$as_me:1463: checking for gprconfig name for $cf_gprconfig" >&5
1464 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
1465 if test "$cf_gprconfig" = C
1467 for cf_gprconfig_param in \
1468 "$cf_gprconfig,,,,GNATGCC" \
1469 "$cf_gprconfig,,,,GCC" \
1472 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
1473 test -n "$cf_gprconfig_value" && break
1476 cf_gprconfig_param=$cf_gprconfig
1477 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
1479 if test -n "$cf_gprconfig_value"
1481 eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
1482 echo "$as_me:1482: result: $cf_gprconfig_value" >&5
1483 echo "${ECHO_T}$cf_gprconfig_value" >&6
1485 echo "$as_me:1485: result: missing" >&5
1486 echo "${ECHO_T}missing" >&6
1492 rm -rf ./conftest* ./*~conftest*
1495 if test "x$cf_ada_config" != "x#"
1498 echo "$as_me:1498: checking for gnat version" >&5
1499 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
1500 if test "${cf_cv_gnat_version+set}" = set; then
1501 echo $ECHO_N "(cached) $ECHO_C" >&6
1504 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
1505 grep '[0-9].[0-9][0-9]*' |\
1506 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
1509 echo "$as_me:1509: result: $cf_cv_gnat_version" >&5
1510 echo "${ECHO_T}$cf_cv_gnat_version" >&6
1511 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
1513 case "$cf_cv_gnat_version" in
1514 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
1515 cf_cv_prog_gnat_correct=yes
1518 { echo "$as_me:1518: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
1519 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
1520 cf_cv_prog_gnat_correct=no
1524 # Extract the first word of "m4", so it can be a program name with args.
1525 set dummy m4; ac_word=$2
1526 echo "$as_me:1526: checking for $ac_word" >&5
1527 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1528 if test "${ac_cv_prog_M4_exists+set}" = set; then
1529 echo $ECHO_N "(cached) $ECHO_C" >&6
1531 if test -n "$M4_exists"; then
1532 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
1534 ac_save_IFS=$IFS; IFS=$ac_path_separator
1536 for ac_dir in $ac_dummy; do
1538 test -z "$ac_dir" && ac_dir=.
1539 $as_executable_p "$ac_dir/$ac_word" || continue
1540 ac_cv_prog_M4_exists="yes"
1541 echo "$as_me:1541: found $ac_dir/$ac_word" >&5
1545 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
1548 M4_exists=$ac_cv_prog_M4_exists
1549 if test -n "$M4_exists"; then
1550 echo "$as_me:1550: result: $M4_exists" >&5
1551 echo "${ECHO_T}$M4_exists" >&6
1553 echo "$as_me:1553: result: no" >&5
1554 echo "${ECHO_T}no" >&6
1557 if test "$ac_cv_prog_M4_exists" = no; then
1558 cf_cv_prog_gnat_correct=no
1559 { echo "$as_me:1559: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
1560 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
1562 if test "$cf_cv_prog_gnat_correct" = yes; then
1563 echo "$as_me:1563: checking if GNAT works" >&5
1564 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
1566 rm -rf ./conftest* ./*~conftest*
1567 cat >>conftest.ads <<CF_EOF
1570 cat >>conftest.adb <<CF_EOF
1573 procedure conftest is
1575 Text_IO.Put ("Hello World");
1577 GNAT.OS_Lib.OS_Exit (0);
1580 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
1581 if ( ./conftest 1>&5 2>&1 ) ; then
1582 cf_cv_prog_gnat_correct=yes
1584 cf_cv_prog_gnat_correct=no
1587 cf_cv_prog_gnat_correct=no
1589 rm -rf ./conftest* ./*~conftest*
1591 echo "$as_me:1591: result: $cf_cv_prog_gnat_correct" >&5
1592 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
1595 cf_cv_prog_gnat_correct=no
1599 if test "x$cf_cv_prog_gnat_correct" = xyes; then
1600 # gcc's developers chose to deprecate gnatgcc before making gprconfig
1601 # work. They replaced gnatgcc in gcc 13 with a script which spits out
1602 # a warning offering advice which could never work.
1604 # Here is a workaround.
1605 # Extract the first word of "gnatgcc", so it can be a program name with args.
1606 set dummy gnatgcc; ac_word=$2
1607 echo "$as_me:1607: checking for $ac_word" >&5
1608 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1609 if test "${ac_cv_path_cf_cv_path_gnatgcc+set}" = set; then
1610 echo $ECHO_N "(cached) $ECHO_C" >&6
1612 case $cf_cv_path_gnatgcc in
1614 ac_cv_path_cf_cv_path_gnatgcc="$cf_cv_path_gnatgcc" # Let the user override the test with a path.
1617 ac_save_IFS=$IFS; IFS=$ac_path_separator
1619 for ac_dir in $ac_dummy; do
1621 test -z "$ac_dir" && ac_dir=.
1622 if $as_executable_p "$ac_dir/$ac_word"; then
1623 ac_cv_path_cf_cv_path_gnatgcc="$ac_dir/$ac_word"
1624 echo "$as_me:1624: found $ac_dir/$ac_word" >&5
1629 test -z "$ac_cv_path_cf_cv_path_gnatgcc" && ac_cv_path_cf_cv_path_gnatgcc="no"
1633 cf_cv_path_gnatgcc=$ac_cv_path_cf_cv_path_gnatgcc
1635 if test -n "$cf_cv_path_gnatgcc"; then
1636 echo "$as_me:1636: result: $cf_cv_path_gnatgcc" >&5
1637 echo "${ECHO_T}$cf_cv_path_gnatgcc" >&6
1639 echo "$as_me:1639: result: no" >&5
1640 echo "${ECHO_T}no" >&6
1643 if test "$cf_cv_path_gnatgcc" != no
1645 echo "$as_me:1645: checking for improvement" >&5
1646 echo $ECHO_N "checking for improvement... $ECHO_C" >&6
1647 cf_file_gnatgcc=`file -L "$cf_cv_path_gnatgcc" 2>/dev/null`
1648 case "x$cf_file_gnatgcc" in
1650 cf_cv_path_gnatgcc=`sh -x "$cf_cv_path_gnatgcc" --version 2>&1 | grep -w exec | sed -e 's/^[ ]*+[ ]*//' -e 's/exec[ ]//' -e 's/ .*//'`
1653 cf_cv_path_gnatgcc=no
1656 echo "$as_me:1656: result: $cf_cv_path_gnatgcc" >&5
1657 echo "${ECHO_T}$cf_cv_path_gnatgcc" >&6
1658 test "$cf_cv_path_gnatgcc" = no && cf_cv_path_gnatgcc=gnatgcc
1659 cf_prog_cc="$cf_cv_path_gnatgcc $cf_prog_cc"
1663 case "$cf_prog_cc" in
1671 ac_cpp='$CPP $CPPFLAGS'
1672 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1673 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1674 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1675 ac_main_return="return"
1676 if test -n "$ac_tool_prefix"; then
1677 for ac_prog in $cf_prog_cc
1679 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1680 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1681 echo "$as_me:1681: checking for $ac_word" >&5
1682 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1683 if test "${ac_cv_prog_CC+set}" = set; then
1684 echo $ECHO_N "(cached) $ECHO_C" >&6
1686 if test -n "$CC"; then
1687 ac_cv_prog_CC="$CC" # Let the user override the test.
1689 ac_save_IFS=$IFS; IFS=$ac_path_separator
1691 for ac_dir in $ac_dummy; do
1693 test -z "$ac_dir" && ac_dir=.
1694 $as_executable_p "$ac_dir/$ac_word" || continue
1695 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1696 echo "$as_me:1696: found $ac_dir/$ac_word" >&5
1703 if test -n "$CC"; then
1704 echo "$as_me:1704: result: $CC" >&5
1705 echo "${ECHO_T}$CC" >&6
1707 echo "$as_me:1707: result: no" >&5
1708 echo "${ECHO_T}no" >&6
1711 test -n "$CC" && break
1714 if test -z "$CC"; then
1716 for ac_prog in $cf_prog_cc
1718 # Extract the first word of "$ac_prog", so it can be a program name with args.
1719 set dummy $ac_prog; ac_word=$2
1720 echo "$as_me:1720: checking for $ac_word" >&5
1721 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1722 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1723 echo $ECHO_N "(cached) $ECHO_C" >&6
1725 if test -n "$ac_ct_CC"; then
1726 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1728 ac_save_IFS=$IFS; IFS=$ac_path_separator
1730 for ac_dir in $ac_dummy; do
1732 test -z "$ac_dir" && ac_dir=.
1733 $as_executable_p "$ac_dir/$ac_word" || continue
1734 ac_cv_prog_ac_ct_CC="$ac_prog"
1735 echo "$as_me:1735: found $ac_dir/$ac_word" >&5
1741 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1742 if test -n "$ac_ct_CC"; then
1743 echo "$as_me:1743: result: $ac_ct_CC" >&5
1744 echo "${ECHO_T}$ac_ct_CC" >&6
1746 echo "$as_me:1746: result: no" >&5
1747 echo "${ECHO_T}no" >&6
1750 test -n "$ac_ct_CC" && break
1756 test -z "$CC" && { { echo "$as_me:1756: error: no acceptable cc found in \$PATH" >&5
1757 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1758 { (exit 1); exit 1; }; }
1760 # Provide some information about the compiler.
1761 echo "$as_me:1761:" \
1762 "checking for C compiler version" >&5
1763 ac_compiler=`set X $ac_compile; echo "$2"`
1764 { (eval echo "$as_me:1764: \"$ac_compiler --version </dev/null >&5\"") >&5
1765 (eval $ac_compiler --version </dev/null >&5) 2>&5
1767 echo "$as_me:1767: \$? = $ac_status" >&5
1768 (exit "$ac_status"); }
1769 { (eval echo "$as_me:1769: \"$ac_compiler -v </dev/null >&5\"") >&5
1770 (eval $ac_compiler -v </dev/null >&5) 2>&5
1772 echo "$as_me:1772: \$? = $ac_status" >&5
1773 (exit "$ac_status"); }
1774 { (eval echo "$as_me:1774: \"$ac_compiler -V </dev/null >&5\"") >&5
1775 (eval $ac_compiler -V </dev/null >&5) 2>&5
1777 echo "$as_me:1777: \$? = $ac_status" >&5
1778 (exit "$ac_status"); }
1780 cat >"conftest.$ac_ext" <<_ACEOF
1781 #line 1781 "configure"
1782 #include "confdefs.h"
1792 ac_clean_files_save=$ac_clean_files
1793 ac_clean_files="$ac_clean_files a.out a.exe"
1794 # Try to create an executable without -o first, disregard a.out.
1795 # It will help us diagnose broken compilers, and finding out an intuition
1797 echo "$as_me:1797: checking for C compiler default output" >&5
1798 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1799 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1800 if { (eval echo "$as_me:1800: \"$ac_link_default\"") >&5
1801 (eval $ac_link_default) 2>&5
1803 echo "$as_me:1803: \$? = $ac_status" >&5
1804 (exit "$ac_status"); }; then
1805 # Find the output, starting from the most likely. This scheme is
1806 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1808 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1809 ls a.out conftest 2>/dev/null;
1810 ls a.* conftest.* 2>/dev/null`; do
1812 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1813 a.out ) # We found the default executable, but exeext='' is most
1816 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1817 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1824 echo "$as_me: failed program was:" >&5
1825 cat "conftest.$ac_ext" >&5
1826 { { echo "$as_me:1826: error: C compiler cannot create executables" >&5
1827 echo "$as_me: error: C compiler cannot create executables" >&2;}
1828 { (exit 77); exit 77; }; }
1831 ac_exeext=$ac_cv_exeext
1832 echo "$as_me:1832: result: $ac_file" >&5
1833 echo "${ECHO_T}$ac_file" >&6
1835 # Check the compiler produces executables we can run. If not, either
1836 # the compiler is broken, or we cross compile.
1837 echo "$as_me:1837: checking whether the C compiler works" >&5
1838 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1839 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1840 # If not cross compiling, check that we can run a simple program.
1841 if test "$cross_compiling" != yes; then
1842 if { ac_try='./$ac_file'
1843 { (eval echo "$as_me:1843: \"$ac_try\"") >&5
1846 echo "$as_me:1846: \$? = $ac_status" >&5
1847 (exit "$ac_status"); }; }; then
1850 if test "$cross_compiling" = maybe; then
1853 { { echo "$as_me:1853: error: cannot run C compiled programs.
1854 If you meant to cross compile, use \`--host'." >&5
1855 echo "$as_me: error: cannot run C compiled programs.
1856 If you meant to cross compile, use \`--host'." >&2;}
1857 { (exit 1); exit 1; }; }
1861 echo "$as_me:1861: result: yes" >&5
1862 echo "${ECHO_T}yes" >&6
1864 rm -f a.out a.exe "conftest$ac_cv_exeext"
1865 ac_clean_files=$ac_clean_files_save
1866 # Check the compiler produces executables we can run. If not, either
1867 # the compiler is broken, or we cross compile.
1868 echo "$as_me:1868: checking whether we are cross compiling" >&5
1869 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1870 echo "$as_me:1870: result: $cross_compiling" >&5
1871 echo "${ECHO_T}$cross_compiling" >&6
1873 echo "$as_me:1873: checking for executable suffix" >&5
1874 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1875 if { (eval echo "$as_me:1875: \"$ac_link\"") >&5
1876 (eval $ac_link) 2>&5
1878 echo "$as_me:1878: \$? = $ac_status" >&5
1879 (exit "$ac_status"); }; then
1880 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1881 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1882 # work properly (i.e., refer to `conftest.exe'), while it won't with
1884 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1886 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1887 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1894 { { echo "$as_me:1894: error: cannot compute EXEEXT: cannot compile and link" >&5
1895 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1896 { (exit 1); exit 1; }; }
1899 rm -f "conftest$ac_cv_exeext"
1900 echo "$as_me:1900: result: $ac_cv_exeext" >&5
1901 echo "${ECHO_T}$ac_cv_exeext" >&6
1903 rm -f "conftest.$ac_ext"
1904 EXEEXT=$ac_cv_exeext
1906 echo "$as_me:1906: checking for object suffix" >&5
1907 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1908 if test "${ac_cv_objext+set}" = set; then
1909 echo $ECHO_N "(cached) $ECHO_C" >&6
1911 cat >"conftest.$ac_ext" <<_ACEOF
1912 #line 1912 "configure"
1913 #include "confdefs.h"
1923 rm -f conftest.o conftest.obj
1924 if { (eval echo "$as_me:1924: \"$ac_compile\"") >&5
1925 (eval $ac_compile) 2>&5
1927 echo "$as_me:1927: \$? = $ac_status" >&5
1928 (exit "$ac_status"); }; then
1929 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1931 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1932 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1937 echo "$as_me: failed program was:" >&5
1938 cat "conftest.$ac_ext" >&5
1939 { { echo "$as_me:1939: error: cannot compute OBJEXT: cannot compile" >&5
1940 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1941 { (exit 1); exit 1; }; }
1944 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1946 echo "$as_me:1946: result: $ac_cv_objext" >&5
1947 echo "${ECHO_T}$ac_cv_objext" >&6
1948 OBJEXT=$ac_cv_objext
1950 echo "$as_me:1950: checking whether we are using the GNU C compiler" >&5
1951 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1952 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1953 echo $ECHO_N "(cached) $ECHO_C" >&6
1955 cat >"conftest.$ac_ext" <<_ACEOF
1956 #line 1956 "configure"
1957 #include "confdefs.h"
1970 rm -f "conftest.$ac_objext"
1971 if { (eval echo "$as_me:1971: \"$ac_compile\"") >&5
1972 (eval $ac_compile) 2>&5
1974 echo "$as_me:1974: \$? = $ac_status" >&5
1975 (exit "$ac_status"); } &&
1976 { ac_try='test -s "conftest.$ac_objext"'
1977 { (eval echo "$as_me:1977: \"$ac_try\"") >&5
1980 echo "$as_me:1980: \$? = $ac_status" >&5
1981 (exit "$ac_status"); }; }; then
1984 echo "$as_me: failed program was:" >&5
1985 cat "conftest.$ac_ext" >&5
1988 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1989 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1992 echo "$as_me:1992: result: $ac_cv_c_compiler_gnu" >&5
1993 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1994 GCC=`test $ac_compiler_gnu = yes && echo yes`
1995 ac_test_CFLAGS=${CFLAGS+set}
1996 ac_save_CFLAGS=$CFLAGS
1998 echo "$as_me:1998: checking whether $CC accepts -g" >&5
1999 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2000 if test "${ac_cv_prog_cc_g+set}" = set; then
2001 echo $ECHO_N "(cached) $ECHO_C" >&6
2003 cat >"conftest.$ac_ext" <<_ACEOF
2004 #line 2004 "configure"
2005 #include "confdefs.h"
2015 rm -f "conftest.$ac_objext"
2016 if { (eval echo "$as_me:2016: \"$ac_compile\"") >&5
2017 (eval $ac_compile) 2>&5
2019 echo "$as_me:2019: \$? = $ac_status" >&5
2020 (exit "$ac_status"); } &&
2021 { ac_try='test -s "conftest.$ac_objext"'
2022 { (eval echo "$as_me:2022: \"$ac_try\"") >&5
2025 echo "$as_me:2025: \$? = $ac_status" >&5
2026 (exit "$ac_status"); }; }; then
2029 echo "$as_me: failed program was:" >&5
2030 cat "conftest.$ac_ext" >&5
2033 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2035 echo "$as_me:2035: result: $ac_cv_prog_cc_g" >&5
2036 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2037 if test "$ac_test_CFLAGS" = set; then
2038 CFLAGS=$ac_save_CFLAGS
2039 elif test $ac_cv_prog_cc_g = yes; then
2040 if test "$GCC" = yes; then
2046 if test "$GCC" = yes; then
2052 # Some people use a C++ compiler to compile C. Since we use `exit',
2053 # in C++ we need to declare it. In case someone uses the same compiler
2054 # for both compiling C and C++ we need to have the C++ compiler decide
2055 # the declaration of exit, since it's the most demanding environment.
2056 cat >"conftest.$ac_ext" <<_ACEOF
2061 rm -f "conftest.$ac_objext"
2062 if { (eval echo "$as_me:2062: \"$ac_compile\"") >&5
2063 (eval $ac_compile) 2>&5
2065 echo "$as_me:2065: \$? = $ac_status" >&5
2066 (exit "$ac_status"); } &&
2067 { ac_try='test -s "conftest.$ac_objext"'
2068 { (eval echo "$as_me:2068: \"$ac_try\"") >&5
2071 echo "$as_me:2071: \$? = $ac_status" >&5
2072 (exit "$ac_status"); }; }; then
2073 for ac_declaration in \
2075 '#include <stdlib.h>' \
2076 'extern "C" void std::exit (int) throw (); using std::exit;' \
2077 'extern "C" void std::exit (int); using std::exit;' \
2078 'extern "C" void exit (int) throw ();' \
2079 'extern "C" void exit (int);' \
2082 cat >"conftest.$ac_ext" <<_ACEOF
2083 #line 2083 "configure"
2084 #include "confdefs.h"
2095 rm -f "conftest.$ac_objext"
2096 if { (eval echo "$as_me:2096: \"$ac_compile\"") >&5
2097 (eval $ac_compile) 2>&5
2099 echo "$as_me:2099: \$? = $ac_status" >&5
2100 (exit "$ac_status"); } &&
2101 { ac_try='test -s "conftest.$ac_objext"'
2102 { (eval echo "$as_me:2102: \"$ac_try\"") >&5
2105 echo "$as_me:2105: \$? = $ac_status" >&5
2106 (exit "$ac_status"); }; }; then
2109 echo "$as_me: failed program was:" >&5
2110 cat "conftest.$ac_ext" >&5
2113 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2114 cat >"conftest.$ac_ext" <<_ACEOF
2115 #line 2115 "configure"
2116 #include "confdefs.h"
2126 rm -f "conftest.$ac_objext"
2127 if { (eval echo "$as_me:2127: \"$ac_compile\"") >&5
2128 (eval $ac_compile) 2>&5
2130 echo "$as_me:2130: \$? = $ac_status" >&5
2131 (exit "$ac_status"); } &&
2132 { ac_try='test -s "conftest.$ac_objext"'
2133 { (eval echo "$as_me:2133: \"$ac_try\"") >&5
2136 echo "$as_me:2136: \$? = $ac_status" >&5
2137 (exit "$ac_status"); }; }; then
2140 echo "$as_me: failed program was:" >&5
2141 cat "conftest.$ac_ext" >&5
2143 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2146 if test -n "$ac_declaration"; then
2147 echo '#ifdef __cplusplus' >>confdefs.h
2148 echo "$ac_declaration" >>confdefs.h
2149 echo '#endif' >>confdefs.h
2153 echo "$as_me: failed program was:" >&5
2154 cat "conftest.$ac_ext" >&5
2156 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2158 ac_cpp='$CPP $CPPFLAGS'
2159 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2160 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2161 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2162 ac_main_return="return"
2165 if test "$GCC" = yes ; then
2166 echo "$as_me:2166: checking version of $CC" >&5
2167 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2168 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2169 test -z "$GCC_VERSION" && GCC_VERSION=unknown
2170 echo "$as_me:2170: result: $GCC_VERSION" >&5
2171 echo "${ECHO_T}$GCC_VERSION" >&6
2176 if test "$GCC" = yes ; then
2179 echo "$as_me:2179: checking if this is really Intel C compiler" >&5
2180 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2181 cf_save_CFLAGS="$CFLAGS"
2182 CFLAGS="$CFLAGS -no-gcc"
2183 cat >"conftest.$ac_ext" <<_ACEOF
2184 #line 2184 "configure"
2185 #include "confdefs.h"
2191 #ifdef __INTEL_COMPILER
2193 #error __INTEL_COMPILER is not defined
2200 rm -f "conftest.$ac_objext"
2201 if { (eval echo "$as_me:2201: \"$ac_compile\"") >&5
2202 (eval $ac_compile) 2>&5
2204 echo "$as_me:2204: \$? = $ac_status" >&5
2205 (exit "$ac_status"); } &&
2206 { ac_try='test -s "conftest.$ac_objext"'
2207 { (eval echo "$as_me:2207: \"$ac_try\"") >&5
2210 echo "$as_me:2210: \$? = $ac_status" >&5
2211 (exit "$ac_status"); }; }; then
2213 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2216 echo "$as_me: failed program was:" >&5
2217 cat "conftest.$ac_ext" >&5
2219 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2220 CFLAGS="$cf_save_CFLAGS"
2221 echo "$as_me:2221: result: $INTEL_COMPILER" >&5
2222 echo "${ECHO_T}$INTEL_COMPILER" >&6
2229 if test "$GCC" = yes ; then
2230 echo "$as_me:2230: checking if this is really Clang C compiler" >&5
2231 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2232 cf_save_CFLAGS="$CFLAGS"
2233 cat >"conftest.$ac_ext" <<_ACEOF
2234 #line 2234 "configure"
2235 #include "confdefs.h"
2243 #error __clang__ is not defined
2250 rm -f "conftest.$ac_objext"
2251 if { (eval echo "$as_me:2251: \"$ac_compile\"") >&5
2252 (eval $ac_compile) 2>&5
2254 echo "$as_me:2254: \$? = $ac_status" >&5
2255 (exit "$ac_status"); } &&
2256 { ac_try='test -s "conftest.$ac_objext"'
2257 { (eval echo "$as_me:2257: \"$ac_try\"") >&5
2260 echo "$as_me:2260: \$? = $ac_status" >&5
2261 (exit "$ac_status"); }; }; then
2265 echo "$as_me: failed program was:" >&5
2266 cat "conftest.$ac_ext" >&5
2268 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2269 CFLAGS="$cf_save_CFLAGS"
2270 echo "$as_me:2270: result: $CLANG_COMPILER" >&5
2271 echo "${ECHO_T}$CLANG_COMPILER" >&6
2276 if test "x$CLANG_COMPILER" = "xyes" ; then
2278 (c[1-9][0-9]|*/c[1-9][0-9])
2279 { echo "$as_me:2279: WARNING: replacing broken compiler alias $CC" >&5
2280 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2281 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2286 echo "$as_me:2286: checking version of $CC" >&5
2287 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2288 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.].*//'`"
2289 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2290 echo "$as_me:2290: result: $CLANG_VERSION" >&5
2291 echo "${ECHO_T}$CLANG_VERSION" >&6
2293 for cf_clang_opt in \
2294 -Qunused-arguments \
2295 -Wno-error=implicit-function-declaration
2297 echo "$as_me:2297: checking if option $cf_clang_opt works" >&5
2298 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2299 cf_save_CFLAGS="$CFLAGS"
2300 CFLAGS="$CFLAGS $cf_clang_opt"
2301 cat >"conftest.$ac_ext" <<_ACEOF
2302 #line 2302 "configure"
2303 #include "confdefs.h"
2310 printf("hello!\\n");
2315 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2316 if { (eval echo "$as_me:2316: \"$ac_link\"") >&5
2317 (eval $ac_link) 2>&5
2319 echo "$as_me:2319: \$? = $ac_status" >&5
2320 (exit "$ac_status"); } &&
2321 { ac_try='test -s "conftest$ac_exeext"'
2322 { (eval echo "$as_me:2322: \"$ac_try\"") >&5
2325 echo "$as_me:2325: \$? = $ac_status" >&5
2326 (exit "$ac_status"); }; }; then
2330 echo "$as_me: failed program was:" >&5
2331 cat "conftest.$ac_ext" >&5
2335 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2336 echo "$as_me:2336: result: $cf_clang_optok" >&5
2337 echo "${ECHO_T}$cf_clang_optok" >&6
2338 CFLAGS="$cf_save_CFLAGS"
2339 if test "$cf_clang_optok" = yes; then
2340 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2342 echo "${as_me:-configure}:2342: testing adding option $cf_clang_opt ..." 1>&5
2344 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2345 CFLAGS="${CFLAGS}$cf_clang_opt"
2351 echo "$as_me:2351: checking for $CC option to accept ANSI C" >&5
2352 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2353 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2354 echo $ECHO_N "(cached) $ECHO_C" >&6
2356 ac_cv_prog_cc_stdc=no
2358 cat >"conftest.$ac_ext" <<_ACEOF
2359 #line 2359 "configure"
2360 #include "confdefs.h"
2363 #include <sys/types.h>
2364 #include <sys/stat.h>
2365 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2366 struct buf { int x; };
2367 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2368 static char *e (char **p, int i)
2372 static char *f (char * (*g) (char **, int), char **p, ...)
2377 s = g (p, va_arg (v,int));
2381 int test (int i, double x);
2382 struct s1 {int (*f) (int a);};
2383 struct s2 {int (*f) (double a);};
2384 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2390 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2395 # Don't try gcc -ansi; that turns off useful extensions and
2396 # breaks some systems' header files.
2397 # AIX -qlanglvl=ansi
2398 # Ultrix and OSF/1 -std1
2399 # HP-UX 10.20 and later -Ae
2400 # HP-UX older versions -Aa -D_HPUX_SOURCE
2401 # SVR4 -Xc -D__EXTENSIONS__
2402 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2404 CC="$ac_save_CC $ac_arg"
2405 rm -f "conftest.$ac_objext"
2406 if { (eval echo "$as_me:2406: \"$ac_compile\"") >&5
2407 (eval $ac_compile) 2>&5
2409 echo "$as_me:2409: \$? = $ac_status" >&5
2410 (exit "$ac_status"); } &&
2411 { ac_try='test -s "conftest.$ac_objext"'
2412 { (eval echo "$as_me:2412: \"$ac_try\"") >&5
2415 echo "$as_me:2415: \$? = $ac_status" >&5
2416 (exit "$ac_status"); }; }; then
2417 ac_cv_prog_cc_stdc=$ac_arg
2420 echo "$as_me: failed program was:" >&5
2421 cat "conftest.$ac_ext" >&5
2423 rm -f "conftest.$ac_objext"
2425 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2430 case "x$ac_cv_prog_cc_stdc" in
2432 echo "$as_me:2432: result: none needed" >&5
2433 echo "${ECHO_T}none needed" >&6 ;;
2435 echo "$as_me:2435: result: $ac_cv_prog_cc_stdc" >&5
2436 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2437 CC="$CC $ac_cv_prog_cc_stdc" ;;
2440 # This should have been defined by AC_PROG_CC
2443 echo "$as_me:2443: checking \$CFLAGS variable" >&5
2444 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2447 echo "$as_me:2447: result: broken" >&5
2448 echo "${ECHO_T}broken" >&6
2449 { echo "$as_me:2449: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2450 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2453 for cf_arg in $cf_flags
2459 cf_new_extra_cppflags=
2461 for cf_add_cflags in $cf_arg
2463 case "$cf_fix_cppflags" in
2465 case "$cf_add_cflags" in
2466 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2467 case "$cf_add_cflags" in
2469 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2471 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2472 && test -z "${cf_tst_cflags}" \
2473 && cf_fix_cppflags=yes
2475 if test "$cf_fix_cppflags" = yes ; then
2477 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2478 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2481 elif test "${cf_tst_cflags}" = "\"'" ; then
2483 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2484 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2494 case "$cf_add_cflags" in
2496 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2498 CPPFLAGS=`echo "$CPPFLAGS" | \
2499 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2500 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2505 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2506 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2513 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2514 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2521 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2522 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2524 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2526 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2527 && test -z "${cf_tst_cflags}" \
2528 && cf_fix_cppflags=no
2533 if test -n "$cf_new_cflags" ; then
2535 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2536 CFLAGS="${CFLAGS}$cf_new_cflags"
2540 if test -n "$cf_new_cppflags" ; then
2542 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2543 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2547 if test -n "$cf_new_extra_cppflags" ; then
2549 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2550 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2557 echo "$as_me:2557: result: ok" >&5
2558 echo "${ECHO_T}ok" >&6
2562 echo "$as_me:2562: checking \$CC variable" >&5
2563 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2566 echo "$as_me:2566: result: broken" >&5
2567 echo "${ECHO_T}broken" >&6
2568 { echo "$as_me:2568: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2569 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2571 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2572 cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
2574 for cf_arg in $cf_flags
2582 cf_new_extra_cppflags=
2584 for cf_add_cflags in $cf_arg
2586 case "$cf_fix_cppflags" in
2588 case "$cf_add_cflags" in
2589 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2590 case "$cf_add_cflags" in
2592 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2594 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2595 && test -z "${cf_tst_cflags}" \
2596 && cf_fix_cppflags=yes
2598 if test "$cf_fix_cppflags" = yes ; then
2600 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2601 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2604 elif test "${cf_tst_cflags}" = "\"'" ; then
2606 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2607 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2617 case "$cf_add_cflags" in
2619 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2621 CPPFLAGS=`echo "$CPPFLAGS" | \
2622 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2623 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2628 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2629 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2636 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2637 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2644 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2645 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2647 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2649 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2650 && test -z "${cf_tst_cflags}" \
2651 && cf_fix_cppflags=no
2656 if test -n "$cf_new_cflags" ; then
2658 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2659 CFLAGS="${CFLAGS}$cf_new_cflags"
2663 if test -n "$cf_new_cppflags" ; then
2665 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2666 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2670 if test -n "$cf_new_extra_cppflags" ; then
2672 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2673 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2683 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2685 echo "${as_me:-configure}:2685: testing resulting CC: '$CC' ..." 1>&5
2687 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2689 echo "${as_me:-configure}:2689: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2691 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2693 echo "${as_me:-configure}:2693: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2697 echo "$as_me:2697: result: ok" >&5
2698 echo "${ECHO_T}ok" >&6
2705 echo "$as_me:2705: checking for egrep" >&5
2706 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2707 if test "${ac_cv_path_EGREP+set}" = set; then
2708 echo $ECHO_N "(cached) $ECHO_C" >&6
2710 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2711 then ac_cv_path_EGREP="$GREP -E"
2713 for ac_prog in gegrep egrep
2715 # Extract the first word of "$ac_prog", so it can be a program name with args.
2716 set dummy $ac_prog; ac_word=$2
2717 echo "$as_me:2717: checking for $ac_word" >&5
2718 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2719 if test "${ac_cv_path_EGREP+set}" = set; then
2720 echo $ECHO_N "(cached) $ECHO_C" >&6
2724 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2727 ac_save_IFS=$IFS; IFS=$ac_path_separator
2729 for ac_dir in $ac_dummy; do
2731 test -z "$ac_dir" && ac_dir=.
2732 if $as_executable_p "$ac_dir/$ac_word"; then
2733 ac_cv_path_EGREP="$ac_dir/$ac_word"
2734 echo "$as_me:2734: found $ac_dir/$ac_word" >&5
2742 EGREP=$ac_cv_path_EGREP
2744 if test -n "$EGREP"; then
2745 echo "$as_me:2745: result: $EGREP" >&5
2746 echo "${ECHO_T}$EGREP" >&6
2748 echo "$as_me:2748: result: no" >&5
2749 echo "${ECHO_T}no" >&6
2752 test -n "$EGREP" && break
2754 test -n "$EGREP" || EGREP=": "
2756 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2756: error: cannot find workable egrep" >&5
2757 echo "$as_me: error: cannot find workable egrep" >&2;}
2758 { (exit 1); exit 1; }; }
2761 echo "$as_me:2761: result: $ac_cv_path_EGREP" >&5
2762 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2763 EGREP="$ac_cv_path_EGREP"
2766 ac_cpp='$CPP $CPPFLAGS'
2767 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2768 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2769 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2770 ac_main_return="return"
2771 echo "$as_me:2771: checking how to run the C preprocessor" >&5
2772 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2773 # On Suns, sometimes $CPP names a directory.
2774 if test -n "$CPP" && test -d "$CPP"; then
2777 if test -z "$CPP"; then
2778 if test "${ac_cv_prog_CPP+set}" = set; then
2779 echo $ECHO_N "(cached) $ECHO_C" >&6
2781 # Double quotes because CPP needs to be expanded
2782 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2785 for ac_c_preproc_warn_flag in '' yes
2787 # Use a header file that comes with gcc, so configuring glibc
2788 # with a fresh cross-compiler works.
2789 # On the NeXT, cc -E runs the code through the compiler's parser,
2790 # not just through cpp. "Syntax error" is here to catch this case.
2791 cat >"conftest.$ac_ext" <<_ACEOF
2792 #line 2792 "configure"
2793 #include "confdefs.h"
2797 if { (eval echo "$as_me:2797: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2798 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2800 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2802 cat conftest.err >&5
2803 echo "$as_me:2803: \$? = $ac_status" >&5
2804 (exit "$ac_status"); } >/dev/null; then
2805 if test -s conftest.err; then
2806 ac_cpp_err=$ac_c_preproc_warn_flag
2813 if test -z "$ac_cpp_err"; then
2816 echo "$as_me: failed program was:" >&5
2817 cat "conftest.$ac_ext" >&5
2818 # Broken: fails on valid input.
2821 rm -f conftest.err "conftest.$ac_ext"
2823 # OK, works on sane cases. Now check whether non-existent headers
2824 # can be detected and how.
2825 cat >"conftest.$ac_ext" <<_ACEOF
2826 #line 2826 "configure"
2827 #include "confdefs.h"
2828 #include <ac_nonexistent.h>
2830 if { (eval echo "$as_me:2830: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2831 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2833 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2835 cat conftest.err >&5
2836 echo "$as_me:2836: \$? = $ac_status" >&5
2837 (exit "$ac_status"); } >/dev/null; then
2838 if test -s conftest.err; then
2839 ac_cpp_err=$ac_c_preproc_warn_flag
2846 if test -z "$ac_cpp_err"; then
2847 # Broken: success on invalid input.
2850 echo "$as_me: failed program was:" >&5
2851 cat "conftest.$ac_ext" >&5
2852 # Passes both tests.
2856 rm -f conftest.err "conftest.$ac_ext"
2859 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2860 rm -f conftest.err "conftest.$ac_ext"
2861 if $ac_preproc_ok; then
2873 echo "$as_me:2873: result: $CPP" >&5
2874 echo "${ECHO_T}$CPP" >&6
2876 for ac_c_preproc_warn_flag in '' yes
2878 # Use a header file that comes with gcc, so configuring glibc
2879 # with a fresh cross-compiler works.
2880 # On the NeXT, cc -E runs the code through the compiler's parser,
2881 # not just through cpp. "Syntax error" is here to catch this case.
2882 cat >"conftest.$ac_ext" <<_ACEOF
2883 #line 2883 "configure"
2884 #include "confdefs.h"
2888 if { (eval echo "$as_me:2888: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2889 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2891 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2893 cat conftest.err >&5
2894 echo "$as_me:2894: \$? = $ac_status" >&5
2895 (exit "$ac_status"); } >/dev/null; then
2896 if test -s conftest.err; then
2897 ac_cpp_err=$ac_c_preproc_warn_flag
2904 if test -z "$ac_cpp_err"; then
2907 echo "$as_me: failed program was:" >&5
2908 cat "conftest.$ac_ext" >&5
2909 # Broken: fails on valid input.
2912 rm -f conftest.err "conftest.$ac_ext"
2914 # OK, works on sane cases. Now check whether non-existent headers
2915 # can be detected and how.
2916 cat >"conftest.$ac_ext" <<_ACEOF
2917 #line 2917 "configure"
2918 #include "confdefs.h"
2919 #include <ac_nonexistent.h>
2921 if { (eval echo "$as_me:2921: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2922 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2924 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2926 cat conftest.err >&5
2927 echo "$as_me:2927: \$? = $ac_status" >&5
2928 (exit "$ac_status"); } >/dev/null; then
2929 if test -s conftest.err; then
2930 ac_cpp_err=$ac_c_preproc_warn_flag
2937 if test -z "$ac_cpp_err"; then
2938 # Broken: success on invalid input.
2941 echo "$as_me: failed program was:" >&5
2942 cat "conftest.$ac_ext" >&5
2943 # Passes both tests.
2947 rm -f conftest.err "conftest.$ac_ext"
2950 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2951 rm -f conftest.err "conftest.$ac_ext"
2952 if $ac_preproc_ok; then
2955 { { echo "$as_me:2955: error: C preprocessor \"$CPP\" fails sanity check" >&5
2956 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2957 { (exit 1); exit 1; }; }
2961 ac_cpp='$CPP $CPPFLAGS'
2962 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2963 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2964 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2965 ac_main_return="return"
2967 if test $ac_cv_c_compiler_gnu = yes; then
2968 echo "$as_me:2968: checking whether $CC needs -traditional" >&5
2969 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2970 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2971 echo $ECHO_N "(cached) $ECHO_C" >&6
2973 ac_pattern="Autoconf.*'x'"
2974 cat >"conftest.$ac_ext" <<_ACEOF
2975 #line 2975 "configure"
2976 #include "confdefs.h"
2978 int Autoconf = TIOCGETP;
2980 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2981 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2982 ac_cv_prog_gcc_traditional=yes
2984 ac_cv_prog_gcc_traditional=no
2988 if test $ac_cv_prog_gcc_traditional = no; then
2989 cat >"conftest.$ac_ext" <<_ACEOF
2990 #line 2990 "configure"
2991 #include "confdefs.h"
2993 int Autoconf = TCGETA;
2995 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2996 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2997 ac_cv_prog_gcc_traditional=yes
3003 echo "$as_me:3003: result: $ac_cv_prog_gcc_traditional" >&5
3004 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3005 if test $ac_cv_prog_gcc_traditional = yes; then
3006 CC="$CC -traditional"
3010 echo "$as_me:3010: checking whether $CC understands -c and -o together" >&5
3011 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3012 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3013 echo $ECHO_N "(cached) $ECHO_C" >&6
3016 cat > conftest.$ac_ext <<CF_EOF
3019 ${cf_cv_main_return:-return}(0);
3022 # We do the test twice because some compilers refuse to overwrite an
3023 # existing .o file with -o, though they will create one.
3024 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3025 if { (eval echo "$as_me:3025: \"$ac_try\"") >&5
3028 echo "$as_me:3028: \$? = $ac_status" >&5
3029 (exit "$ac_status"); } &&
3030 test -f conftest2.$ac_objext && { (eval echo "$as_me:3030: \"$ac_try\"") >&5
3033 echo "$as_me:3033: \$? = $ac_status" >&5
3034 (exit "$ac_status"); };
3036 eval cf_cv_prog_CC_c_o=yes
3038 eval cf_cv_prog_CC_c_o=no
3043 if test "$cf_cv_prog_CC_c_o" = yes; then
3044 echo "$as_me:3044: result: yes" >&5
3045 echo "${ECHO_T}yes" >&6
3047 echo "$as_me:3047: result: no" >&5
3048 echo "${ECHO_T}no" >&6
3051 test "$program_prefix" != NONE &&
3052 program_transform_name="s,^,$program_prefix,;$program_transform_name"
3053 # Use a double $ so make ignores it.
3054 test "$program_suffix" != NONE &&
3055 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3056 # Double any \ or $. echo might interpret backslashes.
3057 # By default was `s,x,x', remove it if useless.
3058 cat <<\_ACEOF >conftest.sed
3059 s/[\\$]/&&/g;s/;s,x,x,$//
3061 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3064 for ac_prog in mawk gawk nawk awk
3066 # Extract the first word of "$ac_prog", so it can be a program name with args.
3067 set dummy $ac_prog; ac_word=$2
3068 echo "$as_me:3068: checking for $ac_word" >&5
3069 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3070 if test "${ac_cv_prog_AWK+set}" = set; then
3071 echo $ECHO_N "(cached) $ECHO_C" >&6
3073 if test -n "$AWK"; then
3074 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3076 ac_save_IFS=$IFS; IFS=$ac_path_separator
3078 for ac_dir in $ac_dummy; do
3080 test -z "$ac_dir" && ac_dir=.
3081 $as_executable_p "$ac_dir/$ac_word" || continue
3082 ac_cv_prog_AWK="$ac_prog"
3083 echo "$as_me:3083: found $ac_dir/$ac_word" >&5
3090 if test -n "$AWK"; then
3091 echo "$as_me:3091: result: $AWK" >&5
3092 echo "${ECHO_T}$AWK" >&6
3094 echo "$as_me:3094: result: no" >&5
3095 echo "${ECHO_T}no" >&6
3098 test -n "$AWK" && break
3101 test -z "$AWK" && { { echo "$as_me:3101: error: No awk program found" >&5
3102 echo "$as_me: error: No awk program found" >&2;}
3103 { (exit 1); exit 1; }; }
3105 echo "$as_me:3105: checking for egrep" >&5
3106 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3107 if test "${ac_cv_prog_egrep+set}" = set; then
3108 echo $ECHO_N "(cached) $ECHO_C" >&6
3110 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3111 then ac_cv_prog_egrep='grep -E'
3112 else ac_cv_prog_egrep='egrep'
3115 echo "$as_me:3115: result: $ac_cv_prog_egrep" >&5
3116 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3117 EGREP=$ac_cv_prog_egrep
3119 test -z "$EGREP" && { { echo "$as_me:3119: error: No egrep program found" >&5
3120 echo "$as_me: error: No egrep program found" >&2;}
3121 { (exit 1); exit 1; }; }
3123 # Find a good install program. We prefer a C program (faster),
3124 # so one script is as good as another. But avoid the broken or
3125 # incompatible versions:
3126 # SysV /etc/install, /usr/sbin/install
3127 # SunOS /usr/etc/install
3128 # IRIX /sbin/install
3130 # AmigaOS /C/install, which installs bootblocks on floppy discs
3131 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3132 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3133 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3134 # ./install, which can be erroneously created by make from ./install.sh.
3135 echo "$as_me:3135: checking for a BSD compatible install" >&5
3136 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3137 if test -z "$INSTALL"; then
3138 if test "${ac_cv_path_install+set}" = set; then
3139 echo $ECHO_N "(cached) $ECHO_C" >&6
3141 ac_save_IFS=$IFS; IFS=$ac_path_separator
3142 for ac_dir in $PATH; do
3144 # Account for people who put trailing slashes in PATH elements.
3146 / | ./ | .// | /cC/* \
3147 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3150 # OSF1 and SCO ODT 3.0 have their own names for install.
3151 # Don't use installbsd from OSF since it installs stuff as root
3153 for ac_prog in ginstall scoinst install; do
3154 if $as_executable_p "$ac_dir/$ac_prog"; then
3155 if test $ac_prog = install &&
3156 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3157 # AIX install. It has an incompatible calling convention.
3159 elif test $ac_prog = install &&
3160 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3161 # program-specific install script used by HP pwplus--don't use.
3164 ac_cv_path_install="$ac_dir/$ac_prog -c"
3174 if test "${ac_cv_path_install+set}" = set; then
3175 INSTALL=$ac_cv_path_install
3177 # As a last resort, use the slow shell script. We don't cache a
3178 # path for INSTALL within a source directory, because that will
3179 # break other packages using the cache if that directory is
3180 # removed, or if the path is relative.
3181 INSTALL=$ac_install_sh
3184 echo "$as_me:3184: result: $INSTALL" >&5
3185 echo "${ECHO_T}$INSTALL" >&6
3187 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3188 # It thinks the first close brace ends the variable substitution.
3189 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3191 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3193 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3195 echo "$as_me:3195: checking whether ln -s works" >&5
3196 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3198 if test "$LN_S" = "ln -s"; then
3199 echo "$as_me:3199: result: yes" >&5
3200 echo "${ECHO_T}yes" >&6
3202 echo "$as_me:3202: result: no, using $LN_S" >&5
3203 echo "${ECHO_T}no, using $LN_S" >&6
3206 echo "$as_me:3206: checking if $LN_S -f options work" >&5
3207 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3209 rm -f conf$$.src conf$$dst
3211 echo first >conf$$.src
3212 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3217 rm -f conf$$.dst conf$$src
3218 echo "$as_me:3218: result: $cf_prog_ln_sf" >&5
3219 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3221 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3223 # Find a good install program. We prefer a C program (faster),
3224 # so one script is as good as another. But avoid the broken or
3225 # incompatible versions:
3226 # SysV /etc/install, /usr/sbin/install
3227 # SunOS /usr/etc/install
3228 # IRIX /sbin/install
3230 # AmigaOS /C/install, which installs bootblocks on floppy discs
3231 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3232 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3233 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3234 # ./install, which can be erroneously created by make from ./install.sh.
3235 echo "$as_me:3235: checking for a BSD compatible install" >&5
3236 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3237 if test -z "$INSTALL"; then
3238 if test "${ac_cv_path_install+set}" = set; then
3239 echo $ECHO_N "(cached) $ECHO_C" >&6
3241 ac_save_IFS=$IFS; IFS=$ac_path_separator
3242 for ac_dir in $PATH; do
3244 # Account for people who put trailing slashes in PATH elements.
3246 / | ./ | .// | /cC/* \
3247 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3250 # OSF1 and SCO ODT 3.0 have their own names for install.
3251 # Don't use installbsd from OSF since it installs stuff as root
3253 for ac_prog in ginstall scoinst install; do
3254 if $as_executable_p "$ac_dir/$ac_prog"; then
3255 if test $ac_prog = install &&
3256 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3257 # AIX install. It has an incompatible calling convention.
3259 elif test $ac_prog = install &&
3260 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3261 # program-specific install script used by HP pwplus--don't use.
3264 ac_cv_path_install="$ac_dir/$ac_prog -c"
3274 if test "${ac_cv_path_install+set}" = set; then
3275 INSTALL=$ac_cv_path_install
3277 # As a last resort, use the slow shell script. We don't cache a
3278 # path for INSTALL within a source directory, because that will
3279 # break other packages using the cache if that directory is
3280 # removed, or if the path is relative.
3281 INSTALL=$ac_install_sh
3284 echo "$as_me:3284: result: $INSTALL" >&5
3285 echo "${ECHO_T}$INSTALL" >&6
3287 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3288 # It thinks the first close brace ends the variable substitution.
3289 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3291 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3293 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3299 cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3300 test -z "$cf_dir" && cf_dir=.
3301 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3305 echo "$as_me:3305: checking if you want to install stripped executables" >&5
3306 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
3308 # Check whether --enable-stripping or --disable-stripping was given.
3309 if test "${enable_stripping+set}" = set; then
3310 enableval="$enable_stripping"
3311 test "$enableval" != no && enableval=yes
3312 if test "$enableval" != "yes" ; then
3315 enable_stripping=yes
3319 enable_stripping=yes
3322 echo "$as_me:3322: result: $enable_stripping" >&5
3323 echo "${ECHO_T}$enable_stripping" >&6
3325 if test "$enable_stripping" = yes
3332 : "${INSTALL:=install}"
3333 echo "$as_me:3333: checking if install accepts -p option" >&5
3334 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
3335 if test "${cf_cv_install_p+set}" = set; then
3336 echo $ECHO_N "(cached) $ECHO_C" >&6
3343 if $INSTALL -p conftest.in conftest.out 2>/dev/null
3345 if test -f conftest.out/conftest.in
3347 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
3348 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
3349 if test -s conftest.err
3364 echo "$as_me:3364: result: $cf_cv_install_p" >&5
3365 echo "${ECHO_T}$cf_cv_install_p" >&6
3367 echo "$as_me:3367: checking if install needs to be told about ownership" >&5
3368 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
3369 case `$ac_config_guess` in
3378 echo "$as_me:3378: result: $with_install_o" >&5
3379 echo "${ECHO_T}$with_install_o" >&6
3380 if test "x$with_install_o" = xyes
3382 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'`"
3387 if test -n "$INSTALL_OPT_S"
3389 echo "$as_me:3389: checking if you want to specify strip-program" >&5
3390 echo $ECHO_N "checking if you want to specify strip-program... $ECHO_C" >&6
3392 # Check whether --with-strip-program or --without-strip-program was given.
3393 if test "${with_strip_program+set}" = set; then
3394 withval="$with_strip_program"
3395 with_strip_program=$withval
3397 with_strip_program=no
3399 echo "$as_me:3399: result: $with_strip_program" >&5
3400 echo "${ECHO_T}$with_strip_program" >&6
3401 if test "$with_strip_program" != no
3403 echo "$as_me:3403: checking if strip-program is supported with this installer" >&5
3404 echo $ECHO_N "checking if strip-program is supported with this installer... $ECHO_C" >&6
3405 cf_install_program=`echo "$INSTALL" | sed -e 's%[ ]*[ ]-.%%'`
3406 check_install_strip=no
3407 if test -f "$cf_install_program"
3409 check_install_version=`"$cf_install_program" --version 2>/dev/null | head -n 1 | grep coreutils`
3410 if test -n "$check_install_version"
3412 check_install_strip="option"
3414 for check_strip_variable in STRIPBIN STRIP
3416 if strings "$cf_install_program" | grep "^$check_strip_variable$" >/dev/null
3418 check_install_strip="environ"
3424 echo "$as_me:3424: result: $check_install_strip" >&5
3425 echo "${ECHO_T}$check_install_strip" >&6
3426 case "$check_install_strip" in
3428 { echo "$as_me:3428: WARNING: $cf_install_program does not support strip program option" >&5
3429 echo "$as_me: WARNING: $cf_install_program does not support strip program option" >&2;}
3430 with_strip_program=no
3433 cat >install.tmp <<-CF_EOF
3435 STRIPBIN="$with_strip_program" \\
3436 STRIP="$with_strip_program" \\
3439 INSTALL="`pwd`/install.tmp"
3441 test -n "$verbose" && echo " created $INSTALL" 1>&6
3443 echo "${as_me:-configure}:3443: testing created $INSTALL ..." 1>&5
3447 INSTALL_OPT_S="$INSTALL_OPT_S --strip-program=\"$with_strip_program\""
3453 echo "$as_me:3453: checking for long file names" >&5
3454 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3455 if test "${ac_cv_sys_long_file_names+set}" = set; then
3456 echo $ECHO_N "(cached) $ECHO_C" >&6
3458 ac_cv_sys_long_file_names=yes
3459 # Test for long file names in all the places we know might matter:
3460 # . the current directory, where building will happen
3461 # $prefix/lib where we will be installing things
3462 # $exec_prefix/lib likewise
3463 # eval it to expand exec_prefix.
3464 # $TMPDIR if set, where it might want to write temporary files
3465 # if $TMPDIR is not set:
3466 # /tmp where it might want to write temporary files
3469 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3472 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3474 for ac_dir in . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3475 test -d "$ac_dir" || continue
3476 test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3477 ac_xdir=$ac_dir/cf$$
3478 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3479 ac_tf1=$ac_xdir/conftest9012345
3480 ac_tf2=$ac_xdir/conftest9012346
3481 (echo 1 >"$ac_tf1") 2>/dev/null
3482 (echo 2 >"$ac_tf2") 2>/dev/null
3483 ac_val=`cat "$ac_tf1" 2>/dev/null`
3484 if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3485 ac_cv_sys_long_file_names=no
3486 rm -rf "$ac_xdir" 2>/dev/null
3489 rm -rf "$ac_xdir" 2>/dev/null
3492 echo "$as_me:3492: result: $ac_cv_sys_long_file_names" >&5
3493 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3494 if test "$ac_cv_sys_long_file_names" = yes; then
3496 cat >>confdefs.h <<\EOF
3497 #define HAVE_LONG_FILE_NAMES 1
3502 # if we find pkg-config, check if we should install the ".pc" files.
3504 echo "$as_me:3504: checking if you want to use pkg-config" >&5
3505 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3507 # Check whether --with-pkg-config or --without-pkg-config was given.
3508 if test "${with_pkg_config+set}" = set; then
3509 withval="$with_pkg_config"
3510 cf_pkg_config=$withval
3514 echo "$as_me:3514: result: $cf_pkg_config" >&5
3515 echo "${ECHO_T}$cf_pkg_config" >&6
3517 case "$cf_pkg_config" in
3523 if test -n "$ac_tool_prefix"; then
3524 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3525 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3526 echo "$as_me:3526: checking for $ac_word" >&5
3527 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3528 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3529 echo $ECHO_N "(cached) $ECHO_C" >&6
3533 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3536 ac_save_IFS=$IFS; IFS=$ac_path_separator
3538 for ac_dir in $ac_dummy; do
3540 test -z "$ac_dir" && ac_dir=.
3541 if $as_executable_p "$ac_dir/$ac_word"; then
3542 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3543 echo "$as_me:3543: found $ac_dir/$ac_word" >&5
3551 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3553 if test -n "$PKG_CONFIG"; then
3554 echo "$as_me:3554: result: $PKG_CONFIG" >&5
3555 echo "${ECHO_T}$PKG_CONFIG" >&6
3557 echo "$as_me:3557: result: no" >&5
3558 echo "${ECHO_T}no" >&6
3562 if test -z "$ac_cv_path_PKG_CONFIG"; then
3563 ac_pt_PKG_CONFIG=$PKG_CONFIG
3564 # Extract the first word of "pkg-config", so it can be a program name with args.
3565 set dummy pkg-config; ac_word=$2
3566 echo "$as_me:3566: checking for $ac_word" >&5
3567 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3568 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3569 echo $ECHO_N "(cached) $ECHO_C" >&6
3571 case $ac_pt_PKG_CONFIG in
3573 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3576 ac_save_IFS=$IFS; IFS=$ac_path_separator
3578 for ac_dir in $ac_dummy; do
3580 test -z "$ac_dir" && ac_dir=.
3581 if $as_executable_p "$ac_dir/$ac_word"; then
3582 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3583 echo "$as_me:3583: found $ac_dir/$ac_word" >&5
3588 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3592 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3594 if test -n "$ac_pt_PKG_CONFIG"; then
3595 echo "$as_me:3595: result: $ac_pt_PKG_CONFIG" >&5
3596 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3598 echo "$as_me:3598: result: no" >&5
3599 echo "${ECHO_T}no" >&6
3602 PKG_CONFIG=$ac_pt_PKG_CONFIG
3604 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3613 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3614 if test "$PKG_CONFIG" != none ; then
3616 if test "x$prefix" != xNONE; then
3617 cf_path_syntax="$prefix"
3619 cf_path_syntax="$ac_default_prefix"
3622 case ".$PKG_CONFIG" in
3627 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3629 (.\$\{*prefix\}*|.\$\{*dir\}*)
3630 eval PKG_CONFIG="$PKG_CONFIG"
3631 case ".$PKG_CONFIG" in
3633 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3638 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3641 { { echo "$as_me:3641: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3642 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3643 { (exit 1); exit 1; }; }
3647 elif test "x$cf_pkg_config" != xno ; then
3648 { echo "$as_me:3648: WARNING: pkg-config is not installed" >&5
3649 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3652 case "$PKG_CONFIG" in
3654 echo "$as_me:3654: checking for pkg-config library directory" >&5
3655 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3658 echo "$as_me:3658: checking for $PKG_CONFIG library directory" >&5
3659 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3663 # if $PKG_CONFIG_LIBDIR is set, try to use that
3664 if test -n "$PKG_CONFIG_PATH"; then
3665 cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[ ]*,,' -e 's,[ ]*$,,'`
3666 elif test -n "$PKG_CONFIG_LIBDIR"; then
3667 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[ ]*,,' -e 's,[ ]*$,,'`
3672 # if the option is used, let that override. otherwise default to "libdir"
3674 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3675 if test "${with_pkg_config_libdir+set}" = set; then
3676 withval="$with_pkg_config_libdir"
3677 cf_search_path=$withval
3679 test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
3682 case "x$cf_search_path" in
3684 PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
3685 echo "$as_me:3685: result: $PKG_CONFIG_LIBDIR" >&5
3686 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3695 PKG_CONFIG_LIBDIR="$cf_search_path"
3696 echo "$as_me:3696: result: $PKG_CONFIG_LIBDIR" >&5
3697 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3701 echo "$as_me:3701: result: auto" >&5
3702 echo "${ECHO_T}auto" >&6
3704 # Look for the library directory using the same prefix as the executable
3705 echo "$as_me:3705: checking for search-list" >&5
3706 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
3707 if test "x$PKG_CONFIG" != xnone
3709 # works for pkg-config since version 0.24 (2009)
3710 # works for pkgconf since version 0.8.3 (2012)
3711 for cf_pkg_program in \
3712 `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
3716 cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
3717 test -n "$cf_search_path" && break
3720 # works for pkg-config since import in 2005 of original 2001 HP code.
3721 test -z "$cf_search_path" && \
3723 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
3724 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
3725 sub(\"^[^']*'\",\"\"); \
3726 sub(\"'.*\",\"\"); \
3727 printf \" %s\", \\$0; } \
3732 echo "$as_me:3732: result: $cf_search_path" >&5
3733 echo "${ECHO_T}$cf_search_path" >&6
3736 { { echo "$as_me:3736: error: Unexpected option value: $cf_search_path" >&5
3737 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
3738 { (exit 1); exit 1; }; }
3742 if test -n "$cf_search_path"
3744 echo "$as_me:3744: checking for first directory" >&5
3745 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
3746 cf_pkg_config_path=none
3747 for cf_config in $cf_search_path
3749 if test -d "$cf_config"
3751 cf_pkg_config_path=$cf_config
3755 echo "$as_me:3755: result: $cf_pkg_config_path" >&5
3756 echo "${ECHO_T}$cf_pkg_config_path" >&6
3758 if test "x$cf_pkg_config_path" != xnone ; then
3759 # limit this to the first directory found
3760 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
3763 if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
3765 echo "$as_me:3765: checking for workaround" >&5
3766 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
3767 if test "$prefix" = "NONE" ; then
3768 cf_prefix="$ac_default_prefix"
3772 eval cf_libdir=$libdir
3773 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
3775 for cf_config in $cf_search_path
3778 $cf_libdir/pkgconfig)
3779 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
3783 test -z "$cf_backup" && cf_backup=$cf_config
3787 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
3788 echo "$as_me:3788: result: $PKG_CONFIG_LIBDIR" >&5
3789 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3793 echo "$as_me:3793: checking if you want to build test-programs" >&5
3794 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3796 # Check whether --with-tests or --without-tests was given.
3797 if test "${with_tests+set}" = set; then
3798 withval="$with_tests"
3799 cf_with_tests=$withval
3803 echo "$as_me:3803: result: $cf_with_tests" >&5
3804 echo "${ECHO_T}$cf_with_tests" >&6
3806 echo "$as_me:3806: checking if we should assume mixed-case filenames" >&5
3807 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3809 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3810 if test "${enable_mixed_case+set}" = set; then
3811 enableval="$enable_mixed_case"
3812 enable_mixedcase=$enableval
3814 enable_mixedcase=auto
3816 echo "$as_me:3816: result: $enable_mixedcase" >&5
3817 echo "${ECHO_T}$enable_mixedcase" >&6
3818 if test "$enable_mixedcase" = "auto" ; then
3820 echo "$as_me:3820: checking if filesystem supports mixed-case filenames" >&5
3821 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3822 if test "${cf_cv_mixedcase+set}" = set; then
3823 echo $ECHO_N "(cached) $ECHO_C" >&6
3826 if test "$cross_compiling" = yes ; then
3827 case "$target_alias" in
3828 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3836 rm -f conftest CONFTEST
3838 if test -f CONFTEST ; then
3843 rm -f conftest CONFTEST
3847 echo "$as_me:3847: result: $cf_cv_mixedcase" >&5
3848 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3849 test "$cf_cv_mixedcase" = yes &&
3850 cat >>confdefs.h <<\EOF
3851 #define MIXEDCASE_FILENAMES 1
3855 cf_cv_mixedcase=$enable_mixedcase
3856 if test "$enable_mixedcase" = "yes" ; then
3857 cat >>confdefs.h <<\EOF
3858 #define MIXEDCASE_FILENAMES 1
3864 # do this after mixed-case option (tags/TAGS is not as important as tic).
3865 echo "$as_me:3865: checking whether ${MAKE-make} sets \${MAKE}" >&5
3866 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3867 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3868 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3869 echo $ECHO_N "(cached) $ECHO_C" >&6
3871 cat >conftest.make <<\EOF
3873 @echo 'ac_maketemp="${MAKE}"'
3875 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3876 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3877 if test -n "$ac_maketemp"; then
3878 eval ac_cv_prog_make_${ac_make}_set=yes
3880 eval ac_cv_prog_make_${ac_make}_set=no
3884 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3885 echo "$as_me:3885: result: yes" >&5
3886 echo "${ECHO_T}yes" >&6
3889 echo "$as_me:3889: result: no" >&5
3890 echo "${ECHO_T}no" >&6
3891 SET_MAKE="MAKE=${MAKE-make}"
3894 echo "$as_me:3894: checking for \".PHONY\" make-support" >&5
3895 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
3896 if test "${cf_cv_make_PHONY+set}" = set; then
3897 echo $ECHO_N "(cached) $ECHO_C" >&6
3902 mkdir conftest || exit 1
3904 cat >makefile <<'CF_EOF'
3908 @echo "** making $@ $(DATA)"
3910 @echo "** making $@ $(DATA)"
3912 @echo "** making $@ $(DATA)"
3915 @echo "** making $@ $(DATA)"
3918 for cf_data in 1 2 3
3920 ${MAKE:-make} always DATA=$cf_data
3921 ${MAKE:-make} once DATA=$cf_data
3922 ${MAKE:-make} -t always once
3923 if test -f always ; then
3924 echo "no (case 1)" > ../conftest.tmp
3925 elif test ! -f always.out ; then
3926 echo "no (case 2)" > ../conftest.tmp
3927 elif test ! -f once.out ; then
3928 echo "no (case 3)" > ../conftest.tmp
3929 elif ! cmp -s always.out once.out ; then
3930 echo "no (case 4)" > ../conftest.tmp
3931 diff always.out once.out
3933 cf_check="`cat always.out`"
3934 if test "x$cf_check" != "x$cf_data" ; then
3935 echo "no (case 5)" > ../conftest.tmp
3937 echo yes > ../conftest.tmp
3945 cf_cv_make_PHONY="`cat conftest.tmp`"
3949 echo "$as_me:3949: result: $cf_cv_make_PHONY" >&5
3950 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
3953 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
3954 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
3956 for ac_prog in exctags ctags
3958 # Extract the first word of "$ac_prog", so it can be a program name with args.
3959 set dummy $ac_prog; ac_word=$2
3960 echo "$as_me:3960: checking for $ac_word" >&5
3961 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3962 if test "${ac_cv_prog_CTAGS+set}" = set; then
3963 echo $ECHO_N "(cached) $ECHO_C" >&6
3965 if test -n "$CTAGS"; then
3966 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3968 ac_save_IFS=$IFS; IFS=$ac_path_separator
3970 for ac_dir in $ac_dummy; do
3972 test -z "$ac_dir" && ac_dir=.
3973 $as_executable_p "$ac_dir/$ac_word" || continue
3974 ac_cv_prog_CTAGS="$ac_prog"
3975 echo "$as_me:3975: found $ac_dir/$ac_word" >&5
3981 CTAGS=$ac_cv_prog_CTAGS
3982 if test -n "$CTAGS"; then
3983 echo "$as_me:3983: result: $CTAGS" >&5
3984 echo "${ECHO_T}$CTAGS" >&6
3986 echo "$as_me:3986: result: no" >&5
3987 echo "${ECHO_T}no" >&6
3990 test -n "$CTAGS" && break
3993 for ac_prog in exetags etags
3995 # Extract the first word of "$ac_prog", so it can be a program name with args.
3996 set dummy $ac_prog; ac_word=$2
3997 echo "$as_me:3997: checking for $ac_word" >&5
3998 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3999 if test "${ac_cv_prog_ETAGS+set}" = set; then
4000 echo $ECHO_N "(cached) $ECHO_C" >&6
4002 if test -n "$ETAGS"; then
4003 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4005 ac_save_IFS=$IFS; IFS=$ac_path_separator
4007 for ac_dir in $ac_dummy; do
4009 test -z "$ac_dir" && ac_dir=.
4010 $as_executable_p "$ac_dir/$ac_word" || continue
4011 ac_cv_prog_ETAGS="$ac_prog"
4012 echo "$as_me:4012: found $ac_dir/$ac_word" >&5
4018 ETAGS=$ac_cv_prog_ETAGS
4019 if test -n "$ETAGS"; then
4020 echo "$as_me:4020: result: $ETAGS" >&5
4021 echo "${ECHO_T}$ETAGS" >&6
4023 echo "$as_me:4023: result: no" >&5
4024 echo "${ECHO_T}no" >&6
4027 test -n "$ETAGS" && break
4030 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4031 set dummy ${CTAGS:-ctags}; ac_word=$2
4032 echo "$as_me:4032: checking for $ac_word" >&5
4033 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4034 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4035 echo $ECHO_N "(cached) $ECHO_C" >&6
4037 if test -n "$MAKE_LOWER_TAGS"; then
4038 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4040 ac_save_IFS=$IFS; IFS=$ac_path_separator
4042 for ac_dir in $ac_dummy; do
4044 test -z "$ac_dir" && ac_dir=.
4045 $as_executable_p "$ac_dir/$ac_word" || continue
4046 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4047 echo "$as_me:4047: found $ac_dir/$ac_word" >&5
4051 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4054 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4055 if test -n "$MAKE_LOWER_TAGS"; then
4056 echo "$as_me:4056: result: $MAKE_LOWER_TAGS" >&5
4057 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4059 echo "$as_me:4059: result: no" >&5
4060 echo "${ECHO_T}no" >&6
4063 if test "$cf_cv_mixedcase" = yes ; then
4064 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4065 set dummy ${ETAGS:-etags}; ac_word=$2
4066 echo "$as_me:4066: checking for $ac_word" >&5
4067 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4068 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4069 echo $ECHO_N "(cached) $ECHO_C" >&6
4071 if test -n "$MAKE_UPPER_TAGS"; then
4072 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4074 ac_save_IFS=$IFS; IFS=$ac_path_separator
4076 for ac_dir in $ac_dummy; do
4078 test -z "$ac_dir" && ac_dir=.
4079 $as_executable_p "$ac_dir/$ac_word" || continue
4080 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4081 echo "$as_me:4081: found $ac_dir/$ac_word" >&5
4085 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4088 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4089 if test -n "$MAKE_UPPER_TAGS"; then
4090 echo "$as_me:4090: result: $MAKE_UPPER_TAGS" >&5
4091 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4093 echo "$as_me:4093: result: no" >&5
4094 echo "${ECHO_T}no" >&6
4101 if test "$MAKE_UPPER_TAGS" = yes ; then
4107 if test "$MAKE_LOWER_TAGS" = yes ; then
4113 echo "$as_me:4113: checking for makeflags variable" >&5
4114 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4115 if test "${cf_cv_makeflags+set}" = set; then
4116 echo $ECHO_N "(cached) $ECHO_C" >&6
4120 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4122 cat >cf_makeflags.tmp <<CF_EOF
4125 @ echo '.$cf_option'
4127 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[ ]*$,,'`
4128 case "$cf_result" in
4130 cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4131 case "$cf_result" in
4132 (.*CC=*) cf_cv_makeflags=
4134 (*) cf_cv_makeflags=$cf_option
4143 echo "${as_me:-configure}:4143: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4148 rm -f cf_makeflags.tmp
4151 echo "$as_me:4151: result: $cf_cv_makeflags" >&5
4152 echo "${ECHO_T}$cf_cv_makeflags" >&6
4154 if test -n "$ac_tool_prefix"; then
4155 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4156 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4157 echo "$as_me:4157: checking for $ac_word" >&5
4158 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4159 if test "${ac_cv_prog_RANLIB+set}" = set; then
4160 echo $ECHO_N "(cached) $ECHO_C" >&6
4162 if test -n "$RANLIB"; then
4163 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4165 ac_save_IFS=$IFS; IFS=$ac_path_separator
4167 for ac_dir in $ac_dummy; do
4169 test -z "$ac_dir" && ac_dir=.
4170 $as_executable_p "$ac_dir/$ac_word" || continue
4171 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4172 echo "$as_me:4172: found $ac_dir/$ac_word" >&5
4178 RANLIB=$ac_cv_prog_RANLIB
4179 if test -n "$RANLIB"; then
4180 echo "$as_me:4180: result: $RANLIB" >&5
4181 echo "${ECHO_T}$RANLIB" >&6
4183 echo "$as_me:4183: result: no" >&5
4184 echo "${ECHO_T}no" >&6
4188 if test -z "$ac_cv_prog_RANLIB"; then
4189 ac_ct_RANLIB=$RANLIB
4190 # Extract the first word of "ranlib", so it can be a program name with args.
4191 set dummy ranlib; ac_word=$2
4192 echo "$as_me:4192: checking for $ac_word" >&5
4193 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4194 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4195 echo $ECHO_N "(cached) $ECHO_C" >&6
4197 if test -n "$ac_ct_RANLIB"; then
4198 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4200 ac_save_IFS=$IFS; IFS=$ac_path_separator
4202 for ac_dir in $ac_dummy; do
4204 test -z "$ac_dir" && ac_dir=.
4205 $as_executable_p "$ac_dir/$ac_word" || continue
4206 ac_cv_prog_ac_ct_RANLIB="ranlib"
4207 echo "$as_me:4207: found $ac_dir/$ac_word" >&5
4211 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4214 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4215 if test -n "$ac_ct_RANLIB"; then
4216 echo "$as_me:4216: result: $ac_ct_RANLIB" >&5
4217 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4219 echo "$as_me:4219: result: no" >&5
4220 echo "${ECHO_T}no" >&6
4223 RANLIB=$ac_ct_RANLIB
4225 RANLIB="$ac_cv_prog_RANLIB"
4228 if test -n "$ac_tool_prefix"; then
4229 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4230 set dummy ${ac_tool_prefix}ld; ac_word=$2
4231 echo "$as_me:4231: checking for $ac_word" >&5
4232 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4233 if test "${ac_cv_prog_LD+set}" = set; then
4234 echo $ECHO_N "(cached) $ECHO_C" >&6
4236 if test -n "$LD"; then
4237 ac_cv_prog_LD="$LD" # Let the user override the test.
4239 ac_save_IFS=$IFS; IFS=$ac_path_separator
4241 for ac_dir in $ac_dummy; do
4243 test -z "$ac_dir" && ac_dir=.
4244 $as_executable_p "$ac_dir/$ac_word" || continue
4245 ac_cv_prog_LD="${ac_tool_prefix}ld"
4246 echo "$as_me:4246: found $ac_dir/$ac_word" >&5
4253 if test -n "$LD"; then
4254 echo "$as_me:4254: result: $LD" >&5
4255 echo "${ECHO_T}$LD" >&6
4257 echo "$as_me:4257: result: no" >&5
4258 echo "${ECHO_T}no" >&6
4262 if test -z "$ac_cv_prog_LD"; then
4264 # Extract the first word of "ld", so it can be a program name with args.
4265 set dummy ld; ac_word=$2
4266 echo "$as_me:4266: checking for $ac_word" >&5
4267 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4268 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4269 echo $ECHO_N "(cached) $ECHO_C" >&6
4271 if test -n "$ac_ct_LD"; then
4272 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4274 ac_save_IFS=$IFS; IFS=$ac_path_separator
4276 for ac_dir in $ac_dummy; do
4278 test -z "$ac_dir" && ac_dir=.
4279 $as_executable_p "$ac_dir/$ac_word" || continue
4280 ac_cv_prog_ac_ct_LD="ld"
4281 echo "$as_me:4281: found $ac_dir/$ac_word" >&5
4285 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4288 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4289 if test -n "$ac_ct_LD"; then
4290 echo "$as_me:4290: result: $ac_ct_LD" >&5
4291 echo "${ECHO_T}$ac_ct_LD" >&6
4293 echo "$as_me:4293: result: no" >&5
4294 echo "${ECHO_T}no" >&6
4302 if test -n "$ac_tool_prefix"; then
4303 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4304 set dummy ${ac_tool_prefix}ar; ac_word=$2
4305 echo "$as_me:4305: checking for $ac_word" >&5
4306 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4307 if test "${ac_cv_prog_AR+set}" = set; then
4308 echo $ECHO_N "(cached) $ECHO_C" >&6
4310 if test -n "$AR"; then
4311 ac_cv_prog_AR="$AR" # Let the user override the test.
4313 ac_save_IFS=$IFS; IFS=$ac_path_separator
4315 for ac_dir in $ac_dummy; do
4317 test -z "$ac_dir" && ac_dir=.
4318 $as_executable_p "$ac_dir/$ac_word" || continue
4319 ac_cv_prog_AR="${ac_tool_prefix}ar"
4320 echo "$as_me:4320: found $ac_dir/$ac_word" >&5
4327 if test -n "$AR"; then
4328 echo "$as_me:4328: result: $AR" >&5
4329 echo "${ECHO_T}$AR" >&6
4331 echo "$as_me:4331: result: no" >&5
4332 echo "${ECHO_T}no" >&6
4336 if test -z "$ac_cv_prog_AR"; then
4338 # Extract the first word of "ar", so it can be a program name with args.
4339 set dummy ar; ac_word=$2
4340 echo "$as_me:4340: checking for $ac_word" >&5
4341 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4342 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4343 echo $ECHO_N "(cached) $ECHO_C" >&6
4345 if test -n "$ac_ct_AR"; then
4346 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4348 ac_save_IFS=$IFS; IFS=$ac_path_separator
4350 for ac_dir in $ac_dummy; do
4352 test -z "$ac_dir" && ac_dir=.
4353 $as_executable_p "$ac_dir/$ac_word" || continue
4354 ac_cv_prog_ac_ct_AR="ar"
4355 echo "$as_me:4355: found $ac_dir/$ac_word" >&5
4359 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4362 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4363 if test -n "$ac_ct_AR"; then
4364 echo "$as_me:4364: result: $ac_ct_AR" >&5
4365 echo "${ECHO_T}$ac_ct_AR" >&6
4367 echo "$as_me:4367: result: no" >&5
4368 echo "${ECHO_T}no" >&6
4376 if test -n "$ac_tool_prefix"; then
4377 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4378 set dummy ${ac_tool_prefix}ar; ac_word=$2
4379 echo "$as_me:4379: checking for $ac_word" >&5
4380 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4381 if test "${ac_cv_prog_AR+set}" = set; then
4382 echo $ECHO_N "(cached) $ECHO_C" >&6
4384 if test -n "$AR"; then
4385 ac_cv_prog_AR="$AR" # Let the user override the test.
4387 ac_save_IFS=$IFS; IFS=$ac_path_separator
4389 for ac_dir in $ac_dummy; do
4391 test -z "$ac_dir" && ac_dir=.
4392 $as_executable_p "$ac_dir/$ac_word" || continue
4393 ac_cv_prog_AR="${ac_tool_prefix}ar"
4394 echo "$as_me:4394: found $ac_dir/$ac_word" >&5
4401 if test -n "$AR"; then
4402 echo "$as_me:4402: result: $AR" >&5
4403 echo "${ECHO_T}$AR" >&6
4405 echo "$as_me:4405: result: no" >&5
4406 echo "${ECHO_T}no" >&6
4410 if test -z "$ac_cv_prog_AR"; then
4412 # Extract the first word of "ar", so it can be a program name with args.
4413 set dummy ar; ac_word=$2
4414 echo "$as_me:4414: checking for $ac_word" >&5
4415 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4416 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4417 echo $ECHO_N "(cached) $ECHO_C" >&6
4419 if test -n "$ac_ct_AR"; then
4420 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4422 ac_save_IFS=$IFS; IFS=$ac_path_separator
4424 for ac_dir in $ac_dummy; do
4426 test -z "$ac_dir" && ac_dir=.
4427 $as_executable_p "$ac_dir/$ac_word" || continue
4428 ac_cv_prog_ac_ct_AR="ar"
4429 echo "$as_me:4429: found $ac_dir/$ac_word" >&5
4433 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4436 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4437 if test -n "$ac_ct_AR"; then
4438 echo "$as_me:4438: result: $ac_ct_AR" >&5
4439 echo "${ECHO_T}$ac_ct_AR" >&6
4441 echo "$as_me:4441: result: no" >&5
4442 echo "${ECHO_T}no" >&6
4450 echo "$as_me:4450: checking for options to update archives" >&5
4451 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4452 if test "${cf_cv_ar_flags+set}" = set; then
4453 echo $ECHO_N "(cached) $ECHO_C" >&6
4456 case "$cf_cv_system_name" in
4459 cat >mk_static_lib.sh <<-EOF
4464 exec \$MSVC_BIN -out:"\$out" \$@
4466 chmod +x mk_static_lib.sh
4467 AR=`pwd`/mk_static_lib.sh
4470 cf_cv_ar_flags=unknown
4471 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4474 # check if $ARFLAGS already contains this choice
4475 if test "x$ARFLAGS" != "x" ; then
4476 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4477 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4483 rm -f "conftest.$ac_cv_objext"
4486 cat >"conftest.$ac_ext" <<EOF
4487 #line 4487 "configure"
4488 int testdata[3] = { 123, 456, 789 };
4490 if { (eval echo "$as_me:4490: \"$ac_compile\"") >&5
4491 (eval $ac_compile) 2>&5
4493 echo "$as_me:4493: \$? = $ac_status" >&5
4494 (exit "$ac_status"); } ; then
4495 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4496 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
4497 if test -f conftest.a ; then
4498 cf_cv_ar_flags="$cf_ar_flags"
4502 test -n "$verbose" && echo " cannot compile test-program" 1>&6
4504 echo "${as_me:-configure}:4504: testing cannot compile test-program ..." 1>&5
4509 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
4514 echo "$as_me:4514: result: $cf_cv_ar_flags" >&5
4515 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4517 if test -n "$ARFLAGS" ; then
4518 if test -n "$cf_cv_ar_flags" ; then
4519 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4522 ARFLAGS=$cf_cv_ar_flags
4525 echo "$as_me:4525: checking for PATH separator" >&5
4526 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4527 case "$cf_cv_system_name" in
4528 (os2*) PATH_SEPARATOR=';' ;;
4529 (*) ${PATH_SEPARATOR:=':'} ;;
4532 echo "$as_me:4532: result: $PATH_SEPARATOR" >&5
4533 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4535 echo "$as_me:4535: checking if you have specified an install-prefix" >&5
4536 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4538 # Check whether --with-install-prefix or --without-install-prefix was given.
4539 if test "${with_install_prefix+set}" = set; then
4540 withval="$with_install_prefix"
4544 (*) DESTDIR="$withval"
4548 echo "$as_me:4548: result: $DESTDIR" >&5
4549 echo "${ECHO_T}$DESTDIR" >&6
4551 ###############################################################################
4553 # If we're cross-compiling, allow the user to override the tools and their
4554 # options. The configure script is oriented toward identifying the host
4555 # compiler, etc., but we need a build compiler to generate parts of the source.
4557 if test "$cross_compiling" = yes ; then
4559 # defaults that we might want to override
4560 : ${BUILD_CFLAGS:=''}
4561 : ${BUILD_CPPFLAGS:=''}
4562 : ${BUILD_LDFLAGS:=''}
4564 : ${BUILD_EXEEXT:='$x'}
4565 : ${BUILD_OBJEXT:='o'}
4567 # Check whether --with-build-cc or --without-build-cc was given.
4568 if test "${with_build_cc+set}" = set; then
4569 withval="$with_build_cc"
4572 for ac_prog in gcc clang c99 c89 cc cl
4574 # Extract the first word of "$ac_prog", so it can be a program name with args.
4575 set dummy $ac_prog; ac_word=$2
4576 echo "$as_me:4576: checking for $ac_word" >&5
4577 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4578 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4579 echo $ECHO_N "(cached) $ECHO_C" >&6
4581 if test -n "$BUILD_CC"; then
4582 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4584 ac_save_IFS=$IFS; IFS=$ac_path_separator
4586 for ac_dir in $ac_dummy; do
4588 test -z "$ac_dir" && ac_dir=.
4589 $as_executable_p "$ac_dir/$ac_word" || continue
4590 ac_cv_prog_BUILD_CC="$ac_prog"
4591 echo "$as_me:4591: found $ac_dir/$ac_word" >&5
4597 BUILD_CC=$ac_cv_prog_BUILD_CC
4598 if test -n "$BUILD_CC"; then
4599 echo "$as_me:4599: result: $BUILD_CC" >&5
4600 echo "${ECHO_T}$BUILD_CC" >&6
4602 echo "$as_me:4602: result: no" >&5
4603 echo "${ECHO_T}no" >&6
4606 test -n "$BUILD_CC" && break
4608 test -n "$BUILD_CC" || BUILD_CC="none"
4611 echo "$as_me:4611: checking for native build C compiler" >&5
4612 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4613 echo "$as_me:4613: result: $BUILD_CC" >&5
4614 echo "${ECHO_T}$BUILD_CC" >&6
4616 echo "$as_me:4616: checking for native build C preprocessor" >&5
4617 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4619 # Check whether --with-build-cpp or --without-build-cpp was given.
4620 if test "${with_build_cpp+set}" = set; then
4621 withval="$with_build_cpp"
4622 BUILD_CPP="$withval"
4624 BUILD_CPP='${BUILD_CC} -E'
4626 echo "$as_me:4626: result: $BUILD_CPP" >&5
4627 echo "${ECHO_T}$BUILD_CPP" >&6
4629 echo "$as_me:4629: checking for native build C flags" >&5
4630 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4632 # Check whether --with-build-cflags or --without-build-cflags was given.
4633 if test "${with_build_cflags+set}" = set; then
4634 withval="$with_build_cflags"
4635 BUILD_CFLAGS="$withval"
4637 echo "$as_me:4637: result: $BUILD_CFLAGS" >&5
4638 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4640 echo "$as_me:4640: checking for native build C preprocessor-flags" >&5
4641 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4643 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4644 if test "${with_build_cppflags+set}" = set; then
4645 withval="$with_build_cppflags"
4646 BUILD_CPPFLAGS="$withval"
4648 echo "$as_me:4648: result: $BUILD_CPPFLAGS" >&5
4649 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4651 echo "$as_me:4651: checking for native build linker-flags" >&5
4652 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4654 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4655 if test "${with_build_ldflags+set}" = set; then
4656 withval="$with_build_ldflags"
4657 BUILD_LDFLAGS="$withval"
4659 echo "$as_me:4659: result: $BUILD_LDFLAGS" >&5
4660 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4662 echo "$as_me:4662: checking for native build linker-libraries" >&5
4663 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4665 # Check whether --with-build-libs or --without-build-libs was given.
4666 if test "${with_build_libs+set}" = set; then
4667 withval="$with_build_libs"
4668 BUILD_LIBS="$withval"
4670 echo "$as_me:4670: result: $BUILD_LIBS" >&5
4671 echo "${ECHO_T}$BUILD_LIBS" >&6
4673 # this assumes we're on Unix.
4677 : ${BUILD_CC:='${CC}'}
4679 echo "$as_me:4679: checking if the build-compiler \"$BUILD_CC\" works" >&5
4680 echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6
4682 cf_save_crossed=$cross_compiling
4683 cf_save_ac_link=$ac_link
4685 cf_build_cppflags=$BUILD_CPPFLAGS
4686 test "$cf_build_cppflags" = "#" && cf_build_cppflags=
4687 ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'
4689 if test "$cross_compiling" = yes; then
4690 cf_ok_build_cc=unknown
4692 cat >"conftest.$ac_ext" <<_ACEOF
4693 #line 4693 "configure"
4694 #include "confdefs.h"
4696 int main(int argc, char *argv[])
4698 ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0);
4702 rm -f "conftest$ac_exeext"
4703 if { (eval echo "$as_me:4703: \"$ac_link\"") >&5
4704 (eval $ac_link) 2>&5
4706 echo "$as_me:4706: \$? = $ac_status" >&5
4707 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4708 { (eval echo "$as_me:4708: \"$ac_try\"") >&5
4711 echo "$as_me:4711: \$? = $ac_status" >&5
4712 (exit "$ac_status"); }; }; then
4715 echo "$as_me: program exited with status $ac_status" >&5
4716 echo "$as_me: failed program was:" >&5
4717 cat "conftest.$ac_ext" >&5
4720 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4723 cross_compiling=$cf_save_crossed
4724 ac_link=$cf_save_ac_link
4726 echo "$as_me:4726: result: $cf_ok_build_cc" >&5
4727 echo "${ECHO_T}$cf_ok_build_cc" >&6
4729 if test "$cf_ok_build_cc" != yes
4731 { { echo "$as_me:4731: error: Cross-build requires two compilers.
4732 Use --with-build-cc to specify the native compiler." >&5
4733 echo "$as_me: error: Cross-build requires two compilers.
4734 Use --with-build-cc to specify the native compiler." >&2;}
4735 { (exit 1); exit 1; }; }
4739 : ${BUILD_CC:='${CC}'}
4740 : ${BUILD_CPP:='${CPP}'}
4741 : ${BUILD_CFLAGS:='${CFLAGS}'}
4742 : ${BUILD_CPPFLAGS:=''${CPPFLAGS}''}
4743 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4744 : ${BUILD_LIBS:=''${LIBS}''}
4745 : ${BUILD_EXEEXT:='$x'}
4746 : ${BUILD_OBJEXT:='o'}
4749 ###############################################################################
4751 ### Options to allow the user to specify the set of libraries which are used.
4752 ### Use "--without-normal --with-shared" to allow the default model to be
4753 ### shared, for example.
4756 echo "$as_me:4756: checking if you want to build shared C-objects" >&5
4757 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
4759 # Check whether --with-shared or --without-shared was given.
4760 if test "${with_shared+set}" = set; then
4761 withval="$with_shared"
4762 with_shared=$withval
4766 echo "$as_me:4766: result: $with_shared" >&5
4767 echo "${ECHO_T}$with_shared" >&6
4768 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4770 echo "$as_me:4770: checking for specified models" >&5
4771 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4772 test -z "$cf_list_models" && cf_list_models=normal
4773 echo "$as_me:4773: result: $cf_list_models" >&5
4774 echo "${ECHO_T}$cf_list_models" >&6
4776 ### Use the first model as the default, and save its suffix for use in building
4777 ### up test-applications.
4778 echo "$as_me:4778: checking for default model" >&5
4779 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4780 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4781 echo "$as_me:4781: result: $DFT_LWR_MODEL" >&5
4782 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4784 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4786 echo "$as_me:4786: checking for specific curses-directory" >&5
4787 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4789 # Check whether --with-curses-dir or --without-curses-dir was given.
4790 if test "${with_curses_dir+set}" = set; then
4791 withval="$with_curses_dir"
4792 cf_cv_curses_dir=$withval
4796 echo "$as_me:4796: result: $cf_cv_curses_dir" >&5
4797 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4799 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
4802 if test "x$prefix" != xNONE; then
4803 cf_path_syntax="$prefix"
4805 cf_path_syntax="$ac_default_prefix"
4813 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4815 (.\$\{*prefix\}*|.\$\{*dir\}*)
4816 eval withval="$withval"
4819 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4824 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4827 { { echo "$as_me:4827: error: expected a pathname, not \"$withval\"" >&5
4828 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4829 { (exit 1); exit 1; }; }
4833 if test -d "$cf_cv_curses_dir"
4836 if test -n "$cf_cv_curses_dir/include" ; then
4837 for cf_add_incdir in $cf_cv_curses_dir/include
4839 while test "$cf_add_incdir" != /usr/include
4841 if test -d "$cf_add_incdir"
4844 if test -n "$CFLAGS$CPPFLAGS" ; then
4845 # a loop is needed to ensure we can add subdirs of existing dirs
4846 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4847 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4848 cf_have_incdir=yes; break
4853 if test "$cf_have_incdir" = no ; then
4854 if test "$cf_add_incdir" = /usr/local/include ; then
4855 if test "$GCC" = yes
4857 cf_save_CPPFLAGS=$CPPFLAGS
4859 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4860 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4862 cat >"conftest.$ac_ext" <<_ACEOF
4863 #line 4863 "configure"
4864 #include "confdefs.h"
4874 rm -f "conftest.$ac_objext"
4875 if { (eval echo "$as_me:4875: \"$ac_compile\"") >&5
4876 (eval $ac_compile) 2>&5
4878 echo "$as_me:4878: \$? = $ac_status" >&5
4879 (exit "$ac_status"); } &&
4880 { ac_try='test -s "conftest.$ac_objext"'
4881 { (eval echo "$as_me:4881: \"$ac_try\"") >&5
4884 echo "$as_me:4884: \$? = $ac_status" >&5
4885 (exit "$ac_status"); }; }; then
4888 echo "$as_me: failed program was:" >&5
4889 cat "conftest.$ac_ext" >&5
4892 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4893 CPPFLAGS=$cf_save_CPPFLAGS
4898 if test "$cf_have_incdir" = no ; then
4899 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4901 echo "${as_me:-configure}:4901: testing adding $cf_add_incdir to include-path ..." 1>&5
4903 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4905 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
4906 test "$cf_top_incdir" = "$cf_add_incdir" && break
4907 cf_add_incdir="$cf_top_incdir"
4918 if test -n "$cf_cv_curses_dir/lib" ; then
4919 for cf_add_libdir in $cf_cv_curses_dir/lib
4921 if test "$cf_add_libdir" = /usr/lib ; then
4923 elif test -d "$cf_add_libdir"
4926 if test -n "$LDFLAGS$LIBS" ; then
4927 # a loop is needed to ensure we can add subdirs of existing dirs
4928 for cf_test_libdir in $LDFLAGS $LIBS ; do
4929 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4930 cf_have_libdir=yes; break
4934 if test "$cf_have_libdir" = no ; then
4935 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4937 echo "${as_me:-configure}:4937: testing adding $cf_add_libdir to library-path ..." 1>&5
4939 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4948 cf_ncuconfig_root=ncurses
4949 cf_have_ncuconfig=no
4951 if test "x${PKG_CONFIG:=none}" != xnone; then
4952 echo "$as_me:4952: checking pkg-config for $cf_ncuconfig_root" >&5
4953 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
4954 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
4955 echo "$as_me:4955: result: yes" >&5
4956 echo "${ECHO_T}yes" >&6
4958 echo "$as_me:4958: checking if the $cf_ncuconfig_root package files work" >&5
4959 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
4960 cf_have_ncuconfig=unknown
4962 cf_save_CFLAGS="$CFLAGS"
4963 cf_save_CPPFLAGS="$CPPFLAGS"
4964 cf_save_LIBS="$LIBS"
4966 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
4967 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
4969 # while -W for passing linker flags is prevalent, it is not "standard".
4970 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
4971 # incompatible _and_ non-standard -W option which gives an error. Work
4972 # around that pitfall.
4973 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
4979 cf_new_extra_cppflags=
4981 for cf_add_cflags in $cf_pkg_cflags
4983 case "$cf_fix_cppflags" in
4985 case "$cf_add_cflags" in
4986 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4987 case "$cf_add_cflags" in
4989 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4991 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4992 && test -z "${cf_tst_cflags}" \
4993 && cf_fix_cppflags=yes
4995 if test "$cf_fix_cppflags" = yes ; then
4997 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4998 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5001 elif test "${cf_tst_cflags}" = "\"'" ; then
5003 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5004 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5014 case "$cf_add_cflags" in
5016 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5018 CPPFLAGS=`echo "$CPPFLAGS" | \
5019 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5020 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5025 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5026 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5033 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5034 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5041 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5042 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5044 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5046 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5047 && test -z "${cf_tst_cflags}" \
5048 && cf_fix_cppflags=no
5053 if test -n "$cf_new_cflags" ; then
5055 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5056 CFLAGS="${CFLAGS}$cf_new_cflags"
5060 if test -n "$cf_new_cppflags" ; then
5062 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5063 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5067 if test -n "$cf_new_extra_cppflags" ; then
5069 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5070 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5077 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5079 for cf_add_1lib in $cf_add_0lib; do
5080 for cf_add_2lib in $cf_add_libs; do
5081 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5086 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5090 cat >"conftest.$ac_ext" <<_ACEOF
5091 #line 5091 "configure"
5092 #include "confdefs.h"
5093 #include <${cf_cv_ncurses_header:-curses.h}>
5097 initscr(); mousemask(0,0); tigetstr((char *)0);
5102 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5103 if { (eval echo "$as_me:5103: \"$ac_link\"") >&5
5104 (eval $ac_link) 2>&5
5106 echo "$as_me:5106: \$? = $ac_status" >&5
5107 (exit "$ac_status"); } &&
5108 { ac_try='test -s "conftest$ac_exeext"'
5109 { (eval echo "$as_me:5109: \"$ac_try\"") >&5
5112 echo "$as_me:5112: \$? = $ac_status" >&5
5113 (exit "$ac_status"); }; }; then
5114 if test "$cross_compiling" = yes; then
5115 cf_test_ncuconfig=maybe
5117 cat >"conftest.$ac_ext" <<_ACEOF
5118 #line 5118 "configure"
5119 #include "confdefs.h"
5120 #include <${cf_cv_ncurses_header:-curses.h}>
5122 { const char *xx = curses_version(); return (xx == 0); }
5124 rm -f "conftest$ac_exeext"
5125 if { (eval echo "$as_me:5125: \"$ac_link\"") >&5
5126 (eval $ac_link) 2>&5
5128 echo "$as_me:5128: \$? = $ac_status" >&5
5129 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5130 { (eval echo "$as_me:5130: \"$ac_try\"") >&5
5133 echo "$as_me:5133: \$? = $ac_status" >&5
5134 (exit "$ac_status"); }; }; then
5135 cf_test_ncuconfig=yes
5137 echo "$as_me: program exited with status $ac_status" >&5
5138 echo "$as_me: failed program was:" >&5
5139 cat "conftest.$ac_ext" >&5
5140 cf_test_ncuconfig=no
5142 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5145 echo "$as_me: failed program was:" >&5
5146 cat "conftest.$ac_ext" >&5
5147 cf_test_ncuconfig=no
5149 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5151 CFLAGS="$cf_save_CFLAGS"
5152 CPPFLAGS="$cf_save_CPPFLAGS"
5153 LIBS="$cf_save_LIBS"
5155 if test "x$cf_test_ncuconfig" != xyes; then
5156 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
5157 cf_pkg_cflags="$cf_temp"
5158 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
5159 cf_pkg_libs="$cf_temp"
5164 for cf_add_cflags in $cf_pkg_cflags
5166 case "x$cf_add_cflags" in
5169 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5172 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'`
5173 test "$CFLAGS" != "$cf_old_cflag" || break
5175 CFLAGS="$cf_old_cflag"
5178 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5181 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'`
5182 test "$CPPFLAGS" != "$cf_old_cflag" || break
5184 CPPFLAGS="$cf_old_cflag"
5193 cf_new_extra_cppflags=
5195 for cf_add_cflags in $cf_add_cflags
5197 case "$cf_fix_cppflags" in
5199 case "$cf_add_cflags" in
5200 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5201 case "$cf_add_cflags" in
5203 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5205 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5206 && test -z "${cf_tst_cflags}" \
5207 && cf_fix_cppflags=yes
5209 if test "$cf_fix_cppflags" = yes ; then
5211 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5212 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5215 elif test "${cf_tst_cflags}" = "\"'" ; then
5217 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5218 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5228 case "$cf_add_cflags" in
5230 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5232 CPPFLAGS=`echo "$CPPFLAGS" | \
5233 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5234 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5239 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5240 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5247 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5248 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5255 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5256 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5258 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5260 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5261 && test -z "${cf_tst_cflags}" \
5262 && cf_fix_cppflags=no
5267 if test -n "$cf_new_cflags" ; then
5269 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5270 CFLAGS="${CFLAGS}$cf_new_cflags"
5274 if test -n "$cf_new_cppflags" ; then
5276 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5277 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5281 if test -n "$cf_new_extra_cppflags" ; then
5283 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5284 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5293 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5295 for cf_add_1lib in $cf_add_0lib; do
5296 for cf_add_2lib in $cf_add_libs; do
5297 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5302 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5306 cat >"conftest.$ac_ext" <<_ACEOF
5307 #line 5307 "configure"
5308 #include "confdefs.h"
5309 #include <${cf_cv_ncurses_header:-curses.h}>
5313 initscr(); mousemask(0,0); tigetstr((char *)0);
5318 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5319 if { (eval echo "$as_me:5319: \"$ac_link\"") >&5
5320 (eval $ac_link) 2>&5
5322 echo "$as_me:5322: \$? = $ac_status" >&5
5323 (exit "$ac_status"); } &&
5324 { ac_try='test -s "conftest$ac_exeext"'
5325 { (eval echo "$as_me:5325: \"$ac_try\"") >&5
5328 echo "$as_me:5328: \$? = $ac_status" >&5
5329 (exit "$ac_status"); }; }; then
5330 if test "$cross_compiling" = yes; then
5331 cf_have_ncuconfig=maybe
5333 cat >"conftest.$ac_ext" <<_ACEOF
5334 #line 5334 "configure"
5335 #include "confdefs.h"
5336 #include <${cf_cv_ncurses_header:-curses.h}>
5338 { const char *xx = curses_version(); return (xx == 0); }
5340 rm -f "conftest$ac_exeext"
5341 if { (eval echo "$as_me:5341: \"$ac_link\"") >&5
5342 (eval $ac_link) 2>&5
5344 echo "$as_me:5344: \$? = $ac_status" >&5
5345 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5346 { (eval echo "$as_me:5346: \"$ac_try\"") >&5
5349 echo "$as_me:5349: \$? = $ac_status" >&5
5350 (exit "$ac_status"); }; }; then
5351 cf_have_ncuconfig=yes
5353 echo "$as_me: program exited with status $ac_status" >&5
5354 echo "$as_me: failed program was:" >&5
5355 cat "conftest.$ac_ext" >&5
5356 cf_have_ncuconfig=no
5358 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5361 echo "$as_me: failed program was:" >&5
5362 cat "conftest.$ac_ext" >&5
5363 cf_have_ncuconfig=no
5365 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5366 echo "$as_me:5366: result: $cf_have_ncuconfig" >&5
5367 echo "${ECHO_T}$cf_have_ncuconfig" >&6
5368 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
5369 if test "$cf_have_ncuconfig" != "yes"
5371 CPPFLAGS="$cf_save_CPPFLAGS"
5372 LIBS="$cf_save_LIBS"
5373 NCURSES_CONFIG_PKG=none
5376 cat >>confdefs.h <<\EOF
5380 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
5382 echo "$as_me:5382: checking for terminfo header" >&5
5383 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5384 if test "${cf_cv_term_header+set}" = set; then
5385 echo $ECHO_N "(cached) $ECHO_C" >&6
5388 case "${cf_cv_ncurses_header}" in
5389 (*/ncurses.h|*/ncursesw.h)
5390 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5393 cf_term_header=term.h
5397 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5399 cat >"conftest.$ac_ext" <<_ACEOF
5400 #line 5400 "configure"
5401 #include "confdefs.h"
5403 #include <${cf_cv_ncurses_header:-curses.h}>
5409 int x = auto_left_margin; (void)x
5414 rm -f "conftest.$ac_objext"
5415 if { (eval echo "$as_me:5415: \"$ac_compile\"") >&5
5416 (eval $ac_compile) 2>&5
5418 echo "$as_me:5418: \$? = $ac_status" >&5
5419 (exit "$ac_status"); } &&
5420 { ac_try='test -s "conftest.$ac_objext"'
5421 { (eval echo "$as_me:5421: \"$ac_try\"") >&5
5424 echo "$as_me:5424: \$? = $ac_status" >&5
5425 (exit "$ac_status"); }; }; then
5427 cf_cv_term_header="$cf_test"
5429 echo "$as_me: failed program was:" >&5
5430 cat "conftest.$ac_ext" >&5
5432 cf_cv_term_header=unknown
5435 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5436 test "$cf_cv_term_header" != unknown && break
5440 echo "$as_me:5440: result: $cf_cv_term_header" >&5
5441 echo "${ECHO_T}$cf_cv_term_header" >&6
5443 # Set definitions to allow ifdef'ing to accommodate subdirectories
5445 case "$cf_cv_term_header" in
5448 cat >>confdefs.h <<\EOF
5449 #define HAVE_TERM_H 1
5455 case "$cf_cv_term_header" in
5458 cat >>confdefs.h <<\EOF
5459 #define HAVE_NCURSES_TERM_H 1
5465 cat >>confdefs.h <<\EOF
5466 #define HAVE_NCURSESW_TERM_H 1
5475 echo "$as_me:5475: result: no" >&5
5476 echo "${ECHO_T}no" >&6
5477 NCURSES_CONFIG_PKG=none
5480 NCURSES_CONFIG_PKG=none
5483 if test "x$cf_have_ncuconfig" = "xno"; then
5484 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
5486 if test -n "$ac_tool_prefix"; then
5487 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5489 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5490 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5491 echo "$as_me:5491: checking for $ac_word" >&5
5492 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5493 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5494 echo $ECHO_N "(cached) $ECHO_C" >&6
5496 if test -n "$NCURSES_CONFIG"; then
5497 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5499 ac_save_IFS=$IFS; IFS=$ac_path_separator
5501 for ac_dir in $ac_dummy; do
5503 test -z "$ac_dir" && ac_dir=.
5504 $as_executable_p "$ac_dir/$ac_word" || continue
5505 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5506 echo "$as_me:5506: found $ac_dir/$ac_word" >&5
5512 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5513 if test -n "$NCURSES_CONFIG"; then
5514 echo "$as_me:5514: result: $NCURSES_CONFIG" >&5
5515 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5517 echo "$as_me:5517: result: no" >&5
5518 echo "${ECHO_T}no" >&6
5521 test -n "$NCURSES_CONFIG" && break
5524 if test -z "$NCURSES_CONFIG"; then
5525 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5526 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5528 # Extract the first word of "$ac_prog", so it can be a program name with args.
5529 set dummy $ac_prog; ac_word=$2
5530 echo "$as_me:5530: checking for $ac_word" >&5
5531 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5532 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5533 echo $ECHO_N "(cached) $ECHO_C" >&6
5535 if test -n "$ac_ct_NCURSES_CONFIG"; then
5536 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5538 ac_save_IFS=$IFS; IFS=$ac_path_separator
5540 for ac_dir in $ac_dummy; do
5542 test -z "$ac_dir" && ac_dir=.
5543 $as_executable_p "$ac_dir/$ac_word" || continue
5544 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5545 echo "$as_me:5545: found $ac_dir/$ac_word" >&5
5551 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5552 if test -n "$ac_ct_NCURSES_CONFIG"; then
5553 echo "$as_me:5553: result: $ac_ct_NCURSES_CONFIG" >&5
5554 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5556 echo "$as_me:5556: result: no" >&5
5557 echo "${ECHO_T}no" >&6
5560 test -n "$ac_ct_NCURSES_CONFIG" && break
5562 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5564 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5567 if test "$NCURSES_CONFIG" != none ; then
5569 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
5571 case "x$cf_add_cflags" in
5574 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5577 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'`
5578 test "$CFLAGS" != "$cf_old_cflag" || break
5580 CFLAGS="$cf_old_cflag"
5583 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5586 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'`
5587 test "$CPPFLAGS" != "$cf_old_cflag" || break
5589 CPPFLAGS="$cf_old_cflag"
5598 cf_new_extra_cppflags=
5600 for cf_add_cflags in $cf_add_cflags
5602 case "$cf_fix_cppflags" in
5604 case "$cf_add_cflags" in
5605 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5606 case "$cf_add_cflags" in
5608 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5610 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5611 && test -z "${cf_tst_cflags}" \
5612 && cf_fix_cppflags=yes
5614 if test "$cf_fix_cppflags" = yes ; then
5616 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5617 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5620 elif test "${cf_tst_cflags}" = "\"'" ; then
5622 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5623 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5633 case "$cf_add_cflags" in
5635 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5637 CPPFLAGS=`echo "$CPPFLAGS" | \
5638 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5639 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5644 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5645 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5652 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5653 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5660 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5661 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5663 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5665 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5666 && test -z "${cf_tst_cflags}" \
5667 && cf_fix_cppflags=no
5672 if test -n "$cf_new_cflags" ; then
5674 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5675 CFLAGS="${CFLAGS}$cf_new_cflags"
5679 if test -n "$cf_new_cppflags" ; then
5681 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5682 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5686 if test -n "$cf_new_extra_cppflags" ; then
5688 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5689 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5698 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5700 for cf_add_1lib in $cf_add_0lib; do
5701 for cf_add_2lib in $cf_add_libs; do
5702 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5707 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5711 # even with config script, some packages use no-override for curses.h
5713 echo "$as_me:5713: checking if we have identified curses headers" >&5
5714 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5715 if test "${cf_cv_ncurses_header+set}" = set; then
5716 echo $ECHO_N "(cached) $ECHO_C" >&6
5719 cf_cv_ncurses_header=none
5721 ncurses.h ncurses/ncurses.h \
5722 curses.h ncurses/curses.h
5724 cat >"conftest.$ac_ext" <<_ACEOF
5725 #line 5725 "configure"
5726 #include "confdefs.h"
5727 #include <${cf_header}>
5736 rm -f "conftest.$ac_objext"
5737 if { (eval echo "$as_me:5737: \"$ac_compile\"") >&5
5738 (eval $ac_compile) 2>&5
5740 echo "$as_me:5740: \$? = $ac_status" >&5
5741 (exit "$ac_status"); } &&
5742 { ac_try='test -s "conftest.$ac_objext"'
5743 { (eval echo "$as_me:5743: \"$ac_try\"") >&5
5746 echo "$as_me:5746: \$? = $ac_status" >&5
5747 (exit "$ac_status"); }; }; then
5748 cf_cv_ncurses_header=$cf_header; break
5750 echo "$as_me: failed program was:" >&5
5751 cat "conftest.$ac_ext" >&5
5753 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5757 echo "$as_me:5757: result: $cf_cv_ncurses_header" >&5
5758 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5760 if test "$cf_cv_ncurses_header" = none ; then
5761 { { echo "$as_me:5761: error: No curses header-files found" >&5
5762 echo "$as_me: error: No curses header-files found" >&2;}
5763 { (exit 1); exit 1; }; }
5766 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5768 for ac_header in $cf_cv_ncurses_header
5770 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5771 echo "$as_me:5771: checking for $ac_header" >&5
5772 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5773 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5774 echo $ECHO_N "(cached) $ECHO_C" >&6
5776 cat >"conftest.$ac_ext" <<_ACEOF
5777 #line 5777 "configure"
5778 #include "confdefs.h"
5779 #include <$ac_header>
5781 if { (eval echo "$as_me:5781: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5782 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5784 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5786 cat conftest.err >&5
5787 echo "$as_me:5787: \$? = $ac_status" >&5
5788 (exit "$ac_status"); } >/dev/null; then
5789 if test -s conftest.err; then
5790 ac_cpp_err=$ac_c_preproc_warn_flag
5797 if test -z "$ac_cpp_err"; then
5798 eval "$as_ac_Header=yes"
5800 echo "$as_me: failed program was:" >&5
5801 cat "conftest.$ac_ext" >&5
5802 eval "$as_ac_Header=no"
5804 rm -f conftest.err "conftest.$ac_ext"
5806 echo "$as_me:5806: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5807 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5808 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5809 cat >>confdefs.h <<EOF
5810 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5816 cat >>confdefs.h <<\EOF
5820 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5822 cat >>confdefs.h <<EOF
5823 #define $cf_nculib_ROOT 1
5826 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
5830 cf_ncuhdr_root=ncurses
5832 test -n "$cf_cv_curses_dir" && \
5833 test "$cf_cv_curses_dir" != "no" && { \
5835 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5836 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5838 while test "$cf_add_incdir" != /usr/include
5840 if test -d "$cf_add_incdir"
5843 if test -n "$CFLAGS$CPPFLAGS" ; then
5844 # a loop is needed to ensure we can add subdirs of existing dirs
5845 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5846 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5847 cf_have_incdir=yes; break
5852 if test "$cf_have_incdir" = no ; then
5853 if test "$cf_add_incdir" = /usr/local/include ; then
5854 if test "$GCC" = yes
5856 cf_save_CPPFLAGS=$CPPFLAGS
5858 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5859 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5861 cat >"conftest.$ac_ext" <<_ACEOF
5862 #line 5862 "configure"
5863 #include "confdefs.h"
5873 rm -f "conftest.$ac_objext"
5874 if { (eval echo "$as_me:5874: \"$ac_compile\"") >&5
5875 (eval $ac_compile) 2>&5
5877 echo "$as_me:5877: \$? = $ac_status" >&5
5878 (exit "$ac_status"); } &&
5879 { ac_try='test -s "conftest.$ac_objext"'
5880 { (eval echo "$as_me:5880: \"$ac_try\"") >&5
5883 echo "$as_me:5883: \$? = $ac_status" >&5
5884 (exit "$ac_status"); }; }; then
5887 echo "$as_me: failed program was:" >&5
5888 cat "conftest.$ac_ext" >&5
5891 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5892 CPPFLAGS=$cf_save_CPPFLAGS
5897 if test "$cf_have_incdir" = no ; then
5898 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5900 echo "${as_me:-configure}:5900: testing adding $cf_add_incdir to include-path ..." 1>&5
5902 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5904 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5905 test "$cf_top_incdir" = "$cf_add_incdir" && break
5906 cf_add_incdir="$cf_top_incdir"
5919 echo "$as_me:5919: checking for $cf_ncuhdr_root header in include-path" >&5
5920 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5921 if test "${cf_cv_ncurses_h+set}" = set; then
5922 echo $ECHO_N "(cached) $ECHO_C" >&6
5925 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5926 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
5927 for cf_header in $cf_header_list
5930 cat >"conftest.$ac_ext" <<_ACEOF
5931 #line 5931 "configure"
5932 #include "confdefs.h"
5934 #include <$cf_header>
5939 #ifdef NCURSES_VERSION
5941 printf("%s\\n", NCURSES_VERSION);
5946 #error __NCURSES_H is not defined
5954 rm -f "conftest.$ac_objext"
5955 if { (eval echo "$as_me:5955: \"$ac_compile\"") >&5
5956 (eval $ac_compile) 2>&5
5958 echo "$as_me:5958: \$? = $ac_status" >&5
5959 (exit "$ac_status"); } &&
5960 { ac_try='test -s "conftest.$ac_objext"'
5961 { (eval echo "$as_me:5961: \"$ac_try\"") >&5
5964 echo "$as_me:5964: \$? = $ac_status" >&5
5965 (exit "$ac_status"); }; }; then
5966 cf_cv_ncurses_h=$cf_header
5969 echo "$as_me: failed program was:" >&5
5970 cat "conftest.$ac_ext" >&5
5973 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5975 test "$cf_cv_ncurses_h" != no && break
5979 echo "$as_me:5979: result: $cf_cv_ncurses_h" >&5
5980 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5982 if test "$cf_cv_ncurses_h" != no ; then
5983 cf_cv_ncurses_header=$cf_cv_ncurses_h
5986 echo "$as_me:5986: checking for $cf_ncuhdr_root include-path" >&5
5987 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5988 if test "${cf_cv_ncurses_h2+set}" = set; then
5989 echo $ECHO_N "(cached) $ECHO_C" >&6
5992 test -n "$verbose" && echo
5996 # collect the current set of include-directories from compiler flags
5997 cf_header_path_list=""
5998 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5999 for cf_header_path in $CPPFLAGS $CFLAGS
6001 case "$cf_header_path" in
6003 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6005 test "x$cf_header_path" != "xNONE" && \
6006 test -d "$cf_header_path" && \
6008 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6009 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
6010 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6011 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6012 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6013 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"
6016 cf_header_path_list="$cf_header_path_list $cf_search"
6022 # add the variations for the package we are looking for
6026 test "x$prefix" != "xNONE" && \
6027 test -d "$prefix" && \
6029 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6030 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
6031 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6032 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6033 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6034 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6037 for cf_subdir_prefix in \
6046 test "x$cf_subdir_prefix" != "x$prefix" && \
6047 test -d "$cf_subdir_prefix" && \
6048 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6049 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6050 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
6051 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
6052 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
6053 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
6054 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"
6059 test "$includedir" != NONE && \
6060 test "$includedir" != "/usr/include" && \
6061 test -d "$includedir" && {
6062 test -d "$includedir" && cf_search="$cf_search $includedir"
6063 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6066 test "$oldincludedir" != NONE && \
6067 test "$oldincludedir" != "/usr/include" && \
6068 test -d "$oldincludedir" && {
6069 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
6070 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6073 cf_search="$cf_search $cf_header_path_list"
6075 test -n "$verbose" && echo "search path $cf_search"
6076 cf_save2_CPPFLAGS="$CPPFLAGS"
6077 for cf_incdir in $cf_search
6080 if test -n "$cf_incdir" ; then
6081 for cf_add_incdir in $cf_incdir
6083 while test "$cf_add_incdir" != /usr/include
6085 if test -d "$cf_add_incdir"
6088 if test -n "$CFLAGS$CPPFLAGS" ; then
6089 # a loop is needed to ensure we can add subdirs of existing dirs
6090 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6091 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6092 cf_have_incdir=yes; break
6097 if test "$cf_have_incdir" = no ; then
6098 if test "$cf_add_incdir" = /usr/local/include ; then
6099 if test "$GCC" = yes
6101 cf_save_CPPFLAGS=$CPPFLAGS
6103 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6104 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6106 cat >"conftest.$ac_ext" <<_ACEOF
6107 #line 6107 "configure"
6108 #include "confdefs.h"
6118 rm -f "conftest.$ac_objext"
6119 if { (eval echo "$as_me:6119: \"$ac_compile\"") >&5
6120 (eval $ac_compile) 2>&5
6122 echo "$as_me:6122: \$? = $ac_status" >&5
6123 (exit "$ac_status"); } &&
6124 { ac_try='test -s "conftest.$ac_objext"'
6125 { (eval echo "$as_me:6125: \"$ac_try\"") >&5
6128 echo "$as_me:6128: \$? = $ac_status" >&5
6129 (exit "$ac_status"); }; }; then
6132 echo "$as_me: failed program was:" >&5
6133 cat "conftest.$ac_ext" >&5
6136 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6137 CPPFLAGS=$cf_save_CPPFLAGS
6142 if test "$cf_have_incdir" = no ; then
6143 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6145 echo "${as_me:-configure}:6145: testing adding $cf_add_incdir to include-path ..." 1>&5
6147 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6149 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
6150 test "$cf_top_incdir" = "$cf_add_incdir" && break
6151 cf_add_incdir="$cf_top_incdir"
6167 cat >"conftest.$ac_ext" <<_ACEOF
6168 #line 6168 "configure"
6169 #include "confdefs.h"
6171 #include <$cf_header>
6176 #ifdef NCURSES_VERSION
6178 printf("%s\\n", NCURSES_VERSION);
6183 #error __NCURSES_H is not defined
6191 rm -f "conftest.$ac_objext"
6192 if { (eval echo "$as_me:6192: \"$ac_compile\"") >&5
6193 (eval $ac_compile) 2>&5
6195 echo "$as_me:6195: \$? = $ac_status" >&5
6196 (exit "$ac_status"); } &&
6197 { ac_try='test -s "conftest.$ac_objext"'
6198 { (eval echo "$as_me:6198: \"$ac_try\"") >&5
6201 echo "$as_me:6201: \$? = $ac_status" >&5
6202 (exit "$ac_status"); }; }; then
6203 cf_cv_ncurses_h2=$cf_header
6206 echo "$as_me: failed program was:" >&5
6207 cat "conftest.$ac_ext" >&5
6210 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6212 if test "$cf_cv_ncurses_h2" != no ; then
6213 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6214 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
6217 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
6219 CPPFLAGS="$cf_save2_CPPFLAGS"
6220 test "$cf_cv_ncurses_h2" != no && break
6222 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6222: error: not found" >&5
6223 echo "$as_me: error: not found" >&2;}
6224 { (exit 1); exit 1; }; }
6227 echo "$as_me:6227: result: $cf_cv_ncurses_h2" >&5
6228 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6230 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
6231 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
6232 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
6233 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
6236 if test -n "$cf_1st_incdir" ; then
6237 for cf_add_incdir in $cf_1st_incdir
6239 while test "$cf_add_incdir" != /usr/include
6241 if test -d "$cf_add_incdir"
6244 if test -n "$CFLAGS$CPPFLAGS" ; then
6245 # a loop is needed to ensure we can add subdirs of existing dirs
6246 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6247 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6248 cf_have_incdir=yes; break
6253 if test "$cf_have_incdir" = no ; then
6254 if test "$cf_add_incdir" = /usr/local/include ; then
6255 if test "$GCC" = yes
6257 cf_save_CPPFLAGS=$CPPFLAGS
6259 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6260 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6262 cat >"conftest.$ac_ext" <<_ACEOF
6263 #line 6263 "configure"
6264 #include "confdefs.h"
6274 rm -f "conftest.$ac_objext"
6275 if { (eval echo "$as_me:6275: \"$ac_compile\"") >&5
6276 (eval $ac_compile) 2>&5
6278 echo "$as_me:6278: \$? = $ac_status" >&5
6279 (exit "$ac_status"); } &&
6280 { ac_try='test -s "conftest.$ac_objext"'
6281 { (eval echo "$as_me:6281: \"$ac_try\"") >&5
6284 echo "$as_me:6284: \$? = $ac_status" >&5
6285 (exit "$ac_status"); }; }; then
6288 echo "$as_me: failed program was:" >&5
6289 cat "conftest.$ac_ext" >&5
6292 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6293 CPPFLAGS=$cf_save_CPPFLAGS
6298 if test "$cf_have_incdir" = no ; then
6299 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6301 echo "${as_me:-configure}:6301: testing adding $cf_add_incdir to include-path ..." 1>&5
6303 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6305 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
6306 test "$cf_top_incdir" = "$cf_add_incdir" && break
6307 cf_add_incdir="$cf_top_incdir"
6320 # Set definitions to allow ifdef'ing for ncurses.h
6322 case "$cf_cv_ncurses_header" in
6325 cat >>confdefs.h <<\EOF
6326 #define HAVE_NCURSES_H 1
6332 case "$cf_cv_ncurses_header" in
6333 (ncurses/curses.h|ncurses/ncurses.h)
6335 cat >>confdefs.h <<\EOF
6336 #define HAVE_NCURSES_NCURSES_H 1
6340 (ncursesw/curses.h|ncursesw/ncurses.h)
6342 cat >>confdefs.h <<\EOF
6343 #define HAVE_NCURSESW_NCURSES_H 1
6349 echo "$as_me:6349: checking for terminfo header" >&5
6350 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6351 if test "${cf_cv_term_header+set}" = set; then
6352 echo $ECHO_N "(cached) $ECHO_C" >&6
6355 case "${cf_cv_ncurses_header}" in
6356 (*/ncurses.h|*/ncursesw.h)
6357 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6360 cf_term_header=term.h
6364 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6366 cat >"conftest.$ac_ext" <<_ACEOF
6367 #line 6367 "configure"
6368 #include "confdefs.h"
6370 #include <${cf_cv_ncurses_header:-curses.h}>
6376 int x = auto_left_margin; (void)x
6381 rm -f "conftest.$ac_objext"
6382 if { (eval echo "$as_me:6382: \"$ac_compile\"") >&5
6383 (eval $ac_compile) 2>&5
6385 echo "$as_me:6385: \$? = $ac_status" >&5
6386 (exit "$ac_status"); } &&
6387 { ac_try='test -s "conftest.$ac_objext"'
6388 { (eval echo "$as_me:6388: \"$ac_try\"") >&5
6391 echo "$as_me:6391: \$? = $ac_status" >&5
6392 (exit "$ac_status"); }; }; then
6394 cf_cv_term_header="$cf_test"
6396 echo "$as_me: failed program was:" >&5
6397 cat "conftest.$ac_ext" >&5
6399 cf_cv_term_header=unknown
6402 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6403 test "$cf_cv_term_header" != unknown && break
6407 echo "$as_me:6407: result: $cf_cv_term_header" >&5
6408 echo "${ECHO_T}$cf_cv_term_header" >&6
6410 # Set definitions to allow ifdef'ing to accommodate subdirectories
6412 case "$cf_cv_term_header" in
6415 cat >>confdefs.h <<\EOF
6416 #define HAVE_TERM_H 1
6422 case "$cf_cv_term_header" in
6425 cat >>confdefs.h <<\EOF
6426 #define HAVE_NCURSES_TERM_H 1
6432 cat >>confdefs.h <<\EOF
6433 #define HAVE_NCURSESW_TERM_H 1
6439 # some applications need this, but should check for NCURSES_VERSION
6441 cat >>confdefs.h <<\EOF
6445 echo "$as_me:6445: checking for ncurses version" >&5
6446 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6447 if test "${cf_cv_ncurses_version+set}" = set; then
6448 echo $ECHO_N "(cached) $ECHO_C" >&6
6451 cf_cv_ncurses_version=no
6453 rm -f "$cf_tempfile"
6454 if test "$cross_compiling" = yes; then
6456 # This will not work if the preprocessor splits the line after the
6457 # Autoconf token. The 'unproto' program does that.
6458 cat > "conftest.$ac_ext" <<EOF
6459 #include <${cf_cv_ncurses_header:-curses.h}>
6461 #ifdef NCURSES_VERSION
6462 Autoconf NCURSES_VERSION
6470 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6471 { (eval echo "$as_me:6471: \"$cf_try\"") >&5
6474 echo "$as_me:6474: \$? = $ac_status" >&5
6475 (exit "$ac_status"); }
6476 if test -f conftest.out ; then
6477 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
6478 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6483 cat >"conftest.$ac_ext" <<_ACEOF
6484 #line 6484 "configure"
6485 #include "confdefs.h"
6487 $ac_includes_default
6489 #include <${cf_cv_ncurses_header:-curses.h}>
6493 FILE *fp = fopen("$cf_tempfile", "w");
6494 #ifdef NCURSES_VERSION
6495 # ifdef NCURSES_VERSION_PATCH
6496 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6498 fprintf(fp, "%s\\n", NCURSES_VERSION);
6502 fprintf(fp, "old\\n");
6504 #error expected ncurses header to define __NCURSES_H
6507 ${cf_cv_main_return:-return}(0);
6510 rm -f "conftest$ac_exeext"
6511 if { (eval echo "$as_me:6511: \"$ac_link\"") >&5
6512 (eval $ac_link) 2>&5
6514 echo "$as_me:6514: \$? = $ac_status" >&5
6515 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6516 { (eval echo "$as_me:6516: \"$ac_try\"") >&5
6519 echo "$as_me:6519: \$? = $ac_status" >&5
6520 (exit "$ac_status"); }; }; then
6522 cf_cv_ncurses_version=`cat $cf_tempfile`
6524 echo "$as_me: program exited with status $ac_status" >&5
6525 echo "$as_me: failed program was:" >&5
6526 cat "conftest.$ac_ext" >&5
6528 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6530 rm -f "$cf_tempfile"
6533 echo "$as_me:6533: result: $cf_cv_ncurses_version" >&5
6534 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6535 test "$cf_cv_ncurses_version" = no ||
6536 cat >>confdefs.h <<\EOF
6540 cf_nculib_root=ncurses
6541 # This works, except for the special case where we find gpm, but
6542 # ncurses is in a nonstandard location via $LIBS, and we really want
6545 cf_ncurses_SAVE="$LIBS"
6546 echo "$as_me:6546: checking for Gpm_Open in -lgpm" >&5
6547 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6548 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6549 echo $ECHO_N "(cached) $ECHO_C" >&6
6551 ac_check_lib_save_LIBS=$LIBS
6553 cat >"conftest.$ac_ext" <<_ACEOF
6554 #line 6554 "configure"
6555 #include "confdefs.h"
6557 /* Override any gcc2 internal prototype to avoid an error. */
6561 /* We use char because int might match the return type of a gcc2
6562 builtin and then its argument prototype would still apply. */
6563 char Gpm_Open (void);
6572 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6573 if { (eval echo "$as_me:6573: \"$ac_link\"") >&5
6574 (eval $ac_link) 2>&5
6576 echo "$as_me:6576: \$? = $ac_status" >&5
6577 (exit "$ac_status"); } &&
6578 { ac_try='test -s "conftest$ac_exeext"'
6579 { (eval echo "$as_me:6579: \"$ac_try\"") >&5
6582 echo "$as_me:6582: \$? = $ac_status" >&5
6583 (exit "$ac_status"); }; }; then
6584 ac_cv_lib_gpm_Gpm_Open=yes
6586 echo "$as_me: failed program was:" >&5
6587 cat "conftest.$ac_ext" >&5
6588 ac_cv_lib_gpm_Gpm_Open=no
6590 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6591 LIBS=$ac_check_lib_save_LIBS
6593 echo "$as_me:6593: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6594 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6595 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
6596 echo "$as_me:6596: checking for initscr in -lgpm" >&5
6597 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6598 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6599 echo $ECHO_N "(cached) $ECHO_C" >&6
6601 ac_check_lib_save_LIBS=$LIBS
6603 cat >"conftest.$ac_ext" <<_ACEOF
6604 #line 6604 "configure"
6605 #include "confdefs.h"
6607 /* Override any gcc2 internal prototype to avoid an error. */
6611 /* We use char because int might match the return type of a gcc2
6612 builtin and then its argument prototype would still apply. */
6613 char initscr (void);
6622 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6623 if { (eval echo "$as_me:6623: \"$ac_link\"") >&5
6624 (eval $ac_link) 2>&5
6626 echo "$as_me:6626: \$? = $ac_status" >&5
6627 (exit "$ac_status"); } &&
6628 { ac_try='test -s "conftest$ac_exeext"'
6629 { (eval echo "$as_me:6629: \"$ac_try\"") >&5
6632 echo "$as_me:6632: \$? = $ac_status" >&5
6633 (exit "$ac_status"); }; }; then
6634 ac_cv_lib_gpm_initscr=yes
6636 echo "$as_me: failed program was:" >&5
6637 cat "conftest.$ac_ext" >&5
6638 ac_cv_lib_gpm_initscr=no
6640 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6641 LIBS=$ac_check_lib_save_LIBS
6643 echo "$as_me:6643: result: $ac_cv_lib_gpm_initscr" >&5
6644 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6645 if test "$ac_cv_lib_gpm_initscr" = yes; then
6646 LIBS="$cf_ncurses_SAVE"
6648 cf_ncurses_LIBS="-lgpm"
6655 # This is only necessary if you are linking against an obsolete
6656 # version of ncurses (but it should do no harm, since it is static).
6657 if test "$cf_nculib_root" = ncurses ; then
6658 echo "$as_me:6658: checking for tgoto in -lmytinfo" >&5
6659 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6660 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6661 echo $ECHO_N "(cached) $ECHO_C" >&6
6663 ac_check_lib_save_LIBS=$LIBS
6664 LIBS="-lmytinfo $LIBS"
6665 cat >"conftest.$ac_ext" <<_ACEOF
6666 #line 6666 "configure"
6667 #include "confdefs.h"
6669 /* Override any gcc2 internal prototype to avoid an error. */
6673 /* We use char because int might match the return type of a gcc2
6674 builtin and then its argument prototype would still apply. */
6684 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6685 if { (eval echo "$as_me:6685: \"$ac_link\"") >&5
6686 (eval $ac_link) 2>&5
6688 echo "$as_me:6688: \$? = $ac_status" >&5
6689 (exit "$ac_status"); } &&
6690 { ac_try='test -s "conftest$ac_exeext"'
6691 { (eval echo "$as_me:6691: \"$ac_try\"") >&5
6694 echo "$as_me:6694: \$? = $ac_status" >&5
6695 (exit "$ac_status"); }; }; then
6696 ac_cv_lib_mytinfo_tgoto=yes
6698 echo "$as_me: failed program was:" >&5
6699 cat "conftest.$ac_ext" >&5
6700 ac_cv_lib_mytinfo_tgoto=no
6702 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6703 LIBS=$ac_check_lib_save_LIBS
6705 echo "$as_me:6705: result: $ac_cv_lib_mytinfo_tgoto" >&5
6706 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6707 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6708 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6718 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6720 for cf_add_1lib in $cf_add_0lib; do
6721 for cf_add_2lib in $cf_add_libs; do
6722 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6727 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6731 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6737 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6739 for cf_add_1lib in $cf_add_0lib; do
6740 for cf_add_2lib in $cf_add_libs; do
6741 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6746 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6752 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
6754 echo "$as_me:6754: checking for initscr" >&5
6755 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6756 if test "${ac_cv_func_initscr+set}" = set; then
6757 echo $ECHO_N "(cached) $ECHO_C" >&6
6759 cat >"conftest.$ac_ext" <<_ACEOF
6760 #line 6760 "configure"
6761 #include "confdefs.h"
6762 #define initscr autoconf_temporary
6763 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6770 /* We use char because int might match the return type of a gcc2
6771 builtin and then its argument prototype would still apply. */
6772 char initscr (void);
6778 /* The GNU C library defines stubs for functions which it implements
6779 to always fail with ENOSYS. Some functions are actually named
6780 something starting with __ and the normal name is an alias. */
6781 #if defined (__stub_initscr) || defined (__stub___initscr)
6782 #error found stub for initscr
6790 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6791 if { (eval echo "$as_me:6791: \"$ac_link\"") >&5
6792 (eval $ac_link) 2>&5
6794 echo "$as_me:6794: \$? = $ac_status" >&5
6795 (exit "$ac_status"); } &&
6796 { ac_try='test -s "conftest$ac_exeext"'
6797 { (eval echo "$as_me:6797: \"$ac_try\"") >&5
6800 echo "$as_me:6800: \$? = $ac_status" >&5
6801 (exit "$ac_status"); }; }; then
6802 ac_cv_func_initscr=yes
6804 echo "$as_me: failed program was:" >&5
6805 cat "conftest.$ac_ext" >&5
6806 ac_cv_func_initscr=no
6808 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6810 echo "$as_me:6810: result: $ac_cv_func_initscr" >&5
6811 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6812 if test "$ac_cv_func_initscr" = yes; then
6813 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6816 cf_save_LIBS="$LIBS"
6817 echo "$as_me:6817: checking for initscr in -l$cf_nculib_root" >&5
6818 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6819 LIBS="-l$cf_nculib_root $LIBS"
6820 cat >"conftest.$ac_ext" <<_ACEOF
6821 #line 6821 "configure"
6822 #include "confdefs.h"
6823 #include <${cf_cv_ncurses_header:-curses.h}>
6832 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6833 if { (eval echo "$as_me:6833: \"$ac_link\"") >&5
6834 (eval $ac_link) 2>&5
6836 echo "$as_me:6836: \$? = $ac_status" >&5
6837 (exit "$ac_status"); } &&
6838 { ac_try='test -s "conftest$ac_exeext"'
6839 { (eval echo "$as_me:6839: \"$ac_try\"") >&5
6842 echo "$as_me:6842: \$? = $ac_status" >&5
6843 (exit "$ac_status"); }; }; then
6844 echo "$as_me:6844: result: yes" >&5
6845 echo "${ECHO_T}yes" >&6
6846 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6849 echo "$as_me: failed program was:" >&5
6850 cat "conftest.$ac_ext" >&5
6851 echo "$as_me:6851: result: no" >&5
6852 echo "${ECHO_T}no" >&6
6855 cf_library_path_list=""
6856 if test -n "${LDFLAGS}${LIBS}" ; then
6857 for cf_library_path in $LDFLAGS $LIBS
6859 case "$cf_library_path" in
6861 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6863 test "x$cf_library_path" != "xNONE" && \
6864 test -d "$cf_library_path" && \
6866 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6867 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6868 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6869 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6870 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6871 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"
6874 cf_library_path_list="$cf_library_path_list $cf_search"
6882 test "x$prefix" != "xNONE" && \
6883 test -d "$prefix" && \
6885 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6886 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6887 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6888 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6889 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6890 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6893 for cf_subdir_prefix in \
6902 test "x$cf_subdir_prefix" != "x$prefix" && \
6903 test -d "$cf_subdir_prefix" && \
6904 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6905 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6906 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6907 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
6908 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
6909 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
6910 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"
6915 cf_search="$cf_library_path_list $cf_search"
6917 for cf_libdir in $cf_search
6919 echo "$as_me:6919: checking for -l$cf_nculib_root in $cf_libdir" >&5
6920 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6921 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6922 cat >"conftest.$ac_ext" <<_ACEOF
6923 #line 6923 "configure"
6924 #include "confdefs.h"
6925 #include <${cf_cv_ncurses_header:-curses.h}>
6934 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6935 if { (eval echo "$as_me:6935: \"$ac_link\"") >&5
6936 (eval $ac_link) 2>&5
6938 echo "$as_me:6938: \$? = $ac_status" >&5
6939 (exit "$ac_status"); } &&
6940 { ac_try='test -s "conftest$ac_exeext"'
6941 { (eval echo "$as_me:6941: \"$ac_try\"") >&5
6944 echo "$as_me:6944: \$? = $ac_status" >&5
6945 (exit "$ac_status"); }; }; then
6946 echo "$as_me:6946: result: yes" >&5
6947 echo "${ECHO_T}yes" >&6
6948 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6951 echo "$as_me: failed program was:" >&5
6952 cat "conftest.$ac_ext" >&5
6953 echo "$as_me:6953: result: no" >&5
6954 echo "${ECHO_T}no" >&6
6955 LIBS="$cf_save_LIBS"
6957 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6961 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6965 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
6967 if test "$cf_found_library" = no ; then
6968 { { echo "$as_me:6968: error: Cannot link $cf_nculib_root library" >&5
6969 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6970 { (exit 1); exit 1; }; }
6975 if test -n "$cf_ncurses_LIBS" ; then
6976 echo "$as_me:6976: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6977 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6978 cf_ncurses_SAVE="$LIBS"
6979 for p in $cf_ncurses_LIBS ; do
6980 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
6981 if test "$q" != "$LIBS" ; then
6985 cat >"conftest.$ac_ext" <<_ACEOF
6986 #line 6986 "configure"
6987 #include "confdefs.h"
6988 #include <${cf_cv_ncurses_header:-curses.h}>
6992 initscr(); mousemask(0,0); tigetstr((char *)0);
6997 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6998 if { (eval echo "$as_me:6998: \"$ac_link\"") >&5
6999 (eval $ac_link) 2>&5
7001 echo "$as_me:7001: \$? = $ac_status" >&5
7002 (exit "$ac_status"); } &&
7003 { ac_try='test -s "conftest$ac_exeext"'
7004 { (eval echo "$as_me:7004: \"$ac_try\"") >&5
7007 echo "$as_me:7007: \$? = $ac_status" >&5
7008 (exit "$ac_status"); }; }; then
7009 echo "$as_me:7009: result: yes" >&5
7010 echo "${ECHO_T}yes" >&6
7012 echo "$as_me: failed program was:" >&5
7013 cat "conftest.$ac_ext" >&5
7014 echo "$as_me:7014: result: no" >&5
7015 echo "${ECHO_T}no" >&6
7016 LIBS="$cf_ncurses_SAVE"
7018 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7021 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7023 cat >>confdefs.h <<EOF
7024 #define $cf_nculib_ROOT 1
7032 echo "$as_me:7032: checking for specified curses library type" >&5
7033 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
7035 # Check whether --with-screen or --without-screen was given.
7036 if test "${with_screen+set}" = set; then
7037 withval="$with_screen"
7038 cf_cv_screen=$withval
7040 cf_cv_screen=ncurses
7043 case $cf_cv_screen in
7049 for ac_header in wchar.h
7051 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7052 echo "$as_me:7052: checking for $ac_header" >&5
7053 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7054 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7055 echo $ECHO_N "(cached) $ECHO_C" >&6
7057 cat >"conftest.$ac_ext" <<_ACEOF
7058 #line 7058 "configure"
7059 #include "confdefs.h"
7060 #include <$ac_header>
7062 if { (eval echo "$as_me:7062: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7063 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7065 $EGREP -v '^ *\+' conftest.er1 >conftest.err
7067 cat conftest.err >&5
7068 echo "$as_me:7068: \$? = $ac_status" >&5
7069 (exit "$ac_status"); } >/dev/null; then
7070 if test -s conftest.err; then
7071 ac_cpp_err=$ac_c_preproc_warn_flag
7078 if test -z "$ac_cpp_err"; then
7079 eval "$as_ac_Header=yes"
7081 echo "$as_me: failed program was:" >&5
7082 cat "conftest.$ac_ext" >&5
7083 eval "$as_ac_Header=no"
7085 rm -f conftest.err "conftest.$ac_ext"
7087 echo "$as_me:7087: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7088 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7089 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7090 cat >>confdefs.h <<EOF
7091 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7097 echo "$as_me:7097: checking for multibyte character support" >&5
7098 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7099 if test "${cf_cv_utf8_lib+set}" = set; then
7100 echo $ECHO_N "(cached) $ECHO_C" >&6
7103 cf_save_LIBS="$LIBS"
7104 cat >"conftest.$ac_ext" <<_ACEOF
7105 #line 7105 "configure"
7106 #include "confdefs.h"
7108 $ac_includes_default
7121 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7122 if { (eval echo "$as_me:7122: \"$ac_link\"") >&5
7123 (eval $ac_link) 2>&5
7125 echo "$as_me:7125: \$? = $ac_status" >&5
7126 (exit "$ac_status"); } &&
7127 { ac_try='test -s "conftest$ac_exeext"'
7128 { (eval echo "$as_me:7128: \"$ac_try\"") >&5
7131 echo "$as_me:7131: \$? = $ac_status" >&5
7132 (exit "$ac_status"); }; }; then
7135 echo "$as_me: failed program was:" >&5
7136 cat "conftest.$ac_ext" >&5
7138 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7139 # will be set on completion of the AC_TRY_LINK below.
7140 cf_cv_header_path_utf8=
7141 cf_cv_library_path_utf8=
7143 echo "${as_me:-configure}:7143: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7145 cf_save_LIBS="$LIBS"
7147 cat >"conftest.$ac_ext" <<_ACEOF
7148 #line 7148 "configure"
7149 #include "confdefs.h"
7151 #include <libutf8.h>
7160 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7161 if { (eval echo "$as_me:7161: \"$ac_link\"") >&5
7162 (eval $ac_link) 2>&5
7164 echo "$as_me:7164: \$? = $ac_status" >&5
7165 (exit "$ac_status"); } &&
7166 { ac_try='test -s "conftest$ac_exeext"'
7167 { (eval echo "$as_me:7167: \"$ac_try\"") >&5
7170 echo "$as_me:7170: \$? = $ac_status" >&5
7171 (exit "$ac_status"); }; }; then
7173 cf_cv_find_linkage_utf8=yes
7174 cf_cv_header_path_utf8=/usr/include
7175 cf_cv_library_path_utf8=/usr/lib
7178 echo "$as_me: failed program was:" >&5
7179 cat "conftest.$ac_ext" >&5
7181 LIBS="-lutf8 $cf_save_LIBS"
7183 cat >"conftest.$ac_ext" <<_ACEOF
7184 #line 7184 "configure"
7185 #include "confdefs.h"
7187 #include <libutf8.h>
7196 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7197 if { (eval echo "$as_me:7197: \"$ac_link\"") >&5
7198 (eval $ac_link) 2>&5
7200 echo "$as_me:7200: \$? = $ac_status" >&5
7201 (exit "$ac_status"); } &&
7202 { ac_try='test -s "conftest$ac_exeext"'
7203 { (eval echo "$as_me:7203: \"$ac_try\"") >&5
7206 echo "$as_me:7206: \$? = $ac_status" >&5
7207 (exit "$ac_status"); }; }; then
7209 cf_cv_find_linkage_utf8=yes
7210 cf_cv_header_path_utf8=/usr/include
7211 cf_cv_library_path_utf8=/usr/lib
7212 cf_cv_library_file_utf8="-lutf8"
7215 echo "$as_me: failed program was:" >&5
7216 cat "conftest.$ac_ext" >&5
7218 cf_cv_find_linkage_utf8=no
7219 LIBS="$cf_save_LIBS"
7221 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
7223 echo "${as_me:-configure}:7223: testing find linkage for utf8 library ..." 1>&5
7225 echo "${as_me:-configure}:7225: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7227 cf_save_CPPFLAGS="$CPPFLAGS"
7228 cf_test_CPPFLAGS="$CPPFLAGS"
7232 # collect the current set of include-directories from compiler flags
7233 cf_header_path_list=""
7234 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7235 for cf_header_path in $CPPFLAGS $CFLAGS
7237 case "$cf_header_path" in
7239 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7241 test "x$cf_header_path" != "xNONE" && \
7242 test -d "$cf_header_path" && \
7244 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7245 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
7246 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
7247 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
7248 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
7249 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7252 cf_header_path_list="$cf_header_path_list $cf_search"
7258 # add the variations for the package we are looking for
7262 test "x$prefix" != "xNONE" && \
7263 test -d "$prefix" && \
7265 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7266 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
7267 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
7268 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
7269 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
7270 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
7273 for cf_subdir_prefix in \
7282 test "x$cf_subdir_prefix" != "x$prefix" && \
7283 test -d "$cf_subdir_prefix" && \
7284 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7285 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7286 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
7287 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
7288 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
7289 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
7290 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
7295 test "$includedir" != NONE && \
7296 test "$includedir" != "/usr/include" && \
7297 test -d "$includedir" && {
7298 test -d "$includedir" && cf_search="$cf_search $includedir"
7299 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
7302 test "$oldincludedir" != NONE && \
7303 test "$oldincludedir" != "/usr/include" && \
7304 test -d "$oldincludedir" && {
7305 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
7306 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
7309 cf_search="$cf_search $cf_header_path_list"
7311 for cf_cv_header_path_utf8 in $cf_search
7313 if test -d "$cf_cv_header_path_utf8" ; then
7314 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
7316 echo "${as_me:-configure}:7316: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7318 CPPFLAGS="$cf_save_CPPFLAGS"
7320 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7321 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
7323 cat >"conftest.$ac_ext" <<_ACEOF
7324 #line 7324 "configure"
7325 #include "confdefs.h"
7327 #include <libutf8.h>
7336 rm -f "conftest.$ac_objext"
7337 if { (eval echo "$as_me:7337: \"$ac_compile\"") >&5
7338 (eval $ac_compile) 2>&5
7340 echo "$as_me:7340: \$? = $ac_status" >&5
7341 (exit "$ac_status"); } &&
7342 { ac_try='test -s "conftest.$ac_objext"'
7343 { (eval echo "$as_me:7343: \"$ac_try\"") >&5
7346 echo "$as_me:7346: \$? = $ac_status" >&5
7347 (exit "$ac_status"); }; }; then
7349 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7351 echo "${as_me:-configure}:7351: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7353 cf_cv_find_linkage_utf8=maybe
7354 cf_test_CPPFLAGS="$CPPFLAGS"
7357 echo "$as_me: failed program was:" >&5
7358 cat "conftest.$ac_ext" >&5
7360 CPPFLAGS="$cf_save_CPPFLAGS"
7363 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7367 if test "$cf_cv_find_linkage_utf8" = maybe ; then
7369 echo "${as_me:-configure}:7369: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7371 cf_save_LIBS="$LIBS"
7372 cf_save_LDFLAGS="$LDFLAGS"
7374 if test "$cf_cv_find_linkage_utf8" != yes ; then
7377 cf_library_path_list=""
7378 if test -n "${LDFLAGS}${LIBS}" ; then
7379 for cf_library_path in $LDFLAGS $LIBS
7381 case "$cf_library_path" in
7383 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7385 test "x$cf_library_path" != "xNONE" && \
7386 test -d "$cf_library_path" && \
7388 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7389 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
7390 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
7391 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7392 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
7393 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7396 cf_library_path_list="$cf_library_path_list $cf_search"
7404 test "x$prefix" != "xNONE" && \
7405 test -d "$prefix" && \
7407 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7408 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
7409 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
7410 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
7411 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
7412 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
7415 for cf_subdir_prefix in \
7424 test "x$cf_subdir_prefix" != "x$prefix" && \
7425 test -d "$cf_subdir_prefix" && \
7426 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7427 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7428 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
7429 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
7430 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
7431 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
7432 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
7437 cf_search="$cf_library_path_list $cf_search"
7439 for cf_cv_library_path_utf8 in $cf_search
7441 if test -d "$cf_cv_library_path_utf8" ; then
7442 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7444 echo "${as_me:-configure}:7444: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7446 CPPFLAGS="$cf_test_CPPFLAGS"
7447 LIBS="-lutf8 $cf_save_LIBS"
7448 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7449 cat >"conftest.$ac_ext" <<_ACEOF
7450 #line 7450 "configure"
7451 #include "confdefs.h"
7453 #include <libutf8.h>
7462 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7463 if { (eval echo "$as_me:7463: \"$ac_link\"") >&5
7464 (eval $ac_link) 2>&5
7466 echo "$as_me:7466: \$? = $ac_status" >&5
7467 (exit "$ac_status"); } &&
7468 { ac_try='test -s "conftest$ac_exeext"'
7469 { (eval echo "$as_me:7469: \"$ac_try\"") >&5
7472 echo "$as_me:7472: \$? = $ac_status" >&5
7473 (exit "$ac_status"); }; }; then
7475 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7477 echo "${as_me:-configure}:7477: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7479 cf_cv_find_linkage_utf8=yes
7480 cf_cv_library_file_utf8="-lutf8"
7483 echo "$as_me: failed program was:" >&5
7484 cat "conftest.$ac_ext" >&5
7486 CPPFLAGS="$cf_save_CPPFLAGS"
7487 LIBS="$cf_save_LIBS"
7488 LDFLAGS="$cf_save_LDFLAGS"
7491 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7494 CPPFLAGS="$cf_save_CPPFLAGS"
7495 LDFLAGS="$cf_save_LDFLAGS"
7499 cf_cv_find_linkage_utf8=no
7503 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7506 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7508 LIBS="$cf_save_LIBS"
7510 if test "$cf_cv_find_linkage_utf8" = yes ; then
7511 cf_cv_utf8_lib=add-on
7517 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7519 echo "$as_me:7519: result: $cf_cv_utf8_lib" >&5
7520 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7522 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7524 if test "$cf_cv_utf8_lib" = "add-on" ; then
7526 cat >>confdefs.h <<\EOF
7527 #define HAVE_LIBUTF8_H 1
7530 if test -n "$cf_cv_header_path_utf8" ; then
7531 for cf_add_incdir in $cf_cv_header_path_utf8
7533 while test "$cf_add_incdir" != /usr/include
7535 if test -d "$cf_add_incdir"
7538 if test -n "$CFLAGS$CPPFLAGS" ; then
7539 # a loop is needed to ensure we can add subdirs of existing dirs
7540 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7541 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7542 cf_have_incdir=yes; break
7547 if test "$cf_have_incdir" = no ; then
7548 if test "$cf_add_incdir" = /usr/local/include ; then
7549 if test "$GCC" = yes
7551 cf_save_CPPFLAGS=$CPPFLAGS
7553 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7554 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7556 cat >"conftest.$ac_ext" <<_ACEOF
7557 #line 7557 "configure"
7558 #include "confdefs.h"
7568 rm -f "conftest.$ac_objext"
7569 if { (eval echo "$as_me:7569: \"$ac_compile\"") >&5
7570 (eval $ac_compile) 2>&5
7572 echo "$as_me:7572: \$? = $ac_status" >&5
7573 (exit "$ac_status"); } &&
7574 { ac_try='test -s "conftest.$ac_objext"'
7575 { (eval echo "$as_me:7575: \"$ac_try\"") >&5
7578 echo "$as_me:7578: \$? = $ac_status" >&5
7579 (exit "$ac_status"); }; }; then
7582 echo "$as_me: failed program was:" >&5
7583 cat "conftest.$ac_ext" >&5
7586 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7587 CPPFLAGS=$cf_save_CPPFLAGS
7592 if test "$cf_have_incdir" = no ; then
7593 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7595 echo "${as_me:-configure}:7595: testing adding $cf_add_incdir to include-path ..." 1>&5
7597 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7599 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7600 test "$cf_top_incdir" = "$cf_add_incdir" && break
7601 cf_add_incdir="$cf_top_incdir"
7612 if test -n "$cf_cv_library_path_utf8" ; then
7613 for cf_add_libdir in $cf_cv_library_path_utf8
7615 if test "$cf_add_libdir" = /usr/lib ; then
7617 elif test -d "$cf_add_libdir"
7620 if test -n "$LDFLAGS$LIBS" ; then
7621 # a loop is needed to ensure we can add subdirs of existing dirs
7622 for cf_test_libdir in $LDFLAGS $LIBS ; do
7623 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7624 cf_have_libdir=yes; break
7628 if test "$cf_have_libdir" = no ; then
7629 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7631 echo "${as_me:-configure}:7631: testing adding $cf_add_libdir to library-path ..." 1>&5
7633 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7642 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7644 for cf_add_1lib in $cf_add_0lib; do
7645 for cf_add_2lib in $cf_add_libs; do
7646 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7651 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7657 cf_ncuconfig_root=$cf_cv_screen
7658 cf_have_ncuconfig=no
7660 if test "x${PKG_CONFIG:=none}" != xnone; then
7661 echo "$as_me:7661: checking pkg-config for $cf_ncuconfig_root" >&5
7662 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7663 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7664 echo "$as_me:7664: result: yes" >&5
7665 echo "${ECHO_T}yes" >&6
7667 echo "$as_me:7667: checking if the $cf_ncuconfig_root package files work" >&5
7668 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7669 cf_have_ncuconfig=unknown
7671 cf_save_CFLAGS="$CFLAGS"
7672 cf_save_CPPFLAGS="$CPPFLAGS"
7673 cf_save_LIBS="$LIBS"
7675 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7676 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7678 # while -W for passing linker flags is prevalent, it is not "standard".
7679 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7680 # incompatible _and_ non-standard -W option which gives an error. Work
7681 # around that pitfall.
7682 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7688 cf_new_extra_cppflags=
7690 for cf_add_cflags in $cf_pkg_cflags
7692 case "$cf_fix_cppflags" in
7694 case "$cf_add_cflags" in
7695 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7696 case "$cf_add_cflags" in
7698 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7700 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7701 && test -z "${cf_tst_cflags}" \
7702 && cf_fix_cppflags=yes
7704 if test "$cf_fix_cppflags" = yes ; then
7706 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7707 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7710 elif test "${cf_tst_cflags}" = "\"'" ; then
7712 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7713 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7723 case "$cf_add_cflags" in
7725 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7727 CPPFLAGS=`echo "$CPPFLAGS" | \
7728 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7729 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7734 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7735 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7742 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7743 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7750 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7751 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7753 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7755 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7756 && test -z "${cf_tst_cflags}" \
7757 && cf_fix_cppflags=no
7762 if test -n "$cf_new_cflags" ; then
7764 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7765 CFLAGS="${CFLAGS}$cf_new_cflags"
7769 if test -n "$cf_new_cppflags" ; then
7771 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7772 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7776 if test -n "$cf_new_extra_cppflags" ; then
7778 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7779 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7786 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7788 for cf_add_1lib in $cf_add_0lib; do
7789 for cf_add_2lib in $cf_add_libs; do
7790 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7795 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7799 cat >"conftest.$ac_ext" <<_ACEOF
7800 #line 7800 "configure"
7801 #include "confdefs.h"
7802 #include <${cf_cv_ncurses_header:-curses.h}>
7806 initscr(); mousemask(0,0); tigetstr((char *)0);
7811 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7812 if { (eval echo "$as_me:7812: \"$ac_link\"") >&5
7813 (eval $ac_link) 2>&5
7815 echo "$as_me:7815: \$? = $ac_status" >&5
7816 (exit "$ac_status"); } &&
7817 { ac_try='test -s "conftest$ac_exeext"'
7818 { (eval echo "$as_me:7818: \"$ac_try\"") >&5
7821 echo "$as_me:7821: \$? = $ac_status" >&5
7822 (exit "$ac_status"); }; }; then
7823 if test "$cross_compiling" = yes; then
7824 cf_test_ncuconfig=maybe
7826 cat >"conftest.$ac_ext" <<_ACEOF
7827 #line 7827 "configure"
7828 #include "confdefs.h"
7829 #include <${cf_cv_ncurses_header:-curses.h}>
7831 { const char *xx = curses_version(); return (xx == 0); }
7833 rm -f "conftest$ac_exeext"
7834 if { (eval echo "$as_me:7834: \"$ac_link\"") >&5
7835 (eval $ac_link) 2>&5
7837 echo "$as_me:7837: \$? = $ac_status" >&5
7838 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7839 { (eval echo "$as_me:7839: \"$ac_try\"") >&5
7842 echo "$as_me:7842: \$? = $ac_status" >&5
7843 (exit "$ac_status"); }; }; then
7844 cf_test_ncuconfig=yes
7846 echo "$as_me: program exited with status $ac_status" >&5
7847 echo "$as_me: failed program was:" >&5
7848 cat "conftest.$ac_ext" >&5
7849 cf_test_ncuconfig=no
7851 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7854 echo "$as_me: failed program was:" >&5
7855 cat "conftest.$ac_ext" >&5
7856 cf_test_ncuconfig=no
7858 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7860 CFLAGS="$cf_save_CFLAGS"
7861 CPPFLAGS="$cf_save_CPPFLAGS"
7862 LIBS="$cf_save_LIBS"
7864 if test "x$cf_test_ncuconfig" != xyes; then
7865 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7866 cf_pkg_cflags="$cf_temp"
7867 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7868 cf_pkg_libs="$cf_temp"
7873 for cf_add_cflags in $cf_pkg_cflags
7875 case "x$cf_add_cflags" in
7878 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7881 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'`
7882 test "$CFLAGS" != "$cf_old_cflag" || break
7884 CFLAGS="$cf_old_cflag"
7887 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7890 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'`
7891 test "$CPPFLAGS" != "$cf_old_cflag" || break
7893 CPPFLAGS="$cf_old_cflag"
7902 cf_new_extra_cppflags=
7904 for cf_add_cflags in $cf_add_cflags
7906 case "$cf_fix_cppflags" in
7908 case "$cf_add_cflags" in
7909 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7910 case "$cf_add_cflags" in
7912 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7914 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7915 && test -z "${cf_tst_cflags}" \
7916 && cf_fix_cppflags=yes
7918 if test "$cf_fix_cppflags" = yes ; then
7920 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7921 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7924 elif test "${cf_tst_cflags}" = "\"'" ; then
7926 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7927 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7937 case "$cf_add_cflags" in
7939 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7941 CPPFLAGS=`echo "$CPPFLAGS" | \
7942 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7943 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7948 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7949 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7956 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7957 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7964 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7965 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7967 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7969 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7970 && test -z "${cf_tst_cflags}" \
7971 && cf_fix_cppflags=no
7976 if test -n "$cf_new_cflags" ; then
7978 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7979 CFLAGS="${CFLAGS}$cf_new_cflags"
7983 if test -n "$cf_new_cppflags" ; then
7985 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7986 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7990 if test -n "$cf_new_extra_cppflags" ; then
7992 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7993 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8002 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8004 for cf_add_1lib in $cf_add_0lib; do
8005 for cf_add_2lib in $cf_add_libs; do
8006 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8011 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8015 cat >"conftest.$ac_ext" <<_ACEOF
8016 #line 8016 "configure"
8017 #include "confdefs.h"
8018 #include <${cf_cv_ncurses_header:-curses.h}>
8022 initscr(); mousemask(0,0); tigetstr((char *)0);
8027 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8028 if { (eval echo "$as_me:8028: \"$ac_link\"") >&5
8029 (eval $ac_link) 2>&5
8031 echo "$as_me:8031: \$? = $ac_status" >&5
8032 (exit "$ac_status"); } &&
8033 { ac_try='test -s "conftest$ac_exeext"'
8034 { (eval echo "$as_me:8034: \"$ac_try\"") >&5
8037 echo "$as_me:8037: \$? = $ac_status" >&5
8038 (exit "$ac_status"); }; }; then
8039 if test "$cross_compiling" = yes; then
8040 cf_have_ncuconfig=maybe
8042 cat >"conftest.$ac_ext" <<_ACEOF
8043 #line 8043 "configure"
8044 #include "confdefs.h"
8045 #include <${cf_cv_ncurses_header:-curses.h}>
8047 { const char *xx = curses_version(); return (xx == 0); }
8049 rm -f "conftest$ac_exeext"
8050 if { (eval echo "$as_me:8050: \"$ac_link\"") >&5
8051 (eval $ac_link) 2>&5
8053 echo "$as_me:8053: \$? = $ac_status" >&5
8054 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8055 { (eval echo "$as_me:8055: \"$ac_try\"") >&5
8058 echo "$as_me:8058: \$? = $ac_status" >&5
8059 (exit "$ac_status"); }; }; then
8060 cf_have_ncuconfig=yes
8062 echo "$as_me: program exited with status $ac_status" >&5
8063 echo "$as_me: failed program was:" >&5
8064 cat "conftest.$ac_ext" >&5
8065 cf_have_ncuconfig=no
8067 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8070 echo "$as_me: failed program was:" >&5
8071 cat "conftest.$ac_ext" >&5
8072 cf_have_ncuconfig=no
8074 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8075 echo "$as_me:8075: result: $cf_have_ncuconfig" >&5
8076 echo "${ECHO_T}$cf_have_ncuconfig" >&6
8077 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
8078 if test "$cf_have_ncuconfig" != "yes"
8080 CPPFLAGS="$cf_save_CPPFLAGS"
8081 LIBS="$cf_save_LIBS"
8082 NCURSES_CONFIG_PKG=none
8085 cat >>confdefs.h <<\EOF
8089 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
8091 echo "$as_me:8091: checking for terminfo header" >&5
8092 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8093 if test "${cf_cv_term_header+set}" = set; then
8094 echo $ECHO_N "(cached) $ECHO_C" >&6
8097 case "${cf_cv_ncurses_header}" in
8098 (*/ncurses.h|*/ncursesw.h)
8099 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8102 cf_term_header=term.h
8106 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8108 cat >"conftest.$ac_ext" <<_ACEOF
8109 #line 8109 "configure"
8110 #include "confdefs.h"
8112 #include <${cf_cv_ncurses_header:-curses.h}>
8118 int x = auto_left_margin; (void)x
8123 rm -f "conftest.$ac_objext"
8124 if { (eval echo "$as_me:8124: \"$ac_compile\"") >&5
8125 (eval $ac_compile) 2>&5
8127 echo "$as_me:8127: \$? = $ac_status" >&5
8128 (exit "$ac_status"); } &&
8129 { ac_try='test -s "conftest.$ac_objext"'
8130 { (eval echo "$as_me:8130: \"$ac_try\"") >&5
8133 echo "$as_me:8133: \$? = $ac_status" >&5
8134 (exit "$ac_status"); }; }; then
8136 cf_cv_term_header="$cf_test"
8138 echo "$as_me: failed program was:" >&5
8139 cat "conftest.$ac_ext" >&5
8141 cf_cv_term_header=unknown
8144 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8145 test "$cf_cv_term_header" != unknown && break
8149 echo "$as_me:8149: result: $cf_cv_term_header" >&5
8150 echo "${ECHO_T}$cf_cv_term_header" >&6
8152 # Set definitions to allow ifdef'ing to accommodate subdirectories
8154 case "$cf_cv_term_header" in
8157 cat >>confdefs.h <<\EOF
8158 #define HAVE_TERM_H 1
8164 case "$cf_cv_term_header" in
8167 cat >>confdefs.h <<\EOF
8168 #define HAVE_NCURSES_TERM_H 1
8174 cat >>confdefs.h <<\EOF
8175 #define HAVE_NCURSESW_TERM_H 1
8184 echo "$as_me:8184: result: no" >&5
8185 echo "${ECHO_T}no" >&6
8186 NCURSES_CONFIG_PKG=none
8189 NCURSES_CONFIG_PKG=none
8192 if test "x$cf_have_ncuconfig" = "xno"; then
8193 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
8195 if test -n "$ac_tool_prefix"; then
8196 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8198 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8199 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8200 echo "$as_me:8200: checking for $ac_word" >&5
8201 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8202 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8203 echo $ECHO_N "(cached) $ECHO_C" >&6
8205 if test -n "$NCURSES_CONFIG"; then
8206 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8208 ac_save_IFS=$IFS; IFS=$ac_path_separator
8210 for ac_dir in $ac_dummy; do
8212 test -z "$ac_dir" && ac_dir=.
8213 $as_executable_p "$ac_dir/$ac_word" || continue
8214 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8215 echo "$as_me:8215: found $ac_dir/$ac_word" >&5
8221 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8222 if test -n "$NCURSES_CONFIG"; then
8223 echo "$as_me:8223: result: $NCURSES_CONFIG" >&5
8224 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8226 echo "$as_me:8226: result: no" >&5
8227 echo "${ECHO_T}no" >&6
8230 test -n "$NCURSES_CONFIG" && break
8233 if test -z "$NCURSES_CONFIG"; then
8234 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8235 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8237 # Extract the first word of "$ac_prog", so it can be a program name with args.
8238 set dummy $ac_prog; ac_word=$2
8239 echo "$as_me:8239: checking for $ac_word" >&5
8240 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8241 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8242 echo $ECHO_N "(cached) $ECHO_C" >&6
8244 if test -n "$ac_ct_NCURSES_CONFIG"; then
8245 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8247 ac_save_IFS=$IFS; IFS=$ac_path_separator
8249 for ac_dir in $ac_dummy; do
8251 test -z "$ac_dir" && ac_dir=.
8252 $as_executable_p "$ac_dir/$ac_word" || continue
8253 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8254 echo "$as_me:8254: found $ac_dir/$ac_word" >&5
8260 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8261 if test -n "$ac_ct_NCURSES_CONFIG"; then
8262 echo "$as_me:8262: result: $ac_ct_NCURSES_CONFIG" >&5
8263 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8265 echo "$as_me:8265: result: no" >&5
8266 echo "${ECHO_T}no" >&6
8269 test -n "$ac_ct_NCURSES_CONFIG" && break
8271 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8273 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8276 if test "$NCURSES_CONFIG" != none ; then
8278 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
8280 case "x$cf_add_cflags" in
8283 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8286 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'`
8287 test "$CFLAGS" != "$cf_old_cflag" || break
8289 CFLAGS="$cf_old_cflag"
8292 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8295 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'`
8296 test "$CPPFLAGS" != "$cf_old_cflag" || break
8298 CPPFLAGS="$cf_old_cflag"
8307 cf_new_extra_cppflags=
8309 for cf_add_cflags in $cf_add_cflags
8311 case "$cf_fix_cppflags" in
8313 case "$cf_add_cflags" in
8314 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8315 case "$cf_add_cflags" in
8317 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8319 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8320 && test -z "${cf_tst_cflags}" \
8321 && cf_fix_cppflags=yes
8323 if test "$cf_fix_cppflags" = yes ; then
8325 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8326 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8329 elif test "${cf_tst_cflags}" = "\"'" ; then
8331 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8332 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8342 case "$cf_add_cflags" in
8344 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8346 CPPFLAGS=`echo "$CPPFLAGS" | \
8347 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8348 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8353 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8354 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8361 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8362 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8369 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8370 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8372 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8374 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8375 && test -z "${cf_tst_cflags}" \
8376 && cf_fix_cppflags=no
8381 if test -n "$cf_new_cflags" ; then
8383 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8384 CFLAGS="${CFLAGS}$cf_new_cflags"
8388 if test -n "$cf_new_cppflags" ; then
8390 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8391 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8395 if test -n "$cf_new_extra_cppflags" ; then
8397 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8398 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8407 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8409 for cf_add_1lib in $cf_add_0lib; do
8410 for cf_add_2lib in $cf_add_libs; do
8411 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8416 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8420 # even with config script, some packages use no-override for curses.h
8422 echo "$as_me:8422: checking if we have identified curses headers" >&5
8423 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8424 if test "${cf_cv_ncurses_header+set}" = set; then
8425 echo $ECHO_N "(cached) $ECHO_C" >&6
8428 cf_cv_ncurses_header=none
8430 ncurses.h $cf_cv_screen/ncurses.h \
8431 curses.h $cf_cv_screen/curses.h
8433 cat >"conftest.$ac_ext" <<_ACEOF
8434 #line 8434 "configure"
8435 #include "confdefs.h"
8436 #include <${cf_header}>
8445 rm -f "conftest.$ac_objext"
8446 if { (eval echo "$as_me:8446: \"$ac_compile\"") >&5
8447 (eval $ac_compile) 2>&5
8449 echo "$as_me:8449: \$? = $ac_status" >&5
8450 (exit "$ac_status"); } &&
8451 { ac_try='test -s "conftest.$ac_objext"'
8452 { (eval echo "$as_me:8452: \"$ac_try\"") >&5
8455 echo "$as_me:8455: \$? = $ac_status" >&5
8456 (exit "$ac_status"); }; }; then
8457 cf_cv_ncurses_header=$cf_header; break
8459 echo "$as_me: failed program was:" >&5
8460 cat "conftest.$ac_ext" >&5
8462 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8466 echo "$as_me:8466: result: $cf_cv_ncurses_header" >&5
8467 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8469 if test "$cf_cv_ncurses_header" = none ; then
8470 { { echo "$as_me:8470: error: No curses header-files found" >&5
8471 echo "$as_me: error: No curses header-files found" >&2;}
8472 { (exit 1); exit 1; }; }
8475 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8477 for ac_header in $cf_cv_ncurses_header
8479 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8480 echo "$as_me:8480: checking for $ac_header" >&5
8481 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8482 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8483 echo $ECHO_N "(cached) $ECHO_C" >&6
8485 cat >"conftest.$ac_ext" <<_ACEOF
8486 #line 8486 "configure"
8487 #include "confdefs.h"
8488 #include <$ac_header>
8490 if { (eval echo "$as_me:8490: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8491 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8493 $EGREP -v '^ *\+' conftest.er1 >conftest.err
8495 cat conftest.err >&5
8496 echo "$as_me:8496: \$? = $ac_status" >&5
8497 (exit "$ac_status"); } >/dev/null; then
8498 if test -s conftest.err; then
8499 ac_cpp_err=$ac_c_preproc_warn_flag
8506 if test -z "$ac_cpp_err"; then
8507 eval "$as_ac_Header=yes"
8509 echo "$as_me: failed program was:" >&5
8510 cat "conftest.$ac_ext" >&5
8511 eval "$as_ac_Header=no"
8513 rm -f conftest.err "conftest.$ac_ext"
8515 echo "$as_me:8515: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8516 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8517 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8518 cat >>confdefs.h <<EOF
8519 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8525 cat >>confdefs.h <<\EOF
8529 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8531 cat >>confdefs.h <<EOF
8532 #define $cf_nculib_ROOT 1
8535 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
8539 cf_ncuhdr_root=$cf_cv_screen
8541 test -n "$cf_cv_curses_dir" && \
8542 test "$cf_cv_curses_dir" != "no" && { \
8544 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8545 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8547 while test "$cf_add_incdir" != /usr/include
8549 if test -d "$cf_add_incdir"
8552 if test -n "$CFLAGS$CPPFLAGS" ; then
8553 # a loop is needed to ensure we can add subdirs of existing dirs
8554 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8555 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8556 cf_have_incdir=yes; break
8561 if test "$cf_have_incdir" = no ; then
8562 if test "$cf_add_incdir" = /usr/local/include ; then
8563 if test "$GCC" = yes
8565 cf_save_CPPFLAGS=$CPPFLAGS
8567 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8568 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8570 cat >"conftest.$ac_ext" <<_ACEOF
8571 #line 8571 "configure"
8572 #include "confdefs.h"
8582 rm -f "conftest.$ac_objext"
8583 if { (eval echo "$as_me:8583: \"$ac_compile\"") >&5
8584 (eval $ac_compile) 2>&5
8586 echo "$as_me:8586: \$? = $ac_status" >&5
8587 (exit "$ac_status"); } &&
8588 { ac_try='test -s "conftest.$ac_objext"'
8589 { (eval echo "$as_me:8589: \"$ac_try\"") >&5
8592 echo "$as_me:8592: \$? = $ac_status" >&5
8593 (exit "$ac_status"); }; }; then
8596 echo "$as_me: failed program was:" >&5
8597 cat "conftest.$ac_ext" >&5
8600 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8601 CPPFLAGS=$cf_save_CPPFLAGS
8606 if test "$cf_have_incdir" = no ; then
8607 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8609 echo "${as_me:-configure}:8609: testing adding $cf_add_incdir to include-path ..." 1>&5
8611 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8613 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8614 test "$cf_top_incdir" = "$cf_add_incdir" && break
8615 cf_add_incdir="$cf_top_incdir"
8628 echo "$as_me:8628: checking for $cf_ncuhdr_root header in include-path" >&5
8629 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8630 if test "${cf_cv_ncurses_h+set}" = set; then
8631 echo $ECHO_N "(cached) $ECHO_C" >&6
8634 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8635 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
8636 for cf_header in $cf_header_list
8639 cat >"conftest.$ac_ext" <<_ACEOF
8640 #line 8640 "configure"
8641 #include "confdefs.h"
8643 #include <$cf_header>
8648 #ifdef NCURSES_VERSION
8650 printf("%s\\n", NCURSES_VERSION);
8655 #error __NCURSES_H is not defined
8663 rm -f "conftest.$ac_objext"
8664 if { (eval echo "$as_me:8664: \"$ac_compile\"") >&5
8665 (eval $ac_compile) 2>&5
8667 echo "$as_me:8667: \$? = $ac_status" >&5
8668 (exit "$ac_status"); } &&
8669 { ac_try='test -s "conftest.$ac_objext"'
8670 { (eval echo "$as_me:8670: \"$ac_try\"") >&5
8673 echo "$as_me:8673: \$? = $ac_status" >&5
8674 (exit "$ac_status"); }; }; then
8675 cf_cv_ncurses_h=$cf_header
8678 echo "$as_me: failed program was:" >&5
8679 cat "conftest.$ac_ext" >&5
8682 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8684 test "$cf_cv_ncurses_h" != no && break
8688 echo "$as_me:8688: result: $cf_cv_ncurses_h" >&5
8689 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8691 if test "$cf_cv_ncurses_h" != no ; then
8692 cf_cv_ncurses_header=$cf_cv_ncurses_h
8695 echo "$as_me:8695: checking for $cf_ncuhdr_root include-path" >&5
8696 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8697 if test "${cf_cv_ncurses_h2+set}" = set; then
8698 echo $ECHO_N "(cached) $ECHO_C" >&6
8701 test -n "$verbose" && echo
8705 # collect the current set of include-directories from compiler flags
8706 cf_header_path_list=""
8707 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8708 for cf_header_path in $CPPFLAGS $CFLAGS
8710 case "$cf_header_path" in
8712 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8714 test "x$cf_header_path" != "xNONE" && \
8715 test -d "$cf_header_path" && \
8717 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8718 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8719 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8720 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8721 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8722 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"
8725 cf_header_path_list="$cf_header_path_list $cf_search"
8731 # add the variations for the package we are looking for
8735 test "x$prefix" != "xNONE" && \
8736 test -d "$prefix" && \
8738 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8739 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8740 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8741 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8742 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8743 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8746 for cf_subdir_prefix in \
8755 test "x$cf_subdir_prefix" != "x$prefix" && \
8756 test -d "$cf_subdir_prefix" && \
8757 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8758 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8759 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8760 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8761 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8762 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8763 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"
8768 test "$includedir" != NONE && \
8769 test "$includedir" != "/usr/include" && \
8770 test -d "$includedir" && {
8771 test -d "$includedir" && cf_search="$cf_search $includedir"
8772 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8775 test "$oldincludedir" != NONE && \
8776 test "$oldincludedir" != "/usr/include" && \
8777 test -d "$oldincludedir" && {
8778 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8779 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8782 cf_search="$cf_search $cf_header_path_list"
8784 test -n "$verbose" && echo "search path $cf_search"
8785 cf_save2_CPPFLAGS="$CPPFLAGS"
8786 for cf_incdir in $cf_search
8789 if test -n "$cf_incdir" ; then
8790 for cf_add_incdir in $cf_incdir
8792 while test "$cf_add_incdir" != /usr/include
8794 if test -d "$cf_add_incdir"
8797 if test -n "$CFLAGS$CPPFLAGS" ; then
8798 # a loop is needed to ensure we can add subdirs of existing dirs
8799 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8800 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8801 cf_have_incdir=yes; break
8806 if test "$cf_have_incdir" = no ; then
8807 if test "$cf_add_incdir" = /usr/local/include ; then
8808 if test "$GCC" = yes
8810 cf_save_CPPFLAGS=$CPPFLAGS
8812 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8813 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8815 cat >"conftest.$ac_ext" <<_ACEOF
8816 #line 8816 "configure"
8817 #include "confdefs.h"
8827 rm -f "conftest.$ac_objext"
8828 if { (eval echo "$as_me:8828: \"$ac_compile\"") >&5
8829 (eval $ac_compile) 2>&5
8831 echo "$as_me:8831: \$? = $ac_status" >&5
8832 (exit "$ac_status"); } &&
8833 { ac_try='test -s "conftest.$ac_objext"'
8834 { (eval echo "$as_me:8834: \"$ac_try\"") >&5
8837 echo "$as_me:8837: \$? = $ac_status" >&5
8838 (exit "$ac_status"); }; }; then
8841 echo "$as_me: failed program was:" >&5
8842 cat "conftest.$ac_ext" >&5
8845 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8846 CPPFLAGS=$cf_save_CPPFLAGS
8851 if test "$cf_have_incdir" = no ; then
8852 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8854 echo "${as_me:-configure}:8854: testing adding $cf_add_incdir to include-path ..." 1>&5
8856 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8858 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8859 test "$cf_top_incdir" = "$cf_add_incdir" && break
8860 cf_add_incdir="$cf_top_incdir"
8876 cat >"conftest.$ac_ext" <<_ACEOF
8877 #line 8877 "configure"
8878 #include "confdefs.h"
8880 #include <$cf_header>
8885 #ifdef NCURSES_VERSION
8887 printf("%s\\n", NCURSES_VERSION);
8892 #error __NCURSES_H is not defined
8900 rm -f "conftest.$ac_objext"
8901 if { (eval echo "$as_me:8901: \"$ac_compile\"") >&5
8902 (eval $ac_compile) 2>&5
8904 echo "$as_me:8904: \$? = $ac_status" >&5
8905 (exit "$ac_status"); } &&
8906 { ac_try='test -s "conftest.$ac_objext"'
8907 { (eval echo "$as_me:8907: \"$ac_try\"") >&5
8910 echo "$as_me:8910: \$? = $ac_status" >&5
8911 (exit "$ac_status"); }; }; then
8912 cf_cv_ncurses_h2=$cf_header
8915 echo "$as_me: failed program was:" >&5
8916 cat "conftest.$ac_ext" >&5
8919 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8921 if test "$cf_cv_ncurses_h2" != no ; then
8922 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8923 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
8926 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8928 CPPFLAGS="$cf_save2_CPPFLAGS"
8929 test "$cf_cv_ncurses_h2" != no && break
8931 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8931: error: not found" >&5
8932 echo "$as_me: error: not found" >&2;}
8933 { (exit 1); exit 1; }; }
8936 echo "$as_me:8936: result: $cf_cv_ncurses_h2" >&5
8937 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8939 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
8940 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
8941 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
8942 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
8945 if test -n "$cf_1st_incdir" ; then
8946 for cf_add_incdir in $cf_1st_incdir
8948 while test "$cf_add_incdir" != /usr/include
8950 if test -d "$cf_add_incdir"
8953 if test -n "$CFLAGS$CPPFLAGS" ; then
8954 # a loop is needed to ensure we can add subdirs of existing dirs
8955 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8956 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8957 cf_have_incdir=yes; break
8962 if test "$cf_have_incdir" = no ; then
8963 if test "$cf_add_incdir" = /usr/local/include ; then
8964 if test "$GCC" = yes
8966 cf_save_CPPFLAGS=$CPPFLAGS
8968 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8969 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8971 cat >"conftest.$ac_ext" <<_ACEOF
8972 #line 8972 "configure"
8973 #include "confdefs.h"
8983 rm -f "conftest.$ac_objext"
8984 if { (eval echo "$as_me:8984: \"$ac_compile\"") >&5
8985 (eval $ac_compile) 2>&5
8987 echo "$as_me:8987: \$? = $ac_status" >&5
8988 (exit "$ac_status"); } &&
8989 { ac_try='test -s "conftest.$ac_objext"'
8990 { (eval echo "$as_me:8990: \"$ac_try\"") >&5
8993 echo "$as_me:8993: \$? = $ac_status" >&5
8994 (exit "$ac_status"); }; }; then
8997 echo "$as_me: failed program was:" >&5
8998 cat "conftest.$ac_ext" >&5
9001 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9002 CPPFLAGS=$cf_save_CPPFLAGS
9007 if test "$cf_have_incdir" = no ; then
9008 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9010 echo "${as_me:-configure}:9010: testing adding $cf_add_incdir to include-path ..." 1>&5
9012 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9014 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9015 test "$cf_top_incdir" = "$cf_add_incdir" && break
9016 cf_add_incdir="$cf_top_incdir"
9029 # Set definitions to allow ifdef'ing for ncurses.h
9031 case "$cf_cv_ncurses_header" in
9034 cat >>confdefs.h <<\EOF
9035 #define HAVE_NCURSES_H 1
9041 case "$cf_cv_ncurses_header" in
9042 (ncurses/curses.h|ncurses/ncurses.h)
9044 cat >>confdefs.h <<\EOF
9045 #define HAVE_NCURSES_NCURSES_H 1
9049 (ncursesw/curses.h|ncursesw/ncurses.h)
9051 cat >>confdefs.h <<\EOF
9052 #define HAVE_NCURSESW_NCURSES_H 1
9058 echo "$as_me:9058: checking for terminfo header" >&5
9059 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9060 if test "${cf_cv_term_header+set}" = set; then
9061 echo $ECHO_N "(cached) $ECHO_C" >&6
9064 case "${cf_cv_ncurses_header}" in
9065 (*/ncurses.h|*/ncursesw.h)
9066 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9069 cf_term_header=term.h
9073 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9075 cat >"conftest.$ac_ext" <<_ACEOF
9076 #line 9076 "configure"
9077 #include "confdefs.h"
9079 #include <${cf_cv_ncurses_header:-curses.h}>
9085 int x = auto_left_margin; (void)x
9090 rm -f "conftest.$ac_objext"
9091 if { (eval echo "$as_me:9091: \"$ac_compile\"") >&5
9092 (eval $ac_compile) 2>&5
9094 echo "$as_me:9094: \$? = $ac_status" >&5
9095 (exit "$ac_status"); } &&
9096 { ac_try='test -s "conftest.$ac_objext"'
9097 { (eval echo "$as_me:9097: \"$ac_try\"") >&5
9100 echo "$as_me:9100: \$? = $ac_status" >&5
9101 (exit "$ac_status"); }; }; then
9103 cf_cv_term_header="$cf_test"
9105 echo "$as_me: failed program was:" >&5
9106 cat "conftest.$ac_ext" >&5
9108 cf_cv_term_header=unknown
9111 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9112 test "$cf_cv_term_header" != unknown && break
9116 echo "$as_me:9116: result: $cf_cv_term_header" >&5
9117 echo "${ECHO_T}$cf_cv_term_header" >&6
9119 # Set definitions to allow ifdef'ing to accommodate subdirectories
9121 case "$cf_cv_term_header" in
9124 cat >>confdefs.h <<\EOF
9125 #define HAVE_TERM_H 1
9131 case "$cf_cv_term_header" in
9134 cat >>confdefs.h <<\EOF
9135 #define HAVE_NCURSES_TERM_H 1
9141 cat >>confdefs.h <<\EOF
9142 #define HAVE_NCURSESW_TERM_H 1
9148 # some applications need this, but should check for NCURSES_VERSION
9150 cat >>confdefs.h <<\EOF
9154 echo "$as_me:9154: checking for ncurses version" >&5
9155 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9156 if test "${cf_cv_ncurses_version+set}" = set; then
9157 echo $ECHO_N "(cached) $ECHO_C" >&6
9160 cf_cv_ncurses_version=no
9162 rm -f "$cf_tempfile"
9163 if test "$cross_compiling" = yes; then
9165 # This will not work if the preprocessor splits the line after the
9166 # Autoconf token. The 'unproto' program does that.
9167 cat > "conftest.$ac_ext" <<EOF
9168 #include <${cf_cv_ncurses_header:-curses.h}>
9170 #ifdef NCURSES_VERSION
9171 Autoconf NCURSES_VERSION
9179 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9180 { (eval echo "$as_me:9180: \"$cf_try\"") >&5
9183 echo "$as_me:9183: \$? = $ac_status" >&5
9184 (exit "$ac_status"); }
9185 if test -f conftest.out ; then
9186 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
9187 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9192 cat >"conftest.$ac_ext" <<_ACEOF
9193 #line 9193 "configure"
9194 #include "confdefs.h"
9196 $ac_includes_default
9198 #include <${cf_cv_ncurses_header:-curses.h}>
9202 FILE *fp = fopen("$cf_tempfile", "w");
9203 #ifdef NCURSES_VERSION
9204 # ifdef NCURSES_VERSION_PATCH
9205 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9207 fprintf(fp, "%s\\n", NCURSES_VERSION);
9211 fprintf(fp, "old\\n");
9213 #error expected ncurses header to define __NCURSES_H
9216 ${cf_cv_main_return:-return}(0);
9219 rm -f "conftest$ac_exeext"
9220 if { (eval echo "$as_me:9220: \"$ac_link\"") >&5
9221 (eval $ac_link) 2>&5
9223 echo "$as_me:9223: \$? = $ac_status" >&5
9224 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9225 { (eval echo "$as_me:9225: \"$ac_try\"") >&5
9228 echo "$as_me:9228: \$? = $ac_status" >&5
9229 (exit "$ac_status"); }; }; then
9231 cf_cv_ncurses_version=`cat $cf_tempfile`
9233 echo "$as_me: program exited with status $ac_status" >&5
9234 echo "$as_me: failed program was:" >&5
9235 cat "conftest.$ac_ext" >&5
9237 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9239 rm -f "$cf_tempfile"
9242 echo "$as_me:9242: result: $cf_cv_ncurses_version" >&5
9243 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9244 test "$cf_cv_ncurses_version" = no ||
9245 cat >>confdefs.h <<\EOF
9249 cf_nculib_root=$cf_cv_screen
9250 # This works, except for the special case where we find gpm, but
9251 # ncurses is in a nonstandard location via $LIBS, and we really want
9254 cf_ncurses_SAVE="$LIBS"
9255 echo "$as_me:9255: checking for Gpm_Open in -lgpm" >&5
9256 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9257 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9258 echo $ECHO_N "(cached) $ECHO_C" >&6
9260 ac_check_lib_save_LIBS=$LIBS
9262 cat >"conftest.$ac_ext" <<_ACEOF
9263 #line 9263 "configure"
9264 #include "confdefs.h"
9266 /* Override any gcc2 internal prototype to avoid an error. */
9270 /* We use char because int might match the return type of a gcc2
9271 builtin and then its argument prototype would still apply. */
9272 char Gpm_Open (void);
9281 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9282 if { (eval echo "$as_me:9282: \"$ac_link\"") >&5
9283 (eval $ac_link) 2>&5
9285 echo "$as_me:9285: \$? = $ac_status" >&5
9286 (exit "$ac_status"); } &&
9287 { ac_try='test -s "conftest$ac_exeext"'
9288 { (eval echo "$as_me:9288: \"$ac_try\"") >&5
9291 echo "$as_me:9291: \$? = $ac_status" >&5
9292 (exit "$ac_status"); }; }; then
9293 ac_cv_lib_gpm_Gpm_Open=yes
9295 echo "$as_me: failed program was:" >&5
9296 cat "conftest.$ac_ext" >&5
9297 ac_cv_lib_gpm_Gpm_Open=no
9299 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9300 LIBS=$ac_check_lib_save_LIBS
9302 echo "$as_me:9302: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9303 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9304 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
9305 echo "$as_me:9305: checking for initscr in -lgpm" >&5
9306 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9307 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9308 echo $ECHO_N "(cached) $ECHO_C" >&6
9310 ac_check_lib_save_LIBS=$LIBS
9312 cat >"conftest.$ac_ext" <<_ACEOF
9313 #line 9313 "configure"
9314 #include "confdefs.h"
9316 /* Override any gcc2 internal prototype to avoid an error. */
9320 /* We use char because int might match the return type of a gcc2
9321 builtin and then its argument prototype would still apply. */
9322 char initscr (void);
9331 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9332 if { (eval echo "$as_me:9332: \"$ac_link\"") >&5
9333 (eval $ac_link) 2>&5
9335 echo "$as_me:9335: \$? = $ac_status" >&5
9336 (exit "$ac_status"); } &&
9337 { ac_try='test -s "conftest$ac_exeext"'
9338 { (eval echo "$as_me:9338: \"$ac_try\"") >&5
9341 echo "$as_me:9341: \$? = $ac_status" >&5
9342 (exit "$ac_status"); }; }; then
9343 ac_cv_lib_gpm_initscr=yes
9345 echo "$as_me: failed program was:" >&5
9346 cat "conftest.$ac_ext" >&5
9347 ac_cv_lib_gpm_initscr=no
9349 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9350 LIBS=$ac_check_lib_save_LIBS
9352 echo "$as_me:9352: result: $ac_cv_lib_gpm_initscr" >&5
9353 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9354 if test "$ac_cv_lib_gpm_initscr" = yes; then
9355 LIBS="$cf_ncurses_SAVE"
9357 cf_ncurses_LIBS="-lgpm"
9364 # This is only necessary if you are linking against an obsolete
9365 # version of ncurses (but it should do no harm, since it is static).
9366 if test "$cf_nculib_root" = ncurses ; then
9367 echo "$as_me:9367: checking for tgoto in -lmytinfo" >&5
9368 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9369 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9370 echo $ECHO_N "(cached) $ECHO_C" >&6
9372 ac_check_lib_save_LIBS=$LIBS
9373 LIBS="-lmytinfo $LIBS"
9374 cat >"conftest.$ac_ext" <<_ACEOF
9375 #line 9375 "configure"
9376 #include "confdefs.h"
9378 /* Override any gcc2 internal prototype to avoid an error. */
9382 /* We use char because int might match the return type of a gcc2
9383 builtin and then its argument prototype would still apply. */
9393 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9394 if { (eval echo "$as_me:9394: \"$ac_link\"") >&5
9395 (eval $ac_link) 2>&5
9397 echo "$as_me:9397: \$? = $ac_status" >&5
9398 (exit "$ac_status"); } &&
9399 { ac_try='test -s "conftest$ac_exeext"'
9400 { (eval echo "$as_me:9400: \"$ac_try\"") >&5
9403 echo "$as_me:9403: \$? = $ac_status" >&5
9404 (exit "$ac_status"); }; }; then
9405 ac_cv_lib_mytinfo_tgoto=yes
9407 echo "$as_me: failed program was:" >&5
9408 cat "conftest.$ac_ext" >&5
9409 ac_cv_lib_mytinfo_tgoto=no
9411 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9412 LIBS=$ac_check_lib_save_LIBS
9414 echo "$as_me:9414: result: $ac_cv_lib_mytinfo_tgoto" >&5
9415 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9416 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
9417 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9427 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9429 for cf_add_1lib in $cf_add_0lib; do
9430 for cf_add_2lib in $cf_add_libs; do
9431 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9436 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9440 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
9446 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9448 for cf_add_1lib in $cf_add_0lib; do
9449 for cf_add_2lib in $cf_add_libs; do
9450 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9455 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9461 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
9463 echo "$as_me:9463: checking for initscr" >&5
9464 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9465 if test "${ac_cv_func_initscr+set}" = set; then
9466 echo $ECHO_N "(cached) $ECHO_C" >&6
9468 cat >"conftest.$ac_ext" <<_ACEOF
9469 #line 9469 "configure"
9470 #include "confdefs.h"
9471 #define initscr autoconf_temporary
9472 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9479 /* We use char because int might match the return type of a gcc2
9480 builtin and then its argument prototype would still apply. */
9481 char initscr (void);
9487 /* The GNU C library defines stubs for functions which it implements
9488 to always fail with ENOSYS. Some functions are actually named
9489 something starting with __ and the normal name is an alias. */
9490 #if defined (__stub_initscr) || defined (__stub___initscr)
9491 #error found stub for initscr
9499 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9500 if { (eval echo "$as_me:9500: \"$ac_link\"") >&5
9501 (eval $ac_link) 2>&5
9503 echo "$as_me:9503: \$? = $ac_status" >&5
9504 (exit "$ac_status"); } &&
9505 { ac_try='test -s "conftest$ac_exeext"'
9506 { (eval echo "$as_me:9506: \"$ac_try\"") >&5
9509 echo "$as_me:9509: \$? = $ac_status" >&5
9510 (exit "$ac_status"); }; }; then
9511 ac_cv_func_initscr=yes
9513 echo "$as_me: failed program was:" >&5
9514 cat "conftest.$ac_ext" >&5
9515 ac_cv_func_initscr=no
9517 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9519 echo "$as_me:9519: result: $ac_cv_func_initscr" >&5
9520 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9521 if test "$ac_cv_func_initscr" = yes; then
9522 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9525 cf_save_LIBS="$LIBS"
9526 echo "$as_me:9526: checking for initscr in -l$cf_nculib_root" >&5
9527 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9528 LIBS="-l$cf_nculib_root $LIBS"
9529 cat >"conftest.$ac_ext" <<_ACEOF
9530 #line 9530 "configure"
9531 #include "confdefs.h"
9532 #include <${cf_cv_ncurses_header:-curses.h}>
9541 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9542 if { (eval echo "$as_me:9542: \"$ac_link\"") >&5
9543 (eval $ac_link) 2>&5
9545 echo "$as_me:9545: \$? = $ac_status" >&5
9546 (exit "$ac_status"); } &&
9547 { ac_try='test -s "conftest$ac_exeext"'
9548 { (eval echo "$as_me:9548: \"$ac_try\"") >&5
9551 echo "$as_me:9551: \$? = $ac_status" >&5
9552 (exit "$ac_status"); }; }; then
9553 echo "$as_me:9553: result: yes" >&5
9554 echo "${ECHO_T}yes" >&6
9555 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9558 echo "$as_me: failed program was:" >&5
9559 cat "conftest.$ac_ext" >&5
9560 echo "$as_me:9560: result: no" >&5
9561 echo "${ECHO_T}no" >&6
9564 cf_library_path_list=""
9565 if test -n "${LDFLAGS}${LIBS}" ; then
9566 for cf_library_path in $LDFLAGS $LIBS
9568 case "$cf_library_path" in
9570 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9572 test "x$cf_library_path" != "xNONE" && \
9573 test -d "$cf_library_path" && \
9575 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9576 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
9577 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9578 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9579 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9580 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"
9583 cf_library_path_list="$cf_library_path_list $cf_search"
9591 test "x$prefix" != "xNONE" && \
9592 test -d "$prefix" && \
9594 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9595 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
9596 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9597 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9598 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9599 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9602 for cf_subdir_prefix in \
9611 test "x$cf_subdir_prefix" != "x$prefix" && \
9612 test -d "$cf_subdir_prefix" && \
9613 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9614 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9615 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
9616 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9617 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9618 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9619 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"
9624 cf_search="$cf_library_path_list $cf_search"
9626 for cf_libdir in $cf_search
9628 echo "$as_me:9628: checking for -l$cf_nculib_root in $cf_libdir" >&5
9629 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9630 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9631 cat >"conftest.$ac_ext" <<_ACEOF
9632 #line 9632 "configure"
9633 #include "confdefs.h"
9634 #include <${cf_cv_ncurses_header:-curses.h}>
9643 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9644 if { (eval echo "$as_me:9644: \"$ac_link\"") >&5
9645 (eval $ac_link) 2>&5
9647 echo "$as_me:9647: \$? = $ac_status" >&5
9648 (exit "$ac_status"); } &&
9649 { ac_try='test -s "conftest$ac_exeext"'
9650 { (eval echo "$as_me:9650: \"$ac_try\"") >&5
9653 echo "$as_me:9653: \$? = $ac_status" >&5
9654 (exit "$ac_status"); }; }; then
9655 echo "$as_me:9655: result: yes" >&5
9656 echo "${ECHO_T}yes" >&6
9657 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9660 echo "$as_me: failed program was:" >&5
9661 cat "conftest.$ac_ext" >&5
9662 echo "$as_me:9662: result: no" >&5
9663 echo "${ECHO_T}no" >&6
9664 LIBS="$cf_save_LIBS"
9666 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9670 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9674 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
9676 if test "$cf_found_library" = no ; then
9677 { { echo "$as_me:9677: error: Cannot link $cf_nculib_root library" >&5
9678 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9679 { (exit 1); exit 1; }; }
9684 if test -n "$cf_ncurses_LIBS" ; then
9685 echo "$as_me:9685: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9686 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9687 cf_ncurses_SAVE="$LIBS"
9688 for p in $cf_ncurses_LIBS ; do
9689 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
9690 if test "$q" != "$LIBS" ; then
9694 cat >"conftest.$ac_ext" <<_ACEOF
9695 #line 9695 "configure"
9696 #include "confdefs.h"
9697 #include <${cf_cv_ncurses_header:-curses.h}>
9701 initscr(); mousemask(0,0); tigetstr((char *)0);
9706 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9707 if { (eval echo "$as_me:9707: \"$ac_link\"") >&5
9708 (eval $ac_link) 2>&5
9710 echo "$as_me:9710: \$? = $ac_status" >&5
9711 (exit "$ac_status"); } &&
9712 { ac_try='test -s "conftest$ac_exeext"'
9713 { (eval echo "$as_me:9713: \"$ac_try\"") >&5
9716 echo "$as_me:9716: \$? = $ac_status" >&5
9717 (exit "$ac_status"); }; }; then
9718 echo "$as_me:9718: result: yes" >&5
9719 echo "${ECHO_T}yes" >&6
9721 echo "$as_me: failed program was:" >&5
9722 cat "conftest.$ac_ext" >&5
9723 echo "$as_me:9723: result: no" >&5
9724 echo "${ECHO_T}no" >&6
9725 LIBS="$cf_ncurses_SAVE"
9727 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9730 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9732 cat >>confdefs.h <<EOF
9733 #define $cf_nculib_ROOT 1
9744 cf_ncuconfig_root=$cf_cv_screen
9745 cf_have_ncuconfig=no
9747 if test "x${PKG_CONFIG:=none}" != xnone; then
9748 echo "$as_me:9748: checking pkg-config for $cf_ncuconfig_root" >&5
9749 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9750 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9751 echo "$as_me:9751: result: yes" >&5
9752 echo "${ECHO_T}yes" >&6
9754 echo "$as_me:9754: checking if the $cf_ncuconfig_root package files work" >&5
9755 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9756 cf_have_ncuconfig=unknown
9758 cf_save_CFLAGS="$CFLAGS"
9759 cf_save_CPPFLAGS="$CPPFLAGS"
9760 cf_save_LIBS="$LIBS"
9762 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
9763 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9765 # while -W for passing linker flags is prevalent, it is not "standard".
9766 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9767 # incompatible _and_ non-standard -W option which gives an error. Work
9768 # around that pitfall.
9769 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9775 cf_new_extra_cppflags=
9777 for cf_add_cflags in $cf_pkg_cflags
9779 case "$cf_fix_cppflags" in
9781 case "$cf_add_cflags" in
9782 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9783 case "$cf_add_cflags" in
9785 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9787 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9788 && test -z "${cf_tst_cflags}" \
9789 && cf_fix_cppflags=yes
9791 if test "$cf_fix_cppflags" = yes ; then
9793 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9794 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9797 elif test "${cf_tst_cflags}" = "\"'" ; then
9799 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9800 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9810 case "$cf_add_cflags" in
9812 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9814 CPPFLAGS=`echo "$CPPFLAGS" | \
9815 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9816 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9821 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9822 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9829 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9830 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9837 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9838 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9840 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9842 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9843 && test -z "${cf_tst_cflags}" \
9844 && cf_fix_cppflags=no
9849 if test -n "$cf_new_cflags" ; then
9851 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9852 CFLAGS="${CFLAGS}$cf_new_cflags"
9856 if test -n "$cf_new_cppflags" ; then
9858 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9859 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9863 if test -n "$cf_new_extra_cppflags" ; then
9865 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9866 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9873 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9875 for cf_add_1lib in $cf_add_0lib; do
9876 for cf_add_2lib in $cf_add_libs; do
9877 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9882 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9886 cat >"conftest.$ac_ext" <<_ACEOF
9887 #line 9887 "configure"
9888 #include "confdefs.h"
9889 #include <${cf_cv_ncurses_header:-curses.h}>
9893 initscr(); mousemask(0,0); tigetstr((char *)0);
9898 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9899 if { (eval echo "$as_me:9899: \"$ac_link\"") >&5
9900 (eval $ac_link) 2>&5
9902 echo "$as_me:9902: \$? = $ac_status" >&5
9903 (exit "$ac_status"); } &&
9904 { ac_try='test -s "conftest$ac_exeext"'
9905 { (eval echo "$as_me:9905: \"$ac_try\"") >&5
9908 echo "$as_me:9908: \$? = $ac_status" >&5
9909 (exit "$ac_status"); }; }; then
9910 if test "$cross_compiling" = yes; then
9911 cf_test_ncuconfig=maybe
9913 cat >"conftest.$ac_ext" <<_ACEOF
9914 #line 9914 "configure"
9915 #include "confdefs.h"
9916 #include <${cf_cv_ncurses_header:-curses.h}>
9918 { const char *xx = curses_version(); return (xx == 0); }
9920 rm -f "conftest$ac_exeext"
9921 if { (eval echo "$as_me:9921: \"$ac_link\"") >&5
9922 (eval $ac_link) 2>&5
9924 echo "$as_me:9924: \$? = $ac_status" >&5
9925 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9926 { (eval echo "$as_me:9926: \"$ac_try\"") >&5
9929 echo "$as_me:9929: \$? = $ac_status" >&5
9930 (exit "$ac_status"); }; }; then
9931 cf_test_ncuconfig=yes
9933 echo "$as_me: program exited with status $ac_status" >&5
9934 echo "$as_me: failed program was:" >&5
9935 cat "conftest.$ac_ext" >&5
9936 cf_test_ncuconfig=no
9938 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9941 echo "$as_me: failed program was:" >&5
9942 cat "conftest.$ac_ext" >&5
9943 cf_test_ncuconfig=no
9945 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9947 CFLAGS="$cf_save_CFLAGS"
9948 CPPFLAGS="$cf_save_CPPFLAGS"
9949 LIBS="$cf_save_LIBS"
9951 if test "x$cf_test_ncuconfig" != xyes; then
9952 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9953 cf_pkg_cflags="$cf_temp"
9954 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9955 cf_pkg_libs="$cf_temp"
9960 for cf_add_cflags in $cf_pkg_cflags
9962 case "x$cf_add_cflags" in
9965 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9968 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'`
9969 test "$CFLAGS" != "$cf_old_cflag" || break
9971 CFLAGS="$cf_old_cflag"
9974 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9977 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'`
9978 test "$CPPFLAGS" != "$cf_old_cflag" || break
9980 CPPFLAGS="$cf_old_cflag"
9989 cf_new_extra_cppflags=
9991 for cf_add_cflags in $cf_add_cflags
9993 case "$cf_fix_cppflags" in
9995 case "$cf_add_cflags" in
9996 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9997 case "$cf_add_cflags" in
9999 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10001 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10002 && test -z "${cf_tst_cflags}" \
10003 && cf_fix_cppflags=yes
10005 if test "$cf_fix_cppflags" = yes ; then
10007 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10008 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10011 elif test "${cf_tst_cflags}" = "\"'" ; then
10013 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10014 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10020 case "$CPPFLAGS" in
10024 case "$cf_add_cflags" in
10026 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10028 CPPFLAGS=`echo "$CPPFLAGS" | \
10029 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10030 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10035 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10036 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10043 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10044 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10051 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10052 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10054 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10056 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10057 && test -z "${cf_tst_cflags}" \
10058 && cf_fix_cppflags=no
10063 if test -n "$cf_new_cflags" ; then
10065 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10066 CFLAGS="${CFLAGS}$cf_new_cflags"
10070 if test -n "$cf_new_cppflags" ; then
10072 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10073 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10077 if test -n "$cf_new_extra_cppflags" ; then
10079 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10080 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10086 cf_add_libs="$LIBS"
10089 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10090 # filter duplicates
10091 for cf_add_1lib in $cf_add_0lib; do
10092 for cf_add_2lib in $cf_add_libs; do
10093 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10098 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10100 LIBS="$cf_add_libs"
10102 cat >"conftest.$ac_ext" <<_ACEOF
10103 #line 10103 "configure"
10104 #include "confdefs.h"
10105 #include <${cf_cv_ncurses_header:-curses.h}>
10109 initscr(); mousemask(0,0); tigetstr((char *)0);
10114 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10115 if { (eval echo "$as_me:10115: \"$ac_link\"") >&5
10116 (eval $ac_link) 2>&5
10118 echo "$as_me:10118: \$? = $ac_status" >&5
10119 (exit "$ac_status"); } &&
10120 { ac_try='test -s "conftest$ac_exeext"'
10121 { (eval echo "$as_me:10121: \"$ac_try\"") >&5
10122 (eval $ac_try) 2>&5
10124 echo "$as_me:10124: \$? = $ac_status" >&5
10125 (exit "$ac_status"); }; }; then
10126 if test "$cross_compiling" = yes; then
10127 cf_have_ncuconfig=maybe
10129 cat >"conftest.$ac_ext" <<_ACEOF
10130 #line 10130 "configure"
10131 #include "confdefs.h"
10132 #include <${cf_cv_ncurses_header:-curses.h}>
10134 { const char *xx = curses_version(); return (xx == 0); }
10136 rm -f "conftest$ac_exeext"
10137 if { (eval echo "$as_me:10137: \"$ac_link\"") >&5
10138 (eval $ac_link) 2>&5
10140 echo "$as_me:10140: \$? = $ac_status" >&5
10141 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10142 { (eval echo "$as_me:10142: \"$ac_try\"") >&5
10143 (eval $ac_try) 2>&5
10145 echo "$as_me:10145: \$? = $ac_status" >&5
10146 (exit "$ac_status"); }; }; then
10147 cf_have_ncuconfig=yes
10149 echo "$as_me: program exited with status $ac_status" >&5
10150 echo "$as_me: failed program was:" >&5
10151 cat "conftest.$ac_ext" >&5
10152 cf_have_ncuconfig=no
10154 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10157 echo "$as_me: failed program was:" >&5
10158 cat "conftest.$ac_ext" >&5
10159 cf_have_ncuconfig=no
10161 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10162 echo "$as_me:10162: result: $cf_have_ncuconfig" >&5
10163 echo "${ECHO_T}$cf_have_ncuconfig" >&6
10164 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
10165 if test "$cf_have_ncuconfig" != "yes"
10167 CPPFLAGS="$cf_save_CPPFLAGS"
10168 LIBS="$cf_save_LIBS"
10169 NCURSES_CONFIG_PKG=none
10172 cat >>confdefs.h <<\EOF
10176 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
10178 echo "$as_me:10178: checking for terminfo header" >&5
10179 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10180 if test "${cf_cv_term_header+set}" = set; then
10181 echo $ECHO_N "(cached) $ECHO_C" >&6
10184 case "${cf_cv_ncurses_header}" in
10185 (*/ncurses.h|*/ncursesw.h)
10186 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10189 cf_term_header=term.h
10193 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10195 cat >"conftest.$ac_ext" <<_ACEOF
10196 #line 10196 "configure"
10197 #include "confdefs.h"
10199 #include <${cf_cv_ncurses_header:-curses.h}>
10200 #include <$cf_test>
10205 int x = auto_left_margin; (void)x
10210 rm -f "conftest.$ac_objext"
10211 if { (eval echo "$as_me:10211: \"$ac_compile\"") >&5
10212 (eval $ac_compile) 2>&5
10214 echo "$as_me:10214: \$? = $ac_status" >&5
10215 (exit "$ac_status"); } &&
10216 { ac_try='test -s "conftest.$ac_objext"'
10217 { (eval echo "$as_me:10217: \"$ac_try\"") >&5
10218 (eval $ac_try) 2>&5
10220 echo "$as_me:10220: \$? = $ac_status" >&5
10221 (exit "$ac_status"); }; }; then
10223 cf_cv_term_header="$cf_test"
10225 echo "$as_me: failed program was:" >&5
10226 cat "conftest.$ac_ext" >&5
10228 cf_cv_term_header=unknown
10231 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10232 test "$cf_cv_term_header" != unknown && break
10236 echo "$as_me:10236: result: $cf_cv_term_header" >&5
10237 echo "${ECHO_T}$cf_cv_term_header" >&6
10239 # Set definitions to allow ifdef'ing to accommodate subdirectories
10241 case "$cf_cv_term_header" in
10244 cat >>confdefs.h <<\EOF
10245 #define HAVE_TERM_H 1
10251 case "$cf_cv_term_header" in
10254 cat >>confdefs.h <<\EOF
10255 #define HAVE_NCURSES_TERM_H 1
10261 cat >>confdefs.h <<\EOF
10262 #define HAVE_NCURSESW_TERM_H 1
10271 echo "$as_me:10271: result: no" >&5
10272 echo "${ECHO_T}no" >&6
10273 NCURSES_CONFIG_PKG=none
10276 NCURSES_CONFIG_PKG=none
10279 if test "x$cf_have_ncuconfig" = "xno"; then
10280 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
10282 if test -n "$ac_tool_prefix"; then
10283 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10285 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
10286 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
10287 echo "$as_me:10287: checking for $ac_word" >&5
10288 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10289 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
10290 echo $ECHO_N "(cached) $ECHO_C" >&6
10292 if test -n "$NCURSES_CONFIG"; then
10293 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
10295 ac_save_IFS=$IFS; IFS=$ac_path_separator
10297 for ac_dir in $ac_dummy; do
10299 test -z "$ac_dir" && ac_dir=.
10300 $as_executable_p "$ac_dir/$ac_word" || continue
10301 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
10302 echo "$as_me:10302: found $ac_dir/$ac_word" >&5
10308 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
10309 if test -n "$NCURSES_CONFIG"; then
10310 echo "$as_me:10310: result: $NCURSES_CONFIG" >&5
10311 echo "${ECHO_T}$NCURSES_CONFIG" >&6
10313 echo "$as_me:10313: result: no" >&5
10314 echo "${ECHO_T}no" >&6
10317 test -n "$NCURSES_CONFIG" && break
10320 if test -z "$NCURSES_CONFIG"; then
10321 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
10322 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10324 # Extract the first word of "$ac_prog", so it can be a program name with args.
10325 set dummy $ac_prog; ac_word=$2
10326 echo "$as_me:10326: checking for $ac_word" >&5
10327 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10328 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
10329 echo $ECHO_N "(cached) $ECHO_C" >&6
10331 if test -n "$ac_ct_NCURSES_CONFIG"; then
10332 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
10334 ac_save_IFS=$IFS; IFS=$ac_path_separator
10336 for ac_dir in $ac_dummy; do
10338 test -z "$ac_dir" && ac_dir=.
10339 $as_executable_p "$ac_dir/$ac_word" || continue
10340 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
10341 echo "$as_me:10341: found $ac_dir/$ac_word" >&5
10347 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
10348 if test -n "$ac_ct_NCURSES_CONFIG"; then
10349 echo "$as_me:10349: result: $ac_ct_NCURSES_CONFIG" >&5
10350 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
10352 echo "$as_me:10352: result: no" >&5
10353 echo "${ECHO_T}no" >&6
10356 test -n "$ac_ct_NCURSES_CONFIG" && break
10358 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
10360 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
10363 if test "$NCURSES_CONFIG" != none ; then
10365 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
10367 case "x$cf_add_cflags" in
10370 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10373 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'`
10374 test "$CFLAGS" != "$cf_old_cflag" || break
10376 CFLAGS="$cf_old_cflag"
10379 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10382 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'`
10383 test "$CPPFLAGS" != "$cf_old_cflag" || break
10385 CPPFLAGS="$cf_old_cflag"
10394 cf_new_extra_cppflags=
10396 for cf_add_cflags in $cf_add_cflags
10398 case "$cf_fix_cppflags" in
10400 case "$cf_add_cflags" in
10401 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10402 case "$cf_add_cflags" in
10404 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10406 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10407 && test -z "${cf_tst_cflags}" \
10408 && cf_fix_cppflags=yes
10410 if test "$cf_fix_cppflags" = yes ; then
10412 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10413 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10416 elif test "${cf_tst_cflags}" = "\"'" ; then
10418 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10419 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10425 case "$CPPFLAGS" in
10429 case "$cf_add_cflags" in
10431 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10433 CPPFLAGS=`echo "$CPPFLAGS" | \
10434 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10435 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10440 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10441 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10448 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10449 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10456 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10457 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10459 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10461 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10462 && test -z "${cf_tst_cflags}" \
10463 && cf_fix_cppflags=no
10468 if test -n "$cf_new_cflags" ; then
10470 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10471 CFLAGS="${CFLAGS}$cf_new_cflags"
10475 if test -n "$cf_new_cppflags" ; then
10477 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10478 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10482 if test -n "$cf_new_extra_cppflags" ; then
10484 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10485 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10491 cf_add_libs="$LIBS"
10494 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10495 # filter duplicates
10496 for cf_add_1lib in $cf_add_0lib; do
10497 for cf_add_2lib in $cf_add_libs; do
10498 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10503 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10505 LIBS="$cf_add_libs"
10507 # even with config script, some packages use no-override for curses.h
10509 echo "$as_me:10509: checking if we have identified curses headers" >&5
10510 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10511 if test "${cf_cv_ncurses_header+set}" = set; then
10512 echo $ECHO_N "(cached) $ECHO_C" >&6
10515 cf_cv_ncurses_header=none
10517 ncurses.h $cf_cv_screen/ncurses.h \
10518 curses.h $cf_cv_screen/curses.h
10520 cat >"conftest.$ac_ext" <<_ACEOF
10521 #line 10521 "configure"
10522 #include "confdefs.h"
10523 #include <${cf_header}>
10527 initscr(); endwin()
10532 rm -f "conftest.$ac_objext"
10533 if { (eval echo "$as_me:10533: \"$ac_compile\"") >&5
10534 (eval $ac_compile) 2>&5
10536 echo "$as_me:10536: \$? = $ac_status" >&5
10537 (exit "$ac_status"); } &&
10538 { ac_try='test -s "conftest.$ac_objext"'
10539 { (eval echo "$as_me:10539: \"$ac_try\"") >&5
10540 (eval $ac_try) 2>&5
10542 echo "$as_me:10542: \$? = $ac_status" >&5
10543 (exit "$ac_status"); }; }; then
10544 cf_cv_ncurses_header=$cf_header; break
10546 echo "$as_me: failed program was:" >&5
10547 cat "conftest.$ac_ext" >&5
10549 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10553 echo "$as_me:10553: result: $cf_cv_ncurses_header" >&5
10554 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10556 if test "$cf_cv_ncurses_header" = none ; then
10557 { { echo "$as_me:10557: error: No curses header-files found" >&5
10558 echo "$as_me: error: No curses header-files found" >&2;}
10559 { (exit 1); exit 1; }; }
10562 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10564 for ac_header in $cf_cv_ncurses_header
10566 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10567 echo "$as_me:10567: checking for $ac_header" >&5
10568 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10569 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10570 echo $ECHO_N "(cached) $ECHO_C" >&6
10572 cat >"conftest.$ac_ext" <<_ACEOF
10573 #line 10573 "configure"
10574 #include "confdefs.h"
10575 #include <$ac_header>
10577 if { (eval echo "$as_me:10577: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10578 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10580 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10582 cat conftest.err >&5
10583 echo "$as_me:10583: \$? = $ac_status" >&5
10584 (exit "$ac_status"); } >/dev/null; then
10585 if test -s conftest.err; then
10586 ac_cpp_err=$ac_c_preproc_warn_flag
10593 if test -z "$ac_cpp_err"; then
10594 eval "$as_ac_Header=yes"
10596 echo "$as_me: failed program was:" >&5
10597 cat "conftest.$ac_ext" >&5
10598 eval "$as_ac_Header=no"
10600 rm -f conftest.err "conftest.$ac_ext"
10602 echo "$as_me:10602: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10603 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10604 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10605 cat >>confdefs.h <<EOF
10606 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10612 cat >>confdefs.h <<\EOF
10616 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10618 cat >>confdefs.h <<EOF
10619 #define $cf_nculib_ROOT 1
10622 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
10626 cf_ncuhdr_root=$cf_cv_screen
10628 test -n "$cf_cv_curses_dir" && \
10629 test "$cf_cv_curses_dir" != "no" && { \
10631 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
10632 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
10634 while test "$cf_add_incdir" != /usr/include
10636 if test -d "$cf_add_incdir"
10639 if test -n "$CFLAGS$CPPFLAGS" ; then
10640 # a loop is needed to ensure we can add subdirs of existing dirs
10641 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10642 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10643 cf_have_incdir=yes; break
10648 if test "$cf_have_incdir" = no ; then
10649 if test "$cf_add_incdir" = /usr/local/include ; then
10650 if test "$GCC" = yes
10652 cf_save_CPPFLAGS=$CPPFLAGS
10654 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10655 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10657 cat >"conftest.$ac_ext" <<_ACEOF
10658 #line 10658 "configure"
10659 #include "confdefs.h"
10669 rm -f "conftest.$ac_objext"
10670 if { (eval echo "$as_me:10670: \"$ac_compile\"") >&5
10671 (eval $ac_compile) 2>&5
10673 echo "$as_me:10673: \$? = $ac_status" >&5
10674 (exit "$ac_status"); } &&
10675 { ac_try='test -s "conftest.$ac_objext"'
10676 { (eval echo "$as_me:10676: \"$ac_try\"") >&5
10677 (eval $ac_try) 2>&5
10679 echo "$as_me:10679: \$? = $ac_status" >&5
10680 (exit "$ac_status"); }; }; then
10683 echo "$as_me: failed program was:" >&5
10684 cat "conftest.$ac_ext" >&5
10687 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10688 CPPFLAGS=$cf_save_CPPFLAGS
10693 if test "$cf_have_incdir" = no ; then
10694 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10696 echo "${as_me:-configure}:10696: testing adding $cf_add_incdir to include-path ..." 1>&5
10698 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10700 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10701 test "$cf_top_incdir" = "$cf_add_incdir" && break
10702 cf_add_incdir="$cf_top_incdir"
10715 echo "$as_me:10715: checking for $cf_ncuhdr_root header in include-path" >&5
10716 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10717 if test "${cf_cv_ncurses_h+set}" = set; then
10718 echo $ECHO_N "(cached) $ECHO_C" >&6
10721 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10722 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
10723 for cf_header in $cf_header_list
10726 cat >"conftest.$ac_ext" <<_ACEOF
10727 #line 10727 "configure"
10728 #include "confdefs.h"
10730 #include <$cf_header>
10735 #ifdef NCURSES_VERSION
10737 printf("%s\\n", NCURSES_VERSION);
10742 #error __NCURSES_H is not defined
10750 rm -f "conftest.$ac_objext"
10751 if { (eval echo "$as_me:10751: \"$ac_compile\"") >&5
10752 (eval $ac_compile) 2>&5
10754 echo "$as_me:10754: \$? = $ac_status" >&5
10755 (exit "$ac_status"); } &&
10756 { ac_try='test -s "conftest.$ac_objext"'
10757 { (eval echo "$as_me:10757: \"$ac_try\"") >&5
10758 (eval $ac_try) 2>&5
10760 echo "$as_me:10760: \$? = $ac_status" >&5
10761 (exit "$ac_status"); }; }; then
10762 cf_cv_ncurses_h=$cf_header
10765 echo "$as_me: failed program was:" >&5
10766 cat "conftest.$ac_ext" >&5
10769 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10771 test "$cf_cv_ncurses_h" != no && break
10775 echo "$as_me:10775: result: $cf_cv_ncurses_h" >&5
10776 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10778 if test "$cf_cv_ncurses_h" != no ; then
10779 cf_cv_ncurses_header=$cf_cv_ncurses_h
10782 echo "$as_me:10782: checking for $cf_ncuhdr_root include-path" >&5
10783 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10784 if test "${cf_cv_ncurses_h2+set}" = set; then
10785 echo $ECHO_N "(cached) $ECHO_C" >&6
10788 test -n "$verbose" && echo
10792 # collect the current set of include-directories from compiler flags
10793 cf_header_path_list=""
10794 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10795 for cf_header_path in $CPPFLAGS $CFLAGS
10797 case "$cf_header_path" in
10799 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10801 test "x$cf_header_path" != "xNONE" && \
10802 test -d "$cf_header_path" && \
10804 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10805 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
10806 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10807 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10808 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10809 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"
10812 cf_header_path_list="$cf_header_path_list $cf_search"
10818 # add the variations for the package we are looking for
10822 test "x$prefix" != "xNONE" && \
10823 test -d "$prefix" && \
10825 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10826 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
10827 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10828 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10829 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10830 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10833 for cf_subdir_prefix in \
10842 test "x$cf_subdir_prefix" != "x$prefix" && \
10843 test -d "$cf_subdir_prefix" && \
10844 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10845 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10846 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
10847 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10848 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10849 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10850 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"
10855 test "$includedir" != NONE && \
10856 test "$includedir" != "/usr/include" && \
10857 test -d "$includedir" && {
10858 test -d "$includedir" && cf_search="$cf_search $includedir"
10859 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10862 test "$oldincludedir" != NONE && \
10863 test "$oldincludedir" != "/usr/include" && \
10864 test -d "$oldincludedir" && {
10865 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
10866 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10869 cf_search="$cf_search $cf_header_path_list"
10871 test -n "$verbose" && echo "search path $cf_search"
10872 cf_save2_CPPFLAGS="$CPPFLAGS"
10873 for cf_incdir in $cf_search
10876 if test -n "$cf_incdir" ; then
10877 for cf_add_incdir in $cf_incdir
10879 while test "$cf_add_incdir" != /usr/include
10881 if test -d "$cf_add_incdir"
10884 if test -n "$CFLAGS$CPPFLAGS" ; then
10885 # a loop is needed to ensure we can add subdirs of existing dirs
10886 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10887 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10888 cf_have_incdir=yes; break
10893 if test "$cf_have_incdir" = no ; then
10894 if test "$cf_add_incdir" = /usr/local/include ; then
10895 if test "$GCC" = yes
10897 cf_save_CPPFLAGS=$CPPFLAGS
10899 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10900 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10902 cat >"conftest.$ac_ext" <<_ACEOF
10903 #line 10903 "configure"
10904 #include "confdefs.h"
10914 rm -f "conftest.$ac_objext"
10915 if { (eval echo "$as_me:10915: \"$ac_compile\"") >&5
10916 (eval $ac_compile) 2>&5
10918 echo "$as_me:10918: \$? = $ac_status" >&5
10919 (exit "$ac_status"); } &&
10920 { ac_try='test -s "conftest.$ac_objext"'
10921 { (eval echo "$as_me:10921: \"$ac_try\"") >&5
10922 (eval $ac_try) 2>&5
10924 echo "$as_me:10924: \$? = $ac_status" >&5
10925 (exit "$ac_status"); }; }; then
10928 echo "$as_me: failed program was:" >&5
10929 cat "conftest.$ac_ext" >&5
10932 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10933 CPPFLAGS=$cf_save_CPPFLAGS
10938 if test "$cf_have_incdir" = no ; then
10939 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10941 echo "${as_me:-configure}:10941: testing adding $cf_add_incdir to include-path ..." 1>&5
10943 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10945 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10946 test "$cf_top_incdir" = "$cf_add_incdir" && break
10947 cf_add_incdir="$cf_top_incdir"
10963 cat >"conftest.$ac_ext" <<_ACEOF
10964 #line 10964 "configure"
10965 #include "confdefs.h"
10967 #include <$cf_header>
10972 #ifdef NCURSES_VERSION
10974 printf("%s\\n", NCURSES_VERSION);
10979 #error __NCURSES_H is not defined
10987 rm -f "conftest.$ac_objext"
10988 if { (eval echo "$as_me:10988: \"$ac_compile\"") >&5
10989 (eval $ac_compile) 2>&5
10991 echo "$as_me:10991: \$? = $ac_status" >&5
10992 (exit "$ac_status"); } &&
10993 { ac_try='test -s "conftest.$ac_objext"'
10994 { (eval echo "$as_me:10994: \"$ac_try\"") >&5
10995 (eval $ac_try) 2>&5
10997 echo "$as_me:10997: \$? = $ac_status" >&5
10998 (exit "$ac_status"); }; }; then
10999 cf_cv_ncurses_h2=$cf_header
11002 echo "$as_me: failed program was:" >&5
11003 cat "conftest.$ac_ext" >&5
11004 cf_cv_ncurses_h2=no
11006 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11008 if test "$cf_cv_ncurses_h2" != no ; then
11009 cf_cv_ncurses_h2=$cf_incdir/$cf_header
11010 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
11013 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
11015 CPPFLAGS="$cf_save2_CPPFLAGS"
11016 test "$cf_cv_ncurses_h2" != no && break
11018 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:11018: error: not found" >&5
11019 echo "$as_me: error: not found" >&2;}
11020 { (exit 1); exit 1; }; }
11023 echo "$as_me:11023: result: $cf_cv_ncurses_h2" >&5
11024 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
11026 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
11027 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
11028 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
11029 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
11032 if test -n "$cf_1st_incdir" ; then
11033 for cf_add_incdir in $cf_1st_incdir
11035 while test "$cf_add_incdir" != /usr/include
11037 if test -d "$cf_add_incdir"
11040 if test -n "$CFLAGS$CPPFLAGS" ; then
11041 # a loop is needed to ensure we can add subdirs of existing dirs
11042 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11043 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11044 cf_have_incdir=yes; break
11049 if test "$cf_have_incdir" = no ; then
11050 if test "$cf_add_incdir" = /usr/local/include ; then
11051 if test "$GCC" = yes
11053 cf_save_CPPFLAGS=$CPPFLAGS
11055 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11056 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11058 cat >"conftest.$ac_ext" <<_ACEOF
11059 #line 11059 "configure"
11060 #include "confdefs.h"
11070 rm -f "conftest.$ac_objext"
11071 if { (eval echo "$as_me:11071: \"$ac_compile\"") >&5
11072 (eval $ac_compile) 2>&5
11074 echo "$as_me:11074: \$? = $ac_status" >&5
11075 (exit "$ac_status"); } &&
11076 { ac_try='test -s "conftest.$ac_objext"'
11077 { (eval echo "$as_me:11077: \"$ac_try\"") >&5
11078 (eval $ac_try) 2>&5
11080 echo "$as_me:11080: \$? = $ac_status" >&5
11081 (exit "$ac_status"); }; }; then
11084 echo "$as_me: failed program was:" >&5
11085 cat "conftest.$ac_ext" >&5
11088 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11089 CPPFLAGS=$cf_save_CPPFLAGS
11094 if test "$cf_have_incdir" = no ; then
11095 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11097 echo "${as_me:-configure}:11097: testing adding $cf_add_incdir to include-path ..." 1>&5
11099 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11101 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11102 test "$cf_top_incdir" = "$cf_add_incdir" && break
11103 cf_add_incdir="$cf_top_incdir"
11116 # Set definitions to allow ifdef'ing for ncurses.h
11118 case "$cf_cv_ncurses_header" in
11121 cat >>confdefs.h <<\EOF
11122 #define HAVE_NCURSES_H 1
11128 case "$cf_cv_ncurses_header" in
11129 (ncurses/curses.h|ncurses/ncurses.h)
11131 cat >>confdefs.h <<\EOF
11132 #define HAVE_NCURSES_NCURSES_H 1
11136 (ncursesw/curses.h|ncursesw/ncurses.h)
11138 cat >>confdefs.h <<\EOF
11139 #define HAVE_NCURSESW_NCURSES_H 1
11145 echo "$as_me:11145: checking for terminfo header" >&5
11146 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
11147 if test "${cf_cv_term_header+set}" = set; then
11148 echo $ECHO_N "(cached) $ECHO_C" >&6
11151 case "${cf_cv_ncurses_header}" in
11152 (*/ncurses.h|*/ncursesw.h)
11153 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
11156 cf_term_header=term.h
11160 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
11162 cat >"conftest.$ac_ext" <<_ACEOF
11163 #line 11163 "configure"
11164 #include "confdefs.h"
11166 #include <${cf_cv_ncurses_header:-curses.h}>
11167 #include <$cf_test>
11172 int x = auto_left_margin; (void)x
11177 rm -f "conftest.$ac_objext"
11178 if { (eval echo "$as_me:11178: \"$ac_compile\"") >&5
11179 (eval $ac_compile) 2>&5
11181 echo "$as_me:11181: \$? = $ac_status" >&5
11182 (exit "$ac_status"); } &&
11183 { ac_try='test -s "conftest.$ac_objext"'
11184 { (eval echo "$as_me:11184: \"$ac_try\"") >&5
11185 (eval $ac_try) 2>&5
11187 echo "$as_me:11187: \$? = $ac_status" >&5
11188 (exit "$ac_status"); }; }; then
11190 cf_cv_term_header="$cf_test"
11192 echo "$as_me: failed program was:" >&5
11193 cat "conftest.$ac_ext" >&5
11195 cf_cv_term_header=unknown
11198 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11199 test "$cf_cv_term_header" != unknown && break
11203 echo "$as_me:11203: result: $cf_cv_term_header" >&5
11204 echo "${ECHO_T}$cf_cv_term_header" >&6
11206 # Set definitions to allow ifdef'ing to accommodate subdirectories
11208 case "$cf_cv_term_header" in
11211 cat >>confdefs.h <<\EOF
11212 #define HAVE_TERM_H 1
11218 case "$cf_cv_term_header" in
11221 cat >>confdefs.h <<\EOF
11222 #define HAVE_NCURSES_TERM_H 1
11228 cat >>confdefs.h <<\EOF
11229 #define HAVE_NCURSESW_TERM_H 1
11235 # some applications need this, but should check for NCURSES_VERSION
11237 cat >>confdefs.h <<\EOF
11241 echo "$as_me:11241: checking for ncurses version" >&5
11242 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
11243 if test "${cf_cv_ncurses_version+set}" = set; then
11244 echo $ECHO_N "(cached) $ECHO_C" >&6
11247 cf_cv_ncurses_version=no
11249 rm -f "$cf_tempfile"
11250 if test "$cross_compiling" = yes; then
11252 # This will not work if the preprocessor splits the line after the
11253 # Autoconf token. The 'unproto' program does that.
11254 cat > "conftest.$ac_ext" <<EOF
11255 #include <${cf_cv_ncurses_header:-curses.h}>
11257 #ifdef NCURSES_VERSION
11258 Autoconf NCURSES_VERSION
11266 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
11267 { (eval echo "$as_me:11267: \"$cf_try\"") >&5
11268 (eval $cf_try) 2>&5
11270 echo "$as_me:11270: \$? = $ac_status" >&5
11271 (exit "$ac_status"); }
11272 if test -f conftest.out ; then
11273 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
11274 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
11279 cat >"conftest.$ac_ext" <<_ACEOF
11280 #line 11280 "configure"
11281 #include "confdefs.h"
11283 $ac_includes_default
11285 #include <${cf_cv_ncurses_header:-curses.h}>
11289 FILE *fp = fopen("$cf_tempfile", "w");
11290 #ifdef NCURSES_VERSION
11291 # ifdef NCURSES_VERSION_PATCH
11292 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
11294 fprintf(fp, "%s\\n", NCURSES_VERSION);
11297 # ifdef __NCURSES_H
11298 fprintf(fp, "old\\n");
11300 #error expected ncurses header to define __NCURSES_H
11303 ${cf_cv_main_return:-return}(0);
11306 rm -f "conftest$ac_exeext"
11307 if { (eval echo "$as_me:11307: \"$ac_link\"") >&5
11308 (eval $ac_link) 2>&5
11310 echo "$as_me:11310: \$? = $ac_status" >&5
11311 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
11312 { (eval echo "$as_me:11312: \"$ac_try\"") >&5
11313 (eval $ac_try) 2>&5
11315 echo "$as_me:11315: \$? = $ac_status" >&5
11316 (exit "$ac_status"); }; }; then
11318 cf_cv_ncurses_version=`cat $cf_tempfile`
11320 echo "$as_me: program exited with status $ac_status" >&5
11321 echo "$as_me: failed program was:" >&5
11322 cat "conftest.$ac_ext" >&5
11324 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
11326 rm -f "$cf_tempfile"
11329 echo "$as_me:11329: result: $cf_cv_ncurses_version" >&5
11330 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
11331 test "$cf_cv_ncurses_version" = no ||
11332 cat >>confdefs.h <<\EOF
11336 cf_nculib_root=$cf_cv_screen
11337 # This works, except for the special case where we find gpm, but
11338 # ncurses is in a nonstandard location via $LIBS, and we really want
11341 cf_ncurses_SAVE="$LIBS"
11342 echo "$as_me:11342: checking for Gpm_Open in -lgpm" >&5
11343 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
11344 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
11345 echo $ECHO_N "(cached) $ECHO_C" >&6
11347 ac_check_lib_save_LIBS=$LIBS
11349 cat >"conftest.$ac_ext" <<_ACEOF
11350 #line 11350 "configure"
11351 #include "confdefs.h"
11353 /* Override any gcc2 internal prototype to avoid an error. */
11357 /* We use char because int might match the return type of a gcc2
11358 builtin and then its argument prototype would still apply. */
11359 char Gpm_Open (void);
11368 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11369 if { (eval echo "$as_me:11369: \"$ac_link\"") >&5
11370 (eval $ac_link) 2>&5
11372 echo "$as_me:11372: \$? = $ac_status" >&5
11373 (exit "$ac_status"); } &&
11374 { ac_try='test -s "conftest$ac_exeext"'
11375 { (eval echo "$as_me:11375: \"$ac_try\"") >&5
11376 (eval $ac_try) 2>&5
11378 echo "$as_me:11378: \$? = $ac_status" >&5
11379 (exit "$ac_status"); }; }; then
11380 ac_cv_lib_gpm_Gpm_Open=yes
11382 echo "$as_me: failed program was:" >&5
11383 cat "conftest.$ac_ext" >&5
11384 ac_cv_lib_gpm_Gpm_Open=no
11386 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11387 LIBS=$ac_check_lib_save_LIBS
11389 echo "$as_me:11389: result: $ac_cv_lib_gpm_Gpm_Open" >&5
11390 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
11391 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
11392 echo "$as_me:11392: checking for initscr in -lgpm" >&5
11393 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
11394 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
11395 echo $ECHO_N "(cached) $ECHO_C" >&6
11397 ac_check_lib_save_LIBS=$LIBS
11399 cat >"conftest.$ac_ext" <<_ACEOF
11400 #line 11400 "configure"
11401 #include "confdefs.h"
11403 /* Override any gcc2 internal prototype to avoid an error. */
11407 /* We use char because int might match the return type of a gcc2
11408 builtin and then its argument prototype would still apply. */
11409 char initscr (void);
11418 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11419 if { (eval echo "$as_me:11419: \"$ac_link\"") >&5
11420 (eval $ac_link) 2>&5
11422 echo "$as_me:11422: \$? = $ac_status" >&5
11423 (exit "$ac_status"); } &&
11424 { ac_try='test -s "conftest$ac_exeext"'
11425 { (eval echo "$as_me:11425: \"$ac_try\"") >&5
11426 (eval $ac_try) 2>&5
11428 echo "$as_me:11428: \$? = $ac_status" >&5
11429 (exit "$ac_status"); }; }; then
11430 ac_cv_lib_gpm_initscr=yes
11432 echo "$as_me: failed program was:" >&5
11433 cat "conftest.$ac_ext" >&5
11434 ac_cv_lib_gpm_initscr=no
11436 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11437 LIBS=$ac_check_lib_save_LIBS
11439 echo "$as_me:11439: result: $ac_cv_lib_gpm_initscr" >&5
11440 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
11441 if test "$ac_cv_lib_gpm_initscr" = yes; then
11442 LIBS="$cf_ncurses_SAVE"
11444 cf_ncurses_LIBS="-lgpm"
11451 # This is only necessary if you are linking against an obsolete
11452 # version of ncurses (but it should do no harm, since it is static).
11453 if test "$cf_nculib_root" = ncurses ; then
11454 echo "$as_me:11454: checking for tgoto in -lmytinfo" >&5
11455 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
11456 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
11457 echo $ECHO_N "(cached) $ECHO_C" >&6
11459 ac_check_lib_save_LIBS=$LIBS
11460 LIBS="-lmytinfo $LIBS"
11461 cat >"conftest.$ac_ext" <<_ACEOF
11462 #line 11462 "configure"
11463 #include "confdefs.h"
11465 /* Override any gcc2 internal prototype to avoid an error. */
11469 /* We use char because int might match the return type of a gcc2
11470 builtin and then its argument prototype would still apply. */
11480 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11481 if { (eval echo "$as_me:11481: \"$ac_link\"") >&5
11482 (eval $ac_link) 2>&5
11484 echo "$as_me:11484: \$? = $ac_status" >&5
11485 (exit "$ac_status"); } &&
11486 { ac_try='test -s "conftest$ac_exeext"'
11487 { (eval echo "$as_me:11487: \"$ac_try\"") >&5
11488 (eval $ac_try) 2>&5
11490 echo "$as_me:11490: \$? = $ac_status" >&5
11491 (exit "$ac_status"); }; }; then
11492 ac_cv_lib_mytinfo_tgoto=yes
11494 echo "$as_me: failed program was:" >&5
11495 cat "conftest.$ac_ext" >&5
11496 ac_cv_lib_mytinfo_tgoto=no
11498 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11499 LIBS=$ac_check_lib_save_LIBS
11501 echo "$as_me:11501: result: $ac_cv_lib_mytinfo_tgoto" >&5
11502 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11503 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
11504 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
11511 cf_add_libs="$LIBS"
11514 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11515 # filter duplicates
11516 for cf_add_1lib in $cf_add_0lib; do
11517 for cf_add_2lib in $cf_add_libs; do
11518 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11523 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11525 LIBS="$cf_add_libs"
11527 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
11530 cf_add_libs="$LIBS"
11533 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11534 # filter duplicates
11535 for cf_add_1lib in $cf_add_0lib; do
11536 for cf_add_2lib in $cf_add_libs; do
11537 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11542 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11544 LIBS="$cf_add_libs"
11548 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
11550 echo "$as_me:11550: checking for initscr" >&5
11551 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
11552 if test "${ac_cv_func_initscr+set}" = set; then
11553 echo $ECHO_N "(cached) $ECHO_C" >&6
11555 cat >"conftest.$ac_ext" <<_ACEOF
11556 #line 11556 "configure"
11557 #include "confdefs.h"
11558 #define initscr autoconf_temporary
11559 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11566 /* We use char because int might match the return type of a gcc2
11567 builtin and then its argument prototype would still apply. */
11568 char initscr (void);
11574 /* The GNU C library defines stubs for functions which it implements
11575 to always fail with ENOSYS. Some functions are actually named
11576 something starting with __ and the normal name is an alias. */
11577 #if defined (__stub_initscr) || defined (__stub___initscr)
11578 #error found stub for initscr
11586 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11587 if { (eval echo "$as_me:11587: \"$ac_link\"") >&5
11588 (eval $ac_link) 2>&5
11590 echo "$as_me:11590: \$? = $ac_status" >&5
11591 (exit "$ac_status"); } &&
11592 { ac_try='test -s "conftest$ac_exeext"'
11593 { (eval echo "$as_me:11593: \"$ac_try\"") >&5
11594 (eval $ac_try) 2>&5
11596 echo "$as_me:11596: \$? = $ac_status" >&5
11597 (exit "$ac_status"); }; }; then
11598 ac_cv_func_initscr=yes
11600 echo "$as_me: failed program was:" >&5
11601 cat "conftest.$ac_ext" >&5
11602 ac_cv_func_initscr=no
11604 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11606 echo "$as_me:11606: result: $ac_cv_func_initscr" >&5
11607 echo "${ECHO_T}$ac_cv_func_initscr" >&6
11608 if test "$ac_cv_func_initscr" = yes; then
11609 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11612 cf_save_LIBS="$LIBS"
11613 echo "$as_me:11613: checking for initscr in -l$cf_nculib_root" >&5
11614 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
11615 LIBS="-l$cf_nculib_root $LIBS"
11616 cat >"conftest.$ac_ext" <<_ACEOF
11617 #line 11617 "configure"
11618 #include "confdefs.h"
11619 #include <${cf_cv_ncurses_header:-curses.h}>
11628 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11629 if { (eval echo "$as_me:11629: \"$ac_link\"") >&5
11630 (eval $ac_link) 2>&5
11632 echo "$as_me:11632: \$? = $ac_status" >&5
11633 (exit "$ac_status"); } &&
11634 { ac_try='test -s "conftest$ac_exeext"'
11635 { (eval echo "$as_me:11635: \"$ac_try\"") >&5
11636 (eval $ac_try) 2>&5
11638 echo "$as_me:11638: \$? = $ac_status" >&5
11639 (exit "$ac_status"); }; }; then
11640 echo "$as_me:11640: result: yes" >&5
11641 echo "${ECHO_T}yes" >&6
11642 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11645 echo "$as_me: failed program was:" >&5
11646 cat "conftest.$ac_ext" >&5
11647 echo "$as_me:11647: result: no" >&5
11648 echo "${ECHO_T}no" >&6
11651 cf_library_path_list=""
11652 if test -n "${LDFLAGS}${LIBS}" ; then
11653 for cf_library_path in $LDFLAGS $LIBS
11655 case "$cf_library_path" in
11657 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11659 test "x$cf_library_path" != "xNONE" && \
11660 test -d "$cf_library_path" && \
11662 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11663 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
11664 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11665 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11666 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11667 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"
11670 cf_library_path_list="$cf_library_path_list $cf_search"
11678 test "x$prefix" != "xNONE" && \
11679 test -d "$prefix" && \
11681 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11682 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
11683 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11684 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11685 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11686 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11689 for cf_subdir_prefix in \
11698 test "x$cf_subdir_prefix" != "x$prefix" && \
11699 test -d "$cf_subdir_prefix" && \
11700 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11701 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11702 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
11703 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11704 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11705 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11706 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"
11711 cf_search="$cf_library_path_list $cf_search"
11713 for cf_libdir in $cf_search
11715 echo "$as_me:11715: checking for -l$cf_nculib_root in $cf_libdir" >&5
11716 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11717 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11718 cat >"conftest.$ac_ext" <<_ACEOF
11719 #line 11719 "configure"
11720 #include "confdefs.h"
11721 #include <${cf_cv_ncurses_header:-curses.h}>
11730 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11731 if { (eval echo "$as_me:11731: \"$ac_link\"") >&5
11732 (eval $ac_link) 2>&5
11734 echo "$as_me:11734: \$? = $ac_status" >&5
11735 (exit "$ac_status"); } &&
11736 { ac_try='test -s "conftest$ac_exeext"'
11737 { (eval echo "$as_me:11737: \"$ac_try\"") >&5
11738 (eval $ac_try) 2>&5
11740 echo "$as_me:11740: \$? = $ac_status" >&5
11741 (exit "$ac_status"); }; }; then
11742 echo "$as_me:11742: result: yes" >&5
11743 echo "${ECHO_T}yes" >&6
11744 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11747 echo "$as_me: failed program was:" >&5
11748 cat "conftest.$ac_ext" >&5
11749 echo "$as_me:11749: result: no" >&5
11750 echo "${ECHO_T}no" >&6
11751 LIBS="$cf_save_LIBS"
11753 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11757 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11761 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
11763 if test "$cf_found_library" = no ; then
11764 { { echo "$as_me:11764: error: Cannot link $cf_nculib_root library" >&5
11765 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11766 { (exit 1); exit 1; }; }
11771 if test -n "$cf_ncurses_LIBS" ; then
11772 echo "$as_me:11772: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11773 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11774 cf_ncurses_SAVE="$LIBS"
11775 for p in $cf_ncurses_LIBS ; do
11776 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
11777 if test "$q" != "$LIBS" ; then
11781 cat >"conftest.$ac_ext" <<_ACEOF
11782 #line 11782 "configure"
11783 #include "confdefs.h"
11784 #include <${cf_cv_ncurses_header:-curses.h}>
11788 initscr(); mousemask(0,0); tigetstr((char *)0);
11793 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11794 if { (eval echo "$as_me:11794: \"$ac_link\"") >&5
11795 (eval $ac_link) 2>&5
11797 echo "$as_me:11797: \$? = $ac_status" >&5
11798 (exit "$ac_status"); } &&
11799 { ac_try='test -s "conftest$ac_exeext"'
11800 { (eval echo "$as_me:11800: \"$ac_try\"") >&5
11801 (eval $ac_try) 2>&5
11803 echo "$as_me:11803: \$? = $ac_status" >&5
11804 (exit "$ac_status"); }; }; then
11805 echo "$as_me:11805: result: yes" >&5
11806 echo "${ECHO_T}yes" >&6
11808 echo "$as_me: failed program was:" >&5
11809 cat "conftest.$ac_ext" >&5
11810 echo "$as_me:11810: result: no" >&5
11811 echo "${ECHO_T}no" >&6
11812 LIBS="$cf_ncurses_SAVE"
11814 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11817 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11819 cat >>confdefs.h <<EOF
11820 #define $cf_nculib_ROOT 1
11825 NCURSES_CONFIG=none
11830 { { echo "$as_me:11830: error: unexpected screen-value: $cf_cv_screen" >&5
11831 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
11832 { (exit 1); exit 1; }; }
11836 if test "$NCURSES_CONFIG_PKG" != none ; then
11837 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
11839 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11840 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11841 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11843 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
11844 if test -z "$cf_cv_abi_version"
11846 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
11849 elif test "$NCURSES_CONFIG" != none ; then
11851 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
11853 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11854 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11855 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11857 # ABI version is not available from headers
11858 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
11862 for cf_name in MAJOR MINOR PATCH
11864 cat >conftest.$ac_ext <<CF_EOF
11865 #include <${cf_cv_ncurses_header:-curses.h}>
11866 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
11868 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
11869 { (eval echo "$as_me:11869: \"$cf_try\"") >&5
11870 (eval $cf_try) 2>&5
11872 echo "$as_me:11872: \$? = $ac_status" >&5
11873 (exit "$ac_status"); }
11874 if test -f conftest.out ; then
11875 cf_result=`sed -e "s/^.*AUTOCONF_${cf_name}[ ][ ]*//" conftest.out`
11876 eval NCURSES_$cf_name=\"$cf_result\"
11877 # cat conftest.$ac_ext
11882 cf_cv_abi_version=${NCURSES_MAJOR}
11886 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
11888 cf_cv_timestamp=`date`
11890 echo "$as_me:11890: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
11891 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
11893 echo "$as_me:11893: checking if KEY_RESIZE is supported" >&5
11894 echo $ECHO_N "checking if KEY_RESIZE is supported... $ECHO_C" >&6
11895 if test "${cf_cv_curses_resizes+set}" = set; then
11896 echo $ECHO_N "(cached) $ECHO_C" >&6
11899 cat >"conftest.$ac_ext" <<_ACEOF
11900 #line 11900 "configure"
11901 #include "confdefs.h"
11902 #include <${cf_cv_ncurses_header:-curses.h}>
11906 int key = KEY_RESIZE; (void)key
11911 rm -f "conftest.$ac_objext"
11912 if { (eval echo "$as_me:11912: \"$ac_compile\"") >&5
11913 (eval $ac_compile) 2>&5
11915 echo "$as_me:11915: \$? = $ac_status" >&5
11916 (exit "$ac_status"); } &&
11917 { ac_try='test -s "conftest.$ac_objext"'
11918 { (eval echo "$as_me:11918: \"$ac_try\"") >&5
11919 (eval $ac_try) 2>&5
11921 echo "$as_me:11921: \$? = $ac_status" >&5
11922 (exit "$ac_status"); }; }; then
11923 cf_cv_curses_resizes=yes
11925 echo "$as_me: failed program was:" >&5
11926 cat "conftest.$ac_ext" >&5
11927 cf_cv_curses_resizes=no
11929 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11931 echo "$as_me:11931: result: $cf_cv_curses_resizes" >&5
11932 echo "${ECHO_T}$cf_cv_curses_resizes" >&6
11933 cf_cv_enable_sigwinch=0
11934 test "$cf_cv_curses_resizes" = yes && cf_cv_enable_sigwinch=1
11936 echo "$as_me:11936: checking if you want to have a library-prefix" >&5
11937 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
11939 # Check whether --with-lib-prefix or --without-lib-prefix was given.
11940 if test "${with_lib_prefix+set}" = set; then
11941 withval="$with_lib_prefix"
11942 with_lib_prefix=$withval
11944 with_lib_prefix=auto
11946 echo "$as_me:11946: result: $with_lib_prefix" >&5
11947 echo "${ECHO_T}$with_lib_prefix" >&6
11949 if test "$with_lib_prefix" = auto
11952 case "$cf_cv_system_name" in
11954 if test "$DFT_LWR_MODEL" = libtool; then
11963 (*) LIB_PREFIX='lib'
11966 cf_prefix=$LIB_PREFIX
11968 elif test "$with_lib_prefix" = no
11972 LIB_PREFIX=$with_lib_prefix
11977 ###############################################################################
11979 if test X"$CC_G_OPT" = X"" ; then
11981 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
11984 echo "$as_me:11984: checking for default loader flags" >&5
11985 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
11986 case $DFT_LWR_MODEL in
11987 (normal) LD_MODEL='' ;;
11988 (debug) LD_MODEL=$CC_G_OPT ;;
11989 (profile) LD_MODEL='-pg';;
11990 (shared) LD_MODEL='' ;;
11992 echo "$as_me:11992: result: $LD_MODEL" >&5
11993 echo "${ECHO_T}$LD_MODEL" >&6
11996 if test "x$cf_cv_enable_rpath" != xno
11998 echo "$as_me:11998: checking for an rpath option" >&5
11999 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
12000 case "$cf_cv_system_name" in
12002 if test "$GCC" = yes; then
12003 LD_RPATH_OPT="-Wl,-rpath,"
12005 LD_RPATH_OPT="-rpath "
12008 (linux*|gnu*|k*bsd*-gnu|freebsd*)
12009 LD_RPATH_OPT="-Wl,-rpath,"
12011 (openbsd[2-9].*|mirbsd*)
12012 LD_RPATH_OPT="-Wl,-rpath,"
12015 LD_RPATH_OPT="-rpath "
12018 LD_RPATH_OPT="-Wl,-rpath,"
12021 LD_RPATH_OPT="-rpath "
12029 echo "$as_me:12029: result: $LD_RPATH_OPT" >&5
12030 echo "${ECHO_T}$LD_RPATH_OPT" >&6
12032 case "x$LD_RPATH_OPT" in
12034 echo "$as_me:12034: checking if we need a space after rpath option" >&5
12035 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
12036 cf_save_LIBS="$LIBS"
12038 cf_add_libs="$LIBS"
12041 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12042 # filter duplicates
12043 for cf_add_1lib in $cf_add_0lib; do
12044 for cf_add_2lib in $cf_add_libs; do
12045 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12050 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12052 LIBS="$cf_add_libs"
12054 cat >"conftest.$ac_ext" <<_ACEOF
12055 #line 12055 "configure"
12056 #include "confdefs.h"
12066 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12067 if { (eval echo "$as_me:12067: \"$ac_link\"") >&5
12068 (eval $ac_link) 2>&5
12070 echo "$as_me:12070: \$? = $ac_status" >&5
12071 (exit "$ac_status"); } &&
12072 { ac_try='test -s "conftest$ac_exeext"'
12073 { (eval echo "$as_me:12073: \"$ac_try\"") >&5
12074 (eval $ac_try) 2>&5
12076 echo "$as_me:12076: \$? = $ac_status" >&5
12077 (exit "$ac_status"); }; }; then
12080 echo "$as_me: failed program was:" >&5
12081 cat "conftest.$ac_ext" >&5
12084 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12085 LIBS="$cf_save_LIBS"
12086 echo "$as_me:12086: result: $cf_rpath_space" >&5
12087 echo "${ECHO_T}$cf_rpath_space" >&6
12088 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
12097 INSTALL_LIB="-m 644"
12098 : ${rel_builddir:=.}
12104 cf_cv_do_symlinks=no
12106 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
12108 echo "$as_me:12108: checking whether to use release or ABI version in shared library file names" >&5
12109 echo $ECHO_N "checking whether to use release or ABI version in shared library file names... $ECHO_C" >&6
12111 # Check whether --with-shlib-version or --without-shlib-version was given.
12112 if test "${with_shlib_version+set}" = set; then
12113 withval="$with_shlib_version"
12114 test -z "$withval" && withval=auto
12117 cf_cv_shlib_version=auto
12120 cf_cv_shlib_version=$withval
12123 echo "$as_me:12123: result: $withval" >&5
12124 echo "${ECHO_T}$withval" >&6
12125 { { echo "$as_me:12125: error: option value must be one of: rel, abi, or auto" >&5
12126 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
12127 { (exit 1); exit 1; }; }
12132 cf_cv_shlib_version=auto
12134 echo "$as_me:12134: result: $cf_cv_shlib_version" >&5
12135 echo "${ECHO_T}$cf_cv_shlib_version" >&6
12137 cf_cv_rm_so_locs=no
12140 # Some less-capable ports of gcc support only -fpic
12144 if test "$GCC" = yes
12148 case "$cf_cv_system_name" in
12149 (*linux*) # e.g., PGI compiler
12155 if test "$cf_try_fPIC" = yes
12157 echo "$as_me:12157: checking which $CC option to use" >&5
12158 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
12159 cf_save_CFLAGS="$CFLAGS"
12160 for CC_SHARED_OPTS in -fPIC -fpic ''
12162 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
12163 cat >"conftest.$ac_ext" <<_ACEOF
12164 #line 12164 "configure"
12165 #include "confdefs.h"
12175 rm -f "conftest.$ac_objext"
12176 if { (eval echo "$as_me:12176: \"$ac_compile\"") >&5
12177 (eval $ac_compile) 2>&5
12179 echo "$as_me:12179: \$? = $ac_status" >&5
12180 (exit "$ac_status"); } &&
12181 { ac_try='test -s "conftest.$ac_objext"'
12182 { (eval echo "$as_me:12182: \"$ac_try\"") >&5
12183 (eval $ac_try) 2>&5
12185 echo "$as_me:12185: \$? = $ac_status" >&5
12186 (exit "$ac_status"); }; }; then
12189 echo "$as_me: failed program was:" >&5
12190 cat "conftest.$ac_ext" >&5
12192 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12194 echo "$as_me:12194: result: $CC_SHARED_OPTS" >&5
12195 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
12196 CFLAGS="$cf_save_CFLAGS"
12199 cf_cv_shlib_version_infix=no
12201 case "$cf_cv_system_name" in
12202 (aix4.3-9*|aix[5-7]*)
12203 if test "$GCC" = yes; then
12204 CC_SHARED_OPTS='-Wl,-brtl'
12205 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
12207 CC_SHARED_OPTS='-brtl'
12208 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
12209 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
12213 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
12217 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
12218 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
12219 cf_cv_shlib_version=cygdll
12220 cf_cv_shlib_version_infix=cygdll
12223 cat >mk_shared_lib.sh <<-CF_EOF
12226 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
12229 Linking shared library
12230 ** SHARED_LIB \$SHARED_LIB
12231 ** IMPORT_LIB \$IMPORT_LIB
12233 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
12235 chmod +x mk_shared_lib.sh
12239 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
12240 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
12241 cf_cv_shlib_version=msysdll
12242 cf_cv_shlib_version_infix=msysdll
12245 cat >mk_shared_lib.sh <<-CF_EOF
12248 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
12251 Linking shared library
12252 ** SHARED_LIB \$SHARED_LIB
12253 ** IMPORT_LIB \$IMPORT_LIB
12255 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
12257 chmod +x mk_shared_lib.sh
12260 cf_try_cflags="no-cpp-precomp"
12261 CC_SHARED_OPTS="-dynamic"
12262 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
12263 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
12264 cf_cv_shlib_version_infix=yes
12265 echo "$as_me:12265: checking if ld -search_paths_first works" >&5
12266 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
12267 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
12268 echo $ECHO_N "(cached) $ECHO_C" >&6
12271 cf_save_LDFLAGS=$LDFLAGS
12272 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
12273 cat >"conftest.$ac_ext" <<_ACEOF
12274 #line 12274 "configure"
12275 #include "confdefs.h"
12285 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12286 if { (eval echo "$as_me:12286: \"$ac_link\"") >&5
12287 (eval $ac_link) 2>&5
12289 echo "$as_me:12289: \$? = $ac_status" >&5
12290 (exit "$ac_status"); } &&
12291 { ac_try='test -s "conftest$ac_exeext"'
12292 { (eval echo "$as_me:12292: \"$ac_try\"") >&5
12293 (eval $ac_try) 2>&5
12295 echo "$as_me:12295: \$? = $ac_status" >&5
12296 (exit "$ac_status"); }; }; then
12297 cf_cv_ldflags_search_paths_first=yes
12299 echo "$as_me: failed program was:" >&5
12300 cat "conftest.$ac_ext" >&5
12301 cf_cv_ldflags_search_paths_first=no
12303 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12304 LDFLAGS=$cf_save_LDFLAGS
12306 echo "$as_me:12306: result: $cf_cv_ldflags_search_paths_first" >&5
12307 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
12308 if test "$cf_cv_ldflags_search_paths_first" = yes; then
12309 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
12314 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12315 if test "$cf_cv_shlib_version" = rel; then
12316 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12318 cf_cv_shared_soname='`basename $@`'
12321 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12324 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
12325 if test "$GCC" != yes; then
12326 CC_SHARED_OPTS='+Z'
12328 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
12329 INSTALL_LIB="-m 555"
12332 # (tested with gcc 2.7.2 -- I don't have c89)
12333 if test "$GCC" = yes; then
12334 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
12336 CC_SHARED_OPTS='+Z'
12337 LD_SHARED_OPTS='-Wl,+b,${libdir}'
12339 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
12340 # HP-UX shared libraries must be executable, and should be
12341 # readonly to exploit a quirk in the memory manager.
12342 INSTALL_LIB="-m 555"
12345 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12346 if test "$cf_cv_shlib_version" = rel; then
12347 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12349 cf_shared_soname='`basename $@`'
12352 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
12355 if test "$cf_cv_enable_rpath" = yes ; then
12356 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12358 # tested with IRIX 5.2 and 'cc'.
12359 if test "$GCC" != yes; then
12360 CC_SHARED_OPTS='-KPIC'
12361 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
12363 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
12365 cf_cv_rm_so_locs=yes
12367 (linux*|gnu*|k*bsd*-gnu)
12368 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12369 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12370 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12372 if test "$cf_cv_enable_rpath" = yes ; then
12373 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12376 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12377 if test "$cf_cv_shlib_version" = rel; then
12378 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12380 cf_cv_shared_soname='`basename $@`'
12383 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12386 cf_cv_shlib_version=msvcdll
12387 cf_cv_shlib_version_infix=msvcdll
12390 if test "$DFT_LWR_MODEL" = "shared" ; then
12391 LOCAL_LDFLAGS="-link -dll"
12392 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12393 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
12396 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
12397 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
12398 cat >mk_shared_lib.sh <<-CF_EOF
12401 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
12406 Linking shared library
12407 ** SHARED LIB \$SHARED_LIB
12408 ** IMPORT_LIB \$IMPORT_LIB
12410 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
12411 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
12412 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
12414 chmod +x mk_shared_lib.sh
12415 cat >mk_prog.sh <<-CF_EOF
12418 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
12421 ldopts=("/subsystem:console")
12424 while test \$# -gt 0; do
12427 # ignore -link argument
12430 # ignore runtime-library option
12445 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
12448 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
12454 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
12455 ldopts+=("\${linkarg}")
12463 ldopts+=("-out:\$1")
12472 if [ "\$isdll" -ne 0 ]; then
12473 for lib in \${libs[*]}; do
12474 ldopts+=("\$lib.dll.lib")
12477 for lib in \${libs[*]}; do
12478 ldopts+=("\$lib.lib")
12483 ** ld options: "\${ldopts[@]}"
12485 exec \$LD \${ldopts[@]}
12487 chmod +x mk_prog.sh
12488 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
12489 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
12492 cf_cv_shlib_version=mingw
12493 cf_cv_shlib_version_infix=mingw
12496 if test "$DFT_LWR_MODEL" = "shared" ; then
12497 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
12498 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12499 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
12502 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
12503 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
12504 cat >mk_shared_lib.sh <<-CF_EOF
12507 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
12510 Linking shared library
12511 ** SHARED_LIB \$SHARED_LIB
12512 ** IMPORT_LIB \$IMPORT_LIB
12514 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
12516 chmod +x mk_shared_lib.sh
12518 (openbsd[2-9].*|mirbsd*)
12519 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12520 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12521 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12523 if test "$cf_cv_enable_rpath" = yes ; then
12524 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12526 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12528 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12529 if test "$cf_cv_shlib_version" = rel; then
12530 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12532 cf_cv_shared_soname='`basename $@`'
12535 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12539 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
12543 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
12545 (nto-qnx*|openbsd*|freebsd[12].*)
12546 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12547 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
12548 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12550 (dragonfly*|freebsd*)
12551 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12552 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12553 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12554 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
12555 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12558 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12559 if test "$cf_cv_shlib_version" = rel; then
12560 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12562 cf_cv_shared_soname='`basename $@`'
12565 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12568 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12569 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12570 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12571 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12572 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12573 if test "$cf_cv_shlib_version" = auto; then
12574 if test -f /usr/libexec/ld.elf_so; then
12575 cf_cv_shlib_version=abi
12577 cf_cv_shlib_version=rel
12581 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12582 if test "$cf_cv_shlib_version" = rel; then
12583 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12585 cf_cv_shared_soname='`basename $@`'
12588 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
12590 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
12594 # tested with OSF/1 V3.2 and 'cc'
12595 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
12596 # link with shared libs).
12597 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
12600 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
12603 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
12604 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12605 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12606 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12608 cf_cv_rm_so_locs=yes
12610 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
12611 # tested with osr5.0.5
12612 if test "$GCC" != yes; then
12613 CC_SHARED_OPTS='-belf -KPIC'
12615 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
12616 if test "$cf_cv_enable_rpath" = yes ; then
12617 # only way is to set LD_RUN_PATH but no switch for it
12620 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12621 LINK_PROGS='LD_RUN_PATH=${libdir}'
12622 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
12625 # tested with SunOS 4.1.1 and gcc 2.7.0
12626 if test "$GCC" != yes; then
12627 CC_SHARED_OPTS='-KPIC'
12629 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
12630 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12633 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
12634 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
12635 if test "$DFT_LWR_MODEL" = "shared" ; then
12636 LOCAL_LDFLAGS="-R\$(LOCAL_LIBDIR):\${libdir}"
12637 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12639 if test "$cf_cv_enable_rpath" = yes ; then
12640 EXTRA_LDFLAGS="-R\${libdir} $EXTRA_LDFLAGS"
12643 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12644 if test "$cf_cv_shlib_version" = rel; then
12645 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12647 cf_cv_shared_soname='`basename $@`'
12650 if test "$GCC" != yes; then
12651 cf_save_CFLAGS="$CFLAGS"
12652 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
12654 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
12655 cat >"conftest.$ac_ext" <<_ACEOF
12656 #line 12656 "configure"
12657 #include "confdefs.h"
12662 printf("Hello\\n");
12667 rm -f "conftest.$ac_objext"
12668 if { (eval echo "$as_me:12668: \"$ac_compile\"") >&5
12669 (eval $ac_compile) 2>&5
12671 echo "$as_me:12671: \$? = $ac_status" >&5
12672 (exit "$ac_status"); } &&
12673 { ac_try='test -s "conftest.$ac_objext"'
12674 { (eval echo "$as_me:12674: \"$ac_try\"") >&5
12675 (eval $ac_try) 2>&5
12677 echo "$as_me:12677: \$? = $ac_status" >&5
12678 (exit "$ac_status"); }; }; then
12681 echo "$as_me: failed program was:" >&5
12682 cat "conftest.$ac_ext" >&5
12684 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12686 CFLAGS="$cf_save_CFLAGS"
12687 CC_SHARED_OPTS=$cf_shared_opts
12688 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $@'
12690 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $@'
12693 (sysv5uw7*|unix_sv*)
12694 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
12695 if test "$GCC" != yes; then
12696 CC_SHARED_OPTS='-KPIC'
12698 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
12701 CC_SHARED_OPTS='unknown'
12702 MK_SHARED_LIB='echo unknown'
12706 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
12707 case "$cf_cv_shlib_version" in
12709 case "$MK_SHARED_LIB" in
12711 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
12714 { echo "$as_me:12714: WARNING: ignored --with-shlib-version" >&5
12715 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
12721 if test -n "$cf_try_cflags"
12723 cat > conftest.$ac_ext <<EOF
12724 #line 12724 "${as_me:-configure}"
12726 int main(int argc, char *argv[])
12728 printf("hello\\n");
12729 return (argv[argc-1] == 0) ;
12732 cf_save_CFLAGS="$CFLAGS"
12733 for cf_opt in $cf_try_cflags
12735 CFLAGS="$cf_save_CFLAGS -$cf_opt"
12736 echo "$as_me:12736: checking if CFLAGS option -$cf_opt works" >&5
12737 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
12738 if { (eval echo "$as_me:12738: \"$ac_compile\"") >&5
12739 (eval $ac_compile) 2>&5
12741 echo "$as_me:12741: \$? = $ac_status" >&5
12742 (exit "$ac_status"); }; then
12743 echo "$as_me:12743: result: yes" >&5
12744 echo "${ECHO_T}yes" >&6
12745 cf_save_CFLAGS="$CFLAGS"
12747 echo "$as_me:12747: result: no" >&5
12748 echo "${ECHO_T}no" >&6
12751 CFLAGS="$cf_save_CFLAGS"
12754 # RPATH_LIST is a colon-separated list of directories
12755 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
12756 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
12758 test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
12760 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
12762 echo "${as_me:-configure}:12762: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
12764 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
12766 echo "${as_me:-configure}:12766: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
12768 # The test/sample programs in the original tree link using rpath option.
12769 # Make it optional for packagers.
12770 if test -n "$LOCAL_LDFLAGS"
12772 echo "$as_me:12772: checking if you want to link sample programs with rpath option" >&5
12773 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
12775 # Check whether --enable-rpath-link or --disable-rpath-link was given.
12776 if test "${enable_rpath_link+set}" = set; then
12777 enableval="$enable_rpath_link"
12778 with_rpath_link=$enableval
12780 with_rpath_link=yes
12782 echo "$as_me:12782: result: $with_rpath_link" >&5
12783 echo "${ECHO_T}$with_rpath_link" >&6
12784 if test "$with_rpath_link" = no
12791 ###############################################################################
12793 ### use option --enable-broken-linker to force on use of broken-linker support
12795 echo "$as_me:12795: checking if you want broken-linker support code" >&5
12796 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
12798 # Check whether --enable-broken_linker or --disable-broken_linker was given.
12799 if test "${enable_broken_linker+set}" = set; then
12800 enableval="$enable_broken_linker"
12801 with_broken_linker=$enableval
12803 with_broken_linker=no
12805 echo "$as_me:12805: result: $with_broken_linker" >&5
12806 echo "${ECHO_T}$with_broken_linker" >&6
12808 : "${BROKEN_LINKER:=0}"
12809 if test "x$with_broken_linker" = xyes ; then
12811 cat >>confdefs.h <<\EOF
12812 #define BROKEN_LINKER 1
12818 # Check to define _XOPEN_SOURCE "automatically"
12820 echo "$as_me:12820: checking if the POSIX test-macros are already defined" >&5
12821 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
12822 if test "${cf_cv_posix_visible+set}" = set; then
12823 echo $ECHO_N "(cached) $ECHO_C" >&6
12826 cat >"conftest.$ac_ext" <<_ACEOF
12827 #line 12827 "configure"
12828 #include "confdefs.h"
12834 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
12835 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
12836 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
12837 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
12838 #error conflicting symbols found
12845 rm -f "conftest.$ac_objext"
12846 if { (eval echo "$as_me:12846: \"$ac_compile\"") >&5
12847 (eval $ac_compile) 2>&5
12849 echo "$as_me:12849: \$? = $ac_status" >&5
12850 (exit "$ac_status"); } &&
12851 { ac_try='test -s "conftest.$ac_objext"'
12852 { (eval echo "$as_me:12852: \"$ac_try\"") >&5
12853 (eval $ac_try) 2>&5
12855 echo "$as_me:12855: \$? = $ac_status" >&5
12856 (exit "$ac_status"); }; }; then
12857 cf_cv_posix_visible=no
12859 echo "$as_me: failed program was:" >&5
12860 cat "conftest.$ac_ext" >&5
12861 cf_cv_posix_visible=yes
12863 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12866 echo "$as_me:12866: result: $cf_cv_posix_visible" >&5
12867 echo "${ECHO_T}$cf_cv_posix_visible" >&6
12869 if test "$cf_cv_posix_visible" = no; then
12871 cf_XOPEN_SOURCE=600
12872 cf_POSIX_C_SOURCE=199506L
12877 cf_xopen_source="-D_ALL_SOURCE"
12880 cf_xopen_source="-D_APPLE_C_SOURCE"
12883 cf_xopen_source="-D_DARWIN_C_SOURCE"
12886 (freebsd*|dragonfly*|midnightbsd*)
12887 # 5.x headers associate
12888 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
12889 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
12890 cf_POSIX_C_SOURCE=200112L
12891 cf_XOPEN_SOURCE=600
12892 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12895 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
12898 cf_xopen_source="-D_HPUX_SOURCE"
12901 cf_xopen_source="-D_SGI_SOURCE"
12904 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
12906 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
12908 echo "$as_me:12908: checking if this is the GNU C library" >&5
12909 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
12910 if test "${cf_cv_gnu_library+set}" = set; then
12911 echo $ECHO_N "(cached) $ECHO_C" >&6
12914 cat >"conftest.$ac_ext" <<_ACEOF
12915 #line 12915 "configure"
12916 #include "confdefs.h"
12917 #include <sys/types.h>
12922 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
12924 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
12927 # error not GNU C library
12933 rm -f "conftest.$ac_objext"
12934 if { (eval echo "$as_me:12934: \"$ac_compile\"") >&5
12935 (eval $ac_compile) 2>&5
12937 echo "$as_me:12937: \$? = $ac_status" >&5
12938 (exit "$ac_status"); } &&
12939 { ac_try='test -s "conftest.$ac_objext"'
12940 { (eval echo "$as_me:12940: \"$ac_try\"") >&5
12941 (eval $ac_try) 2>&5
12943 echo "$as_me:12943: \$? = $ac_status" >&5
12944 (exit "$ac_status"); }; }; then
12945 cf_cv_gnu_library=yes
12947 echo "$as_me: failed program was:" >&5
12948 cat "conftest.$ac_ext" >&5
12949 cf_cv_gnu_library=no
12951 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12954 echo "$as_me:12954: result: $cf_cv_gnu_library" >&5
12955 echo "${ECHO_T}$cf_cv_gnu_library" >&6
12957 if test x$cf_cv_gnu_library = xyes; then
12959 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
12960 # was changed to help a little. newlib incorporated the change about 4
12962 echo "$as_me:12962: checking if _DEFAULT_SOURCE can be used as a basis" >&5
12963 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
12964 if test "${cf_cv_gnu_library_219+set}" = set; then
12965 echo $ECHO_N "(cached) $ECHO_C" >&6
12968 cf_save="$CPPFLAGS"
12970 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12971 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12973 cat >"conftest.$ac_ext" <<_ACEOF
12974 #line 12974 "configure"
12975 #include "confdefs.h"
12976 #include <sys/types.h>
12981 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
12983 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
12986 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
12992 rm -f "conftest.$ac_objext"
12993 if { (eval echo "$as_me:12993: \"$ac_compile\"") >&5
12994 (eval $ac_compile) 2>&5
12996 echo "$as_me:12996: \$? = $ac_status" >&5
12997 (exit "$ac_status"); } &&
12998 { ac_try='test -s "conftest.$ac_objext"'
12999 { (eval echo "$as_me:12999: \"$ac_try\"") >&5
13000 (eval $ac_try) 2>&5
13002 echo "$as_me:13002: \$? = $ac_status" >&5
13003 (exit "$ac_status"); }; }; then
13004 cf_cv_gnu_library_219=yes
13006 echo "$as_me: failed program was:" >&5
13007 cat "conftest.$ac_ext" >&5
13008 cf_cv_gnu_library_219=no
13010 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13011 CPPFLAGS="$cf_save"
13014 echo "$as_me:13014: result: $cf_cv_gnu_library_219" >&5
13015 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
13017 if test "x$cf_cv_gnu_library_219" = xyes; then
13018 cf_save="$CPPFLAGS"
13019 echo "$as_me:13019: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
13020 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
13021 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
13022 echo $ECHO_N "(cached) $ECHO_C" >&6
13028 cf_new_extra_cppflags=
13030 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
13032 case "$cf_fix_cppflags" in
13034 case "$cf_add_cflags" in
13035 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13036 case "$cf_add_cflags" in
13038 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13040 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13041 && test -z "${cf_tst_cflags}" \
13042 && cf_fix_cppflags=yes
13044 if test "$cf_fix_cppflags" = yes ; then
13046 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13047 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13050 elif test "${cf_tst_cflags}" = "\"'" ; then
13052 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13053 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13059 case "$CPPFLAGS" in
13063 case "$cf_add_cflags" in
13065 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13067 CPPFLAGS=`echo "$CPPFLAGS" | \
13068 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13069 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13074 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13075 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13082 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13083 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13090 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13091 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13093 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13095 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13096 && test -z "${cf_tst_cflags}" \
13097 && cf_fix_cppflags=no
13102 if test -n "$cf_new_cflags" ; then
13104 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13105 CFLAGS="${CFLAGS}$cf_new_cflags"
13109 if test -n "$cf_new_cppflags" ; then
13111 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13112 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13116 if test -n "$cf_new_extra_cppflags" ; then
13118 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13119 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13123 cat >"conftest.$ac_ext" <<_ACEOF
13124 #line 13124 "configure"
13125 #include "confdefs.h"
13127 #include <limits.h>
13128 #include <sys/types.h>
13134 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
13137 # error GNU C library is too old
13143 rm -f "conftest.$ac_objext"
13144 if { (eval echo "$as_me:13144: \"$ac_compile\"") >&5
13145 (eval $ac_compile) 2>&5
13147 echo "$as_me:13147: \$? = $ac_status" >&5
13148 (exit "$ac_status"); } &&
13149 { ac_try='test -s "conftest.$ac_objext"'
13150 { (eval echo "$as_me:13150: \"$ac_try\"") >&5
13151 (eval $ac_try) 2>&5
13153 echo "$as_me:13153: \$? = $ac_status" >&5
13154 (exit "$ac_status"); }; }; then
13155 cf_cv_gnu_dftsrc_219=yes
13157 echo "$as_me: failed program was:" >&5
13158 cat "conftest.$ac_ext" >&5
13159 cf_cv_gnu_dftsrc_219=no
13161 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13164 echo "$as_me:13164: result: $cf_cv_gnu_dftsrc_219" >&5
13165 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
13166 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
13168 cf_cv_gnu_dftsrc_219=maybe
13171 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
13173 echo "$as_me:13173: checking if we must define _GNU_SOURCE" >&5
13174 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
13175 if test "${cf_cv_gnu_source+set}" = set; then
13176 echo $ECHO_N "(cached) $ECHO_C" >&6
13179 cat >"conftest.$ac_ext" <<_ACEOF
13180 #line 13180 "configure"
13181 #include "confdefs.h"
13182 #include <sys/types.h>
13187 #ifndef _XOPEN_SOURCE
13188 #error expected _XOPEN_SOURCE to be defined
13194 rm -f "conftest.$ac_objext"
13195 if { (eval echo "$as_me:13195: \"$ac_compile\"") >&5
13196 (eval $ac_compile) 2>&5
13198 echo "$as_me:13198: \$? = $ac_status" >&5
13199 (exit "$ac_status"); } &&
13200 { ac_try='test -s "conftest.$ac_objext"'
13201 { (eval echo "$as_me:13201: \"$ac_try\"") >&5
13202 (eval $ac_try) 2>&5
13204 echo "$as_me:13204: \$? = $ac_status" >&5
13205 (exit "$ac_status"); }; }; then
13206 cf_cv_gnu_source=no
13208 echo "$as_me: failed program was:" >&5
13209 cat "conftest.$ac_ext" >&5
13210 cf_save="$CPPFLAGS"
13215 cf_new_extra_cppflags=
13217 for cf_add_cflags in -D_GNU_SOURCE
13219 case "$cf_fix_cppflags" in
13221 case "$cf_add_cflags" in
13222 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13223 case "$cf_add_cflags" in
13225 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13227 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13228 && test -z "${cf_tst_cflags}" \
13229 && cf_fix_cppflags=yes
13231 if test "$cf_fix_cppflags" = yes ; then
13233 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13234 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13237 elif test "${cf_tst_cflags}" = "\"'" ; then
13239 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13240 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13246 case "$CPPFLAGS" in
13250 case "$cf_add_cflags" in
13252 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13254 CPPFLAGS=`echo "$CPPFLAGS" | \
13255 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13256 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13261 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13262 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13269 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13270 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13277 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13278 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13280 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13282 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13283 && test -z "${cf_tst_cflags}" \
13284 && cf_fix_cppflags=no
13289 if test -n "$cf_new_cflags" ; then
13291 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13292 CFLAGS="${CFLAGS}$cf_new_cflags"
13296 if test -n "$cf_new_cppflags" ; then
13298 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13299 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13303 if test -n "$cf_new_extra_cppflags" ; then
13305 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13306 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13310 cat >"conftest.$ac_ext" <<_ACEOF
13311 #line 13311 "configure"
13312 #include "confdefs.h"
13313 #include <sys/types.h>
13318 #ifdef _XOPEN_SOURCE
13319 #error expected _XOPEN_SOURCE to be undefined
13325 rm -f "conftest.$ac_objext"
13326 if { (eval echo "$as_me:13326: \"$ac_compile\"") >&5
13327 (eval $ac_compile) 2>&5
13329 echo "$as_me:13329: \$? = $ac_status" >&5
13330 (exit "$ac_status"); } &&
13331 { ac_try='test -s "conftest.$ac_objext"'
13332 { (eval echo "$as_me:13332: \"$ac_try\"") >&5
13333 (eval $ac_try) 2>&5
13335 echo "$as_me:13335: \$? = $ac_status" >&5
13336 (exit "$ac_status"); }; }; then
13337 cf_cv_gnu_source=no
13339 echo "$as_me: failed program was:" >&5
13340 cat "conftest.$ac_ext" >&5
13341 cf_cv_gnu_source=yes
13343 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13344 CPPFLAGS="$cf_save"
13347 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13350 echo "$as_me:13350: result: $cf_cv_gnu_source" >&5
13351 echo "${ECHO_T}$cf_cv_gnu_source" >&6
13353 if test "$cf_cv_gnu_source" = yes
13355 echo "$as_me:13355: checking if we should also define _DEFAULT_SOURCE" >&5
13356 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
13357 if test "${cf_cv_default_source+set}" = set; then
13358 echo $ECHO_N "(cached) $ECHO_C" >&6
13361 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13362 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
13364 cat >"conftest.$ac_ext" <<_ACEOF
13365 #line 13365 "configure"
13366 #include "confdefs.h"
13367 #include <sys/types.h>
13372 #ifdef _DEFAULT_SOURCE
13373 #error expected _DEFAULT_SOURCE to be undefined
13379 rm -f "conftest.$ac_objext"
13380 if { (eval echo "$as_me:13380: \"$ac_compile\"") >&5
13381 (eval $ac_compile) 2>&5
13383 echo "$as_me:13383: \$? = $ac_status" >&5
13384 (exit "$ac_status"); } &&
13385 { ac_try='test -s "conftest.$ac_objext"'
13386 { (eval echo "$as_me:13386: \"$ac_try\"") >&5
13387 (eval $ac_try) 2>&5
13389 echo "$as_me:13389: \$? = $ac_status" >&5
13390 (exit "$ac_status"); }; }; then
13391 cf_cv_default_source=no
13393 echo "$as_me: failed program was:" >&5
13394 cat "conftest.$ac_ext" >&5
13395 cf_cv_default_source=yes
13397 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13400 echo "$as_me:13400: result: $cf_cv_default_source" >&5
13401 echo "${ECHO_T}$cf_cv_default_source" >&6
13402 if test "$cf_cv_default_source" = yes
13405 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13406 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
13416 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
13419 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
13422 if test "$cf_cv_posix_visible" = no; then
13424 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
13426 cf_save_CFLAGS="$CFLAGS"
13427 cf_save_CPPFLAGS="$CPPFLAGS"
13429 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13430 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13431 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13433 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13434 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13435 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13437 echo "$as_me:13437: checking if we should define _POSIX_C_SOURCE" >&5
13438 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13439 if test "${cf_cv_posix_c_source+set}" = set; then
13440 echo $ECHO_N "(cached) $ECHO_C" >&6
13443 echo "${as_me:-configure}:13443: testing if the symbol is already defined go no further ..." 1>&5
13445 cat >"conftest.$ac_ext" <<_ACEOF
13446 #line 13446 "configure"
13447 #include "confdefs.h"
13448 #include <sys/types.h>
13453 #ifndef _POSIX_C_SOURCE
13454 #error _POSIX_C_SOURCE is not defined
13460 rm -f "conftest.$ac_objext"
13461 if { (eval echo "$as_me:13461: \"$ac_compile\"") >&5
13462 (eval $ac_compile) 2>&5
13464 echo "$as_me:13464: \$? = $ac_status" >&5
13465 (exit "$ac_status"); } &&
13466 { ac_try='test -s "conftest.$ac_objext"'
13467 { (eval echo "$as_me:13467: \"$ac_try\"") >&5
13468 (eval $ac_try) 2>&5
13470 echo "$as_me:13470: \$? = $ac_status" >&5
13471 (exit "$ac_status"); }; }; then
13472 cf_cv_posix_c_source=no
13474 echo "$as_me: failed program was:" >&5
13475 cat "conftest.$ac_ext" >&5
13476 cf_want_posix_source=no
13477 case .$cf_POSIX_C_SOURCE in
13479 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13482 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13483 cf_want_posix_source=yes
13486 cf_want_posix_source=yes
13489 if test "$cf_want_posix_source" = yes ; then
13490 cat >"conftest.$ac_ext" <<_ACEOF
13491 #line 13491 "configure"
13492 #include "confdefs.h"
13493 #include <sys/types.h>
13498 #ifdef _POSIX_SOURCE
13499 #error _POSIX_SOURCE is defined
13505 rm -f "conftest.$ac_objext"
13506 if { (eval echo "$as_me:13506: \"$ac_compile\"") >&5
13507 (eval $ac_compile) 2>&5
13509 echo "$as_me:13509: \$? = $ac_status" >&5
13510 (exit "$ac_status"); } &&
13511 { ac_try='test -s "conftest.$ac_objext"'
13512 { (eval echo "$as_me:13512: \"$ac_try\"") >&5
13513 (eval $ac_try) 2>&5
13515 echo "$as_me:13515: \$? = $ac_status" >&5
13516 (exit "$ac_status"); }; }; then
13519 echo "$as_me: failed program was:" >&5
13520 cat "conftest.$ac_ext" >&5
13521 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13523 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13526 echo "${as_me:-configure}:13526: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13528 CFLAGS="$cf_trim_CFLAGS"
13529 CPPFLAGS="$cf_trim_CPPFLAGS"
13531 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13532 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13534 echo "${as_me:-configure}:13534: testing if the second compile does not leave our definition intact error ..." 1>&5
13536 cat >"conftest.$ac_ext" <<_ACEOF
13537 #line 13537 "configure"
13538 #include "confdefs.h"
13539 #include <sys/types.h>
13544 #ifndef _POSIX_C_SOURCE
13545 #error _POSIX_C_SOURCE is not defined
13551 rm -f "conftest.$ac_objext"
13552 if { (eval echo "$as_me:13552: \"$ac_compile\"") >&5
13553 (eval $ac_compile) 2>&5
13555 echo "$as_me:13555: \$? = $ac_status" >&5
13556 (exit "$ac_status"); } &&
13557 { ac_try='test -s "conftest.$ac_objext"'
13558 { (eval echo "$as_me:13558: \"$ac_try\"") >&5
13559 (eval $ac_try) 2>&5
13561 echo "$as_me:13561: \$? = $ac_status" >&5
13562 (exit "$ac_status"); }; }; then
13565 echo "$as_me: failed program was:" >&5
13566 cat "conftest.$ac_ext" >&5
13567 cf_cv_posix_c_source=no
13569 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13570 CFLAGS="$cf_save_CFLAGS"
13571 CPPFLAGS="$cf_save_CPPFLAGS"
13574 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13577 echo "$as_me:13577: result: $cf_cv_posix_c_source" >&5
13578 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13580 if test "$cf_cv_posix_c_source" != no ; then
13581 CFLAGS="$cf_trim_CFLAGS"
13582 CPPFLAGS="$cf_trim_CPPFLAGS"
13587 cf_new_extra_cppflags=
13589 for cf_add_cflags in $cf_cv_posix_c_source
13591 case "$cf_fix_cppflags" in
13593 case "$cf_add_cflags" in
13594 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13595 case "$cf_add_cflags" in
13597 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13599 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13600 && test -z "${cf_tst_cflags}" \
13601 && cf_fix_cppflags=yes
13603 if test "$cf_fix_cppflags" = yes ; then
13605 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13606 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13609 elif test "${cf_tst_cflags}" = "\"'" ; then
13611 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13612 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13618 case "$CPPFLAGS" in
13622 case "$cf_add_cflags" in
13624 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13626 CPPFLAGS=`echo "$CPPFLAGS" | \
13627 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13628 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13633 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13634 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13641 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13642 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13649 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13650 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13652 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13654 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13655 && test -z "${cf_tst_cflags}" \
13656 && cf_fix_cppflags=no
13661 if test -n "$cf_new_cflags" ; then
13663 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13664 CFLAGS="${CFLAGS}$cf_new_cflags"
13668 if test -n "$cf_new_cppflags" ; then
13670 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13671 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13675 if test -n "$cf_new_extra_cppflags" ; then
13677 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13678 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13684 fi # cf_cv_posix_visible
13688 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
13691 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
13692 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
13693 # Abusing the conformance level is a workaround.
13694 { echo "$as_me:13694: WARNING: this system does not provide usable locale support" >&5
13695 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
13696 cf_xopen_source="-D_BSD_SOURCE"
13697 cf_XOPEN_SOURCE=700
13700 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
13701 cf_xopen_source="-D_BSD_SOURCE"
13702 cf_XOPEN_SOURCE=600
13705 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
13708 cf_xopen_source="-D_OSF_SOURCE"
13711 cf_xopen_source="-D_QNX_SOURCE"
13714 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
13717 cf_xopen_source="-D__EXTENSIONS__"
13718 cf_cv_xopen_source=broken
13720 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
13726 echo "$as_me:13726: checking if we should define _XOPEN_SOURCE" >&5
13727 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13728 if test "${cf_cv_xopen_source+set}" = set; then
13729 echo $ECHO_N "(cached) $ECHO_C" >&6
13732 cat >"conftest.$ac_ext" <<_ACEOF
13733 #line 13733 "configure"
13734 #include "confdefs.h"
13736 $ac_includes_default
13742 #ifndef _XOPEN_SOURCE
13743 #error _XOPEN_SOURCE is not defined
13750 rm -f "conftest.$ac_objext"
13751 if { (eval echo "$as_me:13751: \"$ac_compile\"") >&5
13752 (eval $ac_compile) 2>&5
13754 echo "$as_me:13754: \$? = $ac_status" >&5
13755 (exit "$ac_status"); } &&
13756 { ac_try='test -s "conftest.$ac_objext"'
13757 { (eval echo "$as_me:13757: \"$ac_try\"") >&5
13758 (eval $ac_try) 2>&5
13760 echo "$as_me:13760: \$? = $ac_status" >&5
13761 (exit "$ac_status"); }; }; then
13762 cf_cv_xopen_source=no
13764 echo "$as_me: failed program was:" >&5
13765 cat "conftest.$ac_ext" >&5
13766 cf_save="$CPPFLAGS"
13768 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13769 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13771 cat >"conftest.$ac_ext" <<_ACEOF
13772 #line 13772 "configure"
13773 #include "confdefs.h"
13775 $ac_includes_default
13781 #ifndef _XOPEN_SOURCE
13782 #error _XOPEN_SOURCE is not defined
13789 rm -f "conftest.$ac_objext"
13790 if { (eval echo "$as_me:13790: \"$ac_compile\"") >&5
13791 (eval $ac_compile) 2>&5
13793 echo "$as_me:13793: \$? = $ac_status" >&5
13794 (exit "$ac_status"); } &&
13795 { ac_try='test -s "conftest.$ac_objext"'
13796 { (eval echo "$as_me:13796: \"$ac_try\"") >&5
13797 (eval $ac_try) 2>&5
13799 echo "$as_me:13799: \$? = $ac_status" >&5
13800 (exit "$ac_status"); }; }; then
13801 cf_cv_xopen_source=no
13803 echo "$as_me: failed program was:" >&5
13804 cat "conftest.$ac_ext" >&5
13805 cf_cv_xopen_source=$cf_XOPEN_SOURCE
13807 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13808 CPPFLAGS="$cf_save"
13811 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13814 echo "$as_me:13814: result: $cf_cv_xopen_source" >&5
13815 echo "${ECHO_T}$cf_cv_xopen_source" >&6
13817 if test "$cf_cv_xopen_source" != no ; then
13819 CFLAGS=`echo "$CFLAGS" | \
13820 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13821 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13823 CPPFLAGS=`echo "$CPPFLAGS" | \
13824 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13825 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13827 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13829 for cf_add_cflags in $cf_temp_xopen_source
13831 case "x$cf_add_cflags" in
13834 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13837 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'`
13838 test "$CFLAGS" != "$cf_old_cflag" || break
13840 CFLAGS="$cf_old_cflag"
13843 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13846 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'`
13847 test "$CPPFLAGS" != "$cf_old_cflag" || break
13849 CPPFLAGS="$cf_old_cflag"
13858 cf_new_extra_cppflags=
13860 for cf_add_cflags in $cf_add_cflags
13862 case "$cf_fix_cppflags" in
13864 case "$cf_add_cflags" in
13865 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13866 case "$cf_add_cflags" in
13868 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13870 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13871 && test -z "${cf_tst_cflags}" \
13872 && cf_fix_cppflags=yes
13874 if test "$cf_fix_cppflags" = yes ; then
13876 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13877 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13880 elif test "${cf_tst_cflags}" = "\"'" ; then
13882 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13883 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13889 case "$CPPFLAGS" in
13893 case "$cf_add_cflags" in
13895 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13897 CPPFLAGS=`echo "$CPPFLAGS" | \
13898 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13899 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13904 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13905 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13912 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13913 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13920 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13921 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13923 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13925 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13926 && test -z "${cf_tst_cflags}" \
13927 && cf_fix_cppflags=no
13932 if test -n "$cf_new_cflags" ; then
13934 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13935 CFLAGS="${CFLAGS}$cf_new_cflags"
13939 if test -n "$cf_new_cppflags" ; then
13941 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13942 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13946 if test -n "$cf_new_extra_cppflags" ; then
13948 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13949 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13957 cf_save_xopen_cppflags="$CPPFLAGS"
13959 if test "$cf_cv_posix_visible" = no; then
13961 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
13963 cf_save_CFLAGS="$CFLAGS"
13964 cf_save_CPPFLAGS="$CPPFLAGS"
13966 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13967 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13968 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13970 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13971 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13972 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13974 echo "$as_me:13974: checking if we should define _POSIX_C_SOURCE" >&5
13975 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13976 if test "${cf_cv_posix_c_source+set}" = set; then
13977 echo $ECHO_N "(cached) $ECHO_C" >&6
13980 echo "${as_me:-configure}:13980: testing if the symbol is already defined go no further ..." 1>&5
13982 cat >"conftest.$ac_ext" <<_ACEOF
13983 #line 13983 "configure"
13984 #include "confdefs.h"
13985 #include <sys/types.h>
13990 #ifndef _POSIX_C_SOURCE
13991 #error _POSIX_C_SOURCE is not defined
13997 rm -f "conftest.$ac_objext"
13998 if { (eval echo "$as_me:13998: \"$ac_compile\"") >&5
13999 (eval $ac_compile) 2>&5
14001 echo "$as_me:14001: \$? = $ac_status" >&5
14002 (exit "$ac_status"); } &&
14003 { ac_try='test -s "conftest.$ac_objext"'
14004 { (eval echo "$as_me:14004: \"$ac_try\"") >&5
14005 (eval $ac_try) 2>&5
14007 echo "$as_me:14007: \$? = $ac_status" >&5
14008 (exit "$ac_status"); }; }; then
14009 cf_cv_posix_c_source=no
14011 echo "$as_me: failed program was:" >&5
14012 cat "conftest.$ac_ext" >&5
14013 cf_want_posix_source=no
14014 case .$cf_POSIX_C_SOURCE in
14016 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
14019 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
14020 cf_want_posix_source=yes
14023 cf_want_posix_source=yes
14026 if test "$cf_want_posix_source" = yes ; then
14027 cat >"conftest.$ac_ext" <<_ACEOF
14028 #line 14028 "configure"
14029 #include "confdefs.h"
14030 #include <sys/types.h>
14035 #ifdef _POSIX_SOURCE
14036 #error _POSIX_SOURCE is defined
14042 rm -f "conftest.$ac_objext"
14043 if { (eval echo "$as_me:14043: \"$ac_compile\"") >&5
14044 (eval $ac_compile) 2>&5
14046 echo "$as_me:14046: \$? = $ac_status" >&5
14047 (exit "$ac_status"); } &&
14048 { ac_try='test -s "conftest.$ac_objext"'
14049 { (eval echo "$as_me:14049: \"$ac_try\"") >&5
14050 (eval $ac_try) 2>&5
14052 echo "$as_me:14052: \$? = $ac_status" >&5
14053 (exit "$ac_status"); }; }; then
14056 echo "$as_me: failed program was:" >&5
14057 cat "conftest.$ac_ext" >&5
14058 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
14060 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14063 echo "${as_me:-configure}:14063: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
14065 CFLAGS="$cf_trim_CFLAGS"
14066 CPPFLAGS="$cf_trim_CPPFLAGS"
14068 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14069 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
14071 echo "${as_me:-configure}:14071: testing if the second compile does not leave our definition intact error ..." 1>&5
14073 cat >"conftest.$ac_ext" <<_ACEOF
14074 #line 14074 "configure"
14075 #include "confdefs.h"
14076 #include <sys/types.h>
14081 #ifndef _POSIX_C_SOURCE
14082 #error _POSIX_C_SOURCE is not defined
14088 rm -f "conftest.$ac_objext"
14089 if { (eval echo "$as_me:14089: \"$ac_compile\"") >&5
14090 (eval $ac_compile) 2>&5
14092 echo "$as_me:14092: \$? = $ac_status" >&5
14093 (exit "$ac_status"); } &&
14094 { ac_try='test -s "conftest.$ac_objext"'
14095 { (eval echo "$as_me:14095: \"$ac_try\"") >&5
14096 (eval $ac_try) 2>&5
14098 echo "$as_me:14098: \$? = $ac_status" >&5
14099 (exit "$ac_status"); }; }; then
14102 echo "$as_me: failed program was:" >&5
14103 cat "conftest.$ac_ext" >&5
14104 cf_cv_posix_c_source=no
14106 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14107 CFLAGS="$cf_save_CFLAGS"
14108 CPPFLAGS="$cf_save_CPPFLAGS"
14111 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14114 echo "$as_me:14114: result: $cf_cv_posix_c_source" >&5
14115 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
14117 if test "$cf_cv_posix_c_source" != no ; then
14118 CFLAGS="$cf_trim_CFLAGS"
14119 CPPFLAGS="$cf_trim_CPPFLAGS"
14124 cf_new_extra_cppflags=
14126 for cf_add_cflags in $cf_cv_posix_c_source
14128 case "$cf_fix_cppflags" in
14130 case "$cf_add_cflags" in
14131 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14132 case "$cf_add_cflags" in
14134 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14136 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14137 && test -z "${cf_tst_cflags}" \
14138 && cf_fix_cppflags=yes
14140 if test "$cf_fix_cppflags" = yes ; then
14142 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14143 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14146 elif test "${cf_tst_cflags}" = "\"'" ; then
14148 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14149 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14155 case "$CPPFLAGS" in
14159 case "$cf_add_cflags" in
14161 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14163 CPPFLAGS=`echo "$CPPFLAGS" | \
14164 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14165 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14170 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14171 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14178 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14179 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14186 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14187 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14189 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14191 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14192 && test -z "${cf_tst_cflags}" \
14193 && cf_fix_cppflags=no
14198 if test -n "$cf_new_cflags" ; then
14200 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14201 CFLAGS="${CFLAGS}$cf_new_cflags"
14205 if test -n "$cf_new_cppflags" ; then
14207 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14208 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14212 if test -n "$cf_new_extra_cppflags" ; then
14214 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14215 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14221 fi # cf_cv_posix_visible
14223 # Some of these niche implementations use copy/paste, double-check...
14224 if test "$cf_cv_xopen_source" = no ; then
14225 test -n "$verbose" && echo " checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6
14227 echo "${as_me:-configure}:14227: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5
14229 cat >"conftest.$ac_ext" <<_ACEOF
14230 #line 14230 "configure"
14231 #include "confdefs.h"
14233 $ac_includes_default
14239 #ifndef _XOPEN_SOURCE
14240 #error _XOPEN_SOURCE is not defined
14247 rm -f "conftest.$ac_objext"
14248 if { (eval echo "$as_me:14248: \"$ac_compile\"") >&5
14249 (eval $ac_compile) 2>&5
14251 echo "$as_me:14251: \$? = $ac_status" >&5
14252 (exit "$ac_status"); } &&
14253 { ac_try='test -s "conftest.$ac_objext"'
14254 { (eval echo "$as_me:14254: \"$ac_try\"") >&5
14255 (eval $ac_try) 2>&5
14257 echo "$as_me:14257: \$? = $ac_status" >&5
14258 (exit "$ac_status"); }; }; then
14261 echo "$as_me: failed program was:" >&5
14262 cat "conftest.$ac_ext" >&5
14264 { echo "$as_me:14264: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
14265 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
14266 CPPFLAGS="$cf_save_xopen_cppflags"
14268 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14273 if test -n "$cf_xopen_source" ; then
14275 for cf_add_cflags in $cf_xopen_source
14277 case "x$cf_add_cflags" in
14280 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14283 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'`
14284 test "$CFLAGS" != "$cf_old_cflag" || break
14285 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
14287 echo "${as_me:-configure}:14287: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
14289 CFLAGS="$cf_old_cflag"
14292 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14295 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'`
14296 test "$CPPFLAGS" != "$cf_old_cflag" || break
14297 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
14299 echo "${as_me:-configure}:14299: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
14301 CPPFLAGS="$cf_old_cflag"
14310 cf_new_extra_cppflags=
14312 for cf_add_cflags in $cf_add_cflags
14314 case "$cf_fix_cppflags" in
14316 case "$cf_add_cflags" in
14317 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14318 case "$cf_add_cflags" in
14320 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14322 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14323 && test -z "${cf_tst_cflags}" \
14324 && cf_fix_cppflags=yes
14326 if test "$cf_fix_cppflags" = yes ; then
14328 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14329 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14332 elif test "${cf_tst_cflags}" = "\"'" ; then
14334 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14335 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14341 case "$CPPFLAGS" in
14345 case "$cf_add_cflags" in
14347 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14349 CPPFLAGS=`echo "$CPPFLAGS" | \
14350 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14351 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14356 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14357 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14364 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14365 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14372 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14373 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14375 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14377 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14378 && test -z "${cf_tst_cflags}" \
14379 && cf_fix_cppflags=no
14384 if test -n "$cf_new_cflags" ; then
14385 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
14387 echo "${as_me:-configure}:14387: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
14389 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14390 CFLAGS="${CFLAGS}$cf_new_cflags"
14394 if test -n "$cf_new_cppflags" ; then
14395 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
14397 echo "${as_me:-configure}:14397: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
14399 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14400 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14404 if test -n "$cf_new_extra_cppflags" ; then
14405 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
14407 echo "${as_me:-configure}:14407: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
14409 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14410 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14418 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
14419 echo "$as_me:14419: checking if _XOPEN_SOURCE really is set" >&5
14420 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
14421 cat >"conftest.$ac_ext" <<_ACEOF
14422 #line 14422 "configure"
14423 #include "confdefs.h"
14424 #include <stdlib.h>
14429 #ifndef _XOPEN_SOURCE
14430 #error _XOPEN_SOURCE is not defined
14436 rm -f "conftest.$ac_objext"
14437 if { (eval echo "$as_me:14437: \"$ac_compile\"") >&5
14438 (eval $ac_compile) 2>&5
14440 echo "$as_me:14440: \$? = $ac_status" >&5
14441 (exit "$ac_status"); } &&
14442 { ac_try='test -s "conftest.$ac_objext"'
14443 { (eval echo "$as_me:14443: \"$ac_try\"") >&5
14444 (eval $ac_try) 2>&5
14446 echo "$as_me:14446: \$? = $ac_status" >&5
14447 (exit "$ac_status"); }; }; then
14448 cf_XOPEN_SOURCE_set=yes
14450 echo "$as_me: failed program was:" >&5
14451 cat "conftest.$ac_ext" >&5
14452 cf_XOPEN_SOURCE_set=no
14454 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14455 echo "$as_me:14455: result: $cf_XOPEN_SOURCE_set" >&5
14456 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
14457 if test "$cf_XOPEN_SOURCE_set" = yes
14459 cat >"conftest.$ac_ext" <<_ACEOF
14460 #line 14460 "configure"
14461 #include "confdefs.h"
14462 #include <stdlib.h>
14467 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
14468 #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
14474 rm -f "conftest.$ac_objext"
14475 if { (eval echo "$as_me:14475: \"$ac_compile\"") >&5
14476 (eval $ac_compile) 2>&5
14478 echo "$as_me:14478: \$? = $ac_status" >&5
14479 (exit "$ac_status"); } &&
14480 { ac_try='test -s "conftest.$ac_objext"'
14481 { (eval echo "$as_me:14481: \"$ac_try\"") >&5
14482 (eval $ac_try) 2>&5
14484 echo "$as_me:14484: \$? = $ac_status" >&5
14485 (exit "$ac_status"); }; }; then
14486 cf_XOPEN_SOURCE_set_ok=yes
14488 echo "$as_me: failed program was:" >&5
14489 cat "conftest.$ac_ext" >&5
14490 cf_XOPEN_SOURCE_set_ok=no
14492 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14493 if test "$cf_XOPEN_SOURCE_set_ok" = no
14495 { echo "$as_me:14495: WARNING: _XOPEN_SOURCE is lower than requested" >&5
14496 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
14500 echo "$as_me:14500: checking if we should define _XOPEN_SOURCE" >&5
14501 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
14502 if test "${cf_cv_xopen_source+set}" = set; then
14503 echo $ECHO_N "(cached) $ECHO_C" >&6
14506 cat >"conftest.$ac_ext" <<_ACEOF
14507 #line 14507 "configure"
14508 #include "confdefs.h"
14510 $ac_includes_default
14516 #ifndef _XOPEN_SOURCE
14517 #error _XOPEN_SOURCE is not defined
14524 rm -f "conftest.$ac_objext"
14525 if { (eval echo "$as_me:14525: \"$ac_compile\"") >&5
14526 (eval $ac_compile) 2>&5
14528 echo "$as_me:14528: \$? = $ac_status" >&5
14529 (exit "$ac_status"); } &&
14530 { ac_try='test -s "conftest.$ac_objext"'
14531 { (eval echo "$as_me:14531: \"$ac_try\"") >&5
14532 (eval $ac_try) 2>&5
14534 echo "$as_me:14534: \$? = $ac_status" >&5
14535 (exit "$ac_status"); }; }; then
14536 cf_cv_xopen_source=no
14538 echo "$as_me: failed program was:" >&5
14539 cat "conftest.$ac_ext" >&5
14540 cf_save="$CPPFLAGS"
14542 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14543 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
14545 cat >"conftest.$ac_ext" <<_ACEOF
14546 #line 14546 "configure"
14547 #include "confdefs.h"
14549 $ac_includes_default
14555 #ifndef _XOPEN_SOURCE
14556 #error _XOPEN_SOURCE is not defined
14563 rm -f "conftest.$ac_objext"
14564 if { (eval echo "$as_me:14564: \"$ac_compile\"") >&5
14565 (eval $ac_compile) 2>&5
14567 echo "$as_me:14567: \$? = $ac_status" >&5
14568 (exit "$ac_status"); } &&
14569 { ac_try='test -s "conftest.$ac_objext"'
14570 { (eval echo "$as_me:14570: \"$ac_try\"") >&5
14571 (eval $ac_try) 2>&5
14573 echo "$as_me:14573: \$? = $ac_status" >&5
14574 (exit "$ac_status"); }; }; then
14575 cf_cv_xopen_source=no
14577 echo "$as_me: failed program was:" >&5
14578 cat "conftest.$ac_ext" >&5
14579 cf_cv_xopen_source=$cf_XOPEN_SOURCE
14581 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14582 CPPFLAGS="$cf_save"
14585 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14588 echo "$as_me:14588: result: $cf_cv_xopen_source" >&5
14589 echo "${ECHO_T}$cf_cv_xopen_source" >&6
14591 if test "$cf_cv_xopen_source" != no ; then
14593 CFLAGS=`echo "$CFLAGS" | \
14594 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14595 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14597 CPPFLAGS=`echo "$CPPFLAGS" | \
14598 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14599 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14601 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
14603 for cf_add_cflags in $cf_temp_xopen_source
14605 case "x$cf_add_cflags" in
14608 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14611 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'`
14612 test "$CFLAGS" != "$cf_old_cflag" || break
14614 CFLAGS="$cf_old_cflag"
14617 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14620 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'`
14621 test "$CPPFLAGS" != "$cf_old_cflag" || break
14623 CPPFLAGS="$cf_old_cflag"
14632 cf_new_extra_cppflags=
14634 for cf_add_cflags in $cf_add_cflags
14636 case "$cf_fix_cppflags" in
14638 case "$cf_add_cflags" in
14639 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14640 case "$cf_add_cflags" in
14642 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14644 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14645 && test -z "${cf_tst_cflags}" \
14646 && cf_fix_cppflags=yes
14648 if test "$cf_fix_cppflags" = yes ; then
14650 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14651 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14654 elif test "${cf_tst_cflags}" = "\"'" ; then
14656 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14657 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14663 case "$CPPFLAGS" in
14667 case "$cf_add_cflags" in
14669 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14671 CPPFLAGS=`echo "$CPPFLAGS" | \
14672 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14673 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14678 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14679 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14686 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14687 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14694 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14695 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14697 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14699 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14700 && test -z "${cf_tst_cflags}" \
14701 && cf_fix_cppflags=no
14706 if test -n "$cf_new_cflags" ; then
14708 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14709 CFLAGS="${CFLAGS}$cf_new_cflags"
14713 if test -n "$cf_new_cppflags" ; then
14715 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14716 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14720 if test -n "$cf_new_extra_cppflags" ; then
14722 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14723 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14733 fi # cf_cv_posix_visible
14735 echo "$as_me:14735: checking for ANSI C header files" >&5
14736 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14737 if test "${ac_cv_header_stdc+set}" = set; then
14738 echo $ECHO_N "(cached) $ECHO_C" >&6
14740 cat >"conftest.$ac_ext" <<_ACEOF
14741 #line 14741 "configure"
14742 #include "confdefs.h"
14743 #include <stdlib.h>
14744 #include <stdarg.h>
14745 #include <string.h>
14749 if { (eval echo "$as_me:14749: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14750 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14752 $EGREP -v '^ *\+' conftest.er1 >conftest.err
14754 cat conftest.err >&5
14755 echo "$as_me:14755: \$? = $ac_status" >&5
14756 (exit "$ac_status"); } >/dev/null; then
14757 if test -s conftest.err; then
14758 ac_cpp_err=$ac_c_preproc_warn_flag
14765 if test -z "$ac_cpp_err"; then
14766 ac_cv_header_stdc=yes
14768 echo "$as_me: failed program was:" >&5
14769 cat "conftest.$ac_ext" >&5
14770 ac_cv_header_stdc=no
14772 rm -f conftest.err "conftest.$ac_ext"
14774 if test $ac_cv_header_stdc = yes; then
14775 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14776 cat >"conftest.$ac_ext" <<_ACEOF
14777 #line 14777 "configure"
14778 #include "confdefs.h"
14779 #include <string.h>
14782 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14783 $EGREP "memchr" >/dev/null 2>&1; then
14786 ac_cv_header_stdc=no
14792 if test $ac_cv_header_stdc = yes; then
14793 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14794 cat >"conftest.$ac_ext" <<_ACEOF
14795 #line 14795 "configure"
14796 #include "confdefs.h"
14797 #include <stdlib.h>
14800 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14801 $EGREP "free" >/dev/null 2>&1; then
14804 ac_cv_header_stdc=no
14810 if test $ac_cv_header_stdc = yes; then
14811 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14812 if test "$cross_compiling" = yes; then
14815 cat >"conftest.$ac_ext" <<_ACEOF
14816 #line 14816 "configure"
14817 #include "confdefs.h"
14819 #if ((' ' & 0x0FF) == 0x020)
14820 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14821 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14823 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14824 || ('j' <= (c) && (c) <= 'r') \
14825 || ('s' <= (c) && (c) <= 'z'))
14826 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14829 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14834 for (i = 0; i < 256; i++)
14835 if (XOR (islower (i), ISLOWER (i))
14836 || toupper (i) != TOUPPER (i))
14837 $ac_main_return(2);
14838 $ac_main_return (0);
14841 rm -f "conftest$ac_exeext"
14842 if { (eval echo "$as_me:14842: \"$ac_link\"") >&5
14843 (eval $ac_link) 2>&5
14845 echo "$as_me:14845: \$? = $ac_status" >&5
14846 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14847 { (eval echo "$as_me:14847: \"$ac_try\"") >&5
14848 (eval $ac_try) 2>&5
14850 echo "$as_me:14850: \$? = $ac_status" >&5
14851 (exit "$ac_status"); }; }; then
14854 echo "$as_me: program exited with status $ac_status" >&5
14855 echo "$as_me: failed program was:" >&5
14856 cat "conftest.$ac_ext" >&5
14857 ac_cv_header_stdc=no
14859 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14863 echo "$as_me:14863: result: $ac_cv_header_stdc" >&5
14864 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14865 if test $ac_cv_header_stdc = yes; then
14867 cat >>confdefs.h <<\EOF
14868 #define STDC_HEADERS 1
14873 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
14875 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
14876 inttypes.h stdint.h unistd.h
14878 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14879 echo "$as_me:14879: checking for $ac_header" >&5
14880 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14881 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14882 echo $ECHO_N "(cached) $ECHO_C" >&6
14884 cat >"conftest.$ac_ext" <<_ACEOF
14885 #line 14885 "configure"
14886 #include "confdefs.h"
14887 $ac_includes_default
14888 #include <$ac_header>
14890 rm -f "conftest.$ac_objext"
14891 if { (eval echo "$as_me:14891: \"$ac_compile\"") >&5
14892 (eval $ac_compile) 2>&5
14894 echo "$as_me:14894: \$? = $ac_status" >&5
14895 (exit "$ac_status"); } &&
14896 { ac_try='test -s "conftest.$ac_objext"'
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
14902 eval "$as_ac_Header=yes"
14904 echo "$as_me: failed program was:" >&5
14905 cat "conftest.$ac_ext" >&5
14906 eval "$as_ac_Header=no"
14908 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14910 echo "$as_me:14910: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
14911 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
14912 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
14913 cat >>confdefs.h <<EOF
14914 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14920 echo "$as_me:14920: checking whether exit is declared" >&5
14921 echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
14922 if test "${ac_cv_have_decl_exit+set}" = set; then
14923 echo $ECHO_N "(cached) $ECHO_C" >&6
14925 cat >"conftest.$ac_ext" <<_ACEOF
14926 #line 14926 "configure"
14927 #include "confdefs.h"
14928 $ac_includes_default
14940 rm -f "conftest.$ac_objext"
14941 if { (eval echo "$as_me:14941: \"$ac_compile\"") >&5
14942 (eval $ac_compile) 2>&5
14944 echo "$as_me:14944: \$? = $ac_status" >&5
14945 (exit "$ac_status"); } &&
14946 { ac_try='test -s "conftest.$ac_objext"'
14947 { (eval echo "$as_me:14947: \"$ac_try\"") >&5
14948 (eval $ac_try) 2>&5
14950 echo "$as_me:14950: \$? = $ac_status" >&5
14951 (exit "$ac_status"); }; }; then
14952 ac_cv_have_decl_exit=yes
14954 echo "$as_me: failed program was:" >&5
14955 cat "conftest.$ac_ext" >&5
14956 ac_cv_have_decl_exit=no
14958 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14960 echo "$as_me:14960: result: $ac_cv_have_decl_exit" >&5
14961 echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
14963 # Check whether --enable-largefile or --disable-largefile was given.
14964 if test "${enable_largefile+set}" = set; then
14965 enableval="$enable_largefile"
14968 if test "$enable_largefile" != no; then
14970 echo "$as_me:14970: checking for special C compiler options needed for large files" >&5
14971 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
14972 if test "${ac_cv_sys_largefile_CC+set}" = set; then
14973 echo $ECHO_N "(cached) $ECHO_C" >&6
14975 ac_cv_sys_largefile_CC=no
14976 if test "$GCC" != yes; then
14979 # IRIX 6.2 and later do not support large files by default,
14980 # so use the C compiler's -n32 option if that helps.
14981 cat >"conftest.$ac_ext" <<_ACEOF
14982 #line 14982 "configure"
14983 #include "confdefs.h"
14984 #include <sys/types.h>
14985 /* Check that off_t can represent 2**63 - 1 correctly.
14986 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14987 since some C++ compilers masquerading as C compilers
14988 incorrectly reject 9223372036854775807. */
14989 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14990 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14991 && LARGE_OFF_T % 2147483647 == 1)
15001 rm -f "conftest.$ac_objext"
15002 if { (eval echo "$as_me:15002: \"$ac_compile\"") >&5
15003 (eval $ac_compile) 2>&5
15005 echo "$as_me:15005: \$? = $ac_status" >&5
15006 (exit "$ac_status"); } &&
15007 { ac_try='test -s "conftest.$ac_objext"'
15008 { (eval echo "$as_me:15008: \"$ac_try\"") >&5
15009 (eval $ac_try) 2>&5
15011 echo "$as_me:15011: \$? = $ac_status" >&5
15012 (exit "$ac_status"); }; }; then
15015 echo "$as_me: failed program was:" >&5
15016 cat "conftest.$ac_ext" >&5
15018 rm -f "conftest.$ac_objext"
15020 rm -f "conftest.$ac_objext"
15021 if { (eval echo "$as_me:15021: \"$ac_compile\"") >&5
15022 (eval $ac_compile) 2>&5
15024 echo "$as_me:15024: \$? = $ac_status" >&5
15025 (exit "$ac_status"); } &&
15026 { ac_try='test -s "conftest.$ac_objext"'
15027 { (eval echo "$as_me:15027: \"$ac_try\"") >&5
15028 (eval $ac_try) 2>&5
15030 echo "$as_me:15030: \$? = $ac_status" >&5
15031 (exit "$ac_status"); }; }; then
15032 ac_cv_sys_largefile_CC=' -n32'; break
15034 echo "$as_me: failed program was:" >&5
15035 cat "conftest.$ac_ext" >&5
15037 rm -f "conftest.$ac_objext"
15041 rm -f "conftest.$ac_ext"
15044 echo "$as_me:15044: result: $ac_cv_sys_largefile_CC" >&5
15045 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
15046 if test "$ac_cv_sys_largefile_CC" != no; then
15047 CC=$CC$ac_cv_sys_largefile_CC
15050 echo "$as_me:15050: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15051 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
15052 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
15053 echo $ECHO_N "(cached) $ECHO_C" >&6
15056 ac_cv_sys_file_offset_bits=no
15057 cat >"conftest.$ac_ext" <<_ACEOF
15058 #line 15058 "configure"
15059 #include "confdefs.h"
15060 #include <sys/types.h>
15061 /* Check that off_t can represent 2**63 - 1 correctly.
15062 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15063 since some C++ compilers masquerading as C compilers
15064 incorrectly reject 9223372036854775807. */
15065 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15066 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15067 && LARGE_OFF_T % 2147483647 == 1)
15077 rm -f "conftest.$ac_objext"
15078 if { (eval echo "$as_me:15078: \"$ac_compile\"") >&5
15079 (eval $ac_compile) 2>&5
15081 echo "$as_me:15081: \$? = $ac_status" >&5
15082 (exit "$ac_status"); } &&
15083 { ac_try='test -s "conftest.$ac_objext"'
15084 { (eval echo "$as_me:15084: \"$ac_try\"") >&5
15085 (eval $ac_try) 2>&5
15087 echo "$as_me:15087: \$? = $ac_status" >&5
15088 (exit "$ac_status"); }; }; then
15091 echo "$as_me: failed program was:" >&5
15092 cat "conftest.$ac_ext" >&5
15094 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15095 cat >"conftest.$ac_ext" <<_ACEOF
15096 #line 15096 "configure"
15097 #include "confdefs.h"
15098 #define _FILE_OFFSET_BITS 64
15099 #include <sys/types.h>
15100 /* Check that off_t can represent 2**63 - 1 correctly.
15101 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15102 since some C++ compilers masquerading as C compilers
15103 incorrectly reject 9223372036854775807. */
15104 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15105 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15106 && LARGE_OFF_T % 2147483647 == 1)
15116 rm -f "conftest.$ac_objext"
15117 if { (eval echo "$as_me:15117: \"$ac_compile\"") >&5
15118 (eval $ac_compile) 2>&5
15120 echo "$as_me:15120: \$? = $ac_status" >&5
15121 (exit "$ac_status"); } &&
15122 { ac_try='test -s "conftest.$ac_objext"'
15123 { (eval echo "$as_me:15123: \"$ac_try\"") >&5
15124 (eval $ac_try) 2>&5
15126 echo "$as_me:15126: \$? = $ac_status" >&5
15127 (exit "$ac_status"); }; }; then
15128 ac_cv_sys_file_offset_bits=64; break
15130 echo "$as_me: failed program was:" >&5
15131 cat "conftest.$ac_ext" >&5
15133 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15137 echo "$as_me:15137: result: $ac_cv_sys_file_offset_bits" >&5
15138 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
15139 if test "$ac_cv_sys_file_offset_bits" != no; then
15141 cat >>confdefs.h <<EOF
15142 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15147 echo "$as_me:15147: checking for _LARGE_FILES value needed for large files" >&5
15148 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
15149 if test "${ac_cv_sys_large_files+set}" = set; then
15150 echo $ECHO_N "(cached) $ECHO_C" >&6
15153 ac_cv_sys_large_files=no
15154 cat >"conftest.$ac_ext" <<_ACEOF
15155 #line 15155 "configure"
15156 #include "confdefs.h"
15157 #include <sys/types.h>
15158 /* Check that off_t can represent 2**63 - 1 correctly.
15159 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15160 since some C++ compilers masquerading as C compilers
15161 incorrectly reject 9223372036854775807. */
15162 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15163 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15164 && LARGE_OFF_T % 2147483647 == 1)
15174 rm -f "conftest.$ac_objext"
15175 if { (eval echo "$as_me:15175: \"$ac_compile\"") >&5
15176 (eval $ac_compile) 2>&5
15178 echo "$as_me:15178: \$? = $ac_status" >&5
15179 (exit "$ac_status"); } &&
15180 { ac_try='test -s "conftest.$ac_objext"'
15181 { (eval echo "$as_me:15181: \"$ac_try\"") >&5
15182 (eval $ac_try) 2>&5
15184 echo "$as_me:15184: \$? = $ac_status" >&5
15185 (exit "$ac_status"); }; }; then
15188 echo "$as_me: failed program was:" >&5
15189 cat "conftest.$ac_ext" >&5
15191 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15192 cat >"conftest.$ac_ext" <<_ACEOF
15193 #line 15193 "configure"
15194 #include "confdefs.h"
15195 #define _LARGE_FILES 1
15196 #include <sys/types.h>
15197 /* Check that off_t can represent 2**63 - 1 correctly.
15198 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15199 since some C++ compilers masquerading as C compilers
15200 incorrectly reject 9223372036854775807. */
15201 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15202 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15203 && LARGE_OFF_T % 2147483647 == 1)
15213 rm -f "conftest.$ac_objext"
15214 if { (eval echo "$as_me:15214: \"$ac_compile\"") >&5
15215 (eval $ac_compile) 2>&5
15217 echo "$as_me:15217: \$? = $ac_status" >&5
15218 (exit "$ac_status"); } &&
15219 { ac_try='test -s "conftest.$ac_objext"'
15220 { (eval echo "$as_me:15220: \"$ac_try\"") >&5
15221 (eval $ac_try) 2>&5
15223 echo "$as_me:15223: \$? = $ac_status" >&5
15224 (exit "$ac_status"); }; }; then
15225 ac_cv_sys_large_files=1; break
15227 echo "$as_me: failed program was:" >&5
15228 cat "conftest.$ac_ext" >&5
15230 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15234 echo "$as_me:15234: result: $ac_cv_sys_large_files" >&5
15235 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
15236 if test "$ac_cv_sys_large_files" != no; then
15238 cat >>confdefs.h <<EOF
15239 #define _LARGE_FILES $ac_cv_sys_large_files
15246 if test "$enable_largefile" != no ; then
15247 echo "$as_me:15247: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15248 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
15249 if test "${ac_cv_sys_largefile_source+set}" = set; then
15250 echo $ECHO_N "(cached) $ECHO_C" >&6
15253 ac_cv_sys_largefile_source=no
15254 cat >"conftest.$ac_ext" <<_ACEOF
15255 #line 15255 "configure"
15256 #include "confdefs.h"
15258 #include <sys/types.h>
15263 int (*my_fseeko)(FILE *, off_t, int) = fseeko;
15264 return my_fseeko(stdin, 0, 0);
15269 rm -f "conftest.$ac_objext"
15270 if { (eval echo "$as_me:15270: \"$ac_compile\"") >&5
15271 (eval $ac_compile) 2>&5
15273 echo "$as_me:15273: \$? = $ac_status" >&5
15274 (exit "$ac_status"); } &&
15275 { ac_try='test -s "conftest.$ac_objext"'
15276 { (eval echo "$as_me:15276: \"$ac_try\"") >&5
15277 (eval $ac_try) 2>&5
15279 echo "$as_me:15279: \$? = $ac_status" >&5
15280 (exit "$ac_status"); }; }; then
15283 echo "$as_me: failed program was:" >&5
15284 cat "conftest.$ac_ext" >&5
15286 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15287 cat >"conftest.$ac_ext" <<_ACEOF
15288 #line 15288 "configure"
15289 #include "confdefs.h"
15290 #define _LARGEFILE_SOURCE 1
15292 #include <sys/types.h>
15297 int (*my_fseeko)(FILE *, off_t, int) = fseeko;
15298 return my_fseeko(stdin, 0, 0);
15303 rm -f "conftest.$ac_objext"
15304 if { (eval echo "$as_me:15304: \"$ac_compile\"") >&5
15305 (eval $ac_compile) 2>&5
15307 echo "$as_me:15307: \$? = $ac_status" >&5
15308 (exit "$ac_status"); } &&
15309 { ac_try='test -s "conftest.$ac_objext"'
15310 { (eval echo "$as_me:15310: \"$ac_try\"") >&5
15311 (eval $ac_try) 2>&5
15313 echo "$as_me:15313: \$? = $ac_status" >&5
15314 (exit "$ac_status"); }; }; then
15315 ac_cv_sys_largefile_source=1; break
15317 echo "$as_me: failed program was:" >&5
15318 cat "conftest.$ac_ext" >&5
15320 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15324 echo "$as_me:15324: result: $ac_cv_sys_largefile_source" >&5
15325 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
15326 if test "$ac_cv_sys_largefile_source" != no; then
15328 cat >>confdefs.h <<EOF
15329 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15335 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15336 # in glibc 2.1.3, but that breaks too many other things.
15337 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15338 echo "$as_me:15338: checking for fseeko" >&5
15339 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
15340 if test "${ac_cv_func_fseeko+set}" = set; then
15341 echo $ECHO_N "(cached) $ECHO_C" >&6
15343 cat >"conftest.$ac_ext" <<_ACEOF
15344 #line 15344 "configure"
15345 #include "confdefs.h"
15347 #include <sys/types.h>
15351 int (*my_fseeko)(FILE *, off_t, int) = fseeko;
15352 return my_fseeko && my_fseeko (stdin, 0, 0);
15357 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15358 if { (eval echo "$as_me:15358: \"$ac_link\"") >&5
15359 (eval $ac_link) 2>&5
15361 echo "$as_me:15361: \$? = $ac_status" >&5
15362 (exit "$ac_status"); } &&
15363 { ac_try='test -s "conftest$ac_exeext"'
15364 { (eval echo "$as_me:15364: \"$ac_try\"") >&5
15365 (eval $ac_try) 2>&5
15367 echo "$as_me:15367: \$? = $ac_status" >&5
15368 (exit "$ac_status"); }; }; then
15369 ac_cv_func_fseeko=yes
15371 echo "$as_me: failed program was:" >&5
15372 cat "conftest.$ac_ext" >&5
15373 ac_cv_func_fseeko=no
15375 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15377 echo "$as_me:15377: result: $ac_cv_func_fseeko" >&5
15378 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
15379 if test $ac_cv_func_fseeko = yes; then
15381 cat >>confdefs.h <<\EOF
15382 #define HAVE_FSEEKO 1
15387 # Normally we would collect these definitions in the config.h,
15388 # but (like _XOPEN_SOURCE), some environments rely on having these
15389 # defined before any of the system headers are included. Another
15390 # case comes up with C++, e.g., on AIX the compiler compiles the
15391 # header files by themselves before looking at the body files it is
15392 # told to compile. For ncurses, those header files do not include
15394 if test "$ac_cv_sys_large_files" != no
15397 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15398 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
15401 if test "$ac_cv_sys_largefile_source" != no
15404 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15405 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
15408 if test "$ac_cv_sys_file_offset_bits" != no
15411 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15412 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
15416 echo "$as_me:15416: checking whether to use struct dirent64" >&5
15417 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
15418 if test "${cf_cv_struct_dirent64+set}" = set; then
15419 echo $ECHO_N "(cached) $ECHO_C" >&6
15422 cat >"conftest.$ac_ext" <<_ACEOF
15423 #line 15423 "configure"
15424 #include "confdefs.h"
15426 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
15427 #include <sys/types.h>
15428 #include <dirent.h>
15431 /* if transitional largefile support is setup, this is true */
15432 extern struct dirent64 * readdir(DIR *);
15439 DIR *dp = opendir(".");
15440 struct dirent64 *x = readdir(dp);
15441 struct dirent *y = readdir(dp);
15449 rm -f "conftest.$ac_objext"
15450 if { (eval echo "$as_me:15450: \"$ac_compile\"") >&5
15451 (eval $ac_compile) 2>&5
15453 echo "$as_me:15453: \$? = $ac_status" >&5
15454 (exit "$ac_status"); } &&
15455 { ac_try='test -s "conftest.$ac_objext"'
15456 { (eval echo "$as_me:15456: \"$ac_try\"") >&5
15457 (eval $ac_try) 2>&5
15459 echo "$as_me:15459: \$? = $ac_status" >&5
15460 (exit "$ac_status"); }; }; then
15461 cf_cv_struct_dirent64=yes
15463 echo "$as_me: failed program was:" >&5
15464 cat "conftest.$ac_ext" >&5
15465 cf_cv_struct_dirent64=no
15467 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15470 echo "$as_me:15470: result: $cf_cv_struct_dirent64" >&5
15471 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
15472 test "$cf_cv_struct_dirent64" = yes &&
15473 cat >>confdefs.h <<\EOF
15474 #define HAVE_STRUCT_DIRENT64 1
15479 ### Enable compiling-in rcs id's
15480 echo "$as_me:15480: checking if RCS identifiers should be compiled-in" >&5
15481 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
15483 # Check whether --with-rcs-ids or --without-rcs-ids was given.
15484 if test "${with_rcs_ids+set}" = set; then
15485 withval="$with_rcs_ids"
15486 with_rcs_ids=$withval
15490 echo "$as_me:15490: result: $with_rcs_ids" >&5
15491 echo "${ECHO_T}$with_rcs_ids" >&6
15492 test "$with_rcs_ids" = yes &&
15493 cat >>confdefs.h <<\EOF
15494 #define USE_RCS_IDS 1
15497 ###############################################################################
15499 ### Note that some functions (such as const) are normally disabled anyway.
15500 echo "$as_me:15500: checking if you want to build with function extensions" >&5
15501 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15503 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15504 if test "${enable_ext_funcs+set}" = set; then
15505 enableval="$enable_ext_funcs"
15506 with_ext_funcs=$enableval
15510 echo "$as_me:15510: result: $with_ext_funcs" >&5
15511 echo "${ECHO_T}$with_ext_funcs" >&6
15512 if test "$with_ext_funcs" = yes ; then
15513 NCURSES_EXT_FUNCS=1
15515 cat >>confdefs.h <<\EOF
15516 #define HAVE_USE_DEFAULT_COLORS 1
15519 cat >>confdefs.h <<\EOF
15520 #define NCURSES_EXT_FUNCS 1
15524 NCURSES_EXT_FUNCS=0
15527 ### use option --enable-const to turn on use of const beyond that in XSI.
15528 echo "$as_me:15528: checking for extended use of const keyword" >&5
15529 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15531 # Check whether --enable-const or --disable-const was given.
15532 if test "${enable_const+set}" = set; then
15533 enableval="$enable_const"
15534 with_ext_const=$enableval
15538 echo "$as_me:15538: result: $with_ext_const" >&5
15539 echo "${ECHO_T}$with_ext_const" >&6
15540 NCURSES_CONST='/*nothing*/'
15541 if test "$with_ext_const" = yes ; then
15542 NCURSES_CONST=const
15545 ###############################################################################
15546 # These options are relatively safe to experiment with.
15548 echo "$as_me:15548: checking if you want all development code" >&5
15549 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15551 # Check whether --with-develop or --without-develop was given.
15552 if test "${with_develop+set}" = set; then
15553 withval="$with_develop"
15554 with_develop=$withval
15558 echo "$as_me:15558: result: $with_develop" >&5
15559 echo "${ECHO_T}$with_develop" >&6
15561 ###############################################################################
15562 # These are just experimental, probably should not be in a package:
15564 # This is still experimental (20080329), but should ultimately be moved to
15565 # the script-block --with-normal, etc.
15567 echo "$as_me:15567: checking if you want to link with the pthread library" >&5
15568 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15570 # Check whether --with-pthread or --without-pthread was given.
15571 if test "${with_pthread+set}" = set; then
15572 withval="$with_pthread"
15573 with_pthread=$withval
15577 echo "$as_me:15577: result: $with_pthread" >&5
15578 echo "${ECHO_T}$with_pthread" >&6
15580 if test "$with_pthread" != no ; then
15581 echo "$as_me:15581: checking for pthread.h" >&5
15582 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15583 if test "${ac_cv_header_pthread_h+set}" = set; then
15584 echo $ECHO_N "(cached) $ECHO_C" >&6
15586 cat >"conftest.$ac_ext" <<_ACEOF
15587 #line 15587 "configure"
15588 #include "confdefs.h"
15589 #include <pthread.h>
15591 if { (eval echo "$as_me:15591: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15592 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15594 $EGREP -v '^ *\+' conftest.er1 >conftest.err
15596 cat conftest.err >&5
15597 echo "$as_me:15597: \$? = $ac_status" >&5
15598 (exit "$ac_status"); } >/dev/null; then
15599 if test -s conftest.err; then
15600 ac_cpp_err=$ac_c_preproc_warn_flag
15607 if test -z "$ac_cpp_err"; then
15608 ac_cv_header_pthread_h=yes
15610 echo "$as_me: failed program was:" >&5
15611 cat "conftest.$ac_ext" >&5
15612 ac_cv_header_pthread_h=no
15614 rm -f conftest.err "conftest.$ac_ext"
15616 echo "$as_me:15616: result: $ac_cv_header_pthread_h" >&5
15617 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15618 if test "$ac_cv_header_pthread_h" = yes; then
15620 cat >>confdefs.h <<\EOF
15621 #define HAVE_PTHREADS_H 1
15624 for cf_lib_pthread in pthread c_r
15626 echo "$as_me:15626: checking if we can link with the $cf_lib_pthread library" >&5
15627 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15628 cf_save_LIBS="$LIBS"
15630 cf_add_libs="$LIBS"
15633 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15634 # filter duplicates
15635 for cf_add_1lib in $cf_add_0lib; do
15636 for cf_add_2lib in $cf_add_libs; do
15637 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15642 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15644 LIBS="$cf_add_libs"
15646 cat >"conftest.$ac_ext" <<_ACEOF
15647 #line 15647 "configure"
15648 #include "confdefs.h"
15650 #include <pthread.h>
15656 int rc = pthread_create(0,0,0,0);
15657 int r2 = pthread_mutexattr_settype(0, 0);
15663 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15664 if { (eval echo "$as_me:15664: \"$ac_link\"") >&5
15665 (eval $ac_link) 2>&5
15667 echo "$as_me:15667: \$? = $ac_status" >&5
15668 (exit "$ac_status"); } &&
15669 { ac_try='test -s "conftest$ac_exeext"'
15670 { (eval echo "$as_me:15670: \"$ac_try\"") >&5
15671 (eval $ac_try) 2>&5
15673 echo "$as_me:15673: \$? = $ac_status" >&5
15674 (exit "$ac_status"); }; }; then
15677 echo "$as_me: failed program was:" >&5
15678 cat "conftest.$ac_ext" >&5
15681 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15682 LIBS="$cf_save_LIBS"
15683 echo "$as_me:15683: result: $with_pthread" >&5
15684 echo "${ECHO_T}$with_pthread" >&6
15685 test "$with_pthread" = yes && break
15688 if test "$with_pthread" = yes ; then
15690 cf_add_libs="$LIBS"
15693 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15694 # filter duplicates
15695 for cf_add_1lib in $cf_add_0lib; do
15696 for cf_add_2lib in $cf_add_libs; do
15697 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15702 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15704 LIBS="$cf_add_libs"
15706 cat >>confdefs.h <<\EOF
15707 #define HAVE_LIBPTHREADS 1
15711 { { echo "$as_me:15711: error: Cannot link with pthread library" >&5
15712 echo "$as_me: error: Cannot link with pthread library" >&2;}
15713 { (exit 1); exit 1; }; }
15720 echo "$as_me:15720: checking if you want to use weak-symbols for pthreads" >&5
15721 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15723 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15724 if test "${enable_weak_symbols+set}" = set; then
15725 enableval="$enable_weak_symbols"
15726 use_weak_symbols=$withval
15728 use_weak_symbols=no
15730 echo "$as_me:15730: result: $use_weak_symbols" >&5
15731 echo "${ECHO_T}$use_weak_symbols" >&6
15732 if test "$use_weak_symbols" = yes ; then
15734 echo "$as_me:15734: checking if $CC supports weak symbols" >&5
15735 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15736 if test "${cf_cv_weak_symbols+set}" = set; then
15737 echo $ECHO_N "(cached) $ECHO_C" >&6
15740 cat >"conftest.$ac_ext" <<_ACEOF
15741 #line 15741 "configure"
15742 #include "confdefs.h"
15749 #if defined(__GNUC__)
15750 # if defined __USE_ISOC99
15751 # define _cat_pragma(exp) _Pragma(#exp)
15752 # define _weak_pragma(exp) _cat_pragma(weak name)
15754 # define _weak_pragma(exp)
15756 # define _declare(name) __extension__ extern __typeof__(name) name
15757 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
15760 weak_symbol(fopen);
15766 rm -f "conftest.$ac_objext"
15767 if { (eval echo "$as_me:15767: \"$ac_compile\"") >&5
15768 (eval $ac_compile) 2>&5
15770 echo "$as_me:15770: \$? = $ac_status" >&5
15771 (exit "$ac_status"); } &&
15772 { ac_try='test -s "conftest.$ac_objext"'
15773 { (eval echo "$as_me:15773: \"$ac_try\"") >&5
15774 (eval $ac_try) 2>&5
15776 echo "$as_me:15776: \$? = $ac_status" >&5
15777 (exit "$ac_status"); }; }; then
15778 cf_cv_weak_symbols=yes
15780 echo "$as_me: failed program was:" >&5
15781 cat "conftest.$ac_ext" >&5
15782 cf_cv_weak_symbols=no
15784 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15787 echo "$as_me:15787: result: $cf_cv_weak_symbols" >&5
15788 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15791 cf_cv_weak_symbols=no
15794 if test $cf_cv_weak_symbols = yes ; then
15796 cat >>confdefs.h <<\EOF
15797 #define USE_WEAK_SYMBOLS 1
15803 if test "$with_pthread" = "yes" ; then
15805 cat >>confdefs.h <<\EOF
15806 #define USE_PTHREADS 1
15809 enable_reentrant=yes
15810 if test $cf_cv_weak_symbols = yes ; then
15815 # OpenSUSE is installing ncurses6, using reentrant option.
15816 echo "$as_me:15816: checking for _nc_TABSIZE" >&5
15817 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
15818 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
15819 echo $ECHO_N "(cached) $ECHO_C" >&6
15821 cat >"conftest.$ac_ext" <<_ACEOF
15822 #line 15822 "configure"
15823 #include "confdefs.h"
15824 #define _nc_TABSIZE autoconf_temporary
15825 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15832 /* We use char because int might match the return type of a gcc2
15833 builtin and then its argument prototype would still apply. */
15834 char _nc_TABSIZE (void);
15840 /* The GNU C library defines stubs for functions which it implements
15841 to always fail with ENOSYS. Some functions are actually named
15842 something starting with __ and the normal name is an alias. */
15843 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
15844 #error found stub for _nc_TABSIZE
15847 return _nc_TABSIZE ();
15852 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15853 if { (eval echo "$as_me:15853: \"$ac_link\"") >&5
15854 (eval $ac_link) 2>&5
15856 echo "$as_me:15856: \$? = $ac_status" >&5
15857 (exit "$ac_status"); } &&
15858 { ac_try='test -s "conftest$ac_exeext"'
15859 { (eval echo "$as_me:15859: \"$ac_try\"") >&5
15860 (eval $ac_try) 2>&5
15862 echo "$as_me:15862: \$? = $ac_status" >&5
15863 (exit "$ac_status"); }; }; then
15864 ac_cv_func__nc_TABSIZE=yes
15866 echo "$as_me: failed program was:" >&5
15867 cat "conftest.$ac_ext" >&5
15868 ac_cv_func__nc_TABSIZE=no
15870 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15872 echo "$as_me:15872: result: $ac_cv_func__nc_TABSIZE" >&5
15873 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
15874 if test "$ac_cv_func__nc_TABSIZE" = yes; then
15875 assume_reentrant=yes
15877 assume_reentrant=no
15880 # Reentrant code has to be opaque; there's little advantage to making ncurses
15881 # opaque outside of that, so there is no --enable-opaque option. We can use
15882 # this option without --with-pthreads, but this will be always set for
15884 echo "$as_me:15884: checking if you want experimental reentrant code" >&5
15885 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
15887 # Check whether --enable-reentrant or --disable-reentrant was given.
15888 if test "${enable_reentrant+set}" = set; then
15889 enableval="$enable_reentrant"
15890 with_reentrant=$enableval
15892 with_reentrant=$assume_reentrant
15894 echo "$as_me:15894: result: $with_reentrant" >&5
15895 echo "${ECHO_T}$with_reentrant" >&6
15896 if test "$with_reentrant" = yes ; then
15897 cf_cv_enable_reentrant=1
15898 if test $cf_cv_weak_symbols = yes ; then
15900 # remove pthread library from $LIBS
15901 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
15903 elif test "$assume_reentrant" = no ; then
15904 LIB_SUFFIX="t${LIB_SUFFIX}"
15907 cat >>confdefs.h <<\EOF
15908 #define USE_REENTRANT 1
15912 cf_cv_enable_reentrant=0
15915 ### Allow using a different wrap-prefix
15916 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15917 echo "$as_me:15917: checking for prefix used to wrap public variables" >&5
15918 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15920 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15921 if test "${with_wrap_prefix+set}" = set; then
15922 withval="$with_wrap_prefix"
15923 NCURSES_WRAP_PREFIX=$withval
15925 NCURSES_WRAP_PREFIX=_nc_
15927 echo "$as_me:15927: result: $NCURSES_WRAP_PREFIX" >&5
15928 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15930 NCURSES_WRAP_PREFIX=_nc_
15933 cat >>confdefs.h <<EOF
15934 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15937 ###############################################################################
15939 ### use option --disable-echo to suppress full display compiling commands
15941 echo "$as_me:15941: checking if you want to see long compiling messages" >&5
15942 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15944 # Check whether --enable-echo or --disable-echo was given.
15945 if test "${enable_echo+set}" = set; then
15946 enableval="$enable_echo"
15947 test "$enableval" != no && enableval=yes
15948 if test "$enableval" != "yes" ; then
15951 ECHO_LD='@echo linking $@;'
15952 RULE_CC='@echo compiling $<'
15953 SHOW_CC='@echo compiling $@'
15975 echo "$as_me:15975: result: $enableval" >&5
15976 echo "${ECHO_T}$enableval" >&6
15978 echo "$as_me:15978: checking if you want to use C11 _Noreturn feature" >&5
15979 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
15981 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
15982 if test "${enable_stdnoreturn+set}" = set; then
15983 enableval="$enable_stdnoreturn"
15984 test "$enableval" != yes && enableval=no
15985 if test "$enableval" != "no" ; then
15986 enable_stdnoreturn=yes
15988 enable_stdnoreturn=no
15992 enable_stdnoreturn=no
15995 echo "$as_me:15995: result: $enable_stdnoreturn" >&5
15996 echo "${ECHO_T}$enable_stdnoreturn" >&6
15998 if test $enable_stdnoreturn = yes; then
15999 echo "$as_me:15999: checking for C11 _Noreturn feature" >&5
16000 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
16001 if test "${cf_cv_c11_noreturn+set}" = set; then
16002 echo $ECHO_N "(cached) $ECHO_C" >&6
16004 cat >"conftest.$ac_ext" <<_ACEOF
16005 #line 16005 "configure"
16006 #include "confdefs.h"
16008 $ac_includes_default
16009 #include <stdnoreturn.h>
16010 static _Noreturn void giveup(void) { exit(0); }
16015 if (feof(stdin)) giveup()
16020 rm -f "conftest.$ac_objext"
16021 if { (eval echo "$as_me:16021: \"$ac_compile\"") >&5
16022 (eval $ac_compile) 2>&5
16024 echo "$as_me:16024: \$? = $ac_status" >&5
16025 (exit "$ac_status"); } &&
16026 { ac_try='test -s "conftest.$ac_objext"'
16027 { (eval echo "$as_me:16027: \"$ac_try\"") >&5
16028 (eval $ac_try) 2>&5
16030 echo "$as_me:16030: \$? = $ac_status" >&5
16031 (exit "$ac_status"); }; }; then
16032 cf_cv_c11_noreturn=yes
16034 echo "$as_me: failed program was:" >&5
16035 cat "conftest.$ac_ext" >&5
16036 cf_cv_c11_noreturn=no
16038 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16041 echo "$as_me:16041: result: $cf_cv_c11_noreturn" >&5
16042 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
16044 cf_cv_c11_noreturn=no,
16047 if test "$cf_cv_c11_noreturn" = yes; then
16049 cat >>confdefs.h <<\EOF
16050 #define HAVE_STDNORETURN_H 1
16053 cat >>confdefs.h <<EOF
16054 #define STDC_NORETURN _Noreturn
16057 HAVE_STDNORETURN_H=1
16059 HAVE_STDNORETURN_H=0
16062 if test "$GCC" = yes || test "$GXX" = yes
16065 if test "$GCC" = yes || test "$GXX" = yes
16070 for cf_temp_scan in $CFLAGS
16072 case "x$cf_temp_scan" in
16075 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16076 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16081 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16082 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16087 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16088 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16093 if test "x$CFLAGS" != "x$cf_temp_flags"
16095 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
16097 echo "${as_me:-configure}:16097: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16099 CFLAGS="$cf_temp_flags"
16100 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
16102 echo "${as_me:-configure}:16102: testing ... fixed $CFLAGS ..." 1>&5
16104 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
16106 echo "${as_me:-configure}:16106: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16113 if test "$GCC" = yes || test "$GXX" = yes
16118 for cf_temp_scan in $CPPFLAGS
16120 case "x$cf_temp_scan" in
16123 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16124 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16129 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16130 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16135 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16136 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16141 if test "x$CPPFLAGS" != "x$cf_temp_flags"
16143 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
16145 echo "${as_me:-configure}:16145: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16147 CPPFLAGS="$cf_temp_flags"
16148 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
16150 echo "${as_me:-configure}:16150: testing ... fixed $CPPFLAGS ..." 1>&5
16152 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
16154 echo "${as_me:-configure}:16154: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16161 if test "$GCC" = yes || test "$GXX" = yes
16166 for cf_temp_scan in $LDFLAGS
16168 case "x$cf_temp_scan" in
16171 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16172 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16177 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16178 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16183 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16184 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16189 if test "x$LDFLAGS" != "x$cf_temp_flags"
16191 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
16193 echo "${as_me:-configure}:16193: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16195 LDFLAGS="$cf_temp_flags"
16196 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
16198 echo "${as_me:-configure}:16198: testing ... fixed $LDFLAGS ..." 1>&5
16200 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
16202 echo "${as_me:-configure}:16202: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16209 echo "$as_me:16209: checking if you want to turn on gcc warnings" >&5
16210 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16212 # Check whether --enable-warnings or --disable-warnings was given.
16213 if test "${enable_warnings+set}" = set; then
16214 enableval="$enable_warnings"
16215 test "$enableval" != yes && enableval=no
16216 if test "$enableval" != "no" ; then
16217 enable_warnings=yes
16226 echo "$as_me:16226: result: $enable_warnings" >&5
16227 echo "${ECHO_T}$enable_warnings" >&6
16228 if test "$enable_warnings" = "yes"
16231 if test "x$have_x" = xyes; then
16233 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16234 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16235 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16236 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16237 for cf_X_CFLAGS in $X_CFLAGS
16239 case "x$cf_X_CFLAGS" in
16241 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16244 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16249 cat >"conftest.$ac_ext" <<_ACEOF
16250 #line 16250 "configure"
16251 #include "confdefs.h"
16253 #include <stdlib.h>
16254 #include <X11/Intrinsic.h>
16259 String foo = malloc(1); free((void*)foo)
16264 rm -f "conftest.$ac_objext"
16265 if { (eval echo "$as_me:16265: \"$ac_compile\"") >&5
16266 (eval $ac_compile) 2>&5
16268 echo "$as_me:16268: \$? = $ac_status" >&5
16269 (exit "$ac_status"); } &&
16270 { ac_try='test -s "conftest.$ac_objext"'
16271 { (eval echo "$as_me:16271: \"$ac_try\"") >&5
16272 (eval $ac_try) 2>&5
16274 echo "$as_me:16274: \$? = $ac_status" >&5
16275 (exit "$ac_status"); }; }; then
16277 echo "$as_me:16277: checking for X11/Xt const-feature" >&5
16278 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16279 if test "${cf_cv_const_x_string+set}" = set; then
16280 echo $ECHO_N "(cached) $ECHO_C" >&6
16283 cat >"conftest.$ac_ext" <<_ACEOF
16284 #line 16284 "configure"
16285 #include "confdefs.h"
16287 #undef _CONST_X_STRING
16288 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16289 #undef XTSTRINGDEFINES /* X11R5 and later */
16290 #include <stdlib.h>
16291 #include <X11/Intrinsic.h>
16296 String foo = malloc(1); *foo = 0
16301 rm -f "conftest.$ac_objext"
16302 if { (eval echo "$as_me:16302: \"$ac_compile\"") >&5
16303 (eval $ac_compile) 2>&5
16305 echo "$as_me:16305: \$? = $ac_status" >&5
16306 (exit "$ac_status"); } &&
16307 { ac_try='test -s "conftest.$ac_objext"'
16308 { (eval echo "$as_me:16308: \"$ac_try\"") >&5
16309 (eval $ac_try) 2>&5
16311 echo "$as_me:16311: \$? = $ac_status" >&5
16312 (exit "$ac_status"); }; }; then
16314 cf_cv_const_x_string=no
16317 echo "$as_me: failed program was:" >&5
16318 cat "conftest.$ac_ext" >&5
16320 cf_cv_const_x_string=yes
16323 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16326 echo "$as_me:16326: result: $cf_cv_const_x_string" >&5
16327 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16329 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16330 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16331 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16333 case "$cf_cv_const_x_string" in
16336 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16337 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16342 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16343 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16349 echo "$as_me: failed program was:" >&5
16350 cat "conftest.$ac_ext" >&5
16352 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16354 cat > "conftest.$ac_ext" <<EOF
16355 #line 16355 "${as_me:-configure}"
16356 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16358 if test "$INTEL_COMPILER" = yes
16360 # The "-wdXXX" options suppress warnings:
16361 # remark #1419: external declaration in primary source file
16362 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16363 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16364 # remark #193: zero used for undefined preprocessing identifier
16365 # remark #593: variable "curs_sb_left_arrow" was set but never used
16366 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16367 # remark #869: parameter "tw" was never referenced
16368 # remark #981: operands are evaluated in unspecified order
16369 # warning #279: controlling expression is constant
16371 { echo "$as_me:16371: checking for $CC warning options..." >&5
16372 echo "$as_me: checking for $CC warning options..." >&6;}
16373 cf_save_CFLAGS="$CFLAGS"
16374 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
16386 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16387 if { (eval echo "$as_me:16387: \"$ac_compile\"") >&5
16388 (eval $ac_compile) 2>&5
16390 echo "$as_me:16390: \$? = $ac_status" >&5
16391 (exit "$ac_status"); }; then
16392 test -n "$verbose" && echo "$as_me:16392: result: ... -$cf_opt" >&5
16393 echo "${ECHO_T}... -$cf_opt" >&6
16394 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16397 CFLAGS="$cf_save_CFLAGS"
16398 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16400 { echo "$as_me:16400: checking for $CC warning options..." >&5
16401 echo "$as_me: checking for $CC warning options..." >&6;}
16402 cf_save_CFLAGS="$CFLAGS"
16404 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16405 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16406 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16407 for cf_opt in W Wall \
16408 Wbad-function-cast \
16411 Wdeclaration-after-statement \
16414 Wmissing-declarations \
16415 Wmissing-prototypes \
16419 Wstrict-prototypes \
16420 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16422 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16423 if { (eval echo "$as_me:16423: \"$ac_compile\"") >&5
16424 (eval $ac_compile) 2>&5
16426 echo "$as_me:16426: \$? = $ac_status" >&5
16427 (exit "$ac_status"); }; then
16428 test -n "$verbose" && echo "$as_me:16428: result: ... -$cf_opt" >&5
16429 echo "${ECHO_T}... -$cf_opt" >&6
16432 case "$GCC_VERSION" in
16434 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
16436 echo "${as_me:-configure}:16436: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16442 case "$GCC_VERSION" in
16444 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
16446 echo "${as_me:-configure}:16446: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16452 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16455 CFLAGS="$cf_save_CFLAGS"
16461 if test "$GCC" = yes || test "$GXX" = yes
16463 cat > conftest.i <<EOF
16465 #define GCC_PRINTF 0
16468 #define GCC_SCANF 0
16470 #ifndef GCC_NORETURN
16471 #define GCC_NORETURN /* nothing */
16474 #define GCC_UNUSED /* nothing */
16477 if test "$GCC" = yes
16479 { echo "$as_me:16479: checking for $CC __attribute__ directives..." >&5
16480 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16481 cat > "conftest.$ac_ext" <<EOF
16482 #line 16482 "${as_me:-configure}"
16484 #include "confdefs.h"
16485 #include "conftest.h"
16486 #include "conftest.i"
16488 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16490 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16493 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
16495 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
16497 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16498 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
16499 extern GCC_NORETURN void foo(void);
16500 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
16502 cf_printf_attribute=no
16503 cf_scanf_attribute=no
16504 for cf_attribute in scanf printf unused noreturn
16507 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16509 cf_directive="__attribute__(($cf_attribute))"
16510 echo "checking for $CC $cf_directive" 1>&5
16512 case "$cf_attribute" in
16514 cf_printf_attribute=yes
16515 cat >conftest.h <<EOF
16516 #define GCC_$cf_ATTRIBUTE 1
16520 cf_scanf_attribute=yes
16521 cat >conftest.h <<EOF
16522 #define GCC_$cf_ATTRIBUTE 1
16526 cat >conftest.h <<EOF
16527 #define GCC_$cf_ATTRIBUTE $cf_directive
16532 if { (eval echo "$as_me:16532: \"$ac_compile\"") >&5
16533 (eval $ac_compile) 2>&5
16535 echo "$as_me:16535: \$? = $ac_status" >&5
16536 (exit "$ac_status"); }; then
16537 test -n "$verbose" && echo "$as_me:16537: result: ... $cf_attribute" >&5
16538 echo "${ECHO_T}... $cf_attribute" >&6
16539 cat conftest.h >>confdefs.h
16540 case "$cf_attribute" in
16543 cat >>confdefs.h <<EOF
16544 #define GCC_NORETURN $cf_directive
16549 cf_value='/* nothing */'
16550 if test "$cf_printf_attribute" != no ; then
16551 cf_value='__attribute__((format(printf,fmt,var)))'
16553 cat >>confdefs.h <<\EOF
16554 #define GCC_PRINTF 1
16559 cat >>confdefs.h <<EOF
16560 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16565 cf_value='/* nothing */'
16566 if test "$cf_scanf_attribute" != no ; then
16567 cf_value='__attribute__((format(scanf,fmt,var)))'
16569 cat >>confdefs.h <<\EOF
16570 #define GCC_SCANF 1
16575 cat >>confdefs.h <<EOF
16576 #define GCC_SCANFLIKE(fmt,var) $cf_value
16582 cat >>confdefs.h <<EOF
16583 #define GCC_UNUSED $cf_directive
16591 ${FGREP-fgrep} define conftest.i >>confdefs.h
16598 if test "x$enable_warnings" = "xyes"; then
16600 ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
16604 ### use option --enable-assertions to turn on generation of assertion code
16605 echo "$as_me:16605: checking if you want to enable runtime assertions" >&5
16606 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
16608 # Check whether --enable-assertions or --disable-assertions was given.
16609 if test "${enable_assertions+set}" = set; then
16610 enableval="$enable_assertions"
16611 with_assertions=$enableval
16615 echo "$as_me:16615: result: $with_assertions" >&5
16616 echo "${ECHO_T}$with_assertions" >&6
16619 if test "$with_assertions" = no
16621 CPPFLAGS="$CPPFLAGS -DNDEBUG"
16624 ADAFLAGS="$ADAFLAGS -gnata"
16629 ### use option --disable-leaks to suppress "permanent" leaks, for testing
16631 cat >>confdefs.h <<\EOF
16632 #define HAVE_NC_ALLOC_H 1
16635 ### use option --enable-expanded to generate certain macros as functions
16637 # Check whether --enable-expanded or --disable-expanded was given.
16638 if test "${enable_expanded+set}" = set; then
16639 enableval="$enable_expanded"
16640 test "$enableval" = yes &&
16641 cat >>confdefs.h <<\EOF
16642 #define NCURSES_EXPANDED 1
16647 ### use option --disable-macros to suppress macros in favor of functions
16649 # Check whether --enable-macros or --disable-macros was given.
16650 if test "${enable_macros+set}" = set; then
16651 enableval="$enable_macros"
16652 test "$enableval" = no &&
16653 cat >>confdefs.h <<\EOF
16654 #define NCURSES_NOMACROS 1
16659 # Normally we only add trace() to the debug-library. Allow this to be
16660 # extended to all models of the ncurses library:
16662 case "$CFLAGS $CPPFLAGS" in
16668 echo "$as_me:16668: checking whether to add trace feature to all models" >&5
16669 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
16671 # Check whether --with-trace or --without-trace was given.
16672 if test "${with_trace+set}" = set; then
16673 withval="$with_trace"
16674 cf_with_trace=$withval
16676 cf_with_trace=$cf_all_traces
16678 echo "$as_me:16678: result: $cf_with_trace" >&5
16679 echo "${ECHO_T}$cf_with_trace" >&6
16681 if test "$cf_with_trace" = yes ; then
16684 cat >>confdefs.h <<\EOF
16692 echo "$as_me:16692: checking if we want to use GNAT projects" >&5
16693 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
16695 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
16696 if test "${enable_gnat_projects+set}" = set; then
16697 enableval="$enable_gnat_projects"
16698 test "$enableval" != no && enableval=yes
16699 if test "$enableval" != "yes" ; then
16700 enable_gnat_projects=no
16702 enable_gnat_projects=yes
16706 enable_gnat_projects=yes
16709 echo "$as_me:16709: result: $enable_gnat_projects" >&5
16710 echo "${ECHO_T}$enable_gnat_projects" >&6
16712 ### Checks for libraries.
16713 case $cf_cv_system_name in
16716 echo "$as_me:16716: checking if ssp library is needed" >&5
16717 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
16718 if test "${cf_cv_need_libssp+set}" = set; then
16719 echo $ECHO_N "(cached) $ECHO_C" >&6
16722 cat >"conftest.$ac_ext" <<_ACEOF
16723 #line 16723 "configure"
16724 #include "confdefs.h"
16726 #include <sys/types.h>
16727 #include <dirent.h>
16733 DIR *dp = opendir(".");
16739 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16740 if { (eval echo "$as_me:16740: \"$ac_link\"") >&5
16741 (eval $ac_link) 2>&5
16743 echo "$as_me:16743: \$? = $ac_status" >&5
16744 (exit "$ac_status"); } &&
16745 { ac_try='test -s "conftest$ac_exeext"'
16746 { (eval echo "$as_me:16746: \"$ac_try\"") >&5
16747 (eval $ac_try) 2>&5
16749 echo "$as_me:16749: \$? = $ac_status" >&5
16750 (exit "$ac_status"); }; }; then
16751 cf_cv_need_libssp=no
16753 echo "$as_me: failed program was:" >&5
16754 cat "conftest.$ac_ext" >&5
16756 cf_save_LIBS="$LIBS"
16758 cat >"conftest.$ac_ext" <<_ACEOF
16759 #line 16759 "configure"
16760 #include "confdefs.h"
16762 #include <sys/types.h>
16763 #include <dirent.h>
16769 DIR *dp = opendir(".");
16775 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16776 if { (eval echo "$as_me:16776: \"$ac_link\"") >&5
16777 (eval $ac_link) 2>&5
16779 echo "$as_me:16779: \$? = $ac_status" >&5
16780 (exit "$ac_status"); } &&
16781 { ac_try='test -s "conftest$ac_exeext"'
16782 { (eval echo "$as_me:16782: \"$ac_try\"") >&5
16783 (eval $ac_try) 2>&5
16785 echo "$as_me:16785: \$? = $ac_status" >&5
16786 (exit "$ac_status"); }; }; then
16787 cf_cv_need_libssp=yes
16789 echo "$as_me: failed program was:" >&5
16790 cat "conftest.$ac_ext" >&5
16791 cf_cv_need_libssp=maybe
16793 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16794 LIBS="$cf_save_LIBS"
16797 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16799 echo "$as_me:16799: result: $cf_cv_need_libssp" >&5
16800 echo "${ECHO_T}$cf_cv_need_libssp" >&6
16802 if test "x$cf_cv_need_libssp" = xyes
16805 cf_add_libs="$LIBS"
16808 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16809 # filter duplicates
16810 for cf_add_1lib in $cf_add_0lib; do
16811 for cf_add_2lib in $cf_add_libs; do
16812 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16817 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16819 LIBS="$cf_add_libs"
16826 cf_save_libs="$LIBS"
16827 echo "$as_me:16827: checking for clock_gettime" >&5
16828 echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6
16829 if test "${ac_cv_func_clock_gettime+set}" = set; then
16830 echo $ECHO_N "(cached) $ECHO_C" >&6
16832 cat >"conftest.$ac_ext" <<_ACEOF
16833 #line 16833 "configure"
16834 #include "confdefs.h"
16835 #define clock_gettime autoconf_temporary
16836 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16837 #undef clock_gettime
16843 /* We use char because int might match the return type of a gcc2
16844 builtin and then its argument prototype would still apply. */
16845 char clock_gettime (void);
16851 /* The GNU C library defines stubs for functions which it implements
16852 to always fail with ENOSYS. Some functions are actually named
16853 something starting with __ and the normal name is an alias. */
16854 #if defined (__stub_clock_gettime) || defined (__stub___clock_gettime)
16855 #error found stub for clock_gettime
16858 return clock_gettime ();
16863 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16864 if { (eval echo "$as_me:16864: \"$ac_link\"") >&5
16865 (eval $ac_link) 2>&5
16867 echo "$as_me:16867: \$? = $ac_status" >&5
16868 (exit "$ac_status"); } &&
16869 { ac_try='test -s "conftest$ac_exeext"'
16870 { (eval echo "$as_me:16870: \"$ac_try\"") >&5
16871 (eval $ac_try) 2>&5
16873 echo "$as_me:16873: \$? = $ac_status" >&5
16874 (exit "$ac_status"); }; }; then
16875 ac_cv_func_clock_gettime=yes
16877 echo "$as_me: failed program was:" >&5
16878 cat "conftest.$ac_ext" >&5
16879 ac_cv_func_clock_gettime=no
16881 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16883 echo "$as_me:16883: result: $ac_cv_func_clock_gettime" >&5
16884 echo "${ECHO_T}$ac_cv_func_clock_gettime" >&6
16885 if test "$ac_cv_func_clock_gettime" = yes; then
16886 cf_cv_test_clock_gettime=yes
16888 echo "$as_me:16888: checking for clock_gettime in -lrt" >&5
16889 echo $ECHO_N "checking for clock_gettime in -lrt... $ECHO_C" >&6
16890 if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then
16891 echo $ECHO_N "(cached) $ECHO_C" >&6
16893 ac_check_lib_save_LIBS=$LIBS
16895 cat >"conftest.$ac_ext" <<_ACEOF
16896 #line 16896 "configure"
16897 #include "confdefs.h"
16899 /* Override any gcc2 internal prototype to avoid an error. */
16903 /* We use char because int might match the return type of a gcc2
16904 builtin and then its argument prototype would still apply. */
16905 char clock_gettime (void);
16914 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16915 if { (eval echo "$as_me:16915: \"$ac_link\"") >&5
16916 (eval $ac_link) 2>&5
16918 echo "$as_me:16918: \$? = $ac_status" >&5
16919 (exit "$ac_status"); } &&
16920 { ac_try='test -s "conftest$ac_exeext"'
16921 { (eval echo "$as_me:16921: \"$ac_try\"") >&5
16922 (eval $ac_try) 2>&5
16924 echo "$as_me:16924: \$? = $ac_status" >&5
16925 (exit "$ac_status"); }; }; then
16926 ac_cv_lib_rt_clock_gettime=yes
16928 echo "$as_me: failed program was:" >&5
16929 cat "conftest.$ac_ext" >&5
16930 ac_cv_lib_rt_clock_gettime=no
16932 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16933 LIBS=$ac_check_lib_save_LIBS
16935 echo "$as_me:16935: result: $ac_cv_lib_rt_clock_gettime" >&5
16936 echo "${ECHO_T}$ac_cv_lib_rt_clock_gettime" >&6
16937 if test "$ac_cv_lib_rt_clock_gettime" = yes; then
16939 cf_cv_test_clock_gettime=yes
16941 cf_cv_test_clock_gettime=no
16946 if test "$cf_cv_test_clock_gettime" = yes ; then
16947 echo "$as_me:16947: checking if clock_gettime links" >&5
16948 echo $ECHO_N "checking if clock_gettime links... $ECHO_C" >&6
16949 if test "${cf_cv_func_clock_gettime+set}" = set; then
16950 echo $ECHO_N "(cached) $ECHO_C" >&6
16953 cat >"conftest.$ac_ext" <<_ACEOF
16954 #line 16954 "configure"
16955 #include "confdefs.h"
16957 $ac_includes_default
16963 struct timespec ts;
16964 int rc = clock_gettime(CLOCK_REALTIME, &ts)
16965 + clock_gettime(CLOCK_MONOTONIC, &ts);
16966 (void) rc; (void)ts
16971 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16972 if { (eval echo "$as_me:16972: \"$ac_link\"") >&5
16973 (eval $ac_link) 2>&5
16975 echo "$as_me:16975: \$? = $ac_status" >&5
16976 (exit "$ac_status"); } &&
16977 { ac_try='test -s "conftest$ac_exeext"'
16978 { (eval echo "$as_me:16978: \"$ac_try\"") >&5
16979 (eval $ac_try) 2>&5
16981 echo "$as_me:16981: \$? = $ac_status" >&5
16982 (exit "$ac_status"); }; }; then
16983 cf_cv_func_clock_gettime=yes
16985 echo "$as_me: failed program was:" >&5
16986 cat "conftest.$ac_ext" >&5
16987 cf_cv_func_clock_gettime=no
16989 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16992 echo "$as_me:16992: result: $cf_cv_func_clock_gettime" >&5
16993 echo "${ECHO_T}$cf_cv_func_clock_gettime" >&6
16995 cf_cv_func_clock_gettime=no
16998 if test "$cf_cv_func_clock_gettime" = yes
17001 cat >>confdefs.h <<\EOF
17002 #define HAVE_CLOCK_GETTIME 1
17006 echo "$as_me:17006: checking for gettimeofday" >&5
17007 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
17008 if test "${ac_cv_func_gettimeofday+set}" = set; then
17009 echo $ECHO_N "(cached) $ECHO_C" >&6
17011 cat >"conftest.$ac_ext" <<_ACEOF
17012 #line 17012 "configure"
17013 #include "confdefs.h"
17014 #define gettimeofday autoconf_temporary
17015 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17016 #undef gettimeofday
17022 /* We use char because int might match the return type of a gcc2
17023 builtin and then its argument prototype would still apply. */
17024 char gettimeofday (void);
17030 /* The GNU C library defines stubs for functions which it implements
17031 to always fail with ENOSYS. Some functions are actually named
17032 something starting with __ and the normal name is an alias. */
17033 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
17034 #error found stub for gettimeofday
17037 return gettimeofday ();
17042 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17043 if { (eval echo "$as_me:17043: \"$ac_link\"") >&5
17044 (eval $ac_link) 2>&5
17046 echo "$as_me:17046: \$? = $ac_status" >&5
17047 (exit "$ac_status"); } &&
17048 { ac_try='test -s "conftest$ac_exeext"'
17049 { (eval echo "$as_me:17049: \"$ac_try\"") >&5
17050 (eval $ac_try) 2>&5
17052 echo "$as_me:17052: \$? = $ac_status" >&5
17053 (exit "$ac_status"); }; }; then
17054 ac_cv_func_gettimeofday=yes
17056 echo "$as_me: failed program was:" >&5
17057 cat "conftest.$ac_ext" >&5
17058 ac_cv_func_gettimeofday=no
17060 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17062 echo "$as_me:17062: result: $ac_cv_func_gettimeofday" >&5
17063 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
17064 if test "$ac_cv_func_gettimeofday" = yes; then
17066 cat >>confdefs.h <<\EOF
17067 #define HAVE_GETTIMEOFDAY 1
17072 echo "$as_me:17072: checking for gettimeofday in -lbsd" >&5
17073 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
17074 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
17075 echo $ECHO_N "(cached) $ECHO_C" >&6
17077 ac_check_lib_save_LIBS=$LIBS
17079 cat >"conftest.$ac_ext" <<_ACEOF
17080 #line 17080 "configure"
17081 #include "confdefs.h"
17083 /* Override any gcc2 internal prototype to avoid an error. */
17087 /* We use char because int might match the return type of a gcc2
17088 builtin and then its argument prototype would still apply. */
17089 char gettimeofday (void);
17098 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17099 if { (eval echo "$as_me:17099: \"$ac_link\"") >&5
17100 (eval $ac_link) 2>&5
17102 echo "$as_me:17102: \$? = $ac_status" >&5
17103 (exit "$ac_status"); } &&
17104 { ac_try='test -s "conftest$ac_exeext"'
17105 { (eval echo "$as_me:17105: \"$ac_try\"") >&5
17106 (eval $ac_try) 2>&5
17108 echo "$as_me:17108: \$? = $ac_status" >&5
17109 (exit "$ac_status"); }; }; then
17110 ac_cv_lib_bsd_gettimeofday=yes
17112 echo "$as_me: failed program was:" >&5
17113 cat "conftest.$ac_ext" >&5
17114 ac_cv_lib_bsd_gettimeofday=no
17116 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17117 LIBS=$ac_check_lib_save_LIBS
17119 echo "$as_me:17119: result: $ac_cv_lib_bsd_gettimeofday" >&5
17120 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
17121 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
17123 cat >>confdefs.h <<\EOF
17124 #define HAVE_GETTIMEOFDAY 1
17127 cf_add_libs="$LIBS"
17130 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17131 # filter duplicates
17132 for cf_add_1lib in $cf_add_0lib; do
17133 for cf_add_2lib in $cf_add_libs; do
17134 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17139 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17141 LIBS="$cf_add_libs"
17151 ### Checks for header files.
17152 echo "$as_me:17152: checking for signed char" >&5
17153 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
17154 if test "${ac_cv_type_signed_char+set}" = set; then
17155 echo $ECHO_N "(cached) $ECHO_C" >&6
17157 cat >"conftest.$ac_ext" <<_ACEOF
17158 #line 17158 "configure"
17159 #include "confdefs.h"
17160 $ac_includes_default
17164 if ((signed char *) 0)
17166 if (sizeof (signed char))
17172 rm -f "conftest.$ac_objext"
17173 if { (eval echo "$as_me:17173: \"$ac_compile\"") >&5
17174 (eval $ac_compile) 2>&5
17176 echo "$as_me:17176: \$? = $ac_status" >&5
17177 (exit "$ac_status"); } &&
17178 { ac_try='test -s "conftest.$ac_objext"'
17179 { (eval echo "$as_me:17179: \"$ac_try\"") >&5
17180 (eval $ac_try) 2>&5
17182 echo "$as_me:17182: \$? = $ac_status" >&5
17183 (exit "$ac_status"); }; }; then
17184 ac_cv_type_signed_char=yes
17186 echo "$as_me: failed program was:" >&5
17187 cat "conftest.$ac_ext" >&5
17188 ac_cv_type_signed_char=no
17190 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17192 echo "$as_me:17192: result: $ac_cv_type_signed_char" >&5
17193 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
17195 echo "$as_me:17195: checking size of signed char" >&5
17196 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
17197 if test "${ac_cv_sizeof_signed_char+set}" = set; then
17198 echo $ECHO_N "(cached) $ECHO_C" >&6
17200 if test "$ac_cv_type_signed_char" = yes; then
17201 if test "$cross_compiling" = yes; then
17202 # Depending upon the size, compute the lo and hi bounds.
17203 cat >"conftest.$ac_ext" <<_ACEOF
17204 #line 17204 "configure"
17205 #include "confdefs.h"
17206 $ac_includes_default
17210 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
17215 rm -f "conftest.$ac_objext"
17216 if { (eval echo "$as_me:17216: \"$ac_compile\"") >&5
17217 (eval $ac_compile) 2>&5
17219 echo "$as_me:17219: \$? = $ac_status" >&5
17220 (exit "$ac_status"); } &&
17221 { ac_try='test -s "conftest.$ac_objext"'
17222 { (eval echo "$as_me:17222: \"$ac_try\"") >&5
17223 (eval $ac_try) 2>&5
17225 echo "$as_me:17225: \$? = $ac_status" >&5
17226 (exit "$ac_status"); }; }; then
17229 cat >"conftest.$ac_ext" <<_ACEOF
17230 #line 17230 "configure"
17231 #include "confdefs.h"
17232 $ac_includes_default
17236 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
17241 rm -f "conftest.$ac_objext"
17242 if { (eval echo "$as_me:17242: \"$ac_compile\"") >&5
17243 (eval $ac_compile) 2>&5
17245 echo "$as_me:17245: \$? = $ac_status" >&5
17246 (exit "$ac_status"); } &&
17247 { ac_try='test -s "conftest.$ac_objext"'
17248 { (eval echo "$as_me:17248: \"$ac_try\"") >&5
17249 (eval $ac_try) 2>&5
17251 echo "$as_me:17251: \$? = $ac_status" >&5
17252 (exit "$ac_status"); }; }; then
17253 ac_hi=$ac_mid; break
17255 echo "$as_me: failed program was:" >&5
17256 cat "conftest.$ac_ext" >&5
17257 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
17259 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17262 echo "$as_me: failed program was:" >&5
17263 cat "conftest.$ac_ext" >&5
17266 cat >"conftest.$ac_ext" <<_ACEOF
17267 #line 17267 "configure"
17268 #include "confdefs.h"
17269 $ac_includes_default
17273 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
17278 rm -f "conftest.$ac_objext"
17279 if { (eval echo "$as_me:17279: \"$ac_compile\"") >&5
17280 (eval $ac_compile) 2>&5
17282 echo "$as_me:17282: \$? = $ac_status" >&5
17283 (exit "$ac_status"); } &&
17284 { ac_try='test -s "conftest.$ac_objext"'
17285 { (eval echo "$as_me:17285: \"$ac_try\"") >&5
17286 (eval $ac_try) 2>&5
17288 echo "$as_me:17288: \$? = $ac_status" >&5
17289 (exit "$ac_status"); }; }; then
17290 ac_lo=$ac_mid; break
17292 echo "$as_me: failed program was:" >&5
17293 cat "conftest.$ac_ext" >&5
17294 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
17296 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17299 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17300 # Binary search between lo and hi bounds.
17301 while test "x$ac_lo" != "x$ac_hi"; do
17302 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
17303 cat >"conftest.$ac_ext" <<_ACEOF
17304 #line 17304 "configure"
17305 #include "confdefs.h"
17306 $ac_includes_default
17310 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
17315 rm -f "conftest.$ac_objext"
17316 if { (eval echo "$as_me:17316: \"$ac_compile\"") >&5
17317 (eval $ac_compile) 2>&5
17319 echo "$as_me:17319: \$? = $ac_status" >&5
17320 (exit "$ac_status"); } &&
17321 { ac_try='test -s "conftest.$ac_objext"'
17322 { (eval echo "$as_me:17322: \"$ac_try\"") >&5
17323 (eval $ac_try) 2>&5
17325 echo "$as_me:17325: \$? = $ac_status" >&5
17326 (exit "$ac_status"); }; }; then
17329 echo "$as_me: failed program was:" >&5
17330 cat "conftest.$ac_ext" >&5
17331 ac_lo=`expr "$ac_mid" + 1`
17333 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17335 ac_cv_sizeof_signed_char=$ac_lo
17337 if test "$cross_compiling" = yes; then
17338 { { echo "$as_me:17338: error: cannot run test program while cross compiling" >&5
17339 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17340 { (exit 1); exit 1; }; }
17342 cat >"conftest.$ac_ext" <<_ACEOF
17343 #line 17343 "configure"
17344 #include "confdefs.h"
17345 $ac_includes_default
17349 FILE *f = fopen ("conftest.val", "w");
17351 $ac_main_return (1);
17352 fprintf (f, "%ld", (long)(sizeof (signed char)));
17358 rm -f "conftest$ac_exeext"
17359 if { (eval echo "$as_me:17359: \"$ac_link\"") >&5
17360 (eval $ac_link) 2>&5
17362 echo "$as_me:17362: \$? = $ac_status" >&5
17363 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17364 { (eval echo "$as_me:17364: \"$ac_try\"") >&5
17365 (eval $ac_try) 2>&5
17367 echo "$as_me:17367: \$? = $ac_status" >&5
17368 (exit "$ac_status"); }; }; then
17369 ac_cv_sizeof_signed_char=`cat conftest.val`
17371 echo "$as_me: program exited with status $ac_status" >&5
17372 echo "$as_me: failed program was:" >&5
17373 cat "conftest.$ac_ext" >&5
17375 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17380 ac_cv_sizeof_signed_char=0
17383 echo "$as_me:17383: result: $ac_cv_sizeof_signed_char" >&5
17384 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
17385 cat >>confdefs.h <<EOF
17386 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
17389 ac_header_dirent=no
17390 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
17391 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
17392 echo "$as_me:17392: checking for $ac_hdr that defines DIR" >&5
17393 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
17394 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17395 echo $ECHO_N "(cached) $ECHO_C" >&6
17397 cat >"conftest.$ac_ext" <<_ACEOF
17398 #line 17398 "configure"
17399 #include "confdefs.h"
17400 #include <sys/types.h>
17412 rm -f "conftest.$ac_objext"
17413 if { (eval echo "$as_me:17413: \"$ac_compile\"") >&5
17414 (eval $ac_compile) 2>&5
17416 echo "$as_me:17416: \$? = $ac_status" >&5
17417 (exit "$ac_status"); } &&
17418 { ac_try='test -s "conftest.$ac_objext"'
17419 { (eval echo "$as_me:17419: \"$ac_try\"") >&5
17420 (eval $ac_try) 2>&5
17422 echo "$as_me:17422: \$? = $ac_status" >&5
17423 (exit "$ac_status"); }; }; then
17424 eval "$as_ac_Header=yes"
17426 echo "$as_me: failed program was:" >&5
17427 cat "conftest.$ac_ext" >&5
17428 eval "$as_ac_Header=no"
17430 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17432 echo "$as_me:17432: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17433 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17434 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17435 cat >>confdefs.h <<EOF
17436 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
17439 ac_header_dirent=$ac_hdr; break
17443 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
17444 if test $ac_header_dirent = dirent.h; then
17445 echo "$as_me:17445: checking for opendir in -ldir" >&5
17446 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
17447 if test "${ac_cv_lib_dir_opendir+set}" = set; then
17448 echo $ECHO_N "(cached) $ECHO_C" >&6
17450 ac_check_lib_save_LIBS=$LIBS
17452 cat >"conftest.$ac_ext" <<_ACEOF
17453 #line 17453 "configure"
17454 #include "confdefs.h"
17456 /* Override any gcc2 internal prototype to avoid an error. */
17460 /* We use char because int might match the return type of a gcc2
17461 builtin and then its argument prototype would still apply. */
17462 char opendir (void);
17471 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17472 if { (eval echo "$as_me:17472: \"$ac_link\"") >&5
17473 (eval $ac_link) 2>&5
17475 echo "$as_me:17475: \$? = $ac_status" >&5
17476 (exit "$ac_status"); } &&
17477 { ac_try='test -s "conftest$ac_exeext"'
17478 { (eval echo "$as_me:17478: \"$ac_try\"") >&5
17479 (eval $ac_try) 2>&5
17481 echo "$as_me:17481: \$? = $ac_status" >&5
17482 (exit "$ac_status"); }; }; then
17483 ac_cv_lib_dir_opendir=yes
17485 echo "$as_me: failed program was:" >&5
17486 cat "conftest.$ac_ext" >&5
17487 ac_cv_lib_dir_opendir=no
17489 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17490 LIBS=$ac_check_lib_save_LIBS
17492 echo "$as_me:17492: result: $ac_cv_lib_dir_opendir" >&5
17493 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
17494 if test "$ac_cv_lib_dir_opendir" = yes; then
17499 echo "$as_me:17499: checking for opendir in -lx" >&5
17500 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
17501 if test "${ac_cv_lib_x_opendir+set}" = set; then
17502 echo $ECHO_N "(cached) $ECHO_C" >&6
17504 ac_check_lib_save_LIBS=$LIBS
17506 cat >"conftest.$ac_ext" <<_ACEOF
17507 #line 17507 "configure"
17508 #include "confdefs.h"
17510 /* Override any gcc2 internal prototype to avoid an error. */
17514 /* We use char because int might match the return type of a gcc2
17515 builtin and then its argument prototype would still apply. */
17516 char opendir (void);
17525 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17526 if { (eval echo "$as_me:17526: \"$ac_link\"") >&5
17527 (eval $ac_link) 2>&5
17529 echo "$as_me:17529: \$? = $ac_status" >&5
17530 (exit "$ac_status"); } &&
17531 { ac_try='test -s "conftest$ac_exeext"'
17532 { (eval echo "$as_me:17532: \"$ac_try\"") >&5
17533 (eval $ac_try) 2>&5
17535 echo "$as_me:17535: \$? = $ac_status" >&5
17536 (exit "$ac_status"); }; }; then
17537 ac_cv_lib_x_opendir=yes
17539 echo "$as_me: failed program was:" >&5
17540 cat "conftest.$ac_ext" >&5
17541 ac_cv_lib_x_opendir=no
17543 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17544 LIBS=$ac_check_lib_save_LIBS
17546 echo "$as_me:17546: result: $ac_cv_lib_x_opendir" >&5
17547 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
17548 if test "$ac_cv_lib_x_opendir" = yes; then
17554 echo "$as_me:17554: checking whether time.h and sys/time.h may both be included" >&5
17555 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17556 if test "${ac_cv_header_time+set}" = set; then
17557 echo $ECHO_N "(cached) $ECHO_C" >&6
17559 cat >"conftest.$ac_ext" <<_ACEOF
17560 #line 17560 "configure"
17561 #include "confdefs.h"
17562 #include <sys/types.h>
17563 #include <sys/time.h>
17569 if ((struct tm *) 0)
17575 rm -f "conftest.$ac_objext"
17576 if { (eval echo "$as_me:17576: \"$ac_compile\"") >&5
17577 (eval $ac_compile) 2>&5
17579 echo "$as_me:17579: \$? = $ac_status" >&5
17580 (exit "$ac_status"); } &&
17581 { ac_try='test -s "conftest.$ac_objext"'
17582 { (eval echo "$as_me:17582: \"$ac_try\"") >&5
17583 (eval $ac_try) 2>&5
17585 echo "$as_me:17585: \$? = $ac_status" >&5
17586 (exit "$ac_status"); }; }; then
17587 ac_cv_header_time=yes
17589 echo "$as_me: failed program was:" >&5
17590 cat "conftest.$ac_ext" >&5
17591 ac_cv_header_time=no
17593 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17595 echo "$as_me:17595: result: $ac_cv_header_time" >&5
17596 echo "${ECHO_T}$ac_cv_header_time" >&6
17597 if test $ac_cv_header_time = yes; then
17599 cat >>confdefs.h <<\EOF
17600 #define TIME_WITH_SYS_TIME 1
17605 ### checks for compiler characteristics
17607 ac_cpp='$CPP $CPPFLAGS'
17608 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17609 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17610 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17611 ac_main_return="return"
17613 echo "$as_me:17613: checking for an ANSI C-conforming const" >&5
17614 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17615 if test "${ac_cv_c_const+set}" = set; then
17616 echo $ECHO_N "(cached) $ECHO_C" >&6
17618 cat >"conftest.$ac_ext" <<_ACEOF
17619 #line 17619 "configure"
17620 #include "confdefs.h"
17625 /* FIXME: Include the comments suggested by Paul. */
17626 #ifndef __cplusplus
17627 /* Ultrix mips cc rejects this. */
17628 typedef int charset[2];
17629 const charset x; (void)x;
17630 /* SunOS 4.1.1 cc rejects this. */
17631 char const *const *ccp;
17633 /* NEC SVR4.0.2 mips cc rejects this. */
17634 struct point {int x, y;};
17635 static struct point const zero = {0,0}; (void)zero;
17636 /* AIX XL C 1.02.0.0 rejects this.
17637 It does not let you subtract one const X* pointer from another in
17638 an arm of an if-expression whose if-part is not a constant
17640 const char *g = "string";
17641 ccp = &g + (g ? g-g : 0);
17642 /* HPUX 7.0 cc rejects these. */
17645 ccp = (char const *const *) p;
17646 { /* SCO 3.2v4 cc rejects this. */
17648 char const *s = 0 ? (char *) 0 : (char const *) 0;
17653 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
17654 int x[] = {25, 17};
17655 const int *foo = &x[0];
17659 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17660 typedef const int *iptr;
17665 { /* AIX XL C 1.02.0.0 rejects this saying
17666 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17667 struct s { int j; const int *ap[3]; };
17668 struct s *b; b->j = 5;
17670 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17671 const int foo = 10;
17680 rm -f "conftest.$ac_objext"
17681 if { (eval echo "$as_me:17681: \"$ac_compile\"") >&5
17682 (eval $ac_compile) 2>&5
17684 echo "$as_me:17684: \$? = $ac_status" >&5
17685 (exit "$ac_status"); } &&
17686 { ac_try='test -s "conftest.$ac_objext"'
17687 { (eval echo "$as_me:17687: \"$ac_try\"") >&5
17688 (eval $ac_try) 2>&5
17690 echo "$as_me:17690: \$? = $ac_status" >&5
17691 (exit "$ac_status"); }; }; then
17694 echo "$as_me: failed program was:" >&5
17695 cat "conftest.$ac_ext" >&5
17698 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17700 echo "$as_me:17700: result: $ac_cv_c_const" >&5
17701 echo "${ECHO_T}$ac_cv_c_const" >&6
17702 if test $ac_cv_c_const = no; then
17704 cat >>confdefs.h <<\EOF
17710 ### Checks for external-data
17712 echo "$as_me:17712: checking if data-only library module links" >&5
17713 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
17714 if test "${cf_cv_link_dataonly+set}" = set; then
17715 echo $ECHO_N "(cached) $ECHO_C" >&6
17719 cat >conftest.$ac_ext <<EOF
17720 #line 17720 "configure"
17721 int testdata[3] = { 123, 456, 789 };
17723 if { (eval echo "$as_me:17723: \"$ac_compile\"") >&5
17724 (eval $ac_compile) 2>&5
17726 echo "$as_me:17726: \$? = $ac_status" >&5
17727 (exit "$ac_status"); } ; then
17728 mv conftest.o data.o && \
17729 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
17731 rm -f conftest.$ac_ext data.o
17732 cat >conftest.$ac_ext <<EOF
17733 #line 17733 "configure"
17734 extern int testfunc(void);
17738 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
17741 extern int testdata[3];
17744 return testdata[0] == 123
17745 && testdata[1] == 456
17746 && testdata[2] == 789;
17750 if { (eval echo "$as_me:17750: \"$ac_compile\"") >&5
17751 (eval $ac_compile) 2>&5
17753 echo "$as_me:17753: \$? = $ac_status" >&5
17754 (exit "$ac_status"); }; then
17755 mv conftest.o func.o && \
17756 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17758 rm -f conftest.$ac_ext func.o
17759 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17760 cf_saveLIBS="$LIBS"
17761 LIBS="conftest.a $LIBS"
17762 if test "$cross_compiling" = yes; then
17763 cf_cv_link_dataonly=unknown
17765 cat >"conftest.$ac_ext" <<_ACEOF
17766 #line 17766 "configure"
17767 #include "confdefs.h"
17769 extern int testfunc(void);
17772 ${cf_cv_main_return:-return} (!testfunc());
17776 rm -f "conftest$ac_exeext"
17777 if { (eval echo "$as_me:17777: \"$ac_link\"") >&5
17778 (eval $ac_link) 2>&5
17780 echo "$as_me:17780: \$? = $ac_status" >&5
17781 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17782 { (eval echo "$as_me:17782: \"$ac_try\"") >&5
17783 (eval $ac_try) 2>&5
17785 echo "$as_me:17785: \$? = $ac_status" >&5
17786 (exit "$ac_status"); }; }; then
17787 cf_cv_link_dataonly=yes
17789 echo "$as_me: program exited with status $ac_status" >&5
17790 echo "$as_me: failed program was:" >&5
17791 cat "conftest.$ac_ext" >&5
17792 cf_cv_link_dataonly=no
17794 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17796 LIBS="$cf_saveLIBS"
17800 echo "$as_me:17800: result: $cf_cv_link_dataonly" >&5
17801 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17803 if test "$cf_cv_link_dataonly" = no ; then
17805 cat >>confdefs.h <<\EOF
17806 #define BROKEN_LINKER 1
17812 ### Checks for library functions.
17818 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17819 echo "$as_me:17819: checking for $ac_header" >&5
17820 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17821 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17822 echo $ECHO_N "(cached) $ECHO_C" >&6
17824 cat >"conftest.$ac_ext" <<_ACEOF
17825 #line 17825 "configure"
17826 #include "confdefs.h"
17827 #include <$ac_header>
17829 if { (eval echo "$as_me:17829: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17830 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17832 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17834 cat conftest.err >&5
17835 echo "$as_me:17835: \$? = $ac_status" >&5
17836 (exit "$ac_status"); } >/dev/null; then
17837 if test -s conftest.err; then
17838 ac_cpp_err=$ac_c_preproc_warn_flag
17845 if test -z "$ac_cpp_err"; then
17846 eval "$as_ac_Header=yes"
17848 echo "$as_me: failed program was:" >&5
17849 cat "conftest.$ac_ext" >&5
17850 eval "$as_ac_Header=no"
17852 rm -f conftest.err "conftest.$ac_ext"
17854 echo "$as_me:17854: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17855 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17856 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17857 cat >>confdefs.h <<EOF
17858 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17864 echo "$as_me:17864: checking for working mkstemp" >&5
17865 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17866 if test "${cf_cv_func_mkstemp+set}" = set; then
17867 echo $ECHO_N "(cached) $ECHO_C" >&6
17871 if test "$cross_compiling" = yes; then
17872 cf_cv_func_mkstemp=maybe
17874 cat >"conftest.$ac_ext" <<_ACEOF
17875 #line 17875 "configure"
17876 #include "confdefs.h"
17878 $ac_includes_default
17882 static char tmpl[] = "conftestXXXXXX";
17890 for (n = 0; n < 2; ++n) {
17891 strcpy(name[n], tmpl);
17892 if ((fd = mkstemp(name[n])) >= 0) {
17893 if (!strcmp(name[n], tmpl)
17894 || stat(name[n], &sb) != 0
17895 || (sb.st_mode & S_IFMT) != S_IFREG
17896 || (sb.st_mode & 077) != 0) {
17903 && !strcmp(name[0], name[1]))
17905 ${cf_cv_main_return:-return}(result);
17909 rm -f "conftest$ac_exeext"
17910 if { (eval echo "$as_me:17910: \"$ac_link\"") >&5
17911 (eval $ac_link) 2>&5
17913 echo "$as_me:17913: \$? = $ac_status" >&5
17914 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17915 { (eval echo "$as_me:17915: \"$ac_try\"") >&5
17916 (eval $ac_try) 2>&5
17918 echo "$as_me:17918: \$? = $ac_status" >&5
17919 (exit "$ac_status"); }; }; then
17920 cf_cv_func_mkstemp=yes
17923 echo "$as_me: program exited with status $ac_status" >&5
17924 echo "$as_me: failed program was:" >&5
17925 cat "conftest.$ac_ext" >&5
17926 cf_cv_func_mkstemp=no
17929 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17933 echo "$as_me:17933: result: $cf_cv_func_mkstemp" >&5
17934 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17935 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17936 echo "$as_me:17936: checking for mkstemp" >&5
17937 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17938 if test "${ac_cv_func_mkstemp+set}" = set; then
17939 echo $ECHO_N "(cached) $ECHO_C" >&6
17941 cat >"conftest.$ac_ext" <<_ACEOF
17942 #line 17942 "configure"
17943 #include "confdefs.h"
17944 #define mkstemp autoconf_temporary
17945 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17952 /* We use char because int might match the return type of a gcc2
17953 builtin and then its argument prototype would still apply. */
17954 char mkstemp (void);
17960 /* The GNU C library defines stubs for functions which it implements
17961 to always fail with ENOSYS. Some functions are actually named
17962 something starting with __ and the normal name is an alias. */
17963 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17964 #error found stub for mkstemp
17972 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17973 if { (eval echo "$as_me:17973: \"$ac_link\"") >&5
17974 (eval $ac_link) 2>&5
17976 echo "$as_me:17976: \$? = $ac_status" >&5
17977 (exit "$ac_status"); } &&
17978 { ac_try='test -s "conftest$ac_exeext"'
17979 { (eval echo "$as_me:17979: \"$ac_try\"") >&5
17980 (eval $ac_try) 2>&5
17982 echo "$as_me:17982: \$? = $ac_status" >&5
17983 (exit "$ac_status"); }; }; then
17984 ac_cv_func_mkstemp=yes
17986 echo "$as_me: failed program was:" >&5
17987 cat "conftest.$ac_ext" >&5
17988 ac_cv_func_mkstemp=no
17990 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17992 echo "$as_me:17992: result: $ac_cv_func_mkstemp" >&5
17993 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17996 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17998 cat >>confdefs.h <<\EOF
17999 #define HAVE_MKSTEMP 1
18004 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
18005 CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
18006 CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
18010 if test "$cf_with_ada" != "no" ; then
18011 if test "$cf_cv_prog_gnat_correct" = yes; then
18013 echo "$as_me:18013: checking optimization options for ADAFLAGS" >&5
18014 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
18018 ADAFLAGS="$ADAFLAGS -g"
18024 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
18026 ADAFLAGS="$ADAFLAGS $cf_O_flag"
18030 echo "$as_me:18030: result: $ADAFLAGS" >&5
18031 echo "${ECHO_T}$ADAFLAGS" >&6
18033 echo "$as_me:18033: checking if GNATPREP supports -T option" >&5
18034 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
18035 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
18036 echo $ECHO_N "(cached) $ECHO_C" >&6
18039 cf_cv_gnatprep_opt_t=no
18040 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
18043 echo "$as_me:18043: result: $cf_cv_gnatprep_opt_t" >&5
18044 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
18045 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
18047 echo "$as_me:18047: checking if GNAT supports generics" >&5
18048 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
18049 case "$cf_cv_gnat_version" in
18050 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
18051 cf_gnat_generics=yes
18054 cf_gnat_generics=no
18057 echo "$as_me:18057: result: $cf_gnat_generics" >&5
18058 echo "${ECHO_T}$cf_gnat_generics" >&6
18060 if test "$cf_gnat_generics" = yes
18062 cf_compile_generics=generics
18063 cf_generic_objects="\${GENOBJS}"
18065 cf_compile_generics=
18066 cf_generic_objects=
18069 echo "$as_me:18069: checking if GNAT supports SIGINT" >&5
18070 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
18071 if test "${cf_cv_gnat_sigint+set}" = set; then
18072 echo $ECHO_N "(cached) $ECHO_C" >&6
18075 rm -rf ./conftest* ./*~conftest*
18076 cat >>conftest.ads <<CF_EOF
18077 with Ada.Interrupts.Names;
18079 package ConfTest is
18081 pragma Warnings (Off); -- the next pragma exists since 3.11p
18082 pragma Unreserve_All_Interrupts;
18083 pragma Warnings (On);
18085 protected Process is
18087 function Continue return Boolean;
18088 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
18090 Done : Boolean := False;
18095 cat >>conftest.adb <<CF_EOF
18096 package body ConfTest is
18097 protected body Process is
18102 function Continue return Boolean is
18109 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18110 cf_cv_gnat_sigint=yes
18112 cf_cv_gnat_sigint=no
18114 rm -rf ./conftest* ./*~conftest*
18117 echo "$as_me:18117: result: $cf_cv_gnat_sigint" >&5
18118 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
18120 if test "$cf_cv_gnat_sigint" = yes ; then
18123 USE_GNAT_SIGINT="#"
18126 cf_gnat_libraries=no
18127 cf_gnat_projects=no
18129 if test "$enable_gnat_projects" != no ; then
18130 echo "$as_me:18130: checking if GNAT supports project files" >&5
18131 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
18132 case "$cf_cv_gnat_version" in
18136 case "$cf_cv_system_name" in
18140 rm -rf ./conftest* ./*~conftest*
18141 if mkdir conftest.src conftest.bin conftest.lib
18144 rm -rf ./conftest* ./*~conftest*
18145 cat >>library.gpr <<CF_EOF
18147 Kind := External ("LIB_KIND");
18148 for Library_Name use "ConfTest";
18149 for Object_Dir use ".";
18150 for Library_ALI_Dir use External("LIBRARY_DIR");
18151 for Library_Version use External ("SONAME");
18152 for Library_Kind use Kind;
18153 for Library_Dir use External("BUILD_DIR");
18154 Source_Dir := External ("SOURCE_DIR");
18155 for Source_Dirs use (Source_Dir);
18158 cat >>confpackage.ads <<CF_EOF
18159 package ConfPackage is
18160 procedure conftest;
18163 cat >>confpackage.adb <<CF_EOF
18165 package body ConfPackage is
18166 procedure conftest is
18168 Text_IO.Put ("Hello World");
18173 if ( "$cf_ada_make" $ADAFLAGS \
18175 -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
18176 -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
18177 -XSOURCE_DIR="`pwd`" \
18178 -XSONAME=libConfTest.so.1 \
18179 -XLIB_KIND=static 1>&5 2>&1 ) ; then
18180 cf_gnat_projects=yes
18184 if test -f conftest.lib/confpackage.ali
18186 cf_gnat_libraries=yes
18188 rm -rf ./conftest* ./*~conftest*
18193 echo "$as_me:18193: result: $cf_gnat_projects" >&5
18194 echo "${ECHO_T}$cf_gnat_projects" >&6
18195 fi # enable_gnat_projects
18197 if test "$cf_gnat_projects" = yes
18199 echo "$as_me:18199: checking if GNAT supports libraries" >&5
18200 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
18201 echo "$as_me:18201: result: $cf_gnat_libraries" >&5
18202 echo "${ECHO_T}$cf_gnat_libraries" >&6
18205 USE_OLD_MAKERULES=""
18206 USE_GNAT_PROJECTS="#"
18207 USE_GNAT_MAKE_GPR="#"
18208 USE_GNAT_GPRBUILD="#"
18210 if test "$cf_gnat_projects" = yes
18212 USE_OLD_MAKERULES="#"
18213 USE_GNAT_PROJECTS=""
18214 if test "$cf_cv_VERSION_GPRBUILD" != no
18216 USE_GNAT_GPRBUILD=""
18217 elif test "$cf_cv_VERSION_GNATMAKE" != no
18219 USE_GNAT_MAKE_GPR=""
18221 { echo "$as_me:18221: WARNING: use old makefile rules since tools are missing" >&5
18222 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
18226 if test "$cf_gnat_libraries" = yes
18228 USE_GNAT_LIBRARIES=""
18230 USE_GNAT_LIBRARIES="#"
18233 echo "$as_me:18233: checking for Ada95 compiler" >&5
18234 echo $ECHO_N "checking for Ada95 compiler... $ECHO_C" >&6
18236 # Check whether --with-ada-compiler or --without-ada-compiler was given.
18237 if test "${with_ada_compiler+set}" = set; then
18238 withval="$with_ada_compiler"
18239 cf_ada_compiler=$withval
18241 cf_ada_compiler=gnatmake
18244 echo "$as_me:18244: result: $cf_ada_compiler" >&5
18245 echo "${ECHO_T}$cf_ada_compiler" >&6
18247 cf_ada_package=terminal_interface
18249 echo "$as_me:18249: checking for Ada95 include directory" >&5
18250 echo $ECHO_N "checking for Ada95 include directory... $ECHO_C" >&6
18252 # Check whether --with-ada-include or --without-ada-include was given.
18253 if test "${with_ada_include+set}" = set; then
18254 withval="$with_ada_include"
18257 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
18258 fi; if test -n "$prefix/share/ada/adainclude" ; then
18260 if test "x$prefix" != xNONE; then
18261 cf_path_syntax="$prefix"
18263 cf_path_syntax="$ac_default_prefix"
18266 case ".$withval" in
18267 (.\$\(*\)*|.\'*\'*)
18271 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
18273 (.\$\{*prefix\}*|.\$\{*dir\}*)
18274 eval withval="$withval"
18275 case ".$withval" in
18277 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18282 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18285 { { echo "$as_me:18285: error: expected a pathname, not \"$withval\"" >&5
18286 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18287 { (exit 1); exit 1; }; }
18292 eval ADA_INCLUDE="$withval"
18294 echo "$as_me:18294: result: $ADA_INCLUDE" >&5
18295 echo "${ECHO_T}$ADA_INCLUDE" >&6
18297 echo "$as_me:18297: checking for Ada95 object directory" >&5
18298 echo $ECHO_N "checking for Ada95 object directory... $ECHO_C" >&6
18300 # Check whether --with-ada-objects or --without-ada-objects was given.
18301 if test "${with_ada_objects+set}" = set; then
18302 withval="$with_ada_objects"
18305 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
18306 fi; if test -n "$prefix/lib/ada/adalib" ; then
18308 if test "x$prefix" != xNONE; then
18309 cf_path_syntax="$prefix"
18311 cf_path_syntax="$ac_default_prefix"
18314 case ".$withval" in
18315 (.\$\(*\)*|.\'*\'*)
18319 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
18321 (.\$\{*prefix\}*|.\$\{*dir\}*)
18322 eval withval="$withval"
18323 case ".$withval" in
18325 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18330 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18333 { { echo "$as_me:18333: error: expected a pathname, not \"$withval\"" >&5
18334 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18335 { (exit 1); exit 1; }; }
18340 eval ADA_OBJECTS="$withval"
18342 echo "$as_me:18342: result: $ADA_OBJECTS" >&5
18343 echo "${ECHO_T}$ADA_OBJECTS" >&6
18345 echo "$as_me:18345: checking whether to build an Ada95 shared library" >&5
18346 echo $ECHO_N "checking whether to build an Ada95 shared library... $ECHO_C" >&6
18348 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
18349 if test "${with_ada_sharedlib+set}" = set; then
18350 withval="$with_ada_sharedlib"
18351 with_ada_sharedlib=$withval
18353 with_ada_sharedlib=no
18355 cf_ada_sharedlib_warn=no
18357 if test "x$with_ada_sharedlib" != xno
18359 if test "x$cf_gnat_projects" != xyes
18361 with_ada_sharedlib=no
18362 cf_ada_sharedlib_warn=yes
18366 echo "$as_me:18366: result: $with_ada_sharedlib" >&5
18367 echo "${ECHO_T}$with_ada_sharedlib" >&6
18368 if test "x$cf_ada_sharedlib_warn" != xno
18370 { echo "$as_me:18370: WARNING: disabling Ada95 shared library since GNAT projects are not supported" >&5
18371 echo "$as_me: WARNING: disabling Ada95 shared library since GNAT projects are not supported" >&2;}
18374 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
18375 MAKE_ADA_SHAREDLIB="#"
18377 if test "x$with_ada_sharedlib" != xno
18379 MAKE_ADA_SHAREDLIB=
18380 if test "x$with_ada_sharedlib" != xyes
18382 ADA_SHAREDLIB="$with_ada_sharedlib"
18386 # allow the Ada binding to be renamed
18388 echo "$as_me:18388: checking for Ada95 curses library name" >&5
18389 echo $ECHO_N "checking for Ada95 curses library name... $ECHO_C" >&6
18391 # Check whether --with-ada-libname or --without-ada-libname was given.
18392 if test "${with_ada_libname+set}" = set; then
18393 withval="$with_ada_libname"
18394 ADA_LIBNAME=$withval
18396 ADA_LIBNAME=AdaCurses
18398 case "x$ADA_LIBNAME" in
18400 ADA_LIBNAME=AdaCurses
18404 echo "$as_me:18404: result: $ADA_LIBNAME" >&5
18405 echo "${ECHO_T}$ADA_LIBNAME" >&6
18408 { { echo "$as_me:18408: error: No usable Ada compiler found" >&5
18409 echo "$as_me: error: No usable Ada compiler found" >&2;}
18410 { (exit 1); exit 1; }; }
18413 { { echo "$as_me:18413: error: The Ada compiler is needed for this package" >&5
18414 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
18415 { (exit 1); exit 1; }; }
18418 ################################################################################
18425 ### Construct the list of include-directories to be generated
18427 if test "$srcdir" != "."; then
18428 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
18430 CPPFLAGS="-I../include $CPPFLAGS"
18431 if test "$srcdir" != "."; then
18432 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
18434 CPPFLAGS="-I. $CPPFLAGS"
18436 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18437 if test "$srcdir" != "."; then
18438 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18440 if test "$GCC" != yes; then
18441 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18442 elif test "$includedir" != "/usr/include"; then
18443 if test "$includedir" = '${prefix}/include' ; then
18444 if test x$prefix != x/usr ; then
18445 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18448 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18452 ### Build up pieces for makefile rules
18453 echo "$as_me:18453: checking default library suffix" >&5
18454 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18456 case $DFT_LWR_MODEL in
18457 (libtool) DFT_ARG_SUFFIX='' ;;
18458 (normal) DFT_ARG_SUFFIX='' ;;
18459 (debug) DFT_ARG_SUFFIX='_g' ;;
18460 (profile) DFT_ARG_SUFFIX='_p' ;;
18461 (shared) DFT_ARG_SUFFIX='' ;;
18463 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18464 echo "$as_me:18464: result: $DFT_ARG_SUFFIX" >&5
18465 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18467 echo "$as_me:18467: checking default library-dependency suffix" >&5
18468 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18470 case X$DFT_LWR_MODEL in
18472 DFT_LIB_SUFFIX='.la'
18473 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18476 case "$cf_cv_system_name" in
18478 DFT_LIB_SUFFIX='_g.lib'
18481 DFT_LIB_SUFFIX='_g.a'
18484 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18487 case "$cf_cv_system_name" in
18489 DFT_LIB_SUFFIX='_p.lib'
18492 DFT_LIB_SUFFIX='_p.a'
18495 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18498 case "$cf_cv_system_name" in
18500 DFT_LIB_SUFFIX='.so'
18501 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18504 DFT_LIB_SUFFIX='.dll'
18505 DFT_DEP_SUFFIX='.dll.lib'
18507 (cygwin*|msys*|mingw*)
18508 DFT_LIB_SUFFIX='.dll'
18509 DFT_DEP_SUFFIX='.dll.a'
18512 DFT_LIB_SUFFIX='.dylib'
18513 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18518 DFT_LIB_SUFFIX='.so'
18519 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18522 DFT_LIB_SUFFIX='.sl'
18523 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18528 DFT_LIB_SUFFIX='.so'
18529 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18536 DFT_LIB_SUFFIX='.lib'
18539 DFT_LIB_SUFFIX='.a'
18542 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18545 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
18547 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
18548 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
18550 echo "$as_me:18550: result: $DFT_DEP_SUFFIX" >&5
18551 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18553 echo "$as_me:18553: checking default object directory" >&5
18554 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18556 case $DFT_LWR_MODEL in
18557 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
18558 (normal) DFT_OBJ_SUBDIR='objects' ;;
18559 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
18560 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
18562 case "$cf_cv_system_name" in
18564 DFT_OBJ_SUBDIR='objects' ;;
18566 DFT_OBJ_SUBDIR='obj_s' ;;
18569 echo "$as_me:18569: result: $DFT_OBJ_SUBDIR" >&5
18570 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18572 ### Set up low-level terminfo dependencies for makefiles.
18574 if test "$DFT_LWR_MODEL" = shared ; then
18575 case $cf_cv_system_name in
18577 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18580 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
18585 USE_ARG_SUFFIX=${DFT_ARG_SUFFIX}
18587 USE_LIB_SUFFIX=${DFT_ARG_SUFFIX}
18589 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
18591 ### Construct the list of subdirectories for which we'll customize makefiles
18592 ### with the appropriate compile-rules.
18594 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
18596 cat >>confdefs.h <<EOF
18597 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18600 ################################################################################
18606 NCURSES_SHLIB2="sh -c"
18608 ADA_SUBDIRS="include gen src doc"
18609 if test "x$cf_with_tests" != "xno" ; then
18610 ADA_SUBDIRS="$ADA_SUBDIRS samples"
18612 for cf_dir in $ADA_SUBDIRS
18614 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18621 # match layout used by make-tar.sh
18622 ADAHTML_DIR=../doc/ada
18624 if test "x$cross_compiling" = xyes ; then
18625 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
18627 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
18630 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"
18631 ac_config_commands="$ac_config_commands default"
18632 cat >confcache <<\_ACEOF
18633 # This file is a shell script that caches the results of configure
18634 # tests run on this system so they can be shared between configure
18635 # scripts and configure runs, see configure's option --config-cache.
18636 # It is not useful on other systems. If it contains results you don't
18637 # want to keep, you may remove or edit it.
18639 # config.status only pays attention to the cache file if you give it
18640 # the --recheck option to rerun configure.
18642 # `ac_cv_env_foo' variables (set or unset) will be overridden when
18643 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18644 # following values.
18648 # The following way of writing the cache mishandles newlines in values,
18649 # but we know of no workaround that is simple, portable, and efficient.
18650 # So, don't put newlines in cache variables' values.
18651 # Ultrix sh set writes to stderr and can't be redirected directly,
18652 # and sets the high bit in the cache file unless we assign to the vars.
18655 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18657 # `set' does not quote correctly, so add quotes (double-quote
18658 # substitution turns \\\\ into \\, and sed turns \\ into \).
18661 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18664 # `set' quotes correctly as required by POSIX, so do not add quotes.
18666 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18673 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18675 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18677 if cmp -s $cache_file confcache; then :; else
18678 if test -w $cache_file; then
18679 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18680 cat confcache >$cache_file
18682 echo "not updating unwritable cache $cache_file"
18687 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18688 # Let make expand exec_prefix.
18689 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18691 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18692 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18693 # trailing colons and then remove the whole line if VPATH becomes empty
18694 # (actually we leave an empty line to preserve line numbers).
18695 if test "x$srcdir" = x.; then
18696 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18697 s/:*\$(srcdir):*/:/;
18698 s/:*\${srcdir}:*/:/;
18700 s/^\([^=]*=[ ]*\):*/\1/;
18706 DEFS=-DHAVE_CONFIG_H
18708 : "${CONFIG_STATUS=./config.status}"
18709 ac_clean_files_save=$ac_clean_files
18710 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18711 { echo "$as_me:18711: creating $CONFIG_STATUS" >&5
18712 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18713 cat >"$CONFIG_STATUS" <<_ACEOF
18715 # Generated automatically by configure.
18716 # Run this file to recreate the current configuration.
18717 # Compiler output produced by configure, useful for debugging
18718 # configure, is in config.log if it exists.
18720 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
18723 SHELL=\${CONFIG_SHELL-$SHELL}
18724 ac_cs_invocation="\$0 \$@"
18726 CLICOLOR_FORCE= GREP_OPTIONS=
18727 unset CLICOLOR_FORCE GREP_OPTIONS
18730 cat >>"$CONFIG_STATUS" <<\_ACEOF
18731 # Be Bourne compatible
18732 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18735 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18739 # Name of the executable.
18740 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18742 if expr a : '\(a\)' >/dev/null 2>&1; then
18748 rm -f conf$$ conf$$.exe conf$$.file
18750 if ln -s conf$$.file conf$$ 2>/dev/null; then
18751 # We could just check for DJGPP; but this test a) works b) is more generic
18752 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18753 if test -f conf$$.exe; then
18754 # Don't use ln at all; we don't have any links
18759 elif ln conf$$.file conf$$ 2>/dev/null; then
18764 rm -f conf$$ conf$$.exe conf$$.file
18766 as_executable_p="test -f"
18768 # Support unset when possible.
18769 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18776 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18777 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18778 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18779 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18780 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18781 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18782 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18783 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18786 # We need space, tab and new line, in precisely that order.
18792 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18798 # Files that config.status was made for.
18799 if test -n "$ac_config_files"; then
18800 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
18803 if test -n "$ac_config_headers"; then
18804 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
18807 if test -n "$ac_config_links"; then
18808 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
18811 if test -n "$ac_config_commands"; then
18812 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
18815 cat >>"$CONFIG_STATUS" <<\EOF
18818 \`$as_me' instantiates files from templates according to the
18819 current configuration.
18821 Usage: $0 [OPTIONS] [FILE]...
18823 -h, --help print this help, then exit
18824 -V, --version print version number, then exit
18825 -d, --debug don't remove temporary files
18826 --recheck update $as_me by reconfiguring in the same conditions
18827 --file=FILE[:TEMPLATE]
18828 instantiate the configuration file FILE
18829 --header=FILE[:TEMPLATE]
18830 instantiate the configuration header FILE
18832 Configuration files:
18835 Configuration headers:
18838 Configuration commands:
18841 Report bugs to <dickey@invisible-island.net>."
18844 cat >>"$CONFIG_STATUS" <<EOF
18847 configured by $0, generated by GNU Autoconf 2.52.20231210,
18848 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18850 Copyright 2003-2022,2023 Thomas E. Dickey
18851 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18852 Free Software Foundation, Inc.
18853 This config.status script is free software; the Free Software Foundation
18854 gives unlimited permission to copy, distribute and modify it."
18859 cat >>"$CONFIG_STATUS" <<\EOF
18860 # If no file are specified by the user, then we need to provide default
18861 # value. By we need to know if files were specified by the user.
18867 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18868 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18870 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18874 *) # This is not an option, so the user has probably given explicit
18876 ac_need_defaults=false;;
18880 # Handling of the options.
18882 cat >>"$CONFIG_STATUS" <<EOF
18883 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18884 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18885 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18887 cat >>"$CONFIG_STATUS" <<\EOF
18888 --version | --vers* | -V )
18889 echo "$ac_cs_version"; exit 0 ;;
18891 # Conflict between --help and --header
18892 { { echo "$as_me:18892: error: ambiguous option: $1
18893 Try \`$0 --help' for more information." >&5
18894 echo "$as_me: error: ambiguous option: $1
18895 Try \`$0 --help' for more information." >&2;}
18896 { (exit 1); exit 1; }; };;
18897 --help | --hel | -h )
18898 echo "$ac_cs_usage"; exit 0 ;;
18899 --debug | --d* | -d )
18901 --file | --fil | --fi | --f )
18903 CONFIG_FILES="$CONFIG_FILES $1"
18904 ac_need_defaults=false;;
18905 --header | --heade | --head | --hea )
18907 CONFIG_HEADERS="$CONFIG_HEADERS $1"
18908 ac_need_defaults=false;;
18910 # This is an error.
18911 -*) { { echo "$as_me:18911: error: unrecognized option: $1
18912 Try \`$0 --help' for more information." >&5
18913 echo "$as_me: error: unrecognized option: $1
18914 Try \`$0 --help' for more information." >&2;}
18915 { (exit 1); exit 1; }; } ;;
18917 *) ac_config_targets="$ac_config_targets $1" ;;
18926 ## ----------------------- ##
18927 ## Running config.status. ##
18928 ## ----------------------- ##
18930 This file was extended by $as_me 2.52.20231210, executed with
18931 CONFIG_FILES = $CONFIG_FILES
18932 CONFIG_HEADERS = $CONFIG_HEADERS
18933 CONFIG_LINKS = $CONFIG_LINKS
18934 CONFIG_COMMANDS = $CONFIG_COMMANDS
18935 > "$ac_cs_invocation"
18936 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18941 cat >>"$CONFIG_STATUS" <<EOF
18943 # INIT-COMMANDS section.
18946 ### Special initialization commands, used to pass information from the
18947 ### configuration-run into config.status
18950 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
18951 DFT_LWR_MODEL="$DFT_LWR_MODEL"
18952 LIB_NAME="$LIB_NAME"
18953 LIB_PREFIX="$LIB_PREFIX"
18954 LIB_SUFFIX="$LIB_SUFFIX"
18956 NCURSES_MAJOR="$NCURSES_MAJOR"
18957 NCURSES_MINOR="$NCURSES_MINOR"
18958 NCURSES_PATCH="$NCURSES_PATCH"
18960 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
18961 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
18962 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
18963 cf_cv_abi_version="$cf_cv_abi_version"
18964 cf_cv_rel_version="$cf_cv_rel_version"
18965 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
18966 cf_cv_shared_soname='$cf_cv_shared_soname'
18967 cf_cv_shlib_version="$cf_cv_shlib_version"
18968 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
18969 cf_cv_system_name="$cf_cv_system_name"
18975 cat >>"$CONFIG_STATUS" <<\EOF
18976 for ac_config_target in $ac_config_targets
18978 case "$ac_config_target" in
18979 # Handling of arguments.
18980 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
18981 "src/library.gpr" ) CONFIG_FILES="$CONFIG_FILES src/library.gpr:src/library.gpr.in" ;;
18982 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
18983 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18984 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18985 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
18986 *) { { echo "$as_me:18986: error: invalid argument: $ac_config_target" >&5
18987 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18988 { (exit 1); exit 1; }; };;
18992 # If the user did not use the arguments to specify the items to instantiate,
18993 # then the envvar interface is used. Set only those that are not.
18994 # We use the long form for the default assignment because of an extremely
18995 # bizarre bug on SunOS 4.1.3.
18996 if "$ac_need_defaults"; then
18997 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18998 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18999 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19002 # Create a temporary directory, and hook for its removal unless debugging.
19005 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19006 trap '{ (exit 1); exit 1; }' 1 2 13 15
19009 # Create a (secure) tmp directory for tmp files.
19012 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
19013 test -n "$tmp" && test -d "$tmp"
19016 tmp=$TMPDIR/cs$$-$RANDOM
19017 (umask 077 && mkdir "$tmp")
19020 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
19021 { (exit 1); exit 1; }
19026 cat >>"$CONFIG_STATUS" <<EOF
19029 # CONFIG_FILES section.
19032 # No need to generate the scripts if there are no CONFIG_FILES.
19033 # This happens for instance when ./config.status config.h
19034 if test -n "\$CONFIG_FILES"; then
19035 # Protect against being on the right side of a sed subst in config.status.
19036 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19037 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
19038 s,@SHELL@,$SHELL,;t t
19039 s,@exec_prefix@,$exec_prefix,;t t
19040 s,@prefix@,$prefix,;t t
19041 s,@program_transform_name@,$program_transform_name,;t t
19042 s,@bindir@,$bindir,;t t
19043 s,@sbindir@,$sbindir,;t t
19044 s,@libexecdir@,$libexecdir,;t t
19045 s,@datarootdir@,$datarootdir,;t t
19046 s,@datadir@,$datadir,;t t
19047 s,@sysconfdir@,$sysconfdir,;t t
19048 s,@sharedstatedir@,$sharedstatedir,;t t
19049 s,@localstatedir@,$localstatedir,;t t
19050 s,@runstatedir@,$runstatedir,;t t
19051 s,@libdir@,$libdir,;t t
19052 s,@includedir@,$includedir,;t t
19053 s,@oldincludedir@,$oldincludedir,;t t
19054 s,@infodir@,$infodir,;t t
19055 s,@mandir@,$mandir,;t t
19056 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19057 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19058 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19059 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19060 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19061 s,@build_alias@,$build_alias,;t t
19062 s,@host_alias@,$host_alias,;t t
19063 s,@target_alias@,$target_alias,;t t
19064 s,@ECHO_C@,$ECHO_C,;t t
19065 s,@ECHO_N@,$ECHO_N,;t t
19066 s,@ECHO_T@,$ECHO_T,;t t
19067 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19068 s,@DEFS@,$DEFS,;t t
19069 s,@LIBS@,$LIBS,;t t
19070 s,@PACKAGE@,$PACKAGE,;t t
19071 s,@top_builddir@,$top_builddir,;t t
19072 s,@build@,$build,;t t
19073 s,@build_cpu@,$build_cpu,;t t
19074 s,@build_vendor@,$build_vendor,;t t
19075 s,@build_os@,$build_os,;t t
19076 s,@host@,$host,;t t
19077 s,@host_cpu@,$host_cpu,;t t
19078 s,@host_vendor@,$host_vendor,;t t
19079 s,@host_os@,$host_os,;t t
19080 s,@target@,$target,;t t
19081 s,@target_cpu@,$target_cpu,;t t
19082 s,@target_vendor@,$target_vendor,;t t
19083 s,@target_os@,$target_os,;t t
19084 s,@GREP@,$GREP,;t t
19085 s,@FGREP@,$FGREP,;t t
19086 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
19087 s,@M4_exists@,$M4_exists,;t t
19088 s,@cf_ada_make@,$cf_ada_make,;t t
19089 s,@cf_ada_config@,$cf_ada_config,;t t
19090 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
19091 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
19092 s,@cf_cv_path_gnatgcc@,$cf_cv_path_gnatgcc,;t t
19094 s,@CFLAGS@,$CFLAGS,;t t
19095 s,@LDFLAGS@,$LDFLAGS,;t t
19096 s,@CPPFLAGS@,$CPPFLAGS,;t t
19097 s,@ac_ct_CC@,$ac_ct_CC,;t t
19098 s,@EXEEXT@,$EXEEXT,;t t
19099 s,@OBJEXT@,$OBJEXT,;t t
19100 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
19102 s,@EGREP@,$EGREP,;t t
19104 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19105 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19106 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19107 s,@LN_S@,$LN_S,;t t
19108 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
19109 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
19110 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
19111 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
19112 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
19113 s,@SET_MAKE@,$SET_MAKE,;t t
19114 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
19115 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
19116 s,@CTAGS@,$CTAGS,;t t
19117 s,@ETAGS@,$ETAGS,;t t
19118 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
19119 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
19120 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
19121 s,@RANLIB@,$RANLIB,;t t
19122 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19124 s,@ac_ct_LD@,$ac_ct_LD,;t t
19126 s,@ac_ct_AR@,$ac_ct_AR,;t t
19127 s,@ARFLAGS@,$ARFLAGS,;t t
19128 s,@DESTDIR@,$DESTDIR,;t t
19129 s,@BUILD_CC@,$BUILD_CC,;t t
19130 s,@BUILD_CPP@,$BUILD_CPP,;t t
19131 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
19132 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
19133 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
19134 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
19135 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
19136 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
19137 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
19138 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
19139 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
19140 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
19141 s,@cf_cv_screen@,$cf_cv_screen,;t t
19142 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
19143 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
19144 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
19145 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
19146 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
19147 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
19148 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
19149 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
19150 s,@cf_cv_enable_sigwinch@,$cf_cv_enable_sigwinch,;t t
19151 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
19152 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
19153 s,@CC_G_OPT@,$CC_G_OPT,;t t
19154 s,@LD_MODEL@,$LD_MODEL,;t t
19155 s,@shlibdir@,$shlibdir,;t t
19156 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
19157 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
19158 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
19159 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
19160 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
19161 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
19162 s,@LINK_PROGS@,$LINK_PROGS,;t t
19163 s,@LINK_TESTS@,$LINK_TESTS,;t t
19164 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
19165 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
19166 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
19167 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
19168 s,@RPATH_LIST@,$RPATH_LIST,;t t
19169 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
19170 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
19171 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
19172 s,@PTHREAD@,$PTHREAD,;t t
19173 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
19174 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
19175 s,@ECHO_LT@,$ECHO_LT,;t t
19176 s,@ECHO_LD@,$ECHO_LD,;t t
19177 s,@RULE_CC@,$RULE_CC,;t t
19178 s,@SHOW_CC@,$SHOW_CC,;t t
19179 s,@ECHO_CC@,$ECHO_CC,;t t
19180 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
19181 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
19182 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
19183 s,@ADAFLAGS@,$ADAFLAGS,;t t
19184 s,@ADA_TRACE@,$ADA_TRACE,;t t
19185 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
19186 s,@cf_compile_generics@,$cf_compile_generics,;t t
19187 s,@cf_generic_objects@,$cf_generic_objects,;t t
19188 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
19189 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
19190 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
19191 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
19192 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
19193 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
19194 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
19195 s,@cf_ada_package@,$cf_ada_package,;t t
19196 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
19197 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
19198 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
19199 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
19200 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
19201 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
19202 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
19203 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
19204 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
19205 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
19206 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
19207 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
19208 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
19209 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
19210 s,@TEST_ARG2@,$TEST_ARG2,;t t
19211 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
19212 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
19213 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
19214 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
19215 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
19216 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
19217 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
19222 cat >>"$CONFIG_STATUS" <<\EOF
19223 # Split the substitutions into bite-sized pieces for seds with
19224 # small command number limits, like on Digital OSF/1 and HP-UX.
19225 ac_max_sed_lines=48
19226 ac_sed_frag=1 # Number of current file.
19227 ac_beg=1 # First line for current file.
19228 ac_end=$ac_max_sed_lines # Line after last line for current file.
19231 while "$ac_more_lines"; do
19232 if test "$ac_beg" -gt 1; then
19233 sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
19235 sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
19237 if test ! -s "$tmp"/subs.frag; then
19238 ac_more_lines=false
19240 # The purpose of the label and of the branching condition is to
19241 # speed up the sed processing (if there are no `@' at all, there
19242 # is no need to browse any of the substitutions).
19243 # These are the two extra sed commands mentioned above.
19245 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
19246 # It is possible to make a multiline substitution using escaped newlines.
19247 # Ensure that we do not split the substitution between script fragments.
19249 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
19250 sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
19251 if test -s "$tmp"/subs.next; then
19252 grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
19253 if test ! -s "$tmp"/subs.edit; then
19254 grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
19255 if test ! -s "$tmp"/subs.edit; then
19256 if test "$ac_beg" -gt 1; then
19257 ac_end=`expr "$ac_end" - 1`
19264 if test -z "$ac_sed_cmds"; then
19265 ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
19267 ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
19269 ac_sed_frag=`expr "$ac_sed_frag" + 1`
19271 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
19274 if test -z "$ac_sed_cmds"; then
19277 fi # test -n "$CONFIG_FILES"
19280 cat >>"$CONFIG_STATUS" <<\EOF
19281 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19282 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19284 - | *:- | *:-:* ) # input from stdin
19286 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19287 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19288 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19289 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19290 * ) ac_file_in=$ac_file.in ;;
19293 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19294 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19295 X"$ac_file" : 'X\(//\)[^/]' \| \
19296 X"$ac_file" : 'X\(//\)$' \| \
19297 X"$ac_file" : 'X\(/\)' \| \
19298 . : '\(.\)' 2>/dev/null ||
19300 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19301 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19302 /^X\(\/\/\)$/{ s//\1/; q; }
19303 /^X\(\/\).*/{ s//\1/; q; }
19305 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19306 { case "$ac_dir" in
19307 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19311 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19312 case $as_mkdir_dir in
19313 # Skip DOS drivespec
19314 ?:) as_incr_dir=$as_mkdir_dir ;;
19316 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19317 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19322 ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
19323 # A "../" for each directory in $ac_dir_suffix.
19324 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
19326 ac_dir_suffix= ac_dots=
19331 if test -z "$ac_dots"; then
19334 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
19336 [\\/]* | ?:[\\/]* )
19337 ac_srcdir="$srcdir$ac_dir_suffix";
19338 ac_top_srcdir="$srcdir" ;;
19339 *) # Relative path.
19340 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
19341 ac_top_srcdir="$ac_dots$srcdir" ;;
19345 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19346 *) ac_INSTALL=$ac_dots$INSTALL ;;
19349 if test x"$ac_file" != x-; then
19350 { echo "$as_me:19350: creating $ac_file" >&5
19351 echo "$as_me: creating $ac_file" >&6;}
19354 # Let's still pretend it is `configure' which instantiates (i.e., don't
19355 # use $as_me), people would be surprised to read:
19356 # /* config.h. Generated automatically by config.status. */
19357 configure_input="Generated automatically from `echo $ac_file_in |
19358 sed 's,.*/,,'` by configure."
19360 # First look for the input files in the build tree, otherwise in the
19362 ac_file_inputs=`IFS=:
19363 for f in $ac_file_in; do
19365 -) echo "$tmp"/stdin ;;
19367 # Absolute (can't be DOS-style, as IFS=:)
19368 test -f "$f" || { { echo "$as_me:19368: error: cannot find input file: $f" >&5
19369 echo "$as_me: error: cannot find input file: $f" >&2;}
19370 { (exit 1); exit 1; }; }
19373 if test -f "$f"; then
19376 elif test -f "$srcdir/$f"; then
19381 { { echo "$as_me:19381: error: cannot find input file: $f" >&5
19382 echo "$as_me: error: cannot find input file: $f" >&2;}
19383 { (exit 1); exit 1; }; }
19386 done` || { (exit 1); exit 1; }
19388 cat >>"$CONFIG_STATUS" <<\EOF
19389 ac_warn_datarootdir=no
19390 if test x"$ac_file" != x-; then
19391 for ac_item in $ac_file_inputs
19393 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
19394 if test -n "$ac_seen"; then
19395 ac_used=`grep '@datarootdir@' "$ac_item"`
19396 if test -z "$ac_used"; then
19397 { echo "$as_me:19397: WARNING: datarootdir was used implicitly but not set:
19399 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
19401 ac_warn_datarootdir=yes
19404 ac_seen=`grep '${datarootdir}' "$ac_item"`
19405 if test -n "$ac_seen"; then
19406 { echo "$as_me:19406: WARNING: datarootdir was used explicitly but not set:
19408 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
19410 ac_warn_datarootdir=yes
19415 if test "x$ac_warn_datarootdir" = xyes; then
19416 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
19420 cat >>"$CONFIG_STATUS" <<EOF
19424 cat >>"$CONFIG_STATUS" <<\EOF
19426 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19427 s,@configure_input@,$configure_input,;t t
19428 s,@srcdir@,$ac_srcdir,;t t
19429 s,@top_srcdir@,$ac_top_srcdir,;t t
19430 s,@INSTALL@,$ac_INSTALL,;t t
19431 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
19434 test -n "${FGREP}" || FGREP="grep -F"
19435 test -n "${EGREP}" || EGREP="grep -E"
19436 cat >>"$CONFIG_STATUS" <<EOF
19437 test -n "\${FGREP}" || FGREP="$FGREP"
19438 test -n "\${EGREP}" || EGREP="$EGREP"
19440 cat >>"$CONFIG_STATUS" <<\EOF
19441 if test x"$ac_file" != x-; then
19442 cp "$tmp/out" "$ac_file"
19444 for ac_name in prefix exec_prefix datarootdir
19446 ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
19447 if test -n "$ac_seen"; then
19448 ac_init=`$EGREP '[ ]*'$ac_name'[ ]*=' "$ac_file"`
19449 if test -z "$ac_init"; then
19450 ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
19451 { echo "$as_me:19451: WARNING: Variable $ac_name is used but was not set:
19453 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
19458 $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
19459 $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
19460 if test -s "$tmp"/out; then
19461 ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
19462 { echo "$as_me:19462: WARNING: Some variables may not be substituted:
19464 echo "$as_me: WARNING: Some variables may not be substituted:
19474 cat >>"$CONFIG_STATUS" <<\EOF
19477 # CONFIG_HEADER section.
19480 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19481 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19483 # ac_d sets the value in "#define NAME VALUE" lines.
19484 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19485 ac_dB='[ ].*$,\1#\2'
19488 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19489 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19490 ac_iB='\([ ]\),\1#\2define\3'
19493 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19494 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19495 ac_uB='$,\1#\2define\3'
19499 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19500 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19502 - | *:- | *:-:* ) # input from stdin
19504 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19505 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19506 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19507 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19508 * ) ac_file_in=$ac_file.in ;;
19511 test x"$ac_file" != x- && { echo "$as_me:19511: creating $ac_file" >&5
19512 echo "$as_me: creating $ac_file" >&6;}
19514 # First look for the input files in the build tree, otherwise in the
19516 ac_file_inputs=`IFS=:
19517 for f in $ac_file_in; do
19519 -) echo "$tmp"/stdin ;;
19521 # Absolute (can't be DOS-style, as IFS=:)
19522 test -f "$f" || { { echo "$as_me:19522: error: cannot find input file: $f" >&5
19523 echo "$as_me: error: cannot find input file: $f" >&2;}
19524 { (exit 1); exit 1; }; }
19527 if test -f "$f"; then
19530 elif test -f "$srcdir/$f"; then
19535 { { echo "$as_me:19535: error: cannot find input file: $f" >&5
19536 echo "$as_me: error: cannot find input file: $f" >&2;}
19537 { (exit 1); exit 1; }; }
19540 done` || { (exit 1); exit 1; }
19541 # Remove the trailing spaces.
19542 sed 's/[ ]*$//' $ac_file_inputs >"$tmp"/in
19546 # Transform confdefs.h into a list of #define's. We won't use it as a sed
19547 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
19548 # be either 'cat' or 'sort'.
19549 cat confdefs.h | uniq >conftest.vals
19551 # Break up conftest.vals because some shells have a limit on
19552 # the size of here documents, and old seds have small limits too.
19554 rm -f conftest.tail
19555 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
19556 while grep . conftest.vals >/dev/null
19558 # Write chunks of a limited-size here document to conftest.frag.
19559 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
19560 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
19561 echo 'CEOF' >> "$CONFIG_STATUS"
19562 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
19563 rm -f conftest.vals
19564 mv conftest.tail conftest.vals
19566 rm -f conftest.vals
19568 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19570 echo ' cat >> conftest.edit <<CEOF
19571 /@DEFS@/r conftest.frag
19574 sed -f conftest.edit "$tmp"/in > "$tmp"/out
19576 mv "$tmp"/out "$tmp"/in
19577 rm -f conftest.edit conftest.frag
19578 ' >> "$CONFIG_STATUS"
19580 cat >>"$CONFIG_STATUS" <<\EOF
19581 # Let's still pretend it is `configure' which instantiates (i.e., don't
19582 # use $as_me), people would be surprised to read:
19583 # /* config.h. Generated automatically by config.status. */
19584 if test x"$ac_file" = x-; then
19585 echo "/* Generated automatically by configure. */" >"$tmp"/config.h
19587 echo "/* $ac_file. Generated automatically by configure. */" >"$tmp"/config.h
19589 cat "$tmp"/in >>"$tmp"/config.h
19591 if test x"$ac_file" != x-; then
19592 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
19593 { echo "$as_me:19593: $ac_file is unchanged" >&5
19594 echo "$as_me: $ac_file is unchanged" >&6;}
19596 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19597 X"$ac_file" : 'X\(//\)[^/]' \| \
19598 X"$ac_file" : 'X\(//\)$' \| \
19599 X"$ac_file" : 'X\(/\)' \| \
19600 . : '\(.\)' 2>/dev/null ||
19602 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19603 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19604 /^X\(\/\/\)$/{ s//\1/; q; }
19605 /^X\(\/\).*/{ s//\1/; q; }
19607 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19608 { case "$ac_dir" in
19609 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19613 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19614 case $as_mkdir_dir in
19615 # Skip DOS drivespec
19616 ?:) as_incr_dir=$as_mkdir_dir ;;
19618 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19619 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19626 mv "$tmp/config.h" "$ac_file"
19629 cat "$tmp"/config.h
19630 rm -f "$tmp"/config.h
19634 cat >>"$CONFIG_STATUS" <<\EOF
19636 # CONFIG_COMMANDS section.
19638 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19639 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19640 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19644 $AWK -v PACKAGE=$PACKAGE -f $srcdir/mk-pkg.awk </dev/null >> Makefile
19645 if test -z "$USE_OLD_MAKERULES" ; then
19646 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
19653 cat >>"$CONFIG_STATUS" <<\EOF
19655 { (exit 0); exit 0; }
19657 chmod +x "$CONFIG_STATUS"
19658 ac_clean_files=$ac_clean_files_save
19660 # configure is writing to config.log, and then calls config.status.
19661 # config.status does its own redirection, appending to config.log.
19662 # Unfortunately, on DOS this fails, as config.log is still kept open
19663 # by configure, so config.status won't be able to write to it; its
19664 # output is simply discarded. So we exec the FD to /dev/null,
19665 # effectively closing config.log, so it can be properly (re)opened and
19666 # appended to by config.status. When coming back to configure, we
19667 # need to make the FD available again.
19668 if test "$no_create" != yes; then
19671 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
19673 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19674 # would make configure fail if this is the last instruction.
19675 "$ac_cs_success" || { (exit 1); exit 1; }
19677 ${MAKE:-make} preinstall