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 --enable-widec compile with wide-char/UTF-8 code
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 if you want wide-character code" >&5
7033 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7035 # Check whether --enable-widec or --disable-widec was given.
7036 if test "${enable_widec+set}" = set; then
7037 enableval="$enable_widec"
7038 with_widec=$enableval
7042 echo "$as_me:7042: result: $with_widec" >&5
7043 echo "${ECHO_T}$with_widec" >&6
7044 if test "$with_widec" = yes ; then
7046 for ac_header in wchar.h
7048 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7049 echo "$as_me:7049: checking for $ac_header" >&5
7050 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7051 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7052 echo $ECHO_N "(cached) $ECHO_C" >&6
7054 cat >"conftest.$ac_ext" <<_ACEOF
7055 #line 7055 "configure"
7056 #include "confdefs.h"
7057 #include <$ac_header>
7059 if { (eval echo "$as_me:7059: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7060 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7062 $EGREP -v '^ *\+' conftest.er1 >conftest.err
7064 cat conftest.err >&5
7065 echo "$as_me:7065: \$? = $ac_status" >&5
7066 (exit "$ac_status"); } >/dev/null; then
7067 if test -s conftest.err; then
7068 ac_cpp_err=$ac_c_preproc_warn_flag
7075 if test -z "$ac_cpp_err"; then
7076 eval "$as_ac_Header=yes"
7078 echo "$as_me: failed program was:" >&5
7079 cat "conftest.$ac_ext" >&5
7080 eval "$as_ac_Header=no"
7082 rm -f conftest.err "conftest.$ac_ext"
7084 echo "$as_me:7084: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7085 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7086 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7087 cat >>confdefs.h <<EOF
7088 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7094 echo "$as_me:7094: checking for multibyte character support" >&5
7095 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7096 if test "${cf_cv_utf8_lib+set}" = set; then
7097 echo $ECHO_N "(cached) $ECHO_C" >&6
7100 cf_save_LIBS="$LIBS"
7101 cat >"conftest.$ac_ext" <<_ACEOF
7102 #line 7102 "configure"
7103 #include "confdefs.h"
7105 $ac_includes_default
7118 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7119 if { (eval echo "$as_me:7119: \"$ac_link\"") >&5
7120 (eval $ac_link) 2>&5
7122 echo "$as_me:7122: \$? = $ac_status" >&5
7123 (exit "$ac_status"); } &&
7124 { ac_try='test -s "conftest$ac_exeext"'
7125 { (eval echo "$as_me:7125: \"$ac_try\"") >&5
7128 echo "$as_me:7128: \$? = $ac_status" >&5
7129 (exit "$ac_status"); }; }; then
7132 echo "$as_me: failed program was:" >&5
7133 cat "conftest.$ac_ext" >&5
7135 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7136 # will be set on completion of the AC_TRY_LINK below.
7137 cf_cv_header_path_utf8=
7138 cf_cv_library_path_utf8=
7140 echo "${as_me:-configure}:7140: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7142 cf_save_LIBS="$LIBS"
7144 cat >"conftest.$ac_ext" <<_ACEOF
7145 #line 7145 "configure"
7146 #include "confdefs.h"
7148 #include <libutf8.h>
7157 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7158 if { (eval echo "$as_me:7158: \"$ac_link\"") >&5
7159 (eval $ac_link) 2>&5
7161 echo "$as_me:7161: \$? = $ac_status" >&5
7162 (exit "$ac_status"); } &&
7163 { ac_try='test -s "conftest$ac_exeext"'
7164 { (eval echo "$as_me:7164: \"$ac_try\"") >&5
7167 echo "$as_me:7167: \$? = $ac_status" >&5
7168 (exit "$ac_status"); }; }; then
7170 cf_cv_find_linkage_utf8=yes
7171 cf_cv_header_path_utf8=/usr/include
7172 cf_cv_library_path_utf8=/usr/lib
7175 echo "$as_me: failed program was:" >&5
7176 cat "conftest.$ac_ext" >&5
7178 LIBS="-lutf8 $cf_save_LIBS"
7180 cat >"conftest.$ac_ext" <<_ACEOF
7181 #line 7181 "configure"
7182 #include "confdefs.h"
7184 #include <libutf8.h>
7193 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7194 if { (eval echo "$as_me:7194: \"$ac_link\"") >&5
7195 (eval $ac_link) 2>&5
7197 echo "$as_me:7197: \$? = $ac_status" >&5
7198 (exit "$ac_status"); } &&
7199 { ac_try='test -s "conftest$ac_exeext"'
7200 { (eval echo "$as_me:7200: \"$ac_try\"") >&5
7203 echo "$as_me:7203: \$? = $ac_status" >&5
7204 (exit "$ac_status"); }; }; then
7206 cf_cv_find_linkage_utf8=yes
7207 cf_cv_header_path_utf8=/usr/include
7208 cf_cv_library_path_utf8=/usr/lib
7209 cf_cv_library_file_utf8="-lutf8"
7212 echo "$as_me: failed program was:" >&5
7213 cat "conftest.$ac_ext" >&5
7215 cf_cv_find_linkage_utf8=no
7216 LIBS="$cf_save_LIBS"
7218 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
7220 echo "${as_me:-configure}:7220: testing find linkage for utf8 library ..." 1>&5
7222 echo "${as_me:-configure}:7222: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7224 cf_save_CPPFLAGS="$CPPFLAGS"
7225 cf_test_CPPFLAGS="$CPPFLAGS"
7229 # collect the current set of include-directories from compiler flags
7230 cf_header_path_list=""
7231 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7232 for cf_header_path in $CPPFLAGS $CFLAGS
7234 case "$cf_header_path" in
7236 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7238 test "x$cf_header_path" != "xNONE" && \
7239 test -d "$cf_header_path" && \
7241 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7242 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
7243 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
7244 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
7245 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
7246 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7249 cf_header_path_list="$cf_header_path_list $cf_search"
7255 # add the variations for the package we are looking for
7259 test "x$prefix" != "xNONE" && \
7260 test -d "$prefix" && \
7262 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7263 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
7264 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
7265 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
7266 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
7267 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
7270 for cf_subdir_prefix in \
7279 test "x$cf_subdir_prefix" != "x$prefix" && \
7280 test -d "$cf_subdir_prefix" && \
7281 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7282 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7283 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
7284 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
7285 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
7286 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
7287 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
7292 test "$includedir" != NONE && \
7293 test "$includedir" != "/usr/include" && \
7294 test -d "$includedir" && {
7295 test -d "$includedir" && cf_search="$cf_search $includedir"
7296 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
7299 test "$oldincludedir" != NONE && \
7300 test "$oldincludedir" != "/usr/include" && \
7301 test -d "$oldincludedir" && {
7302 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
7303 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
7306 cf_search="$cf_search $cf_header_path_list"
7308 for cf_cv_header_path_utf8 in $cf_search
7310 if test -d "$cf_cv_header_path_utf8" ; then
7311 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
7313 echo "${as_me:-configure}:7313: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7315 CPPFLAGS="$cf_save_CPPFLAGS"
7317 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7318 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
7320 cat >"conftest.$ac_ext" <<_ACEOF
7321 #line 7321 "configure"
7322 #include "confdefs.h"
7324 #include <libutf8.h>
7333 rm -f "conftest.$ac_objext"
7334 if { (eval echo "$as_me:7334: \"$ac_compile\"") >&5
7335 (eval $ac_compile) 2>&5
7337 echo "$as_me:7337: \$? = $ac_status" >&5
7338 (exit "$ac_status"); } &&
7339 { ac_try='test -s "conftest.$ac_objext"'
7340 { (eval echo "$as_me:7340: \"$ac_try\"") >&5
7343 echo "$as_me:7343: \$? = $ac_status" >&5
7344 (exit "$ac_status"); }; }; then
7346 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7348 echo "${as_me:-configure}:7348: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7350 cf_cv_find_linkage_utf8=maybe
7351 cf_test_CPPFLAGS="$CPPFLAGS"
7354 echo "$as_me: failed program was:" >&5
7355 cat "conftest.$ac_ext" >&5
7357 CPPFLAGS="$cf_save_CPPFLAGS"
7360 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7364 if test "$cf_cv_find_linkage_utf8" = maybe ; then
7366 echo "${as_me:-configure}:7366: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7368 cf_save_LIBS="$LIBS"
7369 cf_save_LDFLAGS="$LDFLAGS"
7371 if test "$cf_cv_find_linkage_utf8" != yes ; then
7374 cf_library_path_list=""
7375 if test -n "${LDFLAGS}${LIBS}" ; then
7376 for cf_library_path in $LDFLAGS $LIBS
7378 case "$cf_library_path" in
7380 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7382 test "x$cf_library_path" != "xNONE" && \
7383 test -d "$cf_library_path" && \
7385 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7386 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
7387 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
7388 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7389 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
7390 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7393 cf_library_path_list="$cf_library_path_list $cf_search"
7401 test "x$prefix" != "xNONE" && \
7402 test -d "$prefix" && \
7404 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7405 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
7406 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
7407 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
7408 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
7409 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
7412 for cf_subdir_prefix in \
7421 test "x$cf_subdir_prefix" != "x$prefix" && \
7422 test -d "$cf_subdir_prefix" && \
7423 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7424 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7425 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
7426 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
7427 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
7428 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
7429 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
7434 cf_search="$cf_library_path_list $cf_search"
7436 for cf_cv_library_path_utf8 in $cf_search
7438 if test -d "$cf_cv_library_path_utf8" ; then
7439 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7441 echo "${as_me:-configure}:7441: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7443 CPPFLAGS="$cf_test_CPPFLAGS"
7444 LIBS="-lutf8 $cf_save_LIBS"
7445 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7446 cat >"conftest.$ac_ext" <<_ACEOF
7447 #line 7447 "configure"
7448 #include "confdefs.h"
7450 #include <libutf8.h>
7459 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7460 if { (eval echo "$as_me:7460: \"$ac_link\"") >&5
7461 (eval $ac_link) 2>&5
7463 echo "$as_me:7463: \$? = $ac_status" >&5
7464 (exit "$ac_status"); } &&
7465 { ac_try='test -s "conftest$ac_exeext"'
7466 { (eval echo "$as_me:7466: \"$ac_try\"") >&5
7469 echo "$as_me:7469: \$? = $ac_status" >&5
7470 (exit "$ac_status"); }; }; then
7472 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7474 echo "${as_me:-configure}:7474: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7476 cf_cv_find_linkage_utf8=yes
7477 cf_cv_library_file_utf8="-lutf8"
7480 echo "$as_me: failed program was:" >&5
7481 cat "conftest.$ac_ext" >&5
7483 CPPFLAGS="$cf_save_CPPFLAGS"
7484 LIBS="$cf_save_LIBS"
7485 LDFLAGS="$cf_save_LDFLAGS"
7488 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7491 CPPFLAGS="$cf_save_CPPFLAGS"
7492 LDFLAGS="$cf_save_LDFLAGS"
7496 cf_cv_find_linkage_utf8=no
7500 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7503 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7505 LIBS="$cf_save_LIBS"
7507 if test "$cf_cv_find_linkage_utf8" = yes ; then
7508 cf_cv_utf8_lib=add-on
7514 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7516 echo "$as_me:7516: result: $cf_cv_utf8_lib" >&5
7517 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7519 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7521 if test "$cf_cv_utf8_lib" = "add-on" ; then
7523 cat >>confdefs.h <<\EOF
7524 #define HAVE_LIBUTF8_H 1
7527 if test -n "$cf_cv_header_path_utf8" ; then
7528 for cf_add_incdir in $cf_cv_header_path_utf8
7530 while test "$cf_add_incdir" != /usr/include
7532 if test -d "$cf_add_incdir"
7535 if test -n "$CFLAGS$CPPFLAGS" ; then
7536 # a loop is needed to ensure we can add subdirs of existing dirs
7537 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7538 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7539 cf_have_incdir=yes; break
7544 if test "$cf_have_incdir" = no ; then
7545 if test "$cf_add_incdir" = /usr/local/include ; then
7546 if test "$GCC" = yes
7548 cf_save_CPPFLAGS=$CPPFLAGS
7550 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7551 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7553 cat >"conftest.$ac_ext" <<_ACEOF
7554 #line 7554 "configure"
7555 #include "confdefs.h"
7565 rm -f "conftest.$ac_objext"
7566 if { (eval echo "$as_me:7566: \"$ac_compile\"") >&5
7567 (eval $ac_compile) 2>&5
7569 echo "$as_me:7569: \$? = $ac_status" >&5
7570 (exit "$ac_status"); } &&
7571 { ac_try='test -s "conftest.$ac_objext"'
7572 { (eval echo "$as_me:7572: \"$ac_try\"") >&5
7575 echo "$as_me:7575: \$? = $ac_status" >&5
7576 (exit "$ac_status"); }; }; then
7579 echo "$as_me: failed program was:" >&5
7580 cat "conftest.$ac_ext" >&5
7583 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7584 CPPFLAGS=$cf_save_CPPFLAGS
7589 if test "$cf_have_incdir" = no ; then
7590 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7592 echo "${as_me:-configure}:7592: testing adding $cf_add_incdir to include-path ..." 1>&5
7594 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7596 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7597 test "$cf_top_incdir" = "$cf_add_incdir" && break
7598 cf_add_incdir="$cf_top_incdir"
7609 if test -n "$cf_cv_library_path_utf8" ; then
7610 for cf_add_libdir in $cf_cv_library_path_utf8
7612 if test "$cf_add_libdir" = /usr/lib ; then
7614 elif test -d "$cf_add_libdir"
7617 if test -n "$LDFLAGS$LIBS" ; then
7618 # a loop is needed to ensure we can add subdirs of existing dirs
7619 for cf_test_libdir in $LDFLAGS $LIBS ; do
7620 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7621 cf_have_libdir=yes; break
7625 if test "$cf_have_libdir" = no ; then
7626 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7628 echo "${as_me:-configure}:7628: testing adding $cf_add_libdir to library-path ..." 1>&5
7630 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7639 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7641 for cf_add_1lib in $cf_add_0lib; do
7642 for cf_add_2lib in $cf_add_libs; do
7643 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7648 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7654 cf_ncuconfig_root=ncursesw
7655 cf_have_ncuconfig=no
7657 if test "x${PKG_CONFIG:=none}" != xnone; then
7658 echo "$as_me:7658: checking pkg-config for $cf_ncuconfig_root" >&5
7659 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7660 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7661 echo "$as_me:7661: result: yes" >&5
7662 echo "${ECHO_T}yes" >&6
7664 echo "$as_me:7664: checking if the $cf_ncuconfig_root package files work" >&5
7665 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7666 cf_have_ncuconfig=unknown
7668 cf_save_CFLAGS="$CFLAGS"
7669 cf_save_CPPFLAGS="$CPPFLAGS"
7670 cf_save_LIBS="$LIBS"
7672 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7673 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7675 # while -W for passing linker flags is prevalent, it is not "standard".
7676 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7677 # incompatible _and_ non-standard -W option which gives an error. Work
7678 # around that pitfall.
7679 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7685 cf_new_extra_cppflags=
7687 for cf_add_cflags in $cf_pkg_cflags
7689 case "$cf_fix_cppflags" in
7691 case "$cf_add_cflags" in
7692 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7693 case "$cf_add_cflags" in
7695 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7697 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7698 && test -z "${cf_tst_cflags}" \
7699 && cf_fix_cppflags=yes
7701 if test "$cf_fix_cppflags" = yes ; then
7703 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7704 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7707 elif test "${cf_tst_cflags}" = "\"'" ; then
7709 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7710 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7720 case "$cf_add_cflags" in
7722 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7724 CPPFLAGS=`echo "$CPPFLAGS" | \
7725 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7726 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7731 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7732 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7739 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7740 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7747 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7748 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7750 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7752 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7753 && test -z "${cf_tst_cflags}" \
7754 && cf_fix_cppflags=no
7759 if test -n "$cf_new_cflags" ; then
7761 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7762 CFLAGS="${CFLAGS}$cf_new_cflags"
7766 if test -n "$cf_new_cppflags" ; then
7768 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7769 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7773 if test -n "$cf_new_extra_cppflags" ; then
7775 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7776 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7783 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7785 for cf_add_1lib in $cf_add_0lib; do
7786 for cf_add_2lib in $cf_add_libs; do
7787 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7792 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7796 cat >"conftest.$ac_ext" <<_ACEOF
7797 #line 7797 "configure"
7798 #include "confdefs.h"
7799 #include <${cf_cv_ncurses_header:-curses.h}>
7803 initscr(); mousemask(0,0); tigetstr((char *)0);
7808 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7809 if { (eval echo "$as_me:7809: \"$ac_link\"") >&5
7810 (eval $ac_link) 2>&5
7812 echo "$as_me:7812: \$? = $ac_status" >&5
7813 (exit "$ac_status"); } &&
7814 { ac_try='test -s "conftest$ac_exeext"'
7815 { (eval echo "$as_me:7815: \"$ac_try\"") >&5
7818 echo "$as_me:7818: \$? = $ac_status" >&5
7819 (exit "$ac_status"); }; }; then
7820 if test "$cross_compiling" = yes; then
7821 cf_test_ncuconfig=maybe
7823 cat >"conftest.$ac_ext" <<_ACEOF
7824 #line 7824 "configure"
7825 #include "confdefs.h"
7826 #include <${cf_cv_ncurses_header:-curses.h}>
7828 { const char *xx = curses_version(); return (xx == 0); }
7830 rm -f "conftest$ac_exeext"
7831 if { (eval echo "$as_me:7831: \"$ac_link\"") >&5
7832 (eval $ac_link) 2>&5
7834 echo "$as_me:7834: \$? = $ac_status" >&5
7835 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7836 { (eval echo "$as_me:7836: \"$ac_try\"") >&5
7839 echo "$as_me:7839: \$? = $ac_status" >&5
7840 (exit "$ac_status"); }; }; then
7841 cf_test_ncuconfig=yes
7843 echo "$as_me: program exited with status $ac_status" >&5
7844 echo "$as_me: failed program was:" >&5
7845 cat "conftest.$ac_ext" >&5
7846 cf_test_ncuconfig=no
7848 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7851 echo "$as_me: failed program was:" >&5
7852 cat "conftest.$ac_ext" >&5
7853 cf_test_ncuconfig=no
7855 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7857 CFLAGS="$cf_save_CFLAGS"
7858 CPPFLAGS="$cf_save_CPPFLAGS"
7859 LIBS="$cf_save_LIBS"
7861 if test "x$cf_test_ncuconfig" != xyes; then
7862 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7863 cf_pkg_cflags="$cf_temp"
7864 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7865 cf_pkg_libs="$cf_temp"
7870 for cf_add_cflags in $cf_pkg_cflags
7872 case "x$cf_add_cflags" in
7875 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7878 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'`
7879 test "$CFLAGS" != "$cf_old_cflag" || break
7881 CFLAGS="$cf_old_cflag"
7884 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7887 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'`
7888 test "$CPPFLAGS" != "$cf_old_cflag" || break
7890 CPPFLAGS="$cf_old_cflag"
7899 cf_new_extra_cppflags=
7901 for cf_add_cflags in $cf_add_cflags
7903 case "$cf_fix_cppflags" in
7905 case "$cf_add_cflags" in
7906 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7907 case "$cf_add_cflags" in
7909 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7911 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7912 && test -z "${cf_tst_cflags}" \
7913 && cf_fix_cppflags=yes
7915 if test "$cf_fix_cppflags" = yes ; then
7917 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7918 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7921 elif test "${cf_tst_cflags}" = "\"'" ; then
7923 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7924 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7934 case "$cf_add_cflags" in
7936 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7938 CPPFLAGS=`echo "$CPPFLAGS" | \
7939 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7940 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7945 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7946 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7953 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7954 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7961 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7962 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7964 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7966 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7967 && test -z "${cf_tst_cflags}" \
7968 && cf_fix_cppflags=no
7973 if test -n "$cf_new_cflags" ; then
7975 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7976 CFLAGS="${CFLAGS}$cf_new_cflags"
7980 if test -n "$cf_new_cppflags" ; then
7982 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7983 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7987 if test -n "$cf_new_extra_cppflags" ; then
7989 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7990 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7999 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8001 for cf_add_1lib in $cf_add_0lib; do
8002 for cf_add_2lib in $cf_add_libs; do
8003 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8008 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8012 cat >"conftest.$ac_ext" <<_ACEOF
8013 #line 8013 "configure"
8014 #include "confdefs.h"
8015 #include <${cf_cv_ncurses_header:-curses.h}>
8019 initscr(); mousemask(0,0); tigetstr((char *)0);
8024 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8025 if { (eval echo "$as_me:8025: \"$ac_link\"") >&5
8026 (eval $ac_link) 2>&5
8028 echo "$as_me:8028: \$? = $ac_status" >&5
8029 (exit "$ac_status"); } &&
8030 { ac_try='test -s "conftest$ac_exeext"'
8031 { (eval echo "$as_me:8031: \"$ac_try\"") >&5
8034 echo "$as_me:8034: \$? = $ac_status" >&5
8035 (exit "$ac_status"); }; }; then
8036 if test "$cross_compiling" = yes; then
8037 cf_have_ncuconfig=maybe
8039 cat >"conftest.$ac_ext" <<_ACEOF
8040 #line 8040 "configure"
8041 #include "confdefs.h"
8042 #include <${cf_cv_ncurses_header:-curses.h}>
8044 { const char *xx = curses_version(); return (xx == 0); }
8046 rm -f "conftest$ac_exeext"
8047 if { (eval echo "$as_me:8047: \"$ac_link\"") >&5
8048 (eval $ac_link) 2>&5
8050 echo "$as_me:8050: \$? = $ac_status" >&5
8051 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8052 { (eval echo "$as_me:8052: \"$ac_try\"") >&5
8055 echo "$as_me:8055: \$? = $ac_status" >&5
8056 (exit "$ac_status"); }; }; then
8057 cf_have_ncuconfig=yes
8059 echo "$as_me: program exited with status $ac_status" >&5
8060 echo "$as_me: failed program was:" >&5
8061 cat "conftest.$ac_ext" >&5
8062 cf_have_ncuconfig=no
8064 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8067 echo "$as_me: failed program was:" >&5
8068 cat "conftest.$ac_ext" >&5
8069 cf_have_ncuconfig=no
8071 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8072 echo "$as_me:8072: result: $cf_have_ncuconfig" >&5
8073 echo "${ECHO_T}$cf_have_ncuconfig" >&6
8074 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
8075 if test "$cf_have_ncuconfig" != "yes"
8077 CPPFLAGS="$cf_save_CPPFLAGS"
8078 LIBS="$cf_save_LIBS"
8079 NCURSES_CONFIG_PKG=none
8082 cat >>confdefs.h <<\EOF
8086 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
8088 echo "$as_me:8088: checking for terminfo header" >&5
8089 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8090 if test "${cf_cv_term_header+set}" = set; then
8091 echo $ECHO_N "(cached) $ECHO_C" >&6
8094 case "${cf_cv_ncurses_header}" in
8095 (*/ncurses.h|*/ncursesw.h)
8096 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8099 cf_term_header=term.h
8103 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8105 cat >"conftest.$ac_ext" <<_ACEOF
8106 #line 8106 "configure"
8107 #include "confdefs.h"
8109 #include <${cf_cv_ncurses_header:-curses.h}>
8115 int x = auto_left_margin; (void)x
8120 rm -f "conftest.$ac_objext"
8121 if { (eval echo "$as_me:8121: \"$ac_compile\"") >&5
8122 (eval $ac_compile) 2>&5
8124 echo "$as_me:8124: \$? = $ac_status" >&5
8125 (exit "$ac_status"); } &&
8126 { ac_try='test -s "conftest.$ac_objext"'
8127 { (eval echo "$as_me:8127: \"$ac_try\"") >&5
8130 echo "$as_me:8130: \$? = $ac_status" >&5
8131 (exit "$ac_status"); }; }; then
8133 cf_cv_term_header="$cf_test"
8135 echo "$as_me: failed program was:" >&5
8136 cat "conftest.$ac_ext" >&5
8138 cf_cv_term_header=unknown
8141 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8142 test "$cf_cv_term_header" != unknown && break
8146 echo "$as_me:8146: result: $cf_cv_term_header" >&5
8147 echo "${ECHO_T}$cf_cv_term_header" >&6
8149 # Set definitions to allow ifdef'ing to accommodate subdirectories
8151 case "$cf_cv_term_header" in
8154 cat >>confdefs.h <<\EOF
8155 #define HAVE_TERM_H 1
8161 case "$cf_cv_term_header" in
8164 cat >>confdefs.h <<\EOF
8165 #define HAVE_NCURSES_TERM_H 1
8171 cat >>confdefs.h <<\EOF
8172 #define HAVE_NCURSESW_TERM_H 1
8181 echo "$as_me:8181: result: no" >&5
8182 echo "${ECHO_T}no" >&6
8183 NCURSES_CONFIG_PKG=none
8186 NCURSES_CONFIG_PKG=none
8189 if test "x$cf_have_ncuconfig" = "xno"; then
8190 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
8192 if test -n "$ac_tool_prefix"; then
8193 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8195 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8196 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8197 echo "$as_me:8197: checking for $ac_word" >&5
8198 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8199 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8200 echo $ECHO_N "(cached) $ECHO_C" >&6
8202 if test -n "$NCURSES_CONFIG"; then
8203 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8205 ac_save_IFS=$IFS; IFS=$ac_path_separator
8207 for ac_dir in $ac_dummy; do
8209 test -z "$ac_dir" && ac_dir=.
8210 $as_executable_p "$ac_dir/$ac_word" || continue
8211 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8212 echo "$as_me:8212: found $ac_dir/$ac_word" >&5
8218 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8219 if test -n "$NCURSES_CONFIG"; then
8220 echo "$as_me:8220: result: $NCURSES_CONFIG" >&5
8221 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8223 echo "$as_me:8223: result: no" >&5
8224 echo "${ECHO_T}no" >&6
8227 test -n "$NCURSES_CONFIG" && break
8230 if test -z "$NCURSES_CONFIG"; then
8231 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8232 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8234 # Extract the first word of "$ac_prog", so it can be a program name with args.
8235 set dummy $ac_prog; ac_word=$2
8236 echo "$as_me:8236: checking for $ac_word" >&5
8237 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8238 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8239 echo $ECHO_N "(cached) $ECHO_C" >&6
8241 if test -n "$ac_ct_NCURSES_CONFIG"; then
8242 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8244 ac_save_IFS=$IFS; IFS=$ac_path_separator
8246 for ac_dir in $ac_dummy; do
8248 test -z "$ac_dir" && ac_dir=.
8249 $as_executable_p "$ac_dir/$ac_word" || continue
8250 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8251 echo "$as_me:8251: found $ac_dir/$ac_word" >&5
8257 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8258 if test -n "$ac_ct_NCURSES_CONFIG"; then
8259 echo "$as_me:8259: result: $ac_ct_NCURSES_CONFIG" >&5
8260 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8262 echo "$as_me:8262: result: no" >&5
8263 echo "${ECHO_T}no" >&6
8266 test -n "$ac_ct_NCURSES_CONFIG" && break
8268 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8270 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8273 if test "$NCURSES_CONFIG" != none ; then
8275 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
8277 case "x$cf_add_cflags" in
8280 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8283 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'`
8284 test "$CFLAGS" != "$cf_old_cflag" || break
8286 CFLAGS="$cf_old_cflag"
8289 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8292 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'`
8293 test "$CPPFLAGS" != "$cf_old_cflag" || break
8295 CPPFLAGS="$cf_old_cflag"
8304 cf_new_extra_cppflags=
8306 for cf_add_cflags in $cf_add_cflags
8308 case "$cf_fix_cppflags" in
8310 case "$cf_add_cflags" in
8311 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8312 case "$cf_add_cflags" in
8314 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8316 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8317 && test -z "${cf_tst_cflags}" \
8318 && cf_fix_cppflags=yes
8320 if test "$cf_fix_cppflags" = yes ; then
8322 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8323 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8326 elif test "${cf_tst_cflags}" = "\"'" ; then
8328 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8329 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8339 case "$cf_add_cflags" in
8341 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8343 CPPFLAGS=`echo "$CPPFLAGS" | \
8344 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8345 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8350 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8351 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8358 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8359 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8366 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8367 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8369 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8371 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8372 && test -z "${cf_tst_cflags}" \
8373 && cf_fix_cppflags=no
8378 if test -n "$cf_new_cflags" ; then
8380 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8381 CFLAGS="${CFLAGS}$cf_new_cflags"
8385 if test -n "$cf_new_cppflags" ; then
8387 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8388 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8392 if test -n "$cf_new_extra_cppflags" ; then
8394 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8395 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8404 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8406 for cf_add_1lib in $cf_add_0lib; do
8407 for cf_add_2lib in $cf_add_libs; do
8408 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8413 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8417 # even with config script, some packages use no-override for curses.h
8419 echo "$as_me:8419: checking if we have identified curses headers" >&5
8420 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8421 if test "${cf_cv_ncurses_header+set}" = set; then
8422 echo $ECHO_N "(cached) $ECHO_C" >&6
8425 cf_cv_ncurses_header=none
8427 ncurses.h ncursesw/ncurses.h \
8428 curses.h ncursesw/curses.h
8430 cat >"conftest.$ac_ext" <<_ACEOF
8431 #line 8431 "configure"
8432 #include "confdefs.h"
8433 #include <${cf_header}>
8442 rm -f "conftest.$ac_objext"
8443 if { (eval echo "$as_me:8443: \"$ac_compile\"") >&5
8444 (eval $ac_compile) 2>&5
8446 echo "$as_me:8446: \$? = $ac_status" >&5
8447 (exit "$ac_status"); } &&
8448 { ac_try='test -s "conftest.$ac_objext"'
8449 { (eval echo "$as_me:8449: \"$ac_try\"") >&5
8452 echo "$as_me:8452: \$? = $ac_status" >&5
8453 (exit "$ac_status"); }; }; then
8454 cf_cv_ncurses_header=$cf_header; break
8456 echo "$as_me: failed program was:" >&5
8457 cat "conftest.$ac_ext" >&5
8459 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8463 echo "$as_me:8463: result: $cf_cv_ncurses_header" >&5
8464 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8466 if test "$cf_cv_ncurses_header" = none ; then
8467 { { echo "$as_me:8467: error: No curses header-files found" >&5
8468 echo "$as_me: error: No curses header-files found" >&2;}
8469 { (exit 1); exit 1; }; }
8472 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8474 for ac_header in $cf_cv_ncurses_header
8476 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8477 echo "$as_me:8477: checking for $ac_header" >&5
8478 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8479 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8480 echo $ECHO_N "(cached) $ECHO_C" >&6
8482 cat >"conftest.$ac_ext" <<_ACEOF
8483 #line 8483 "configure"
8484 #include "confdefs.h"
8485 #include <$ac_header>
8487 if { (eval echo "$as_me:8487: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8488 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8490 $EGREP -v '^ *\+' conftest.er1 >conftest.err
8492 cat conftest.err >&5
8493 echo "$as_me:8493: \$? = $ac_status" >&5
8494 (exit "$ac_status"); } >/dev/null; then
8495 if test -s conftest.err; then
8496 ac_cpp_err=$ac_c_preproc_warn_flag
8503 if test -z "$ac_cpp_err"; then
8504 eval "$as_ac_Header=yes"
8506 echo "$as_me: failed program was:" >&5
8507 cat "conftest.$ac_ext" >&5
8508 eval "$as_ac_Header=no"
8510 rm -f conftest.err "conftest.$ac_ext"
8512 echo "$as_me:8512: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8513 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8514 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8515 cat >>confdefs.h <<EOF
8516 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8522 cat >>confdefs.h <<\EOF
8526 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8528 cat >>confdefs.h <<EOF
8529 #define $cf_nculib_ROOT 1
8532 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
8536 cf_ncuhdr_root=ncursesw
8538 test -n "$cf_cv_curses_dir" && \
8539 test "$cf_cv_curses_dir" != "no" && { \
8541 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8542 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8544 while test "$cf_add_incdir" != /usr/include
8546 if test -d "$cf_add_incdir"
8549 if test -n "$CFLAGS$CPPFLAGS" ; then
8550 # a loop is needed to ensure we can add subdirs of existing dirs
8551 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8552 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8553 cf_have_incdir=yes; break
8558 if test "$cf_have_incdir" = no ; then
8559 if test "$cf_add_incdir" = /usr/local/include ; then
8560 if test "$GCC" = yes
8562 cf_save_CPPFLAGS=$CPPFLAGS
8564 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8565 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8567 cat >"conftest.$ac_ext" <<_ACEOF
8568 #line 8568 "configure"
8569 #include "confdefs.h"
8579 rm -f "conftest.$ac_objext"
8580 if { (eval echo "$as_me:8580: \"$ac_compile\"") >&5
8581 (eval $ac_compile) 2>&5
8583 echo "$as_me:8583: \$? = $ac_status" >&5
8584 (exit "$ac_status"); } &&
8585 { ac_try='test -s "conftest.$ac_objext"'
8586 { (eval echo "$as_me:8586: \"$ac_try\"") >&5
8589 echo "$as_me:8589: \$? = $ac_status" >&5
8590 (exit "$ac_status"); }; }; then
8593 echo "$as_me: failed program was:" >&5
8594 cat "conftest.$ac_ext" >&5
8597 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8598 CPPFLAGS=$cf_save_CPPFLAGS
8603 if test "$cf_have_incdir" = no ; then
8604 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8606 echo "${as_me:-configure}:8606: testing adding $cf_add_incdir to include-path ..." 1>&5
8608 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8610 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8611 test "$cf_top_incdir" = "$cf_add_incdir" && break
8612 cf_add_incdir="$cf_top_incdir"
8625 echo "$as_me:8625: checking for $cf_ncuhdr_root header in include-path" >&5
8626 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8627 if test "${cf_cv_ncurses_h+set}" = set; then
8628 echo $ECHO_N "(cached) $ECHO_C" >&6
8631 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8632 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
8633 for cf_header in $cf_header_list
8636 cat >"conftest.$ac_ext" <<_ACEOF
8637 #line 8637 "configure"
8638 #include "confdefs.h"
8640 #define _XOPEN_SOURCE_EXTENDED
8641 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
8642 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
8644 #include <$cf_header>
8649 #ifdef NCURSES_VERSION
8652 #error WACS_BSSB is not defined
8655 printf("%s\\n", NCURSES_VERSION);
8660 #error __NCURSES_H is not defined
8668 rm -f "conftest.$ac_objext"
8669 if { (eval echo "$as_me:8669: \"$ac_compile\"") >&5
8670 (eval $ac_compile) 2>&5
8672 echo "$as_me:8672: \$? = $ac_status" >&5
8673 (exit "$ac_status"); } &&
8674 { ac_try='test -s "conftest.$ac_objext"'
8675 { (eval echo "$as_me:8675: \"$ac_try\"") >&5
8678 echo "$as_me:8678: \$? = $ac_status" >&5
8679 (exit "$ac_status"); }; }; then
8680 cf_cv_ncurses_h=$cf_header
8683 echo "$as_me: failed program was:" >&5
8684 cat "conftest.$ac_ext" >&5
8687 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8689 test "$cf_cv_ncurses_h" != no && break
8693 echo "$as_me:8693: result: $cf_cv_ncurses_h" >&5
8694 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8696 if test "$cf_cv_ncurses_h" != no ; then
8697 cf_cv_ncurses_header=$cf_cv_ncurses_h
8700 echo "$as_me:8700: checking for $cf_ncuhdr_root include-path" >&5
8701 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8702 if test "${cf_cv_ncurses_h2+set}" = set; then
8703 echo $ECHO_N "(cached) $ECHO_C" >&6
8706 test -n "$verbose" && echo
8710 # collect the current set of include-directories from compiler flags
8711 cf_header_path_list=""
8712 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8713 for cf_header_path in $CPPFLAGS $CFLAGS
8715 case "$cf_header_path" in
8717 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8719 test "x$cf_header_path" != "xNONE" && \
8720 test -d "$cf_header_path" && \
8722 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8723 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8724 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8725 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8726 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8727 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"
8730 cf_header_path_list="$cf_header_path_list $cf_search"
8736 # add the variations for the package we are looking for
8740 test "x$prefix" != "xNONE" && \
8741 test -d "$prefix" && \
8743 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8744 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8745 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8746 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8747 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8748 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8751 for cf_subdir_prefix in \
8760 test "x$cf_subdir_prefix" != "x$prefix" && \
8761 test -d "$cf_subdir_prefix" && \
8762 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8763 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8764 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8765 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8766 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8767 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8768 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"
8773 test "$includedir" != NONE && \
8774 test "$includedir" != "/usr/include" && \
8775 test -d "$includedir" && {
8776 test -d "$includedir" && cf_search="$cf_search $includedir"
8777 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8780 test "$oldincludedir" != NONE && \
8781 test "$oldincludedir" != "/usr/include" && \
8782 test -d "$oldincludedir" && {
8783 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8784 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8787 cf_search="$cf_search $cf_header_path_list"
8789 test -n "$verbose" && echo "search path $cf_search"
8790 cf_save2_CPPFLAGS="$CPPFLAGS"
8791 for cf_incdir in $cf_search
8794 if test -n "$cf_incdir" ; then
8795 for cf_add_incdir in $cf_incdir
8797 while test "$cf_add_incdir" != /usr/include
8799 if test -d "$cf_add_incdir"
8802 if test -n "$CFLAGS$CPPFLAGS" ; then
8803 # a loop is needed to ensure we can add subdirs of existing dirs
8804 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8805 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8806 cf_have_incdir=yes; break
8811 if test "$cf_have_incdir" = no ; then
8812 if test "$cf_add_incdir" = /usr/local/include ; then
8813 if test "$GCC" = yes
8815 cf_save_CPPFLAGS=$CPPFLAGS
8817 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8818 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8820 cat >"conftest.$ac_ext" <<_ACEOF
8821 #line 8821 "configure"
8822 #include "confdefs.h"
8832 rm -f "conftest.$ac_objext"
8833 if { (eval echo "$as_me:8833: \"$ac_compile\"") >&5
8834 (eval $ac_compile) 2>&5
8836 echo "$as_me:8836: \$? = $ac_status" >&5
8837 (exit "$ac_status"); } &&
8838 { ac_try='test -s "conftest.$ac_objext"'
8839 { (eval echo "$as_me:8839: \"$ac_try\"") >&5
8842 echo "$as_me:8842: \$? = $ac_status" >&5
8843 (exit "$ac_status"); }; }; then
8846 echo "$as_me: failed program was:" >&5
8847 cat "conftest.$ac_ext" >&5
8850 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8851 CPPFLAGS=$cf_save_CPPFLAGS
8856 if test "$cf_have_incdir" = no ; then
8857 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8859 echo "${as_me:-configure}:8859: testing adding $cf_add_incdir to include-path ..." 1>&5
8861 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8863 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8864 test "$cf_top_incdir" = "$cf_add_incdir" && break
8865 cf_add_incdir="$cf_top_incdir"
8881 cat >"conftest.$ac_ext" <<_ACEOF
8882 #line 8882 "configure"
8883 #include "confdefs.h"
8885 #include <$cf_header>
8890 #ifdef NCURSES_VERSION
8892 printf("%s\\n", NCURSES_VERSION);
8897 #error __NCURSES_H is not defined
8905 rm -f "conftest.$ac_objext"
8906 if { (eval echo "$as_me:8906: \"$ac_compile\"") >&5
8907 (eval $ac_compile) 2>&5
8909 echo "$as_me:8909: \$? = $ac_status" >&5
8910 (exit "$ac_status"); } &&
8911 { ac_try='test -s "conftest.$ac_objext"'
8912 { (eval echo "$as_me:8912: \"$ac_try\"") >&5
8915 echo "$as_me:8915: \$? = $ac_status" >&5
8916 (exit "$ac_status"); }; }; then
8917 cf_cv_ncurses_h2=$cf_header
8920 echo "$as_me: failed program was:" >&5
8921 cat "conftest.$ac_ext" >&5
8924 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8926 if test "$cf_cv_ncurses_h2" != no ; then
8927 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8928 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
8931 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8933 CPPFLAGS="$cf_save2_CPPFLAGS"
8934 test "$cf_cv_ncurses_h2" != no && break
8936 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8936: error: not found" >&5
8937 echo "$as_me: error: not found" >&2;}
8938 { (exit 1); exit 1; }; }
8941 echo "$as_me:8941: result: $cf_cv_ncurses_h2" >&5
8942 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8944 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
8945 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
8946 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
8947 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
8950 if test -n "$cf_1st_incdir" ; then
8951 for cf_add_incdir in $cf_1st_incdir
8953 while test "$cf_add_incdir" != /usr/include
8955 if test -d "$cf_add_incdir"
8958 if test -n "$CFLAGS$CPPFLAGS" ; then
8959 # a loop is needed to ensure we can add subdirs of existing dirs
8960 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8961 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8962 cf_have_incdir=yes; break
8967 if test "$cf_have_incdir" = no ; then
8968 if test "$cf_add_incdir" = /usr/local/include ; then
8969 if test "$GCC" = yes
8971 cf_save_CPPFLAGS=$CPPFLAGS
8973 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8974 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8976 cat >"conftest.$ac_ext" <<_ACEOF
8977 #line 8977 "configure"
8978 #include "confdefs.h"
8988 rm -f "conftest.$ac_objext"
8989 if { (eval echo "$as_me:8989: \"$ac_compile\"") >&5
8990 (eval $ac_compile) 2>&5
8992 echo "$as_me:8992: \$? = $ac_status" >&5
8993 (exit "$ac_status"); } &&
8994 { ac_try='test -s "conftest.$ac_objext"'
8995 { (eval echo "$as_me:8995: \"$ac_try\"") >&5
8998 echo "$as_me:8998: \$? = $ac_status" >&5
8999 (exit "$ac_status"); }; }; then
9002 echo "$as_me: failed program was:" >&5
9003 cat "conftest.$ac_ext" >&5
9006 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9007 CPPFLAGS=$cf_save_CPPFLAGS
9012 if test "$cf_have_incdir" = no ; then
9013 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9015 echo "${as_me:-configure}:9015: testing adding $cf_add_incdir to include-path ..." 1>&5
9017 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9019 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9020 test "$cf_top_incdir" = "$cf_add_incdir" && break
9021 cf_add_incdir="$cf_top_incdir"
9034 # Set definitions to allow ifdef'ing for ncurses.h
9036 case "$cf_cv_ncurses_header" in
9039 cat >>confdefs.h <<\EOF
9040 #define HAVE_NCURSES_H 1
9046 case "$cf_cv_ncurses_header" in
9047 (ncurses/curses.h|ncurses/ncurses.h)
9049 cat >>confdefs.h <<\EOF
9050 #define HAVE_NCURSES_NCURSES_H 1
9054 (ncursesw/curses.h|ncursesw/ncurses.h)
9056 cat >>confdefs.h <<\EOF
9057 #define HAVE_NCURSESW_NCURSES_H 1
9063 echo "$as_me:9063: checking for terminfo header" >&5
9064 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9065 if test "${cf_cv_term_header+set}" = set; then
9066 echo $ECHO_N "(cached) $ECHO_C" >&6
9069 case "${cf_cv_ncurses_header}" in
9070 (*/ncurses.h|*/ncursesw.h)
9071 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9074 cf_term_header=term.h
9078 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9080 cat >"conftest.$ac_ext" <<_ACEOF
9081 #line 9081 "configure"
9082 #include "confdefs.h"
9084 #include <${cf_cv_ncurses_header:-curses.h}>
9090 int x = auto_left_margin; (void)x
9095 rm -f "conftest.$ac_objext"
9096 if { (eval echo "$as_me:9096: \"$ac_compile\"") >&5
9097 (eval $ac_compile) 2>&5
9099 echo "$as_me:9099: \$? = $ac_status" >&5
9100 (exit "$ac_status"); } &&
9101 { ac_try='test -s "conftest.$ac_objext"'
9102 { (eval echo "$as_me:9102: \"$ac_try\"") >&5
9105 echo "$as_me:9105: \$? = $ac_status" >&5
9106 (exit "$ac_status"); }; }; then
9108 cf_cv_term_header="$cf_test"
9110 echo "$as_me: failed program was:" >&5
9111 cat "conftest.$ac_ext" >&5
9113 cf_cv_term_header=unknown
9116 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9117 test "$cf_cv_term_header" != unknown && break
9121 echo "$as_me:9121: result: $cf_cv_term_header" >&5
9122 echo "${ECHO_T}$cf_cv_term_header" >&6
9124 # Set definitions to allow ifdef'ing to accommodate subdirectories
9126 case "$cf_cv_term_header" in
9129 cat >>confdefs.h <<\EOF
9130 #define HAVE_TERM_H 1
9136 case "$cf_cv_term_header" in
9139 cat >>confdefs.h <<\EOF
9140 #define HAVE_NCURSES_TERM_H 1
9146 cat >>confdefs.h <<\EOF
9147 #define HAVE_NCURSESW_TERM_H 1
9153 # some applications need this, but should check for NCURSES_VERSION
9155 cat >>confdefs.h <<\EOF
9159 echo "$as_me:9159: checking for ncurses version" >&5
9160 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9161 if test "${cf_cv_ncurses_version+set}" = set; then
9162 echo $ECHO_N "(cached) $ECHO_C" >&6
9165 cf_cv_ncurses_version=no
9167 rm -f "$cf_tempfile"
9168 if test "$cross_compiling" = yes; then
9170 # This will not work if the preprocessor splits the line after the
9171 # Autoconf token. The 'unproto' program does that.
9172 cat > "conftest.$ac_ext" <<EOF
9173 #include <${cf_cv_ncurses_header:-curses.h}>
9175 #ifdef NCURSES_VERSION
9176 Autoconf NCURSES_VERSION
9184 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9185 { (eval echo "$as_me:9185: \"$cf_try\"") >&5
9188 echo "$as_me:9188: \$? = $ac_status" >&5
9189 (exit "$ac_status"); }
9190 if test -f conftest.out ; then
9191 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
9192 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9197 cat >"conftest.$ac_ext" <<_ACEOF
9198 #line 9198 "configure"
9199 #include "confdefs.h"
9201 $ac_includes_default
9203 #include <${cf_cv_ncurses_header:-curses.h}>
9207 FILE *fp = fopen("$cf_tempfile", "w");
9208 #ifdef NCURSES_VERSION
9209 # ifdef NCURSES_VERSION_PATCH
9210 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9212 fprintf(fp, "%s\\n", NCURSES_VERSION);
9216 fprintf(fp, "old\\n");
9218 #error expected ncurses header to define __NCURSES_H
9221 ${cf_cv_main_return:-return}(0);
9224 rm -f "conftest$ac_exeext"
9225 if { (eval echo "$as_me:9225: \"$ac_link\"") >&5
9226 (eval $ac_link) 2>&5
9228 echo "$as_me:9228: \$? = $ac_status" >&5
9229 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9230 { (eval echo "$as_me:9230: \"$ac_try\"") >&5
9233 echo "$as_me:9233: \$? = $ac_status" >&5
9234 (exit "$ac_status"); }; }; then
9236 cf_cv_ncurses_version=`cat $cf_tempfile`
9238 echo "$as_me: program exited with status $ac_status" >&5
9239 echo "$as_me: failed program was:" >&5
9240 cat "conftest.$ac_ext" >&5
9242 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9244 rm -f "$cf_tempfile"
9247 echo "$as_me:9247: result: $cf_cv_ncurses_version" >&5
9248 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9249 test "$cf_cv_ncurses_version" = no ||
9250 cat >>confdefs.h <<\EOF
9254 cf_nculib_root=ncursesw
9255 # This works, except for the special case where we find gpm, but
9256 # ncurses is in a nonstandard location via $LIBS, and we really want
9259 cf_ncurses_SAVE="$LIBS"
9260 echo "$as_me:9260: checking for Gpm_Open in -lgpm" >&5
9261 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9262 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9263 echo $ECHO_N "(cached) $ECHO_C" >&6
9265 ac_check_lib_save_LIBS=$LIBS
9267 cat >"conftest.$ac_ext" <<_ACEOF
9268 #line 9268 "configure"
9269 #include "confdefs.h"
9271 /* Override any gcc2 internal prototype to avoid an error. */
9275 /* We use char because int might match the return type of a gcc2
9276 builtin and then its argument prototype would still apply. */
9277 char Gpm_Open (void);
9286 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9287 if { (eval echo "$as_me:9287: \"$ac_link\"") >&5
9288 (eval $ac_link) 2>&5
9290 echo "$as_me:9290: \$? = $ac_status" >&5
9291 (exit "$ac_status"); } &&
9292 { ac_try='test -s "conftest$ac_exeext"'
9293 { (eval echo "$as_me:9293: \"$ac_try\"") >&5
9296 echo "$as_me:9296: \$? = $ac_status" >&5
9297 (exit "$ac_status"); }; }; then
9298 ac_cv_lib_gpm_Gpm_Open=yes
9300 echo "$as_me: failed program was:" >&5
9301 cat "conftest.$ac_ext" >&5
9302 ac_cv_lib_gpm_Gpm_Open=no
9304 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9305 LIBS=$ac_check_lib_save_LIBS
9307 echo "$as_me:9307: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9308 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9309 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
9310 echo "$as_me:9310: checking for initscr in -lgpm" >&5
9311 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9312 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9313 echo $ECHO_N "(cached) $ECHO_C" >&6
9315 ac_check_lib_save_LIBS=$LIBS
9317 cat >"conftest.$ac_ext" <<_ACEOF
9318 #line 9318 "configure"
9319 #include "confdefs.h"
9321 /* Override any gcc2 internal prototype to avoid an error. */
9325 /* We use char because int might match the return type of a gcc2
9326 builtin and then its argument prototype would still apply. */
9327 char initscr (void);
9336 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9337 if { (eval echo "$as_me:9337: \"$ac_link\"") >&5
9338 (eval $ac_link) 2>&5
9340 echo "$as_me:9340: \$? = $ac_status" >&5
9341 (exit "$ac_status"); } &&
9342 { ac_try='test -s "conftest$ac_exeext"'
9343 { (eval echo "$as_me:9343: \"$ac_try\"") >&5
9346 echo "$as_me:9346: \$? = $ac_status" >&5
9347 (exit "$ac_status"); }; }; then
9348 ac_cv_lib_gpm_initscr=yes
9350 echo "$as_me: failed program was:" >&5
9351 cat "conftest.$ac_ext" >&5
9352 ac_cv_lib_gpm_initscr=no
9354 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9355 LIBS=$ac_check_lib_save_LIBS
9357 echo "$as_me:9357: result: $ac_cv_lib_gpm_initscr" >&5
9358 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9359 if test "$ac_cv_lib_gpm_initscr" = yes; then
9360 LIBS="$cf_ncurses_SAVE"
9362 cf_ncurses_LIBS="-lgpm"
9369 # This is only necessary if you are linking against an obsolete
9370 # version of ncurses (but it should do no harm, since it is static).
9371 if test "$cf_nculib_root" = ncurses ; then
9372 echo "$as_me:9372: checking for tgoto in -lmytinfo" >&5
9373 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9374 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9375 echo $ECHO_N "(cached) $ECHO_C" >&6
9377 ac_check_lib_save_LIBS=$LIBS
9378 LIBS="-lmytinfo $LIBS"
9379 cat >"conftest.$ac_ext" <<_ACEOF
9380 #line 9380 "configure"
9381 #include "confdefs.h"
9383 /* Override any gcc2 internal prototype to avoid an error. */
9387 /* We use char because int might match the return type of a gcc2
9388 builtin and then its argument prototype would still apply. */
9398 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9399 if { (eval echo "$as_me:9399: \"$ac_link\"") >&5
9400 (eval $ac_link) 2>&5
9402 echo "$as_me:9402: \$? = $ac_status" >&5
9403 (exit "$ac_status"); } &&
9404 { ac_try='test -s "conftest$ac_exeext"'
9405 { (eval echo "$as_me:9405: \"$ac_try\"") >&5
9408 echo "$as_me:9408: \$? = $ac_status" >&5
9409 (exit "$ac_status"); }; }; then
9410 ac_cv_lib_mytinfo_tgoto=yes
9412 echo "$as_me: failed program was:" >&5
9413 cat "conftest.$ac_ext" >&5
9414 ac_cv_lib_mytinfo_tgoto=no
9416 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9417 LIBS=$ac_check_lib_save_LIBS
9419 echo "$as_me:9419: result: $ac_cv_lib_mytinfo_tgoto" >&5
9420 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9421 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
9422 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9432 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9434 for cf_add_1lib in $cf_add_0lib; do
9435 for cf_add_2lib in $cf_add_libs; do
9436 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9441 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9445 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
9451 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9453 for cf_add_1lib in $cf_add_0lib; do
9454 for cf_add_2lib in $cf_add_libs; do
9455 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9460 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9466 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
9468 echo "$as_me:9468: checking for initscr" >&5
9469 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9470 if test "${ac_cv_func_initscr+set}" = set; then
9471 echo $ECHO_N "(cached) $ECHO_C" >&6
9473 cat >"conftest.$ac_ext" <<_ACEOF
9474 #line 9474 "configure"
9475 #include "confdefs.h"
9476 #define initscr autoconf_temporary
9477 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9484 /* We use char because int might match the return type of a gcc2
9485 builtin and then its argument prototype would still apply. */
9486 char initscr (void);
9492 /* The GNU C library defines stubs for functions which it implements
9493 to always fail with ENOSYS. Some functions are actually named
9494 something starting with __ and the normal name is an alias. */
9495 #if defined (__stub_initscr) || defined (__stub___initscr)
9496 #error found stub for initscr
9504 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9505 if { (eval echo "$as_me:9505: \"$ac_link\"") >&5
9506 (eval $ac_link) 2>&5
9508 echo "$as_me:9508: \$? = $ac_status" >&5
9509 (exit "$ac_status"); } &&
9510 { ac_try='test -s "conftest$ac_exeext"'
9511 { (eval echo "$as_me:9511: \"$ac_try\"") >&5
9514 echo "$as_me:9514: \$? = $ac_status" >&5
9515 (exit "$ac_status"); }; }; then
9516 ac_cv_func_initscr=yes
9518 echo "$as_me: failed program was:" >&5
9519 cat "conftest.$ac_ext" >&5
9520 ac_cv_func_initscr=no
9522 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9524 echo "$as_me:9524: result: $ac_cv_func_initscr" >&5
9525 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9526 if test "$ac_cv_func_initscr" = yes; then
9527 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9530 cf_save_LIBS="$LIBS"
9531 echo "$as_me:9531: checking for initscr in -l$cf_nculib_root" >&5
9532 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9533 LIBS="-l$cf_nculib_root $LIBS"
9534 cat >"conftest.$ac_ext" <<_ACEOF
9535 #line 9535 "configure"
9536 #include "confdefs.h"
9537 #include <${cf_cv_ncurses_header:-curses.h}>
9546 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9547 if { (eval echo "$as_me:9547: \"$ac_link\"") >&5
9548 (eval $ac_link) 2>&5
9550 echo "$as_me:9550: \$? = $ac_status" >&5
9551 (exit "$ac_status"); } &&
9552 { ac_try='test -s "conftest$ac_exeext"'
9553 { (eval echo "$as_me:9553: \"$ac_try\"") >&5
9556 echo "$as_me:9556: \$? = $ac_status" >&5
9557 (exit "$ac_status"); }; }; then
9558 echo "$as_me:9558: result: yes" >&5
9559 echo "${ECHO_T}yes" >&6
9560 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9563 echo "$as_me: failed program was:" >&5
9564 cat "conftest.$ac_ext" >&5
9565 echo "$as_me:9565: result: no" >&5
9566 echo "${ECHO_T}no" >&6
9569 cf_library_path_list=""
9570 if test -n "${LDFLAGS}${LIBS}" ; then
9571 for cf_library_path in $LDFLAGS $LIBS
9573 case "$cf_library_path" in
9575 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9577 test "x$cf_library_path" != "xNONE" && \
9578 test -d "$cf_library_path" && \
9580 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9581 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
9582 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9583 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9584 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9585 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"
9588 cf_library_path_list="$cf_library_path_list $cf_search"
9596 test "x$prefix" != "xNONE" && \
9597 test -d "$prefix" && \
9599 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9600 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
9601 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9602 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9603 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9604 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9607 for cf_subdir_prefix in \
9616 test "x$cf_subdir_prefix" != "x$prefix" && \
9617 test -d "$cf_subdir_prefix" && \
9618 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9619 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9620 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
9621 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9622 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9623 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9624 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"
9629 cf_search="$cf_library_path_list $cf_search"
9631 for cf_libdir in $cf_search
9633 echo "$as_me:9633: checking for -l$cf_nculib_root in $cf_libdir" >&5
9634 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9635 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9636 cat >"conftest.$ac_ext" <<_ACEOF
9637 #line 9637 "configure"
9638 #include "confdefs.h"
9639 #include <${cf_cv_ncurses_header:-curses.h}>
9648 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9649 if { (eval echo "$as_me:9649: \"$ac_link\"") >&5
9650 (eval $ac_link) 2>&5
9652 echo "$as_me:9652: \$? = $ac_status" >&5
9653 (exit "$ac_status"); } &&
9654 { ac_try='test -s "conftest$ac_exeext"'
9655 { (eval echo "$as_me:9655: \"$ac_try\"") >&5
9658 echo "$as_me:9658: \$? = $ac_status" >&5
9659 (exit "$ac_status"); }; }; then
9660 echo "$as_me:9660: result: yes" >&5
9661 echo "${ECHO_T}yes" >&6
9662 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9665 echo "$as_me: failed program was:" >&5
9666 cat "conftest.$ac_ext" >&5
9667 echo "$as_me:9667: result: no" >&5
9668 echo "${ECHO_T}no" >&6
9669 LIBS="$cf_save_LIBS"
9671 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9675 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9679 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
9681 if test "$cf_found_library" = no ; then
9682 { { echo "$as_me:9682: error: Cannot link $cf_nculib_root library" >&5
9683 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9684 { (exit 1); exit 1; }; }
9689 if test -n "$cf_ncurses_LIBS" ; then
9690 echo "$as_me:9690: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9691 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9692 cf_ncurses_SAVE="$LIBS"
9693 for p in $cf_ncurses_LIBS ; do
9694 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
9695 if test "$q" != "$LIBS" ; then
9699 cat >"conftest.$ac_ext" <<_ACEOF
9700 #line 9700 "configure"
9701 #include "confdefs.h"
9702 #include <${cf_cv_ncurses_header:-curses.h}>
9706 initscr(); mousemask(0,0); tigetstr((char *)0);
9711 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9712 if { (eval echo "$as_me:9712: \"$ac_link\"") >&5
9713 (eval $ac_link) 2>&5
9715 echo "$as_me:9715: \$? = $ac_status" >&5
9716 (exit "$ac_status"); } &&
9717 { ac_try='test -s "conftest$ac_exeext"'
9718 { (eval echo "$as_me:9718: \"$ac_try\"") >&5
9721 echo "$as_me:9721: \$? = $ac_status" >&5
9722 (exit "$ac_status"); }; }; then
9723 echo "$as_me:9723: result: yes" >&5
9724 echo "${ECHO_T}yes" >&6
9726 echo "$as_me: failed program was:" >&5
9727 cat "conftest.$ac_ext" >&5
9728 echo "$as_me:9728: result: no" >&5
9729 echo "${ECHO_T}no" >&6
9730 LIBS="$cf_ncurses_SAVE"
9732 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9735 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9737 cat >>confdefs.h <<EOF
9738 #define $cf_nculib_ROOT 1
9748 cf_ncuconfig_root=ncurses
9749 cf_have_ncuconfig=no
9751 if test "x${PKG_CONFIG:=none}" != xnone; then
9752 echo "$as_me:9752: checking pkg-config for $cf_ncuconfig_root" >&5
9753 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9754 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9755 echo "$as_me:9755: result: yes" >&5
9756 echo "${ECHO_T}yes" >&6
9758 echo "$as_me:9758: checking if the $cf_ncuconfig_root package files work" >&5
9759 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9760 cf_have_ncuconfig=unknown
9762 cf_save_CFLAGS="$CFLAGS"
9763 cf_save_CPPFLAGS="$CPPFLAGS"
9764 cf_save_LIBS="$LIBS"
9766 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
9767 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9769 # while -W for passing linker flags is prevalent, it is not "standard".
9770 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9771 # incompatible _and_ non-standard -W option which gives an error. Work
9772 # around that pitfall.
9773 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9779 cf_new_extra_cppflags=
9781 for cf_add_cflags in $cf_pkg_cflags
9783 case "$cf_fix_cppflags" in
9785 case "$cf_add_cflags" in
9786 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9787 case "$cf_add_cflags" in
9789 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9791 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9792 && test -z "${cf_tst_cflags}" \
9793 && cf_fix_cppflags=yes
9795 if test "$cf_fix_cppflags" = yes ; then
9797 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9798 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9801 elif test "${cf_tst_cflags}" = "\"'" ; then
9803 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9804 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9814 case "$cf_add_cflags" in
9816 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9818 CPPFLAGS=`echo "$CPPFLAGS" | \
9819 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9820 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9825 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9826 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9833 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9834 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9841 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9842 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9844 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9846 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9847 && test -z "${cf_tst_cflags}" \
9848 && cf_fix_cppflags=no
9853 if test -n "$cf_new_cflags" ; then
9855 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9856 CFLAGS="${CFLAGS}$cf_new_cflags"
9860 if test -n "$cf_new_cppflags" ; then
9862 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9863 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9867 if test -n "$cf_new_extra_cppflags" ; then
9869 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9870 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9877 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9879 for cf_add_1lib in $cf_add_0lib; do
9880 for cf_add_2lib in $cf_add_libs; do
9881 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9886 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9890 cat >"conftest.$ac_ext" <<_ACEOF
9891 #line 9891 "configure"
9892 #include "confdefs.h"
9893 #include <${cf_cv_ncurses_header:-curses.h}>
9897 initscr(); mousemask(0,0); tigetstr((char *)0);
9902 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9903 if { (eval echo "$as_me:9903: \"$ac_link\"") >&5
9904 (eval $ac_link) 2>&5
9906 echo "$as_me:9906: \$? = $ac_status" >&5
9907 (exit "$ac_status"); } &&
9908 { ac_try='test -s "conftest$ac_exeext"'
9909 { (eval echo "$as_me:9909: \"$ac_try\"") >&5
9912 echo "$as_me:9912: \$? = $ac_status" >&5
9913 (exit "$ac_status"); }; }; then
9914 if test "$cross_compiling" = yes; then
9915 cf_test_ncuconfig=maybe
9917 cat >"conftest.$ac_ext" <<_ACEOF
9918 #line 9918 "configure"
9919 #include "confdefs.h"
9920 #include <${cf_cv_ncurses_header:-curses.h}>
9922 { const char *xx = curses_version(); return (xx == 0); }
9924 rm -f "conftest$ac_exeext"
9925 if { (eval echo "$as_me:9925: \"$ac_link\"") >&5
9926 (eval $ac_link) 2>&5
9928 echo "$as_me:9928: \$? = $ac_status" >&5
9929 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9930 { (eval echo "$as_me:9930: \"$ac_try\"") >&5
9933 echo "$as_me:9933: \$? = $ac_status" >&5
9934 (exit "$ac_status"); }; }; then
9935 cf_test_ncuconfig=yes
9937 echo "$as_me: program exited with status $ac_status" >&5
9938 echo "$as_me: failed program was:" >&5
9939 cat "conftest.$ac_ext" >&5
9940 cf_test_ncuconfig=no
9942 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9945 echo "$as_me: failed program was:" >&5
9946 cat "conftest.$ac_ext" >&5
9947 cf_test_ncuconfig=no
9949 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9951 CFLAGS="$cf_save_CFLAGS"
9952 CPPFLAGS="$cf_save_CPPFLAGS"
9953 LIBS="$cf_save_LIBS"
9955 if test "x$cf_test_ncuconfig" != xyes; then
9956 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9957 cf_pkg_cflags="$cf_temp"
9958 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9959 cf_pkg_libs="$cf_temp"
9964 for cf_add_cflags in $cf_pkg_cflags
9966 case "x$cf_add_cflags" in
9969 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9972 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'`
9973 test "$CFLAGS" != "$cf_old_cflag" || break
9975 CFLAGS="$cf_old_cflag"
9978 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9981 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'`
9982 test "$CPPFLAGS" != "$cf_old_cflag" || break
9984 CPPFLAGS="$cf_old_cflag"
9993 cf_new_extra_cppflags=
9995 for cf_add_cflags in $cf_add_cflags
9997 case "$cf_fix_cppflags" in
9999 case "$cf_add_cflags" in
10000 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10001 case "$cf_add_cflags" in
10003 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10005 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10006 && test -z "${cf_tst_cflags}" \
10007 && cf_fix_cppflags=yes
10009 if test "$cf_fix_cppflags" = yes ; then
10011 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10012 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10015 elif test "${cf_tst_cflags}" = "\"'" ; then
10017 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10018 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10024 case "$CPPFLAGS" in
10028 case "$cf_add_cflags" in
10030 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10032 CPPFLAGS=`echo "$CPPFLAGS" | \
10033 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10034 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10039 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10040 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10047 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10048 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10055 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10056 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10058 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10060 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10061 && test -z "${cf_tst_cflags}" \
10062 && cf_fix_cppflags=no
10067 if test -n "$cf_new_cflags" ; then
10069 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10070 CFLAGS="${CFLAGS}$cf_new_cflags"
10074 if test -n "$cf_new_cppflags" ; then
10076 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10077 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10081 if test -n "$cf_new_extra_cppflags" ; then
10083 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10084 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10090 cf_add_libs="$LIBS"
10093 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10094 # filter duplicates
10095 for cf_add_1lib in $cf_add_0lib; do
10096 for cf_add_2lib in $cf_add_libs; do
10097 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10102 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10104 LIBS="$cf_add_libs"
10106 cat >"conftest.$ac_ext" <<_ACEOF
10107 #line 10107 "configure"
10108 #include "confdefs.h"
10109 #include <${cf_cv_ncurses_header:-curses.h}>
10113 initscr(); mousemask(0,0); tigetstr((char *)0);
10118 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10119 if { (eval echo "$as_me:10119: \"$ac_link\"") >&5
10120 (eval $ac_link) 2>&5
10122 echo "$as_me:10122: \$? = $ac_status" >&5
10123 (exit "$ac_status"); } &&
10124 { ac_try='test -s "conftest$ac_exeext"'
10125 { (eval echo "$as_me:10125: \"$ac_try\"") >&5
10126 (eval $ac_try) 2>&5
10128 echo "$as_me:10128: \$? = $ac_status" >&5
10129 (exit "$ac_status"); }; }; then
10130 if test "$cross_compiling" = yes; then
10131 cf_have_ncuconfig=maybe
10133 cat >"conftest.$ac_ext" <<_ACEOF
10134 #line 10134 "configure"
10135 #include "confdefs.h"
10136 #include <${cf_cv_ncurses_header:-curses.h}>
10138 { const char *xx = curses_version(); return (xx == 0); }
10140 rm -f "conftest$ac_exeext"
10141 if { (eval echo "$as_me:10141: \"$ac_link\"") >&5
10142 (eval $ac_link) 2>&5
10144 echo "$as_me:10144: \$? = $ac_status" >&5
10145 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10146 { (eval echo "$as_me:10146: \"$ac_try\"") >&5
10147 (eval $ac_try) 2>&5
10149 echo "$as_me:10149: \$? = $ac_status" >&5
10150 (exit "$ac_status"); }; }; then
10151 cf_have_ncuconfig=yes
10153 echo "$as_me: program exited with status $ac_status" >&5
10154 echo "$as_me: failed program was:" >&5
10155 cat "conftest.$ac_ext" >&5
10156 cf_have_ncuconfig=no
10158 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10161 echo "$as_me: failed program was:" >&5
10162 cat "conftest.$ac_ext" >&5
10163 cf_have_ncuconfig=no
10165 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10166 echo "$as_me:10166: result: $cf_have_ncuconfig" >&5
10167 echo "${ECHO_T}$cf_have_ncuconfig" >&6
10168 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
10169 if test "$cf_have_ncuconfig" != "yes"
10171 CPPFLAGS="$cf_save_CPPFLAGS"
10172 LIBS="$cf_save_LIBS"
10173 NCURSES_CONFIG_PKG=none
10176 cat >>confdefs.h <<\EOF
10180 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
10182 echo "$as_me:10182: checking for terminfo header" >&5
10183 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10184 if test "${cf_cv_term_header+set}" = set; then
10185 echo $ECHO_N "(cached) $ECHO_C" >&6
10188 case "${cf_cv_ncurses_header}" in
10189 (*/ncurses.h|*/ncursesw.h)
10190 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10193 cf_term_header=term.h
10197 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10199 cat >"conftest.$ac_ext" <<_ACEOF
10200 #line 10200 "configure"
10201 #include "confdefs.h"
10203 #include <${cf_cv_ncurses_header:-curses.h}>
10204 #include <$cf_test>
10209 int x = auto_left_margin; (void)x
10214 rm -f "conftest.$ac_objext"
10215 if { (eval echo "$as_me:10215: \"$ac_compile\"") >&5
10216 (eval $ac_compile) 2>&5
10218 echo "$as_me:10218: \$? = $ac_status" >&5
10219 (exit "$ac_status"); } &&
10220 { ac_try='test -s "conftest.$ac_objext"'
10221 { (eval echo "$as_me:10221: \"$ac_try\"") >&5
10222 (eval $ac_try) 2>&5
10224 echo "$as_me:10224: \$? = $ac_status" >&5
10225 (exit "$ac_status"); }; }; then
10227 cf_cv_term_header="$cf_test"
10229 echo "$as_me: failed program was:" >&5
10230 cat "conftest.$ac_ext" >&5
10232 cf_cv_term_header=unknown
10235 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10236 test "$cf_cv_term_header" != unknown && break
10240 echo "$as_me:10240: result: $cf_cv_term_header" >&5
10241 echo "${ECHO_T}$cf_cv_term_header" >&6
10243 # Set definitions to allow ifdef'ing to accommodate subdirectories
10245 case "$cf_cv_term_header" in
10248 cat >>confdefs.h <<\EOF
10249 #define HAVE_TERM_H 1
10255 case "$cf_cv_term_header" in
10258 cat >>confdefs.h <<\EOF
10259 #define HAVE_NCURSES_TERM_H 1
10265 cat >>confdefs.h <<\EOF
10266 #define HAVE_NCURSESW_TERM_H 1
10275 echo "$as_me:10275: result: no" >&5
10276 echo "${ECHO_T}no" >&6
10277 NCURSES_CONFIG_PKG=none
10280 NCURSES_CONFIG_PKG=none
10283 if test "x$cf_have_ncuconfig" = "xno"; then
10284 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
10286 if test -n "$ac_tool_prefix"; then
10287 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10289 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
10290 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
10291 echo "$as_me:10291: checking for $ac_word" >&5
10292 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10293 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
10294 echo $ECHO_N "(cached) $ECHO_C" >&6
10296 if test -n "$NCURSES_CONFIG"; then
10297 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
10299 ac_save_IFS=$IFS; IFS=$ac_path_separator
10301 for ac_dir in $ac_dummy; do
10303 test -z "$ac_dir" && ac_dir=.
10304 $as_executable_p "$ac_dir/$ac_word" || continue
10305 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
10306 echo "$as_me:10306: found $ac_dir/$ac_word" >&5
10312 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
10313 if test -n "$NCURSES_CONFIG"; then
10314 echo "$as_me:10314: result: $NCURSES_CONFIG" >&5
10315 echo "${ECHO_T}$NCURSES_CONFIG" >&6
10317 echo "$as_me:10317: result: no" >&5
10318 echo "${ECHO_T}no" >&6
10321 test -n "$NCURSES_CONFIG" && break
10324 if test -z "$NCURSES_CONFIG"; then
10325 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
10326 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10328 # Extract the first word of "$ac_prog", so it can be a program name with args.
10329 set dummy $ac_prog; ac_word=$2
10330 echo "$as_me:10330: checking for $ac_word" >&5
10331 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10332 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
10333 echo $ECHO_N "(cached) $ECHO_C" >&6
10335 if test -n "$ac_ct_NCURSES_CONFIG"; then
10336 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
10338 ac_save_IFS=$IFS; IFS=$ac_path_separator
10340 for ac_dir in $ac_dummy; do
10342 test -z "$ac_dir" && ac_dir=.
10343 $as_executable_p "$ac_dir/$ac_word" || continue
10344 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
10345 echo "$as_me:10345: found $ac_dir/$ac_word" >&5
10351 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
10352 if test -n "$ac_ct_NCURSES_CONFIG"; then
10353 echo "$as_me:10353: result: $ac_ct_NCURSES_CONFIG" >&5
10354 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
10356 echo "$as_me:10356: result: no" >&5
10357 echo "${ECHO_T}no" >&6
10360 test -n "$ac_ct_NCURSES_CONFIG" && break
10362 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
10364 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
10367 if test "$NCURSES_CONFIG" != none ; then
10369 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
10371 case "x$cf_add_cflags" in
10374 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10377 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'`
10378 test "$CFLAGS" != "$cf_old_cflag" || break
10380 CFLAGS="$cf_old_cflag"
10383 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10386 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'`
10387 test "$CPPFLAGS" != "$cf_old_cflag" || break
10389 CPPFLAGS="$cf_old_cflag"
10398 cf_new_extra_cppflags=
10400 for cf_add_cflags in $cf_add_cflags
10402 case "$cf_fix_cppflags" in
10404 case "$cf_add_cflags" in
10405 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10406 case "$cf_add_cflags" in
10408 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10410 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10411 && test -z "${cf_tst_cflags}" \
10412 && cf_fix_cppflags=yes
10414 if test "$cf_fix_cppflags" = yes ; then
10416 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10417 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10420 elif test "${cf_tst_cflags}" = "\"'" ; then
10422 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10423 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10429 case "$CPPFLAGS" in
10433 case "$cf_add_cflags" in
10435 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10437 CPPFLAGS=`echo "$CPPFLAGS" | \
10438 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10439 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10444 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10445 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10452 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10453 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10460 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10461 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10463 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10465 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10466 && test -z "${cf_tst_cflags}" \
10467 && cf_fix_cppflags=no
10472 if test -n "$cf_new_cflags" ; then
10474 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10475 CFLAGS="${CFLAGS}$cf_new_cflags"
10479 if test -n "$cf_new_cppflags" ; then
10481 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10482 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10486 if test -n "$cf_new_extra_cppflags" ; then
10488 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10489 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10495 cf_add_libs="$LIBS"
10498 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10499 # filter duplicates
10500 for cf_add_1lib in $cf_add_0lib; do
10501 for cf_add_2lib in $cf_add_libs; do
10502 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10507 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10509 LIBS="$cf_add_libs"
10511 # even with config script, some packages use no-override for curses.h
10513 echo "$as_me:10513: checking if we have identified curses headers" >&5
10514 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10515 if test "${cf_cv_ncurses_header+set}" = set; then
10516 echo $ECHO_N "(cached) $ECHO_C" >&6
10519 cf_cv_ncurses_header=none
10521 ncurses.h ncurses/ncurses.h \
10522 curses.h ncurses/curses.h
10524 cat >"conftest.$ac_ext" <<_ACEOF
10525 #line 10525 "configure"
10526 #include "confdefs.h"
10527 #include <${cf_header}>
10531 initscr(); endwin()
10536 rm -f "conftest.$ac_objext"
10537 if { (eval echo "$as_me:10537: \"$ac_compile\"") >&5
10538 (eval $ac_compile) 2>&5
10540 echo "$as_me:10540: \$? = $ac_status" >&5
10541 (exit "$ac_status"); } &&
10542 { ac_try='test -s "conftest.$ac_objext"'
10543 { (eval echo "$as_me:10543: \"$ac_try\"") >&5
10544 (eval $ac_try) 2>&5
10546 echo "$as_me:10546: \$? = $ac_status" >&5
10547 (exit "$ac_status"); }; }; then
10548 cf_cv_ncurses_header=$cf_header; break
10550 echo "$as_me: failed program was:" >&5
10551 cat "conftest.$ac_ext" >&5
10553 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10557 echo "$as_me:10557: result: $cf_cv_ncurses_header" >&5
10558 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10560 if test "$cf_cv_ncurses_header" = none ; then
10561 { { echo "$as_me:10561: error: No curses header-files found" >&5
10562 echo "$as_me: error: No curses header-files found" >&2;}
10563 { (exit 1); exit 1; }; }
10566 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10568 for ac_header in $cf_cv_ncurses_header
10570 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10571 echo "$as_me:10571: checking for $ac_header" >&5
10572 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10573 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10574 echo $ECHO_N "(cached) $ECHO_C" >&6
10576 cat >"conftest.$ac_ext" <<_ACEOF
10577 #line 10577 "configure"
10578 #include "confdefs.h"
10579 #include <$ac_header>
10581 if { (eval echo "$as_me:10581: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10582 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10584 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10586 cat conftest.err >&5
10587 echo "$as_me:10587: \$? = $ac_status" >&5
10588 (exit "$ac_status"); } >/dev/null; then
10589 if test -s conftest.err; then
10590 ac_cpp_err=$ac_c_preproc_warn_flag
10597 if test -z "$ac_cpp_err"; then
10598 eval "$as_ac_Header=yes"
10600 echo "$as_me: failed program was:" >&5
10601 cat "conftest.$ac_ext" >&5
10602 eval "$as_ac_Header=no"
10604 rm -f conftest.err "conftest.$ac_ext"
10606 echo "$as_me:10606: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10607 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10608 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10609 cat >>confdefs.h <<EOF
10610 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10616 cat >>confdefs.h <<\EOF
10620 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10622 cat >>confdefs.h <<EOF
10623 #define $cf_nculib_ROOT 1
10626 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
10630 cf_ncuhdr_root=ncurses
10632 test -n "$cf_cv_curses_dir" && \
10633 test "$cf_cv_curses_dir" != "no" && { \
10635 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
10636 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
10638 while test "$cf_add_incdir" != /usr/include
10640 if test -d "$cf_add_incdir"
10643 if test -n "$CFLAGS$CPPFLAGS" ; then
10644 # a loop is needed to ensure we can add subdirs of existing dirs
10645 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10646 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10647 cf_have_incdir=yes; break
10652 if test "$cf_have_incdir" = no ; then
10653 if test "$cf_add_incdir" = /usr/local/include ; then
10654 if test "$GCC" = yes
10656 cf_save_CPPFLAGS=$CPPFLAGS
10658 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10659 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10661 cat >"conftest.$ac_ext" <<_ACEOF
10662 #line 10662 "configure"
10663 #include "confdefs.h"
10673 rm -f "conftest.$ac_objext"
10674 if { (eval echo "$as_me:10674: \"$ac_compile\"") >&5
10675 (eval $ac_compile) 2>&5
10677 echo "$as_me:10677: \$? = $ac_status" >&5
10678 (exit "$ac_status"); } &&
10679 { ac_try='test -s "conftest.$ac_objext"'
10680 { (eval echo "$as_me:10680: \"$ac_try\"") >&5
10681 (eval $ac_try) 2>&5
10683 echo "$as_me:10683: \$? = $ac_status" >&5
10684 (exit "$ac_status"); }; }; then
10687 echo "$as_me: failed program was:" >&5
10688 cat "conftest.$ac_ext" >&5
10691 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10692 CPPFLAGS=$cf_save_CPPFLAGS
10697 if test "$cf_have_incdir" = no ; then
10698 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10700 echo "${as_me:-configure}:10700: testing adding $cf_add_incdir to include-path ..." 1>&5
10702 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10704 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10705 test "$cf_top_incdir" = "$cf_add_incdir" && break
10706 cf_add_incdir="$cf_top_incdir"
10719 echo "$as_me:10719: checking for $cf_ncuhdr_root header in include-path" >&5
10720 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10721 if test "${cf_cv_ncurses_h+set}" = set; then
10722 echo $ECHO_N "(cached) $ECHO_C" >&6
10725 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10726 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
10727 for cf_header in $cf_header_list
10730 cat >"conftest.$ac_ext" <<_ACEOF
10731 #line 10731 "configure"
10732 #include "confdefs.h"
10734 #include <$cf_header>
10739 #ifdef NCURSES_VERSION
10741 printf("%s\\n", NCURSES_VERSION);
10746 #error __NCURSES_H is not defined
10754 rm -f "conftest.$ac_objext"
10755 if { (eval echo "$as_me:10755: \"$ac_compile\"") >&5
10756 (eval $ac_compile) 2>&5
10758 echo "$as_me:10758: \$? = $ac_status" >&5
10759 (exit "$ac_status"); } &&
10760 { ac_try='test -s "conftest.$ac_objext"'
10761 { (eval echo "$as_me:10761: \"$ac_try\"") >&5
10762 (eval $ac_try) 2>&5
10764 echo "$as_me:10764: \$? = $ac_status" >&5
10765 (exit "$ac_status"); }; }; then
10766 cf_cv_ncurses_h=$cf_header
10769 echo "$as_me: failed program was:" >&5
10770 cat "conftest.$ac_ext" >&5
10773 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10775 test "$cf_cv_ncurses_h" != no && break
10779 echo "$as_me:10779: result: $cf_cv_ncurses_h" >&5
10780 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10782 if test "$cf_cv_ncurses_h" != no ; then
10783 cf_cv_ncurses_header=$cf_cv_ncurses_h
10786 echo "$as_me:10786: checking for $cf_ncuhdr_root include-path" >&5
10787 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10788 if test "${cf_cv_ncurses_h2+set}" = set; then
10789 echo $ECHO_N "(cached) $ECHO_C" >&6
10792 test -n "$verbose" && echo
10796 # collect the current set of include-directories from compiler flags
10797 cf_header_path_list=""
10798 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10799 for cf_header_path in $CPPFLAGS $CFLAGS
10801 case "$cf_header_path" in
10803 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10805 test "x$cf_header_path" != "xNONE" && \
10806 test -d "$cf_header_path" && \
10808 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10809 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
10810 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10811 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10812 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10813 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"
10816 cf_header_path_list="$cf_header_path_list $cf_search"
10822 # add the variations for the package we are looking for
10826 test "x$prefix" != "xNONE" && \
10827 test -d "$prefix" && \
10829 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10830 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
10831 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10832 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10833 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10834 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10837 for cf_subdir_prefix in \
10846 test "x$cf_subdir_prefix" != "x$prefix" && \
10847 test -d "$cf_subdir_prefix" && \
10848 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10849 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10850 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
10851 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10852 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10853 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10854 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"
10859 test "$includedir" != NONE && \
10860 test "$includedir" != "/usr/include" && \
10861 test -d "$includedir" && {
10862 test -d "$includedir" && cf_search="$cf_search $includedir"
10863 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10866 test "$oldincludedir" != NONE && \
10867 test "$oldincludedir" != "/usr/include" && \
10868 test -d "$oldincludedir" && {
10869 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
10870 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10873 cf_search="$cf_search $cf_header_path_list"
10875 test -n "$verbose" && echo "search path $cf_search"
10876 cf_save2_CPPFLAGS="$CPPFLAGS"
10877 for cf_incdir in $cf_search
10880 if test -n "$cf_incdir" ; then
10881 for cf_add_incdir in $cf_incdir
10883 while test "$cf_add_incdir" != /usr/include
10885 if test -d "$cf_add_incdir"
10888 if test -n "$CFLAGS$CPPFLAGS" ; then
10889 # a loop is needed to ensure we can add subdirs of existing dirs
10890 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10891 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10892 cf_have_incdir=yes; break
10897 if test "$cf_have_incdir" = no ; then
10898 if test "$cf_add_incdir" = /usr/local/include ; then
10899 if test "$GCC" = yes
10901 cf_save_CPPFLAGS=$CPPFLAGS
10903 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10904 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10906 cat >"conftest.$ac_ext" <<_ACEOF
10907 #line 10907 "configure"
10908 #include "confdefs.h"
10918 rm -f "conftest.$ac_objext"
10919 if { (eval echo "$as_me:10919: \"$ac_compile\"") >&5
10920 (eval $ac_compile) 2>&5
10922 echo "$as_me:10922: \$? = $ac_status" >&5
10923 (exit "$ac_status"); } &&
10924 { ac_try='test -s "conftest.$ac_objext"'
10925 { (eval echo "$as_me:10925: \"$ac_try\"") >&5
10926 (eval $ac_try) 2>&5
10928 echo "$as_me:10928: \$? = $ac_status" >&5
10929 (exit "$ac_status"); }; }; then
10932 echo "$as_me: failed program was:" >&5
10933 cat "conftest.$ac_ext" >&5
10936 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10937 CPPFLAGS=$cf_save_CPPFLAGS
10942 if test "$cf_have_incdir" = no ; then
10943 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10945 echo "${as_me:-configure}:10945: testing adding $cf_add_incdir to include-path ..." 1>&5
10947 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10949 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10950 test "$cf_top_incdir" = "$cf_add_incdir" && break
10951 cf_add_incdir="$cf_top_incdir"
10967 cat >"conftest.$ac_ext" <<_ACEOF
10968 #line 10968 "configure"
10969 #include "confdefs.h"
10971 #include <$cf_header>
10976 #ifdef NCURSES_VERSION
10978 printf("%s\\n", NCURSES_VERSION);
10983 #error __NCURSES_H is not defined
10991 rm -f "conftest.$ac_objext"
10992 if { (eval echo "$as_me:10992: \"$ac_compile\"") >&5
10993 (eval $ac_compile) 2>&5
10995 echo "$as_me:10995: \$? = $ac_status" >&5
10996 (exit "$ac_status"); } &&
10997 { ac_try='test -s "conftest.$ac_objext"'
10998 { (eval echo "$as_me:10998: \"$ac_try\"") >&5
10999 (eval $ac_try) 2>&5
11001 echo "$as_me:11001: \$? = $ac_status" >&5
11002 (exit "$ac_status"); }; }; then
11003 cf_cv_ncurses_h2=$cf_header
11006 echo "$as_me: failed program was:" >&5
11007 cat "conftest.$ac_ext" >&5
11008 cf_cv_ncurses_h2=no
11010 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11012 if test "$cf_cv_ncurses_h2" != no ; then
11013 cf_cv_ncurses_h2=$cf_incdir/$cf_header
11014 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
11017 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
11019 CPPFLAGS="$cf_save2_CPPFLAGS"
11020 test "$cf_cv_ncurses_h2" != no && break
11022 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:11022: error: not found" >&5
11023 echo "$as_me: error: not found" >&2;}
11024 { (exit 1); exit 1; }; }
11027 echo "$as_me:11027: result: $cf_cv_ncurses_h2" >&5
11028 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
11030 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
11031 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
11032 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
11033 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
11036 if test -n "$cf_1st_incdir" ; then
11037 for cf_add_incdir in $cf_1st_incdir
11039 while test "$cf_add_incdir" != /usr/include
11041 if test -d "$cf_add_incdir"
11044 if test -n "$CFLAGS$CPPFLAGS" ; then
11045 # a loop is needed to ensure we can add subdirs of existing dirs
11046 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11047 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11048 cf_have_incdir=yes; break
11053 if test "$cf_have_incdir" = no ; then
11054 if test "$cf_add_incdir" = /usr/local/include ; then
11055 if test "$GCC" = yes
11057 cf_save_CPPFLAGS=$CPPFLAGS
11059 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11060 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11062 cat >"conftest.$ac_ext" <<_ACEOF
11063 #line 11063 "configure"
11064 #include "confdefs.h"
11074 rm -f "conftest.$ac_objext"
11075 if { (eval echo "$as_me:11075: \"$ac_compile\"") >&5
11076 (eval $ac_compile) 2>&5
11078 echo "$as_me:11078: \$? = $ac_status" >&5
11079 (exit "$ac_status"); } &&
11080 { ac_try='test -s "conftest.$ac_objext"'
11081 { (eval echo "$as_me:11081: \"$ac_try\"") >&5
11082 (eval $ac_try) 2>&5
11084 echo "$as_me:11084: \$? = $ac_status" >&5
11085 (exit "$ac_status"); }; }; then
11088 echo "$as_me: failed program was:" >&5
11089 cat "conftest.$ac_ext" >&5
11092 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11093 CPPFLAGS=$cf_save_CPPFLAGS
11098 if test "$cf_have_incdir" = no ; then
11099 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11101 echo "${as_me:-configure}:11101: testing adding $cf_add_incdir to include-path ..." 1>&5
11103 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11105 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11106 test "$cf_top_incdir" = "$cf_add_incdir" && break
11107 cf_add_incdir="$cf_top_incdir"
11120 # Set definitions to allow ifdef'ing for ncurses.h
11122 case "$cf_cv_ncurses_header" in
11125 cat >>confdefs.h <<\EOF
11126 #define HAVE_NCURSES_H 1
11132 case "$cf_cv_ncurses_header" in
11133 (ncurses/curses.h|ncurses/ncurses.h)
11135 cat >>confdefs.h <<\EOF
11136 #define HAVE_NCURSES_NCURSES_H 1
11140 (ncursesw/curses.h|ncursesw/ncurses.h)
11142 cat >>confdefs.h <<\EOF
11143 #define HAVE_NCURSESW_NCURSES_H 1
11149 echo "$as_me:11149: checking for terminfo header" >&5
11150 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
11151 if test "${cf_cv_term_header+set}" = set; then
11152 echo $ECHO_N "(cached) $ECHO_C" >&6
11155 case "${cf_cv_ncurses_header}" in
11156 (*/ncurses.h|*/ncursesw.h)
11157 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
11160 cf_term_header=term.h
11164 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
11166 cat >"conftest.$ac_ext" <<_ACEOF
11167 #line 11167 "configure"
11168 #include "confdefs.h"
11170 #include <${cf_cv_ncurses_header:-curses.h}>
11171 #include <$cf_test>
11176 int x = auto_left_margin; (void)x
11181 rm -f "conftest.$ac_objext"
11182 if { (eval echo "$as_me:11182: \"$ac_compile\"") >&5
11183 (eval $ac_compile) 2>&5
11185 echo "$as_me:11185: \$? = $ac_status" >&5
11186 (exit "$ac_status"); } &&
11187 { ac_try='test -s "conftest.$ac_objext"'
11188 { (eval echo "$as_me:11188: \"$ac_try\"") >&5
11189 (eval $ac_try) 2>&5
11191 echo "$as_me:11191: \$? = $ac_status" >&5
11192 (exit "$ac_status"); }; }; then
11194 cf_cv_term_header="$cf_test"
11196 echo "$as_me: failed program was:" >&5
11197 cat "conftest.$ac_ext" >&5
11199 cf_cv_term_header=unknown
11202 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11203 test "$cf_cv_term_header" != unknown && break
11207 echo "$as_me:11207: result: $cf_cv_term_header" >&5
11208 echo "${ECHO_T}$cf_cv_term_header" >&6
11210 # Set definitions to allow ifdef'ing to accommodate subdirectories
11212 case "$cf_cv_term_header" in
11215 cat >>confdefs.h <<\EOF
11216 #define HAVE_TERM_H 1
11222 case "$cf_cv_term_header" in
11225 cat >>confdefs.h <<\EOF
11226 #define HAVE_NCURSES_TERM_H 1
11232 cat >>confdefs.h <<\EOF
11233 #define HAVE_NCURSESW_TERM_H 1
11239 # some applications need this, but should check for NCURSES_VERSION
11241 cat >>confdefs.h <<\EOF
11245 echo "$as_me:11245: checking for ncurses version" >&5
11246 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
11247 if test "${cf_cv_ncurses_version+set}" = set; then
11248 echo $ECHO_N "(cached) $ECHO_C" >&6
11251 cf_cv_ncurses_version=no
11253 rm -f "$cf_tempfile"
11254 if test "$cross_compiling" = yes; then
11256 # This will not work if the preprocessor splits the line after the
11257 # Autoconf token. The 'unproto' program does that.
11258 cat > "conftest.$ac_ext" <<EOF
11259 #include <${cf_cv_ncurses_header:-curses.h}>
11261 #ifdef NCURSES_VERSION
11262 Autoconf NCURSES_VERSION
11270 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
11271 { (eval echo "$as_me:11271: \"$cf_try\"") >&5
11272 (eval $cf_try) 2>&5
11274 echo "$as_me:11274: \$? = $ac_status" >&5
11275 (exit "$ac_status"); }
11276 if test -f conftest.out ; then
11277 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
11278 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
11283 cat >"conftest.$ac_ext" <<_ACEOF
11284 #line 11284 "configure"
11285 #include "confdefs.h"
11287 $ac_includes_default
11289 #include <${cf_cv_ncurses_header:-curses.h}>
11293 FILE *fp = fopen("$cf_tempfile", "w");
11294 #ifdef NCURSES_VERSION
11295 # ifdef NCURSES_VERSION_PATCH
11296 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
11298 fprintf(fp, "%s\\n", NCURSES_VERSION);
11301 # ifdef __NCURSES_H
11302 fprintf(fp, "old\\n");
11304 #error expected ncurses header to define __NCURSES_H
11307 ${cf_cv_main_return:-return}(0);
11310 rm -f "conftest$ac_exeext"
11311 if { (eval echo "$as_me:11311: \"$ac_link\"") >&5
11312 (eval $ac_link) 2>&5
11314 echo "$as_me:11314: \$? = $ac_status" >&5
11315 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
11316 { (eval echo "$as_me:11316: \"$ac_try\"") >&5
11317 (eval $ac_try) 2>&5
11319 echo "$as_me:11319: \$? = $ac_status" >&5
11320 (exit "$ac_status"); }; }; then
11322 cf_cv_ncurses_version=`cat $cf_tempfile`
11324 echo "$as_me: program exited with status $ac_status" >&5
11325 echo "$as_me: failed program was:" >&5
11326 cat "conftest.$ac_ext" >&5
11328 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
11330 rm -f "$cf_tempfile"
11333 echo "$as_me:11333: result: $cf_cv_ncurses_version" >&5
11334 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
11335 test "$cf_cv_ncurses_version" = no ||
11336 cat >>confdefs.h <<\EOF
11340 cf_nculib_root=ncurses
11341 # This works, except for the special case where we find gpm, but
11342 # ncurses is in a nonstandard location via $LIBS, and we really want
11345 cf_ncurses_SAVE="$LIBS"
11346 echo "$as_me:11346: checking for Gpm_Open in -lgpm" >&5
11347 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
11348 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
11349 echo $ECHO_N "(cached) $ECHO_C" >&6
11351 ac_check_lib_save_LIBS=$LIBS
11353 cat >"conftest.$ac_ext" <<_ACEOF
11354 #line 11354 "configure"
11355 #include "confdefs.h"
11357 /* Override any gcc2 internal prototype to avoid an error. */
11361 /* We use char because int might match the return type of a gcc2
11362 builtin and then its argument prototype would still apply. */
11363 char Gpm_Open (void);
11372 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11373 if { (eval echo "$as_me:11373: \"$ac_link\"") >&5
11374 (eval $ac_link) 2>&5
11376 echo "$as_me:11376: \$? = $ac_status" >&5
11377 (exit "$ac_status"); } &&
11378 { ac_try='test -s "conftest$ac_exeext"'
11379 { (eval echo "$as_me:11379: \"$ac_try\"") >&5
11380 (eval $ac_try) 2>&5
11382 echo "$as_me:11382: \$? = $ac_status" >&5
11383 (exit "$ac_status"); }; }; then
11384 ac_cv_lib_gpm_Gpm_Open=yes
11386 echo "$as_me: failed program was:" >&5
11387 cat "conftest.$ac_ext" >&5
11388 ac_cv_lib_gpm_Gpm_Open=no
11390 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11391 LIBS=$ac_check_lib_save_LIBS
11393 echo "$as_me:11393: result: $ac_cv_lib_gpm_Gpm_Open" >&5
11394 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
11395 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
11396 echo "$as_me:11396: checking for initscr in -lgpm" >&5
11397 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
11398 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
11399 echo $ECHO_N "(cached) $ECHO_C" >&6
11401 ac_check_lib_save_LIBS=$LIBS
11403 cat >"conftest.$ac_ext" <<_ACEOF
11404 #line 11404 "configure"
11405 #include "confdefs.h"
11407 /* Override any gcc2 internal prototype to avoid an error. */
11411 /* We use char because int might match the return type of a gcc2
11412 builtin and then its argument prototype would still apply. */
11413 char initscr (void);
11422 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11423 if { (eval echo "$as_me:11423: \"$ac_link\"") >&5
11424 (eval $ac_link) 2>&5
11426 echo "$as_me:11426: \$? = $ac_status" >&5
11427 (exit "$ac_status"); } &&
11428 { ac_try='test -s "conftest$ac_exeext"'
11429 { (eval echo "$as_me:11429: \"$ac_try\"") >&5
11430 (eval $ac_try) 2>&5
11432 echo "$as_me:11432: \$? = $ac_status" >&5
11433 (exit "$ac_status"); }; }; then
11434 ac_cv_lib_gpm_initscr=yes
11436 echo "$as_me: failed program was:" >&5
11437 cat "conftest.$ac_ext" >&5
11438 ac_cv_lib_gpm_initscr=no
11440 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11441 LIBS=$ac_check_lib_save_LIBS
11443 echo "$as_me:11443: result: $ac_cv_lib_gpm_initscr" >&5
11444 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
11445 if test "$ac_cv_lib_gpm_initscr" = yes; then
11446 LIBS="$cf_ncurses_SAVE"
11448 cf_ncurses_LIBS="-lgpm"
11455 # This is only necessary if you are linking against an obsolete
11456 # version of ncurses (but it should do no harm, since it is static).
11457 if test "$cf_nculib_root" = ncurses ; then
11458 echo "$as_me:11458: checking for tgoto in -lmytinfo" >&5
11459 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
11460 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
11461 echo $ECHO_N "(cached) $ECHO_C" >&6
11463 ac_check_lib_save_LIBS=$LIBS
11464 LIBS="-lmytinfo $LIBS"
11465 cat >"conftest.$ac_ext" <<_ACEOF
11466 #line 11466 "configure"
11467 #include "confdefs.h"
11469 /* Override any gcc2 internal prototype to avoid an error. */
11473 /* We use char because int might match the return type of a gcc2
11474 builtin and then its argument prototype would still apply. */
11484 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11485 if { (eval echo "$as_me:11485: \"$ac_link\"") >&5
11486 (eval $ac_link) 2>&5
11488 echo "$as_me:11488: \$? = $ac_status" >&5
11489 (exit "$ac_status"); } &&
11490 { ac_try='test -s "conftest$ac_exeext"'
11491 { (eval echo "$as_me:11491: \"$ac_try\"") >&5
11492 (eval $ac_try) 2>&5
11494 echo "$as_me:11494: \$? = $ac_status" >&5
11495 (exit "$ac_status"); }; }; then
11496 ac_cv_lib_mytinfo_tgoto=yes
11498 echo "$as_me: failed program was:" >&5
11499 cat "conftest.$ac_ext" >&5
11500 ac_cv_lib_mytinfo_tgoto=no
11502 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11503 LIBS=$ac_check_lib_save_LIBS
11505 echo "$as_me:11505: result: $ac_cv_lib_mytinfo_tgoto" >&5
11506 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11507 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
11508 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
11515 cf_add_libs="$LIBS"
11518 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11519 # filter duplicates
11520 for cf_add_1lib in $cf_add_0lib; do
11521 for cf_add_2lib in $cf_add_libs; do
11522 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11527 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11529 LIBS="$cf_add_libs"
11531 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
11534 cf_add_libs="$LIBS"
11537 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11538 # filter duplicates
11539 for cf_add_1lib in $cf_add_0lib; do
11540 for cf_add_2lib in $cf_add_libs; do
11541 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11546 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11548 LIBS="$cf_add_libs"
11552 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
11554 echo "$as_me:11554: checking for initscr" >&5
11555 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
11556 if test "${ac_cv_func_initscr+set}" = set; then
11557 echo $ECHO_N "(cached) $ECHO_C" >&6
11559 cat >"conftest.$ac_ext" <<_ACEOF
11560 #line 11560 "configure"
11561 #include "confdefs.h"
11562 #define initscr autoconf_temporary
11563 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11570 /* We use char because int might match the return type of a gcc2
11571 builtin and then its argument prototype would still apply. */
11572 char initscr (void);
11578 /* The GNU C library defines stubs for functions which it implements
11579 to always fail with ENOSYS. Some functions are actually named
11580 something starting with __ and the normal name is an alias. */
11581 #if defined (__stub_initscr) || defined (__stub___initscr)
11582 #error found stub for initscr
11590 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11591 if { (eval echo "$as_me:11591: \"$ac_link\"") >&5
11592 (eval $ac_link) 2>&5
11594 echo "$as_me:11594: \$? = $ac_status" >&5
11595 (exit "$ac_status"); } &&
11596 { ac_try='test -s "conftest$ac_exeext"'
11597 { (eval echo "$as_me:11597: \"$ac_try\"") >&5
11598 (eval $ac_try) 2>&5
11600 echo "$as_me:11600: \$? = $ac_status" >&5
11601 (exit "$ac_status"); }; }; then
11602 ac_cv_func_initscr=yes
11604 echo "$as_me: failed program was:" >&5
11605 cat "conftest.$ac_ext" >&5
11606 ac_cv_func_initscr=no
11608 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11610 echo "$as_me:11610: result: $ac_cv_func_initscr" >&5
11611 echo "${ECHO_T}$ac_cv_func_initscr" >&6
11612 if test "$ac_cv_func_initscr" = yes; then
11613 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11616 cf_save_LIBS="$LIBS"
11617 echo "$as_me:11617: checking for initscr in -l$cf_nculib_root" >&5
11618 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
11619 LIBS="-l$cf_nculib_root $LIBS"
11620 cat >"conftest.$ac_ext" <<_ACEOF
11621 #line 11621 "configure"
11622 #include "confdefs.h"
11623 #include <${cf_cv_ncurses_header:-curses.h}>
11632 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11633 if { (eval echo "$as_me:11633: \"$ac_link\"") >&5
11634 (eval $ac_link) 2>&5
11636 echo "$as_me:11636: \$? = $ac_status" >&5
11637 (exit "$ac_status"); } &&
11638 { ac_try='test -s "conftest$ac_exeext"'
11639 { (eval echo "$as_me:11639: \"$ac_try\"") >&5
11640 (eval $ac_try) 2>&5
11642 echo "$as_me:11642: \$? = $ac_status" >&5
11643 (exit "$ac_status"); }; }; then
11644 echo "$as_me:11644: result: yes" >&5
11645 echo "${ECHO_T}yes" >&6
11646 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11649 echo "$as_me: failed program was:" >&5
11650 cat "conftest.$ac_ext" >&5
11651 echo "$as_me:11651: result: no" >&5
11652 echo "${ECHO_T}no" >&6
11655 cf_library_path_list=""
11656 if test -n "${LDFLAGS}${LIBS}" ; then
11657 for cf_library_path in $LDFLAGS $LIBS
11659 case "$cf_library_path" in
11661 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11663 test "x$cf_library_path" != "xNONE" && \
11664 test -d "$cf_library_path" && \
11666 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11667 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
11668 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11669 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11670 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11671 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"
11674 cf_library_path_list="$cf_library_path_list $cf_search"
11682 test "x$prefix" != "xNONE" && \
11683 test -d "$prefix" && \
11685 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11686 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
11687 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11688 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11689 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11690 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11693 for cf_subdir_prefix in \
11702 test "x$cf_subdir_prefix" != "x$prefix" && \
11703 test -d "$cf_subdir_prefix" && \
11704 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11705 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11706 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
11707 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11708 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11709 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11710 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"
11715 cf_search="$cf_library_path_list $cf_search"
11717 for cf_libdir in $cf_search
11719 echo "$as_me:11719: checking for -l$cf_nculib_root in $cf_libdir" >&5
11720 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11721 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11722 cat >"conftest.$ac_ext" <<_ACEOF
11723 #line 11723 "configure"
11724 #include "confdefs.h"
11725 #include <${cf_cv_ncurses_header:-curses.h}>
11734 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11735 if { (eval echo "$as_me:11735: \"$ac_link\"") >&5
11736 (eval $ac_link) 2>&5
11738 echo "$as_me:11738: \$? = $ac_status" >&5
11739 (exit "$ac_status"); } &&
11740 { ac_try='test -s "conftest$ac_exeext"'
11741 { (eval echo "$as_me:11741: \"$ac_try\"") >&5
11742 (eval $ac_try) 2>&5
11744 echo "$as_me:11744: \$? = $ac_status" >&5
11745 (exit "$ac_status"); }; }; then
11746 echo "$as_me:11746: result: yes" >&5
11747 echo "${ECHO_T}yes" >&6
11748 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11751 echo "$as_me: failed program was:" >&5
11752 cat "conftest.$ac_ext" >&5
11753 echo "$as_me:11753: result: no" >&5
11754 echo "${ECHO_T}no" >&6
11755 LIBS="$cf_save_LIBS"
11757 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11761 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11765 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
11767 if test "$cf_found_library" = no ; then
11768 { { echo "$as_me:11768: error: Cannot link $cf_nculib_root library" >&5
11769 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11770 { (exit 1); exit 1; }; }
11775 if test -n "$cf_ncurses_LIBS" ; then
11776 echo "$as_me:11776: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11777 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11778 cf_ncurses_SAVE="$LIBS"
11779 for p in $cf_ncurses_LIBS ; do
11780 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
11781 if test "$q" != "$LIBS" ; then
11785 cat >"conftest.$ac_ext" <<_ACEOF
11786 #line 11786 "configure"
11787 #include "confdefs.h"
11788 #include <${cf_cv_ncurses_header:-curses.h}>
11792 initscr(); mousemask(0,0); tigetstr((char *)0);
11797 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11798 if { (eval echo "$as_me:11798: \"$ac_link\"") >&5
11799 (eval $ac_link) 2>&5
11801 echo "$as_me:11801: \$? = $ac_status" >&5
11802 (exit "$ac_status"); } &&
11803 { ac_try='test -s "conftest$ac_exeext"'
11804 { (eval echo "$as_me:11804: \"$ac_try\"") >&5
11805 (eval $ac_try) 2>&5
11807 echo "$as_me:11807: \$? = $ac_status" >&5
11808 (exit "$ac_status"); }; }; then
11809 echo "$as_me:11809: result: yes" >&5
11810 echo "${ECHO_T}yes" >&6
11812 echo "$as_me: failed program was:" >&5
11813 cat "conftest.$ac_ext" >&5
11814 echo "$as_me:11814: result: no" >&5
11815 echo "${ECHO_T}no" >&6
11816 LIBS="$cf_ncurses_SAVE"
11818 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11821 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11823 cat >>confdefs.h <<EOF
11824 #define $cf_nculib_ROOT 1
11829 NCURSES_CONFIG=none
11834 if test "$NCURSES_CONFIG_PKG" != none ; then
11835 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
11837 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11838 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11839 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11841 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
11842 if test -z "$cf_cv_abi_version"
11844 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
11847 elif test "$NCURSES_CONFIG" != none ; then
11849 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
11851 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11852 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11853 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11855 # ABI version is not available from headers
11856 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
11860 for cf_name in MAJOR MINOR PATCH
11862 cat >conftest.$ac_ext <<CF_EOF
11863 #include <${cf_cv_ncurses_header:-curses.h}>
11864 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
11866 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
11867 { (eval echo "$as_me:11867: \"$cf_try\"") >&5
11868 (eval $cf_try) 2>&5
11870 echo "$as_me:11870: \$? = $ac_status" >&5
11871 (exit "$ac_status"); }
11872 if test -f conftest.out ; then
11873 cf_result=`sed -e "s/^.*AUTOCONF_${cf_name}[ ][ ]*//" conftest.out`
11874 eval NCURSES_$cf_name=\"$cf_result\"
11875 # cat conftest.$ac_ext
11880 cf_cv_abi_version=${NCURSES_MAJOR}
11884 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
11886 cf_cv_timestamp=`date`
11888 echo "$as_me:11888: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
11889 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
11891 echo "$as_me:11891: checking if you want to have a library-prefix" >&5
11892 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
11894 # Check whether --with-lib-prefix or --without-lib-prefix was given.
11895 if test "${with_lib_prefix+set}" = set; then
11896 withval="$with_lib_prefix"
11897 with_lib_prefix=$withval
11899 with_lib_prefix=auto
11901 echo "$as_me:11901: result: $with_lib_prefix" >&5
11902 echo "${ECHO_T}$with_lib_prefix" >&6
11904 if test "$with_lib_prefix" = auto
11907 case "$cf_cv_system_name" in
11909 if test "$DFT_LWR_MODEL" = libtool; then
11918 (*) LIB_PREFIX='lib'
11921 cf_prefix=$LIB_PREFIX
11923 elif test "$with_lib_prefix" = no
11927 LIB_PREFIX=$with_lib_prefix
11932 ###############################################################################
11934 if test X"$CC_G_OPT" = X"" ; then
11936 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
11939 echo "$as_me:11939: checking for default loader flags" >&5
11940 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
11941 case $DFT_LWR_MODEL in
11942 (normal) LD_MODEL='' ;;
11943 (debug) LD_MODEL=$CC_G_OPT ;;
11944 (profile) LD_MODEL='-pg';;
11945 (shared) LD_MODEL='' ;;
11947 echo "$as_me:11947: result: $LD_MODEL" >&5
11948 echo "${ECHO_T}$LD_MODEL" >&6
11951 if test "x$cf_cv_enable_rpath" != xno
11953 echo "$as_me:11953: checking for an rpath option" >&5
11954 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
11955 case "$cf_cv_system_name" in
11957 if test "$GCC" = yes; then
11958 LD_RPATH_OPT="-Wl,-rpath,"
11960 LD_RPATH_OPT="-rpath "
11963 (linux*|gnu*|k*bsd*-gnu|freebsd*)
11964 LD_RPATH_OPT="-Wl,-rpath,"
11966 (openbsd[2-9].*|mirbsd*)
11967 LD_RPATH_OPT="-Wl,-rpath,"
11970 LD_RPATH_OPT="-rpath "
11973 LD_RPATH_OPT="-Wl,-rpath,"
11976 LD_RPATH_OPT="-rpath "
11984 echo "$as_me:11984: result: $LD_RPATH_OPT" >&5
11985 echo "${ECHO_T}$LD_RPATH_OPT" >&6
11987 case "x$LD_RPATH_OPT" in
11989 echo "$as_me:11989: checking if we need a space after rpath option" >&5
11990 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
11991 cf_save_LIBS="$LIBS"
11993 cf_add_libs="$LIBS"
11996 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11997 # filter duplicates
11998 for cf_add_1lib in $cf_add_0lib; do
11999 for cf_add_2lib in $cf_add_libs; do
12000 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12005 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12007 LIBS="$cf_add_libs"
12009 cat >"conftest.$ac_ext" <<_ACEOF
12010 #line 12010 "configure"
12011 #include "confdefs.h"
12021 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12022 if { (eval echo "$as_me:12022: \"$ac_link\"") >&5
12023 (eval $ac_link) 2>&5
12025 echo "$as_me:12025: \$? = $ac_status" >&5
12026 (exit "$ac_status"); } &&
12027 { ac_try='test -s "conftest$ac_exeext"'
12028 { (eval echo "$as_me:12028: \"$ac_try\"") >&5
12029 (eval $ac_try) 2>&5
12031 echo "$as_me:12031: \$? = $ac_status" >&5
12032 (exit "$ac_status"); }; }; then
12035 echo "$as_me: failed program was:" >&5
12036 cat "conftest.$ac_ext" >&5
12039 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12040 LIBS="$cf_save_LIBS"
12041 echo "$as_me:12041: result: $cf_rpath_space" >&5
12042 echo "${ECHO_T}$cf_rpath_space" >&6
12043 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
12052 INSTALL_LIB="-m 644"
12053 : ${rel_builddir:=.}
12059 cf_cv_do_symlinks=no
12061 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
12063 echo "$as_me:12063: checking whether to use release or ABI version in shared library file names" >&5
12064 echo $ECHO_N "checking whether to use release or ABI version in shared library file names... $ECHO_C" >&6
12066 # Check whether --with-shlib-version or --without-shlib-version was given.
12067 if test "${with_shlib_version+set}" = set; then
12068 withval="$with_shlib_version"
12069 test -z "$withval" && withval=auto
12072 cf_cv_shlib_version=auto
12075 cf_cv_shlib_version=$withval
12078 echo "$as_me:12078: result: $withval" >&5
12079 echo "${ECHO_T}$withval" >&6
12080 { { echo "$as_me:12080: error: option value must be one of: rel, abi, or auto" >&5
12081 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
12082 { (exit 1); exit 1; }; }
12087 cf_cv_shlib_version=auto
12089 echo "$as_me:12089: result: $cf_cv_shlib_version" >&5
12090 echo "${ECHO_T}$cf_cv_shlib_version" >&6
12092 cf_cv_rm_so_locs=no
12095 # Some less-capable ports of gcc support only -fpic
12099 if test "$GCC" = yes
12103 case "$cf_cv_system_name" in
12104 (*linux*) # e.g., PGI compiler
12110 if test "$cf_try_fPIC" = yes
12112 echo "$as_me:12112: checking which $CC option to use" >&5
12113 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
12114 cf_save_CFLAGS="$CFLAGS"
12115 for CC_SHARED_OPTS in -fPIC -fpic ''
12117 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
12118 cat >"conftest.$ac_ext" <<_ACEOF
12119 #line 12119 "configure"
12120 #include "confdefs.h"
12130 rm -f "conftest.$ac_objext"
12131 if { (eval echo "$as_me:12131: \"$ac_compile\"") >&5
12132 (eval $ac_compile) 2>&5
12134 echo "$as_me:12134: \$? = $ac_status" >&5
12135 (exit "$ac_status"); } &&
12136 { ac_try='test -s "conftest.$ac_objext"'
12137 { (eval echo "$as_me:12137: \"$ac_try\"") >&5
12138 (eval $ac_try) 2>&5
12140 echo "$as_me:12140: \$? = $ac_status" >&5
12141 (exit "$ac_status"); }; }; then
12144 echo "$as_me: failed program was:" >&5
12145 cat "conftest.$ac_ext" >&5
12147 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12149 echo "$as_me:12149: result: $CC_SHARED_OPTS" >&5
12150 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
12151 CFLAGS="$cf_save_CFLAGS"
12154 cf_cv_shlib_version_infix=no
12156 case "$cf_cv_system_name" in
12157 (aix4.3-9*|aix[5-7]*)
12158 if test "$GCC" = yes; then
12159 CC_SHARED_OPTS='-Wl,-brtl'
12160 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
12162 CC_SHARED_OPTS='-brtl'
12163 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
12164 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
12168 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
12172 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
12173 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
12174 cf_cv_shlib_version=cygdll
12175 cf_cv_shlib_version_infix=cygdll
12178 cat >mk_shared_lib.sh <<-CF_EOF
12181 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
12184 Linking shared library
12185 ** SHARED_LIB \$SHARED_LIB
12186 ** IMPORT_LIB \$IMPORT_LIB
12188 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
12190 chmod +x mk_shared_lib.sh
12194 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
12195 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
12196 cf_cv_shlib_version=msysdll
12197 cf_cv_shlib_version_infix=msysdll
12200 cat >mk_shared_lib.sh <<-CF_EOF
12203 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
12206 Linking shared library
12207 ** SHARED_LIB \$SHARED_LIB
12208 ** IMPORT_LIB \$IMPORT_LIB
12210 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
12212 chmod +x mk_shared_lib.sh
12215 cf_try_cflags="no-cpp-precomp"
12216 CC_SHARED_OPTS="-dynamic"
12217 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
12218 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
12219 cf_cv_shlib_version_infix=yes
12220 echo "$as_me:12220: checking if ld -search_paths_first works" >&5
12221 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
12222 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
12223 echo $ECHO_N "(cached) $ECHO_C" >&6
12226 cf_save_LDFLAGS=$LDFLAGS
12227 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
12228 cat >"conftest.$ac_ext" <<_ACEOF
12229 #line 12229 "configure"
12230 #include "confdefs.h"
12240 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12241 if { (eval echo "$as_me:12241: \"$ac_link\"") >&5
12242 (eval $ac_link) 2>&5
12244 echo "$as_me:12244: \$? = $ac_status" >&5
12245 (exit "$ac_status"); } &&
12246 { ac_try='test -s "conftest$ac_exeext"'
12247 { (eval echo "$as_me:12247: \"$ac_try\"") >&5
12248 (eval $ac_try) 2>&5
12250 echo "$as_me:12250: \$? = $ac_status" >&5
12251 (exit "$ac_status"); }; }; then
12252 cf_cv_ldflags_search_paths_first=yes
12254 echo "$as_me: failed program was:" >&5
12255 cat "conftest.$ac_ext" >&5
12256 cf_cv_ldflags_search_paths_first=no
12258 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12259 LDFLAGS=$cf_save_LDFLAGS
12261 echo "$as_me:12261: result: $cf_cv_ldflags_search_paths_first" >&5
12262 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
12263 if test "$cf_cv_ldflags_search_paths_first" = yes; then
12264 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
12269 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12270 if test "$cf_cv_shlib_version" = rel; then
12271 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12273 cf_cv_shared_soname='`basename $@`'
12276 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12279 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
12280 if test "$GCC" != yes; then
12281 CC_SHARED_OPTS='+Z'
12283 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
12284 INSTALL_LIB="-m 555"
12287 # (tested with gcc 2.7.2 -- I don't have c89)
12288 if test "$GCC" = yes; then
12289 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
12291 CC_SHARED_OPTS='+Z'
12292 LD_SHARED_OPTS='-Wl,+b,${libdir}'
12294 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
12295 # HP-UX shared libraries must be executable, and should be
12296 # readonly to exploit a quirk in the memory manager.
12297 INSTALL_LIB="-m 555"
12300 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12301 if test "$cf_cv_shlib_version" = rel; then
12302 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12304 cf_shared_soname='`basename $@`'
12307 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
12310 if test "$cf_cv_enable_rpath" = yes ; then
12311 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12313 # tested with IRIX 5.2 and 'cc'.
12314 if test "$GCC" != yes; then
12315 CC_SHARED_OPTS='-KPIC'
12316 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
12318 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
12320 cf_cv_rm_so_locs=yes
12322 (linux*|gnu*|k*bsd*-gnu)
12323 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12324 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12325 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12327 if test "$cf_cv_enable_rpath" = yes ; then
12328 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12331 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12332 if test "$cf_cv_shlib_version" = rel; then
12333 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12335 cf_cv_shared_soname='`basename $@`'
12338 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12341 cf_cv_shlib_version=msvcdll
12342 cf_cv_shlib_version_infix=msvcdll
12345 if test "$DFT_LWR_MODEL" = "shared" ; then
12346 LOCAL_LDFLAGS="-link -dll"
12347 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12348 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
12351 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
12352 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
12353 cat >mk_shared_lib.sh <<-CF_EOF
12356 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
12361 Linking shared library
12362 ** SHARED LIB \$SHARED_LIB
12363 ** IMPORT_LIB \$IMPORT_LIB
12365 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
12366 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
12367 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
12369 chmod +x mk_shared_lib.sh
12370 cat >mk_prog.sh <<-CF_EOF
12373 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
12376 ldopts=("/subsystem:console")
12379 while test \$# -gt 0; do
12382 # ignore -link argument
12385 # ignore runtime-library option
12400 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
12403 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
12409 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
12410 ldopts+=("\${linkarg}")
12418 ldopts+=("-out:\$1")
12427 if [ "\$isdll" -ne 0 ]; then
12428 for lib in \${libs[*]}; do
12429 ldopts+=("\$lib.dll.lib")
12432 for lib in \${libs[*]}; do
12433 ldopts+=("\$lib.lib")
12438 ** ld options: "\${ldopts[@]}"
12440 exec \$LD \${ldopts[@]}
12442 chmod +x mk_prog.sh
12443 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
12444 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
12447 cf_cv_shlib_version=mingw
12448 cf_cv_shlib_version_infix=mingw
12451 if test "$DFT_LWR_MODEL" = "shared" ; then
12452 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
12453 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12454 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
12457 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
12458 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
12459 cat >mk_shared_lib.sh <<-CF_EOF
12462 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
12465 Linking shared library
12466 ** SHARED_LIB \$SHARED_LIB
12467 ** IMPORT_LIB \$IMPORT_LIB
12469 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
12471 chmod +x mk_shared_lib.sh
12473 (openbsd[2-9].*|mirbsd*)
12474 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12475 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12476 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12478 if test "$cf_cv_enable_rpath" = yes ; then
12479 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12481 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12483 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12484 if test "$cf_cv_shlib_version" = rel; then
12485 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12487 cf_cv_shared_soname='`basename $@`'
12490 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12494 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
12498 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
12500 (nto-qnx*|openbsd*|freebsd[12].*)
12501 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12502 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
12503 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12505 (dragonfly*|freebsd*)
12506 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12507 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12508 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12509 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
12510 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12513 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12514 if test "$cf_cv_shlib_version" = rel; then
12515 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12517 cf_cv_shared_soname='`basename $@`'
12520 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12523 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12524 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12525 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12526 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12527 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12528 if test "$cf_cv_shlib_version" = auto; then
12529 if test -f /usr/libexec/ld.elf_so; then
12530 cf_cv_shlib_version=abi
12532 cf_cv_shlib_version=rel
12536 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12537 if test "$cf_cv_shlib_version" = rel; then
12538 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12540 cf_cv_shared_soname='`basename $@`'
12543 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
12545 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
12549 # tested with OSF/1 V3.2 and 'cc'
12550 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
12551 # link with shared libs).
12552 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
12555 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
12558 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
12559 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12560 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12561 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12563 cf_cv_rm_so_locs=yes
12565 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
12566 # tested with osr5.0.5
12567 if test "$GCC" != yes; then
12568 CC_SHARED_OPTS='-belf -KPIC'
12570 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
12571 if test "$cf_cv_enable_rpath" = yes ; then
12572 # only way is to set LD_RUN_PATH but no switch for it
12575 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12576 LINK_PROGS='LD_RUN_PATH=${libdir}'
12577 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
12580 # tested with SunOS 4.1.1 and gcc 2.7.0
12581 if test "$GCC" != yes; then
12582 CC_SHARED_OPTS='-KPIC'
12584 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
12585 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12588 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
12589 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
12590 if test "$DFT_LWR_MODEL" = "shared" ; then
12591 LOCAL_LDFLAGS="-R\$(LOCAL_LIBDIR):\${libdir}"
12592 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12594 if test "$cf_cv_enable_rpath" = yes ; then
12595 EXTRA_LDFLAGS="-R\${libdir} $EXTRA_LDFLAGS"
12598 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12599 if test "$cf_cv_shlib_version" = rel; then
12600 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12602 cf_cv_shared_soname='`basename $@`'
12605 if test "$GCC" != yes; then
12606 cf_save_CFLAGS="$CFLAGS"
12607 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
12609 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
12610 cat >"conftest.$ac_ext" <<_ACEOF
12611 #line 12611 "configure"
12612 #include "confdefs.h"
12617 printf("Hello\\n");
12622 rm -f "conftest.$ac_objext"
12623 if { (eval echo "$as_me:12623: \"$ac_compile\"") >&5
12624 (eval $ac_compile) 2>&5
12626 echo "$as_me:12626: \$? = $ac_status" >&5
12627 (exit "$ac_status"); } &&
12628 { ac_try='test -s "conftest.$ac_objext"'
12629 { (eval echo "$as_me:12629: \"$ac_try\"") >&5
12630 (eval $ac_try) 2>&5
12632 echo "$as_me:12632: \$? = $ac_status" >&5
12633 (exit "$ac_status"); }; }; then
12636 echo "$as_me: failed program was:" >&5
12637 cat "conftest.$ac_ext" >&5
12639 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12641 CFLAGS="$cf_save_CFLAGS"
12642 CC_SHARED_OPTS=$cf_shared_opts
12643 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $@'
12645 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $@'
12648 (sysv5uw7*|unix_sv*)
12649 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
12650 if test "$GCC" != yes; then
12651 CC_SHARED_OPTS='-KPIC'
12653 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
12656 CC_SHARED_OPTS='unknown'
12657 MK_SHARED_LIB='echo unknown'
12661 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
12662 case "$cf_cv_shlib_version" in
12664 case "$MK_SHARED_LIB" in
12666 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
12669 { echo "$as_me:12669: WARNING: ignored --with-shlib-version" >&5
12670 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
12676 if test -n "$cf_try_cflags"
12678 cat > conftest.$ac_ext <<EOF
12679 #line 12679 "${as_me:-configure}"
12681 int main(int argc, char *argv[])
12683 printf("hello\\n");
12684 return (argv[argc-1] == 0) ;
12687 cf_save_CFLAGS="$CFLAGS"
12688 for cf_opt in $cf_try_cflags
12690 CFLAGS="$cf_save_CFLAGS -$cf_opt"
12691 echo "$as_me:12691: checking if CFLAGS option -$cf_opt works" >&5
12692 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
12693 if { (eval echo "$as_me:12693: \"$ac_compile\"") >&5
12694 (eval $ac_compile) 2>&5
12696 echo "$as_me:12696: \$? = $ac_status" >&5
12697 (exit "$ac_status"); }; then
12698 echo "$as_me:12698: result: yes" >&5
12699 echo "${ECHO_T}yes" >&6
12700 cf_save_CFLAGS="$CFLAGS"
12702 echo "$as_me:12702: result: no" >&5
12703 echo "${ECHO_T}no" >&6
12706 CFLAGS="$cf_save_CFLAGS"
12709 # RPATH_LIST is a colon-separated list of directories
12710 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
12711 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
12713 test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
12715 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
12717 echo "${as_me:-configure}:12717: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
12719 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
12721 echo "${as_me:-configure}:12721: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
12723 # The test/sample programs in the original tree link using rpath option.
12724 # Make it optional for packagers.
12725 if test -n "$LOCAL_LDFLAGS"
12727 echo "$as_me:12727: checking if you want to link sample programs with rpath option" >&5
12728 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
12730 # Check whether --enable-rpath-link or --disable-rpath-link was given.
12731 if test "${enable_rpath_link+set}" = set; then
12732 enableval="$enable_rpath_link"
12733 with_rpath_link=$enableval
12735 with_rpath_link=yes
12737 echo "$as_me:12737: result: $with_rpath_link" >&5
12738 echo "${ECHO_T}$with_rpath_link" >&6
12739 if test "$with_rpath_link" = no
12746 ###############################################################################
12748 ### use option --enable-broken-linker to force on use of broken-linker support
12750 echo "$as_me:12750: checking if you want broken-linker support code" >&5
12751 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
12753 # Check whether --enable-broken_linker or --disable-broken_linker was given.
12754 if test "${enable_broken_linker+set}" = set; then
12755 enableval="$enable_broken_linker"
12756 with_broken_linker=$enableval
12758 with_broken_linker=no
12760 echo "$as_me:12760: result: $with_broken_linker" >&5
12761 echo "${ECHO_T}$with_broken_linker" >&6
12763 : "${BROKEN_LINKER:=0}"
12764 if test "x$with_broken_linker" = xyes ; then
12766 cat >>confdefs.h <<\EOF
12767 #define BROKEN_LINKER 1
12773 # Check to define _XOPEN_SOURCE "automatically"
12775 echo "$as_me:12775: checking if the POSIX test-macros are already defined" >&5
12776 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
12777 if test "${cf_cv_posix_visible+set}" = set; then
12778 echo $ECHO_N "(cached) $ECHO_C" >&6
12781 cat >"conftest.$ac_ext" <<_ACEOF
12782 #line 12782 "configure"
12783 #include "confdefs.h"
12789 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
12790 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
12791 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
12792 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
12793 #error conflicting symbols found
12800 rm -f "conftest.$ac_objext"
12801 if { (eval echo "$as_me:12801: \"$ac_compile\"") >&5
12802 (eval $ac_compile) 2>&5
12804 echo "$as_me:12804: \$? = $ac_status" >&5
12805 (exit "$ac_status"); } &&
12806 { ac_try='test -s "conftest.$ac_objext"'
12807 { (eval echo "$as_me:12807: \"$ac_try\"") >&5
12808 (eval $ac_try) 2>&5
12810 echo "$as_me:12810: \$? = $ac_status" >&5
12811 (exit "$ac_status"); }; }; then
12812 cf_cv_posix_visible=no
12814 echo "$as_me: failed program was:" >&5
12815 cat "conftest.$ac_ext" >&5
12816 cf_cv_posix_visible=yes
12818 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12821 echo "$as_me:12821: result: $cf_cv_posix_visible" >&5
12822 echo "${ECHO_T}$cf_cv_posix_visible" >&6
12824 if test "$cf_cv_posix_visible" = no; then
12826 cf_XOPEN_SOURCE=600
12827 cf_POSIX_C_SOURCE=199506L
12832 cf_xopen_source="-D_ALL_SOURCE"
12835 cf_xopen_source="-D_APPLE_C_SOURCE"
12838 cf_xopen_source="-D_DARWIN_C_SOURCE"
12841 (freebsd*|dragonfly*|midnightbsd*)
12842 # 5.x headers associate
12843 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
12844 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
12845 cf_POSIX_C_SOURCE=200112L
12846 cf_XOPEN_SOURCE=600
12847 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12850 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
12853 cf_xopen_source="-D_HPUX_SOURCE"
12856 cf_xopen_source="-D_SGI_SOURCE"
12859 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
12861 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
12863 echo "$as_me:12863: checking if this is the GNU C library" >&5
12864 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
12865 if test "${cf_cv_gnu_library+set}" = set; then
12866 echo $ECHO_N "(cached) $ECHO_C" >&6
12869 cat >"conftest.$ac_ext" <<_ACEOF
12870 #line 12870 "configure"
12871 #include "confdefs.h"
12872 #include <sys/types.h>
12877 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
12879 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
12882 # error not GNU C library
12888 rm -f "conftest.$ac_objext"
12889 if { (eval echo "$as_me:12889: \"$ac_compile\"") >&5
12890 (eval $ac_compile) 2>&5
12892 echo "$as_me:12892: \$? = $ac_status" >&5
12893 (exit "$ac_status"); } &&
12894 { ac_try='test -s "conftest.$ac_objext"'
12895 { (eval echo "$as_me:12895: \"$ac_try\"") >&5
12896 (eval $ac_try) 2>&5
12898 echo "$as_me:12898: \$? = $ac_status" >&5
12899 (exit "$ac_status"); }; }; then
12900 cf_cv_gnu_library=yes
12902 echo "$as_me: failed program was:" >&5
12903 cat "conftest.$ac_ext" >&5
12904 cf_cv_gnu_library=no
12906 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12909 echo "$as_me:12909: result: $cf_cv_gnu_library" >&5
12910 echo "${ECHO_T}$cf_cv_gnu_library" >&6
12912 if test x$cf_cv_gnu_library = xyes; then
12914 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
12915 # was changed to help a little. newlib incorporated the change about 4
12917 echo "$as_me:12917: checking if _DEFAULT_SOURCE can be used as a basis" >&5
12918 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
12919 if test "${cf_cv_gnu_library_219+set}" = set; then
12920 echo $ECHO_N "(cached) $ECHO_C" >&6
12923 cf_save="$CPPFLAGS"
12925 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12926 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12928 cat >"conftest.$ac_ext" <<_ACEOF
12929 #line 12929 "configure"
12930 #include "confdefs.h"
12931 #include <sys/types.h>
12936 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
12938 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
12941 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
12947 rm -f "conftest.$ac_objext"
12948 if { (eval echo "$as_me:12948: \"$ac_compile\"") >&5
12949 (eval $ac_compile) 2>&5
12951 echo "$as_me:12951: \$? = $ac_status" >&5
12952 (exit "$ac_status"); } &&
12953 { ac_try='test -s "conftest.$ac_objext"'
12954 { (eval echo "$as_me:12954: \"$ac_try\"") >&5
12955 (eval $ac_try) 2>&5
12957 echo "$as_me:12957: \$? = $ac_status" >&5
12958 (exit "$ac_status"); }; }; then
12959 cf_cv_gnu_library_219=yes
12961 echo "$as_me: failed program was:" >&5
12962 cat "conftest.$ac_ext" >&5
12963 cf_cv_gnu_library_219=no
12965 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12966 CPPFLAGS="$cf_save"
12969 echo "$as_me:12969: result: $cf_cv_gnu_library_219" >&5
12970 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
12972 if test "x$cf_cv_gnu_library_219" = xyes; then
12973 cf_save="$CPPFLAGS"
12974 echo "$as_me:12974: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
12975 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
12976 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
12977 echo $ECHO_N "(cached) $ECHO_C" >&6
12983 cf_new_extra_cppflags=
12985 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
12987 case "$cf_fix_cppflags" in
12989 case "$cf_add_cflags" in
12990 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12991 case "$cf_add_cflags" in
12993 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12995 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12996 && test -z "${cf_tst_cflags}" \
12997 && cf_fix_cppflags=yes
12999 if test "$cf_fix_cppflags" = yes ; then
13001 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13002 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13005 elif test "${cf_tst_cflags}" = "\"'" ; then
13007 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13008 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13014 case "$CPPFLAGS" in
13018 case "$cf_add_cflags" in
13020 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13022 CPPFLAGS=`echo "$CPPFLAGS" | \
13023 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13024 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13029 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13030 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13037 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13038 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13045 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13046 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13048 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13050 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13051 && test -z "${cf_tst_cflags}" \
13052 && cf_fix_cppflags=no
13057 if test -n "$cf_new_cflags" ; then
13059 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13060 CFLAGS="${CFLAGS}$cf_new_cflags"
13064 if test -n "$cf_new_cppflags" ; then
13066 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13067 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13071 if test -n "$cf_new_extra_cppflags" ; then
13073 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13074 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13078 cat >"conftest.$ac_ext" <<_ACEOF
13079 #line 13079 "configure"
13080 #include "confdefs.h"
13082 #include <limits.h>
13083 #include <sys/types.h>
13089 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
13092 # error GNU C library is too old
13098 rm -f "conftest.$ac_objext"
13099 if { (eval echo "$as_me:13099: \"$ac_compile\"") >&5
13100 (eval $ac_compile) 2>&5
13102 echo "$as_me:13102: \$? = $ac_status" >&5
13103 (exit "$ac_status"); } &&
13104 { ac_try='test -s "conftest.$ac_objext"'
13105 { (eval echo "$as_me:13105: \"$ac_try\"") >&5
13106 (eval $ac_try) 2>&5
13108 echo "$as_me:13108: \$? = $ac_status" >&5
13109 (exit "$ac_status"); }; }; then
13110 cf_cv_gnu_dftsrc_219=yes
13112 echo "$as_me: failed program was:" >&5
13113 cat "conftest.$ac_ext" >&5
13114 cf_cv_gnu_dftsrc_219=no
13116 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13119 echo "$as_me:13119: result: $cf_cv_gnu_dftsrc_219" >&5
13120 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
13121 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
13123 cf_cv_gnu_dftsrc_219=maybe
13126 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
13128 echo "$as_me:13128: checking if we must define _GNU_SOURCE" >&5
13129 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
13130 if test "${cf_cv_gnu_source+set}" = set; then
13131 echo $ECHO_N "(cached) $ECHO_C" >&6
13134 cat >"conftest.$ac_ext" <<_ACEOF
13135 #line 13135 "configure"
13136 #include "confdefs.h"
13137 #include <sys/types.h>
13142 #ifndef _XOPEN_SOURCE
13143 #error expected _XOPEN_SOURCE to be defined
13149 rm -f "conftest.$ac_objext"
13150 if { (eval echo "$as_me:13150: \"$ac_compile\"") >&5
13151 (eval $ac_compile) 2>&5
13153 echo "$as_me:13153: \$? = $ac_status" >&5
13154 (exit "$ac_status"); } &&
13155 { ac_try='test -s "conftest.$ac_objext"'
13156 { (eval echo "$as_me:13156: \"$ac_try\"") >&5
13157 (eval $ac_try) 2>&5
13159 echo "$as_me:13159: \$? = $ac_status" >&5
13160 (exit "$ac_status"); }; }; then
13161 cf_cv_gnu_source=no
13163 echo "$as_me: failed program was:" >&5
13164 cat "conftest.$ac_ext" >&5
13165 cf_save="$CPPFLAGS"
13170 cf_new_extra_cppflags=
13172 for cf_add_cflags in -D_GNU_SOURCE
13174 case "$cf_fix_cppflags" in
13176 case "$cf_add_cflags" in
13177 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13178 case "$cf_add_cflags" in
13180 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13182 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13183 && test -z "${cf_tst_cflags}" \
13184 && cf_fix_cppflags=yes
13186 if test "$cf_fix_cppflags" = yes ; then
13188 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13189 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13192 elif test "${cf_tst_cflags}" = "\"'" ; then
13194 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13195 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13201 case "$CPPFLAGS" in
13205 case "$cf_add_cflags" in
13207 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13209 CPPFLAGS=`echo "$CPPFLAGS" | \
13210 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13211 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13216 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13217 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13224 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13225 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13232 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13233 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13235 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13237 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13238 && test -z "${cf_tst_cflags}" \
13239 && cf_fix_cppflags=no
13244 if test -n "$cf_new_cflags" ; then
13246 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13247 CFLAGS="${CFLAGS}$cf_new_cflags"
13251 if test -n "$cf_new_cppflags" ; then
13253 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13254 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13258 if test -n "$cf_new_extra_cppflags" ; then
13260 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13261 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13265 cat >"conftest.$ac_ext" <<_ACEOF
13266 #line 13266 "configure"
13267 #include "confdefs.h"
13268 #include <sys/types.h>
13273 #ifdef _XOPEN_SOURCE
13274 #error expected _XOPEN_SOURCE to be undefined
13280 rm -f "conftest.$ac_objext"
13281 if { (eval echo "$as_me:13281: \"$ac_compile\"") >&5
13282 (eval $ac_compile) 2>&5
13284 echo "$as_me:13284: \$? = $ac_status" >&5
13285 (exit "$ac_status"); } &&
13286 { ac_try='test -s "conftest.$ac_objext"'
13287 { (eval echo "$as_me:13287: \"$ac_try\"") >&5
13288 (eval $ac_try) 2>&5
13290 echo "$as_me:13290: \$? = $ac_status" >&5
13291 (exit "$ac_status"); }; }; then
13292 cf_cv_gnu_source=no
13294 echo "$as_me: failed program was:" >&5
13295 cat "conftest.$ac_ext" >&5
13296 cf_cv_gnu_source=yes
13298 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13299 CPPFLAGS="$cf_save"
13302 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13305 echo "$as_me:13305: result: $cf_cv_gnu_source" >&5
13306 echo "${ECHO_T}$cf_cv_gnu_source" >&6
13308 if test "$cf_cv_gnu_source" = yes
13310 echo "$as_me:13310: checking if we should also define _DEFAULT_SOURCE" >&5
13311 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
13312 if test "${cf_cv_default_source+set}" = set; then
13313 echo $ECHO_N "(cached) $ECHO_C" >&6
13316 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13317 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
13319 cat >"conftest.$ac_ext" <<_ACEOF
13320 #line 13320 "configure"
13321 #include "confdefs.h"
13322 #include <sys/types.h>
13327 #ifdef _DEFAULT_SOURCE
13328 #error expected _DEFAULT_SOURCE to be undefined
13334 rm -f "conftest.$ac_objext"
13335 if { (eval echo "$as_me:13335: \"$ac_compile\"") >&5
13336 (eval $ac_compile) 2>&5
13338 echo "$as_me:13338: \$? = $ac_status" >&5
13339 (exit "$ac_status"); } &&
13340 { ac_try='test -s "conftest.$ac_objext"'
13341 { (eval echo "$as_me:13341: \"$ac_try\"") >&5
13342 (eval $ac_try) 2>&5
13344 echo "$as_me:13344: \$? = $ac_status" >&5
13345 (exit "$ac_status"); }; }; then
13346 cf_cv_default_source=no
13348 echo "$as_me: failed program was:" >&5
13349 cat "conftest.$ac_ext" >&5
13350 cf_cv_default_source=yes
13352 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13355 echo "$as_me:13355: result: $cf_cv_default_source" >&5
13356 echo "${ECHO_T}$cf_cv_default_source" >&6
13357 if test "$cf_cv_default_source" = yes
13360 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13361 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
13371 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
13374 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
13377 if test "$cf_cv_posix_visible" = no; then
13379 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
13381 cf_save_CFLAGS="$CFLAGS"
13382 cf_save_CPPFLAGS="$CPPFLAGS"
13384 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13385 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13386 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13388 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13389 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13390 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13392 echo "$as_me:13392: checking if we should define _POSIX_C_SOURCE" >&5
13393 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13394 if test "${cf_cv_posix_c_source+set}" = set; then
13395 echo $ECHO_N "(cached) $ECHO_C" >&6
13398 echo "${as_me:-configure}:13398: testing if the symbol is already defined go no further ..." 1>&5
13400 cat >"conftest.$ac_ext" <<_ACEOF
13401 #line 13401 "configure"
13402 #include "confdefs.h"
13403 #include <sys/types.h>
13408 #ifndef _POSIX_C_SOURCE
13409 #error _POSIX_C_SOURCE is not defined
13415 rm -f "conftest.$ac_objext"
13416 if { (eval echo "$as_me:13416: \"$ac_compile\"") >&5
13417 (eval $ac_compile) 2>&5
13419 echo "$as_me:13419: \$? = $ac_status" >&5
13420 (exit "$ac_status"); } &&
13421 { ac_try='test -s "conftest.$ac_objext"'
13422 { (eval echo "$as_me:13422: \"$ac_try\"") >&5
13423 (eval $ac_try) 2>&5
13425 echo "$as_me:13425: \$? = $ac_status" >&5
13426 (exit "$ac_status"); }; }; then
13427 cf_cv_posix_c_source=no
13429 echo "$as_me: failed program was:" >&5
13430 cat "conftest.$ac_ext" >&5
13431 cf_want_posix_source=no
13432 case .$cf_POSIX_C_SOURCE in
13434 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13437 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13438 cf_want_posix_source=yes
13441 cf_want_posix_source=yes
13444 if test "$cf_want_posix_source" = yes ; then
13445 cat >"conftest.$ac_ext" <<_ACEOF
13446 #line 13446 "configure"
13447 #include "confdefs.h"
13448 #include <sys/types.h>
13453 #ifdef _POSIX_SOURCE
13454 #error _POSIX_SOURCE is 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
13474 echo "$as_me: failed program was:" >&5
13475 cat "conftest.$ac_ext" >&5
13476 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13478 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13481 echo "${as_me:-configure}:13481: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13483 CFLAGS="$cf_trim_CFLAGS"
13484 CPPFLAGS="$cf_trim_CPPFLAGS"
13486 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13487 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13489 echo "${as_me:-configure}:13489: testing if the second compile does not leave our definition intact error ..." 1>&5
13491 cat >"conftest.$ac_ext" <<_ACEOF
13492 #line 13492 "configure"
13493 #include "confdefs.h"
13494 #include <sys/types.h>
13499 #ifndef _POSIX_C_SOURCE
13500 #error _POSIX_C_SOURCE is not defined
13506 rm -f "conftest.$ac_objext"
13507 if { (eval echo "$as_me:13507: \"$ac_compile\"") >&5
13508 (eval $ac_compile) 2>&5
13510 echo "$as_me:13510: \$? = $ac_status" >&5
13511 (exit "$ac_status"); } &&
13512 { ac_try='test -s "conftest.$ac_objext"'
13513 { (eval echo "$as_me:13513: \"$ac_try\"") >&5
13514 (eval $ac_try) 2>&5
13516 echo "$as_me:13516: \$? = $ac_status" >&5
13517 (exit "$ac_status"); }; }; then
13520 echo "$as_me: failed program was:" >&5
13521 cat "conftest.$ac_ext" >&5
13522 cf_cv_posix_c_source=no
13524 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13525 CFLAGS="$cf_save_CFLAGS"
13526 CPPFLAGS="$cf_save_CPPFLAGS"
13529 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13532 echo "$as_me:13532: result: $cf_cv_posix_c_source" >&5
13533 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13535 if test "$cf_cv_posix_c_source" != no ; then
13536 CFLAGS="$cf_trim_CFLAGS"
13537 CPPFLAGS="$cf_trim_CPPFLAGS"
13542 cf_new_extra_cppflags=
13544 for cf_add_cflags in $cf_cv_posix_c_source
13546 case "$cf_fix_cppflags" in
13548 case "$cf_add_cflags" in
13549 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13550 case "$cf_add_cflags" in
13552 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13554 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13555 && test -z "${cf_tst_cflags}" \
13556 && cf_fix_cppflags=yes
13558 if test "$cf_fix_cppflags" = yes ; then
13560 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13561 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13564 elif test "${cf_tst_cflags}" = "\"'" ; then
13566 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13567 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13573 case "$CPPFLAGS" in
13577 case "$cf_add_cflags" in
13579 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13581 CPPFLAGS=`echo "$CPPFLAGS" | \
13582 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13583 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13588 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13589 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13596 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13597 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13604 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13605 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13607 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13609 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13610 && test -z "${cf_tst_cflags}" \
13611 && cf_fix_cppflags=no
13616 if test -n "$cf_new_cflags" ; then
13618 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13619 CFLAGS="${CFLAGS}$cf_new_cflags"
13623 if test -n "$cf_new_cppflags" ; then
13625 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13626 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13630 if test -n "$cf_new_extra_cppflags" ; then
13632 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13633 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13639 fi # cf_cv_posix_visible
13643 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
13646 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
13647 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
13648 # Abusing the conformance level is a workaround.
13649 { echo "$as_me:13649: WARNING: this system does not provide usable locale support" >&5
13650 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
13651 cf_xopen_source="-D_BSD_SOURCE"
13652 cf_XOPEN_SOURCE=700
13655 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
13656 cf_xopen_source="-D_BSD_SOURCE"
13657 cf_XOPEN_SOURCE=600
13660 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
13663 cf_xopen_source="-D_OSF_SOURCE"
13666 cf_xopen_source="-D_QNX_SOURCE"
13669 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
13672 cf_xopen_source="-D__EXTENSIONS__"
13673 cf_cv_xopen_source=broken
13675 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
13681 echo "$as_me:13681: checking if we should define _XOPEN_SOURCE" >&5
13682 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13683 if test "${cf_cv_xopen_source+set}" = set; then
13684 echo $ECHO_N "(cached) $ECHO_C" >&6
13687 cat >"conftest.$ac_ext" <<_ACEOF
13688 #line 13688 "configure"
13689 #include "confdefs.h"
13691 $ac_includes_default
13697 #ifndef _XOPEN_SOURCE
13698 #error _XOPEN_SOURCE is not defined
13705 rm -f "conftest.$ac_objext"
13706 if { (eval echo "$as_me:13706: \"$ac_compile\"") >&5
13707 (eval $ac_compile) 2>&5
13709 echo "$as_me:13709: \$? = $ac_status" >&5
13710 (exit "$ac_status"); } &&
13711 { ac_try='test -s "conftest.$ac_objext"'
13712 { (eval echo "$as_me:13712: \"$ac_try\"") >&5
13713 (eval $ac_try) 2>&5
13715 echo "$as_me:13715: \$? = $ac_status" >&5
13716 (exit "$ac_status"); }; }; then
13717 cf_cv_xopen_source=no
13719 echo "$as_me: failed program was:" >&5
13720 cat "conftest.$ac_ext" >&5
13721 cf_save="$CPPFLAGS"
13723 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13724 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13726 cat >"conftest.$ac_ext" <<_ACEOF
13727 #line 13727 "configure"
13728 #include "confdefs.h"
13730 $ac_includes_default
13736 #ifndef _XOPEN_SOURCE
13737 #error _XOPEN_SOURCE is not defined
13744 rm -f "conftest.$ac_objext"
13745 if { (eval echo "$as_me:13745: \"$ac_compile\"") >&5
13746 (eval $ac_compile) 2>&5
13748 echo "$as_me:13748: \$? = $ac_status" >&5
13749 (exit "$ac_status"); } &&
13750 { ac_try='test -s "conftest.$ac_objext"'
13751 { (eval echo "$as_me:13751: \"$ac_try\"") >&5
13752 (eval $ac_try) 2>&5
13754 echo "$as_me:13754: \$? = $ac_status" >&5
13755 (exit "$ac_status"); }; }; then
13756 cf_cv_xopen_source=no
13758 echo "$as_me: failed program was:" >&5
13759 cat "conftest.$ac_ext" >&5
13760 cf_cv_xopen_source=$cf_XOPEN_SOURCE
13762 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13763 CPPFLAGS="$cf_save"
13766 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13769 echo "$as_me:13769: result: $cf_cv_xopen_source" >&5
13770 echo "${ECHO_T}$cf_cv_xopen_source" >&6
13772 if test "$cf_cv_xopen_source" != no ; then
13774 CFLAGS=`echo "$CFLAGS" | \
13775 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13776 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13778 CPPFLAGS=`echo "$CPPFLAGS" | \
13779 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13780 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13782 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13784 for cf_add_cflags in $cf_temp_xopen_source
13786 case "x$cf_add_cflags" in
13789 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13792 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'`
13793 test "$CFLAGS" != "$cf_old_cflag" || break
13795 CFLAGS="$cf_old_cflag"
13798 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13801 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'`
13802 test "$CPPFLAGS" != "$cf_old_cflag" || break
13804 CPPFLAGS="$cf_old_cflag"
13813 cf_new_extra_cppflags=
13815 for cf_add_cflags in $cf_add_cflags
13817 case "$cf_fix_cppflags" in
13819 case "$cf_add_cflags" in
13820 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13821 case "$cf_add_cflags" in
13823 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13825 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13826 && test -z "${cf_tst_cflags}" \
13827 && cf_fix_cppflags=yes
13829 if test "$cf_fix_cppflags" = yes ; then
13831 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13832 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13835 elif test "${cf_tst_cflags}" = "\"'" ; then
13837 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13838 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13844 case "$CPPFLAGS" in
13848 case "$cf_add_cflags" in
13850 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13852 CPPFLAGS=`echo "$CPPFLAGS" | \
13853 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13854 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13859 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13860 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13867 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13868 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13875 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13876 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13878 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13880 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13881 && test -z "${cf_tst_cflags}" \
13882 && cf_fix_cppflags=no
13887 if test -n "$cf_new_cflags" ; then
13889 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13890 CFLAGS="${CFLAGS}$cf_new_cflags"
13894 if test -n "$cf_new_cppflags" ; then
13896 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13897 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13901 if test -n "$cf_new_extra_cppflags" ; then
13903 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13904 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13912 cf_save_xopen_cppflags="$CPPFLAGS"
13914 if test "$cf_cv_posix_visible" = no; then
13916 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
13918 cf_save_CFLAGS="$CFLAGS"
13919 cf_save_CPPFLAGS="$CPPFLAGS"
13921 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13922 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13923 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13925 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13926 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13927 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13929 echo "$as_me:13929: checking if we should define _POSIX_C_SOURCE" >&5
13930 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13931 if test "${cf_cv_posix_c_source+set}" = set; then
13932 echo $ECHO_N "(cached) $ECHO_C" >&6
13935 echo "${as_me:-configure}:13935: testing if the symbol is already defined go no further ..." 1>&5
13937 cat >"conftest.$ac_ext" <<_ACEOF
13938 #line 13938 "configure"
13939 #include "confdefs.h"
13940 #include <sys/types.h>
13945 #ifndef _POSIX_C_SOURCE
13946 #error _POSIX_C_SOURCE is not defined
13952 rm -f "conftest.$ac_objext"
13953 if { (eval echo "$as_me:13953: \"$ac_compile\"") >&5
13954 (eval $ac_compile) 2>&5
13956 echo "$as_me:13956: \$? = $ac_status" >&5
13957 (exit "$ac_status"); } &&
13958 { ac_try='test -s "conftest.$ac_objext"'
13959 { (eval echo "$as_me:13959: \"$ac_try\"") >&5
13960 (eval $ac_try) 2>&5
13962 echo "$as_me:13962: \$? = $ac_status" >&5
13963 (exit "$ac_status"); }; }; then
13964 cf_cv_posix_c_source=no
13966 echo "$as_me: failed program was:" >&5
13967 cat "conftest.$ac_ext" >&5
13968 cf_want_posix_source=no
13969 case .$cf_POSIX_C_SOURCE in
13971 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13974 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13975 cf_want_posix_source=yes
13978 cf_want_posix_source=yes
13981 if test "$cf_want_posix_source" = yes ; then
13982 cat >"conftest.$ac_ext" <<_ACEOF
13983 #line 13983 "configure"
13984 #include "confdefs.h"
13985 #include <sys/types.h>
13990 #ifdef _POSIX_SOURCE
13991 #error _POSIX_SOURCE is 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
14011 echo "$as_me: failed program was:" >&5
14012 cat "conftest.$ac_ext" >&5
14013 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
14015 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14018 echo "${as_me:-configure}:14018: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
14020 CFLAGS="$cf_trim_CFLAGS"
14021 CPPFLAGS="$cf_trim_CPPFLAGS"
14023 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14024 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
14026 echo "${as_me:-configure}:14026: testing if the second compile does not leave our definition intact error ..." 1>&5
14028 cat >"conftest.$ac_ext" <<_ACEOF
14029 #line 14029 "configure"
14030 #include "confdefs.h"
14031 #include <sys/types.h>
14036 #ifndef _POSIX_C_SOURCE
14037 #error _POSIX_C_SOURCE is not defined
14043 rm -f "conftest.$ac_objext"
14044 if { (eval echo "$as_me:14044: \"$ac_compile\"") >&5
14045 (eval $ac_compile) 2>&5
14047 echo "$as_me:14047: \$? = $ac_status" >&5
14048 (exit "$ac_status"); } &&
14049 { ac_try='test -s "conftest.$ac_objext"'
14050 { (eval echo "$as_me:14050: \"$ac_try\"") >&5
14051 (eval $ac_try) 2>&5
14053 echo "$as_me:14053: \$? = $ac_status" >&5
14054 (exit "$ac_status"); }; }; then
14057 echo "$as_me: failed program was:" >&5
14058 cat "conftest.$ac_ext" >&5
14059 cf_cv_posix_c_source=no
14061 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14062 CFLAGS="$cf_save_CFLAGS"
14063 CPPFLAGS="$cf_save_CPPFLAGS"
14066 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14069 echo "$as_me:14069: result: $cf_cv_posix_c_source" >&5
14070 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
14072 if test "$cf_cv_posix_c_source" != no ; then
14073 CFLAGS="$cf_trim_CFLAGS"
14074 CPPFLAGS="$cf_trim_CPPFLAGS"
14079 cf_new_extra_cppflags=
14081 for cf_add_cflags in $cf_cv_posix_c_source
14083 case "$cf_fix_cppflags" in
14085 case "$cf_add_cflags" in
14086 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14087 case "$cf_add_cflags" in
14089 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14091 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14092 && test -z "${cf_tst_cflags}" \
14093 && cf_fix_cppflags=yes
14095 if test "$cf_fix_cppflags" = yes ; then
14097 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14098 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14101 elif test "${cf_tst_cflags}" = "\"'" ; then
14103 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14104 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14110 case "$CPPFLAGS" in
14114 case "$cf_add_cflags" in
14116 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14118 CPPFLAGS=`echo "$CPPFLAGS" | \
14119 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14120 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14125 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14126 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14133 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14134 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14141 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14142 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14144 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14146 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14147 && test -z "${cf_tst_cflags}" \
14148 && cf_fix_cppflags=no
14153 if test -n "$cf_new_cflags" ; then
14155 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14156 CFLAGS="${CFLAGS}$cf_new_cflags"
14160 if test -n "$cf_new_cppflags" ; then
14162 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14163 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14167 if test -n "$cf_new_extra_cppflags" ; then
14169 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14170 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14176 fi # cf_cv_posix_visible
14178 # Some of these niche implementations use copy/paste, double-check...
14179 if test "$cf_cv_xopen_source" = no ; then
14180 test -n "$verbose" && echo " checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6
14182 echo "${as_me:-configure}:14182: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5
14184 cat >"conftest.$ac_ext" <<_ACEOF
14185 #line 14185 "configure"
14186 #include "confdefs.h"
14188 $ac_includes_default
14194 #ifndef _XOPEN_SOURCE
14195 #error _XOPEN_SOURCE is not defined
14202 rm -f "conftest.$ac_objext"
14203 if { (eval echo "$as_me:14203: \"$ac_compile\"") >&5
14204 (eval $ac_compile) 2>&5
14206 echo "$as_me:14206: \$? = $ac_status" >&5
14207 (exit "$ac_status"); } &&
14208 { ac_try='test -s "conftest.$ac_objext"'
14209 { (eval echo "$as_me:14209: \"$ac_try\"") >&5
14210 (eval $ac_try) 2>&5
14212 echo "$as_me:14212: \$? = $ac_status" >&5
14213 (exit "$ac_status"); }; }; then
14216 echo "$as_me: failed program was:" >&5
14217 cat "conftest.$ac_ext" >&5
14219 { echo "$as_me:14219: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
14220 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
14221 CPPFLAGS="$cf_save_xopen_cppflags"
14223 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14228 if test -n "$cf_xopen_source" ; then
14230 for cf_add_cflags in $cf_xopen_source
14232 case "x$cf_add_cflags" in
14235 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14238 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'`
14239 test "$CFLAGS" != "$cf_old_cflag" || break
14240 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
14242 echo "${as_me:-configure}:14242: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
14244 CFLAGS="$cf_old_cflag"
14247 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14250 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'`
14251 test "$CPPFLAGS" != "$cf_old_cflag" || break
14252 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
14254 echo "${as_me:-configure}:14254: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
14256 CPPFLAGS="$cf_old_cflag"
14265 cf_new_extra_cppflags=
14267 for cf_add_cflags in $cf_add_cflags
14269 case "$cf_fix_cppflags" in
14271 case "$cf_add_cflags" in
14272 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14273 case "$cf_add_cflags" in
14275 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14277 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14278 && test -z "${cf_tst_cflags}" \
14279 && cf_fix_cppflags=yes
14281 if test "$cf_fix_cppflags" = yes ; then
14283 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14284 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14287 elif test "${cf_tst_cflags}" = "\"'" ; then
14289 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14290 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14296 case "$CPPFLAGS" in
14300 case "$cf_add_cflags" in
14302 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14304 CPPFLAGS=`echo "$CPPFLAGS" | \
14305 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14306 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14311 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14312 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14319 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14320 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14327 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14328 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14330 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14332 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14333 && test -z "${cf_tst_cflags}" \
14334 && cf_fix_cppflags=no
14339 if test -n "$cf_new_cflags" ; then
14340 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
14342 echo "${as_me:-configure}:14342: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
14344 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14345 CFLAGS="${CFLAGS}$cf_new_cflags"
14349 if test -n "$cf_new_cppflags" ; then
14350 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
14352 echo "${as_me:-configure}:14352: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
14354 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14355 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14359 if test -n "$cf_new_extra_cppflags" ; then
14360 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
14362 echo "${as_me:-configure}:14362: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
14364 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14365 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14373 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
14374 echo "$as_me:14374: checking if _XOPEN_SOURCE really is set" >&5
14375 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
14376 cat >"conftest.$ac_ext" <<_ACEOF
14377 #line 14377 "configure"
14378 #include "confdefs.h"
14379 #include <stdlib.h>
14384 #ifndef _XOPEN_SOURCE
14385 #error _XOPEN_SOURCE is not defined
14391 rm -f "conftest.$ac_objext"
14392 if { (eval echo "$as_me:14392: \"$ac_compile\"") >&5
14393 (eval $ac_compile) 2>&5
14395 echo "$as_me:14395: \$? = $ac_status" >&5
14396 (exit "$ac_status"); } &&
14397 { ac_try='test -s "conftest.$ac_objext"'
14398 { (eval echo "$as_me:14398: \"$ac_try\"") >&5
14399 (eval $ac_try) 2>&5
14401 echo "$as_me:14401: \$? = $ac_status" >&5
14402 (exit "$ac_status"); }; }; then
14403 cf_XOPEN_SOURCE_set=yes
14405 echo "$as_me: failed program was:" >&5
14406 cat "conftest.$ac_ext" >&5
14407 cf_XOPEN_SOURCE_set=no
14409 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14410 echo "$as_me:14410: result: $cf_XOPEN_SOURCE_set" >&5
14411 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
14412 if test "$cf_XOPEN_SOURCE_set" = yes
14414 cat >"conftest.$ac_ext" <<_ACEOF
14415 #line 14415 "configure"
14416 #include "confdefs.h"
14417 #include <stdlib.h>
14422 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
14423 #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
14429 rm -f "conftest.$ac_objext"
14430 if { (eval echo "$as_me:14430: \"$ac_compile\"") >&5
14431 (eval $ac_compile) 2>&5
14433 echo "$as_me:14433: \$? = $ac_status" >&5
14434 (exit "$ac_status"); } &&
14435 { ac_try='test -s "conftest.$ac_objext"'
14436 { (eval echo "$as_me:14436: \"$ac_try\"") >&5
14437 (eval $ac_try) 2>&5
14439 echo "$as_me:14439: \$? = $ac_status" >&5
14440 (exit "$ac_status"); }; }; then
14441 cf_XOPEN_SOURCE_set_ok=yes
14443 echo "$as_me: failed program was:" >&5
14444 cat "conftest.$ac_ext" >&5
14445 cf_XOPEN_SOURCE_set_ok=no
14447 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14448 if test "$cf_XOPEN_SOURCE_set_ok" = no
14450 { echo "$as_me:14450: WARNING: _XOPEN_SOURCE is lower than requested" >&5
14451 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
14455 echo "$as_me:14455: checking if we should define _XOPEN_SOURCE" >&5
14456 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
14457 if test "${cf_cv_xopen_source+set}" = set; then
14458 echo $ECHO_N "(cached) $ECHO_C" >&6
14461 cat >"conftest.$ac_ext" <<_ACEOF
14462 #line 14462 "configure"
14463 #include "confdefs.h"
14465 $ac_includes_default
14471 #ifndef _XOPEN_SOURCE
14472 #error _XOPEN_SOURCE is not defined
14479 rm -f "conftest.$ac_objext"
14480 if { (eval echo "$as_me:14480: \"$ac_compile\"") >&5
14481 (eval $ac_compile) 2>&5
14483 echo "$as_me:14483: \$? = $ac_status" >&5
14484 (exit "$ac_status"); } &&
14485 { ac_try='test -s "conftest.$ac_objext"'
14486 { (eval echo "$as_me:14486: \"$ac_try\"") >&5
14487 (eval $ac_try) 2>&5
14489 echo "$as_me:14489: \$? = $ac_status" >&5
14490 (exit "$ac_status"); }; }; then
14491 cf_cv_xopen_source=no
14493 echo "$as_me: failed program was:" >&5
14494 cat "conftest.$ac_ext" >&5
14495 cf_save="$CPPFLAGS"
14497 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14498 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
14500 cat >"conftest.$ac_ext" <<_ACEOF
14501 #line 14501 "configure"
14502 #include "confdefs.h"
14504 $ac_includes_default
14510 #ifndef _XOPEN_SOURCE
14511 #error _XOPEN_SOURCE is not defined
14518 rm -f "conftest.$ac_objext"
14519 if { (eval echo "$as_me:14519: \"$ac_compile\"") >&5
14520 (eval $ac_compile) 2>&5
14522 echo "$as_me:14522: \$? = $ac_status" >&5
14523 (exit "$ac_status"); } &&
14524 { ac_try='test -s "conftest.$ac_objext"'
14525 { (eval echo "$as_me:14525: \"$ac_try\"") >&5
14526 (eval $ac_try) 2>&5
14528 echo "$as_me:14528: \$? = $ac_status" >&5
14529 (exit "$ac_status"); }; }; then
14530 cf_cv_xopen_source=no
14532 echo "$as_me: failed program was:" >&5
14533 cat "conftest.$ac_ext" >&5
14534 cf_cv_xopen_source=$cf_XOPEN_SOURCE
14536 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14537 CPPFLAGS="$cf_save"
14540 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14543 echo "$as_me:14543: result: $cf_cv_xopen_source" >&5
14544 echo "${ECHO_T}$cf_cv_xopen_source" >&6
14546 if test "$cf_cv_xopen_source" != no ; then
14548 CFLAGS=`echo "$CFLAGS" | \
14549 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14550 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14552 CPPFLAGS=`echo "$CPPFLAGS" | \
14553 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14554 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14556 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
14558 for cf_add_cflags in $cf_temp_xopen_source
14560 case "x$cf_add_cflags" in
14563 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14566 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'`
14567 test "$CFLAGS" != "$cf_old_cflag" || break
14569 CFLAGS="$cf_old_cflag"
14572 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14575 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'`
14576 test "$CPPFLAGS" != "$cf_old_cflag" || break
14578 CPPFLAGS="$cf_old_cflag"
14587 cf_new_extra_cppflags=
14589 for cf_add_cflags in $cf_add_cflags
14591 case "$cf_fix_cppflags" in
14593 case "$cf_add_cflags" in
14594 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14595 case "$cf_add_cflags" in
14597 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14599 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14600 && test -z "${cf_tst_cflags}" \
14601 && cf_fix_cppflags=yes
14603 if test "$cf_fix_cppflags" = yes ; then
14605 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14606 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14609 elif test "${cf_tst_cflags}" = "\"'" ; then
14611 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14612 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14618 case "$CPPFLAGS" in
14622 case "$cf_add_cflags" in
14624 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14626 CPPFLAGS=`echo "$CPPFLAGS" | \
14627 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14628 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14633 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14634 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14641 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14642 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14649 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14650 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14652 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14654 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14655 && test -z "${cf_tst_cflags}" \
14656 && cf_fix_cppflags=no
14661 if test -n "$cf_new_cflags" ; then
14663 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14664 CFLAGS="${CFLAGS}$cf_new_cflags"
14668 if test -n "$cf_new_cppflags" ; then
14670 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14671 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14675 if test -n "$cf_new_extra_cppflags" ; then
14677 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14678 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14688 fi # cf_cv_posix_visible
14690 echo "$as_me:14690: checking for ANSI C header files" >&5
14691 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14692 if test "${ac_cv_header_stdc+set}" = set; then
14693 echo $ECHO_N "(cached) $ECHO_C" >&6
14695 cat >"conftest.$ac_ext" <<_ACEOF
14696 #line 14696 "configure"
14697 #include "confdefs.h"
14698 #include <stdlib.h>
14699 #include <stdarg.h>
14700 #include <string.h>
14704 if { (eval echo "$as_me:14704: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14705 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14707 $EGREP -v '^ *\+' conftest.er1 >conftest.err
14709 cat conftest.err >&5
14710 echo "$as_me:14710: \$? = $ac_status" >&5
14711 (exit "$ac_status"); } >/dev/null; then
14712 if test -s conftest.err; then
14713 ac_cpp_err=$ac_c_preproc_warn_flag
14720 if test -z "$ac_cpp_err"; then
14721 ac_cv_header_stdc=yes
14723 echo "$as_me: failed program was:" >&5
14724 cat "conftest.$ac_ext" >&5
14725 ac_cv_header_stdc=no
14727 rm -f conftest.err "conftest.$ac_ext"
14729 if test $ac_cv_header_stdc = yes; then
14730 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14731 cat >"conftest.$ac_ext" <<_ACEOF
14732 #line 14732 "configure"
14733 #include "confdefs.h"
14734 #include <string.h>
14737 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14738 $EGREP "memchr" >/dev/null 2>&1; then
14741 ac_cv_header_stdc=no
14747 if test $ac_cv_header_stdc = yes; then
14748 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14749 cat >"conftest.$ac_ext" <<_ACEOF
14750 #line 14750 "configure"
14751 #include "confdefs.h"
14752 #include <stdlib.h>
14755 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14756 $EGREP "free" >/dev/null 2>&1; then
14759 ac_cv_header_stdc=no
14765 if test $ac_cv_header_stdc = yes; then
14766 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14767 if test "$cross_compiling" = yes; then
14770 cat >"conftest.$ac_ext" <<_ACEOF
14771 #line 14771 "configure"
14772 #include "confdefs.h"
14774 #if ((' ' & 0x0FF) == 0x020)
14775 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14776 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14778 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14779 || ('j' <= (c) && (c) <= 'r') \
14780 || ('s' <= (c) && (c) <= 'z'))
14781 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14784 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14789 for (i = 0; i < 256; i++)
14790 if (XOR (islower (i), ISLOWER (i))
14791 || toupper (i) != TOUPPER (i))
14792 $ac_main_return(2);
14793 $ac_main_return (0);
14796 rm -f "conftest$ac_exeext"
14797 if { (eval echo "$as_me:14797: \"$ac_link\"") >&5
14798 (eval $ac_link) 2>&5
14800 echo "$as_me:14800: \$? = $ac_status" >&5
14801 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14802 { (eval echo "$as_me:14802: \"$ac_try\"") >&5
14803 (eval $ac_try) 2>&5
14805 echo "$as_me:14805: \$? = $ac_status" >&5
14806 (exit "$ac_status"); }; }; then
14809 echo "$as_me: program exited with status $ac_status" >&5
14810 echo "$as_me: failed program was:" >&5
14811 cat "conftest.$ac_ext" >&5
14812 ac_cv_header_stdc=no
14814 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14818 echo "$as_me:14818: result: $ac_cv_header_stdc" >&5
14819 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14820 if test $ac_cv_header_stdc = yes; then
14822 cat >>confdefs.h <<\EOF
14823 #define STDC_HEADERS 1
14828 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
14830 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
14831 inttypes.h stdint.h unistd.h
14833 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14834 echo "$as_me:14834: checking for $ac_header" >&5
14835 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14836 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14837 echo $ECHO_N "(cached) $ECHO_C" >&6
14839 cat >"conftest.$ac_ext" <<_ACEOF
14840 #line 14840 "configure"
14841 #include "confdefs.h"
14842 $ac_includes_default
14843 #include <$ac_header>
14845 rm -f "conftest.$ac_objext"
14846 if { (eval echo "$as_me:14846: \"$ac_compile\"") >&5
14847 (eval $ac_compile) 2>&5
14849 echo "$as_me:14849: \$? = $ac_status" >&5
14850 (exit "$ac_status"); } &&
14851 { ac_try='test -s "conftest.$ac_objext"'
14852 { (eval echo "$as_me:14852: \"$ac_try\"") >&5
14853 (eval $ac_try) 2>&5
14855 echo "$as_me:14855: \$? = $ac_status" >&5
14856 (exit "$ac_status"); }; }; then
14857 eval "$as_ac_Header=yes"
14859 echo "$as_me: failed program was:" >&5
14860 cat "conftest.$ac_ext" >&5
14861 eval "$as_ac_Header=no"
14863 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14865 echo "$as_me:14865: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
14866 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
14867 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
14868 cat >>confdefs.h <<EOF
14869 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14875 echo "$as_me:14875: checking whether exit is declared" >&5
14876 echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
14877 if test "${ac_cv_have_decl_exit+set}" = set; then
14878 echo $ECHO_N "(cached) $ECHO_C" >&6
14880 cat >"conftest.$ac_ext" <<_ACEOF
14881 #line 14881 "configure"
14882 #include "confdefs.h"
14883 $ac_includes_default
14895 rm -f "conftest.$ac_objext"
14896 if { (eval echo "$as_me:14896: \"$ac_compile\"") >&5
14897 (eval $ac_compile) 2>&5
14899 echo "$as_me:14899: \$? = $ac_status" >&5
14900 (exit "$ac_status"); } &&
14901 { ac_try='test -s "conftest.$ac_objext"'
14902 { (eval echo "$as_me:14902: \"$ac_try\"") >&5
14903 (eval $ac_try) 2>&5
14905 echo "$as_me:14905: \$? = $ac_status" >&5
14906 (exit "$ac_status"); }; }; then
14907 ac_cv_have_decl_exit=yes
14909 echo "$as_me: failed program was:" >&5
14910 cat "conftest.$ac_ext" >&5
14911 ac_cv_have_decl_exit=no
14913 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14915 echo "$as_me:14915: result: $ac_cv_have_decl_exit" >&5
14916 echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
14918 # Check whether --enable-largefile or --disable-largefile was given.
14919 if test "${enable_largefile+set}" = set; then
14920 enableval="$enable_largefile"
14923 if test "$enable_largefile" != no; then
14925 echo "$as_me:14925: checking for special C compiler options needed for large files" >&5
14926 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
14927 if test "${ac_cv_sys_largefile_CC+set}" = set; then
14928 echo $ECHO_N "(cached) $ECHO_C" >&6
14930 ac_cv_sys_largefile_CC=no
14931 if test "$GCC" != yes; then
14934 # IRIX 6.2 and later do not support large files by default,
14935 # so use the C compiler's -n32 option if that helps.
14936 cat >"conftest.$ac_ext" <<_ACEOF
14937 #line 14937 "configure"
14938 #include "confdefs.h"
14939 #include <sys/types.h>
14940 /* Check that off_t can represent 2**63 - 1 correctly.
14941 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14942 since some C++ compilers masquerading as C compilers
14943 incorrectly reject 9223372036854775807. */
14944 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14945 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14946 && LARGE_OFF_T % 2147483647 == 1)
14956 rm -f "conftest.$ac_objext"
14957 if { (eval echo "$as_me:14957: \"$ac_compile\"") >&5
14958 (eval $ac_compile) 2>&5
14960 echo "$as_me:14960: \$? = $ac_status" >&5
14961 (exit "$ac_status"); } &&
14962 { ac_try='test -s "conftest.$ac_objext"'
14963 { (eval echo "$as_me:14963: \"$ac_try\"") >&5
14964 (eval $ac_try) 2>&5
14966 echo "$as_me:14966: \$? = $ac_status" >&5
14967 (exit "$ac_status"); }; }; then
14970 echo "$as_me: failed program was:" >&5
14971 cat "conftest.$ac_ext" >&5
14973 rm -f "conftest.$ac_objext"
14975 rm -f "conftest.$ac_objext"
14976 if { (eval echo "$as_me:14976: \"$ac_compile\"") >&5
14977 (eval $ac_compile) 2>&5
14979 echo "$as_me:14979: \$? = $ac_status" >&5
14980 (exit "$ac_status"); } &&
14981 { ac_try='test -s "conftest.$ac_objext"'
14982 { (eval echo "$as_me:14982: \"$ac_try\"") >&5
14983 (eval $ac_try) 2>&5
14985 echo "$as_me:14985: \$? = $ac_status" >&5
14986 (exit "$ac_status"); }; }; then
14987 ac_cv_sys_largefile_CC=' -n32'; break
14989 echo "$as_me: failed program was:" >&5
14990 cat "conftest.$ac_ext" >&5
14992 rm -f "conftest.$ac_objext"
14996 rm -f "conftest.$ac_ext"
14999 echo "$as_me:14999: result: $ac_cv_sys_largefile_CC" >&5
15000 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
15001 if test "$ac_cv_sys_largefile_CC" != no; then
15002 CC=$CC$ac_cv_sys_largefile_CC
15005 echo "$as_me:15005: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15006 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
15007 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
15008 echo $ECHO_N "(cached) $ECHO_C" >&6
15011 ac_cv_sys_file_offset_bits=no
15012 cat >"conftest.$ac_ext" <<_ACEOF
15013 #line 15013 "configure"
15014 #include "confdefs.h"
15015 #include <sys/types.h>
15016 /* Check that off_t can represent 2**63 - 1 correctly.
15017 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15018 since some C++ compilers masquerading as C compilers
15019 incorrectly reject 9223372036854775807. */
15020 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15021 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15022 && LARGE_OFF_T % 2147483647 == 1)
15032 rm -f "conftest.$ac_objext"
15033 if { (eval echo "$as_me:15033: \"$ac_compile\"") >&5
15034 (eval $ac_compile) 2>&5
15036 echo "$as_me:15036: \$? = $ac_status" >&5
15037 (exit "$ac_status"); } &&
15038 { ac_try='test -s "conftest.$ac_objext"'
15039 { (eval echo "$as_me:15039: \"$ac_try\"") >&5
15040 (eval $ac_try) 2>&5
15042 echo "$as_me:15042: \$? = $ac_status" >&5
15043 (exit "$ac_status"); }; }; then
15046 echo "$as_me: failed program was:" >&5
15047 cat "conftest.$ac_ext" >&5
15049 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15050 cat >"conftest.$ac_ext" <<_ACEOF
15051 #line 15051 "configure"
15052 #include "confdefs.h"
15053 #define _FILE_OFFSET_BITS 64
15054 #include <sys/types.h>
15055 /* Check that off_t can represent 2**63 - 1 correctly.
15056 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15057 since some C++ compilers masquerading as C compilers
15058 incorrectly reject 9223372036854775807. */
15059 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15060 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15061 && LARGE_OFF_T % 2147483647 == 1)
15071 rm -f "conftest.$ac_objext"
15072 if { (eval echo "$as_me:15072: \"$ac_compile\"") >&5
15073 (eval $ac_compile) 2>&5
15075 echo "$as_me:15075: \$? = $ac_status" >&5
15076 (exit "$ac_status"); } &&
15077 { ac_try='test -s "conftest.$ac_objext"'
15078 { (eval echo "$as_me:15078: \"$ac_try\"") >&5
15079 (eval $ac_try) 2>&5
15081 echo "$as_me:15081: \$? = $ac_status" >&5
15082 (exit "$ac_status"); }; }; then
15083 ac_cv_sys_file_offset_bits=64; break
15085 echo "$as_me: failed program was:" >&5
15086 cat "conftest.$ac_ext" >&5
15088 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15092 echo "$as_me:15092: result: $ac_cv_sys_file_offset_bits" >&5
15093 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
15094 if test "$ac_cv_sys_file_offset_bits" != no; then
15096 cat >>confdefs.h <<EOF
15097 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15102 echo "$as_me:15102: checking for _LARGE_FILES value needed for large files" >&5
15103 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
15104 if test "${ac_cv_sys_large_files+set}" = set; then
15105 echo $ECHO_N "(cached) $ECHO_C" >&6
15108 ac_cv_sys_large_files=no
15109 cat >"conftest.$ac_ext" <<_ACEOF
15110 #line 15110 "configure"
15111 #include "confdefs.h"
15112 #include <sys/types.h>
15113 /* Check that off_t can represent 2**63 - 1 correctly.
15114 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15115 since some C++ compilers masquerading as C compilers
15116 incorrectly reject 9223372036854775807. */
15117 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15118 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15119 && LARGE_OFF_T % 2147483647 == 1)
15129 rm -f "conftest.$ac_objext"
15130 if { (eval echo "$as_me:15130: \"$ac_compile\"") >&5
15131 (eval $ac_compile) 2>&5
15133 echo "$as_me:15133: \$? = $ac_status" >&5
15134 (exit "$ac_status"); } &&
15135 { ac_try='test -s "conftest.$ac_objext"'
15136 { (eval echo "$as_me:15136: \"$ac_try\"") >&5
15137 (eval $ac_try) 2>&5
15139 echo "$as_me:15139: \$? = $ac_status" >&5
15140 (exit "$ac_status"); }; }; then
15143 echo "$as_me: failed program was:" >&5
15144 cat "conftest.$ac_ext" >&5
15146 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15147 cat >"conftest.$ac_ext" <<_ACEOF
15148 #line 15148 "configure"
15149 #include "confdefs.h"
15150 #define _LARGE_FILES 1
15151 #include <sys/types.h>
15152 /* Check that off_t can represent 2**63 - 1 correctly.
15153 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15154 since some C++ compilers masquerading as C compilers
15155 incorrectly reject 9223372036854775807. */
15156 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15157 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15158 && LARGE_OFF_T % 2147483647 == 1)
15168 rm -f "conftest.$ac_objext"
15169 if { (eval echo "$as_me:15169: \"$ac_compile\"") >&5
15170 (eval $ac_compile) 2>&5
15172 echo "$as_me:15172: \$? = $ac_status" >&5
15173 (exit "$ac_status"); } &&
15174 { ac_try='test -s "conftest.$ac_objext"'
15175 { (eval echo "$as_me:15175: \"$ac_try\"") >&5
15176 (eval $ac_try) 2>&5
15178 echo "$as_me:15178: \$? = $ac_status" >&5
15179 (exit "$ac_status"); }; }; then
15180 ac_cv_sys_large_files=1; break
15182 echo "$as_me: failed program was:" >&5
15183 cat "conftest.$ac_ext" >&5
15185 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15189 echo "$as_me:15189: result: $ac_cv_sys_large_files" >&5
15190 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
15191 if test "$ac_cv_sys_large_files" != no; then
15193 cat >>confdefs.h <<EOF
15194 #define _LARGE_FILES $ac_cv_sys_large_files
15201 if test "$enable_largefile" != no ; then
15202 echo "$as_me:15202: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15203 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
15204 if test "${ac_cv_sys_largefile_source+set}" = set; then
15205 echo $ECHO_N "(cached) $ECHO_C" >&6
15208 ac_cv_sys_largefile_source=no
15209 cat >"conftest.$ac_ext" <<_ACEOF
15210 #line 15210 "configure"
15211 #include "confdefs.h"
15213 #include <sys/types.h>
15218 int (*my_fseeko)(FILE *, off_t, int) = fseeko;
15219 return my_fseeko(stdin, 0, 0);
15224 rm -f "conftest.$ac_objext"
15225 if { (eval echo "$as_me:15225: \"$ac_compile\"") >&5
15226 (eval $ac_compile) 2>&5
15228 echo "$as_me:15228: \$? = $ac_status" >&5
15229 (exit "$ac_status"); } &&
15230 { ac_try='test -s "conftest.$ac_objext"'
15231 { (eval echo "$as_me:15231: \"$ac_try\"") >&5
15232 (eval $ac_try) 2>&5
15234 echo "$as_me:15234: \$? = $ac_status" >&5
15235 (exit "$ac_status"); }; }; then
15238 echo "$as_me: failed program was:" >&5
15239 cat "conftest.$ac_ext" >&5
15241 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15242 cat >"conftest.$ac_ext" <<_ACEOF
15243 #line 15243 "configure"
15244 #include "confdefs.h"
15245 #define _LARGEFILE_SOURCE 1
15247 #include <sys/types.h>
15252 int (*my_fseeko)(FILE *, off_t, int) = fseeko;
15253 return my_fseeko(stdin, 0, 0);
15258 rm -f "conftest.$ac_objext"
15259 if { (eval echo "$as_me:15259: \"$ac_compile\"") >&5
15260 (eval $ac_compile) 2>&5
15262 echo "$as_me:15262: \$? = $ac_status" >&5
15263 (exit "$ac_status"); } &&
15264 { ac_try='test -s "conftest.$ac_objext"'
15265 { (eval echo "$as_me:15265: \"$ac_try\"") >&5
15266 (eval $ac_try) 2>&5
15268 echo "$as_me:15268: \$? = $ac_status" >&5
15269 (exit "$ac_status"); }; }; then
15270 ac_cv_sys_largefile_source=1; break
15272 echo "$as_me: failed program was:" >&5
15273 cat "conftest.$ac_ext" >&5
15275 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15279 echo "$as_me:15279: result: $ac_cv_sys_largefile_source" >&5
15280 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
15281 if test "$ac_cv_sys_largefile_source" != no; then
15283 cat >>confdefs.h <<EOF
15284 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15290 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15291 # in glibc 2.1.3, but that breaks too many other things.
15292 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15293 echo "$as_me:15293: checking for fseeko" >&5
15294 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
15295 if test "${ac_cv_func_fseeko+set}" = set; then
15296 echo $ECHO_N "(cached) $ECHO_C" >&6
15298 cat >"conftest.$ac_ext" <<_ACEOF
15299 #line 15299 "configure"
15300 #include "confdefs.h"
15302 #include <sys/types.h>
15306 int (*my_fseeko)(FILE *, off_t, int) = fseeko;
15307 return my_fseeko && my_fseeko (stdin, 0, 0);
15312 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15313 if { (eval echo "$as_me:15313: \"$ac_link\"") >&5
15314 (eval $ac_link) 2>&5
15316 echo "$as_me:15316: \$? = $ac_status" >&5
15317 (exit "$ac_status"); } &&
15318 { ac_try='test -s "conftest$ac_exeext"'
15319 { (eval echo "$as_me:15319: \"$ac_try\"") >&5
15320 (eval $ac_try) 2>&5
15322 echo "$as_me:15322: \$? = $ac_status" >&5
15323 (exit "$ac_status"); }; }; then
15324 ac_cv_func_fseeko=yes
15326 echo "$as_me: failed program was:" >&5
15327 cat "conftest.$ac_ext" >&5
15328 ac_cv_func_fseeko=no
15330 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15332 echo "$as_me:15332: result: $ac_cv_func_fseeko" >&5
15333 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
15334 if test $ac_cv_func_fseeko = yes; then
15336 cat >>confdefs.h <<\EOF
15337 #define HAVE_FSEEKO 1
15342 # Normally we would collect these definitions in the config.h,
15343 # but (like _XOPEN_SOURCE), some environments rely on having these
15344 # defined before any of the system headers are included. Another
15345 # case comes up with C++, e.g., on AIX the compiler compiles the
15346 # header files by themselves before looking at the body files it is
15347 # told to compile. For ncurses, those header files do not include
15349 if test "$ac_cv_sys_large_files" != no
15352 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15353 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
15356 if test "$ac_cv_sys_largefile_source" != no
15359 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15360 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
15363 if test "$ac_cv_sys_file_offset_bits" != no
15366 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15367 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
15371 echo "$as_me:15371: checking whether to use struct dirent64" >&5
15372 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
15373 if test "${cf_cv_struct_dirent64+set}" = set; then
15374 echo $ECHO_N "(cached) $ECHO_C" >&6
15377 cat >"conftest.$ac_ext" <<_ACEOF
15378 #line 15378 "configure"
15379 #include "confdefs.h"
15381 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
15382 #include <sys/types.h>
15383 #include <dirent.h>
15386 /* if transitional largefile support is setup, this is true */
15387 extern struct dirent64 * readdir(DIR *);
15394 DIR *dp = opendir(".");
15395 struct dirent64 *x = readdir(dp);
15396 struct dirent *y = readdir(dp);
15404 rm -f "conftest.$ac_objext"
15405 if { (eval echo "$as_me:15405: \"$ac_compile\"") >&5
15406 (eval $ac_compile) 2>&5
15408 echo "$as_me:15408: \$? = $ac_status" >&5
15409 (exit "$ac_status"); } &&
15410 { ac_try='test -s "conftest.$ac_objext"'
15411 { (eval echo "$as_me:15411: \"$ac_try\"") >&5
15412 (eval $ac_try) 2>&5
15414 echo "$as_me:15414: \$? = $ac_status" >&5
15415 (exit "$ac_status"); }; }; then
15416 cf_cv_struct_dirent64=yes
15418 echo "$as_me: failed program was:" >&5
15419 cat "conftest.$ac_ext" >&5
15420 cf_cv_struct_dirent64=no
15422 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15425 echo "$as_me:15425: result: $cf_cv_struct_dirent64" >&5
15426 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
15427 test "$cf_cv_struct_dirent64" = yes &&
15428 cat >>confdefs.h <<\EOF
15429 #define HAVE_STRUCT_DIRENT64 1
15434 ### Enable compiling-in rcs id's
15435 echo "$as_me:15435: checking if RCS identifiers should be compiled-in" >&5
15436 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
15438 # Check whether --with-rcs-ids or --without-rcs-ids was given.
15439 if test "${with_rcs_ids+set}" = set; then
15440 withval="$with_rcs_ids"
15441 with_rcs_ids=$withval
15445 echo "$as_me:15445: result: $with_rcs_ids" >&5
15446 echo "${ECHO_T}$with_rcs_ids" >&6
15447 test "$with_rcs_ids" = yes &&
15448 cat >>confdefs.h <<\EOF
15449 #define USE_RCS_IDS 1
15452 ###############################################################################
15454 ### Note that some functions (such as const) are normally disabled anyway.
15455 echo "$as_me:15455: checking if you want to build with function extensions" >&5
15456 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15458 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15459 if test "${enable_ext_funcs+set}" = set; then
15460 enableval="$enable_ext_funcs"
15461 with_ext_funcs=$enableval
15465 echo "$as_me:15465: result: $with_ext_funcs" >&5
15466 echo "${ECHO_T}$with_ext_funcs" >&6
15467 if test "$with_ext_funcs" = yes ; then
15468 NCURSES_EXT_FUNCS=1
15470 cat >>confdefs.h <<\EOF
15471 #define HAVE_USE_DEFAULT_COLORS 1
15474 cat >>confdefs.h <<\EOF
15475 #define NCURSES_EXT_FUNCS 1
15479 NCURSES_EXT_FUNCS=0
15482 ### use option --enable-const to turn on use of const beyond that in XSI.
15483 echo "$as_me:15483: checking for extended use of const keyword" >&5
15484 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15486 # Check whether --enable-const or --disable-const was given.
15487 if test "${enable_const+set}" = set; then
15488 enableval="$enable_const"
15489 with_ext_const=$enableval
15493 echo "$as_me:15493: result: $with_ext_const" >&5
15494 echo "${ECHO_T}$with_ext_const" >&6
15495 NCURSES_CONST='/*nothing*/'
15496 if test "$with_ext_const" = yes ; then
15497 NCURSES_CONST=const
15500 ###############################################################################
15501 # These options are relatively safe to experiment with.
15503 echo "$as_me:15503: checking if you want all development code" >&5
15504 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15506 # Check whether --with-develop or --without-develop was given.
15507 if test "${with_develop+set}" = set; then
15508 withval="$with_develop"
15509 with_develop=$withval
15513 echo "$as_me:15513: result: $with_develop" >&5
15514 echo "${ECHO_T}$with_develop" >&6
15516 ###############################################################################
15517 # These are just experimental, probably should not be in a package:
15519 # This is still experimental (20080329), but should ultimately be moved to
15520 # the script-block --with-normal, etc.
15522 echo "$as_me:15522: checking if you want to link with the pthread library" >&5
15523 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15525 # Check whether --with-pthread or --without-pthread was given.
15526 if test "${with_pthread+set}" = set; then
15527 withval="$with_pthread"
15528 with_pthread=$withval
15532 echo "$as_me:15532: result: $with_pthread" >&5
15533 echo "${ECHO_T}$with_pthread" >&6
15535 if test "$with_pthread" != no ; then
15536 echo "$as_me:15536: checking for pthread.h" >&5
15537 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15538 if test "${ac_cv_header_pthread_h+set}" = set; then
15539 echo $ECHO_N "(cached) $ECHO_C" >&6
15541 cat >"conftest.$ac_ext" <<_ACEOF
15542 #line 15542 "configure"
15543 #include "confdefs.h"
15544 #include <pthread.h>
15546 if { (eval echo "$as_me:15546: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15547 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15549 $EGREP -v '^ *\+' conftest.er1 >conftest.err
15551 cat conftest.err >&5
15552 echo "$as_me:15552: \$? = $ac_status" >&5
15553 (exit "$ac_status"); } >/dev/null; then
15554 if test -s conftest.err; then
15555 ac_cpp_err=$ac_c_preproc_warn_flag
15562 if test -z "$ac_cpp_err"; then
15563 ac_cv_header_pthread_h=yes
15565 echo "$as_me: failed program was:" >&5
15566 cat "conftest.$ac_ext" >&5
15567 ac_cv_header_pthread_h=no
15569 rm -f conftest.err "conftest.$ac_ext"
15571 echo "$as_me:15571: result: $ac_cv_header_pthread_h" >&5
15572 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15573 if test "$ac_cv_header_pthread_h" = yes; then
15575 cat >>confdefs.h <<\EOF
15576 #define HAVE_PTHREADS_H 1
15579 for cf_lib_pthread in pthread c_r
15581 echo "$as_me:15581: checking if we can link with the $cf_lib_pthread library" >&5
15582 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15583 cf_save_LIBS="$LIBS"
15585 cf_add_libs="$LIBS"
15588 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15589 # filter duplicates
15590 for cf_add_1lib in $cf_add_0lib; do
15591 for cf_add_2lib in $cf_add_libs; do
15592 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15597 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15599 LIBS="$cf_add_libs"
15601 cat >"conftest.$ac_ext" <<_ACEOF
15602 #line 15602 "configure"
15603 #include "confdefs.h"
15605 #include <pthread.h>
15611 int rc = pthread_create(0,0,0,0);
15612 int r2 = pthread_mutexattr_settype(0, 0);
15618 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15619 if { (eval echo "$as_me:15619: \"$ac_link\"") >&5
15620 (eval $ac_link) 2>&5
15622 echo "$as_me:15622: \$? = $ac_status" >&5
15623 (exit "$ac_status"); } &&
15624 { ac_try='test -s "conftest$ac_exeext"'
15625 { (eval echo "$as_me:15625: \"$ac_try\"") >&5
15626 (eval $ac_try) 2>&5
15628 echo "$as_me:15628: \$? = $ac_status" >&5
15629 (exit "$ac_status"); }; }; then
15632 echo "$as_me: failed program was:" >&5
15633 cat "conftest.$ac_ext" >&5
15636 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15637 LIBS="$cf_save_LIBS"
15638 echo "$as_me:15638: result: $with_pthread" >&5
15639 echo "${ECHO_T}$with_pthread" >&6
15640 test "$with_pthread" = yes && break
15643 if test "$with_pthread" = yes ; then
15645 cf_add_libs="$LIBS"
15648 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15649 # filter duplicates
15650 for cf_add_1lib in $cf_add_0lib; do
15651 for cf_add_2lib in $cf_add_libs; do
15652 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15657 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15659 LIBS="$cf_add_libs"
15661 cat >>confdefs.h <<\EOF
15662 #define HAVE_LIBPTHREADS 1
15666 { { echo "$as_me:15666: error: Cannot link with pthread library" >&5
15667 echo "$as_me: error: Cannot link with pthread library" >&2;}
15668 { (exit 1); exit 1; }; }
15675 echo "$as_me:15675: checking if you want to use weak-symbols for pthreads" >&5
15676 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15678 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15679 if test "${enable_weak_symbols+set}" = set; then
15680 enableval="$enable_weak_symbols"
15681 use_weak_symbols=$withval
15683 use_weak_symbols=no
15685 echo "$as_me:15685: result: $use_weak_symbols" >&5
15686 echo "${ECHO_T}$use_weak_symbols" >&6
15687 if test "$use_weak_symbols" = yes ; then
15689 echo "$as_me:15689: checking if $CC supports weak symbols" >&5
15690 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15691 if test "${cf_cv_weak_symbols+set}" = set; then
15692 echo $ECHO_N "(cached) $ECHO_C" >&6
15695 cat >"conftest.$ac_ext" <<_ACEOF
15696 #line 15696 "configure"
15697 #include "confdefs.h"
15704 #if defined(__GNUC__)
15705 # if defined __USE_ISOC99
15706 # define _cat_pragma(exp) _Pragma(#exp)
15707 # define _weak_pragma(exp) _cat_pragma(weak name)
15709 # define _weak_pragma(exp)
15711 # define _declare(name) __extension__ extern __typeof__(name) name
15712 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
15715 weak_symbol(fopen);
15721 rm -f "conftest.$ac_objext"
15722 if { (eval echo "$as_me:15722: \"$ac_compile\"") >&5
15723 (eval $ac_compile) 2>&5
15725 echo "$as_me:15725: \$? = $ac_status" >&5
15726 (exit "$ac_status"); } &&
15727 { ac_try='test -s "conftest.$ac_objext"'
15728 { (eval echo "$as_me:15728: \"$ac_try\"") >&5
15729 (eval $ac_try) 2>&5
15731 echo "$as_me:15731: \$? = $ac_status" >&5
15732 (exit "$ac_status"); }; }; then
15733 cf_cv_weak_symbols=yes
15735 echo "$as_me: failed program was:" >&5
15736 cat "conftest.$ac_ext" >&5
15737 cf_cv_weak_symbols=no
15739 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15742 echo "$as_me:15742: result: $cf_cv_weak_symbols" >&5
15743 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15746 cf_cv_weak_symbols=no
15749 if test $cf_cv_weak_symbols = yes ; then
15751 cat >>confdefs.h <<\EOF
15752 #define USE_WEAK_SYMBOLS 1
15758 if test "$with_pthread" = "yes" ; then
15760 cat >>confdefs.h <<\EOF
15761 #define USE_PTHREADS 1
15764 enable_reentrant=yes
15765 if test $cf_cv_weak_symbols = yes ; then
15770 # OpenSUSE is installing ncurses6, using reentrant option.
15771 echo "$as_me:15771: checking for _nc_TABSIZE" >&5
15772 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
15773 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
15774 echo $ECHO_N "(cached) $ECHO_C" >&6
15776 cat >"conftest.$ac_ext" <<_ACEOF
15777 #line 15777 "configure"
15778 #include "confdefs.h"
15779 #define _nc_TABSIZE autoconf_temporary
15780 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15787 /* We use char because int might match the return type of a gcc2
15788 builtin and then its argument prototype would still apply. */
15789 char _nc_TABSIZE (void);
15795 /* The GNU C library defines stubs for functions which it implements
15796 to always fail with ENOSYS. Some functions are actually named
15797 something starting with __ and the normal name is an alias. */
15798 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
15799 #error found stub for _nc_TABSIZE
15802 return _nc_TABSIZE ();
15807 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15808 if { (eval echo "$as_me:15808: \"$ac_link\"") >&5
15809 (eval $ac_link) 2>&5
15811 echo "$as_me:15811: \$? = $ac_status" >&5
15812 (exit "$ac_status"); } &&
15813 { ac_try='test -s "conftest$ac_exeext"'
15814 { (eval echo "$as_me:15814: \"$ac_try\"") >&5
15815 (eval $ac_try) 2>&5
15817 echo "$as_me:15817: \$? = $ac_status" >&5
15818 (exit "$ac_status"); }; }; then
15819 ac_cv_func__nc_TABSIZE=yes
15821 echo "$as_me: failed program was:" >&5
15822 cat "conftest.$ac_ext" >&5
15823 ac_cv_func__nc_TABSIZE=no
15825 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15827 echo "$as_me:15827: result: $ac_cv_func__nc_TABSIZE" >&5
15828 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
15829 if test "$ac_cv_func__nc_TABSIZE" = yes; then
15830 assume_reentrant=yes
15832 assume_reentrant=no
15835 # Reentrant code has to be opaque; there's little advantage to making ncurses
15836 # opaque outside of that, so there is no --enable-opaque option. We can use
15837 # this option without --with-pthreads, but this will be always set for
15839 echo "$as_me:15839: checking if you want experimental reentrant code" >&5
15840 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
15842 # Check whether --enable-reentrant or --disable-reentrant was given.
15843 if test "${enable_reentrant+set}" = set; then
15844 enableval="$enable_reentrant"
15845 with_reentrant=$enableval
15847 with_reentrant=$assume_reentrant
15849 echo "$as_me:15849: result: $with_reentrant" >&5
15850 echo "${ECHO_T}$with_reentrant" >&6
15851 if test "$with_reentrant" = yes ; then
15852 cf_cv_enable_reentrant=1
15853 if test $cf_cv_weak_symbols = yes ; then
15855 # remove pthread library from $LIBS
15856 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
15858 elif test "$assume_reentrant" = no ; then
15859 LIB_SUFFIX="t${LIB_SUFFIX}"
15862 cat >>confdefs.h <<\EOF
15863 #define USE_REENTRANT 1
15867 cf_cv_enable_reentrant=0
15870 ### Allow using a different wrap-prefix
15871 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15872 echo "$as_me:15872: checking for prefix used to wrap public variables" >&5
15873 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15875 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15876 if test "${with_wrap_prefix+set}" = set; then
15877 withval="$with_wrap_prefix"
15878 NCURSES_WRAP_PREFIX=$withval
15880 NCURSES_WRAP_PREFIX=_nc_
15882 echo "$as_me:15882: result: $NCURSES_WRAP_PREFIX" >&5
15883 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15885 NCURSES_WRAP_PREFIX=_nc_
15888 cat >>confdefs.h <<EOF
15889 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15892 ###############################################################################
15894 ### use option --disable-echo to suppress full display compiling commands
15896 echo "$as_me:15896: checking if you want to see long compiling messages" >&5
15897 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15899 # Check whether --enable-echo or --disable-echo was given.
15900 if test "${enable_echo+set}" = set; then
15901 enableval="$enable_echo"
15902 test "$enableval" != no && enableval=yes
15903 if test "$enableval" != "yes" ; then
15906 ECHO_LD='@echo linking $@;'
15907 RULE_CC='@echo compiling $<'
15908 SHOW_CC='@echo compiling $@'
15930 echo "$as_me:15930: result: $enableval" >&5
15931 echo "${ECHO_T}$enableval" >&6
15933 echo "$as_me:15933: checking if you want to use C11 _Noreturn feature" >&5
15934 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
15936 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
15937 if test "${enable_stdnoreturn+set}" = set; then
15938 enableval="$enable_stdnoreturn"
15939 test "$enableval" != yes && enableval=no
15940 if test "$enableval" != "no" ; then
15941 enable_stdnoreturn=yes
15943 enable_stdnoreturn=no
15947 enable_stdnoreturn=no
15950 echo "$as_me:15950: result: $enable_stdnoreturn" >&5
15951 echo "${ECHO_T}$enable_stdnoreturn" >&6
15953 if test $enable_stdnoreturn = yes; then
15954 echo "$as_me:15954: checking for C11 _Noreturn feature" >&5
15955 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
15956 if test "${cf_cv_c11_noreturn+set}" = set; then
15957 echo $ECHO_N "(cached) $ECHO_C" >&6
15959 cat >"conftest.$ac_ext" <<_ACEOF
15960 #line 15960 "configure"
15961 #include "confdefs.h"
15963 $ac_includes_default
15964 #include <stdnoreturn.h>
15965 static _Noreturn void giveup(void) { exit(0); }
15970 if (feof(stdin)) giveup()
15975 rm -f "conftest.$ac_objext"
15976 if { (eval echo "$as_me:15976: \"$ac_compile\"") >&5
15977 (eval $ac_compile) 2>&5
15979 echo "$as_me:15979: \$? = $ac_status" >&5
15980 (exit "$ac_status"); } &&
15981 { ac_try='test -s "conftest.$ac_objext"'
15982 { (eval echo "$as_me:15982: \"$ac_try\"") >&5
15983 (eval $ac_try) 2>&5
15985 echo "$as_me:15985: \$? = $ac_status" >&5
15986 (exit "$ac_status"); }; }; then
15987 cf_cv_c11_noreturn=yes
15989 echo "$as_me: failed program was:" >&5
15990 cat "conftest.$ac_ext" >&5
15991 cf_cv_c11_noreturn=no
15993 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15996 echo "$as_me:15996: result: $cf_cv_c11_noreturn" >&5
15997 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
15999 cf_cv_c11_noreturn=no,
16002 if test "$cf_cv_c11_noreturn" = yes; then
16004 cat >>confdefs.h <<\EOF
16005 #define HAVE_STDNORETURN_H 1
16008 cat >>confdefs.h <<EOF
16009 #define STDC_NORETURN _Noreturn
16012 HAVE_STDNORETURN_H=1
16014 HAVE_STDNORETURN_H=0
16017 if test "$GCC" = yes || test "$GXX" = yes
16020 if test "$GCC" = yes || test "$GXX" = yes
16025 for cf_temp_scan in $CFLAGS
16027 case "x$cf_temp_scan" in
16030 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16031 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16036 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16037 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16042 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16043 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16048 if test "x$CFLAGS" != "x$cf_temp_flags"
16050 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
16052 echo "${as_me:-configure}:16052: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16054 CFLAGS="$cf_temp_flags"
16055 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
16057 echo "${as_me:-configure}:16057: testing ... fixed $CFLAGS ..." 1>&5
16059 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
16061 echo "${as_me:-configure}:16061: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16068 if test "$GCC" = yes || test "$GXX" = yes
16073 for cf_temp_scan in $CPPFLAGS
16075 case "x$cf_temp_scan" in
16078 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16079 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16084 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16085 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16090 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16091 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16096 if test "x$CPPFLAGS" != "x$cf_temp_flags"
16098 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
16100 echo "${as_me:-configure}:16100: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16102 CPPFLAGS="$cf_temp_flags"
16103 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
16105 echo "${as_me:-configure}:16105: testing ... fixed $CPPFLAGS ..." 1>&5
16107 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
16109 echo "${as_me:-configure}:16109: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16116 if test "$GCC" = yes || test "$GXX" = yes
16121 for cf_temp_scan in $LDFLAGS
16123 case "x$cf_temp_scan" in
16126 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16127 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16132 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16133 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16138 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16139 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16144 if test "x$LDFLAGS" != "x$cf_temp_flags"
16146 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
16148 echo "${as_me:-configure}:16148: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16150 LDFLAGS="$cf_temp_flags"
16151 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
16153 echo "${as_me:-configure}:16153: testing ... fixed $LDFLAGS ..." 1>&5
16155 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
16157 echo "${as_me:-configure}:16157: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16164 echo "$as_me:16164: checking if you want to turn on gcc warnings" >&5
16165 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16167 # Check whether --enable-warnings or --disable-warnings was given.
16168 if test "${enable_warnings+set}" = set; then
16169 enableval="$enable_warnings"
16170 test "$enableval" != yes && enableval=no
16171 if test "$enableval" != "no" ; then
16172 enable_warnings=yes
16181 echo "$as_me:16181: result: $enable_warnings" >&5
16182 echo "${ECHO_T}$enable_warnings" >&6
16183 if test "$enable_warnings" = "yes"
16186 if test "x$have_x" = xyes; then
16188 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16189 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16190 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16191 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16192 for cf_X_CFLAGS in $X_CFLAGS
16194 case "x$cf_X_CFLAGS" in
16196 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16199 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16204 cat >"conftest.$ac_ext" <<_ACEOF
16205 #line 16205 "configure"
16206 #include "confdefs.h"
16208 #include <stdlib.h>
16209 #include <X11/Intrinsic.h>
16214 String foo = malloc(1); free((void*)foo)
16219 rm -f "conftest.$ac_objext"
16220 if { (eval echo "$as_me:16220: \"$ac_compile\"") >&5
16221 (eval $ac_compile) 2>&5
16223 echo "$as_me:16223: \$? = $ac_status" >&5
16224 (exit "$ac_status"); } &&
16225 { ac_try='test -s "conftest.$ac_objext"'
16226 { (eval echo "$as_me:16226: \"$ac_try\"") >&5
16227 (eval $ac_try) 2>&5
16229 echo "$as_me:16229: \$? = $ac_status" >&5
16230 (exit "$ac_status"); }; }; then
16232 echo "$as_me:16232: checking for X11/Xt const-feature" >&5
16233 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16234 if test "${cf_cv_const_x_string+set}" = set; then
16235 echo $ECHO_N "(cached) $ECHO_C" >&6
16238 cat >"conftest.$ac_ext" <<_ACEOF
16239 #line 16239 "configure"
16240 #include "confdefs.h"
16242 #undef _CONST_X_STRING
16243 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16244 #undef XTSTRINGDEFINES /* X11R5 and later */
16245 #include <stdlib.h>
16246 #include <X11/Intrinsic.h>
16251 String foo = malloc(1); *foo = 0
16256 rm -f "conftest.$ac_objext"
16257 if { (eval echo "$as_me:16257: \"$ac_compile\"") >&5
16258 (eval $ac_compile) 2>&5
16260 echo "$as_me:16260: \$? = $ac_status" >&5
16261 (exit "$ac_status"); } &&
16262 { ac_try='test -s "conftest.$ac_objext"'
16263 { (eval echo "$as_me:16263: \"$ac_try\"") >&5
16264 (eval $ac_try) 2>&5
16266 echo "$as_me:16266: \$? = $ac_status" >&5
16267 (exit "$ac_status"); }; }; then
16269 cf_cv_const_x_string=no
16272 echo "$as_me: failed program was:" >&5
16273 cat "conftest.$ac_ext" >&5
16275 cf_cv_const_x_string=yes
16278 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16281 echo "$as_me:16281: result: $cf_cv_const_x_string" >&5
16282 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16284 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16285 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16286 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16288 case "$cf_cv_const_x_string" in
16291 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16292 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16297 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16298 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16304 echo "$as_me: failed program was:" >&5
16305 cat "conftest.$ac_ext" >&5
16307 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16309 cat > "conftest.$ac_ext" <<EOF
16310 #line 16310 "${as_me:-configure}"
16311 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16313 if test "$INTEL_COMPILER" = yes
16315 # The "-wdXXX" options suppress warnings:
16316 # remark #1419: external declaration in primary source file
16317 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16318 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16319 # remark #193: zero used for undefined preprocessing identifier
16320 # remark #593: variable "curs_sb_left_arrow" was set but never used
16321 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16322 # remark #869: parameter "tw" was never referenced
16323 # remark #981: operands are evaluated in unspecified order
16324 # warning #279: controlling expression is constant
16326 { echo "$as_me:16326: checking for $CC warning options..." >&5
16327 echo "$as_me: checking for $CC warning options..." >&6;}
16328 cf_save_CFLAGS="$CFLAGS"
16329 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
16341 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16342 if { (eval echo "$as_me:16342: \"$ac_compile\"") >&5
16343 (eval $ac_compile) 2>&5
16345 echo "$as_me:16345: \$? = $ac_status" >&5
16346 (exit "$ac_status"); }; then
16347 test -n "$verbose" && echo "$as_me:16347: result: ... -$cf_opt" >&5
16348 echo "${ECHO_T}... -$cf_opt" >&6
16349 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16352 CFLAGS="$cf_save_CFLAGS"
16353 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16355 { echo "$as_me:16355: checking for $CC warning options..." >&5
16356 echo "$as_me: checking for $CC warning options..." >&6;}
16357 cf_save_CFLAGS="$CFLAGS"
16359 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16360 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16361 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16362 for cf_opt in W Wall \
16363 Wbad-function-cast \
16366 Wdeclaration-after-statement \
16369 Wmissing-declarations \
16370 Wmissing-prototypes \
16374 Wstrict-prototypes \
16375 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16377 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16378 if { (eval echo "$as_me:16378: \"$ac_compile\"") >&5
16379 (eval $ac_compile) 2>&5
16381 echo "$as_me:16381: \$? = $ac_status" >&5
16382 (exit "$ac_status"); }; then
16383 test -n "$verbose" && echo "$as_me:16383: result: ... -$cf_opt" >&5
16384 echo "${ECHO_T}... -$cf_opt" >&6
16387 case "$GCC_VERSION" in
16389 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
16391 echo "${as_me:-configure}:16391: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16397 case "$GCC_VERSION" in
16399 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
16401 echo "${as_me:-configure}:16401: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16407 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16410 CFLAGS="$cf_save_CFLAGS"
16416 if test "$GCC" = yes || test "$GXX" = yes
16418 cat > conftest.i <<EOF
16420 #define GCC_PRINTF 0
16423 #define GCC_SCANF 0
16425 #ifndef GCC_NORETURN
16426 #define GCC_NORETURN /* nothing */
16429 #define GCC_UNUSED /* nothing */
16432 if test "$GCC" = yes
16434 { echo "$as_me:16434: checking for $CC __attribute__ directives..." >&5
16435 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16436 cat > "conftest.$ac_ext" <<EOF
16437 #line 16437 "${as_me:-configure}"
16439 #include "confdefs.h"
16440 #include "conftest.h"
16441 #include "conftest.i"
16443 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16445 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16448 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
16450 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
16452 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16453 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
16454 extern GCC_NORETURN void foo(void);
16455 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
16457 cf_printf_attribute=no
16458 cf_scanf_attribute=no
16459 for cf_attribute in scanf printf unused noreturn
16462 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16464 cf_directive="__attribute__(($cf_attribute))"
16465 echo "checking for $CC $cf_directive" 1>&5
16467 case "$cf_attribute" in
16469 cf_printf_attribute=yes
16470 cat >conftest.h <<EOF
16471 #define GCC_$cf_ATTRIBUTE 1
16475 cf_scanf_attribute=yes
16476 cat >conftest.h <<EOF
16477 #define GCC_$cf_ATTRIBUTE 1
16481 cat >conftest.h <<EOF
16482 #define GCC_$cf_ATTRIBUTE $cf_directive
16487 if { (eval echo "$as_me:16487: \"$ac_compile\"") >&5
16488 (eval $ac_compile) 2>&5
16490 echo "$as_me:16490: \$? = $ac_status" >&5
16491 (exit "$ac_status"); }; then
16492 test -n "$verbose" && echo "$as_me:16492: result: ... $cf_attribute" >&5
16493 echo "${ECHO_T}... $cf_attribute" >&6
16494 cat conftest.h >>confdefs.h
16495 case "$cf_attribute" in
16498 cat >>confdefs.h <<EOF
16499 #define GCC_NORETURN $cf_directive
16504 cf_value='/* nothing */'
16505 if test "$cf_printf_attribute" != no ; then
16506 cf_value='__attribute__((format(printf,fmt,var)))'
16508 cat >>confdefs.h <<\EOF
16509 #define GCC_PRINTF 1
16514 cat >>confdefs.h <<EOF
16515 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16520 cf_value='/* nothing */'
16521 if test "$cf_scanf_attribute" != no ; then
16522 cf_value='__attribute__((format(scanf,fmt,var)))'
16524 cat >>confdefs.h <<\EOF
16525 #define GCC_SCANF 1
16530 cat >>confdefs.h <<EOF
16531 #define GCC_SCANFLIKE(fmt,var) $cf_value
16537 cat >>confdefs.h <<EOF
16538 #define GCC_UNUSED $cf_directive
16546 ${FGREP-fgrep} define conftest.i >>confdefs.h
16553 if test "x$enable_warnings" = "xyes"; then
16555 ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
16559 ### use option --enable-assertions to turn on generation of assertion code
16560 echo "$as_me:16560: checking if you want to enable runtime assertions" >&5
16561 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
16563 # Check whether --enable-assertions or --disable-assertions was given.
16564 if test "${enable_assertions+set}" = set; then
16565 enableval="$enable_assertions"
16566 with_assertions=$enableval
16570 echo "$as_me:16570: result: $with_assertions" >&5
16571 echo "${ECHO_T}$with_assertions" >&6
16574 if test "$with_assertions" = no
16576 CPPFLAGS="$CPPFLAGS -DNDEBUG"
16579 ADAFLAGS="$ADAFLAGS -gnata"
16584 ### use option --disable-leaks to suppress "permanent" leaks, for testing
16586 cat >>confdefs.h <<\EOF
16587 #define HAVE_NC_ALLOC_H 1
16590 ### use option --enable-expanded to generate certain macros as functions
16592 # Check whether --enable-expanded or --disable-expanded was given.
16593 if test "${enable_expanded+set}" = set; then
16594 enableval="$enable_expanded"
16595 test "$enableval" = yes &&
16596 cat >>confdefs.h <<\EOF
16597 #define NCURSES_EXPANDED 1
16602 ### use option --disable-macros to suppress macros in favor of functions
16604 # Check whether --enable-macros or --disable-macros was given.
16605 if test "${enable_macros+set}" = set; then
16606 enableval="$enable_macros"
16607 test "$enableval" = no &&
16608 cat >>confdefs.h <<\EOF
16609 #define NCURSES_NOMACROS 1
16614 # Normally we only add trace() to the debug-library. Allow this to be
16615 # extended to all models of the ncurses library:
16617 case "$CFLAGS $CPPFLAGS" in
16623 echo "$as_me:16623: checking whether to add trace feature to all models" >&5
16624 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
16626 # Check whether --with-trace or --without-trace was given.
16627 if test "${with_trace+set}" = set; then
16628 withval="$with_trace"
16629 cf_with_trace=$withval
16631 cf_with_trace=$cf_all_traces
16633 echo "$as_me:16633: result: $cf_with_trace" >&5
16634 echo "${ECHO_T}$cf_with_trace" >&6
16636 if test "$cf_with_trace" = yes ; then
16639 cat >>confdefs.h <<\EOF
16647 echo "$as_me:16647: checking if we want to use GNAT projects" >&5
16648 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
16650 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
16651 if test "${enable_gnat_projects+set}" = set; then
16652 enableval="$enable_gnat_projects"
16653 test "$enableval" != no && enableval=yes
16654 if test "$enableval" != "yes" ; then
16655 enable_gnat_projects=no
16657 enable_gnat_projects=yes
16661 enable_gnat_projects=yes
16664 echo "$as_me:16664: result: $enable_gnat_projects" >&5
16665 echo "${ECHO_T}$enable_gnat_projects" >&6
16667 ### Checks for libraries.
16668 case $cf_cv_system_name in
16671 echo "$as_me:16671: checking if ssp library is needed" >&5
16672 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
16673 if test "${cf_cv_need_libssp+set}" = set; then
16674 echo $ECHO_N "(cached) $ECHO_C" >&6
16677 cat >"conftest.$ac_ext" <<_ACEOF
16678 #line 16678 "configure"
16679 #include "confdefs.h"
16681 #include <sys/types.h>
16682 #include <dirent.h>
16688 DIR *dp = opendir(".");
16694 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16695 if { (eval echo "$as_me:16695: \"$ac_link\"") >&5
16696 (eval $ac_link) 2>&5
16698 echo "$as_me:16698: \$? = $ac_status" >&5
16699 (exit "$ac_status"); } &&
16700 { ac_try='test -s "conftest$ac_exeext"'
16701 { (eval echo "$as_me:16701: \"$ac_try\"") >&5
16702 (eval $ac_try) 2>&5
16704 echo "$as_me:16704: \$? = $ac_status" >&5
16705 (exit "$ac_status"); }; }; then
16706 cf_cv_need_libssp=no
16708 echo "$as_me: failed program was:" >&5
16709 cat "conftest.$ac_ext" >&5
16711 cf_save_LIBS="$LIBS"
16713 cat >"conftest.$ac_ext" <<_ACEOF
16714 #line 16714 "configure"
16715 #include "confdefs.h"
16717 #include <sys/types.h>
16718 #include <dirent.h>
16724 DIR *dp = opendir(".");
16730 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16731 if { (eval echo "$as_me:16731: \"$ac_link\"") >&5
16732 (eval $ac_link) 2>&5
16734 echo "$as_me:16734: \$? = $ac_status" >&5
16735 (exit "$ac_status"); } &&
16736 { ac_try='test -s "conftest$ac_exeext"'
16737 { (eval echo "$as_me:16737: \"$ac_try\"") >&5
16738 (eval $ac_try) 2>&5
16740 echo "$as_me:16740: \$? = $ac_status" >&5
16741 (exit "$ac_status"); }; }; then
16742 cf_cv_need_libssp=yes
16744 echo "$as_me: failed program was:" >&5
16745 cat "conftest.$ac_ext" >&5
16746 cf_cv_need_libssp=maybe
16748 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16749 LIBS="$cf_save_LIBS"
16752 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16754 echo "$as_me:16754: result: $cf_cv_need_libssp" >&5
16755 echo "${ECHO_T}$cf_cv_need_libssp" >&6
16757 if test "x$cf_cv_need_libssp" = xyes
16760 cf_add_libs="$LIBS"
16763 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16764 # filter duplicates
16765 for cf_add_1lib in $cf_add_0lib; do
16766 for cf_add_2lib in $cf_add_libs; do
16767 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16772 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16774 LIBS="$cf_add_libs"
16781 cf_save_libs="$LIBS"
16782 echo "$as_me:16782: checking for clock_gettime" >&5
16783 echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6
16784 if test "${ac_cv_func_clock_gettime+set}" = set; then
16785 echo $ECHO_N "(cached) $ECHO_C" >&6
16787 cat >"conftest.$ac_ext" <<_ACEOF
16788 #line 16788 "configure"
16789 #include "confdefs.h"
16790 #define clock_gettime autoconf_temporary
16791 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16792 #undef clock_gettime
16798 /* We use char because int might match the return type of a gcc2
16799 builtin and then its argument prototype would still apply. */
16800 char clock_gettime (void);
16806 /* The GNU C library defines stubs for functions which it implements
16807 to always fail with ENOSYS. Some functions are actually named
16808 something starting with __ and the normal name is an alias. */
16809 #if defined (__stub_clock_gettime) || defined (__stub___clock_gettime)
16810 #error found stub for clock_gettime
16813 return clock_gettime ();
16818 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16819 if { (eval echo "$as_me:16819: \"$ac_link\"") >&5
16820 (eval $ac_link) 2>&5
16822 echo "$as_me:16822: \$? = $ac_status" >&5
16823 (exit "$ac_status"); } &&
16824 { ac_try='test -s "conftest$ac_exeext"'
16825 { (eval echo "$as_me:16825: \"$ac_try\"") >&5
16826 (eval $ac_try) 2>&5
16828 echo "$as_me:16828: \$? = $ac_status" >&5
16829 (exit "$ac_status"); }; }; then
16830 ac_cv_func_clock_gettime=yes
16832 echo "$as_me: failed program was:" >&5
16833 cat "conftest.$ac_ext" >&5
16834 ac_cv_func_clock_gettime=no
16836 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16838 echo "$as_me:16838: result: $ac_cv_func_clock_gettime" >&5
16839 echo "${ECHO_T}$ac_cv_func_clock_gettime" >&6
16840 if test "$ac_cv_func_clock_gettime" = yes; then
16841 cf_cv_test_clock_gettime=yes
16843 echo "$as_me:16843: checking for clock_gettime in -lrt" >&5
16844 echo $ECHO_N "checking for clock_gettime in -lrt... $ECHO_C" >&6
16845 if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then
16846 echo $ECHO_N "(cached) $ECHO_C" >&6
16848 ac_check_lib_save_LIBS=$LIBS
16850 cat >"conftest.$ac_ext" <<_ACEOF
16851 #line 16851 "configure"
16852 #include "confdefs.h"
16854 /* Override any gcc2 internal prototype to avoid an error. */
16858 /* We use char because int might match the return type of a gcc2
16859 builtin and then its argument prototype would still apply. */
16860 char clock_gettime (void);
16869 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16870 if { (eval echo "$as_me:16870: \"$ac_link\"") >&5
16871 (eval $ac_link) 2>&5
16873 echo "$as_me:16873: \$? = $ac_status" >&5
16874 (exit "$ac_status"); } &&
16875 { ac_try='test -s "conftest$ac_exeext"'
16876 { (eval echo "$as_me:16876: \"$ac_try\"") >&5
16877 (eval $ac_try) 2>&5
16879 echo "$as_me:16879: \$? = $ac_status" >&5
16880 (exit "$ac_status"); }; }; then
16881 ac_cv_lib_rt_clock_gettime=yes
16883 echo "$as_me: failed program was:" >&5
16884 cat "conftest.$ac_ext" >&5
16885 ac_cv_lib_rt_clock_gettime=no
16887 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16888 LIBS=$ac_check_lib_save_LIBS
16890 echo "$as_me:16890: result: $ac_cv_lib_rt_clock_gettime" >&5
16891 echo "${ECHO_T}$ac_cv_lib_rt_clock_gettime" >&6
16892 if test "$ac_cv_lib_rt_clock_gettime" = yes; then
16894 cf_cv_test_clock_gettime=yes
16896 cf_cv_test_clock_gettime=no
16901 if test "$cf_cv_test_clock_gettime" = yes ; then
16902 echo "$as_me:16902: checking if clock_gettime links" >&5
16903 echo $ECHO_N "checking if clock_gettime links... $ECHO_C" >&6
16904 if test "${cf_cv_func_clock_gettime+set}" = set; then
16905 echo $ECHO_N "(cached) $ECHO_C" >&6
16908 cat >"conftest.$ac_ext" <<_ACEOF
16909 #line 16909 "configure"
16910 #include "confdefs.h"
16912 $ac_includes_default
16918 struct timespec ts;
16919 int rc = clock_gettime(CLOCK_REALTIME, &ts)
16920 + clock_gettime(CLOCK_MONOTONIC, &ts);
16921 (void) rc; (void)ts
16926 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16927 if { (eval echo "$as_me:16927: \"$ac_link\"") >&5
16928 (eval $ac_link) 2>&5
16930 echo "$as_me:16930: \$? = $ac_status" >&5
16931 (exit "$ac_status"); } &&
16932 { ac_try='test -s "conftest$ac_exeext"'
16933 { (eval echo "$as_me:16933: \"$ac_try\"") >&5
16934 (eval $ac_try) 2>&5
16936 echo "$as_me:16936: \$? = $ac_status" >&5
16937 (exit "$ac_status"); }; }; then
16938 cf_cv_func_clock_gettime=yes
16940 echo "$as_me: failed program was:" >&5
16941 cat "conftest.$ac_ext" >&5
16942 cf_cv_func_clock_gettime=no
16944 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16947 echo "$as_me:16947: result: $cf_cv_func_clock_gettime" >&5
16948 echo "${ECHO_T}$cf_cv_func_clock_gettime" >&6
16950 cf_cv_func_clock_gettime=no
16953 if test "$cf_cv_func_clock_gettime" = yes
16956 cat >>confdefs.h <<\EOF
16957 #define HAVE_CLOCK_GETTIME 1
16961 echo "$as_me:16961: checking for gettimeofday" >&5
16962 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
16963 if test "${ac_cv_func_gettimeofday+set}" = set; then
16964 echo $ECHO_N "(cached) $ECHO_C" >&6
16966 cat >"conftest.$ac_ext" <<_ACEOF
16967 #line 16967 "configure"
16968 #include "confdefs.h"
16969 #define gettimeofday autoconf_temporary
16970 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16971 #undef gettimeofday
16977 /* We use char because int might match the return type of a gcc2
16978 builtin and then its argument prototype would still apply. */
16979 char gettimeofday (void);
16985 /* The GNU C library defines stubs for functions which it implements
16986 to always fail with ENOSYS. Some functions are actually named
16987 something starting with __ and the normal name is an alias. */
16988 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16989 #error found stub for gettimeofday
16992 return gettimeofday ();
16997 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16998 if { (eval echo "$as_me:16998: \"$ac_link\"") >&5
16999 (eval $ac_link) 2>&5
17001 echo "$as_me:17001: \$? = $ac_status" >&5
17002 (exit "$ac_status"); } &&
17003 { ac_try='test -s "conftest$ac_exeext"'
17004 { (eval echo "$as_me:17004: \"$ac_try\"") >&5
17005 (eval $ac_try) 2>&5
17007 echo "$as_me:17007: \$? = $ac_status" >&5
17008 (exit "$ac_status"); }; }; then
17009 ac_cv_func_gettimeofday=yes
17011 echo "$as_me: failed program was:" >&5
17012 cat "conftest.$ac_ext" >&5
17013 ac_cv_func_gettimeofday=no
17015 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17017 echo "$as_me:17017: result: $ac_cv_func_gettimeofday" >&5
17018 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
17019 if test "$ac_cv_func_gettimeofday" = yes; then
17021 cat >>confdefs.h <<\EOF
17022 #define HAVE_GETTIMEOFDAY 1
17027 echo "$as_me:17027: checking for gettimeofday in -lbsd" >&5
17028 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
17029 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
17030 echo $ECHO_N "(cached) $ECHO_C" >&6
17032 ac_check_lib_save_LIBS=$LIBS
17034 cat >"conftest.$ac_ext" <<_ACEOF
17035 #line 17035 "configure"
17036 #include "confdefs.h"
17038 /* Override any gcc2 internal prototype to avoid an error. */
17042 /* We use char because int might match the return type of a gcc2
17043 builtin and then its argument prototype would still apply. */
17044 char gettimeofday (void);
17053 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17054 if { (eval echo "$as_me:17054: \"$ac_link\"") >&5
17055 (eval $ac_link) 2>&5
17057 echo "$as_me:17057: \$? = $ac_status" >&5
17058 (exit "$ac_status"); } &&
17059 { ac_try='test -s "conftest$ac_exeext"'
17060 { (eval echo "$as_me:17060: \"$ac_try\"") >&5
17061 (eval $ac_try) 2>&5
17063 echo "$as_me:17063: \$? = $ac_status" >&5
17064 (exit "$ac_status"); }; }; then
17065 ac_cv_lib_bsd_gettimeofday=yes
17067 echo "$as_me: failed program was:" >&5
17068 cat "conftest.$ac_ext" >&5
17069 ac_cv_lib_bsd_gettimeofday=no
17071 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17072 LIBS=$ac_check_lib_save_LIBS
17074 echo "$as_me:17074: result: $ac_cv_lib_bsd_gettimeofday" >&5
17075 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
17076 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
17078 cat >>confdefs.h <<\EOF
17079 #define HAVE_GETTIMEOFDAY 1
17082 cf_add_libs="$LIBS"
17085 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17086 # filter duplicates
17087 for cf_add_1lib in $cf_add_0lib; do
17088 for cf_add_2lib in $cf_add_libs; do
17089 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17094 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17096 LIBS="$cf_add_libs"
17106 ### Checks for header files.
17107 echo "$as_me:17107: checking for signed char" >&5
17108 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
17109 if test "${ac_cv_type_signed_char+set}" = set; then
17110 echo $ECHO_N "(cached) $ECHO_C" >&6
17112 cat >"conftest.$ac_ext" <<_ACEOF
17113 #line 17113 "configure"
17114 #include "confdefs.h"
17115 $ac_includes_default
17119 if ((signed char *) 0)
17121 if (sizeof (signed char))
17127 rm -f "conftest.$ac_objext"
17128 if { (eval echo "$as_me:17128: \"$ac_compile\"") >&5
17129 (eval $ac_compile) 2>&5
17131 echo "$as_me:17131: \$? = $ac_status" >&5
17132 (exit "$ac_status"); } &&
17133 { ac_try='test -s "conftest.$ac_objext"'
17134 { (eval echo "$as_me:17134: \"$ac_try\"") >&5
17135 (eval $ac_try) 2>&5
17137 echo "$as_me:17137: \$? = $ac_status" >&5
17138 (exit "$ac_status"); }; }; then
17139 ac_cv_type_signed_char=yes
17141 echo "$as_me: failed program was:" >&5
17142 cat "conftest.$ac_ext" >&5
17143 ac_cv_type_signed_char=no
17145 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17147 echo "$as_me:17147: result: $ac_cv_type_signed_char" >&5
17148 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
17150 echo "$as_me:17150: checking size of signed char" >&5
17151 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
17152 if test "${ac_cv_sizeof_signed_char+set}" = set; then
17153 echo $ECHO_N "(cached) $ECHO_C" >&6
17155 if test "$ac_cv_type_signed_char" = yes; then
17156 if test "$cross_compiling" = yes; then
17157 # Depending upon the size, compute the lo and hi bounds.
17158 cat >"conftest.$ac_ext" <<_ACEOF
17159 #line 17159 "configure"
17160 #include "confdefs.h"
17161 $ac_includes_default
17165 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
17170 rm -f "conftest.$ac_objext"
17171 if { (eval echo "$as_me:17171: \"$ac_compile\"") >&5
17172 (eval $ac_compile) 2>&5
17174 echo "$as_me:17174: \$? = $ac_status" >&5
17175 (exit "$ac_status"); } &&
17176 { ac_try='test -s "conftest.$ac_objext"'
17177 { (eval echo "$as_me:17177: \"$ac_try\"") >&5
17178 (eval $ac_try) 2>&5
17180 echo "$as_me:17180: \$? = $ac_status" >&5
17181 (exit "$ac_status"); }; }; then
17184 cat >"conftest.$ac_ext" <<_ACEOF
17185 #line 17185 "configure"
17186 #include "confdefs.h"
17187 $ac_includes_default
17191 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
17196 rm -f "conftest.$ac_objext"
17197 if { (eval echo "$as_me:17197: \"$ac_compile\"") >&5
17198 (eval $ac_compile) 2>&5
17200 echo "$as_me:17200: \$? = $ac_status" >&5
17201 (exit "$ac_status"); } &&
17202 { ac_try='test -s "conftest.$ac_objext"'
17203 { (eval echo "$as_me:17203: \"$ac_try\"") >&5
17204 (eval $ac_try) 2>&5
17206 echo "$as_me:17206: \$? = $ac_status" >&5
17207 (exit "$ac_status"); }; }; then
17208 ac_hi=$ac_mid; break
17210 echo "$as_me: failed program was:" >&5
17211 cat "conftest.$ac_ext" >&5
17212 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
17214 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17217 echo "$as_me: failed program was:" >&5
17218 cat "conftest.$ac_ext" >&5
17221 cat >"conftest.$ac_ext" <<_ACEOF
17222 #line 17222 "configure"
17223 #include "confdefs.h"
17224 $ac_includes_default
17228 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
17233 rm -f "conftest.$ac_objext"
17234 if { (eval echo "$as_me:17234: \"$ac_compile\"") >&5
17235 (eval $ac_compile) 2>&5
17237 echo "$as_me:17237: \$? = $ac_status" >&5
17238 (exit "$ac_status"); } &&
17239 { ac_try='test -s "conftest.$ac_objext"'
17240 { (eval echo "$as_me:17240: \"$ac_try\"") >&5
17241 (eval $ac_try) 2>&5
17243 echo "$as_me:17243: \$? = $ac_status" >&5
17244 (exit "$ac_status"); }; }; then
17245 ac_lo=$ac_mid; break
17247 echo "$as_me: failed program was:" >&5
17248 cat "conftest.$ac_ext" >&5
17249 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
17251 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17254 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17255 # Binary search between lo and hi bounds.
17256 while test "x$ac_lo" != "x$ac_hi"; do
17257 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
17258 cat >"conftest.$ac_ext" <<_ACEOF
17259 #line 17259 "configure"
17260 #include "confdefs.h"
17261 $ac_includes_default
17265 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
17270 rm -f "conftest.$ac_objext"
17271 if { (eval echo "$as_me:17271: \"$ac_compile\"") >&5
17272 (eval $ac_compile) 2>&5
17274 echo "$as_me:17274: \$? = $ac_status" >&5
17275 (exit "$ac_status"); } &&
17276 { ac_try='test -s "conftest.$ac_objext"'
17277 { (eval echo "$as_me:17277: \"$ac_try\"") >&5
17278 (eval $ac_try) 2>&5
17280 echo "$as_me:17280: \$? = $ac_status" >&5
17281 (exit "$ac_status"); }; }; then
17284 echo "$as_me: failed program was:" >&5
17285 cat "conftest.$ac_ext" >&5
17286 ac_lo=`expr "$ac_mid" + 1`
17288 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17290 ac_cv_sizeof_signed_char=$ac_lo
17292 if test "$cross_compiling" = yes; then
17293 { { echo "$as_me:17293: error: cannot run test program while cross compiling" >&5
17294 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17295 { (exit 1); exit 1; }; }
17297 cat >"conftest.$ac_ext" <<_ACEOF
17298 #line 17298 "configure"
17299 #include "confdefs.h"
17300 $ac_includes_default
17304 FILE *f = fopen ("conftest.val", "w");
17306 $ac_main_return (1);
17307 fprintf (f, "%ld", (long)(sizeof (signed char)));
17313 rm -f "conftest$ac_exeext"
17314 if { (eval echo "$as_me:17314: \"$ac_link\"") >&5
17315 (eval $ac_link) 2>&5
17317 echo "$as_me:17317: \$? = $ac_status" >&5
17318 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17319 { (eval echo "$as_me:17319: \"$ac_try\"") >&5
17320 (eval $ac_try) 2>&5
17322 echo "$as_me:17322: \$? = $ac_status" >&5
17323 (exit "$ac_status"); }; }; then
17324 ac_cv_sizeof_signed_char=`cat conftest.val`
17326 echo "$as_me: program exited with status $ac_status" >&5
17327 echo "$as_me: failed program was:" >&5
17328 cat "conftest.$ac_ext" >&5
17330 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17335 ac_cv_sizeof_signed_char=0
17338 echo "$as_me:17338: result: $ac_cv_sizeof_signed_char" >&5
17339 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
17340 cat >>confdefs.h <<EOF
17341 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
17344 ac_header_dirent=no
17345 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
17346 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
17347 echo "$as_me:17347: checking for $ac_hdr that defines DIR" >&5
17348 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
17349 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17350 echo $ECHO_N "(cached) $ECHO_C" >&6
17352 cat >"conftest.$ac_ext" <<_ACEOF
17353 #line 17353 "configure"
17354 #include "confdefs.h"
17355 #include <sys/types.h>
17367 rm -f "conftest.$ac_objext"
17368 if { (eval echo "$as_me:17368: \"$ac_compile\"") >&5
17369 (eval $ac_compile) 2>&5
17371 echo "$as_me:17371: \$? = $ac_status" >&5
17372 (exit "$ac_status"); } &&
17373 { ac_try='test -s "conftest.$ac_objext"'
17374 { (eval echo "$as_me:17374: \"$ac_try\"") >&5
17375 (eval $ac_try) 2>&5
17377 echo "$as_me:17377: \$? = $ac_status" >&5
17378 (exit "$ac_status"); }; }; then
17379 eval "$as_ac_Header=yes"
17381 echo "$as_me: failed program was:" >&5
17382 cat "conftest.$ac_ext" >&5
17383 eval "$as_ac_Header=no"
17385 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17387 echo "$as_me:17387: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17388 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17389 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17390 cat >>confdefs.h <<EOF
17391 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
17394 ac_header_dirent=$ac_hdr; break
17398 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
17399 if test $ac_header_dirent = dirent.h; then
17400 echo "$as_me:17400: checking for opendir in -ldir" >&5
17401 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
17402 if test "${ac_cv_lib_dir_opendir+set}" = set; then
17403 echo $ECHO_N "(cached) $ECHO_C" >&6
17405 ac_check_lib_save_LIBS=$LIBS
17407 cat >"conftest.$ac_ext" <<_ACEOF
17408 #line 17408 "configure"
17409 #include "confdefs.h"
17411 /* Override any gcc2 internal prototype to avoid an error. */
17415 /* We use char because int might match the return type of a gcc2
17416 builtin and then its argument prototype would still apply. */
17417 char opendir (void);
17426 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17427 if { (eval echo "$as_me:17427: \"$ac_link\"") >&5
17428 (eval $ac_link) 2>&5
17430 echo "$as_me:17430: \$? = $ac_status" >&5
17431 (exit "$ac_status"); } &&
17432 { ac_try='test -s "conftest$ac_exeext"'
17433 { (eval echo "$as_me:17433: \"$ac_try\"") >&5
17434 (eval $ac_try) 2>&5
17436 echo "$as_me:17436: \$? = $ac_status" >&5
17437 (exit "$ac_status"); }; }; then
17438 ac_cv_lib_dir_opendir=yes
17440 echo "$as_me: failed program was:" >&5
17441 cat "conftest.$ac_ext" >&5
17442 ac_cv_lib_dir_opendir=no
17444 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17445 LIBS=$ac_check_lib_save_LIBS
17447 echo "$as_me:17447: result: $ac_cv_lib_dir_opendir" >&5
17448 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
17449 if test "$ac_cv_lib_dir_opendir" = yes; then
17454 echo "$as_me:17454: checking for opendir in -lx" >&5
17455 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
17456 if test "${ac_cv_lib_x_opendir+set}" = set; then
17457 echo $ECHO_N "(cached) $ECHO_C" >&6
17459 ac_check_lib_save_LIBS=$LIBS
17461 cat >"conftest.$ac_ext" <<_ACEOF
17462 #line 17462 "configure"
17463 #include "confdefs.h"
17465 /* Override any gcc2 internal prototype to avoid an error. */
17469 /* We use char because int might match the return type of a gcc2
17470 builtin and then its argument prototype would still apply. */
17471 char opendir (void);
17480 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17481 if { (eval echo "$as_me:17481: \"$ac_link\"") >&5
17482 (eval $ac_link) 2>&5
17484 echo "$as_me:17484: \$? = $ac_status" >&5
17485 (exit "$ac_status"); } &&
17486 { ac_try='test -s "conftest$ac_exeext"'
17487 { (eval echo "$as_me:17487: \"$ac_try\"") >&5
17488 (eval $ac_try) 2>&5
17490 echo "$as_me:17490: \$? = $ac_status" >&5
17491 (exit "$ac_status"); }; }; then
17492 ac_cv_lib_x_opendir=yes
17494 echo "$as_me: failed program was:" >&5
17495 cat "conftest.$ac_ext" >&5
17496 ac_cv_lib_x_opendir=no
17498 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17499 LIBS=$ac_check_lib_save_LIBS
17501 echo "$as_me:17501: result: $ac_cv_lib_x_opendir" >&5
17502 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
17503 if test "$ac_cv_lib_x_opendir" = yes; then
17509 echo "$as_me:17509: checking whether time.h and sys/time.h may both be included" >&5
17510 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17511 if test "${ac_cv_header_time+set}" = set; then
17512 echo $ECHO_N "(cached) $ECHO_C" >&6
17514 cat >"conftest.$ac_ext" <<_ACEOF
17515 #line 17515 "configure"
17516 #include "confdefs.h"
17517 #include <sys/types.h>
17518 #include <sys/time.h>
17524 if ((struct tm *) 0)
17530 rm -f "conftest.$ac_objext"
17531 if { (eval echo "$as_me:17531: \"$ac_compile\"") >&5
17532 (eval $ac_compile) 2>&5
17534 echo "$as_me:17534: \$? = $ac_status" >&5
17535 (exit "$ac_status"); } &&
17536 { ac_try='test -s "conftest.$ac_objext"'
17537 { (eval echo "$as_me:17537: \"$ac_try\"") >&5
17538 (eval $ac_try) 2>&5
17540 echo "$as_me:17540: \$? = $ac_status" >&5
17541 (exit "$ac_status"); }; }; then
17542 ac_cv_header_time=yes
17544 echo "$as_me: failed program was:" >&5
17545 cat "conftest.$ac_ext" >&5
17546 ac_cv_header_time=no
17548 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17550 echo "$as_me:17550: result: $ac_cv_header_time" >&5
17551 echo "${ECHO_T}$ac_cv_header_time" >&6
17552 if test $ac_cv_header_time = yes; then
17554 cat >>confdefs.h <<\EOF
17555 #define TIME_WITH_SYS_TIME 1
17560 ### checks for compiler characteristics
17562 ac_cpp='$CPP $CPPFLAGS'
17563 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17564 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17565 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17566 ac_main_return="return"
17568 echo "$as_me:17568: checking for an ANSI C-conforming const" >&5
17569 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17570 if test "${ac_cv_c_const+set}" = set; then
17571 echo $ECHO_N "(cached) $ECHO_C" >&6
17573 cat >"conftest.$ac_ext" <<_ACEOF
17574 #line 17574 "configure"
17575 #include "confdefs.h"
17580 /* FIXME: Include the comments suggested by Paul. */
17581 #ifndef __cplusplus
17582 /* Ultrix mips cc rejects this. */
17583 typedef int charset[2];
17584 const charset x; (void)x;
17585 /* SunOS 4.1.1 cc rejects this. */
17586 char const *const *ccp;
17588 /* NEC SVR4.0.2 mips cc rejects this. */
17589 struct point {int x, y;};
17590 static struct point const zero = {0,0}; (void)zero;
17591 /* AIX XL C 1.02.0.0 rejects this.
17592 It does not let you subtract one const X* pointer from another in
17593 an arm of an if-expression whose if-part is not a constant
17595 const char *g = "string";
17596 ccp = &g + (g ? g-g : 0);
17597 /* HPUX 7.0 cc rejects these. */
17600 ccp = (char const *const *) p;
17601 { /* SCO 3.2v4 cc rejects this. */
17603 char const *s = 0 ? (char *) 0 : (char const *) 0;
17608 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
17609 int x[] = {25, 17};
17610 const int *foo = &x[0];
17614 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17615 typedef const int *iptr;
17620 { /* AIX XL C 1.02.0.0 rejects this saying
17621 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17622 struct s { int j; const int *ap[3]; };
17623 struct s *b; b->j = 5;
17625 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17626 const int foo = 10;
17635 rm -f "conftest.$ac_objext"
17636 if { (eval echo "$as_me:17636: \"$ac_compile\"") >&5
17637 (eval $ac_compile) 2>&5
17639 echo "$as_me:17639: \$? = $ac_status" >&5
17640 (exit "$ac_status"); } &&
17641 { ac_try='test -s "conftest.$ac_objext"'
17642 { (eval echo "$as_me:17642: \"$ac_try\"") >&5
17643 (eval $ac_try) 2>&5
17645 echo "$as_me:17645: \$? = $ac_status" >&5
17646 (exit "$ac_status"); }; }; then
17649 echo "$as_me: failed program was:" >&5
17650 cat "conftest.$ac_ext" >&5
17653 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17655 echo "$as_me:17655: result: $ac_cv_c_const" >&5
17656 echo "${ECHO_T}$ac_cv_c_const" >&6
17657 if test $ac_cv_c_const = no; then
17659 cat >>confdefs.h <<\EOF
17665 ### Checks for external-data
17667 echo "$as_me:17667: checking if data-only library module links" >&5
17668 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
17669 if test "${cf_cv_link_dataonly+set}" = set; then
17670 echo $ECHO_N "(cached) $ECHO_C" >&6
17674 cat >conftest.$ac_ext <<EOF
17675 #line 17675 "configure"
17676 int testdata[3] = { 123, 456, 789 };
17678 if { (eval echo "$as_me:17678: \"$ac_compile\"") >&5
17679 (eval $ac_compile) 2>&5
17681 echo "$as_me:17681: \$? = $ac_status" >&5
17682 (exit "$ac_status"); } ; then
17683 mv conftest.o data.o && \
17684 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
17686 rm -f conftest.$ac_ext data.o
17687 cat >conftest.$ac_ext <<EOF
17688 #line 17688 "configure"
17689 extern int testfunc(void);
17693 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
17696 extern int testdata[3];
17699 return testdata[0] == 123
17700 && testdata[1] == 456
17701 && testdata[2] == 789;
17705 if { (eval echo "$as_me:17705: \"$ac_compile\"") >&5
17706 (eval $ac_compile) 2>&5
17708 echo "$as_me:17708: \$? = $ac_status" >&5
17709 (exit "$ac_status"); }; then
17710 mv conftest.o func.o && \
17711 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17713 rm -f conftest.$ac_ext func.o
17714 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17715 cf_saveLIBS="$LIBS"
17716 LIBS="conftest.a $LIBS"
17717 if test "$cross_compiling" = yes; then
17718 cf_cv_link_dataonly=unknown
17720 cat >"conftest.$ac_ext" <<_ACEOF
17721 #line 17721 "configure"
17722 #include "confdefs.h"
17724 extern int testfunc(void);
17727 ${cf_cv_main_return:-return} (!testfunc());
17731 rm -f "conftest$ac_exeext"
17732 if { (eval echo "$as_me:17732: \"$ac_link\"") >&5
17733 (eval $ac_link) 2>&5
17735 echo "$as_me:17735: \$? = $ac_status" >&5
17736 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17737 { (eval echo "$as_me:17737: \"$ac_try\"") >&5
17738 (eval $ac_try) 2>&5
17740 echo "$as_me:17740: \$? = $ac_status" >&5
17741 (exit "$ac_status"); }; }; then
17742 cf_cv_link_dataonly=yes
17744 echo "$as_me: program exited with status $ac_status" >&5
17745 echo "$as_me: failed program was:" >&5
17746 cat "conftest.$ac_ext" >&5
17747 cf_cv_link_dataonly=no
17749 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17751 LIBS="$cf_saveLIBS"
17755 echo "$as_me:17755: result: $cf_cv_link_dataonly" >&5
17756 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17758 if test "$cf_cv_link_dataonly" = no ; then
17760 cat >>confdefs.h <<\EOF
17761 #define BROKEN_LINKER 1
17767 ### Checks for library functions.
17773 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17774 echo "$as_me:17774: checking for $ac_header" >&5
17775 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17776 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17777 echo $ECHO_N "(cached) $ECHO_C" >&6
17779 cat >"conftest.$ac_ext" <<_ACEOF
17780 #line 17780 "configure"
17781 #include "confdefs.h"
17782 #include <$ac_header>
17784 if { (eval echo "$as_me:17784: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17785 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17787 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17789 cat conftest.err >&5
17790 echo "$as_me:17790: \$? = $ac_status" >&5
17791 (exit "$ac_status"); } >/dev/null; then
17792 if test -s conftest.err; then
17793 ac_cpp_err=$ac_c_preproc_warn_flag
17800 if test -z "$ac_cpp_err"; then
17801 eval "$as_ac_Header=yes"
17803 echo "$as_me: failed program was:" >&5
17804 cat "conftest.$ac_ext" >&5
17805 eval "$as_ac_Header=no"
17807 rm -f conftest.err "conftest.$ac_ext"
17809 echo "$as_me:17809: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17810 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17811 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17812 cat >>confdefs.h <<EOF
17813 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17819 echo "$as_me:17819: checking for working mkstemp" >&5
17820 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17821 if test "${cf_cv_func_mkstemp+set}" = set; then
17822 echo $ECHO_N "(cached) $ECHO_C" >&6
17826 if test "$cross_compiling" = yes; then
17827 cf_cv_func_mkstemp=maybe
17829 cat >"conftest.$ac_ext" <<_ACEOF
17830 #line 17830 "configure"
17831 #include "confdefs.h"
17833 $ac_includes_default
17837 static char tmpl[] = "conftestXXXXXX";
17845 for (n = 0; n < 2; ++n) {
17846 strcpy(name[n], tmpl);
17847 if ((fd = mkstemp(name[n])) >= 0) {
17848 if (!strcmp(name[n], tmpl)
17849 || stat(name[n], &sb) != 0
17850 || (sb.st_mode & S_IFMT) != S_IFREG
17851 || (sb.st_mode & 077) != 0) {
17858 && !strcmp(name[0], name[1]))
17860 ${cf_cv_main_return:-return}(result);
17864 rm -f "conftest$ac_exeext"
17865 if { (eval echo "$as_me:17865: \"$ac_link\"") >&5
17866 (eval $ac_link) 2>&5
17868 echo "$as_me:17868: \$? = $ac_status" >&5
17869 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17870 { (eval echo "$as_me:17870: \"$ac_try\"") >&5
17871 (eval $ac_try) 2>&5
17873 echo "$as_me:17873: \$? = $ac_status" >&5
17874 (exit "$ac_status"); }; }; then
17875 cf_cv_func_mkstemp=yes
17878 echo "$as_me: program exited with status $ac_status" >&5
17879 echo "$as_me: failed program was:" >&5
17880 cat "conftest.$ac_ext" >&5
17881 cf_cv_func_mkstemp=no
17884 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17888 echo "$as_me:17888: result: $cf_cv_func_mkstemp" >&5
17889 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17890 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17891 echo "$as_me:17891: checking for mkstemp" >&5
17892 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17893 if test "${ac_cv_func_mkstemp+set}" = set; then
17894 echo $ECHO_N "(cached) $ECHO_C" >&6
17896 cat >"conftest.$ac_ext" <<_ACEOF
17897 #line 17897 "configure"
17898 #include "confdefs.h"
17899 #define mkstemp autoconf_temporary
17900 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17907 /* We use char because int might match the return type of a gcc2
17908 builtin and then its argument prototype would still apply. */
17909 char mkstemp (void);
17915 /* The GNU C library defines stubs for functions which it implements
17916 to always fail with ENOSYS. Some functions are actually named
17917 something starting with __ and the normal name is an alias. */
17918 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17919 #error found stub for mkstemp
17927 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17928 if { (eval echo "$as_me:17928: \"$ac_link\"") >&5
17929 (eval $ac_link) 2>&5
17931 echo "$as_me:17931: \$? = $ac_status" >&5
17932 (exit "$ac_status"); } &&
17933 { ac_try='test -s "conftest$ac_exeext"'
17934 { (eval echo "$as_me:17934: \"$ac_try\"") >&5
17935 (eval $ac_try) 2>&5
17937 echo "$as_me:17937: \$? = $ac_status" >&5
17938 (exit "$ac_status"); }; }; then
17939 ac_cv_func_mkstemp=yes
17941 echo "$as_me: failed program was:" >&5
17942 cat "conftest.$ac_ext" >&5
17943 ac_cv_func_mkstemp=no
17945 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17947 echo "$as_me:17947: result: $ac_cv_func_mkstemp" >&5
17948 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17951 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17953 cat >>confdefs.h <<\EOF
17954 #define HAVE_MKSTEMP 1
17959 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17960 CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17961 CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17965 if test "$cf_with_ada" != "no" ; then
17966 if test "$cf_cv_prog_gnat_correct" = yes; then
17968 echo "$as_me:17968: checking optimization options for ADAFLAGS" >&5
17969 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
17973 ADAFLAGS="$ADAFLAGS -g"
17979 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
17981 ADAFLAGS="$ADAFLAGS $cf_O_flag"
17985 echo "$as_me:17985: result: $ADAFLAGS" >&5
17986 echo "${ECHO_T}$ADAFLAGS" >&6
17988 echo "$as_me:17988: checking if GNATPREP supports -T option" >&5
17989 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
17990 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
17991 echo $ECHO_N "(cached) $ECHO_C" >&6
17994 cf_cv_gnatprep_opt_t=no
17995 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
17998 echo "$as_me:17998: result: $cf_cv_gnatprep_opt_t" >&5
17999 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
18000 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
18002 echo "$as_me:18002: checking if GNAT supports generics" >&5
18003 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
18004 case "$cf_cv_gnat_version" in
18005 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
18006 cf_gnat_generics=yes
18009 cf_gnat_generics=no
18012 echo "$as_me:18012: result: $cf_gnat_generics" >&5
18013 echo "${ECHO_T}$cf_gnat_generics" >&6
18015 if test "$cf_gnat_generics" = yes
18017 cf_compile_generics=generics
18018 cf_generic_objects="\${GENOBJS}"
18020 cf_compile_generics=
18021 cf_generic_objects=
18024 echo "$as_me:18024: checking if GNAT supports SIGINT" >&5
18025 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
18026 if test "${cf_cv_gnat_sigint+set}" = set; then
18027 echo $ECHO_N "(cached) $ECHO_C" >&6
18030 rm -rf ./conftest* ./*~conftest*
18031 cat >>conftest.ads <<CF_EOF
18032 with Ada.Interrupts.Names;
18034 package ConfTest is
18036 pragma Warnings (Off); -- the next pragma exists since 3.11p
18037 pragma Unreserve_All_Interrupts;
18038 pragma Warnings (On);
18040 protected Process is
18042 function Continue return Boolean;
18043 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
18045 Done : Boolean := False;
18050 cat >>conftest.adb <<CF_EOF
18051 package body ConfTest is
18052 protected body Process is
18057 function Continue return Boolean is
18064 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18065 cf_cv_gnat_sigint=yes
18067 cf_cv_gnat_sigint=no
18069 rm -rf ./conftest* ./*~conftest*
18072 echo "$as_me:18072: result: $cf_cv_gnat_sigint" >&5
18073 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
18075 if test "$cf_cv_gnat_sigint" = yes ; then
18078 USE_GNAT_SIGINT="#"
18081 cf_gnat_libraries=no
18082 cf_gnat_projects=no
18084 if test "$enable_gnat_projects" != no ; then
18085 echo "$as_me:18085: checking if GNAT supports project files" >&5
18086 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
18087 case "$cf_cv_gnat_version" in
18091 case "$cf_cv_system_name" in
18095 rm -rf ./conftest* ./*~conftest*
18096 if mkdir conftest.src conftest.bin conftest.lib
18099 rm -rf ./conftest* ./*~conftest*
18100 cat >>library.gpr <<CF_EOF
18102 Kind := External ("LIB_KIND");
18103 for Library_Name use "ConfTest";
18104 for Object_Dir use ".";
18105 for Library_ALI_Dir use External("LIBRARY_DIR");
18106 for Library_Version use External ("SONAME");
18107 for Library_Kind use Kind;
18108 for Library_Dir use External("BUILD_DIR");
18109 Source_Dir := External ("SOURCE_DIR");
18110 for Source_Dirs use (Source_Dir);
18113 cat >>confpackage.ads <<CF_EOF
18114 package ConfPackage is
18115 procedure conftest;
18118 cat >>confpackage.adb <<CF_EOF
18120 package body ConfPackage is
18121 procedure conftest is
18123 Text_IO.Put ("Hello World");
18128 if ( "$cf_ada_make" $ADAFLAGS \
18130 -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
18131 -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
18132 -XSOURCE_DIR="`pwd`" \
18133 -XSONAME=libConfTest.so.1 \
18134 -XLIB_KIND=static 1>&5 2>&1 ) ; then
18135 cf_gnat_projects=yes
18139 if test -f conftest.lib/confpackage.ali
18141 cf_gnat_libraries=yes
18143 rm -rf ./conftest* ./*~conftest*
18148 echo "$as_me:18148: result: $cf_gnat_projects" >&5
18149 echo "${ECHO_T}$cf_gnat_projects" >&6
18150 fi # enable_gnat_projects
18152 if test "$cf_gnat_projects" = yes
18154 echo "$as_me:18154: checking if GNAT supports libraries" >&5
18155 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
18156 echo "$as_me:18156: result: $cf_gnat_libraries" >&5
18157 echo "${ECHO_T}$cf_gnat_libraries" >&6
18160 USE_OLD_MAKERULES=""
18161 USE_GNAT_PROJECTS="#"
18162 USE_GNAT_MAKE_GPR="#"
18163 USE_GNAT_GPRBUILD="#"
18165 if test "$cf_gnat_projects" = yes
18167 USE_OLD_MAKERULES="#"
18168 USE_GNAT_PROJECTS=""
18169 if test "$cf_cv_VERSION_GPRBUILD" != no
18171 USE_GNAT_GPRBUILD=""
18172 elif test "$cf_cv_VERSION_GNATMAKE" != no
18174 USE_GNAT_MAKE_GPR=""
18176 { echo "$as_me:18176: WARNING: use old makefile rules since tools are missing" >&5
18177 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
18181 if test "$cf_gnat_libraries" = yes
18183 USE_GNAT_LIBRARIES=""
18185 USE_GNAT_LIBRARIES="#"
18188 echo "$as_me:18188: checking for Ada95 compiler" >&5
18189 echo $ECHO_N "checking for Ada95 compiler... $ECHO_C" >&6
18191 # Check whether --with-ada-compiler or --without-ada-compiler was given.
18192 if test "${with_ada_compiler+set}" = set; then
18193 withval="$with_ada_compiler"
18194 cf_ada_compiler=$withval
18196 cf_ada_compiler=gnatmake
18199 echo "$as_me:18199: result: $cf_ada_compiler" >&5
18200 echo "${ECHO_T}$cf_ada_compiler" >&6
18202 cf_ada_package=terminal_interface
18204 echo "$as_me:18204: checking for Ada95 include directory" >&5
18205 echo $ECHO_N "checking for Ada95 include directory... $ECHO_C" >&6
18207 # Check whether --with-ada-include or --without-ada-include was given.
18208 if test "${with_ada_include+set}" = set; then
18209 withval="$with_ada_include"
18212 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
18213 fi; if test -n "$prefix/share/ada/adainclude" ; then
18215 if test "x$prefix" != xNONE; then
18216 cf_path_syntax="$prefix"
18218 cf_path_syntax="$ac_default_prefix"
18221 case ".$withval" in
18222 (.\$\(*\)*|.\'*\'*)
18226 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
18228 (.\$\{*prefix\}*|.\$\{*dir\}*)
18229 eval withval="$withval"
18230 case ".$withval" in
18232 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18237 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18240 { { echo "$as_me:18240: error: expected a pathname, not \"$withval\"" >&5
18241 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18242 { (exit 1); exit 1; }; }
18247 eval ADA_INCLUDE="$withval"
18249 echo "$as_me:18249: result: $ADA_INCLUDE" >&5
18250 echo "${ECHO_T}$ADA_INCLUDE" >&6
18252 echo "$as_me:18252: checking for Ada95 object directory" >&5
18253 echo $ECHO_N "checking for Ada95 object directory... $ECHO_C" >&6
18255 # Check whether --with-ada-objects or --without-ada-objects was given.
18256 if test "${with_ada_objects+set}" = set; then
18257 withval="$with_ada_objects"
18260 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
18261 fi; if test -n "$prefix/lib/ada/adalib" ; then
18263 if test "x$prefix" != xNONE; then
18264 cf_path_syntax="$prefix"
18266 cf_path_syntax="$ac_default_prefix"
18269 case ".$withval" in
18270 (.\$\(*\)*|.\'*\'*)
18274 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
18276 (.\$\{*prefix\}*|.\$\{*dir\}*)
18277 eval withval="$withval"
18278 case ".$withval" in
18280 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18285 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18288 { { echo "$as_me:18288: error: expected a pathname, not \"$withval\"" >&5
18289 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18290 { (exit 1); exit 1; }; }
18295 eval ADA_OBJECTS="$withval"
18297 echo "$as_me:18297: result: $ADA_OBJECTS" >&5
18298 echo "${ECHO_T}$ADA_OBJECTS" >&6
18300 echo "$as_me:18300: checking whether to build an Ada95 shared library" >&5
18301 echo $ECHO_N "checking whether to build an Ada95 shared library... $ECHO_C" >&6
18303 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
18304 if test "${with_ada_sharedlib+set}" = set; then
18305 withval="$with_ada_sharedlib"
18306 with_ada_sharedlib=$withval
18308 with_ada_sharedlib=no
18310 cf_ada_sharedlib_warn=no
18312 if test "x$with_ada_sharedlib" != xno
18314 if test "x$cf_gnat_projects" != xyes
18316 with_ada_sharedlib=no
18317 cf_ada_sharedlib_warn=yes
18321 echo "$as_me:18321: result: $with_ada_sharedlib" >&5
18322 echo "${ECHO_T}$with_ada_sharedlib" >&6
18323 if test "x$cf_ada_sharedlib_warn" != xno
18325 { echo "$as_me:18325: WARNING: disabling Ada95 shared library since GNAT projects are not supported" >&5
18326 echo "$as_me: WARNING: disabling Ada95 shared library since GNAT projects are not supported" >&2;}
18329 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
18330 MAKE_ADA_SHAREDLIB="#"
18332 if test "x$with_ada_sharedlib" != xno
18334 MAKE_ADA_SHAREDLIB=
18335 if test "x$with_ada_sharedlib" != xyes
18337 ADA_SHAREDLIB="$with_ada_sharedlib"
18341 # allow the Ada binding to be renamed
18343 echo "$as_me:18343: checking for Ada95 curses library name" >&5
18344 echo $ECHO_N "checking for Ada95 curses library name... $ECHO_C" >&6
18346 # Check whether --with-ada-libname or --without-ada-libname was given.
18347 if test "${with_ada_libname+set}" = set; then
18348 withval="$with_ada_libname"
18349 ADA_LIBNAME=$withval
18351 ADA_LIBNAME=AdaCurses
18353 case "x$ADA_LIBNAME" in
18355 ADA_LIBNAME=AdaCurses
18359 echo "$as_me:18359: result: $ADA_LIBNAME" >&5
18360 echo "${ECHO_T}$ADA_LIBNAME" >&6
18363 { { echo "$as_me:18363: error: No usable Ada compiler found" >&5
18364 echo "$as_me: error: No usable Ada compiler found" >&2;}
18365 { (exit 1); exit 1; }; }
18368 { { echo "$as_me:18368: error: The Ada compiler is needed for this package" >&5
18369 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
18370 { (exit 1); exit 1; }; }
18373 ################################################################################
18380 ### Construct the list of include-directories to be generated
18382 if test "$srcdir" != "."; then
18383 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
18385 CPPFLAGS="-I../include $CPPFLAGS"
18386 if test "$srcdir" != "."; then
18387 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
18389 CPPFLAGS="-I. $CPPFLAGS"
18391 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18392 if test "$srcdir" != "."; then
18393 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18395 if test "$GCC" != yes; then
18396 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18397 elif test "$includedir" != "/usr/include"; then
18398 if test "$includedir" = '${prefix}/include' ; then
18399 if test x$prefix != x/usr ; then
18400 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18403 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18407 ### Build up pieces for makefile rules
18408 echo "$as_me:18408: checking default library suffix" >&5
18409 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18411 case $DFT_LWR_MODEL in
18412 (libtool) DFT_ARG_SUFFIX='' ;;
18413 (normal) DFT_ARG_SUFFIX='' ;;
18414 (debug) DFT_ARG_SUFFIX='_g' ;;
18415 (profile) DFT_ARG_SUFFIX='_p' ;;
18416 (shared) DFT_ARG_SUFFIX='' ;;
18418 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18419 echo "$as_me:18419: result: $DFT_ARG_SUFFIX" >&5
18420 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18422 echo "$as_me:18422: checking default library-dependency suffix" >&5
18423 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18425 case X$DFT_LWR_MODEL in
18427 DFT_LIB_SUFFIX='.la'
18428 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18431 case "$cf_cv_system_name" in
18433 DFT_LIB_SUFFIX='_g.lib'
18436 DFT_LIB_SUFFIX='_g.a'
18439 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18442 case "$cf_cv_system_name" in
18444 DFT_LIB_SUFFIX='_p.lib'
18447 DFT_LIB_SUFFIX='_p.a'
18450 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18453 case "$cf_cv_system_name" in
18455 DFT_LIB_SUFFIX='.so'
18456 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18459 DFT_LIB_SUFFIX='.dll'
18460 DFT_DEP_SUFFIX='.dll.lib'
18462 (cygwin*|msys*|mingw*)
18463 DFT_LIB_SUFFIX='.dll'
18464 DFT_DEP_SUFFIX='.dll.a'
18467 DFT_LIB_SUFFIX='.dylib'
18468 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18473 DFT_LIB_SUFFIX='.so'
18474 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18477 DFT_LIB_SUFFIX='.sl'
18478 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18483 DFT_LIB_SUFFIX='.so'
18484 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18491 DFT_LIB_SUFFIX='.lib'
18494 DFT_LIB_SUFFIX='.a'
18497 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18500 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
18502 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
18503 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
18505 echo "$as_me:18505: result: $DFT_DEP_SUFFIX" >&5
18506 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18508 echo "$as_me:18508: checking default object directory" >&5
18509 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18511 case $DFT_LWR_MODEL in
18512 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
18513 (normal) DFT_OBJ_SUBDIR='objects' ;;
18514 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
18515 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
18517 case "$cf_cv_system_name" in
18519 DFT_OBJ_SUBDIR='objects' ;;
18521 DFT_OBJ_SUBDIR='obj_s' ;;
18524 echo "$as_me:18524: result: $DFT_OBJ_SUBDIR" >&5
18525 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18527 ### Set up low-level terminfo dependencies for makefiles.
18529 if test "$DFT_LWR_MODEL" = shared ; then
18530 case $cf_cv_system_name in
18532 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18535 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
18540 USE_ARG_SUFFIX=${DFT_ARG_SUFFIX}
18542 USE_LIB_SUFFIX=${DFT_ARG_SUFFIX}
18544 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
18546 ### Construct the list of subdirectories for which we'll customize makefiles
18547 ### with the appropriate compile-rules.
18549 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
18551 cat >>confdefs.h <<EOF
18552 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18555 ################################################################################
18561 NCURSES_SHLIB2="sh -c"
18563 ADA_SUBDIRS="include gen src doc"
18564 if test "x$cf_with_tests" != "xno" ; then
18565 ADA_SUBDIRS="$ADA_SUBDIRS samples"
18567 for cf_dir in $ADA_SUBDIRS
18569 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18576 # match layout used by make-tar.sh
18577 ADAHTML_DIR=../doc/ada
18579 if test "x$cross_compiling" = xyes ; then
18580 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
18582 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
18585 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"
18586 ac_config_commands="$ac_config_commands default"
18587 cat >confcache <<\_ACEOF
18588 # This file is a shell script that caches the results of configure
18589 # tests run on this system so they can be shared between configure
18590 # scripts and configure runs, see configure's option --config-cache.
18591 # It is not useful on other systems. If it contains results you don't
18592 # want to keep, you may remove or edit it.
18594 # config.status only pays attention to the cache file if you give it
18595 # the --recheck option to rerun configure.
18597 # `ac_cv_env_foo' variables (set or unset) will be overridden when
18598 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18599 # following values.
18603 # The following way of writing the cache mishandles newlines in values,
18604 # but we know of no workaround that is simple, portable, and efficient.
18605 # So, don't put newlines in cache variables' values.
18606 # Ultrix sh set writes to stderr and can't be redirected directly,
18607 # and sets the high bit in the cache file unless we assign to the vars.
18610 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18612 # `set' does not quote correctly, so add quotes (double-quote
18613 # substitution turns \\\\ into \\, and sed turns \\ into \).
18616 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18619 # `set' quotes correctly as required by POSIX, so do not add quotes.
18621 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18628 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18630 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18632 if cmp -s $cache_file confcache; then :; else
18633 if test -w $cache_file; then
18634 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18635 cat confcache >$cache_file
18637 echo "not updating unwritable cache $cache_file"
18642 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18643 # Let make expand exec_prefix.
18644 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18646 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18647 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18648 # trailing colons and then remove the whole line if VPATH becomes empty
18649 # (actually we leave an empty line to preserve line numbers).
18650 if test "x$srcdir" = x.; then
18651 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18652 s/:*\$(srcdir):*/:/;
18653 s/:*\${srcdir}:*/:/;
18655 s/^\([^=]*=[ ]*\):*/\1/;
18661 DEFS=-DHAVE_CONFIG_H
18663 : "${CONFIG_STATUS=./config.status}"
18664 ac_clean_files_save=$ac_clean_files
18665 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18666 { echo "$as_me:18666: creating $CONFIG_STATUS" >&5
18667 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18668 cat >"$CONFIG_STATUS" <<_ACEOF
18670 # Generated automatically by configure.
18671 # Run this file to recreate the current configuration.
18672 # Compiler output produced by configure, useful for debugging
18673 # configure, is in config.log if it exists.
18675 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
18678 SHELL=\${CONFIG_SHELL-$SHELL}
18679 ac_cs_invocation="\$0 \$@"
18681 CLICOLOR_FORCE= GREP_OPTIONS=
18682 unset CLICOLOR_FORCE GREP_OPTIONS
18685 cat >>"$CONFIG_STATUS" <<\_ACEOF
18686 # Be Bourne compatible
18687 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18690 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18694 # Name of the executable.
18695 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18697 if expr a : '\(a\)' >/dev/null 2>&1; then
18703 rm -f conf$$ conf$$.exe conf$$.file
18705 if ln -s conf$$.file conf$$ 2>/dev/null; then
18706 # We could just check for DJGPP; but this test a) works b) is more generic
18707 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18708 if test -f conf$$.exe; then
18709 # Don't use ln at all; we don't have any links
18714 elif ln conf$$.file conf$$ 2>/dev/null; then
18719 rm -f conf$$ conf$$.exe conf$$.file
18721 as_executable_p="test -f"
18723 # Support unset when possible.
18724 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18731 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18732 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18733 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18734 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18735 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18736 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18737 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18738 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18741 # We need space, tab and new line, in precisely that order.
18747 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18753 # Files that config.status was made for.
18754 if test -n "$ac_config_files"; then
18755 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
18758 if test -n "$ac_config_headers"; then
18759 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
18762 if test -n "$ac_config_links"; then
18763 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
18766 if test -n "$ac_config_commands"; then
18767 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
18770 cat >>"$CONFIG_STATUS" <<\EOF
18773 \`$as_me' instantiates files from templates according to the
18774 current configuration.
18776 Usage: $0 [OPTIONS] [FILE]...
18778 -h, --help print this help, then exit
18779 -V, --version print version number, then exit
18780 -d, --debug don't remove temporary files
18781 --recheck update $as_me by reconfiguring in the same conditions
18782 --file=FILE[:TEMPLATE]
18783 instantiate the configuration file FILE
18784 --header=FILE[:TEMPLATE]
18785 instantiate the configuration header FILE
18787 Configuration files:
18790 Configuration headers:
18793 Configuration commands:
18796 Report bugs to <dickey@invisible-island.net>."
18799 cat >>"$CONFIG_STATUS" <<EOF
18802 configured by $0, generated by GNU Autoconf 2.52.20231210,
18803 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18805 Copyright 2003-2022,2023 Thomas E. Dickey
18806 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18807 Free Software Foundation, Inc.
18808 This config.status script is free software; the Free Software Foundation
18809 gives unlimited permission to copy, distribute and modify it."
18814 cat >>"$CONFIG_STATUS" <<\EOF
18815 # If no file are specified by the user, then we need to provide default
18816 # value. By we need to know if files were specified by the user.
18822 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18823 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18825 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18829 *) # This is not an option, so the user has probably given explicit
18831 ac_need_defaults=false;;
18835 # Handling of the options.
18837 cat >>"$CONFIG_STATUS" <<EOF
18838 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18839 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18840 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18842 cat >>"$CONFIG_STATUS" <<\EOF
18843 --version | --vers* | -V )
18844 echo "$ac_cs_version"; exit 0 ;;
18846 # Conflict between --help and --header
18847 { { echo "$as_me:18847: error: ambiguous option: $1
18848 Try \`$0 --help' for more information." >&5
18849 echo "$as_me: error: ambiguous option: $1
18850 Try \`$0 --help' for more information." >&2;}
18851 { (exit 1); exit 1; }; };;
18852 --help | --hel | -h )
18853 echo "$ac_cs_usage"; exit 0 ;;
18854 --debug | --d* | -d )
18856 --file | --fil | --fi | --f )
18858 CONFIG_FILES="$CONFIG_FILES $1"
18859 ac_need_defaults=false;;
18860 --header | --heade | --head | --hea )
18862 CONFIG_HEADERS="$CONFIG_HEADERS $1"
18863 ac_need_defaults=false;;
18865 # This is an error.
18866 -*) { { echo "$as_me:18866: error: unrecognized option: $1
18867 Try \`$0 --help' for more information." >&5
18868 echo "$as_me: error: unrecognized option: $1
18869 Try \`$0 --help' for more information." >&2;}
18870 { (exit 1); exit 1; }; } ;;
18872 *) ac_config_targets="$ac_config_targets $1" ;;
18881 ## ----------------------- ##
18882 ## Running config.status. ##
18883 ## ----------------------- ##
18885 This file was extended by $as_me 2.52.20231210, executed with
18886 CONFIG_FILES = $CONFIG_FILES
18887 CONFIG_HEADERS = $CONFIG_HEADERS
18888 CONFIG_LINKS = $CONFIG_LINKS
18889 CONFIG_COMMANDS = $CONFIG_COMMANDS
18890 > "$ac_cs_invocation"
18891 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18896 cat >>"$CONFIG_STATUS" <<EOF
18898 # INIT-COMMANDS section.
18901 ### Special initialization commands, used to pass information from the
18902 ### configuration-run into config.status
18905 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
18906 DFT_LWR_MODEL="$DFT_LWR_MODEL"
18907 LIB_NAME="$LIB_NAME"
18908 LIB_PREFIX="$LIB_PREFIX"
18909 LIB_SUFFIX="$LIB_SUFFIX"
18911 NCURSES_MAJOR="$NCURSES_MAJOR"
18912 NCURSES_MINOR="$NCURSES_MINOR"
18913 NCURSES_PATCH="$NCURSES_PATCH"
18915 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
18916 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
18917 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
18918 cf_cv_abi_version="$cf_cv_abi_version"
18919 cf_cv_rel_version="$cf_cv_rel_version"
18920 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
18921 cf_cv_shared_soname='$cf_cv_shared_soname'
18922 cf_cv_shlib_version="$cf_cv_shlib_version"
18923 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
18924 cf_cv_system_name="$cf_cv_system_name"
18930 cat >>"$CONFIG_STATUS" <<\EOF
18931 for ac_config_target in $ac_config_targets
18933 case "$ac_config_target" in
18934 # Handling of arguments.
18935 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
18936 "src/library.gpr" ) CONFIG_FILES="$CONFIG_FILES src/library.gpr:src/library.gpr.in" ;;
18937 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
18938 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18939 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18940 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
18941 *) { { echo "$as_me:18941: error: invalid argument: $ac_config_target" >&5
18942 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18943 { (exit 1); exit 1; }; };;
18947 # If the user did not use the arguments to specify the items to instantiate,
18948 # then the envvar interface is used. Set only those that are not.
18949 # We use the long form for the default assignment because of an extremely
18950 # bizarre bug on SunOS 4.1.3.
18951 if "$ac_need_defaults"; then
18952 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18953 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18954 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18957 # Create a temporary directory, and hook for its removal unless debugging.
18960 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18961 trap '{ (exit 1); exit 1; }' 1 2 13 15
18964 # Create a (secure) tmp directory for tmp files.
18967 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18968 test -n "$tmp" && test -d "$tmp"
18971 tmp=$TMPDIR/cs$$-$RANDOM
18972 (umask 077 && mkdir "$tmp")
18975 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18976 { (exit 1); exit 1; }
18981 cat >>"$CONFIG_STATUS" <<EOF
18984 # CONFIG_FILES section.
18987 # No need to generate the scripts if there are no CONFIG_FILES.
18988 # This happens for instance when ./config.status config.h
18989 if test -n "\$CONFIG_FILES"; then
18990 # Protect against being on the right side of a sed subst in config.status.
18991 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18992 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
18993 s,@SHELL@,$SHELL,;t t
18994 s,@exec_prefix@,$exec_prefix,;t t
18995 s,@prefix@,$prefix,;t t
18996 s,@program_transform_name@,$program_transform_name,;t t
18997 s,@bindir@,$bindir,;t t
18998 s,@sbindir@,$sbindir,;t t
18999 s,@libexecdir@,$libexecdir,;t t
19000 s,@datarootdir@,$datarootdir,;t t
19001 s,@datadir@,$datadir,;t t
19002 s,@sysconfdir@,$sysconfdir,;t t
19003 s,@sharedstatedir@,$sharedstatedir,;t t
19004 s,@localstatedir@,$localstatedir,;t t
19005 s,@runstatedir@,$runstatedir,;t t
19006 s,@libdir@,$libdir,;t t
19007 s,@includedir@,$includedir,;t t
19008 s,@oldincludedir@,$oldincludedir,;t t
19009 s,@infodir@,$infodir,;t t
19010 s,@mandir@,$mandir,;t t
19011 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19012 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19013 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19014 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19015 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19016 s,@build_alias@,$build_alias,;t t
19017 s,@host_alias@,$host_alias,;t t
19018 s,@target_alias@,$target_alias,;t t
19019 s,@ECHO_C@,$ECHO_C,;t t
19020 s,@ECHO_N@,$ECHO_N,;t t
19021 s,@ECHO_T@,$ECHO_T,;t t
19022 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19023 s,@DEFS@,$DEFS,;t t
19024 s,@LIBS@,$LIBS,;t t
19025 s,@PACKAGE@,$PACKAGE,;t t
19026 s,@top_builddir@,$top_builddir,;t t
19027 s,@build@,$build,;t t
19028 s,@build_cpu@,$build_cpu,;t t
19029 s,@build_vendor@,$build_vendor,;t t
19030 s,@build_os@,$build_os,;t t
19031 s,@host@,$host,;t t
19032 s,@host_cpu@,$host_cpu,;t t
19033 s,@host_vendor@,$host_vendor,;t t
19034 s,@host_os@,$host_os,;t t
19035 s,@target@,$target,;t t
19036 s,@target_cpu@,$target_cpu,;t t
19037 s,@target_vendor@,$target_vendor,;t t
19038 s,@target_os@,$target_os,;t t
19039 s,@GREP@,$GREP,;t t
19040 s,@FGREP@,$FGREP,;t t
19041 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
19042 s,@M4_exists@,$M4_exists,;t t
19043 s,@cf_ada_make@,$cf_ada_make,;t t
19044 s,@cf_ada_config@,$cf_ada_config,;t t
19045 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
19046 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
19047 s,@cf_cv_path_gnatgcc@,$cf_cv_path_gnatgcc,;t t
19049 s,@CFLAGS@,$CFLAGS,;t t
19050 s,@LDFLAGS@,$LDFLAGS,;t t
19051 s,@CPPFLAGS@,$CPPFLAGS,;t t
19052 s,@ac_ct_CC@,$ac_ct_CC,;t t
19053 s,@EXEEXT@,$EXEEXT,;t t
19054 s,@OBJEXT@,$OBJEXT,;t t
19055 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
19057 s,@EGREP@,$EGREP,;t t
19059 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19060 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19061 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19062 s,@LN_S@,$LN_S,;t t
19063 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
19064 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
19065 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
19066 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
19067 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
19068 s,@SET_MAKE@,$SET_MAKE,;t t
19069 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
19070 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
19071 s,@CTAGS@,$CTAGS,;t t
19072 s,@ETAGS@,$ETAGS,;t t
19073 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
19074 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
19075 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
19076 s,@RANLIB@,$RANLIB,;t t
19077 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19079 s,@ac_ct_LD@,$ac_ct_LD,;t t
19081 s,@ac_ct_AR@,$ac_ct_AR,;t t
19082 s,@ARFLAGS@,$ARFLAGS,;t t
19083 s,@DESTDIR@,$DESTDIR,;t t
19084 s,@BUILD_CC@,$BUILD_CC,;t t
19085 s,@BUILD_CPP@,$BUILD_CPP,;t t
19086 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
19087 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
19088 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
19089 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
19090 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
19091 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
19092 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
19093 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
19094 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
19095 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
19096 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
19097 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
19098 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
19099 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
19100 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
19101 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
19102 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
19103 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
19104 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
19105 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
19106 s,@CC_G_OPT@,$CC_G_OPT,;t t
19107 s,@LD_MODEL@,$LD_MODEL,;t t
19108 s,@shlibdir@,$shlibdir,;t t
19109 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
19110 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
19111 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
19112 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
19113 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
19114 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
19115 s,@LINK_PROGS@,$LINK_PROGS,;t t
19116 s,@LINK_TESTS@,$LINK_TESTS,;t t
19117 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
19118 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
19119 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
19120 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
19121 s,@RPATH_LIST@,$RPATH_LIST,;t t
19122 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
19123 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
19124 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
19125 s,@PTHREAD@,$PTHREAD,;t t
19126 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
19127 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
19128 s,@ECHO_LT@,$ECHO_LT,;t t
19129 s,@ECHO_LD@,$ECHO_LD,;t t
19130 s,@RULE_CC@,$RULE_CC,;t t
19131 s,@SHOW_CC@,$SHOW_CC,;t t
19132 s,@ECHO_CC@,$ECHO_CC,;t t
19133 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
19134 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
19135 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
19136 s,@ADAFLAGS@,$ADAFLAGS,;t t
19137 s,@ADA_TRACE@,$ADA_TRACE,;t t
19138 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
19139 s,@cf_compile_generics@,$cf_compile_generics,;t t
19140 s,@cf_generic_objects@,$cf_generic_objects,;t t
19141 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
19142 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
19143 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
19144 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
19145 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
19146 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
19147 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
19148 s,@cf_ada_package@,$cf_ada_package,;t t
19149 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
19150 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
19151 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
19152 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
19153 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
19154 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
19155 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
19156 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
19157 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
19158 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
19159 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
19160 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
19161 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
19162 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
19163 s,@TEST_ARG2@,$TEST_ARG2,;t t
19164 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
19165 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
19166 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
19167 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
19168 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
19169 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
19170 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
19175 cat >>"$CONFIG_STATUS" <<\EOF
19176 # Split the substitutions into bite-sized pieces for seds with
19177 # small command number limits, like on Digital OSF/1 and HP-UX.
19178 ac_max_sed_lines=48
19179 ac_sed_frag=1 # Number of current file.
19180 ac_beg=1 # First line for current file.
19181 ac_end=$ac_max_sed_lines # Line after last line for current file.
19184 while "$ac_more_lines"; do
19185 if test "$ac_beg" -gt 1; then
19186 sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
19188 sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
19190 if test ! -s "$tmp"/subs.frag; then
19191 ac_more_lines=false
19193 # The purpose of the label and of the branching condition is to
19194 # speed up the sed processing (if there are no `@' at all, there
19195 # is no need to browse any of the substitutions).
19196 # These are the two extra sed commands mentioned above.
19198 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
19199 # It is possible to make a multiline substitution using escaped newlines.
19200 # Ensure that we do not split the substitution between script fragments.
19202 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
19203 sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
19204 if test -s "$tmp"/subs.next; then
19205 grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
19206 if test ! -s "$tmp"/subs.edit; then
19207 grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
19208 if test ! -s "$tmp"/subs.edit; then
19209 if test "$ac_beg" -gt 1; then
19210 ac_end=`expr "$ac_end" - 1`
19217 if test -z "$ac_sed_cmds"; then
19218 ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
19220 ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
19222 ac_sed_frag=`expr "$ac_sed_frag" + 1`
19224 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
19227 if test -z "$ac_sed_cmds"; then
19230 fi # test -n "$CONFIG_FILES"
19233 cat >>"$CONFIG_STATUS" <<\EOF
19234 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19235 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19237 - | *:- | *:-:* ) # input from stdin
19239 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19240 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19241 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19242 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19243 * ) ac_file_in=$ac_file.in ;;
19246 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19247 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19248 X"$ac_file" : 'X\(//\)[^/]' \| \
19249 X"$ac_file" : 'X\(//\)$' \| \
19250 X"$ac_file" : 'X\(/\)' \| \
19251 . : '\(.\)' 2>/dev/null ||
19253 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19254 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19255 /^X\(\/\/\)$/{ s//\1/; q; }
19256 /^X\(\/\).*/{ s//\1/; q; }
19258 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19259 { case "$ac_dir" in
19260 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19264 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19265 case $as_mkdir_dir in
19266 # Skip DOS drivespec
19267 ?:) as_incr_dir=$as_mkdir_dir ;;
19269 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19270 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19275 ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
19276 # A "../" for each directory in $ac_dir_suffix.
19277 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
19279 ac_dir_suffix= ac_dots=
19284 if test -z "$ac_dots"; then
19287 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
19289 [\\/]* | ?:[\\/]* )
19290 ac_srcdir="$srcdir$ac_dir_suffix";
19291 ac_top_srcdir="$srcdir" ;;
19292 *) # Relative path.
19293 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
19294 ac_top_srcdir="$ac_dots$srcdir" ;;
19298 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19299 *) ac_INSTALL=$ac_dots$INSTALL ;;
19302 if test x"$ac_file" != x-; then
19303 { echo "$as_me:19303: creating $ac_file" >&5
19304 echo "$as_me: creating $ac_file" >&6;}
19307 # Let's still pretend it is `configure' which instantiates (i.e., don't
19308 # use $as_me), people would be surprised to read:
19309 # /* config.h. Generated automatically by config.status. */
19310 configure_input="Generated automatically from `echo $ac_file_in |
19311 sed 's,.*/,,'` by configure."
19313 # First look for the input files in the build tree, otherwise in the
19315 ac_file_inputs=`IFS=:
19316 for f in $ac_file_in; do
19318 -) echo "$tmp"/stdin ;;
19320 # Absolute (can't be DOS-style, as IFS=:)
19321 test -f "$f" || { { echo "$as_me:19321: error: cannot find input file: $f" >&5
19322 echo "$as_me: error: cannot find input file: $f" >&2;}
19323 { (exit 1); exit 1; }; }
19326 if test -f "$f"; then
19329 elif test -f "$srcdir/$f"; then
19334 { { echo "$as_me:19334: error: cannot find input file: $f" >&5
19335 echo "$as_me: error: cannot find input file: $f" >&2;}
19336 { (exit 1); exit 1; }; }
19339 done` || { (exit 1); exit 1; }
19341 cat >>"$CONFIG_STATUS" <<\EOF
19342 ac_warn_datarootdir=no
19343 if test x"$ac_file" != x-; then
19344 for ac_item in $ac_file_inputs
19346 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
19347 if test -n "$ac_seen"; then
19348 ac_used=`grep '@datarootdir@' "$ac_item"`
19349 if test -z "$ac_used"; then
19350 { echo "$as_me:19350: WARNING: datarootdir was used implicitly but not set:
19352 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
19354 ac_warn_datarootdir=yes
19357 ac_seen=`grep '${datarootdir}' "$ac_item"`
19358 if test -n "$ac_seen"; then
19359 { echo "$as_me:19359: WARNING: datarootdir was used explicitly but not set:
19361 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
19363 ac_warn_datarootdir=yes
19368 if test "x$ac_warn_datarootdir" = xyes; then
19369 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
19373 cat >>"$CONFIG_STATUS" <<EOF
19377 cat >>"$CONFIG_STATUS" <<\EOF
19379 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19380 s,@configure_input@,$configure_input,;t t
19381 s,@srcdir@,$ac_srcdir,;t t
19382 s,@top_srcdir@,$ac_top_srcdir,;t t
19383 s,@INSTALL@,$ac_INSTALL,;t t
19384 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
19387 test -n "${FGREP}" || FGREP="grep -F"
19388 test -n "${EGREP}" || EGREP="grep -E"
19389 cat >>"$CONFIG_STATUS" <<EOF
19390 test -n "\${FGREP}" || FGREP="$FGREP"
19391 test -n "\${EGREP}" || EGREP="$EGREP"
19393 cat >>"$CONFIG_STATUS" <<\EOF
19394 if test x"$ac_file" != x-; then
19395 cp "$tmp/out" "$ac_file"
19397 for ac_name in prefix exec_prefix datarootdir
19399 ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
19400 if test -n "$ac_seen"; then
19401 ac_init=`$EGREP '[ ]*'$ac_name'[ ]*=' "$ac_file"`
19402 if test -z "$ac_init"; then
19403 ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
19404 { echo "$as_me:19404: WARNING: Variable $ac_name is used but was not set:
19406 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
19411 $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
19412 $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
19413 if test -s "$tmp"/out; then
19414 ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
19415 { echo "$as_me:19415: WARNING: Some variables may not be substituted:
19417 echo "$as_me: WARNING: Some variables may not be substituted:
19427 cat >>"$CONFIG_STATUS" <<\EOF
19430 # CONFIG_HEADER section.
19433 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19434 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19436 # ac_d sets the value in "#define NAME VALUE" lines.
19437 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19438 ac_dB='[ ].*$,\1#\2'
19441 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19442 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19443 ac_iB='\([ ]\),\1#\2define\3'
19446 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19447 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19448 ac_uB='$,\1#\2define\3'
19452 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19453 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19455 - | *:- | *:-:* ) # input from stdin
19457 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19458 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19459 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19460 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19461 * ) ac_file_in=$ac_file.in ;;
19464 test x"$ac_file" != x- && { echo "$as_me:19464: creating $ac_file" >&5
19465 echo "$as_me: creating $ac_file" >&6;}
19467 # First look for the input files in the build tree, otherwise in the
19469 ac_file_inputs=`IFS=:
19470 for f in $ac_file_in; do
19472 -) echo "$tmp"/stdin ;;
19474 # Absolute (can't be DOS-style, as IFS=:)
19475 test -f "$f" || { { echo "$as_me:19475: error: cannot find input file: $f" >&5
19476 echo "$as_me: error: cannot find input file: $f" >&2;}
19477 { (exit 1); exit 1; }; }
19480 if test -f "$f"; then
19483 elif test -f "$srcdir/$f"; then
19488 { { echo "$as_me:19488: error: cannot find input file: $f" >&5
19489 echo "$as_me: error: cannot find input file: $f" >&2;}
19490 { (exit 1); exit 1; }; }
19493 done` || { (exit 1); exit 1; }
19494 # Remove the trailing spaces.
19495 sed 's/[ ]*$//' $ac_file_inputs >"$tmp"/in
19499 # Transform confdefs.h into a list of #define's. We won't use it as a sed
19500 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
19501 # be either 'cat' or 'sort'.
19502 cat confdefs.h | uniq >conftest.vals
19504 # Break up conftest.vals because some shells have a limit on
19505 # the size of here documents, and old seds have small limits too.
19507 rm -f conftest.tail
19508 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
19509 while grep . conftest.vals >/dev/null
19511 # Write chunks of a limited-size here document to conftest.frag.
19512 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
19513 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
19514 echo 'CEOF' >> "$CONFIG_STATUS"
19515 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
19516 rm -f conftest.vals
19517 mv conftest.tail conftest.vals
19519 rm -f conftest.vals
19521 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19523 echo ' cat >> conftest.edit <<CEOF
19524 /@DEFS@/r conftest.frag
19527 sed -f conftest.edit "$tmp"/in > "$tmp"/out
19529 mv "$tmp"/out "$tmp"/in
19530 rm -f conftest.edit conftest.frag
19531 ' >> "$CONFIG_STATUS"
19533 cat >>"$CONFIG_STATUS" <<\EOF
19534 # Let's still pretend it is `configure' which instantiates (i.e., don't
19535 # use $as_me), people would be surprised to read:
19536 # /* config.h. Generated automatically by config.status. */
19537 if test x"$ac_file" = x-; then
19538 echo "/* Generated automatically by configure. */" >"$tmp"/config.h
19540 echo "/* $ac_file. Generated automatically by configure. */" >"$tmp"/config.h
19542 cat "$tmp"/in >>"$tmp"/config.h
19544 if test x"$ac_file" != x-; then
19545 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
19546 { echo "$as_me:19546: $ac_file is unchanged" >&5
19547 echo "$as_me: $ac_file is unchanged" >&6;}
19549 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19550 X"$ac_file" : 'X\(//\)[^/]' \| \
19551 X"$ac_file" : 'X\(//\)$' \| \
19552 X"$ac_file" : 'X\(/\)' \| \
19553 . : '\(.\)' 2>/dev/null ||
19555 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19556 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19557 /^X\(\/\/\)$/{ s//\1/; q; }
19558 /^X\(\/\).*/{ s//\1/; q; }
19560 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19561 { case "$ac_dir" in
19562 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19566 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19567 case $as_mkdir_dir in
19568 # Skip DOS drivespec
19569 ?:) as_incr_dir=$as_mkdir_dir ;;
19571 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19572 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19579 mv "$tmp/config.h" "$ac_file"
19582 cat "$tmp"/config.h
19583 rm -f "$tmp"/config.h
19587 cat >>"$CONFIG_STATUS" <<\EOF
19589 # CONFIG_COMMANDS section.
19591 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19592 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19593 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19597 $AWK -v PACKAGE=$PACKAGE -f $srcdir/mk-pkg.awk </dev/null >> Makefile
19598 if test -z "$USE_OLD_MAKERULES" ; then
19599 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
19606 cat >>"$CONFIG_STATUS" <<\EOF
19608 { (exit 0); exit 0; }
19610 chmod +x "$CONFIG_STATUS"
19611 ac_clean_files=$ac_clean_files_save
19613 # configure is writing to config.log, and then calls config.status.
19614 # config.status does its own redirection, appending to config.log.
19615 # Unfortunately, on DOS this fails, as config.log is still kept open
19616 # by configure, so config.status won't be able to write to it; its
19617 # output is simply discarded. So we exec the FD to /dev/null,
19618 # effectively closing config.log, so it can be properly (re)opened and
19619 # appended to by config.status. When coming back to configure, we
19620 # need to make the FD available again.
19621 if test "$no_create" != yes; then
19624 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
19626 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19627 # would make configure fail if this is the last instruction.
19628 "$ac_cs_success" || { (exit 1); exit 1; }
19630 ${MAKE:-make} preinstall