2 # From configure.in Revision: 1.60 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20141204.
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35 if expr a : '\(a\)' >/dev/null 2>&1; then
41 rm -f conf$$ conf$$.exe conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44 # We could just check for DJGPP; but this test a) works b) is more generic
45 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46 if test -f conf$$.exe; then
47 # Don't use ln at all; we don't have any links
52 elif ln conf$$.file conf$$ 2>/dev/null; then
57 rm -f conf$$ conf$$.exe conf$$.file
59 as_executable_p="test -f"
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
79 # We need space, tab and new line, in precisely that order.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
97 ac_default_prefix=/usr/local
101 SHELL=${CONFIG_SHELL-/bin/sh}
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete. It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
108 ac_unique_file="gen/gen.c"
110 # Initialize some variables set by options.
112 ac_init_version=false
113 # The variables have the same names as the options, with
114 # dashes changed to underlines.
122 program_transform_name=s,x,x,
130 # Installation directory options.
131 # These are left unexpanded so users can "make install exec_prefix=/foo"
132 # and all the variables that are supposed to be based on exec_prefix
133 # by default will actually change.
134 # Use braces instead of parens because sh, perl, etc. also accept them.
135 bindir='${exec_prefix}/bin'
136 sbindir='${exec_prefix}/sbin'
137 libexecdir='${exec_prefix}/libexec'
138 datarootdir='${prefix}/share'
139 datadir='${datarootdir}'
140 sysconfdir='${prefix}/etc'
141 sharedstatedir='${prefix}/com'
142 localstatedir='${prefix}/var'
143 libdir='${exec_prefix}/lib'
144 includedir='${prefix}/include'
145 oldincludedir='/usr/include'
146 infodir='${datarootdir}/info'
147 mandir='${datarootdir}/man'
149 # Identity of this package.
159 # If the previous option needs an argument, assign it.
160 if test -n "$ac_prev"; then
161 eval "$ac_prev=\$ac_option"
166 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
168 # Accept the important Cygnus configure options, so we can diagnose typos.
172 -bindir | --bindir | --bindi | --bind | --bin | --bi)
174 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
177 -build | --build | --buil | --bui | --bu)
178 ac_prev=build_alias ;;
179 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
180 build_alias=$ac_optarg ;;
182 -cache-file | --cache-file | --cache-fil | --cache-fi \
183 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
184 ac_prev=cache_file ;;
185 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
186 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
187 cache_file=$ac_optarg ;;
190 cache_file=config.cache ;;
192 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
194 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
196 datadir=$ac_optarg ;;
198 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
199 | --dataroo | --dataro | --datar)
200 ac_prev=datarootdir ;;
201 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
202 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
203 datarootdir=$ac_optarg ;;
205 -disable-* | --disable-*)
206 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
207 # Reject names that are not valid shell variable names.
208 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
209 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
210 { (exit 1); exit 1; }; }
211 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
212 eval "enable_$ac_feature=no" ;;
214 -enable-* | --enable-*)
215 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
216 # Reject names that are not valid shell variable names.
217 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
218 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
219 { (exit 1); exit 1; }; }
220 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
222 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
225 eval "enable_$ac_feature='$ac_optarg'" ;;
227 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
228 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
229 | --exec | --exe | --ex)
230 ac_prev=exec_prefix ;;
231 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
232 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
233 | --exec=* | --exe=* | --ex=*)
234 exec_prefix=$ac_optarg ;;
236 -gas | --gas | --ga | --g)
237 # Obsolete; use --with-gas.
240 -help | --help | --hel | --he | -h)
242 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
243 ac_init_help=recursive ;;
244 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
245 ac_init_help=short ;;
247 -host | --host | --hos | --ho)
248 ac_prev=host_alias ;;
249 -host=* | --host=* | --hos=* | --ho=*)
250 host_alias=$ac_optarg ;;
252 -includedir | --includedir | --includedi | --included | --include \
253 | --includ | --inclu | --incl | --inc)
254 ac_prev=includedir ;;
255 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
256 | --includ=* | --inclu=* | --incl=* | --inc=*)
257 includedir=$ac_optarg ;;
259 -infodir | --infodir | --infodi | --infod | --info | --inf)
261 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
262 infodir=$ac_optarg ;;
264 -libdir | --libdir | --libdi | --libd)
266 -libdir=* | --libdir=* | --libdi=* | --libd=*)
269 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
270 | --libexe | --libex | --libe)
271 ac_prev=libexecdir ;;
272 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
273 | --libexe=* | --libex=* | --libe=*)
274 libexecdir=$ac_optarg ;;
276 -localstatedir | --localstatedir | --localstatedi | --localstated \
277 | --localstate | --localstat | --localsta | --localst \
278 | --locals | --local | --loca | --loc | --lo)
279 ac_prev=localstatedir ;;
280 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
281 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
282 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
283 localstatedir=$ac_optarg ;;
285 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
287 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
291 # Obsolete; use --without-fp.
294 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
298 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
299 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
302 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
303 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
304 | --oldin | --oldi | --old | --ol | --o)
305 ac_prev=oldincludedir ;;
306 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
307 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
308 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
309 oldincludedir=$ac_optarg ;;
311 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
313 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
316 -program-prefix | --program-prefix | --program-prefi | --program-pref \
317 | --program-pre | --program-pr | --program-p)
318 ac_prev=program_prefix ;;
319 -program-prefix=* | --program-prefix=* | --program-prefi=* \
320 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
321 program_prefix=$ac_optarg ;;
323 -program-suffix | --program-suffix | --program-suffi | --program-suff \
324 | --program-suf | --program-su | --program-s)
325 ac_prev=program_suffix ;;
326 -program-suffix=* | --program-suffix=* | --program-suffi=* \
327 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
328 program_suffix=$ac_optarg ;;
330 -program-transform-name | --program-transform-name \
331 | --program-transform-nam | --program-transform-na \
332 | --program-transform-n | --program-transform- \
333 | --program-transform | --program-transfor \
334 | --program-transfo | --program-transf \
335 | --program-trans | --program-tran \
336 | --progr-tra | --program-tr | --program-t)
337 ac_prev=program_transform_name ;;
338 -program-transform-name=* | --program-transform-name=* \
339 | --program-transform-nam=* | --program-transform-na=* \
340 | --program-transform-n=* | --program-transform-=* \
341 | --program-transform=* | --program-transfor=* \
342 | --program-transfo=* | --program-transf=* \
343 | --program-trans=* | --program-tran=* \
344 | --progr-tra=* | --program-tr=* | --program-t=*)
345 program_transform_name=$ac_optarg ;;
347 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
348 | -silent | --silent | --silen | --sile | --sil)
351 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
353 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
355 sbindir=$ac_optarg ;;
357 -sharedstatedir | --sharedstatedir | --sharedstatedi \
358 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
359 | --sharedst | --shareds | --shared | --share | --shar \
361 ac_prev=sharedstatedir ;;
362 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
363 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
364 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
366 sharedstatedir=$ac_optarg ;;
368 -site | --site | --sit)
370 -site=* | --site=* | --sit=*)
373 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
375 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
378 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
379 | --syscon | --sysco | --sysc | --sys | --sy)
380 ac_prev=sysconfdir ;;
381 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
382 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
383 sysconfdir=$ac_optarg ;;
385 -target | --target | --targe | --targ | --tar | --ta | --t)
386 ac_prev=target_alias ;;
387 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
388 target_alias=$ac_optarg ;;
390 -v | -verbose | --verbose | --verbos | --verbo | --verb)
393 -version | --version | --versio | --versi | --vers | -V)
397 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
398 # Reject names that are not valid shell variable names.
399 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
400 { echo "$as_me: error: invalid package name: $ac_package" >&2
401 { (exit 1); exit 1; }; }
402 ac_package=`echo $ac_package| sed 's/-/_/g'`
404 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
407 eval "with_$ac_package='$ac_optarg'" ;;
409 -without-* | --without-*)
410 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
411 # Reject names that are not valid shell variable names.
412 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
413 { echo "$as_me: error: invalid package name: $ac_package" >&2
414 { (exit 1); exit 1; }; }
415 ac_package=`echo $ac_package | sed 's/-/_/g'`
416 eval "with_$ac_package=no" ;;
419 # Obsolete; use --with-x.
422 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
423 | --x-incl | --x-inc | --x-in | --x-i)
424 ac_prev=x_includes ;;
425 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
426 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
427 x_includes=$ac_optarg ;;
429 -x-libraries | --x-libraries | --x-librarie | --x-librari \
430 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
431 ac_prev=x_libraries ;;
432 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
433 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
434 x_libraries=$ac_optarg ;;
436 -*) { echo "$as_me: error: unrecognized option: $ac_option
437 Try \`$0 --help' for more information." >&2
438 { (exit 1); exit 1; }; }
442 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
443 # Reject names that are not valid shell variable names.
444 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
445 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
446 { (exit 1); exit 1; }; }
447 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
448 eval "$ac_envvar='$ac_optarg'"
452 # FIXME: should be removed in autoconf 3.0.
453 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
454 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
455 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
456 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
462 if test -n "$ac_prev"; then
463 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
464 { echo "$as_me: error: missing argument to $ac_option" >&2
465 { (exit 1); exit 1; }; }
468 # Be sure to have absolute paths.
469 for ac_var in exec_prefix prefix
471 eval ac_val=$`echo $ac_var`
473 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
474 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
475 { (exit 1); exit 1; }; };;
479 # Be sure to have absolute paths.
480 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
481 localstatedir libdir includedir oldincludedir infodir mandir
483 eval ac_val=$`echo $ac_var`
485 [\\/$]* | ?:[\\/]* ) ;;
486 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
487 { (exit 1); exit 1; }; };;
491 # There might be people who depend on the old broken behavior: `$host'
492 # used to hold the argument of --host etc.
497 # FIXME: should be removed in autoconf 3.0.
498 if test "x$host_alias" != x; then
499 if test "x$build_alias" = x; then
500 cross_compiling=maybe
501 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
502 If a cross compiler is detected then cross compile mode will be used." >&2
503 elif test "x$build_alias" != "x$host_alias"; then
509 test -n "$host_alias" && ac_tool_prefix=$host_alias-
511 test "$silent" = yes && exec 6>/dev/null
513 # Find the source files, if location was not specified.
514 if test -z "$srcdir"; then
515 ac_srcdir_defaulted=yes
516 # Try the directory containing this script, then its parent.
518 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
519 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
521 if test ! -r $srcdir/$ac_unique_file; then
525 ac_srcdir_defaulted=no
527 if test ! -r $srcdir/$ac_unique_file; then
528 if test "$ac_srcdir_defaulted" = yes; then
529 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
530 { (exit 1); exit 1; }; }
532 { echo "$as_me: error: cannot find sources in $srcdir" >&2
533 { (exit 1); exit 1; }; }
536 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
537 ac_env_build_alias_set=${build_alias+set}
538 ac_env_build_alias_value=$build_alias
539 ac_cv_env_build_alias_set=${build_alias+set}
540 ac_cv_env_build_alias_value=$build_alias
541 ac_env_host_alias_set=${host_alias+set}
542 ac_env_host_alias_value=$host_alias
543 ac_cv_env_host_alias_set=${host_alias+set}
544 ac_cv_env_host_alias_value=$host_alias
545 ac_env_target_alias_set=${target_alias+set}
546 ac_env_target_alias_value=$target_alias
547 ac_cv_env_target_alias_set=${target_alias+set}
548 ac_cv_env_target_alias_value=$target_alias
549 ac_env_CC_set=${CC+set}
551 ac_cv_env_CC_set=${CC+set}
552 ac_cv_env_CC_value=$CC
553 ac_env_CFLAGS_set=${CFLAGS+set}
554 ac_env_CFLAGS_value=$CFLAGS
555 ac_cv_env_CFLAGS_set=${CFLAGS+set}
556 ac_cv_env_CFLAGS_value=$CFLAGS
557 ac_env_LDFLAGS_set=${LDFLAGS+set}
558 ac_env_LDFLAGS_value=$LDFLAGS
559 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
560 ac_cv_env_LDFLAGS_value=$LDFLAGS
561 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
562 ac_env_CPPFLAGS_value=$CPPFLAGS
563 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
564 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
565 ac_env_CPP_set=${CPP+set}
566 ac_env_CPP_value=$CPP
567 ac_cv_env_CPP_set=${CPP+set}
568 ac_cv_env_CPP_value=$CPP
571 # Report the --help message.
573 if test "$ac_init_help" = "long"; then
574 # Omit some internal or obsolete options to make the list less imposing.
575 # This message is too long to be a string in the A/UX 3.1 sh.
577 \`configure' configures this package to adapt to many kinds of systems.
579 Usage: $0 [OPTION]... [VAR=VALUE]...
581 To assign environment variables (e.g., CC, CFLAGS...), specify them as
582 VAR=VALUE. See below for descriptions of some of the useful variables.
584 Defaults for the options are specified in brackets.
587 -h, --help display this help and exit
588 --help=short display options specific to this package
589 --help=recursive display the short help of all the included packages
590 -V, --version display version information and exit
591 -q, --quiet, --silent do not print \`checking...' messages
592 --cache-file=FILE cache test results in FILE [disabled]
593 -C, --config-cache alias for \`--cache-file=config.cache'
594 -n, --no-create do not create output files
595 --srcdir=DIR find the sources in DIR [configure dir or \`..']
600 Installation directories:
601 --prefix=PREFIX install architecture-independent files in PREFIX
603 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
606 By default, \`make install' will install all the files in
607 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
608 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
609 for instance \`--prefix=\$HOME'.
611 For better control, use the options below.
613 Fine tuning of the installation directories:
614 --bindir=DIR user executables [EPREFIX/bin]
615 --sbindir=DIR system admin executables [EPREFIX/sbin]
616 --libexecdir=DIR program executables [EPREFIX/libexec]
617 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
618 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
619 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
620 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
621 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
622 --libdir=DIR object code libraries [EPREFIX/lib]
623 --includedir=DIR C header files [PREFIX/include]
624 --oldincludedir=DIR C header files for non-gcc [/usr/include]
625 --infodir=DIR info documentation [DATAROOTDIR/info]
626 --mandir=DIR man documentation [DATAROOTDIR/man]
632 --program-prefix=PREFIX prepend PREFIX to installed program names
633 --program-suffix=SUFFIX append SUFFIX to installed program names
634 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
637 --build=BUILD configure for building on BUILD [guessed]
638 --host=HOST build programs to run on HOST [BUILD]
639 --target=TARGET configure for building compilers for TARGET [HOST]
643 if test -n "$ac_init_help"; then
648 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
649 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
652 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
653 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
655 --with-system-type=XXX test: override derived host system-type
656 --with-pkg-config{=path} enable/disable use of pkg-config
657 --with-pkg-config-libdir=XXX use given directory for installing pc-files
658 --without-tests suppress build with test-programs
659 --enable-mixed-case tic should assume mixed-case filenames
660 --with-install-prefix prefixes actual install-location ($DESTDIR)
661 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
662 --with-build-cc=XXX the build C compiler ($BUILD_CC)
663 --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
664 --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
665 --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
666 --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
667 --with-build-libs=XXX the build libraries (${BUILD_LIBS})
668 Options to Specify the Libraries Built/Used:
669 --with-shared generate shared C-objects (needed for --with-ada-sharedlib)
670 --with-curses-dir=DIR directory in which (n)curses is installed
671 --enable-widec compile with wide-char/UTF-8 code
672 --with-lib-prefix override library-prefix
673 --with-shlib-version=X Specify rel or abi version for shared libs
674 --enable-rpath-link link sample programs with rpath option
675 Fine-Tuning Your Configuration:
676 --enable-broken_linker compile with broken-linker support code
677 --disable-largefile omit support for large files
678 --with-rcs-ids compile-in RCS identifiers
680 --disable-ext-funcs disable function-extensions
681 --enable-const compile with extra/non-standard const
683 --without-develop disable development options
685 --with-pthread use POSIX thread library
686 --enable-weak-symbols enable weak-symbols for pthreads
687 --enable-reentrant compile with experimental reentrant code
688 --with-wrap-prefix=XXX override prefix used for public variables
689 Testing/development Options:
690 --disable-echo do not display "compiling" commands
691 --enable-warnings build: turn on GCC compiler warnings
692 --enable-assertions test: turn on generation of assertion code
693 --enable-expanded test: generate functions for certain macros
694 --disable-macros test: use functions rather than macros
695 --with-trace test: add trace() function to all models of ncurses
696 --disable-gnat-projects test: disable GNAT projects even if usable
697 Ada95 Binding Options:
698 --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
699 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
700 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
701 --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
703 Some influential environment variables:
704 CC C compiler command
705 CFLAGS C compiler flags
706 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
707 nonstandard directory <lib dir>
708 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
709 headers in a nonstandard directory <include dir>
712 Use these variables to override the choices made by `configure' or to help
713 it to find libraries and programs with nonstandard names/locations.
718 if test "$ac_init_help" = "recursive"; then
719 # If there are subdirs, report their specific --help.
721 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
723 # A "../" for each directory in /$ac_subdir.
724 ac_dots=`echo $ac_subdir |
725 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
728 .) # No --srcdir option. We are building in place.
729 ac_sub_srcdir=$srcdir ;;
730 [\\/]* | ?:[\\/]* ) # Absolute path.
731 ac_sub_srcdir=$srcdir/$ac_subdir ;;
733 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
736 # Check for guested configure; otherwise get Cygnus style configure.
737 if test -f $ac_sub_srcdir/configure.gnu; then
739 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
740 elif test -f $ac_sub_srcdir/configure; then
742 $SHELL $ac_sub_srcdir/configure --help=recursive
743 elif test -f $ac_sub_srcdir/configure.ac ||
744 test -f $ac_sub_srcdir/configure.in; then
748 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
754 test -n "$ac_init_help" && exit 0
755 if $ac_init_version; then
758 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
759 Free Software Foundation, Inc.
760 This configure script is free software; the Free Software Foundation
761 gives unlimited permission to copy, distribute and modify it.
767 This file contains any messages produced by compilers while
768 running configure, to aid debugging if configure makes a mistake.
770 It was created by $as_me, which was
771 generated by GNU Autoconf 2.52.20141204. Invocation command line was
782 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
783 uname -m = `(uname -m) 2>/dev/null || echo unknown`
784 uname -r = `(uname -r) 2>/dev/null || echo unknown`
785 uname -s = `(uname -s) 2>/dev/null || echo unknown`
786 uname -v = `(uname -v) 2>/dev/null || echo unknown`
788 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
789 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
791 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
792 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
793 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
794 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
795 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
796 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
797 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
811 # Keep a trace of the command line.
812 # Strip out --no-create and --no-recursion so they do not pile up.
813 # Also quote any args containing shell meta-characters.
819 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
820 | --no-cr | --no-c) ;;
821 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
822 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
823 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
824 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
825 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
827 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
830 # Get rid of the leading space.
833 # When interrupted or exit'd, cleanup temporary files, and complete
834 # config.log. We remove comments because anyway the quotes in there
835 # would cause problems or look ugly.
837 # Save into config.log some information that might help in debugging.
839 echo "## ----------------- ##" >&5
840 echo "## Cache variables. ##" >&5
841 echo "## ----------------- ##" >&5
843 # The following way of writing the cache mishandles newlines in values,
846 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
849 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
850 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
854 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
858 sed "/^$/d" confdefs.h >conftest.log
859 if test -s conftest.log; then
861 echo "## ------------ ##" >&5
862 echo "## confdefs.h. ##" >&5
863 echo "## ------------ ##" >&5
868 test "$ac_signal" != 0 &&
869 echo "$as_me: caught signal $ac_signal" >&5
870 echo "$as_me: exit $exit_status" >&5
871 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
874 for ac_signal in 1 2 13 15; do
875 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
879 # confdefs.h avoids OS command line length limits that DEFS can exceed.
880 rm -rf conftest* confdefs.h
881 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
884 # Let the site file select an alternate cache file if it wants to.
885 # Prefer explicitly selected file to automatically selected ones.
886 if test -z "$CONFIG_SITE"; then
887 if test "x$prefix" != xNONE; then
888 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
890 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
893 for ac_site_file in $CONFIG_SITE; do
894 if test -r "$ac_site_file"; then
895 { echo "$as_me:895: loading site script $ac_site_file" >&5
896 echo "$as_me: loading site script $ac_site_file" >&6;}
897 cat "$ac_site_file" >&5
902 if test -r "$cache_file"; then
903 # Some versions of bash will fail to source /dev/null (special
904 # files actually), so we avoid doing that.
905 if test -f "$cache_file"; then
906 { echo "$as_me:906: loading cache $cache_file" >&5
907 echo "$as_me: loading cache $cache_file" >&6;}
909 [\\/]* | ?:[\\/]* ) . $cache_file;;
914 { echo "$as_me:914: creating cache $cache_file" >&5
915 echo "$as_me: creating cache $cache_file" >&6;}
919 # Check that the precious variables saved in the cache have kept the same
921 ac_cache_corrupted=false
922 for ac_var in `(set) 2>&1 |
923 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
924 eval ac_old_set=\$ac_cv_env_${ac_var}_set
925 eval ac_new_set=\$ac_env_${ac_var}_set
926 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
927 eval ac_new_val="\$ac_env_${ac_var}_value"
928 case $ac_old_set,$ac_new_set in
930 { echo "$as_me:930: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
931 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
932 ac_cache_corrupted=: ;;
934 { echo "$as_me:934: error: \`$ac_var' was not set in the previous run" >&5
935 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
936 ac_cache_corrupted=: ;;
939 if test "x$ac_old_val" != "x$ac_new_val"; then
940 { echo "$as_me:940: error: \`$ac_var' has changed since the previous run:" >&5
941 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
942 { echo "$as_me:942: former value: $ac_old_val" >&5
943 echo "$as_me: former value: $ac_old_val" >&2;}
944 { echo "$as_me:944: current value: $ac_new_val" >&5
945 echo "$as_me: current value: $ac_new_val" >&2;}
949 # Pass precious variables to config.status. It doesn't matter if
950 # we pass some twice (in addition to the command line arguments).
951 if test "$ac_new_set" = set; then
953 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
954 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
955 ac_configure_args="$ac_configure_args '$ac_arg'"
957 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
962 if $ac_cache_corrupted; then
963 { echo "$as_me:963: error: changes in the environment can compromise the build" >&5
964 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
965 { { echo "$as_me:965: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
966 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
967 { (exit 1); exit 1; }; }
971 ac_cpp='$CPP $CPPFLAGS'
972 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
973 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
974 ac_compiler_gnu=$ac_cv_c_compiler_gnu
975 ac_main_return=return
977 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
978 *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
980 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
981 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
983 echo "#! $SHELL" >conftest.sh
984 echo "exit 0" >>conftest.sh
986 if { (echo "$as_me:986: PATH=\".;.\"; conftest.sh") >&5
987 (PATH=".;."; conftest.sh) 2>&5
989 echo "$as_me:989: \$? = $ac_status" >&5
990 (exit $ac_status); }; then
991 ac_path_separator=';'
995 PATH_SEPARATOR="$ac_path_separator"
998 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1003 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1004 if test -f $ac_dir/install-sh; then
1006 ac_install_sh="$ac_aux_dir/install-sh -c"
1008 elif test -f $ac_dir/install.sh; then
1010 ac_install_sh="$ac_aux_dir/install.sh -c"
1012 elif test -f $ac_dir/shtool; then
1014 ac_install_sh="$ac_aux_dir/shtool install -c"
1018 if test -z "$ac_aux_dir"; then
1019 { { echo "$as_me:1019: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1020 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1021 { (exit 1); exit 1; }; }
1023 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1024 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1025 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1027 # Make sure we can run config.sub.
1028 $ac_config_sub sun4 >/dev/null 2>&1 ||
1029 { { echo "$as_me:1029: error: cannot run $ac_config_sub" >&5
1030 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1031 { (exit 1); exit 1; }; }
1033 echo "$as_me:1033: checking build system type" >&5
1034 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1035 if test "${ac_cv_build+set}" = set; then
1036 echo $ECHO_N "(cached) $ECHO_C" >&6
1038 ac_cv_build_alias=$build_alias
1039 test -z "$ac_cv_build_alias" &&
1040 ac_cv_build_alias=`$ac_config_guess`
1041 test -z "$ac_cv_build_alias" &&
1042 { { echo "$as_me:1042: error: cannot guess build type; you must specify one" >&5
1043 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1044 { (exit 1); exit 1; }; }
1045 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1046 { { echo "$as_me:1046: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1047 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1048 { (exit 1); exit 1; }; }
1051 echo "$as_me:1051: result: $ac_cv_build" >&5
1052 echo "${ECHO_T}$ac_cv_build" >&6
1054 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1055 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1056 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1058 echo "$as_me:1058: checking host system type" >&5
1059 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1060 if test "${ac_cv_host+set}" = set; then
1061 echo $ECHO_N "(cached) $ECHO_C" >&6
1063 ac_cv_host_alias=$host_alias
1064 test -z "$ac_cv_host_alias" &&
1065 ac_cv_host_alias=$ac_cv_build_alias
1066 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1067 { { echo "$as_me:1067: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1068 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1069 { (exit 1); exit 1; }; }
1072 echo "$as_me:1072: result: $ac_cv_host" >&5
1073 echo "${ECHO_T}$ac_cv_host" >&6
1075 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1076 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1077 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1079 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1080 echo "$as_me:1080: checking target system type" >&5
1081 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1082 if test "${ac_cv_target+set}" = set; then
1083 echo $ECHO_N "(cached) $ECHO_C" >&6
1085 ac_cv_target_alias=$target_alias
1086 test "x$ac_cv_target_alias" = "x" &&
1087 ac_cv_target_alias=$ac_cv_host_alias
1088 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1089 { { echo "$as_me:1089: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1090 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1091 { (exit 1); exit 1; }; }
1094 echo "$as_me:1094: result: $ac_cv_target" >&5
1095 echo "${ECHO_T}$ac_cv_target" >&6
1096 target=$ac_cv_target
1097 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1098 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1099 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1101 # The aliases save the names the user supplied, while $host etc.
1102 # will get canonicalized.
1103 test -n "$target_alias" &&
1104 test "$program_prefix$program_suffix$program_transform_name" = \
1106 program_prefix=${target_alias}-
1107 system_name="$host_os"
1109 system_name="`(uname -s -r) 2>/dev/null`"
1110 if test -z "$system_name" ; then
1111 system_name="`(hostname) 2>/dev/null`"
1114 test -n "$system_name" &&
1115 cat >>confdefs.h <<EOF
1116 #define SYSTEM_NAME "$system_name"
1119 if test "${cf_cv_system_name+set}" = set; then
1120 echo $ECHO_N "(cached) $ECHO_C" >&6
1122 cf_cv_system_name="$system_name"
1125 test -z "$system_name" && system_name="$cf_cv_system_name"
1126 test -n "$cf_cv_system_name" && echo "$as_me:1126: result: Configuring for $cf_cv_system_name" >&5
1127 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1129 if test ".$system_name" != ".$cf_cv_system_name" ; then
1130 echo "$as_me:1130: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1131 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1132 { { echo "$as_me:1132: error: \"Please remove config.cache and try again.\"" >&5
1133 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1134 { (exit 1); exit 1; }; }
1137 # Check whether --with-system-type or --without-system-type was given.
1138 if test "${with_system_type+set}" = set; then
1139 withval="$with_system_type"
1140 { echo "$as_me:1140: WARNING: overriding system type to $withval" >&5
1141 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1142 cf_cv_system_name=$withval
1147 ### Save the given $CFLAGS to allow user-override.
1148 cf_user_CFLAGS="$CFLAGS"
1150 ### Default install-location
1152 echo "$as_me:1152: checking for prefix" >&5
1153 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1154 if test "x$prefix" = "xNONE" ; then
1155 case "$cf_cv_system_name" in
1156 # non-vendor systems don't have a conflict
1157 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1160 (*) prefix=$ac_default_prefix
1164 echo "$as_me:1164: result: $prefix" >&5
1165 echo "${ECHO_T}$prefix" >&6
1167 if test "x$prefix" = "xNONE" ; then
1168 echo "$as_me:1168: checking for default include-directory" >&5
1169 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1170 test -n "$verbose" && echo 1>&6
1173 $includedir/ncurses \
1175 $prefix/include/ncurses \
1176 /usr/local/include \
1177 /usr/local/include/ncurses \
1179 /usr/include/ncurses
1181 cf_dir=`eval echo $cf_symbol`
1182 if test -f $cf_dir/curses.h ; then
1183 if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1184 includedir="$cf_symbol"
1185 test -n "$verbose" && echo $ac_n " found " 1>&6
1189 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1191 echo "$as_me:1191: result: $includedir" >&5
1192 echo "${ECHO_T}$includedir" >&6
1195 ### Checks for programs.
1198 ac_cpp='$CPP $CPPFLAGS'
1199 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1200 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1201 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1202 ac_main_return=return
1203 if test -n "$ac_tool_prefix"; then
1204 for ac_prog in gnatgcc gcc cc
1206 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1207 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1208 echo "$as_me:1208: checking for $ac_word" >&5
1209 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1210 if test "${ac_cv_prog_CC+set}" = set; then
1211 echo $ECHO_N "(cached) $ECHO_C" >&6
1213 if test -n "$CC"; then
1214 ac_cv_prog_CC="$CC" # Let the user override the test.
1216 ac_save_IFS=$IFS; IFS=$ac_path_separator
1218 for ac_dir in $ac_dummy; do
1220 test -z "$ac_dir" && ac_dir=.
1221 $as_executable_p "$ac_dir/$ac_word" || continue
1222 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1223 echo "$as_me:1223: found $ac_dir/$ac_word" >&5
1230 if test -n "$CC"; then
1231 echo "$as_me:1231: result: $CC" >&5
1232 echo "${ECHO_T}$CC" >&6
1234 echo "$as_me:1234: result: no" >&5
1235 echo "${ECHO_T}no" >&6
1238 test -n "$CC" && break
1241 if test -z "$CC"; then
1243 for ac_prog in gnatgcc gcc cc
1245 # Extract the first word of "$ac_prog", so it can be a program name with args.
1246 set dummy $ac_prog; ac_word=$2
1247 echo "$as_me:1247: checking for $ac_word" >&5
1248 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1249 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1250 echo $ECHO_N "(cached) $ECHO_C" >&6
1252 if test -n "$ac_ct_CC"; then
1253 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1255 ac_save_IFS=$IFS; IFS=$ac_path_separator
1257 for ac_dir in $ac_dummy; do
1259 test -z "$ac_dir" && ac_dir=.
1260 $as_executable_p "$ac_dir/$ac_word" || continue
1261 ac_cv_prog_ac_ct_CC="$ac_prog"
1262 echo "$as_me:1262: found $ac_dir/$ac_word" >&5
1268 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1269 if test -n "$ac_ct_CC"; then
1270 echo "$as_me:1270: result: $ac_ct_CC" >&5
1271 echo "${ECHO_T}$ac_ct_CC" >&6
1273 echo "$as_me:1273: result: no" >&5
1274 echo "${ECHO_T}no" >&6
1277 test -n "$ac_ct_CC" && break
1283 test -z "$CC" && { { echo "$as_me:1283: error: no acceptable cc found in \$PATH" >&5
1284 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1285 { (exit 1); exit 1; }; }
1287 # Provide some information about the compiler.
1288 echo "$as_me:1288:" \
1289 "checking for C compiler version" >&5
1290 ac_compiler=`set X $ac_compile; echo $2`
1291 { (eval echo "$as_me:1291: \"$ac_compiler --version </dev/null >&5\"") >&5
1292 (eval $ac_compiler --version </dev/null >&5) 2>&5
1294 echo "$as_me:1294: \$? = $ac_status" >&5
1295 (exit $ac_status); }
1296 { (eval echo "$as_me:1296: \"$ac_compiler -v </dev/null >&5\"") >&5
1297 (eval $ac_compiler -v </dev/null >&5) 2>&5
1299 echo "$as_me:1299: \$? = $ac_status" >&5
1300 (exit $ac_status); }
1301 { (eval echo "$as_me:1301: \"$ac_compiler -V </dev/null >&5\"") >&5
1302 (eval $ac_compiler -V </dev/null >&5) 2>&5
1304 echo "$as_me:1304: \$? = $ac_status" >&5
1305 (exit $ac_status); }
1307 cat >conftest.$ac_ext <<_ACEOF
1308 #line 1308 "configure"
1309 #include "confdefs.h"
1319 ac_clean_files_save=$ac_clean_files
1320 ac_clean_files="$ac_clean_files a.out a.exe"
1321 # Try to create an executable without -o first, disregard a.out.
1322 # It will help us diagnose broken compilers, and finding out an intuition
1324 echo "$as_me:1324: checking for C compiler default output" >&5
1325 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1326 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1327 if { (eval echo "$as_me:1327: \"$ac_link_default\"") >&5
1328 (eval $ac_link_default) 2>&5
1330 echo "$as_me:1330: \$? = $ac_status" >&5
1331 (exit $ac_status); }; then
1332 # Find the output, starting from the most likely. This scheme is
1333 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1335 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1336 ls a.out conftest 2>/dev/null;
1337 ls a.* conftest.* 2>/dev/null`; do
1339 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1340 a.out ) # We found the default executable, but exeext='' is most
1343 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1344 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1351 echo "$as_me: failed program was:" >&5
1352 cat conftest.$ac_ext >&5
1353 { { echo "$as_me:1353: error: C compiler cannot create executables" >&5
1354 echo "$as_me: error: C compiler cannot create executables" >&2;}
1355 { (exit 77); exit 77; }; }
1358 ac_exeext=$ac_cv_exeext
1359 echo "$as_me:1359: result: $ac_file" >&5
1360 echo "${ECHO_T}$ac_file" >&6
1362 # Check the compiler produces executables we can run. If not, either
1363 # the compiler is broken, or we cross compile.
1364 echo "$as_me:1364: checking whether the C compiler works" >&5
1365 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1366 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1367 # If not cross compiling, check that we can run a simple program.
1368 if test "$cross_compiling" != yes; then
1369 if { ac_try='./$ac_file'
1370 { (eval echo "$as_me:1370: \"$ac_try\"") >&5
1373 echo "$as_me:1373: \$? = $ac_status" >&5
1374 (exit $ac_status); }; }; then
1377 if test "$cross_compiling" = maybe; then
1380 { { echo "$as_me:1380: error: cannot run C compiled programs.
1381 If you meant to cross compile, use \`--host'." >&5
1382 echo "$as_me: error: cannot run C compiled programs.
1383 If you meant to cross compile, use \`--host'." >&2;}
1384 { (exit 1); exit 1; }; }
1388 echo "$as_me:1388: result: yes" >&5
1389 echo "${ECHO_T}yes" >&6
1391 rm -f a.out a.exe conftest$ac_cv_exeext
1392 ac_clean_files=$ac_clean_files_save
1393 # Check the compiler produces executables we can run. If not, either
1394 # the compiler is broken, or we cross compile.
1395 echo "$as_me:1395: checking whether we are cross compiling" >&5
1396 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1397 echo "$as_me:1397: result: $cross_compiling" >&5
1398 echo "${ECHO_T}$cross_compiling" >&6
1400 echo "$as_me:1400: checking for executable suffix" >&5
1401 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1402 if { (eval echo "$as_me:1402: \"$ac_link\"") >&5
1403 (eval $ac_link) 2>&5
1405 echo "$as_me:1405: \$? = $ac_status" >&5
1406 (exit $ac_status); }; then
1407 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1408 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1409 # work properly (i.e., refer to `conftest.exe'), while it won't with
1411 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1413 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1414 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1421 { { echo "$as_me:1421: error: cannot compute EXEEXT: cannot compile and link" >&5
1422 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1423 { (exit 1); exit 1; }; }
1426 rm -f conftest$ac_cv_exeext
1427 echo "$as_me:1427: result: $ac_cv_exeext" >&5
1428 echo "${ECHO_T}$ac_cv_exeext" >&6
1430 rm -f conftest.$ac_ext
1431 EXEEXT=$ac_cv_exeext
1433 echo "$as_me:1433: checking for object suffix" >&5
1434 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1435 if test "${ac_cv_objext+set}" = set; then
1436 echo $ECHO_N "(cached) $ECHO_C" >&6
1438 cat >conftest.$ac_ext <<_ACEOF
1439 #line 1439 "configure"
1440 #include "confdefs.h"
1450 rm -f conftest.o conftest.obj
1451 if { (eval echo "$as_me:1451: \"$ac_compile\"") >&5
1452 (eval $ac_compile) 2>&5
1454 echo "$as_me:1454: \$? = $ac_status" >&5
1455 (exit $ac_status); }; then
1456 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1458 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1459 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1464 echo "$as_me: failed program was:" >&5
1465 cat conftest.$ac_ext >&5
1466 { { echo "$as_me:1466: error: cannot compute OBJEXT: cannot compile" >&5
1467 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1468 { (exit 1); exit 1; }; }
1471 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1473 echo "$as_me:1473: result: $ac_cv_objext" >&5
1474 echo "${ECHO_T}$ac_cv_objext" >&6
1475 OBJEXT=$ac_cv_objext
1477 echo "$as_me:1477: checking whether we are using the GNU C compiler" >&5
1478 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1479 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1480 echo $ECHO_N "(cached) $ECHO_C" >&6
1482 cat >conftest.$ac_ext <<_ACEOF
1483 #line 1483 "configure"
1484 #include "confdefs.h"
1497 rm -f conftest.$ac_objext
1498 if { (eval echo "$as_me:1498: \"$ac_compile\"") >&5
1499 (eval $ac_compile) 2>&5
1501 echo "$as_me:1501: \$? = $ac_status" >&5
1502 (exit $ac_status); } &&
1503 { ac_try='test -s conftest.$ac_objext'
1504 { (eval echo "$as_me:1504: \"$ac_try\"") >&5
1507 echo "$as_me:1507: \$? = $ac_status" >&5
1508 (exit $ac_status); }; }; then
1511 echo "$as_me: failed program was:" >&5
1512 cat conftest.$ac_ext >&5
1515 rm -f conftest.$ac_objext conftest.$ac_ext
1516 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1519 echo "$as_me:1519: result: $ac_cv_c_compiler_gnu" >&5
1520 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1521 GCC=`test $ac_compiler_gnu = yes && echo yes`
1522 ac_test_CFLAGS=${CFLAGS+set}
1523 ac_save_CFLAGS=$CFLAGS
1525 echo "$as_me:1525: checking whether $CC accepts -g" >&5
1526 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1527 if test "${ac_cv_prog_cc_g+set}" = set; then
1528 echo $ECHO_N "(cached) $ECHO_C" >&6
1530 cat >conftest.$ac_ext <<_ACEOF
1531 #line 1531 "configure"
1532 #include "confdefs.h"
1542 rm -f conftest.$ac_objext
1543 if { (eval echo "$as_me:1543: \"$ac_compile\"") >&5
1544 (eval $ac_compile) 2>&5
1546 echo "$as_me:1546: \$? = $ac_status" >&5
1547 (exit $ac_status); } &&
1548 { ac_try='test -s conftest.$ac_objext'
1549 { (eval echo "$as_me:1549: \"$ac_try\"") >&5
1552 echo "$as_me:1552: \$? = $ac_status" >&5
1553 (exit $ac_status); }; }; then
1556 echo "$as_me: failed program was:" >&5
1557 cat conftest.$ac_ext >&5
1560 rm -f conftest.$ac_objext conftest.$ac_ext
1562 echo "$as_me:1562: result: $ac_cv_prog_cc_g" >&5
1563 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1564 if test "$ac_test_CFLAGS" = set; then
1565 CFLAGS=$ac_save_CFLAGS
1566 elif test $ac_cv_prog_cc_g = yes; then
1567 if test "$GCC" = yes; then
1573 if test "$GCC" = yes; then
1579 # Some people use a C++ compiler to compile C. Since we use `exit',
1580 # in C++ we need to declare it. In case someone uses the same compiler
1581 # for both compiling C and C++ we need to have the C++ compiler decide
1582 # the declaration of exit, since it's the most demanding environment.
1583 cat >conftest.$ac_ext <<_ACEOF
1588 rm -f conftest.$ac_objext
1589 if { (eval echo "$as_me:1589: \"$ac_compile\"") >&5
1590 (eval $ac_compile) 2>&5
1592 echo "$as_me:1592: \$? = $ac_status" >&5
1593 (exit $ac_status); } &&
1594 { ac_try='test -s conftest.$ac_objext'
1595 { (eval echo "$as_me:1595: \"$ac_try\"") >&5
1598 echo "$as_me:1598: \$? = $ac_status" >&5
1599 (exit $ac_status); }; }; then
1600 for ac_declaration in \
1602 '#include <stdlib.h>' \
1603 'extern "C" void std::exit (int) throw (); using std::exit;' \
1604 'extern "C" void std::exit (int); using std::exit;' \
1605 'extern "C" void exit (int) throw ();' \
1606 'extern "C" void exit (int);' \
1609 cat >conftest.$ac_ext <<_ACEOF
1610 #line 1610 "configure"
1611 #include "confdefs.h"
1622 rm -f conftest.$ac_objext
1623 if { (eval echo "$as_me:1623: \"$ac_compile\"") >&5
1624 (eval $ac_compile) 2>&5
1626 echo "$as_me:1626: \$? = $ac_status" >&5
1627 (exit $ac_status); } &&
1628 { ac_try='test -s conftest.$ac_objext'
1629 { (eval echo "$as_me:1629: \"$ac_try\"") >&5
1632 echo "$as_me:1632: \$? = $ac_status" >&5
1633 (exit $ac_status); }; }; then
1636 echo "$as_me: failed program was:" >&5
1637 cat conftest.$ac_ext >&5
1640 rm -f conftest.$ac_objext conftest.$ac_ext
1641 cat >conftest.$ac_ext <<_ACEOF
1642 #line 1642 "configure"
1643 #include "confdefs.h"
1653 rm -f conftest.$ac_objext
1654 if { (eval echo "$as_me:1654: \"$ac_compile\"") >&5
1655 (eval $ac_compile) 2>&5
1657 echo "$as_me:1657: \$? = $ac_status" >&5
1658 (exit $ac_status); } &&
1659 { ac_try='test -s conftest.$ac_objext'
1660 { (eval echo "$as_me:1660: \"$ac_try\"") >&5
1663 echo "$as_me:1663: \$? = $ac_status" >&5
1664 (exit $ac_status); }; }; then
1667 echo "$as_me: failed program was:" >&5
1668 cat conftest.$ac_ext >&5
1670 rm -f conftest.$ac_objext conftest.$ac_ext
1673 if test -n "$ac_declaration"; then
1674 echo '#ifdef __cplusplus' >>confdefs.h
1675 echo $ac_declaration >>confdefs.h
1676 echo '#endif' >>confdefs.h
1680 echo "$as_me: failed program was:" >&5
1681 cat conftest.$ac_ext >&5
1683 rm -f conftest.$ac_objext conftest.$ac_ext
1685 ac_cpp='$CPP $CPPFLAGS'
1686 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1687 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1688 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1689 ac_main_return=return
1692 if test "$GCC" = yes ; then
1693 echo "$as_me:1693: checking version of $CC" >&5
1694 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1695 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.].*//'`"
1696 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1697 echo "$as_me:1697: result: $GCC_VERSION" >&5
1698 echo "${ECHO_T}$GCC_VERSION" >&6
1701 echo "$as_me:1701: checking for $CC option to accept ANSI C" >&5
1702 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1703 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1704 echo $ECHO_N "(cached) $ECHO_C" >&6
1706 ac_cv_prog_cc_stdc=no
1708 cat >conftest.$ac_ext <<_ACEOF
1709 #line 1709 "configure"
1710 #include "confdefs.h"
1713 #include <sys/types.h>
1714 #include <sys/stat.h>
1715 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1716 struct buf { int x; };
1717 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1718 static char *e (p, i)
1724 static char *f (char * (*g) (char **, int), char **p, ...)
1729 s = g (p, va_arg (v,int));
1733 int test (int i, double x);
1734 struct s1 {int (*f) (int a);};
1735 struct s2 {int (*f) (double a);};
1736 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1742 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1747 # Don't try gcc -ansi; that turns off useful extensions and
1748 # breaks some systems' header files.
1749 # AIX -qlanglvl=ansi
1750 # Ultrix and OSF/1 -std1
1751 # HP-UX 10.20 and later -Ae
1752 # HP-UX older versions -Aa -D_HPUX_SOURCE
1753 # SVR4 -Xc -D__EXTENSIONS__
1754 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1756 CC="$ac_save_CC $ac_arg"
1757 rm -f conftest.$ac_objext
1758 if { (eval echo "$as_me:1758: \"$ac_compile\"") >&5
1759 (eval $ac_compile) 2>&5
1761 echo "$as_me:1761: \$? = $ac_status" >&5
1762 (exit $ac_status); } &&
1763 { ac_try='test -s conftest.$ac_objext'
1764 { (eval echo "$as_me:1764: \"$ac_try\"") >&5
1767 echo "$as_me:1767: \$? = $ac_status" >&5
1768 (exit $ac_status); }; }; then
1769 ac_cv_prog_cc_stdc=$ac_arg
1772 echo "$as_me: failed program was:" >&5
1773 cat conftest.$ac_ext >&5
1775 rm -f conftest.$ac_objext
1777 rm -f conftest.$ac_ext conftest.$ac_objext
1782 case "x$ac_cv_prog_cc_stdc" in
1784 echo "$as_me:1784: result: none needed" >&5
1785 echo "${ECHO_T}none needed" >&6 ;;
1787 echo "$as_me:1787: result: $ac_cv_prog_cc_stdc" >&5
1788 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1789 CC="$CC $ac_cv_prog_cc_stdc" ;;
1792 # This should have been defined by AC_PROG_CC
1795 echo "$as_me:1795: checking \$CC variable" >&5
1796 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1799 echo "$as_me:1799: result: broken" >&5
1800 echo "${ECHO_T}broken" >&6
1801 { echo "$as_me:1801: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1802 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1804 cf_flags=`echo "$CC" | sed -e 's/^[^ ]*[ ]//'`
1805 CC=`echo "$CC" | sed -e 's/[ ].*//'`
1810 cf_new_extra_cppflags=
1812 for cf_add_cflags in $cf_flags
1814 case $cf_fix_cppflags in
1816 case $cf_add_cflags in
1817 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1818 case $cf_add_cflags in
1820 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1822 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1823 && test -z "${cf_tst_cflags}" \
1824 && cf_fix_cppflags=yes
1826 if test $cf_fix_cppflags = yes ; then
1827 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1829 elif test "${cf_tst_cflags}" = "\"'" ; then
1830 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1839 case $cf_add_cflags in
1841 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1843 CPPFLAGS=`echo "$CPPFLAGS" | \
1844 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1845 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1849 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1854 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1859 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1861 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1863 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1864 && test -z "${cf_tst_cflags}" \
1865 && cf_fix_cppflags=no
1870 if test -n "$cf_new_cflags" ; then
1872 CFLAGS="$CFLAGS $cf_new_cflags"
1875 if test -n "$cf_new_cppflags" ; then
1877 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1880 if test -n "$cf_new_extra_cppflags" ; then
1882 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1887 echo "$as_me:1887: result: ok" >&5
1888 echo "${ECHO_T}ok" >&6
1893 ac_cpp='$CPP $CPPFLAGS'
1894 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1895 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1896 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1897 ac_main_return=return
1898 echo "$as_me:1898: checking how to run the C preprocessor" >&5
1899 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1900 # On Suns, sometimes $CPP names a directory.
1901 if test -n "$CPP" && test -d "$CPP"; then
1904 if test -z "$CPP"; then
1905 if test "${ac_cv_prog_CPP+set}" = set; then
1906 echo $ECHO_N "(cached) $ECHO_C" >&6
1908 # Double quotes because CPP needs to be expanded
1909 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1912 for ac_c_preproc_warn_flag in '' yes
1914 # Use a header file that comes with gcc, so configuring glibc
1915 # with a fresh cross-compiler works.
1916 # On the NeXT, cc -E runs the code through the compiler's parser,
1917 # not just through cpp. "Syntax error" is here to catch this case.
1918 cat >conftest.$ac_ext <<_ACEOF
1919 #line 1919 "configure"
1920 #include "confdefs.h"
1924 if { (eval echo "$as_me:1924: \"$ac_cpp conftest.$ac_ext\"") >&5
1925 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1927 egrep -v '^ *\+' conftest.er1 >conftest.err
1929 cat conftest.err >&5
1930 echo "$as_me:1930: \$? = $ac_status" >&5
1931 (exit $ac_status); } >/dev/null; then
1932 if test -s conftest.err; then
1933 ac_cpp_err=$ac_c_preproc_warn_flag
1940 if test -z "$ac_cpp_err"; then
1943 echo "$as_me: failed program was:" >&5
1944 cat conftest.$ac_ext >&5
1945 # Broken: fails on valid input.
1948 rm -f conftest.err conftest.$ac_ext
1950 # OK, works on sane cases. Now check whether non-existent headers
1951 # can be detected and how.
1952 cat >conftest.$ac_ext <<_ACEOF
1953 #line 1953 "configure"
1954 #include "confdefs.h"
1955 #include <ac_nonexistent.h>
1957 if { (eval echo "$as_me:1957: \"$ac_cpp conftest.$ac_ext\"") >&5
1958 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1960 egrep -v '^ *\+' conftest.er1 >conftest.err
1962 cat conftest.err >&5
1963 echo "$as_me:1963: \$? = $ac_status" >&5
1964 (exit $ac_status); } >/dev/null; then
1965 if test -s conftest.err; then
1966 ac_cpp_err=$ac_c_preproc_warn_flag
1973 if test -z "$ac_cpp_err"; then
1974 # Broken: success on invalid input.
1977 echo "$as_me: failed program was:" >&5
1978 cat conftest.$ac_ext >&5
1979 # Passes both tests.
1983 rm -f conftest.err conftest.$ac_ext
1986 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1987 rm -f conftest.err conftest.$ac_ext
1988 if $ac_preproc_ok; then
2000 echo "$as_me:2000: result: $CPP" >&5
2001 echo "${ECHO_T}$CPP" >&6
2003 for ac_c_preproc_warn_flag in '' yes
2005 # Use a header file that comes with gcc, so configuring glibc
2006 # with a fresh cross-compiler works.
2007 # On the NeXT, cc -E runs the code through the compiler's parser,
2008 # not just through cpp. "Syntax error" is here to catch this case.
2009 cat >conftest.$ac_ext <<_ACEOF
2010 #line 2010 "configure"
2011 #include "confdefs.h"
2015 if { (eval echo "$as_me:2015: \"$ac_cpp conftest.$ac_ext\"") >&5
2016 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2018 egrep -v '^ *\+' conftest.er1 >conftest.err
2020 cat conftest.err >&5
2021 echo "$as_me:2021: \$? = $ac_status" >&5
2022 (exit $ac_status); } >/dev/null; then
2023 if test -s conftest.err; then
2024 ac_cpp_err=$ac_c_preproc_warn_flag
2031 if test -z "$ac_cpp_err"; then
2034 echo "$as_me: failed program was:" >&5
2035 cat conftest.$ac_ext >&5
2036 # Broken: fails on valid input.
2039 rm -f conftest.err conftest.$ac_ext
2041 # OK, works on sane cases. Now check whether non-existent headers
2042 # can be detected and how.
2043 cat >conftest.$ac_ext <<_ACEOF
2044 #line 2044 "configure"
2045 #include "confdefs.h"
2046 #include <ac_nonexistent.h>
2048 if { (eval echo "$as_me:2048: \"$ac_cpp conftest.$ac_ext\"") >&5
2049 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2051 egrep -v '^ *\+' conftest.er1 >conftest.err
2053 cat conftest.err >&5
2054 echo "$as_me:2054: \$? = $ac_status" >&5
2055 (exit $ac_status); } >/dev/null; then
2056 if test -s conftest.err; then
2057 ac_cpp_err=$ac_c_preproc_warn_flag
2064 if test -z "$ac_cpp_err"; then
2065 # Broken: success on invalid input.
2068 echo "$as_me: failed program was:" >&5
2069 cat conftest.$ac_ext >&5
2070 # Passes both tests.
2074 rm -f conftest.err conftest.$ac_ext
2077 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2078 rm -f conftest.err conftest.$ac_ext
2079 if $ac_preproc_ok; then
2082 { { echo "$as_me:2082: error: C preprocessor \"$CPP\" fails sanity check" >&5
2083 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2084 { (exit 1); exit 1; }; }
2088 ac_cpp='$CPP $CPPFLAGS'
2089 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2090 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2091 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2092 ac_main_return=return
2094 if test $ac_cv_c_compiler_gnu = yes; then
2095 echo "$as_me:2095: checking whether $CC needs -traditional" >&5
2096 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2097 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2098 echo $ECHO_N "(cached) $ECHO_C" >&6
2100 ac_pattern="Autoconf.*'x'"
2101 cat >conftest.$ac_ext <<_ACEOF
2102 #line 2102 "configure"
2103 #include "confdefs.h"
2105 int Autoconf = TIOCGETP;
2107 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2108 egrep "$ac_pattern" >/dev/null 2>&1; then
2109 ac_cv_prog_gcc_traditional=yes
2111 ac_cv_prog_gcc_traditional=no
2115 if test $ac_cv_prog_gcc_traditional = no; then
2116 cat >conftest.$ac_ext <<_ACEOF
2117 #line 2117 "configure"
2118 #include "confdefs.h"
2120 int Autoconf = TCGETA;
2122 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2123 egrep "$ac_pattern" >/dev/null 2>&1; then
2124 ac_cv_prog_gcc_traditional=yes
2130 echo "$as_me:2130: result: $ac_cv_prog_gcc_traditional" >&5
2131 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2132 if test $ac_cv_prog_gcc_traditional = yes; then
2133 CC="$CC -traditional"
2137 echo "$as_me:2137: checking whether $CC understands -c and -o together" >&5
2138 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2139 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2140 echo $ECHO_N "(cached) $ECHO_C" >&6
2143 cat > conftest.$ac_ext <<CF_EOF
2147 ${cf_cv_main_return:-return}(0);
2150 # We do the test twice because some compilers refuse to overwrite an
2151 # existing .o file with -o, though they will create one.
2152 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2153 if { (eval echo "$as_me:2153: \"$ac_try\"") >&5
2156 echo "$as_me:2156: \$? = $ac_status" >&5
2157 (exit $ac_status); } &&
2158 test -f conftest2.$ac_objext && { (eval echo "$as_me:2158: \"$ac_try\"") >&5
2161 echo "$as_me:2161: \$? = $ac_status" >&5
2162 (exit $ac_status); };
2164 eval cf_cv_prog_CC_c_o=yes
2166 eval cf_cv_prog_CC_c_o=no
2171 if test $cf_cv_prog_CC_c_o = yes; then
2172 echo "$as_me:2172: result: yes" >&5
2173 echo "${ECHO_T}yes" >&6
2175 echo "$as_me:2175: result: no" >&5
2176 echo "${ECHO_T}no" >&6
2179 test "$program_prefix" != NONE &&
2180 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2181 # Use a double $ so make ignores it.
2182 test "$program_suffix" != NONE &&
2183 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2184 # Double any \ or $. echo might interpret backslashes.
2185 # By default was `s,x,x', remove it if useless.
2186 cat <<\_ACEOF >conftest.sed
2187 s/[\\$]/&&/g;s/;s,x,x,$//
2189 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2192 for ac_prog in mawk gawk nawk awk
2194 # Extract the first word of "$ac_prog", so it can be a program name with args.
2195 set dummy $ac_prog; ac_word=$2
2196 echo "$as_me:2196: checking for $ac_word" >&5
2197 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2198 if test "${ac_cv_prog_AWK+set}" = set; then
2199 echo $ECHO_N "(cached) $ECHO_C" >&6
2201 if test -n "$AWK"; then
2202 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2204 ac_save_IFS=$IFS; IFS=$ac_path_separator
2206 for ac_dir in $ac_dummy; do
2208 test -z "$ac_dir" && ac_dir=.
2209 $as_executable_p "$ac_dir/$ac_word" || continue
2210 ac_cv_prog_AWK="$ac_prog"
2211 echo "$as_me:2211: found $ac_dir/$ac_word" >&5
2218 if test -n "$AWK"; then
2219 echo "$as_me:2219: result: $AWK" >&5
2220 echo "${ECHO_T}$AWK" >&6
2222 echo "$as_me:2222: result: no" >&5
2223 echo "${ECHO_T}no" >&6
2226 test -n "$AWK" && break
2229 test -z "$AWK" && { { echo "$as_me:2229: error: No awk program found" >&5
2230 echo "$as_me: error: No awk program found" >&2;}
2231 { (exit 1); exit 1; }; }
2233 echo "$as_me:2233: checking for egrep" >&5
2234 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2235 if test "${ac_cv_prog_egrep+set}" = set; then
2236 echo $ECHO_N "(cached) $ECHO_C" >&6
2238 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2239 then ac_cv_prog_egrep='grep -E'
2240 else ac_cv_prog_egrep='egrep'
2243 echo "$as_me:2243: result: $ac_cv_prog_egrep" >&5
2244 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2245 EGREP=$ac_cv_prog_egrep
2247 test -z "$EGREP" && { { echo "$as_me:2247: error: No egrep program found" >&5
2248 echo "$as_me: error: No egrep program found" >&2;}
2249 { (exit 1); exit 1; }; }
2251 # Find a good install program. We prefer a C program (faster),
2252 # so one script is as good as another. But avoid the broken or
2253 # incompatible versions:
2254 # SysV /etc/install, /usr/sbin/install
2255 # SunOS /usr/etc/install
2256 # IRIX /sbin/install
2258 # AmigaOS /C/install, which installs bootblocks on floppy discs
2259 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2260 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2261 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2262 # ./install, which can be erroneously created by make from ./install.sh.
2263 echo "$as_me:2263: checking for a BSD compatible install" >&5
2264 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2265 if test -z "$INSTALL"; then
2266 if test "${ac_cv_path_install+set}" = set; then
2267 echo $ECHO_N "(cached) $ECHO_C" >&6
2269 ac_save_IFS=$IFS; IFS=$ac_path_separator
2270 for ac_dir in $PATH; do
2272 # Account for people who put trailing slashes in PATH elements.
2274 / | ./ | .// | /cC/* \
2275 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2278 # OSF1 and SCO ODT 3.0 have their own names for install.
2279 # Don't use installbsd from OSF since it installs stuff as root
2281 for ac_prog in ginstall scoinst install; do
2282 if $as_executable_p "$ac_dir/$ac_prog"; then
2283 if test $ac_prog = install &&
2284 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2285 # AIX install. It has an incompatible calling convention.
2287 elif test $ac_prog = install &&
2288 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2289 # program-specific install script used by HP pwplus--don't use.
2292 ac_cv_path_install="$ac_dir/$ac_prog -c"
2302 if test "${ac_cv_path_install+set}" = set; then
2303 INSTALL=$ac_cv_path_install
2305 # As a last resort, use the slow shell script. We don't cache a
2306 # path for INSTALL within a source directory, because that will
2307 # break other packages using the cache if that directory is
2308 # removed, or if the path is relative.
2309 INSTALL=$ac_install_sh
2312 echo "$as_me:2312: result: $INSTALL" >&5
2313 echo "${ECHO_T}$INSTALL" >&6
2315 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2316 # It thinks the first close brace ends the variable substitution.
2317 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2319 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2321 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2323 echo "$as_me:2323: checking whether ln -s works" >&5
2324 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2326 if test "$LN_S" = "ln -s"; then
2327 echo "$as_me:2327: result: yes" >&5
2328 echo "${ECHO_T}yes" >&6
2330 echo "$as_me:2330: result: no, using $LN_S" >&5
2331 echo "${ECHO_T}no, using $LN_S" >&6
2334 echo "$as_me:2334: checking if $LN_S -f options work" >&5
2335 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2337 rm -f conf$$.src conf$$dst
2339 echo first >conf$$.src
2340 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2345 rm -f conf$$.dst conf$$src
2346 echo "$as_me:2346: result: $cf_prog_ln_sf" >&5
2347 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2349 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2351 echo "$as_me:2351: checking for long file names" >&5
2352 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2353 if test "${ac_cv_sys_long_file_names+set}" = set; then
2354 echo $ECHO_N "(cached) $ECHO_C" >&6
2356 ac_cv_sys_long_file_names=yes
2357 # Test for long file names in all the places we know might matter:
2358 # . the current directory, where building will happen
2359 # $prefix/lib where we will be installing things
2360 # $exec_prefix/lib likewise
2361 # eval it to expand exec_prefix.
2362 # $TMPDIR if set, where it might want to write temporary files
2363 # if $TMPDIR is not set:
2364 # /tmp where it might want to write temporary files
2367 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2370 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2372 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2373 test -d $ac_dir || continue
2374 test -w $ac_dir || continue # It is less confusing to not echo anything here.
2375 ac_xdir=$ac_dir/cf$$
2376 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2377 ac_tf1=$ac_xdir/conftest9012345
2378 ac_tf2=$ac_xdir/conftest9012346
2379 (echo 1 >$ac_tf1) 2>/dev/null
2380 (echo 2 >$ac_tf2) 2>/dev/null
2381 ac_val=`cat $ac_tf1 2>/dev/null`
2382 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2383 ac_cv_sys_long_file_names=no
2384 rm -rf $ac_xdir 2>/dev/null
2387 rm -rf $ac_xdir 2>/dev/null
2390 echo "$as_me:2390: result: $ac_cv_sys_long_file_names" >&5
2391 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2392 if test $ac_cv_sys_long_file_names = yes; then
2394 cat >>confdefs.h <<\EOF
2395 #define HAVE_LONG_FILE_NAMES 1
2400 # if we find pkg-config, check if we should install the ".pc" files.
2402 echo "$as_me:2402: checking if you want to use pkg-config" >&5
2403 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2405 # Check whether --with-pkg-config or --without-pkg-config was given.
2406 if test "${with_pkg_config+set}" = set; then
2407 withval="$with_pkg_config"
2408 cf_pkg_config=$withval
2412 echo "$as_me:2412: result: $cf_pkg_config" >&5
2413 echo "${ECHO_T}$cf_pkg_config" >&6
2415 case $cf_pkg_config in
2421 if test -n "$ac_tool_prefix"; then
2422 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
2423 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
2424 echo "$as_me:2424: checking for $ac_word" >&5
2425 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2426 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2427 echo $ECHO_N "(cached) $ECHO_C" >&6
2431 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2434 ac_save_IFS=$IFS; IFS=$ac_path_separator
2436 for ac_dir in $ac_dummy; do
2438 test -z "$ac_dir" && ac_dir=.
2439 if $as_executable_p "$ac_dir/$ac_word"; then
2440 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2441 echo "$as_me:2441: found $ac_dir/$ac_word" >&5
2449 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2451 if test -n "$PKG_CONFIG"; then
2452 echo "$as_me:2452: result: $PKG_CONFIG" >&5
2453 echo "${ECHO_T}$PKG_CONFIG" >&6
2455 echo "$as_me:2455: result: no" >&5
2456 echo "${ECHO_T}no" >&6
2460 if test -z "$ac_cv_path_PKG_CONFIG"; then
2461 ac_pt_PKG_CONFIG=$PKG_CONFIG
2462 # Extract the first word of "pkg-config", so it can be a program name with args.
2463 set dummy pkg-config; ac_word=$2
2464 echo "$as_me:2464: checking for $ac_word" >&5
2465 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2466 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
2467 echo $ECHO_N "(cached) $ECHO_C" >&6
2469 case $ac_pt_PKG_CONFIG in
2471 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
2474 ac_save_IFS=$IFS; IFS=$ac_path_separator
2476 for ac_dir in $ac_dummy; do
2478 test -z "$ac_dir" && ac_dir=.
2479 if $as_executable_p "$ac_dir/$ac_word"; then
2480 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
2481 echo "$as_me:2481: found $ac_dir/$ac_word" >&5
2486 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
2490 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
2492 if test -n "$ac_pt_PKG_CONFIG"; then
2493 echo "$as_me:2493: result: $ac_pt_PKG_CONFIG" >&5
2494 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
2496 echo "$as_me:2496: result: no" >&5
2497 echo "${ECHO_T}no" >&6
2500 PKG_CONFIG=$ac_pt_PKG_CONFIG
2502 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
2511 test -z "$PKG_CONFIG" && PKG_CONFIG=none
2512 if test "$PKG_CONFIG" != none ; then
2514 if test "x$prefix" != xNONE; then
2515 cf_path_syntax="$prefix"
2517 cf_path_syntax="$ac_default_prefix"
2520 case ".$PKG_CONFIG" in
2525 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
2527 (.\${*prefix}*|.\${*dir}*)
2528 eval PKG_CONFIG="$PKG_CONFIG"
2529 case ".$PKG_CONFIG" in
2531 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2536 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2539 { { echo "$as_me:2539: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
2540 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
2541 { (exit 1); exit 1; }; }
2545 elif test "x$cf_pkg_config" != xno ; then
2546 { echo "$as_me:2546: WARNING: pkg-config is not installed" >&5
2547 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
2550 echo "$as_me:2550: checking for $PKG_CONFIG library directory" >&5
2551 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
2552 if test "x$PKG_CONFIG" = xnone ; then
2553 PKG_CONFIG_LIBDIR=none
2556 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
2557 if test "${with_pkg_config_libdir+set}" = set; then
2558 withval="$with_pkg_config_libdir"
2559 PKG_CONFIG_LIBDIR=$withval
2561 PKG_CONFIG_LIBDIR=yes
2565 case x$PKG_CONFIG_LIBDIR in
2569 # Look for the library directory using the same prefix as the executable
2570 if test "x$PKG_CONFIG" = xnone
2574 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
2577 # If you don't like using the default architecture, you have to specify the
2578 # intended library directory and corresponding compiler/linker options.
2580 # This case allows for Debian's 2014-flavor of multiarch, along with the
2581 # most common variations before that point. Some other variants spell the
2582 # directory differently, e.g., "pkg-config", and put it in unusual places.
2583 # pkg-config has always been poorly standardized, which is ironic...
2584 case x`(arch) 2>/dev/null` in
2587 $cf_path/lib/*64-linux-gnu \
2595 $cf_path/lib/*-linux-gnu \
2603 test -n "$verbose" && echo " list..." 1>&6
2605 echo "${as_me:-configure}:2605: testing list... ..." 1>&5
2607 for cf_config in $cf_search_path
2609 test -n "$verbose" && echo " checking $cf_config/pkgconfig" 1>&6
2611 echo "${as_me:-configure}:2611: testing checking $cf_config/pkgconfig ..." 1>&5
2613 if test -d $cf_config/pkgconfig
2615 PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
2616 echo "$as_me:2616: checking done" >&5
2617 echo $ECHO_N "checking done... $ECHO_C" >&6
2626 if test "x$PKG_CONFIG" != xnone ; then
2627 echo "$as_me:2627: result: $PKG_CONFIG_LIBDIR" >&5
2628 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
2631 echo "$as_me:2631: checking if you want to build test-programs" >&5
2632 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2634 # Check whether --with-tests or --without-tests was given.
2635 if test "${with_tests+set}" = set; then
2636 withval="$with_tests"
2637 cf_with_tests=$withval
2641 echo "$as_me:2641: result: $cf_with_tests" >&5
2642 echo "${ECHO_T}$cf_with_tests" >&6
2644 echo "$as_me:2644: checking if we should assume mixed-case filenames" >&5
2645 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
2647 # Check whether --enable-mixed-case or --disable-mixed-case was given.
2648 if test "${enable_mixed_case+set}" = set; then
2649 enableval="$enable_mixed_case"
2650 enable_mixedcase=$enableval
2652 enable_mixedcase=auto
2654 echo "$as_me:2654: result: $enable_mixedcase" >&5
2655 echo "${ECHO_T}$enable_mixedcase" >&6
2656 if test "$enable_mixedcase" = "auto" ; then
2658 echo "$as_me:2658: checking if filesystem supports mixed-case filenames" >&5
2659 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2660 if test "${cf_cv_mixedcase+set}" = set; then
2661 echo $ECHO_N "(cached) $ECHO_C" >&6
2664 if test "$cross_compiling" = yes ; then
2665 case $target_alias in
2666 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2674 rm -f conftest CONFTEST
2676 if test -f CONFTEST ; then
2681 rm -f conftest CONFTEST
2685 echo "$as_me:2685: result: $cf_cv_mixedcase" >&5
2686 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2687 test "$cf_cv_mixedcase" = yes &&
2688 cat >>confdefs.h <<\EOF
2689 #define MIXEDCASE_FILENAMES 1
2693 cf_cv_mixedcase=$enable_mixedcase
2694 if test "$enable_mixedcase" = "yes" ; then
2695 cat >>confdefs.h <<\EOF
2696 #define MIXEDCASE_FILENAMES 1
2702 # do this after mixed-case option (tags/TAGS is not as important as tic).
2703 echo "$as_me:2703: checking whether ${MAKE-make} sets \${MAKE}" >&5
2704 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2705 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2706 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2707 echo $ECHO_N "(cached) $ECHO_C" >&6
2709 cat >conftest.make <<\EOF
2711 @echo 'ac_maketemp="${MAKE}"'
2713 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2714 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2715 if test -n "$ac_maketemp"; then
2716 eval ac_cv_prog_make_${ac_make}_set=yes
2718 eval ac_cv_prog_make_${ac_make}_set=no
2722 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2723 echo "$as_me:2723: result: yes" >&5
2724 echo "${ECHO_T}yes" >&6
2727 echo "$as_me:2727: result: no" >&5
2728 echo "${ECHO_T}no" >&6
2729 SET_MAKE="MAKE=${MAKE-make}"
2732 for ac_prog in exctags ctags
2734 # Extract the first word of "$ac_prog", so it can be a program name with args.
2735 set dummy $ac_prog; ac_word=$2
2736 echo "$as_me:2736: checking for $ac_word" >&5
2737 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2738 if test "${ac_cv_prog_CTAGS+set}" = set; then
2739 echo $ECHO_N "(cached) $ECHO_C" >&6
2741 if test -n "$CTAGS"; then
2742 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2744 ac_save_IFS=$IFS; IFS=$ac_path_separator
2746 for ac_dir in $ac_dummy; do
2748 test -z "$ac_dir" && ac_dir=.
2749 $as_executable_p "$ac_dir/$ac_word" || continue
2750 ac_cv_prog_CTAGS="$ac_prog"
2751 echo "$as_me:2751: found $ac_dir/$ac_word" >&5
2757 CTAGS=$ac_cv_prog_CTAGS
2758 if test -n "$CTAGS"; then
2759 echo "$as_me:2759: result: $CTAGS" >&5
2760 echo "${ECHO_T}$CTAGS" >&6
2762 echo "$as_me:2762: result: no" >&5
2763 echo "${ECHO_T}no" >&6
2766 test -n "$CTAGS" && break
2769 for ac_prog in exetags etags
2771 # Extract the first word of "$ac_prog", so it can be a program name with args.
2772 set dummy $ac_prog; ac_word=$2
2773 echo "$as_me:2773: checking for $ac_word" >&5
2774 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2775 if test "${ac_cv_prog_ETAGS+set}" = set; then
2776 echo $ECHO_N "(cached) $ECHO_C" >&6
2778 if test -n "$ETAGS"; then
2779 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2781 ac_save_IFS=$IFS; IFS=$ac_path_separator
2783 for ac_dir in $ac_dummy; do
2785 test -z "$ac_dir" && ac_dir=.
2786 $as_executable_p "$ac_dir/$ac_word" || continue
2787 ac_cv_prog_ETAGS="$ac_prog"
2788 echo "$as_me:2788: found $ac_dir/$ac_word" >&5
2794 ETAGS=$ac_cv_prog_ETAGS
2795 if test -n "$ETAGS"; then
2796 echo "$as_me:2796: result: $ETAGS" >&5
2797 echo "${ECHO_T}$ETAGS" >&6
2799 echo "$as_me:2799: result: no" >&5
2800 echo "${ECHO_T}no" >&6
2803 test -n "$ETAGS" && break
2806 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2807 set dummy ${CTAGS:-ctags}; ac_word=$2
2808 echo "$as_me:2808: checking for $ac_word" >&5
2809 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2810 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2811 echo $ECHO_N "(cached) $ECHO_C" >&6
2813 if test -n "$MAKE_LOWER_TAGS"; then
2814 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2816 ac_save_IFS=$IFS; IFS=$ac_path_separator
2818 for ac_dir in $ac_dummy; do
2820 test -z "$ac_dir" && ac_dir=.
2821 $as_executable_p "$ac_dir/$ac_word" || continue
2822 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2823 echo "$as_me:2823: found $ac_dir/$ac_word" >&5
2827 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2830 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2831 if test -n "$MAKE_LOWER_TAGS"; then
2832 echo "$as_me:2832: result: $MAKE_LOWER_TAGS" >&5
2833 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2835 echo "$as_me:2835: result: no" >&5
2836 echo "${ECHO_T}no" >&6
2839 if test "$cf_cv_mixedcase" = yes ; then
2840 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2841 set dummy ${ETAGS:-etags}; ac_word=$2
2842 echo "$as_me:2842: checking for $ac_word" >&5
2843 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2844 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2845 echo $ECHO_N "(cached) $ECHO_C" >&6
2847 if test -n "$MAKE_UPPER_TAGS"; then
2848 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2850 ac_save_IFS=$IFS; IFS=$ac_path_separator
2852 for ac_dir in $ac_dummy; do
2854 test -z "$ac_dir" && ac_dir=.
2855 $as_executable_p "$ac_dir/$ac_word" || continue
2856 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2857 echo "$as_me:2857: found $ac_dir/$ac_word" >&5
2861 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2864 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2865 if test -n "$MAKE_UPPER_TAGS"; then
2866 echo "$as_me:2866: result: $MAKE_UPPER_TAGS" >&5
2867 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2869 echo "$as_me:2869: result: no" >&5
2870 echo "${ECHO_T}no" >&6
2877 if test "$MAKE_UPPER_TAGS" = yes ; then
2883 if test "$MAKE_LOWER_TAGS" = yes ; then
2889 echo "$as_me:2889: checking for makeflags variable" >&5
2890 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
2891 if test "${cf_cv_makeflags+set}" = set; then
2892 echo $ECHO_N "(cached) $ECHO_C" >&6
2896 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
2898 cat >cf_makeflags.tmp <<CF_EOF
2901 @ echo '.$cf_option'
2903 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ ]*$,,'`
2904 case "$cf_result" in
2906 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
2907 case "$cf_result" in
2908 (.*CC=*) cf_cv_makeflags=
2910 (*) cf_cv_makeflags=$cf_option
2916 (*) echo "given option \"$cf_option\", no match \"$cf_result\""
2920 rm -f cf_makeflags.tmp
2923 echo "$as_me:2923: result: $cf_cv_makeflags" >&5
2924 echo "${ECHO_T}$cf_cv_makeflags" >&6
2926 if test -n "$ac_tool_prefix"; then
2927 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2928 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2929 echo "$as_me:2929: checking for $ac_word" >&5
2930 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2931 if test "${ac_cv_prog_RANLIB+set}" = set; then
2932 echo $ECHO_N "(cached) $ECHO_C" >&6
2934 if test -n "$RANLIB"; then
2935 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2937 ac_save_IFS=$IFS; IFS=$ac_path_separator
2939 for ac_dir in $ac_dummy; do
2941 test -z "$ac_dir" && ac_dir=.
2942 $as_executable_p "$ac_dir/$ac_word" || continue
2943 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2944 echo "$as_me:2944: found $ac_dir/$ac_word" >&5
2950 RANLIB=$ac_cv_prog_RANLIB
2951 if test -n "$RANLIB"; then
2952 echo "$as_me:2952: result: $RANLIB" >&5
2953 echo "${ECHO_T}$RANLIB" >&6
2955 echo "$as_me:2955: result: no" >&5
2956 echo "${ECHO_T}no" >&6
2960 if test -z "$ac_cv_prog_RANLIB"; then
2961 ac_ct_RANLIB=$RANLIB
2962 # Extract the first word of "ranlib", so it can be a program name with args.
2963 set dummy ranlib; ac_word=$2
2964 echo "$as_me:2964: checking for $ac_word" >&5
2965 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2966 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2967 echo $ECHO_N "(cached) $ECHO_C" >&6
2969 if test -n "$ac_ct_RANLIB"; then
2970 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2972 ac_save_IFS=$IFS; IFS=$ac_path_separator
2974 for ac_dir in $ac_dummy; do
2976 test -z "$ac_dir" && ac_dir=.
2977 $as_executable_p "$ac_dir/$ac_word" || continue
2978 ac_cv_prog_ac_ct_RANLIB="ranlib"
2979 echo "$as_me:2979: found $ac_dir/$ac_word" >&5
2983 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
2986 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2987 if test -n "$ac_ct_RANLIB"; then
2988 echo "$as_me:2988: result: $ac_ct_RANLIB" >&5
2989 echo "${ECHO_T}$ac_ct_RANLIB" >&6
2991 echo "$as_me:2991: result: no" >&5
2992 echo "${ECHO_T}no" >&6
2995 RANLIB=$ac_ct_RANLIB
2997 RANLIB="$ac_cv_prog_RANLIB"
3000 if test -n "$ac_tool_prefix"; then
3001 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3002 set dummy ${ac_tool_prefix}ld; ac_word=$2
3003 echo "$as_me:3003: checking for $ac_word" >&5
3004 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3005 if test "${ac_cv_prog_LD+set}" = set; then
3006 echo $ECHO_N "(cached) $ECHO_C" >&6
3008 if test -n "$LD"; then
3009 ac_cv_prog_LD="$LD" # Let the user override the test.
3011 ac_save_IFS=$IFS; IFS=$ac_path_separator
3013 for ac_dir in $ac_dummy; do
3015 test -z "$ac_dir" && ac_dir=.
3016 $as_executable_p "$ac_dir/$ac_word" || continue
3017 ac_cv_prog_LD="${ac_tool_prefix}ld"
3018 echo "$as_me:3018: found $ac_dir/$ac_word" >&5
3025 if test -n "$LD"; then
3026 echo "$as_me:3026: result: $LD" >&5
3027 echo "${ECHO_T}$LD" >&6
3029 echo "$as_me:3029: result: no" >&5
3030 echo "${ECHO_T}no" >&6
3034 if test -z "$ac_cv_prog_LD"; then
3036 # Extract the first word of "ld", so it can be a program name with args.
3037 set dummy ld; ac_word=$2
3038 echo "$as_me:3038: checking for $ac_word" >&5
3039 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3040 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3041 echo $ECHO_N "(cached) $ECHO_C" >&6
3043 if test -n "$ac_ct_LD"; then
3044 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3046 ac_save_IFS=$IFS; IFS=$ac_path_separator
3048 for ac_dir in $ac_dummy; do
3050 test -z "$ac_dir" && ac_dir=.
3051 $as_executable_p "$ac_dir/$ac_word" || continue
3052 ac_cv_prog_ac_ct_LD="ld"
3053 echo "$as_me:3053: found $ac_dir/$ac_word" >&5
3057 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3060 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3061 if test -n "$ac_ct_LD"; then
3062 echo "$as_me:3062: result: $ac_ct_LD" >&5
3063 echo "${ECHO_T}$ac_ct_LD" >&6
3065 echo "$as_me:3065: result: no" >&5
3066 echo "${ECHO_T}no" >&6
3074 if test -n "$ac_tool_prefix"; then
3075 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3076 set dummy ${ac_tool_prefix}ar; ac_word=$2
3077 echo "$as_me:3077: checking for $ac_word" >&5
3078 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3079 if test "${ac_cv_prog_AR+set}" = set; then
3080 echo $ECHO_N "(cached) $ECHO_C" >&6
3082 if test -n "$AR"; then
3083 ac_cv_prog_AR="$AR" # Let the user override the test.
3085 ac_save_IFS=$IFS; IFS=$ac_path_separator
3087 for ac_dir in $ac_dummy; do
3089 test -z "$ac_dir" && ac_dir=.
3090 $as_executable_p "$ac_dir/$ac_word" || continue
3091 ac_cv_prog_AR="${ac_tool_prefix}ar"
3092 echo "$as_me:3092: found $ac_dir/$ac_word" >&5
3099 if test -n "$AR"; then
3100 echo "$as_me:3100: result: $AR" >&5
3101 echo "${ECHO_T}$AR" >&6
3103 echo "$as_me:3103: result: no" >&5
3104 echo "${ECHO_T}no" >&6
3108 if test -z "$ac_cv_prog_AR"; then
3110 # Extract the first word of "ar", so it can be a program name with args.
3111 set dummy ar; ac_word=$2
3112 echo "$as_me:3112: checking for $ac_word" >&5
3113 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3114 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3115 echo $ECHO_N "(cached) $ECHO_C" >&6
3117 if test -n "$ac_ct_AR"; then
3118 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3120 ac_save_IFS=$IFS; IFS=$ac_path_separator
3122 for ac_dir in $ac_dummy; do
3124 test -z "$ac_dir" && ac_dir=.
3125 $as_executable_p "$ac_dir/$ac_word" || continue
3126 ac_cv_prog_ac_ct_AR="ar"
3127 echo "$as_me:3127: found $ac_dir/$ac_word" >&5
3131 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3134 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3135 if test -n "$ac_ct_AR"; then
3136 echo "$as_me:3136: result: $ac_ct_AR" >&5
3137 echo "${ECHO_T}$ac_ct_AR" >&6
3139 echo "$as_me:3139: result: no" >&5
3140 echo "${ECHO_T}no" >&6
3148 if test -n "$ac_tool_prefix"; then
3149 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3150 set dummy ${ac_tool_prefix}ar; ac_word=$2
3151 echo "$as_me:3151: checking for $ac_word" >&5
3152 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3153 if test "${ac_cv_prog_AR+set}" = set; then
3154 echo $ECHO_N "(cached) $ECHO_C" >&6
3156 if test -n "$AR"; then
3157 ac_cv_prog_AR="$AR" # Let the user override the test.
3159 ac_save_IFS=$IFS; IFS=$ac_path_separator
3161 for ac_dir in $ac_dummy; do
3163 test -z "$ac_dir" && ac_dir=.
3164 $as_executable_p "$ac_dir/$ac_word" || continue
3165 ac_cv_prog_AR="${ac_tool_prefix}ar"
3166 echo "$as_me:3166: found $ac_dir/$ac_word" >&5
3173 if test -n "$AR"; then
3174 echo "$as_me:3174: result: $AR" >&5
3175 echo "${ECHO_T}$AR" >&6
3177 echo "$as_me:3177: result: no" >&5
3178 echo "${ECHO_T}no" >&6
3182 if test -z "$ac_cv_prog_AR"; then
3184 # Extract the first word of "ar", so it can be a program name with args.
3185 set dummy ar; ac_word=$2
3186 echo "$as_me:3186: checking for $ac_word" >&5
3187 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3188 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3189 echo $ECHO_N "(cached) $ECHO_C" >&6
3191 if test -n "$ac_ct_AR"; then
3192 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3194 ac_save_IFS=$IFS; IFS=$ac_path_separator
3196 for ac_dir in $ac_dummy; do
3198 test -z "$ac_dir" && ac_dir=.
3199 $as_executable_p "$ac_dir/$ac_word" || continue
3200 ac_cv_prog_ac_ct_AR="ar"
3201 echo "$as_me:3201: found $ac_dir/$ac_word" >&5
3205 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3208 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3209 if test -n "$ac_ct_AR"; then
3210 echo "$as_me:3210: result: $ac_ct_AR" >&5
3211 echo "${ECHO_T}$ac_ct_AR" >&6
3213 echo "$as_me:3213: result: no" >&5
3214 echo "${ECHO_T}no" >&6
3222 echo "$as_me:3222: checking for options to update archives" >&5
3223 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3224 if test "${cf_cv_ar_flags+set}" = set; then
3225 echo $ECHO_N "(cached) $ECHO_C" >&6
3228 cf_cv_ar_flags=unknown
3229 for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
3232 # check if $ARFLAGS already contains this choice
3233 if test "x$ARFLAGS" != "x" ; then
3234 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3235 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3241 rm -f conftest.$ac_cv_objext
3244 cat >conftest.$ac_ext <<EOF
3245 #line 3245 "configure"
3246 int testdata[3] = { 123, 456, 789 };
3248 if { (eval echo "$as_me:3248: \"$ac_compile\"") >&5
3249 (eval $ac_compile) 2>&5
3251 echo "$as_me:3251: \$? = $ac_status" >&5
3252 (exit $ac_status); } ; then
3253 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3254 $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3255 if test -f conftest.a ; then
3256 cf_cv_ar_flags=$cf_ar_flags
3260 test -n "$verbose" && echo " cannot compile test-program" 1>&6
3262 echo "${as_me:-configure}:3262: testing cannot compile test-program ..." 1>&5
3267 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3270 echo "$as_me:3270: result: $cf_cv_ar_flags" >&5
3271 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3273 if test -n "$ARFLAGS" ; then
3274 if test -n "$cf_cv_ar_flags" ; then
3275 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3278 ARFLAGS=$cf_cv_ar_flags
3281 echo "$as_me:3281: checking for PATH separator" >&5
3282 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
3283 case $cf_cv_system_name in
3284 (os2*) PATH_SEPARATOR=';' ;;
3285 (*) ${PATH_SEPARATOR:=':'} ;;
3288 echo "$as_me:3288: result: $PATH_SEPARATOR" >&5
3289 echo "${ECHO_T}$PATH_SEPARATOR" >&6
3291 echo "$as_me:3291: checking if you have specified an install-prefix" >&5
3292 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3294 # Check whether --with-install-prefix or --without-install-prefix was given.
3295 if test "${with_install_prefix+set}" = set; then
3296 withval="$with_install_prefix"
3300 (*) DESTDIR="$withval"
3304 echo "$as_me:3304: result: $DESTDIR" >&5
3305 echo "${ECHO_T}$DESTDIR" >&6
3307 ###############################################################################
3309 # If we're cross-compiling, allow the user to override the tools and their
3310 # options. The configure script is oriented toward identifying the host
3311 # compiler, etc., but we need a build compiler to generate parts of the source.
3313 if test "$cross_compiling" = yes ; then
3315 # defaults that we might want to override
3316 : ${BUILD_CFLAGS:=''}
3317 : ${BUILD_CPPFLAGS:=''}
3318 : ${BUILD_LDFLAGS:=''}
3320 : ${BUILD_EXEEXT:='$x'}
3321 : ${BUILD_OBJEXT:='o'}
3323 # Check whether --with-build-cc or --without-build-cc was given.
3324 if test "${with_build_cc+set}" = set; then
3325 withval="$with_build_cc"
3328 for ac_prog in gcc cc cl
3330 # Extract the first word of "$ac_prog", so it can be a program name with args.
3331 set dummy $ac_prog; ac_word=$2
3332 echo "$as_me:3332: checking for $ac_word" >&5
3333 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3334 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3335 echo $ECHO_N "(cached) $ECHO_C" >&6
3337 if test -n "$BUILD_CC"; then
3338 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3340 ac_save_IFS=$IFS; IFS=$ac_path_separator
3342 for ac_dir in $ac_dummy; do
3344 test -z "$ac_dir" && ac_dir=.
3345 $as_executable_p "$ac_dir/$ac_word" || continue
3346 ac_cv_prog_BUILD_CC="$ac_prog"
3347 echo "$as_me:3347: found $ac_dir/$ac_word" >&5
3353 BUILD_CC=$ac_cv_prog_BUILD_CC
3354 if test -n "$BUILD_CC"; then
3355 echo "$as_me:3355: result: $BUILD_CC" >&5
3356 echo "${ECHO_T}$BUILD_CC" >&6
3358 echo "$as_me:3358: result: no" >&5
3359 echo "${ECHO_T}no" >&6
3362 test -n "$BUILD_CC" && break
3366 echo "$as_me:3366: checking for native build C compiler" >&5
3367 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3368 echo "$as_me:3368: result: $BUILD_CC" >&5
3369 echo "${ECHO_T}$BUILD_CC" >&6
3371 echo "$as_me:3371: checking for native build C preprocessor" >&5
3372 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3374 # Check whether --with-build-cpp or --without-build-cpp was given.
3375 if test "${with_build_cpp+set}" = set; then
3376 withval="$with_build_cpp"
3377 BUILD_CPP="$withval"
3379 BUILD_CPP='${BUILD_CC} -E'
3381 echo "$as_me:3381: result: $BUILD_CPP" >&5
3382 echo "${ECHO_T}$BUILD_CPP" >&6
3384 echo "$as_me:3384: checking for native build C flags" >&5
3385 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3387 # Check whether --with-build-cflags or --without-build-cflags was given.
3388 if test "${with_build_cflags+set}" = set; then
3389 withval="$with_build_cflags"
3390 BUILD_CFLAGS="$withval"
3392 echo "$as_me:3392: result: $BUILD_CFLAGS" >&5
3393 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3395 echo "$as_me:3395: checking for native build C preprocessor-flags" >&5
3396 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3398 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3399 if test "${with_build_cppflags+set}" = set; then
3400 withval="$with_build_cppflags"
3401 BUILD_CPPFLAGS="$withval"
3403 echo "$as_me:3403: result: $BUILD_CPPFLAGS" >&5
3404 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3406 echo "$as_me:3406: checking for native build linker-flags" >&5
3407 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3409 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3410 if test "${with_build_ldflags+set}" = set; then
3411 withval="$with_build_ldflags"
3412 BUILD_LDFLAGS="$withval"
3414 echo "$as_me:3414: result: $BUILD_LDFLAGS" >&5
3415 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3417 echo "$as_me:3417: checking for native build linker-libraries" >&5
3418 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3420 # Check whether --with-build-libs or --without-build-libs was given.
3421 if test "${with_build_libs+set}" = set; then
3422 withval="$with_build_libs"
3423 BUILD_LIBS="$withval"
3425 echo "$as_me:3425: result: $BUILD_LIBS" >&5
3426 echo "${ECHO_T}$BUILD_LIBS" >&6
3428 # this assumes we're on Unix.
3432 : ${BUILD_CC:='${CC}'}
3434 if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3435 { { echo "$as_me:3435: error: Cross-build requires two compilers.
3436 Use --with-build-cc to specify the native compiler." >&5
3437 echo "$as_me: error: Cross-build requires two compilers.
3438 Use --with-build-cc to specify the native compiler." >&2;}
3439 { (exit 1); exit 1; }; }
3443 : ${BUILD_CC:='${CC}'}
3444 : ${BUILD_CPP:='${CPP}'}
3445 : ${BUILD_CFLAGS:='${CFLAGS}'}
3446 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3447 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3448 : ${BUILD_LIBS:='${LIBS}'}
3449 : ${BUILD_EXEEXT:='$x'}
3450 : ${BUILD_OBJEXT:='o'}
3453 ###############################################################################
3455 ### Options to allow the user to specify the set of libraries which are used.
3456 ### Use "--without-normal --with-shared" to allow the default model to be
3457 ### shared, for example.
3460 echo "$as_me:3460: checking if you want to build shared C-objects" >&5
3461 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
3463 # Check whether --with-shared or --without-shared was given.
3464 if test "${with_shared+set}" = set; then
3465 withval="$with_shared"
3466 with_shared=$withval
3470 echo "$as_me:3470: result: $with_shared" >&5
3471 echo "${ECHO_T}$with_shared" >&6
3472 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
3474 echo "$as_me:3474: checking for specified models" >&5
3475 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3476 test -z "$cf_list_models" && cf_list_models=normal
3477 echo "$as_me:3477: result: $cf_list_models" >&5
3478 echo "${ECHO_T}$cf_list_models" >&6
3480 ### Use the first model as the default, and save its suffix for use in building
3481 ### up test-applications.
3482 echo "$as_me:3482: checking for default model" >&5
3483 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3484 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3485 echo "$as_me:3485: result: $DFT_LWR_MODEL" >&5
3486 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3488 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3490 echo "$as_me:3490: checking for specific curses-directory" >&5
3491 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
3493 # Check whether --with-curses-dir or --without-curses-dir was given.
3494 if test "${with_curses_dir+set}" = set; then
3495 withval="$with_curses_dir"
3496 cf_cv_curses_dir=$withval
3500 echo "$as_me:3500: result: $cf_cv_curses_dir" >&5
3501 echo "${ECHO_T}$cf_cv_curses_dir" >&6
3503 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3506 if test "x$prefix" != xNONE; then
3507 cf_path_syntax="$prefix"
3509 cf_path_syntax="$ac_default_prefix"
3517 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3519 (.\${*prefix}*|.\${*dir}*)
3520 eval withval="$withval"
3523 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3528 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3531 { { echo "$as_me:3531: error: expected a pathname, not \"$withval\"" >&5
3532 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3533 { (exit 1); exit 1; }; }
3537 if test -d "$cf_cv_curses_dir"
3540 if test -n "$cf_cv_curses_dir/include" ; then
3541 for cf_add_incdir in $cf_cv_curses_dir/include
3543 while test $cf_add_incdir != /usr/include
3545 if test -d $cf_add_incdir
3548 if test -n "$CFLAGS$CPPFLAGS" ; then
3549 # a loop is needed to ensure we can add subdirs of existing dirs
3550 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3551 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3552 cf_have_incdir=yes; break
3557 if test "$cf_have_incdir" = no ; then
3558 if test "$cf_add_incdir" = /usr/local/include ; then
3559 if test "$GCC" = yes
3561 cf_save_CPPFLAGS=$CPPFLAGS
3562 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3563 cat >conftest.$ac_ext <<_ACEOF
3564 #line 3564 "configure"
3565 #include "confdefs.h"
3575 rm -f conftest.$ac_objext
3576 if { (eval echo "$as_me:3576: \"$ac_compile\"") >&5
3577 (eval $ac_compile) 2>&5
3579 echo "$as_me:3579: \$? = $ac_status" >&5
3580 (exit $ac_status); } &&
3581 { ac_try='test -s conftest.$ac_objext'
3582 { (eval echo "$as_me:3582: \"$ac_try\"") >&5
3585 echo "$as_me:3585: \$? = $ac_status" >&5
3586 (exit $ac_status); }; }; then
3589 echo "$as_me: failed program was:" >&5
3590 cat conftest.$ac_ext >&5
3593 rm -f conftest.$ac_objext conftest.$ac_ext
3594 CPPFLAGS=$cf_save_CPPFLAGS
3599 if test "$cf_have_incdir" = no ; then
3600 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3602 echo "${as_me:-configure}:3602: testing adding $cf_add_incdir to include-path ..." 1>&5
3604 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3606 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3607 test "$cf_top_incdir" = "$cf_add_incdir" && break
3608 cf_add_incdir="$cf_top_incdir"
3619 if test -n "$cf_cv_curses_dir/lib" ; then
3620 for cf_add_libdir in $cf_cv_curses_dir/lib
3622 if test $cf_add_libdir = /usr/lib ; then
3624 elif test -d $cf_add_libdir
3627 if test -n "$LDFLAGS$LIBS" ; then
3628 # a loop is needed to ensure we can add subdirs of existing dirs
3629 for cf_test_libdir in $LDFLAGS $LIBS ; do
3630 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3631 cf_have_libdir=yes; break
3635 if test "$cf_have_libdir" = no ; then
3636 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
3638 echo "${as_me:-configure}:3638: testing adding $cf_add_libdir to library-path ..." 1>&5
3640 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3649 cf_ncuconfig_root=ncurses
3650 cf_have_ncuconfig=no
3652 if test "x$PKG_CONFIG" != xnone; then
3653 echo "$as_me:3653: checking pkg-config for $cf_ncuconfig_root" >&5
3654 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
3655 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
3656 echo "$as_me:3656: result: yes" >&5
3657 echo "${ECHO_T}yes" >&6
3659 echo "$as_me:3659: checking if the $cf_ncuconfig_root package files work" >&5
3660 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
3661 cf_have_ncuconfig=unknown
3663 cf_save_CPPFLAGS="$CPPFLAGS"
3664 cf_save_LIBS="$LIBS"
3666 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
3668 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
3669 # Filter out duplicates - this happens with badly-designed ".pc" files...
3670 for cf_add_1lib in $LIBS
3672 for cf_add_2lib in $cf_add_libs
3674 if test "x$cf_add_1lib" = "x$cf_add_2lib"
3680 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
3684 cat >conftest.$ac_ext <<_ACEOF
3685 #line 3685 "configure"
3686 #include "confdefs.h"
3687 #include <${cf_cv_ncurses_header:-curses.h}>
3691 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
3696 rm -f conftest.$ac_objext conftest$ac_exeext
3697 if { (eval echo "$as_me:3697: \"$ac_link\"") >&5
3698 (eval $ac_link) 2>&5
3700 echo "$as_me:3700: \$? = $ac_status" >&5
3701 (exit $ac_status); } &&
3702 { ac_try='test -s conftest$ac_exeext'
3703 { (eval echo "$as_me:3703: \"$ac_try\"") >&5
3706 echo "$as_me:3706: \$? = $ac_status" >&5
3707 (exit $ac_status); }; }; then
3708 if test "$cross_compiling" = yes; then
3709 cf_have_ncuconfig=unknown
3711 cat >conftest.$ac_ext <<_ACEOF
3712 #line 3712 "configure"
3713 #include "confdefs.h"
3714 #include <${cf_cv_ncurses_header:-curses.h}>
3716 { char *xx = curses_version(); return (xx == 0); }
3718 rm -f conftest$ac_exeext
3719 if { (eval echo "$as_me:3719: \"$ac_link\"") >&5
3720 (eval $ac_link) 2>&5
3722 echo "$as_me:3722: \$? = $ac_status" >&5
3723 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3724 { (eval echo "$as_me:3724: \"$ac_try\"") >&5
3727 echo "$as_me:3727: \$? = $ac_status" >&5
3728 (exit $ac_status); }; }; then
3729 cf_have_ncuconfig=yes
3731 echo "$as_me: program exited with status $ac_status" >&5
3732 echo "$as_me: failed program was:" >&5
3733 cat conftest.$ac_ext >&5
3734 cf_have_ncuconfig=no
3736 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3739 echo "$as_me: failed program was:" >&5
3740 cat conftest.$ac_ext >&5
3741 cf_have_ncuconfig=no
3743 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3745 echo "$as_me:3745: result: $cf_have_ncuconfig" >&5
3746 echo "${ECHO_T}$cf_have_ncuconfig" >&6
3747 if test "$cf_have_ncuconfig" != "yes"
3749 CPPFLAGS="$cf_save_CPPFLAGS"
3750 LIBS="$cf_save_LIBS"
3751 NCURSES_CONFIG_PKG=none
3754 cat >>confdefs.h <<\EOF
3758 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
3762 echo "$as_me:3762: result: no" >&5
3763 echo "${ECHO_T}no" >&6
3764 NCURSES_CONFIG_PKG=none
3767 NCURSES_CONFIG_PKG=none
3770 if test "x$cf_have_ncuconfig" = "xno"; then
3771 echo "Looking for ${cf_ncuconfig_root}-config"
3773 if test -n "$ac_tool_prefix"; then
3774 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
3776 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3777 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3778 echo "$as_me:3778: checking for $ac_word" >&5
3779 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3780 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
3781 echo $ECHO_N "(cached) $ECHO_C" >&6
3783 if test -n "$NCURSES_CONFIG"; then
3784 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
3786 ac_save_IFS=$IFS; IFS=$ac_path_separator
3788 for ac_dir in $ac_dummy; do
3790 test -z "$ac_dir" && ac_dir=.
3791 $as_executable_p "$ac_dir/$ac_word" || continue
3792 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
3793 echo "$as_me:3793: found $ac_dir/$ac_word" >&5
3799 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
3800 if test -n "$NCURSES_CONFIG"; then
3801 echo "$as_me:3801: result: $NCURSES_CONFIG" >&5
3802 echo "${ECHO_T}$NCURSES_CONFIG" >&6
3804 echo "$as_me:3804: result: no" >&5
3805 echo "${ECHO_T}no" >&6
3808 test -n "$NCURSES_CONFIG" && break
3811 if test -z "$NCURSES_CONFIG"; then
3812 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
3813 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
3815 # Extract the first word of "$ac_prog", so it can be a program name with args.
3816 set dummy $ac_prog; ac_word=$2
3817 echo "$as_me:3817: checking for $ac_word" >&5
3818 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3819 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
3820 echo $ECHO_N "(cached) $ECHO_C" >&6
3822 if test -n "$ac_ct_NCURSES_CONFIG"; then
3823 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
3825 ac_save_IFS=$IFS; IFS=$ac_path_separator
3827 for ac_dir in $ac_dummy; do
3829 test -z "$ac_dir" && ac_dir=.
3830 $as_executable_p "$ac_dir/$ac_word" || continue
3831 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
3832 echo "$as_me:3832: found $ac_dir/$ac_word" >&5
3838 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
3839 if test -n "$ac_ct_NCURSES_CONFIG"; then
3840 echo "$as_me:3840: result: $ac_ct_NCURSES_CONFIG" >&5
3841 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
3843 echo "$as_me:3843: result: no" >&5
3844 echo "${ECHO_T}no" >&6
3847 test -n "$ac_ct_NCURSES_CONFIG" && break
3849 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
3851 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
3854 if test "$NCURSES_CONFIG" != none ; then
3856 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
3858 cf_add_libs="`$NCURSES_CONFIG --libs`"
3859 # Filter out duplicates - this happens with badly-designed ".pc" files...
3860 for cf_add_1lib in $LIBS
3862 for cf_add_2lib in $cf_add_libs
3864 if test "x$cf_add_1lib" = "x$cf_add_2lib"
3870 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
3874 # even with config script, some packages use no-override for curses.h
3876 echo "$as_me:3876: checking if we have identified curses headers" >&5
3877 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
3878 if test "${cf_cv_ncurses_header+set}" = set; then
3879 echo $ECHO_N "(cached) $ECHO_C" >&6
3882 cf_cv_ncurses_header=none
3884 ncurses.h ncurses/ncurses.h \
3885 curses.h ncurses/curses.h
3887 cat >conftest.$ac_ext <<_ACEOF
3888 #line 3888 "configure"
3889 #include "confdefs.h"
3890 #include <${cf_header}>
3894 initscr(); tgoto("?", 0,0)
3899 rm -f conftest.$ac_objext
3900 if { (eval echo "$as_me:3900: \"$ac_compile\"") >&5
3901 (eval $ac_compile) 2>&5
3903 echo "$as_me:3903: \$? = $ac_status" >&5
3904 (exit $ac_status); } &&
3905 { ac_try='test -s conftest.$ac_objext'
3906 { (eval echo "$as_me:3906: \"$ac_try\"") >&5
3909 echo "$as_me:3909: \$? = $ac_status" >&5
3910 (exit $ac_status); }; }; then
3911 cf_cv_ncurses_header=$cf_header; break
3913 echo "$as_me: failed program was:" >&5
3914 cat conftest.$ac_ext >&5
3916 rm -f conftest.$ac_objext conftest.$ac_ext
3920 echo "$as_me:3920: result: $cf_cv_ncurses_header" >&5
3921 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
3923 if test "$cf_cv_ncurses_header" = none ; then
3924 { { echo "$as_me:3924: error: No curses header-files found" >&5
3925 echo "$as_me: error: No curses header-files found" >&2;}
3926 { (exit 1); exit 1; }; }
3929 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
3931 for ac_header in $cf_cv_ncurses_header
3933 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3934 echo "$as_me:3934: checking for $ac_header" >&5
3935 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3936 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3937 echo $ECHO_N "(cached) $ECHO_C" >&6
3939 cat >conftest.$ac_ext <<_ACEOF
3940 #line 3940 "configure"
3941 #include "confdefs.h"
3942 #include <$ac_header>
3944 if { (eval echo "$as_me:3944: \"$ac_cpp conftest.$ac_ext\"") >&5
3945 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3947 egrep -v '^ *\+' conftest.er1 >conftest.err
3949 cat conftest.err >&5
3950 echo "$as_me:3950: \$? = $ac_status" >&5
3951 (exit $ac_status); } >/dev/null; then
3952 if test -s conftest.err; then
3953 ac_cpp_err=$ac_c_preproc_warn_flag
3960 if test -z "$ac_cpp_err"; then
3961 eval "$as_ac_Header=yes"
3963 echo "$as_me: failed program was:" >&5
3964 cat conftest.$ac_ext >&5
3965 eval "$as_ac_Header=no"
3967 rm -f conftest.err conftest.$ac_ext
3969 echo "$as_me:3969: result: `eval echo '${'$as_ac_Header'}'`" >&5
3970 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3971 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3972 cat >>confdefs.h <<EOF
3973 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3979 cat >>confdefs.h <<\EOF
3983 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3985 cat >>confdefs.h <<EOF
3986 #define $cf_nculib_ROOT 1
3989 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
3993 cf_ncuhdr_root=ncurses
3995 test -n "$cf_cv_curses_dir" && \
3996 test "$cf_cv_curses_dir" != "no" && { \
3998 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
3999 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4001 while test $cf_add_incdir != /usr/include
4003 if test -d $cf_add_incdir
4006 if test -n "$CFLAGS$CPPFLAGS" ; then
4007 # a loop is needed to ensure we can add subdirs of existing dirs
4008 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4009 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4010 cf_have_incdir=yes; break
4015 if test "$cf_have_incdir" = no ; then
4016 if test "$cf_add_incdir" = /usr/local/include ; then
4017 if test "$GCC" = yes
4019 cf_save_CPPFLAGS=$CPPFLAGS
4020 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4021 cat >conftest.$ac_ext <<_ACEOF
4022 #line 4022 "configure"
4023 #include "confdefs.h"
4033 rm -f conftest.$ac_objext
4034 if { (eval echo "$as_me:4034: \"$ac_compile\"") >&5
4035 (eval $ac_compile) 2>&5
4037 echo "$as_me:4037: \$? = $ac_status" >&5
4038 (exit $ac_status); } &&
4039 { ac_try='test -s conftest.$ac_objext'
4040 { (eval echo "$as_me:4040: \"$ac_try\"") >&5
4043 echo "$as_me:4043: \$? = $ac_status" >&5
4044 (exit $ac_status); }; }; then
4047 echo "$as_me: failed program was:" >&5
4048 cat conftest.$ac_ext >&5
4051 rm -f conftest.$ac_objext conftest.$ac_ext
4052 CPPFLAGS=$cf_save_CPPFLAGS
4057 if test "$cf_have_incdir" = no ; then
4058 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4060 echo "${as_me:-configure}:4060: testing adding $cf_add_incdir to include-path ..." 1>&5
4062 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4064 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4065 test "$cf_top_incdir" = "$cf_add_incdir" && break
4066 cf_add_incdir="$cf_top_incdir"
4079 echo "$as_me:4079: checking for $cf_ncuhdr_root header in include-path" >&5
4080 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4081 if test "${cf_cv_ncurses_h+set}" = set; then
4082 echo $ECHO_N "(cached) $ECHO_C" >&6
4085 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4086 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4087 for cf_header in $cf_header_list
4090 cat >conftest.$ac_ext <<_ACEOF
4091 #line 4091 "configure"
4092 #include "confdefs.h"
4094 #include <$cf_header>
4099 #ifdef NCURSES_VERSION
4101 printf("%s\n", NCURSES_VERSION);
4114 rm -f conftest.$ac_objext
4115 if { (eval echo "$as_me:4115: \"$ac_compile\"") >&5
4116 (eval $ac_compile) 2>&5
4118 echo "$as_me:4118: \$? = $ac_status" >&5
4119 (exit $ac_status); } &&
4120 { ac_try='test -s conftest.$ac_objext'
4121 { (eval echo "$as_me:4121: \"$ac_try\"") >&5
4124 echo "$as_me:4124: \$? = $ac_status" >&5
4125 (exit $ac_status); }; }; then
4126 cf_cv_ncurses_h=$cf_header
4129 echo "$as_me: failed program was:" >&5
4130 cat conftest.$ac_ext >&5
4133 rm -f conftest.$ac_objext conftest.$ac_ext
4135 test "$cf_cv_ncurses_h" != no && break
4139 echo "$as_me:4139: result: $cf_cv_ncurses_h" >&5
4140 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4142 if test "$cf_cv_ncurses_h" != no ; then
4143 cf_cv_ncurses_header=$cf_cv_ncurses_h
4146 echo "$as_me:4146: checking for $cf_ncuhdr_root include-path" >&5
4147 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4148 if test "${cf_cv_ncurses_h2+set}" = set; then
4149 echo $ECHO_N "(cached) $ECHO_C" >&6
4152 test -n "$verbose" && echo
4156 # collect the current set of include-directories from compiler flags
4157 cf_header_path_list=""
4158 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4159 for cf_header_path in $CPPFLAGS $CFLAGS
4161 case $cf_header_path in
4163 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4165 test "x$cf_header_path" != "xNONE" && \
4166 test -d "$cf_header_path" && \
4168 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
4169 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
4170 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4171 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4172 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4173 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"
4176 cf_header_path_list="$cf_header_path_list $cf_search"
4182 # add the variations for the package we are looking for
4186 test "x$prefix" != "xNONE" && \
4187 test -d "$prefix" && \
4189 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
4190 test -d $prefix/include && cf_search="$cf_search $prefix/include"
4191 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4192 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4193 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4194 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4197 for cf_subdir_prefix in \
4206 test "x$cf_subdir_prefix" != "x$prefix" && \
4207 test -d "$cf_subdir_prefix" && \
4208 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
4209 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
4210 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
4211 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
4212 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
4213 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
4214 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"
4219 test "$includedir" != NONE && \
4220 test "$includedir" != "/usr/include" && \
4221 test -d "$includedir" && {
4222 test -d $includedir && cf_search="$cf_search $includedir"
4223 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4226 test "$oldincludedir" != NONE && \
4227 test "$oldincludedir" != "/usr/include" && \
4228 test -d "$oldincludedir" && {
4229 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
4230 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4233 cf_search="$cf_search $cf_header_path_list"
4235 test -n "$verbose" && echo search path $cf_search
4236 cf_save2_CPPFLAGS="$CPPFLAGS"
4237 for cf_incdir in $cf_search
4240 if test -n "$cf_incdir" ; then
4241 for cf_add_incdir in $cf_incdir
4243 while test $cf_add_incdir != /usr/include
4245 if test -d $cf_add_incdir
4248 if test -n "$CFLAGS$CPPFLAGS" ; then
4249 # a loop is needed to ensure we can add subdirs of existing dirs
4250 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4251 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4252 cf_have_incdir=yes; break
4257 if test "$cf_have_incdir" = no ; then
4258 if test "$cf_add_incdir" = /usr/local/include ; then
4259 if test "$GCC" = yes
4261 cf_save_CPPFLAGS=$CPPFLAGS
4262 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4263 cat >conftest.$ac_ext <<_ACEOF
4264 #line 4264 "configure"
4265 #include "confdefs.h"
4275 rm -f conftest.$ac_objext
4276 if { (eval echo "$as_me:4276: \"$ac_compile\"") >&5
4277 (eval $ac_compile) 2>&5
4279 echo "$as_me:4279: \$? = $ac_status" >&5
4280 (exit $ac_status); } &&
4281 { ac_try='test -s conftest.$ac_objext'
4282 { (eval echo "$as_me:4282: \"$ac_try\"") >&5
4285 echo "$as_me:4285: \$? = $ac_status" >&5
4286 (exit $ac_status); }; }; then
4289 echo "$as_me: failed program was:" >&5
4290 cat conftest.$ac_ext >&5
4293 rm -f conftest.$ac_objext conftest.$ac_ext
4294 CPPFLAGS=$cf_save_CPPFLAGS
4299 if test "$cf_have_incdir" = no ; then
4300 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4302 echo "${as_me:-configure}:4302: testing adding $cf_add_incdir to include-path ..." 1>&5
4304 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4306 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4307 test "$cf_top_incdir" = "$cf_add_incdir" && break
4308 cf_add_incdir="$cf_top_incdir"
4324 cat >conftest.$ac_ext <<_ACEOF
4325 #line 4325 "configure"
4326 #include "confdefs.h"
4328 #include <$cf_header>
4333 #ifdef NCURSES_VERSION
4335 printf("%s\n", NCURSES_VERSION);
4348 rm -f conftest.$ac_objext
4349 if { (eval echo "$as_me:4349: \"$ac_compile\"") >&5
4350 (eval $ac_compile) 2>&5
4352 echo "$as_me:4352: \$? = $ac_status" >&5
4353 (exit $ac_status); } &&
4354 { ac_try='test -s conftest.$ac_objext'
4355 { (eval echo "$as_me:4355: \"$ac_try\"") >&5
4358 echo "$as_me:4358: \$? = $ac_status" >&5
4359 (exit $ac_status); }; }; then
4360 cf_cv_ncurses_h2=$cf_header
4363 echo "$as_me: failed program was:" >&5
4364 cat conftest.$ac_ext >&5
4367 rm -f conftest.$ac_objext conftest.$ac_ext
4369 if test "$cf_cv_ncurses_h2" != no ; then
4370 cf_cv_ncurses_h2=$cf_incdir/$cf_header
4371 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
4374 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
4376 CPPFLAGS="$cf_save2_CPPFLAGS"
4377 test "$cf_cv_ncurses_h2" != no && break
4379 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:4379: error: not found" >&5
4380 echo "$as_me: error: not found" >&2;}
4381 { (exit 1); exit 1; }; }
4384 echo "$as_me:4384: result: $cf_cv_ncurses_h2" >&5
4385 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
4387 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
4388 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
4389 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
4390 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
4393 if test -n "$cf_1st_incdir" ; then
4394 for cf_add_incdir in $cf_1st_incdir
4396 while test $cf_add_incdir != /usr/include
4398 if test -d $cf_add_incdir
4401 if test -n "$CFLAGS$CPPFLAGS" ; then
4402 # a loop is needed to ensure we can add subdirs of existing dirs
4403 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4404 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4405 cf_have_incdir=yes; break
4410 if test "$cf_have_incdir" = no ; then
4411 if test "$cf_add_incdir" = /usr/local/include ; then
4412 if test "$GCC" = yes
4414 cf_save_CPPFLAGS=$CPPFLAGS
4415 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4416 cat >conftest.$ac_ext <<_ACEOF
4417 #line 4417 "configure"
4418 #include "confdefs.h"
4428 rm -f conftest.$ac_objext
4429 if { (eval echo "$as_me:4429: \"$ac_compile\"") >&5
4430 (eval $ac_compile) 2>&5
4432 echo "$as_me:4432: \$? = $ac_status" >&5
4433 (exit $ac_status); } &&
4434 { ac_try='test -s conftest.$ac_objext'
4435 { (eval echo "$as_me:4435: \"$ac_try\"") >&5
4438 echo "$as_me:4438: \$? = $ac_status" >&5
4439 (exit $ac_status); }; }; then
4442 echo "$as_me: failed program was:" >&5
4443 cat conftest.$ac_ext >&5
4446 rm -f conftest.$ac_objext conftest.$ac_ext
4447 CPPFLAGS=$cf_save_CPPFLAGS
4452 if test "$cf_have_incdir" = no ; then
4453 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4455 echo "${as_me:-configure}:4455: testing adding $cf_add_incdir to include-path ..." 1>&5
4457 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4459 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4460 test "$cf_top_incdir" = "$cf_add_incdir" && break
4461 cf_add_incdir="$cf_top_incdir"
4474 # Set definitions to allow ifdef'ing for ncurses.h
4476 case $cf_cv_ncurses_header in
4479 cat >>confdefs.h <<\EOF
4480 #define HAVE_NCURSES_H 1
4486 case $cf_cv_ncurses_header in
4487 (ncurses/curses.h|ncurses/ncurses.h)
4489 cat >>confdefs.h <<\EOF
4490 #define HAVE_NCURSES_NCURSES_H 1
4494 (ncursesw/curses.h|ncursesw/ncurses.h)
4496 cat >>confdefs.h <<\EOF
4497 #define HAVE_NCURSESW_NCURSES_H 1
4503 echo "$as_me:4503: checking for terminfo header" >&5
4504 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4505 if test "${cf_cv_term_header+set}" = set; then
4506 echo $ECHO_N "(cached) $ECHO_C" >&6
4509 case ${cf_cv_ncurses_header} in
4510 (*/ncurses.h|*/ncursesw.h)
4511 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4514 cf_term_header=term.h
4518 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4520 cat >conftest.$ac_ext <<_ACEOF
4521 #line 4521 "configure"
4522 #include "confdefs.h"
4524 #include <${cf_cv_ncurses_header:-curses.h}>
4530 int x = auto_left_margin
4535 rm -f conftest.$ac_objext
4536 if { (eval echo "$as_me:4536: \"$ac_compile\"") >&5
4537 (eval $ac_compile) 2>&5
4539 echo "$as_me:4539: \$? = $ac_status" >&5
4540 (exit $ac_status); } &&
4541 { ac_try='test -s conftest.$ac_objext'
4542 { (eval echo "$as_me:4542: \"$ac_try\"") >&5
4545 echo "$as_me:4545: \$? = $ac_status" >&5
4546 (exit $ac_status); }; }; then
4548 cf_cv_term_header="$cf_test"
4550 echo "$as_me: failed program was:" >&5
4551 cat conftest.$ac_ext >&5
4553 cf_cv_term_header=unknown
4556 rm -f conftest.$ac_objext conftest.$ac_ext
4557 test "$cf_cv_term_header" != unknown && break
4561 echo "$as_me:4561: result: $cf_cv_term_header" >&5
4562 echo "${ECHO_T}$cf_cv_term_header" >&6
4564 # Set definitions to allow ifdef'ing to accommodate subdirectories
4566 case $cf_cv_term_header in
4569 cat >>confdefs.h <<\EOF
4570 #define HAVE_TERM_H 1
4576 case $cf_cv_term_header in
4579 cat >>confdefs.h <<\EOF
4580 #define HAVE_NCURSES_TERM_H 1
4586 cat >>confdefs.h <<\EOF
4587 #define HAVE_NCURSESW_TERM_H 1
4593 # some applications need this, but should check for NCURSES_VERSION
4595 cat >>confdefs.h <<\EOF
4599 echo "$as_me:4599: checking for ncurses version" >&5
4600 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
4601 if test "${cf_cv_ncurses_version+set}" = set; then
4602 echo $ECHO_N "(cached) $ECHO_C" >&6
4605 cf_cv_ncurses_version=no
4608 if test "$cross_compiling" = yes; then
4610 # This will not work if the preprocessor splits the line after the
4611 # Autoconf token. The 'unproto' program does that.
4612 cat > conftest.$ac_ext <<EOF
4613 #include <${cf_cv_ncurses_header:-curses.h}>
4615 #ifdef NCURSES_VERSION
4616 Autoconf NCURSES_VERSION
4624 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4625 { (eval echo "$as_me:4625: \"$cf_try\"") >&5
4628 echo "$as_me:4628: \$? = $ac_status" >&5
4629 (exit $ac_status); }
4630 if test -f conftest.out ; then
4631 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4632 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4637 cat >conftest.$ac_ext <<_ACEOF
4638 #line 4638 "configure"
4639 #include "confdefs.h"
4641 #include <${cf_cv_ncurses_header:-curses.h}>
4645 FILE *fp = fopen("$cf_tempfile", "w");
4646 #ifdef NCURSES_VERSION
4647 # ifdef NCURSES_VERSION_PATCH
4648 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
4650 fprintf(fp, "%s\n", NCURSES_VERSION);
4654 fprintf(fp, "old\n");
4659 ${cf_cv_main_return:-return}(0);
4662 rm -f conftest$ac_exeext
4663 if { (eval echo "$as_me:4663: \"$ac_link\"") >&5
4664 (eval $ac_link) 2>&5
4666 echo "$as_me:4666: \$? = $ac_status" >&5
4667 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4668 { (eval echo "$as_me:4668: \"$ac_try\"") >&5
4671 echo "$as_me:4671: \$? = $ac_status" >&5
4672 (exit $ac_status); }; }; then
4674 cf_cv_ncurses_version=`cat $cf_tempfile`
4676 echo "$as_me: program exited with status $ac_status" >&5
4677 echo "$as_me: failed program was:" >&5
4678 cat conftest.$ac_ext >&5
4680 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4685 echo "$as_me:4685: result: $cf_cv_ncurses_version" >&5
4686 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
4687 test "$cf_cv_ncurses_version" = no ||
4688 cat >>confdefs.h <<\EOF
4692 cf_nculib_root=ncurses
4693 # This works, except for the special case where we find gpm, but
4694 # ncurses is in a nonstandard location via $LIBS, and we really want
4697 cf_ncurses_SAVE="$LIBS"
4698 echo "$as_me:4698: checking for Gpm_Open in -lgpm" >&5
4699 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4700 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4701 echo $ECHO_N "(cached) $ECHO_C" >&6
4703 ac_check_lib_save_LIBS=$LIBS
4705 cat >conftest.$ac_ext <<_ACEOF
4706 #line 4706 "configure"
4707 #include "confdefs.h"
4709 /* Override any gcc2 internal prototype to avoid an error. */
4713 /* We use char because int might match the return type of a gcc2
4714 builtin and then its argument prototype would still apply. */
4724 rm -f conftest.$ac_objext conftest$ac_exeext
4725 if { (eval echo "$as_me:4725: \"$ac_link\"") >&5
4726 (eval $ac_link) 2>&5
4728 echo "$as_me:4728: \$? = $ac_status" >&5
4729 (exit $ac_status); } &&
4730 { ac_try='test -s conftest$ac_exeext'
4731 { (eval echo "$as_me:4731: \"$ac_try\"") >&5
4734 echo "$as_me:4734: \$? = $ac_status" >&5
4735 (exit $ac_status); }; }; then
4736 ac_cv_lib_gpm_Gpm_Open=yes
4738 echo "$as_me: failed program was:" >&5
4739 cat conftest.$ac_ext >&5
4740 ac_cv_lib_gpm_Gpm_Open=no
4742 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4743 LIBS=$ac_check_lib_save_LIBS
4745 echo "$as_me:4745: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4746 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4747 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4748 echo "$as_me:4748: checking for initscr in -lgpm" >&5
4749 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
4750 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
4751 echo $ECHO_N "(cached) $ECHO_C" >&6
4753 ac_check_lib_save_LIBS=$LIBS
4755 cat >conftest.$ac_ext <<_ACEOF
4756 #line 4756 "configure"
4757 #include "confdefs.h"
4759 /* Override any gcc2 internal prototype to avoid an error. */
4763 /* We use char because int might match the return type of a gcc2
4764 builtin and then its argument prototype would still apply. */
4774 rm -f conftest.$ac_objext conftest$ac_exeext
4775 if { (eval echo "$as_me:4775: \"$ac_link\"") >&5
4776 (eval $ac_link) 2>&5
4778 echo "$as_me:4778: \$? = $ac_status" >&5
4779 (exit $ac_status); } &&
4780 { ac_try='test -s conftest$ac_exeext'
4781 { (eval echo "$as_me:4781: \"$ac_try\"") >&5
4784 echo "$as_me:4784: \$? = $ac_status" >&5
4785 (exit $ac_status); }; }; then
4786 ac_cv_lib_gpm_initscr=yes
4788 echo "$as_me: failed program was:" >&5
4789 cat conftest.$ac_ext >&5
4790 ac_cv_lib_gpm_initscr=no
4792 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4793 LIBS=$ac_check_lib_save_LIBS
4795 echo "$as_me:4795: result: $ac_cv_lib_gpm_initscr" >&5
4796 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
4797 if test $ac_cv_lib_gpm_initscr = yes; then
4798 LIBS="$cf_ncurses_SAVE"
4800 cf_ncurses_LIBS="-lgpm"
4807 # This is only necessary if you are linking against an obsolete
4808 # version of ncurses (but it should do no harm, since it's static).
4809 if test "$cf_nculib_root" = ncurses ; then
4810 echo "$as_me:4810: checking for tgoto in -lmytinfo" >&5
4811 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
4812 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
4813 echo $ECHO_N "(cached) $ECHO_C" >&6
4815 ac_check_lib_save_LIBS=$LIBS
4816 LIBS="-lmytinfo $LIBS"
4817 cat >conftest.$ac_ext <<_ACEOF
4818 #line 4818 "configure"
4819 #include "confdefs.h"
4821 /* Override any gcc2 internal prototype to avoid an error. */
4825 /* We use char because int might match the return type of a gcc2
4826 builtin and then its argument prototype would still apply. */
4836 rm -f conftest.$ac_objext conftest$ac_exeext
4837 if { (eval echo "$as_me:4837: \"$ac_link\"") >&5
4838 (eval $ac_link) 2>&5
4840 echo "$as_me:4840: \$? = $ac_status" >&5
4841 (exit $ac_status); } &&
4842 { ac_try='test -s conftest$ac_exeext'
4843 { (eval echo "$as_me:4843: \"$ac_try\"") >&5
4846 echo "$as_me:4846: \$? = $ac_status" >&5
4847 (exit $ac_status); }; }; then
4848 ac_cv_lib_mytinfo_tgoto=yes
4850 echo "$as_me: failed program was:" >&5
4851 cat conftest.$ac_ext >&5
4852 ac_cv_lib_mytinfo_tgoto=no
4854 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4855 LIBS=$ac_check_lib_save_LIBS
4857 echo "$as_me:4857: result: $ac_cv_lib_mytinfo_tgoto" >&5
4858 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
4859 if test $ac_cv_lib_mytinfo_tgoto = yes; then
4860 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
4867 cf_add_libs="$cf_ncurses_LIBS"
4868 # Filter out duplicates - this happens with badly-designed ".pc" files...
4869 for cf_add_1lib in $LIBS
4871 for cf_add_2lib in $cf_add_libs
4873 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4879 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4883 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4886 cf_add_libs="-l$cf_nculib_root"
4887 # Filter out duplicates - this happens with badly-designed ".pc" files...
4888 for cf_add_1lib in $LIBS
4890 for cf_add_2lib in $cf_add_libs
4892 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4898 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4904 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
4906 echo "$as_me:4906: checking for initscr" >&5
4907 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
4908 if test "${ac_cv_func_initscr+set}" = set; then
4909 echo $ECHO_N "(cached) $ECHO_C" >&6
4911 cat >conftest.$ac_ext <<_ACEOF
4912 #line 4912 "configure"
4913 #include "confdefs.h"
4914 /* System header to define __stub macros and hopefully few prototypes,
4915 which can conflict with char initscr (); below. */
4917 /* Override any gcc2 internal prototype to avoid an error. */
4921 /* We use char because int might match the return type of a gcc2
4922 builtin and then its argument prototype would still apply. */
4929 /* The GNU C library defines this for functions which it implements
4930 to always fail with ENOSYS. Some functions are actually named
4931 something starting with __ and the normal name is an alias. */
4932 #if defined (__stub_initscr) || defined (__stub___initscr)
4935 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
4942 rm -f conftest.$ac_objext conftest$ac_exeext
4943 if { (eval echo "$as_me:4943: \"$ac_link\"") >&5
4944 (eval $ac_link) 2>&5
4946 echo "$as_me:4946: \$? = $ac_status" >&5
4947 (exit $ac_status); } &&
4948 { ac_try='test -s conftest$ac_exeext'
4949 { (eval echo "$as_me:4949: \"$ac_try\"") >&5
4952 echo "$as_me:4952: \$? = $ac_status" >&5
4953 (exit $ac_status); }; }; then
4954 ac_cv_func_initscr=yes
4956 echo "$as_me: failed program was:" >&5
4957 cat conftest.$ac_ext >&5
4958 ac_cv_func_initscr=no
4960 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4962 echo "$as_me:4962: result: $ac_cv_func_initscr" >&5
4963 echo "${ECHO_T}$ac_cv_func_initscr" >&6
4964 if test $ac_cv_func_initscr = yes; then
4965 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4968 cf_save_LIBS="$LIBS"
4969 echo "$as_me:4969: checking for initscr in -l$cf_nculib_root" >&5
4970 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
4971 LIBS="-l$cf_nculib_root $LIBS"
4972 cat >conftest.$ac_ext <<_ACEOF
4973 #line 4973 "configure"
4974 #include "confdefs.h"
4975 #include <${cf_cv_ncurses_header:-curses.h}>
4984 rm -f conftest.$ac_objext conftest$ac_exeext
4985 if { (eval echo "$as_me:4985: \"$ac_link\"") >&5
4986 (eval $ac_link) 2>&5
4988 echo "$as_me:4988: \$? = $ac_status" >&5
4989 (exit $ac_status); } &&
4990 { ac_try='test -s conftest$ac_exeext'
4991 { (eval echo "$as_me:4991: \"$ac_try\"") >&5
4994 echo "$as_me:4994: \$? = $ac_status" >&5
4995 (exit $ac_status); }; }; then
4996 echo "$as_me:4996: result: yes" >&5
4997 echo "${ECHO_T}yes" >&6
4998 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5001 echo "$as_me: failed program was:" >&5
5002 cat conftest.$ac_ext >&5
5003 echo "$as_me:5003: result: no" >&5
5004 echo "${ECHO_T}no" >&6
5007 cf_library_path_list=""
5008 if test -n "${LDFLAGS}${LIBS}" ; then
5009 for cf_library_path in $LDFLAGS $LIBS
5011 case $cf_library_path in
5013 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5015 test "x$cf_library_path" != "xNONE" && \
5016 test -d "$cf_library_path" && \
5018 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
5019 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
5020 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5021 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5022 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5023 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"
5026 cf_library_path_list="$cf_library_path_list $cf_search"
5034 test "x$prefix" != "xNONE" && \
5035 test -d "$prefix" && \
5037 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5038 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5039 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5040 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5041 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5042 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5045 for cf_subdir_prefix in \
5054 test "x$cf_subdir_prefix" != "x$prefix" && \
5055 test -d "$cf_subdir_prefix" && \
5056 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5057 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
5058 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
5059 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
5060 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
5061 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
5062 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"
5067 cf_search="$cf_library_path_list $cf_search"
5069 for cf_libdir in $cf_search
5071 echo "$as_me:5071: checking for -l$cf_nculib_root in $cf_libdir" >&5
5072 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5073 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5074 cat >conftest.$ac_ext <<_ACEOF
5075 #line 5075 "configure"
5076 #include "confdefs.h"
5077 #include <${cf_cv_ncurses_header:-curses.h}>
5086 rm -f conftest.$ac_objext conftest$ac_exeext
5087 if { (eval echo "$as_me:5087: \"$ac_link\"") >&5
5088 (eval $ac_link) 2>&5
5090 echo "$as_me:5090: \$? = $ac_status" >&5
5091 (exit $ac_status); } &&
5092 { ac_try='test -s conftest$ac_exeext'
5093 { (eval echo "$as_me:5093: \"$ac_try\"") >&5
5096 echo "$as_me:5096: \$? = $ac_status" >&5
5097 (exit $ac_status); }; }; then
5098 echo "$as_me:5098: result: yes" >&5
5099 echo "${ECHO_T}yes" >&6
5100 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5103 echo "$as_me: failed program was:" >&5
5104 cat conftest.$ac_ext >&5
5105 echo "$as_me:5105: result: no" >&5
5106 echo "${ECHO_T}no" >&6
5107 LIBS="$cf_save_LIBS"
5109 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5113 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5117 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5119 if test $cf_found_library = no ; then
5120 { { echo "$as_me:5120: error: Cannot link $cf_nculib_root library" >&5
5121 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5122 { (exit 1); exit 1; }; }
5127 if test -n "$cf_ncurses_LIBS" ; then
5128 echo "$as_me:5128: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5129 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5130 cf_ncurses_SAVE="$LIBS"
5131 for p in $cf_ncurses_LIBS ; do
5132 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5133 if test "$q" != "$LIBS" ; then
5137 cat >conftest.$ac_ext <<_ACEOF
5138 #line 5138 "configure"
5139 #include "confdefs.h"
5140 #include <${cf_cv_ncurses_header:-curses.h}>
5144 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5149 rm -f conftest.$ac_objext conftest$ac_exeext
5150 if { (eval echo "$as_me:5150: \"$ac_link\"") >&5
5151 (eval $ac_link) 2>&5
5153 echo "$as_me:5153: \$? = $ac_status" >&5
5154 (exit $ac_status); } &&
5155 { ac_try='test -s conftest$ac_exeext'
5156 { (eval echo "$as_me:5156: \"$ac_try\"") >&5
5159 echo "$as_me:5159: \$? = $ac_status" >&5
5160 (exit $ac_status); }; }; then
5161 echo "$as_me:5161: result: yes" >&5
5162 echo "${ECHO_T}yes" >&6
5164 echo "$as_me: failed program was:" >&5
5165 cat conftest.$ac_ext >&5
5166 echo "$as_me:5166: result: no" >&5
5167 echo "${ECHO_T}no" >&6
5168 LIBS="$cf_ncurses_SAVE"
5170 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5173 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5175 cat >>confdefs.h <<EOF
5176 #define $cf_nculib_ROOT 1
5184 echo "$as_me:5184: checking if you want wide-character code" >&5
5185 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
5187 # Check whether --enable-widec or --disable-widec was given.
5188 if test "${enable_widec+set}" = set; then
5189 enableval="$enable_widec"
5190 with_widec=$enableval
5194 echo "$as_me:5194: result: $with_widec" >&5
5195 echo "${ECHO_T}$with_widec" >&6
5196 if test "$with_widec" = yes ; then
5198 echo "$as_me:5198: checking for multibyte character support" >&5
5199 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
5200 if test "${cf_cv_utf8_lib+set}" = set; then
5201 echo $ECHO_N "(cached) $ECHO_C" >&6
5204 cf_save_LIBS="$LIBS"
5205 cat >conftest.$ac_ext <<_ACEOF
5206 #line 5206 "configure"
5207 #include "confdefs.h"
5218 rm -f conftest.$ac_objext conftest$ac_exeext
5219 if { (eval echo "$as_me:5219: \"$ac_link\"") >&5
5220 (eval $ac_link) 2>&5
5222 echo "$as_me:5222: \$? = $ac_status" >&5
5223 (exit $ac_status); } &&
5224 { ac_try='test -s conftest$ac_exeext'
5225 { (eval echo "$as_me:5225: \"$ac_try\"") >&5
5228 echo "$as_me:5228: \$? = $ac_status" >&5
5229 (exit $ac_status); }; }; then
5232 echo "$as_me: failed program was:" >&5
5233 cat conftest.$ac_ext >&5
5235 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
5236 # will be set on completion of the AC_TRY_LINK below.
5237 cf_cv_header_path_utf8=
5238 cf_cv_library_path_utf8=
5240 echo "${as_me:-configure}:5240: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
5242 cf_save_LIBS="$LIBS"
5244 cat >conftest.$ac_ext <<_ACEOF
5245 #line 5245 "configure"
5246 #include "confdefs.h"
5248 #include <libutf8.h>
5257 rm -f conftest.$ac_objext conftest$ac_exeext
5258 if { (eval echo "$as_me:5258: \"$ac_link\"") >&5
5259 (eval $ac_link) 2>&5
5261 echo "$as_me:5261: \$? = $ac_status" >&5
5262 (exit $ac_status); } &&
5263 { ac_try='test -s conftest$ac_exeext'
5264 { (eval echo "$as_me:5264: \"$ac_try\"") >&5
5267 echo "$as_me:5267: \$? = $ac_status" >&5
5268 (exit $ac_status); }; }; then
5270 cf_cv_find_linkage_utf8=yes
5271 cf_cv_header_path_utf8=/usr/include
5272 cf_cv_library_path_utf8=/usr/lib
5275 echo "$as_me: failed program was:" >&5
5276 cat conftest.$ac_ext >&5
5278 LIBS="-lutf8 $cf_save_LIBS"
5280 cat >conftest.$ac_ext <<_ACEOF
5281 #line 5281 "configure"
5282 #include "confdefs.h"
5284 #include <libutf8.h>
5293 rm -f conftest.$ac_objext conftest$ac_exeext
5294 if { (eval echo "$as_me:5294: \"$ac_link\"") >&5
5295 (eval $ac_link) 2>&5
5297 echo "$as_me:5297: \$? = $ac_status" >&5
5298 (exit $ac_status); } &&
5299 { ac_try='test -s conftest$ac_exeext'
5300 { (eval echo "$as_me:5300: \"$ac_try\"") >&5
5303 echo "$as_me:5303: \$? = $ac_status" >&5
5304 (exit $ac_status); }; }; then
5306 cf_cv_find_linkage_utf8=yes
5307 cf_cv_header_path_utf8=/usr/include
5308 cf_cv_library_path_utf8=/usr/lib
5309 cf_cv_library_file_utf8="-lutf8"
5312 echo "$as_me: failed program was:" >&5
5313 cat conftest.$ac_ext >&5
5315 cf_cv_find_linkage_utf8=no
5316 LIBS="$cf_save_LIBS"
5318 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
5320 echo "${as_me:-configure}:5320: testing find linkage for utf8 library ..." 1>&5
5322 echo "${as_me:-configure}:5322: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
5324 cf_save_CPPFLAGS="$CPPFLAGS"
5325 cf_test_CPPFLAGS="$CPPFLAGS"
5329 # collect the current set of include-directories from compiler flags
5330 cf_header_path_list=""
5331 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5332 for cf_header_path in $CPPFLAGS $CFLAGS
5334 case $cf_header_path in
5336 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5338 test "x$cf_header_path" != "xNONE" && \
5339 test -d "$cf_header_path" && \
5341 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5342 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5343 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
5344 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
5345 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
5346 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
5349 cf_header_path_list="$cf_header_path_list $cf_search"
5355 # add the variations for the package we are looking for
5359 test "x$prefix" != "xNONE" && \
5360 test -d "$prefix" && \
5362 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5363 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5364 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
5365 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
5366 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
5367 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
5370 for cf_subdir_prefix in \
5379 test "x$cf_subdir_prefix" != "x$prefix" && \
5380 test -d "$cf_subdir_prefix" && \
5381 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5382 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5383 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
5384 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
5385 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
5386 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
5387 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
5392 test "$includedir" != NONE && \
5393 test "$includedir" != "/usr/include" && \
5394 test -d "$includedir" && {
5395 test -d $includedir && cf_search="$cf_search $includedir"
5396 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
5399 test "$oldincludedir" != NONE && \
5400 test "$oldincludedir" != "/usr/include" && \
5401 test -d "$oldincludedir" && {
5402 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5403 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
5406 cf_search="$cf_search $cf_header_path_list"
5408 for cf_cv_header_path_utf8 in $cf_search
5410 if test -d $cf_cv_header_path_utf8 ; then
5411 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
5413 echo "${as_me:-configure}:5413: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
5415 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
5416 cat >conftest.$ac_ext <<_ACEOF
5417 #line 5417 "configure"
5418 #include "confdefs.h"
5420 #include <libutf8.h>
5429 rm -f conftest.$ac_objext
5430 if { (eval echo "$as_me:5430: \"$ac_compile\"") >&5
5431 (eval $ac_compile) 2>&5
5433 echo "$as_me:5433: \$? = $ac_status" >&5
5434 (exit $ac_status); } &&
5435 { ac_try='test -s conftest.$ac_objext'
5436 { (eval echo "$as_me:5436: \"$ac_try\"") >&5
5439 echo "$as_me:5439: \$? = $ac_status" >&5
5440 (exit $ac_status); }; }; then
5442 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
5444 echo "${as_me:-configure}:5444: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
5446 cf_cv_find_linkage_utf8=maybe
5447 cf_test_CPPFLAGS="$CPPFLAGS"
5450 echo "$as_me: failed program was:" >&5
5451 cat conftest.$ac_ext >&5
5453 CPPFLAGS="$cf_save_CPPFLAGS"
5456 rm -f conftest.$ac_objext conftest.$ac_ext
5460 if test "$cf_cv_find_linkage_utf8" = maybe ; then
5462 echo "${as_me:-configure}:5462: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
5464 cf_save_LIBS="$LIBS"
5465 cf_save_LDFLAGS="$LDFLAGS"
5467 if test "$cf_cv_find_linkage_utf8" != yes ; then
5470 cf_library_path_list=""
5471 if test -n "${LDFLAGS}${LIBS}" ; then
5472 for cf_library_path in $LDFLAGS $LIBS
5474 case $cf_library_path in
5476 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5478 test "x$cf_library_path" != "xNONE" && \
5479 test -d "$cf_library_path" && \
5481 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
5482 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
5483 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
5484 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
5485 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
5486 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
5489 cf_library_path_list="$cf_library_path_list $cf_search"
5497 test "x$prefix" != "xNONE" && \
5498 test -d "$prefix" && \
5500 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5501 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5502 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
5503 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
5504 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
5505 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
5508 for cf_subdir_prefix in \
5517 test "x$cf_subdir_prefix" != "x$prefix" && \
5518 test -d "$cf_subdir_prefix" && \
5519 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5520 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
5521 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
5522 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
5523 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
5524 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
5525 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
5530 cf_search="$cf_library_path_list $cf_search"
5532 for cf_cv_library_path_utf8 in $cf_search
5534 if test -d $cf_cv_library_path_utf8 ; then
5535 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
5537 echo "${as_me:-configure}:5537: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
5539 CPPFLAGS="$cf_test_CPPFLAGS"
5540 LIBS="-lutf8 $cf_save_LIBS"
5541 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
5542 cat >conftest.$ac_ext <<_ACEOF
5543 #line 5543 "configure"
5544 #include "confdefs.h"
5546 #include <libutf8.h>
5555 rm -f conftest.$ac_objext conftest$ac_exeext
5556 if { (eval echo "$as_me:5556: \"$ac_link\"") >&5
5557 (eval $ac_link) 2>&5
5559 echo "$as_me:5559: \$? = $ac_status" >&5
5560 (exit $ac_status); } &&
5561 { ac_try='test -s conftest$ac_exeext'
5562 { (eval echo "$as_me:5562: \"$ac_try\"") >&5
5565 echo "$as_me:5565: \$? = $ac_status" >&5
5566 (exit $ac_status); }; }; then
5568 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
5570 echo "${as_me:-configure}:5570: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
5572 cf_cv_find_linkage_utf8=yes
5573 cf_cv_library_file_utf8="-lutf8"
5576 echo "$as_me: failed program was:" >&5
5577 cat conftest.$ac_ext >&5
5579 CPPFLAGS="$cf_save_CPPFLAGS"
5580 LIBS="$cf_save_LIBS"
5581 LDFLAGS="$cf_save_LDFLAGS"
5584 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5587 CPPFLAGS="$cf_save_CPPFLAGS"
5588 LDFLAGS="$cf_save_LDFLAGS"
5592 cf_cv_find_linkage_utf8=no
5596 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5599 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5601 LIBS="$cf_save_LIBS"
5603 if test "$cf_cv_find_linkage_utf8" = yes ; then
5604 cf_cv_utf8_lib=add-on
5610 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5612 echo "$as_me:5612: result: $cf_cv_utf8_lib" >&5
5613 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
5615 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
5617 if test "$cf_cv_utf8_lib" = "add-on" ; then
5619 cat >>confdefs.h <<\EOF
5620 #define HAVE_LIBUTF8_H 1
5623 if test -n "$cf_cv_header_path_utf8" ; then
5624 for cf_add_incdir in $cf_cv_header_path_utf8
5626 while test $cf_add_incdir != /usr/include
5628 if test -d $cf_add_incdir
5631 if test -n "$CFLAGS$CPPFLAGS" ; then
5632 # a loop is needed to ensure we can add subdirs of existing dirs
5633 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5634 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5635 cf_have_incdir=yes; break
5640 if test "$cf_have_incdir" = no ; then
5641 if test "$cf_add_incdir" = /usr/local/include ; then
5642 if test "$GCC" = yes
5644 cf_save_CPPFLAGS=$CPPFLAGS
5645 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5646 cat >conftest.$ac_ext <<_ACEOF
5647 #line 5647 "configure"
5648 #include "confdefs.h"
5658 rm -f conftest.$ac_objext
5659 if { (eval echo "$as_me:5659: \"$ac_compile\"") >&5
5660 (eval $ac_compile) 2>&5
5662 echo "$as_me:5662: \$? = $ac_status" >&5
5663 (exit $ac_status); } &&
5664 { ac_try='test -s conftest.$ac_objext'
5665 { (eval echo "$as_me:5665: \"$ac_try\"") >&5
5668 echo "$as_me:5668: \$? = $ac_status" >&5
5669 (exit $ac_status); }; }; then
5672 echo "$as_me: failed program was:" >&5
5673 cat conftest.$ac_ext >&5
5676 rm -f conftest.$ac_objext conftest.$ac_ext
5677 CPPFLAGS=$cf_save_CPPFLAGS
5682 if test "$cf_have_incdir" = no ; then
5683 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5685 echo "${as_me:-configure}:5685: testing adding $cf_add_incdir to include-path ..." 1>&5
5687 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5689 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5690 test "$cf_top_incdir" = "$cf_add_incdir" && break
5691 cf_add_incdir="$cf_top_incdir"
5702 if test -n "$cf_cv_library_path_utf8" ; then
5703 for cf_add_libdir in $cf_cv_library_path_utf8
5705 if test $cf_add_libdir = /usr/lib ; then
5707 elif test -d $cf_add_libdir
5710 if test -n "$LDFLAGS$LIBS" ; then
5711 # a loop is needed to ensure we can add subdirs of existing dirs
5712 for cf_test_libdir in $LDFLAGS $LIBS ; do
5713 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5714 cf_have_libdir=yes; break
5718 if test "$cf_have_libdir" = no ; then
5719 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5721 echo "${as_me:-configure}:5721: testing adding $cf_add_libdir to library-path ..." 1>&5
5723 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5729 cf_add_libs="$cf_cv_library_file_utf8"
5730 # Filter out duplicates - this happens with badly-designed ".pc" files...
5731 for cf_add_1lib in $LIBS
5733 for cf_add_2lib in $cf_add_libs
5735 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5741 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5747 cf_ncuconfig_root=ncursesw
5748 cf_have_ncuconfig=no
5750 if test "x$PKG_CONFIG" != xnone; then
5751 echo "$as_me:5751: checking pkg-config for $cf_ncuconfig_root" >&5
5752 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
5753 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
5754 echo "$as_me:5754: result: yes" >&5
5755 echo "${ECHO_T}yes" >&6
5757 echo "$as_me:5757: checking if the $cf_ncuconfig_root package files work" >&5
5758 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
5759 cf_have_ncuconfig=unknown
5761 cf_save_CPPFLAGS="$CPPFLAGS"
5762 cf_save_LIBS="$LIBS"
5764 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
5766 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
5767 # Filter out duplicates - this happens with badly-designed ".pc" files...
5768 for cf_add_1lib in $LIBS
5770 for cf_add_2lib in $cf_add_libs
5772 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5778 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5782 cat >conftest.$ac_ext <<_ACEOF
5783 #line 5783 "configure"
5784 #include "confdefs.h"
5785 #include <${cf_cv_ncurses_header:-curses.h}>
5789 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5794 rm -f conftest.$ac_objext conftest$ac_exeext
5795 if { (eval echo "$as_me:5795: \"$ac_link\"") >&5
5796 (eval $ac_link) 2>&5
5798 echo "$as_me:5798: \$? = $ac_status" >&5
5799 (exit $ac_status); } &&
5800 { ac_try='test -s conftest$ac_exeext'
5801 { (eval echo "$as_me:5801: \"$ac_try\"") >&5
5804 echo "$as_me:5804: \$? = $ac_status" >&5
5805 (exit $ac_status); }; }; then
5806 if test "$cross_compiling" = yes; then
5807 cf_have_ncuconfig=unknown
5809 cat >conftest.$ac_ext <<_ACEOF
5810 #line 5810 "configure"
5811 #include "confdefs.h"
5812 #include <${cf_cv_ncurses_header:-curses.h}>
5814 { char *xx = curses_version(); return (xx == 0); }
5816 rm -f conftest$ac_exeext
5817 if { (eval echo "$as_me:5817: \"$ac_link\"") >&5
5818 (eval $ac_link) 2>&5
5820 echo "$as_me:5820: \$? = $ac_status" >&5
5821 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5822 { (eval echo "$as_me:5822: \"$ac_try\"") >&5
5825 echo "$as_me:5825: \$? = $ac_status" >&5
5826 (exit $ac_status); }; }; then
5827 cf_have_ncuconfig=yes
5829 echo "$as_me: program exited with status $ac_status" >&5
5830 echo "$as_me: failed program was:" >&5
5831 cat conftest.$ac_ext >&5
5832 cf_have_ncuconfig=no
5834 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5837 echo "$as_me: failed program was:" >&5
5838 cat conftest.$ac_ext >&5
5839 cf_have_ncuconfig=no
5841 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5843 echo "$as_me:5843: result: $cf_have_ncuconfig" >&5
5844 echo "${ECHO_T}$cf_have_ncuconfig" >&6
5845 if test "$cf_have_ncuconfig" != "yes"
5847 CPPFLAGS="$cf_save_CPPFLAGS"
5848 LIBS="$cf_save_LIBS"
5849 NCURSES_CONFIG_PKG=none
5852 cat >>confdefs.h <<\EOF
5856 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
5860 echo "$as_me:5860: result: no" >&5
5861 echo "${ECHO_T}no" >&6
5862 NCURSES_CONFIG_PKG=none
5865 NCURSES_CONFIG_PKG=none
5868 if test "x$cf_have_ncuconfig" = "xno"; then
5869 echo "Looking for ${cf_ncuconfig_root}-config"
5871 if test -n "$ac_tool_prefix"; then
5872 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5874 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5875 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5876 echo "$as_me:5876: checking for $ac_word" >&5
5877 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5878 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5879 echo $ECHO_N "(cached) $ECHO_C" >&6
5881 if test -n "$NCURSES_CONFIG"; then
5882 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5884 ac_save_IFS=$IFS; IFS=$ac_path_separator
5886 for ac_dir in $ac_dummy; do
5888 test -z "$ac_dir" && ac_dir=.
5889 $as_executable_p "$ac_dir/$ac_word" || continue
5890 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5891 echo "$as_me:5891: found $ac_dir/$ac_word" >&5
5897 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5898 if test -n "$NCURSES_CONFIG"; then
5899 echo "$as_me:5899: result: $NCURSES_CONFIG" >&5
5900 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5902 echo "$as_me:5902: result: no" >&5
5903 echo "${ECHO_T}no" >&6
5906 test -n "$NCURSES_CONFIG" && break
5909 if test -z "$NCURSES_CONFIG"; then
5910 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5911 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5913 # Extract the first word of "$ac_prog", so it can be a program name with args.
5914 set dummy $ac_prog; ac_word=$2
5915 echo "$as_me:5915: checking for $ac_word" >&5
5916 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5917 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5918 echo $ECHO_N "(cached) $ECHO_C" >&6
5920 if test -n "$ac_ct_NCURSES_CONFIG"; then
5921 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5923 ac_save_IFS=$IFS; IFS=$ac_path_separator
5925 for ac_dir in $ac_dummy; do
5927 test -z "$ac_dir" && ac_dir=.
5928 $as_executable_p "$ac_dir/$ac_word" || continue
5929 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5930 echo "$as_me:5930: found $ac_dir/$ac_word" >&5
5936 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5937 if test -n "$ac_ct_NCURSES_CONFIG"; then
5938 echo "$as_me:5938: result: $ac_ct_NCURSES_CONFIG" >&5
5939 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5941 echo "$as_me:5941: result: no" >&5
5942 echo "${ECHO_T}no" >&6
5945 test -n "$ac_ct_NCURSES_CONFIG" && break
5947 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5949 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5952 if test "$NCURSES_CONFIG" != none ; then
5954 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
5956 cf_add_libs="`$NCURSES_CONFIG --libs`"
5957 # Filter out duplicates - this happens with badly-designed ".pc" files...
5958 for cf_add_1lib in $LIBS
5960 for cf_add_2lib in $cf_add_libs
5962 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5968 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5972 # even with config script, some packages use no-override for curses.h
5974 echo "$as_me:5974: checking if we have identified curses headers" >&5
5975 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5976 if test "${cf_cv_ncurses_header+set}" = set; then
5977 echo $ECHO_N "(cached) $ECHO_C" >&6
5980 cf_cv_ncurses_header=none
5982 ncurses.h ncursesw/ncurses.h \
5983 curses.h ncursesw/curses.h
5985 cat >conftest.$ac_ext <<_ACEOF
5986 #line 5986 "configure"
5987 #include "confdefs.h"
5988 #include <${cf_header}>
5992 initscr(); tgoto("?", 0,0)
5997 rm -f conftest.$ac_objext
5998 if { (eval echo "$as_me:5998: \"$ac_compile\"") >&5
5999 (eval $ac_compile) 2>&5
6001 echo "$as_me:6001: \$? = $ac_status" >&5
6002 (exit $ac_status); } &&
6003 { ac_try='test -s conftest.$ac_objext'
6004 { (eval echo "$as_me:6004: \"$ac_try\"") >&5
6007 echo "$as_me:6007: \$? = $ac_status" >&5
6008 (exit $ac_status); }; }; then
6009 cf_cv_ncurses_header=$cf_header; break
6011 echo "$as_me: failed program was:" >&5
6012 cat conftest.$ac_ext >&5
6014 rm -f conftest.$ac_objext conftest.$ac_ext
6018 echo "$as_me:6018: result: $cf_cv_ncurses_header" >&5
6019 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6021 if test "$cf_cv_ncurses_header" = none ; then
6022 { { echo "$as_me:6022: error: No curses header-files found" >&5
6023 echo "$as_me: error: No curses header-files found" >&2;}
6024 { (exit 1); exit 1; }; }
6027 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6029 for ac_header in $cf_cv_ncurses_header
6031 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6032 echo "$as_me:6032: checking for $ac_header" >&5
6033 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6034 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6035 echo $ECHO_N "(cached) $ECHO_C" >&6
6037 cat >conftest.$ac_ext <<_ACEOF
6038 #line 6038 "configure"
6039 #include "confdefs.h"
6040 #include <$ac_header>
6042 if { (eval echo "$as_me:6042: \"$ac_cpp conftest.$ac_ext\"") >&5
6043 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6045 egrep -v '^ *\+' conftest.er1 >conftest.err
6047 cat conftest.err >&5
6048 echo "$as_me:6048: \$? = $ac_status" >&5
6049 (exit $ac_status); } >/dev/null; then
6050 if test -s conftest.err; then
6051 ac_cpp_err=$ac_c_preproc_warn_flag
6058 if test -z "$ac_cpp_err"; then
6059 eval "$as_ac_Header=yes"
6061 echo "$as_me: failed program was:" >&5
6062 cat conftest.$ac_ext >&5
6063 eval "$as_ac_Header=no"
6065 rm -f conftest.err conftest.$ac_ext
6067 echo "$as_me:6067: result: `eval echo '${'$as_ac_Header'}'`" >&5
6068 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6069 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6070 cat >>confdefs.h <<EOF
6071 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6077 cat >>confdefs.h <<\EOF
6081 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6083 cat >>confdefs.h <<EOF
6084 #define $cf_nculib_ROOT 1
6087 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6091 cf_ncuhdr_root=ncursesw
6093 test -n "$cf_cv_curses_dir" && \
6094 test "$cf_cv_curses_dir" != "no" && { \
6096 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6097 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6099 while test $cf_add_incdir != /usr/include
6101 if test -d $cf_add_incdir
6104 if test -n "$CFLAGS$CPPFLAGS" ; then
6105 # a loop is needed to ensure we can add subdirs of existing dirs
6106 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6107 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6108 cf_have_incdir=yes; break
6113 if test "$cf_have_incdir" = no ; then
6114 if test "$cf_add_incdir" = /usr/local/include ; then
6115 if test "$GCC" = yes
6117 cf_save_CPPFLAGS=$CPPFLAGS
6118 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6119 cat >conftest.$ac_ext <<_ACEOF
6120 #line 6120 "configure"
6121 #include "confdefs.h"
6131 rm -f conftest.$ac_objext
6132 if { (eval echo "$as_me:6132: \"$ac_compile\"") >&5
6133 (eval $ac_compile) 2>&5
6135 echo "$as_me:6135: \$? = $ac_status" >&5
6136 (exit $ac_status); } &&
6137 { ac_try='test -s conftest.$ac_objext'
6138 { (eval echo "$as_me:6138: \"$ac_try\"") >&5
6141 echo "$as_me:6141: \$? = $ac_status" >&5
6142 (exit $ac_status); }; }; then
6145 echo "$as_me: failed program was:" >&5
6146 cat conftest.$ac_ext >&5
6149 rm -f conftest.$ac_objext conftest.$ac_ext
6150 CPPFLAGS=$cf_save_CPPFLAGS
6155 if test "$cf_have_incdir" = no ; then
6156 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6158 echo "${as_me:-configure}:6158: testing adding $cf_add_incdir to include-path ..." 1>&5
6160 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6162 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6163 test "$cf_top_incdir" = "$cf_add_incdir" && break
6164 cf_add_incdir="$cf_top_incdir"
6177 echo "$as_me:6177: checking for $cf_ncuhdr_root header in include-path" >&5
6178 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6179 if test "${cf_cv_ncurses_h+set}" = set; then
6180 echo $ECHO_N "(cached) $ECHO_C" >&6
6183 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6184 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6185 for cf_header in $cf_header_list
6188 cat >conftest.$ac_ext <<_ACEOF
6189 #line 6189 "configure"
6190 #include "confdefs.h"
6192 #define _XOPEN_SOURCE_EXTENDED
6193 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
6194 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
6196 #include <$cf_header>
6201 #ifdef NCURSES_VERSION
6207 printf("%s\n", NCURSES_VERSION);
6220 rm -f conftest.$ac_objext
6221 if { (eval echo "$as_me:6221: \"$ac_compile\"") >&5
6222 (eval $ac_compile) 2>&5
6224 echo "$as_me:6224: \$? = $ac_status" >&5
6225 (exit $ac_status); } &&
6226 { ac_try='test -s conftest.$ac_objext'
6227 { (eval echo "$as_me:6227: \"$ac_try\"") >&5
6230 echo "$as_me:6230: \$? = $ac_status" >&5
6231 (exit $ac_status); }; }; then
6232 cf_cv_ncurses_h=$cf_header
6235 echo "$as_me: failed program was:" >&5
6236 cat conftest.$ac_ext >&5
6239 rm -f conftest.$ac_objext conftest.$ac_ext
6241 test "$cf_cv_ncurses_h" != no && break
6245 echo "$as_me:6245: result: $cf_cv_ncurses_h" >&5
6246 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6248 if test "$cf_cv_ncurses_h" != no ; then
6249 cf_cv_ncurses_header=$cf_cv_ncurses_h
6252 echo "$as_me:6252: checking for $cf_ncuhdr_root include-path" >&5
6253 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6254 if test "${cf_cv_ncurses_h2+set}" = set; then
6255 echo $ECHO_N "(cached) $ECHO_C" >&6
6258 test -n "$verbose" && echo
6262 # collect the current set of include-directories from compiler flags
6263 cf_header_path_list=""
6264 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6265 for cf_header_path in $CPPFLAGS $CFLAGS
6267 case $cf_header_path in
6269 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6271 test "x$cf_header_path" != "xNONE" && \
6272 test -d "$cf_header_path" && \
6274 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6275 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6276 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6277 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6278 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6279 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"
6282 cf_header_path_list="$cf_header_path_list $cf_search"
6288 # add the variations for the package we are looking for
6292 test "x$prefix" != "xNONE" && \
6293 test -d "$prefix" && \
6295 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6296 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6297 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6298 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6299 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6300 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6303 for cf_subdir_prefix in \
6312 test "x$cf_subdir_prefix" != "x$prefix" && \
6313 test -d "$cf_subdir_prefix" && \
6314 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6315 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6316 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6317 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
6318 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
6319 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
6320 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"
6325 test "$includedir" != NONE && \
6326 test "$includedir" != "/usr/include" && \
6327 test -d "$includedir" && {
6328 test -d $includedir && cf_search="$cf_search $includedir"
6329 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6332 test "$oldincludedir" != NONE && \
6333 test "$oldincludedir" != "/usr/include" && \
6334 test -d "$oldincludedir" && {
6335 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6336 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6339 cf_search="$cf_search $cf_header_path_list"
6341 test -n "$verbose" && echo search path $cf_search
6342 cf_save2_CPPFLAGS="$CPPFLAGS"
6343 for cf_incdir in $cf_search
6346 if test -n "$cf_incdir" ; then
6347 for cf_add_incdir in $cf_incdir
6349 while test $cf_add_incdir != /usr/include
6351 if test -d $cf_add_incdir
6354 if test -n "$CFLAGS$CPPFLAGS" ; then
6355 # a loop is needed to ensure we can add subdirs of existing dirs
6356 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6357 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6358 cf_have_incdir=yes; break
6363 if test "$cf_have_incdir" = no ; then
6364 if test "$cf_add_incdir" = /usr/local/include ; then
6365 if test "$GCC" = yes
6367 cf_save_CPPFLAGS=$CPPFLAGS
6368 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6369 cat >conftest.$ac_ext <<_ACEOF
6370 #line 6370 "configure"
6371 #include "confdefs.h"
6381 rm -f conftest.$ac_objext
6382 if { (eval echo "$as_me:6382: \"$ac_compile\"") >&5
6383 (eval $ac_compile) 2>&5
6385 echo "$as_me:6385: \$? = $ac_status" >&5
6386 (exit $ac_status); } &&
6387 { ac_try='test -s conftest.$ac_objext'
6388 { (eval echo "$as_me:6388: \"$ac_try\"") >&5
6391 echo "$as_me:6391: \$? = $ac_status" >&5
6392 (exit $ac_status); }; }; then
6395 echo "$as_me: failed program was:" >&5
6396 cat conftest.$ac_ext >&5
6399 rm -f conftest.$ac_objext conftest.$ac_ext
6400 CPPFLAGS=$cf_save_CPPFLAGS
6405 if test "$cf_have_incdir" = no ; then
6406 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6408 echo "${as_me:-configure}:6408: testing adding $cf_add_incdir to include-path ..." 1>&5
6410 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6412 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6413 test "$cf_top_incdir" = "$cf_add_incdir" && break
6414 cf_add_incdir="$cf_top_incdir"
6430 cat >conftest.$ac_ext <<_ACEOF
6431 #line 6431 "configure"
6432 #include "confdefs.h"
6434 #include <$cf_header>
6439 #ifdef NCURSES_VERSION
6441 printf("%s\n", NCURSES_VERSION);
6454 rm -f conftest.$ac_objext
6455 if { (eval echo "$as_me:6455: \"$ac_compile\"") >&5
6456 (eval $ac_compile) 2>&5
6458 echo "$as_me:6458: \$? = $ac_status" >&5
6459 (exit $ac_status); } &&
6460 { ac_try='test -s conftest.$ac_objext'
6461 { (eval echo "$as_me:6461: \"$ac_try\"") >&5
6464 echo "$as_me:6464: \$? = $ac_status" >&5
6465 (exit $ac_status); }; }; then
6466 cf_cv_ncurses_h2=$cf_header
6469 echo "$as_me: failed program was:" >&5
6470 cat conftest.$ac_ext >&5
6473 rm -f conftest.$ac_objext conftest.$ac_ext
6475 if test "$cf_cv_ncurses_h2" != no ; then
6476 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6477 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
6480 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
6482 CPPFLAGS="$cf_save2_CPPFLAGS"
6483 test "$cf_cv_ncurses_h2" != no && break
6485 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6485: error: not found" >&5
6486 echo "$as_me: error: not found" >&2;}
6487 { (exit 1); exit 1; }; }
6490 echo "$as_me:6490: result: $cf_cv_ncurses_h2" >&5
6491 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6493 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6494 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6495 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6496 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6499 if test -n "$cf_1st_incdir" ; then
6500 for cf_add_incdir in $cf_1st_incdir
6502 while test $cf_add_incdir != /usr/include
6504 if test -d $cf_add_incdir
6507 if test -n "$CFLAGS$CPPFLAGS" ; then
6508 # a loop is needed to ensure we can add subdirs of existing dirs
6509 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6510 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6511 cf_have_incdir=yes; break
6516 if test "$cf_have_incdir" = no ; then
6517 if test "$cf_add_incdir" = /usr/local/include ; then
6518 if test "$GCC" = yes
6520 cf_save_CPPFLAGS=$CPPFLAGS
6521 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6522 cat >conftest.$ac_ext <<_ACEOF
6523 #line 6523 "configure"
6524 #include "confdefs.h"
6534 rm -f conftest.$ac_objext
6535 if { (eval echo "$as_me:6535: \"$ac_compile\"") >&5
6536 (eval $ac_compile) 2>&5
6538 echo "$as_me:6538: \$? = $ac_status" >&5
6539 (exit $ac_status); } &&
6540 { ac_try='test -s conftest.$ac_objext'
6541 { (eval echo "$as_me:6541: \"$ac_try\"") >&5
6544 echo "$as_me:6544: \$? = $ac_status" >&5
6545 (exit $ac_status); }; }; then
6548 echo "$as_me: failed program was:" >&5
6549 cat conftest.$ac_ext >&5
6552 rm -f conftest.$ac_objext conftest.$ac_ext
6553 CPPFLAGS=$cf_save_CPPFLAGS
6558 if test "$cf_have_incdir" = no ; then
6559 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6561 echo "${as_me:-configure}:6561: testing adding $cf_add_incdir to include-path ..." 1>&5
6563 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6565 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6566 test "$cf_top_incdir" = "$cf_add_incdir" && break
6567 cf_add_incdir="$cf_top_incdir"
6580 # Set definitions to allow ifdef'ing for ncurses.h
6582 case $cf_cv_ncurses_header in
6585 cat >>confdefs.h <<\EOF
6586 #define HAVE_NCURSES_H 1
6592 case $cf_cv_ncurses_header in
6593 (ncurses/curses.h|ncurses/ncurses.h)
6595 cat >>confdefs.h <<\EOF
6596 #define HAVE_NCURSES_NCURSES_H 1
6600 (ncursesw/curses.h|ncursesw/ncurses.h)
6602 cat >>confdefs.h <<\EOF
6603 #define HAVE_NCURSESW_NCURSES_H 1
6609 echo "$as_me:6609: checking for terminfo header" >&5
6610 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6611 if test "${cf_cv_term_header+set}" = set; then
6612 echo $ECHO_N "(cached) $ECHO_C" >&6
6615 case ${cf_cv_ncurses_header} in
6616 (*/ncurses.h|*/ncursesw.h)
6617 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6620 cf_term_header=term.h
6624 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6626 cat >conftest.$ac_ext <<_ACEOF
6627 #line 6627 "configure"
6628 #include "confdefs.h"
6630 #include <${cf_cv_ncurses_header:-curses.h}>
6636 int x = auto_left_margin
6641 rm -f conftest.$ac_objext
6642 if { (eval echo "$as_me:6642: \"$ac_compile\"") >&5
6643 (eval $ac_compile) 2>&5
6645 echo "$as_me:6645: \$? = $ac_status" >&5
6646 (exit $ac_status); } &&
6647 { ac_try='test -s conftest.$ac_objext'
6648 { (eval echo "$as_me:6648: \"$ac_try\"") >&5
6651 echo "$as_me:6651: \$? = $ac_status" >&5
6652 (exit $ac_status); }; }; then
6654 cf_cv_term_header="$cf_test"
6656 echo "$as_me: failed program was:" >&5
6657 cat conftest.$ac_ext >&5
6659 cf_cv_term_header=unknown
6662 rm -f conftest.$ac_objext conftest.$ac_ext
6663 test "$cf_cv_term_header" != unknown && break
6667 echo "$as_me:6667: result: $cf_cv_term_header" >&5
6668 echo "${ECHO_T}$cf_cv_term_header" >&6
6670 # Set definitions to allow ifdef'ing to accommodate subdirectories
6672 case $cf_cv_term_header in
6675 cat >>confdefs.h <<\EOF
6676 #define HAVE_TERM_H 1
6682 case $cf_cv_term_header in
6685 cat >>confdefs.h <<\EOF
6686 #define HAVE_NCURSES_TERM_H 1
6692 cat >>confdefs.h <<\EOF
6693 #define HAVE_NCURSESW_TERM_H 1
6699 # some applications need this, but should check for NCURSES_VERSION
6701 cat >>confdefs.h <<\EOF
6705 echo "$as_me:6705: checking for ncurses version" >&5
6706 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6707 if test "${cf_cv_ncurses_version+set}" = set; then
6708 echo $ECHO_N "(cached) $ECHO_C" >&6
6711 cf_cv_ncurses_version=no
6714 if test "$cross_compiling" = yes; then
6716 # This will not work if the preprocessor splits the line after the
6717 # Autoconf token. The 'unproto' program does that.
6718 cat > conftest.$ac_ext <<EOF
6719 #include <${cf_cv_ncurses_header:-curses.h}>
6721 #ifdef NCURSES_VERSION
6722 Autoconf NCURSES_VERSION
6730 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6731 { (eval echo "$as_me:6731: \"$cf_try\"") >&5
6734 echo "$as_me:6734: \$? = $ac_status" >&5
6735 (exit $ac_status); }
6736 if test -f conftest.out ; then
6737 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6738 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6743 cat >conftest.$ac_ext <<_ACEOF
6744 #line 6744 "configure"
6745 #include "confdefs.h"
6747 #include <${cf_cv_ncurses_header:-curses.h}>
6751 FILE *fp = fopen("$cf_tempfile", "w");
6752 #ifdef NCURSES_VERSION
6753 # ifdef NCURSES_VERSION_PATCH
6754 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6756 fprintf(fp, "%s\n", NCURSES_VERSION);
6760 fprintf(fp, "old\n");
6765 ${cf_cv_main_return:-return}(0);
6768 rm -f conftest$ac_exeext
6769 if { (eval echo "$as_me:6769: \"$ac_link\"") >&5
6770 (eval $ac_link) 2>&5
6772 echo "$as_me:6772: \$? = $ac_status" >&5
6773 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6774 { (eval echo "$as_me:6774: \"$ac_try\"") >&5
6777 echo "$as_me:6777: \$? = $ac_status" >&5
6778 (exit $ac_status); }; }; then
6780 cf_cv_ncurses_version=`cat $cf_tempfile`
6782 echo "$as_me: program exited with status $ac_status" >&5
6783 echo "$as_me: failed program was:" >&5
6784 cat conftest.$ac_ext >&5
6786 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6791 echo "$as_me:6791: result: $cf_cv_ncurses_version" >&5
6792 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6793 test "$cf_cv_ncurses_version" = no ||
6794 cat >>confdefs.h <<\EOF
6798 cf_nculib_root=ncursesw
6799 # This works, except for the special case where we find gpm, but
6800 # ncurses is in a nonstandard location via $LIBS, and we really want
6803 cf_ncurses_SAVE="$LIBS"
6804 echo "$as_me:6804: checking for Gpm_Open in -lgpm" >&5
6805 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6806 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6807 echo $ECHO_N "(cached) $ECHO_C" >&6
6809 ac_check_lib_save_LIBS=$LIBS
6811 cat >conftest.$ac_ext <<_ACEOF
6812 #line 6812 "configure"
6813 #include "confdefs.h"
6815 /* Override any gcc2 internal prototype to avoid an error. */
6819 /* We use char because int might match the return type of a gcc2
6820 builtin and then its argument prototype would still apply. */
6830 rm -f conftest.$ac_objext conftest$ac_exeext
6831 if { (eval echo "$as_me:6831: \"$ac_link\"") >&5
6832 (eval $ac_link) 2>&5
6834 echo "$as_me:6834: \$? = $ac_status" >&5
6835 (exit $ac_status); } &&
6836 { ac_try='test -s conftest$ac_exeext'
6837 { (eval echo "$as_me:6837: \"$ac_try\"") >&5
6840 echo "$as_me:6840: \$? = $ac_status" >&5
6841 (exit $ac_status); }; }; then
6842 ac_cv_lib_gpm_Gpm_Open=yes
6844 echo "$as_me: failed program was:" >&5
6845 cat conftest.$ac_ext >&5
6846 ac_cv_lib_gpm_Gpm_Open=no
6848 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6849 LIBS=$ac_check_lib_save_LIBS
6851 echo "$as_me:6851: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6852 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6853 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6854 echo "$as_me:6854: checking for initscr in -lgpm" >&5
6855 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6856 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6857 echo $ECHO_N "(cached) $ECHO_C" >&6
6859 ac_check_lib_save_LIBS=$LIBS
6861 cat >conftest.$ac_ext <<_ACEOF
6862 #line 6862 "configure"
6863 #include "confdefs.h"
6865 /* Override any gcc2 internal prototype to avoid an error. */
6869 /* We use char because int might match the return type of a gcc2
6870 builtin and then its argument prototype would still apply. */
6880 rm -f conftest.$ac_objext conftest$ac_exeext
6881 if { (eval echo "$as_me:6881: \"$ac_link\"") >&5
6882 (eval $ac_link) 2>&5
6884 echo "$as_me:6884: \$? = $ac_status" >&5
6885 (exit $ac_status); } &&
6886 { ac_try='test -s conftest$ac_exeext'
6887 { (eval echo "$as_me:6887: \"$ac_try\"") >&5
6890 echo "$as_me:6890: \$? = $ac_status" >&5
6891 (exit $ac_status); }; }; then
6892 ac_cv_lib_gpm_initscr=yes
6894 echo "$as_me: failed program was:" >&5
6895 cat conftest.$ac_ext >&5
6896 ac_cv_lib_gpm_initscr=no
6898 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6899 LIBS=$ac_check_lib_save_LIBS
6901 echo "$as_me:6901: result: $ac_cv_lib_gpm_initscr" >&5
6902 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6903 if test $ac_cv_lib_gpm_initscr = yes; then
6904 LIBS="$cf_ncurses_SAVE"
6906 cf_ncurses_LIBS="-lgpm"
6913 # This is only necessary if you are linking against an obsolete
6914 # version of ncurses (but it should do no harm, since it's static).
6915 if test "$cf_nculib_root" = ncurses ; then
6916 echo "$as_me:6916: checking for tgoto in -lmytinfo" >&5
6917 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6918 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6919 echo $ECHO_N "(cached) $ECHO_C" >&6
6921 ac_check_lib_save_LIBS=$LIBS
6922 LIBS="-lmytinfo $LIBS"
6923 cat >conftest.$ac_ext <<_ACEOF
6924 #line 6924 "configure"
6925 #include "confdefs.h"
6927 /* Override any gcc2 internal prototype to avoid an error. */
6931 /* We use char because int might match the return type of a gcc2
6932 builtin and then its argument prototype would still apply. */
6942 rm -f conftest.$ac_objext conftest$ac_exeext
6943 if { (eval echo "$as_me:6943: \"$ac_link\"") >&5
6944 (eval $ac_link) 2>&5
6946 echo "$as_me:6946: \$? = $ac_status" >&5
6947 (exit $ac_status); } &&
6948 { ac_try='test -s conftest$ac_exeext'
6949 { (eval echo "$as_me:6949: \"$ac_try\"") >&5
6952 echo "$as_me:6952: \$? = $ac_status" >&5
6953 (exit $ac_status); }; }; then
6954 ac_cv_lib_mytinfo_tgoto=yes
6956 echo "$as_me: failed program was:" >&5
6957 cat conftest.$ac_ext >&5
6958 ac_cv_lib_mytinfo_tgoto=no
6960 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6961 LIBS=$ac_check_lib_save_LIBS
6963 echo "$as_me:6963: result: $ac_cv_lib_mytinfo_tgoto" >&5
6964 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6965 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6966 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6973 cf_add_libs="$cf_ncurses_LIBS"
6974 # Filter out duplicates - this happens with badly-designed ".pc" files...
6975 for cf_add_1lib in $LIBS
6977 for cf_add_2lib in $cf_add_libs
6979 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6985 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6989 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
6992 cf_add_libs="-l$cf_nculib_root"
6993 # Filter out duplicates - this happens with badly-designed ".pc" files...
6994 for cf_add_1lib in $LIBS
6996 for cf_add_2lib in $cf_add_libs
6998 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7004 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7010 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7012 echo "$as_me:7012: checking for initscr" >&5
7013 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7014 if test "${ac_cv_func_initscr+set}" = set; then
7015 echo $ECHO_N "(cached) $ECHO_C" >&6
7017 cat >conftest.$ac_ext <<_ACEOF
7018 #line 7018 "configure"
7019 #include "confdefs.h"
7020 /* System header to define __stub macros and hopefully few prototypes,
7021 which can conflict with char initscr (); below. */
7023 /* Override any gcc2 internal prototype to avoid an error. */
7027 /* We use char because int might match the return type of a gcc2
7028 builtin and then its argument prototype would still apply. */
7035 /* The GNU C library defines this for functions which it implements
7036 to always fail with ENOSYS. Some functions are actually named
7037 something starting with __ and the normal name is an alias. */
7038 #if defined (__stub_initscr) || defined (__stub___initscr)
7041 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7048 rm -f conftest.$ac_objext conftest$ac_exeext
7049 if { (eval echo "$as_me:7049: \"$ac_link\"") >&5
7050 (eval $ac_link) 2>&5
7052 echo "$as_me:7052: \$? = $ac_status" >&5
7053 (exit $ac_status); } &&
7054 { ac_try='test -s conftest$ac_exeext'
7055 { (eval echo "$as_me:7055: \"$ac_try\"") >&5
7058 echo "$as_me:7058: \$? = $ac_status" >&5
7059 (exit $ac_status); }; }; then
7060 ac_cv_func_initscr=yes
7062 echo "$as_me: failed program was:" >&5
7063 cat conftest.$ac_ext >&5
7064 ac_cv_func_initscr=no
7066 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7068 echo "$as_me:7068: result: $ac_cv_func_initscr" >&5
7069 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7070 if test $ac_cv_func_initscr = yes; then
7071 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7074 cf_save_LIBS="$LIBS"
7075 echo "$as_me:7075: checking for initscr in -l$cf_nculib_root" >&5
7076 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7077 LIBS="-l$cf_nculib_root $LIBS"
7078 cat >conftest.$ac_ext <<_ACEOF
7079 #line 7079 "configure"
7080 #include "confdefs.h"
7081 #include <${cf_cv_ncurses_header:-curses.h}>
7090 rm -f conftest.$ac_objext conftest$ac_exeext
7091 if { (eval echo "$as_me:7091: \"$ac_link\"") >&5
7092 (eval $ac_link) 2>&5
7094 echo "$as_me:7094: \$? = $ac_status" >&5
7095 (exit $ac_status); } &&
7096 { ac_try='test -s conftest$ac_exeext'
7097 { (eval echo "$as_me:7097: \"$ac_try\"") >&5
7100 echo "$as_me:7100: \$? = $ac_status" >&5
7101 (exit $ac_status); }; }; then
7102 echo "$as_me:7102: result: yes" >&5
7103 echo "${ECHO_T}yes" >&6
7104 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7107 echo "$as_me: failed program was:" >&5
7108 cat conftest.$ac_ext >&5
7109 echo "$as_me:7109: result: no" >&5
7110 echo "${ECHO_T}no" >&6
7113 cf_library_path_list=""
7114 if test -n "${LDFLAGS}${LIBS}" ; then
7115 for cf_library_path in $LDFLAGS $LIBS
7117 case $cf_library_path in
7119 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7121 test "x$cf_library_path" != "xNONE" && \
7122 test -d "$cf_library_path" && \
7124 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7125 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7126 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7127 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7128 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7129 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"
7132 cf_library_path_list="$cf_library_path_list $cf_search"
7140 test "x$prefix" != "xNONE" && \
7141 test -d "$prefix" && \
7143 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7144 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7145 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7146 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7147 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7148 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7151 for cf_subdir_prefix in \
7160 test "x$cf_subdir_prefix" != "x$prefix" && \
7161 test -d "$cf_subdir_prefix" && \
7162 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7163 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7164 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
7165 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
7166 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
7167 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
7168 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"
7173 cf_search="$cf_library_path_list $cf_search"
7175 for cf_libdir in $cf_search
7177 echo "$as_me:7177: checking for -l$cf_nculib_root in $cf_libdir" >&5
7178 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7179 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7180 cat >conftest.$ac_ext <<_ACEOF
7181 #line 7181 "configure"
7182 #include "confdefs.h"
7183 #include <${cf_cv_ncurses_header:-curses.h}>
7192 rm -f conftest.$ac_objext conftest$ac_exeext
7193 if { (eval echo "$as_me:7193: \"$ac_link\"") >&5
7194 (eval $ac_link) 2>&5
7196 echo "$as_me:7196: \$? = $ac_status" >&5
7197 (exit $ac_status); } &&
7198 { ac_try='test -s conftest$ac_exeext'
7199 { (eval echo "$as_me:7199: \"$ac_try\"") >&5
7202 echo "$as_me:7202: \$? = $ac_status" >&5
7203 (exit $ac_status); }; }; then
7204 echo "$as_me:7204: result: yes" >&5
7205 echo "${ECHO_T}yes" >&6
7206 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7209 echo "$as_me: failed program was:" >&5
7210 cat conftest.$ac_ext >&5
7211 echo "$as_me:7211: result: no" >&5
7212 echo "${ECHO_T}no" >&6
7213 LIBS="$cf_save_LIBS"
7215 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7219 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7223 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7225 if test $cf_found_library = no ; then
7226 { { echo "$as_me:7226: error: Cannot link $cf_nculib_root library" >&5
7227 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7228 { (exit 1); exit 1; }; }
7233 if test -n "$cf_ncurses_LIBS" ; then
7234 echo "$as_me:7234: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7235 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7236 cf_ncurses_SAVE="$LIBS"
7237 for p in $cf_ncurses_LIBS ; do
7238 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7239 if test "$q" != "$LIBS" ; then
7243 cat >conftest.$ac_ext <<_ACEOF
7244 #line 7244 "configure"
7245 #include "confdefs.h"
7246 #include <${cf_cv_ncurses_header:-curses.h}>
7250 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7255 rm -f conftest.$ac_objext conftest$ac_exeext
7256 if { (eval echo "$as_me:7256: \"$ac_link\"") >&5
7257 (eval $ac_link) 2>&5
7259 echo "$as_me:7259: \$? = $ac_status" >&5
7260 (exit $ac_status); } &&
7261 { ac_try='test -s conftest$ac_exeext'
7262 { (eval echo "$as_me:7262: \"$ac_try\"") >&5
7265 echo "$as_me:7265: \$? = $ac_status" >&5
7266 (exit $ac_status); }; }; then
7267 echo "$as_me:7267: result: yes" >&5
7268 echo "${ECHO_T}yes" >&6
7270 echo "$as_me: failed program was:" >&5
7271 cat conftest.$ac_ext >&5
7272 echo "$as_me:7272: result: no" >&5
7273 echo "${ECHO_T}no" >&6
7274 LIBS="$cf_ncurses_SAVE"
7276 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7279 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7281 cat >>confdefs.h <<EOF
7282 #define $cf_nculib_ROOT 1
7292 cf_ncuconfig_root=ncurses
7293 cf_have_ncuconfig=no
7295 if test "x$PKG_CONFIG" != xnone; then
7296 echo "$as_me:7296: checking pkg-config for $cf_ncuconfig_root" >&5
7297 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7298 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7299 echo "$as_me:7299: result: yes" >&5
7300 echo "${ECHO_T}yes" >&6
7302 echo "$as_me:7302: checking if the $cf_ncuconfig_root package files work" >&5
7303 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7304 cf_have_ncuconfig=unknown
7306 cf_save_CPPFLAGS="$CPPFLAGS"
7307 cf_save_LIBS="$LIBS"
7309 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7311 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7312 # Filter out duplicates - this happens with badly-designed ".pc" files...
7313 for cf_add_1lib in $LIBS
7315 for cf_add_2lib in $cf_add_libs
7317 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7323 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7327 cat >conftest.$ac_ext <<_ACEOF
7328 #line 7328 "configure"
7329 #include "confdefs.h"
7330 #include <${cf_cv_ncurses_header:-curses.h}>
7334 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7339 rm -f conftest.$ac_objext conftest$ac_exeext
7340 if { (eval echo "$as_me:7340: \"$ac_link\"") >&5
7341 (eval $ac_link) 2>&5
7343 echo "$as_me:7343: \$? = $ac_status" >&5
7344 (exit $ac_status); } &&
7345 { ac_try='test -s conftest$ac_exeext'
7346 { (eval echo "$as_me:7346: \"$ac_try\"") >&5
7349 echo "$as_me:7349: \$? = $ac_status" >&5
7350 (exit $ac_status); }; }; then
7351 if test "$cross_compiling" = yes; then
7352 cf_have_ncuconfig=unknown
7354 cat >conftest.$ac_ext <<_ACEOF
7355 #line 7355 "configure"
7356 #include "confdefs.h"
7357 #include <${cf_cv_ncurses_header:-curses.h}>
7359 { char *xx = curses_version(); return (xx == 0); }
7361 rm -f conftest$ac_exeext
7362 if { (eval echo "$as_me:7362: \"$ac_link\"") >&5
7363 (eval $ac_link) 2>&5
7365 echo "$as_me:7365: \$? = $ac_status" >&5
7366 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7367 { (eval echo "$as_me:7367: \"$ac_try\"") >&5
7370 echo "$as_me:7370: \$? = $ac_status" >&5
7371 (exit $ac_status); }; }; then
7372 cf_have_ncuconfig=yes
7374 echo "$as_me: program exited with status $ac_status" >&5
7375 echo "$as_me: failed program was:" >&5
7376 cat conftest.$ac_ext >&5
7377 cf_have_ncuconfig=no
7379 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7382 echo "$as_me: failed program was:" >&5
7383 cat conftest.$ac_ext >&5
7384 cf_have_ncuconfig=no
7386 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7388 echo "$as_me:7388: result: $cf_have_ncuconfig" >&5
7389 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7390 if test "$cf_have_ncuconfig" != "yes"
7392 CPPFLAGS="$cf_save_CPPFLAGS"
7393 LIBS="$cf_save_LIBS"
7394 NCURSES_CONFIG_PKG=none
7397 cat >>confdefs.h <<\EOF
7401 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7405 echo "$as_me:7405: result: no" >&5
7406 echo "${ECHO_T}no" >&6
7407 NCURSES_CONFIG_PKG=none
7410 NCURSES_CONFIG_PKG=none
7413 if test "x$cf_have_ncuconfig" = "xno"; then
7414 echo "Looking for ${cf_ncuconfig_root}-config"
7416 if test -n "$ac_tool_prefix"; then
7417 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7419 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7420 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7421 echo "$as_me:7421: checking for $ac_word" >&5
7422 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7423 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7424 echo $ECHO_N "(cached) $ECHO_C" >&6
7426 if test -n "$NCURSES_CONFIG"; then
7427 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7429 ac_save_IFS=$IFS; IFS=$ac_path_separator
7431 for ac_dir in $ac_dummy; do
7433 test -z "$ac_dir" && ac_dir=.
7434 $as_executable_p "$ac_dir/$ac_word" || continue
7435 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7436 echo "$as_me:7436: found $ac_dir/$ac_word" >&5
7442 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7443 if test -n "$NCURSES_CONFIG"; then
7444 echo "$as_me:7444: result: $NCURSES_CONFIG" >&5
7445 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7447 echo "$as_me:7447: result: no" >&5
7448 echo "${ECHO_T}no" >&6
7451 test -n "$NCURSES_CONFIG" && break
7454 if test -z "$NCURSES_CONFIG"; then
7455 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7456 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7458 # Extract the first word of "$ac_prog", so it can be a program name with args.
7459 set dummy $ac_prog; ac_word=$2
7460 echo "$as_me:7460: checking for $ac_word" >&5
7461 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7462 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7463 echo $ECHO_N "(cached) $ECHO_C" >&6
7465 if test -n "$ac_ct_NCURSES_CONFIG"; then
7466 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7468 ac_save_IFS=$IFS; IFS=$ac_path_separator
7470 for ac_dir in $ac_dummy; do
7472 test -z "$ac_dir" && ac_dir=.
7473 $as_executable_p "$ac_dir/$ac_word" || continue
7474 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7475 echo "$as_me:7475: found $ac_dir/$ac_word" >&5
7481 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7482 if test -n "$ac_ct_NCURSES_CONFIG"; then
7483 echo "$as_me:7483: result: $ac_ct_NCURSES_CONFIG" >&5
7484 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7486 echo "$as_me:7486: result: no" >&5
7487 echo "${ECHO_T}no" >&6
7490 test -n "$ac_ct_NCURSES_CONFIG" && break
7492 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7494 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7497 if test "$NCURSES_CONFIG" != none ; then
7499 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
7501 cf_add_libs="`$NCURSES_CONFIG --libs`"
7502 # Filter out duplicates - this happens with badly-designed ".pc" files...
7503 for cf_add_1lib in $LIBS
7505 for cf_add_2lib in $cf_add_libs
7507 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7513 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7517 # even with config script, some packages use no-override for curses.h
7519 echo "$as_me:7519: checking if we have identified curses headers" >&5
7520 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7521 if test "${cf_cv_ncurses_header+set}" = set; then
7522 echo $ECHO_N "(cached) $ECHO_C" >&6
7525 cf_cv_ncurses_header=none
7527 ncurses.h ncurses/ncurses.h \
7528 curses.h ncurses/curses.h
7530 cat >conftest.$ac_ext <<_ACEOF
7531 #line 7531 "configure"
7532 #include "confdefs.h"
7533 #include <${cf_header}>
7537 initscr(); tgoto("?", 0,0)
7542 rm -f conftest.$ac_objext
7543 if { (eval echo "$as_me:7543: \"$ac_compile\"") >&5
7544 (eval $ac_compile) 2>&5
7546 echo "$as_me:7546: \$? = $ac_status" >&5
7547 (exit $ac_status); } &&
7548 { ac_try='test -s conftest.$ac_objext'
7549 { (eval echo "$as_me:7549: \"$ac_try\"") >&5
7552 echo "$as_me:7552: \$? = $ac_status" >&5
7553 (exit $ac_status); }; }; then
7554 cf_cv_ncurses_header=$cf_header; break
7556 echo "$as_me: failed program was:" >&5
7557 cat conftest.$ac_ext >&5
7559 rm -f conftest.$ac_objext conftest.$ac_ext
7563 echo "$as_me:7563: result: $cf_cv_ncurses_header" >&5
7564 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7566 if test "$cf_cv_ncurses_header" = none ; then
7567 { { echo "$as_me:7567: error: No curses header-files found" >&5
7568 echo "$as_me: error: No curses header-files found" >&2;}
7569 { (exit 1); exit 1; }; }
7572 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7574 for ac_header in $cf_cv_ncurses_header
7576 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7577 echo "$as_me:7577: checking for $ac_header" >&5
7578 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7579 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7580 echo $ECHO_N "(cached) $ECHO_C" >&6
7582 cat >conftest.$ac_ext <<_ACEOF
7583 #line 7583 "configure"
7584 #include "confdefs.h"
7585 #include <$ac_header>
7587 if { (eval echo "$as_me:7587: \"$ac_cpp conftest.$ac_ext\"") >&5
7588 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7590 egrep -v '^ *\+' conftest.er1 >conftest.err
7592 cat conftest.err >&5
7593 echo "$as_me:7593: \$? = $ac_status" >&5
7594 (exit $ac_status); } >/dev/null; then
7595 if test -s conftest.err; then
7596 ac_cpp_err=$ac_c_preproc_warn_flag
7603 if test -z "$ac_cpp_err"; then
7604 eval "$as_ac_Header=yes"
7606 echo "$as_me: failed program was:" >&5
7607 cat conftest.$ac_ext >&5
7608 eval "$as_ac_Header=no"
7610 rm -f conftest.err conftest.$ac_ext
7612 echo "$as_me:7612: result: `eval echo '${'$as_ac_Header'}'`" >&5
7613 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7614 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7615 cat >>confdefs.h <<EOF
7616 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7622 cat >>confdefs.h <<\EOF
7626 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7628 cat >>confdefs.h <<EOF
7629 #define $cf_nculib_ROOT 1
7632 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7636 cf_ncuhdr_root=ncurses
7638 test -n "$cf_cv_curses_dir" && \
7639 test "$cf_cv_curses_dir" != "no" && { \
7641 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7642 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7644 while test $cf_add_incdir != /usr/include
7646 if test -d $cf_add_incdir
7649 if test -n "$CFLAGS$CPPFLAGS" ; then
7650 # a loop is needed to ensure we can add subdirs of existing dirs
7651 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7652 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7653 cf_have_incdir=yes; break
7658 if test "$cf_have_incdir" = no ; then
7659 if test "$cf_add_incdir" = /usr/local/include ; then
7660 if test "$GCC" = yes
7662 cf_save_CPPFLAGS=$CPPFLAGS
7663 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7664 cat >conftest.$ac_ext <<_ACEOF
7665 #line 7665 "configure"
7666 #include "confdefs.h"
7676 rm -f conftest.$ac_objext
7677 if { (eval echo "$as_me:7677: \"$ac_compile\"") >&5
7678 (eval $ac_compile) 2>&5
7680 echo "$as_me:7680: \$? = $ac_status" >&5
7681 (exit $ac_status); } &&
7682 { ac_try='test -s conftest.$ac_objext'
7683 { (eval echo "$as_me:7683: \"$ac_try\"") >&5
7686 echo "$as_me:7686: \$? = $ac_status" >&5
7687 (exit $ac_status); }; }; then
7690 echo "$as_me: failed program was:" >&5
7691 cat conftest.$ac_ext >&5
7694 rm -f conftest.$ac_objext conftest.$ac_ext
7695 CPPFLAGS=$cf_save_CPPFLAGS
7700 if test "$cf_have_incdir" = no ; then
7701 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7703 echo "${as_me:-configure}:7703: testing adding $cf_add_incdir to include-path ..." 1>&5
7705 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7707 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7708 test "$cf_top_incdir" = "$cf_add_incdir" && break
7709 cf_add_incdir="$cf_top_incdir"
7722 echo "$as_me:7722: checking for $cf_ncuhdr_root header in include-path" >&5
7723 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
7724 if test "${cf_cv_ncurses_h+set}" = set; then
7725 echo $ECHO_N "(cached) $ECHO_C" >&6
7728 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
7729 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
7730 for cf_header in $cf_header_list
7733 cat >conftest.$ac_ext <<_ACEOF
7734 #line 7734 "configure"
7735 #include "confdefs.h"
7737 #include <$cf_header>
7742 #ifdef NCURSES_VERSION
7744 printf("%s\n", NCURSES_VERSION);
7757 rm -f conftest.$ac_objext
7758 if { (eval echo "$as_me:7758: \"$ac_compile\"") >&5
7759 (eval $ac_compile) 2>&5
7761 echo "$as_me:7761: \$? = $ac_status" >&5
7762 (exit $ac_status); } &&
7763 { ac_try='test -s conftest.$ac_objext'
7764 { (eval echo "$as_me:7764: \"$ac_try\"") >&5
7767 echo "$as_me:7767: \$? = $ac_status" >&5
7768 (exit $ac_status); }; }; then
7769 cf_cv_ncurses_h=$cf_header
7772 echo "$as_me: failed program was:" >&5
7773 cat conftest.$ac_ext >&5
7776 rm -f conftest.$ac_objext conftest.$ac_ext
7778 test "$cf_cv_ncurses_h" != no && break
7782 echo "$as_me:7782: result: $cf_cv_ncurses_h" >&5
7783 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
7785 if test "$cf_cv_ncurses_h" != no ; then
7786 cf_cv_ncurses_header=$cf_cv_ncurses_h
7789 echo "$as_me:7789: checking for $cf_ncuhdr_root include-path" >&5
7790 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
7791 if test "${cf_cv_ncurses_h2+set}" = set; then
7792 echo $ECHO_N "(cached) $ECHO_C" >&6
7795 test -n "$verbose" && echo
7799 # collect the current set of include-directories from compiler flags
7800 cf_header_path_list=""
7801 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7802 for cf_header_path in $CPPFLAGS $CFLAGS
7804 case $cf_header_path in
7806 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7808 test "x$cf_header_path" != "xNONE" && \
7809 test -d "$cf_header_path" && \
7811 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7812 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7813 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
7814 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
7815 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
7816 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"
7819 cf_header_path_list="$cf_header_path_list $cf_search"
7825 # add the variations for the package we are looking for
7829 test "x$prefix" != "xNONE" && \
7830 test -d "$prefix" && \
7832 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7833 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7834 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
7835 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
7836 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
7837 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7840 for cf_subdir_prefix in \
7849 test "x$cf_subdir_prefix" != "x$prefix" && \
7850 test -d "$cf_subdir_prefix" && \
7851 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7852 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7853 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
7854 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
7855 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
7856 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
7857 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"
7862 test "$includedir" != NONE && \
7863 test "$includedir" != "/usr/include" && \
7864 test -d "$includedir" && {
7865 test -d $includedir && cf_search="$cf_search $includedir"
7866 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
7869 test "$oldincludedir" != NONE && \
7870 test "$oldincludedir" != "/usr/include" && \
7871 test -d "$oldincludedir" && {
7872 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7873 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
7876 cf_search="$cf_search $cf_header_path_list"
7878 test -n "$verbose" && echo search path $cf_search
7879 cf_save2_CPPFLAGS="$CPPFLAGS"
7880 for cf_incdir in $cf_search
7883 if test -n "$cf_incdir" ; then
7884 for cf_add_incdir in $cf_incdir
7886 while test $cf_add_incdir != /usr/include
7888 if test -d $cf_add_incdir
7891 if test -n "$CFLAGS$CPPFLAGS" ; then
7892 # a loop is needed to ensure we can add subdirs of existing dirs
7893 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7894 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7895 cf_have_incdir=yes; break
7900 if test "$cf_have_incdir" = no ; then
7901 if test "$cf_add_incdir" = /usr/local/include ; then
7902 if test "$GCC" = yes
7904 cf_save_CPPFLAGS=$CPPFLAGS
7905 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7906 cat >conftest.$ac_ext <<_ACEOF
7907 #line 7907 "configure"
7908 #include "confdefs.h"
7918 rm -f conftest.$ac_objext
7919 if { (eval echo "$as_me:7919: \"$ac_compile\"") >&5
7920 (eval $ac_compile) 2>&5
7922 echo "$as_me:7922: \$? = $ac_status" >&5
7923 (exit $ac_status); } &&
7924 { ac_try='test -s conftest.$ac_objext'
7925 { (eval echo "$as_me:7925: \"$ac_try\"") >&5
7928 echo "$as_me:7928: \$? = $ac_status" >&5
7929 (exit $ac_status); }; }; then
7932 echo "$as_me: failed program was:" >&5
7933 cat conftest.$ac_ext >&5
7936 rm -f conftest.$ac_objext conftest.$ac_ext
7937 CPPFLAGS=$cf_save_CPPFLAGS
7942 if test "$cf_have_incdir" = no ; then
7943 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7945 echo "${as_me:-configure}:7945: testing adding $cf_add_incdir to include-path ..." 1>&5
7947 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7949 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7950 test "$cf_top_incdir" = "$cf_add_incdir" && break
7951 cf_add_incdir="$cf_top_incdir"
7967 cat >conftest.$ac_ext <<_ACEOF
7968 #line 7968 "configure"
7969 #include "confdefs.h"
7971 #include <$cf_header>
7976 #ifdef NCURSES_VERSION
7978 printf("%s\n", NCURSES_VERSION);
7991 rm -f conftest.$ac_objext
7992 if { (eval echo "$as_me:7992: \"$ac_compile\"") >&5
7993 (eval $ac_compile) 2>&5
7995 echo "$as_me:7995: \$? = $ac_status" >&5
7996 (exit $ac_status); } &&
7997 { ac_try='test -s conftest.$ac_objext'
7998 { (eval echo "$as_me:7998: \"$ac_try\"") >&5
8001 echo "$as_me:8001: \$? = $ac_status" >&5
8002 (exit $ac_status); }; }; then
8003 cf_cv_ncurses_h2=$cf_header
8006 echo "$as_me: failed program was:" >&5
8007 cat conftest.$ac_ext >&5
8010 rm -f conftest.$ac_objext conftest.$ac_ext
8012 if test "$cf_cv_ncurses_h2" != no ; then
8013 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8014 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8017 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8019 CPPFLAGS="$cf_save2_CPPFLAGS"
8020 test "$cf_cv_ncurses_h2" != no && break
8022 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8022: error: not found" >&5
8023 echo "$as_me: error: not found" >&2;}
8024 { (exit 1); exit 1; }; }
8027 echo "$as_me:8027: result: $cf_cv_ncurses_h2" >&5
8028 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8030 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8031 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8032 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8033 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8036 if test -n "$cf_1st_incdir" ; then
8037 for cf_add_incdir in $cf_1st_incdir
8039 while test $cf_add_incdir != /usr/include
8041 if test -d $cf_add_incdir
8044 if test -n "$CFLAGS$CPPFLAGS" ; then
8045 # a loop is needed to ensure we can add subdirs of existing dirs
8046 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8047 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8048 cf_have_incdir=yes; break
8053 if test "$cf_have_incdir" = no ; then
8054 if test "$cf_add_incdir" = /usr/local/include ; then
8055 if test "$GCC" = yes
8057 cf_save_CPPFLAGS=$CPPFLAGS
8058 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8059 cat >conftest.$ac_ext <<_ACEOF
8060 #line 8060 "configure"
8061 #include "confdefs.h"
8071 rm -f conftest.$ac_objext
8072 if { (eval echo "$as_me:8072: \"$ac_compile\"") >&5
8073 (eval $ac_compile) 2>&5
8075 echo "$as_me:8075: \$? = $ac_status" >&5
8076 (exit $ac_status); } &&
8077 { ac_try='test -s conftest.$ac_objext'
8078 { (eval echo "$as_me:8078: \"$ac_try\"") >&5
8081 echo "$as_me:8081: \$? = $ac_status" >&5
8082 (exit $ac_status); }; }; then
8085 echo "$as_me: failed program was:" >&5
8086 cat conftest.$ac_ext >&5
8089 rm -f conftest.$ac_objext conftest.$ac_ext
8090 CPPFLAGS=$cf_save_CPPFLAGS
8095 if test "$cf_have_incdir" = no ; then
8096 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8098 echo "${as_me:-configure}:8098: testing adding $cf_add_incdir to include-path ..." 1>&5
8100 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8102 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8103 test "$cf_top_incdir" = "$cf_add_incdir" && break
8104 cf_add_incdir="$cf_top_incdir"
8117 # Set definitions to allow ifdef'ing for ncurses.h
8119 case $cf_cv_ncurses_header in
8122 cat >>confdefs.h <<\EOF
8123 #define HAVE_NCURSES_H 1
8129 case $cf_cv_ncurses_header in
8130 (ncurses/curses.h|ncurses/ncurses.h)
8132 cat >>confdefs.h <<\EOF
8133 #define HAVE_NCURSES_NCURSES_H 1
8137 (ncursesw/curses.h|ncursesw/ncurses.h)
8139 cat >>confdefs.h <<\EOF
8140 #define HAVE_NCURSESW_NCURSES_H 1
8146 echo "$as_me:8146: checking for terminfo header" >&5
8147 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8148 if test "${cf_cv_term_header+set}" = set; then
8149 echo $ECHO_N "(cached) $ECHO_C" >&6
8152 case ${cf_cv_ncurses_header} in
8153 (*/ncurses.h|*/ncursesw.h)
8154 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8157 cf_term_header=term.h
8161 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8163 cat >conftest.$ac_ext <<_ACEOF
8164 #line 8164 "configure"
8165 #include "confdefs.h"
8167 #include <${cf_cv_ncurses_header:-curses.h}>
8173 int x = auto_left_margin
8178 rm -f conftest.$ac_objext
8179 if { (eval echo "$as_me:8179: \"$ac_compile\"") >&5
8180 (eval $ac_compile) 2>&5
8182 echo "$as_me:8182: \$? = $ac_status" >&5
8183 (exit $ac_status); } &&
8184 { ac_try='test -s conftest.$ac_objext'
8185 { (eval echo "$as_me:8185: \"$ac_try\"") >&5
8188 echo "$as_me:8188: \$? = $ac_status" >&5
8189 (exit $ac_status); }; }; then
8191 cf_cv_term_header="$cf_test"
8193 echo "$as_me: failed program was:" >&5
8194 cat conftest.$ac_ext >&5
8196 cf_cv_term_header=unknown
8199 rm -f conftest.$ac_objext conftest.$ac_ext
8200 test "$cf_cv_term_header" != unknown && break
8204 echo "$as_me:8204: result: $cf_cv_term_header" >&5
8205 echo "${ECHO_T}$cf_cv_term_header" >&6
8207 # Set definitions to allow ifdef'ing to accommodate subdirectories
8209 case $cf_cv_term_header in
8212 cat >>confdefs.h <<\EOF
8213 #define HAVE_TERM_H 1
8219 case $cf_cv_term_header in
8222 cat >>confdefs.h <<\EOF
8223 #define HAVE_NCURSES_TERM_H 1
8229 cat >>confdefs.h <<\EOF
8230 #define HAVE_NCURSESW_TERM_H 1
8236 # some applications need this, but should check for NCURSES_VERSION
8238 cat >>confdefs.h <<\EOF
8242 echo "$as_me:8242: checking for ncurses version" >&5
8243 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8244 if test "${cf_cv_ncurses_version+set}" = set; then
8245 echo $ECHO_N "(cached) $ECHO_C" >&6
8248 cf_cv_ncurses_version=no
8251 if test "$cross_compiling" = yes; then
8253 # This will not work if the preprocessor splits the line after the
8254 # Autoconf token. The 'unproto' program does that.
8255 cat > conftest.$ac_ext <<EOF
8256 #include <${cf_cv_ncurses_header:-curses.h}>
8258 #ifdef NCURSES_VERSION
8259 Autoconf NCURSES_VERSION
8267 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8268 { (eval echo "$as_me:8268: \"$cf_try\"") >&5
8271 echo "$as_me:8271: \$? = $ac_status" >&5
8272 (exit $ac_status); }
8273 if test -f conftest.out ; then
8274 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8275 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8280 cat >conftest.$ac_ext <<_ACEOF
8281 #line 8281 "configure"
8282 #include "confdefs.h"
8284 #include <${cf_cv_ncurses_header:-curses.h}>
8288 FILE *fp = fopen("$cf_tempfile", "w");
8289 #ifdef NCURSES_VERSION
8290 # ifdef NCURSES_VERSION_PATCH
8291 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8293 fprintf(fp, "%s\n", NCURSES_VERSION);
8297 fprintf(fp, "old\n");
8302 ${cf_cv_main_return:-return}(0);
8305 rm -f conftest$ac_exeext
8306 if { (eval echo "$as_me:8306: \"$ac_link\"") >&5
8307 (eval $ac_link) 2>&5
8309 echo "$as_me:8309: \$? = $ac_status" >&5
8310 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8311 { (eval echo "$as_me:8311: \"$ac_try\"") >&5
8314 echo "$as_me:8314: \$? = $ac_status" >&5
8315 (exit $ac_status); }; }; then
8317 cf_cv_ncurses_version=`cat $cf_tempfile`
8319 echo "$as_me: program exited with status $ac_status" >&5
8320 echo "$as_me: failed program was:" >&5
8321 cat conftest.$ac_ext >&5
8323 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8328 echo "$as_me:8328: result: $cf_cv_ncurses_version" >&5
8329 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8330 test "$cf_cv_ncurses_version" = no ||
8331 cat >>confdefs.h <<\EOF
8335 cf_nculib_root=ncurses
8336 # This works, except for the special case where we find gpm, but
8337 # ncurses is in a nonstandard location via $LIBS, and we really want
8340 cf_ncurses_SAVE="$LIBS"
8341 echo "$as_me:8341: checking for Gpm_Open in -lgpm" >&5
8342 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8343 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8344 echo $ECHO_N "(cached) $ECHO_C" >&6
8346 ac_check_lib_save_LIBS=$LIBS
8348 cat >conftest.$ac_ext <<_ACEOF
8349 #line 8349 "configure"
8350 #include "confdefs.h"
8352 /* Override any gcc2 internal prototype to avoid an error. */
8356 /* We use char because int might match the return type of a gcc2
8357 builtin and then its argument prototype would still apply. */
8367 rm -f conftest.$ac_objext conftest$ac_exeext
8368 if { (eval echo "$as_me:8368: \"$ac_link\"") >&5
8369 (eval $ac_link) 2>&5
8371 echo "$as_me:8371: \$? = $ac_status" >&5
8372 (exit $ac_status); } &&
8373 { ac_try='test -s conftest$ac_exeext'
8374 { (eval echo "$as_me:8374: \"$ac_try\"") >&5
8377 echo "$as_me:8377: \$? = $ac_status" >&5
8378 (exit $ac_status); }; }; then
8379 ac_cv_lib_gpm_Gpm_Open=yes
8381 echo "$as_me: failed program was:" >&5
8382 cat conftest.$ac_ext >&5
8383 ac_cv_lib_gpm_Gpm_Open=no
8385 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8386 LIBS=$ac_check_lib_save_LIBS
8388 echo "$as_me:8388: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8389 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8390 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8391 echo "$as_me:8391: checking for initscr in -lgpm" >&5
8392 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8393 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8394 echo $ECHO_N "(cached) $ECHO_C" >&6
8396 ac_check_lib_save_LIBS=$LIBS
8398 cat >conftest.$ac_ext <<_ACEOF
8399 #line 8399 "configure"
8400 #include "confdefs.h"
8402 /* Override any gcc2 internal prototype to avoid an error. */
8406 /* We use char because int might match the return type of a gcc2
8407 builtin and then its argument prototype would still apply. */
8417 rm -f conftest.$ac_objext conftest$ac_exeext
8418 if { (eval echo "$as_me:8418: \"$ac_link\"") >&5
8419 (eval $ac_link) 2>&5
8421 echo "$as_me:8421: \$? = $ac_status" >&5
8422 (exit $ac_status); } &&
8423 { ac_try='test -s conftest$ac_exeext'
8424 { (eval echo "$as_me:8424: \"$ac_try\"") >&5
8427 echo "$as_me:8427: \$? = $ac_status" >&5
8428 (exit $ac_status); }; }; then
8429 ac_cv_lib_gpm_initscr=yes
8431 echo "$as_me: failed program was:" >&5
8432 cat conftest.$ac_ext >&5
8433 ac_cv_lib_gpm_initscr=no
8435 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8436 LIBS=$ac_check_lib_save_LIBS
8438 echo "$as_me:8438: result: $ac_cv_lib_gpm_initscr" >&5
8439 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8440 if test $ac_cv_lib_gpm_initscr = yes; then
8441 LIBS="$cf_ncurses_SAVE"
8443 cf_ncurses_LIBS="-lgpm"
8450 # This is only necessary if you are linking against an obsolete
8451 # version of ncurses (but it should do no harm, since it's static).
8452 if test "$cf_nculib_root" = ncurses ; then
8453 echo "$as_me:8453: checking for tgoto in -lmytinfo" >&5
8454 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8455 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8456 echo $ECHO_N "(cached) $ECHO_C" >&6
8458 ac_check_lib_save_LIBS=$LIBS
8459 LIBS="-lmytinfo $LIBS"
8460 cat >conftest.$ac_ext <<_ACEOF
8461 #line 8461 "configure"
8462 #include "confdefs.h"
8464 /* Override any gcc2 internal prototype to avoid an error. */
8468 /* We use char because int might match the return type of a gcc2
8469 builtin and then its argument prototype would still apply. */
8479 rm -f conftest.$ac_objext conftest$ac_exeext
8480 if { (eval echo "$as_me:8480: \"$ac_link\"") >&5
8481 (eval $ac_link) 2>&5
8483 echo "$as_me:8483: \$? = $ac_status" >&5
8484 (exit $ac_status); } &&
8485 { ac_try='test -s conftest$ac_exeext'
8486 { (eval echo "$as_me:8486: \"$ac_try\"") >&5
8489 echo "$as_me:8489: \$? = $ac_status" >&5
8490 (exit $ac_status); }; }; then
8491 ac_cv_lib_mytinfo_tgoto=yes
8493 echo "$as_me: failed program was:" >&5
8494 cat conftest.$ac_ext >&5
8495 ac_cv_lib_mytinfo_tgoto=no
8497 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8498 LIBS=$ac_check_lib_save_LIBS
8500 echo "$as_me:8500: result: $ac_cv_lib_mytinfo_tgoto" >&5
8501 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8502 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8503 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8510 cf_add_libs="$cf_ncurses_LIBS"
8511 # Filter out duplicates - this happens with badly-designed ".pc" files...
8512 for cf_add_1lib in $LIBS
8514 for cf_add_2lib in $cf_add_libs
8516 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8522 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8526 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8529 cf_add_libs="-l$cf_nculib_root"
8530 # Filter out duplicates - this happens with badly-designed ".pc" files...
8531 for cf_add_1lib in $LIBS
8533 for cf_add_2lib in $cf_add_libs
8535 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8541 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8547 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
8549 echo "$as_me:8549: checking for initscr" >&5
8550 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8551 if test "${ac_cv_func_initscr+set}" = set; then
8552 echo $ECHO_N "(cached) $ECHO_C" >&6
8554 cat >conftest.$ac_ext <<_ACEOF
8555 #line 8555 "configure"
8556 #include "confdefs.h"
8557 /* System header to define __stub macros and hopefully few prototypes,
8558 which can conflict with char initscr (); below. */
8560 /* Override any gcc2 internal prototype to avoid an error. */
8564 /* We use char because int might match the return type of a gcc2
8565 builtin and then its argument prototype would still apply. */
8572 /* The GNU C library defines this for functions which it implements
8573 to always fail with ENOSYS. Some functions are actually named
8574 something starting with __ and the normal name is an alias. */
8575 #if defined (__stub_initscr) || defined (__stub___initscr)
8578 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8585 rm -f conftest.$ac_objext conftest$ac_exeext
8586 if { (eval echo "$as_me:8586: \"$ac_link\"") >&5
8587 (eval $ac_link) 2>&5
8589 echo "$as_me:8589: \$? = $ac_status" >&5
8590 (exit $ac_status); } &&
8591 { ac_try='test -s conftest$ac_exeext'
8592 { (eval echo "$as_me:8592: \"$ac_try\"") >&5
8595 echo "$as_me:8595: \$? = $ac_status" >&5
8596 (exit $ac_status); }; }; then
8597 ac_cv_func_initscr=yes
8599 echo "$as_me: failed program was:" >&5
8600 cat conftest.$ac_ext >&5
8601 ac_cv_func_initscr=no
8603 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8605 echo "$as_me:8605: result: $ac_cv_func_initscr" >&5
8606 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8607 if test $ac_cv_func_initscr = yes; then
8608 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8611 cf_save_LIBS="$LIBS"
8612 echo "$as_me:8612: checking for initscr in -l$cf_nculib_root" >&5
8613 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8614 LIBS="-l$cf_nculib_root $LIBS"
8615 cat >conftest.$ac_ext <<_ACEOF
8616 #line 8616 "configure"
8617 #include "confdefs.h"
8618 #include <${cf_cv_ncurses_header:-curses.h}>
8627 rm -f conftest.$ac_objext conftest$ac_exeext
8628 if { (eval echo "$as_me:8628: \"$ac_link\"") >&5
8629 (eval $ac_link) 2>&5
8631 echo "$as_me:8631: \$? = $ac_status" >&5
8632 (exit $ac_status); } &&
8633 { ac_try='test -s conftest$ac_exeext'
8634 { (eval echo "$as_me:8634: \"$ac_try\"") >&5
8637 echo "$as_me:8637: \$? = $ac_status" >&5
8638 (exit $ac_status); }; }; then
8639 echo "$as_me:8639: result: yes" >&5
8640 echo "${ECHO_T}yes" >&6
8641 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8644 echo "$as_me: failed program was:" >&5
8645 cat conftest.$ac_ext >&5
8646 echo "$as_me:8646: result: no" >&5
8647 echo "${ECHO_T}no" >&6
8650 cf_library_path_list=""
8651 if test -n "${LDFLAGS}${LIBS}" ; then
8652 for cf_library_path in $LDFLAGS $LIBS
8654 case $cf_library_path in
8656 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8658 test "x$cf_library_path" != "xNONE" && \
8659 test -d "$cf_library_path" && \
8661 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8662 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
8663 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
8664 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
8665 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
8666 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"
8669 cf_library_path_list="$cf_library_path_list $cf_search"
8677 test "x$prefix" != "xNONE" && \
8678 test -d "$prefix" && \
8680 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8681 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
8682 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
8683 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
8684 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
8685 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
8688 for cf_subdir_prefix in \
8697 test "x$cf_subdir_prefix" != "x$prefix" && \
8698 test -d "$cf_subdir_prefix" && \
8699 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8700 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
8701 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
8702 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
8703 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
8704 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
8705 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"
8710 cf_search="$cf_library_path_list $cf_search"
8712 for cf_libdir in $cf_search
8714 echo "$as_me:8714: checking for -l$cf_nculib_root in $cf_libdir" >&5
8715 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
8716 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
8717 cat >conftest.$ac_ext <<_ACEOF
8718 #line 8718 "configure"
8719 #include "confdefs.h"
8720 #include <${cf_cv_ncurses_header:-curses.h}>
8729 rm -f conftest.$ac_objext conftest$ac_exeext
8730 if { (eval echo "$as_me:8730: \"$ac_link\"") >&5
8731 (eval $ac_link) 2>&5
8733 echo "$as_me:8733: \$? = $ac_status" >&5
8734 (exit $ac_status); } &&
8735 { ac_try='test -s conftest$ac_exeext'
8736 { (eval echo "$as_me:8736: \"$ac_try\"") >&5
8739 echo "$as_me:8739: \$? = $ac_status" >&5
8740 (exit $ac_status); }; }; then
8741 echo "$as_me:8741: result: yes" >&5
8742 echo "${ECHO_T}yes" >&6
8743 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8746 echo "$as_me: failed program was:" >&5
8747 cat conftest.$ac_ext >&5
8748 echo "$as_me:8748: result: no" >&5
8749 echo "${ECHO_T}no" >&6
8750 LIBS="$cf_save_LIBS"
8752 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8756 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8760 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
8762 if test $cf_found_library = no ; then
8763 { { echo "$as_me:8763: error: Cannot link $cf_nculib_root library" >&5
8764 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
8765 { (exit 1); exit 1; }; }
8770 if test -n "$cf_ncurses_LIBS" ; then
8771 echo "$as_me:8771: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
8772 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
8773 cf_ncurses_SAVE="$LIBS"
8774 for p in $cf_ncurses_LIBS ; do
8775 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
8776 if test "$q" != "$LIBS" ; then
8780 cat >conftest.$ac_ext <<_ACEOF
8781 #line 8781 "configure"
8782 #include "confdefs.h"
8783 #include <${cf_cv_ncurses_header:-curses.h}>
8787 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8792 rm -f conftest.$ac_objext conftest$ac_exeext
8793 if { (eval echo "$as_me:8793: \"$ac_link\"") >&5
8794 (eval $ac_link) 2>&5
8796 echo "$as_me:8796: \$? = $ac_status" >&5
8797 (exit $ac_status); } &&
8798 { ac_try='test -s conftest$ac_exeext'
8799 { (eval echo "$as_me:8799: \"$ac_try\"") >&5
8802 echo "$as_me:8802: \$? = $ac_status" >&5
8803 (exit $ac_status); }; }; then
8804 echo "$as_me:8804: result: yes" >&5
8805 echo "${ECHO_T}yes" >&6
8807 echo "$as_me: failed program was:" >&5
8808 cat conftest.$ac_ext >&5
8809 echo "$as_me:8809: result: no" >&5
8810 echo "${ECHO_T}no" >&6
8811 LIBS="$cf_ncurses_SAVE"
8813 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8816 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8818 cat >>confdefs.h <<EOF
8819 #define $cf_nculib_ROOT 1
8829 if test "$NCURSES_CONFIG_PKG" != none ; then
8830 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
8832 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
8833 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
8834 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
8836 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
8837 if test -z "$cf_cv_abi_version"
8839 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
8842 elif test "$NCURSES_CONFIG" != none ; then
8844 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
8846 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
8847 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
8848 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
8850 # ABI version is not available from headers
8851 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
8855 for cf_name in MAJOR MINOR PATCH
8857 cat >conftest.$ac_ext <<CF_EOF
8858 #include <${cf_cv_ncurses_header:-curses.h}>
8859 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
8861 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
8862 { (eval echo "$as_me:8862: \"$cf_try\"") >&5
8865 echo "$as_me:8865: \$? = $ac_status" >&5
8866 (exit $ac_status); }
8867 if test -f conftest.out ; then
8868 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[ ][ ]*//"`
8869 eval NCURSES_$cf_name=\"$cf_result\"
8870 # cat conftest.$ac_ext
8875 cf_cv_abi_version=${NCURSES_MAJOR}
8879 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
8881 cf_cv_timestamp=`date`
8883 echo "$as_me:8883: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
8884 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
8886 echo "$as_me:8886: checking if you want to have a library-prefix" >&5
8887 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
8889 # Check whether --with-lib-prefix or --without-lib-prefix was given.
8890 if test "${with_lib_prefix+set}" = set; then
8891 withval="$with_lib_prefix"
8892 with_lib_prefix=$withval
8894 with_lib_prefix=auto
8896 echo "$as_me:8896: result: $with_lib_prefix" >&5
8897 echo "${ECHO_T}$with_lib_prefix" >&6
8899 if test $with_lib_prefix = auto
8902 case $cf_cv_system_name in
8906 (*) LIB_PREFIX='lib'
8909 cf_prefix=$LIB_PREFIX
8911 elif test $with_lib_prefix = no
8915 LIB_PREFIX=$with_lib_prefix
8920 ###############################################################################
8922 if test X"$CC_G_OPT" = X"" ; then
8924 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
8927 echo "$as_me:8927: checking for default loader flags" >&5
8928 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
8929 case $DFT_LWR_MODEL in
8930 (normal) LD_MODEL='' ;;
8931 (debug) LD_MODEL=$CC_G_OPT ;;
8932 (profile) LD_MODEL='-pg';;
8933 (shared) LD_MODEL='' ;;
8935 echo "$as_me:8935: result: $LD_MODEL" >&5
8936 echo "${ECHO_T}$LD_MODEL" >&6
8939 echo "$as_me:8939: checking for an rpath option" >&5
8940 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
8941 case $cf_cv_system_name in
8943 if test "$GCC" = yes; then
8944 LD_RPATH_OPT="-Wl,-rpath,"
8946 LD_RPATH_OPT="-rpath "
8949 (linux*|gnu*|k*bsd*-gnu)
8950 LD_RPATH_OPT="-Wl,-rpath,"
8952 (openbsd[2-9].*|mirbsd*)
8953 LD_RPATH_OPT="-Wl,-rpath,"
8955 (dragonfly*|freebsd*)
8956 LD_RPATH_OPT="-rpath "
8959 LD_RPATH_OPT="-Wl,-rpath,"
8962 LD_RPATH_OPT="-rpath "
8970 echo "$as_me:8970: result: $LD_RPATH_OPT" >&5
8971 echo "${ECHO_T}$LD_RPATH_OPT" >&6
8973 case "x$LD_RPATH_OPT" in
8975 echo "$as_me:8975: checking if we need a space after rpath option" >&5
8976 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
8977 cf_save_LIBS="$LIBS"
8979 cf_add_libs="${LD_RPATH_OPT}$libdir"
8980 # Filter out duplicates - this happens with badly-designed ".pc" files...
8981 for cf_add_1lib in $LIBS
8983 for cf_add_2lib in $cf_add_libs
8985 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8991 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8995 cat >conftest.$ac_ext <<_ACEOF
8996 #line 8996 "configure"
8997 #include "confdefs.h"
9007 rm -f conftest.$ac_objext conftest$ac_exeext
9008 if { (eval echo "$as_me:9008: \"$ac_link\"") >&5
9009 (eval $ac_link) 2>&5
9011 echo "$as_me:9011: \$? = $ac_status" >&5
9012 (exit $ac_status); } &&
9013 { ac_try='test -s conftest$ac_exeext'
9014 { (eval echo "$as_me:9014: \"$ac_try\"") >&5
9017 echo "$as_me:9017: \$? = $ac_status" >&5
9018 (exit $ac_status); }; }; then
9021 echo "$as_me: failed program was:" >&5
9022 cat conftest.$ac_ext >&5
9025 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9026 LIBS="$cf_save_LIBS"
9027 echo "$as_me:9027: result: $cf_rpath_space" >&5
9028 echo "${ECHO_T}$cf_rpath_space" >&6
9029 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
9037 INSTALL_LIB="-m 644"
9038 : ${rel_builddir:=.}
9044 cf_cv_do_symlinks=no
9046 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
9048 echo "$as_me:9048: checking if release/abi version should be used for shared libs" >&5
9049 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
9051 # Check whether --with-shlib-version or --without-shlib-version was given.
9052 if test "${with_shlib_version+set}" = set; then
9053 withval="$with_shlib_version"
9054 test -z "$withval" && withval=auto
9057 cf_cv_shlib_version=auto
9060 cf_cv_shlib_version=$withval
9063 { { echo "$as_me:9063: error: option value must be one of: rel, abi, auto or no" >&5
9064 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
9065 { (exit 1); exit 1; }; }
9070 cf_cv_shlib_version=auto
9072 echo "$as_me:9072: result: $cf_cv_shlib_version" >&5
9073 echo "${ECHO_T}$cf_cv_shlib_version" >&6
9078 # Some less-capable ports of gcc support only -fpic
9080 if test "$GCC" = yes
9082 echo "$as_me:9082: checking which $CC option to use" >&5
9083 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
9084 cf_save_CFLAGS="$CFLAGS"
9085 for CC_SHARED_OPTS in -fPIC -fpic ''
9087 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
9088 cat >conftest.$ac_ext <<_ACEOF
9089 #line 9089 "configure"
9090 #include "confdefs.h"
9100 rm -f conftest.$ac_objext
9101 if { (eval echo "$as_me:9101: \"$ac_compile\"") >&5
9102 (eval $ac_compile) 2>&5
9104 echo "$as_me:9104: \$? = $ac_status" >&5
9105 (exit $ac_status); } &&
9106 { ac_try='test -s conftest.$ac_objext'
9107 { (eval echo "$as_me:9107: \"$ac_try\"") >&5
9110 echo "$as_me:9110: \$? = $ac_status" >&5
9111 (exit $ac_status); }; }; then
9114 echo "$as_me: failed program was:" >&5
9115 cat conftest.$ac_ext >&5
9117 rm -f conftest.$ac_objext conftest.$ac_ext
9119 echo "$as_me:9119: result: $CC_SHARED_OPTS" >&5
9120 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
9121 CFLAGS="$cf_save_CFLAGS"
9124 cf_cv_shlib_version_infix=no
9126 case $cf_cv_system_name in
9127 (aix4.3-9*|aix[5-7]*)
9128 if test "$GCC" = yes; then
9129 CC_SHARED_OPTS='-Wl,-brtl'
9130 MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
9132 CC_SHARED_OPTS='-brtl'
9133 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
9134 MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
9138 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
9142 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9143 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9144 cf_cv_shlib_version=cygdll
9145 cf_cv_shlib_version_infix=cygdll
9148 cat >mk_shared_lib.sh <<-CF_EOF
9151 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
9154 Linking shared library
9155 ** SHARED_LIB \$SHARED_LIB
9156 ** IMPORT_LIB \$IMPORT_LIB
9158 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9160 chmod +x mk_shared_lib.sh
9164 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9165 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9166 cf_cv_shlib_version=msysdll
9167 cf_cv_shlib_version_infix=msysdll
9170 cat >mk_shared_lib.sh <<-CF_EOF
9173 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
9176 Linking shared library
9177 ** SHARED_LIB \$SHARED_LIB
9178 ** IMPORT_LIB \$IMPORT_LIB
9180 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9182 chmod +x mk_shared_lib.sh
9185 cf_try_cflags="no-cpp-precomp"
9186 CC_SHARED_OPTS="-dynamic"
9187 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
9188 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
9189 cf_cv_shlib_version_infix=yes
9190 echo "$as_me:9190: checking if ld -search_paths_first works" >&5
9191 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
9192 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
9193 echo $ECHO_N "(cached) $ECHO_C" >&6
9196 cf_save_LDFLAGS=$LDFLAGS
9197 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9198 cat >conftest.$ac_ext <<_ACEOF
9199 #line 9199 "configure"
9200 #include "confdefs.h"
9210 rm -f conftest.$ac_objext conftest$ac_exeext
9211 if { (eval echo "$as_me:9211: \"$ac_link\"") >&5
9212 (eval $ac_link) 2>&5
9214 echo "$as_me:9214: \$? = $ac_status" >&5
9215 (exit $ac_status); } &&
9216 { ac_try='test -s conftest$ac_exeext'
9217 { (eval echo "$as_me:9217: \"$ac_try\"") >&5
9220 echo "$as_me:9220: \$? = $ac_status" >&5
9221 (exit $ac_status); }; }; then
9222 cf_cv_ldflags_search_paths_first=yes
9224 echo "$as_me: failed program was:" >&5
9225 cat conftest.$ac_ext >&5
9226 cf_cv_ldflags_search_paths_first=no
9228 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9229 LDFLAGS=$cf_save_LDFLAGS
9231 echo "$as_me:9231: result: $cf_cv_ldflags_search_paths_first" >&5
9232 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
9233 if test $cf_cv_ldflags_search_paths_first = yes; then
9234 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9238 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
9239 if test "$GCC" != yes; then
9242 MK_SHARED_LIB='${LD} -b -o $@'
9243 INSTALL_LIB="-m 555"
9246 # (tested with gcc 2.7.2 -- I don't have c89)
9247 if test "$GCC" = yes; then
9248 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
9251 LD_SHARED_OPTS='-Wl,+b,${libdir}'
9253 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
9254 # HP-UX shared libraries must be executable, and should be
9255 # readonly to exploit a quirk in the memory manager.
9256 INSTALL_LIB="-m 555"
9259 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9260 if test "$cf_cv_shlib_version" = rel; then
9261 cf_shared_soname='`basename .${REL_VERSION}`.${ABI_VERSION}'
9263 cf_shared_soname='`basename `'
9266 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
9269 if test "$cf_cv_enable_rpath" = yes ; then
9270 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9272 # tested with IRIX 5.2 and 'cc'.
9273 if test "$GCC" != yes; then
9274 CC_SHARED_OPTS='-KPIC'
9275 MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
9277 MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
9279 cf_cv_rm_so_locs=yes
9281 (linux*|gnu*|k*bsd*-gnu)
9282 if test "$DFT_LWR_MODEL" = "shared" ; then
9283 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9284 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9286 if test "$cf_cv_enable_rpath" = yes ; then
9287 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9290 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9291 if test "$cf_cv_shlib_version" = rel; then
9292 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9294 cf_cv_shared_soname='`basename $@`'
9297 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9300 cf_cv_shlib_version=mingw
9301 cf_cv_shlib_version_infix=mingw
9304 if test "$DFT_LWR_MODEL" = "shared" ; then
9305 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
9306 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9307 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
9310 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9311 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9312 cat >mk_shared_lib.sh <<-CF_EOF
9315 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
9318 Linking shared library
9319 ** SHARED_LIB \$SHARED_LIB
9320 ** IMPORT_LIB \$IMPORT_LIB
9322 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9324 chmod +x mk_shared_lib.sh
9326 (openbsd[2-9].*|mirbsd*)
9327 if test "$DFT_LWR_MODEL" = "shared" ; then
9328 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9329 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9331 if test "$cf_cv_enable_rpath" = yes ; then
9332 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9334 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9336 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9337 if test "$cf_cv_shlib_version" = rel; then
9338 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9340 cf_cv_shared_soname='`basename $@`'
9343 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9345 (nto-qnx*|openbsd*|freebsd[12].*)
9346 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9347 MK_SHARED_LIB='${LD} -Bshareable -o $@'
9348 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9350 (dragonfly*|freebsd*)
9351 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9352 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
9353 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
9354 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
9355 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9358 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9359 if test "$cf_cv_shlib_version" = rel; then
9360 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9362 cf_cv_shared_soname='`basename $@`'
9365 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9368 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9369 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
9370 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
9371 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9372 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9373 if test "$cf_cv_shlib_version" = auto; then
9374 if test -f /usr/libexec/ld.elf_so; then
9375 cf_cv_shlib_version=abi
9377 cf_cv_shlib_version=rel
9381 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9382 if test "$cf_cv_shlib_version" = rel; then
9383 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9385 cf_cv_shared_soname='`basename $@`'
9388 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
9390 MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
9394 # tested with OSF/1 V3.2 and 'cc'
9395 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
9396 # link with shared libs).
9397 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
9400 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
9403 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
9404 if test "$DFT_LWR_MODEL" = "shared" ; then
9405 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9406 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9408 cf_cv_rm_so_locs=yes
9410 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
9411 # tested with osr5.0.5
9412 if test "$GCC" != yes; then
9413 CC_SHARED_OPTS='-belf -KPIC'
9415 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
9416 if test "$cf_cv_enable_rpath" = yes ; then
9417 # only way is to set LD_RUN_PATH but no switch for it
9420 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9421 LINK_PROGS='LD_RUN_PATH=${libdir}'
9422 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
9425 # tested with SunOS 4.1.1 and gcc 2.7.0
9426 if test "$GCC" != yes; then
9427 CC_SHARED_OPTS='-KPIC'
9429 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
9430 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9433 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
9434 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
9435 if test "$DFT_LWR_MODEL" = "shared" ; then
9436 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
9437 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9439 if test "$cf_cv_enable_rpath" = yes ; then
9440 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
9443 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9444 if test "$cf_cv_shlib_version" = rel; then
9445 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9447 cf_cv_shared_soname='`basename $@`'
9450 if test "$GCC" != yes; then
9451 cf_save_CFLAGS="$CFLAGS"
9452 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
9454 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
9455 cat >conftest.$ac_ext <<_ACEOF
9456 #line 9456 "configure"
9457 #include "confdefs.h"
9467 rm -f conftest.$ac_objext
9468 if { (eval echo "$as_me:9468: \"$ac_compile\"") >&5
9469 (eval $ac_compile) 2>&5
9471 echo "$as_me:9471: \$? = $ac_status" >&5
9472 (exit $ac_status); } &&
9473 { ac_try='test -s conftest.$ac_objext'
9474 { (eval echo "$as_me:9474: \"$ac_try\"") >&5
9477 echo "$as_me:9477: \$? = $ac_status" >&5
9478 (exit $ac_status); }; }; then
9481 echo "$as_me: failed program was:" >&5
9482 cat conftest.$ac_ext >&5
9484 rm -f conftest.$ac_objext conftest.$ac_ext
9486 CFLAGS="$cf_save_CFLAGS"
9487 CC_SHARED_OPTS=$cf_shared_opts
9488 MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
9490 MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
9493 (sysv5uw7*|unix_sv*)
9494 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
9495 if test "$GCC" != yes; then
9496 CC_SHARED_OPTS='-KPIC'
9498 MK_SHARED_LIB='${LD} -d y -G -o $@'
9501 CC_SHARED_OPTS='unknown'
9502 MK_SHARED_LIB='echo unknown'
9506 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
9507 case "$cf_cv_shlib_version" in
9509 case "$MK_SHARED_LIB" in
9511 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
9514 { echo "$as_me:9514: WARNING: ignored --with-shlib-version" >&5
9515 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
9521 if test -n "$cf_try_cflags"
9523 cat > conftest.$ac_ext <<EOF
9524 #line 9524 "${as_me:-configure}"
9526 int main(int argc, char *argv[])
9529 return (argv[argc-1] == 0) ;
9532 cf_save_CFLAGS="$CFLAGS"
9533 for cf_opt in $cf_try_cflags
9535 CFLAGS="$cf_save_CFLAGS -$cf_opt"
9536 echo "$as_me:9536: checking if CFLAGS option -$cf_opt works" >&5
9537 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
9538 if { (eval echo "$as_me:9538: \"$ac_compile\"") >&5
9539 (eval $ac_compile) 2>&5
9541 echo "$as_me:9541: \$? = $ac_status" >&5
9542 (exit $ac_status); }; then
9543 echo "$as_me:9543: result: yes" >&5
9544 echo "${ECHO_T}yes" >&6
9545 cf_save_CFLAGS="$CFLAGS"
9547 echo "$as_me:9547: result: no" >&5
9548 echo "${ECHO_T}no" >&6
9551 CFLAGS="$cf_save_CFLAGS"
9554 # RPATH_LIST is a colon-separated list of directories
9555 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
9556 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
9558 test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
9560 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
9562 echo "${as_me:-configure}:9562: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
9564 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
9566 echo "${as_me:-configure}:9566: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
9568 # The test/sample programs in the original tree link using rpath option.
9569 # Make it optional for packagers.
9570 if test -n "$LOCAL_LDFLAGS"
9572 echo "$as_me:9572: checking if you want to link sample programs with rpath option" >&5
9573 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
9575 # Check whether --enable-rpath-link or --disable-rpath-link was given.
9576 if test "${enable_rpath_link+set}" = set; then
9577 enableval="$enable_rpath_link"
9578 with_rpath_link=$enableval
9582 echo "$as_me:9582: result: $with_rpath_link" >&5
9583 echo "${ECHO_T}$with_rpath_link" >&6
9584 if test "$with_rpath_link" = no
9591 ###############################################################################
9593 ### use option --enable-broken-linker to force on use of broken-linker support
9594 echo "$as_me:9594: checking if you want broken-linker support code" >&5
9595 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9597 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9598 if test "${enable_broken_linker+set}" = set; then
9599 enableval="$enable_broken_linker"
9600 with_broken_linker=$enableval
9602 with_broken_linker=${BROKEN_LINKER:-no}
9604 echo "$as_me:9604: result: $with_broken_linker" >&5
9605 echo "${ECHO_T}$with_broken_linker" >&6
9608 if test "$with_broken_linker" = yes ; then
9609 cat >>confdefs.h <<\EOF
9610 #define BROKEN_LINKER 1
9614 elif test "$DFT_LWR_MODEL" = shared ; then
9615 case $cf_cv_system_name in
9617 cat >>confdefs.h <<\EOF
9618 #define BROKEN_LINKER 1
9622 test -n "$verbose" && echo " cygwin linker is broken anyway" 1>&6
9624 echo "${as_me:-configure}:9624: testing cygwin linker is broken anyway ..." 1>&5
9630 # Check to define _XOPEN_SOURCE "automatically"
9633 cf_POSIX_C_SOURCE=199506L
9638 cf_xopen_source="-D_ALL_SOURCE"
9644 cf_xopen_source="-D_APPLE_C_SOURCE"
9647 cf_xopen_source="-D_DARWIN_C_SOURCE"
9650 (freebsd*|dragonfly*)
9651 # 5.x headers associate
9652 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9653 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9654 cf_POSIX_C_SOURCE=200112L
9656 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9659 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9662 cf_xopen_source="-D_HPUX_SOURCE"
9665 cf_xopen_source="-D_SGI_SOURCE"
9668 (linux*|gnu*|mint*|k*bsd*-gnu)
9670 echo "$as_me:9670: checking if we must define _GNU_SOURCE" >&5
9671 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9672 if test "${cf_cv_gnu_source+set}" = set; then
9673 echo $ECHO_N "(cached) $ECHO_C" >&6
9676 cat >conftest.$ac_ext <<_ACEOF
9677 #line 9677 "configure"
9678 #include "confdefs.h"
9679 #include <sys/types.h>
9684 #ifndef _XOPEN_SOURCE
9691 rm -f conftest.$ac_objext
9692 if { (eval echo "$as_me:9692: \"$ac_compile\"") >&5
9693 (eval $ac_compile) 2>&5
9695 echo "$as_me:9695: \$? = $ac_status" >&5
9696 (exit $ac_status); } &&
9697 { ac_try='test -s conftest.$ac_objext'
9698 { (eval echo "$as_me:9698: \"$ac_try\"") >&5
9701 echo "$as_me:9701: \$? = $ac_status" >&5
9702 (exit $ac_status); }; }; then
9705 echo "$as_me: failed program was:" >&5
9706 cat conftest.$ac_ext >&5
9708 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
9709 cat >conftest.$ac_ext <<_ACEOF
9710 #line 9710 "configure"
9711 #include "confdefs.h"
9712 #include <sys/types.h>
9717 #ifdef _XOPEN_SOURCE
9724 rm -f conftest.$ac_objext
9725 if { (eval echo "$as_me:9725: \"$ac_compile\"") >&5
9726 (eval $ac_compile) 2>&5
9728 echo "$as_me:9728: \$? = $ac_status" >&5
9729 (exit $ac_status); } &&
9730 { ac_try='test -s conftest.$ac_objext'
9731 { (eval echo "$as_me:9731: \"$ac_try\"") >&5
9734 echo "$as_me:9734: \$? = $ac_status" >&5
9735 (exit $ac_status); }; }; then
9738 echo "$as_me: failed program was:" >&5
9739 cat conftest.$ac_ext >&5
9740 cf_cv_gnu_source=yes
9742 rm -f conftest.$ac_objext conftest.$ac_ext
9746 rm -f conftest.$ac_objext conftest.$ac_ext
9749 echo "$as_me:9749: result: $cf_cv_gnu_source" >&5
9750 echo "${ECHO_T}$cf_cv_gnu_source" >&6
9751 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
9755 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9758 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9761 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9763 cf_save_CFLAGS="$CFLAGS"
9764 cf_save_CPPFLAGS="$CPPFLAGS"
9766 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9767 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
9768 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
9770 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9771 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
9772 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
9774 echo "$as_me:9774: checking if we should define _POSIX_C_SOURCE" >&5
9775 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9776 if test "${cf_cv_posix_c_source+set}" = set; then
9777 echo $ECHO_N "(cached) $ECHO_C" >&6
9780 echo "${as_me:-configure}:9780: testing if the symbol is already defined go no further ..." 1>&5
9782 cat >conftest.$ac_ext <<_ACEOF
9783 #line 9783 "configure"
9784 #include "confdefs.h"
9785 #include <sys/types.h>
9790 #ifndef _POSIX_C_SOURCE
9797 rm -f conftest.$ac_objext
9798 if { (eval echo "$as_me:9798: \"$ac_compile\"") >&5
9799 (eval $ac_compile) 2>&5
9801 echo "$as_me:9801: \$? = $ac_status" >&5
9802 (exit $ac_status); } &&
9803 { ac_try='test -s conftest.$ac_objext'
9804 { (eval echo "$as_me:9804: \"$ac_try\"") >&5
9807 echo "$as_me:9807: \$? = $ac_status" >&5
9808 (exit $ac_status); }; }; then
9809 cf_cv_posix_c_source=no
9811 echo "$as_me: failed program was:" >&5
9812 cat conftest.$ac_ext >&5
9813 cf_want_posix_source=no
9814 case .$cf_POSIX_C_SOURCE in
9816 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9819 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9820 cf_want_posix_source=yes
9823 cf_want_posix_source=yes
9826 if test "$cf_want_posix_source" = yes ; then
9827 cat >conftest.$ac_ext <<_ACEOF
9828 #line 9828 "configure"
9829 #include "confdefs.h"
9830 #include <sys/types.h>
9835 #ifdef _POSIX_SOURCE
9842 rm -f conftest.$ac_objext
9843 if { (eval echo "$as_me:9843: \"$ac_compile\"") >&5
9844 (eval $ac_compile) 2>&5
9846 echo "$as_me:9846: \$? = $ac_status" >&5
9847 (exit $ac_status); } &&
9848 { ac_try='test -s conftest.$ac_objext'
9849 { (eval echo "$as_me:9849: \"$ac_try\"") >&5
9852 echo "$as_me:9852: \$? = $ac_status" >&5
9853 (exit $ac_status); }; }; then
9856 echo "$as_me: failed program was:" >&5
9857 cat conftest.$ac_ext >&5
9858 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9860 rm -f conftest.$ac_objext conftest.$ac_ext
9863 echo "${as_me:-configure}:9863: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9865 CFLAGS="$cf_trim_CFLAGS"
9866 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
9868 echo "${as_me:-configure}:9868: testing if the second compile does not leave our definition intact error ..." 1>&5
9870 cat >conftest.$ac_ext <<_ACEOF
9871 #line 9871 "configure"
9872 #include "confdefs.h"
9873 #include <sys/types.h>
9878 #ifndef _POSIX_C_SOURCE
9885 rm -f conftest.$ac_objext
9886 if { (eval echo "$as_me:9886: \"$ac_compile\"") >&5
9887 (eval $ac_compile) 2>&5
9889 echo "$as_me:9889: \$? = $ac_status" >&5
9890 (exit $ac_status); } &&
9891 { ac_try='test -s conftest.$ac_objext'
9892 { (eval echo "$as_me:9892: \"$ac_try\"") >&5
9895 echo "$as_me:9895: \$? = $ac_status" >&5
9896 (exit $ac_status); }; }; then
9899 echo "$as_me: failed program was:" >&5
9900 cat conftest.$ac_ext >&5
9901 cf_cv_posix_c_source=no
9903 rm -f conftest.$ac_objext conftest.$ac_ext
9904 CFLAGS="$cf_save_CFLAGS"
9905 CPPFLAGS="$cf_save_CPPFLAGS"
9908 rm -f conftest.$ac_objext conftest.$ac_ext
9911 echo "$as_me:9911: result: $cf_cv_posix_c_source" >&5
9912 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9914 if test "$cf_cv_posix_c_source" != no ; then
9915 CFLAGS="$cf_trim_CFLAGS"
9916 CPPFLAGS="$cf_trim_CPPFLAGS"
9921 cf_new_extra_cppflags=
9923 for cf_add_cflags in $cf_cv_posix_c_source
9925 case $cf_fix_cppflags in
9927 case $cf_add_cflags in
9928 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9929 case $cf_add_cflags in
9931 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9933 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9934 && test -z "${cf_tst_cflags}" \
9935 && cf_fix_cppflags=yes
9937 if test $cf_fix_cppflags = yes ; then
9938 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9940 elif test "${cf_tst_cflags}" = "\"'" ; then
9941 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9950 case $cf_add_cflags in
9952 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9954 CPPFLAGS=`echo "$CPPFLAGS" | \
9955 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9956 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9960 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9965 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9970 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9972 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9974 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9975 && test -z "${cf_tst_cflags}" \
9976 && cf_fix_cppflags=no
9981 if test -n "$cf_new_cflags" ; then
9983 CFLAGS="$CFLAGS $cf_new_cflags"
9986 if test -n "$cf_new_cppflags" ; then
9988 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9991 if test -n "$cf_new_extra_cppflags" ; then
9993 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10000 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10003 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10004 cf_xopen_source="-D_BSD_SOURCE"
10005 cf_XOPEN_SOURCE=600
10008 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10011 cf_xopen_source="-D_OSF_SOURCE"
10014 cf_xopen_source="-D_QNX_SOURCE"
10017 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10020 cf_xopen_source="-D__EXTENSIONS__"
10021 cf_cv_xopen_source=broken
10023 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10029 echo "$as_me:10029: checking if we should define _XOPEN_SOURCE" >&5
10030 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10031 if test "${cf_cv_xopen_source+set}" = set; then
10032 echo $ECHO_N "(cached) $ECHO_C" >&6
10035 cat >conftest.$ac_ext <<_ACEOF
10036 #line 10036 "configure"
10037 #include "confdefs.h"
10039 #include <stdlib.h>
10040 #include <string.h>
10041 #include <sys/types.h>
10047 #ifndef _XOPEN_SOURCE
10054 rm -f conftest.$ac_objext
10055 if { (eval echo "$as_me:10055: \"$ac_compile\"") >&5
10056 (eval $ac_compile) 2>&5
10058 echo "$as_me:10058: \$? = $ac_status" >&5
10059 (exit $ac_status); } &&
10060 { ac_try='test -s conftest.$ac_objext'
10061 { (eval echo "$as_me:10061: \"$ac_try\"") >&5
10062 (eval $ac_try) 2>&5
10064 echo "$as_me:10064: \$? = $ac_status" >&5
10065 (exit $ac_status); }; }; then
10066 cf_cv_xopen_source=no
10068 echo "$as_me: failed program was:" >&5
10069 cat conftest.$ac_ext >&5
10070 cf_save="$CPPFLAGS"
10071 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10072 cat >conftest.$ac_ext <<_ACEOF
10073 #line 10073 "configure"
10074 #include "confdefs.h"
10076 #include <stdlib.h>
10077 #include <string.h>
10078 #include <sys/types.h>
10084 #ifdef _XOPEN_SOURCE
10091 rm -f conftest.$ac_objext
10092 if { (eval echo "$as_me:10092: \"$ac_compile\"") >&5
10093 (eval $ac_compile) 2>&5
10095 echo "$as_me:10095: \$? = $ac_status" >&5
10096 (exit $ac_status); } &&
10097 { ac_try='test -s conftest.$ac_objext'
10098 { (eval echo "$as_me:10098: \"$ac_try\"") >&5
10099 (eval $ac_try) 2>&5
10101 echo "$as_me:10101: \$? = $ac_status" >&5
10102 (exit $ac_status); }; }; then
10103 cf_cv_xopen_source=no
10105 echo "$as_me: failed program was:" >&5
10106 cat conftest.$ac_ext >&5
10107 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10109 rm -f conftest.$ac_objext conftest.$ac_ext
10110 CPPFLAGS="$cf_save"
10113 rm -f conftest.$ac_objext conftest.$ac_ext
10116 echo "$as_me:10116: result: $cf_cv_xopen_source" >&5
10117 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10119 if test "$cf_cv_xopen_source" != no ; then
10121 CFLAGS=`echo "$CFLAGS" | \
10122 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10123 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10125 CPPFLAGS=`echo "$CPPFLAGS" | \
10126 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10127 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10129 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10134 cf_new_extra_cppflags=
10136 for cf_add_cflags in $cf_temp_xopen_source
10138 case $cf_fix_cppflags in
10140 case $cf_add_cflags in
10141 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10142 case $cf_add_cflags in
10144 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10146 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10147 && test -z "${cf_tst_cflags}" \
10148 && cf_fix_cppflags=yes
10150 if test $cf_fix_cppflags = yes ; then
10151 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10153 elif test "${cf_tst_cflags}" = "\"'" ; then
10154 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10159 case "$CPPFLAGS" in
10163 case $cf_add_cflags in
10165 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10167 CPPFLAGS=`echo "$CPPFLAGS" | \
10168 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10169 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10173 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10178 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10183 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10185 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10187 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10188 && test -z "${cf_tst_cflags}" \
10189 && cf_fix_cppflags=no
10194 if test -n "$cf_new_cflags" ; then
10196 CFLAGS="$CFLAGS $cf_new_cflags"
10199 if test -n "$cf_new_cppflags" ; then
10201 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10204 if test -n "$cf_new_extra_cppflags" ; then
10206 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10211 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10213 cf_save_CFLAGS="$CFLAGS"
10214 cf_save_CPPFLAGS="$CPPFLAGS"
10216 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10217 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10218 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10220 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10221 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10222 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10224 echo "$as_me:10224: checking if we should define _POSIX_C_SOURCE" >&5
10225 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10226 if test "${cf_cv_posix_c_source+set}" = set; then
10227 echo $ECHO_N "(cached) $ECHO_C" >&6
10230 echo "${as_me:-configure}:10230: testing if the symbol is already defined go no further ..." 1>&5
10232 cat >conftest.$ac_ext <<_ACEOF
10233 #line 10233 "configure"
10234 #include "confdefs.h"
10235 #include <sys/types.h>
10240 #ifndef _POSIX_C_SOURCE
10247 rm -f conftest.$ac_objext
10248 if { (eval echo "$as_me:10248: \"$ac_compile\"") >&5
10249 (eval $ac_compile) 2>&5
10251 echo "$as_me:10251: \$? = $ac_status" >&5
10252 (exit $ac_status); } &&
10253 { ac_try='test -s conftest.$ac_objext'
10254 { (eval echo "$as_me:10254: \"$ac_try\"") >&5
10255 (eval $ac_try) 2>&5
10257 echo "$as_me:10257: \$? = $ac_status" >&5
10258 (exit $ac_status); }; }; then
10259 cf_cv_posix_c_source=no
10261 echo "$as_me: failed program was:" >&5
10262 cat conftest.$ac_ext >&5
10263 cf_want_posix_source=no
10264 case .$cf_POSIX_C_SOURCE in
10266 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10269 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10270 cf_want_posix_source=yes
10273 cf_want_posix_source=yes
10276 if test "$cf_want_posix_source" = yes ; then
10277 cat >conftest.$ac_ext <<_ACEOF
10278 #line 10278 "configure"
10279 #include "confdefs.h"
10280 #include <sys/types.h>
10285 #ifdef _POSIX_SOURCE
10292 rm -f conftest.$ac_objext
10293 if { (eval echo "$as_me:10293: \"$ac_compile\"") >&5
10294 (eval $ac_compile) 2>&5
10296 echo "$as_me:10296: \$? = $ac_status" >&5
10297 (exit $ac_status); } &&
10298 { ac_try='test -s conftest.$ac_objext'
10299 { (eval echo "$as_me:10299: \"$ac_try\"") >&5
10300 (eval $ac_try) 2>&5
10302 echo "$as_me:10302: \$? = $ac_status" >&5
10303 (exit $ac_status); }; }; then
10306 echo "$as_me: failed program was:" >&5
10307 cat conftest.$ac_ext >&5
10308 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10310 rm -f conftest.$ac_objext conftest.$ac_ext
10313 echo "${as_me:-configure}:10313: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10315 CFLAGS="$cf_trim_CFLAGS"
10316 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
10318 echo "${as_me:-configure}:10318: testing if the second compile does not leave our definition intact error ..." 1>&5
10320 cat >conftest.$ac_ext <<_ACEOF
10321 #line 10321 "configure"
10322 #include "confdefs.h"
10323 #include <sys/types.h>
10328 #ifndef _POSIX_C_SOURCE
10335 rm -f conftest.$ac_objext
10336 if { (eval echo "$as_me:10336: \"$ac_compile\"") >&5
10337 (eval $ac_compile) 2>&5
10339 echo "$as_me:10339: \$? = $ac_status" >&5
10340 (exit $ac_status); } &&
10341 { ac_try='test -s conftest.$ac_objext'
10342 { (eval echo "$as_me:10342: \"$ac_try\"") >&5
10343 (eval $ac_try) 2>&5
10345 echo "$as_me:10345: \$? = $ac_status" >&5
10346 (exit $ac_status); }; }; then
10349 echo "$as_me: failed program was:" >&5
10350 cat conftest.$ac_ext >&5
10351 cf_cv_posix_c_source=no
10353 rm -f conftest.$ac_objext conftest.$ac_ext
10354 CFLAGS="$cf_save_CFLAGS"
10355 CPPFLAGS="$cf_save_CPPFLAGS"
10358 rm -f conftest.$ac_objext conftest.$ac_ext
10361 echo "$as_me:10361: result: $cf_cv_posix_c_source" >&5
10362 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10364 if test "$cf_cv_posix_c_source" != no ; then
10365 CFLAGS="$cf_trim_CFLAGS"
10366 CPPFLAGS="$cf_trim_CPPFLAGS"
10371 cf_new_extra_cppflags=
10373 for cf_add_cflags in $cf_cv_posix_c_source
10375 case $cf_fix_cppflags in
10377 case $cf_add_cflags in
10378 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10379 case $cf_add_cflags in
10381 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10383 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10384 && test -z "${cf_tst_cflags}" \
10385 && cf_fix_cppflags=yes
10387 if test $cf_fix_cppflags = yes ; then
10388 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10390 elif test "${cf_tst_cflags}" = "\"'" ; then
10391 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10396 case "$CPPFLAGS" in
10400 case $cf_add_cflags in
10402 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10404 CPPFLAGS=`echo "$CPPFLAGS" | \
10405 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10406 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10410 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10415 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10420 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10422 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10424 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10425 && test -z "${cf_tst_cflags}" \
10426 && cf_fix_cppflags=no
10431 if test -n "$cf_new_cflags" ; then
10433 CFLAGS="$CFLAGS $cf_new_cflags"
10436 if test -n "$cf_new_cppflags" ; then
10438 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10441 if test -n "$cf_new_extra_cppflags" ; then
10443 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10451 if test -n "$cf_xopen_source" ; then
10456 cf_new_extra_cppflags=
10458 for cf_add_cflags in $cf_xopen_source
10460 case $cf_fix_cppflags in
10462 case $cf_add_cflags in
10463 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10464 case $cf_add_cflags in
10466 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10468 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10469 && test -z "${cf_tst_cflags}" \
10470 && cf_fix_cppflags=yes
10472 if test $cf_fix_cppflags = yes ; then
10473 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10475 elif test "${cf_tst_cflags}" = "\"'" ; then
10476 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10481 case "$CPPFLAGS" in
10485 case $cf_add_cflags in
10487 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10489 CPPFLAGS=`echo "$CPPFLAGS" | \
10490 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10491 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10495 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10500 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10505 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10507 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10509 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10510 && test -z "${cf_tst_cflags}" \
10511 && cf_fix_cppflags=no
10516 if test -n "$cf_new_cflags" ; then
10517 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
10519 echo "${as_me:-configure}:10519: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10521 CFLAGS="$CFLAGS $cf_new_cflags"
10524 if test -n "$cf_new_cppflags" ; then
10525 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10527 echo "${as_me:-configure}:10527: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10529 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10532 if test -n "$cf_new_extra_cppflags" ; then
10533 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10535 echo "${as_me:-configure}:10535: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10537 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10542 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10543 echo "$as_me:10543: checking if _XOPEN_SOURCE really is set" >&5
10544 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10545 cat >conftest.$ac_ext <<_ACEOF
10546 #line 10546 "configure"
10547 #include "confdefs.h"
10548 #include <stdlib.h>
10553 #ifndef _XOPEN_SOURCE
10560 rm -f conftest.$ac_objext
10561 if { (eval echo "$as_me:10561: \"$ac_compile\"") >&5
10562 (eval $ac_compile) 2>&5
10564 echo "$as_me:10564: \$? = $ac_status" >&5
10565 (exit $ac_status); } &&
10566 { ac_try='test -s conftest.$ac_objext'
10567 { (eval echo "$as_me:10567: \"$ac_try\"") >&5
10568 (eval $ac_try) 2>&5
10570 echo "$as_me:10570: \$? = $ac_status" >&5
10571 (exit $ac_status); }; }; then
10572 cf_XOPEN_SOURCE_set=yes
10574 echo "$as_me: failed program was:" >&5
10575 cat conftest.$ac_ext >&5
10576 cf_XOPEN_SOURCE_set=no
10578 rm -f conftest.$ac_objext conftest.$ac_ext
10579 echo "$as_me:10579: result: $cf_XOPEN_SOURCE_set" >&5
10580 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10581 if test $cf_XOPEN_SOURCE_set = yes
10583 cat >conftest.$ac_ext <<_ACEOF
10584 #line 10584 "configure"
10585 #include "confdefs.h"
10586 #include <stdlib.h>
10591 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10598 rm -f conftest.$ac_objext
10599 if { (eval echo "$as_me:10599: \"$ac_compile\"") >&5
10600 (eval $ac_compile) 2>&5
10602 echo "$as_me:10602: \$? = $ac_status" >&5
10603 (exit $ac_status); } &&
10604 { ac_try='test -s conftest.$ac_objext'
10605 { (eval echo "$as_me:10605: \"$ac_try\"") >&5
10606 (eval $ac_try) 2>&5
10608 echo "$as_me:10608: \$? = $ac_status" >&5
10609 (exit $ac_status); }; }; then
10610 cf_XOPEN_SOURCE_set_ok=yes
10612 echo "$as_me: failed program was:" >&5
10613 cat conftest.$ac_ext >&5
10614 cf_XOPEN_SOURCE_set_ok=no
10616 rm -f conftest.$ac_objext conftest.$ac_ext
10617 if test $cf_XOPEN_SOURCE_set_ok = no
10619 { echo "$as_me:10619: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10620 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10624 echo "$as_me:10624: checking if we should define _XOPEN_SOURCE" >&5
10625 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10626 if test "${cf_cv_xopen_source+set}" = set; then
10627 echo $ECHO_N "(cached) $ECHO_C" >&6
10630 cat >conftest.$ac_ext <<_ACEOF
10631 #line 10631 "configure"
10632 #include "confdefs.h"
10634 #include <stdlib.h>
10635 #include <string.h>
10636 #include <sys/types.h>
10642 #ifndef _XOPEN_SOURCE
10649 rm -f conftest.$ac_objext
10650 if { (eval echo "$as_me:10650: \"$ac_compile\"") >&5
10651 (eval $ac_compile) 2>&5
10653 echo "$as_me:10653: \$? = $ac_status" >&5
10654 (exit $ac_status); } &&
10655 { ac_try='test -s conftest.$ac_objext'
10656 { (eval echo "$as_me:10656: \"$ac_try\"") >&5
10657 (eval $ac_try) 2>&5
10659 echo "$as_me:10659: \$? = $ac_status" >&5
10660 (exit $ac_status); }; }; then
10661 cf_cv_xopen_source=no
10663 echo "$as_me: failed program was:" >&5
10664 cat conftest.$ac_ext >&5
10665 cf_save="$CPPFLAGS"
10666 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10667 cat >conftest.$ac_ext <<_ACEOF
10668 #line 10668 "configure"
10669 #include "confdefs.h"
10671 #include <stdlib.h>
10672 #include <string.h>
10673 #include <sys/types.h>
10679 #ifdef _XOPEN_SOURCE
10686 rm -f conftest.$ac_objext
10687 if { (eval echo "$as_me:10687: \"$ac_compile\"") >&5
10688 (eval $ac_compile) 2>&5
10690 echo "$as_me:10690: \$? = $ac_status" >&5
10691 (exit $ac_status); } &&
10692 { ac_try='test -s conftest.$ac_objext'
10693 { (eval echo "$as_me:10693: \"$ac_try\"") >&5
10694 (eval $ac_try) 2>&5
10696 echo "$as_me:10696: \$? = $ac_status" >&5
10697 (exit $ac_status); }; }; then
10698 cf_cv_xopen_source=no
10700 echo "$as_me: failed program was:" >&5
10701 cat conftest.$ac_ext >&5
10702 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10704 rm -f conftest.$ac_objext conftest.$ac_ext
10705 CPPFLAGS="$cf_save"
10708 rm -f conftest.$ac_objext conftest.$ac_ext
10711 echo "$as_me:10711: result: $cf_cv_xopen_source" >&5
10712 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10714 if test "$cf_cv_xopen_source" != no ; then
10716 CFLAGS=`echo "$CFLAGS" | \
10717 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10718 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10720 CPPFLAGS=`echo "$CPPFLAGS" | \
10721 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10722 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10724 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10729 cf_new_extra_cppflags=
10731 for cf_add_cflags in $cf_temp_xopen_source
10733 case $cf_fix_cppflags in
10735 case $cf_add_cflags in
10736 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10737 case $cf_add_cflags in
10739 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10741 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10742 && test -z "${cf_tst_cflags}" \
10743 && cf_fix_cppflags=yes
10745 if test $cf_fix_cppflags = yes ; then
10746 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10748 elif test "${cf_tst_cflags}" = "\"'" ; then
10749 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10754 case "$CPPFLAGS" in
10758 case $cf_add_cflags in
10760 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10762 CPPFLAGS=`echo "$CPPFLAGS" | \
10763 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10764 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10768 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10773 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10778 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10780 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10782 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10783 && test -z "${cf_tst_cflags}" \
10784 && cf_fix_cppflags=no
10789 if test -n "$cf_new_cflags" ; then
10791 CFLAGS="$CFLAGS $cf_new_cflags"
10794 if test -n "$cf_new_cppflags" ; then
10796 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10799 if test -n "$cf_new_extra_cppflags" ; then
10801 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10809 # Check whether --enable-largefile or --disable-largefile was given.
10810 if test "${enable_largefile+set}" = set; then
10811 enableval="$enable_largefile"
10814 if test "$enable_largefile" != no; then
10816 echo "$as_me:10816: checking for special C compiler options needed for large files" >&5
10817 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10818 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10819 echo $ECHO_N "(cached) $ECHO_C" >&6
10821 ac_cv_sys_largefile_CC=no
10822 if test "$GCC" != yes; then
10825 # IRIX 6.2 and later do not support large files by default,
10826 # so use the C compiler's -n32 option if that helps.
10827 cat >conftest.$ac_ext <<_ACEOF
10828 #line 10828 "configure"
10829 #include "confdefs.h"
10830 #include <sys/types.h>
10831 /* Check that off_t can represent 2**63 - 1 correctly.
10832 We can't simply define LARGE_OFF_T to be 9223372036854775807,
10833 since some C++ compilers masquerading as C compilers
10834 incorrectly reject 9223372036854775807. */
10835 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10836 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10837 && LARGE_OFF_T % 2147483647 == 1)
10847 rm -f conftest.$ac_objext
10848 if { (eval echo "$as_me:10848: \"$ac_compile\"") >&5
10849 (eval $ac_compile) 2>&5
10851 echo "$as_me:10851: \$? = $ac_status" >&5
10852 (exit $ac_status); } &&
10853 { ac_try='test -s conftest.$ac_objext'
10854 { (eval echo "$as_me:10854: \"$ac_try\"") >&5
10855 (eval $ac_try) 2>&5
10857 echo "$as_me:10857: \$? = $ac_status" >&5
10858 (exit $ac_status); }; }; then
10861 echo "$as_me: failed program was:" >&5
10862 cat conftest.$ac_ext >&5
10864 rm -f conftest.$ac_objext
10866 rm -f conftest.$ac_objext
10867 if { (eval echo "$as_me:10867: \"$ac_compile\"") >&5
10868 (eval $ac_compile) 2>&5
10870 echo "$as_me:10870: \$? = $ac_status" >&5
10871 (exit $ac_status); } &&
10872 { ac_try='test -s conftest.$ac_objext'
10873 { (eval echo "$as_me:10873: \"$ac_try\"") >&5
10874 (eval $ac_try) 2>&5
10876 echo "$as_me:10876: \$? = $ac_status" >&5
10877 (exit $ac_status); }; }; then
10878 ac_cv_sys_largefile_CC=' -n32'; break
10880 echo "$as_me: failed program was:" >&5
10881 cat conftest.$ac_ext >&5
10883 rm -f conftest.$ac_objext
10887 rm -f conftest.$ac_ext
10890 echo "$as_me:10890: result: $ac_cv_sys_largefile_CC" >&5
10891 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10892 if test "$ac_cv_sys_largefile_CC" != no; then
10893 CC=$CC$ac_cv_sys_largefile_CC
10896 echo "$as_me:10896: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10897 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10898 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10899 echo $ECHO_N "(cached) $ECHO_C" >&6
10902 ac_cv_sys_file_offset_bits=no
10903 cat >conftest.$ac_ext <<_ACEOF
10904 #line 10904 "configure"
10905 #include "confdefs.h"
10906 #include <sys/types.h>
10907 /* Check that off_t can represent 2**63 - 1 correctly.
10908 We can't simply define LARGE_OFF_T to be 9223372036854775807,
10909 since some C++ compilers masquerading as C compilers
10910 incorrectly reject 9223372036854775807. */
10911 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10912 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10913 && LARGE_OFF_T % 2147483647 == 1)
10923 rm -f conftest.$ac_objext
10924 if { (eval echo "$as_me:10924: \"$ac_compile\"") >&5
10925 (eval $ac_compile) 2>&5
10927 echo "$as_me:10927: \$? = $ac_status" >&5
10928 (exit $ac_status); } &&
10929 { ac_try='test -s conftest.$ac_objext'
10930 { (eval echo "$as_me:10930: \"$ac_try\"") >&5
10931 (eval $ac_try) 2>&5
10933 echo "$as_me:10933: \$? = $ac_status" >&5
10934 (exit $ac_status); }; }; then
10937 echo "$as_me: failed program was:" >&5
10938 cat conftest.$ac_ext >&5
10940 rm -f conftest.$ac_objext conftest.$ac_ext
10941 cat >conftest.$ac_ext <<_ACEOF
10942 #line 10942 "configure"
10943 #include "confdefs.h"
10944 #define _FILE_OFFSET_BITS 64
10945 #include <sys/types.h>
10946 /* Check that off_t can represent 2**63 - 1 correctly.
10947 We can't simply define LARGE_OFF_T to be 9223372036854775807,
10948 since some C++ compilers masquerading as C compilers
10949 incorrectly reject 9223372036854775807. */
10950 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10951 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10952 && LARGE_OFF_T % 2147483647 == 1)
10962 rm -f conftest.$ac_objext
10963 if { (eval echo "$as_me:10963: \"$ac_compile\"") >&5
10964 (eval $ac_compile) 2>&5
10966 echo "$as_me:10966: \$? = $ac_status" >&5
10967 (exit $ac_status); } &&
10968 { ac_try='test -s conftest.$ac_objext'
10969 { (eval echo "$as_me:10969: \"$ac_try\"") >&5
10970 (eval $ac_try) 2>&5
10972 echo "$as_me:10972: \$? = $ac_status" >&5
10973 (exit $ac_status); }; }; then
10974 ac_cv_sys_file_offset_bits=64; break
10976 echo "$as_me: failed program was:" >&5
10977 cat conftest.$ac_ext >&5
10979 rm -f conftest.$ac_objext conftest.$ac_ext
10983 echo "$as_me:10983: result: $ac_cv_sys_file_offset_bits" >&5
10984 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10985 if test "$ac_cv_sys_file_offset_bits" != no; then
10987 cat >>confdefs.h <<EOF
10988 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10993 echo "$as_me:10993: checking for _LARGE_FILES value needed for large files" >&5
10994 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10995 if test "${ac_cv_sys_large_files+set}" = set; then
10996 echo $ECHO_N "(cached) $ECHO_C" >&6
10999 ac_cv_sys_large_files=no
11000 cat >conftest.$ac_ext <<_ACEOF
11001 #line 11001 "configure"
11002 #include "confdefs.h"
11003 #include <sys/types.h>
11004 /* Check that off_t can represent 2**63 - 1 correctly.
11005 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11006 since some C++ compilers masquerading as C compilers
11007 incorrectly reject 9223372036854775807. */
11008 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11009 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11010 && LARGE_OFF_T % 2147483647 == 1)
11020 rm -f conftest.$ac_objext
11021 if { (eval echo "$as_me:11021: \"$ac_compile\"") >&5
11022 (eval $ac_compile) 2>&5
11024 echo "$as_me:11024: \$? = $ac_status" >&5
11025 (exit $ac_status); } &&
11026 { ac_try='test -s conftest.$ac_objext'
11027 { (eval echo "$as_me:11027: \"$ac_try\"") >&5
11028 (eval $ac_try) 2>&5
11030 echo "$as_me:11030: \$? = $ac_status" >&5
11031 (exit $ac_status); }; }; then
11034 echo "$as_me: failed program was:" >&5
11035 cat conftest.$ac_ext >&5
11037 rm -f conftest.$ac_objext conftest.$ac_ext
11038 cat >conftest.$ac_ext <<_ACEOF
11039 #line 11039 "configure"
11040 #include "confdefs.h"
11041 #define _LARGE_FILES 1
11042 #include <sys/types.h>
11043 /* Check that off_t can represent 2**63 - 1 correctly.
11044 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11045 since some C++ compilers masquerading as C compilers
11046 incorrectly reject 9223372036854775807. */
11047 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11048 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11049 && LARGE_OFF_T % 2147483647 == 1)
11059 rm -f conftest.$ac_objext
11060 if { (eval echo "$as_me:11060: \"$ac_compile\"") >&5
11061 (eval $ac_compile) 2>&5
11063 echo "$as_me:11063: \$? = $ac_status" >&5
11064 (exit $ac_status); } &&
11065 { ac_try='test -s conftest.$ac_objext'
11066 { (eval echo "$as_me:11066: \"$ac_try\"") >&5
11067 (eval $ac_try) 2>&5
11069 echo "$as_me:11069: \$? = $ac_status" >&5
11070 (exit $ac_status); }; }; then
11071 ac_cv_sys_large_files=1; break
11073 echo "$as_me: failed program was:" >&5
11074 cat conftest.$ac_ext >&5
11076 rm -f conftest.$ac_objext conftest.$ac_ext
11080 echo "$as_me:11080: result: $ac_cv_sys_large_files" >&5
11081 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
11082 if test "$ac_cv_sys_large_files" != no; then
11084 cat >>confdefs.h <<EOF
11085 #define _LARGE_FILES $ac_cv_sys_large_files
11092 if test "$enable_largefile" != no ; then
11093 echo "$as_me:11093: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11094 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
11095 if test "${ac_cv_sys_largefile_source+set}" = set; then
11096 echo $ECHO_N "(cached) $ECHO_C" >&6
11099 ac_cv_sys_largefile_source=no
11100 cat >conftest.$ac_ext <<_ACEOF
11101 #line 11101 "configure"
11102 #include "confdefs.h"
11112 rm -f conftest.$ac_objext
11113 if { (eval echo "$as_me:11113: \"$ac_compile\"") >&5
11114 (eval $ac_compile) 2>&5
11116 echo "$as_me:11116: \$? = $ac_status" >&5
11117 (exit $ac_status); } &&
11118 { ac_try='test -s conftest.$ac_objext'
11119 { (eval echo "$as_me:11119: \"$ac_try\"") >&5
11120 (eval $ac_try) 2>&5
11122 echo "$as_me:11122: \$? = $ac_status" >&5
11123 (exit $ac_status); }; }; then
11126 echo "$as_me: failed program was:" >&5
11127 cat conftest.$ac_ext >&5
11129 rm -f conftest.$ac_objext conftest.$ac_ext
11130 cat >conftest.$ac_ext <<_ACEOF
11131 #line 11131 "configure"
11132 #include "confdefs.h"
11133 #define _LARGEFILE_SOURCE 1
11143 rm -f conftest.$ac_objext
11144 if { (eval echo "$as_me:11144: \"$ac_compile\"") >&5
11145 (eval $ac_compile) 2>&5
11147 echo "$as_me:11147: \$? = $ac_status" >&5
11148 (exit $ac_status); } &&
11149 { ac_try='test -s conftest.$ac_objext'
11150 { (eval echo "$as_me:11150: \"$ac_try\"") >&5
11151 (eval $ac_try) 2>&5
11153 echo "$as_me:11153: \$? = $ac_status" >&5
11154 (exit $ac_status); }; }; then
11155 ac_cv_sys_largefile_source=1; break
11157 echo "$as_me: failed program was:" >&5
11158 cat conftest.$ac_ext >&5
11160 rm -f conftest.$ac_objext conftest.$ac_ext
11164 echo "$as_me:11164: result: $ac_cv_sys_largefile_source" >&5
11165 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
11166 if test "$ac_cv_sys_largefile_source" != no; then
11168 cat >>confdefs.h <<EOF
11169 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11175 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11176 # in glibc 2.1.3, but that breaks too many other things.
11177 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11178 echo "$as_me:11178: checking for fseeko" >&5
11179 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
11180 if test "${ac_cv_func_fseeko+set}" = set; then
11181 echo $ECHO_N "(cached) $ECHO_C" >&6
11183 cat >conftest.$ac_ext <<_ACEOF
11184 #line 11184 "configure"
11185 #include "confdefs.h"
11190 return fseeko && fseeko (stdin, 0, 0);
11195 rm -f conftest.$ac_objext conftest$ac_exeext
11196 if { (eval echo "$as_me:11196: \"$ac_link\"") >&5
11197 (eval $ac_link) 2>&5
11199 echo "$as_me:11199: \$? = $ac_status" >&5
11200 (exit $ac_status); } &&
11201 { ac_try='test -s conftest$ac_exeext'
11202 { (eval echo "$as_me:11202: \"$ac_try\"") >&5
11203 (eval $ac_try) 2>&5
11205 echo "$as_me:11205: \$? = $ac_status" >&5
11206 (exit $ac_status); }; }; then
11207 ac_cv_func_fseeko=yes
11209 echo "$as_me: failed program was:" >&5
11210 cat conftest.$ac_ext >&5
11211 ac_cv_func_fseeko=no
11213 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11215 echo "$as_me:11215: result: $ac_cv_func_fseeko" >&5
11216 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
11217 if test $ac_cv_func_fseeko = yes; then
11219 cat >>confdefs.h <<\EOF
11220 #define HAVE_FSEEKO 1
11225 # Normally we would collect these definitions in the config.h,
11226 # but (like _XOPEN_SOURCE), some environments rely on having these
11227 # defined before any of the system headers are included. Another
11228 # case comes up with C++, e.g., on AIX the compiler compiles the
11229 # header files by themselves before looking at the body files it is
11230 # told to compile. For ncurses, those header files do not include
11232 test "$ac_cv_sys_large_files" != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
11233 test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
11234 test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
11236 echo "$as_me:11236: checking whether to use struct dirent64" >&5
11237 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
11238 if test "${cf_cv_struct_dirent64+set}" = set; then
11239 echo $ECHO_N "(cached) $ECHO_C" >&6
11242 cat >conftest.$ac_ext <<_ACEOF
11243 #line 11243 "configure"
11244 #include "confdefs.h"
11246 #include <sys/types.h>
11247 #include <dirent.h>
11253 /* if transitional largefile support is setup, this is true */
11254 extern struct dirent64 * readdir(DIR *);
11255 struct dirent64 *x = readdir((DIR *)0);
11256 struct dirent *y = readdir((DIR *)0);
11263 rm -f conftest.$ac_objext
11264 if { (eval echo "$as_me:11264: \"$ac_compile\"") >&5
11265 (eval $ac_compile) 2>&5
11267 echo "$as_me:11267: \$? = $ac_status" >&5
11268 (exit $ac_status); } &&
11269 { ac_try='test -s conftest.$ac_objext'
11270 { (eval echo "$as_me:11270: \"$ac_try\"") >&5
11271 (eval $ac_try) 2>&5
11273 echo "$as_me:11273: \$? = $ac_status" >&5
11274 (exit $ac_status); }; }; then
11275 cf_cv_struct_dirent64=yes
11277 echo "$as_me: failed program was:" >&5
11278 cat conftest.$ac_ext >&5
11279 cf_cv_struct_dirent64=no
11281 rm -f conftest.$ac_objext conftest.$ac_ext
11284 echo "$as_me:11284: result: $cf_cv_struct_dirent64" >&5
11285 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11286 test "$cf_cv_struct_dirent64" = yes &&
11287 cat >>confdefs.h <<\EOF
11288 #define HAVE_STRUCT_DIRENT64 1
11293 ### Enable compiling-in rcs id's
11294 echo "$as_me:11294: checking if RCS identifiers should be compiled-in" >&5
11295 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
11297 # Check whether --with-rcs-ids or --without-rcs-ids was given.
11298 if test "${with_rcs_ids+set}" = set; then
11299 withval="$with_rcs_ids"
11300 with_rcs_ids=$withval
11304 echo "$as_me:11304: result: $with_rcs_ids" >&5
11305 echo "${ECHO_T}$with_rcs_ids" >&6
11306 test "$with_rcs_ids" = yes &&
11307 cat >>confdefs.h <<\EOF
11308 #define USE_RCS_IDS 1
11311 ###############################################################################
11313 ### Note that some functions (such as const) are normally disabled anyway.
11314 echo "$as_me:11314: checking if you want to build with function extensions" >&5
11315 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11317 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11318 if test "${enable_ext_funcs+set}" = set; then
11319 enableval="$enable_ext_funcs"
11320 with_ext_funcs=$enableval
11324 echo "$as_me:11324: result: $with_ext_funcs" >&5
11325 echo "${ECHO_T}$with_ext_funcs" >&6
11326 if test "$with_ext_funcs" = yes ; then
11327 NCURSES_EXT_FUNCS=1
11329 cat >>confdefs.h <<\EOF
11330 #define HAVE_USE_DEFAULT_COLORS 1
11333 cat >>confdefs.h <<\EOF
11334 #define NCURSES_EXT_FUNCS 1
11338 NCURSES_EXT_FUNCS=0
11341 ### use option --enable-const to turn on use of const beyond that in XSI.
11342 echo "$as_me:11342: checking for extended use of const keyword" >&5
11343 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11345 # Check whether --enable-const or --disable-const was given.
11346 if test "${enable_const+set}" = set; then
11347 enableval="$enable_const"
11348 with_ext_const=$enableval
11352 echo "$as_me:11352: result: $with_ext_const" >&5
11353 echo "${ECHO_T}$with_ext_const" >&6
11354 NCURSES_CONST='/*nothing*/'
11355 if test "$with_ext_const" = yes ; then
11356 NCURSES_CONST=const
11359 ###############################################################################
11360 # These options are relatively safe to experiment with.
11362 echo "$as_me:11362: checking if you want all development code" >&5
11363 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11365 # Check whether --with-develop or --without-develop was given.
11366 if test "${with_develop+set}" = set; then
11367 withval="$with_develop"
11368 with_develop=$withval
11372 echo "$as_me:11372: result: $with_develop" >&5
11373 echo "${ECHO_T}$with_develop" >&6
11375 ###############################################################################
11376 # These are just experimental, probably should not be in a package:
11378 # This is still experimental (20080329), but should ultimately be moved to
11379 # the script-block --with-normal, etc.
11381 echo "$as_me:11381: checking if you want to link with the pthread library" >&5
11382 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11384 # Check whether --with-pthread or --without-pthread was given.
11385 if test "${with_pthread+set}" = set; then
11386 withval="$with_pthread"
11387 with_pthread=$withval
11391 echo "$as_me:11391: result: $with_pthread" >&5
11392 echo "${ECHO_T}$with_pthread" >&6
11394 if test "$with_pthread" != no ; then
11395 echo "$as_me:11395: checking for pthread.h" >&5
11396 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11397 if test "${ac_cv_header_pthread_h+set}" = set; then
11398 echo $ECHO_N "(cached) $ECHO_C" >&6
11400 cat >conftest.$ac_ext <<_ACEOF
11401 #line 11401 "configure"
11402 #include "confdefs.h"
11403 #include <pthread.h>
11405 if { (eval echo "$as_me:11405: \"$ac_cpp conftest.$ac_ext\"") >&5
11406 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11408 egrep -v '^ *\+' conftest.er1 >conftest.err
11410 cat conftest.err >&5
11411 echo "$as_me:11411: \$? = $ac_status" >&5
11412 (exit $ac_status); } >/dev/null; then
11413 if test -s conftest.err; then
11414 ac_cpp_err=$ac_c_preproc_warn_flag
11421 if test -z "$ac_cpp_err"; then
11422 ac_cv_header_pthread_h=yes
11424 echo "$as_me: failed program was:" >&5
11425 cat conftest.$ac_ext >&5
11426 ac_cv_header_pthread_h=no
11428 rm -f conftest.err conftest.$ac_ext
11430 echo "$as_me:11430: result: $ac_cv_header_pthread_h" >&5
11431 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11432 if test $ac_cv_header_pthread_h = yes; then
11434 cat >>confdefs.h <<\EOF
11435 #define HAVE_PTHREADS_H 1
11438 for cf_lib_pthread in pthread c_r
11440 echo "$as_me:11440: checking if we can link with the $cf_lib_pthread library" >&5
11441 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11442 cf_save_LIBS="$LIBS"
11444 cf_add_libs="-l$cf_lib_pthread"
11445 # Filter out duplicates - this happens with badly-designed ".pc" files...
11446 for cf_add_1lib in $LIBS
11448 for cf_add_2lib in $cf_add_libs
11450 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11456 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11458 LIBS="$cf_add_libs"
11460 cat >conftest.$ac_ext <<_ACEOF
11461 #line 11461 "configure"
11462 #include "confdefs.h"
11464 #include <pthread.h>
11470 int rc = pthread_create(0,0,0,0);
11471 int r2 = pthread_mutexattr_settype(0, 0);
11477 rm -f conftest.$ac_objext conftest$ac_exeext
11478 if { (eval echo "$as_me:11478: \"$ac_link\"") >&5
11479 (eval $ac_link) 2>&5
11481 echo "$as_me:11481: \$? = $ac_status" >&5
11482 (exit $ac_status); } &&
11483 { ac_try='test -s conftest$ac_exeext'
11484 { (eval echo "$as_me:11484: \"$ac_try\"") >&5
11485 (eval $ac_try) 2>&5
11487 echo "$as_me:11487: \$? = $ac_status" >&5
11488 (exit $ac_status); }; }; then
11491 echo "$as_me: failed program was:" >&5
11492 cat conftest.$ac_ext >&5
11495 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11496 LIBS="$cf_save_LIBS"
11497 echo "$as_me:11497: result: $with_pthread" >&5
11498 echo "${ECHO_T}$with_pthread" >&6
11499 test "$with_pthread" = yes && break
11502 if test "$with_pthread" = yes ; then
11504 cf_add_libs="-l$cf_lib_pthread"
11505 # Filter out duplicates - this happens with badly-designed ".pc" files...
11506 for cf_add_1lib in $LIBS
11508 for cf_add_2lib in $cf_add_libs
11510 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11516 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11518 LIBS="$cf_add_libs"
11520 cat >>confdefs.h <<\EOF
11521 #define HAVE_LIBPTHREADS 1
11525 { { echo "$as_me:11525: error: Cannot link with pthread library" >&5
11526 echo "$as_me: error: Cannot link with pthread library" >&2;}
11527 { (exit 1); exit 1; }; }
11534 echo "$as_me:11534: checking if you want to use weak-symbols for pthreads" >&5
11535 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11537 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11538 if test "${enable_weak_symbols+set}" = set; then
11539 enableval="$enable_weak_symbols"
11540 use_weak_symbols=$withval
11542 use_weak_symbols=no
11544 echo "$as_me:11544: result: $use_weak_symbols" >&5
11545 echo "${ECHO_T}$use_weak_symbols" >&6
11546 if test "$use_weak_symbols" = yes ; then
11548 echo "$as_me:11548: checking if $CC supports weak symbols" >&5
11549 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11550 if test "${cf_cv_weak_symbols+set}" = set; then
11551 echo $ECHO_N "(cached) $ECHO_C" >&6
11554 cat >conftest.$ac_ext <<_ACEOF
11555 #line 11555 "configure"
11556 #include "confdefs.h"
11563 #if defined(__GNUC__)
11564 # if defined __USE_ISOC99
11565 # define _cat_pragma(exp) _Pragma(#exp)
11566 # define _weak_pragma(exp) _cat_pragma(weak name)
11568 # define _weak_pragma(exp)
11570 # define _declare(name) __extension__ extern __typeof__(name) name
11571 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
11574 weak_symbol(fopen);
11580 rm -f conftest.$ac_objext
11581 if { (eval echo "$as_me:11581: \"$ac_compile\"") >&5
11582 (eval $ac_compile) 2>&5
11584 echo "$as_me:11584: \$? = $ac_status" >&5
11585 (exit $ac_status); } &&
11586 { ac_try='test -s conftest.$ac_objext'
11587 { (eval echo "$as_me:11587: \"$ac_try\"") >&5
11588 (eval $ac_try) 2>&5
11590 echo "$as_me:11590: \$? = $ac_status" >&5
11591 (exit $ac_status); }; }; then
11592 cf_cv_weak_symbols=yes
11594 echo "$as_me: failed program was:" >&5
11595 cat conftest.$ac_ext >&5
11596 cf_cv_weak_symbols=no
11598 rm -f conftest.$ac_objext conftest.$ac_ext
11601 echo "$as_me:11601: result: $cf_cv_weak_symbols" >&5
11602 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11605 cf_cv_weak_symbols=no
11608 if test $cf_cv_weak_symbols = yes ; then
11610 cat >>confdefs.h <<\EOF
11611 #define USE_WEAK_SYMBOLS 1
11617 if test "$with_pthread" = "yes" ; then
11619 cat >>confdefs.h <<\EOF
11620 #define USE_PTHREADS 1
11623 enable_reentrant=yes
11624 if test $cf_cv_weak_symbols = yes ; then
11629 # OpenSUSE is installing ncurses6, using reentrant option.
11630 echo "$as_me:11630: checking for _nc_TABSIZE" >&5
11631 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
11632 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
11633 echo $ECHO_N "(cached) $ECHO_C" >&6
11635 cat >conftest.$ac_ext <<_ACEOF
11636 #line 11636 "configure"
11637 #include "confdefs.h"
11638 /* System header to define __stub macros and hopefully few prototypes,
11639 which can conflict with char _nc_TABSIZE (); below. */
11640 #include <assert.h>
11641 /* Override any gcc2 internal prototype to avoid an error. */
11645 /* We use char because int might match the return type of a gcc2
11646 builtin and then its argument prototype would still apply. */
11647 char _nc_TABSIZE ();
11653 /* The GNU C library defines this for functions which it implements
11654 to always fail with ENOSYS. Some functions are actually named
11655 something starting with __ and the normal name is an alias. */
11656 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
11659 f = _nc_TABSIZE; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11666 rm -f conftest.$ac_objext conftest$ac_exeext
11667 if { (eval echo "$as_me:11667: \"$ac_link\"") >&5
11668 (eval $ac_link) 2>&5
11670 echo "$as_me:11670: \$? = $ac_status" >&5
11671 (exit $ac_status); } &&
11672 { ac_try='test -s conftest$ac_exeext'
11673 { (eval echo "$as_me:11673: \"$ac_try\"") >&5
11674 (eval $ac_try) 2>&5
11676 echo "$as_me:11676: \$? = $ac_status" >&5
11677 (exit $ac_status); }; }; then
11678 ac_cv_func__nc_TABSIZE=yes
11680 echo "$as_me: failed program was:" >&5
11681 cat conftest.$ac_ext >&5
11682 ac_cv_func__nc_TABSIZE=no
11684 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11686 echo "$as_me:11686: result: $ac_cv_func__nc_TABSIZE" >&5
11687 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
11688 if test $ac_cv_func__nc_TABSIZE = yes; then
11689 assume_reentrant=yes
11691 assume_reentrant=no
11694 # Reentrant code has to be opaque; there's little advantage to making ncurses
11695 # opaque outside of that, so there is no --enable-opaque option. We can use
11696 # this option without --with-pthreads, but this will be always set for
11698 echo "$as_me:11698: checking if you want experimental reentrant code" >&5
11699 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11701 # Check whether --enable-reentrant or --disable-reentrant was given.
11702 if test "${enable_reentrant+set}" = set; then
11703 enableval="$enable_reentrant"
11704 with_reentrant=$enableval
11706 with_reentrant=$assume_reentrant
11708 echo "$as_me:11708: result: $with_reentrant" >&5
11709 echo "${ECHO_T}$with_reentrant" >&6
11710 if test "$with_reentrant" = yes ; then
11711 cf_cv_enable_reentrant=1
11712 if test $cf_cv_weak_symbols = yes ; then
11714 # remove pthread library from $LIBS
11715 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
11717 elif test "$assume_reentrant" = no ; then
11718 LIB_SUFFIX="t${LIB_SUFFIX}"
11721 cat >>confdefs.h <<\EOF
11722 #define USE_REENTRANT 1
11726 cf_cv_enable_reentrant=0
11729 ### Allow using a different wrap-prefix
11730 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11731 echo "$as_me:11731: checking for prefix used to wrap public variables" >&5
11732 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11734 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11735 if test "${with_wrap_prefix+set}" = set; then
11736 withval="$with_wrap_prefix"
11737 NCURSES_WRAP_PREFIX=$withval
11739 NCURSES_WRAP_PREFIX=_nc_
11741 echo "$as_me:11741: result: $NCURSES_WRAP_PREFIX" >&5
11742 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11744 NCURSES_WRAP_PREFIX=_nc_
11747 cat >>confdefs.h <<EOF
11748 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11751 ###############################################################################
11753 ### use option --disable-echo to suppress full display compiling commands
11755 echo "$as_me:11755: checking if you want to see long compiling messages" >&5
11756 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
11758 # Check whether --enable-echo or --disable-echo was given.
11759 if test "${enable_echo+set}" = set; then
11760 enableval="$enable_echo"
11761 test "$enableval" != no && enableval=yes
11762 if test "$enableval" != "yes" ; then
11765 ECHO_LD='@echo linking $@;'
11766 RULE_CC='@echo compiling $<'
11767 SHOW_CC='@echo compiling $@'
11789 echo "$as_me:11789: result: $enableval" >&5
11790 echo "${ECHO_T}$enableval" >&6
11792 ### use option --enable-warnings to turn on all gcc warnings
11793 echo "$as_me:11793: checking if you want to see compiler warnings" >&5
11794 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11796 # Check whether --enable-warnings or --disable-warnings was given.
11797 if test "${enable_warnings+set}" = set; then
11798 enableval="$enable_warnings"
11799 with_warnings=$enableval
11801 echo "$as_me:11801: result: $with_warnings" >&5
11802 echo "${ECHO_T}$with_warnings" >&6
11804 if test "x$with_warnings" = "xyes"; then
11806 ADAFLAGS="$ADAFLAGS -gnatg"
11810 if test "$GCC" = yes ; then
11813 echo "$as_me:11813: checking if this is really Intel C compiler" >&5
11814 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11815 cf_save_CFLAGS="$CFLAGS"
11816 CFLAGS="$CFLAGS -no-gcc"
11817 cat >conftest.$ac_ext <<_ACEOF
11818 #line 11818 "configure"
11819 #include "confdefs.h"
11825 #ifdef __INTEL_COMPILER
11834 rm -f conftest.$ac_objext
11835 if { (eval echo "$as_me:11835: \"$ac_compile\"") >&5
11836 (eval $ac_compile) 2>&5
11838 echo "$as_me:11838: \$? = $ac_status" >&5
11839 (exit $ac_status); } &&
11840 { ac_try='test -s conftest.$ac_objext'
11841 { (eval echo "$as_me:11841: \"$ac_try\"") >&5
11842 (eval $ac_try) 2>&5
11844 echo "$as_me:11844: \$? = $ac_status" >&5
11845 (exit $ac_status); }; }; then
11847 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
11850 echo "$as_me: failed program was:" >&5
11851 cat conftest.$ac_ext >&5
11853 rm -f conftest.$ac_objext conftest.$ac_ext
11854 CFLAGS="$cf_save_CFLAGS"
11855 echo "$as_me:11855: result: $INTEL_COMPILER" >&5
11856 echo "${ECHO_T}$INTEL_COMPILER" >&6
11863 if test "$GCC" = yes ; then
11864 echo "$as_me:11864: checking if this is really Clang C compiler" >&5
11865 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
11866 cf_save_CFLAGS="$CFLAGS"
11867 CFLAGS="$CFLAGS -Qunused-arguments"
11868 cat >conftest.$ac_ext <<_ACEOF
11869 #line 11869 "configure"
11870 #include "confdefs.h"
11885 rm -f conftest.$ac_objext
11886 if { (eval echo "$as_me:11886: \"$ac_compile\"") >&5
11887 (eval $ac_compile) 2>&5
11889 echo "$as_me:11889: \$? = $ac_status" >&5
11890 (exit $ac_status); } &&
11891 { ac_try='test -s conftest.$ac_objext'
11892 { (eval echo "$as_me:11892: \"$ac_try\"") >&5
11893 (eval $ac_try) 2>&5
11895 echo "$as_me:11895: \$? = $ac_status" >&5
11896 (exit $ac_status); }; }; then
11898 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
11901 echo "$as_me: failed program was:" >&5
11902 cat conftest.$ac_ext >&5
11904 rm -f conftest.$ac_objext conftest.$ac_ext
11905 CFLAGS="$cf_save_CFLAGS"
11906 echo "$as_me:11906: result: $CLANG_COMPILER" >&5
11907 echo "${ECHO_T}$CLANG_COMPILER" >&6
11910 cat > conftest.$ac_ext <<EOF
11911 #line 11911 "${as_me:-configure}"
11912 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11915 if test "$INTEL_COMPILER" = yes
11917 # The "-wdXXX" options suppress warnings:
11918 # remark #1419: external declaration in primary source file
11919 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11920 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11921 # remark #193: zero used for undefined preprocessing identifier
11922 # remark #593: variable "curs_sb_left_arrow" was set but never used
11923 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11924 # remark #869: parameter "tw" was never referenced
11925 # remark #981: operands are evaluated in unspecified order
11926 # warning #279: controlling expression is constant
11928 { echo "$as_me:11928: checking for $CC warning options..." >&5
11929 echo "$as_me: checking for $CC warning options..." >&6;}
11930 cf_save_CFLAGS="$CFLAGS"
11931 EXTRA_CFLAGS="-Wall"
11943 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11944 if { (eval echo "$as_me:11944: \"$ac_compile\"") >&5
11945 (eval $ac_compile) 2>&5
11947 echo "$as_me:11947: \$? = $ac_status" >&5
11948 (exit $ac_status); }; then
11949 test -n "$verbose" && echo "$as_me:11949: result: ... -$cf_opt" >&5
11950 echo "${ECHO_T}... -$cf_opt" >&6
11951 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11954 CFLAGS="$cf_save_CFLAGS"
11956 elif test "$GCC" = yes
11958 { echo "$as_me:11958: checking for $CC warning options..." >&5
11959 echo "$as_me: checking for $CC warning options..." >&6;}
11960 cf_save_CFLAGS="$CFLAGS"
11963 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
11964 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
11965 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
11966 for cf_opt in W Wall \
11967 Wbad-function-cast \
11970 Wdeclaration-after-statement \
11973 Wmissing-declarations \
11974 Wmissing-prototypes \
11978 Wstrict-prototypes \
11979 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
11981 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11982 if { (eval echo "$as_me:11982: \"$ac_compile\"") >&5
11983 (eval $ac_compile) 2>&5
11985 echo "$as_me:11985: \$? = $ac_status" >&5
11986 (exit $ac_status); }; then
11987 test -n "$verbose" && echo "$as_me:11987: result: ... -$cf_opt" >&5
11988 echo "${ECHO_T}... -$cf_opt" >&6
11991 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
11994 case $GCC_VERSION in
11996 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
11998 echo "${as_me:-configure}:11998: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12004 case $GCC_VERSION in
12006 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
12008 echo "${as_me:-configure}:12008: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12014 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12017 CFLAGS="$cf_save_CFLAGS"
12023 if test "$GCC" = yes
12025 cat > conftest.i <<EOF
12027 #define GCC_PRINTF 0
12030 #define GCC_SCANF 0
12032 #ifndef GCC_NORETURN
12033 #define GCC_NORETURN /* nothing */
12036 #define GCC_UNUSED /* nothing */
12039 if test "$GCC" = yes
12041 { echo "$as_me:12041: checking for $CC __attribute__ directives..." >&5
12042 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12043 cat > conftest.$ac_ext <<EOF
12044 #line 12044 "${as_me:-configure}"
12045 #include "confdefs.h"
12046 #include "conftest.h"
12047 #include "conftest.i"
12049 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12051 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12054 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
12056 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
12058 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12059 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12060 extern void foo(void) GCC_NORETURN;
12061 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12063 cf_printf_attribute=no
12064 cf_scanf_attribute=no
12065 for cf_attribute in scanf printf unused noreturn
12068 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12070 cf_directive="__attribute__(($cf_attribute))"
12071 echo "checking for $CC $cf_directive" 1>&5
12073 case $cf_attribute in
12075 cf_printf_attribute=yes
12076 cat >conftest.h <<EOF
12077 #define GCC_$cf_ATTRIBUTE 1
12081 cf_scanf_attribute=yes
12082 cat >conftest.h <<EOF
12083 #define GCC_$cf_ATTRIBUTE 1
12087 cat >conftest.h <<EOF
12088 #define GCC_$cf_ATTRIBUTE $cf_directive
12093 if { (eval echo "$as_me:12093: \"$ac_compile\"") >&5
12094 (eval $ac_compile) 2>&5
12096 echo "$as_me:12096: \$? = $ac_status" >&5
12097 (exit $ac_status); }; then
12098 test -n "$verbose" && echo "$as_me:12098: result: ... $cf_attribute" >&5
12099 echo "${ECHO_T}... $cf_attribute" >&6
12100 cat conftest.h >>confdefs.h
12101 case $cf_attribute in
12104 cat >>confdefs.h <<EOF
12105 #define GCC_NORETURN $cf_directive
12110 cf_value='/* nothing */'
12111 if test "$cf_printf_attribute" != no ; then
12112 cf_value='__attribute__((format(printf,fmt,var)))'
12114 cat >>confdefs.h <<\EOF
12115 #define GCC_PRINTF 1
12120 cat >>confdefs.h <<EOF
12121 #define GCC_PRINTFLIKE(fmt,var) $cf_value
12126 cf_value='/* nothing */'
12127 if test "$cf_scanf_attribute" != no ; then
12128 cf_value='__attribute__((format(scanf,fmt,var)))'
12130 cat >>confdefs.h <<\EOF
12131 #define GCC_SCANF 1
12136 cat >>confdefs.h <<EOF
12137 #define GCC_SCANFLIKE(fmt,var) $cf_value
12143 cat >>confdefs.h <<EOF
12144 #define GCC_UNUSED $cf_directive
12152 fgrep define conftest.i >>confdefs.h
12157 ### use option --enable-assertions to turn on generation of assertion code
12158 echo "$as_me:12158: checking if you want to enable runtime assertions" >&5
12159 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12161 # Check whether --enable-assertions or --disable-assertions was given.
12162 if test "${enable_assertions+set}" = set; then
12163 enableval="$enable_assertions"
12164 with_assertions=$enableval
12168 echo "$as_me:12168: result: $with_assertions" >&5
12169 echo "${ECHO_T}$with_assertions" >&6
12172 if test "$with_assertions" = no
12174 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12177 ADAFLAGS="$ADAFLAGS -gnata"
12182 ### use option --disable-leaks to suppress "permanent" leaks, for testing
12184 cat >>confdefs.h <<\EOF
12185 #define HAVE_NC_ALLOC_H 1
12188 ### use option --enable-expanded to generate certain macros as functions
12190 # Check whether --enable-expanded or --disable-expanded was given.
12191 if test "${enable_expanded+set}" = set; then
12192 enableval="$enable_expanded"
12193 test "$enableval" = yes &&
12194 cat >>confdefs.h <<\EOF
12195 #define NCURSES_EXPANDED 1
12200 ### use option --disable-macros to suppress macros in favor of functions
12202 # Check whether --enable-macros or --disable-macros was given.
12203 if test "${enable_macros+set}" = set; then
12204 enableval="$enable_macros"
12205 test "$enableval" = no &&
12206 cat >>confdefs.h <<\EOF
12207 #define NCURSES_NOMACROS 1
12212 # Normally we only add trace() to the debug-library. Allow this to be
12213 # extended to all models of the ncurses library:
12215 case "$CFLAGS $CPPFLAGS" in
12221 echo "$as_me:12221: checking whether to add trace feature to all models" >&5
12222 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
12224 # Check whether --with-trace or --without-trace was given.
12225 if test "${with_trace+set}" = set; then
12226 withval="$with_trace"
12227 cf_with_trace=$withval
12229 cf_with_trace=$cf_all_traces
12231 echo "$as_me:12231: result: $cf_with_trace" >&5
12232 echo "${ECHO_T}$cf_with_trace" >&6
12234 if test "$cf_with_trace" = yes ; then
12240 cf_new_extra_cppflags=
12242 for cf_add_cflags in -DTRACE
12244 case $cf_fix_cppflags in
12246 case $cf_add_cflags in
12247 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12248 case $cf_add_cflags in
12250 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12252 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12253 && test -z "${cf_tst_cflags}" \
12254 && cf_fix_cppflags=yes
12256 if test $cf_fix_cppflags = yes ; then
12257 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12259 elif test "${cf_tst_cflags}" = "\"'" ; then
12260 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12265 case "$CPPFLAGS" in
12269 case $cf_add_cflags in
12271 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12273 CPPFLAGS=`echo "$CPPFLAGS" | \
12274 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12275 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12279 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12284 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12289 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12291 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12293 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12294 && test -z "${cf_tst_cflags}" \
12295 && cf_fix_cppflags=no
12300 if test -n "$cf_new_cflags" ; then
12302 CFLAGS="$CFLAGS $cf_new_cflags"
12305 if test -n "$cf_new_cppflags" ; then
12307 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12310 if test -n "$cf_new_extra_cppflags" ; then
12312 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12319 echo "$as_me:12319: checking if we want to use GNAT projects" >&5
12320 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
12322 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
12323 if test "${enable_gnat_projects+set}" = set; then
12324 enableval="$enable_gnat_projects"
12325 test "$enableval" != no && enableval=yes
12326 if test "$enableval" != "yes" ; then
12327 enable_gnat_projects=no
12329 enable_gnat_projects=yes
12333 enable_gnat_projects=yes
12336 echo "$as_me:12336: result: $enable_gnat_projects" >&5
12337 echo "${ECHO_T}$enable_gnat_projects" >&6
12339 ### Checks for libraries.
12340 case $cf_cv_system_name in
12344 echo "$as_me:12344: checking for gettimeofday" >&5
12345 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
12346 if test "${ac_cv_func_gettimeofday+set}" = set; then
12347 echo $ECHO_N "(cached) $ECHO_C" >&6
12349 cat >conftest.$ac_ext <<_ACEOF
12350 #line 12350 "configure"
12351 #include "confdefs.h"
12352 /* System header to define __stub macros and hopefully few prototypes,
12353 which can conflict with char gettimeofday (); below. */
12354 #include <assert.h>
12355 /* Override any gcc2 internal prototype to avoid an error. */
12359 /* We use char because int might match the return type of a gcc2
12360 builtin and then its argument prototype would still apply. */
12361 char gettimeofday ();
12367 /* The GNU C library defines this for functions which it implements
12368 to always fail with ENOSYS. Some functions are actually named
12369 something starting with __ and the normal name is an alias. */
12370 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
12373 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12380 rm -f conftest.$ac_objext conftest$ac_exeext
12381 if { (eval echo "$as_me:12381: \"$ac_link\"") >&5
12382 (eval $ac_link) 2>&5
12384 echo "$as_me:12384: \$? = $ac_status" >&5
12385 (exit $ac_status); } &&
12386 { ac_try='test -s conftest$ac_exeext'
12387 { (eval echo "$as_me:12387: \"$ac_try\"") >&5
12388 (eval $ac_try) 2>&5
12390 echo "$as_me:12390: \$? = $ac_status" >&5
12391 (exit $ac_status); }; }; then
12392 ac_cv_func_gettimeofday=yes
12394 echo "$as_me: failed program was:" >&5
12395 cat conftest.$ac_ext >&5
12396 ac_cv_func_gettimeofday=no
12398 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12400 echo "$as_me:12400: result: $ac_cv_func_gettimeofday" >&5
12401 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
12402 if test $ac_cv_func_gettimeofday = yes; then
12403 cat >>confdefs.h <<\EOF
12404 #define HAVE_GETTIMEOFDAY 1
12409 echo "$as_me:12409: checking for gettimeofday in -lbsd" >&5
12410 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
12411 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
12412 echo $ECHO_N "(cached) $ECHO_C" >&6
12414 ac_check_lib_save_LIBS=$LIBS
12416 cat >conftest.$ac_ext <<_ACEOF
12417 #line 12417 "configure"
12418 #include "confdefs.h"
12420 /* Override any gcc2 internal prototype to avoid an error. */
12424 /* We use char because int might match the return type of a gcc2
12425 builtin and then its argument prototype would still apply. */
12426 char gettimeofday ();
12435 rm -f conftest.$ac_objext conftest$ac_exeext
12436 if { (eval echo "$as_me:12436: \"$ac_link\"") >&5
12437 (eval $ac_link) 2>&5
12439 echo "$as_me:12439: \$? = $ac_status" >&5
12440 (exit $ac_status); } &&
12441 { ac_try='test -s conftest$ac_exeext'
12442 { (eval echo "$as_me:12442: \"$ac_try\"") >&5
12443 (eval $ac_try) 2>&5
12445 echo "$as_me:12445: \$? = $ac_status" >&5
12446 (exit $ac_status); }; }; then
12447 ac_cv_lib_bsd_gettimeofday=yes
12449 echo "$as_me: failed program was:" >&5
12450 cat conftest.$ac_ext >&5
12451 ac_cv_lib_bsd_gettimeofday=no
12453 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12454 LIBS=$ac_check_lib_save_LIBS
12456 echo "$as_me:12456: result: $ac_cv_lib_bsd_gettimeofday" >&5
12457 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
12458 if test $ac_cv_lib_bsd_gettimeofday = yes; then
12460 cat >>confdefs.h <<\EOF
12461 #define HAVE_GETTIMEOFDAY 1
12471 ### Checks for header files.
12472 echo "$as_me:12472: checking for ANSI C header files" >&5
12473 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12474 if test "${ac_cv_header_stdc+set}" = set; then
12475 echo $ECHO_N "(cached) $ECHO_C" >&6
12477 cat >conftest.$ac_ext <<_ACEOF
12478 #line 12478 "configure"
12479 #include "confdefs.h"
12480 #include <stdlib.h>
12481 #include <stdarg.h>
12482 #include <string.h>
12486 if { (eval echo "$as_me:12486: \"$ac_cpp conftest.$ac_ext\"") >&5
12487 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12489 egrep -v '^ *\+' conftest.er1 >conftest.err
12491 cat conftest.err >&5
12492 echo "$as_me:12492: \$? = $ac_status" >&5
12493 (exit $ac_status); } >/dev/null; then
12494 if test -s conftest.err; then
12495 ac_cpp_err=$ac_c_preproc_warn_flag
12502 if test -z "$ac_cpp_err"; then
12503 ac_cv_header_stdc=yes
12505 echo "$as_me: failed program was:" >&5
12506 cat conftest.$ac_ext >&5
12507 ac_cv_header_stdc=no
12509 rm -f conftest.err conftest.$ac_ext
12511 if test $ac_cv_header_stdc = yes; then
12512 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12513 cat >conftest.$ac_ext <<_ACEOF
12514 #line 12514 "configure"
12515 #include "confdefs.h"
12516 #include <string.h>
12519 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12520 egrep "memchr" >/dev/null 2>&1; then
12523 ac_cv_header_stdc=no
12529 if test $ac_cv_header_stdc = yes; then
12530 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12531 cat >conftest.$ac_ext <<_ACEOF
12532 #line 12532 "configure"
12533 #include "confdefs.h"
12534 #include <stdlib.h>
12537 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12538 egrep "free" >/dev/null 2>&1; then
12541 ac_cv_header_stdc=no
12547 if test $ac_cv_header_stdc = yes; then
12548 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12549 if test "$cross_compiling" = yes; then
12552 cat >conftest.$ac_ext <<_ACEOF
12553 #line 12553 "configure"
12554 #include "confdefs.h"
12556 #if ((' ' & 0x0FF) == 0x020)
12557 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12558 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12560 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12561 || ('j' <= (c) && (c) <= 'r') \
12562 || ('s' <= (c) && (c) <= 'z'))
12563 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12566 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12571 for (i = 0; i < 256; i++)
12572 if (XOR (islower (i), ISLOWER (i))
12573 || toupper (i) != TOUPPER (i))
12574 $ac_main_return(2);
12575 $ac_main_return (0);
12578 rm -f conftest$ac_exeext
12579 if { (eval echo "$as_me:12579: \"$ac_link\"") >&5
12580 (eval $ac_link) 2>&5
12582 echo "$as_me:12582: \$? = $ac_status" >&5
12583 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12584 { (eval echo "$as_me:12584: \"$ac_try\"") >&5
12585 (eval $ac_try) 2>&5
12587 echo "$as_me:12587: \$? = $ac_status" >&5
12588 (exit $ac_status); }; }; then
12591 echo "$as_me: program exited with status $ac_status" >&5
12592 echo "$as_me: failed program was:" >&5
12593 cat conftest.$ac_ext >&5
12594 ac_cv_header_stdc=no
12596 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12600 echo "$as_me:12600: result: $ac_cv_header_stdc" >&5
12601 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12602 if test $ac_cv_header_stdc = yes; then
12604 cat >>confdefs.h <<\EOF
12605 #define STDC_HEADERS 1
12610 ac_header_dirent=no
12611 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12612 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12613 echo "$as_me:12613: checking for $ac_hdr that defines DIR" >&5
12614 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12615 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12616 echo $ECHO_N "(cached) $ECHO_C" >&6
12618 cat >conftest.$ac_ext <<_ACEOF
12619 #line 12619 "configure"
12620 #include "confdefs.h"
12621 #include <sys/types.h>
12633 rm -f conftest.$ac_objext
12634 if { (eval echo "$as_me:12634: \"$ac_compile\"") >&5
12635 (eval $ac_compile) 2>&5
12637 echo "$as_me:12637: \$? = $ac_status" >&5
12638 (exit $ac_status); } &&
12639 { ac_try='test -s conftest.$ac_objext'
12640 { (eval echo "$as_me:12640: \"$ac_try\"") >&5
12641 (eval $ac_try) 2>&5
12643 echo "$as_me:12643: \$? = $ac_status" >&5
12644 (exit $ac_status); }; }; then
12645 eval "$as_ac_Header=yes"
12647 echo "$as_me: failed program was:" >&5
12648 cat conftest.$ac_ext >&5
12649 eval "$as_ac_Header=no"
12651 rm -f conftest.$ac_objext conftest.$ac_ext
12653 echo "$as_me:12653: result: `eval echo '${'$as_ac_Header'}'`" >&5
12654 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12655 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12656 cat >>confdefs.h <<EOF
12657 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
12660 ac_header_dirent=$ac_hdr; break
12664 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12665 if test $ac_header_dirent = dirent.h; then
12666 echo "$as_me:12666: checking for opendir in -ldir" >&5
12667 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
12668 if test "${ac_cv_lib_dir_opendir+set}" = set; then
12669 echo $ECHO_N "(cached) $ECHO_C" >&6
12671 ac_check_lib_save_LIBS=$LIBS
12673 cat >conftest.$ac_ext <<_ACEOF
12674 #line 12674 "configure"
12675 #include "confdefs.h"
12677 /* Override any gcc2 internal prototype to avoid an error. */
12681 /* We use char because int might match the return type of a gcc2
12682 builtin and then its argument prototype would still apply. */
12692 rm -f conftest.$ac_objext conftest$ac_exeext
12693 if { (eval echo "$as_me:12693: \"$ac_link\"") >&5
12694 (eval $ac_link) 2>&5
12696 echo "$as_me:12696: \$? = $ac_status" >&5
12697 (exit $ac_status); } &&
12698 { ac_try='test -s conftest$ac_exeext'
12699 { (eval echo "$as_me:12699: \"$ac_try\"") >&5
12700 (eval $ac_try) 2>&5
12702 echo "$as_me:12702: \$? = $ac_status" >&5
12703 (exit $ac_status); }; }; then
12704 ac_cv_lib_dir_opendir=yes
12706 echo "$as_me: failed program was:" >&5
12707 cat conftest.$ac_ext >&5
12708 ac_cv_lib_dir_opendir=no
12710 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12711 LIBS=$ac_check_lib_save_LIBS
12713 echo "$as_me:12713: result: $ac_cv_lib_dir_opendir" >&5
12714 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
12715 if test $ac_cv_lib_dir_opendir = yes; then
12720 echo "$as_me:12720: checking for opendir in -lx" >&5
12721 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
12722 if test "${ac_cv_lib_x_opendir+set}" = set; then
12723 echo $ECHO_N "(cached) $ECHO_C" >&6
12725 ac_check_lib_save_LIBS=$LIBS
12727 cat >conftest.$ac_ext <<_ACEOF
12728 #line 12728 "configure"
12729 #include "confdefs.h"
12731 /* Override any gcc2 internal prototype to avoid an error. */
12735 /* We use char because int might match the return type of a gcc2
12736 builtin and then its argument prototype would still apply. */
12746 rm -f conftest.$ac_objext conftest$ac_exeext
12747 if { (eval echo "$as_me:12747: \"$ac_link\"") >&5
12748 (eval $ac_link) 2>&5
12750 echo "$as_me:12750: \$? = $ac_status" >&5
12751 (exit $ac_status); } &&
12752 { ac_try='test -s conftest$ac_exeext'
12753 { (eval echo "$as_me:12753: \"$ac_try\"") >&5
12754 (eval $ac_try) 2>&5
12756 echo "$as_me:12756: \$? = $ac_status" >&5
12757 (exit $ac_status); }; }; then
12758 ac_cv_lib_x_opendir=yes
12760 echo "$as_me: failed program was:" >&5
12761 cat conftest.$ac_ext >&5
12762 ac_cv_lib_x_opendir=no
12764 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12765 LIBS=$ac_check_lib_save_LIBS
12767 echo "$as_me:12767: result: $ac_cv_lib_x_opendir" >&5
12768 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
12769 if test $ac_cv_lib_x_opendir = yes; then
12775 echo "$as_me:12775: checking whether time.h and sys/time.h may both be included" >&5
12776 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12777 if test "${ac_cv_header_time+set}" = set; then
12778 echo $ECHO_N "(cached) $ECHO_C" >&6
12780 cat >conftest.$ac_ext <<_ACEOF
12781 #line 12781 "configure"
12782 #include "confdefs.h"
12783 #include <sys/types.h>
12784 #include <sys/time.h>
12790 if ((struct tm *) 0)
12796 rm -f conftest.$ac_objext
12797 if { (eval echo "$as_me:12797: \"$ac_compile\"") >&5
12798 (eval $ac_compile) 2>&5
12800 echo "$as_me:12800: \$? = $ac_status" >&5
12801 (exit $ac_status); } &&
12802 { ac_try='test -s conftest.$ac_objext'
12803 { (eval echo "$as_me:12803: \"$ac_try\"") >&5
12804 (eval $ac_try) 2>&5
12806 echo "$as_me:12806: \$? = $ac_status" >&5
12807 (exit $ac_status); }; }; then
12808 ac_cv_header_time=yes
12810 echo "$as_me: failed program was:" >&5
12811 cat conftest.$ac_ext >&5
12812 ac_cv_header_time=no
12814 rm -f conftest.$ac_objext conftest.$ac_ext
12816 echo "$as_me:12816: result: $ac_cv_header_time" >&5
12817 echo "${ECHO_T}$ac_cv_header_time" >&6
12818 if test $ac_cv_header_time = yes; then
12820 cat >>confdefs.h <<\EOF
12821 #define TIME_WITH_SYS_TIME 1
12826 ### checks for compiler characteristics
12828 ac_cpp='$CPP $CPPFLAGS'
12829 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12830 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12831 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12832 ac_main_return=return
12834 echo "$as_me:12834: checking for an ANSI C-conforming const" >&5
12835 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
12836 if test "${ac_cv_c_const+set}" = set; then
12837 echo $ECHO_N "(cached) $ECHO_C" >&6
12839 cat >conftest.$ac_ext <<_ACEOF
12840 #line 12840 "configure"
12841 #include "confdefs.h"
12846 /* FIXME: Include the comments suggested by Paul. */
12847 #ifndef __cplusplus
12848 /* Ultrix mips cc rejects this. */
12849 typedef int charset[2];
12851 /* SunOS 4.1.1 cc rejects this. */
12852 char const *const *ccp;
12854 /* NEC SVR4.0.2 mips cc rejects this. */
12855 struct point {int x, y;};
12856 static struct point const zero = {0,0};
12857 /* AIX XL C 1.02.0.0 rejects this.
12858 It does not let you subtract one const X* pointer from another in
12859 an arm of an if-expression whose if-part is not a constant
12861 const char *g = "string";
12862 ccp = &g + (g ? g-g : 0);
12863 /* HPUX 7.0 cc rejects these. */
12866 ccp = (char const *const *) p;
12867 { /* SCO 3.2v4 cc rejects this. */
12869 char const *s = 0 ? (char *) 0 : (char const *) 0;
12873 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12874 int x[] = {25, 17};
12875 const int *foo = &x[0];
12878 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12879 typedef const int *iptr;
12883 { /* AIX XL C 1.02.0.0 rejects this saying
12884 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12885 struct s { int j; const int *ap[3]; };
12886 struct s *b; b->j = 5;
12888 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12889 const int foo = 10;
12897 rm -f conftest.$ac_objext
12898 if { (eval echo "$as_me:12898: \"$ac_compile\"") >&5
12899 (eval $ac_compile) 2>&5
12901 echo "$as_me:12901: \$? = $ac_status" >&5
12902 (exit $ac_status); } &&
12903 { ac_try='test -s conftest.$ac_objext'
12904 { (eval echo "$as_me:12904: \"$ac_try\"") >&5
12905 (eval $ac_try) 2>&5
12907 echo "$as_me:12907: \$? = $ac_status" >&5
12908 (exit $ac_status); }; }; then
12911 echo "$as_me: failed program was:" >&5
12912 cat conftest.$ac_ext >&5
12915 rm -f conftest.$ac_objext conftest.$ac_ext
12917 echo "$as_me:12917: result: $ac_cv_c_const" >&5
12918 echo "${ECHO_T}$ac_cv_c_const" >&6
12919 if test $ac_cv_c_const = no; then
12921 cat >>confdefs.h <<\EOF
12927 ### Checks for external-data
12929 echo "$as_me:12929: checking if data-only library module links" >&5
12930 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
12931 if test "${cf_cv_link_dataonly+set}" = set; then
12932 echo $ECHO_N "(cached) $ECHO_C" >&6
12936 cat >conftest.$ac_ext <<EOF
12937 #line 12937 "configure"
12938 int testdata[3] = { 123, 456, 789 };
12940 if { (eval echo "$as_me:12940: \"$ac_compile\"") >&5
12941 (eval $ac_compile) 2>&5
12943 echo "$as_me:12943: \$? = $ac_status" >&5
12944 (exit $ac_status); } ; then
12945 mv conftest.o data.o && \
12946 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
12948 rm -f conftest.$ac_ext data.o
12949 cat >conftest.$ac_ext <<EOF
12950 #line 12950 "configure"
12954 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
12956 extern int testdata[3];
12957 return testdata[0] == 123
12958 && testdata[1] == 456
12959 && testdata[2] == 789;
12963 if { (eval echo "$as_me:12963: \"$ac_compile\"") >&5
12964 (eval $ac_compile) 2>&5
12966 echo "$as_me:12966: \$? = $ac_status" >&5
12967 (exit $ac_status); }; then
12968 mv conftest.o func.o && \
12969 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
12971 rm -f conftest.$ac_ext func.o
12972 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
12973 cf_saveLIBS="$LIBS"
12974 LIBS="conftest.a $LIBS"
12975 if test "$cross_compiling" = yes; then
12976 cf_cv_link_dataonly=unknown
12978 cat >conftest.$ac_ext <<_ACEOF
12979 #line 12979 "configure"
12980 #include "confdefs.h"
12984 extern int testfunc();
12985 ${cf_cv_main_return:-return} (!testfunc());
12989 rm -f conftest$ac_exeext
12990 if { (eval echo "$as_me:12990: \"$ac_link\"") >&5
12991 (eval $ac_link) 2>&5
12993 echo "$as_me:12993: \$? = $ac_status" >&5
12994 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12995 { (eval echo "$as_me:12995: \"$ac_try\"") >&5
12996 (eval $ac_try) 2>&5
12998 echo "$as_me:12998: \$? = $ac_status" >&5
12999 (exit $ac_status); }; }; then
13000 cf_cv_link_dataonly=yes
13002 echo "$as_me: program exited with status $ac_status" >&5
13003 echo "$as_me: failed program was:" >&5
13004 cat conftest.$ac_ext >&5
13005 cf_cv_link_dataonly=no
13007 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13009 LIBS="$cf_saveLIBS"
13013 echo "$as_me:13013: result: $cf_cv_link_dataonly" >&5
13014 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
13016 if test "$cf_cv_link_dataonly" = no ; then
13018 cat >>confdefs.h <<\EOF
13019 #define BROKEN_LINKER 1
13025 ### Checks for library functions.
13027 echo "$as_me:13027: checking for working mkstemp" >&5
13028 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
13029 if test "${cf_cv_func_mkstemp+set}" = set; then
13030 echo $ECHO_N "(cached) $ECHO_C" >&6
13034 if test "$cross_compiling" = yes; then
13035 cf_cv_func_mkstemp=maybe
13037 cat >conftest.$ac_ext <<_ACEOF
13038 #line 13038 "configure"
13039 #include "confdefs.h"
13041 #include <sys/types.h>
13042 #include <stdlib.h>
13044 #include <string.h>
13045 #include <sys/stat.h>
13048 char *tmpl = "conftestXXXXXX";
13056 for (n = 0; n < 2; ++n) {
13057 strcpy(name[n], tmpl);
13058 if ((fd = mkstemp(name[n])) >= 0) {
13059 if (!strcmp(name[n], tmpl)
13060 || stat(name[n], &sb) != 0
13061 || (sb.st_mode & S_IFMT) != S_IFREG
13062 || (sb.st_mode & 077) != 0) {
13069 && !strcmp(name[0], name[1]))
13071 ${cf_cv_main_return:-return}(result);
13075 rm -f conftest$ac_exeext
13076 if { (eval echo "$as_me:13076: \"$ac_link\"") >&5
13077 (eval $ac_link) 2>&5
13079 echo "$as_me:13079: \$? = $ac_status" >&5
13080 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13081 { (eval echo "$as_me:13081: \"$ac_try\"") >&5
13082 (eval $ac_try) 2>&5
13084 echo "$as_me:13084: \$? = $ac_status" >&5
13085 (exit $ac_status); }; }; then
13086 cf_cv_func_mkstemp=yes
13089 echo "$as_me: program exited with status $ac_status" >&5
13090 echo "$as_me: failed program was:" >&5
13091 cat conftest.$ac_ext >&5
13092 cf_cv_func_mkstemp=no
13095 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13099 echo "$as_me:13099: result: $cf_cv_func_mkstemp" >&5
13100 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
13101 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
13102 echo "$as_me:13102: checking for mkstemp" >&5
13103 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
13104 if test "${ac_cv_func_mkstemp+set}" = set; then
13105 echo $ECHO_N "(cached) $ECHO_C" >&6
13107 cat >conftest.$ac_ext <<_ACEOF
13108 #line 13108 "configure"
13109 #include "confdefs.h"
13110 /* System header to define __stub macros and hopefully few prototypes,
13111 which can conflict with char mkstemp (); below. */
13112 #include <assert.h>
13113 /* Override any gcc2 internal prototype to avoid an error. */
13117 /* We use char because int might match the return type of a gcc2
13118 builtin and then its argument prototype would still apply. */
13125 /* The GNU C library defines this for functions which it implements
13126 to always fail with ENOSYS. Some functions are actually named
13127 something starting with __ and the normal name is an alias. */
13128 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
13131 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13138 rm -f conftest.$ac_objext conftest$ac_exeext
13139 if { (eval echo "$as_me:13139: \"$ac_link\"") >&5
13140 (eval $ac_link) 2>&5
13142 echo "$as_me:13142: \$? = $ac_status" >&5
13143 (exit $ac_status); } &&
13144 { ac_try='test -s conftest$ac_exeext'
13145 { (eval echo "$as_me:13145: \"$ac_try\"") >&5
13146 (eval $ac_try) 2>&5
13148 echo "$as_me:13148: \$? = $ac_status" >&5
13149 (exit $ac_status); }; }; then
13150 ac_cv_func_mkstemp=yes
13152 echo "$as_me: failed program was:" >&5
13153 cat conftest.$ac_ext >&5
13154 ac_cv_func_mkstemp=no
13156 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13158 echo "$as_me:13158: result: $ac_cv_func_mkstemp" >&5
13159 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
13162 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
13164 cat >>confdefs.h <<\EOF
13165 #define HAVE_MKSTEMP 1
13170 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
13171 CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13172 CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13176 if test "$cf_with_ada" != "no" ; then
13178 cf_ada_make=gnatmake
13179 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
13180 set dummy $cf_ada_make; ac_word=$2
13181 echo "$as_me:13181: checking for $ac_word" >&5
13182 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13183 if test "${ac_cv_prog_gnat_exists+set}" = set; then
13184 echo $ECHO_N "(cached) $ECHO_C" >&6
13186 if test -n "$gnat_exists"; then
13187 ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
13189 ac_save_IFS=$IFS; IFS=$ac_path_separator
13191 for ac_dir in $ac_dummy; do
13193 test -z "$ac_dir" && ac_dir=.
13194 $as_executable_p "$ac_dir/$ac_word" || continue
13195 ac_cv_prog_gnat_exists="yes"
13196 echo "$as_me:13196: found $ac_dir/$ac_word" >&5
13200 test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
13203 gnat_exists=$ac_cv_prog_gnat_exists
13204 if test -n "$gnat_exists"; then
13205 echo "$as_me:13205: result: $gnat_exists" >&5
13206 echo "${ECHO_T}$gnat_exists" >&6
13208 echo "$as_me:13208: result: no" >&5
13209 echo "${ECHO_T}no" >&6
13212 if test "$ac_cv_prog_gnat_exists" = no; then
13214 cf_cv_prog_gnat_correct=no
13217 echo "$as_me:13217: checking for gnat version" >&5
13218 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
13219 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
13220 grep '[0-9].[0-9][0-9]*' |\
13221 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
13222 echo "$as_me:13222: result: $cf_gnat_version" >&5
13223 echo "${ECHO_T}$cf_gnat_version" >&6
13225 case $cf_gnat_version in
13226 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
13227 cf_cv_prog_gnat_correct=yes
13230 { echo "$as_me:13230: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
13231 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
13232 cf_cv_prog_gnat_correct=no
13236 # Extract the first word of "m4", so it can be a program name with args.
13237 set dummy m4; ac_word=$2
13238 echo "$as_me:13238: checking for $ac_word" >&5
13239 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13240 if test "${ac_cv_prog_M4_exists+set}" = set; then
13241 echo $ECHO_N "(cached) $ECHO_C" >&6
13243 if test -n "$M4_exists"; then
13244 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
13246 ac_save_IFS=$IFS; IFS=$ac_path_separator
13248 for ac_dir in $ac_dummy; do
13250 test -z "$ac_dir" && ac_dir=.
13251 $as_executable_p "$ac_dir/$ac_word" || continue
13252 ac_cv_prog_M4_exists="yes"
13253 echo "$as_me:13253: found $ac_dir/$ac_word" >&5
13257 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
13260 M4_exists=$ac_cv_prog_M4_exists
13261 if test -n "$M4_exists"; then
13262 echo "$as_me:13262: result: $M4_exists" >&5
13263 echo "${ECHO_T}$M4_exists" >&6
13265 echo "$as_me:13265: result: no" >&5
13266 echo "${ECHO_T}no" >&6
13269 if test "$ac_cv_prog_M4_exists" = no; then
13270 cf_cv_prog_gnat_correct=no
13271 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
13273 if test "$cf_cv_prog_gnat_correct" = yes; then
13274 echo "$as_me:13274: checking if GNAT works" >&5
13275 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
13277 rm -rf conftest* *~conftest*
13278 cat >>conftest.ads <<CF_EOF
13279 procedure conftest;
13281 cat >>conftest.adb <<CF_EOF
13284 procedure conftest is
13286 Text_IO.Put ("Hello World");
13288 GNAT.OS_Lib.OS_Exit (0);
13291 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
13292 if ( ./conftest 1>&5 2>&1 ) ; then
13293 cf_cv_prog_gnat_correct=yes
13295 cf_cv_prog_gnat_correct=no
13298 cf_cv_prog_gnat_correct=no
13300 rm -rf conftest* *~conftest*
13302 echo "$as_me:13302: result: $cf_cv_prog_gnat_correct" >&5
13303 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
13307 if test "$cf_cv_prog_gnat_correct" = yes; then
13309 echo "$as_me:13309: checking optimization options for ADAFLAGS" >&5
13310 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
13314 ADAFLAGS="$ADAFLAGS -g"
13320 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
13322 ADAFLAGS="$ADAFLAGS $cf_O_flag"
13326 echo "$as_me:13326: result: $ADAFLAGS" >&5
13327 echo "${ECHO_T}$ADAFLAGS" >&6
13329 echo "$as_me:13329: checking if GNATPREP supports -T option" >&5
13330 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
13331 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
13332 echo $ECHO_N "(cached) $ECHO_C" >&6
13335 cf_cv_gnatprep_opt_t=no
13336 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
13339 echo "$as_me:13339: result: $cf_cv_gnatprep_opt_t" >&5
13340 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
13341 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
13343 echo "$as_me:13343: checking if GNAT supports generics" >&5
13344 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
13345 case $cf_gnat_version in
13347 cf_gnat_generics=yes
13350 cf_gnat_generics=no
13353 echo "$as_me:13353: result: $cf_gnat_generics" >&5
13354 echo "${ECHO_T}$cf_gnat_generics" >&6
13356 if test "$cf_gnat_generics" = yes
13358 cf_compile_generics=generics
13359 cf_generic_objects="\${GENOBJS}"
13361 cf_compile_generics=
13362 cf_generic_objects=
13365 echo "$as_me:13365: checking if GNAT supports SIGINT" >&5
13366 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
13367 if test "${cf_cv_gnat_sigint+set}" = set; then
13368 echo $ECHO_N "(cached) $ECHO_C" >&6
13371 rm -rf conftest* *~conftest*
13372 cat >>conftest.ads <<CF_EOF
13373 with Ada.Interrupts.Names;
13375 package ConfTest is
13377 pragma Warnings (Off); -- the next pragma exists since 3.11p
13378 pragma Unreserve_All_Interrupts;
13379 pragma Warnings (On);
13381 protected Process is
13383 function Continue return Boolean;
13384 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
13386 Done : Boolean := False;
13391 cat >>conftest.adb <<CF_EOF
13392 package body ConfTest is
13393 protected body Process is
13398 function Continue return Boolean is
13405 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
13406 cf_cv_gnat_sigint=yes
13408 cf_cv_gnat_sigint=no
13410 rm -rf conftest* *~conftest*
13413 echo "$as_me:13413: result: $cf_cv_gnat_sigint" >&5
13414 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
13416 if test $cf_cv_gnat_sigint = yes ; then
13419 USE_GNAT_SIGINT="#"
13422 cf_gnat_libraries=no
13423 cf_gnat_projects=no
13425 if test "$enable_gnat_projects" != no ; then
13426 echo "$as_me:13426: checking if GNAT supports project files" >&5
13427 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
13428 case $cf_gnat_version in
13432 case $cf_cv_system_name in
13436 mkdir conftest.src conftest.bin conftest.lib
13438 rm -rf conftest* *~conftest*
13439 cat >>library.gpr <<CF_EOF
13441 Kind := External ("LIB_KIND");
13442 for Library_Name use "ConfTest";
13443 for Object_Dir use ".";
13444 for Library_ALI_Dir use External("LIBRARY_DIR");
13445 for Library_Version use External ("SONAME");
13446 for Library_Kind use Kind;
13447 for Library_Dir use External("BUILD_DIR");
13448 Source_Dir := External ("SOURCE_DIR");
13449 for Source_Dirs use (Source_Dir);
13452 cat >>confpackage.ads <<CF_EOF
13453 package ConfPackage is
13454 procedure conftest;
13457 cat >>confpackage.adb <<CF_EOF
13459 package body ConfPackage is
13460 procedure conftest is
13462 Text_IO.Put ("Hello World");
13467 if ( $cf_ada_make $ADAFLAGS \
13469 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
13470 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
13471 -XSOURCE_DIR=`pwd` \
13472 -XSONAME=libConfTest.so.1 \
13473 -XLIB_KIND=static 1>&5 2>&1 ) ; then
13474 cf_gnat_projects=yes
13477 if test -f conftest.lib/confpackage.ali
13479 cf_gnat_libraries=yes
13481 rm -rf conftest* *~conftest*
13486 echo "$as_me:13486: result: $cf_gnat_projects" >&5
13487 echo "${ECHO_T}$cf_gnat_projects" >&6
13488 fi # enable_gnat_projects
13490 if test $cf_gnat_projects = yes
13492 echo "$as_me:13492: checking if GNAT supports libraries" >&5
13493 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
13494 echo "$as_me:13494: result: $cf_gnat_libraries" >&5
13495 echo "${ECHO_T}$cf_gnat_libraries" >&6
13498 if test "$cf_gnat_projects" = yes
13500 USE_OLD_MAKERULES="#"
13501 USE_GNAT_PROJECTS=""
13503 USE_OLD_MAKERULES=""
13504 USE_GNAT_PROJECTS="#"
13507 if test "$cf_gnat_libraries" = yes
13509 USE_GNAT_LIBRARIES=""
13511 USE_GNAT_LIBRARIES="#"
13514 echo "$as_me:13514: checking for ada-compiler" >&5
13515 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
13517 # Check whether --with-ada-compiler or --without-ada-compiler was given.
13518 if test "${with_ada_compiler+set}" = set; then
13519 withval="$with_ada_compiler"
13520 cf_ada_compiler=$withval
13522 cf_ada_compiler=gnatmake
13525 echo "$as_me:13525: result: $cf_ada_compiler" >&5
13526 echo "${ECHO_T}$cf_ada_compiler" >&6
13528 cf_ada_package=terminal_interface
13530 echo "$as_me:13530: checking for ada-include" >&5
13531 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
13533 # Check whether --with-ada-include or --without-ada-include was given.
13534 if test "${with_ada_include+set}" = set; then
13535 withval="$with_ada_include"
13538 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
13539 fi; if test -n "$prefix/share/ada/adainclude" ; then
13541 if test "x$prefix" != xNONE; then
13542 cf_path_syntax="$prefix"
13544 cf_path_syntax="$ac_default_prefix"
13547 case ".$withval" in
13548 (.\$\(*\)*|.\'*\'*)
13552 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13554 (.\${*prefix}*|.\${*dir}*)
13555 eval withval="$withval"
13556 case ".$withval" in
13558 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
13563 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
13566 { { echo "$as_me:13566: error: expected a pathname, not \"$withval\"" >&5
13567 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
13568 { (exit 1); exit 1; }; }
13573 eval ADA_INCLUDE="$withval"
13575 echo "$as_me:13575: result: $ADA_INCLUDE" >&5
13576 echo "${ECHO_T}$ADA_INCLUDE" >&6
13578 echo "$as_me:13578: checking for ada-objects" >&5
13579 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
13581 # Check whether --with-ada-objects or --without-ada-objects was given.
13582 if test "${with_ada_objects+set}" = set; then
13583 withval="$with_ada_objects"
13586 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
13587 fi; if test -n "$prefix/lib/ada/adalib" ; then
13589 if test "x$prefix" != xNONE; then
13590 cf_path_syntax="$prefix"
13592 cf_path_syntax="$ac_default_prefix"
13595 case ".$withval" in
13596 (.\$\(*\)*|.\'*\'*)
13600 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13602 (.\${*prefix}*|.\${*dir}*)
13603 eval withval="$withval"
13604 case ".$withval" in
13606 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
13611 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
13614 { { echo "$as_me:13614: error: expected a pathname, not \"$withval\"" >&5
13615 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
13616 { (exit 1); exit 1; }; }
13621 eval ADA_OBJECTS="$withval"
13623 echo "$as_me:13623: result: $ADA_OBJECTS" >&5
13624 echo "${ECHO_T}$ADA_OBJECTS" >&6
13626 echo "$as_me:13626: checking if an Ada95 shared-library should be built" >&5
13627 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
13629 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
13630 if test "${with_ada_sharedlib+set}" = set; then
13631 withval="$with_ada_sharedlib"
13632 with_ada_sharedlib=$withval
13634 with_ada_sharedlib=no
13636 echo "$as_me:13636: result: $with_ada_sharedlib" >&5
13637 echo "${ECHO_T}$with_ada_sharedlib" >&6
13639 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
13640 MAKE_ADA_SHAREDLIB="#"
13642 if test "x$with_ada_sharedlib" != xno
13644 MAKE_ADA_SHAREDLIB=
13645 if test "x$with_ada_sharedlib" != xyes
13647 ADA_SHAREDLIB="$with_ada_sharedlib"
13652 { { echo "$as_me:13652: error: No usable Ada compiler found" >&5
13653 echo "$as_me: error: No usable Ada compiler found" >&2;}
13654 { (exit 1); exit 1; }; }
13657 { { echo "$as_me:13657: error: The Ada compiler is needed for this package" >&5
13658 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
13659 { (exit 1); exit 1; }; }
13662 ################################################################################
13669 ### Construct the list of include-directories to be generated
13671 if test "$srcdir" != "."; then
13672 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
13674 CPPFLAGS="-I../include $CPPFLAGS"
13675 if test "$srcdir" != "."; then
13676 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
13678 CPPFLAGS="-I. $CPPFLAGS"
13680 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
13681 if test "$srcdir" != "."; then
13682 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
13684 if test "$GCC" != yes; then
13685 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
13686 elif test "$includedir" != "/usr/include"; then
13687 if test "$includedir" = '${prefix}/include' ; then
13688 if test x$prefix != x/usr ; then
13689 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
13692 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
13696 ### Build up pieces for makefile rules
13697 echo "$as_me:13697: checking default library suffix" >&5
13698 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
13700 case $DFT_LWR_MODEL in
13701 (libtool) DFT_ARG_SUFFIX='' ;;
13702 (normal) DFT_ARG_SUFFIX='' ;;
13703 (debug) DFT_ARG_SUFFIX='_g' ;;
13704 (profile) DFT_ARG_SUFFIX='_p' ;;
13705 (shared) DFT_ARG_SUFFIX='' ;;
13707 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
13708 echo "$as_me:13708: result: $DFT_ARG_SUFFIX" >&5
13709 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
13711 echo "$as_me:13711: checking default library-dependency suffix" >&5
13712 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
13714 case X$DFT_LWR_MODEL in
13716 DFT_LIB_SUFFIX='.la'
13717 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13720 DFT_LIB_SUFFIX='_g.a'
13721 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13724 DFT_LIB_SUFFIX='_p.a'
13725 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13728 case $cf_cv_system_name in
13730 DFT_LIB_SUFFIX='.so'
13731 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13733 (cygwin*|msys*|mingw*)
13734 DFT_LIB_SUFFIX='.dll'
13735 DFT_DEP_SUFFIX='.dll.a'
13738 DFT_LIB_SUFFIX='.dylib'
13739 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13744 DFT_LIB_SUFFIX='.so'
13745 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13748 DFT_LIB_SUFFIX='.sl'
13749 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13754 DFT_LIB_SUFFIX='.so'
13755 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13760 DFT_LIB_SUFFIX='.a'
13761 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13764 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
13766 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
13767 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
13769 echo "$as_me:13769: result: $DFT_DEP_SUFFIX" >&5
13770 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
13772 echo "$as_me:13772: checking default object directory" >&5
13773 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
13775 case $DFT_LWR_MODEL in
13776 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
13777 (normal) DFT_OBJ_SUBDIR='objects' ;;
13778 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
13779 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
13781 case $cf_cv_system_name in
13783 DFT_OBJ_SUBDIR='objects' ;;
13785 DFT_OBJ_SUBDIR='obj_s' ;;
13788 echo "$as_me:13788: result: $DFT_OBJ_SUBDIR" >&5
13789 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
13791 ### Set up low-level terminfo dependencies for makefiles.
13793 if test "$DFT_LWR_MODEL" = shared ; then
13794 case $cf_cv_system_name in
13796 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
13799 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
13804 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
13806 ### Construct the list of subdirectories for which we'll customize makefiles
13807 ### with the appropriate compile-rules.
13809 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
13811 cat >>confdefs.h <<EOF
13812 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
13815 ### Now that we're done running tests, add the compiler-warnings, if any
13820 cf_new_extra_cppflags=
13822 for cf_add_cflags in $EXTRA_CFLAGS
13824 case $cf_fix_cppflags in
13826 case $cf_add_cflags in
13827 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13828 case $cf_add_cflags in
13830 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13832 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13833 && test -z "${cf_tst_cflags}" \
13834 && cf_fix_cppflags=yes
13836 if test $cf_fix_cppflags = yes ; then
13837 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13839 elif test "${cf_tst_cflags}" = "\"'" ; then
13840 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13845 case "$CPPFLAGS" in
13849 case $cf_add_cflags in
13851 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13853 CPPFLAGS=`echo "$CPPFLAGS" | \
13854 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13855 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13859 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13864 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13869 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13871 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13873 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13874 && test -z "${cf_tst_cflags}" \
13875 && cf_fix_cppflags=no
13880 if test -n "$cf_new_cflags" ; then
13882 CFLAGS="$CFLAGS $cf_new_cflags"
13885 if test -n "$cf_new_cppflags" ; then
13887 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13890 if test -n "$cf_new_extra_cppflags" ; then
13892 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13895 ################################################################################
13901 NCURSES_SHLIB2="sh -c"
13903 ADA_SUBDIRS="include gen src doc"
13904 if test "x$cf_with_tests" != "xno" ; then
13905 ADA_SUBDIRS="$ADA_SUBDIRS samples"
13907 for cf_dir in $ADA_SUBDIRS
13909 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
13916 # match layout used by make-tar.sh
13917 ADAHTML_DIR=../doc/ada
13919 ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
13920 ac_config_commands="$ac_config_commands default"
13921 cat >confcache <<\_ACEOF
13922 # This file is a shell script that caches the results of configure
13923 # tests run on this system so they can be shared between configure
13924 # scripts and configure runs, see configure's option --config-cache.
13925 # It is not useful on other systems. If it contains results you don't
13926 # want to keep, you may remove or edit it.
13928 # config.status only pays attention to the cache file if you give it
13929 # the --recheck option to rerun configure.
13931 # `ac_cv_env_foo' variables (set or unset) will be overriden when
13932 # loading this file, other *unset* `ac_cv_foo' will be assigned the
13933 # following values.
13937 # The following way of writing the cache mishandles newlines in values,
13938 # but we know of no workaround that is simple, portable, and efficient.
13939 # So, don't put newlines in cache variables' values.
13940 # Ultrix sh set writes to stderr and can't be redirected directly,
13941 # and sets the high bit in the cache file unless we assign to the vars.
13944 case `(ac_space=' '; set | grep ac_space) 2>&1` in
13946 # `set' does not quote correctly, so add quotes (double-quote
13947 # substitution turns \\\\ into \\, and sed turns \\ into \).
13950 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
13953 # `set' quotes correctly as required by POSIX, so do not add quotes.
13955 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
13962 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13964 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13966 if cmp -s $cache_file confcache; then :; else
13967 if test -w $cache_file; then
13968 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
13969 cat confcache >$cache_file
13971 echo "not updating unwritable cache $cache_file"
13976 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13977 # Let make expand exec_prefix.
13978 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13980 # VPATH may cause trouble with some makes, so we remove $(srcdir),
13981 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
13982 # trailing colons and then remove the whole line if VPATH becomes empty
13983 # (actually we leave an empty line to preserve line numbers).
13984 if test "x$srcdir" = x.; then
13985 ac_vpsub='/^[ ]*VPATH[ ]*=/{
13986 s/:*\$(srcdir):*/:/;
13987 s/:*\${srcdir}:*/:/;
13989 s/^\([^=]*=[ ]*\):*/\1/;
13995 DEFS=-DHAVE_CONFIG_H
13997 : ${CONFIG_STATUS=./config.status}
13998 ac_clean_files_save=$ac_clean_files
13999 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14000 { echo "$as_me:14000: creating $CONFIG_STATUS" >&5
14001 echo "$as_me: creating $CONFIG_STATUS" >&6;}
14002 cat >$CONFIG_STATUS <<_ACEOF
14004 # Generated automatically by configure.
14005 # Run this file to recreate the current configuration.
14006 # Compiler output produced by configure, useful for debugging
14007 # configure, is in config.log if it exists.
14010 SHELL=\${CONFIG_SHELL-$SHELL}
14011 ac_cs_invocation="\$0 \$@"
14015 cat >>$CONFIG_STATUS <<\_ACEOF
14016 # Be Bourne compatible
14017 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14020 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
14024 # Name of the executable.
14025 as_me=`echo "$0" |sed 's,.*[\\/],,'`
14027 if expr a : '\(a\)' >/dev/null 2>&1; then
14033 rm -f conf$$ conf$$.exe conf$$.file
14035 if ln -s conf$$.file conf$$ 2>/dev/null; then
14036 # We could just check for DJGPP; but this test a) works b) is more generic
14037 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
14038 if test -f conf$$.exe; then
14039 # Don't use ln at all; we don't have any links
14044 elif ln conf$$.file conf$$ 2>/dev/null; then
14049 rm -f conf$$ conf$$.exe conf$$.file
14051 as_executable_p="test -f"
14053 # Support unset when possible.
14054 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
14061 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
14062 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
14063 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
14064 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
14065 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
14066 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
14067 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
14068 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
14071 # We need space, tab and new line, in precisely that order.
14077 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
14083 # Files that config.status was made for.
14084 if test -n "$ac_config_files"; then
14085 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
14088 if test -n "$ac_config_headers"; then
14089 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
14092 if test -n "$ac_config_links"; then
14093 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
14096 if test -n "$ac_config_commands"; then
14097 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
14100 cat >>$CONFIG_STATUS <<\EOF
14103 \`$as_me' instantiates files from templates according to the
14104 current configuration.
14106 Usage: $0 [OPTIONS] [FILE]...
14108 -h, --help print this help, then exit
14109 -V, --version print version number, then exit
14110 -d, --debug don't remove temporary files
14111 --recheck update $as_me by reconfiguring in the same conditions
14112 --file=FILE[:TEMPLATE]
14113 instantiate the configuration file FILE
14114 --header=FILE[:TEMPLATE]
14115 instantiate the configuration header FILE
14117 Configuration files:
14120 Configuration headers:
14123 Configuration commands:
14126 Report bugs to <dickey@invisible-island.net>."
14129 cat >>$CONFIG_STATUS <<EOF
14132 configured by $0, generated by GNU Autoconf 2.52.20141204,
14133 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
14135 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
14136 Free Software Foundation, Inc.
14137 This config.status script is free software; the Free Software Foundation
14138 gives unlimited permission to copy, distribute and modify it."
14143 cat >>$CONFIG_STATUS <<\EOF
14144 # If no file are specified by the user, then we need to provide default
14145 # value. By we need to know if files were specified by the user.
14151 ac_option=`expr "x$1" : 'x\([^=]*\)='`
14152 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
14154 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
14158 *) # This is not an option, so the user has probably given explicit
14160 ac_need_defaults=false;;
14164 # Handling of the options.
14166 cat >>$CONFIG_STATUS <<EOF
14167 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14168 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
14169 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
14171 cat >>$CONFIG_STATUS <<\EOF
14172 --version | --vers* | -V )
14173 echo "$ac_cs_version"; exit 0 ;;
14175 # Conflict between --help and --header
14176 { { echo "$as_me:14176: error: ambiguous option: $1
14177 Try \`$0 --help' for more information." >&5
14178 echo "$as_me: error: ambiguous option: $1
14179 Try \`$0 --help' for more information." >&2;}
14180 { (exit 1); exit 1; }; };;
14181 --help | --hel | -h )
14182 echo "$ac_cs_usage"; exit 0 ;;
14183 --debug | --d* | -d )
14185 --file | --fil | --fi | --f )
14187 CONFIG_FILES="$CONFIG_FILES $1"
14188 ac_need_defaults=false;;
14189 --header | --heade | --head | --hea )
14191 CONFIG_HEADERS="$CONFIG_HEADERS $1"
14192 ac_need_defaults=false;;
14194 # This is an error.
14195 -*) { { echo "$as_me:14195: error: unrecognized option: $1
14196 Try \`$0 --help' for more information." >&5
14197 echo "$as_me: error: unrecognized option: $1
14198 Try \`$0 --help' for more information." >&2;}
14199 { (exit 1); exit 1; }; } ;;
14201 *) ac_config_targets="$ac_config_targets $1" ;;
14210 ## ----------------------- ##
14211 ## Running config.status. ##
14212 ## ----------------------- ##
14214 This file was extended by $as_me 2.52.20141204, executed with
14215 CONFIG_FILES = $CONFIG_FILES
14216 CONFIG_HEADERS = $CONFIG_HEADERS
14217 CONFIG_LINKS = $CONFIG_LINKS
14218 CONFIG_COMMANDS = $CONFIG_COMMANDS
14219 > $ac_cs_invocation
14220 on `(hostname || uname -n) 2>/dev/null | sed 1q`
14225 cat >>$CONFIG_STATUS <<EOF
14227 # INIT-COMMANDS section.
14230 ### Special initialization commands, used to pass information from the
14231 ### configuration-run into config.status
14234 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
14235 DFT_LWR_MODEL="$DFT_LWR_MODEL"
14236 LIB_NAME="$LIB_NAME"
14237 LIB_PREFIX="$LIB_PREFIX"
14238 LIB_SUFFIX="$LIB_SUFFIX"
14240 NCURSES_MAJOR="$NCURSES_MAJOR"
14241 NCURSES_MINOR="$NCURSES_MINOR"
14242 NCURSES_PATCH="$NCURSES_PATCH"
14243 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
14244 cf_cv_abi_version="$cf_cv_abi_version"
14245 cf_cv_rel_version="$cf_cv_rel_version"
14246 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
14247 cf_cv_shared_soname='$cf_cv_shared_soname'
14248 cf_cv_shlib_version="$cf_cv_shlib_version"
14249 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
14250 cf_cv_system_name="$cf_cv_system_name"
14256 cat >>$CONFIG_STATUS <<\EOF
14257 for ac_config_target in $ac_config_targets
14259 case "$ac_config_target" in
14260 # Handling of arguments.
14261 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
14262 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
14263 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
14264 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
14265 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
14266 *) { { echo "$as_me:14266: error: invalid argument: $ac_config_target" >&5
14267 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
14268 { (exit 1); exit 1; }; };;
14272 # If the user did not use the arguments to specify the items to instantiate,
14273 # then the envvar interface is used. Set only those that are not.
14274 # We use the long form for the default assignment because of an extremely
14275 # bizarre bug on SunOS 4.1.3.
14276 if $ac_need_defaults; then
14277 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14278 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14279 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
14282 # Create a temporary directory, and hook for its removal unless debugging.
14285 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
14286 trap '{ (exit 1); exit 1; }' 1 2 13 15
14289 # Create a (secure) tmp directory for tmp files.
14292 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
14293 test -n "$tmp" && test -d "$tmp"
14296 tmp=$TMPDIR/cs$$-$RANDOM
14297 (umask 077 && mkdir $tmp)
14300 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
14301 { (exit 1); exit 1; }
14306 cat >>$CONFIG_STATUS <<EOF
14309 # CONFIG_FILES section.
14312 # No need to generate the scripts if there are no CONFIG_FILES.
14313 # This happens for instance when ./config.status config.h
14314 if test -n "\$CONFIG_FILES"; then
14315 # Protect against being on the right side of a sed subst in config.status.
14316 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
14317 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
14318 s,@SHELL@,$SHELL,;t t
14319 s,@exec_prefix@,$exec_prefix,;t t
14320 s,@prefix@,$prefix,;t t
14321 s,@program_transform_name@,$program_transform_name,;t t
14322 s,@bindir@,$bindir,;t t
14323 s,@sbindir@,$sbindir,;t t
14324 s,@libexecdir@,$libexecdir,;t t
14325 s,@datarootdir@,$datarootdir,;t t
14326 s,@datadir@,$datadir,;t t
14327 s,@sysconfdir@,$sysconfdir,;t t
14328 s,@sharedstatedir@,$sharedstatedir,;t t
14329 s,@localstatedir@,$localstatedir,;t t
14330 s,@libdir@,$libdir,;t t
14331 s,@includedir@,$includedir,;t t
14332 s,@oldincludedir@,$oldincludedir,;t t
14333 s,@infodir@,$infodir,;t t
14334 s,@mandir@,$mandir,;t t
14335 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
14336 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
14337 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
14338 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
14339 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
14340 s,@build_alias@,$build_alias,;t t
14341 s,@host_alias@,$host_alias,;t t
14342 s,@target_alias@,$target_alias,;t t
14343 s,@ECHO_C@,$ECHO_C,;t t
14344 s,@ECHO_N@,$ECHO_N,;t t
14345 s,@ECHO_T@,$ECHO_T,;t t
14346 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
14347 s,@DEFS@,$DEFS,;t t
14348 s,@LIBS@,$LIBS,;t t
14349 s,@top_builddir@,$top_builddir,;t t
14350 s,@build@,$build,;t t
14351 s,@build_cpu@,$build_cpu,;t t
14352 s,@build_vendor@,$build_vendor,;t t
14353 s,@build_os@,$build_os,;t t
14354 s,@host@,$host,;t t
14355 s,@host_cpu@,$host_cpu,;t t
14356 s,@host_vendor@,$host_vendor,;t t
14357 s,@host_os@,$host_os,;t t
14358 s,@target@,$target,;t t
14359 s,@target_cpu@,$target_cpu,;t t
14360 s,@target_vendor@,$target_vendor,;t t
14361 s,@target_os@,$target_os,;t t
14363 s,@CFLAGS@,$CFLAGS,;t t
14364 s,@LDFLAGS@,$LDFLAGS,;t t
14365 s,@CPPFLAGS@,$CPPFLAGS,;t t
14366 s,@ac_ct_CC@,$ac_ct_CC,;t t
14367 s,@EXEEXT@,$EXEEXT,;t t
14368 s,@OBJEXT@,$OBJEXT,;t t
14369 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
14372 s,@EGREP@,$EGREP,;t t
14373 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
14374 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
14375 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
14376 s,@LN_S@,$LN_S,;t t
14377 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
14378 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
14379 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
14380 s,@SET_MAKE@,$SET_MAKE,;t t
14381 s,@CTAGS@,$CTAGS,;t t
14382 s,@ETAGS@,$ETAGS,;t t
14383 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
14384 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
14385 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
14386 s,@RANLIB@,$RANLIB,;t t
14387 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
14389 s,@ac_ct_LD@,$ac_ct_LD,;t t
14391 s,@ac_ct_AR@,$ac_ct_AR,;t t
14392 s,@ARFLAGS@,$ARFLAGS,;t t
14393 s,@DESTDIR@,$DESTDIR,;t t
14394 s,@BUILD_CC@,$BUILD_CC,;t t
14395 s,@BUILD_CPP@,$BUILD_CPP,;t t
14396 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
14397 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
14398 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
14399 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
14400 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
14401 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
14402 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
14403 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
14404 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
14405 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
14406 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
14407 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
14408 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
14409 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
14410 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
14411 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
14412 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
14413 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
14414 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
14415 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
14416 s,@CC_G_OPT@,$CC_G_OPT,;t t
14417 s,@LD_MODEL@,$LD_MODEL,;t t
14418 s,@shlibdir@,$shlibdir,;t t
14419 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
14420 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
14421 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
14422 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
14423 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
14424 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
14425 s,@LINK_PROGS@,$LINK_PROGS,;t t
14426 s,@LINK_TESTS@,$LINK_TESTS,;t t
14427 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
14428 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
14429 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
14430 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
14431 s,@RPATH_LIST@,$RPATH_LIST,;t t
14432 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
14433 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
14434 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
14435 s,@PTHREAD@,$PTHREAD,;t t
14436 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
14437 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
14438 s,@ECHO_LT@,$ECHO_LT,;t t
14439 s,@ECHO_LD@,$ECHO_LD,;t t
14440 s,@RULE_CC@,$RULE_CC,;t t
14441 s,@SHOW_CC@,$SHOW_CC,;t t
14442 s,@ECHO_CC@,$ECHO_CC,;t t
14443 s,@ADAFLAGS@,$ADAFLAGS,;t t
14444 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
14445 s,@ADA_TRACE@,$ADA_TRACE,;t t
14446 s,@gnat_exists@,$gnat_exists,;t t
14447 s,@M4_exists@,$M4_exists,;t t
14448 s,@cf_ada_make@,$cf_ada_make,;t t
14449 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
14450 s,@cf_compile_generics@,$cf_compile_generics,;t t
14451 s,@cf_generic_objects@,$cf_generic_objects,;t t
14452 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
14453 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
14454 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
14455 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
14456 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
14457 s,@cf_ada_package@,$cf_ada_package,;t t
14458 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
14459 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
14460 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
14461 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
14462 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
14463 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
14464 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
14465 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
14466 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
14467 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
14468 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
14469 s,@TEST_ARG2@,$TEST_ARG2,;t t
14470 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
14471 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
14472 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
14473 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
14474 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
14475 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
14480 cat >>$CONFIG_STATUS <<\EOF
14481 # Split the substitutions into bite-sized pieces for seds with
14482 # small command number limits, like on Digital OSF/1 and HP-UX.
14483 ac_max_sed_lines=48
14484 ac_sed_frag=1 # Number of current file.
14485 ac_beg=1 # First line for current file.
14486 ac_end=$ac_max_sed_lines # Line after last line for current file.
14489 while $ac_more_lines; do
14490 if test $ac_beg -gt 1; then
14491 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
14493 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
14495 if test ! -s $tmp/subs.frag; then
14496 ac_more_lines=false
14498 # The purpose of the label and of the branching condition is to
14499 # speed up the sed processing (if there are no `@' at all, there
14500 # is no need to browse any of the substitutions).
14501 # These are the two extra sed commands mentioned above.
14503 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
14504 if test -z "$ac_sed_cmds"; then
14505 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
14507 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
14509 ac_sed_frag=`expr $ac_sed_frag + 1`
14511 ac_end=`expr $ac_end + $ac_max_sed_lines`
14514 if test -z "$ac_sed_cmds"; then
14517 fi # test -n "$CONFIG_FILES"
14520 cat >>$CONFIG_STATUS <<\EOF
14521 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
14522 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14524 - | *:- | *:-:* ) # input from stdin
14526 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14527 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14528 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14529 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14530 * ) ac_file_in=$ac_file.in ;;
14533 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
14534 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14535 X"$ac_file" : 'X\(//\)[^/]' \| \
14536 X"$ac_file" : 'X\(//\)$' \| \
14537 X"$ac_file" : 'X\(/\)' \| \
14538 . : '\(.\)' 2>/dev/null ||
14540 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
14541 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
14542 /^X\(\/\/\)$/{ s//\1/; q; }
14543 /^X\(\/\).*/{ s//\1/; q; }
14545 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14546 { case "$ac_dir" in
14547 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
14551 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
14552 case $as_mkdir_dir in
14553 # Skip DOS drivespec
14554 ?:) as_incr_dir=$as_mkdir_dir ;;
14556 as_incr_dir=$as_incr_dir/$as_mkdir_dir
14557 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
14562 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
14563 # A "../" for each directory in $ac_dir_suffix.
14564 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
14566 ac_dir_suffix= ac_dots=
14571 if test -z "$ac_dots"; then
14574 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
14576 [\\/]* | ?:[\\/]* )
14577 ac_srcdir=$srcdir$ac_dir_suffix;
14578 ac_top_srcdir=$srcdir ;;
14579 *) # Relative path.
14580 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
14581 ac_top_srcdir=$ac_dots$srcdir ;;
14585 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
14586 *) ac_INSTALL=$ac_dots$INSTALL ;;
14589 if test x"$ac_file" != x-; then
14590 { echo "$as_me:14590: creating $ac_file" >&5
14591 echo "$as_me: creating $ac_file" >&6;}
14594 # Let's still pretend it is `configure' which instantiates (i.e., don't
14595 # use $as_me), people would be surprised to read:
14596 # /* config.h. Generated automatically by config.status. */
14597 configure_input="Generated automatically from `echo $ac_file_in |
14598 sed 's,.*/,,'` by configure."
14600 # First look for the input files in the build tree, otherwise in the
14602 ac_file_inputs=`IFS=:
14603 for f in $ac_file_in; do
14605 -) echo $tmp/stdin ;;
14607 # Absolute (can't be DOS-style, as IFS=:)
14608 test -f "$f" || { { echo "$as_me:14608: error: cannot find input file: $f" >&5
14609 echo "$as_me: error: cannot find input file: $f" >&2;}
14610 { (exit 1); exit 1; }; }
14613 if test -f "$f"; then
14616 elif test -f "$srcdir/$f"; then
14621 { { echo "$as_me:14621: error: cannot find input file: $f" >&5
14622 echo "$as_me: error: cannot find input file: $f" >&2;}
14623 { (exit 1); exit 1; }; }
14626 done` || { (exit 1); exit 1; }
14628 cat >>$CONFIG_STATUS <<\EOF
14629 ac_warn_datarootdir=no
14630 if test x"$ac_file" != x-; then
14631 for ac_item in $ac_file_inputs
14633 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
14634 if test -n "$ac_seen"; then
14635 ac_used=`grep '@datarootdir@' $ac_item`
14636 if test -z "$ac_used"; then
14637 { echo "$as_me:14637: WARNING: datarootdir was used implicitly but not set:
14639 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
14641 ac_warn_datarootdir=yes
14644 ac_seen=`grep '${datarootdir}' $ac_item`
14645 if test -n "$ac_seen"; then
14646 { echo "$as_me:14646: WARNING: datarootdir was used explicitly but not set:
14648 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
14650 ac_warn_datarootdir=yes
14655 if test "x$ac_warn_datarootdir" = xyes; then
14656 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
14660 cat >>$CONFIG_STATUS <<EOF
14664 cat >>$CONFIG_STATUS <<\EOF
14666 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
14667 s,@configure_input@,$configure_input,;t t
14668 s,@srcdir@,$ac_srcdir,;t t
14669 s,@top_srcdir@,$ac_top_srcdir,;t t
14670 s,@INSTALL@,$ac_INSTALL,;t t
14671 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
14673 if test x"$ac_file" != x-; then
14674 cp $tmp/out $ac_file
14676 for ac_name in prefix exec_prefix datarootdir
14678 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
14679 if test -n "$ac_seen"; then
14680 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
14681 if test -z "$ac_init"; then
14682 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
14683 { echo "$as_me:14683: WARNING: Variable $ac_name is used but was not set:
14685 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
14690 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
14691 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
14692 if test -s $tmp/out; then
14693 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
14694 { echo "$as_me:14694: WARNING: Some variables may not be substituted:
14696 echo "$as_me: WARNING: Some variables may not be substituted:
14706 cat >>$CONFIG_STATUS <<\EOF
14709 # CONFIG_HEADER section.
14712 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14713 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14715 # ac_d sets the value in "#define NAME VALUE" lines.
14716 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
14717 ac_dB='[ ].*$,\1#\2'
14720 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14721 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
14722 ac_iB='\([ ]\),\1#\2define\3'
14725 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14726 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
14727 ac_uB='$,\1#\2define\3'
14731 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
14732 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14734 - | *:- | *:-:* ) # input from stdin
14736 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14737 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14738 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14739 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14740 * ) ac_file_in=$ac_file.in ;;
14743 test x"$ac_file" != x- && { echo "$as_me:14743: creating $ac_file" >&5
14744 echo "$as_me: creating $ac_file" >&6;}
14746 # First look for the input files in the build tree, otherwise in the
14748 ac_file_inputs=`IFS=:
14749 for f in $ac_file_in; do
14751 -) echo $tmp/stdin ;;
14753 # Absolute (can't be DOS-style, as IFS=:)
14754 test -f "$f" || { { echo "$as_me:14754: error: cannot find input file: $f" >&5
14755 echo "$as_me: error: cannot find input file: $f" >&2;}
14756 { (exit 1); exit 1; }; }
14759 if test -f "$f"; then
14762 elif test -f "$srcdir/$f"; then
14767 { { echo "$as_me:14767: error: cannot find input file: $f" >&5
14768 echo "$as_me: error: cannot find input file: $f" >&2;}
14769 { (exit 1); exit 1; }; }
14772 done` || { (exit 1); exit 1; }
14773 # Remove the trailing spaces.
14774 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
14778 # Transform confdefs.h into a list of #define's. We won't use it as a sed
14779 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
14780 # be either 'cat' or 'sort'.
14781 cat confdefs.h | uniq >conftest.vals
14783 # Break up conftest.vals because some shells have a limit on
14784 # the size of here documents, and old seds have small limits too.
14786 rm -f conftest.tail
14787 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
14788 while grep . conftest.vals >/dev/null
14790 # Write chunks of a limited-size here document to conftest.frag.
14791 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
14792 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
14793 echo 'CEOF' >> $CONFIG_STATUS
14794 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14795 rm -f conftest.vals
14796 mv conftest.tail conftest.vals
14798 rm -f conftest.vals
14800 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
14802 echo ' cat >> conftest.edit <<CEOF
14803 /@DEFS@/r conftest.frag
14806 sed -f conftest.edit $tmp/in > $tmp/out
14808 mv $tmp/out $tmp/in
14809 rm -f conftest.edit conftest.frag
14810 ' >> $CONFIG_STATUS
14812 cat >>$CONFIG_STATUS <<\EOF
14813 # Let's still pretend it is `configure' which instantiates (i.e., don't
14814 # use $as_me), people would be surprised to read:
14815 # /* config.h. Generated automatically by config.status. */
14816 if test x"$ac_file" = x-; then
14817 echo "/* Generated automatically by configure. */" >$tmp/config.h
14819 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
14821 cat $tmp/in >>$tmp/config.h
14823 if test x"$ac_file" != x-; then
14824 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
14825 { echo "$as_me:14825: $ac_file is unchanged" >&5
14826 echo "$as_me: $ac_file is unchanged" >&6;}
14828 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14829 X"$ac_file" : 'X\(//\)[^/]' \| \
14830 X"$ac_file" : 'X\(//\)$' \| \
14831 X"$ac_file" : 'X\(/\)' \| \
14832 . : '\(.\)' 2>/dev/null ||
14834 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
14835 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
14836 /^X\(\/\/\)$/{ s//\1/; q; }
14837 /^X\(\/\).*/{ s//\1/; q; }
14839 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14840 { case "$ac_dir" in
14841 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
14845 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
14846 case $as_mkdir_dir in
14847 # Skip DOS drivespec
14848 ?:) as_incr_dir=$as_mkdir_dir ;;
14850 as_incr_dir=$as_incr_dir/$as_mkdir_dir
14851 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
14858 mv $tmp/config.h $ac_file
14862 rm -f $tmp/config.h
14866 cat >>$CONFIG_STATUS <<\EOF
14868 # CONFIG_COMMANDS section.
14870 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
14871 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
14872 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
14876 if test -z "$USE_OLD_MAKERULES" ; then
14877 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
14884 cat >>$CONFIG_STATUS <<\EOF
14886 { (exit 0); exit 0; }
14888 chmod +x $CONFIG_STATUS
14889 ac_clean_files=$ac_clean_files_save
14891 # configure is writing to config.log, and then calls config.status.
14892 # config.status does its own redirection, appending to config.log.
14893 # Unfortunately, on DOS this fails, as config.log is still kept open
14894 # by configure, so config.status won't be able to write to it; its
14895 # output is simply discarded. So we exec the FD to /dev/null,
14896 # effectively closing config.log, so it can be properly (re)opened and
14897 # appended to by config.status. When coming back to configure, we
14898 # need to make the FD available again.
14899 if test "$no_create" != yes; then
14902 $SHELL $CONFIG_STATUS || ac_cs_success=false
14904 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14905 # would make configure fail if this is the last instruction.
14906 $ac_cs_success || { (exit 1); exit 1; }
14908 ${MAKE:-make} preinstall