2 # From configure.in Revision: 1.83 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20210509.
6 # Copyright 2003-2020,2021 Thomas E. Dickey
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
12 # Avoid depending upon Character Ranges.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
36 if expr a : '\(a\)' >/dev/null 2>&1; then
42 rm -f conf$$ conf$$.exe conf$$.file
44 if ln -s conf$$.file conf$$ 2>/dev/null; then
45 # We could just check for DJGPP; but this test a) works b) is more generic
46 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47 if test -f conf$$.exe; then
48 # Don't use ln at all; we don't have any links
53 elif ln conf$$.file conf$$ 2>/dev/null; then
58 rm -f conf$$ conf$$.exe conf$$.file
60 as_executable_p="test -f"
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
70 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
80 # We need space, tab and new line, in precisely that order.
86 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
89 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90 # so uname gets run too.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
98 ac_default_prefix=/usr/local
103 SHELL=${CONFIG_SHELL-/bin/sh}
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete. It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : "${ac_max_here_lines=38}"
110 ac_unique_file="gen/gen.c"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
115 # include <sys/types.h>
118 # include <sys/stat.h>
129 # if !STDC_HEADERS && HAVE_MEMORY_H
135 # include <strings.h>
138 # include <inttypes.h>
148 # Initialize some variables set by options.
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
160 program_transform_name=s,x,x,
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
188 # Identity of this package.
198 # If the previous option needs an argument, assign it.
199 if test -n "$ac_prev"; then
200 eval "$ac_prev=\$ac_option"
205 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
207 # Accept the important Cygnus configure options, so we can diagnose typos.
211 -bindir | --bindir | --bindi | --bind | --bin | --bi)
213 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
216 -build | --build | --buil | --bui | --bu)
217 ac_prev=build_alias ;;
218 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219 build_alias=$ac_optarg ;;
221 -cache-file | --cache-file | --cache-fil | --cache-fi \
222 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223 ac_prev=cache_file ;;
224 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226 cache_file=$ac_optarg ;;
229 cache_file=config.cache ;;
231 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
233 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
235 datadir=$ac_optarg ;;
237 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238 | --dataroo | --dataro | --datar)
239 ac_prev=datarootdir ;;
240 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242 datarootdir=$ac_optarg ;;
244 -disable-* | --disable-*)
245 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246 # Reject names that are not valid shell variable names.
247 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249 { (exit 1); exit 1; }; }
250 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251 eval "enable_$ac_feature=no" ;;
253 -enable-* | --enable-*)
254 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255 # Reject names that are not valid shell variable names.
256 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258 { (exit 1); exit 1; }; }
259 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
261 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
264 eval "enable_$ac_feature='$ac_optarg'" ;;
266 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268 | --exec | --exe | --ex)
269 ac_prev=exec_prefix ;;
270 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272 | --exec=* | --exe=* | --ex=*)
273 exec_prefix=$ac_optarg ;;
275 -gas | --gas | --ga | --g)
276 # Obsolete; use --with-gas.
279 -help | --help | --hel | --he | -h)
281 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282 ac_init_help=recursive ;;
283 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284 ac_init_help=short ;;
286 -host | --host | --hos | --ho)
287 ac_prev=host_alias ;;
288 -host=* | --host=* | --hos=* | --ho=*)
289 host_alias=$ac_optarg ;;
291 -includedir | --includedir | --includedi | --included | --include \
292 | --includ | --inclu | --incl | --inc)
293 ac_prev=includedir ;;
294 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295 | --includ=* | --inclu=* | --incl=* | --inc=*)
296 includedir=$ac_optarg ;;
298 -infodir | --infodir | --infodi | --infod | --info | --inf)
300 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301 infodir=$ac_optarg ;;
303 -libdir | --libdir | --libdi | --libd)
305 -libdir=* | --libdir=* | --libdi=* | --libd=*)
308 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309 | --libexe | --libex | --libe)
310 ac_prev=libexecdir ;;
311 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312 | --libexe=* | --libex=* | --libe=*)
313 libexecdir=$ac_optarg ;;
315 -localstatedir | --localstatedir | --localstatedi | --localstated \
316 | --localstate | --localstat | --localsta | --localst \
317 | --locals | --local | --loca | --loc | --lo)
318 ac_prev=localstatedir ;;
319 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322 localstatedir=$ac_optarg ;;
324 -runstatedir | --runstatedir | --runstatedi | --runstated \
325 | --runstate | --runstat | --runsta | --runst \
326 | --runs | --run | --ru)
327 ac_prev=runstatedir ;;
328 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329 | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330 | --runs=* | --run=* | --ru=*)
331 runstatedir=$ac_optarg ;;
333 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
335 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
339 # Obsolete; use --without-fp.
342 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
346 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
350 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352 | --oldin | --oldi | --old | --ol | --o)
353 ac_prev=oldincludedir ;;
354 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357 oldincludedir=$ac_optarg ;;
359 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
361 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
364 -program-prefix | --program-prefix | --program-prefi | --program-pref \
365 | --program-pre | --program-pr | --program-p)
366 ac_prev=program_prefix ;;
367 -program-prefix=* | --program-prefix=* | --program-prefi=* \
368 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369 program_prefix=$ac_optarg ;;
371 -program-suffix | --program-suffix | --program-suffi | --program-suff \
372 | --program-suf | --program-su | --program-s)
373 ac_prev=program_suffix ;;
374 -program-suffix=* | --program-suffix=* | --program-suffi=* \
375 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376 program_suffix=$ac_optarg ;;
378 -program-transform-name | --program-transform-name \
379 | --program-transform-nam | --program-transform-na \
380 | --program-transform-n | --program-transform- \
381 | --program-transform | --program-transfor \
382 | --program-transfo | --program-transf \
383 | --program-trans | --program-tran \
384 | --progr-tra | --program-tr | --program-t)
385 ac_prev=program_transform_name ;;
386 -program-transform-name=* | --program-transform-name=* \
387 | --program-transform-nam=* | --program-transform-na=* \
388 | --program-transform-n=* | --program-transform-=* \
389 | --program-transform=* | --program-transfor=* \
390 | --program-transfo=* | --program-transf=* \
391 | --program-trans=* | --program-tran=* \
392 | --progr-tra=* | --program-tr=* | --program-t=*)
393 program_transform_name=$ac_optarg ;;
395 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396 | -silent | --silent | --silen | --sile | --sil)
399 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
401 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
403 sbindir=$ac_optarg ;;
405 -sharedstatedir | --sharedstatedir | --sharedstatedi \
406 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407 | --sharedst | --shareds | --shared | --share | --shar \
409 ac_prev=sharedstatedir ;;
410 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
414 sharedstatedir=$ac_optarg ;;
416 -site | --site | --sit)
418 -site=* | --site=* | --sit=*)
421 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
423 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
426 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427 | --syscon | --sysco | --sysc | --sys | --sy)
428 ac_prev=sysconfdir ;;
429 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431 sysconfdir=$ac_optarg ;;
433 -target | --target | --targe | --targ | --tar | --ta | --t)
434 ac_prev=target_alias ;;
435 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436 target_alias=$ac_optarg ;;
438 -v | -verbose | --verbose | --verbos | --verbo | --verb)
441 -version | --version | --versio | --versi | --vers | -V)
445 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446 # Reject names that are not valid shell variable names.
447 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448 { echo "$as_me: error: invalid package name: $ac_package" >&2
449 { (exit 1); exit 1; }; }
450 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
452 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
455 eval "with_$ac_package='$ac_optarg'" ;;
457 -without-* | --without-*)
458 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459 # Reject names that are not valid shell variable names.
460 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461 { echo "$as_me: error: invalid package name: $ac_package" >&2
462 { (exit 1); exit 1; }; }
463 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464 eval "with_$ac_package=no" ;;
467 # Obsolete; use --with-x.
470 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471 | --x-incl | --x-inc | --x-in | --x-i)
472 ac_prev=x_includes ;;
473 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475 x_includes=$ac_optarg ;;
477 -x-libraries | --x-libraries | --x-librarie | --x-librari \
478 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479 ac_prev=x_libraries ;;
480 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482 x_libraries=$ac_optarg ;;
484 -*) { echo "$as_me: error: unrecognized option: $ac_option
485 Try \`$0 --help' for more information." >&2
486 { (exit 1); exit 1; }; }
490 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491 # Reject names that are not valid shell variable names.
492 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494 { (exit 1); exit 1; }; }
495 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496 eval "$ac_envvar='$ac_optarg'"
497 export "$ac_envvar" ;;
500 # FIXME: should be removed in autoconf 3.0.
501 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
504 : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
510 if test -n "$ac_prev"; then
511 ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
512 { echo "$as_me: error: missing argument to $ac_option" >&2
513 { (exit 1); exit 1; }; }
516 # Be sure to have absolute paths.
517 for ac_var in exec_prefix prefix
519 eval ac_val=$`echo "$ac_var"`
521 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523 { (exit 1); exit 1; }; };;
527 # Be sure to have absolute paths.
528 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
529 localstatedir libdir includedir oldincludedir infodir mandir
531 eval ac_val=$`echo "$ac_var"`
533 [\\/$]* | ?:[\\/]* ) ;;
534 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535 { (exit 1); exit 1; }; };;
539 # There might be people who depend on the old broken behavior: `$host'
540 # used to hold the argument of --host etc.
545 # FIXME: should be removed in autoconf 3.0.
546 if test "x$host_alias" != x; then
547 if test "x$build_alias" = x; then
548 cross_compiling=maybe
549 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550 If a cross compiler is detected then cross compile mode will be used." >&2
551 elif test "x$build_alias" != "x$host_alias"; then
557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
559 test "$silent" = yes && exec 6>/dev/null
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563 ac_srcdir_defaulted=yes
564 # Try the directory containing this script, then its parent.
566 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
569 if test ! -r "$srcdir/$ac_unique_file"; then
573 ac_srcdir_defaulted=no
575 if test ! -r "$srcdir/$ac_unique_file"; then
576 if test "$ac_srcdir_defaulted" = yes; then
577 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578 { (exit 1); exit 1; }; }
580 { echo "$as_me: error: cannot find sources in $srcdir" >&2
581 { (exit 1); exit 1; }; }
584 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585 ac_env_build_alias_set=${build_alias+set}
586 ac_env_build_alias_value=$build_alias
587 ac_cv_env_build_alias_set=${build_alias+set}
588 ac_cv_env_build_alias_value=$build_alias
589 ac_env_host_alias_set=${host_alias+set}
590 ac_env_host_alias_value=$host_alias
591 ac_cv_env_host_alias_set=${host_alias+set}
592 ac_cv_env_host_alias_value=$host_alias
593 ac_env_target_alias_set=${target_alias+set}
594 ac_env_target_alias_value=$target_alias
595 ac_cv_env_target_alias_set=${target_alias+set}
596 ac_cv_env_target_alias_value=$target_alias
597 ac_env_CC_set=${CC+set}
599 ac_cv_env_CC_set=${CC+set}
600 ac_cv_env_CC_value=$CC
601 ac_env_CFLAGS_set=${CFLAGS+set}
602 ac_env_CFLAGS_value=$CFLAGS
603 ac_cv_env_CFLAGS_set=${CFLAGS+set}
604 ac_cv_env_CFLAGS_value=$CFLAGS
605 ac_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_env_LDFLAGS_value=$LDFLAGS
607 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608 ac_cv_env_LDFLAGS_value=$LDFLAGS
609 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_env_CPPFLAGS_value=$CPPFLAGS
611 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613 ac_env_CPP_set=${CPP+set}
614 ac_env_CPP_value=$CPP
615 ac_cv_env_CPP_set=${CPP+set}
616 ac_cv_env_CPP_value=$CPP
619 # Report the --help message.
621 if test "$ac_init_help" = "long"; then
622 # Omit some internal or obsolete options to make the list less imposing.
623 # This message is too long to be a string in the A/UX 3.1 sh.
625 \`configure' configures this package to adapt to many kinds of systems.
627 Usage: $0 [OPTION]... [VAR=VALUE]...
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE. See below for descriptions of some of the useful variables.
632 Defaults for the options are specified in brackets.
635 -h, --help display this help and exit
636 --help=short display options specific to this package
637 --help=recursive display the short help of all the included packages
638 -V, --version display version information and exit
639 -q, --quiet, --silent do not print \`checking...' messages
640 --cache-file=FILE cache test results in FILE [disabled]
641 -C, --config-cache alias for \`--cache-file=config.cache'
642 -n, --no-create do not create output files
643 --srcdir=DIR find the sources in DIR [configure dir or \`..']
648 Installation directories:
649 --prefix=PREFIX install architecture-independent files in PREFIX
651 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
659 For better control, use the options below.
661 Fine tuning of the installation directories:
662 --bindir=DIR user executables [EPREFIX/bin]
663 --sbindir=DIR system admin executables [EPREFIX/sbin]
664 --libexecdir=DIR program executables [EPREFIX/libexec]
665 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
666 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
667 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
668 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
669 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
670 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
671 --libdir=DIR object code libraries [EPREFIX/lib]
672 --includedir=DIR C header files [PREFIX/include]
673 --oldincludedir=DIR C header files for non-gcc [/usr/include]
674 --infodir=DIR info documentation [DATAROOTDIR/info]
675 --mandir=DIR man documentation [DATAROOTDIR/man]
681 --program-prefix=PREFIX prepend PREFIX to installed program names
682 --program-suffix=SUFFIX append SUFFIX to installed program names
683 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
686 --build=BUILD configure for building on BUILD [guessed]
687 --host=HOST build programs to run on HOST [BUILD]
688 --target=TARGET configure for building compilers for TARGET [HOST]
692 if test -n "$ac_init_help"; then
697 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
698 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
701 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
702 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
705 --with-system-type=XXX test: override derived host system-type
706 --disable-stripping do not strip (debug info) installed executables
707 --with-pkg-config{=path} enable/disable use of pkg-config
708 --with-pkg-config-libdir=XXX use given directory for installing pc-files
709 --without-tests suppress build with test-programs
710 --enable-mixed-case tic should assume mixed-case filenames
711 --with-install-prefix prefixes actual install-location ($DESTDIR)
712 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
713 --with-build-cc=XXX the build C compiler ($BUILD_CC)
714 --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
715 --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
716 --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
717 --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
718 --with-build-libs=XXX the build libraries (${BUILD_LIBS})
719 Options to Specify the Libraries Built/Used:
720 --with-shared generate shared C-objects (needed for --with-ada-sharedlib)
721 --with-curses-dir=DIR directory in which (n)curses is installed
722 --enable-widec compile with wide-char/UTF-8 code
723 --with-lib-prefix override library-prefix
724 --with-shlib-version=X Specify rel or abi version for shared libs
725 --enable-rpath-link link sample programs with rpath option
726 Fine-Tuning Your Configuration:
727 --enable-broken_linker compile with broken-linker support code
728 --disable-largefile omit support for large files
729 --with-rcs-ids compile-in RCS identifiers
731 --disable-ext-funcs disable function-extensions
732 --enable-const compile with extra/non-standard const
734 --without-develop disable development options
736 --with-pthread use POSIX thread library
737 --enable-weak-symbols enable weak-symbols for pthreads
738 --enable-reentrant compile with experimental reentrant code
739 --with-wrap-prefix=XXX override prefix used for public variables
740 Testing/development Options:
741 --disable-echo do not display "compiling" commands
742 --enable-warnings test: turn on gcc compiler warnings
743 --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics
744 --enable-assertions test: turn on generation of assertion code
745 --enable-expanded test: generate functions for certain macros
746 --disable-macros test: use functions rather than macros
747 --with-trace test: add trace() function to all models of ncurses
748 --disable-gnat-projects test: disable GNAT projects even if usable
749 Ada95 Binding Options:
750 --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
751 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
752 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
753 --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
754 --with-ada-libname=XXX override default Ada library-name
756 Some influential environment variables:
757 CC C compiler command
758 CFLAGS C compiler flags
759 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
760 nonstandard directory <lib dir>
761 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
762 headers in a nonstandard directory <include dir>
765 Use these variables to override the choices made by `configure' or to help
766 it to find libraries and programs with nonstandard names/locations.
771 if test "$ac_init_help" = "recursive"; then
772 # If there are subdirs, report their specific --help.
774 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
776 # A "../" for each directory in /$ac_subdir.
777 ac_dots=`echo "$ac_subdir" |
778 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
781 .) # No --srcdir option. We are building in place.
782 ac_sub_srcdir="$srcdir" ;;
783 [\\/]* | ?:[\\/]* ) # Absolute path.
784 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
786 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
789 # Check for guested configure; otherwise get Cygnus style configure.
790 if test -f "$ac_sub_srcdir/configure.gnu"; then
792 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
793 elif test -f "$ac_sub_srcdir/configure"; then
795 $SHELL "$ac_sub_srcdir/configure" --help=recursive
796 elif test -f "$ac_sub_srcdir/configure.ac" ||
797 test -f "$ac_sub_srcdir/configure.in"; then
799 "$ac_configure" --help
801 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
807 test -n "$ac_init_help" && exit 0
808 if "$ac_init_version"; then
811 Copyright 2003-2020,2021 Thomas E. Dickey
812 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
813 Free Software Foundation, Inc.
814 This configure script is free software; the Free Software Foundation
815 gives unlimited permission to copy, distribute and modify it.
821 This file contains any messages produced by compilers while
822 running configure, to aid debugging if configure makes a mistake.
824 It was created by $as_me, which was
825 generated by GNU Autoconf 2.52.20210509. Invocation command line was
836 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
837 uname -m = `(uname -m) 2>/dev/null || echo unknown`
838 uname -r = `(uname -r) 2>/dev/null || echo unknown`
839 uname -s = `(uname -s) 2>/dev/null || echo unknown`
840 uname -v = `(uname -v) 2>/dev/null || echo unknown`
842 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
843 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
845 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
846 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
847 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
848 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
849 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
850 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
851 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
865 # Keep a trace of the command line.
866 # Strip out --no-create and --no-recursion so they do not pile up.
867 # Also quote any args containing shell meta-characters.
873 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
874 | --no-cr | --no-c) ;;
875 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
876 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
877 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
878 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
879 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
881 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
884 # Get rid of the leading space.
887 # When interrupted or exit'd, cleanup temporary files, and complete
888 # config.log. We remove comments because anyway the quotes in there
889 # would cause problems or look ugly.
891 # Save into config.log some information that might help in debugging.
893 echo "## ----------------- ##" >&5
894 echo "## Cache variables. ##" >&5
895 echo "## ----------------- ##" >&5
897 # The following way of writing the cache mishandles newlines in values,
900 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
903 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
904 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
908 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
912 sed "/^$/d" confdefs.h >conftest.log
913 if test -s conftest.log; then
915 echo "## ------------ ##" >&5
916 echo "## confdefs.h. ##" >&5
917 echo "## ------------ ##" >&5
922 test "$ac_signal" != 0 &&
923 echo "$as_me: caught signal $ac_signal" >&5
924 echo "$as_me: exit $exit_status" >&5
925 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
928 for ac_signal in 1 2 13 15; do
929 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
933 # confdefs.h avoids OS command line length limits that DEFS can exceed.
934 rm -rf conftest* confdefs.h
935 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
938 # Let the site file select an alternate cache file if it wants to.
939 # Prefer explicitly selected file to automatically selected ones.
940 if test -z "$CONFIG_SITE"; then
941 if test "x$prefix" != xNONE; then
942 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
944 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
947 for ac_site_file in $CONFIG_SITE; do
948 if test -r "$ac_site_file"; then
949 { echo "$as_me:949: loading site script $ac_site_file" >&5
950 echo "$as_me: loading site script $ac_site_file" >&6;}
951 cat "$ac_site_file" >&5
956 if test -r "$cache_file"; then
957 # Some versions of bash will fail to source /dev/null (special
958 # files actually), so we avoid doing that.
959 if test -f "$cache_file"; then
960 { echo "$as_me:960: loading cache $cache_file" >&5
961 echo "$as_me: loading cache $cache_file" >&6;}
963 [\\/]* | ?:[\\/]* ) . $cache_file;;
968 { echo "$as_me:968: creating cache $cache_file" >&5
969 echo "$as_me: creating cache $cache_file" >&6;}
973 # Check that the precious variables saved in the cache have kept the same
975 ac_cache_corrupted=false
976 for ac_var in `(set) 2>&1 |
977 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
978 eval ac_old_set=\$ac_cv_env_${ac_var}_set
979 eval ac_new_set=\$ac_env_${ac_var}_set
980 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
981 eval ac_new_val="\$ac_env_${ac_var}_value"
982 case "$ac_old_set,$ac_new_set" in
984 { echo "$as_me:984: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
985 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
986 ac_cache_corrupted=: ;;
988 { echo "$as_me:988: error: \`$ac_var' was not set in the previous run" >&5
989 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
990 ac_cache_corrupted=: ;;
993 if test "x$ac_old_val" != "x$ac_new_val"; then
994 { echo "$as_me:994: error: \`$ac_var' has changed since the previous run:" >&5
995 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
996 { echo "$as_me:996: former value: $ac_old_val" >&5
997 echo "$as_me: former value: $ac_old_val" >&2;}
998 { echo "$as_me:998: current value: $ac_new_val" >&5
999 echo "$as_me: current value: $ac_new_val" >&2;}
1000 ac_cache_corrupted=:
1003 # Pass precious variables to config.status. It doesn't matter if
1004 # we pass some twice (in addition to the command line arguments).
1005 if test "$ac_new_set" = set; then
1006 case "$ac_new_val" in
1007 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1008 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1009 ac_configure_args="$ac_configure_args '$ac_arg'"
1011 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1016 if "$ac_cache_corrupted"; then
1017 { echo "$as_me:1017: error: changes in the environment can compromise the build" >&5
1018 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1019 { { echo "$as_me:1019: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1020 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1021 { (exit 1); exit 1; }; }
1025 ac_cpp='$CPP $CPPFLAGS'
1026 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1027 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1028 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1029 ac_main_return="return"
1031 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1033 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1045 echo "#! $SHELL" >conftest.sh
1046 echo "exit 0" >>conftest.sh
1047 chmod +x conftest.sh
1048 if { (echo "$as_me:1048: PATH=\".;.\"; conftest.sh") >&5
1049 (PATH=".;."; conftest.sh) 2>&5
1051 echo "$as_me:1051: \$? = $ac_status" >&5
1052 (exit "$ac_status"); }; then
1053 ac_path_separator=';'
1057 PATH_SEPARATOR="$ac_path_separator"
1060 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1065 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1066 if test -f "$ac_dir/install-sh"; then
1068 ac_install_sh="$ac_aux_dir/install-sh -c"
1070 elif test -f "$ac_dir/install.sh"; then
1072 ac_install_sh="$ac_aux_dir/install.sh -c"
1074 elif test -f "$ac_dir/shtool"; then
1076 ac_install_sh="$ac_aux_dir/shtool install -c"
1080 if test -z "$ac_aux_dir"; then
1081 { { echo "$as_me:1081: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1082 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1083 { (exit 1); exit 1; }; }
1085 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1086 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1087 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1089 # Make sure we can run config.sub.
1090 $ac_config_sub sun4 >/dev/null 2>&1 ||
1091 { { echo "$as_me:1091: error: cannot run $ac_config_sub" >&5
1092 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1093 { (exit 1); exit 1; }; }
1095 echo "$as_me:1095: checking build system type" >&5
1096 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1097 if test "${ac_cv_build+set}" = set; then
1098 echo $ECHO_N "(cached) $ECHO_C" >&6
1100 ac_cv_build_alias=$build_alias
1101 test -z "$ac_cv_build_alias" &&
1102 ac_cv_build_alias=`$ac_config_guess`
1103 test -z "$ac_cv_build_alias" &&
1104 { { echo "$as_me:1104: error: cannot guess build type; you must specify one" >&5
1105 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1106 { (exit 1); exit 1; }; }
1107 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1108 { { echo "$as_me:1108: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1109 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1110 { (exit 1); exit 1; }; }
1113 echo "$as_me:1113: result: $ac_cv_build" >&5
1114 echo "${ECHO_T}$ac_cv_build" >&6
1116 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1117 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1118 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1120 echo "$as_me:1120: checking host system type" >&5
1121 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1122 if test "${ac_cv_host+set}" = set; then
1123 echo $ECHO_N "(cached) $ECHO_C" >&6
1125 ac_cv_host_alias=$host_alias
1126 test -z "$ac_cv_host_alias" &&
1127 ac_cv_host_alias=$ac_cv_build_alias
1128 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1129 { { echo "$as_me:1129: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1130 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1131 { (exit 1); exit 1; }; }
1134 echo "$as_me:1134: result: $ac_cv_host" >&5
1135 echo "${ECHO_T}$ac_cv_host" >&6
1137 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1138 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1139 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1141 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1142 echo "$as_me:1142: checking target system type" >&5
1143 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1144 if test "${ac_cv_target+set}" = set; then
1145 echo $ECHO_N "(cached) $ECHO_C" >&6
1147 ac_cv_target_alias=$target_alias
1148 test "x$ac_cv_target_alias" = "x" &&
1149 ac_cv_target_alias=$ac_cv_host_alias
1150 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1151 { { echo "$as_me:1151: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1152 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1153 { (exit 1); exit 1; }; }
1156 echo "$as_me:1156: result: $ac_cv_target" >&5
1157 echo "${ECHO_T}$ac_cv_target" >&6
1158 target=$ac_cv_target
1159 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1160 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1161 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1163 # The aliases save the names the user supplied, while $host etc.
1164 # will get canonicalized.
1165 test -n "$target_alias" &&
1166 test "$program_prefix$program_suffix$program_transform_name" = \
1168 program_prefix=${target_alias}-
1169 system_name="$host_os"
1171 system_name="`(uname -s -r) 2>/dev/null`"
1172 if test -z "$system_name" ; then
1173 system_name="`(hostname) 2>/dev/null`"
1176 test -n "$system_name" &&
1177 cat >>confdefs.h <<EOF
1178 #define SYSTEM_NAME "$system_name"
1181 if test "${cf_cv_system_name+set}" = set; then
1182 echo $ECHO_N "(cached) $ECHO_C" >&6
1184 cf_cv_system_name="$system_name"
1187 test -z "$system_name" && system_name="$cf_cv_system_name"
1188 test -n "$cf_cv_system_name" && echo "$as_me:1188: result: Configuring for $cf_cv_system_name" >&5
1189 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1191 if test ".$system_name" != ".$cf_cv_system_name" ; then
1192 echo "$as_me:1192: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1193 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1194 { { echo "$as_me:1194: error: \"Please remove config.cache and try again.\"" >&5
1195 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1196 { (exit 1); exit 1; }; }
1199 # Check whether --with-system-type or --without-system-type was given.
1200 if test "${with_system_type+set}" = set; then
1201 withval="$with_system_type"
1202 { echo "$as_me:1202: WARNING: overriding system type to $withval" >&5
1203 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1204 cf_cv_system_name=$withval
1209 ### Save the given $CFLAGS to allow user-override.
1210 cf_user_CFLAGS="$CFLAGS"
1212 ### Default install-location
1213 for ac_prog in ggrep grep
1215 # Extract the first word of "$ac_prog", so it can be a program name with args.
1216 set dummy $ac_prog; ac_word=$2
1217 echo "$as_me:1217: checking for $ac_word" >&5
1218 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1219 if test "${ac_cv_prog_GREP+set}" = set; then
1220 echo $ECHO_N "(cached) $ECHO_C" >&6
1222 if test -n "$GREP"; then
1223 ac_cv_prog_GREP="$GREP" # Let the user override the test.
1225 ac_save_IFS=$IFS; IFS=$ac_path_separator
1227 for ac_dir in $ac_dummy; do
1229 test -z "$ac_dir" && ac_dir=.
1230 $as_executable_p "$ac_dir/$ac_word" || continue
1231 ac_cv_prog_GREP="$ac_prog"
1232 echo "$as_me:1232: found $ac_dir/$ac_word" >&5
1238 GREP=$ac_cv_prog_GREP
1239 if test -n "$GREP"; then
1240 echo "$as_me:1240: result: $GREP" >&5
1241 echo "${ECHO_T}$GREP" >&6
1243 echo "$as_me:1243: result: no" >&5
1244 echo "${ECHO_T}no" >&6
1247 test -n "$GREP" && break
1249 test -n "$GREP" || GREP=": "
1251 echo "$as_me:1251: checking for fgrep" >&5
1252 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1253 if test "${ac_cv_path_FGREP+set}" = set; then
1254 echo $ECHO_N "(cached) $ECHO_C" >&6
1256 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1257 then ac_cv_path_FGREP="$GREP -F"
1259 for ac_prog in gfgrep fgrep
1261 # Extract the first word of "$ac_prog", so it can be a program name with args.
1262 set dummy $ac_prog; ac_word=$2
1263 echo "$as_me:1263: checking for $ac_word" >&5
1264 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1265 if test "${ac_cv_path_FGREP+set}" = set; then
1266 echo $ECHO_N "(cached) $ECHO_C" >&6
1270 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1273 ac_save_IFS=$IFS; IFS=$ac_path_separator
1275 for ac_dir in $ac_dummy; do
1277 test -z "$ac_dir" && ac_dir=.
1278 if $as_executable_p "$ac_dir/$ac_word"; then
1279 ac_cv_path_FGREP="$ac_dir/$ac_word"
1280 echo "$as_me:1280: found $ac_dir/$ac_word" >&5
1288 FGREP=$ac_cv_path_FGREP
1290 if test -n "$FGREP"; then
1291 echo "$as_me:1291: result: $FGREP" >&5
1292 echo "${ECHO_T}$FGREP" >&6
1294 echo "$as_me:1294: result: no" >&5
1295 echo "${ECHO_T}no" >&6
1298 test -n "$FGREP" && break
1300 test -n "$FGREP" || FGREP=": "
1302 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1302: error: cannot find workable fgrep" >&5
1303 echo "$as_me: error: cannot find workable fgrep" >&2;}
1304 { (exit 1); exit 1; }; }
1307 echo "$as_me:1307: result: $ac_cv_path_FGREP" >&5
1308 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1309 FGREP="$ac_cv_path_FGREP"
1311 echo "$as_me:1311: checking for prefix" >&5
1312 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1313 if test "x$prefix" = "xNONE" ; then
1314 case "$cf_cv_system_name" in
1315 # non-vendor systems don't have a conflict
1316 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1319 (*) prefix=$ac_default_prefix
1323 echo "$as_me:1323: result: $prefix" >&5
1324 echo "${ECHO_T}$prefix" >&6
1326 if test "x$prefix" = "xNONE" ; then
1327 echo "$as_me:1327: checking for default include-directory" >&5
1328 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1329 test -n "$verbose" && echo 1>&6
1332 "$includedir/ncurses" \
1334 "$prefix/include/ncurses" \
1335 /usr/local/include \
1336 /usr/local/include/ncurses \
1338 /usr/include/ncurses
1340 cf_dir=`eval echo "$cf_symbol"`
1341 if test -f "$cf_dir/curses.h" ; then
1342 if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1343 includedir="$cf_symbol"
1344 test -n "$verbose" && echo $ECHO_N " found " 1>&6
1348 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1350 echo "$as_me:1350: result: $includedir" >&5
1351 echo "${ECHO_T}$includedir" >&6
1354 ### Checks for programs.
1357 ac_cpp='$CPP $CPPFLAGS'
1358 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1359 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1360 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1361 ac_main_return="return"
1362 if test -n "$ac_tool_prefix"; then
1363 for ac_prog in gnatgcc gcc cc
1365 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1366 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1367 echo "$as_me:1367: checking for $ac_word" >&5
1368 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1369 if test "${ac_cv_prog_CC+set}" = set; then
1370 echo $ECHO_N "(cached) $ECHO_C" >&6
1372 if test -n "$CC"; then
1373 ac_cv_prog_CC="$CC" # Let the user override the test.
1375 ac_save_IFS=$IFS; IFS=$ac_path_separator
1377 for ac_dir in $ac_dummy; do
1379 test -z "$ac_dir" && ac_dir=.
1380 $as_executable_p "$ac_dir/$ac_word" || continue
1381 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1382 echo "$as_me:1382: found $ac_dir/$ac_word" >&5
1389 if test -n "$CC"; then
1390 echo "$as_me:1390: result: $CC" >&5
1391 echo "${ECHO_T}$CC" >&6
1393 echo "$as_me:1393: result: no" >&5
1394 echo "${ECHO_T}no" >&6
1397 test -n "$CC" && break
1400 if test -z "$CC"; then
1402 for ac_prog in gnatgcc gcc cc
1404 # Extract the first word of "$ac_prog", so it can be a program name with args.
1405 set dummy $ac_prog; ac_word=$2
1406 echo "$as_me:1406: checking for $ac_word" >&5
1407 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1408 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1409 echo $ECHO_N "(cached) $ECHO_C" >&6
1411 if test -n "$ac_ct_CC"; then
1412 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1414 ac_save_IFS=$IFS; IFS=$ac_path_separator
1416 for ac_dir in $ac_dummy; do
1418 test -z "$ac_dir" && ac_dir=.
1419 $as_executable_p "$ac_dir/$ac_word" || continue
1420 ac_cv_prog_ac_ct_CC="$ac_prog"
1421 echo "$as_me:1421: found $ac_dir/$ac_word" >&5
1427 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1428 if test -n "$ac_ct_CC"; then
1429 echo "$as_me:1429: result: $ac_ct_CC" >&5
1430 echo "${ECHO_T}$ac_ct_CC" >&6
1432 echo "$as_me:1432: result: no" >&5
1433 echo "${ECHO_T}no" >&6
1436 test -n "$ac_ct_CC" && break
1442 test -z "$CC" && { { echo "$as_me:1442: error: no acceptable cc found in \$PATH" >&5
1443 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1444 { (exit 1); exit 1; }; }
1446 # Provide some information about the compiler.
1447 echo "$as_me:1447:" \
1448 "checking for C compiler version" >&5
1449 ac_compiler=`set X $ac_compile; echo "$2"`
1450 { (eval echo "$as_me:1450: \"$ac_compiler --version </dev/null >&5\"") >&5
1451 (eval $ac_compiler --version </dev/null >&5) 2>&5
1453 echo "$as_me:1453: \$? = $ac_status" >&5
1454 (exit "$ac_status"); }
1455 { (eval echo "$as_me:1455: \"$ac_compiler -v </dev/null >&5\"") >&5
1456 (eval $ac_compiler -v </dev/null >&5) 2>&5
1458 echo "$as_me:1458: \$? = $ac_status" >&5
1459 (exit "$ac_status"); }
1460 { (eval echo "$as_me:1460: \"$ac_compiler -V </dev/null >&5\"") >&5
1461 (eval $ac_compiler -V </dev/null >&5) 2>&5
1463 echo "$as_me:1463: \$? = $ac_status" >&5
1464 (exit "$ac_status"); }
1466 cat >"conftest.$ac_ext" <<_ACEOF
1467 #line 1467 "configure"
1468 #include "confdefs.h"
1478 ac_clean_files_save=$ac_clean_files
1479 ac_clean_files="$ac_clean_files a.out a.exe"
1480 # Try to create an executable without -o first, disregard a.out.
1481 # It will help us diagnose broken compilers, and finding out an intuition
1483 echo "$as_me:1483: checking for C compiler default output" >&5
1484 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1485 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1486 if { (eval echo "$as_me:1486: \"$ac_link_default\"") >&5
1487 (eval $ac_link_default) 2>&5
1489 echo "$as_me:1489: \$? = $ac_status" >&5
1490 (exit "$ac_status"); }; then
1491 # Find the output, starting from the most likely. This scheme is
1492 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1494 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1495 ls a.out conftest 2>/dev/null;
1496 ls a.* conftest.* 2>/dev/null`; do
1498 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1499 a.out ) # We found the default executable, but exeext='' is most
1502 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1503 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1510 echo "$as_me: failed program was:" >&5
1511 cat "conftest.$ac_ext" >&5
1512 { { echo "$as_me:1512: error: C compiler cannot create executables" >&5
1513 echo "$as_me: error: C compiler cannot create executables" >&2;}
1514 { (exit 77); exit 77; }; }
1517 ac_exeext=$ac_cv_exeext
1518 echo "$as_me:1518: result: $ac_file" >&5
1519 echo "${ECHO_T}$ac_file" >&6
1521 # Check the compiler produces executables we can run. If not, either
1522 # the compiler is broken, or we cross compile.
1523 echo "$as_me:1523: checking whether the C compiler works" >&5
1524 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1525 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1526 # If not cross compiling, check that we can run a simple program.
1527 if test "$cross_compiling" != yes; then
1528 if { ac_try='./$ac_file'
1529 { (eval echo "$as_me:1529: \"$ac_try\"") >&5
1532 echo "$as_me:1532: \$? = $ac_status" >&5
1533 (exit "$ac_status"); }; }; then
1536 if test "$cross_compiling" = maybe; then
1539 { { echo "$as_me:1539: error: cannot run C compiled programs.
1540 If you meant to cross compile, use \`--host'." >&5
1541 echo "$as_me: error: cannot run C compiled programs.
1542 If you meant to cross compile, use \`--host'." >&2;}
1543 { (exit 1); exit 1; }; }
1547 echo "$as_me:1547: result: yes" >&5
1548 echo "${ECHO_T}yes" >&6
1550 rm -f a.out a.exe "conftest$ac_cv_exeext"
1551 ac_clean_files=$ac_clean_files_save
1552 # Check the compiler produces executables we can run. If not, either
1553 # the compiler is broken, or we cross compile.
1554 echo "$as_me:1554: checking whether we are cross compiling" >&5
1555 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1556 echo "$as_me:1556: result: $cross_compiling" >&5
1557 echo "${ECHO_T}$cross_compiling" >&6
1559 echo "$as_me:1559: checking for executable suffix" >&5
1560 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1561 if { (eval echo "$as_me:1561: \"$ac_link\"") >&5
1562 (eval $ac_link) 2>&5
1564 echo "$as_me:1564: \$? = $ac_status" >&5
1565 (exit "$ac_status"); }; then
1566 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1567 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1568 # work properly (i.e., refer to `conftest.exe'), while it won't with
1570 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1572 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1573 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1580 { { echo "$as_me:1580: error: cannot compute EXEEXT: cannot compile and link" >&5
1581 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1582 { (exit 1); exit 1; }; }
1585 rm -f "conftest$ac_cv_exeext"
1586 echo "$as_me:1586: result: $ac_cv_exeext" >&5
1587 echo "${ECHO_T}$ac_cv_exeext" >&6
1589 rm -f "conftest.$ac_ext"
1590 EXEEXT=$ac_cv_exeext
1592 echo "$as_me:1592: checking for object suffix" >&5
1593 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1594 if test "${ac_cv_objext+set}" = set; then
1595 echo $ECHO_N "(cached) $ECHO_C" >&6
1597 cat >"conftest.$ac_ext" <<_ACEOF
1598 #line 1598 "configure"
1599 #include "confdefs.h"
1609 rm -f conftest.o conftest.obj
1610 if { (eval echo "$as_me:1610: \"$ac_compile\"") >&5
1611 (eval $ac_compile) 2>&5
1613 echo "$as_me:1613: \$? = $ac_status" >&5
1614 (exit "$ac_status"); }; then
1615 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1617 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1618 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1623 echo "$as_me: failed program was:" >&5
1624 cat "conftest.$ac_ext" >&5
1625 { { echo "$as_me:1625: error: cannot compute OBJEXT: cannot compile" >&5
1626 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1627 { (exit 1); exit 1; }; }
1630 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1632 echo "$as_me:1632: result: $ac_cv_objext" >&5
1633 echo "${ECHO_T}$ac_cv_objext" >&6
1634 OBJEXT=$ac_cv_objext
1636 echo "$as_me:1636: checking whether we are using the GNU C compiler" >&5
1637 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1638 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1639 echo $ECHO_N "(cached) $ECHO_C" >&6
1641 cat >"conftest.$ac_ext" <<_ACEOF
1642 #line 1642 "configure"
1643 #include "confdefs.h"
1656 rm -f "conftest.$ac_objext"
1657 if { (eval echo "$as_me:1657: \"$ac_compile\"") >&5
1658 (eval $ac_compile) 2>&5
1660 echo "$as_me:1660: \$? = $ac_status" >&5
1661 (exit "$ac_status"); } &&
1662 { ac_try='test -s "conftest.$ac_objext"'
1663 { (eval echo "$as_me:1663: \"$ac_try\"") >&5
1666 echo "$as_me:1666: \$? = $ac_status" >&5
1667 (exit "$ac_status"); }; }; then
1670 echo "$as_me: failed program was:" >&5
1671 cat "conftest.$ac_ext" >&5
1674 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1675 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1678 echo "$as_me:1678: result: $ac_cv_c_compiler_gnu" >&5
1679 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1680 GCC=`test $ac_compiler_gnu = yes && echo yes`
1681 ac_test_CFLAGS=${CFLAGS+set}
1682 ac_save_CFLAGS=$CFLAGS
1684 echo "$as_me:1684: checking whether $CC accepts -g" >&5
1685 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1686 if test "${ac_cv_prog_cc_g+set}" = set; then
1687 echo $ECHO_N "(cached) $ECHO_C" >&6
1689 cat >"conftest.$ac_ext" <<_ACEOF
1690 #line 1690 "configure"
1691 #include "confdefs.h"
1701 rm -f "conftest.$ac_objext"
1702 if { (eval echo "$as_me:1702: \"$ac_compile\"") >&5
1703 (eval $ac_compile) 2>&5
1705 echo "$as_me:1705: \$? = $ac_status" >&5
1706 (exit "$ac_status"); } &&
1707 { ac_try='test -s "conftest.$ac_objext"'
1708 { (eval echo "$as_me:1708: \"$ac_try\"") >&5
1711 echo "$as_me:1711: \$? = $ac_status" >&5
1712 (exit "$ac_status"); }; }; then
1715 echo "$as_me: failed program was:" >&5
1716 cat "conftest.$ac_ext" >&5
1719 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1721 echo "$as_me:1721: result: $ac_cv_prog_cc_g" >&5
1722 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1723 if test "$ac_test_CFLAGS" = set; then
1724 CFLAGS=$ac_save_CFLAGS
1725 elif test $ac_cv_prog_cc_g = yes; then
1726 if test "$GCC" = yes; then
1732 if test "$GCC" = yes; then
1738 # Some people use a C++ compiler to compile C. Since we use `exit',
1739 # in C++ we need to declare it. In case someone uses the same compiler
1740 # for both compiling C and C++ we need to have the C++ compiler decide
1741 # the declaration of exit, since it's the most demanding environment.
1742 cat >"conftest.$ac_ext" <<_ACEOF
1747 rm -f "conftest.$ac_objext"
1748 if { (eval echo "$as_me:1748: \"$ac_compile\"") >&5
1749 (eval $ac_compile) 2>&5
1751 echo "$as_me:1751: \$? = $ac_status" >&5
1752 (exit "$ac_status"); } &&
1753 { ac_try='test -s "conftest.$ac_objext"'
1754 { (eval echo "$as_me:1754: \"$ac_try\"") >&5
1757 echo "$as_me:1757: \$? = $ac_status" >&5
1758 (exit "$ac_status"); }; }; then
1759 for ac_declaration in \
1761 '#include <stdlib.h>' \
1762 'extern "C" void std::exit (int) throw (); using std::exit;' \
1763 'extern "C" void std::exit (int); using std::exit;' \
1764 'extern "C" void exit (int) throw ();' \
1765 'extern "C" void exit (int);' \
1768 cat >"conftest.$ac_ext" <<_ACEOF
1769 #line 1769 "configure"
1770 #include "confdefs.h"
1781 rm -f "conftest.$ac_objext"
1782 if { (eval echo "$as_me:1782: \"$ac_compile\"") >&5
1783 (eval $ac_compile) 2>&5
1785 echo "$as_me:1785: \$? = $ac_status" >&5
1786 (exit "$ac_status"); } &&
1787 { ac_try='test -s "conftest.$ac_objext"'
1788 { (eval echo "$as_me:1788: \"$ac_try\"") >&5
1791 echo "$as_me:1791: \$? = $ac_status" >&5
1792 (exit "$ac_status"); }; }; then
1795 echo "$as_me: failed program was:" >&5
1796 cat "conftest.$ac_ext" >&5
1799 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1800 cat >"conftest.$ac_ext" <<_ACEOF
1801 #line 1801 "configure"
1802 #include "confdefs.h"
1812 rm -f "conftest.$ac_objext"
1813 if { (eval echo "$as_me:1813: \"$ac_compile\"") >&5
1814 (eval $ac_compile) 2>&5
1816 echo "$as_me:1816: \$? = $ac_status" >&5
1817 (exit "$ac_status"); } &&
1818 { ac_try='test -s "conftest.$ac_objext"'
1819 { (eval echo "$as_me:1819: \"$ac_try\"") >&5
1822 echo "$as_me:1822: \$? = $ac_status" >&5
1823 (exit "$ac_status"); }; }; then
1826 echo "$as_me: failed program was:" >&5
1827 cat "conftest.$ac_ext" >&5
1829 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1832 if test -n "$ac_declaration"; then
1833 echo '#ifdef __cplusplus' >>confdefs.h
1834 echo "$ac_declaration" >>confdefs.h
1835 echo '#endif' >>confdefs.h
1839 echo "$as_me: failed program was:" >&5
1840 cat "conftest.$ac_ext" >&5
1842 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1844 ac_cpp='$CPP $CPPFLAGS'
1845 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1846 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1847 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1848 ac_main_return="return"
1851 if test "$GCC" = yes ; then
1852 echo "$as_me:1852: checking version of $CC" >&5
1853 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1854 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1855 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1856 echo "$as_me:1856: result: $GCC_VERSION" >&5
1857 echo "${ECHO_T}$GCC_VERSION" >&6
1862 if test "$GCC" = yes ; then
1865 echo "$as_me:1865: checking if this is really Intel C compiler" >&5
1866 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1867 cf_save_CFLAGS="$CFLAGS"
1868 CFLAGS="$CFLAGS -no-gcc"
1869 cat >"conftest.$ac_ext" <<_ACEOF
1870 #line 1870 "configure"
1871 #include "confdefs.h"
1877 #ifdef __INTEL_COMPILER
1886 rm -f "conftest.$ac_objext"
1887 if { (eval echo "$as_me:1887: \"$ac_compile\"") >&5
1888 (eval $ac_compile) 2>&5
1890 echo "$as_me:1890: \$? = $ac_status" >&5
1891 (exit "$ac_status"); } &&
1892 { ac_try='test -s "conftest.$ac_objext"'
1893 { (eval echo "$as_me:1893: \"$ac_try\"") >&5
1896 echo "$as_me:1896: \$? = $ac_status" >&5
1897 (exit "$ac_status"); }; }; then
1899 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1902 echo "$as_me: failed program was:" >&5
1903 cat "conftest.$ac_ext" >&5
1905 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1906 CFLAGS="$cf_save_CFLAGS"
1907 echo "$as_me:1907: result: $INTEL_COMPILER" >&5
1908 echo "${ECHO_T}$INTEL_COMPILER" >&6
1915 if test "$GCC" = yes ; then
1916 echo "$as_me:1916: checking if this is really Clang C compiler" >&5
1917 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1918 cf_save_CFLAGS="$CFLAGS"
1919 cat >"conftest.$ac_ext" <<_ACEOF
1920 #line 1920 "configure"
1921 #include "confdefs.h"
1936 rm -f "conftest.$ac_objext"
1937 if { (eval echo "$as_me:1937: \"$ac_compile\"") >&5
1938 (eval $ac_compile) 2>&5
1940 echo "$as_me:1940: \$? = $ac_status" >&5
1941 (exit "$ac_status"); } &&
1942 { ac_try='test -s "conftest.$ac_objext"'
1943 { (eval echo "$as_me:1943: \"$ac_try\"") >&5
1946 echo "$as_me:1946: \$? = $ac_status" >&5
1947 (exit "$ac_status"); }; }; then
1951 echo "$as_me: failed program was:" >&5
1952 cat "conftest.$ac_ext" >&5
1954 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1955 CFLAGS="$cf_save_CFLAGS"
1956 echo "$as_me:1956: result: $CLANG_COMPILER" >&5
1957 echo "${ECHO_T}$CLANG_COMPILER" >&6
1962 if test "x$CLANG_COMPILER" = "xyes" ; then
1964 (c[1-9][0-9]|*/c[1-9][0-9])
1965 { echo "$as_me:1965: WARNING: replacing broken compiler alias $CC" >&5
1966 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
1967 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
1972 echo "$as_me:1972: checking version of $CC" >&5
1973 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1974 CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1975 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
1976 echo "$as_me:1976: result: $CLANG_VERSION" >&5
1977 echo "${ECHO_T}$CLANG_VERSION" >&6
1979 for cf_clang_opt in \
1980 -Qunused-arguments \
1981 -Wno-error=implicit-function-declaration
1983 echo "$as_me:1983: checking if option $cf_clang_opt works" >&5
1984 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
1985 cf_save_CFLAGS="$CFLAGS"
1986 CFLAGS="$CFLAGS $cf_clang_opt"
1987 cat >"conftest.$ac_ext" <<_ACEOF
1988 #line 1988 "configure"
1989 #include "confdefs.h"
1996 printf("hello!\\n");
2001 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2002 if { (eval echo "$as_me:2002: \"$ac_link\"") >&5
2003 (eval $ac_link) 2>&5
2005 echo "$as_me:2005: \$? = $ac_status" >&5
2006 (exit "$ac_status"); } &&
2007 { ac_try='test -s "conftest$ac_exeext"'
2008 { (eval echo "$as_me:2008: \"$ac_try\"") >&5
2011 echo "$as_me:2011: \$? = $ac_status" >&5
2012 (exit "$ac_status"); }; }; then
2016 echo "$as_me: failed program was:" >&5
2017 cat "conftest.$ac_ext" >&5
2021 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2022 echo "$as_me:2022: result: $cf_clang_optok" >&5
2023 echo "${ECHO_T}$cf_clang_optok" >&6
2024 CFLAGS="$cf_save_CFLAGS"
2025 if test "$cf_clang_optok" = yes; then
2026 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2028 echo "${as_me:-configure}:2028: testing adding option $cf_clang_opt ..." 1>&5
2030 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2031 CFLAGS="${CFLAGS}$cf_clang_opt"
2037 echo "$as_me:2037: checking for $CC option to accept ANSI C" >&5
2038 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2039 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2040 echo $ECHO_N "(cached) $ECHO_C" >&6
2042 ac_cv_prog_cc_stdc=no
2044 cat >"conftest.$ac_ext" <<_ACEOF
2045 #line 2045 "configure"
2046 #include "confdefs.h"
2049 #include <sys/types.h>
2050 #include <sys/stat.h>
2051 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2052 struct buf { int x; };
2053 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2054 static char *e (p, i)
2060 static char *f (char * (*g) (char **, int), char **p, ...)
2065 s = g (p, va_arg (v,int));
2069 int test (int i, double x);
2070 struct s1 {int (*f) (int a);};
2071 struct s2 {int (*f) (double a);};
2072 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2078 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2083 # Don't try gcc -ansi; that turns off useful extensions and
2084 # breaks some systems' header files.
2085 # AIX -qlanglvl=ansi
2086 # Ultrix and OSF/1 -std1
2087 # HP-UX 10.20 and later -Ae
2088 # HP-UX older versions -Aa -D_HPUX_SOURCE
2089 # SVR4 -Xc -D__EXTENSIONS__
2090 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2092 CC="$ac_save_CC $ac_arg"
2093 rm -f "conftest.$ac_objext"
2094 if { (eval echo "$as_me:2094: \"$ac_compile\"") >&5
2095 (eval $ac_compile) 2>&5
2097 echo "$as_me:2097: \$? = $ac_status" >&5
2098 (exit "$ac_status"); } &&
2099 { ac_try='test -s "conftest.$ac_objext"'
2100 { (eval echo "$as_me:2100: \"$ac_try\"") >&5
2103 echo "$as_me:2103: \$? = $ac_status" >&5
2104 (exit "$ac_status"); }; }; then
2105 ac_cv_prog_cc_stdc=$ac_arg
2108 echo "$as_me: failed program was:" >&5
2109 cat "conftest.$ac_ext" >&5
2111 rm -f "conftest.$ac_objext"
2113 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2118 case "x$ac_cv_prog_cc_stdc" in
2120 echo "$as_me:2120: result: none needed" >&5
2121 echo "${ECHO_T}none needed" >&6 ;;
2123 echo "$as_me:2123: result: $ac_cv_prog_cc_stdc" >&5
2124 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2125 CC="$CC $ac_cv_prog_cc_stdc" ;;
2128 # This should have been defined by AC_PROG_CC
2131 echo "$as_me:2131: checking \$CFLAGS variable" >&5
2132 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2135 echo "$as_me:2135: result: broken" >&5
2136 echo "${ECHO_T}broken" >&6
2137 { echo "$as_me:2137: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2138 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2141 for cf_arg in $cf_flags
2147 cf_new_extra_cppflags=
2149 for cf_add_cflags in $cf_arg
2151 case "$cf_fix_cppflags" in
2153 case "$cf_add_cflags" in
2154 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2155 case "$cf_add_cflags" in
2157 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2159 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2160 && test -z "${cf_tst_cflags}" \
2161 && cf_fix_cppflags=yes
2163 if test "$cf_fix_cppflags" = yes ; then
2165 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2166 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2169 elif test "${cf_tst_cflags}" = "\"'" ; then
2171 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2172 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2182 case "$cf_add_cflags" in
2184 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2186 CPPFLAGS=`echo "$CPPFLAGS" | \
2187 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2188 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2193 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2194 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2201 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2202 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2209 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2210 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2212 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2214 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2215 && test -z "${cf_tst_cflags}" \
2216 && cf_fix_cppflags=no
2221 if test -n "$cf_new_cflags" ; then
2223 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2224 CFLAGS="${CFLAGS}$cf_new_cflags"
2228 if test -n "$cf_new_cppflags" ; then
2230 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2231 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2235 if test -n "$cf_new_extra_cppflags" ; then
2237 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2238 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2245 echo "$as_me:2245: result: ok" >&5
2246 echo "${ECHO_T}ok" >&6
2250 echo "$as_me:2250: checking \$CC variable" >&5
2251 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2254 echo "$as_me:2254: result: broken" >&5
2255 echo "${ECHO_T}broken" >&6
2256 { echo "$as_me:2256: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2257 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2259 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2260 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2262 for cf_arg in $cf_flags
2270 cf_new_extra_cppflags=
2272 for cf_add_cflags in $cf_arg
2274 case "$cf_fix_cppflags" in
2276 case "$cf_add_cflags" in
2277 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2278 case "$cf_add_cflags" in
2280 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2282 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2283 && test -z "${cf_tst_cflags}" \
2284 && cf_fix_cppflags=yes
2286 if test "$cf_fix_cppflags" = yes ; then
2288 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2289 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2292 elif test "${cf_tst_cflags}" = "\"'" ; then
2294 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2295 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2305 case "$cf_add_cflags" in
2307 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2309 CPPFLAGS=`echo "$CPPFLAGS" | \
2310 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2311 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2316 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2317 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2324 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2325 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2332 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2333 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2335 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2337 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2338 && test -z "${cf_tst_cflags}" \
2339 && cf_fix_cppflags=no
2344 if test -n "$cf_new_cflags" ; then
2346 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2347 CFLAGS="${CFLAGS}$cf_new_cflags"
2351 if test -n "$cf_new_cppflags" ; then
2353 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2354 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2358 if test -n "$cf_new_extra_cppflags" ; then
2360 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2361 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2371 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2373 echo "${as_me:-configure}:2373: testing resulting CC: '$CC' ..." 1>&5
2375 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2377 echo "${as_me:-configure}:2377: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2379 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2381 echo "${as_me:-configure}:2381: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2385 echo "$as_me:2385: result: ok" >&5
2386 echo "${ECHO_T}ok" >&6
2390 echo "$as_me:2390: checking for egrep" >&5
2391 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2392 if test "${ac_cv_path_EGREP+set}" = set; then
2393 echo $ECHO_N "(cached) $ECHO_C" >&6
2395 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2396 then ac_cv_path_EGREP="$GREP -E"
2398 for ac_prog in gegrep egrep
2400 # Extract the first word of "$ac_prog", so it can be a program name with args.
2401 set dummy $ac_prog; ac_word=$2
2402 echo "$as_me:2402: checking for $ac_word" >&5
2403 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2404 if test "${ac_cv_path_EGREP+set}" = set; then
2405 echo $ECHO_N "(cached) $ECHO_C" >&6
2409 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2412 ac_save_IFS=$IFS; IFS=$ac_path_separator
2414 for ac_dir in $ac_dummy; do
2416 test -z "$ac_dir" && ac_dir=.
2417 if $as_executable_p "$ac_dir/$ac_word"; then
2418 ac_cv_path_EGREP="$ac_dir/$ac_word"
2419 echo "$as_me:2419: found $ac_dir/$ac_word" >&5
2427 EGREP=$ac_cv_path_EGREP
2429 if test -n "$EGREP"; then
2430 echo "$as_me:2430: result: $EGREP" >&5
2431 echo "${ECHO_T}$EGREP" >&6
2433 echo "$as_me:2433: result: no" >&5
2434 echo "${ECHO_T}no" >&6
2437 test -n "$EGREP" && break
2439 test -n "$EGREP" || EGREP=": "
2441 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2441: error: cannot find workable egrep" >&5
2442 echo "$as_me: error: cannot find workable egrep" >&2;}
2443 { (exit 1); exit 1; }; }
2446 echo "$as_me:2446: result: $ac_cv_path_EGREP" >&5
2447 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2448 EGREP="$ac_cv_path_EGREP"
2451 ac_cpp='$CPP $CPPFLAGS'
2452 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2453 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2454 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2455 ac_main_return="return"
2456 echo "$as_me:2456: checking how to run the C preprocessor" >&5
2457 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2458 # On Suns, sometimes $CPP names a directory.
2459 if test -n "$CPP" && test -d "$CPP"; then
2462 if test -z "$CPP"; then
2463 if test "${ac_cv_prog_CPP+set}" = set; then
2464 echo $ECHO_N "(cached) $ECHO_C" >&6
2466 # Double quotes because CPP needs to be expanded
2467 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2470 for ac_c_preproc_warn_flag in '' yes
2472 # Use a header file that comes with gcc, so configuring glibc
2473 # with a fresh cross-compiler works.
2474 # On the NeXT, cc -E runs the code through the compiler's parser,
2475 # not just through cpp. "Syntax error" is here to catch this case.
2476 cat >"conftest.$ac_ext" <<_ACEOF
2477 #line 2477 "configure"
2478 #include "confdefs.h"
2482 if { (eval echo "$as_me:2482: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2483 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2485 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2487 cat conftest.err >&5
2488 echo "$as_me:2488: \$? = $ac_status" >&5
2489 (exit "$ac_status"); } >/dev/null; then
2490 if test -s conftest.err; then
2491 ac_cpp_err=$ac_c_preproc_warn_flag
2498 if test -z "$ac_cpp_err"; then
2501 echo "$as_me: failed program was:" >&5
2502 cat "conftest.$ac_ext" >&5
2503 # Broken: fails on valid input.
2506 rm -f conftest.err "conftest.$ac_ext"
2508 # OK, works on sane cases. Now check whether non-existent headers
2509 # can be detected and how.
2510 cat >"conftest.$ac_ext" <<_ACEOF
2511 #line 2511 "configure"
2512 #include "confdefs.h"
2513 #include <ac_nonexistent.h>
2515 if { (eval echo "$as_me:2515: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2516 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2518 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2520 cat conftest.err >&5
2521 echo "$as_me:2521: \$? = $ac_status" >&5
2522 (exit "$ac_status"); } >/dev/null; then
2523 if test -s conftest.err; then
2524 ac_cpp_err=$ac_c_preproc_warn_flag
2531 if test -z "$ac_cpp_err"; then
2532 # Broken: success on invalid input.
2535 echo "$as_me: failed program was:" >&5
2536 cat "conftest.$ac_ext" >&5
2537 # Passes both tests.
2541 rm -f conftest.err "conftest.$ac_ext"
2544 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2545 rm -f conftest.err "conftest.$ac_ext"
2546 if $ac_preproc_ok; then
2558 echo "$as_me:2558: result: $CPP" >&5
2559 echo "${ECHO_T}$CPP" >&6
2561 for ac_c_preproc_warn_flag in '' yes
2563 # Use a header file that comes with gcc, so configuring glibc
2564 # with a fresh cross-compiler works.
2565 # On the NeXT, cc -E runs the code through the compiler's parser,
2566 # not just through cpp. "Syntax error" is here to catch this case.
2567 cat >"conftest.$ac_ext" <<_ACEOF
2568 #line 2568 "configure"
2569 #include "confdefs.h"
2573 if { (eval echo "$as_me:2573: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2574 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2576 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2578 cat conftest.err >&5
2579 echo "$as_me:2579: \$? = $ac_status" >&5
2580 (exit "$ac_status"); } >/dev/null; then
2581 if test -s conftest.err; then
2582 ac_cpp_err=$ac_c_preproc_warn_flag
2589 if test -z "$ac_cpp_err"; then
2592 echo "$as_me: failed program was:" >&5
2593 cat "conftest.$ac_ext" >&5
2594 # Broken: fails on valid input.
2597 rm -f conftest.err "conftest.$ac_ext"
2599 # OK, works on sane cases. Now check whether non-existent headers
2600 # can be detected and how.
2601 cat >"conftest.$ac_ext" <<_ACEOF
2602 #line 2602 "configure"
2603 #include "confdefs.h"
2604 #include <ac_nonexistent.h>
2606 if { (eval echo "$as_me:2606: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2607 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2609 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2611 cat conftest.err >&5
2612 echo "$as_me:2612: \$? = $ac_status" >&5
2613 (exit "$ac_status"); } >/dev/null; then
2614 if test -s conftest.err; then
2615 ac_cpp_err=$ac_c_preproc_warn_flag
2622 if test -z "$ac_cpp_err"; then
2623 # Broken: success on invalid input.
2626 echo "$as_me: failed program was:" >&5
2627 cat "conftest.$ac_ext" >&5
2628 # Passes both tests.
2632 rm -f conftest.err "conftest.$ac_ext"
2635 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2636 rm -f conftest.err "conftest.$ac_ext"
2637 if $ac_preproc_ok; then
2640 { { echo "$as_me:2640: error: C preprocessor \"$CPP\" fails sanity check" >&5
2641 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2642 { (exit 1); exit 1; }; }
2646 ac_cpp='$CPP $CPPFLAGS'
2647 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2648 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2649 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2650 ac_main_return="return"
2652 if test $ac_cv_c_compiler_gnu = yes; then
2653 echo "$as_me:2653: checking whether $CC needs -traditional" >&5
2654 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2655 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2656 echo $ECHO_N "(cached) $ECHO_C" >&6
2658 ac_pattern="Autoconf.*'x'"
2659 cat >"conftest.$ac_ext" <<_ACEOF
2660 #line 2660 "configure"
2661 #include "confdefs.h"
2663 int Autoconf = TIOCGETP;
2665 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2666 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2667 ac_cv_prog_gcc_traditional=yes
2669 ac_cv_prog_gcc_traditional=no
2673 if test $ac_cv_prog_gcc_traditional = no; then
2674 cat >"conftest.$ac_ext" <<_ACEOF
2675 #line 2675 "configure"
2676 #include "confdefs.h"
2678 int Autoconf = TCGETA;
2680 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2681 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2682 ac_cv_prog_gcc_traditional=yes
2688 echo "$as_me:2688: result: $ac_cv_prog_gcc_traditional" >&5
2689 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2690 if test $ac_cv_prog_gcc_traditional = yes; then
2691 CC="$CC -traditional"
2695 echo "$as_me:2695: checking whether $CC understands -c and -o together" >&5
2696 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2697 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2698 echo $ECHO_N "(cached) $ECHO_C" >&6
2701 cat > conftest.$ac_ext <<CF_EOF
2704 ${cf_cv_main_return:-return}(0);
2707 # We do the test twice because some compilers refuse to overwrite an
2708 # existing .o file with -o, though they will create one.
2709 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2710 if { (eval echo "$as_me:2710: \"$ac_try\"") >&5
2713 echo "$as_me:2713: \$? = $ac_status" >&5
2714 (exit "$ac_status"); } &&
2715 test -f conftest2.$ac_objext && { (eval echo "$as_me:2715: \"$ac_try\"") >&5
2718 echo "$as_me:2718: \$? = $ac_status" >&5
2719 (exit "$ac_status"); };
2721 eval cf_cv_prog_CC_c_o=yes
2723 eval cf_cv_prog_CC_c_o=no
2728 if test "$cf_cv_prog_CC_c_o" = yes; then
2729 echo "$as_me:2729: result: yes" >&5
2730 echo "${ECHO_T}yes" >&6
2732 echo "$as_me:2732: result: no" >&5
2733 echo "${ECHO_T}no" >&6
2736 test "$program_prefix" != NONE &&
2737 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2738 # Use a double $ so make ignores it.
2739 test "$program_suffix" != NONE &&
2740 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2741 # Double any \ or $. echo might interpret backslashes.
2742 # By default was `s,x,x', remove it if useless.
2743 cat <<\_ACEOF >conftest.sed
2744 s/[\\$]/&&/g;s/;s,x,x,$//
2746 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2749 for ac_prog in mawk gawk nawk awk
2751 # Extract the first word of "$ac_prog", so it can be a program name with args.
2752 set dummy $ac_prog; ac_word=$2
2753 echo "$as_me:2753: checking for $ac_word" >&5
2754 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2755 if test "${ac_cv_prog_AWK+set}" = set; then
2756 echo $ECHO_N "(cached) $ECHO_C" >&6
2758 if test -n "$AWK"; then
2759 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2761 ac_save_IFS=$IFS; IFS=$ac_path_separator
2763 for ac_dir in $ac_dummy; do
2765 test -z "$ac_dir" && ac_dir=.
2766 $as_executable_p "$ac_dir/$ac_word" || continue
2767 ac_cv_prog_AWK="$ac_prog"
2768 echo "$as_me:2768: found $ac_dir/$ac_word" >&5
2775 if test -n "$AWK"; then
2776 echo "$as_me:2776: result: $AWK" >&5
2777 echo "${ECHO_T}$AWK" >&6
2779 echo "$as_me:2779: result: no" >&5
2780 echo "${ECHO_T}no" >&6
2783 test -n "$AWK" && break
2786 test -z "$AWK" && { { echo "$as_me:2786: error: No awk program found" >&5
2787 echo "$as_me: error: No awk program found" >&2;}
2788 { (exit 1); exit 1; }; }
2790 echo "$as_me:2790: checking for egrep" >&5
2791 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2792 if test "${ac_cv_prog_egrep+set}" = set; then
2793 echo $ECHO_N "(cached) $ECHO_C" >&6
2795 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2796 then ac_cv_prog_egrep='grep -E'
2797 else ac_cv_prog_egrep='egrep'
2800 echo "$as_me:2800: result: $ac_cv_prog_egrep" >&5
2801 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2802 EGREP=$ac_cv_prog_egrep
2804 test -z "$EGREP" && { { echo "$as_me:2804: error: No egrep program found" >&5
2805 echo "$as_me: error: No egrep program found" >&2;}
2806 { (exit 1); exit 1; }; }
2808 # Find a good install program. We prefer a C program (faster),
2809 # so one script is as good as another. But avoid the broken or
2810 # incompatible versions:
2811 # SysV /etc/install, /usr/sbin/install
2812 # SunOS /usr/etc/install
2813 # IRIX /sbin/install
2815 # AmigaOS /C/install, which installs bootblocks on floppy discs
2816 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2817 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2818 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2819 # ./install, which can be erroneously created by make from ./install.sh.
2820 echo "$as_me:2820: checking for a BSD compatible install" >&5
2821 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2822 if test -z "$INSTALL"; then
2823 if test "${ac_cv_path_install+set}" = set; then
2824 echo $ECHO_N "(cached) $ECHO_C" >&6
2826 ac_save_IFS=$IFS; IFS=$ac_path_separator
2827 for ac_dir in $PATH; do
2829 # Account for people who put trailing slashes in PATH elements.
2831 / | ./ | .// | /cC/* \
2832 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2835 # OSF1 and SCO ODT 3.0 have their own names for install.
2836 # Don't use installbsd from OSF since it installs stuff as root
2838 for ac_prog in ginstall scoinst install; do
2839 if $as_executable_p "$ac_dir/$ac_prog"; then
2840 if test $ac_prog = install &&
2841 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2842 # AIX install. It has an incompatible calling convention.
2844 elif test $ac_prog = install &&
2845 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2846 # program-specific install script used by HP pwplus--don't use.
2849 ac_cv_path_install="$ac_dir/$ac_prog -c"
2859 if test "${ac_cv_path_install+set}" = set; then
2860 INSTALL=$ac_cv_path_install
2862 # As a last resort, use the slow shell script. We don't cache a
2863 # path for INSTALL within a source directory, because that will
2864 # break other packages using the cache if that directory is
2865 # removed, or if the path is relative.
2866 INSTALL=$ac_install_sh
2869 echo "$as_me:2869: result: $INSTALL" >&5
2870 echo "${ECHO_T}$INSTALL" >&6
2872 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2873 # It thinks the first close brace ends the variable substitution.
2874 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2876 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2878 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2880 echo "$as_me:2880: checking whether ln -s works" >&5
2881 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2883 if test "$LN_S" = "ln -s"; then
2884 echo "$as_me:2884: result: yes" >&5
2885 echo "${ECHO_T}yes" >&6
2887 echo "$as_me:2887: result: no, using $LN_S" >&5
2888 echo "${ECHO_T}no, using $LN_S" >&6
2891 echo "$as_me:2891: checking if $LN_S -f options work" >&5
2892 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2894 rm -f conf$$.src conf$$dst
2896 echo first >conf$$.src
2897 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2902 rm -f conf$$.dst conf$$src
2903 echo "$as_me:2903: result: $cf_prog_ln_sf" >&5
2904 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2906 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2908 # Find a good install program. We prefer a C program (faster),
2909 # so one script is as good as another. But avoid the broken or
2910 # incompatible versions:
2911 # SysV /etc/install, /usr/sbin/install
2912 # SunOS /usr/etc/install
2913 # IRIX /sbin/install
2915 # AmigaOS /C/install, which installs bootblocks on floppy discs
2916 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2917 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2918 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2919 # ./install, which can be erroneously created by make from ./install.sh.
2920 echo "$as_me:2920: checking for a BSD compatible install" >&5
2921 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2922 if test -z "$INSTALL"; then
2923 if test "${ac_cv_path_install+set}" = set; then
2924 echo $ECHO_N "(cached) $ECHO_C" >&6
2926 ac_save_IFS=$IFS; IFS=$ac_path_separator
2927 for ac_dir in $PATH; do
2929 # Account for people who put trailing slashes in PATH elements.
2931 / | ./ | .// | /cC/* \
2932 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2935 # OSF1 and SCO ODT 3.0 have their own names for install.
2936 # Don't use installbsd from OSF since it installs stuff as root
2938 for ac_prog in ginstall scoinst install; do
2939 if $as_executable_p "$ac_dir/$ac_prog"; then
2940 if test $ac_prog = install &&
2941 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2942 # AIX install. It has an incompatible calling convention.
2944 elif test $ac_prog = install &&
2945 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2946 # program-specific install script used by HP pwplus--don't use.
2949 ac_cv_path_install="$ac_dir/$ac_prog -c"
2959 if test "${ac_cv_path_install+set}" = set; then
2960 INSTALL=$ac_cv_path_install
2962 # As a last resort, use the slow shell script. We don't cache a
2963 # path for INSTALL within a source directory, because that will
2964 # break other packages using the cache if that directory is
2965 # removed, or if the path is relative.
2966 INSTALL=$ac_install_sh
2969 echo "$as_me:2969: result: $INSTALL" >&5
2970 echo "${ECHO_T}$INSTALL" >&6
2972 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2973 # It thinks the first close brace ends the variable substitution.
2974 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2976 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2978 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2984 cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
2985 test -z "$cf_dir" && cf_dir=.
2986 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
2990 echo "$as_me:2990: checking if you want to install stripped executables" >&5
2991 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2993 # Check whether --enable-stripping or --disable-stripping was given.
2994 if test "${enable_stripping+set}" = set; then
2995 enableval="$enable_stripping"
2996 test "$enableval" != no && enableval=yes
2997 if test "$enableval" != "yes" ; then
3000 enable_stripping=yes
3004 enable_stripping=yes
3007 echo "$as_me:3007: result: $enable_stripping" >&5
3008 echo "${ECHO_T}$enable_stripping" >&6
3010 if test "$enable_stripping" = yes
3017 : "${INSTALL:=install}"
3018 echo "$as_me:3018: checking if install accepts -p option" >&5
3019 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
3020 if test "${cf_cv_install_p+set}" = set; then
3021 echo $ECHO_N "(cached) $ECHO_C" >&6
3028 if $INSTALL -p conftest.in conftest.out 2>/dev/null
3030 if test -f conftest.out/conftest.in
3032 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
3033 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
3034 if test -s conftest.err
3049 echo "$as_me:3049: result: $cf_cv_install_p" >&5
3050 echo "${ECHO_T}$cf_cv_install_p" >&6
3052 echo "$as_me:3052: checking if install needs to be told about ownership" >&5
3053 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
3054 case `$ac_config_guess` in
3063 echo "$as_me:3063: result: $with_install_o" >&5
3064 echo "${ECHO_T}$with_install_o" >&6
3065 if test "x$with_install_o" = xyes
3067 INSTALL_OPT_O="`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`"
3072 echo "$as_me:3072: checking for long file names" >&5
3073 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3074 if test "${ac_cv_sys_long_file_names+set}" = set; then
3075 echo $ECHO_N "(cached) $ECHO_C" >&6
3077 ac_cv_sys_long_file_names=yes
3078 # Test for long file names in all the places we know might matter:
3079 # . the current directory, where building will happen
3080 # $prefix/lib where we will be installing things
3081 # $exec_prefix/lib likewise
3082 # eval it to expand exec_prefix.
3083 # $TMPDIR if set, where it might want to write temporary files
3084 # if $TMPDIR is not set:
3085 # /tmp where it might want to write temporary files
3088 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3091 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3093 for ac_dir in . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3094 test -d "$ac_dir" || continue
3095 test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3096 ac_xdir=$ac_dir/cf$$
3097 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3098 ac_tf1=$ac_xdir/conftest9012345
3099 ac_tf2=$ac_xdir/conftest9012346
3100 (echo 1 >"$ac_tf1") 2>/dev/null
3101 (echo 2 >"$ac_tf2") 2>/dev/null
3102 ac_val=`cat "$ac_tf1" 2>/dev/null`
3103 if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3104 ac_cv_sys_long_file_names=no
3105 rm -rf "$ac_xdir" 2>/dev/null
3108 rm -rf "$ac_xdir" 2>/dev/null
3111 echo "$as_me:3111: result: $ac_cv_sys_long_file_names" >&5
3112 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3113 if test "$ac_cv_sys_long_file_names" = yes; then
3115 cat >>confdefs.h <<\EOF
3116 #define HAVE_LONG_FILE_NAMES 1
3121 # if we find pkg-config, check if we should install the ".pc" files.
3123 echo "$as_me:3123: checking if you want to use pkg-config" >&5
3124 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3126 # Check whether --with-pkg-config or --without-pkg-config was given.
3127 if test "${with_pkg_config+set}" = set; then
3128 withval="$with_pkg_config"
3129 cf_pkg_config=$withval
3133 echo "$as_me:3133: result: $cf_pkg_config" >&5
3134 echo "${ECHO_T}$cf_pkg_config" >&6
3136 case "$cf_pkg_config" in
3142 if test -n "$ac_tool_prefix"; then
3143 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3144 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3145 echo "$as_me:3145: checking for $ac_word" >&5
3146 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3147 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3148 echo $ECHO_N "(cached) $ECHO_C" >&6
3152 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3155 ac_save_IFS=$IFS; IFS=$ac_path_separator
3157 for ac_dir in $ac_dummy; do
3159 test -z "$ac_dir" && ac_dir=.
3160 if $as_executable_p "$ac_dir/$ac_word"; then
3161 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3162 echo "$as_me:3162: found $ac_dir/$ac_word" >&5
3170 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3172 if test -n "$PKG_CONFIG"; then
3173 echo "$as_me:3173: result: $PKG_CONFIG" >&5
3174 echo "${ECHO_T}$PKG_CONFIG" >&6
3176 echo "$as_me:3176: result: no" >&5
3177 echo "${ECHO_T}no" >&6
3181 if test -z "$ac_cv_path_PKG_CONFIG"; then
3182 ac_pt_PKG_CONFIG=$PKG_CONFIG
3183 # Extract the first word of "pkg-config", so it can be a program name with args.
3184 set dummy pkg-config; ac_word=$2
3185 echo "$as_me:3185: checking for $ac_word" >&5
3186 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3187 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3188 echo $ECHO_N "(cached) $ECHO_C" >&6
3190 case $ac_pt_PKG_CONFIG in
3192 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3195 ac_save_IFS=$IFS; IFS=$ac_path_separator
3197 for ac_dir in $ac_dummy; do
3199 test -z "$ac_dir" && ac_dir=.
3200 if $as_executable_p "$ac_dir/$ac_word"; then
3201 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3202 echo "$as_me:3202: found $ac_dir/$ac_word" >&5
3207 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3211 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3213 if test -n "$ac_pt_PKG_CONFIG"; then
3214 echo "$as_me:3214: result: $ac_pt_PKG_CONFIG" >&5
3215 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3217 echo "$as_me:3217: result: no" >&5
3218 echo "${ECHO_T}no" >&6
3221 PKG_CONFIG=$ac_pt_PKG_CONFIG
3223 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3232 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3233 if test "$PKG_CONFIG" != none ; then
3235 if test "x$prefix" != xNONE; then
3236 cf_path_syntax="$prefix"
3238 cf_path_syntax="$ac_default_prefix"
3241 case ".$PKG_CONFIG" in
3246 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3248 (.\$\{*prefix\}*|.\$\{*dir\}*)
3249 eval PKG_CONFIG="$PKG_CONFIG"
3250 case ".$PKG_CONFIG" in
3252 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3257 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3260 { { echo "$as_me:3260: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3261 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3262 { (exit 1); exit 1; }; }
3266 elif test "x$cf_pkg_config" != xno ; then
3267 { echo "$as_me:3267: WARNING: pkg-config is not installed" >&5
3268 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3271 case "$PKG_CONFIG" in
3273 echo "$as_me:3273: checking for pkg-config library directory" >&5
3274 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3277 echo "$as_me:3277: checking for $PKG_CONFIG library directory" >&5
3278 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3282 PKG_CONFIG_LIBDIR=no
3284 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3285 if test "${with_pkg_config_libdir+set}" = set; then
3286 withval="$with_pkg_config_libdir"
3287 PKG_CONFIG_LIBDIR=$withval
3289 test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3292 case x$PKG_CONFIG_LIBDIR in
3296 # Look for the library directory using the same prefix as the executable
3297 if test "x$PKG_CONFIG" = xnone
3301 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3304 # If you don't like using the default architecture, you have to specify the
3305 # intended library directory and corresponding compiler/linker options.
3307 # This case allows for Debian's 2014-flavor of multiarch, along with the
3308 # most common variations before that point. Some other variants spell the
3309 # directory differently, e.g., "pkg-config", and put it in unusual places.
3310 # pkg-config has always been poorly standardized, which is ironic...
3311 case x`(arch) 2>/dev/null` in
3314 $cf_path/lib/*64-linux-gnu \
3322 $cf_path/lib/*-linux-gnu \
3330 test -n "$verbose" && echo " list..." 1>&6
3332 echo "${as_me:-configure}:3332: testing list... ..." 1>&5
3334 for cf_config in $cf_search_path
3336 test -n "$verbose" && echo " checking $cf_config/pkgconfig" 1>&6
3338 echo "${as_me:-configure}:3338: testing checking $cf_config/pkgconfig ..." 1>&5
3340 if test -d "$cf_config/pkgconfig"
3342 PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3343 echo "$as_me:3343: checking done" >&5
3344 echo $ECHO_N "checking done... $ECHO_C" >&6
3353 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3354 echo "$as_me:3354: result: $PKG_CONFIG_LIBDIR" >&5
3355 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3358 echo "$as_me:3358: checking if you want to build test-programs" >&5
3359 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3361 # Check whether --with-tests or --without-tests was given.
3362 if test "${with_tests+set}" = set; then
3363 withval="$with_tests"
3364 cf_with_tests=$withval
3368 echo "$as_me:3368: result: $cf_with_tests" >&5
3369 echo "${ECHO_T}$cf_with_tests" >&6
3371 echo "$as_me:3371: checking if we should assume mixed-case filenames" >&5
3372 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3374 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3375 if test "${enable_mixed_case+set}" = set; then
3376 enableval="$enable_mixed_case"
3377 enable_mixedcase=$enableval
3379 enable_mixedcase=auto
3381 echo "$as_me:3381: result: $enable_mixedcase" >&5
3382 echo "${ECHO_T}$enable_mixedcase" >&6
3383 if test "$enable_mixedcase" = "auto" ; then
3385 echo "$as_me:3385: checking if filesystem supports mixed-case filenames" >&5
3386 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3387 if test "${cf_cv_mixedcase+set}" = set; then
3388 echo $ECHO_N "(cached) $ECHO_C" >&6
3391 if test "$cross_compiling" = yes ; then
3392 case "$target_alias" in
3393 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3401 rm -f conftest CONFTEST
3403 if test -f CONFTEST ; then
3408 rm -f conftest CONFTEST
3412 echo "$as_me:3412: result: $cf_cv_mixedcase" >&5
3413 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3414 test "$cf_cv_mixedcase" = yes &&
3415 cat >>confdefs.h <<\EOF
3416 #define MIXEDCASE_FILENAMES 1
3420 cf_cv_mixedcase=$enable_mixedcase
3421 if test "$enable_mixedcase" = "yes" ; then
3422 cat >>confdefs.h <<\EOF
3423 #define MIXEDCASE_FILENAMES 1
3429 # do this after mixed-case option (tags/TAGS is not as important as tic).
3430 echo "$as_me:3430: checking whether ${MAKE-make} sets \${MAKE}" >&5
3431 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3432 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3433 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3434 echo $ECHO_N "(cached) $ECHO_C" >&6
3436 cat >conftest.make <<\EOF
3438 @echo 'ac_maketemp="${MAKE}"'
3440 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3441 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3442 if test -n "$ac_maketemp"; then
3443 eval ac_cv_prog_make_${ac_make}_set=yes
3445 eval ac_cv_prog_make_${ac_make}_set=no
3449 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3450 echo "$as_me:3450: result: yes" >&5
3451 echo "${ECHO_T}yes" >&6
3454 echo "$as_me:3454: result: no" >&5
3455 echo "${ECHO_T}no" >&6
3456 SET_MAKE="MAKE=${MAKE-make}"
3459 echo "$as_me:3459: checking for \".PHONY\" make-support" >&5
3460 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
3461 if test "${cf_cv_make_PHONY+set}" = set; then
3462 echo $ECHO_N "(cached) $ECHO_C" >&6
3467 mkdir conftest || exit 1
3469 cat >makefile <<'CF_EOF'
3473 @echo "** making $@ $(DATA)"
3475 @echo "** making $@ $(DATA)"
3477 @echo "** making $@ $(DATA)"
3480 @echo "** making $@ $(DATA)"
3483 for cf_data in 1 2 3
3485 ${MAKE:-make} always DATA=$cf_data
3486 ${MAKE:-make} once DATA=$cf_data
3487 ${MAKE:-make} -t always once
3488 if test -f always ; then
3489 echo "no (case 1)" > ../conftest.tmp
3490 elif test ! -f always.out ; then
3491 echo "no (case 2)" > ../conftest.tmp
3492 elif test ! -f once.out ; then
3493 echo "no (case 3)" > ../conftest.tmp
3494 elif ! cmp -s always.out once.out ; then
3495 echo "no (case 4)" > ../conftest.tmp
3496 diff always.out once.out
3498 cf_check="`cat always.out`"
3499 if test "x$cf_check" != "x$cf_data" ; then
3500 echo "no (case 5)" > ../conftest.tmp
3502 echo yes > ../conftest.tmp
3510 cf_cv_make_PHONY="`cat conftest.tmp`"
3514 echo "$as_me:3514: result: $cf_cv_make_PHONY" >&5
3515 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
3518 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
3519 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
3521 for ac_prog in exctags ctags
3523 # Extract the first word of "$ac_prog", so it can be a program name with args.
3524 set dummy $ac_prog; ac_word=$2
3525 echo "$as_me:3525: checking for $ac_word" >&5
3526 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3527 if test "${ac_cv_prog_CTAGS+set}" = set; then
3528 echo $ECHO_N "(cached) $ECHO_C" >&6
3530 if test -n "$CTAGS"; then
3531 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3533 ac_save_IFS=$IFS; IFS=$ac_path_separator
3535 for ac_dir in $ac_dummy; do
3537 test -z "$ac_dir" && ac_dir=.
3538 $as_executable_p "$ac_dir/$ac_word" || continue
3539 ac_cv_prog_CTAGS="$ac_prog"
3540 echo "$as_me:3540: found $ac_dir/$ac_word" >&5
3546 CTAGS=$ac_cv_prog_CTAGS
3547 if test -n "$CTAGS"; then
3548 echo "$as_me:3548: result: $CTAGS" >&5
3549 echo "${ECHO_T}$CTAGS" >&6
3551 echo "$as_me:3551: result: no" >&5
3552 echo "${ECHO_T}no" >&6
3555 test -n "$CTAGS" && break
3558 for ac_prog in exetags etags
3560 # Extract the first word of "$ac_prog", so it can be a program name with args.
3561 set dummy $ac_prog; ac_word=$2
3562 echo "$as_me:3562: checking for $ac_word" >&5
3563 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3564 if test "${ac_cv_prog_ETAGS+set}" = set; then
3565 echo $ECHO_N "(cached) $ECHO_C" >&6
3567 if test -n "$ETAGS"; then
3568 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3570 ac_save_IFS=$IFS; IFS=$ac_path_separator
3572 for ac_dir in $ac_dummy; do
3574 test -z "$ac_dir" && ac_dir=.
3575 $as_executable_p "$ac_dir/$ac_word" || continue
3576 ac_cv_prog_ETAGS="$ac_prog"
3577 echo "$as_me:3577: found $ac_dir/$ac_word" >&5
3583 ETAGS=$ac_cv_prog_ETAGS
3584 if test -n "$ETAGS"; then
3585 echo "$as_me:3585: result: $ETAGS" >&5
3586 echo "${ECHO_T}$ETAGS" >&6
3588 echo "$as_me:3588: result: no" >&5
3589 echo "${ECHO_T}no" >&6
3592 test -n "$ETAGS" && break
3595 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3596 set dummy ${CTAGS:-ctags}; ac_word=$2
3597 echo "$as_me:3597: checking for $ac_word" >&5
3598 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3599 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3600 echo $ECHO_N "(cached) $ECHO_C" >&6
3602 if test -n "$MAKE_LOWER_TAGS"; then
3603 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3605 ac_save_IFS=$IFS; IFS=$ac_path_separator
3607 for ac_dir in $ac_dummy; do
3609 test -z "$ac_dir" && ac_dir=.
3610 $as_executable_p "$ac_dir/$ac_word" || continue
3611 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3612 echo "$as_me:3612: found $ac_dir/$ac_word" >&5
3616 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3619 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3620 if test -n "$MAKE_LOWER_TAGS"; then
3621 echo "$as_me:3621: result: $MAKE_LOWER_TAGS" >&5
3622 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3624 echo "$as_me:3624: result: no" >&5
3625 echo "${ECHO_T}no" >&6
3628 if test "$cf_cv_mixedcase" = yes ; then
3629 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3630 set dummy ${ETAGS:-etags}; ac_word=$2
3631 echo "$as_me:3631: checking for $ac_word" >&5
3632 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3633 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3634 echo $ECHO_N "(cached) $ECHO_C" >&6
3636 if test -n "$MAKE_UPPER_TAGS"; then
3637 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3639 ac_save_IFS=$IFS; IFS=$ac_path_separator
3641 for ac_dir in $ac_dummy; do
3643 test -z "$ac_dir" && ac_dir=.
3644 $as_executable_p "$ac_dir/$ac_word" || continue
3645 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3646 echo "$as_me:3646: found $ac_dir/$ac_word" >&5
3650 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3653 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3654 if test -n "$MAKE_UPPER_TAGS"; then
3655 echo "$as_me:3655: result: $MAKE_UPPER_TAGS" >&5
3656 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3658 echo "$as_me:3658: result: no" >&5
3659 echo "${ECHO_T}no" >&6
3666 if test "$MAKE_UPPER_TAGS" = yes ; then
3672 if test "$MAKE_LOWER_TAGS" = yes ; then
3678 echo "$as_me:3678: checking for makeflags variable" >&5
3679 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3680 if test "${cf_cv_makeflags+set}" = set; then
3681 echo $ECHO_N "(cached) $ECHO_C" >&6
3685 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3687 cat >cf_makeflags.tmp <<CF_EOF
3690 @ echo '.$cf_option'
3692 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[ ]*$,,'`
3693 case "$cf_result" in
3695 cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
3696 case "$cf_result" in
3697 (.*CC=*) cf_cv_makeflags=
3699 (*) cf_cv_makeflags=$cf_option
3708 echo "${as_me:-configure}:3708: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3713 rm -f cf_makeflags.tmp
3716 echo "$as_me:3716: result: $cf_cv_makeflags" >&5
3717 echo "${ECHO_T}$cf_cv_makeflags" >&6
3719 if test -n "$ac_tool_prefix"; then
3720 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3721 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3722 echo "$as_me:3722: checking for $ac_word" >&5
3723 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3724 if test "${ac_cv_prog_RANLIB+set}" = set; then
3725 echo $ECHO_N "(cached) $ECHO_C" >&6
3727 if test -n "$RANLIB"; then
3728 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3730 ac_save_IFS=$IFS; IFS=$ac_path_separator
3732 for ac_dir in $ac_dummy; do
3734 test -z "$ac_dir" && ac_dir=.
3735 $as_executable_p "$ac_dir/$ac_word" || continue
3736 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3737 echo "$as_me:3737: found $ac_dir/$ac_word" >&5
3743 RANLIB=$ac_cv_prog_RANLIB
3744 if test -n "$RANLIB"; then
3745 echo "$as_me:3745: result: $RANLIB" >&5
3746 echo "${ECHO_T}$RANLIB" >&6
3748 echo "$as_me:3748: result: no" >&5
3749 echo "${ECHO_T}no" >&6
3753 if test -z "$ac_cv_prog_RANLIB"; then
3754 ac_ct_RANLIB=$RANLIB
3755 # Extract the first word of "ranlib", so it can be a program name with args.
3756 set dummy ranlib; ac_word=$2
3757 echo "$as_me:3757: checking for $ac_word" >&5
3758 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3759 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3760 echo $ECHO_N "(cached) $ECHO_C" >&6
3762 if test -n "$ac_ct_RANLIB"; then
3763 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3765 ac_save_IFS=$IFS; IFS=$ac_path_separator
3767 for ac_dir in $ac_dummy; do
3769 test -z "$ac_dir" && ac_dir=.
3770 $as_executable_p "$ac_dir/$ac_word" || continue
3771 ac_cv_prog_ac_ct_RANLIB="ranlib"
3772 echo "$as_me:3772: found $ac_dir/$ac_word" >&5
3776 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3779 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3780 if test -n "$ac_ct_RANLIB"; then
3781 echo "$as_me:3781: result: $ac_ct_RANLIB" >&5
3782 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3784 echo "$as_me:3784: result: no" >&5
3785 echo "${ECHO_T}no" >&6
3788 RANLIB=$ac_ct_RANLIB
3790 RANLIB="$ac_cv_prog_RANLIB"
3793 if test -n "$ac_tool_prefix"; then
3794 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3795 set dummy ${ac_tool_prefix}ld; ac_word=$2
3796 echo "$as_me:3796: checking for $ac_word" >&5
3797 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3798 if test "${ac_cv_prog_LD+set}" = set; then
3799 echo $ECHO_N "(cached) $ECHO_C" >&6
3801 if test -n "$LD"; then
3802 ac_cv_prog_LD="$LD" # Let the user override the test.
3804 ac_save_IFS=$IFS; IFS=$ac_path_separator
3806 for ac_dir in $ac_dummy; do
3808 test -z "$ac_dir" && ac_dir=.
3809 $as_executable_p "$ac_dir/$ac_word" || continue
3810 ac_cv_prog_LD="${ac_tool_prefix}ld"
3811 echo "$as_me:3811: found $ac_dir/$ac_word" >&5
3818 if test -n "$LD"; then
3819 echo "$as_me:3819: result: $LD" >&5
3820 echo "${ECHO_T}$LD" >&6
3822 echo "$as_me:3822: result: no" >&5
3823 echo "${ECHO_T}no" >&6
3827 if test -z "$ac_cv_prog_LD"; then
3829 # Extract the first word of "ld", so it can be a program name with args.
3830 set dummy ld; ac_word=$2
3831 echo "$as_me:3831: checking for $ac_word" >&5
3832 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3833 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3834 echo $ECHO_N "(cached) $ECHO_C" >&6
3836 if test -n "$ac_ct_LD"; then
3837 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3839 ac_save_IFS=$IFS; IFS=$ac_path_separator
3841 for ac_dir in $ac_dummy; do
3843 test -z "$ac_dir" && ac_dir=.
3844 $as_executable_p "$ac_dir/$ac_word" || continue
3845 ac_cv_prog_ac_ct_LD="ld"
3846 echo "$as_me:3846: found $ac_dir/$ac_word" >&5
3850 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3853 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3854 if test -n "$ac_ct_LD"; then
3855 echo "$as_me:3855: result: $ac_ct_LD" >&5
3856 echo "${ECHO_T}$ac_ct_LD" >&6
3858 echo "$as_me:3858: result: no" >&5
3859 echo "${ECHO_T}no" >&6
3867 if test -n "$ac_tool_prefix"; then
3868 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3869 set dummy ${ac_tool_prefix}ar; ac_word=$2
3870 echo "$as_me:3870: checking for $ac_word" >&5
3871 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3872 if test "${ac_cv_prog_AR+set}" = set; then
3873 echo $ECHO_N "(cached) $ECHO_C" >&6
3875 if test -n "$AR"; then
3876 ac_cv_prog_AR="$AR" # Let the user override the test.
3878 ac_save_IFS=$IFS; IFS=$ac_path_separator
3880 for ac_dir in $ac_dummy; do
3882 test -z "$ac_dir" && ac_dir=.
3883 $as_executable_p "$ac_dir/$ac_word" || continue
3884 ac_cv_prog_AR="${ac_tool_prefix}ar"
3885 echo "$as_me:3885: found $ac_dir/$ac_word" >&5
3892 if test -n "$AR"; then
3893 echo "$as_me:3893: result: $AR" >&5
3894 echo "${ECHO_T}$AR" >&6
3896 echo "$as_me:3896: result: no" >&5
3897 echo "${ECHO_T}no" >&6
3901 if test -z "$ac_cv_prog_AR"; then
3903 # Extract the first word of "ar", so it can be a program name with args.
3904 set dummy ar; ac_word=$2
3905 echo "$as_me:3905: checking for $ac_word" >&5
3906 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3907 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3908 echo $ECHO_N "(cached) $ECHO_C" >&6
3910 if test -n "$ac_ct_AR"; then
3911 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3913 ac_save_IFS=$IFS; IFS=$ac_path_separator
3915 for ac_dir in $ac_dummy; do
3917 test -z "$ac_dir" && ac_dir=.
3918 $as_executable_p "$ac_dir/$ac_word" || continue
3919 ac_cv_prog_ac_ct_AR="ar"
3920 echo "$as_me:3920: found $ac_dir/$ac_word" >&5
3924 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3927 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3928 if test -n "$ac_ct_AR"; then
3929 echo "$as_me:3929: result: $ac_ct_AR" >&5
3930 echo "${ECHO_T}$ac_ct_AR" >&6
3932 echo "$as_me:3932: result: no" >&5
3933 echo "${ECHO_T}no" >&6
3941 if test -n "$ac_tool_prefix"; then
3942 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3943 set dummy ${ac_tool_prefix}ar; ac_word=$2
3944 echo "$as_me:3944: checking for $ac_word" >&5
3945 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3946 if test "${ac_cv_prog_AR+set}" = set; then
3947 echo $ECHO_N "(cached) $ECHO_C" >&6
3949 if test -n "$AR"; then
3950 ac_cv_prog_AR="$AR" # Let the user override the test.
3952 ac_save_IFS=$IFS; IFS=$ac_path_separator
3954 for ac_dir in $ac_dummy; do
3956 test -z "$ac_dir" && ac_dir=.
3957 $as_executable_p "$ac_dir/$ac_word" || continue
3958 ac_cv_prog_AR="${ac_tool_prefix}ar"
3959 echo "$as_me:3959: found $ac_dir/$ac_word" >&5
3966 if test -n "$AR"; then
3967 echo "$as_me:3967: result: $AR" >&5
3968 echo "${ECHO_T}$AR" >&6
3970 echo "$as_me:3970: result: no" >&5
3971 echo "${ECHO_T}no" >&6
3975 if test -z "$ac_cv_prog_AR"; then
3977 # Extract the first word of "ar", so it can be a program name with args.
3978 set dummy ar; ac_word=$2
3979 echo "$as_me:3979: checking for $ac_word" >&5
3980 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3981 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3982 echo $ECHO_N "(cached) $ECHO_C" >&6
3984 if test -n "$ac_ct_AR"; then
3985 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3987 ac_save_IFS=$IFS; IFS=$ac_path_separator
3989 for ac_dir in $ac_dummy; do
3991 test -z "$ac_dir" && ac_dir=.
3992 $as_executable_p "$ac_dir/$ac_word" || continue
3993 ac_cv_prog_ac_ct_AR="ar"
3994 echo "$as_me:3994: found $ac_dir/$ac_word" >&5
3998 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4001 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4002 if test -n "$ac_ct_AR"; then
4003 echo "$as_me:4003: result: $ac_ct_AR" >&5
4004 echo "${ECHO_T}$ac_ct_AR" >&6
4006 echo "$as_me:4006: result: no" >&5
4007 echo "${ECHO_T}no" >&6
4015 echo "$as_me:4015: checking for options to update archives" >&5
4016 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4017 if test "${cf_cv_ar_flags+set}" = set; then
4018 echo $ECHO_N "(cached) $ECHO_C" >&6
4021 case "$cf_cv_system_name" in
4024 cat >mk_static_lib.sh <<-EOF
4029 exec \$MSVC_BIN -out:"\$out" \$@
4031 chmod +x mk_static_lib.sh
4032 AR=`pwd`/mk_static_lib.sh
4035 cf_cv_ar_flags=unknown
4036 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4039 # check if $ARFLAGS already contains this choice
4040 if test "x$ARFLAGS" != "x" ; then
4041 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4042 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4048 rm -f "conftest.$ac_cv_objext"
4051 cat >"conftest.$ac_ext" <<EOF
4052 #line 4052 "configure"
4053 int testdata[3] = { 123, 456, 789 };
4055 if { (eval echo "$as_me:4055: \"$ac_compile\"") >&5
4056 (eval $ac_compile) 2>&5
4058 echo "$as_me:4058: \$? = $ac_status" >&5
4059 (exit "$ac_status"); } ; then
4060 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4061 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
4062 if test -f conftest.a ; then
4063 cf_cv_ar_flags="$cf_ar_flags"
4067 test -n "$verbose" && echo " cannot compile test-program" 1>&6
4069 echo "${as_me:-configure}:4069: testing cannot compile test-program ..." 1>&5
4074 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
4079 echo "$as_me:4079: result: $cf_cv_ar_flags" >&5
4080 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4082 if test -n "$ARFLAGS" ; then
4083 if test -n "$cf_cv_ar_flags" ; then
4084 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4087 ARFLAGS=$cf_cv_ar_flags
4090 echo "$as_me:4090: checking for PATH separator" >&5
4091 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4092 case "$cf_cv_system_name" in
4093 (os2*) PATH_SEPARATOR=';' ;;
4094 (*) ${PATH_SEPARATOR:=':'} ;;
4097 echo "$as_me:4097: result: $PATH_SEPARATOR" >&5
4098 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4100 echo "$as_me:4100: checking if you have specified an install-prefix" >&5
4101 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4103 # Check whether --with-install-prefix or --without-install-prefix was given.
4104 if test "${with_install_prefix+set}" = set; then
4105 withval="$with_install_prefix"
4109 (*) DESTDIR="$withval"
4113 echo "$as_me:4113: result: $DESTDIR" >&5
4114 echo "${ECHO_T}$DESTDIR" >&6
4116 ###############################################################################
4118 # If we're cross-compiling, allow the user to override the tools and their
4119 # options. The configure script is oriented toward identifying the host
4120 # compiler, etc., but we need a build compiler to generate parts of the source.
4122 if test "$cross_compiling" = yes ; then
4124 # defaults that we might want to override
4125 : ${BUILD_CFLAGS:=''}
4126 : ${BUILD_CPPFLAGS:=''}
4127 : ${BUILD_LDFLAGS:=''}
4129 : ${BUILD_EXEEXT:='$x'}
4130 : ${BUILD_OBJEXT:='o'}
4132 # Check whether --with-build-cc or --without-build-cc was given.
4133 if test "${with_build_cc+set}" = set; then
4134 withval="$with_build_cc"
4137 for ac_prog in gcc clang c99 c89 cc cl
4139 # Extract the first word of "$ac_prog", so it can be a program name with args.
4140 set dummy $ac_prog; ac_word=$2
4141 echo "$as_me:4141: checking for $ac_word" >&5
4142 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4143 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4144 echo $ECHO_N "(cached) $ECHO_C" >&6
4146 if test -n "$BUILD_CC"; then
4147 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4149 ac_save_IFS=$IFS; IFS=$ac_path_separator
4151 for ac_dir in $ac_dummy; do
4153 test -z "$ac_dir" && ac_dir=.
4154 $as_executable_p "$ac_dir/$ac_word" || continue
4155 ac_cv_prog_BUILD_CC="$ac_prog"
4156 echo "$as_me:4156: found $ac_dir/$ac_word" >&5
4162 BUILD_CC=$ac_cv_prog_BUILD_CC
4163 if test -n "$BUILD_CC"; then
4164 echo "$as_me:4164: result: $BUILD_CC" >&5
4165 echo "${ECHO_T}$BUILD_CC" >&6
4167 echo "$as_me:4167: result: no" >&5
4168 echo "${ECHO_T}no" >&6
4171 test -n "$BUILD_CC" && break
4173 test -n "$BUILD_CC" || BUILD_CC="none"
4176 echo "$as_me:4176: checking for native build C compiler" >&5
4177 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4178 echo "$as_me:4178: result: $BUILD_CC" >&5
4179 echo "${ECHO_T}$BUILD_CC" >&6
4181 echo "$as_me:4181: checking for native build C preprocessor" >&5
4182 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4184 # Check whether --with-build-cpp or --without-build-cpp was given.
4185 if test "${with_build_cpp+set}" = set; then
4186 withval="$with_build_cpp"
4187 BUILD_CPP="$withval"
4189 BUILD_CPP='${BUILD_CC} -E'
4191 echo "$as_me:4191: result: $BUILD_CPP" >&5
4192 echo "${ECHO_T}$BUILD_CPP" >&6
4194 echo "$as_me:4194: checking for native build C flags" >&5
4195 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4197 # Check whether --with-build-cflags or --without-build-cflags was given.
4198 if test "${with_build_cflags+set}" = set; then
4199 withval="$with_build_cflags"
4200 BUILD_CFLAGS="$withval"
4202 echo "$as_me:4202: result: $BUILD_CFLAGS" >&5
4203 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4205 echo "$as_me:4205: checking for native build C preprocessor-flags" >&5
4206 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4208 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4209 if test "${with_build_cppflags+set}" = set; then
4210 withval="$with_build_cppflags"
4211 BUILD_CPPFLAGS="$withval"
4213 echo "$as_me:4213: result: $BUILD_CPPFLAGS" >&5
4214 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4216 echo "$as_me:4216: checking for native build linker-flags" >&5
4217 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4219 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4220 if test "${with_build_ldflags+set}" = set; then
4221 withval="$with_build_ldflags"
4222 BUILD_LDFLAGS="$withval"
4224 echo "$as_me:4224: result: $BUILD_LDFLAGS" >&5
4225 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4227 echo "$as_me:4227: checking for native build linker-libraries" >&5
4228 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4230 # Check whether --with-build-libs or --without-build-libs was given.
4231 if test "${with_build_libs+set}" = set; then
4232 withval="$with_build_libs"
4233 BUILD_LIBS="$withval"
4235 echo "$as_me:4235: result: $BUILD_LIBS" >&5
4236 echo "${ECHO_T}$BUILD_LIBS" >&6
4238 # this assumes we're on Unix.
4242 : ${BUILD_CC:='${CC}'}
4244 if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
4245 { { echo "$as_me:4245: error: Cross-build requires two compilers.
4246 Use --with-build-cc to specify the native compiler." >&5
4247 echo "$as_me: error: Cross-build requires two compilers.
4248 Use --with-build-cc to specify the native compiler." >&2;}
4249 { (exit 1); exit 1; }; }
4253 : ${BUILD_CC:='${CC}'}
4254 : ${BUILD_CPP:='${CPP}'}
4255 : ${BUILD_CFLAGS:='${CFLAGS}'}
4256 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4257 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4258 : ${BUILD_LIBS:='${LIBS}'}
4259 : ${BUILD_EXEEXT:='$x'}
4260 : ${BUILD_OBJEXT:='o'}
4263 ###############################################################################
4265 ### Options to allow the user to specify the set of libraries which are used.
4266 ### Use "--without-normal --with-shared" to allow the default model to be
4267 ### shared, for example.
4270 echo "$as_me:4270: checking if you want to build shared C-objects" >&5
4271 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
4273 # Check whether --with-shared or --without-shared was given.
4274 if test "${with_shared+set}" = set; then
4275 withval="$with_shared"
4276 with_shared=$withval
4280 echo "$as_me:4280: result: $with_shared" >&5
4281 echo "${ECHO_T}$with_shared" >&6
4282 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4284 echo "$as_me:4284: checking for specified models" >&5
4285 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4286 test -z "$cf_list_models" && cf_list_models=normal
4287 echo "$as_me:4287: result: $cf_list_models" >&5
4288 echo "${ECHO_T}$cf_list_models" >&6
4290 ### Use the first model as the default, and save its suffix for use in building
4291 ### up test-applications.
4292 echo "$as_me:4292: checking for default model" >&5
4293 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4294 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4295 echo "$as_me:4295: result: $DFT_LWR_MODEL" >&5
4296 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4298 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4300 echo "$as_me:4300: checking for specific curses-directory" >&5
4301 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4303 # Check whether --with-curses-dir or --without-curses-dir was given.
4304 if test "${with_curses_dir+set}" = set; then
4305 withval="$with_curses_dir"
4306 cf_cv_curses_dir=$withval
4310 echo "$as_me:4310: result: $cf_cv_curses_dir" >&5
4311 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4313 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
4316 if test "x$prefix" != xNONE; then
4317 cf_path_syntax="$prefix"
4319 cf_path_syntax="$ac_default_prefix"
4327 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4329 (.\$\{*prefix\}*|.\$\{*dir\}*)
4330 eval withval="$withval"
4333 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4338 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4341 { { echo "$as_me:4341: error: expected a pathname, not \"$withval\"" >&5
4342 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4343 { (exit 1); exit 1; }; }
4347 if test -d "$cf_cv_curses_dir"
4350 if test -n "$cf_cv_curses_dir/include" ; then
4351 for cf_add_incdir in $cf_cv_curses_dir/include
4353 while test "$cf_add_incdir" != /usr/include
4355 if test -d "$cf_add_incdir"
4358 if test -n "$CFLAGS$CPPFLAGS" ; then
4359 # a loop is needed to ensure we can add subdirs of existing dirs
4360 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4361 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4362 cf_have_incdir=yes; break
4367 if test "$cf_have_incdir" = no ; then
4368 if test "$cf_add_incdir" = /usr/local/include ; then
4369 if test "$GCC" = yes
4371 cf_save_CPPFLAGS=$CPPFLAGS
4373 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4374 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4376 cat >"conftest.$ac_ext" <<_ACEOF
4377 #line 4377 "configure"
4378 #include "confdefs.h"
4388 rm -f "conftest.$ac_objext"
4389 if { (eval echo "$as_me:4389: \"$ac_compile\"") >&5
4390 (eval $ac_compile) 2>&5
4392 echo "$as_me:4392: \$? = $ac_status" >&5
4393 (exit "$ac_status"); } &&
4394 { ac_try='test -s "conftest.$ac_objext"'
4395 { (eval echo "$as_me:4395: \"$ac_try\"") >&5
4398 echo "$as_me:4398: \$? = $ac_status" >&5
4399 (exit "$ac_status"); }; }; then
4402 echo "$as_me: failed program was:" >&5
4403 cat "conftest.$ac_ext" >&5
4406 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4407 CPPFLAGS=$cf_save_CPPFLAGS
4412 if test "$cf_have_incdir" = no ; then
4413 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4415 echo "${as_me:-configure}:4415: testing adding $cf_add_incdir to include-path ..." 1>&5
4417 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4419 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
4420 test "$cf_top_incdir" = "$cf_add_incdir" && break
4421 cf_add_incdir="$cf_top_incdir"
4432 if test -n "$cf_cv_curses_dir/lib" ; then
4433 for cf_add_libdir in $cf_cv_curses_dir/lib
4435 if test "$cf_add_libdir" = /usr/lib ; then
4437 elif test -d "$cf_add_libdir"
4440 if test -n "$LDFLAGS$LIBS" ; then
4441 # a loop is needed to ensure we can add subdirs of existing dirs
4442 for cf_test_libdir in $LDFLAGS $LIBS ; do
4443 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4444 cf_have_libdir=yes; break
4448 if test "$cf_have_libdir" = no ; then
4449 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4451 echo "${as_me:-configure}:4451: testing adding $cf_add_libdir to library-path ..." 1>&5
4453 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4462 cf_ncuconfig_root=ncurses
4463 cf_have_ncuconfig=no
4465 if test "x${PKG_CONFIG:=none}" != xnone; then
4466 echo "$as_me:4466: checking pkg-config for $cf_ncuconfig_root" >&5
4467 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
4468 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
4469 echo "$as_me:4469: result: yes" >&5
4470 echo "${ECHO_T}yes" >&6
4472 echo "$as_me:4472: checking if the $cf_ncuconfig_root package files work" >&5
4473 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
4474 cf_have_ncuconfig=unknown
4476 cf_save_CFLAGS="$CFLAGS"
4477 cf_save_CPPFLAGS="$CPPFLAGS"
4478 cf_save_LIBS="$LIBS"
4480 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
4481 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
4483 # while -W for passing linker flags is prevalent, it is not "standard".
4484 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
4485 # incompatible _and_ non-standard -W option which gives an error. Work
4486 # around that pitfall.
4487 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
4493 cf_new_extra_cppflags=
4495 for cf_add_cflags in $cf_pkg_cflags
4497 case "$cf_fix_cppflags" in
4499 case "$cf_add_cflags" in
4500 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4501 case "$cf_add_cflags" in
4503 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4505 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4506 && test -z "${cf_tst_cflags}" \
4507 && cf_fix_cppflags=yes
4509 if test "$cf_fix_cppflags" = yes ; then
4511 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4512 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4515 elif test "${cf_tst_cflags}" = "\"'" ; then
4517 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4518 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4528 case "$cf_add_cflags" in
4530 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4532 CPPFLAGS=`echo "$CPPFLAGS" | \
4533 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4534 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4539 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4540 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4547 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4548 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4555 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4556 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4558 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4560 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4561 && test -z "${cf_tst_cflags}" \
4562 && cf_fix_cppflags=no
4567 if test -n "$cf_new_cflags" ; then
4569 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4570 CFLAGS="${CFLAGS}$cf_new_cflags"
4574 if test -n "$cf_new_cppflags" ; then
4576 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4577 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4581 if test -n "$cf_new_extra_cppflags" ; then
4583 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4584 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4591 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4593 for cf_add_1lib in $cf_add_0lib; do
4594 for cf_add_2lib in $cf_add_libs; do
4595 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4600 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4604 cat >"conftest.$ac_ext" <<_ACEOF
4605 #line 4605 "configure"
4606 #include "confdefs.h"
4607 #include <${cf_cv_ncurses_header:-curses.h}>
4611 initscr(); mousemask(0,0); tigetstr((char *)0);
4616 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4617 if { (eval echo "$as_me:4617: \"$ac_link\"") >&5
4618 (eval $ac_link) 2>&5
4620 echo "$as_me:4620: \$? = $ac_status" >&5
4621 (exit "$ac_status"); } &&
4622 { ac_try='test -s "conftest$ac_exeext"'
4623 { (eval echo "$as_me:4623: \"$ac_try\"") >&5
4626 echo "$as_me:4626: \$? = $ac_status" >&5
4627 (exit "$ac_status"); }; }; then
4628 if test "$cross_compiling" = yes; then
4629 cf_test_ncuconfig=maybe
4631 cat >"conftest.$ac_ext" <<_ACEOF
4632 #line 4632 "configure"
4633 #include "confdefs.h"
4634 #include <${cf_cv_ncurses_header:-curses.h}>
4636 { const char *xx = curses_version(); return (xx == 0); }
4638 rm -f "conftest$ac_exeext"
4639 if { (eval echo "$as_me:4639: \"$ac_link\"") >&5
4640 (eval $ac_link) 2>&5
4642 echo "$as_me:4642: \$? = $ac_status" >&5
4643 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4644 { (eval echo "$as_me:4644: \"$ac_try\"") >&5
4647 echo "$as_me:4647: \$? = $ac_status" >&5
4648 (exit "$ac_status"); }; }; then
4649 cf_test_ncuconfig=yes
4651 echo "$as_me: program exited with status $ac_status" >&5
4652 echo "$as_me: failed program was:" >&5
4653 cat "conftest.$ac_ext" >&5
4654 cf_test_ncuconfig=no
4656 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4659 echo "$as_me: failed program was:" >&5
4660 cat "conftest.$ac_ext" >&5
4661 cf_test_ncuconfig=no
4663 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4665 CFLAGS="$cf_save_CFLAGS"
4666 CPPFLAGS="$cf_save_CPPFLAGS"
4667 LIBS="$cf_save_LIBS"
4669 if test "x$cf_test_ncuconfig" != xyes; then
4670 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4671 cf_pkg_cflags="$cf_temp"
4672 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4673 cf_pkg_libs="$cf_temp"
4678 for cf_add_cflags in $cf_pkg_cflags
4680 case "x$cf_add_cflags" in
4683 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4686 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'`
4687 test "$CFLAGS" != "$cf_old_cflag" || break
4689 CFLAGS="$cf_old_cflag"
4692 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4695 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'`
4696 test "$CPPFLAGS" != "$cf_old_cflag" || break
4698 CPPFLAGS="$cf_old_cflag"
4707 cf_new_extra_cppflags=
4709 for cf_add_cflags in $cf_add_cflags
4711 case "$cf_fix_cppflags" in
4713 case "$cf_add_cflags" in
4714 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4715 case "$cf_add_cflags" in
4717 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4719 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4720 && test -z "${cf_tst_cflags}" \
4721 && cf_fix_cppflags=yes
4723 if test "$cf_fix_cppflags" = yes ; then
4725 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4726 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4729 elif test "${cf_tst_cflags}" = "\"'" ; then
4731 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4732 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4742 case "$cf_add_cflags" in
4744 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4746 CPPFLAGS=`echo "$CPPFLAGS" | \
4747 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4748 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4753 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4754 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4761 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4762 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4769 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4770 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4772 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4774 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4775 && test -z "${cf_tst_cflags}" \
4776 && cf_fix_cppflags=no
4781 if test -n "$cf_new_cflags" ; then
4783 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4784 CFLAGS="${CFLAGS}$cf_new_cflags"
4788 if test -n "$cf_new_cppflags" ; then
4790 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4791 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4795 if test -n "$cf_new_extra_cppflags" ; then
4797 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4798 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4807 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4809 for cf_add_1lib in $cf_add_0lib; do
4810 for cf_add_2lib in $cf_add_libs; do
4811 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4816 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4820 cat >"conftest.$ac_ext" <<_ACEOF
4821 #line 4821 "configure"
4822 #include "confdefs.h"
4823 #include <${cf_cv_ncurses_header:-curses.h}>
4827 initscr(); mousemask(0,0); tigetstr((char *)0);
4832 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4833 if { (eval echo "$as_me:4833: \"$ac_link\"") >&5
4834 (eval $ac_link) 2>&5
4836 echo "$as_me:4836: \$? = $ac_status" >&5
4837 (exit "$ac_status"); } &&
4838 { ac_try='test -s "conftest$ac_exeext"'
4839 { (eval echo "$as_me:4839: \"$ac_try\"") >&5
4842 echo "$as_me:4842: \$? = $ac_status" >&5
4843 (exit "$ac_status"); }; }; then
4844 if test "$cross_compiling" = yes; then
4845 cf_have_ncuconfig=maybe
4847 cat >"conftest.$ac_ext" <<_ACEOF
4848 #line 4848 "configure"
4849 #include "confdefs.h"
4850 #include <${cf_cv_ncurses_header:-curses.h}>
4852 { const char *xx = curses_version(); return (xx == 0); }
4854 rm -f "conftest$ac_exeext"
4855 if { (eval echo "$as_me:4855: \"$ac_link\"") >&5
4856 (eval $ac_link) 2>&5
4858 echo "$as_me:4858: \$? = $ac_status" >&5
4859 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4860 { (eval echo "$as_me:4860: \"$ac_try\"") >&5
4863 echo "$as_me:4863: \$? = $ac_status" >&5
4864 (exit "$ac_status"); }; }; then
4865 cf_have_ncuconfig=yes
4867 echo "$as_me: program exited with status $ac_status" >&5
4868 echo "$as_me: failed program was:" >&5
4869 cat "conftest.$ac_ext" >&5
4870 cf_have_ncuconfig=no
4872 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4875 echo "$as_me: failed program was:" >&5
4876 cat "conftest.$ac_ext" >&5
4877 cf_have_ncuconfig=no
4879 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4880 echo "$as_me:4880: result: $cf_have_ncuconfig" >&5
4881 echo "${ECHO_T}$cf_have_ncuconfig" >&6
4882 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
4883 if test "$cf_have_ncuconfig" != "yes"
4885 CPPFLAGS="$cf_save_CPPFLAGS"
4886 LIBS="$cf_save_LIBS"
4887 NCURSES_CONFIG_PKG=none
4890 cat >>confdefs.h <<\EOF
4894 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
4896 echo "$as_me:4896: checking for terminfo header" >&5
4897 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4898 if test "${cf_cv_term_header+set}" = set; then
4899 echo $ECHO_N "(cached) $ECHO_C" >&6
4902 case "${cf_cv_ncurses_header}" in
4903 (*/ncurses.h|*/ncursesw.h)
4904 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4907 cf_term_header=term.h
4911 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4913 cat >"conftest.$ac_ext" <<_ACEOF
4914 #line 4914 "configure"
4915 #include "confdefs.h"
4917 #include <${cf_cv_ncurses_header:-curses.h}>
4923 int x = auto_left_margin; (void)x
4928 rm -f "conftest.$ac_objext"
4929 if { (eval echo "$as_me:4929: \"$ac_compile\"") >&5
4930 (eval $ac_compile) 2>&5
4932 echo "$as_me:4932: \$? = $ac_status" >&5
4933 (exit "$ac_status"); } &&
4934 { ac_try='test -s "conftest.$ac_objext"'
4935 { (eval echo "$as_me:4935: \"$ac_try\"") >&5
4938 echo "$as_me:4938: \$? = $ac_status" >&5
4939 (exit "$ac_status"); }; }; then
4941 cf_cv_term_header="$cf_test"
4943 echo "$as_me: failed program was:" >&5
4944 cat "conftest.$ac_ext" >&5
4946 cf_cv_term_header=unknown
4949 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4950 test "$cf_cv_term_header" != unknown && break
4954 echo "$as_me:4954: result: $cf_cv_term_header" >&5
4955 echo "${ECHO_T}$cf_cv_term_header" >&6
4957 # Set definitions to allow ifdef'ing to accommodate subdirectories
4959 case "$cf_cv_term_header" in
4962 cat >>confdefs.h <<\EOF
4963 #define HAVE_TERM_H 1
4969 case "$cf_cv_term_header" in
4972 cat >>confdefs.h <<\EOF
4973 #define HAVE_NCURSES_TERM_H 1
4979 cat >>confdefs.h <<\EOF
4980 #define HAVE_NCURSESW_TERM_H 1
4989 echo "$as_me:4989: result: no" >&5
4990 echo "${ECHO_T}no" >&6
4991 NCURSES_CONFIG_PKG=none
4994 NCURSES_CONFIG_PKG=none
4997 if test "x$cf_have_ncuconfig" = "xno"; then
4998 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
5000 if test -n "$ac_tool_prefix"; then
5001 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5003 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5004 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5005 echo "$as_me:5005: checking for $ac_word" >&5
5006 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5007 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5008 echo $ECHO_N "(cached) $ECHO_C" >&6
5010 if test -n "$NCURSES_CONFIG"; then
5011 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5013 ac_save_IFS=$IFS; IFS=$ac_path_separator
5015 for ac_dir in $ac_dummy; do
5017 test -z "$ac_dir" && ac_dir=.
5018 $as_executable_p "$ac_dir/$ac_word" || continue
5019 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5020 echo "$as_me:5020: found $ac_dir/$ac_word" >&5
5026 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5027 if test -n "$NCURSES_CONFIG"; then
5028 echo "$as_me:5028: result: $NCURSES_CONFIG" >&5
5029 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5031 echo "$as_me:5031: result: no" >&5
5032 echo "${ECHO_T}no" >&6
5035 test -n "$NCURSES_CONFIG" && break
5038 if test -z "$NCURSES_CONFIG"; then
5039 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5040 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5042 # Extract the first word of "$ac_prog", so it can be a program name with args.
5043 set dummy $ac_prog; ac_word=$2
5044 echo "$as_me:5044: checking for $ac_word" >&5
5045 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5046 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5047 echo $ECHO_N "(cached) $ECHO_C" >&6
5049 if test -n "$ac_ct_NCURSES_CONFIG"; then
5050 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5052 ac_save_IFS=$IFS; IFS=$ac_path_separator
5054 for ac_dir in $ac_dummy; do
5056 test -z "$ac_dir" && ac_dir=.
5057 $as_executable_p "$ac_dir/$ac_word" || continue
5058 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5059 echo "$as_me:5059: found $ac_dir/$ac_word" >&5
5065 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5066 if test -n "$ac_ct_NCURSES_CONFIG"; then
5067 echo "$as_me:5067: result: $ac_ct_NCURSES_CONFIG" >&5
5068 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5070 echo "$as_me:5070: result: no" >&5
5071 echo "${ECHO_T}no" >&6
5074 test -n "$ac_ct_NCURSES_CONFIG" && break
5076 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5078 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5081 if test "$NCURSES_CONFIG" != none ; then
5083 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
5085 case "x$cf_add_cflags" in
5088 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5091 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'`
5092 test "$CFLAGS" != "$cf_old_cflag" || break
5094 CFLAGS="$cf_old_cflag"
5097 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5100 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'`
5101 test "$CPPFLAGS" != "$cf_old_cflag" || break
5103 CPPFLAGS="$cf_old_cflag"
5112 cf_new_extra_cppflags=
5114 for cf_add_cflags in $cf_add_cflags
5116 case "$cf_fix_cppflags" in
5118 case "$cf_add_cflags" in
5119 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5120 case "$cf_add_cflags" in
5122 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5124 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5125 && test -z "${cf_tst_cflags}" \
5126 && cf_fix_cppflags=yes
5128 if test "$cf_fix_cppflags" = yes ; then
5130 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5131 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5134 elif test "${cf_tst_cflags}" = "\"'" ; then
5136 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5137 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5147 case "$cf_add_cflags" in
5149 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5151 CPPFLAGS=`echo "$CPPFLAGS" | \
5152 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5153 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5158 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5159 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5166 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5167 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5174 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5175 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5177 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5179 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5180 && test -z "${cf_tst_cflags}" \
5181 && cf_fix_cppflags=no
5186 if test -n "$cf_new_cflags" ; then
5188 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5189 CFLAGS="${CFLAGS}$cf_new_cflags"
5193 if test -n "$cf_new_cppflags" ; then
5195 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5196 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5200 if test -n "$cf_new_extra_cppflags" ; then
5202 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5203 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5212 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5214 for cf_add_1lib in $cf_add_0lib; do
5215 for cf_add_2lib in $cf_add_libs; do
5216 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5221 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5225 # even with config script, some packages use no-override for curses.h
5227 echo "$as_me:5227: checking if we have identified curses headers" >&5
5228 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5229 if test "${cf_cv_ncurses_header+set}" = set; then
5230 echo $ECHO_N "(cached) $ECHO_C" >&6
5233 cf_cv_ncurses_header=none
5235 ncurses.h ncurses/ncurses.h \
5236 curses.h ncurses/curses.h
5238 cat >"conftest.$ac_ext" <<_ACEOF
5239 #line 5239 "configure"
5240 #include "confdefs.h"
5241 #include <${cf_header}>
5245 initscr(); tgoto("?", 0,0)
5250 rm -f "conftest.$ac_objext"
5251 if { (eval echo "$as_me:5251: \"$ac_compile\"") >&5
5252 (eval $ac_compile) 2>&5
5254 echo "$as_me:5254: \$? = $ac_status" >&5
5255 (exit "$ac_status"); } &&
5256 { ac_try='test -s "conftest.$ac_objext"'
5257 { (eval echo "$as_me:5257: \"$ac_try\"") >&5
5260 echo "$as_me:5260: \$? = $ac_status" >&5
5261 (exit "$ac_status"); }; }; then
5262 cf_cv_ncurses_header=$cf_header; break
5264 echo "$as_me: failed program was:" >&5
5265 cat "conftest.$ac_ext" >&5
5267 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5271 echo "$as_me:5271: result: $cf_cv_ncurses_header" >&5
5272 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5274 if test "$cf_cv_ncurses_header" = none ; then
5275 { { echo "$as_me:5275: error: No curses header-files found" >&5
5276 echo "$as_me: error: No curses header-files found" >&2;}
5277 { (exit 1); exit 1; }; }
5280 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5282 for ac_header in $cf_cv_ncurses_header
5284 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5285 echo "$as_me:5285: checking for $ac_header" >&5
5286 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5287 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5288 echo $ECHO_N "(cached) $ECHO_C" >&6
5290 cat >"conftest.$ac_ext" <<_ACEOF
5291 #line 5291 "configure"
5292 #include "confdefs.h"
5293 #include <$ac_header>
5295 if { (eval echo "$as_me:5295: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5296 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5298 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5300 cat conftest.err >&5
5301 echo "$as_me:5301: \$? = $ac_status" >&5
5302 (exit "$ac_status"); } >/dev/null; then
5303 if test -s conftest.err; then
5304 ac_cpp_err=$ac_c_preproc_warn_flag
5311 if test -z "$ac_cpp_err"; then
5312 eval "$as_ac_Header=yes"
5314 echo "$as_me: failed program was:" >&5
5315 cat "conftest.$ac_ext" >&5
5316 eval "$as_ac_Header=no"
5318 rm -f conftest.err "conftest.$ac_ext"
5320 echo "$as_me:5320: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5321 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5322 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5323 cat >>confdefs.h <<EOF
5324 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5330 cat >>confdefs.h <<\EOF
5334 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5336 cat >>confdefs.h <<EOF
5337 #define $cf_nculib_ROOT 1
5340 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
5344 cf_ncuhdr_root=ncurses
5346 test -n "$cf_cv_curses_dir" && \
5347 test "$cf_cv_curses_dir" != "no" && { \
5349 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5350 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5352 while test "$cf_add_incdir" != /usr/include
5354 if test -d "$cf_add_incdir"
5357 if test -n "$CFLAGS$CPPFLAGS" ; then
5358 # a loop is needed to ensure we can add subdirs of existing dirs
5359 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5360 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5361 cf_have_incdir=yes; break
5366 if test "$cf_have_incdir" = no ; then
5367 if test "$cf_add_incdir" = /usr/local/include ; then
5368 if test "$GCC" = yes
5370 cf_save_CPPFLAGS=$CPPFLAGS
5372 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5373 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5375 cat >"conftest.$ac_ext" <<_ACEOF
5376 #line 5376 "configure"
5377 #include "confdefs.h"
5387 rm -f "conftest.$ac_objext"
5388 if { (eval echo "$as_me:5388: \"$ac_compile\"") >&5
5389 (eval $ac_compile) 2>&5
5391 echo "$as_me:5391: \$? = $ac_status" >&5
5392 (exit "$ac_status"); } &&
5393 { ac_try='test -s "conftest.$ac_objext"'
5394 { (eval echo "$as_me:5394: \"$ac_try\"") >&5
5397 echo "$as_me:5397: \$? = $ac_status" >&5
5398 (exit "$ac_status"); }; }; then
5401 echo "$as_me: failed program was:" >&5
5402 cat "conftest.$ac_ext" >&5
5405 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5406 CPPFLAGS=$cf_save_CPPFLAGS
5411 if test "$cf_have_incdir" = no ; then
5412 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5414 echo "${as_me:-configure}:5414: testing adding $cf_add_incdir to include-path ..." 1>&5
5416 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5418 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5419 test "$cf_top_incdir" = "$cf_add_incdir" && break
5420 cf_add_incdir="$cf_top_incdir"
5433 echo "$as_me:5433: checking for $cf_ncuhdr_root header in include-path" >&5
5434 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5435 if test "${cf_cv_ncurses_h+set}" = set; then
5436 echo $ECHO_N "(cached) $ECHO_C" >&6
5439 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5440 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
5441 for cf_header in $cf_header_list
5444 cat >"conftest.$ac_ext" <<_ACEOF
5445 #line 5445 "configure"
5446 #include "confdefs.h"
5448 #include <$cf_header>
5453 #ifdef NCURSES_VERSION
5455 printf("%s\\n", NCURSES_VERSION);
5468 rm -f "conftest.$ac_objext"
5469 if { (eval echo "$as_me:5469: \"$ac_compile\"") >&5
5470 (eval $ac_compile) 2>&5
5472 echo "$as_me:5472: \$? = $ac_status" >&5
5473 (exit "$ac_status"); } &&
5474 { ac_try='test -s "conftest.$ac_objext"'
5475 { (eval echo "$as_me:5475: \"$ac_try\"") >&5
5478 echo "$as_me:5478: \$? = $ac_status" >&5
5479 (exit "$ac_status"); }; }; then
5480 cf_cv_ncurses_h=$cf_header
5483 echo "$as_me: failed program was:" >&5
5484 cat "conftest.$ac_ext" >&5
5487 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5489 test "$cf_cv_ncurses_h" != no && break
5493 echo "$as_me:5493: result: $cf_cv_ncurses_h" >&5
5494 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5496 if test "$cf_cv_ncurses_h" != no ; then
5497 cf_cv_ncurses_header=$cf_cv_ncurses_h
5500 echo "$as_me:5500: checking for $cf_ncuhdr_root include-path" >&5
5501 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5502 if test "${cf_cv_ncurses_h2+set}" = set; then
5503 echo $ECHO_N "(cached) $ECHO_C" >&6
5506 test -n "$verbose" && echo
5510 # collect the current set of include-directories from compiler flags
5511 cf_header_path_list=""
5512 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5513 for cf_header_path in $CPPFLAGS $CFLAGS
5515 case "$cf_header_path" in
5517 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5519 test "x$cf_header_path" != "xNONE" && \
5520 test -d "$cf_header_path" && \
5522 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5523 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
5524 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5525 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5526 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5527 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"
5530 cf_header_path_list="$cf_header_path_list $cf_search"
5536 # add the variations for the package we are looking for
5540 test "x$prefix" != "xNONE" && \
5541 test -d "$prefix" && \
5543 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5544 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
5545 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5546 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5547 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5548 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5551 for cf_subdir_prefix in \
5560 test "x$cf_subdir_prefix" != "x$prefix" && \
5561 test -d "$cf_subdir_prefix" && \
5562 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
5563 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5564 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
5565 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
5566 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
5567 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
5568 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"
5573 test "$includedir" != NONE && \
5574 test "$includedir" != "/usr/include" && \
5575 test -d "$includedir" && {
5576 test -d "$includedir" && cf_search="$cf_search $includedir"
5577 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5580 test "$oldincludedir" != NONE && \
5581 test "$oldincludedir" != "/usr/include" && \
5582 test -d "$oldincludedir" && {
5583 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
5584 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5587 cf_search="$cf_search $cf_header_path_list"
5589 test -n "$verbose" && echo "search path $cf_search"
5590 cf_save2_CPPFLAGS="$CPPFLAGS"
5591 for cf_incdir in $cf_search
5594 if test -n "$cf_incdir" ; then
5595 for cf_add_incdir in $cf_incdir
5597 while test "$cf_add_incdir" != /usr/include
5599 if test -d "$cf_add_incdir"
5602 if test -n "$CFLAGS$CPPFLAGS" ; then
5603 # a loop is needed to ensure we can add subdirs of existing dirs
5604 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5605 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5606 cf_have_incdir=yes; break
5611 if test "$cf_have_incdir" = no ; then
5612 if test "$cf_add_incdir" = /usr/local/include ; then
5613 if test "$GCC" = yes
5615 cf_save_CPPFLAGS=$CPPFLAGS
5617 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5618 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5620 cat >"conftest.$ac_ext" <<_ACEOF
5621 #line 5621 "configure"
5622 #include "confdefs.h"
5632 rm -f "conftest.$ac_objext"
5633 if { (eval echo "$as_me:5633: \"$ac_compile\"") >&5
5634 (eval $ac_compile) 2>&5
5636 echo "$as_me:5636: \$? = $ac_status" >&5
5637 (exit "$ac_status"); } &&
5638 { ac_try='test -s "conftest.$ac_objext"'
5639 { (eval echo "$as_me:5639: \"$ac_try\"") >&5
5642 echo "$as_me:5642: \$? = $ac_status" >&5
5643 (exit "$ac_status"); }; }; then
5646 echo "$as_me: failed program was:" >&5
5647 cat "conftest.$ac_ext" >&5
5650 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5651 CPPFLAGS=$cf_save_CPPFLAGS
5656 if test "$cf_have_incdir" = no ; then
5657 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5659 echo "${as_me:-configure}:5659: testing adding $cf_add_incdir to include-path ..." 1>&5
5661 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5663 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5664 test "$cf_top_incdir" = "$cf_add_incdir" && break
5665 cf_add_incdir="$cf_top_incdir"
5681 cat >"conftest.$ac_ext" <<_ACEOF
5682 #line 5682 "configure"
5683 #include "confdefs.h"
5685 #include <$cf_header>
5690 #ifdef NCURSES_VERSION
5692 printf("%s\\n", NCURSES_VERSION);
5705 rm -f "conftest.$ac_objext"
5706 if { (eval echo "$as_me:5706: \"$ac_compile\"") >&5
5707 (eval $ac_compile) 2>&5
5709 echo "$as_me:5709: \$? = $ac_status" >&5
5710 (exit "$ac_status"); } &&
5711 { ac_try='test -s "conftest.$ac_objext"'
5712 { (eval echo "$as_me:5712: \"$ac_try\"") >&5
5715 echo "$as_me:5715: \$? = $ac_status" >&5
5716 (exit "$ac_status"); }; }; then
5717 cf_cv_ncurses_h2=$cf_header
5720 echo "$as_me: failed program was:" >&5
5721 cat "conftest.$ac_ext" >&5
5724 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5726 if test "$cf_cv_ncurses_h2" != no ; then
5727 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5728 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
5731 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5733 CPPFLAGS="$cf_save2_CPPFLAGS"
5734 test "$cf_cv_ncurses_h2" != no && break
5736 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5736: error: not found" >&5
5737 echo "$as_me: error: not found" >&2;}
5738 { (exit 1); exit 1; }; }
5741 echo "$as_me:5741: result: $cf_cv_ncurses_h2" >&5
5742 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5744 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
5745 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
5746 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
5747 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
5750 if test -n "$cf_1st_incdir" ; then
5751 for cf_add_incdir in $cf_1st_incdir
5753 while test "$cf_add_incdir" != /usr/include
5755 if test -d "$cf_add_incdir"
5758 if test -n "$CFLAGS$CPPFLAGS" ; then
5759 # a loop is needed to ensure we can add subdirs of existing dirs
5760 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5761 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5762 cf_have_incdir=yes; break
5767 if test "$cf_have_incdir" = no ; then
5768 if test "$cf_add_incdir" = /usr/local/include ; then
5769 if test "$GCC" = yes
5771 cf_save_CPPFLAGS=$CPPFLAGS
5773 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5774 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5776 cat >"conftest.$ac_ext" <<_ACEOF
5777 #line 5777 "configure"
5778 #include "confdefs.h"
5788 rm -f "conftest.$ac_objext"
5789 if { (eval echo "$as_me:5789: \"$ac_compile\"") >&5
5790 (eval $ac_compile) 2>&5
5792 echo "$as_me:5792: \$? = $ac_status" >&5
5793 (exit "$ac_status"); } &&
5794 { ac_try='test -s "conftest.$ac_objext"'
5795 { (eval echo "$as_me:5795: \"$ac_try\"") >&5
5798 echo "$as_me:5798: \$? = $ac_status" >&5
5799 (exit "$ac_status"); }; }; then
5802 echo "$as_me: failed program was:" >&5
5803 cat "conftest.$ac_ext" >&5
5806 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5807 CPPFLAGS=$cf_save_CPPFLAGS
5812 if test "$cf_have_incdir" = no ; then
5813 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5815 echo "${as_me:-configure}:5815: testing adding $cf_add_incdir to include-path ..." 1>&5
5817 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5819 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5820 test "$cf_top_incdir" = "$cf_add_incdir" && break
5821 cf_add_incdir="$cf_top_incdir"
5834 # Set definitions to allow ifdef'ing for ncurses.h
5836 case "$cf_cv_ncurses_header" in
5839 cat >>confdefs.h <<\EOF
5840 #define HAVE_NCURSES_H 1
5846 case "$cf_cv_ncurses_header" in
5847 (ncurses/curses.h|ncurses/ncurses.h)
5849 cat >>confdefs.h <<\EOF
5850 #define HAVE_NCURSES_NCURSES_H 1
5854 (ncursesw/curses.h|ncursesw/ncurses.h)
5856 cat >>confdefs.h <<\EOF
5857 #define HAVE_NCURSESW_NCURSES_H 1
5863 echo "$as_me:5863: checking for terminfo header" >&5
5864 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5865 if test "${cf_cv_term_header+set}" = set; then
5866 echo $ECHO_N "(cached) $ECHO_C" >&6
5869 case "${cf_cv_ncurses_header}" in
5870 (*/ncurses.h|*/ncursesw.h)
5871 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5874 cf_term_header=term.h
5878 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5880 cat >"conftest.$ac_ext" <<_ACEOF
5881 #line 5881 "configure"
5882 #include "confdefs.h"
5884 #include <${cf_cv_ncurses_header:-curses.h}>
5890 int x = auto_left_margin; (void)x
5895 rm -f "conftest.$ac_objext"
5896 if { (eval echo "$as_me:5896: \"$ac_compile\"") >&5
5897 (eval $ac_compile) 2>&5
5899 echo "$as_me:5899: \$? = $ac_status" >&5
5900 (exit "$ac_status"); } &&
5901 { ac_try='test -s "conftest.$ac_objext"'
5902 { (eval echo "$as_me:5902: \"$ac_try\"") >&5
5905 echo "$as_me:5905: \$? = $ac_status" >&5
5906 (exit "$ac_status"); }; }; then
5908 cf_cv_term_header="$cf_test"
5910 echo "$as_me: failed program was:" >&5
5911 cat "conftest.$ac_ext" >&5
5913 cf_cv_term_header=unknown
5916 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5917 test "$cf_cv_term_header" != unknown && break
5921 echo "$as_me:5921: result: $cf_cv_term_header" >&5
5922 echo "${ECHO_T}$cf_cv_term_header" >&6
5924 # Set definitions to allow ifdef'ing to accommodate subdirectories
5926 case "$cf_cv_term_header" in
5929 cat >>confdefs.h <<\EOF
5930 #define HAVE_TERM_H 1
5936 case "$cf_cv_term_header" in
5939 cat >>confdefs.h <<\EOF
5940 #define HAVE_NCURSES_TERM_H 1
5946 cat >>confdefs.h <<\EOF
5947 #define HAVE_NCURSESW_TERM_H 1
5953 # some applications need this, but should check for NCURSES_VERSION
5955 cat >>confdefs.h <<\EOF
5959 echo "$as_me:5959: checking for ncurses version" >&5
5960 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5961 if test "${cf_cv_ncurses_version+set}" = set; then
5962 echo $ECHO_N "(cached) $ECHO_C" >&6
5965 cf_cv_ncurses_version=no
5967 rm -f "$cf_tempfile"
5968 if test "$cross_compiling" = yes; then
5970 # This will not work if the preprocessor splits the line after the
5971 # Autoconf token. The 'unproto' program does that.
5972 cat > "conftest.$ac_ext" <<EOF
5973 #include <${cf_cv_ncurses_header:-curses.h}>
5975 #ifdef NCURSES_VERSION
5976 Autoconf NCURSES_VERSION
5984 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5985 { (eval echo "$as_me:5985: \"$cf_try\"") >&5
5988 echo "$as_me:5988: \$? = $ac_status" >&5
5989 (exit "$ac_status"); }
5990 if test -f conftest.out ; then
5991 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
5992 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5997 cat >"conftest.$ac_ext" <<_ACEOF
5998 #line 5998 "configure"
5999 #include "confdefs.h"
6001 #include <${cf_cv_ncurses_header:-curses.h}>
6005 FILE *fp = fopen("$cf_tempfile", "w");
6006 #ifdef NCURSES_VERSION
6007 # ifdef NCURSES_VERSION_PATCH
6008 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6010 fprintf(fp, "%s\\n", NCURSES_VERSION);
6014 fprintf(fp, "old\\n");
6019 ${cf_cv_main_return:-return}(0);
6022 rm -f "conftest$ac_exeext"
6023 if { (eval echo "$as_me:6023: \"$ac_link\"") >&5
6024 (eval $ac_link) 2>&5
6026 echo "$as_me:6026: \$? = $ac_status" >&5
6027 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6028 { (eval echo "$as_me:6028: \"$ac_try\"") >&5
6031 echo "$as_me:6031: \$? = $ac_status" >&5
6032 (exit "$ac_status"); }; }; then
6034 cf_cv_ncurses_version=`cat $cf_tempfile`
6036 echo "$as_me: program exited with status $ac_status" >&5
6037 echo "$as_me: failed program was:" >&5
6038 cat "conftest.$ac_ext" >&5
6040 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6042 rm -f "$cf_tempfile"
6045 echo "$as_me:6045: result: $cf_cv_ncurses_version" >&5
6046 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6047 test "$cf_cv_ncurses_version" = no ||
6048 cat >>confdefs.h <<\EOF
6052 cf_nculib_root=ncurses
6053 # This works, except for the special case where we find gpm, but
6054 # ncurses is in a nonstandard location via $LIBS, and we really want
6057 cf_ncurses_SAVE="$LIBS"
6058 echo "$as_me:6058: checking for Gpm_Open in -lgpm" >&5
6059 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6060 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6061 echo $ECHO_N "(cached) $ECHO_C" >&6
6063 ac_check_lib_save_LIBS=$LIBS
6065 cat >"conftest.$ac_ext" <<_ACEOF
6066 #line 6066 "configure"
6067 #include "confdefs.h"
6069 /* Override any gcc2 internal prototype to avoid an error. */
6073 /* We use char because int might match the return type of a gcc2
6074 builtin and then its argument prototype would still apply. */
6084 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6085 if { (eval echo "$as_me:6085: \"$ac_link\"") >&5
6086 (eval $ac_link) 2>&5
6088 echo "$as_me:6088: \$? = $ac_status" >&5
6089 (exit "$ac_status"); } &&
6090 { ac_try='test -s "conftest$ac_exeext"'
6091 { (eval echo "$as_me:6091: \"$ac_try\"") >&5
6094 echo "$as_me:6094: \$? = $ac_status" >&5
6095 (exit "$ac_status"); }; }; then
6096 ac_cv_lib_gpm_Gpm_Open=yes
6098 echo "$as_me: failed program was:" >&5
6099 cat "conftest.$ac_ext" >&5
6100 ac_cv_lib_gpm_Gpm_Open=no
6102 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6103 LIBS=$ac_check_lib_save_LIBS
6105 echo "$as_me:6105: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6106 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6107 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
6108 echo "$as_me:6108: checking for initscr in -lgpm" >&5
6109 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6110 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6111 echo $ECHO_N "(cached) $ECHO_C" >&6
6113 ac_check_lib_save_LIBS=$LIBS
6115 cat >"conftest.$ac_ext" <<_ACEOF
6116 #line 6116 "configure"
6117 #include "confdefs.h"
6119 /* Override any gcc2 internal prototype to avoid an error. */
6123 /* We use char because int might match the return type of a gcc2
6124 builtin and then its argument prototype would still apply. */
6134 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6135 if { (eval echo "$as_me:6135: \"$ac_link\"") >&5
6136 (eval $ac_link) 2>&5
6138 echo "$as_me:6138: \$? = $ac_status" >&5
6139 (exit "$ac_status"); } &&
6140 { ac_try='test -s "conftest$ac_exeext"'
6141 { (eval echo "$as_me:6141: \"$ac_try\"") >&5
6144 echo "$as_me:6144: \$? = $ac_status" >&5
6145 (exit "$ac_status"); }; }; then
6146 ac_cv_lib_gpm_initscr=yes
6148 echo "$as_me: failed program was:" >&5
6149 cat "conftest.$ac_ext" >&5
6150 ac_cv_lib_gpm_initscr=no
6152 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6153 LIBS=$ac_check_lib_save_LIBS
6155 echo "$as_me:6155: result: $ac_cv_lib_gpm_initscr" >&5
6156 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6157 if test "$ac_cv_lib_gpm_initscr" = yes; then
6158 LIBS="$cf_ncurses_SAVE"
6160 cf_ncurses_LIBS="-lgpm"
6167 # This is only necessary if you are linking against an obsolete
6168 # version of ncurses (but it should do no harm, since it is static).
6169 if test "$cf_nculib_root" = ncurses ; then
6170 echo "$as_me:6170: checking for tgoto in -lmytinfo" >&5
6171 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6172 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6173 echo $ECHO_N "(cached) $ECHO_C" >&6
6175 ac_check_lib_save_LIBS=$LIBS
6176 LIBS="-lmytinfo $LIBS"
6177 cat >"conftest.$ac_ext" <<_ACEOF
6178 #line 6178 "configure"
6179 #include "confdefs.h"
6181 /* Override any gcc2 internal prototype to avoid an error. */
6185 /* We use char because int might match the return type of a gcc2
6186 builtin and then its argument prototype would still apply. */
6196 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6197 if { (eval echo "$as_me:6197: \"$ac_link\"") >&5
6198 (eval $ac_link) 2>&5
6200 echo "$as_me:6200: \$? = $ac_status" >&5
6201 (exit "$ac_status"); } &&
6202 { ac_try='test -s "conftest$ac_exeext"'
6203 { (eval echo "$as_me:6203: \"$ac_try\"") >&5
6206 echo "$as_me:6206: \$? = $ac_status" >&5
6207 (exit "$ac_status"); }; }; then
6208 ac_cv_lib_mytinfo_tgoto=yes
6210 echo "$as_me: failed program was:" >&5
6211 cat "conftest.$ac_ext" >&5
6212 ac_cv_lib_mytinfo_tgoto=no
6214 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6215 LIBS=$ac_check_lib_save_LIBS
6217 echo "$as_me:6217: result: $ac_cv_lib_mytinfo_tgoto" >&5
6218 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6219 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6220 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6230 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6232 for cf_add_1lib in $cf_add_0lib; do
6233 for cf_add_2lib in $cf_add_libs; do
6234 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6239 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6243 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6249 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6251 for cf_add_1lib in $cf_add_0lib; do
6252 for cf_add_2lib in $cf_add_libs; do
6253 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6258 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6264 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
6266 echo "$as_me:6266: checking for initscr" >&5
6267 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6268 if test "${ac_cv_func_initscr+set}" = set; then
6269 echo $ECHO_N "(cached) $ECHO_C" >&6
6271 cat >"conftest.$ac_ext" <<_ACEOF
6272 #line 6272 "configure"
6273 #include "confdefs.h"
6274 #define initscr autoconf_temporary
6275 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6282 /* We use char because int might match the return type of a gcc2
6283 builtin and then its argument prototype would still apply. */
6284 char initscr (void);
6290 /* The GNU C library defines stubs for functions which it implements
6291 to always fail with ENOSYS. Some functions are actually named
6292 something starting with __ and the normal name is an alias. */
6293 #if defined (__stub_initscr) || defined (__stub___initscr)
6294 #error found stub for initscr
6302 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6303 if { (eval echo "$as_me:6303: \"$ac_link\"") >&5
6304 (eval $ac_link) 2>&5
6306 echo "$as_me:6306: \$? = $ac_status" >&5
6307 (exit "$ac_status"); } &&
6308 { ac_try='test -s "conftest$ac_exeext"'
6309 { (eval echo "$as_me:6309: \"$ac_try\"") >&5
6312 echo "$as_me:6312: \$? = $ac_status" >&5
6313 (exit "$ac_status"); }; }; then
6314 ac_cv_func_initscr=yes
6316 echo "$as_me: failed program was:" >&5
6317 cat "conftest.$ac_ext" >&5
6318 ac_cv_func_initscr=no
6320 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6322 echo "$as_me:6322: result: $ac_cv_func_initscr" >&5
6323 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6324 if test "$ac_cv_func_initscr" = yes; then
6325 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6328 cf_save_LIBS="$LIBS"
6329 echo "$as_me:6329: checking for initscr in -l$cf_nculib_root" >&5
6330 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6331 LIBS="-l$cf_nculib_root $LIBS"
6332 cat >"conftest.$ac_ext" <<_ACEOF
6333 #line 6333 "configure"
6334 #include "confdefs.h"
6335 #include <${cf_cv_ncurses_header:-curses.h}>
6344 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6345 if { (eval echo "$as_me:6345: \"$ac_link\"") >&5
6346 (eval $ac_link) 2>&5
6348 echo "$as_me:6348: \$? = $ac_status" >&5
6349 (exit "$ac_status"); } &&
6350 { ac_try='test -s "conftest$ac_exeext"'
6351 { (eval echo "$as_me:6351: \"$ac_try\"") >&5
6354 echo "$as_me:6354: \$? = $ac_status" >&5
6355 (exit "$ac_status"); }; }; then
6356 echo "$as_me:6356: result: yes" >&5
6357 echo "${ECHO_T}yes" >&6
6358 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6361 echo "$as_me: failed program was:" >&5
6362 cat "conftest.$ac_ext" >&5
6363 echo "$as_me:6363: result: no" >&5
6364 echo "${ECHO_T}no" >&6
6367 cf_library_path_list=""
6368 if test -n "${LDFLAGS}${LIBS}" ; then
6369 for cf_library_path in $LDFLAGS $LIBS
6371 case "$cf_library_path" in
6373 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6375 test "x$cf_library_path" != "xNONE" && \
6376 test -d "$cf_library_path" && \
6378 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6379 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6380 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6381 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6382 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6383 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"
6386 cf_library_path_list="$cf_library_path_list $cf_search"
6394 test "x$prefix" != "xNONE" && \
6395 test -d "$prefix" && \
6397 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6398 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6399 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6400 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6401 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6402 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6405 for cf_subdir_prefix in \
6414 test "x$cf_subdir_prefix" != "x$prefix" && \
6415 test -d "$cf_subdir_prefix" && \
6416 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6417 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6418 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6419 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
6420 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
6421 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
6422 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"
6427 cf_search="$cf_library_path_list $cf_search"
6429 for cf_libdir in $cf_search
6431 echo "$as_me:6431: checking for -l$cf_nculib_root in $cf_libdir" >&5
6432 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6433 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6434 cat >"conftest.$ac_ext" <<_ACEOF
6435 #line 6435 "configure"
6436 #include "confdefs.h"
6437 #include <${cf_cv_ncurses_header:-curses.h}>
6446 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6447 if { (eval echo "$as_me:6447: \"$ac_link\"") >&5
6448 (eval $ac_link) 2>&5
6450 echo "$as_me:6450: \$? = $ac_status" >&5
6451 (exit "$ac_status"); } &&
6452 { ac_try='test -s "conftest$ac_exeext"'
6453 { (eval echo "$as_me:6453: \"$ac_try\"") >&5
6456 echo "$as_me:6456: \$? = $ac_status" >&5
6457 (exit "$ac_status"); }; }; then
6458 echo "$as_me:6458: result: yes" >&5
6459 echo "${ECHO_T}yes" >&6
6460 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6463 echo "$as_me: failed program was:" >&5
6464 cat "conftest.$ac_ext" >&5
6465 echo "$as_me:6465: result: no" >&5
6466 echo "${ECHO_T}no" >&6
6467 LIBS="$cf_save_LIBS"
6469 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6473 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6477 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
6479 if test "$cf_found_library" = no ; then
6480 { { echo "$as_me:6480: error: Cannot link $cf_nculib_root library" >&5
6481 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6482 { (exit 1); exit 1; }; }
6487 if test -n "$cf_ncurses_LIBS" ; then
6488 echo "$as_me:6488: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6489 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6490 cf_ncurses_SAVE="$LIBS"
6491 for p in $cf_ncurses_LIBS ; do
6492 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
6493 if test "$q" != "$LIBS" ; then
6497 cat >"conftest.$ac_ext" <<_ACEOF
6498 #line 6498 "configure"
6499 #include "confdefs.h"
6500 #include <${cf_cv_ncurses_header:-curses.h}>
6504 initscr(); mousemask(0,0); tigetstr((char *)0);
6509 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6510 if { (eval echo "$as_me:6510: \"$ac_link\"") >&5
6511 (eval $ac_link) 2>&5
6513 echo "$as_me:6513: \$? = $ac_status" >&5
6514 (exit "$ac_status"); } &&
6515 { ac_try='test -s "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
6521 echo "$as_me:6521: result: yes" >&5
6522 echo "${ECHO_T}yes" >&6
6524 echo "$as_me: failed program was:" >&5
6525 cat "conftest.$ac_ext" >&5
6526 echo "$as_me:6526: result: no" >&5
6527 echo "${ECHO_T}no" >&6
6528 LIBS="$cf_ncurses_SAVE"
6530 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6533 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6535 cat >>confdefs.h <<EOF
6536 #define $cf_nculib_ROOT 1
6544 echo "$as_me:6544: checking if you want wide-character code" >&5
6545 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6547 # Check whether --enable-widec or --disable-widec was given.
6548 if test "${enable_widec+set}" = set; then
6549 enableval="$enable_widec"
6550 with_widec=$enableval
6554 echo "$as_me:6554: result: $with_widec" >&5
6555 echo "${ECHO_T}$with_widec" >&6
6556 if test "$with_widec" = yes ; then
6558 for ac_header in wchar.h
6560 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6561 echo "$as_me:6561: checking for $ac_header" >&5
6562 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6563 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6564 echo $ECHO_N "(cached) $ECHO_C" >&6
6566 cat >"conftest.$ac_ext" <<_ACEOF
6567 #line 6567 "configure"
6568 #include "confdefs.h"
6569 #include <$ac_header>
6571 if { (eval echo "$as_me:6571: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6572 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6574 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6576 cat conftest.err >&5
6577 echo "$as_me:6577: \$? = $ac_status" >&5
6578 (exit "$ac_status"); } >/dev/null; then
6579 if test -s conftest.err; then
6580 ac_cpp_err=$ac_c_preproc_warn_flag
6587 if test -z "$ac_cpp_err"; then
6588 eval "$as_ac_Header=yes"
6590 echo "$as_me: failed program was:" >&5
6591 cat "conftest.$ac_ext" >&5
6592 eval "$as_ac_Header=no"
6594 rm -f conftest.err "conftest.$ac_ext"
6596 echo "$as_me:6596: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6597 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6598 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6599 cat >>confdefs.h <<EOF
6600 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6606 echo "$as_me:6606: checking for multibyte character support" >&5
6607 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6608 if test "${cf_cv_utf8_lib+set}" = set; then
6609 echo $ECHO_N "(cached) $ECHO_C" >&6
6612 cf_save_LIBS="$LIBS"
6613 cat >"conftest.$ac_ext" <<_ACEOF
6614 #line 6614 "configure"
6615 #include "confdefs.h"
6631 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6632 if { (eval echo "$as_me:6632: \"$ac_link\"") >&5
6633 (eval $ac_link) 2>&5
6635 echo "$as_me:6635: \$? = $ac_status" >&5
6636 (exit "$ac_status"); } &&
6637 { ac_try='test -s "conftest$ac_exeext"'
6638 { (eval echo "$as_me:6638: \"$ac_try\"") >&5
6641 echo "$as_me:6641: \$? = $ac_status" >&5
6642 (exit "$ac_status"); }; }; then
6645 echo "$as_me: failed program was:" >&5
6646 cat "conftest.$ac_ext" >&5
6648 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6649 # will be set on completion of the AC_TRY_LINK below.
6650 cf_cv_header_path_utf8=
6651 cf_cv_library_path_utf8=
6653 echo "${as_me:-configure}:6653: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6655 cf_save_LIBS="$LIBS"
6657 cat >"conftest.$ac_ext" <<_ACEOF
6658 #line 6658 "configure"
6659 #include "confdefs.h"
6661 #include <libutf8.h>
6670 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6671 if { (eval echo "$as_me:6671: \"$ac_link\"") >&5
6672 (eval $ac_link) 2>&5
6674 echo "$as_me:6674: \$? = $ac_status" >&5
6675 (exit "$ac_status"); } &&
6676 { ac_try='test -s "conftest$ac_exeext"'
6677 { (eval echo "$as_me:6677: \"$ac_try\"") >&5
6680 echo "$as_me:6680: \$? = $ac_status" >&5
6681 (exit "$ac_status"); }; }; then
6683 cf_cv_find_linkage_utf8=yes
6684 cf_cv_header_path_utf8=/usr/include
6685 cf_cv_library_path_utf8=/usr/lib
6688 echo "$as_me: failed program was:" >&5
6689 cat "conftest.$ac_ext" >&5
6691 LIBS="-lutf8 $cf_save_LIBS"
6693 cat >"conftest.$ac_ext" <<_ACEOF
6694 #line 6694 "configure"
6695 #include "confdefs.h"
6697 #include <libutf8.h>
6706 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6707 if { (eval echo "$as_me:6707: \"$ac_link\"") >&5
6708 (eval $ac_link) 2>&5
6710 echo "$as_me:6710: \$? = $ac_status" >&5
6711 (exit "$ac_status"); } &&
6712 { ac_try='test -s "conftest$ac_exeext"'
6713 { (eval echo "$as_me:6713: \"$ac_try\"") >&5
6716 echo "$as_me:6716: \$? = $ac_status" >&5
6717 (exit "$ac_status"); }; }; then
6719 cf_cv_find_linkage_utf8=yes
6720 cf_cv_header_path_utf8=/usr/include
6721 cf_cv_library_path_utf8=/usr/lib
6722 cf_cv_library_file_utf8="-lutf8"
6725 echo "$as_me: failed program was:" >&5
6726 cat "conftest.$ac_ext" >&5
6728 cf_cv_find_linkage_utf8=no
6729 LIBS="$cf_save_LIBS"
6731 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6733 echo "${as_me:-configure}:6733: testing find linkage for utf8 library ..." 1>&5
6735 echo "${as_me:-configure}:6735: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6737 cf_save_CPPFLAGS="$CPPFLAGS"
6738 cf_test_CPPFLAGS="$CPPFLAGS"
6742 # collect the current set of include-directories from compiler flags
6743 cf_header_path_list=""
6744 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6745 for cf_header_path in $CPPFLAGS $CFLAGS
6747 case "$cf_header_path" in
6749 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6751 test "x$cf_header_path" != "xNONE" && \
6752 test -d "$cf_header_path" && \
6754 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6755 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
6756 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
6757 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
6758 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
6759 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6762 cf_header_path_list="$cf_header_path_list $cf_search"
6768 # add the variations for the package we are looking for
6772 test "x$prefix" != "xNONE" && \
6773 test -d "$prefix" && \
6775 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6776 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
6777 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
6778 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
6779 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
6780 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
6783 for cf_subdir_prefix in \
6792 test "x$cf_subdir_prefix" != "x$prefix" && \
6793 test -d "$cf_subdir_prefix" && \
6794 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6795 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6796 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
6797 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6798 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6799 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6800 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6805 test "$includedir" != NONE && \
6806 test "$includedir" != "/usr/include" && \
6807 test -d "$includedir" && {
6808 test -d "$includedir" && cf_search="$cf_search $includedir"
6809 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
6812 test "$oldincludedir" != NONE && \
6813 test "$oldincludedir" != "/usr/include" && \
6814 test -d "$oldincludedir" && {
6815 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
6816 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
6819 cf_search="$cf_search $cf_header_path_list"
6821 for cf_cv_header_path_utf8 in $cf_search
6823 if test -d "$cf_cv_header_path_utf8" ; then
6824 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6826 echo "${as_me:-configure}:6826: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6828 CPPFLAGS="$cf_save_CPPFLAGS"
6830 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6831 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
6833 cat >"conftest.$ac_ext" <<_ACEOF
6834 #line 6834 "configure"
6835 #include "confdefs.h"
6837 #include <libutf8.h>
6846 rm -f "conftest.$ac_objext"
6847 if { (eval echo "$as_me:6847: \"$ac_compile\"") >&5
6848 (eval $ac_compile) 2>&5
6850 echo "$as_me:6850: \$? = $ac_status" >&5
6851 (exit "$ac_status"); } &&
6852 { ac_try='test -s "conftest.$ac_objext"'
6853 { (eval echo "$as_me:6853: \"$ac_try\"") >&5
6856 echo "$as_me:6856: \$? = $ac_status" >&5
6857 (exit "$ac_status"); }; }; then
6859 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6861 echo "${as_me:-configure}:6861: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6863 cf_cv_find_linkage_utf8=maybe
6864 cf_test_CPPFLAGS="$CPPFLAGS"
6867 echo "$as_me: failed program was:" >&5
6868 cat "conftest.$ac_ext" >&5
6870 CPPFLAGS="$cf_save_CPPFLAGS"
6873 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6877 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6879 echo "${as_me:-configure}:6879: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6881 cf_save_LIBS="$LIBS"
6882 cf_save_LDFLAGS="$LDFLAGS"
6884 if test "$cf_cv_find_linkage_utf8" != yes ; then
6887 cf_library_path_list=""
6888 if test -n "${LDFLAGS}${LIBS}" ; then
6889 for cf_library_path in $LDFLAGS $LIBS
6891 case "$cf_library_path" in
6893 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6895 test "x$cf_library_path" != "xNONE" && \
6896 test -d "$cf_library_path" && \
6898 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6899 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6900 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
6901 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6902 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
6903 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6906 cf_library_path_list="$cf_library_path_list $cf_search"
6914 test "x$prefix" != "xNONE" && \
6915 test -d "$prefix" && \
6917 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6918 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6919 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
6920 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
6921 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
6922 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
6925 for cf_subdir_prefix in \
6934 test "x$cf_subdir_prefix" != "x$prefix" && \
6935 test -d "$cf_subdir_prefix" && \
6936 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6937 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6938 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6939 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6940 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6941 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6942 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6947 cf_search="$cf_library_path_list $cf_search"
6949 for cf_cv_library_path_utf8 in $cf_search
6951 if test -d "$cf_cv_library_path_utf8" ; then
6952 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6954 echo "${as_me:-configure}:6954: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6956 CPPFLAGS="$cf_test_CPPFLAGS"
6957 LIBS="-lutf8 $cf_save_LIBS"
6958 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6959 cat >"conftest.$ac_ext" <<_ACEOF
6960 #line 6960 "configure"
6961 #include "confdefs.h"
6963 #include <libutf8.h>
6972 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6973 if { (eval echo "$as_me:6973: \"$ac_link\"") >&5
6974 (eval $ac_link) 2>&5
6976 echo "$as_me:6976: \$? = $ac_status" >&5
6977 (exit "$ac_status"); } &&
6978 { ac_try='test -s "conftest$ac_exeext"'
6979 { (eval echo "$as_me:6979: \"$ac_try\"") >&5
6982 echo "$as_me:6982: \$? = $ac_status" >&5
6983 (exit "$ac_status"); }; }; then
6985 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
6987 echo "${as_me:-configure}:6987: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
6989 cf_cv_find_linkage_utf8=yes
6990 cf_cv_library_file_utf8="-lutf8"
6993 echo "$as_me: failed program was:" >&5
6994 cat "conftest.$ac_ext" >&5
6996 CPPFLAGS="$cf_save_CPPFLAGS"
6997 LIBS="$cf_save_LIBS"
6998 LDFLAGS="$cf_save_LDFLAGS"
7001 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7004 CPPFLAGS="$cf_save_CPPFLAGS"
7005 LDFLAGS="$cf_save_LDFLAGS"
7009 cf_cv_find_linkage_utf8=no
7013 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7016 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7018 LIBS="$cf_save_LIBS"
7020 if test "$cf_cv_find_linkage_utf8" = yes ; then
7021 cf_cv_utf8_lib=add-on
7027 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7029 echo "$as_me:7029: result: $cf_cv_utf8_lib" >&5
7030 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7032 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7034 if test "$cf_cv_utf8_lib" = "add-on" ; then
7036 cat >>confdefs.h <<\EOF
7037 #define HAVE_LIBUTF8_H 1
7040 if test -n "$cf_cv_header_path_utf8" ; then
7041 for cf_add_incdir in $cf_cv_header_path_utf8
7043 while test "$cf_add_incdir" != /usr/include
7045 if test -d "$cf_add_incdir"
7048 if test -n "$CFLAGS$CPPFLAGS" ; then
7049 # a loop is needed to ensure we can add subdirs of existing dirs
7050 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7051 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7052 cf_have_incdir=yes; break
7057 if test "$cf_have_incdir" = no ; then
7058 if test "$cf_add_incdir" = /usr/local/include ; then
7059 if test "$GCC" = yes
7061 cf_save_CPPFLAGS=$CPPFLAGS
7063 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7064 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7066 cat >"conftest.$ac_ext" <<_ACEOF
7067 #line 7067 "configure"
7068 #include "confdefs.h"
7078 rm -f "conftest.$ac_objext"
7079 if { (eval echo "$as_me:7079: \"$ac_compile\"") >&5
7080 (eval $ac_compile) 2>&5
7082 echo "$as_me:7082: \$? = $ac_status" >&5
7083 (exit "$ac_status"); } &&
7084 { ac_try='test -s "conftest.$ac_objext"'
7085 { (eval echo "$as_me:7085: \"$ac_try\"") >&5
7088 echo "$as_me:7088: \$? = $ac_status" >&5
7089 (exit "$ac_status"); }; }; then
7092 echo "$as_me: failed program was:" >&5
7093 cat "conftest.$ac_ext" >&5
7096 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7097 CPPFLAGS=$cf_save_CPPFLAGS
7102 if test "$cf_have_incdir" = no ; then
7103 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7105 echo "${as_me:-configure}:7105: testing adding $cf_add_incdir to include-path ..." 1>&5
7107 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7109 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7110 test "$cf_top_incdir" = "$cf_add_incdir" && break
7111 cf_add_incdir="$cf_top_incdir"
7122 if test -n "$cf_cv_library_path_utf8" ; then
7123 for cf_add_libdir in $cf_cv_library_path_utf8
7125 if test "$cf_add_libdir" = /usr/lib ; then
7127 elif test -d "$cf_add_libdir"
7130 if test -n "$LDFLAGS$LIBS" ; then
7131 # a loop is needed to ensure we can add subdirs of existing dirs
7132 for cf_test_libdir in $LDFLAGS $LIBS ; do
7133 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7134 cf_have_libdir=yes; break
7138 if test "$cf_have_libdir" = no ; then
7139 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7141 echo "${as_me:-configure}:7141: testing adding $cf_add_libdir to library-path ..." 1>&5
7143 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7152 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7154 for cf_add_1lib in $cf_add_0lib; do
7155 for cf_add_2lib in $cf_add_libs; do
7156 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7161 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7167 cf_ncuconfig_root=ncursesw
7168 cf_have_ncuconfig=no
7170 if test "x${PKG_CONFIG:=none}" != xnone; then
7171 echo "$as_me:7171: checking pkg-config for $cf_ncuconfig_root" >&5
7172 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7173 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7174 echo "$as_me:7174: result: yes" >&5
7175 echo "${ECHO_T}yes" >&6
7177 echo "$as_me:7177: checking if the $cf_ncuconfig_root package files work" >&5
7178 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7179 cf_have_ncuconfig=unknown
7181 cf_save_CFLAGS="$CFLAGS"
7182 cf_save_CPPFLAGS="$CPPFLAGS"
7183 cf_save_LIBS="$LIBS"
7185 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7186 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7188 # while -W for passing linker flags is prevalent, it is not "standard".
7189 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7190 # incompatible _and_ non-standard -W option which gives an error. Work
7191 # around that pitfall.
7192 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7198 cf_new_extra_cppflags=
7200 for cf_add_cflags in $cf_pkg_cflags
7202 case "$cf_fix_cppflags" in
7204 case "$cf_add_cflags" in
7205 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7206 case "$cf_add_cflags" in
7208 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7210 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7211 && test -z "${cf_tst_cflags}" \
7212 && cf_fix_cppflags=yes
7214 if test "$cf_fix_cppflags" = yes ; then
7216 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7217 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7220 elif test "${cf_tst_cflags}" = "\"'" ; then
7222 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7223 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7233 case "$cf_add_cflags" in
7235 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7237 CPPFLAGS=`echo "$CPPFLAGS" | \
7238 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7239 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7244 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7245 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7252 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7253 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7260 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7261 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7263 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7265 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7266 && test -z "${cf_tst_cflags}" \
7267 && cf_fix_cppflags=no
7272 if test -n "$cf_new_cflags" ; then
7274 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7275 CFLAGS="${CFLAGS}$cf_new_cflags"
7279 if test -n "$cf_new_cppflags" ; then
7281 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7282 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7286 if test -n "$cf_new_extra_cppflags" ; then
7288 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7289 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7296 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7298 for cf_add_1lib in $cf_add_0lib; do
7299 for cf_add_2lib in $cf_add_libs; do
7300 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7305 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7309 cat >"conftest.$ac_ext" <<_ACEOF
7310 #line 7310 "configure"
7311 #include "confdefs.h"
7312 #include <${cf_cv_ncurses_header:-curses.h}>
7316 initscr(); mousemask(0,0); tigetstr((char *)0);
7321 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7322 if { (eval echo "$as_me:7322: \"$ac_link\"") >&5
7323 (eval $ac_link) 2>&5
7325 echo "$as_me:7325: \$? = $ac_status" >&5
7326 (exit "$ac_status"); } &&
7327 { ac_try='test -s "conftest$ac_exeext"'
7328 { (eval echo "$as_me:7328: \"$ac_try\"") >&5
7331 echo "$as_me:7331: \$? = $ac_status" >&5
7332 (exit "$ac_status"); }; }; then
7333 if test "$cross_compiling" = yes; then
7334 cf_test_ncuconfig=maybe
7336 cat >"conftest.$ac_ext" <<_ACEOF
7337 #line 7337 "configure"
7338 #include "confdefs.h"
7339 #include <${cf_cv_ncurses_header:-curses.h}>
7341 { const char *xx = curses_version(); return (xx == 0); }
7343 rm -f "conftest$ac_exeext"
7344 if { (eval echo "$as_me:7344: \"$ac_link\"") >&5
7345 (eval $ac_link) 2>&5
7347 echo "$as_me:7347: \$? = $ac_status" >&5
7348 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7349 { (eval echo "$as_me:7349: \"$ac_try\"") >&5
7352 echo "$as_me:7352: \$? = $ac_status" >&5
7353 (exit "$ac_status"); }; }; then
7354 cf_test_ncuconfig=yes
7356 echo "$as_me: program exited with status $ac_status" >&5
7357 echo "$as_me: failed program was:" >&5
7358 cat "conftest.$ac_ext" >&5
7359 cf_test_ncuconfig=no
7361 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7364 echo "$as_me: failed program was:" >&5
7365 cat "conftest.$ac_ext" >&5
7366 cf_test_ncuconfig=no
7368 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7370 CFLAGS="$cf_save_CFLAGS"
7371 CPPFLAGS="$cf_save_CPPFLAGS"
7372 LIBS="$cf_save_LIBS"
7374 if test "x$cf_test_ncuconfig" != xyes; then
7375 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7376 cf_pkg_cflags="$cf_temp"
7377 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7378 cf_pkg_libs="$cf_temp"
7383 for cf_add_cflags in $cf_pkg_cflags
7385 case "x$cf_add_cflags" in
7388 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7391 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'`
7392 test "$CFLAGS" != "$cf_old_cflag" || break
7394 CFLAGS="$cf_old_cflag"
7397 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7400 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'`
7401 test "$CPPFLAGS" != "$cf_old_cflag" || break
7403 CPPFLAGS="$cf_old_cflag"
7412 cf_new_extra_cppflags=
7414 for cf_add_cflags in $cf_add_cflags
7416 case "$cf_fix_cppflags" in
7418 case "$cf_add_cflags" in
7419 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7420 case "$cf_add_cflags" in
7422 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7424 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7425 && test -z "${cf_tst_cflags}" \
7426 && cf_fix_cppflags=yes
7428 if test "$cf_fix_cppflags" = yes ; then
7430 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7431 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7434 elif test "${cf_tst_cflags}" = "\"'" ; then
7436 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7437 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7447 case "$cf_add_cflags" in
7449 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7451 CPPFLAGS=`echo "$CPPFLAGS" | \
7452 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7453 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7458 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7459 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7466 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7467 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7474 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7475 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7477 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7479 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7480 && test -z "${cf_tst_cflags}" \
7481 && cf_fix_cppflags=no
7486 if test -n "$cf_new_cflags" ; then
7488 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7489 CFLAGS="${CFLAGS}$cf_new_cflags"
7493 if test -n "$cf_new_cppflags" ; then
7495 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7496 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7500 if test -n "$cf_new_extra_cppflags" ; then
7502 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7503 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7512 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7514 for cf_add_1lib in $cf_add_0lib; do
7515 for cf_add_2lib in $cf_add_libs; do
7516 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7521 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7525 cat >"conftest.$ac_ext" <<_ACEOF
7526 #line 7526 "configure"
7527 #include "confdefs.h"
7528 #include <${cf_cv_ncurses_header:-curses.h}>
7532 initscr(); mousemask(0,0); tigetstr((char *)0);
7537 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7538 if { (eval echo "$as_me:7538: \"$ac_link\"") >&5
7539 (eval $ac_link) 2>&5
7541 echo "$as_me:7541: \$? = $ac_status" >&5
7542 (exit "$ac_status"); } &&
7543 { ac_try='test -s "conftest$ac_exeext"'
7544 { (eval echo "$as_me:7544: \"$ac_try\"") >&5
7547 echo "$as_me:7547: \$? = $ac_status" >&5
7548 (exit "$ac_status"); }; }; then
7549 if test "$cross_compiling" = yes; then
7550 cf_have_ncuconfig=maybe
7552 cat >"conftest.$ac_ext" <<_ACEOF
7553 #line 7553 "configure"
7554 #include "confdefs.h"
7555 #include <${cf_cv_ncurses_header:-curses.h}>
7557 { const char *xx = curses_version(); return (xx == 0); }
7559 rm -f "conftest$ac_exeext"
7560 if { (eval echo "$as_me:7560: \"$ac_link\"") >&5
7561 (eval $ac_link) 2>&5
7563 echo "$as_me:7563: \$? = $ac_status" >&5
7564 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7565 { (eval echo "$as_me:7565: \"$ac_try\"") >&5
7568 echo "$as_me:7568: \$? = $ac_status" >&5
7569 (exit "$ac_status"); }; }; then
7570 cf_have_ncuconfig=yes
7572 echo "$as_me: program exited with status $ac_status" >&5
7573 echo "$as_me: failed program was:" >&5
7574 cat "conftest.$ac_ext" >&5
7575 cf_have_ncuconfig=no
7577 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7580 echo "$as_me: failed program was:" >&5
7581 cat "conftest.$ac_ext" >&5
7582 cf_have_ncuconfig=no
7584 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7585 echo "$as_me:7585: result: $cf_have_ncuconfig" >&5
7586 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7587 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7588 if test "$cf_have_ncuconfig" != "yes"
7590 CPPFLAGS="$cf_save_CPPFLAGS"
7591 LIBS="$cf_save_LIBS"
7592 NCURSES_CONFIG_PKG=none
7595 cat >>confdefs.h <<\EOF
7599 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7601 echo "$as_me:7601: checking for terminfo header" >&5
7602 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7603 if test "${cf_cv_term_header+set}" = set; then
7604 echo $ECHO_N "(cached) $ECHO_C" >&6
7607 case "${cf_cv_ncurses_header}" in
7608 (*/ncurses.h|*/ncursesw.h)
7609 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7612 cf_term_header=term.h
7616 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7618 cat >"conftest.$ac_ext" <<_ACEOF
7619 #line 7619 "configure"
7620 #include "confdefs.h"
7622 #include <${cf_cv_ncurses_header:-curses.h}>
7628 int x = auto_left_margin; (void)x
7633 rm -f "conftest.$ac_objext"
7634 if { (eval echo "$as_me:7634: \"$ac_compile\"") >&5
7635 (eval $ac_compile) 2>&5
7637 echo "$as_me:7637: \$? = $ac_status" >&5
7638 (exit "$ac_status"); } &&
7639 { ac_try='test -s "conftest.$ac_objext"'
7640 { (eval echo "$as_me:7640: \"$ac_try\"") >&5
7643 echo "$as_me:7643: \$? = $ac_status" >&5
7644 (exit "$ac_status"); }; }; then
7646 cf_cv_term_header="$cf_test"
7648 echo "$as_me: failed program was:" >&5
7649 cat "conftest.$ac_ext" >&5
7651 cf_cv_term_header=unknown
7654 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7655 test "$cf_cv_term_header" != unknown && break
7659 echo "$as_me:7659: result: $cf_cv_term_header" >&5
7660 echo "${ECHO_T}$cf_cv_term_header" >&6
7662 # Set definitions to allow ifdef'ing to accommodate subdirectories
7664 case "$cf_cv_term_header" in
7667 cat >>confdefs.h <<\EOF
7668 #define HAVE_TERM_H 1
7674 case "$cf_cv_term_header" in
7677 cat >>confdefs.h <<\EOF
7678 #define HAVE_NCURSES_TERM_H 1
7684 cat >>confdefs.h <<\EOF
7685 #define HAVE_NCURSESW_TERM_H 1
7694 echo "$as_me:7694: result: no" >&5
7695 echo "${ECHO_T}no" >&6
7696 NCURSES_CONFIG_PKG=none
7699 NCURSES_CONFIG_PKG=none
7702 if test "x$cf_have_ncuconfig" = "xno"; then
7703 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7705 if test -n "$ac_tool_prefix"; then
7706 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7708 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7709 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7710 echo "$as_me:7710: checking for $ac_word" >&5
7711 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7712 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7713 echo $ECHO_N "(cached) $ECHO_C" >&6
7715 if test -n "$NCURSES_CONFIG"; then
7716 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7718 ac_save_IFS=$IFS; IFS=$ac_path_separator
7720 for ac_dir in $ac_dummy; do
7722 test -z "$ac_dir" && ac_dir=.
7723 $as_executable_p "$ac_dir/$ac_word" || continue
7724 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7725 echo "$as_me:7725: found $ac_dir/$ac_word" >&5
7731 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7732 if test -n "$NCURSES_CONFIG"; then
7733 echo "$as_me:7733: result: $NCURSES_CONFIG" >&5
7734 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7736 echo "$as_me:7736: result: no" >&5
7737 echo "${ECHO_T}no" >&6
7740 test -n "$NCURSES_CONFIG" && break
7743 if test -z "$NCURSES_CONFIG"; then
7744 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7745 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7747 # Extract the first word of "$ac_prog", so it can be a program name with args.
7748 set dummy $ac_prog; ac_word=$2
7749 echo "$as_me:7749: checking for $ac_word" >&5
7750 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7751 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7752 echo $ECHO_N "(cached) $ECHO_C" >&6
7754 if test -n "$ac_ct_NCURSES_CONFIG"; then
7755 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7757 ac_save_IFS=$IFS; IFS=$ac_path_separator
7759 for ac_dir in $ac_dummy; do
7761 test -z "$ac_dir" && ac_dir=.
7762 $as_executable_p "$ac_dir/$ac_word" || continue
7763 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7764 echo "$as_me:7764: found $ac_dir/$ac_word" >&5
7770 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7771 if test -n "$ac_ct_NCURSES_CONFIG"; then
7772 echo "$as_me:7772: result: $ac_ct_NCURSES_CONFIG" >&5
7773 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7775 echo "$as_me:7775: result: no" >&5
7776 echo "${ECHO_T}no" >&6
7779 test -n "$ac_ct_NCURSES_CONFIG" && break
7781 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7783 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7786 if test "$NCURSES_CONFIG" != none ; then
7788 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7790 case "x$cf_add_cflags" in
7793 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7796 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'`
7797 test "$CFLAGS" != "$cf_old_cflag" || break
7799 CFLAGS="$cf_old_cflag"
7802 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7805 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'`
7806 test "$CPPFLAGS" != "$cf_old_cflag" || break
7808 CPPFLAGS="$cf_old_cflag"
7817 cf_new_extra_cppflags=
7819 for cf_add_cflags in $cf_add_cflags
7821 case "$cf_fix_cppflags" in
7823 case "$cf_add_cflags" in
7824 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7825 case "$cf_add_cflags" in
7827 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7829 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7830 && test -z "${cf_tst_cflags}" \
7831 && cf_fix_cppflags=yes
7833 if test "$cf_fix_cppflags" = yes ; then
7835 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7836 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7839 elif test "${cf_tst_cflags}" = "\"'" ; then
7841 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7842 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7852 case "$cf_add_cflags" in
7854 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7856 CPPFLAGS=`echo "$CPPFLAGS" | \
7857 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7858 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7863 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7864 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7871 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7872 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7879 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7880 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7882 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7884 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7885 && test -z "${cf_tst_cflags}" \
7886 && cf_fix_cppflags=no
7891 if test -n "$cf_new_cflags" ; then
7893 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7894 CFLAGS="${CFLAGS}$cf_new_cflags"
7898 if test -n "$cf_new_cppflags" ; then
7900 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7901 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7905 if test -n "$cf_new_extra_cppflags" ; then
7907 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7908 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7917 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7919 for cf_add_1lib in $cf_add_0lib; do
7920 for cf_add_2lib in $cf_add_libs; do
7921 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7926 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7930 # even with config script, some packages use no-override for curses.h
7932 echo "$as_me:7932: checking if we have identified curses headers" >&5
7933 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7934 if test "${cf_cv_ncurses_header+set}" = set; then
7935 echo $ECHO_N "(cached) $ECHO_C" >&6
7938 cf_cv_ncurses_header=none
7940 ncurses.h ncursesw/ncurses.h \
7941 curses.h ncursesw/curses.h
7943 cat >"conftest.$ac_ext" <<_ACEOF
7944 #line 7944 "configure"
7945 #include "confdefs.h"
7946 #include <${cf_header}>
7950 initscr(); tgoto("?", 0,0)
7955 rm -f "conftest.$ac_objext"
7956 if { (eval echo "$as_me:7956: \"$ac_compile\"") >&5
7957 (eval $ac_compile) 2>&5
7959 echo "$as_me:7959: \$? = $ac_status" >&5
7960 (exit "$ac_status"); } &&
7961 { ac_try='test -s "conftest.$ac_objext"'
7962 { (eval echo "$as_me:7962: \"$ac_try\"") >&5
7965 echo "$as_me:7965: \$? = $ac_status" >&5
7966 (exit "$ac_status"); }; }; then
7967 cf_cv_ncurses_header=$cf_header; break
7969 echo "$as_me: failed program was:" >&5
7970 cat "conftest.$ac_ext" >&5
7972 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7976 echo "$as_me:7976: result: $cf_cv_ncurses_header" >&5
7977 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7979 if test "$cf_cv_ncurses_header" = none ; then
7980 { { echo "$as_me:7980: error: No curses header-files found" >&5
7981 echo "$as_me: error: No curses header-files found" >&2;}
7982 { (exit 1); exit 1; }; }
7985 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7987 for ac_header in $cf_cv_ncurses_header
7989 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7990 echo "$as_me:7990: checking for $ac_header" >&5
7991 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7992 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7993 echo $ECHO_N "(cached) $ECHO_C" >&6
7995 cat >"conftest.$ac_ext" <<_ACEOF
7996 #line 7996 "configure"
7997 #include "confdefs.h"
7998 #include <$ac_header>
8000 if { (eval echo "$as_me:8000: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8001 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8003 $EGREP -v '^ *\+' conftest.er1 >conftest.err
8005 cat conftest.err >&5
8006 echo "$as_me:8006: \$? = $ac_status" >&5
8007 (exit "$ac_status"); } >/dev/null; then
8008 if test -s conftest.err; then
8009 ac_cpp_err=$ac_c_preproc_warn_flag
8016 if test -z "$ac_cpp_err"; then
8017 eval "$as_ac_Header=yes"
8019 echo "$as_me: failed program was:" >&5
8020 cat "conftest.$ac_ext" >&5
8021 eval "$as_ac_Header=no"
8023 rm -f conftest.err "conftest.$ac_ext"
8025 echo "$as_me:8025: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8026 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8027 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8028 cat >>confdefs.h <<EOF
8029 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8035 cat >>confdefs.h <<\EOF
8039 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8041 cat >>confdefs.h <<EOF
8042 #define $cf_nculib_ROOT 1
8045 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
8049 cf_ncuhdr_root=ncursesw
8051 test -n "$cf_cv_curses_dir" && \
8052 test "$cf_cv_curses_dir" != "no" && { \
8054 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8055 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8057 while test "$cf_add_incdir" != /usr/include
8059 if test -d "$cf_add_incdir"
8062 if test -n "$CFLAGS$CPPFLAGS" ; then
8063 # a loop is needed to ensure we can add subdirs of existing dirs
8064 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8065 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8066 cf_have_incdir=yes; break
8071 if test "$cf_have_incdir" = no ; then
8072 if test "$cf_add_incdir" = /usr/local/include ; then
8073 if test "$GCC" = yes
8075 cf_save_CPPFLAGS=$CPPFLAGS
8077 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8078 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8080 cat >"conftest.$ac_ext" <<_ACEOF
8081 #line 8081 "configure"
8082 #include "confdefs.h"
8092 rm -f "conftest.$ac_objext"
8093 if { (eval echo "$as_me:8093: \"$ac_compile\"") >&5
8094 (eval $ac_compile) 2>&5
8096 echo "$as_me:8096: \$? = $ac_status" >&5
8097 (exit "$ac_status"); } &&
8098 { ac_try='test -s "conftest.$ac_objext"'
8099 { (eval echo "$as_me:8099: \"$ac_try\"") >&5
8102 echo "$as_me:8102: \$? = $ac_status" >&5
8103 (exit "$ac_status"); }; }; then
8106 echo "$as_me: failed program was:" >&5
8107 cat "conftest.$ac_ext" >&5
8110 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8111 CPPFLAGS=$cf_save_CPPFLAGS
8116 if test "$cf_have_incdir" = no ; then
8117 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8119 echo "${as_me:-configure}:8119: testing adding $cf_add_incdir to include-path ..." 1>&5
8121 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8123 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8124 test "$cf_top_incdir" = "$cf_add_incdir" && break
8125 cf_add_incdir="$cf_top_incdir"
8138 echo "$as_me:8138: checking for $cf_ncuhdr_root header in include-path" >&5
8139 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8140 if test "${cf_cv_ncurses_h+set}" = set; then
8141 echo $ECHO_N "(cached) $ECHO_C" >&6
8144 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8145 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
8146 for cf_header in $cf_header_list
8149 cat >"conftest.$ac_ext" <<_ACEOF
8150 #line 8150 "configure"
8151 #include "confdefs.h"
8153 #define _XOPEN_SOURCE_EXTENDED
8154 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
8155 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
8157 #include <$cf_header>
8162 #ifdef NCURSES_VERSION
8168 printf("%s\\n", NCURSES_VERSION);
8181 rm -f "conftest.$ac_objext"
8182 if { (eval echo "$as_me:8182: \"$ac_compile\"") >&5
8183 (eval $ac_compile) 2>&5
8185 echo "$as_me:8185: \$? = $ac_status" >&5
8186 (exit "$ac_status"); } &&
8187 { ac_try='test -s "conftest.$ac_objext"'
8188 { (eval echo "$as_me:8188: \"$ac_try\"") >&5
8191 echo "$as_me:8191: \$? = $ac_status" >&5
8192 (exit "$ac_status"); }; }; then
8193 cf_cv_ncurses_h=$cf_header
8196 echo "$as_me: failed program was:" >&5
8197 cat "conftest.$ac_ext" >&5
8200 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8202 test "$cf_cv_ncurses_h" != no && break
8206 echo "$as_me:8206: result: $cf_cv_ncurses_h" >&5
8207 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8209 if test "$cf_cv_ncurses_h" != no ; then
8210 cf_cv_ncurses_header=$cf_cv_ncurses_h
8213 echo "$as_me:8213: checking for $cf_ncuhdr_root include-path" >&5
8214 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8215 if test "${cf_cv_ncurses_h2+set}" = set; then
8216 echo $ECHO_N "(cached) $ECHO_C" >&6
8219 test -n "$verbose" && echo
8223 # collect the current set of include-directories from compiler flags
8224 cf_header_path_list=""
8225 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8226 for cf_header_path in $CPPFLAGS $CFLAGS
8228 case "$cf_header_path" in
8230 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8232 test "x$cf_header_path" != "xNONE" && \
8233 test -d "$cf_header_path" && \
8235 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8236 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8237 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8238 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8239 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8240 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"
8243 cf_header_path_list="$cf_header_path_list $cf_search"
8249 # add the variations for the package we are looking for
8253 test "x$prefix" != "xNONE" && \
8254 test -d "$prefix" && \
8256 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8257 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8258 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8259 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8260 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8261 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8264 for cf_subdir_prefix in \
8273 test "x$cf_subdir_prefix" != "x$prefix" && \
8274 test -d "$cf_subdir_prefix" && \
8275 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8276 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8277 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8278 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8279 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8280 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8281 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"
8286 test "$includedir" != NONE && \
8287 test "$includedir" != "/usr/include" && \
8288 test -d "$includedir" && {
8289 test -d "$includedir" && cf_search="$cf_search $includedir"
8290 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8293 test "$oldincludedir" != NONE && \
8294 test "$oldincludedir" != "/usr/include" && \
8295 test -d "$oldincludedir" && {
8296 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8297 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8300 cf_search="$cf_search $cf_header_path_list"
8302 test -n "$verbose" && echo "search path $cf_search"
8303 cf_save2_CPPFLAGS="$CPPFLAGS"
8304 for cf_incdir in $cf_search
8307 if test -n "$cf_incdir" ; then
8308 for cf_add_incdir in $cf_incdir
8310 while test "$cf_add_incdir" != /usr/include
8312 if test -d "$cf_add_incdir"
8315 if test -n "$CFLAGS$CPPFLAGS" ; then
8316 # a loop is needed to ensure we can add subdirs of existing dirs
8317 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8318 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8319 cf_have_incdir=yes; break
8324 if test "$cf_have_incdir" = no ; then
8325 if test "$cf_add_incdir" = /usr/local/include ; then
8326 if test "$GCC" = yes
8328 cf_save_CPPFLAGS=$CPPFLAGS
8330 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8331 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8333 cat >"conftest.$ac_ext" <<_ACEOF
8334 #line 8334 "configure"
8335 #include "confdefs.h"
8345 rm -f "conftest.$ac_objext"
8346 if { (eval echo "$as_me:8346: \"$ac_compile\"") >&5
8347 (eval $ac_compile) 2>&5
8349 echo "$as_me:8349: \$? = $ac_status" >&5
8350 (exit "$ac_status"); } &&
8351 { ac_try='test -s "conftest.$ac_objext"'
8352 { (eval echo "$as_me:8352: \"$ac_try\"") >&5
8355 echo "$as_me:8355: \$? = $ac_status" >&5
8356 (exit "$ac_status"); }; }; then
8359 echo "$as_me: failed program was:" >&5
8360 cat "conftest.$ac_ext" >&5
8363 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8364 CPPFLAGS=$cf_save_CPPFLAGS
8369 if test "$cf_have_incdir" = no ; then
8370 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8372 echo "${as_me:-configure}:8372: testing adding $cf_add_incdir to include-path ..." 1>&5
8374 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8376 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8377 test "$cf_top_incdir" = "$cf_add_incdir" && break
8378 cf_add_incdir="$cf_top_incdir"
8394 cat >"conftest.$ac_ext" <<_ACEOF
8395 #line 8395 "configure"
8396 #include "confdefs.h"
8398 #include <$cf_header>
8403 #ifdef NCURSES_VERSION
8405 printf("%s\\n", NCURSES_VERSION);
8418 rm -f "conftest.$ac_objext"
8419 if { (eval echo "$as_me:8419: \"$ac_compile\"") >&5
8420 (eval $ac_compile) 2>&5
8422 echo "$as_me:8422: \$? = $ac_status" >&5
8423 (exit "$ac_status"); } &&
8424 { ac_try='test -s "conftest.$ac_objext"'
8425 { (eval echo "$as_me:8425: \"$ac_try\"") >&5
8428 echo "$as_me:8428: \$? = $ac_status" >&5
8429 (exit "$ac_status"); }; }; then
8430 cf_cv_ncurses_h2=$cf_header
8433 echo "$as_me: failed program was:" >&5
8434 cat "conftest.$ac_ext" >&5
8437 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8439 if test "$cf_cv_ncurses_h2" != no ; then
8440 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8441 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
8444 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8446 CPPFLAGS="$cf_save2_CPPFLAGS"
8447 test "$cf_cv_ncurses_h2" != no && break
8449 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8449: error: not found" >&5
8450 echo "$as_me: error: not found" >&2;}
8451 { (exit 1); exit 1; }; }
8454 echo "$as_me:8454: result: $cf_cv_ncurses_h2" >&5
8455 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8457 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
8458 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
8459 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
8460 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
8463 if test -n "$cf_1st_incdir" ; then
8464 for cf_add_incdir in $cf_1st_incdir
8466 while test "$cf_add_incdir" != /usr/include
8468 if test -d "$cf_add_incdir"
8471 if test -n "$CFLAGS$CPPFLAGS" ; then
8472 # a loop is needed to ensure we can add subdirs of existing dirs
8473 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8474 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8475 cf_have_incdir=yes; break
8480 if test "$cf_have_incdir" = no ; then
8481 if test "$cf_add_incdir" = /usr/local/include ; then
8482 if test "$GCC" = yes
8484 cf_save_CPPFLAGS=$CPPFLAGS
8486 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8487 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8489 cat >"conftest.$ac_ext" <<_ACEOF
8490 #line 8490 "configure"
8491 #include "confdefs.h"
8501 rm -f "conftest.$ac_objext"
8502 if { (eval echo "$as_me:8502: \"$ac_compile\"") >&5
8503 (eval $ac_compile) 2>&5
8505 echo "$as_me:8505: \$? = $ac_status" >&5
8506 (exit "$ac_status"); } &&
8507 { ac_try='test -s "conftest.$ac_objext"'
8508 { (eval echo "$as_me:8508: \"$ac_try\"") >&5
8511 echo "$as_me:8511: \$? = $ac_status" >&5
8512 (exit "$ac_status"); }; }; then
8515 echo "$as_me: failed program was:" >&5
8516 cat "conftest.$ac_ext" >&5
8519 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8520 CPPFLAGS=$cf_save_CPPFLAGS
8525 if test "$cf_have_incdir" = no ; then
8526 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8528 echo "${as_me:-configure}:8528: testing adding $cf_add_incdir to include-path ..." 1>&5
8530 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8532 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8533 test "$cf_top_incdir" = "$cf_add_incdir" && break
8534 cf_add_incdir="$cf_top_incdir"
8547 # Set definitions to allow ifdef'ing for ncurses.h
8549 case "$cf_cv_ncurses_header" in
8552 cat >>confdefs.h <<\EOF
8553 #define HAVE_NCURSES_H 1
8559 case "$cf_cv_ncurses_header" in
8560 (ncurses/curses.h|ncurses/ncurses.h)
8562 cat >>confdefs.h <<\EOF
8563 #define HAVE_NCURSES_NCURSES_H 1
8567 (ncursesw/curses.h|ncursesw/ncurses.h)
8569 cat >>confdefs.h <<\EOF
8570 #define HAVE_NCURSESW_NCURSES_H 1
8576 echo "$as_me:8576: checking for terminfo header" >&5
8577 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8578 if test "${cf_cv_term_header+set}" = set; then
8579 echo $ECHO_N "(cached) $ECHO_C" >&6
8582 case "${cf_cv_ncurses_header}" in
8583 (*/ncurses.h|*/ncursesw.h)
8584 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8587 cf_term_header=term.h
8591 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8593 cat >"conftest.$ac_ext" <<_ACEOF
8594 #line 8594 "configure"
8595 #include "confdefs.h"
8597 #include <${cf_cv_ncurses_header:-curses.h}>
8603 int x = auto_left_margin; (void)x
8608 rm -f "conftest.$ac_objext"
8609 if { (eval echo "$as_me:8609: \"$ac_compile\"") >&5
8610 (eval $ac_compile) 2>&5
8612 echo "$as_me:8612: \$? = $ac_status" >&5
8613 (exit "$ac_status"); } &&
8614 { ac_try='test -s "conftest.$ac_objext"'
8615 { (eval echo "$as_me:8615: \"$ac_try\"") >&5
8618 echo "$as_me:8618: \$? = $ac_status" >&5
8619 (exit "$ac_status"); }; }; then
8621 cf_cv_term_header="$cf_test"
8623 echo "$as_me: failed program was:" >&5
8624 cat "conftest.$ac_ext" >&5
8626 cf_cv_term_header=unknown
8629 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8630 test "$cf_cv_term_header" != unknown && break
8634 echo "$as_me:8634: result: $cf_cv_term_header" >&5
8635 echo "${ECHO_T}$cf_cv_term_header" >&6
8637 # Set definitions to allow ifdef'ing to accommodate subdirectories
8639 case "$cf_cv_term_header" in
8642 cat >>confdefs.h <<\EOF
8643 #define HAVE_TERM_H 1
8649 case "$cf_cv_term_header" in
8652 cat >>confdefs.h <<\EOF
8653 #define HAVE_NCURSES_TERM_H 1
8659 cat >>confdefs.h <<\EOF
8660 #define HAVE_NCURSESW_TERM_H 1
8666 # some applications need this, but should check for NCURSES_VERSION
8668 cat >>confdefs.h <<\EOF
8672 echo "$as_me:8672: checking for ncurses version" >&5
8673 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8674 if test "${cf_cv_ncurses_version+set}" = set; then
8675 echo $ECHO_N "(cached) $ECHO_C" >&6
8678 cf_cv_ncurses_version=no
8680 rm -f "$cf_tempfile"
8681 if test "$cross_compiling" = yes; then
8683 # This will not work if the preprocessor splits the line after the
8684 # Autoconf token. The 'unproto' program does that.
8685 cat > "conftest.$ac_ext" <<EOF
8686 #include <${cf_cv_ncurses_header:-curses.h}>
8688 #ifdef NCURSES_VERSION
8689 Autoconf NCURSES_VERSION
8697 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8698 { (eval echo "$as_me:8698: \"$cf_try\"") >&5
8701 echo "$as_me:8701: \$? = $ac_status" >&5
8702 (exit "$ac_status"); }
8703 if test -f conftest.out ; then
8704 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
8705 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8710 cat >"conftest.$ac_ext" <<_ACEOF
8711 #line 8711 "configure"
8712 #include "confdefs.h"
8714 #include <${cf_cv_ncurses_header:-curses.h}>
8718 FILE *fp = fopen("$cf_tempfile", "w");
8719 #ifdef NCURSES_VERSION
8720 # ifdef NCURSES_VERSION_PATCH
8721 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8723 fprintf(fp, "%s\\n", NCURSES_VERSION);
8727 fprintf(fp, "old\\n");
8732 ${cf_cv_main_return:-return}(0);
8735 rm -f "conftest$ac_exeext"
8736 if { (eval echo "$as_me:8736: \"$ac_link\"") >&5
8737 (eval $ac_link) 2>&5
8739 echo "$as_me:8739: \$? = $ac_status" >&5
8740 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8741 { (eval echo "$as_me:8741: \"$ac_try\"") >&5
8744 echo "$as_me:8744: \$? = $ac_status" >&5
8745 (exit "$ac_status"); }; }; then
8747 cf_cv_ncurses_version=`cat $cf_tempfile`
8749 echo "$as_me: program exited with status $ac_status" >&5
8750 echo "$as_me: failed program was:" >&5
8751 cat "conftest.$ac_ext" >&5
8753 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8755 rm -f "$cf_tempfile"
8758 echo "$as_me:8758: result: $cf_cv_ncurses_version" >&5
8759 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8760 test "$cf_cv_ncurses_version" = no ||
8761 cat >>confdefs.h <<\EOF
8765 cf_nculib_root=ncursesw
8766 # This works, except for the special case where we find gpm, but
8767 # ncurses is in a nonstandard location via $LIBS, and we really want
8770 cf_ncurses_SAVE="$LIBS"
8771 echo "$as_me:8771: checking for Gpm_Open in -lgpm" >&5
8772 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8773 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8774 echo $ECHO_N "(cached) $ECHO_C" >&6
8776 ac_check_lib_save_LIBS=$LIBS
8778 cat >"conftest.$ac_ext" <<_ACEOF
8779 #line 8779 "configure"
8780 #include "confdefs.h"
8782 /* Override any gcc2 internal prototype to avoid an error. */
8786 /* We use char because int might match the return type of a gcc2
8787 builtin and then its argument prototype would still apply. */
8797 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8798 if { (eval echo "$as_me:8798: \"$ac_link\"") >&5
8799 (eval $ac_link) 2>&5
8801 echo "$as_me:8801: \$? = $ac_status" >&5
8802 (exit "$ac_status"); } &&
8803 { ac_try='test -s "conftest$ac_exeext"'
8804 { (eval echo "$as_me:8804: \"$ac_try\"") >&5
8807 echo "$as_me:8807: \$? = $ac_status" >&5
8808 (exit "$ac_status"); }; }; then
8809 ac_cv_lib_gpm_Gpm_Open=yes
8811 echo "$as_me: failed program was:" >&5
8812 cat "conftest.$ac_ext" >&5
8813 ac_cv_lib_gpm_Gpm_Open=no
8815 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8816 LIBS=$ac_check_lib_save_LIBS
8818 echo "$as_me:8818: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8819 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8820 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
8821 echo "$as_me:8821: checking for initscr in -lgpm" >&5
8822 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8823 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8824 echo $ECHO_N "(cached) $ECHO_C" >&6
8826 ac_check_lib_save_LIBS=$LIBS
8828 cat >"conftest.$ac_ext" <<_ACEOF
8829 #line 8829 "configure"
8830 #include "confdefs.h"
8832 /* Override any gcc2 internal prototype to avoid an error. */
8836 /* We use char because int might match the return type of a gcc2
8837 builtin and then its argument prototype would still apply. */
8847 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8848 if { (eval echo "$as_me:8848: \"$ac_link\"") >&5
8849 (eval $ac_link) 2>&5
8851 echo "$as_me:8851: \$? = $ac_status" >&5
8852 (exit "$ac_status"); } &&
8853 { ac_try='test -s "conftest$ac_exeext"'
8854 { (eval echo "$as_me:8854: \"$ac_try\"") >&5
8857 echo "$as_me:8857: \$? = $ac_status" >&5
8858 (exit "$ac_status"); }; }; then
8859 ac_cv_lib_gpm_initscr=yes
8861 echo "$as_me: failed program was:" >&5
8862 cat "conftest.$ac_ext" >&5
8863 ac_cv_lib_gpm_initscr=no
8865 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8866 LIBS=$ac_check_lib_save_LIBS
8868 echo "$as_me:8868: result: $ac_cv_lib_gpm_initscr" >&5
8869 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8870 if test "$ac_cv_lib_gpm_initscr" = yes; then
8871 LIBS="$cf_ncurses_SAVE"
8873 cf_ncurses_LIBS="-lgpm"
8880 # This is only necessary if you are linking against an obsolete
8881 # version of ncurses (but it should do no harm, since it is static).
8882 if test "$cf_nculib_root" = ncurses ; then
8883 echo "$as_me:8883: checking for tgoto in -lmytinfo" >&5
8884 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8885 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8886 echo $ECHO_N "(cached) $ECHO_C" >&6
8888 ac_check_lib_save_LIBS=$LIBS
8889 LIBS="-lmytinfo $LIBS"
8890 cat >"conftest.$ac_ext" <<_ACEOF
8891 #line 8891 "configure"
8892 #include "confdefs.h"
8894 /* Override any gcc2 internal prototype to avoid an error. */
8898 /* We use char because int might match the return type of a gcc2
8899 builtin and then its argument prototype would still apply. */
8909 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8910 if { (eval echo "$as_me:8910: \"$ac_link\"") >&5
8911 (eval $ac_link) 2>&5
8913 echo "$as_me:8913: \$? = $ac_status" >&5
8914 (exit "$ac_status"); } &&
8915 { ac_try='test -s "conftest$ac_exeext"'
8916 { (eval echo "$as_me:8916: \"$ac_try\"") >&5
8919 echo "$as_me:8919: \$? = $ac_status" >&5
8920 (exit "$ac_status"); }; }; then
8921 ac_cv_lib_mytinfo_tgoto=yes
8923 echo "$as_me: failed program was:" >&5
8924 cat "conftest.$ac_ext" >&5
8925 ac_cv_lib_mytinfo_tgoto=no
8927 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8928 LIBS=$ac_check_lib_save_LIBS
8930 echo "$as_me:8930: result: $ac_cv_lib_mytinfo_tgoto" >&5
8931 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8932 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
8933 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8943 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8945 for cf_add_1lib in $cf_add_0lib; do
8946 for cf_add_2lib in $cf_add_libs; do
8947 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8952 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8956 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
8962 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8964 for cf_add_1lib in $cf_add_0lib; do
8965 for cf_add_2lib in $cf_add_libs; do
8966 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8971 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8977 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
8979 echo "$as_me:8979: checking for initscr" >&5
8980 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8981 if test "${ac_cv_func_initscr+set}" = set; then
8982 echo $ECHO_N "(cached) $ECHO_C" >&6
8984 cat >"conftest.$ac_ext" <<_ACEOF
8985 #line 8985 "configure"
8986 #include "confdefs.h"
8987 #define initscr autoconf_temporary
8988 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
8995 /* We use char because int might match the return type of a gcc2
8996 builtin and then its argument prototype would still apply. */
8997 char initscr (void);
9003 /* The GNU C library defines stubs for functions which it implements
9004 to always fail with ENOSYS. Some functions are actually named
9005 something starting with __ and the normal name is an alias. */
9006 #if defined (__stub_initscr) || defined (__stub___initscr)
9007 #error found stub for initscr
9015 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9016 if { (eval echo "$as_me:9016: \"$ac_link\"") >&5
9017 (eval $ac_link) 2>&5
9019 echo "$as_me:9019: \$? = $ac_status" >&5
9020 (exit "$ac_status"); } &&
9021 { ac_try='test -s "conftest$ac_exeext"'
9022 { (eval echo "$as_me:9022: \"$ac_try\"") >&5
9025 echo "$as_me:9025: \$? = $ac_status" >&5
9026 (exit "$ac_status"); }; }; then
9027 ac_cv_func_initscr=yes
9029 echo "$as_me: failed program was:" >&5
9030 cat "conftest.$ac_ext" >&5
9031 ac_cv_func_initscr=no
9033 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9035 echo "$as_me:9035: result: $ac_cv_func_initscr" >&5
9036 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9037 if test "$ac_cv_func_initscr" = yes; then
9038 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9041 cf_save_LIBS="$LIBS"
9042 echo "$as_me:9042: checking for initscr in -l$cf_nculib_root" >&5
9043 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9044 LIBS="-l$cf_nculib_root $LIBS"
9045 cat >"conftest.$ac_ext" <<_ACEOF
9046 #line 9046 "configure"
9047 #include "confdefs.h"
9048 #include <${cf_cv_ncurses_header:-curses.h}>
9057 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9058 if { (eval echo "$as_me:9058: \"$ac_link\"") >&5
9059 (eval $ac_link) 2>&5
9061 echo "$as_me:9061: \$? = $ac_status" >&5
9062 (exit "$ac_status"); } &&
9063 { ac_try='test -s "conftest$ac_exeext"'
9064 { (eval echo "$as_me:9064: \"$ac_try\"") >&5
9067 echo "$as_me:9067: \$? = $ac_status" >&5
9068 (exit "$ac_status"); }; }; then
9069 echo "$as_me:9069: result: yes" >&5
9070 echo "${ECHO_T}yes" >&6
9071 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9074 echo "$as_me: failed program was:" >&5
9075 cat "conftest.$ac_ext" >&5
9076 echo "$as_me:9076: result: no" >&5
9077 echo "${ECHO_T}no" >&6
9080 cf_library_path_list=""
9081 if test -n "${LDFLAGS}${LIBS}" ; then
9082 for cf_library_path in $LDFLAGS $LIBS
9084 case "$cf_library_path" in
9086 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9088 test "x$cf_library_path" != "xNONE" && \
9089 test -d "$cf_library_path" && \
9091 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9092 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
9093 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9094 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9095 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9096 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"
9099 cf_library_path_list="$cf_library_path_list $cf_search"
9107 test "x$prefix" != "xNONE" && \
9108 test -d "$prefix" && \
9110 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9111 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
9112 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9113 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9114 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9115 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9118 for cf_subdir_prefix in \
9127 test "x$cf_subdir_prefix" != "x$prefix" && \
9128 test -d "$cf_subdir_prefix" && \
9129 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9130 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9131 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
9132 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9133 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9134 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9135 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"
9140 cf_search="$cf_library_path_list $cf_search"
9142 for cf_libdir in $cf_search
9144 echo "$as_me:9144: checking for -l$cf_nculib_root in $cf_libdir" >&5
9145 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9146 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9147 cat >"conftest.$ac_ext" <<_ACEOF
9148 #line 9148 "configure"
9149 #include "confdefs.h"
9150 #include <${cf_cv_ncurses_header:-curses.h}>
9159 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9160 if { (eval echo "$as_me:9160: \"$ac_link\"") >&5
9161 (eval $ac_link) 2>&5
9163 echo "$as_me:9163: \$? = $ac_status" >&5
9164 (exit "$ac_status"); } &&
9165 { ac_try='test -s "conftest$ac_exeext"'
9166 { (eval echo "$as_me:9166: \"$ac_try\"") >&5
9169 echo "$as_me:9169: \$? = $ac_status" >&5
9170 (exit "$ac_status"); }; }; then
9171 echo "$as_me:9171: result: yes" >&5
9172 echo "${ECHO_T}yes" >&6
9173 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9176 echo "$as_me: failed program was:" >&5
9177 cat "conftest.$ac_ext" >&5
9178 echo "$as_me:9178: result: no" >&5
9179 echo "${ECHO_T}no" >&6
9180 LIBS="$cf_save_LIBS"
9182 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9186 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9190 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
9192 if test "$cf_found_library" = no ; then
9193 { { echo "$as_me:9193: error: Cannot link $cf_nculib_root library" >&5
9194 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9195 { (exit 1); exit 1; }; }
9200 if test -n "$cf_ncurses_LIBS" ; then
9201 echo "$as_me:9201: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9202 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9203 cf_ncurses_SAVE="$LIBS"
9204 for p in $cf_ncurses_LIBS ; do
9205 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
9206 if test "$q" != "$LIBS" ; then
9210 cat >"conftest.$ac_ext" <<_ACEOF
9211 #line 9211 "configure"
9212 #include "confdefs.h"
9213 #include <${cf_cv_ncurses_header:-curses.h}>
9217 initscr(); mousemask(0,0); tigetstr((char *)0);
9222 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9223 if { (eval echo "$as_me:9223: \"$ac_link\"") >&5
9224 (eval $ac_link) 2>&5
9226 echo "$as_me:9226: \$? = $ac_status" >&5
9227 (exit "$ac_status"); } &&
9228 { ac_try='test -s "conftest$ac_exeext"'
9229 { (eval echo "$as_me:9229: \"$ac_try\"") >&5
9232 echo "$as_me:9232: \$? = $ac_status" >&5
9233 (exit "$ac_status"); }; }; then
9234 echo "$as_me:9234: result: yes" >&5
9235 echo "${ECHO_T}yes" >&6
9237 echo "$as_me: failed program was:" >&5
9238 cat "conftest.$ac_ext" >&5
9239 echo "$as_me:9239: result: no" >&5
9240 echo "${ECHO_T}no" >&6
9241 LIBS="$cf_ncurses_SAVE"
9243 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9246 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9248 cat >>confdefs.h <<EOF
9249 #define $cf_nculib_ROOT 1
9259 cf_ncuconfig_root=ncurses
9260 cf_have_ncuconfig=no
9262 if test "x${PKG_CONFIG:=none}" != xnone; then
9263 echo "$as_me:9263: checking pkg-config for $cf_ncuconfig_root" >&5
9264 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9265 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9266 echo "$as_me:9266: result: yes" >&5
9267 echo "${ECHO_T}yes" >&6
9269 echo "$as_me:9269: checking if the $cf_ncuconfig_root package files work" >&5
9270 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9271 cf_have_ncuconfig=unknown
9273 cf_save_CFLAGS="$CFLAGS"
9274 cf_save_CPPFLAGS="$CPPFLAGS"
9275 cf_save_LIBS="$LIBS"
9277 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
9278 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9280 # while -W for passing linker flags is prevalent, it is not "standard".
9281 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9282 # incompatible _and_ non-standard -W option which gives an error. Work
9283 # around that pitfall.
9284 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9290 cf_new_extra_cppflags=
9292 for cf_add_cflags in $cf_pkg_cflags
9294 case "$cf_fix_cppflags" in
9296 case "$cf_add_cflags" in
9297 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9298 case "$cf_add_cflags" in
9300 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9302 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9303 && test -z "${cf_tst_cflags}" \
9304 && cf_fix_cppflags=yes
9306 if test "$cf_fix_cppflags" = yes ; then
9308 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9309 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9312 elif test "${cf_tst_cflags}" = "\"'" ; then
9314 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9315 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9325 case "$cf_add_cflags" in
9327 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9329 CPPFLAGS=`echo "$CPPFLAGS" | \
9330 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9331 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9336 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9337 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9344 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9345 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9352 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9353 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9355 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9357 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9358 && test -z "${cf_tst_cflags}" \
9359 && cf_fix_cppflags=no
9364 if test -n "$cf_new_cflags" ; then
9366 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9367 CFLAGS="${CFLAGS}$cf_new_cflags"
9371 if test -n "$cf_new_cppflags" ; then
9373 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9374 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9378 if test -n "$cf_new_extra_cppflags" ; then
9380 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9381 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9388 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9390 for cf_add_1lib in $cf_add_0lib; do
9391 for cf_add_2lib in $cf_add_libs; do
9392 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9397 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9401 cat >"conftest.$ac_ext" <<_ACEOF
9402 #line 9402 "configure"
9403 #include "confdefs.h"
9404 #include <${cf_cv_ncurses_header:-curses.h}>
9408 initscr(); mousemask(0,0); tigetstr((char *)0);
9413 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9414 if { (eval echo "$as_me:9414: \"$ac_link\"") >&5
9415 (eval $ac_link) 2>&5
9417 echo "$as_me:9417: \$? = $ac_status" >&5
9418 (exit "$ac_status"); } &&
9419 { ac_try='test -s "conftest$ac_exeext"'
9420 { (eval echo "$as_me:9420: \"$ac_try\"") >&5
9423 echo "$as_me:9423: \$? = $ac_status" >&5
9424 (exit "$ac_status"); }; }; then
9425 if test "$cross_compiling" = yes; then
9426 cf_test_ncuconfig=maybe
9428 cat >"conftest.$ac_ext" <<_ACEOF
9429 #line 9429 "configure"
9430 #include "confdefs.h"
9431 #include <${cf_cv_ncurses_header:-curses.h}>
9433 { const char *xx = curses_version(); return (xx == 0); }
9435 rm -f "conftest$ac_exeext"
9436 if { (eval echo "$as_me:9436: \"$ac_link\"") >&5
9437 (eval $ac_link) 2>&5
9439 echo "$as_me:9439: \$? = $ac_status" >&5
9440 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9441 { (eval echo "$as_me:9441: \"$ac_try\"") >&5
9444 echo "$as_me:9444: \$? = $ac_status" >&5
9445 (exit "$ac_status"); }; }; then
9446 cf_test_ncuconfig=yes
9448 echo "$as_me: program exited with status $ac_status" >&5
9449 echo "$as_me: failed program was:" >&5
9450 cat "conftest.$ac_ext" >&5
9451 cf_test_ncuconfig=no
9453 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9456 echo "$as_me: failed program was:" >&5
9457 cat "conftest.$ac_ext" >&5
9458 cf_test_ncuconfig=no
9460 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9462 CFLAGS="$cf_save_CFLAGS"
9463 CPPFLAGS="$cf_save_CPPFLAGS"
9464 LIBS="$cf_save_LIBS"
9466 if test "x$cf_test_ncuconfig" != xyes; then
9467 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9468 cf_pkg_cflags="$cf_temp"
9469 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9470 cf_pkg_libs="$cf_temp"
9475 for cf_add_cflags in $cf_pkg_cflags
9477 case "x$cf_add_cflags" in
9480 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9483 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'`
9484 test "$CFLAGS" != "$cf_old_cflag" || break
9486 CFLAGS="$cf_old_cflag"
9489 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9492 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'`
9493 test "$CPPFLAGS" != "$cf_old_cflag" || break
9495 CPPFLAGS="$cf_old_cflag"
9504 cf_new_extra_cppflags=
9506 for cf_add_cflags in $cf_add_cflags
9508 case "$cf_fix_cppflags" in
9510 case "$cf_add_cflags" in
9511 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9512 case "$cf_add_cflags" in
9514 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9516 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9517 && test -z "${cf_tst_cflags}" \
9518 && cf_fix_cppflags=yes
9520 if test "$cf_fix_cppflags" = yes ; then
9522 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9523 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9526 elif test "${cf_tst_cflags}" = "\"'" ; then
9528 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9529 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9539 case "$cf_add_cflags" in
9541 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9543 CPPFLAGS=`echo "$CPPFLAGS" | \
9544 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9545 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9550 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9551 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9558 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9559 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9566 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9567 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9569 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9571 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9572 && test -z "${cf_tst_cflags}" \
9573 && cf_fix_cppflags=no
9578 if test -n "$cf_new_cflags" ; then
9580 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9581 CFLAGS="${CFLAGS}$cf_new_cflags"
9585 if test -n "$cf_new_cppflags" ; then
9587 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9588 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9592 if test -n "$cf_new_extra_cppflags" ; then
9594 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9595 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9604 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9606 for cf_add_1lib in $cf_add_0lib; do
9607 for cf_add_2lib in $cf_add_libs; do
9608 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9613 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9617 cat >"conftest.$ac_ext" <<_ACEOF
9618 #line 9618 "configure"
9619 #include "confdefs.h"
9620 #include <${cf_cv_ncurses_header:-curses.h}>
9624 initscr(); mousemask(0,0); tigetstr((char *)0);
9629 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9630 if { (eval echo "$as_me:9630: \"$ac_link\"") >&5
9631 (eval $ac_link) 2>&5
9633 echo "$as_me:9633: \$? = $ac_status" >&5
9634 (exit "$ac_status"); } &&
9635 { ac_try='test -s "conftest$ac_exeext"'
9636 { (eval echo "$as_me:9636: \"$ac_try\"") >&5
9639 echo "$as_me:9639: \$? = $ac_status" >&5
9640 (exit "$ac_status"); }; }; then
9641 if test "$cross_compiling" = yes; then
9642 cf_have_ncuconfig=maybe
9644 cat >"conftest.$ac_ext" <<_ACEOF
9645 #line 9645 "configure"
9646 #include "confdefs.h"
9647 #include <${cf_cv_ncurses_header:-curses.h}>
9649 { const char *xx = curses_version(); return (xx == 0); }
9651 rm -f "conftest$ac_exeext"
9652 if { (eval echo "$as_me:9652: \"$ac_link\"") >&5
9653 (eval $ac_link) 2>&5
9655 echo "$as_me:9655: \$? = $ac_status" >&5
9656 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9657 { (eval echo "$as_me:9657: \"$ac_try\"") >&5
9660 echo "$as_me:9660: \$? = $ac_status" >&5
9661 (exit "$ac_status"); }; }; then
9662 cf_have_ncuconfig=yes
9664 echo "$as_me: program exited with status $ac_status" >&5
9665 echo "$as_me: failed program was:" >&5
9666 cat "conftest.$ac_ext" >&5
9667 cf_have_ncuconfig=no
9669 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9672 echo "$as_me: failed program was:" >&5
9673 cat "conftest.$ac_ext" >&5
9674 cf_have_ncuconfig=no
9676 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9677 echo "$as_me:9677: result: $cf_have_ncuconfig" >&5
9678 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9679 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9680 if test "$cf_have_ncuconfig" != "yes"
9682 CPPFLAGS="$cf_save_CPPFLAGS"
9683 LIBS="$cf_save_LIBS"
9684 NCURSES_CONFIG_PKG=none
9687 cat >>confdefs.h <<\EOF
9691 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9693 echo "$as_me:9693: checking for terminfo header" >&5
9694 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9695 if test "${cf_cv_term_header+set}" = set; then
9696 echo $ECHO_N "(cached) $ECHO_C" >&6
9699 case "${cf_cv_ncurses_header}" in
9700 (*/ncurses.h|*/ncursesw.h)
9701 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9704 cf_term_header=term.h
9708 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9710 cat >"conftest.$ac_ext" <<_ACEOF
9711 #line 9711 "configure"
9712 #include "confdefs.h"
9714 #include <${cf_cv_ncurses_header:-curses.h}>
9720 int x = auto_left_margin; (void)x
9725 rm -f "conftest.$ac_objext"
9726 if { (eval echo "$as_me:9726: \"$ac_compile\"") >&5
9727 (eval $ac_compile) 2>&5
9729 echo "$as_me:9729: \$? = $ac_status" >&5
9730 (exit "$ac_status"); } &&
9731 { ac_try='test -s "conftest.$ac_objext"'
9732 { (eval echo "$as_me:9732: \"$ac_try\"") >&5
9735 echo "$as_me:9735: \$? = $ac_status" >&5
9736 (exit "$ac_status"); }; }; then
9738 cf_cv_term_header="$cf_test"
9740 echo "$as_me: failed program was:" >&5
9741 cat "conftest.$ac_ext" >&5
9743 cf_cv_term_header=unknown
9746 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9747 test "$cf_cv_term_header" != unknown && break
9751 echo "$as_me:9751: result: $cf_cv_term_header" >&5
9752 echo "${ECHO_T}$cf_cv_term_header" >&6
9754 # Set definitions to allow ifdef'ing to accommodate subdirectories
9756 case "$cf_cv_term_header" in
9759 cat >>confdefs.h <<\EOF
9760 #define HAVE_TERM_H 1
9766 case "$cf_cv_term_header" in
9769 cat >>confdefs.h <<\EOF
9770 #define HAVE_NCURSES_TERM_H 1
9776 cat >>confdefs.h <<\EOF
9777 #define HAVE_NCURSESW_TERM_H 1
9786 echo "$as_me:9786: result: no" >&5
9787 echo "${ECHO_T}no" >&6
9788 NCURSES_CONFIG_PKG=none
9791 NCURSES_CONFIG_PKG=none
9794 if test "x$cf_have_ncuconfig" = "xno"; then
9795 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9797 if test -n "$ac_tool_prefix"; then
9798 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9800 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9801 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9802 echo "$as_me:9802: checking for $ac_word" >&5
9803 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9804 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9805 echo $ECHO_N "(cached) $ECHO_C" >&6
9807 if test -n "$NCURSES_CONFIG"; then
9808 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9810 ac_save_IFS=$IFS; IFS=$ac_path_separator
9812 for ac_dir in $ac_dummy; do
9814 test -z "$ac_dir" && ac_dir=.
9815 $as_executable_p "$ac_dir/$ac_word" || continue
9816 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9817 echo "$as_me:9817: found $ac_dir/$ac_word" >&5
9823 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9824 if test -n "$NCURSES_CONFIG"; then
9825 echo "$as_me:9825: result: $NCURSES_CONFIG" >&5
9826 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9828 echo "$as_me:9828: result: no" >&5
9829 echo "${ECHO_T}no" >&6
9832 test -n "$NCURSES_CONFIG" && break
9835 if test -z "$NCURSES_CONFIG"; then
9836 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9837 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9839 # Extract the first word of "$ac_prog", so it can be a program name with args.
9840 set dummy $ac_prog; ac_word=$2
9841 echo "$as_me:9841: checking for $ac_word" >&5
9842 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9843 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9844 echo $ECHO_N "(cached) $ECHO_C" >&6
9846 if test -n "$ac_ct_NCURSES_CONFIG"; then
9847 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9849 ac_save_IFS=$IFS; IFS=$ac_path_separator
9851 for ac_dir in $ac_dummy; do
9853 test -z "$ac_dir" && ac_dir=.
9854 $as_executable_p "$ac_dir/$ac_word" || continue
9855 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9856 echo "$as_me:9856: found $ac_dir/$ac_word" >&5
9862 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9863 if test -n "$ac_ct_NCURSES_CONFIG"; then
9864 echo "$as_me:9864: result: $ac_ct_NCURSES_CONFIG" >&5
9865 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9867 echo "$as_me:9867: result: no" >&5
9868 echo "${ECHO_T}no" >&6
9871 test -n "$ac_ct_NCURSES_CONFIG" && break
9873 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9875 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9878 if test "$NCURSES_CONFIG" != none ; then
9880 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9882 case "x$cf_add_cflags" in
9885 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9888 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'`
9889 test "$CFLAGS" != "$cf_old_cflag" || break
9891 CFLAGS="$cf_old_cflag"
9894 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9897 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'`
9898 test "$CPPFLAGS" != "$cf_old_cflag" || break
9900 CPPFLAGS="$cf_old_cflag"
9909 cf_new_extra_cppflags=
9911 for cf_add_cflags in $cf_add_cflags
9913 case "$cf_fix_cppflags" in
9915 case "$cf_add_cflags" in
9916 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9917 case "$cf_add_cflags" in
9919 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9921 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9922 && test -z "${cf_tst_cflags}" \
9923 && cf_fix_cppflags=yes
9925 if test "$cf_fix_cppflags" = yes ; then
9927 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9928 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9931 elif test "${cf_tst_cflags}" = "\"'" ; then
9933 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9934 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9944 case "$cf_add_cflags" in
9946 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9948 CPPFLAGS=`echo "$CPPFLAGS" | \
9949 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9950 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9955 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9956 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9963 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9964 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9971 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9972 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9974 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9976 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9977 && test -z "${cf_tst_cflags}" \
9978 && cf_fix_cppflags=no
9983 if test -n "$cf_new_cflags" ; then
9985 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9986 CFLAGS="${CFLAGS}$cf_new_cflags"
9990 if test -n "$cf_new_cppflags" ; then
9992 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9993 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9997 if test -n "$cf_new_extra_cppflags" ; then
9999 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10000 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10006 cf_add_libs="$LIBS"
10009 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10010 # filter duplicates
10011 for cf_add_1lib in $cf_add_0lib; do
10012 for cf_add_2lib in $cf_add_libs; do
10013 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10018 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10020 LIBS="$cf_add_libs"
10022 # even with config script, some packages use no-override for curses.h
10024 echo "$as_me:10024: checking if we have identified curses headers" >&5
10025 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10026 if test "${cf_cv_ncurses_header+set}" = set; then
10027 echo $ECHO_N "(cached) $ECHO_C" >&6
10030 cf_cv_ncurses_header=none
10032 ncurses.h ncurses/ncurses.h \
10033 curses.h ncurses/curses.h
10035 cat >"conftest.$ac_ext" <<_ACEOF
10036 #line 10036 "configure"
10037 #include "confdefs.h"
10038 #include <${cf_header}>
10042 initscr(); tgoto("?", 0,0)
10047 rm -f "conftest.$ac_objext"
10048 if { (eval echo "$as_me:10048: \"$ac_compile\"") >&5
10049 (eval $ac_compile) 2>&5
10051 echo "$as_me:10051: \$? = $ac_status" >&5
10052 (exit "$ac_status"); } &&
10053 { ac_try='test -s "conftest.$ac_objext"'
10054 { (eval echo "$as_me:10054: \"$ac_try\"") >&5
10055 (eval $ac_try) 2>&5
10057 echo "$as_me:10057: \$? = $ac_status" >&5
10058 (exit "$ac_status"); }; }; then
10059 cf_cv_ncurses_header=$cf_header; break
10061 echo "$as_me: failed program was:" >&5
10062 cat "conftest.$ac_ext" >&5
10064 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10068 echo "$as_me:10068: result: $cf_cv_ncurses_header" >&5
10069 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10071 if test "$cf_cv_ncurses_header" = none ; then
10072 { { echo "$as_me:10072: error: No curses header-files found" >&5
10073 echo "$as_me: error: No curses header-files found" >&2;}
10074 { (exit 1); exit 1; }; }
10077 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10079 for ac_header in $cf_cv_ncurses_header
10081 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10082 echo "$as_me:10082: checking for $ac_header" >&5
10083 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10084 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10085 echo $ECHO_N "(cached) $ECHO_C" >&6
10087 cat >"conftest.$ac_ext" <<_ACEOF
10088 #line 10088 "configure"
10089 #include "confdefs.h"
10090 #include <$ac_header>
10092 if { (eval echo "$as_me:10092: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10093 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10095 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10097 cat conftest.err >&5
10098 echo "$as_me:10098: \$? = $ac_status" >&5
10099 (exit "$ac_status"); } >/dev/null; then
10100 if test -s conftest.err; then
10101 ac_cpp_err=$ac_c_preproc_warn_flag
10108 if test -z "$ac_cpp_err"; then
10109 eval "$as_ac_Header=yes"
10111 echo "$as_me: failed program was:" >&5
10112 cat "conftest.$ac_ext" >&5
10113 eval "$as_ac_Header=no"
10115 rm -f conftest.err "conftest.$ac_ext"
10117 echo "$as_me:10117: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10118 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10119 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10120 cat >>confdefs.h <<EOF
10121 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10127 cat >>confdefs.h <<\EOF
10131 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10133 cat >>confdefs.h <<EOF
10134 #define $cf_nculib_ROOT 1
10137 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
10141 cf_ncuhdr_root=ncurses
10143 test -n "$cf_cv_curses_dir" && \
10144 test "$cf_cv_curses_dir" != "no" && { \
10146 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
10147 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
10149 while test "$cf_add_incdir" != /usr/include
10151 if test -d "$cf_add_incdir"
10154 if test -n "$CFLAGS$CPPFLAGS" ; then
10155 # a loop is needed to ensure we can add subdirs of existing dirs
10156 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10157 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10158 cf_have_incdir=yes; break
10163 if test "$cf_have_incdir" = no ; then
10164 if test "$cf_add_incdir" = /usr/local/include ; then
10165 if test "$GCC" = yes
10167 cf_save_CPPFLAGS=$CPPFLAGS
10169 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10170 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10172 cat >"conftest.$ac_ext" <<_ACEOF
10173 #line 10173 "configure"
10174 #include "confdefs.h"
10184 rm -f "conftest.$ac_objext"
10185 if { (eval echo "$as_me:10185: \"$ac_compile\"") >&5
10186 (eval $ac_compile) 2>&5
10188 echo "$as_me:10188: \$? = $ac_status" >&5
10189 (exit "$ac_status"); } &&
10190 { ac_try='test -s "conftest.$ac_objext"'
10191 { (eval echo "$as_me:10191: \"$ac_try\"") >&5
10192 (eval $ac_try) 2>&5
10194 echo "$as_me:10194: \$? = $ac_status" >&5
10195 (exit "$ac_status"); }; }; then
10198 echo "$as_me: failed program was:" >&5
10199 cat "conftest.$ac_ext" >&5
10202 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10203 CPPFLAGS=$cf_save_CPPFLAGS
10208 if test "$cf_have_incdir" = no ; then
10209 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10211 echo "${as_me:-configure}:10211: testing adding $cf_add_incdir to include-path ..." 1>&5
10213 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10215 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10216 test "$cf_top_incdir" = "$cf_add_incdir" && break
10217 cf_add_incdir="$cf_top_incdir"
10230 echo "$as_me:10230: checking for $cf_ncuhdr_root header in include-path" >&5
10231 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10232 if test "${cf_cv_ncurses_h+set}" = set; then
10233 echo $ECHO_N "(cached) $ECHO_C" >&6
10236 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10237 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
10238 for cf_header in $cf_header_list
10241 cat >"conftest.$ac_ext" <<_ACEOF
10242 #line 10242 "configure"
10243 #include "confdefs.h"
10245 #include <$cf_header>
10250 #ifdef NCURSES_VERSION
10252 printf("%s\\n", NCURSES_VERSION);
10265 rm -f "conftest.$ac_objext"
10266 if { (eval echo "$as_me:10266: \"$ac_compile\"") >&5
10267 (eval $ac_compile) 2>&5
10269 echo "$as_me:10269: \$? = $ac_status" >&5
10270 (exit "$ac_status"); } &&
10271 { ac_try='test -s "conftest.$ac_objext"'
10272 { (eval echo "$as_me:10272: \"$ac_try\"") >&5
10273 (eval $ac_try) 2>&5
10275 echo "$as_me:10275: \$? = $ac_status" >&5
10276 (exit "$ac_status"); }; }; then
10277 cf_cv_ncurses_h=$cf_header
10280 echo "$as_me: failed program was:" >&5
10281 cat "conftest.$ac_ext" >&5
10284 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10286 test "$cf_cv_ncurses_h" != no && break
10290 echo "$as_me:10290: result: $cf_cv_ncurses_h" >&5
10291 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10293 if test "$cf_cv_ncurses_h" != no ; then
10294 cf_cv_ncurses_header=$cf_cv_ncurses_h
10297 echo "$as_me:10297: checking for $cf_ncuhdr_root include-path" >&5
10298 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10299 if test "${cf_cv_ncurses_h2+set}" = set; then
10300 echo $ECHO_N "(cached) $ECHO_C" >&6
10303 test -n "$verbose" && echo
10307 # collect the current set of include-directories from compiler flags
10308 cf_header_path_list=""
10309 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10310 for cf_header_path in $CPPFLAGS $CFLAGS
10312 case "$cf_header_path" in
10314 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10316 test "x$cf_header_path" != "xNONE" && \
10317 test -d "$cf_header_path" && \
10319 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10320 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
10321 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10322 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10323 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10324 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"
10327 cf_header_path_list="$cf_header_path_list $cf_search"
10333 # add the variations for the package we are looking for
10337 test "x$prefix" != "xNONE" && \
10338 test -d "$prefix" && \
10340 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10341 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
10342 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10343 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10344 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10345 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10348 for cf_subdir_prefix in \
10357 test "x$cf_subdir_prefix" != "x$prefix" && \
10358 test -d "$cf_subdir_prefix" && \
10359 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10360 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10361 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
10362 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10363 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10364 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10365 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"
10370 test "$includedir" != NONE && \
10371 test "$includedir" != "/usr/include" && \
10372 test -d "$includedir" && {
10373 test -d "$includedir" && cf_search="$cf_search $includedir"
10374 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10377 test "$oldincludedir" != NONE && \
10378 test "$oldincludedir" != "/usr/include" && \
10379 test -d "$oldincludedir" && {
10380 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
10381 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10384 cf_search="$cf_search $cf_header_path_list"
10386 test -n "$verbose" && echo "search path $cf_search"
10387 cf_save2_CPPFLAGS="$CPPFLAGS"
10388 for cf_incdir in $cf_search
10391 if test -n "$cf_incdir" ; then
10392 for cf_add_incdir in $cf_incdir
10394 while test "$cf_add_incdir" != /usr/include
10396 if test -d "$cf_add_incdir"
10399 if test -n "$CFLAGS$CPPFLAGS" ; then
10400 # a loop is needed to ensure we can add subdirs of existing dirs
10401 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10402 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10403 cf_have_incdir=yes; break
10408 if test "$cf_have_incdir" = no ; then
10409 if test "$cf_add_incdir" = /usr/local/include ; then
10410 if test "$GCC" = yes
10412 cf_save_CPPFLAGS=$CPPFLAGS
10414 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10415 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10417 cat >"conftest.$ac_ext" <<_ACEOF
10418 #line 10418 "configure"
10419 #include "confdefs.h"
10429 rm -f "conftest.$ac_objext"
10430 if { (eval echo "$as_me:10430: \"$ac_compile\"") >&5
10431 (eval $ac_compile) 2>&5
10433 echo "$as_me:10433: \$? = $ac_status" >&5
10434 (exit "$ac_status"); } &&
10435 { ac_try='test -s "conftest.$ac_objext"'
10436 { (eval echo "$as_me:10436: \"$ac_try\"") >&5
10437 (eval $ac_try) 2>&5
10439 echo "$as_me:10439: \$? = $ac_status" >&5
10440 (exit "$ac_status"); }; }; then
10443 echo "$as_me: failed program was:" >&5
10444 cat "conftest.$ac_ext" >&5
10447 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10448 CPPFLAGS=$cf_save_CPPFLAGS
10453 if test "$cf_have_incdir" = no ; then
10454 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10456 echo "${as_me:-configure}:10456: testing adding $cf_add_incdir to include-path ..." 1>&5
10458 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10460 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10461 test "$cf_top_incdir" = "$cf_add_incdir" && break
10462 cf_add_incdir="$cf_top_incdir"
10478 cat >"conftest.$ac_ext" <<_ACEOF
10479 #line 10479 "configure"
10480 #include "confdefs.h"
10482 #include <$cf_header>
10487 #ifdef NCURSES_VERSION
10489 printf("%s\\n", NCURSES_VERSION);
10502 rm -f "conftest.$ac_objext"
10503 if { (eval echo "$as_me:10503: \"$ac_compile\"") >&5
10504 (eval $ac_compile) 2>&5
10506 echo "$as_me:10506: \$? = $ac_status" >&5
10507 (exit "$ac_status"); } &&
10508 { ac_try='test -s "conftest.$ac_objext"'
10509 { (eval echo "$as_me:10509: \"$ac_try\"") >&5
10510 (eval $ac_try) 2>&5
10512 echo "$as_me:10512: \$? = $ac_status" >&5
10513 (exit "$ac_status"); }; }; then
10514 cf_cv_ncurses_h2=$cf_header
10517 echo "$as_me: failed program was:" >&5
10518 cat "conftest.$ac_ext" >&5
10519 cf_cv_ncurses_h2=no
10521 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10523 if test "$cf_cv_ncurses_h2" != no ; then
10524 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10525 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
10528 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10530 CPPFLAGS="$cf_save2_CPPFLAGS"
10531 test "$cf_cv_ncurses_h2" != no && break
10533 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10533: error: not found" >&5
10534 echo "$as_me: error: not found" >&2;}
10535 { (exit 1); exit 1; }; }
10538 echo "$as_me:10538: result: $cf_cv_ncurses_h2" >&5
10539 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10541 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
10542 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
10543 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
10544 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
10547 if test -n "$cf_1st_incdir" ; then
10548 for cf_add_incdir in $cf_1st_incdir
10550 while test "$cf_add_incdir" != /usr/include
10552 if test -d "$cf_add_incdir"
10555 if test -n "$CFLAGS$CPPFLAGS" ; then
10556 # a loop is needed to ensure we can add subdirs of existing dirs
10557 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10558 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10559 cf_have_incdir=yes; break
10564 if test "$cf_have_incdir" = no ; then
10565 if test "$cf_add_incdir" = /usr/local/include ; then
10566 if test "$GCC" = yes
10568 cf_save_CPPFLAGS=$CPPFLAGS
10570 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10571 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10573 cat >"conftest.$ac_ext" <<_ACEOF
10574 #line 10574 "configure"
10575 #include "confdefs.h"
10585 rm -f "conftest.$ac_objext"
10586 if { (eval echo "$as_me:10586: \"$ac_compile\"") >&5
10587 (eval $ac_compile) 2>&5
10589 echo "$as_me:10589: \$? = $ac_status" >&5
10590 (exit "$ac_status"); } &&
10591 { ac_try='test -s "conftest.$ac_objext"'
10592 { (eval echo "$as_me:10592: \"$ac_try\"") >&5
10593 (eval $ac_try) 2>&5
10595 echo "$as_me:10595: \$? = $ac_status" >&5
10596 (exit "$ac_status"); }; }; then
10599 echo "$as_me: failed program was:" >&5
10600 cat "conftest.$ac_ext" >&5
10603 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10604 CPPFLAGS=$cf_save_CPPFLAGS
10609 if test "$cf_have_incdir" = no ; then
10610 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10612 echo "${as_me:-configure}:10612: testing adding $cf_add_incdir to include-path ..." 1>&5
10614 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10616 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10617 test "$cf_top_incdir" = "$cf_add_incdir" && break
10618 cf_add_incdir="$cf_top_incdir"
10631 # Set definitions to allow ifdef'ing for ncurses.h
10633 case "$cf_cv_ncurses_header" in
10636 cat >>confdefs.h <<\EOF
10637 #define HAVE_NCURSES_H 1
10643 case "$cf_cv_ncurses_header" in
10644 (ncurses/curses.h|ncurses/ncurses.h)
10646 cat >>confdefs.h <<\EOF
10647 #define HAVE_NCURSES_NCURSES_H 1
10651 (ncursesw/curses.h|ncursesw/ncurses.h)
10653 cat >>confdefs.h <<\EOF
10654 #define HAVE_NCURSESW_NCURSES_H 1
10660 echo "$as_me:10660: checking for terminfo header" >&5
10661 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10662 if test "${cf_cv_term_header+set}" = set; then
10663 echo $ECHO_N "(cached) $ECHO_C" >&6
10666 case "${cf_cv_ncurses_header}" in
10667 (*/ncurses.h|*/ncursesw.h)
10668 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10671 cf_term_header=term.h
10675 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10677 cat >"conftest.$ac_ext" <<_ACEOF
10678 #line 10678 "configure"
10679 #include "confdefs.h"
10681 #include <${cf_cv_ncurses_header:-curses.h}>
10682 #include <$cf_test>
10687 int x = auto_left_margin; (void)x
10692 rm -f "conftest.$ac_objext"
10693 if { (eval echo "$as_me:10693: \"$ac_compile\"") >&5
10694 (eval $ac_compile) 2>&5
10696 echo "$as_me:10696: \$? = $ac_status" >&5
10697 (exit "$ac_status"); } &&
10698 { ac_try='test -s "conftest.$ac_objext"'
10699 { (eval echo "$as_me:10699: \"$ac_try\"") >&5
10700 (eval $ac_try) 2>&5
10702 echo "$as_me:10702: \$? = $ac_status" >&5
10703 (exit "$ac_status"); }; }; then
10705 cf_cv_term_header="$cf_test"
10707 echo "$as_me: failed program was:" >&5
10708 cat "conftest.$ac_ext" >&5
10710 cf_cv_term_header=unknown
10713 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10714 test "$cf_cv_term_header" != unknown && break
10718 echo "$as_me:10718: result: $cf_cv_term_header" >&5
10719 echo "${ECHO_T}$cf_cv_term_header" >&6
10721 # Set definitions to allow ifdef'ing to accommodate subdirectories
10723 case "$cf_cv_term_header" in
10726 cat >>confdefs.h <<\EOF
10727 #define HAVE_TERM_H 1
10733 case "$cf_cv_term_header" in
10736 cat >>confdefs.h <<\EOF
10737 #define HAVE_NCURSES_TERM_H 1
10743 cat >>confdefs.h <<\EOF
10744 #define HAVE_NCURSESW_TERM_H 1
10750 # some applications need this, but should check for NCURSES_VERSION
10752 cat >>confdefs.h <<\EOF
10756 echo "$as_me:10756: checking for ncurses version" >&5
10757 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10758 if test "${cf_cv_ncurses_version+set}" = set; then
10759 echo $ECHO_N "(cached) $ECHO_C" >&6
10762 cf_cv_ncurses_version=no
10764 rm -f "$cf_tempfile"
10765 if test "$cross_compiling" = yes; then
10767 # This will not work if the preprocessor splits the line after the
10768 # Autoconf token. The 'unproto' program does that.
10769 cat > "conftest.$ac_ext" <<EOF
10770 #include <${cf_cv_ncurses_header:-curses.h}>
10772 #ifdef NCURSES_VERSION
10773 Autoconf NCURSES_VERSION
10781 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10782 { (eval echo "$as_me:10782: \"$cf_try\"") >&5
10783 (eval $cf_try) 2>&5
10785 echo "$as_me:10785: \$? = $ac_status" >&5
10786 (exit "$ac_status"); }
10787 if test -f conftest.out ; then
10788 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
10789 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10794 cat >"conftest.$ac_ext" <<_ACEOF
10795 #line 10795 "configure"
10796 #include "confdefs.h"
10798 #include <${cf_cv_ncurses_header:-curses.h}>
10802 FILE *fp = fopen("$cf_tempfile", "w");
10803 #ifdef NCURSES_VERSION
10804 # ifdef NCURSES_VERSION_PATCH
10805 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10807 fprintf(fp, "%s\\n", NCURSES_VERSION);
10810 # ifdef __NCURSES_H
10811 fprintf(fp, "old\\n");
10816 ${cf_cv_main_return:-return}(0);
10819 rm -f "conftest$ac_exeext"
10820 if { (eval echo "$as_me:10820: \"$ac_link\"") >&5
10821 (eval $ac_link) 2>&5
10823 echo "$as_me:10823: \$? = $ac_status" >&5
10824 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10825 { (eval echo "$as_me:10825: \"$ac_try\"") >&5
10826 (eval $ac_try) 2>&5
10828 echo "$as_me:10828: \$? = $ac_status" >&5
10829 (exit "$ac_status"); }; }; then
10831 cf_cv_ncurses_version=`cat $cf_tempfile`
10833 echo "$as_me: program exited with status $ac_status" >&5
10834 echo "$as_me: failed program was:" >&5
10835 cat "conftest.$ac_ext" >&5
10837 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10839 rm -f "$cf_tempfile"
10842 echo "$as_me:10842: result: $cf_cv_ncurses_version" >&5
10843 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10844 test "$cf_cv_ncurses_version" = no ||
10845 cat >>confdefs.h <<\EOF
10849 cf_nculib_root=ncurses
10850 # This works, except for the special case where we find gpm, but
10851 # ncurses is in a nonstandard location via $LIBS, and we really want
10854 cf_ncurses_SAVE="$LIBS"
10855 echo "$as_me:10855: checking for Gpm_Open in -lgpm" >&5
10856 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10857 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10858 echo $ECHO_N "(cached) $ECHO_C" >&6
10860 ac_check_lib_save_LIBS=$LIBS
10862 cat >"conftest.$ac_ext" <<_ACEOF
10863 #line 10863 "configure"
10864 #include "confdefs.h"
10866 /* Override any gcc2 internal prototype to avoid an error. */
10870 /* We use char because int might match the return type of a gcc2
10871 builtin and then its argument prototype would still apply. */
10881 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10882 if { (eval echo "$as_me:10882: \"$ac_link\"") >&5
10883 (eval $ac_link) 2>&5
10885 echo "$as_me:10885: \$? = $ac_status" >&5
10886 (exit "$ac_status"); } &&
10887 { ac_try='test -s "conftest$ac_exeext"'
10888 { (eval echo "$as_me:10888: \"$ac_try\"") >&5
10889 (eval $ac_try) 2>&5
10891 echo "$as_me:10891: \$? = $ac_status" >&5
10892 (exit "$ac_status"); }; }; then
10893 ac_cv_lib_gpm_Gpm_Open=yes
10895 echo "$as_me: failed program was:" >&5
10896 cat "conftest.$ac_ext" >&5
10897 ac_cv_lib_gpm_Gpm_Open=no
10899 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10900 LIBS=$ac_check_lib_save_LIBS
10902 echo "$as_me:10902: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10903 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
10904 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
10905 echo "$as_me:10905: checking for initscr in -lgpm" >&5
10906 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
10907 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
10908 echo $ECHO_N "(cached) $ECHO_C" >&6
10910 ac_check_lib_save_LIBS=$LIBS
10912 cat >"conftest.$ac_ext" <<_ACEOF
10913 #line 10913 "configure"
10914 #include "confdefs.h"
10916 /* Override any gcc2 internal prototype to avoid an error. */
10920 /* We use char because int might match the return type of a gcc2
10921 builtin and then its argument prototype would still apply. */
10931 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10932 if { (eval echo "$as_me:10932: \"$ac_link\"") >&5
10933 (eval $ac_link) 2>&5
10935 echo "$as_me:10935: \$? = $ac_status" >&5
10936 (exit "$ac_status"); } &&
10937 { ac_try='test -s "conftest$ac_exeext"'
10938 { (eval echo "$as_me:10938: \"$ac_try\"") >&5
10939 (eval $ac_try) 2>&5
10941 echo "$as_me:10941: \$? = $ac_status" >&5
10942 (exit "$ac_status"); }; }; then
10943 ac_cv_lib_gpm_initscr=yes
10945 echo "$as_me: failed program was:" >&5
10946 cat "conftest.$ac_ext" >&5
10947 ac_cv_lib_gpm_initscr=no
10949 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10950 LIBS=$ac_check_lib_save_LIBS
10952 echo "$as_me:10952: result: $ac_cv_lib_gpm_initscr" >&5
10953 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
10954 if test "$ac_cv_lib_gpm_initscr" = yes; then
10955 LIBS="$cf_ncurses_SAVE"
10957 cf_ncurses_LIBS="-lgpm"
10964 # This is only necessary if you are linking against an obsolete
10965 # version of ncurses (but it should do no harm, since it is static).
10966 if test "$cf_nculib_root" = ncurses ; then
10967 echo "$as_me:10967: checking for tgoto in -lmytinfo" >&5
10968 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
10969 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
10970 echo $ECHO_N "(cached) $ECHO_C" >&6
10972 ac_check_lib_save_LIBS=$LIBS
10973 LIBS="-lmytinfo $LIBS"
10974 cat >"conftest.$ac_ext" <<_ACEOF
10975 #line 10975 "configure"
10976 #include "confdefs.h"
10978 /* Override any gcc2 internal prototype to avoid an error. */
10982 /* We use char because int might match the return type of a gcc2
10983 builtin and then its argument prototype would still apply. */
10993 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10994 if { (eval echo "$as_me:10994: \"$ac_link\"") >&5
10995 (eval $ac_link) 2>&5
10997 echo "$as_me:10997: \$? = $ac_status" >&5
10998 (exit "$ac_status"); } &&
10999 { ac_try='test -s "conftest$ac_exeext"'
11000 { (eval echo "$as_me:11000: \"$ac_try\"") >&5
11001 (eval $ac_try) 2>&5
11003 echo "$as_me:11003: \$? = $ac_status" >&5
11004 (exit "$ac_status"); }; }; then
11005 ac_cv_lib_mytinfo_tgoto=yes
11007 echo "$as_me: failed program was:" >&5
11008 cat "conftest.$ac_ext" >&5
11009 ac_cv_lib_mytinfo_tgoto=no
11011 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11012 LIBS=$ac_check_lib_save_LIBS
11014 echo "$as_me:11014: result: $ac_cv_lib_mytinfo_tgoto" >&5
11015 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11016 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
11017 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
11024 cf_add_libs="$LIBS"
11027 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11028 # filter duplicates
11029 for cf_add_1lib in $cf_add_0lib; do
11030 for cf_add_2lib in $cf_add_libs; do
11031 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11036 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11038 LIBS="$cf_add_libs"
11040 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
11043 cf_add_libs="$LIBS"
11046 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11047 # filter duplicates
11048 for cf_add_1lib in $cf_add_0lib; do
11049 for cf_add_2lib in $cf_add_libs; do
11050 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11055 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11057 LIBS="$cf_add_libs"
11061 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
11063 echo "$as_me:11063: checking for initscr" >&5
11064 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
11065 if test "${ac_cv_func_initscr+set}" = set; then
11066 echo $ECHO_N "(cached) $ECHO_C" >&6
11068 cat >"conftest.$ac_ext" <<_ACEOF
11069 #line 11069 "configure"
11070 #include "confdefs.h"
11071 #define initscr autoconf_temporary
11072 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11079 /* We use char because int might match the return type of a gcc2
11080 builtin and then its argument prototype would still apply. */
11081 char initscr (void);
11087 /* The GNU C library defines stubs for functions which it implements
11088 to always fail with ENOSYS. Some functions are actually named
11089 something starting with __ and the normal name is an alias. */
11090 #if defined (__stub_initscr) || defined (__stub___initscr)
11091 #error found stub for initscr
11099 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11100 if { (eval echo "$as_me:11100: \"$ac_link\"") >&5
11101 (eval $ac_link) 2>&5
11103 echo "$as_me:11103: \$? = $ac_status" >&5
11104 (exit "$ac_status"); } &&
11105 { ac_try='test -s "conftest$ac_exeext"'
11106 { (eval echo "$as_me:11106: \"$ac_try\"") >&5
11107 (eval $ac_try) 2>&5
11109 echo "$as_me:11109: \$? = $ac_status" >&5
11110 (exit "$ac_status"); }; }; then
11111 ac_cv_func_initscr=yes
11113 echo "$as_me: failed program was:" >&5
11114 cat "conftest.$ac_ext" >&5
11115 ac_cv_func_initscr=no
11117 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11119 echo "$as_me:11119: result: $ac_cv_func_initscr" >&5
11120 echo "${ECHO_T}$ac_cv_func_initscr" >&6
11121 if test "$ac_cv_func_initscr" = yes; then
11122 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11125 cf_save_LIBS="$LIBS"
11126 echo "$as_me:11126: checking for initscr in -l$cf_nculib_root" >&5
11127 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
11128 LIBS="-l$cf_nculib_root $LIBS"
11129 cat >"conftest.$ac_ext" <<_ACEOF
11130 #line 11130 "configure"
11131 #include "confdefs.h"
11132 #include <${cf_cv_ncurses_header:-curses.h}>
11141 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11142 if { (eval echo "$as_me:11142: \"$ac_link\"") >&5
11143 (eval $ac_link) 2>&5
11145 echo "$as_me:11145: \$? = $ac_status" >&5
11146 (exit "$ac_status"); } &&
11147 { ac_try='test -s "conftest$ac_exeext"'
11148 { (eval echo "$as_me:11148: \"$ac_try\"") >&5
11149 (eval $ac_try) 2>&5
11151 echo "$as_me:11151: \$? = $ac_status" >&5
11152 (exit "$ac_status"); }; }; then
11153 echo "$as_me:11153: result: yes" >&5
11154 echo "${ECHO_T}yes" >&6
11155 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11158 echo "$as_me: failed program was:" >&5
11159 cat "conftest.$ac_ext" >&5
11160 echo "$as_me:11160: result: no" >&5
11161 echo "${ECHO_T}no" >&6
11164 cf_library_path_list=""
11165 if test -n "${LDFLAGS}${LIBS}" ; then
11166 for cf_library_path in $LDFLAGS $LIBS
11168 case "$cf_library_path" in
11170 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11172 test "x$cf_library_path" != "xNONE" && \
11173 test -d "$cf_library_path" && \
11175 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11176 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
11177 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11178 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11179 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11180 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"
11183 cf_library_path_list="$cf_library_path_list $cf_search"
11191 test "x$prefix" != "xNONE" && \
11192 test -d "$prefix" && \
11194 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11195 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
11196 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11197 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11198 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11199 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11202 for cf_subdir_prefix in \
11211 test "x$cf_subdir_prefix" != "x$prefix" && \
11212 test -d "$cf_subdir_prefix" && \
11213 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11214 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11215 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
11216 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11217 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11218 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11219 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"
11224 cf_search="$cf_library_path_list $cf_search"
11226 for cf_libdir in $cf_search
11228 echo "$as_me:11228: checking for -l$cf_nculib_root in $cf_libdir" >&5
11229 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11230 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11231 cat >"conftest.$ac_ext" <<_ACEOF
11232 #line 11232 "configure"
11233 #include "confdefs.h"
11234 #include <${cf_cv_ncurses_header:-curses.h}>
11243 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11244 if { (eval echo "$as_me:11244: \"$ac_link\"") >&5
11245 (eval $ac_link) 2>&5
11247 echo "$as_me:11247: \$? = $ac_status" >&5
11248 (exit "$ac_status"); } &&
11249 { ac_try='test -s "conftest$ac_exeext"'
11250 { (eval echo "$as_me:11250: \"$ac_try\"") >&5
11251 (eval $ac_try) 2>&5
11253 echo "$as_me:11253: \$? = $ac_status" >&5
11254 (exit "$ac_status"); }; }; then
11255 echo "$as_me:11255: result: yes" >&5
11256 echo "${ECHO_T}yes" >&6
11257 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11260 echo "$as_me: failed program was:" >&5
11261 cat "conftest.$ac_ext" >&5
11262 echo "$as_me:11262: result: no" >&5
11263 echo "${ECHO_T}no" >&6
11264 LIBS="$cf_save_LIBS"
11266 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11270 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11274 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
11276 if test "$cf_found_library" = no ; then
11277 { { echo "$as_me:11277: error: Cannot link $cf_nculib_root library" >&5
11278 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11279 { (exit 1); exit 1; }; }
11284 if test -n "$cf_ncurses_LIBS" ; then
11285 echo "$as_me:11285: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11286 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11287 cf_ncurses_SAVE="$LIBS"
11288 for p in $cf_ncurses_LIBS ; do
11289 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
11290 if test "$q" != "$LIBS" ; then
11294 cat >"conftest.$ac_ext" <<_ACEOF
11295 #line 11295 "configure"
11296 #include "confdefs.h"
11297 #include <${cf_cv_ncurses_header:-curses.h}>
11301 initscr(); mousemask(0,0); tigetstr((char *)0);
11306 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11307 if { (eval echo "$as_me:11307: \"$ac_link\"") >&5
11308 (eval $ac_link) 2>&5
11310 echo "$as_me:11310: \$? = $ac_status" >&5
11311 (exit "$ac_status"); } &&
11312 { ac_try='test -s "conftest$ac_exeext"'
11313 { (eval echo "$as_me:11313: \"$ac_try\"") >&5
11314 (eval $ac_try) 2>&5
11316 echo "$as_me:11316: \$? = $ac_status" >&5
11317 (exit "$ac_status"); }; }; then
11318 echo "$as_me:11318: result: yes" >&5
11319 echo "${ECHO_T}yes" >&6
11321 echo "$as_me: failed program was:" >&5
11322 cat "conftest.$ac_ext" >&5
11323 echo "$as_me:11323: result: no" >&5
11324 echo "${ECHO_T}no" >&6
11325 LIBS="$cf_ncurses_SAVE"
11327 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11330 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11332 cat >>confdefs.h <<EOF
11333 #define $cf_nculib_ROOT 1
11338 NCURSES_CONFIG=none
11343 if test "$NCURSES_CONFIG_PKG" != none ; then
11344 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
11346 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11347 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11348 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11350 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
11351 if test -z "$cf_cv_abi_version"
11353 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
11356 elif test "$NCURSES_CONFIG" != none ; then
11358 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
11360 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11361 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11362 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11364 # ABI version is not available from headers
11365 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
11369 for cf_name in MAJOR MINOR PATCH
11371 cat >conftest.$ac_ext <<CF_EOF
11372 #include <${cf_cv_ncurses_header:-curses.h}>
11373 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
11375 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
11376 { (eval echo "$as_me:11376: \"$cf_try\"") >&5
11377 (eval $cf_try) 2>&5
11379 echo "$as_me:11379: \$? = $ac_status" >&5
11380 (exit "$ac_status"); }
11381 if test -f conftest.out ; then
11382 cf_result=`sed -e "s/^.*AUTOCONF_${cf_name}[ ][ ]*//" conftest.out`
11383 eval NCURSES_$cf_name=\"$cf_result\"
11384 # cat conftest.$ac_ext
11389 cf_cv_abi_version=${NCURSES_MAJOR}
11393 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
11395 cf_cv_timestamp=`date`
11397 echo "$as_me:11397: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
11398 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
11400 echo "$as_me:11400: checking if you want to have a library-prefix" >&5
11401 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
11403 # Check whether --with-lib-prefix or --without-lib-prefix was given.
11404 if test "${with_lib_prefix+set}" = set; then
11405 withval="$with_lib_prefix"
11406 with_lib_prefix=$withval
11408 with_lib_prefix=auto
11410 echo "$as_me:11410: result: $with_lib_prefix" >&5
11411 echo "${ECHO_T}$with_lib_prefix" >&6
11413 if test "$with_lib_prefix" = auto
11416 case "$cf_cv_system_name" in
11418 if test "$DFT_LWR_MODEL" = libtool; then
11427 (*) LIB_PREFIX='lib'
11430 cf_prefix=$LIB_PREFIX
11432 elif test "$with_lib_prefix" = no
11436 LIB_PREFIX=$with_lib_prefix
11441 ###############################################################################
11443 if test X"$CC_G_OPT" = X"" ; then
11445 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
11448 echo "$as_me:11448: checking for default loader flags" >&5
11449 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
11450 case $DFT_LWR_MODEL in
11451 (normal) LD_MODEL='' ;;
11452 (debug) LD_MODEL=$CC_G_OPT ;;
11453 (profile) LD_MODEL='-pg';;
11454 (shared) LD_MODEL='' ;;
11456 echo "$as_me:11456: result: $LD_MODEL" >&5
11457 echo "${ECHO_T}$LD_MODEL" >&6
11460 if test "x$cf_cv_enable_rpath" != xno
11462 echo "$as_me:11462: checking for an rpath option" >&5
11463 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
11464 case "$cf_cv_system_name" in
11466 if test "$GCC" = yes; then
11467 LD_RPATH_OPT="-Wl,-rpath,"
11469 LD_RPATH_OPT="-rpath "
11472 (linux*|gnu*|k*bsd*-gnu|freebsd*)
11473 LD_RPATH_OPT="-Wl,-rpath,"
11475 (openbsd[2-9].*|mirbsd*)
11476 LD_RPATH_OPT="-Wl,-rpath,"
11479 LD_RPATH_OPT="-rpath "
11482 LD_RPATH_OPT="-Wl,-rpath,"
11485 LD_RPATH_OPT="-rpath "
11493 echo "$as_me:11493: result: $LD_RPATH_OPT" >&5
11494 echo "${ECHO_T}$LD_RPATH_OPT" >&6
11496 case "x$LD_RPATH_OPT" in
11498 echo "$as_me:11498: checking if we need a space after rpath option" >&5
11499 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
11500 cf_save_LIBS="$LIBS"
11502 cf_add_libs="$LIBS"
11505 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11506 # filter duplicates
11507 for cf_add_1lib in $cf_add_0lib; do
11508 for cf_add_2lib in $cf_add_libs; do
11509 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11514 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11516 LIBS="$cf_add_libs"
11518 cat >"conftest.$ac_ext" <<_ACEOF
11519 #line 11519 "configure"
11520 #include "confdefs.h"
11530 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11531 if { (eval echo "$as_me:11531: \"$ac_link\"") >&5
11532 (eval $ac_link) 2>&5
11534 echo "$as_me:11534: \$? = $ac_status" >&5
11535 (exit "$ac_status"); } &&
11536 { ac_try='test -s "conftest$ac_exeext"'
11537 { (eval echo "$as_me:11537: \"$ac_try\"") >&5
11538 (eval $ac_try) 2>&5
11540 echo "$as_me:11540: \$? = $ac_status" >&5
11541 (exit "$ac_status"); }; }; then
11544 echo "$as_me: failed program was:" >&5
11545 cat "conftest.$ac_ext" >&5
11548 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11549 LIBS="$cf_save_LIBS"
11550 echo "$as_me:11550: result: $cf_rpath_space" >&5
11551 echo "${ECHO_T}$cf_rpath_space" >&6
11552 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
11561 INSTALL_LIB="-m 644"
11562 : ${rel_builddir:=.}
11568 cf_cv_do_symlinks=no
11570 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
11572 echo "$as_me:11572: checking if release/abi version should be used for shared libs" >&5
11573 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
11575 # Check whether --with-shlib-version or --without-shlib-version was given.
11576 if test "${with_shlib_version+set}" = set; then
11577 withval="$with_shlib_version"
11578 test -z "$withval" && withval=auto
11581 cf_cv_shlib_version=auto
11584 cf_cv_shlib_version=$withval
11587 echo "$as_me:11587: result: $withval" >&5
11588 echo "${ECHO_T}$withval" >&6
11589 { { echo "$as_me:11589: error: option value must be one of: rel, abi, or auto" >&5
11590 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
11591 { (exit 1); exit 1; }; }
11596 cf_cv_shlib_version=auto
11598 echo "$as_me:11598: result: $cf_cv_shlib_version" >&5
11599 echo "${ECHO_T}$cf_cv_shlib_version" >&6
11601 cf_cv_rm_so_locs=no
11604 # Some less-capable ports of gcc support only -fpic
11608 if test "$GCC" = yes
11612 case "$cf_cv_system_name" in
11613 (*linux*) # e.g., PGI compiler
11619 if test "$cf_try_fPIC" = yes
11621 echo "$as_me:11621: checking which $CC option to use" >&5
11622 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
11623 cf_save_CFLAGS="$CFLAGS"
11624 for CC_SHARED_OPTS in -fPIC -fpic ''
11626 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
11627 cat >"conftest.$ac_ext" <<_ACEOF
11628 #line 11628 "configure"
11629 #include "confdefs.h"
11639 rm -f "conftest.$ac_objext"
11640 if { (eval echo "$as_me:11640: \"$ac_compile\"") >&5
11641 (eval $ac_compile) 2>&5
11643 echo "$as_me:11643: \$? = $ac_status" >&5
11644 (exit "$ac_status"); } &&
11645 { ac_try='test -s "conftest.$ac_objext"'
11646 { (eval echo "$as_me:11646: \"$ac_try\"") >&5
11647 (eval $ac_try) 2>&5
11649 echo "$as_me:11649: \$? = $ac_status" >&5
11650 (exit "$ac_status"); }; }; then
11653 echo "$as_me: failed program was:" >&5
11654 cat "conftest.$ac_ext" >&5
11656 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11658 echo "$as_me:11658: result: $CC_SHARED_OPTS" >&5
11659 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
11660 CFLAGS="$cf_save_CFLAGS"
11663 cf_cv_shlib_version_infix=no
11665 case "$cf_cv_system_name" in
11666 (aix4.3-9*|aix[5-7]*)
11667 if test "$GCC" = yes; then
11668 CC_SHARED_OPTS='-Wl,-brtl'
11669 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11671 CC_SHARED_OPTS='-brtl'
11672 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
11673 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11677 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
11681 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11682 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11683 cf_cv_shlib_version=cygdll
11684 cf_cv_shlib_version_infix=cygdll
11687 cat >mk_shared_lib.sh <<-CF_EOF
11690 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11693 Linking shared library
11694 ** SHARED_LIB \$SHARED_LIB
11695 ** IMPORT_LIB \$IMPORT_LIB
11697 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11699 chmod +x mk_shared_lib.sh
11703 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11704 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11705 cf_cv_shlib_version=msysdll
11706 cf_cv_shlib_version_infix=msysdll
11709 cat >mk_shared_lib.sh <<-CF_EOF
11712 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11715 Linking shared library
11716 ** SHARED_LIB \$SHARED_LIB
11717 ** IMPORT_LIB \$IMPORT_LIB
11719 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11721 chmod +x mk_shared_lib.sh
11724 cf_try_cflags="no-cpp-precomp"
11725 CC_SHARED_OPTS="-dynamic"
11726 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
11727 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
11728 cf_cv_shlib_version_infix=yes
11729 echo "$as_me:11729: checking if ld -search_paths_first works" >&5
11730 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
11731 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
11732 echo $ECHO_N "(cached) $ECHO_C" >&6
11735 cf_save_LDFLAGS=$LDFLAGS
11736 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11737 cat >"conftest.$ac_ext" <<_ACEOF
11738 #line 11738 "configure"
11739 #include "confdefs.h"
11749 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11750 if { (eval echo "$as_me:11750: \"$ac_link\"") >&5
11751 (eval $ac_link) 2>&5
11753 echo "$as_me:11753: \$? = $ac_status" >&5
11754 (exit "$ac_status"); } &&
11755 { ac_try='test -s "conftest$ac_exeext"'
11756 { (eval echo "$as_me:11756: \"$ac_try\"") >&5
11757 (eval $ac_try) 2>&5
11759 echo "$as_me:11759: \$? = $ac_status" >&5
11760 (exit "$ac_status"); }; }; then
11761 cf_cv_ldflags_search_paths_first=yes
11763 echo "$as_me: failed program was:" >&5
11764 cat "conftest.$ac_ext" >&5
11765 cf_cv_ldflags_search_paths_first=no
11767 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11768 LDFLAGS=$cf_save_LDFLAGS
11770 echo "$as_me:11770: result: $cf_cv_ldflags_search_paths_first" >&5
11771 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
11772 if test "$cf_cv_ldflags_search_paths_first" = yes; then
11773 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11778 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11779 if test "$cf_cv_shlib_version" = rel; then
11780 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11782 cf_cv_shared_soname='`basename $@`'
11785 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11788 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
11789 if test "$GCC" != yes; then
11790 CC_SHARED_OPTS='+Z'
11792 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
11793 INSTALL_LIB="-m 555"
11796 # (tested with gcc 2.7.2 -- I don't have c89)
11797 if test "$GCC" = yes; then
11798 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
11800 CC_SHARED_OPTS='+Z'
11801 LD_SHARED_OPTS='-Wl,+b,${libdir}'
11803 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
11804 # HP-UX shared libraries must be executable, and should be
11805 # readonly to exploit a quirk in the memory manager.
11806 INSTALL_LIB="-m 555"
11809 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11810 if test "$cf_cv_shlib_version" = rel; then
11811 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11813 cf_shared_soname='`basename $@`'
11816 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
11819 if test "$cf_cv_enable_rpath" = yes ; then
11820 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11822 # tested with IRIX 5.2 and 'cc'.
11823 if test "$GCC" != yes; then
11824 CC_SHARED_OPTS='-KPIC'
11825 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
11827 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
11829 cf_cv_rm_so_locs=yes
11831 (linux*|gnu*|k*bsd*-gnu)
11832 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11833 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11834 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11836 if test "$cf_cv_enable_rpath" = yes ; then
11837 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11840 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11841 if test "$cf_cv_shlib_version" = rel; then
11842 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11844 cf_cv_shared_soname='`basename $@`'
11847 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11850 cf_cv_shlib_version=msvcdll
11851 cf_cv_shlib_version_infix=msvcdll
11854 if test "$DFT_LWR_MODEL" = "shared" ; then
11855 LOCAL_LDFLAGS="-link -dll"
11856 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11857 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
11860 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
11861 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
11862 cat >mk_shared_lib.sh <<-CF_EOF
11865 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
11870 Linking shared library
11871 ** SHARED LIB \$SHARED_LIB
11872 ** IMPORT_LIB \$IMPORT_LIB
11874 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
11875 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
11876 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
11878 chmod +x mk_shared_lib.sh
11879 cat >mk_prog.sh <<-CF_EOF
11882 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
11885 ldopts=("/subsystem:console")
11888 while test \$# -gt 0; do
11891 # ignore -link argument
11894 # ignore runtime-library option
11909 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
11912 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
11918 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
11919 ldopts+=("\${linkarg}")
11927 ldopts+=("-out:\$1")
11936 if [ "\$isdll" -ne 0 ]; then
11937 for lib in \${libs[*]}; do
11938 ldopts+=("\$lib.dll.lib")
11941 for lib in \${libs[*]}; do
11942 ldopts+=("\$lib.lib")
11947 ** ld options: "\${ldopts[@]}"
11949 exec \$LD \${ldopts[@]}
11951 chmod +x mk_prog.sh
11952 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
11953 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
11956 cf_cv_shlib_version=mingw
11957 cf_cv_shlib_version_infix=mingw
11960 if test "$DFT_LWR_MODEL" = "shared" ; then
11961 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
11962 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11963 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
11966 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11967 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11968 cat >mk_shared_lib.sh <<-CF_EOF
11971 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
11974 Linking shared library
11975 ** SHARED_LIB \$SHARED_LIB
11976 ** IMPORT_LIB \$IMPORT_LIB
11978 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11980 chmod +x mk_shared_lib.sh
11982 (openbsd[2-9].*|mirbsd*)
11983 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11984 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11985 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11987 if test "$cf_cv_enable_rpath" = yes ; then
11988 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11990 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11992 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11993 if test "$cf_cv_shlib_version" = rel; then
11994 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11996 cf_cv_shared_soname='`basename $@`'
11999 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12003 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
12007 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
12009 (nto-qnx*|openbsd*|freebsd[12].*)
12010 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12011 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
12012 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12014 (dragonfly*|freebsd*)
12015 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12016 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12017 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12018 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
12019 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12022 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12023 if test "$cf_cv_shlib_version" = rel; then
12024 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12026 cf_cv_shared_soname='`basename $@`'
12029 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12032 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12033 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12034 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12035 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12036 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12037 if test "$cf_cv_shlib_version" = auto; then
12038 if test -f /usr/libexec/ld.elf_so; then
12039 cf_cv_shlib_version=abi
12041 cf_cv_shlib_version=rel
12045 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12046 if test "$cf_cv_shlib_version" = rel; then
12047 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12049 cf_cv_shared_soname='`basename $@`'
12052 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
12054 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
12058 # tested with OSF/1 V3.2 and 'cc'
12059 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
12060 # link with shared libs).
12061 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
12064 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
12067 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
12068 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12069 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12070 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12072 cf_cv_rm_so_locs=yes
12074 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
12075 # tested with osr5.0.5
12076 if test "$GCC" != yes; then
12077 CC_SHARED_OPTS='-belf -KPIC'
12079 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
12080 if test "$cf_cv_enable_rpath" = yes ; then
12081 # only way is to set LD_RUN_PATH but no switch for it
12084 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12085 LINK_PROGS='LD_RUN_PATH=${libdir}'
12086 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
12089 # tested with SunOS 4.1.1 and gcc 2.7.0
12090 if test "$GCC" != yes; then
12091 CC_SHARED_OPTS='-KPIC'
12093 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
12094 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12097 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
12098 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
12099 if test "$DFT_LWR_MODEL" = "shared" ; then
12100 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
12101 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12103 if test "$cf_cv_enable_rpath" = yes ; then
12104 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
12107 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12108 if test "$cf_cv_shlib_version" = rel; then
12109 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12111 cf_cv_shared_soname='`basename $@`'
12114 if test "$GCC" != yes; then
12115 cf_save_CFLAGS="$CFLAGS"
12116 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
12118 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
12119 cat >"conftest.$ac_ext" <<_ACEOF
12120 #line 12120 "configure"
12121 #include "confdefs.h"
12126 printf("Hello\\n");
12131 rm -f "conftest.$ac_objext"
12132 if { (eval echo "$as_me:12132: \"$ac_compile\"") >&5
12133 (eval $ac_compile) 2>&5
12135 echo "$as_me:12135: \$? = $ac_status" >&5
12136 (exit "$ac_status"); } &&
12137 { ac_try='test -s "conftest.$ac_objext"'
12138 { (eval echo "$as_me:12138: \"$ac_try\"") >&5
12139 (eval $ac_try) 2>&5
12141 echo "$as_me:12141: \$? = $ac_status" >&5
12142 (exit "$ac_status"); }; }; then
12145 echo "$as_me: failed program was:" >&5
12146 cat "conftest.$ac_ext" >&5
12148 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12150 CFLAGS="$cf_save_CFLAGS"
12151 CC_SHARED_OPTS=$cf_shared_opts
12152 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
12154 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
12157 (sysv5uw7*|unix_sv*)
12158 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
12159 if test "$GCC" != yes; then
12160 CC_SHARED_OPTS='-KPIC'
12162 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
12165 CC_SHARED_OPTS='unknown'
12166 MK_SHARED_LIB='echo unknown'
12170 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
12171 case "$cf_cv_shlib_version" in
12173 case "$MK_SHARED_LIB" in
12175 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
12178 { echo "$as_me:12178: WARNING: ignored --with-shlib-version" >&5
12179 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
12185 if test -n "$cf_try_cflags"
12187 cat > conftest.$ac_ext <<EOF
12188 #line 12188 "${as_me:-configure}"
12190 int main(int argc, char *argv[])
12192 printf("hello\\n");
12193 return (argv[argc-1] == 0) ;
12196 cf_save_CFLAGS="$CFLAGS"
12197 for cf_opt in $cf_try_cflags
12199 CFLAGS="$cf_save_CFLAGS -$cf_opt"
12200 echo "$as_me:12200: checking if CFLAGS option -$cf_opt works" >&5
12201 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
12202 if { (eval echo "$as_me:12202: \"$ac_compile\"") >&5
12203 (eval $ac_compile) 2>&5
12205 echo "$as_me:12205: \$? = $ac_status" >&5
12206 (exit "$ac_status"); }; then
12207 echo "$as_me:12207: result: yes" >&5
12208 echo "${ECHO_T}yes" >&6
12209 cf_save_CFLAGS="$CFLAGS"
12211 echo "$as_me:12211: result: no" >&5
12212 echo "${ECHO_T}no" >&6
12215 CFLAGS="$cf_save_CFLAGS"
12218 # RPATH_LIST is a colon-separated list of directories
12219 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
12220 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
12222 test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
12224 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
12226 echo "${as_me:-configure}:12226: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
12228 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
12230 echo "${as_me:-configure}:12230: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
12232 # The test/sample programs in the original tree link using rpath option.
12233 # Make it optional for packagers.
12234 if test -n "$LOCAL_LDFLAGS"
12236 echo "$as_me:12236: checking if you want to link sample programs with rpath option" >&5
12237 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
12239 # Check whether --enable-rpath-link or --disable-rpath-link was given.
12240 if test "${enable_rpath_link+set}" = set; then
12241 enableval="$enable_rpath_link"
12242 with_rpath_link=$enableval
12244 with_rpath_link=yes
12246 echo "$as_me:12246: result: $with_rpath_link" >&5
12247 echo "${ECHO_T}$with_rpath_link" >&6
12248 if test "$with_rpath_link" = no
12255 ###############################################################################
12257 ### use option --enable-broken-linker to force on use of broken-linker support
12259 echo "$as_me:12259: checking if you want broken-linker support code" >&5
12260 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
12262 # Check whether --enable-broken_linker or --disable-broken_linker was given.
12263 if test "${enable_broken_linker+set}" = set; then
12264 enableval="$enable_broken_linker"
12265 with_broken_linker=$enableval
12267 with_broken_linker=no
12269 echo "$as_me:12269: result: $with_broken_linker" >&5
12270 echo "${ECHO_T}$with_broken_linker" >&6
12272 : "${BROKEN_LINKER:=0}"
12273 if test "x$with_broken_linker" = xyes ; then
12275 cat >>confdefs.h <<\EOF
12276 #define BROKEN_LINKER 1
12282 # Check to define _XOPEN_SOURCE "automatically"
12284 echo "$as_me:12284: checking if the POSIX test-macros are already defined" >&5
12285 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
12286 if test "${cf_cv_posix_visible+set}" = set; then
12287 echo $ECHO_N "(cached) $ECHO_C" >&6
12290 cat >"conftest.$ac_ext" <<_ACEOF
12291 #line 12291 "configure"
12292 #include "confdefs.h"
12298 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
12299 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
12300 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
12301 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
12302 #error conflicting symbols found
12309 rm -f "conftest.$ac_objext"
12310 if { (eval echo "$as_me:12310: \"$ac_compile\"") >&5
12311 (eval $ac_compile) 2>&5
12313 echo "$as_me:12313: \$? = $ac_status" >&5
12314 (exit "$ac_status"); } &&
12315 { ac_try='test -s "conftest.$ac_objext"'
12316 { (eval echo "$as_me:12316: \"$ac_try\"") >&5
12317 (eval $ac_try) 2>&5
12319 echo "$as_me:12319: \$? = $ac_status" >&5
12320 (exit "$ac_status"); }; }; then
12321 cf_cv_posix_visible=no
12323 echo "$as_me: failed program was:" >&5
12324 cat "conftest.$ac_ext" >&5
12325 cf_cv_posix_visible=yes
12327 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12330 echo "$as_me:12330: result: $cf_cv_posix_visible" >&5
12331 echo "${ECHO_T}$cf_cv_posix_visible" >&6
12333 if test "$cf_cv_posix_visible" = no; then
12335 cf_XOPEN_SOURCE=600
12336 cf_POSIX_C_SOURCE=199506L
12341 cf_xopen_source="-D_ALL_SOURCE"
12344 cf_XOPEN_SOURCE=600
12347 cf_xopen_source="-D_APPLE_C_SOURCE"
12350 cf_xopen_source="-D_DARWIN_C_SOURCE"
12353 (freebsd*|dragonfly*|midnightbsd*)
12354 # 5.x headers associate
12355 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
12356 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
12357 cf_POSIX_C_SOURCE=200112L
12358 cf_XOPEN_SOURCE=600
12359 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12362 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
12365 cf_xopen_source="-D_HPUX_SOURCE"
12368 cf_xopen_source="-D_SGI_SOURCE"
12371 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
12373 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
12375 echo "$as_me:12375: checking if this is the GNU C library" >&5
12376 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
12377 if test "${cf_cv_gnu_library+set}" = set; then
12378 echo $ECHO_N "(cached) $ECHO_C" >&6
12381 cat >"conftest.$ac_ext" <<_ACEOF
12382 #line 12382 "configure"
12383 #include "confdefs.h"
12384 #include <sys/types.h>
12389 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
12391 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
12394 # error not GNU C library
12400 rm -f "conftest.$ac_objext"
12401 if { (eval echo "$as_me:12401: \"$ac_compile\"") >&5
12402 (eval $ac_compile) 2>&5
12404 echo "$as_me:12404: \$? = $ac_status" >&5
12405 (exit "$ac_status"); } &&
12406 { ac_try='test -s "conftest.$ac_objext"'
12407 { (eval echo "$as_me:12407: \"$ac_try\"") >&5
12408 (eval $ac_try) 2>&5
12410 echo "$as_me:12410: \$? = $ac_status" >&5
12411 (exit "$ac_status"); }; }; then
12412 cf_cv_gnu_library=yes
12414 echo "$as_me: failed program was:" >&5
12415 cat "conftest.$ac_ext" >&5
12416 cf_cv_gnu_library=no
12418 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12421 echo "$as_me:12421: result: $cf_cv_gnu_library" >&5
12422 echo "${ECHO_T}$cf_cv_gnu_library" >&6
12424 if test x$cf_cv_gnu_library = xyes; then
12426 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
12427 # was changed to help a little. newlib incorporated the change about 4
12429 echo "$as_me:12429: checking if _DEFAULT_SOURCE can be used as a basis" >&5
12430 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
12431 if test "${cf_cv_gnu_library_219+set}" = set; then
12432 echo $ECHO_N "(cached) $ECHO_C" >&6
12435 cf_save="$CPPFLAGS"
12437 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12438 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12440 cat >"conftest.$ac_ext" <<_ACEOF
12441 #line 12441 "configure"
12442 #include "confdefs.h"
12443 #include <sys/types.h>
12448 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
12450 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
12453 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
12459 rm -f "conftest.$ac_objext"
12460 if { (eval echo "$as_me:12460: \"$ac_compile\"") >&5
12461 (eval $ac_compile) 2>&5
12463 echo "$as_me:12463: \$? = $ac_status" >&5
12464 (exit "$ac_status"); } &&
12465 { ac_try='test -s "conftest.$ac_objext"'
12466 { (eval echo "$as_me:12466: \"$ac_try\"") >&5
12467 (eval $ac_try) 2>&5
12469 echo "$as_me:12469: \$? = $ac_status" >&5
12470 (exit "$ac_status"); }; }; then
12471 cf_cv_gnu_library_219=yes
12473 echo "$as_me: failed program was:" >&5
12474 cat "conftest.$ac_ext" >&5
12475 cf_cv_gnu_library_219=no
12477 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12478 CPPFLAGS="$cf_save"
12481 echo "$as_me:12481: result: $cf_cv_gnu_library_219" >&5
12482 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
12484 if test "x$cf_cv_gnu_library_219" = xyes; then
12485 cf_save="$CPPFLAGS"
12486 echo "$as_me:12486: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
12487 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
12488 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
12489 echo $ECHO_N "(cached) $ECHO_C" >&6
12495 cf_new_extra_cppflags=
12497 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
12499 case "$cf_fix_cppflags" in
12501 case "$cf_add_cflags" in
12502 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12503 case "$cf_add_cflags" in
12505 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12507 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12508 && test -z "${cf_tst_cflags}" \
12509 && cf_fix_cppflags=yes
12511 if test "$cf_fix_cppflags" = yes ; then
12513 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12514 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12517 elif test "${cf_tst_cflags}" = "\"'" ; then
12519 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12520 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12526 case "$CPPFLAGS" in
12530 case "$cf_add_cflags" in
12532 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12534 CPPFLAGS=`echo "$CPPFLAGS" | \
12535 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12536 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12541 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12542 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12549 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12550 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12557 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12558 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12560 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12562 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12563 && test -z "${cf_tst_cflags}" \
12564 && cf_fix_cppflags=no
12569 if test -n "$cf_new_cflags" ; then
12571 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12572 CFLAGS="${CFLAGS}$cf_new_cflags"
12576 if test -n "$cf_new_cppflags" ; then
12578 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12579 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12583 if test -n "$cf_new_extra_cppflags" ; then
12585 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12586 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12590 cat >"conftest.$ac_ext" <<_ACEOF
12591 #line 12591 "configure"
12592 #include "confdefs.h"
12594 #include <limits.h>
12595 #include <sys/types.h>
12601 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
12604 # error GNU C library is too old
12610 rm -f "conftest.$ac_objext"
12611 if { (eval echo "$as_me:12611: \"$ac_compile\"") >&5
12612 (eval $ac_compile) 2>&5
12614 echo "$as_me:12614: \$? = $ac_status" >&5
12615 (exit "$ac_status"); } &&
12616 { ac_try='test -s "conftest.$ac_objext"'
12617 { (eval echo "$as_me:12617: \"$ac_try\"") >&5
12618 (eval $ac_try) 2>&5
12620 echo "$as_me:12620: \$? = $ac_status" >&5
12621 (exit "$ac_status"); }; }; then
12622 cf_cv_gnu_dftsrc_219=yes
12624 echo "$as_me: failed program was:" >&5
12625 cat "conftest.$ac_ext" >&5
12626 cf_cv_gnu_dftsrc_219=no
12628 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12631 echo "$as_me:12631: result: $cf_cv_gnu_dftsrc_219" >&5
12632 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
12633 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
12635 cf_cv_gnu_dftsrc_219=maybe
12638 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
12640 echo "$as_me:12640: checking if we must define _GNU_SOURCE" >&5
12641 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
12642 if test "${cf_cv_gnu_source+set}" = set; then
12643 echo $ECHO_N "(cached) $ECHO_C" >&6
12646 cat >"conftest.$ac_ext" <<_ACEOF
12647 #line 12647 "configure"
12648 #include "confdefs.h"
12649 #include <sys/types.h>
12654 #ifndef _XOPEN_SOURCE
12655 #error expected _XOPEN_SOURCE to be defined
12661 rm -f "conftest.$ac_objext"
12662 if { (eval echo "$as_me:12662: \"$ac_compile\"") >&5
12663 (eval $ac_compile) 2>&5
12665 echo "$as_me:12665: \$? = $ac_status" >&5
12666 (exit "$ac_status"); } &&
12667 { ac_try='test -s "conftest.$ac_objext"'
12668 { (eval echo "$as_me:12668: \"$ac_try\"") >&5
12669 (eval $ac_try) 2>&5
12671 echo "$as_me:12671: \$? = $ac_status" >&5
12672 (exit "$ac_status"); }; }; then
12673 cf_cv_gnu_source=no
12675 echo "$as_me: failed program was:" >&5
12676 cat "conftest.$ac_ext" >&5
12677 cf_save="$CPPFLAGS"
12682 cf_new_extra_cppflags=
12684 for cf_add_cflags in -D_GNU_SOURCE
12686 case "$cf_fix_cppflags" in
12688 case "$cf_add_cflags" in
12689 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12690 case "$cf_add_cflags" in
12692 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12694 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12695 && test -z "${cf_tst_cflags}" \
12696 && cf_fix_cppflags=yes
12698 if test "$cf_fix_cppflags" = yes ; then
12700 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12701 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12704 elif test "${cf_tst_cflags}" = "\"'" ; then
12706 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12707 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12713 case "$CPPFLAGS" in
12717 case "$cf_add_cflags" in
12719 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12721 CPPFLAGS=`echo "$CPPFLAGS" | \
12722 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12723 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12728 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12729 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12736 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12737 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12744 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12745 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12747 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12749 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12750 && test -z "${cf_tst_cflags}" \
12751 && cf_fix_cppflags=no
12756 if test -n "$cf_new_cflags" ; then
12758 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12759 CFLAGS="${CFLAGS}$cf_new_cflags"
12763 if test -n "$cf_new_cppflags" ; then
12765 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12766 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12770 if test -n "$cf_new_extra_cppflags" ; then
12772 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12773 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12777 cat >"conftest.$ac_ext" <<_ACEOF
12778 #line 12778 "configure"
12779 #include "confdefs.h"
12780 #include <sys/types.h>
12785 #ifdef _XOPEN_SOURCE
12786 #error expected _XOPEN_SOURCE to be undefined
12792 rm -f "conftest.$ac_objext"
12793 if { (eval echo "$as_me:12793: \"$ac_compile\"") >&5
12794 (eval $ac_compile) 2>&5
12796 echo "$as_me:12796: \$? = $ac_status" >&5
12797 (exit "$ac_status"); } &&
12798 { ac_try='test -s "conftest.$ac_objext"'
12799 { (eval echo "$as_me:12799: \"$ac_try\"") >&5
12800 (eval $ac_try) 2>&5
12802 echo "$as_me:12802: \$? = $ac_status" >&5
12803 (exit "$ac_status"); }; }; then
12804 cf_cv_gnu_source=no
12806 echo "$as_me: failed program was:" >&5
12807 cat "conftest.$ac_ext" >&5
12808 cf_cv_gnu_source=yes
12810 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12811 CPPFLAGS="$cf_save"
12814 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12817 echo "$as_me:12817: result: $cf_cv_gnu_source" >&5
12818 echo "${ECHO_T}$cf_cv_gnu_source" >&6
12820 if test "$cf_cv_gnu_source" = yes
12822 echo "$as_me:12822: checking if we should also define _DEFAULT_SOURCE" >&5
12823 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
12824 if test "${cf_cv_default_source+set}" = set; then
12825 echo $ECHO_N "(cached) $ECHO_C" >&6
12828 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12829 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
12831 cat >"conftest.$ac_ext" <<_ACEOF
12832 #line 12832 "configure"
12833 #include "confdefs.h"
12834 #include <sys/types.h>
12839 #ifdef _DEFAULT_SOURCE
12840 #error expected _DEFAULT_SOURCE to be undefined
12846 rm -f "conftest.$ac_objext"
12847 if { (eval echo "$as_me:12847: \"$ac_compile\"") >&5
12848 (eval $ac_compile) 2>&5
12850 echo "$as_me:12850: \$? = $ac_status" >&5
12851 (exit "$ac_status"); } &&
12852 { ac_try='test -s "conftest.$ac_objext"'
12853 { (eval echo "$as_me:12853: \"$ac_try\"") >&5
12854 (eval $ac_try) 2>&5
12856 echo "$as_me:12856: \$? = $ac_status" >&5
12857 (exit "$ac_status"); }; }; then
12858 cf_cv_default_source=no
12860 echo "$as_me: failed program was:" >&5
12861 cat "conftest.$ac_ext" >&5
12862 cf_cv_default_source=yes
12864 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12867 echo "$as_me:12867: result: $cf_cv_default_source" >&5
12868 echo "${ECHO_T}$cf_cv_default_source" >&6
12869 if test "$cf_cv_default_source" = yes
12872 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12873 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12883 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
12886 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
12889 if test "$cf_cv_posix_visible" = no; then
12891 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
12893 cf_save_CFLAGS="$CFLAGS"
12894 cf_save_CPPFLAGS="$CPPFLAGS"
12896 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
12897 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12898 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12900 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
12901 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12902 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12904 echo "$as_me:12904: checking if we should define _POSIX_C_SOURCE" >&5
12905 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
12906 if test "${cf_cv_posix_c_source+set}" = set; then
12907 echo $ECHO_N "(cached) $ECHO_C" >&6
12910 echo "${as_me:-configure}:12910: testing if the symbol is already defined go no further ..." 1>&5
12912 cat >"conftest.$ac_ext" <<_ACEOF
12913 #line 12913 "configure"
12914 #include "confdefs.h"
12915 #include <sys/types.h>
12920 #ifndef _POSIX_C_SOURCE
12927 rm -f "conftest.$ac_objext"
12928 if { (eval echo "$as_me:12928: \"$ac_compile\"") >&5
12929 (eval $ac_compile) 2>&5
12931 echo "$as_me:12931: \$? = $ac_status" >&5
12932 (exit "$ac_status"); } &&
12933 { ac_try='test -s "conftest.$ac_objext"'
12934 { (eval echo "$as_me:12934: \"$ac_try\"") >&5
12935 (eval $ac_try) 2>&5
12937 echo "$as_me:12937: \$? = $ac_status" >&5
12938 (exit "$ac_status"); }; }; then
12939 cf_cv_posix_c_source=no
12941 echo "$as_me: failed program was:" >&5
12942 cat "conftest.$ac_ext" >&5
12943 cf_want_posix_source=no
12944 case .$cf_POSIX_C_SOURCE in
12946 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12949 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12950 cf_want_posix_source=yes
12953 cf_want_posix_source=yes
12956 if test "$cf_want_posix_source" = yes ; then
12957 cat >"conftest.$ac_ext" <<_ACEOF
12958 #line 12958 "configure"
12959 #include "confdefs.h"
12960 #include <sys/types.h>
12965 #ifdef _POSIX_SOURCE
12972 rm -f "conftest.$ac_objext"
12973 if { (eval echo "$as_me:12973: \"$ac_compile\"") >&5
12974 (eval $ac_compile) 2>&5
12976 echo "$as_me:12976: \$? = $ac_status" >&5
12977 (exit "$ac_status"); } &&
12978 { ac_try='test -s "conftest.$ac_objext"'
12979 { (eval echo "$as_me:12979: \"$ac_try\"") >&5
12980 (eval $ac_try) 2>&5
12982 echo "$as_me:12982: \$? = $ac_status" >&5
12983 (exit "$ac_status"); }; }; then
12986 echo "$as_me: failed program was:" >&5
12987 cat "conftest.$ac_ext" >&5
12988 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
12990 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12993 echo "${as_me:-configure}:12993: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
12995 CFLAGS="$cf_trim_CFLAGS"
12996 CPPFLAGS="$cf_trim_CPPFLAGS"
12998 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12999 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13001 echo "${as_me:-configure}:13001: testing if the second compile does not leave our definition intact error ..." 1>&5
13003 cat >"conftest.$ac_ext" <<_ACEOF
13004 #line 13004 "configure"
13005 #include "confdefs.h"
13006 #include <sys/types.h>
13011 #ifndef _POSIX_C_SOURCE
13018 rm -f "conftest.$ac_objext"
13019 if { (eval echo "$as_me:13019: \"$ac_compile\"") >&5
13020 (eval $ac_compile) 2>&5
13022 echo "$as_me:13022: \$? = $ac_status" >&5
13023 (exit "$ac_status"); } &&
13024 { ac_try='test -s "conftest.$ac_objext"'
13025 { (eval echo "$as_me:13025: \"$ac_try\"") >&5
13026 (eval $ac_try) 2>&5
13028 echo "$as_me:13028: \$? = $ac_status" >&5
13029 (exit "$ac_status"); }; }; then
13032 echo "$as_me: failed program was:" >&5
13033 cat "conftest.$ac_ext" >&5
13034 cf_cv_posix_c_source=no
13036 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13037 CFLAGS="$cf_save_CFLAGS"
13038 CPPFLAGS="$cf_save_CPPFLAGS"
13041 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13044 echo "$as_me:13044: result: $cf_cv_posix_c_source" >&5
13045 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13047 if test "$cf_cv_posix_c_source" != no ; then
13048 CFLAGS="$cf_trim_CFLAGS"
13049 CPPFLAGS="$cf_trim_CPPFLAGS"
13054 cf_new_extra_cppflags=
13056 for cf_add_cflags in $cf_cv_posix_c_source
13058 case "$cf_fix_cppflags" in
13060 case "$cf_add_cflags" in
13061 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13062 case "$cf_add_cflags" in
13064 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13066 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13067 && test -z "${cf_tst_cflags}" \
13068 && cf_fix_cppflags=yes
13070 if test "$cf_fix_cppflags" = yes ; then
13072 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13073 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13076 elif test "${cf_tst_cflags}" = "\"'" ; then
13078 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13079 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13085 case "$CPPFLAGS" in
13089 case "$cf_add_cflags" in
13091 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13093 CPPFLAGS=`echo "$CPPFLAGS" | \
13094 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13095 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13100 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13101 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13108 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13109 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13116 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13117 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13119 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13121 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13122 && test -z "${cf_tst_cflags}" \
13123 && cf_fix_cppflags=no
13128 if test -n "$cf_new_cflags" ; then
13130 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13131 CFLAGS="${CFLAGS}$cf_new_cflags"
13135 if test -n "$cf_new_cppflags" ; then
13137 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13138 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13142 if test -n "$cf_new_extra_cppflags" ; then
13144 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13145 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13151 fi # cf_cv_posix_visible
13155 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
13158 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
13159 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
13160 # Abusing the conformance level is a workaround.
13161 { echo "$as_me:13161: WARNING: this system does not provide usable locale support" >&5
13162 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
13163 cf_xopen_source="-D_BSD_SOURCE"
13164 cf_XOPEN_SOURCE=700
13167 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
13168 cf_xopen_source="-D_BSD_SOURCE"
13169 cf_XOPEN_SOURCE=600
13172 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
13175 cf_xopen_source="-D_OSF_SOURCE"
13178 cf_xopen_source="-D_QNX_SOURCE"
13181 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
13184 cf_xopen_source="-D__EXTENSIONS__"
13185 cf_cv_xopen_source=broken
13187 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
13193 echo "$as_me:13193: checking if we should define _XOPEN_SOURCE" >&5
13194 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13195 if test "${cf_cv_xopen_source+set}" = set; then
13196 echo $ECHO_N "(cached) $ECHO_C" >&6
13199 cat >"conftest.$ac_ext" <<_ACEOF
13200 #line 13200 "configure"
13201 #include "confdefs.h"
13203 #include <stdlib.h>
13204 #include <string.h>
13205 #include <sys/types.h>
13211 #ifndef _XOPEN_SOURCE
13218 rm -f "conftest.$ac_objext"
13219 if { (eval echo "$as_me:13219: \"$ac_compile\"") >&5
13220 (eval $ac_compile) 2>&5
13222 echo "$as_me:13222: \$? = $ac_status" >&5
13223 (exit "$ac_status"); } &&
13224 { ac_try='test -s "conftest.$ac_objext"'
13225 { (eval echo "$as_me:13225: \"$ac_try\"") >&5
13226 (eval $ac_try) 2>&5
13228 echo "$as_me:13228: \$? = $ac_status" >&5
13229 (exit "$ac_status"); }; }; then
13230 cf_cv_xopen_source=no
13232 echo "$as_me: failed program was:" >&5
13233 cat "conftest.$ac_ext" >&5
13234 cf_save="$CPPFLAGS"
13236 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13237 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13239 cat >"conftest.$ac_ext" <<_ACEOF
13240 #line 13240 "configure"
13241 #include "confdefs.h"
13243 #include <stdlib.h>
13244 #include <string.h>
13245 #include <sys/types.h>
13251 #ifdef _XOPEN_SOURCE
13258 rm -f "conftest.$ac_objext"
13259 if { (eval echo "$as_me:13259: \"$ac_compile\"") >&5
13260 (eval $ac_compile) 2>&5
13262 echo "$as_me:13262: \$? = $ac_status" >&5
13263 (exit "$ac_status"); } &&
13264 { ac_try='test -s "conftest.$ac_objext"'
13265 { (eval echo "$as_me:13265: \"$ac_try\"") >&5
13266 (eval $ac_try) 2>&5
13268 echo "$as_me:13268: \$? = $ac_status" >&5
13269 (exit "$ac_status"); }; }; then
13270 cf_cv_xopen_source=no
13272 echo "$as_me: failed program was:" >&5
13273 cat "conftest.$ac_ext" >&5
13274 cf_cv_xopen_source=$cf_XOPEN_SOURCE
13276 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13277 CPPFLAGS="$cf_save"
13280 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13283 echo "$as_me:13283: result: $cf_cv_xopen_source" >&5
13284 echo "${ECHO_T}$cf_cv_xopen_source" >&6
13286 if test "$cf_cv_xopen_source" != no ; then
13288 CFLAGS=`echo "$CFLAGS" | \
13289 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13290 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13292 CPPFLAGS=`echo "$CPPFLAGS" | \
13293 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13294 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13296 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13298 for cf_add_cflags in $cf_temp_xopen_source
13300 case "x$cf_add_cflags" in
13303 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13306 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'`
13307 test "$CFLAGS" != "$cf_old_cflag" || break
13309 CFLAGS="$cf_old_cflag"
13312 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13315 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'`
13316 test "$CPPFLAGS" != "$cf_old_cflag" || break
13318 CPPFLAGS="$cf_old_cflag"
13327 cf_new_extra_cppflags=
13329 for cf_add_cflags in $cf_add_cflags
13331 case "$cf_fix_cppflags" in
13333 case "$cf_add_cflags" in
13334 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13335 case "$cf_add_cflags" in
13337 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13339 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13340 && test -z "${cf_tst_cflags}" \
13341 && cf_fix_cppflags=yes
13343 if test "$cf_fix_cppflags" = yes ; then
13345 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13346 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13349 elif test "${cf_tst_cflags}" = "\"'" ; then
13351 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13352 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13358 case "$CPPFLAGS" in
13362 case "$cf_add_cflags" in
13364 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13366 CPPFLAGS=`echo "$CPPFLAGS" | \
13367 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13368 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13373 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13374 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13381 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13382 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13389 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13390 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13392 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13394 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13395 && test -z "${cf_tst_cflags}" \
13396 && cf_fix_cppflags=no
13401 if test -n "$cf_new_cflags" ; then
13403 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13404 CFLAGS="${CFLAGS}$cf_new_cflags"
13408 if test -n "$cf_new_cppflags" ; then
13410 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13411 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13415 if test -n "$cf_new_extra_cppflags" ; then
13417 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13418 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13426 if test "$cf_cv_posix_visible" = no; then
13428 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
13430 cf_save_CFLAGS="$CFLAGS"
13431 cf_save_CPPFLAGS="$CPPFLAGS"
13433 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13434 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13435 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13437 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13438 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13439 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13441 echo "$as_me:13441: checking if we should define _POSIX_C_SOURCE" >&5
13442 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13443 if test "${cf_cv_posix_c_source+set}" = set; then
13444 echo $ECHO_N "(cached) $ECHO_C" >&6
13447 echo "${as_me:-configure}:13447: testing if the symbol is already defined go no further ..." 1>&5
13449 cat >"conftest.$ac_ext" <<_ACEOF
13450 #line 13450 "configure"
13451 #include "confdefs.h"
13452 #include <sys/types.h>
13457 #ifndef _POSIX_C_SOURCE
13464 rm -f "conftest.$ac_objext"
13465 if { (eval echo "$as_me:13465: \"$ac_compile\"") >&5
13466 (eval $ac_compile) 2>&5
13468 echo "$as_me:13468: \$? = $ac_status" >&5
13469 (exit "$ac_status"); } &&
13470 { ac_try='test -s "conftest.$ac_objext"'
13471 { (eval echo "$as_me:13471: \"$ac_try\"") >&5
13472 (eval $ac_try) 2>&5
13474 echo "$as_me:13474: \$? = $ac_status" >&5
13475 (exit "$ac_status"); }; }; then
13476 cf_cv_posix_c_source=no
13478 echo "$as_me: failed program was:" >&5
13479 cat "conftest.$ac_ext" >&5
13480 cf_want_posix_source=no
13481 case .$cf_POSIX_C_SOURCE in
13483 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13486 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13487 cf_want_posix_source=yes
13490 cf_want_posix_source=yes
13493 if test "$cf_want_posix_source" = yes ; then
13494 cat >"conftest.$ac_ext" <<_ACEOF
13495 #line 13495 "configure"
13496 #include "confdefs.h"
13497 #include <sys/types.h>
13502 #ifdef _POSIX_SOURCE
13509 rm -f "conftest.$ac_objext"
13510 if { (eval echo "$as_me:13510: \"$ac_compile\"") >&5
13511 (eval $ac_compile) 2>&5
13513 echo "$as_me:13513: \$? = $ac_status" >&5
13514 (exit "$ac_status"); } &&
13515 { ac_try='test -s "conftest.$ac_objext"'
13516 { (eval echo "$as_me:13516: \"$ac_try\"") >&5
13517 (eval $ac_try) 2>&5
13519 echo "$as_me:13519: \$? = $ac_status" >&5
13520 (exit "$ac_status"); }; }; then
13523 echo "$as_me: failed program was:" >&5
13524 cat "conftest.$ac_ext" >&5
13525 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13527 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13530 echo "${as_me:-configure}:13530: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13532 CFLAGS="$cf_trim_CFLAGS"
13533 CPPFLAGS="$cf_trim_CPPFLAGS"
13535 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13536 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13538 echo "${as_me:-configure}:13538: testing if the second compile does not leave our definition intact error ..." 1>&5
13540 cat >"conftest.$ac_ext" <<_ACEOF
13541 #line 13541 "configure"
13542 #include "confdefs.h"
13543 #include <sys/types.h>
13548 #ifndef _POSIX_C_SOURCE
13555 rm -f "conftest.$ac_objext"
13556 if { (eval echo "$as_me:13556: \"$ac_compile\"") >&5
13557 (eval $ac_compile) 2>&5
13559 echo "$as_me:13559: \$? = $ac_status" >&5
13560 (exit "$ac_status"); } &&
13561 { ac_try='test -s "conftest.$ac_objext"'
13562 { (eval echo "$as_me:13562: \"$ac_try\"") >&5
13563 (eval $ac_try) 2>&5
13565 echo "$as_me:13565: \$? = $ac_status" >&5
13566 (exit "$ac_status"); }; }; then
13569 echo "$as_me: failed program was:" >&5
13570 cat "conftest.$ac_ext" >&5
13571 cf_cv_posix_c_source=no
13573 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13574 CFLAGS="$cf_save_CFLAGS"
13575 CPPFLAGS="$cf_save_CPPFLAGS"
13578 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13581 echo "$as_me:13581: result: $cf_cv_posix_c_source" >&5
13582 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13584 if test "$cf_cv_posix_c_source" != no ; then
13585 CFLAGS="$cf_trim_CFLAGS"
13586 CPPFLAGS="$cf_trim_CPPFLAGS"
13591 cf_new_extra_cppflags=
13593 for cf_add_cflags in $cf_cv_posix_c_source
13595 case "$cf_fix_cppflags" in
13597 case "$cf_add_cflags" in
13598 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13599 case "$cf_add_cflags" in
13601 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13603 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13604 && test -z "${cf_tst_cflags}" \
13605 && cf_fix_cppflags=yes
13607 if test "$cf_fix_cppflags" = yes ; then
13609 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13610 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13613 elif test "${cf_tst_cflags}" = "\"'" ; then
13615 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13616 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13622 case "$CPPFLAGS" in
13626 case "$cf_add_cflags" in
13628 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13630 CPPFLAGS=`echo "$CPPFLAGS" | \
13631 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13632 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13637 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13638 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13645 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13646 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13653 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13654 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13656 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13658 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13659 && test -z "${cf_tst_cflags}" \
13660 && cf_fix_cppflags=no
13665 if test -n "$cf_new_cflags" ; then
13667 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13668 CFLAGS="${CFLAGS}$cf_new_cflags"
13672 if test -n "$cf_new_cppflags" ; then
13674 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13675 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13679 if test -n "$cf_new_extra_cppflags" ; then
13681 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13682 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13688 fi # cf_cv_posix_visible
13693 if test -n "$cf_xopen_source" ; then
13695 for cf_add_cflags in $cf_xopen_source
13697 case "x$cf_add_cflags" in
13700 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13703 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'`
13704 test "$CFLAGS" != "$cf_old_cflag" || break
13705 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
13707 echo "${as_me:-configure}:13707: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
13709 CFLAGS="$cf_old_cflag"
13712 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13715 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'`
13716 test "$CPPFLAGS" != "$cf_old_cflag" || break
13717 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
13719 echo "${as_me:-configure}:13719: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
13721 CPPFLAGS="$cf_old_cflag"
13730 cf_new_extra_cppflags=
13732 for cf_add_cflags in $cf_add_cflags
13734 case "$cf_fix_cppflags" in
13736 case "$cf_add_cflags" in
13737 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13738 case "$cf_add_cflags" in
13740 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13742 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13743 && test -z "${cf_tst_cflags}" \
13744 && cf_fix_cppflags=yes
13746 if test "$cf_fix_cppflags" = yes ; then
13748 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13749 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13752 elif test "${cf_tst_cflags}" = "\"'" ; then
13754 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13755 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13761 case "$CPPFLAGS" in
13765 case "$cf_add_cflags" in
13767 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13769 CPPFLAGS=`echo "$CPPFLAGS" | \
13770 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13771 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13776 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13777 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13784 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13785 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13792 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13793 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13795 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13797 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13798 && test -z "${cf_tst_cflags}" \
13799 && cf_fix_cppflags=no
13804 if test -n "$cf_new_cflags" ; then
13805 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13807 echo "${as_me:-configure}:13807: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13809 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13810 CFLAGS="${CFLAGS}$cf_new_cflags"
13814 if test -n "$cf_new_cppflags" ; then
13815 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13817 echo "${as_me:-configure}:13817: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13819 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13820 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13824 if test -n "$cf_new_extra_cppflags" ; then
13825 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13827 echo "${as_me:-configure}:13827: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13829 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13830 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13838 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
13839 echo "$as_me:13839: checking if _XOPEN_SOURCE really is set" >&5
13840 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
13841 cat >"conftest.$ac_ext" <<_ACEOF
13842 #line 13842 "configure"
13843 #include "confdefs.h"
13844 #include <stdlib.h>
13849 #ifndef _XOPEN_SOURCE
13856 rm -f "conftest.$ac_objext"
13857 if { (eval echo "$as_me:13857: \"$ac_compile\"") >&5
13858 (eval $ac_compile) 2>&5
13860 echo "$as_me:13860: \$? = $ac_status" >&5
13861 (exit "$ac_status"); } &&
13862 { ac_try='test -s "conftest.$ac_objext"'
13863 { (eval echo "$as_me:13863: \"$ac_try\"") >&5
13864 (eval $ac_try) 2>&5
13866 echo "$as_me:13866: \$? = $ac_status" >&5
13867 (exit "$ac_status"); }; }; then
13868 cf_XOPEN_SOURCE_set=yes
13870 echo "$as_me: failed program was:" >&5
13871 cat "conftest.$ac_ext" >&5
13872 cf_XOPEN_SOURCE_set=no
13874 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13875 echo "$as_me:13875: result: $cf_XOPEN_SOURCE_set" >&5
13876 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
13877 if test "$cf_XOPEN_SOURCE_set" = yes
13879 cat >"conftest.$ac_ext" <<_ACEOF
13880 #line 13880 "configure"
13881 #include "confdefs.h"
13882 #include <stdlib.h>
13887 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
13894 rm -f "conftest.$ac_objext"
13895 if { (eval echo "$as_me:13895: \"$ac_compile\"") >&5
13896 (eval $ac_compile) 2>&5
13898 echo "$as_me:13898: \$? = $ac_status" >&5
13899 (exit "$ac_status"); } &&
13900 { ac_try='test -s "conftest.$ac_objext"'
13901 { (eval echo "$as_me:13901: \"$ac_try\"") >&5
13902 (eval $ac_try) 2>&5
13904 echo "$as_me:13904: \$? = $ac_status" >&5
13905 (exit "$ac_status"); }; }; then
13906 cf_XOPEN_SOURCE_set_ok=yes
13908 echo "$as_me: failed program was:" >&5
13909 cat "conftest.$ac_ext" >&5
13910 cf_XOPEN_SOURCE_set_ok=no
13912 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13913 if test "$cf_XOPEN_SOURCE_set_ok" = no
13915 { echo "$as_me:13915: WARNING: _XOPEN_SOURCE is lower than requested" >&5
13916 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
13920 echo "$as_me:13920: checking if we should define _XOPEN_SOURCE" >&5
13921 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13922 if test "${cf_cv_xopen_source+set}" = set; then
13923 echo $ECHO_N "(cached) $ECHO_C" >&6
13926 cat >"conftest.$ac_ext" <<_ACEOF
13927 #line 13927 "configure"
13928 #include "confdefs.h"
13930 #include <stdlib.h>
13931 #include <string.h>
13932 #include <sys/types.h>
13938 #ifndef _XOPEN_SOURCE
13945 rm -f "conftest.$ac_objext"
13946 if { (eval echo "$as_me:13946: \"$ac_compile\"") >&5
13947 (eval $ac_compile) 2>&5
13949 echo "$as_me:13949: \$? = $ac_status" >&5
13950 (exit "$ac_status"); } &&
13951 { ac_try='test -s "conftest.$ac_objext"'
13952 { (eval echo "$as_me:13952: \"$ac_try\"") >&5
13953 (eval $ac_try) 2>&5
13955 echo "$as_me:13955: \$? = $ac_status" >&5
13956 (exit "$ac_status"); }; }; then
13957 cf_cv_xopen_source=no
13959 echo "$as_me: failed program was:" >&5
13960 cat "conftest.$ac_ext" >&5
13961 cf_save="$CPPFLAGS"
13963 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13964 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13966 cat >"conftest.$ac_ext" <<_ACEOF
13967 #line 13967 "configure"
13968 #include "confdefs.h"
13970 #include <stdlib.h>
13971 #include <string.h>
13972 #include <sys/types.h>
13978 #ifdef _XOPEN_SOURCE
13985 rm -f "conftest.$ac_objext"
13986 if { (eval echo "$as_me:13986: \"$ac_compile\"") >&5
13987 (eval $ac_compile) 2>&5
13989 echo "$as_me:13989: \$? = $ac_status" >&5
13990 (exit "$ac_status"); } &&
13991 { ac_try='test -s "conftest.$ac_objext"'
13992 { (eval echo "$as_me:13992: \"$ac_try\"") >&5
13993 (eval $ac_try) 2>&5
13995 echo "$as_me:13995: \$? = $ac_status" >&5
13996 (exit "$ac_status"); }; }; then
13997 cf_cv_xopen_source=no
13999 echo "$as_me: failed program was:" >&5
14000 cat "conftest.$ac_ext" >&5
14001 cf_cv_xopen_source=$cf_XOPEN_SOURCE
14003 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14004 CPPFLAGS="$cf_save"
14007 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14010 echo "$as_me:14010: result: $cf_cv_xopen_source" >&5
14011 echo "${ECHO_T}$cf_cv_xopen_source" >&6
14013 if test "$cf_cv_xopen_source" != no ; then
14015 CFLAGS=`echo "$CFLAGS" | \
14016 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14017 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14019 CPPFLAGS=`echo "$CPPFLAGS" | \
14020 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14021 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14023 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
14025 for cf_add_cflags in $cf_temp_xopen_source
14027 case "x$cf_add_cflags" in
14030 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14033 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'`
14034 test "$CFLAGS" != "$cf_old_cflag" || break
14036 CFLAGS="$cf_old_cflag"
14039 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14042 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'`
14043 test "$CPPFLAGS" != "$cf_old_cflag" || break
14045 CPPFLAGS="$cf_old_cflag"
14054 cf_new_extra_cppflags=
14056 for cf_add_cflags in $cf_add_cflags
14058 case "$cf_fix_cppflags" in
14060 case "$cf_add_cflags" in
14061 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14062 case "$cf_add_cflags" in
14064 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14066 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14067 && test -z "${cf_tst_cflags}" \
14068 && cf_fix_cppflags=yes
14070 if test "$cf_fix_cppflags" = yes ; then
14072 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14073 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14076 elif test "${cf_tst_cflags}" = "\"'" ; then
14078 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14079 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14085 case "$CPPFLAGS" in
14089 case "$cf_add_cflags" in
14091 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14093 CPPFLAGS=`echo "$CPPFLAGS" | \
14094 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14095 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14100 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14101 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14108 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14109 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14116 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14117 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14119 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14121 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14122 && test -z "${cf_tst_cflags}" \
14123 && cf_fix_cppflags=no
14128 if test -n "$cf_new_cflags" ; then
14130 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14131 CFLAGS="${CFLAGS}$cf_new_cflags"
14135 if test -n "$cf_new_cppflags" ; then
14137 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14138 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14142 if test -n "$cf_new_extra_cppflags" ; then
14144 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14145 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14155 fi # cf_cv_posix_visible
14157 # Check whether --enable-largefile or --disable-largefile was given.
14158 if test "${enable_largefile+set}" = set; then
14159 enableval="$enable_largefile"
14162 if test "$enable_largefile" != no; then
14164 echo "$as_me:14164: checking for special C compiler options needed for large files" >&5
14165 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
14166 if test "${ac_cv_sys_largefile_CC+set}" = set; then
14167 echo $ECHO_N "(cached) $ECHO_C" >&6
14169 ac_cv_sys_largefile_CC=no
14170 if test "$GCC" != yes; then
14173 # IRIX 6.2 and later do not support large files by default,
14174 # so use the C compiler's -n32 option if that helps.
14175 cat >"conftest.$ac_ext" <<_ACEOF
14176 #line 14176 "configure"
14177 #include "confdefs.h"
14178 #include <sys/types.h>
14179 /* Check that off_t can represent 2**63 - 1 correctly.
14180 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14181 since some C++ compilers masquerading as C compilers
14182 incorrectly reject 9223372036854775807. */
14183 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14184 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14185 && LARGE_OFF_T % 2147483647 == 1)
14195 rm -f "conftest.$ac_objext"
14196 if { (eval echo "$as_me:14196: \"$ac_compile\"") >&5
14197 (eval $ac_compile) 2>&5
14199 echo "$as_me:14199: \$? = $ac_status" >&5
14200 (exit "$ac_status"); } &&
14201 { ac_try='test -s "conftest.$ac_objext"'
14202 { (eval echo "$as_me:14202: \"$ac_try\"") >&5
14203 (eval $ac_try) 2>&5
14205 echo "$as_me:14205: \$? = $ac_status" >&5
14206 (exit "$ac_status"); }; }; then
14209 echo "$as_me: failed program was:" >&5
14210 cat "conftest.$ac_ext" >&5
14212 rm -f "conftest.$ac_objext"
14214 rm -f "conftest.$ac_objext"
14215 if { (eval echo "$as_me:14215: \"$ac_compile\"") >&5
14216 (eval $ac_compile) 2>&5
14218 echo "$as_me:14218: \$? = $ac_status" >&5
14219 (exit "$ac_status"); } &&
14220 { ac_try='test -s "conftest.$ac_objext"'
14221 { (eval echo "$as_me:14221: \"$ac_try\"") >&5
14222 (eval $ac_try) 2>&5
14224 echo "$as_me:14224: \$? = $ac_status" >&5
14225 (exit "$ac_status"); }; }; then
14226 ac_cv_sys_largefile_CC=' -n32'; break
14228 echo "$as_me: failed program was:" >&5
14229 cat "conftest.$ac_ext" >&5
14231 rm -f "conftest.$ac_objext"
14235 rm -f "conftest.$ac_ext"
14238 echo "$as_me:14238: result: $ac_cv_sys_largefile_CC" >&5
14239 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
14240 if test "$ac_cv_sys_largefile_CC" != no; then
14241 CC=$CC$ac_cv_sys_largefile_CC
14244 echo "$as_me:14244: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14245 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
14246 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
14247 echo $ECHO_N "(cached) $ECHO_C" >&6
14250 ac_cv_sys_file_offset_bits=no
14251 cat >"conftest.$ac_ext" <<_ACEOF
14252 #line 14252 "configure"
14253 #include "confdefs.h"
14254 #include <sys/types.h>
14255 /* Check that off_t can represent 2**63 - 1 correctly.
14256 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14257 since some C++ compilers masquerading as C compilers
14258 incorrectly reject 9223372036854775807. */
14259 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14260 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14261 && LARGE_OFF_T % 2147483647 == 1)
14271 rm -f "conftest.$ac_objext"
14272 if { (eval echo "$as_me:14272: \"$ac_compile\"") >&5
14273 (eval $ac_compile) 2>&5
14275 echo "$as_me:14275: \$? = $ac_status" >&5
14276 (exit "$ac_status"); } &&
14277 { ac_try='test -s "conftest.$ac_objext"'
14278 { (eval echo "$as_me:14278: \"$ac_try\"") >&5
14279 (eval $ac_try) 2>&5
14281 echo "$as_me:14281: \$? = $ac_status" >&5
14282 (exit "$ac_status"); }; }; then
14285 echo "$as_me: failed program was:" >&5
14286 cat "conftest.$ac_ext" >&5
14288 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14289 cat >"conftest.$ac_ext" <<_ACEOF
14290 #line 14290 "configure"
14291 #include "confdefs.h"
14292 #define _FILE_OFFSET_BITS 64
14293 #include <sys/types.h>
14294 /* Check that off_t can represent 2**63 - 1 correctly.
14295 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14296 since some C++ compilers masquerading as C compilers
14297 incorrectly reject 9223372036854775807. */
14298 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14299 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14300 && LARGE_OFF_T % 2147483647 == 1)
14310 rm -f "conftest.$ac_objext"
14311 if { (eval echo "$as_me:14311: \"$ac_compile\"") >&5
14312 (eval $ac_compile) 2>&5
14314 echo "$as_me:14314: \$? = $ac_status" >&5
14315 (exit "$ac_status"); } &&
14316 { ac_try='test -s "conftest.$ac_objext"'
14317 { (eval echo "$as_me:14317: \"$ac_try\"") >&5
14318 (eval $ac_try) 2>&5
14320 echo "$as_me:14320: \$? = $ac_status" >&5
14321 (exit "$ac_status"); }; }; then
14322 ac_cv_sys_file_offset_bits=64; break
14324 echo "$as_me: failed program was:" >&5
14325 cat "conftest.$ac_ext" >&5
14327 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14331 echo "$as_me:14331: result: $ac_cv_sys_file_offset_bits" >&5
14332 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14333 if test "$ac_cv_sys_file_offset_bits" != no; then
14335 cat >>confdefs.h <<EOF
14336 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14341 echo "$as_me:14341: checking for _LARGE_FILES value needed for large files" >&5
14342 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14343 if test "${ac_cv_sys_large_files+set}" = set; then
14344 echo $ECHO_N "(cached) $ECHO_C" >&6
14347 ac_cv_sys_large_files=no
14348 cat >"conftest.$ac_ext" <<_ACEOF
14349 #line 14349 "configure"
14350 #include "confdefs.h"
14351 #include <sys/types.h>
14352 /* Check that off_t can represent 2**63 - 1 correctly.
14353 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14354 since some C++ compilers masquerading as C compilers
14355 incorrectly reject 9223372036854775807. */
14356 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14357 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14358 && LARGE_OFF_T % 2147483647 == 1)
14368 rm -f "conftest.$ac_objext"
14369 if { (eval echo "$as_me:14369: \"$ac_compile\"") >&5
14370 (eval $ac_compile) 2>&5
14372 echo "$as_me:14372: \$? = $ac_status" >&5
14373 (exit "$ac_status"); } &&
14374 { ac_try='test -s "conftest.$ac_objext"'
14375 { (eval echo "$as_me:14375: \"$ac_try\"") >&5
14376 (eval $ac_try) 2>&5
14378 echo "$as_me:14378: \$? = $ac_status" >&5
14379 (exit "$ac_status"); }; }; then
14382 echo "$as_me: failed program was:" >&5
14383 cat "conftest.$ac_ext" >&5
14385 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14386 cat >"conftest.$ac_ext" <<_ACEOF
14387 #line 14387 "configure"
14388 #include "confdefs.h"
14389 #define _LARGE_FILES 1
14390 #include <sys/types.h>
14391 /* Check that off_t can represent 2**63 - 1 correctly.
14392 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14393 since some C++ compilers masquerading as C compilers
14394 incorrectly reject 9223372036854775807. */
14395 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14396 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14397 && LARGE_OFF_T % 2147483647 == 1)
14407 rm -f "conftest.$ac_objext"
14408 if { (eval echo "$as_me:14408: \"$ac_compile\"") >&5
14409 (eval $ac_compile) 2>&5
14411 echo "$as_me:14411: \$? = $ac_status" >&5
14412 (exit "$ac_status"); } &&
14413 { ac_try='test -s "conftest.$ac_objext"'
14414 { (eval echo "$as_me:14414: \"$ac_try\"") >&5
14415 (eval $ac_try) 2>&5
14417 echo "$as_me:14417: \$? = $ac_status" >&5
14418 (exit "$ac_status"); }; }; then
14419 ac_cv_sys_large_files=1; break
14421 echo "$as_me: failed program was:" >&5
14422 cat "conftest.$ac_ext" >&5
14424 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14428 echo "$as_me:14428: result: $ac_cv_sys_large_files" >&5
14429 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14430 if test "$ac_cv_sys_large_files" != no; then
14432 cat >>confdefs.h <<EOF
14433 #define _LARGE_FILES $ac_cv_sys_large_files
14440 if test "$enable_largefile" != no ; then
14441 echo "$as_me:14441: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14442 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14443 if test "${ac_cv_sys_largefile_source+set}" = set; then
14444 echo $ECHO_N "(cached) $ECHO_C" >&6
14447 ac_cv_sys_largefile_source=no
14448 cat >"conftest.$ac_ext" <<_ACEOF
14449 #line 14449 "configure"
14450 #include "confdefs.h"
14460 rm -f "conftest.$ac_objext"
14461 if { (eval echo "$as_me:14461: \"$ac_compile\"") >&5
14462 (eval $ac_compile) 2>&5
14464 echo "$as_me:14464: \$? = $ac_status" >&5
14465 (exit "$ac_status"); } &&
14466 { ac_try='test -s "conftest.$ac_objext"'
14467 { (eval echo "$as_me:14467: \"$ac_try\"") >&5
14468 (eval $ac_try) 2>&5
14470 echo "$as_me:14470: \$? = $ac_status" >&5
14471 (exit "$ac_status"); }; }; then
14474 echo "$as_me: failed program was:" >&5
14475 cat "conftest.$ac_ext" >&5
14477 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14478 cat >"conftest.$ac_ext" <<_ACEOF
14479 #line 14479 "configure"
14480 #include "confdefs.h"
14481 #define _LARGEFILE_SOURCE 1
14491 rm -f "conftest.$ac_objext"
14492 if { (eval echo "$as_me:14492: \"$ac_compile\"") >&5
14493 (eval $ac_compile) 2>&5
14495 echo "$as_me:14495: \$? = $ac_status" >&5
14496 (exit "$ac_status"); } &&
14497 { ac_try='test -s "conftest.$ac_objext"'
14498 { (eval echo "$as_me:14498: \"$ac_try\"") >&5
14499 (eval $ac_try) 2>&5
14501 echo "$as_me:14501: \$? = $ac_status" >&5
14502 (exit "$ac_status"); }; }; then
14503 ac_cv_sys_largefile_source=1; break
14505 echo "$as_me: failed program was:" >&5
14506 cat "conftest.$ac_ext" >&5
14508 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14512 echo "$as_me:14512: result: $ac_cv_sys_largefile_source" >&5
14513 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14514 if test "$ac_cv_sys_largefile_source" != no; then
14516 cat >>confdefs.h <<EOF
14517 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14523 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14524 # in glibc 2.1.3, but that breaks too many other things.
14525 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14526 echo "$as_me:14526: checking for fseeko" >&5
14527 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14528 if test "${ac_cv_func_fseeko+set}" = set; then
14529 echo $ECHO_N "(cached) $ECHO_C" >&6
14531 cat >"conftest.$ac_ext" <<_ACEOF
14532 #line 14532 "configure"
14533 #include "confdefs.h"
14538 return fseeko && fseeko (stdin, 0, 0);
14543 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14544 if { (eval echo "$as_me:14544: \"$ac_link\"") >&5
14545 (eval $ac_link) 2>&5
14547 echo "$as_me:14547: \$? = $ac_status" >&5
14548 (exit "$ac_status"); } &&
14549 { ac_try='test -s "conftest$ac_exeext"'
14550 { (eval echo "$as_me:14550: \"$ac_try\"") >&5
14551 (eval $ac_try) 2>&5
14553 echo "$as_me:14553: \$? = $ac_status" >&5
14554 (exit "$ac_status"); }; }; then
14555 ac_cv_func_fseeko=yes
14557 echo "$as_me: failed program was:" >&5
14558 cat "conftest.$ac_ext" >&5
14559 ac_cv_func_fseeko=no
14561 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14563 echo "$as_me:14563: result: $ac_cv_func_fseeko" >&5
14564 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14565 if test $ac_cv_func_fseeko = yes; then
14567 cat >>confdefs.h <<\EOF
14568 #define HAVE_FSEEKO 1
14573 # Normally we would collect these definitions in the config.h,
14574 # but (like _XOPEN_SOURCE), some environments rely on having these
14575 # defined before any of the system headers are included. Another
14576 # case comes up with C++, e.g., on AIX the compiler compiles the
14577 # header files by themselves before looking at the body files it is
14578 # told to compile. For ncurses, those header files do not include
14580 if test "$ac_cv_sys_large_files" != no
14583 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14584 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14587 if test "$ac_cv_sys_largefile_source" != no
14590 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14591 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14594 if test "$ac_cv_sys_file_offset_bits" != no
14597 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14598 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14602 echo "$as_me:14602: checking whether to use struct dirent64" >&5
14603 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14604 if test "${cf_cv_struct_dirent64+set}" = set; then
14605 echo $ECHO_N "(cached) $ECHO_C" >&6
14608 cat >"conftest.$ac_ext" <<_ACEOF
14609 #line 14609 "configure"
14610 #include "confdefs.h"
14612 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14613 #include <sys/types.h>
14614 #include <dirent.h>
14620 /* if transitional largefile support is setup, this is true */
14621 extern struct dirent64 * readdir(DIR *);
14622 struct dirent64 *x = readdir((DIR *)0);
14623 struct dirent *y = readdir((DIR *)0);
14631 rm -f "conftest.$ac_objext"
14632 if { (eval echo "$as_me:14632: \"$ac_compile\"") >&5
14633 (eval $ac_compile) 2>&5
14635 echo "$as_me:14635: \$? = $ac_status" >&5
14636 (exit "$ac_status"); } &&
14637 { ac_try='test -s "conftest.$ac_objext"'
14638 { (eval echo "$as_me:14638: \"$ac_try\"") >&5
14639 (eval $ac_try) 2>&5
14641 echo "$as_me:14641: \$? = $ac_status" >&5
14642 (exit "$ac_status"); }; }; then
14643 cf_cv_struct_dirent64=yes
14645 echo "$as_me: failed program was:" >&5
14646 cat "conftest.$ac_ext" >&5
14647 cf_cv_struct_dirent64=no
14649 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14652 echo "$as_me:14652: result: $cf_cv_struct_dirent64" >&5
14653 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14654 test "$cf_cv_struct_dirent64" = yes &&
14655 cat >>confdefs.h <<\EOF
14656 #define HAVE_STRUCT_DIRENT64 1
14661 ### Enable compiling-in rcs id's
14662 echo "$as_me:14662: checking if RCS identifiers should be compiled-in" >&5
14663 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14665 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14666 if test "${with_rcs_ids+set}" = set; then
14667 withval="$with_rcs_ids"
14668 with_rcs_ids=$withval
14672 echo "$as_me:14672: result: $with_rcs_ids" >&5
14673 echo "${ECHO_T}$with_rcs_ids" >&6
14674 test "$with_rcs_ids" = yes &&
14675 cat >>confdefs.h <<\EOF
14676 #define USE_RCS_IDS 1
14679 ###############################################################################
14681 ### Note that some functions (such as const) are normally disabled anyway.
14682 echo "$as_me:14682: checking if you want to build with function extensions" >&5
14683 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14685 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14686 if test "${enable_ext_funcs+set}" = set; then
14687 enableval="$enable_ext_funcs"
14688 with_ext_funcs=$enableval
14692 echo "$as_me:14692: result: $with_ext_funcs" >&5
14693 echo "${ECHO_T}$with_ext_funcs" >&6
14694 if test "$with_ext_funcs" = yes ; then
14695 NCURSES_EXT_FUNCS=1
14697 cat >>confdefs.h <<\EOF
14698 #define HAVE_USE_DEFAULT_COLORS 1
14701 cat >>confdefs.h <<\EOF
14702 #define NCURSES_EXT_FUNCS 1
14706 NCURSES_EXT_FUNCS=0
14709 ### use option --enable-const to turn on use of const beyond that in XSI.
14710 echo "$as_me:14710: checking for extended use of const keyword" >&5
14711 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14713 # Check whether --enable-const or --disable-const was given.
14714 if test "${enable_const+set}" = set; then
14715 enableval="$enable_const"
14716 with_ext_const=$enableval
14720 echo "$as_me:14720: result: $with_ext_const" >&5
14721 echo "${ECHO_T}$with_ext_const" >&6
14722 NCURSES_CONST='/*nothing*/'
14723 if test "$with_ext_const" = yes ; then
14724 NCURSES_CONST=const
14727 ###############################################################################
14728 # These options are relatively safe to experiment with.
14730 echo "$as_me:14730: checking if you want all development code" >&5
14731 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14733 # Check whether --with-develop or --without-develop was given.
14734 if test "${with_develop+set}" = set; then
14735 withval="$with_develop"
14736 with_develop=$withval
14740 echo "$as_me:14740: result: $with_develop" >&5
14741 echo "${ECHO_T}$with_develop" >&6
14743 ###############################################################################
14744 # These are just experimental, probably should not be in a package:
14746 # This is still experimental (20080329), but should ultimately be moved to
14747 # the script-block --with-normal, etc.
14749 echo "$as_me:14749: checking if you want to link with the pthread library" >&5
14750 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14752 # Check whether --with-pthread or --without-pthread was given.
14753 if test "${with_pthread+set}" = set; then
14754 withval="$with_pthread"
14755 with_pthread=$withval
14759 echo "$as_me:14759: result: $with_pthread" >&5
14760 echo "${ECHO_T}$with_pthread" >&6
14762 if test "$with_pthread" != no ; then
14763 echo "$as_me:14763: checking for pthread.h" >&5
14764 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14765 if test "${ac_cv_header_pthread_h+set}" = set; then
14766 echo $ECHO_N "(cached) $ECHO_C" >&6
14768 cat >"conftest.$ac_ext" <<_ACEOF
14769 #line 14769 "configure"
14770 #include "confdefs.h"
14771 #include <pthread.h>
14773 if { (eval echo "$as_me:14773: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14774 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14776 $EGREP -v '^ *\+' conftest.er1 >conftest.err
14778 cat conftest.err >&5
14779 echo "$as_me:14779: \$? = $ac_status" >&5
14780 (exit "$ac_status"); } >/dev/null; then
14781 if test -s conftest.err; then
14782 ac_cpp_err=$ac_c_preproc_warn_flag
14789 if test -z "$ac_cpp_err"; then
14790 ac_cv_header_pthread_h=yes
14792 echo "$as_me: failed program was:" >&5
14793 cat "conftest.$ac_ext" >&5
14794 ac_cv_header_pthread_h=no
14796 rm -f conftest.err "conftest.$ac_ext"
14798 echo "$as_me:14798: result: $ac_cv_header_pthread_h" >&5
14799 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14800 if test "$ac_cv_header_pthread_h" = yes; then
14802 cat >>confdefs.h <<\EOF
14803 #define HAVE_PTHREADS_H 1
14806 for cf_lib_pthread in pthread c_r
14808 echo "$as_me:14808: checking if we can link with the $cf_lib_pthread library" >&5
14809 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14810 cf_save_LIBS="$LIBS"
14812 cf_add_libs="$LIBS"
14815 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14816 # filter duplicates
14817 for cf_add_1lib in $cf_add_0lib; do
14818 for cf_add_2lib in $cf_add_libs; do
14819 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14824 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14826 LIBS="$cf_add_libs"
14828 cat >"conftest.$ac_ext" <<_ACEOF
14829 #line 14829 "configure"
14830 #include "confdefs.h"
14832 #include <pthread.h>
14838 int rc = pthread_create(0,0,0,0);
14839 int r2 = pthread_mutexattr_settype(0, 0);
14845 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14846 if { (eval echo "$as_me:14846: \"$ac_link\"") >&5
14847 (eval $ac_link) 2>&5
14849 echo "$as_me:14849: \$? = $ac_status" >&5
14850 (exit "$ac_status"); } &&
14851 { ac_try='test -s "conftest$ac_exeext"'
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
14859 echo "$as_me: failed program was:" >&5
14860 cat "conftest.$ac_ext" >&5
14863 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14864 LIBS="$cf_save_LIBS"
14865 echo "$as_me:14865: result: $with_pthread" >&5
14866 echo "${ECHO_T}$with_pthread" >&6
14867 test "$with_pthread" = yes && break
14870 if test "$with_pthread" = yes ; then
14872 cf_add_libs="$LIBS"
14875 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14876 # filter duplicates
14877 for cf_add_1lib in $cf_add_0lib; do
14878 for cf_add_2lib in $cf_add_libs; do
14879 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14884 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14886 LIBS="$cf_add_libs"
14888 cat >>confdefs.h <<\EOF
14889 #define HAVE_LIBPTHREADS 1
14893 { { echo "$as_me:14893: error: Cannot link with pthread library" >&5
14894 echo "$as_me: error: Cannot link with pthread library" >&2;}
14895 { (exit 1); exit 1; }; }
14902 echo "$as_me:14902: checking if you want to use weak-symbols for pthreads" >&5
14903 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14905 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14906 if test "${enable_weak_symbols+set}" = set; then
14907 enableval="$enable_weak_symbols"
14908 use_weak_symbols=$withval
14910 use_weak_symbols=no
14912 echo "$as_me:14912: result: $use_weak_symbols" >&5
14913 echo "${ECHO_T}$use_weak_symbols" >&6
14914 if test "$use_weak_symbols" = yes ; then
14916 echo "$as_me:14916: checking if $CC supports weak symbols" >&5
14917 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14918 if test "${cf_cv_weak_symbols+set}" = set; then
14919 echo $ECHO_N "(cached) $ECHO_C" >&6
14922 cat >"conftest.$ac_ext" <<_ACEOF
14923 #line 14923 "configure"
14924 #include "confdefs.h"
14931 #if defined(__GNUC__)
14932 # if defined __USE_ISOC99
14933 # define _cat_pragma(exp) _Pragma(#exp)
14934 # define _weak_pragma(exp) _cat_pragma(weak name)
14936 # define _weak_pragma(exp)
14938 # define _declare(name) __extension__ extern __typeof__(name) name
14939 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
14942 weak_symbol(fopen);
14948 rm -f "conftest.$ac_objext"
14949 if { (eval echo "$as_me:14949: \"$ac_compile\"") >&5
14950 (eval $ac_compile) 2>&5
14952 echo "$as_me:14952: \$? = $ac_status" >&5
14953 (exit "$ac_status"); } &&
14954 { ac_try='test -s "conftest.$ac_objext"'
14955 { (eval echo "$as_me:14955: \"$ac_try\"") >&5
14956 (eval $ac_try) 2>&5
14958 echo "$as_me:14958: \$? = $ac_status" >&5
14959 (exit "$ac_status"); }; }; then
14960 cf_cv_weak_symbols=yes
14962 echo "$as_me: failed program was:" >&5
14963 cat "conftest.$ac_ext" >&5
14964 cf_cv_weak_symbols=no
14966 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14969 echo "$as_me:14969: result: $cf_cv_weak_symbols" >&5
14970 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14973 cf_cv_weak_symbols=no
14976 if test $cf_cv_weak_symbols = yes ; then
14978 cat >>confdefs.h <<\EOF
14979 #define USE_WEAK_SYMBOLS 1
14985 if test "$with_pthread" = "yes" ; then
14987 cat >>confdefs.h <<\EOF
14988 #define USE_PTHREADS 1
14991 enable_reentrant=yes
14992 if test $cf_cv_weak_symbols = yes ; then
14997 # OpenSUSE is installing ncurses6, using reentrant option.
14998 echo "$as_me:14998: checking for _nc_TABSIZE" >&5
14999 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
15000 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
15001 echo $ECHO_N "(cached) $ECHO_C" >&6
15003 cat >"conftest.$ac_ext" <<_ACEOF
15004 #line 15004 "configure"
15005 #include "confdefs.h"
15006 #define _nc_TABSIZE autoconf_temporary
15007 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15014 /* We use char because int might match the return type of a gcc2
15015 builtin and then its argument prototype would still apply. */
15016 char _nc_TABSIZE (void);
15022 /* The GNU C library defines stubs for functions which it implements
15023 to always fail with ENOSYS. Some functions are actually named
15024 something starting with __ and the normal name is an alias. */
15025 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
15026 #error found stub for _nc_TABSIZE
15029 return _nc_TABSIZE ();
15034 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15035 if { (eval echo "$as_me:15035: \"$ac_link\"") >&5
15036 (eval $ac_link) 2>&5
15038 echo "$as_me:15038: \$? = $ac_status" >&5
15039 (exit "$ac_status"); } &&
15040 { ac_try='test -s "conftest$ac_exeext"'
15041 { (eval echo "$as_me:15041: \"$ac_try\"") >&5
15042 (eval $ac_try) 2>&5
15044 echo "$as_me:15044: \$? = $ac_status" >&5
15045 (exit "$ac_status"); }; }; then
15046 ac_cv_func__nc_TABSIZE=yes
15048 echo "$as_me: failed program was:" >&5
15049 cat "conftest.$ac_ext" >&5
15050 ac_cv_func__nc_TABSIZE=no
15052 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15054 echo "$as_me:15054: result: $ac_cv_func__nc_TABSIZE" >&5
15055 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
15056 if test "$ac_cv_func__nc_TABSIZE" = yes; then
15057 assume_reentrant=yes
15059 assume_reentrant=no
15062 # Reentrant code has to be opaque; there's little advantage to making ncurses
15063 # opaque outside of that, so there is no --enable-opaque option. We can use
15064 # this option without --with-pthreads, but this will be always set for
15066 echo "$as_me:15066: checking if you want experimental reentrant code" >&5
15067 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
15069 # Check whether --enable-reentrant or --disable-reentrant was given.
15070 if test "${enable_reentrant+set}" = set; then
15071 enableval="$enable_reentrant"
15072 with_reentrant=$enableval
15074 with_reentrant=$assume_reentrant
15076 echo "$as_me:15076: result: $with_reentrant" >&5
15077 echo "${ECHO_T}$with_reentrant" >&6
15078 if test "$with_reentrant" = yes ; then
15079 cf_cv_enable_reentrant=1
15080 if test $cf_cv_weak_symbols = yes ; then
15082 # remove pthread library from $LIBS
15083 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
15085 elif test "$assume_reentrant" = no ; then
15086 LIB_SUFFIX="t${LIB_SUFFIX}"
15089 cat >>confdefs.h <<\EOF
15090 #define USE_REENTRANT 1
15094 cf_cv_enable_reentrant=0
15097 ### Allow using a different wrap-prefix
15098 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15099 echo "$as_me:15099: checking for prefix used to wrap public variables" >&5
15100 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15102 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15103 if test "${with_wrap_prefix+set}" = set; then
15104 withval="$with_wrap_prefix"
15105 NCURSES_WRAP_PREFIX=$withval
15107 NCURSES_WRAP_PREFIX=_nc_
15109 echo "$as_me:15109: result: $NCURSES_WRAP_PREFIX" >&5
15110 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15112 NCURSES_WRAP_PREFIX=_nc_
15115 cat >>confdefs.h <<EOF
15116 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15119 ###############################################################################
15121 ### use option --disable-echo to suppress full display compiling commands
15123 echo "$as_me:15123: checking if you want to see long compiling messages" >&5
15124 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15126 # Check whether --enable-echo or --disable-echo was given.
15127 if test "${enable_echo+set}" = set; then
15128 enableval="$enable_echo"
15129 test "$enableval" != no && enableval=yes
15130 if test "$enableval" != "yes" ; then
15133 ECHO_LD='@echo linking $@;'
15134 RULE_CC='@echo compiling $<'
15135 SHOW_CC='@echo compiling $@'
15157 echo "$as_me:15157: result: $enableval" >&5
15158 echo "${ECHO_T}$enableval" >&6
15160 echo "$as_me:15160: checking if you want to use C11 _Noreturn feature" >&5
15161 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
15163 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
15164 if test "${enable_stdnoreturn+set}" = set; then
15165 enableval="$enable_stdnoreturn"
15166 test "$enableval" != yes && enableval=no
15167 if test "$enableval" != "no" ; then
15168 enable_stdnoreturn=yes
15170 enable_stdnoreturn=no
15174 enable_stdnoreturn=no
15177 echo "$as_me:15177: result: $enable_stdnoreturn" >&5
15178 echo "${ECHO_T}$enable_stdnoreturn" >&6
15180 if test $enable_stdnoreturn = yes; then
15181 echo "$as_me:15181: checking for C11 _Noreturn feature" >&5
15182 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
15183 if test "${cf_cv_c11_noreturn+set}" = set; then
15184 echo $ECHO_N "(cached) $ECHO_C" >&6
15186 cat >"conftest.$ac_ext" <<_ACEOF
15187 #line 15187 "configure"
15188 #include "confdefs.h"
15191 #include <stdlib.h>
15192 #include <stdnoreturn.h>
15193 static _Noreturn void giveup(void) { exit(0); }
15198 if (feof(stdin)) giveup()
15203 rm -f "conftest.$ac_objext"
15204 if { (eval echo "$as_me:15204: \"$ac_compile\"") >&5
15205 (eval $ac_compile) 2>&5
15207 echo "$as_me:15207: \$? = $ac_status" >&5
15208 (exit "$ac_status"); } &&
15209 { ac_try='test -s "conftest.$ac_objext"'
15210 { (eval echo "$as_me:15210: \"$ac_try\"") >&5
15211 (eval $ac_try) 2>&5
15213 echo "$as_me:15213: \$? = $ac_status" >&5
15214 (exit "$ac_status"); }; }; then
15215 cf_cv_c11_noreturn=yes
15217 echo "$as_me: failed program was:" >&5
15218 cat "conftest.$ac_ext" >&5
15219 cf_cv_c11_noreturn=no
15221 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15224 echo "$as_me:15224: result: $cf_cv_c11_noreturn" >&5
15225 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
15227 cf_cv_c11_noreturn=no,
15230 if test "$cf_cv_c11_noreturn" = yes; then
15232 cat >>confdefs.h <<\EOF
15233 #define HAVE_STDNORETURN_H 1
15236 cat >>confdefs.h <<EOF
15237 #define STDC_NORETURN _Noreturn
15240 HAVE_STDNORETURN_H=1
15242 HAVE_STDNORETURN_H=0
15245 if test "$GCC" = yes || test "$GXX" = yes
15248 if test "$GCC" = yes || test "$GXX" = yes
15252 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
15254 echo "${as_me:-configure}:15254: testing repairing CFLAGS: $CFLAGS ..." 1>&5
15257 for cf_temp_scan in $CFLAGS
15259 case "x$cf_temp_scan" in
15262 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15263 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15268 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15269 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15274 CFLAGS="$cf_temp_flags"
15275 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
15277 echo "${as_me:-configure}:15277: testing ... fixed $CFLAGS ..." 1>&5
15279 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15281 echo "${as_me:-configure}:15281: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15287 if test "$GCC" = yes || test "$GXX" = yes
15291 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
15293 echo "${as_me:-configure}:15293: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
15296 for cf_temp_scan in $CPPFLAGS
15298 case "x$cf_temp_scan" in
15301 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15302 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15307 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15308 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15313 CPPFLAGS="$cf_temp_flags"
15314 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
15316 echo "${as_me:-configure}:15316: testing ... fixed $CPPFLAGS ..." 1>&5
15318 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15320 echo "${as_me:-configure}:15320: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15326 if test "$GCC" = yes || test "$GXX" = yes
15330 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
15332 echo "${as_me:-configure}:15332: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
15335 for cf_temp_scan in $LDFLAGS
15337 case "x$cf_temp_scan" in
15340 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15341 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15346 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15347 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15352 LDFLAGS="$cf_temp_flags"
15353 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
15355 echo "${as_me:-configure}:15355: testing ... fixed $LDFLAGS ..." 1>&5
15357 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15359 echo "${as_me:-configure}:15359: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15365 echo "$as_me:15365: checking if you want to turn on gcc warnings" >&5
15366 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
15368 # Check whether --enable-warnings or --disable-warnings was given.
15369 if test "${enable_warnings+set}" = set; then
15370 enableval="$enable_warnings"
15371 test "$enableval" != yes && enableval=no
15372 if test "$enableval" != "no" ; then
15373 enable_warnings=yes
15382 echo "$as_me:15382: result: $enable_warnings" >&5
15383 echo "${ECHO_T}$enable_warnings" >&6
15384 if test "$enable_warnings" = "yes"
15387 if test "x$have_x" = xyes; then
15389 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15390 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15391 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15392 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15393 for cf_X_CFLAGS in $X_CFLAGS
15395 case "x$cf_X_CFLAGS" in
15397 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15400 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15405 cat >"conftest.$ac_ext" <<_ACEOF
15406 #line 15406 "configure"
15407 #include "confdefs.h"
15409 #include <stdlib.h>
15410 #include <X11/Intrinsic.h>
15415 String foo = malloc(1); free((void*)foo)
15420 rm -f "conftest.$ac_objext"
15421 if { (eval echo "$as_me:15421: \"$ac_compile\"") >&5
15422 (eval $ac_compile) 2>&5
15424 echo "$as_me:15424: \$? = $ac_status" >&5
15425 (exit "$ac_status"); } &&
15426 { ac_try='test -s "conftest.$ac_objext"'
15427 { (eval echo "$as_me:15427: \"$ac_try\"") >&5
15428 (eval $ac_try) 2>&5
15430 echo "$as_me:15430: \$? = $ac_status" >&5
15431 (exit "$ac_status"); }; }; then
15433 echo "$as_me:15433: checking for X11/Xt const-feature" >&5
15434 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15435 if test "${cf_cv_const_x_string+set}" = set; then
15436 echo $ECHO_N "(cached) $ECHO_C" >&6
15439 cat >"conftest.$ac_ext" <<_ACEOF
15440 #line 15440 "configure"
15441 #include "confdefs.h"
15443 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15444 #undef XTSTRINGDEFINES /* X11R5 and later */
15445 #include <stdlib.h>
15446 #include <X11/Intrinsic.h>
15451 String foo = malloc(1); *foo = 0
15456 rm -f "conftest.$ac_objext"
15457 if { (eval echo "$as_me:15457: \"$ac_compile\"") >&5
15458 (eval $ac_compile) 2>&5
15460 echo "$as_me:15460: \$? = $ac_status" >&5
15461 (exit "$ac_status"); } &&
15462 { ac_try='test -s "conftest.$ac_objext"'
15463 { (eval echo "$as_me:15463: \"$ac_try\"") >&5
15464 (eval $ac_try) 2>&5
15466 echo "$as_me:15466: \$? = $ac_status" >&5
15467 (exit "$ac_status"); }; }; then
15469 cf_cv_const_x_string=no
15472 echo "$as_me: failed program was:" >&5
15473 cat "conftest.$ac_ext" >&5
15475 cf_cv_const_x_string=yes
15478 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15481 echo "$as_me:15481: result: $cf_cv_const_x_string" >&5
15482 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15484 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
15485 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
15486 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
15488 case "$cf_cv_const_x_string" in
15491 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15492 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15497 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15498 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15504 echo "$as_me: failed program was:" >&5
15505 cat "conftest.$ac_ext" >&5
15507 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15509 cat > "conftest.$ac_ext" <<EOF
15510 #line 15510 "${as_me:-configure}"
15511 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15513 if test "$INTEL_COMPILER" = yes
15515 # The "-wdXXX" options suppress warnings:
15516 # remark #1419: external declaration in primary source file
15517 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15518 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15519 # remark #193: zero used for undefined preprocessing identifier
15520 # remark #593: variable "curs_sb_left_arrow" was set but never used
15521 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15522 # remark #869: parameter "tw" was never referenced
15523 # remark #981: operands are evaluated in unspecified order
15524 # warning #279: controlling expression is constant
15526 { echo "$as_me:15526: checking for $CC warning options..." >&5
15527 echo "$as_me: checking for $CC warning options..." >&6;}
15528 cf_save_CFLAGS="$CFLAGS"
15529 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
15541 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15542 if { (eval echo "$as_me:15542: \"$ac_compile\"") >&5
15543 (eval $ac_compile) 2>&5
15545 echo "$as_me:15545: \$? = $ac_status" >&5
15546 (exit "$ac_status"); }; then
15547 test -n "$verbose" && echo "$as_me:15547: result: ... -$cf_opt" >&5
15548 echo "${ECHO_T}... -$cf_opt" >&6
15549 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15552 CFLAGS="$cf_save_CFLAGS"
15553 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
15555 { echo "$as_me:15555: checking for $CC warning options..." >&5
15556 echo "$as_me: checking for $CC warning options..." >&6;}
15557 cf_save_CFLAGS="$CFLAGS"
15559 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15560 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15561 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15562 for cf_opt in W Wall \
15563 Wbad-function-cast \
15566 Wdeclaration-after-statement \
15569 Wmissing-declarations \
15570 Wmissing-prototypes \
15574 Wstrict-prototypes \
15575 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15577 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15578 if { (eval echo "$as_me:15578: \"$ac_compile\"") >&5
15579 (eval $ac_compile) 2>&5
15581 echo "$as_me:15581: \$? = $ac_status" >&5
15582 (exit "$ac_status"); }; then
15583 test -n "$verbose" && echo "$as_me:15583: result: ... -$cf_opt" >&5
15584 echo "${ECHO_T}... -$cf_opt" >&6
15587 case "$GCC_VERSION" in
15589 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15591 echo "${as_me:-configure}:15591: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15597 case "$GCC_VERSION" in
15599 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15601 echo "${as_me:-configure}:15601: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15607 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15610 CFLAGS="$cf_save_CFLAGS"
15616 if test "$GCC" = yes || test "$GXX" = yes
15618 cat > conftest.i <<EOF
15620 #define GCC_PRINTF 0
15623 #define GCC_SCANF 0
15625 #ifndef GCC_NORETURN
15626 #define GCC_NORETURN /* nothing */
15629 #define GCC_UNUSED /* nothing */
15632 if test "$GCC" = yes
15634 { echo "$as_me:15634: checking for $CC __attribute__ directives..." >&5
15635 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15636 cat > "conftest.$ac_ext" <<EOF
15637 #line 15637 "${as_me:-configure}"
15638 #include "confdefs.h"
15639 #include "conftest.h"
15640 #include "conftest.i"
15642 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15644 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15647 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
15649 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
15651 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15652 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
15653 extern GCC_NORETURN void foo(void);
15654 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
15656 cf_printf_attribute=no
15657 cf_scanf_attribute=no
15658 for cf_attribute in scanf printf unused noreturn
15661 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15663 cf_directive="__attribute__(($cf_attribute))"
15664 echo "checking for $CC $cf_directive" 1>&5
15666 case "$cf_attribute" in
15668 cf_printf_attribute=yes
15669 cat >conftest.h <<EOF
15670 #define GCC_$cf_ATTRIBUTE 1
15674 cf_scanf_attribute=yes
15675 cat >conftest.h <<EOF
15676 #define GCC_$cf_ATTRIBUTE 1
15680 cat >conftest.h <<EOF
15681 #define GCC_$cf_ATTRIBUTE $cf_directive
15686 if { (eval echo "$as_me:15686: \"$ac_compile\"") >&5
15687 (eval $ac_compile) 2>&5
15689 echo "$as_me:15689: \$? = $ac_status" >&5
15690 (exit "$ac_status"); }; then
15691 test -n "$verbose" && echo "$as_me:15691: result: ... $cf_attribute" >&5
15692 echo "${ECHO_T}... $cf_attribute" >&6
15693 cat conftest.h >>confdefs.h
15694 case "$cf_attribute" in
15697 cat >>confdefs.h <<EOF
15698 #define GCC_NORETURN $cf_directive
15703 cf_value='/* nothing */'
15704 if test "$cf_printf_attribute" != no ; then
15705 cf_value='__attribute__((format(printf,fmt,var)))'
15707 cat >>confdefs.h <<\EOF
15708 #define GCC_PRINTF 1
15713 cat >>confdefs.h <<EOF
15714 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15719 cf_value='/* nothing */'
15720 if test "$cf_scanf_attribute" != no ; then
15721 cf_value='__attribute__((format(scanf,fmt,var)))'
15723 cat >>confdefs.h <<\EOF
15724 #define GCC_SCANF 1
15729 cat >>confdefs.h <<EOF
15730 #define GCC_SCANFLIKE(fmt,var) $cf_value
15736 cat >>confdefs.h <<EOF
15737 #define GCC_UNUSED $cf_directive
15745 ${FGREP-fgrep} define conftest.i >>confdefs.h
15752 if test "x$enable_warnings" = "xyes"; then
15754 ADAFLAGS="$ADAFLAGS -gnatg"
15758 ### use option --enable-assertions to turn on generation of assertion code
15759 echo "$as_me:15759: checking if you want to enable runtime assertions" >&5
15760 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15762 # Check whether --enable-assertions or --disable-assertions was given.
15763 if test "${enable_assertions+set}" = set; then
15764 enableval="$enable_assertions"
15765 with_assertions=$enableval
15769 echo "$as_me:15769: result: $with_assertions" >&5
15770 echo "${ECHO_T}$with_assertions" >&6
15773 if test "$with_assertions" = no
15775 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15778 ADAFLAGS="$ADAFLAGS -gnata"
15783 ### use option --disable-leaks to suppress "permanent" leaks, for testing
15785 cat >>confdefs.h <<\EOF
15786 #define HAVE_NC_ALLOC_H 1
15789 ### use option --enable-expanded to generate certain macros as functions
15791 # Check whether --enable-expanded or --disable-expanded was given.
15792 if test "${enable_expanded+set}" = set; then
15793 enableval="$enable_expanded"
15794 test "$enableval" = yes &&
15795 cat >>confdefs.h <<\EOF
15796 #define NCURSES_EXPANDED 1
15801 ### use option --disable-macros to suppress macros in favor of functions
15803 # Check whether --enable-macros or --disable-macros was given.
15804 if test "${enable_macros+set}" = set; then
15805 enableval="$enable_macros"
15806 test "$enableval" = no &&
15807 cat >>confdefs.h <<\EOF
15808 #define NCURSES_NOMACROS 1
15813 # Normally we only add trace() to the debug-library. Allow this to be
15814 # extended to all models of the ncurses library:
15816 case "$CFLAGS $CPPFLAGS" in
15822 echo "$as_me:15822: checking whether to add trace feature to all models" >&5
15823 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
15825 # Check whether --with-trace or --without-trace was given.
15826 if test "${with_trace+set}" = set; then
15827 withval="$with_trace"
15828 cf_with_trace=$withval
15830 cf_with_trace=$cf_all_traces
15832 echo "$as_me:15832: result: $cf_with_trace" >&5
15833 echo "${ECHO_T}$cf_with_trace" >&6
15835 if test "$cf_with_trace" = yes ; then
15841 cf_new_extra_cppflags=
15843 for cf_add_cflags in -DTRACE
15845 case "$cf_fix_cppflags" in
15847 case "$cf_add_cflags" in
15848 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15849 case "$cf_add_cflags" in
15851 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15853 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15854 && test -z "${cf_tst_cflags}" \
15855 && cf_fix_cppflags=yes
15857 if test "$cf_fix_cppflags" = yes ; then
15859 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15860 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15863 elif test "${cf_tst_cflags}" = "\"'" ; then
15865 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15866 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15872 case "$CPPFLAGS" in
15876 case "$cf_add_cflags" in
15878 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15880 CPPFLAGS=`echo "$CPPFLAGS" | \
15881 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15882 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15887 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15888 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15895 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15896 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15903 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15904 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15906 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15908 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15909 && test -z "${cf_tst_cflags}" \
15910 && cf_fix_cppflags=no
15915 if test -n "$cf_new_cflags" ; then
15917 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15918 CFLAGS="${CFLAGS}$cf_new_cflags"
15922 if test -n "$cf_new_cppflags" ; then
15924 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15925 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15929 if test -n "$cf_new_extra_cppflags" ; then
15931 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15932 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15940 echo "$as_me:15940: checking if we want to use GNAT projects" >&5
15941 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
15943 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
15944 if test "${enable_gnat_projects+set}" = set; then
15945 enableval="$enable_gnat_projects"
15946 test "$enableval" != no && enableval=yes
15947 if test "$enableval" != "yes" ; then
15948 enable_gnat_projects=no
15950 enable_gnat_projects=yes
15954 enable_gnat_projects=yes
15957 echo "$as_me:15957: result: $enable_gnat_projects" >&5
15958 echo "${ECHO_T}$enable_gnat_projects" >&6
15960 ### Checks for libraries.
15961 case $cf_cv_system_name in
15965 echo "$as_me:15965: checking for gettimeofday" >&5
15966 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
15967 if test "${ac_cv_func_gettimeofday+set}" = set; then
15968 echo $ECHO_N "(cached) $ECHO_C" >&6
15970 cat >"conftest.$ac_ext" <<_ACEOF
15971 #line 15971 "configure"
15972 #include "confdefs.h"
15973 #define gettimeofday autoconf_temporary
15974 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15975 #undef gettimeofday
15981 /* We use char because int might match the return type of a gcc2
15982 builtin and then its argument prototype would still apply. */
15983 char gettimeofday (void);
15989 /* The GNU C library defines stubs for functions which it implements
15990 to always fail with ENOSYS. Some functions are actually named
15991 something starting with __ and the normal name is an alias. */
15992 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
15993 #error found stub for gettimeofday
15996 return gettimeofday ();
16001 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16002 if { (eval echo "$as_me:16002: \"$ac_link\"") >&5
16003 (eval $ac_link) 2>&5
16005 echo "$as_me:16005: \$? = $ac_status" >&5
16006 (exit "$ac_status"); } &&
16007 { ac_try='test -s "conftest$ac_exeext"'
16008 { (eval echo "$as_me:16008: \"$ac_try\"") >&5
16009 (eval $ac_try) 2>&5
16011 echo "$as_me:16011: \$? = $ac_status" >&5
16012 (exit "$ac_status"); }; }; then
16013 ac_cv_func_gettimeofday=yes
16015 echo "$as_me: failed program was:" >&5
16016 cat "conftest.$ac_ext" >&5
16017 ac_cv_func_gettimeofday=no
16019 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16021 echo "$as_me:16021: result: $ac_cv_func_gettimeofday" >&5
16022 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16023 if test "$ac_cv_func_gettimeofday" = yes; then
16024 cat >>confdefs.h <<\EOF
16025 #define HAVE_GETTIMEOFDAY 1
16030 echo "$as_me:16030: checking for gettimeofday in -lbsd" >&5
16031 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
16032 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
16033 echo $ECHO_N "(cached) $ECHO_C" >&6
16035 ac_check_lib_save_LIBS=$LIBS
16037 cat >"conftest.$ac_ext" <<_ACEOF
16038 #line 16038 "configure"
16039 #include "confdefs.h"
16041 /* Override any gcc2 internal prototype to avoid an error. */
16045 /* We use char because int might match the return type of a gcc2
16046 builtin and then its argument prototype would still apply. */
16047 char gettimeofday ();
16056 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16057 if { (eval echo "$as_me:16057: \"$ac_link\"") >&5
16058 (eval $ac_link) 2>&5
16060 echo "$as_me:16060: \$? = $ac_status" >&5
16061 (exit "$ac_status"); } &&
16062 { ac_try='test -s "conftest$ac_exeext"'
16063 { (eval echo "$as_me:16063: \"$ac_try\"") >&5
16064 (eval $ac_try) 2>&5
16066 echo "$as_me:16066: \$? = $ac_status" >&5
16067 (exit "$ac_status"); }; }; then
16068 ac_cv_lib_bsd_gettimeofday=yes
16070 echo "$as_me: failed program was:" >&5
16071 cat "conftest.$ac_ext" >&5
16072 ac_cv_lib_bsd_gettimeofday=no
16074 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16075 LIBS=$ac_check_lib_save_LIBS
16077 echo "$as_me:16077: result: $ac_cv_lib_bsd_gettimeofday" >&5
16078 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
16079 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
16081 cat >>confdefs.h <<\EOF
16082 #define HAVE_GETTIMEOFDAY 1
16092 ### Checks for header files.
16093 echo "$as_me:16093: checking for ANSI C header files" >&5
16094 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16095 if test "${ac_cv_header_stdc+set}" = set; then
16096 echo $ECHO_N "(cached) $ECHO_C" >&6
16098 cat >"conftest.$ac_ext" <<_ACEOF
16099 #line 16099 "configure"
16100 #include "confdefs.h"
16101 #include <stdlib.h>
16102 #include <stdarg.h>
16103 #include <string.h>
16107 if { (eval echo "$as_me:16107: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16108 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16110 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16112 cat conftest.err >&5
16113 echo "$as_me:16113: \$? = $ac_status" >&5
16114 (exit "$ac_status"); } >/dev/null; then
16115 if test -s conftest.err; then
16116 ac_cpp_err=$ac_c_preproc_warn_flag
16123 if test -z "$ac_cpp_err"; then
16124 ac_cv_header_stdc=yes
16126 echo "$as_me: failed program was:" >&5
16127 cat "conftest.$ac_ext" >&5
16128 ac_cv_header_stdc=no
16130 rm -f conftest.err "conftest.$ac_ext"
16132 if test $ac_cv_header_stdc = yes; then
16133 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16134 cat >"conftest.$ac_ext" <<_ACEOF
16135 #line 16135 "configure"
16136 #include "confdefs.h"
16137 #include <string.h>
16140 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16141 $EGREP "memchr" >/dev/null 2>&1; then
16144 ac_cv_header_stdc=no
16150 if test $ac_cv_header_stdc = yes; then
16151 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16152 cat >"conftest.$ac_ext" <<_ACEOF
16153 #line 16153 "configure"
16154 #include "confdefs.h"
16155 #include <stdlib.h>
16158 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16159 $EGREP "free" >/dev/null 2>&1; then
16162 ac_cv_header_stdc=no
16168 if test $ac_cv_header_stdc = yes; then
16169 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16170 if test "$cross_compiling" = yes; then
16173 cat >"conftest.$ac_ext" <<_ACEOF
16174 #line 16174 "configure"
16175 #include "confdefs.h"
16177 #if ((' ' & 0x0FF) == 0x020)
16178 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16179 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16181 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16182 || ('j' <= (c) && (c) <= 'r') \
16183 || ('s' <= (c) && (c) <= 'z'))
16184 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16187 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16192 for (i = 0; i < 256; i++)
16193 if (XOR (islower (i), ISLOWER (i))
16194 || toupper (i) != TOUPPER (i))
16195 $ac_main_return(2);
16196 $ac_main_return (0);
16199 rm -f "conftest$ac_exeext"
16200 if { (eval echo "$as_me:16200: \"$ac_link\"") >&5
16201 (eval $ac_link) 2>&5
16203 echo "$as_me:16203: \$? = $ac_status" >&5
16204 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16205 { (eval echo "$as_me:16205: \"$ac_try\"") >&5
16206 (eval $ac_try) 2>&5
16208 echo "$as_me:16208: \$? = $ac_status" >&5
16209 (exit "$ac_status"); }; }; then
16212 echo "$as_me: program exited with status $ac_status" >&5
16213 echo "$as_me: failed program was:" >&5
16214 cat "conftest.$ac_ext" >&5
16215 ac_cv_header_stdc=no
16217 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16221 echo "$as_me:16221: result: $ac_cv_header_stdc" >&5
16222 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16223 if test $ac_cv_header_stdc = yes; then
16225 cat >>confdefs.h <<\EOF
16226 #define STDC_HEADERS 1
16231 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
16233 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
16234 inttypes.h stdint.h unistd.h
16236 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16237 echo "$as_me:16237: checking for $ac_header" >&5
16238 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16239 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16240 echo $ECHO_N "(cached) $ECHO_C" >&6
16242 cat >"conftest.$ac_ext" <<_ACEOF
16243 #line 16243 "configure"
16244 #include "confdefs.h"
16245 $ac_includes_default
16246 #include <$ac_header>
16248 rm -f "conftest.$ac_objext"
16249 if { (eval echo "$as_me:16249: \"$ac_compile\"") >&5
16250 (eval $ac_compile) 2>&5
16252 echo "$as_me:16252: \$? = $ac_status" >&5
16253 (exit "$ac_status"); } &&
16254 { ac_try='test -s "conftest.$ac_objext"'
16255 { (eval echo "$as_me:16255: \"$ac_try\"") >&5
16256 (eval $ac_try) 2>&5
16258 echo "$as_me:16258: \$? = $ac_status" >&5
16259 (exit "$ac_status"); }; }; then
16260 eval "$as_ac_Header=yes"
16262 echo "$as_me: failed program was:" >&5
16263 cat "conftest.$ac_ext" >&5
16264 eval "$as_ac_Header=no"
16266 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16268 echo "$as_me:16268: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16269 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16270 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16271 cat >>confdefs.h <<EOF
16272 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16278 echo "$as_me:16278: checking for signed char" >&5
16279 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
16280 if test "${ac_cv_type_signed_char+set}" = set; then
16281 echo $ECHO_N "(cached) $ECHO_C" >&6
16283 cat >"conftest.$ac_ext" <<_ACEOF
16284 #line 16284 "configure"
16285 #include "confdefs.h"
16286 $ac_includes_default
16290 if ((signed char *) 0)
16292 if (sizeof (signed char))
16298 rm -f "conftest.$ac_objext"
16299 if { (eval echo "$as_me:16299: \"$ac_compile\"") >&5
16300 (eval $ac_compile) 2>&5
16302 echo "$as_me:16302: \$? = $ac_status" >&5
16303 (exit "$ac_status"); } &&
16304 { ac_try='test -s "conftest.$ac_objext"'
16305 { (eval echo "$as_me:16305: \"$ac_try\"") >&5
16306 (eval $ac_try) 2>&5
16308 echo "$as_me:16308: \$? = $ac_status" >&5
16309 (exit "$ac_status"); }; }; then
16310 ac_cv_type_signed_char=yes
16312 echo "$as_me: failed program was:" >&5
16313 cat "conftest.$ac_ext" >&5
16314 ac_cv_type_signed_char=no
16316 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16318 echo "$as_me:16318: result: $ac_cv_type_signed_char" >&5
16319 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
16321 echo "$as_me:16321: checking size of signed char" >&5
16322 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
16323 if test "${ac_cv_sizeof_signed_char+set}" = set; then
16324 echo $ECHO_N "(cached) $ECHO_C" >&6
16326 if test "$ac_cv_type_signed_char" = yes; then
16327 if test "$cross_compiling" = yes; then
16328 # Depending upon the size, compute the lo and hi bounds.
16329 cat >"conftest.$ac_ext" <<_ACEOF
16330 #line 16330 "configure"
16331 #include "confdefs.h"
16332 $ac_includes_default
16336 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
16341 rm -f "conftest.$ac_objext"
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"); } &&
16347 { ac_try='test -s "conftest.$ac_objext"'
16348 { (eval echo "$as_me:16348: \"$ac_try\"") >&5
16349 (eval $ac_try) 2>&5
16351 echo "$as_me:16351: \$? = $ac_status" >&5
16352 (exit "$ac_status"); }; }; then
16355 cat >"conftest.$ac_ext" <<_ACEOF
16356 #line 16356 "configure"
16357 #include "confdefs.h"
16358 $ac_includes_default
16362 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16367 rm -f "conftest.$ac_objext"
16368 if { (eval echo "$as_me:16368: \"$ac_compile\"") >&5
16369 (eval $ac_compile) 2>&5
16371 echo "$as_me:16371: \$? = $ac_status" >&5
16372 (exit "$ac_status"); } &&
16373 { ac_try='test -s "conftest.$ac_objext"'
16374 { (eval echo "$as_me:16374: \"$ac_try\"") >&5
16375 (eval $ac_try) 2>&5
16377 echo "$as_me:16377: \$? = $ac_status" >&5
16378 (exit "$ac_status"); }; }; then
16379 ac_hi=$ac_mid; break
16381 echo "$as_me: failed program was:" >&5
16382 cat "conftest.$ac_ext" >&5
16383 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
16385 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16388 echo "$as_me: failed program was:" >&5
16389 cat "conftest.$ac_ext" >&5
16392 cat >"conftest.$ac_ext" <<_ACEOF
16393 #line 16393 "configure"
16394 #include "confdefs.h"
16395 $ac_includes_default
16399 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
16404 rm -f "conftest.$ac_objext"
16405 if { (eval echo "$as_me:16405: \"$ac_compile\"") >&5
16406 (eval $ac_compile) 2>&5
16408 echo "$as_me:16408: \$? = $ac_status" >&5
16409 (exit "$ac_status"); } &&
16410 { ac_try='test -s "conftest.$ac_objext"'
16411 { (eval echo "$as_me:16411: \"$ac_try\"") >&5
16412 (eval $ac_try) 2>&5
16414 echo "$as_me:16414: \$? = $ac_status" >&5
16415 (exit "$ac_status"); }; }; then
16416 ac_lo=$ac_mid; break
16418 echo "$as_me: failed program was:" >&5
16419 cat "conftest.$ac_ext" >&5
16420 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
16422 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16425 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16426 # Binary search between lo and hi bounds.
16427 while test "x$ac_lo" != "x$ac_hi"; do
16428 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
16429 cat >"conftest.$ac_ext" <<_ACEOF
16430 #line 16430 "configure"
16431 #include "confdefs.h"
16432 $ac_includes_default
16436 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16441 rm -f "conftest.$ac_objext"
16442 if { (eval echo "$as_me:16442: \"$ac_compile\"") >&5
16443 (eval $ac_compile) 2>&5
16445 echo "$as_me:16445: \$? = $ac_status" >&5
16446 (exit "$ac_status"); } &&
16447 { ac_try='test -s "conftest.$ac_objext"'
16448 { (eval echo "$as_me:16448: \"$ac_try\"") >&5
16449 (eval $ac_try) 2>&5
16451 echo "$as_me:16451: \$? = $ac_status" >&5
16452 (exit "$ac_status"); }; }; then
16455 echo "$as_me: failed program was:" >&5
16456 cat "conftest.$ac_ext" >&5
16457 ac_lo=`expr "$ac_mid" + 1`
16459 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16461 ac_cv_sizeof_signed_char=$ac_lo
16463 if test "$cross_compiling" = yes; then
16464 { { echo "$as_me:16464: error: cannot run test program while cross compiling" >&5
16465 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16466 { (exit 1); exit 1; }; }
16468 cat >"conftest.$ac_ext" <<_ACEOF
16469 #line 16469 "configure"
16470 #include "confdefs.h"
16471 $ac_includes_default
16475 FILE *f = fopen ("conftest.val", "w");
16477 $ac_main_return (1);
16478 fprintf (f, "%ld", (long)(sizeof (signed char)));
16484 rm -f "conftest$ac_exeext"
16485 if { (eval echo "$as_me:16485: \"$ac_link\"") >&5
16486 (eval $ac_link) 2>&5
16488 echo "$as_me:16488: \$? = $ac_status" >&5
16489 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16490 { (eval echo "$as_me:16490: \"$ac_try\"") >&5
16491 (eval $ac_try) 2>&5
16493 echo "$as_me:16493: \$? = $ac_status" >&5
16494 (exit "$ac_status"); }; }; then
16495 ac_cv_sizeof_signed_char=`cat conftest.val`
16497 echo "$as_me: program exited with status $ac_status" >&5
16498 echo "$as_me: failed program was:" >&5
16499 cat "conftest.$ac_ext" >&5
16501 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16506 ac_cv_sizeof_signed_char=0
16509 echo "$as_me:16509: result: $ac_cv_sizeof_signed_char" >&5
16510 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
16511 cat >>confdefs.h <<EOF
16512 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
16515 echo "$as_me:16515: checking for ANSI C header files" >&5
16516 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16517 if test "${ac_cv_header_stdc+set}" = set; then
16518 echo $ECHO_N "(cached) $ECHO_C" >&6
16520 cat >"conftest.$ac_ext" <<_ACEOF
16521 #line 16521 "configure"
16522 #include "confdefs.h"
16523 #include <stdlib.h>
16524 #include <stdarg.h>
16525 #include <string.h>
16529 if { (eval echo "$as_me:16529: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16530 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16532 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16534 cat conftest.err >&5
16535 echo "$as_me:16535: \$? = $ac_status" >&5
16536 (exit "$ac_status"); } >/dev/null; then
16537 if test -s conftest.err; then
16538 ac_cpp_err=$ac_c_preproc_warn_flag
16545 if test -z "$ac_cpp_err"; then
16546 ac_cv_header_stdc=yes
16548 echo "$as_me: failed program was:" >&5
16549 cat "conftest.$ac_ext" >&5
16550 ac_cv_header_stdc=no
16552 rm -f conftest.err "conftest.$ac_ext"
16554 if test $ac_cv_header_stdc = yes; then
16555 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16556 cat >"conftest.$ac_ext" <<_ACEOF
16557 #line 16557 "configure"
16558 #include "confdefs.h"
16559 #include <string.h>
16562 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16563 $EGREP "memchr" >/dev/null 2>&1; then
16566 ac_cv_header_stdc=no
16572 if test $ac_cv_header_stdc = yes; then
16573 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16574 cat >"conftest.$ac_ext" <<_ACEOF
16575 #line 16575 "configure"
16576 #include "confdefs.h"
16577 #include <stdlib.h>
16580 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16581 $EGREP "free" >/dev/null 2>&1; then
16584 ac_cv_header_stdc=no
16590 if test $ac_cv_header_stdc = yes; then
16591 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16592 if test "$cross_compiling" = yes; then
16595 cat >"conftest.$ac_ext" <<_ACEOF
16596 #line 16596 "configure"
16597 #include "confdefs.h"
16599 #if ((' ' & 0x0FF) == 0x020)
16600 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16601 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16603 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16604 || ('j' <= (c) && (c) <= 'r') \
16605 || ('s' <= (c) && (c) <= 'z'))
16606 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16609 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16614 for (i = 0; i < 256; i++)
16615 if (XOR (islower (i), ISLOWER (i))
16616 || toupper (i) != TOUPPER (i))
16617 $ac_main_return(2);
16618 $ac_main_return (0);
16621 rm -f "conftest$ac_exeext"
16622 if { (eval echo "$as_me:16622: \"$ac_link\"") >&5
16623 (eval $ac_link) 2>&5
16625 echo "$as_me:16625: \$? = $ac_status" >&5
16626 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16627 { (eval echo "$as_me:16627: \"$ac_try\"") >&5
16628 (eval $ac_try) 2>&5
16630 echo "$as_me:16630: \$? = $ac_status" >&5
16631 (exit "$ac_status"); }; }; then
16634 echo "$as_me: program exited with status $ac_status" >&5
16635 echo "$as_me: failed program was:" >&5
16636 cat "conftest.$ac_ext" >&5
16637 ac_cv_header_stdc=no
16639 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16643 echo "$as_me:16643: result: $ac_cv_header_stdc" >&5
16644 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16645 if test $ac_cv_header_stdc = yes; then
16647 cat >>confdefs.h <<\EOF
16648 #define STDC_HEADERS 1
16653 ac_header_dirent=no
16654 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16655 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16656 echo "$as_me:16656: checking for $ac_hdr that defines DIR" >&5
16657 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16658 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16659 echo $ECHO_N "(cached) $ECHO_C" >&6
16661 cat >"conftest.$ac_ext" <<_ACEOF
16662 #line 16662 "configure"
16663 #include "confdefs.h"
16664 #include <sys/types.h>
16676 rm -f "conftest.$ac_objext"
16677 if { (eval echo "$as_me:16677: \"$ac_compile\"") >&5
16678 (eval $ac_compile) 2>&5
16680 echo "$as_me:16680: \$? = $ac_status" >&5
16681 (exit "$ac_status"); } &&
16682 { ac_try='test -s "conftest.$ac_objext"'
16683 { (eval echo "$as_me:16683: \"$ac_try\"") >&5
16684 (eval $ac_try) 2>&5
16686 echo "$as_me:16686: \$? = $ac_status" >&5
16687 (exit "$ac_status"); }; }; then
16688 eval "$as_ac_Header=yes"
16690 echo "$as_me: failed program was:" >&5
16691 cat "conftest.$ac_ext" >&5
16692 eval "$as_ac_Header=no"
16694 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16696 echo "$as_me:16696: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16697 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16698 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16699 cat >>confdefs.h <<EOF
16700 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16703 ac_header_dirent=$ac_hdr; break
16707 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
16708 if test $ac_header_dirent = dirent.h; then
16709 echo "$as_me:16709: checking for opendir in -ldir" >&5
16710 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
16711 if test "${ac_cv_lib_dir_opendir+set}" = set; then
16712 echo $ECHO_N "(cached) $ECHO_C" >&6
16714 ac_check_lib_save_LIBS=$LIBS
16716 cat >"conftest.$ac_ext" <<_ACEOF
16717 #line 16717 "configure"
16718 #include "confdefs.h"
16720 /* Override any gcc2 internal prototype to avoid an error. */
16724 /* We use char because int might match the return type of a gcc2
16725 builtin and then its argument prototype would still apply. */
16735 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16736 if { (eval echo "$as_me:16736: \"$ac_link\"") >&5
16737 (eval $ac_link) 2>&5
16739 echo "$as_me:16739: \$? = $ac_status" >&5
16740 (exit "$ac_status"); } &&
16741 { ac_try='test -s "conftest$ac_exeext"'
16742 { (eval echo "$as_me:16742: \"$ac_try\"") >&5
16743 (eval $ac_try) 2>&5
16745 echo "$as_me:16745: \$? = $ac_status" >&5
16746 (exit "$ac_status"); }; }; then
16747 ac_cv_lib_dir_opendir=yes
16749 echo "$as_me: failed program was:" >&5
16750 cat "conftest.$ac_ext" >&5
16751 ac_cv_lib_dir_opendir=no
16753 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16754 LIBS=$ac_check_lib_save_LIBS
16756 echo "$as_me:16756: result: $ac_cv_lib_dir_opendir" >&5
16757 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
16758 if test "$ac_cv_lib_dir_opendir" = yes; then
16763 echo "$as_me:16763: checking for opendir in -lx" >&5
16764 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
16765 if test "${ac_cv_lib_x_opendir+set}" = set; then
16766 echo $ECHO_N "(cached) $ECHO_C" >&6
16768 ac_check_lib_save_LIBS=$LIBS
16770 cat >"conftest.$ac_ext" <<_ACEOF
16771 #line 16771 "configure"
16772 #include "confdefs.h"
16774 /* Override any gcc2 internal prototype to avoid an error. */
16778 /* We use char because int might match the return type of a gcc2
16779 builtin and then its argument prototype would still apply. */
16789 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16790 if { (eval echo "$as_me:16790: \"$ac_link\"") >&5
16791 (eval $ac_link) 2>&5
16793 echo "$as_me:16793: \$? = $ac_status" >&5
16794 (exit "$ac_status"); } &&
16795 { ac_try='test -s "conftest$ac_exeext"'
16796 { (eval echo "$as_me:16796: \"$ac_try\"") >&5
16797 (eval $ac_try) 2>&5
16799 echo "$as_me:16799: \$? = $ac_status" >&5
16800 (exit "$ac_status"); }; }; then
16801 ac_cv_lib_x_opendir=yes
16803 echo "$as_me: failed program was:" >&5
16804 cat "conftest.$ac_ext" >&5
16805 ac_cv_lib_x_opendir=no
16807 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16808 LIBS=$ac_check_lib_save_LIBS
16810 echo "$as_me:16810: result: $ac_cv_lib_x_opendir" >&5
16811 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
16812 if test "$ac_cv_lib_x_opendir" = yes; then
16818 echo "$as_me:16818: checking whether time.h and sys/time.h may both be included" >&5
16819 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16820 if test "${ac_cv_header_time+set}" = set; then
16821 echo $ECHO_N "(cached) $ECHO_C" >&6
16823 cat >"conftest.$ac_ext" <<_ACEOF
16824 #line 16824 "configure"
16825 #include "confdefs.h"
16826 #include <sys/types.h>
16827 #include <sys/time.h>
16833 if ((struct tm *) 0)
16839 rm -f "conftest.$ac_objext"
16840 if { (eval echo "$as_me:16840: \"$ac_compile\"") >&5
16841 (eval $ac_compile) 2>&5
16843 echo "$as_me:16843: \$? = $ac_status" >&5
16844 (exit "$ac_status"); } &&
16845 { ac_try='test -s "conftest.$ac_objext"'
16846 { (eval echo "$as_me:16846: \"$ac_try\"") >&5
16847 (eval $ac_try) 2>&5
16849 echo "$as_me:16849: \$? = $ac_status" >&5
16850 (exit "$ac_status"); }; }; then
16851 ac_cv_header_time=yes
16853 echo "$as_me: failed program was:" >&5
16854 cat "conftest.$ac_ext" >&5
16855 ac_cv_header_time=no
16857 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16859 echo "$as_me:16859: result: $ac_cv_header_time" >&5
16860 echo "${ECHO_T}$ac_cv_header_time" >&6
16861 if test $ac_cv_header_time = yes; then
16863 cat >>confdefs.h <<\EOF
16864 #define TIME_WITH_SYS_TIME 1
16869 ### checks for compiler characteristics
16871 ac_cpp='$CPP $CPPFLAGS'
16872 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16873 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16874 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16875 ac_main_return="return"
16877 echo "$as_me:16877: checking for an ANSI C-conforming const" >&5
16878 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16879 if test "${ac_cv_c_const+set}" = set; then
16880 echo $ECHO_N "(cached) $ECHO_C" >&6
16882 cat >"conftest.$ac_ext" <<_ACEOF
16883 #line 16883 "configure"
16884 #include "confdefs.h"
16889 /* FIXME: Include the comments suggested by Paul. */
16890 #ifndef __cplusplus
16891 /* Ultrix mips cc rejects this. */
16892 typedef int charset[2];
16894 /* SunOS 4.1.1 cc rejects this. */
16895 char const *const *ccp;
16897 /* NEC SVR4.0.2 mips cc rejects this. */
16898 struct point {int x, y;};
16899 static struct point const zero = {0,0};
16900 /* AIX XL C 1.02.0.0 rejects this.
16901 It does not let you subtract one const X* pointer from another in
16902 an arm of an if-expression whose if-part is not a constant
16904 const char *g = "string";
16905 ccp = &g + (g ? g-g : 0);
16906 /* HPUX 7.0 cc rejects these. */
16909 ccp = (char const *const *) p;
16910 { /* SCO 3.2v4 cc rejects this. */
16912 char const *s = 0 ? (char *) 0 : (char const *) 0;
16916 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
16917 int x[] = {25, 17};
16918 const int *foo = &x[0];
16921 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16922 typedef const int *iptr;
16926 { /* AIX XL C 1.02.0.0 rejects this saying
16927 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16928 struct s { int j; const int *ap[3]; };
16929 struct s *b; b->j = 5;
16931 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16932 const int foo = 10;
16940 rm -f "conftest.$ac_objext"
16941 if { (eval echo "$as_me:16941: \"$ac_compile\"") >&5
16942 (eval $ac_compile) 2>&5
16944 echo "$as_me:16944: \$? = $ac_status" >&5
16945 (exit "$ac_status"); } &&
16946 { ac_try='test -s "conftest.$ac_objext"'
16947 { (eval echo "$as_me:16947: \"$ac_try\"") >&5
16948 (eval $ac_try) 2>&5
16950 echo "$as_me:16950: \$? = $ac_status" >&5
16951 (exit "$ac_status"); }; }; then
16954 echo "$as_me: failed program was:" >&5
16955 cat "conftest.$ac_ext" >&5
16958 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16960 echo "$as_me:16960: result: $ac_cv_c_const" >&5
16961 echo "${ECHO_T}$ac_cv_c_const" >&6
16962 if test $ac_cv_c_const = no; then
16964 cat >>confdefs.h <<\EOF
16970 ### Checks for external-data
16972 echo "$as_me:16972: checking if data-only library module links" >&5
16973 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16974 if test "${cf_cv_link_dataonly+set}" = set; then
16975 echo $ECHO_N "(cached) $ECHO_C" >&6
16979 cat >conftest.$ac_ext <<EOF
16980 #line 16980 "configure"
16981 int testdata[3] = { 123, 456, 789 };
16983 if { (eval echo "$as_me:16983: \"$ac_compile\"") >&5
16984 (eval $ac_compile) 2>&5
16986 echo "$as_me:16986: \$? = $ac_status" >&5
16987 (exit "$ac_status"); } ; then
16988 mv conftest.o data.o && \
16989 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16991 rm -f conftest.$ac_ext data.o
16992 cat >conftest.$ac_ext <<EOF
16993 #line 16993 "configure"
16997 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
16999 extern int testdata[3];
17000 return testdata[0] == 123
17001 && testdata[1] == 456
17002 && testdata[2] == 789;
17006 if { (eval echo "$as_me:17006: \"$ac_compile\"") >&5
17007 (eval $ac_compile) 2>&5
17009 echo "$as_me:17009: \$? = $ac_status" >&5
17010 (exit "$ac_status"); }; then
17011 mv conftest.o func.o && \
17012 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17014 rm -f conftest.$ac_ext func.o
17015 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17016 cf_saveLIBS="$LIBS"
17017 LIBS="conftest.a $LIBS"
17018 if test "$cross_compiling" = yes; then
17019 cf_cv_link_dataonly=unknown
17021 cat >"conftest.$ac_ext" <<_ACEOF
17022 #line 17022 "configure"
17023 #include "confdefs.h"
17027 extern int testfunc();
17028 ${cf_cv_main_return:-return} (!testfunc());
17032 rm -f "conftest$ac_exeext"
17033 if { (eval echo "$as_me:17033: \"$ac_link\"") >&5
17034 (eval $ac_link) 2>&5
17036 echo "$as_me:17036: \$? = $ac_status" >&5
17037 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17038 { (eval echo "$as_me:17038: \"$ac_try\"") >&5
17039 (eval $ac_try) 2>&5
17041 echo "$as_me:17041: \$? = $ac_status" >&5
17042 (exit "$ac_status"); }; }; then
17043 cf_cv_link_dataonly=yes
17045 echo "$as_me: program exited with status $ac_status" >&5
17046 echo "$as_me: failed program was:" >&5
17047 cat "conftest.$ac_ext" >&5
17048 cf_cv_link_dataonly=no
17050 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17052 LIBS="$cf_saveLIBS"
17056 echo "$as_me:17056: result: $cf_cv_link_dataonly" >&5
17057 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17059 if test "$cf_cv_link_dataonly" = no ; then
17061 cat >>confdefs.h <<\EOF
17062 #define BROKEN_LINKER 1
17068 ### Checks for library functions.
17074 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17075 echo "$as_me:17075: checking for $ac_header" >&5
17076 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17077 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17078 echo $ECHO_N "(cached) $ECHO_C" >&6
17080 cat >"conftest.$ac_ext" <<_ACEOF
17081 #line 17081 "configure"
17082 #include "confdefs.h"
17083 #include <$ac_header>
17085 if { (eval echo "$as_me:17085: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17086 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17088 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17090 cat conftest.err >&5
17091 echo "$as_me:17091: \$? = $ac_status" >&5
17092 (exit "$ac_status"); } >/dev/null; then
17093 if test -s conftest.err; then
17094 ac_cpp_err=$ac_c_preproc_warn_flag
17101 if test -z "$ac_cpp_err"; then
17102 eval "$as_ac_Header=yes"
17104 echo "$as_me: failed program was:" >&5
17105 cat "conftest.$ac_ext" >&5
17106 eval "$as_ac_Header=no"
17108 rm -f conftest.err "conftest.$ac_ext"
17110 echo "$as_me:17110: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17111 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17112 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17113 cat >>confdefs.h <<EOF
17114 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17120 echo "$as_me:17120: checking for working mkstemp" >&5
17121 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17122 if test "${cf_cv_func_mkstemp+set}" = set; then
17123 echo $ECHO_N "(cached) $ECHO_C" >&6
17127 if test "$cross_compiling" = yes; then
17128 cf_cv_func_mkstemp=maybe
17130 cat >"conftest.$ac_ext" <<_ACEOF
17131 #line 17131 "configure"
17132 #include "confdefs.h"
17134 #include <sys/types.h>
17135 #ifdef HAVE_UNISTD_H
17136 #include <unistd.h>
17138 #include <stdlib.h>
17140 #include <string.h>
17141 #include <sys/stat.h>
17144 char *tmpl = "conftestXXXXXX";
17152 for (n = 0; n < 2; ++n) {
17153 strcpy(name[n], tmpl);
17154 if ((fd = mkstemp(name[n])) >= 0) {
17155 if (!strcmp(name[n], tmpl)
17156 || stat(name[n], &sb) != 0
17157 || (sb.st_mode & S_IFMT) != S_IFREG
17158 || (sb.st_mode & 077) != 0) {
17165 && !strcmp(name[0], name[1]))
17167 ${cf_cv_main_return:-return}(result);
17171 rm -f "conftest$ac_exeext"
17172 if { (eval echo "$as_me:17172: \"$ac_link\"") >&5
17173 (eval $ac_link) 2>&5
17175 echo "$as_me:17175: \$? = $ac_status" >&5
17176 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
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
17182 cf_cv_func_mkstemp=yes
17185 echo "$as_me: program exited with status $ac_status" >&5
17186 echo "$as_me: failed program was:" >&5
17187 cat "conftest.$ac_ext" >&5
17188 cf_cv_func_mkstemp=no
17191 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17195 echo "$as_me:17195: result: $cf_cv_func_mkstemp" >&5
17196 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17197 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17198 echo "$as_me:17198: checking for mkstemp" >&5
17199 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17200 if test "${ac_cv_func_mkstemp+set}" = set; then
17201 echo $ECHO_N "(cached) $ECHO_C" >&6
17203 cat >"conftest.$ac_ext" <<_ACEOF
17204 #line 17204 "configure"
17205 #include "confdefs.h"
17206 #define mkstemp autoconf_temporary
17207 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17214 /* We use char because int might match the return type of a gcc2
17215 builtin and then its argument prototype would still apply. */
17216 char mkstemp (void);
17222 /* The GNU C library defines stubs for functions which it implements
17223 to always fail with ENOSYS. Some functions are actually named
17224 something starting with __ and the normal name is an alias. */
17225 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17226 #error found stub for mkstemp
17234 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17235 if { (eval echo "$as_me:17235: \"$ac_link\"") >&5
17236 (eval $ac_link) 2>&5
17238 echo "$as_me:17238: \$? = $ac_status" >&5
17239 (exit "$ac_status"); } &&
17240 { ac_try='test -s "conftest$ac_exeext"'
17241 { (eval echo "$as_me:17241: \"$ac_try\"") >&5
17242 (eval $ac_try) 2>&5
17244 echo "$as_me:17244: \$? = $ac_status" >&5
17245 (exit "$ac_status"); }; }; then
17246 ac_cv_func_mkstemp=yes
17248 echo "$as_me: failed program was:" >&5
17249 cat "conftest.$ac_ext" >&5
17250 ac_cv_func_mkstemp=no
17252 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17254 echo "$as_me:17254: result: $ac_cv_func_mkstemp" >&5
17255 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17258 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17260 cat >>confdefs.h <<\EOF
17261 #define HAVE_MKSTEMP 1
17266 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17267 CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17268 CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17272 if test "$cf_with_ada" != "no" ; then
17274 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
17277 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17279 unset ac_cv_path_cf_TEMP_gnat
17281 # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
17282 set dummy $cf_prog_gnat; ac_word=$2
17283 echo "$as_me:17283: checking for $ac_word" >&5
17284 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17285 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
17286 echo $ECHO_N "(cached) $ECHO_C" >&6
17288 case $cf_TEMP_gnat in
17290 ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
17293 ac_save_IFS=$IFS; IFS=$ac_path_separator
17295 for ac_dir in $ac_dummy; do
17297 test -z "$ac_dir" && ac_dir=.
17298 if $as_executable_p "$ac_dir/$ac_word"; then
17299 ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
17300 echo "$as_me:17300: found $ac_dir/$ac_word" >&5
17305 test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
17309 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
17311 if test -n "$cf_TEMP_gnat"; then
17312 echo "$as_me:17312: result: $cf_TEMP_gnat" >&5
17313 echo "${ECHO_T}$cf_TEMP_gnat" >&6
17315 echo "$as_me:17315: result: no" >&5
17316 echo "${ECHO_T}no" >&6
17319 eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
17321 if test "x$cf_TEMP_gnat" != xno; then
17322 unset cf_cv_gnat_version
17325 echo "$as_me:17325: checking for $cf_prog_gnat version" >&5
17326 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
17327 if test "${cf_cv_gnat_version+set}" = set; then
17328 echo $ECHO_N "(cached) $ECHO_C" >&6
17331 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
17332 grep '[0-9].[0-9][0-9]*' |\
17333 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17336 echo "$as_me:17336: result: $cf_cv_gnat_version" >&5
17337 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17338 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17339 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
17342 eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
17345 unset cf_cv_gnat_version
17346 unset ac_cv_path_cf_TEMP_gnat
17349 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
17351 cf_cv_prog_gnat_correct=no
17353 cf_ada_make=gnatmake
17354 if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
17355 # gprconfig is newer than gnatmake; we can continue...
17358 rm -rf ./conftest* ./*~conftest*
17359 if mkdir conftest.src
17363 for cf_gprconfig in Ada C
17365 echo "$as_me:17365: checking for gprconfig name for $cf_gprconfig" >&5
17366 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
17367 if test "$cf_gprconfig" = C
17369 for cf_gprconfig_param in \
17370 "$cf_gprconfig,,,,GNATGCC" \
17371 "$cf_gprconfig,,,,GCC" \
17374 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17375 test -n "$cf_gprconfig_value" && break
17378 cf_gprconfig_param=$cf_gprconfig
17379 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17381 if test -n "$cf_gprconfig_value"
17383 eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
17384 echo "$as_me:17384: result: $cf_gprconfig_value" >&5
17385 echo "${ECHO_T}$cf_gprconfig_value" >&6
17387 echo "$as_me:17387: result: missing" >&5
17388 echo "${ECHO_T}missing" >&6
17394 rm -rf ./conftest* ./*~conftest*
17397 if test "x$cf_ada_config" != "x#"
17400 echo "$as_me:17400: checking for gnat version" >&5
17401 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17402 if test "${cf_cv_gnat_version+set}" = set; then
17403 echo $ECHO_N "(cached) $ECHO_C" >&6
17406 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
17407 grep '[0-9].[0-9][0-9]*' |\
17408 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17411 echo "$as_me:17411: result: $cf_cv_gnat_version" >&5
17412 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17413 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17415 case "$cf_cv_gnat_version" in
17416 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17417 cf_cv_prog_gnat_correct=yes
17420 { echo "$as_me:17420: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
17421 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
17422 cf_cv_prog_gnat_correct=no
17426 # Extract the first word of "m4", so it can be a program name with args.
17427 set dummy m4; ac_word=$2
17428 echo "$as_me:17428: checking for $ac_word" >&5
17429 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17430 if test "${ac_cv_prog_M4_exists+set}" = set; then
17431 echo $ECHO_N "(cached) $ECHO_C" >&6
17433 if test -n "$M4_exists"; then
17434 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17436 ac_save_IFS=$IFS; IFS=$ac_path_separator
17438 for ac_dir in $ac_dummy; do
17440 test -z "$ac_dir" && ac_dir=.
17441 $as_executable_p "$ac_dir/$ac_word" || continue
17442 ac_cv_prog_M4_exists="yes"
17443 echo "$as_me:17443: found $ac_dir/$ac_word" >&5
17447 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17450 M4_exists=$ac_cv_prog_M4_exists
17451 if test -n "$M4_exists"; then
17452 echo "$as_me:17452: result: $M4_exists" >&5
17453 echo "${ECHO_T}$M4_exists" >&6
17455 echo "$as_me:17455: result: no" >&5
17456 echo "${ECHO_T}no" >&6
17459 if test "$ac_cv_prog_M4_exists" = no; then
17460 cf_cv_prog_gnat_correct=no
17461 { echo "$as_me:17461: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
17462 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
17464 if test "$cf_cv_prog_gnat_correct" = yes; then
17465 echo "$as_me:17465: checking if GNAT works" >&5
17466 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17468 rm -rf ./conftest* ./*~conftest*
17469 cat >>conftest.ads <<CF_EOF
17470 procedure conftest;
17472 cat >>conftest.adb <<CF_EOF
17475 procedure conftest is
17477 Text_IO.Put ("Hello World");
17479 GNAT.OS_Lib.OS_Exit (0);
17482 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17483 if ( ./conftest 1>&5 2>&1 ) ; then
17484 cf_cv_prog_gnat_correct=yes
17486 cf_cv_prog_gnat_correct=no
17489 cf_cv_prog_gnat_correct=no
17491 rm -rf ./conftest* ./*~conftest*
17493 echo "$as_me:17493: result: $cf_cv_prog_gnat_correct" >&5
17494 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17497 cf_cv_prog_gnat_correct=no
17501 if test "$cf_cv_prog_gnat_correct" = yes; then
17503 echo "$as_me:17503: checking optimization options for ADAFLAGS" >&5
17504 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
17508 ADAFLAGS="$ADAFLAGS -g"
17514 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
17516 ADAFLAGS="$ADAFLAGS $cf_O_flag"
17520 echo "$as_me:17520: result: $ADAFLAGS" >&5
17521 echo "${ECHO_T}$ADAFLAGS" >&6
17523 echo "$as_me:17523: checking if GNATPREP supports -T option" >&5
17524 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
17525 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
17526 echo $ECHO_N "(cached) $ECHO_C" >&6
17529 cf_cv_gnatprep_opt_t=no
17530 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
17533 echo "$as_me:17533: result: $cf_cv_gnatprep_opt_t" >&5
17534 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
17535 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
17537 echo "$as_me:17537: checking if GNAT supports generics" >&5
17538 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
17539 case "$cf_cv_gnat_version" in
17540 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17541 cf_gnat_generics=yes
17544 cf_gnat_generics=no
17547 echo "$as_me:17547: result: $cf_gnat_generics" >&5
17548 echo "${ECHO_T}$cf_gnat_generics" >&6
17550 if test "$cf_gnat_generics" = yes
17552 cf_compile_generics=generics
17553 cf_generic_objects="\${GENOBJS}"
17555 cf_compile_generics=
17556 cf_generic_objects=
17559 echo "$as_me:17559: checking if GNAT supports SIGINT" >&5
17560 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
17561 if test "${cf_cv_gnat_sigint+set}" = set; then
17562 echo $ECHO_N "(cached) $ECHO_C" >&6
17565 rm -rf ./conftest* ./*~conftest*
17566 cat >>conftest.ads <<CF_EOF
17567 with Ada.Interrupts.Names;
17569 package ConfTest is
17571 pragma Warnings (Off); -- the next pragma exists since 3.11p
17572 pragma Unreserve_All_Interrupts;
17573 pragma Warnings (On);
17575 protected Process is
17577 function Continue return Boolean;
17578 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
17580 Done : Boolean := False;
17585 cat >>conftest.adb <<CF_EOF
17586 package body ConfTest is
17587 protected body Process is
17592 function Continue return Boolean is
17599 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17600 cf_cv_gnat_sigint=yes
17602 cf_cv_gnat_sigint=no
17604 rm -rf ./conftest* ./*~conftest*
17607 echo "$as_me:17607: result: $cf_cv_gnat_sigint" >&5
17608 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
17610 if test "$cf_cv_gnat_sigint" = yes ; then
17613 USE_GNAT_SIGINT="#"
17616 cf_gnat_libraries=no
17617 cf_gnat_projects=no
17619 if test "$enable_gnat_projects" != no ; then
17620 echo "$as_me:17620: checking if GNAT supports project files" >&5
17621 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
17622 case "$cf_cv_gnat_version" in
17626 case "$cf_cv_system_name" in
17630 rm -rf ./conftest* ./*~conftest*
17631 if mkdir conftest.src conftest.bin conftest.lib
17634 rm -rf ./conftest* ./*~conftest*
17635 cat >>library.gpr <<CF_EOF
17637 Kind := External ("LIB_KIND");
17638 for Library_Name use "ConfTest";
17639 for Object_Dir use ".";
17640 for Library_ALI_Dir use External("LIBRARY_DIR");
17641 for Library_Version use External ("SONAME");
17642 for Library_Kind use Kind;
17643 for Library_Dir use External("BUILD_DIR");
17644 Source_Dir := External ("SOURCE_DIR");
17645 for Source_Dirs use (Source_Dir);
17648 cat >>confpackage.ads <<CF_EOF
17649 package ConfPackage is
17650 procedure conftest;
17653 cat >>confpackage.adb <<CF_EOF
17655 package body ConfPackage is
17656 procedure conftest is
17658 Text_IO.Put ("Hello World");
17663 if ( "$cf_ada_make" $ADAFLAGS \
17665 -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
17666 -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
17667 -XSOURCE_DIR="`pwd`" \
17668 -XSONAME=libConfTest.so.1 \
17669 -XLIB_KIND=static 1>&5 2>&1 ) ; then
17670 cf_gnat_projects=yes
17674 if test -f conftest.lib/confpackage.ali
17676 cf_gnat_libraries=yes
17678 rm -rf ./conftest* ./*~conftest*
17683 echo "$as_me:17683: result: $cf_gnat_projects" >&5
17684 echo "${ECHO_T}$cf_gnat_projects" >&6
17685 fi # enable_gnat_projects
17687 if test "$cf_gnat_projects" = yes
17689 echo "$as_me:17689: checking if GNAT supports libraries" >&5
17690 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
17691 echo "$as_me:17691: result: $cf_gnat_libraries" >&5
17692 echo "${ECHO_T}$cf_gnat_libraries" >&6
17695 USE_OLD_MAKERULES=""
17696 USE_GNAT_PROJECTS="#"
17697 USE_GNAT_MAKE_GPR="#"
17698 USE_GNAT_GPRBUILD="#"
17700 if test "$cf_gnat_projects" = yes
17702 USE_OLD_MAKERULES="#"
17703 USE_GNAT_PROJECTS=""
17704 if test "$cf_cv_VERSION_GPRBUILD" != no
17706 USE_GNAT_GPRBUILD=""
17707 elif test "$cf_cv_VERSION_GNATMAKE" != no
17709 USE_GNAT_MAKE_GPR=""
17711 { echo "$as_me:17711: WARNING: use old makefile rules since tools are missing" >&5
17712 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
17716 if test "$cf_gnat_libraries" = yes
17718 USE_GNAT_LIBRARIES=""
17720 USE_GNAT_LIBRARIES="#"
17723 echo "$as_me:17723: checking for ada-compiler" >&5
17724 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
17726 # Check whether --with-ada-compiler or --without-ada-compiler was given.
17727 if test "${with_ada_compiler+set}" = set; then
17728 withval="$with_ada_compiler"
17729 cf_ada_compiler=$withval
17731 cf_ada_compiler=gnatmake
17734 echo "$as_me:17734: result: $cf_ada_compiler" >&5
17735 echo "${ECHO_T}$cf_ada_compiler" >&6
17737 cf_ada_package=terminal_interface
17739 echo "$as_me:17739: checking for ada-include" >&5
17740 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
17742 # Check whether --with-ada-include or --without-ada-include was given.
17743 if test "${with_ada_include+set}" = set; then
17744 withval="$with_ada_include"
17747 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
17748 fi; if test -n "$prefix/share/ada/adainclude" ; then
17750 if test "x$prefix" != xNONE; then
17751 cf_path_syntax="$prefix"
17753 cf_path_syntax="$ac_default_prefix"
17756 case ".$withval" in
17757 (.\$\(*\)*|.\'*\'*)
17761 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17763 (.\$\{*prefix\}*|.\$\{*dir\}*)
17764 eval withval="$withval"
17765 case ".$withval" in
17767 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17772 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17775 { { echo "$as_me:17775: error: expected a pathname, not \"$withval\"" >&5
17776 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17777 { (exit 1); exit 1; }; }
17782 eval ADA_INCLUDE="$withval"
17784 echo "$as_me:17784: result: $ADA_INCLUDE" >&5
17785 echo "${ECHO_T}$ADA_INCLUDE" >&6
17787 echo "$as_me:17787: checking for ada-objects" >&5
17788 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
17790 # Check whether --with-ada-objects or --without-ada-objects was given.
17791 if test "${with_ada_objects+set}" = set; then
17792 withval="$with_ada_objects"
17795 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
17796 fi; if test -n "$prefix/lib/ada/adalib" ; then
17798 if test "x$prefix" != xNONE; then
17799 cf_path_syntax="$prefix"
17801 cf_path_syntax="$ac_default_prefix"
17804 case ".$withval" in
17805 (.\$\(*\)*|.\'*\'*)
17809 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17811 (.\$\{*prefix\}*|.\$\{*dir\}*)
17812 eval withval="$withval"
17813 case ".$withval" in
17815 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17820 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17823 { { echo "$as_me:17823: error: expected a pathname, not \"$withval\"" >&5
17824 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17825 { (exit 1); exit 1; }; }
17830 eval ADA_OBJECTS="$withval"
17832 echo "$as_me:17832: result: $ADA_OBJECTS" >&5
17833 echo "${ECHO_T}$ADA_OBJECTS" >&6
17835 echo "$as_me:17835: checking if an Ada95 shared-library should be built" >&5
17836 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
17838 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
17839 if test "${with_ada_sharedlib+set}" = set; then
17840 withval="$with_ada_sharedlib"
17841 with_ada_sharedlib=$withval
17843 with_ada_sharedlib=no
17845 echo "$as_me:17845: result: $with_ada_sharedlib" >&5
17846 echo "${ECHO_T}$with_ada_sharedlib" >&6
17848 if test "x$with_ada_sharedlib" != xno
17850 if test "x$cf_gnat_projects" != xyes
17852 { echo "$as_me:17852: WARNING: disabling shared-library since GNAT projects are not supported" >&5
17853 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
17854 with_ada_sharedlib=no
17858 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
17859 MAKE_ADA_SHAREDLIB="#"
17861 if test "x$with_ada_sharedlib" != xno
17863 MAKE_ADA_SHAREDLIB=
17864 if test "x$with_ada_sharedlib" != xyes
17866 ADA_SHAREDLIB="$with_ada_sharedlib"
17870 # allow the Ada binding to be renamed
17872 echo "$as_me:17872: checking for ada-libname" >&5
17873 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
17875 # Check whether --with-ada-libname or --without-ada-libname was given.
17876 if test "${with_ada_libname+set}" = set; then
17877 withval="$with_ada_libname"
17878 ADA_LIBNAME=$withval
17880 ADA_LIBNAME=AdaCurses
17882 case "x$ADA_LIBNAME" in
17884 ADA_LIBNAME=AdaCurses
17888 echo "$as_me:17888: result: $ADA_LIBNAME" >&5
17889 echo "${ECHO_T}$ADA_LIBNAME" >&6
17892 { { echo "$as_me:17892: error: No usable Ada compiler found" >&5
17893 echo "$as_me: error: No usable Ada compiler found" >&2;}
17894 { (exit 1); exit 1; }; }
17897 { { echo "$as_me:17897: error: The Ada compiler is needed for this package" >&5
17898 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
17899 { (exit 1); exit 1; }; }
17902 ################################################################################
17909 ### Construct the list of include-directories to be generated
17911 if test "$srcdir" != "."; then
17912 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
17914 CPPFLAGS="-I../include $CPPFLAGS"
17915 if test "$srcdir" != "."; then
17916 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
17918 CPPFLAGS="-I. $CPPFLAGS"
17920 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
17921 if test "$srcdir" != "."; then
17922 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
17924 if test "$GCC" != yes; then
17925 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17926 elif test "$includedir" != "/usr/include"; then
17927 if test "$includedir" = '${prefix}/include' ; then
17928 if test x$prefix != x/usr ; then
17929 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17932 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17936 ### Build up pieces for makefile rules
17937 echo "$as_me:17937: checking default library suffix" >&5
17938 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
17940 case $DFT_LWR_MODEL in
17941 (libtool) DFT_ARG_SUFFIX='' ;;
17942 (normal) DFT_ARG_SUFFIX='' ;;
17943 (debug) DFT_ARG_SUFFIX='_g' ;;
17944 (profile) DFT_ARG_SUFFIX='_p' ;;
17945 (shared) DFT_ARG_SUFFIX='' ;;
17947 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
17948 echo "$as_me:17948: result: $DFT_ARG_SUFFIX" >&5
17949 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
17951 echo "$as_me:17951: checking default library-dependency suffix" >&5
17952 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
17954 case X$DFT_LWR_MODEL in
17956 DFT_LIB_SUFFIX='.la'
17957 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17960 case "$cf_cv_system_name" in
17962 DFT_LIB_SUFFIX='_g.lib'
17965 DFT_LIB_SUFFIX='_g.a'
17968 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17971 case "$cf_cv_system_name" in
17973 DFT_LIB_SUFFIX='_p.lib'
17976 DFT_LIB_SUFFIX='_p.a'
17979 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17982 case "$cf_cv_system_name" in
17984 DFT_LIB_SUFFIX='.so'
17985 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17988 DFT_LIB_SUFFIX='.dll'
17989 DFT_DEP_SUFFIX='.dll.lib'
17991 (cygwin*|msys*|mingw*)
17992 DFT_LIB_SUFFIX='.dll'
17993 DFT_DEP_SUFFIX='.dll.a'
17996 DFT_LIB_SUFFIX='.dylib'
17997 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18002 DFT_LIB_SUFFIX='.so'
18003 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18006 DFT_LIB_SUFFIX='.sl'
18007 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18012 DFT_LIB_SUFFIX='.so'
18013 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18020 DFT_LIB_SUFFIX='.lib'
18023 DFT_LIB_SUFFIX='.a'
18026 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18029 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
18031 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
18032 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
18034 echo "$as_me:18034: result: $DFT_DEP_SUFFIX" >&5
18035 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18037 echo "$as_me:18037: checking default object directory" >&5
18038 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18040 case $DFT_LWR_MODEL in
18041 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
18042 (normal) DFT_OBJ_SUBDIR='objects' ;;
18043 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
18044 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
18046 case "$cf_cv_system_name" in
18048 DFT_OBJ_SUBDIR='objects' ;;
18050 DFT_OBJ_SUBDIR='obj_s' ;;
18053 echo "$as_me:18053: result: $DFT_OBJ_SUBDIR" >&5
18054 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18056 ### Set up low-level terminfo dependencies for makefiles.
18058 if test "$DFT_LWR_MODEL" = shared ; then
18059 case $cf_cv_system_name in
18061 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18064 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
18069 USE_ARG_SUFFIX=${DFT_ARG_SUFFIX}
18071 USE_LIB_SUFFIX=${DFT_ARG_SUFFIX}
18073 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
18075 ### Construct the list of subdirectories for which we'll customize makefiles
18076 ### with the appropriate compile-rules.
18078 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
18080 cat >>confdefs.h <<EOF
18081 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18084 ################################################################################
18090 NCURSES_SHLIB2="sh -c"
18092 ADA_SUBDIRS="include gen src doc"
18093 if test "x$cf_with_tests" != "xno" ; then
18094 ADA_SUBDIRS="$ADA_SUBDIRS samples"
18096 for cf_dir in $ADA_SUBDIRS
18098 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18105 # match layout used by make-tar.sh
18106 ADAHTML_DIR=../doc/ada
18108 if test "x$cross_compiling" = xyes ; then
18109 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
18111 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
18114 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"
18115 ac_config_commands="$ac_config_commands default"
18116 cat >confcache <<\_ACEOF
18117 # This file is a shell script that caches the results of configure
18118 # tests run on this system so they can be shared between configure
18119 # scripts and configure runs, see configure's option --config-cache.
18120 # It is not useful on other systems. If it contains results you don't
18121 # want to keep, you may remove or edit it.
18123 # config.status only pays attention to the cache file if you give it
18124 # the --recheck option to rerun configure.
18126 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18127 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18128 # following values.
18132 # The following way of writing the cache mishandles newlines in values,
18133 # but we know of no workaround that is simple, portable, and efficient.
18134 # So, don't put newlines in cache variables' values.
18135 # Ultrix sh set writes to stderr and can't be redirected directly,
18136 # and sets the high bit in the cache file unless we assign to the vars.
18139 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18141 # `set' does not quote correctly, so add quotes (double-quote
18142 # substitution turns \\\\ into \\, and sed turns \\ into \).
18145 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18148 # `set' quotes correctly as required by POSIX, so do not add quotes.
18150 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18157 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18159 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18161 if cmp -s $cache_file confcache; then :; else
18162 if test -w $cache_file; then
18163 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18164 cat confcache >$cache_file
18166 echo "not updating unwritable cache $cache_file"
18171 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18172 # Let make expand exec_prefix.
18173 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18175 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18176 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18177 # trailing colons and then remove the whole line if VPATH becomes empty
18178 # (actually we leave an empty line to preserve line numbers).
18179 if test "x$srcdir" = x.; then
18180 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18181 s/:*\$(srcdir):*/:/;
18182 s/:*\${srcdir}:*/:/;
18184 s/^\([^=]*=[ ]*\):*/\1/;
18190 DEFS=-DHAVE_CONFIG_H
18192 : "${CONFIG_STATUS=./config.status}"
18193 ac_clean_files_save=$ac_clean_files
18194 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18195 { echo "$as_me:18195: creating $CONFIG_STATUS" >&5
18196 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18197 cat >"$CONFIG_STATUS" <<_ACEOF
18199 # Generated automatically by configure.
18200 # Run this file to recreate the current configuration.
18201 # Compiler output produced by configure, useful for debugging
18202 # configure, is in config.log if it exists.
18205 SHELL=\${CONFIG_SHELL-$SHELL}
18206 ac_cs_invocation="\$0 \$@"
18208 CLICOLOR_FORCE= GREP_OPTIONS=
18209 unset CLICOLOR_FORCE GREP_OPTIONS
18212 cat >>"$CONFIG_STATUS" <<\_ACEOF
18213 # Be Bourne compatible
18214 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18217 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18221 # Name of the executable.
18222 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18224 if expr a : '\(a\)' >/dev/null 2>&1; then
18230 rm -f conf$$ conf$$.exe conf$$.file
18232 if ln -s conf$$.file conf$$ 2>/dev/null; then
18233 # We could just check for DJGPP; but this test a) works b) is more generic
18234 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18235 if test -f conf$$.exe; then
18236 # Don't use ln at all; we don't have any links
18241 elif ln conf$$.file conf$$ 2>/dev/null; then
18246 rm -f conf$$ conf$$.exe conf$$.file
18248 as_executable_p="test -f"
18250 # Support unset when possible.
18251 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18258 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18259 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18260 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18261 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18262 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18263 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18264 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18265 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18268 # We need space, tab and new line, in precisely that order.
18274 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18280 # Files that config.status was made for.
18281 if test -n "$ac_config_files"; then
18282 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
18285 if test -n "$ac_config_headers"; then
18286 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
18289 if test -n "$ac_config_links"; then
18290 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
18293 if test -n "$ac_config_commands"; then
18294 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
18297 cat >>"$CONFIG_STATUS" <<\EOF
18300 \`$as_me' instantiates files from templates according to the
18301 current configuration.
18303 Usage: $0 [OPTIONS] [FILE]...
18305 -h, --help print this help, then exit
18306 -V, --version print version number, then exit
18307 -d, --debug don't remove temporary files
18308 --recheck update $as_me by reconfiguring in the same conditions
18309 --file=FILE[:TEMPLATE]
18310 instantiate the configuration file FILE
18311 --header=FILE[:TEMPLATE]
18312 instantiate the configuration header FILE
18314 Configuration files:
18317 Configuration headers:
18320 Configuration commands:
18323 Report bugs to <dickey@invisible-island.net>."
18326 cat >>"$CONFIG_STATUS" <<EOF
18329 configured by $0, generated by GNU Autoconf 2.52.20210509,
18330 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18332 Copyright 2003-2020,2021 Thomas E. Dickey
18333 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18334 Free Software Foundation, Inc.
18335 This config.status script is free software; the Free Software Foundation
18336 gives unlimited permission to copy, distribute and modify it."
18341 cat >>"$CONFIG_STATUS" <<\EOF
18342 # If no file are specified by the user, then we need to provide default
18343 # value. By we need to know if files were specified by the user.
18349 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18350 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18352 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18356 *) # This is not an option, so the user has probably given explicit
18358 ac_need_defaults=false;;
18362 # Handling of the options.
18364 cat >>"$CONFIG_STATUS" <<EOF
18365 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18366 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18367 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18369 cat >>"$CONFIG_STATUS" <<\EOF
18370 --version | --vers* | -V )
18371 echo "$ac_cs_version"; exit 0 ;;
18373 # Conflict between --help and --header
18374 { { echo "$as_me:18374: error: ambiguous option: $1
18375 Try \`$0 --help' for more information." >&5
18376 echo "$as_me: error: ambiguous option: $1
18377 Try \`$0 --help' for more information." >&2;}
18378 { (exit 1); exit 1; }; };;
18379 --help | --hel | -h )
18380 echo "$ac_cs_usage"; exit 0 ;;
18381 --debug | --d* | -d )
18383 --file | --fil | --fi | --f )
18385 CONFIG_FILES="$CONFIG_FILES $1"
18386 ac_need_defaults=false;;
18387 --header | --heade | --head | --hea )
18389 CONFIG_HEADERS="$CONFIG_HEADERS $1"
18390 ac_need_defaults=false;;
18392 # This is an error.
18393 -*) { { echo "$as_me:18393: error: unrecognized option: $1
18394 Try \`$0 --help' for more information." >&5
18395 echo "$as_me: error: unrecognized option: $1
18396 Try \`$0 --help' for more information." >&2;}
18397 { (exit 1); exit 1; }; } ;;
18399 *) ac_config_targets="$ac_config_targets $1" ;;
18408 ## ----------------------- ##
18409 ## Running config.status. ##
18410 ## ----------------------- ##
18412 This file was extended by $as_me 2.52.20210509, executed with
18413 CONFIG_FILES = $CONFIG_FILES
18414 CONFIG_HEADERS = $CONFIG_HEADERS
18415 CONFIG_LINKS = $CONFIG_LINKS
18416 CONFIG_COMMANDS = $CONFIG_COMMANDS
18417 > "$ac_cs_invocation"
18418 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18423 cat >>"$CONFIG_STATUS" <<EOF
18425 # INIT-COMMANDS section.
18428 ### Special initialization commands, used to pass information from the
18429 ### configuration-run into config.status
18432 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
18433 DFT_LWR_MODEL="$DFT_LWR_MODEL"
18434 LIB_NAME="$LIB_NAME"
18435 LIB_PREFIX="$LIB_PREFIX"
18436 LIB_SUFFIX="$LIB_SUFFIX"
18438 NCURSES_MAJOR="$NCURSES_MAJOR"
18439 NCURSES_MINOR="$NCURSES_MINOR"
18440 NCURSES_PATCH="$NCURSES_PATCH"
18441 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
18442 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
18443 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
18444 cf_cv_abi_version="$cf_cv_abi_version"
18445 cf_cv_rel_version="$cf_cv_rel_version"
18446 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
18447 cf_cv_shared_soname='$cf_cv_shared_soname'
18448 cf_cv_shlib_version="$cf_cv_shlib_version"
18449 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
18450 cf_cv_system_name="$cf_cv_system_name"
18456 cat >>"$CONFIG_STATUS" <<\EOF
18457 for ac_config_target in $ac_config_targets
18459 case "$ac_config_target" in
18460 # Handling of arguments.
18461 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
18462 "src/library.gpr" ) CONFIG_FILES="$CONFIG_FILES src/library.gpr:src/library.gpr.in" ;;
18463 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
18464 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18465 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18466 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
18467 *) { { echo "$as_me:18467: error: invalid argument: $ac_config_target" >&5
18468 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18469 { (exit 1); exit 1; }; };;
18473 # If the user did not use the arguments to specify the items to instantiate,
18474 # then the envvar interface is used. Set only those that are not.
18475 # We use the long form for the default assignment because of an extremely
18476 # bizarre bug on SunOS 4.1.3.
18477 if "$ac_need_defaults"; then
18478 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18479 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18480 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18483 # Create a temporary directory, and hook for its removal unless debugging.
18486 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18487 trap '{ (exit 1); exit 1; }' 1 2 13 15
18490 # Create a (secure) tmp directory for tmp files.
18493 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18494 test -n "$tmp" && test -d "$tmp"
18497 tmp=$TMPDIR/cs$$-$RANDOM
18498 (umask 077 && mkdir $tmp)
18501 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18502 { (exit 1); exit 1; }
18507 cat >>"$CONFIG_STATUS" <<EOF
18510 # CONFIG_FILES section.
18513 # No need to generate the scripts if there are no CONFIG_FILES.
18514 # This happens for instance when ./config.status config.h
18515 if test -n "\$CONFIG_FILES"; then
18516 # Protect against being on the right side of a sed subst in config.status.
18517 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18518 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18519 s,@SHELL@,$SHELL,;t t
18520 s,@exec_prefix@,$exec_prefix,;t t
18521 s,@prefix@,$prefix,;t t
18522 s,@program_transform_name@,$program_transform_name,;t t
18523 s,@bindir@,$bindir,;t t
18524 s,@sbindir@,$sbindir,;t t
18525 s,@libexecdir@,$libexecdir,;t t
18526 s,@datarootdir@,$datarootdir,;t t
18527 s,@datadir@,$datadir,;t t
18528 s,@sysconfdir@,$sysconfdir,;t t
18529 s,@sharedstatedir@,$sharedstatedir,;t t
18530 s,@localstatedir@,$localstatedir,;t t
18531 s,@runstatedir@,$runstatedir,;t t
18532 s,@libdir@,$libdir,;t t
18533 s,@includedir@,$includedir,;t t
18534 s,@oldincludedir@,$oldincludedir,;t t
18535 s,@infodir@,$infodir,;t t
18536 s,@mandir@,$mandir,;t t
18537 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18538 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18539 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18540 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18541 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18542 s,@build_alias@,$build_alias,;t t
18543 s,@host_alias@,$host_alias,;t t
18544 s,@target_alias@,$target_alias,;t t
18545 s,@ECHO_C@,$ECHO_C,;t t
18546 s,@ECHO_N@,$ECHO_N,;t t
18547 s,@ECHO_T@,$ECHO_T,;t t
18548 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18549 s,@DEFS@,$DEFS,;t t
18550 s,@LIBS@,$LIBS,;t t
18551 s,@top_builddir@,$top_builddir,;t t
18552 s,@build@,$build,;t t
18553 s,@build_cpu@,$build_cpu,;t t
18554 s,@build_vendor@,$build_vendor,;t t
18555 s,@build_os@,$build_os,;t t
18556 s,@host@,$host,;t t
18557 s,@host_cpu@,$host_cpu,;t t
18558 s,@host_vendor@,$host_vendor,;t t
18559 s,@host_os@,$host_os,;t t
18560 s,@target@,$target,;t t
18561 s,@target_cpu@,$target_cpu,;t t
18562 s,@target_vendor@,$target_vendor,;t t
18563 s,@target_os@,$target_os,;t t
18564 s,@GREP@,$GREP,;t t
18565 s,@FGREP@,$FGREP,;t t
18567 s,@CFLAGS@,$CFLAGS,;t t
18568 s,@LDFLAGS@,$LDFLAGS,;t t
18569 s,@CPPFLAGS@,$CPPFLAGS,;t t
18570 s,@ac_ct_CC@,$ac_ct_CC,;t t
18571 s,@EXEEXT@,$EXEEXT,;t t
18572 s,@OBJEXT@,$OBJEXT,;t t
18573 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18575 s,@EGREP@,$EGREP,;t t
18577 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18578 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18579 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18580 s,@LN_S@,$LN_S,;t t
18581 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
18582 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
18583 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18584 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
18585 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
18586 s,@SET_MAKE@,$SET_MAKE,;t t
18587 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
18588 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
18589 s,@CTAGS@,$CTAGS,;t t
18590 s,@ETAGS@,$ETAGS,;t t
18591 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18592 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18593 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
18594 s,@RANLIB@,$RANLIB,;t t
18595 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18597 s,@ac_ct_LD@,$ac_ct_LD,;t t
18599 s,@ac_ct_AR@,$ac_ct_AR,;t t
18600 s,@ARFLAGS@,$ARFLAGS,;t t
18601 s,@DESTDIR@,$DESTDIR,;t t
18602 s,@BUILD_CC@,$BUILD_CC,;t t
18603 s,@BUILD_CPP@,$BUILD_CPP,;t t
18604 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
18605 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
18606 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
18607 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
18608 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
18609 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
18610 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
18611 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
18612 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
18613 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
18614 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
18615 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
18616 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
18617 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18618 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18619 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
18620 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
18621 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
18622 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
18623 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
18624 s,@CC_G_OPT@,$CC_G_OPT,;t t
18625 s,@LD_MODEL@,$LD_MODEL,;t t
18626 s,@shlibdir@,$shlibdir,;t t
18627 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
18628 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
18629 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
18630 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
18631 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
18632 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
18633 s,@LINK_PROGS@,$LINK_PROGS,;t t
18634 s,@LINK_TESTS@,$LINK_TESTS,;t t
18635 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
18636 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
18637 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
18638 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
18639 s,@RPATH_LIST@,$RPATH_LIST,;t t
18640 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
18641 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
18642 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
18643 s,@PTHREAD@,$PTHREAD,;t t
18644 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
18645 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18646 s,@ECHO_LT@,$ECHO_LT,;t t
18647 s,@ECHO_LD@,$ECHO_LD,;t t
18648 s,@RULE_CC@,$RULE_CC,;t t
18649 s,@SHOW_CC@,$SHOW_CC,;t t
18650 s,@ECHO_CC@,$ECHO_CC,;t t
18651 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18652 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
18653 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
18654 s,@ADAFLAGS@,$ADAFLAGS,;t t
18655 s,@ADA_TRACE@,$ADA_TRACE,;t t
18656 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
18657 s,@M4_exists@,$M4_exists,;t t
18658 s,@cf_ada_make@,$cf_ada_make,;t t
18659 s,@cf_ada_config@,$cf_ada_config,;t t
18660 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
18661 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
18662 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
18663 s,@cf_compile_generics@,$cf_compile_generics,;t t
18664 s,@cf_generic_objects@,$cf_generic_objects,;t t
18665 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
18666 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
18667 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
18668 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
18669 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
18670 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
18671 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
18672 s,@cf_ada_package@,$cf_ada_package,;t t
18673 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
18674 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
18675 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
18676 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
18677 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
18678 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
18679 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
18680 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
18681 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
18682 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18683 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18684 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
18685 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
18686 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
18687 s,@TEST_ARG2@,$TEST_ARG2,;t t
18688 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
18689 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
18690 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
18691 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
18692 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
18693 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
18694 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
18699 cat >>"$CONFIG_STATUS" <<\EOF
18700 # Split the substitutions into bite-sized pieces for seds with
18701 # small command number limits, like on Digital OSF/1 and HP-UX.
18702 ac_max_sed_lines=48
18703 ac_sed_frag=1 # Number of current file.
18704 ac_beg=1 # First line for current file.
18705 ac_end=$ac_max_sed_lines # Line after last line for current file.
18708 while "$ac_more_lines"; do
18709 if test "$ac_beg" -gt 1; then
18710 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18712 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18714 if test ! -s $tmp/subs.frag; then
18715 ac_more_lines=false
18717 # The purpose of the label and of the branching condition is to
18718 # speed up the sed processing (if there are no `@' at all, there
18719 # is no need to browse any of the substitutions).
18720 # These are the two extra sed commands mentioned above.
18722 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18723 # It is possible to make a multiline substitution using escaped newlines.
18724 # Ensure that we do not split the substitution between script fragments.
18726 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
18727 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
18728 if test -s $tmp/subs.next; then
18729 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
18730 if test ! -s $tmp/subs.edit; then
18731 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
18732 if test ! -s $tmp/subs.edit; then
18733 if test "$ac_beg" -gt 1; then
18734 ac_end=`expr "$ac_end" - 1`
18741 if test -z "$ac_sed_cmds"; then
18742 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18744 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18746 ac_sed_frag=`expr "$ac_sed_frag" + 1`
18748 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
18751 if test -z "$ac_sed_cmds"; then
18754 fi # test -n "$CONFIG_FILES"
18757 cat >>"$CONFIG_STATUS" <<\EOF
18758 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18759 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18761 - | *:- | *:-:* ) # input from stdin
18763 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18764 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18765 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18766 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18767 * ) ac_file_in=$ac_file.in ;;
18770 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18771 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18772 X"$ac_file" : 'X\(//\)[^/]' \| \
18773 X"$ac_file" : 'X\(//\)$' \| \
18774 X"$ac_file" : 'X\(/\)' \| \
18775 . : '\(.\)' 2>/dev/null ||
18777 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18778 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18779 /^X\(\/\/\)$/{ s//\1/; q; }
18780 /^X\(\/\).*/{ s//\1/; q; }
18782 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18783 { case "$ac_dir" in
18784 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18788 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18789 case $as_mkdir_dir in
18790 # Skip DOS drivespec
18791 ?:) as_incr_dir=$as_mkdir_dir ;;
18793 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18794 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18799 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18800 # A "../" for each directory in $ac_dir_suffix.
18801 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18803 ac_dir_suffix= ac_dots=
18808 if test -z "$ac_dots"; then
18811 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
18813 [\\/]* | ?:[\\/]* )
18814 ac_srcdir="$srcdir$ac_dir_suffix";
18815 ac_top_srcdir="$srcdir" ;;
18816 *) # Relative path.
18817 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
18818 ac_top_srcdir="$ac_dots$srcdir" ;;
18822 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18823 *) ac_INSTALL=$ac_dots$INSTALL ;;
18826 if test x"$ac_file" != x-; then
18827 { echo "$as_me:18827: creating $ac_file" >&5
18828 echo "$as_me: creating $ac_file" >&6;}
18831 # Let's still pretend it is `configure' which instantiates (i.e., don't
18832 # use $as_me), people would be surprised to read:
18833 # /* config.h. Generated automatically by config.status. */
18834 configure_input="Generated automatically from `echo $ac_file_in |
18835 sed 's,.*/,,'` by configure."
18837 # First look for the input files in the build tree, otherwise in the
18839 ac_file_inputs=`IFS=:
18840 for f in $ac_file_in; do
18842 -) echo $tmp/stdin ;;
18844 # Absolute (can't be DOS-style, as IFS=:)
18845 test -f "$f" || { { echo "$as_me:18845: error: cannot find input file: $f" >&5
18846 echo "$as_me: error: cannot find input file: $f" >&2;}
18847 { (exit 1); exit 1; }; }
18850 if test -f "$f"; then
18853 elif test -f "$srcdir/$f"; then
18858 { { echo "$as_me:18858: error: cannot find input file: $f" >&5
18859 echo "$as_me: error: cannot find input file: $f" >&2;}
18860 { (exit 1); exit 1; }; }
18863 done` || { (exit 1); exit 1; }
18865 cat >>"$CONFIG_STATUS" <<\EOF
18866 ac_warn_datarootdir=no
18867 if test x"$ac_file" != x-; then
18868 for ac_item in $ac_file_inputs
18870 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
18871 if test -n "$ac_seen"; then
18872 ac_used=`grep '@datarootdir@' "$ac_item"`
18873 if test -z "$ac_used"; then
18874 { echo "$as_me:18874: WARNING: datarootdir was used implicitly but not set:
18876 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
18878 ac_warn_datarootdir=yes
18881 ac_seen=`grep '${datarootdir}' "$ac_item"`
18882 if test -n "$ac_seen"; then
18883 { echo "$as_me:18883: WARNING: datarootdir was used explicitly but not set:
18885 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
18887 ac_warn_datarootdir=yes
18892 if test "x$ac_warn_datarootdir" = xyes; then
18893 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
18897 cat >>"$CONFIG_STATUS" <<EOF
18901 cat >>"$CONFIG_STATUS" <<\EOF
18903 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18904 s,@configure_input@,$configure_input,;t t
18905 s,@srcdir@,$ac_srcdir,;t t
18906 s,@top_srcdir@,$ac_top_srcdir,;t t
18907 s,@INSTALL@,$ac_INSTALL,;t t
18908 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18910 if test x"$ac_file" != x-; then
18911 cp "$tmp/out" "$ac_file"
18913 for ac_name in prefix exec_prefix datarootdir
18915 ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
18916 if test -n "$ac_seen"; then
18917 ac_init=`${EGREP-egrep} '[ ]*'$ac_name'[ ]*=' "$ac_file"`
18918 if test -z "$ac_init"; then
18919 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
18920 { echo "$as_me:18920: WARNING: Variable $ac_name is used but was not set:
18922 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
18927 ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
18928 ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
18929 if test -s $tmp/out; then
18930 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
18931 { echo "$as_me:18931: WARNING: Some variables may not be substituted:
18933 echo "$as_me: WARNING: Some variables may not be substituted:
18943 cat >>"$CONFIG_STATUS" <<\EOF
18946 # CONFIG_HEADER section.
18949 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18950 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18952 # ac_d sets the value in "#define NAME VALUE" lines.
18953 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18954 ac_dB='[ ].*$,\1#\2'
18957 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18958 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18959 ac_iB='\([ ]\),\1#\2define\3'
18962 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18963 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18964 ac_uB='$,\1#\2define\3'
18968 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18969 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18971 - | *:- | *:-:* ) # input from stdin
18973 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18974 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18975 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18976 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18977 * ) ac_file_in=$ac_file.in ;;
18980 test x"$ac_file" != x- && { echo "$as_me:18980: creating $ac_file" >&5
18981 echo "$as_me: creating $ac_file" >&6;}
18983 # First look for the input files in the build tree, otherwise in the
18985 ac_file_inputs=`IFS=:
18986 for f in $ac_file_in; do
18988 -) echo $tmp/stdin ;;
18990 # Absolute (can't be DOS-style, as IFS=:)
18991 test -f "$f" || { { echo "$as_me:18991: error: cannot find input file: $f" >&5
18992 echo "$as_me: error: cannot find input file: $f" >&2;}
18993 { (exit 1); exit 1; }; }
18996 if test -f "$f"; then
18999 elif test -f "$srcdir/$f"; then
19004 { { echo "$as_me:19004: error: cannot find input file: $f" >&5
19005 echo "$as_me: error: cannot find input file: $f" >&2;}
19006 { (exit 1); exit 1; }; }
19009 done` || { (exit 1); exit 1; }
19010 # Remove the trailing spaces.
19011 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
19015 # Transform confdefs.h into a list of #define's. We won't use it as a sed
19016 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
19017 # be either 'cat' or 'sort'.
19018 cat confdefs.h | uniq >conftest.vals
19020 # Break up conftest.vals because some shells have a limit on
19021 # the size of here documents, and old seds have small limits too.
19023 rm -f conftest.tail
19024 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
19025 while grep . conftest.vals >/dev/null
19027 # Write chunks of a limited-size here document to conftest.frag.
19028 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
19029 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
19030 echo 'CEOF' >> "$CONFIG_STATUS"
19031 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
19032 rm -f conftest.vals
19033 mv conftest.tail conftest.vals
19035 rm -f conftest.vals
19037 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19039 echo ' cat >> conftest.edit <<CEOF
19040 /@DEFS@/r conftest.frag
19043 sed -f conftest.edit $tmp/in > $tmp/out
19045 mv $tmp/out $tmp/in
19046 rm -f conftest.edit conftest.frag
19047 ' >> "$CONFIG_STATUS"
19049 cat >>"$CONFIG_STATUS" <<\EOF
19050 # Let's still pretend it is `configure' which instantiates (i.e., don't
19051 # use $as_me), people would be surprised to read:
19052 # /* config.h. Generated automatically by config.status. */
19053 if test x"$ac_file" = x-; then
19054 echo "/* Generated automatically by configure. */" >$tmp/config.h
19056 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
19058 cat $tmp/in >>$tmp/config.h
19060 if test x"$ac_file" != x-; then
19061 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
19062 { echo "$as_me:19062: $ac_file is unchanged" >&5
19063 echo "$as_me: $ac_file is unchanged" >&6;}
19065 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19066 X"$ac_file" : 'X\(//\)[^/]' \| \
19067 X"$ac_file" : 'X\(//\)$' \| \
19068 X"$ac_file" : 'X\(/\)' \| \
19069 . : '\(.\)' 2>/dev/null ||
19071 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19072 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19073 /^X\(\/\/\)$/{ s//\1/; q; }
19074 /^X\(\/\).*/{ s//\1/; q; }
19076 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19077 { case "$ac_dir" in
19078 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19082 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19083 case $as_mkdir_dir in
19084 # Skip DOS drivespec
19085 ?:) as_incr_dir=$as_mkdir_dir ;;
19087 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19088 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19095 mv "$tmp/config.h" "$ac_file"
19099 rm -f $tmp/config.h
19103 cat >>"$CONFIG_STATUS" <<\EOF
19105 # CONFIG_COMMANDS section.
19107 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19108 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19109 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19113 if test -z "$USE_OLD_MAKERULES" ; then
19114 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
19121 cat >>"$CONFIG_STATUS" <<\EOF
19123 { (exit 0); exit 0; }
19125 chmod +x "$CONFIG_STATUS"
19126 ac_clean_files=$ac_clean_files_save
19128 # configure is writing to config.log, and then calls config.status.
19129 # config.status does its own redirection, appending to config.log.
19130 # Unfortunately, on DOS this fails, as config.log is still kept open
19131 # by configure, so config.status won't be able to write to it; its
19132 # output is simply discarded. So we exec the FD to /dev/null,
19133 # effectively closing config.log, so it can be properly (re)opened and
19134 # appended to by config.status. When coming back to configure, we
19135 # need to make the FD available again.
19136 if test "$no_create" != yes; then
19139 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
19141 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19142 # would make configure fail if this is the last instruction.
19143 "$ac_cs_success" || { (exit 1); exit 1; }
19145 ${MAKE:-make} preinstall