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;}
2552 echo "$as_me:2552: checking for pkg-config library directory" >&5
2553 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
2556 echo "$as_me:2556: checking for $PKG_CONFIG library directory" >&5
2557 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
2561 PKG_CONFIG_LIBDIR=no
2563 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
2564 if test "${with_pkg_config_libdir+set}" = set; then
2565 withval="$with_pkg_config_libdir"
2566 PKG_CONFIG_LIBDIR=$withval
2568 test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
2571 case x$PKG_CONFIG_LIBDIR in
2575 # Look for the library directory using the same prefix as the executable
2576 if test "x$PKG_CONFIG" = xnone
2580 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
2583 # If you don't like using the default architecture, you have to specify the
2584 # intended library directory and corresponding compiler/linker options.
2586 # This case allows for Debian's 2014-flavor of multiarch, along with the
2587 # most common variations before that point. Some other variants spell the
2588 # directory differently, e.g., "pkg-config", and put it in unusual places.
2589 # pkg-config has always been poorly standardized, which is ironic...
2590 case x`(arch) 2>/dev/null` in
2593 $cf_path/lib/*64-linux-gnu \
2601 $cf_path/lib/*-linux-gnu \
2609 test -n "$verbose" && echo " list..." 1>&6
2611 echo "${as_me:-configure}:2611: testing list... ..." 1>&5
2613 for cf_config in $cf_search_path
2615 test -n "$verbose" && echo " checking $cf_config/pkgconfig" 1>&6
2617 echo "${as_me:-configure}:2617: testing checking $cf_config/pkgconfig ..." 1>&5
2619 if test -d $cf_config/pkgconfig
2621 PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
2622 echo "$as_me:2622: checking done" >&5
2623 echo $ECHO_N "checking done... $ECHO_C" >&6
2632 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
2633 echo "$as_me:2633: result: $PKG_CONFIG_LIBDIR" >&5
2634 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
2637 echo "$as_me:2637: checking if you want to build test-programs" >&5
2638 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2640 # Check whether --with-tests or --without-tests was given.
2641 if test "${with_tests+set}" = set; then
2642 withval="$with_tests"
2643 cf_with_tests=$withval
2647 echo "$as_me:2647: result: $cf_with_tests" >&5
2648 echo "${ECHO_T}$cf_with_tests" >&6
2650 echo "$as_me:2650: checking if we should assume mixed-case filenames" >&5
2651 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
2653 # Check whether --enable-mixed-case or --disable-mixed-case was given.
2654 if test "${enable_mixed_case+set}" = set; then
2655 enableval="$enable_mixed_case"
2656 enable_mixedcase=$enableval
2658 enable_mixedcase=auto
2660 echo "$as_me:2660: result: $enable_mixedcase" >&5
2661 echo "${ECHO_T}$enable_mixedcase" >&6
2662 if test "$enable_mixedcase" = "auto" ; then
2664 echo "$as_me:2664: checking if filesystem supports mixed-case filenames" >&5
2665 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2666 if test "${cf_cv_mixedcase+set}" = set; then
2667 echo $ECHO_N "(cached) $ECHO_C" >&6
2670 if test "$cross_compiling" = yes ; then
2671 case $target_alias in
2672 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2680 rm -f conftest CONFTEST
2682 if test -f CONFTEST ; then
2687 rm -f conftest CONFTEST
2691 echo "$as_me:2691: result: $cf_cv_mixedcase" >&5
2692 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2693 test "$cf_cv_mixedcase" = yes &&
2694 cat >>confdefs.h <<\EOF
2695 #define MIXEDCASE_FILENAMES 1
2699 cf_cv_mixedcase=$enable_mixedcase
2700 if test "$enable_mixedcase" = "yes" ; then
2701 cat >>confdefs.h <<\EOF
2702 #define MIXEDCASE_FILENAMES 1
2708 # do this after mixed-case option (tags/TAGS is not as important as tic).
2709 echo "$as_me:2709: checking whether ${MAKE-make} sets \${MAKE}" >&5
2710 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2711 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2712 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2713 echo $ECHO_N "(cached) $ECHO_C" >&6
2715 cat >conftest.make <<\EOF
2717 @echo 'ac_maketemp="${MAKE}"'
2719 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2720 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2721 if test -n "$ac_maketemp"; then
2722 eval ac_cv_prog_make_${ac_make}_set=yes
2724 eval ac_cv_prog_make_${ac_make}_set=no
2728 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2729 echo "$as_me:2729: result: yes" >&5
2730 echo "${ECHO_T}yes" >&6
2733 echo "$as_me:2733: result: no" >&5
2734 echo "${ECHO_T}no" >&6
2735 SET_MAKE="MAKE=${MAKE-make}"
2738 for ac_prog in exctags ctags
2740 # Extract the first word of "$ac_prog", so it can be a program name with args.
2741 set dummy $ac_prog; ac_word=$2
2742 echo "$as_me:2742: checking for $ac_word" >&5
2743 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2744 if test "${ac_cv_prog_CTAGS+set}" = set; then
2745 echo $ECHO_N "(cached) $ECHO_C" >&6
2747 if test -n "$CTAGS"; then
2748 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2750 ac_save_IFS=$IFS; IFS=$ac_path_separator
2752 for ac_dir in $ac_dummy; do
2754 test -z "$ac_dir" && ac_dir=.
2755 $as_executable_p "$ac_dir/$ac_word" || continue
2756 ac_cv_prog_CTAGS="$ac_prog"
2757 echo "$as_me:2757: found $ac_dir/$ac_word" >&5
2763 CTAGS=$ac_cv_prog_CTAGS
2764 if test -n "$CTAGS"; then
2765 echo "$as_me:2765: result: $CTAGS" >&5
2766 echo "${ECHO_T}$CTAGS" >&6
2768 echo "$as_me:2768: result: no" >&5
2769 echo "${ECHO_T}no" >&6
2772 test -n "$CTAGS" && break
2775 for ac_prog in exetags etags
2777 # Extract the first word of "$ac_prog", so it can be a program name with args.
2778 set dummy $ac_prog; ac_word=$2
2779 echo "$as_me:2779: checking for $ac_word" >&5
2780 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2781 if test "${ac_cv_prog_ETAGS+set}" = set; then
2782 echo $ECHO_N "(cached) $ECHO_C" >&6
2784 if test -n "$ETAGS"; then
2785 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2787 ac_save_IFS=$IFS; IFS=$ac_path_separator
2789 for ac_dir in $ac_dummy; do
2791 test -z "$ac_dir" && ac_dir=.
2792 $as_executable_p "$ac_dir/$ac_word" || continue
2793 ac_cv_prog_ETAGS="$ac_prog"
2794 echo "$as_me:2794: found $ac_dir/$ac_word" >&5
2800 ETAGS=$ac_cv_prog_ETAGS
2801 if test -n "$ETAGS"; then
2802 echo "$as_me:2802: result: $ETAGS" >&5
2803 echo "${ECHO_T}$ETAGS" >&6
2805 echo "$as_me:2805: result: no" >&5
2806 echo "${ECHO_T}no" >&6
2809 test -n "$ETAGS" && break
2812 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2813 set dummy ${CTAGS:-ctags}; ac_word=$2
2814 echo "$as_me:2814: checking for $ac_word" >&5
2815 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2816 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2817 echo $ECHO_N "(cached) $ECHO_C" >&6
2819 if test -n "$MAKE_LOWER_TAGS"; then
2820 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2822 ac_save_IFS=$IFS; IFS=$ac_path_separator
2824 for ac_dir in $ac_dummy; do
2826 test -z "$ac_dir" && ac_dir=.
2827 $as_executable_p "$ac_dir/$ac_word" || continue
2828 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2829 echo "$as_me:2829: found $ac_dir/$ac_word" >&5
2833 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2836 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2837 if test -n "$MAKE_LOWER_TAGS"; then
2838 echo "$as_me:2838: result: $MAKE_LOWER_TAGS" >&5
2839 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2841 echo "$as_me:2841: result: no" >&5
2842 echo "${ECHO_T}no" >&6
2845 if test "$cf_cv_mixedcase" = yes ; then
2846 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2847 set dummy ${ETAGS:-etags}; ac_word=$2
2848 echo "$as_me:2848: checking for $ac_word" >&5
2849 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2850 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2851 echo $ECHO_N "(cached) $ECHO_C" >&6
2853 if test -n "$MAKE_UPPER_TAGS"; then
2854 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2856 ac_save_IFS=$IFS; IFS=$ac_path_separator
2858 for ac_dir in $ac_dummy; do
2860 test -z "$ac_dir" && ac_dir=.
2861 $as_executable_p "$ac_dir/$ac_word" || continue
2862 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2863 echo "$as_me:2863: found $ac_dir/$ac_word" >&5
2867 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2870 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2871 if test -n "$MAKE_UPPER_TAGS"; then
2872 echo "$as_me:2872: result: $MAKE_UPPER_TAGS" >&5
2873 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2875 echo "$as_me:2875: result: no" >&5
2876 echo "${ECHO_T}no" >&6
2883 if test "$MAKE_UPPER_TAGS" = yes ; then
2889 if test "$MAKE_LOWER_TAGS" = yes ; then
2895 echo "$as_me:2895: checking for makeflags variable" >&5
2896 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
2897 if test "${cf_cv_makeflags+set}" = set; then
2898 echo $ECHO_N "(cached) $ECHO_C" >&6
2902 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
2904 cat >cf_makeflags.tmp <<CF_EOF
2907 @ echo '.$cf_option'
2909 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ ]*$,,'`
2910 case "$cf_result" in
2912 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
2913 case "$cf_result" in
2914 (.*CC=*) cf_cv_makeflags=
2916 (*) cf_cv_makeflags=$cf_option
2922 (*) echo "given option \"$cf_option\", no match \"$cf_result\""
2926 rm -f cf_makeflags.tmp
2929 echo "$as_me:2929: result: $cf_cv_makeflags" >&5
2930 echo "${ECHO_T}$cf_cv_makeflags" >&6
2932 if test -n "$ac_tool_prefix"; then
2933 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2934 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2935 echo "$as_me:2935: checking for $ac_word" >&5
2936 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2937 if test "${ac_cv_prog_RANLIB+set}" = set; then
2938 echo $ECHO_N "(cached) $ECHO_C" >&6
2940 if test -n "$RANLIB"; then
2941 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2943 ac_save_IFS=$IFS; IFS=$ac_path_separator
2945 for ac_dir in $ac_dummy; do
2947 test -z "$ac_dir" && ac_dir=.
2948 $as_executable_p "$ac_dir/$ac_word" || continue
2949 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2950 echo "$as_me:2950: found $ac_dir/$ac_word" >&5
2956 RANLIB=$ac_cv_prog_RANLIB
2957 if test -n "$RANLIB"; then
2958 echo "$as_me:2958: result: $RANLIB" >&5
2959 echo "${ECHO_T}$RANLIB" >&6
2961 echo "$as_me:2961: result: no" >&5
2962 echo "${ECHO_T}no" >&6
2966 if test -z "$ac_cv_prog_RANLIB"; then
2967 ac_ct_RANLIB=$RANLIB
2968 # Extract the first word of "ranlib", so it can be a program name with args.
2969 set dummy ranlib; ac_word=$2
2970 echo "$as_me:2970: checking for $ac_word" >&5
2971 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2972 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2973 echo $ECHO_N "(cached) $ECHO_C" >&6
2975 if test -n "$ac_ct_RANLIB"; then
2976 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2978 ac_save_IFS=$IFS; IFS=$ac_path_separator
2980 for ac_dir in $ac_dummy; do
2982 test -z "$ac_dir" && ac_dir=.
2983 $as_executable_p "$ac_dir/$ac_word" || continue
2984 ac_cv_prog_ac_ct_RANLIB="ranlib"
2985 echo "$as_me:2985: found $ac_dir/$ac_word" >&5
2989 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
2992 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2993 if test -n "$ac_ct_RANLIB"; then
2994 echo "$as_me:2994: result: $ac_ct_RANLIB" >&5
2995 echo "${ECHO_T}$ac_ct_RANLIB" >&6
2997 echo "$as_me:2997: result: no" >&5
2998 echo "${ECHO_T}no" >&6
3001 RANLIB=$ac_ct_RANLIB
3003 RANLIB="$ac_cv_prog_RANLIB"
3006 if test -n "$ac_tool_prefix"; then
3007 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3008 set dummy ${ac_tool_prefix}ld; ac_word=$2
3009 echo "$as_me:3009: checking for $ac_word" >&5
3010 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3011 if test "${ac_cv_prog_LD+set}" = set; then
3012 echo $ECHO_N "(cached) $ECHO_C" >&6
3014 if test -n "$LD"; then
3015 ac_cv_prog_LD="$LD" # Let the user override the test.
3017 ac_save_IFS=$IFS; IFS=$ac_path_separator
3019 for ac_dir in $ac_dummy; do
3021 test -z "$ac_dir" && ac_dir=.
3022 $as_executable_p "$ac_dir/$ac_word" || continue
3023 ac_cv_prog_LD="${ac_tool_prefix}ld"
3024 echo "$as_me:3024: found $ac_dir/$ac_word" >&5
3031 if test -n "$LD"; then
3032 echo "$as_me:3032: result: $LD" >&5
3033 echo "${ECHO_T}$LD" >&6
3035 echo "$as_me:3035: result: no" >&5
3036 echo "${ECHO_T}no" >&6
3040 if test -z "$ac_cv_prog_LD"; then
3042 # Extract the first word of "ld", so it can be a program name with args.
3043 set dummy ld; ac_word=$2
3044 echo "$as_me:3044: checking for $ac_word" >&5
3045 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3046 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3047 echo $ECHO_N "(cached) $ECHO_C" >&6
3049 if test -n "$ac_ct_LD"; then
3050 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3052 ac_save_IFS=$IFS; IFS=$ac_path_separator
3054 for ac_dir in $ac_dummy; do
3056 test -z "$ac_dir" && ac_dir=.
3057 $as_executable_p "$ac_dir/$ac_word" || continue
3058 ac_cv_prog_ac_ct_LD="ld"
3059 echo "$as_me:3059: found $ac_dir/$ac_word" >&5
3063 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3066 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3067 if test -n "$ac_ct_LD"; then
3068 echo "$as_me:3068: result: $ac_ct_LD" >&5
3069 echo "${ECHO_T}$ac_ct_LD" >&6
3071 echo "$as_me:3071: result: no" >&5
3072 echo "${ECHO_T}no" >&6
3080 if test -n "$ac_tool_prefix"; then
3081 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3082 set dummy ${ac_tool_prefix}ar; ac_word=$2
3083 echo "$as_me:3083: checking for $ac_word" >&5
3084 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3085 if test "${ac_cv_prog_AR+set}" = set; then
3086 echo $ECHO_N "(cached) $ECHO_C" >&6
3088 if test -n "$AR"; then
3089 ac_cv_prog_AR="$AR" # Let the user override the test.
3091 ac_save_IFS=$IFS; IFS=$ac_path_separator
3093 for ac_dir in $ac_dummy; do
3095 test -z "$ac_dir" && ac_dir=.
3096 $as_executable_p "$ac_dir/$ac_word" || continue
3097 ac_cv_prog_AR="${ac_tool_prefix}ar"
3098 echo "$as_me:3098: found $ac_dir/$ac_word" >&5
3105 if test -n "$AR"; then
3106 echo "$as_me:3106: result: $AR" >&5
3107 echo "${ECHO_T}$AR" >&6
3109 echo "$as_me:3109: result: no" >&5
3110 echo "${ECHO_T}no" >&6
3114 if test -z "$ac_cv_prog_AR"; then
3116 # Extract the first word of "ar", so it can be a program name with args.
3117 set dummy ar; ac_word=$2
3118 echo "$as_me:3118: checking for $ac_word" >&5
3119 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3120 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3121 echo $ECHO_N "(cached) $ECHO_C" >&6
3123 if test -n "$ac_ct_AR"; then
3124 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3126 ac_save_IFS=$IFS; IFS=$ac_path_separator
3128 for ac_dir in $ac_dummy; do
3130 test -z "$ac_dir" && ac_dir=.
3131 $as_executable_p "$ac_dir/$ac_word" || continue
3132 ac_cv_prog_ac_ct_AR="ar"
3133 echo "$as_me:3133: found $ac_dir/$ac_word" >&5
3137 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3140 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3141 if test -n "$ac_ct_AR"; then
3142 echo "$as_me:3142: result: $ac_ct_AR" >&5
3143 echo "${ECHO_T}$ac_ct_AR" >&6
3145 echo "$as_me:3145: result: no" >&5
3146 echo "${ECHO_T}no" >&6
3154 if test -n "$ac_tool_prefix"; then
3155 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3156 set dummy ${ac_tool_prefix}ar; ac_word=$2
3157 echo "$as_me:3157: checking for $ac_word" >&5
3158 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3159 if test "${ac_cv_prog_AR+set}" = set; then
3160 echo $ECHO_N "(cached) $ECHO_C" >&6
3162 if test -n "$AR"; then
3163 ac_cv_prog_AR="$AR" # Let the user override the test.
3165 ac_save_IFS=$IFS; IFS=$ac_path_separator
3167 for ac_dir in $ac_dummy; do
3169 test -z "$ac_dir" && ac_dir=.
3170 $as_executable_p "$ac_dir/$ac_word" || continue
3171 ac_cv_prog_AR="${ac_tool_prefix}ar"
3172 echo "$as_me:3172: found $ac_dir/$ac_word" >&5
3179 if test -n "$AR"; then
3180 echo "$as_me:3180: result: $AR" >&5
3181 echo "${ECHO_T}$AR" >&6
3183 echo "$as_me:3183: result: no" >&5
3184 echo "${ECHO_T}no" >&6
3188 if test -z "$ac_cv_prog_AR"; then
3190 # Extract the first word of "ar", so it can be a program name with args.
3191 set dummy ar; ac_word=$2
3192 echo "$as_me:3192: checking for $ac_word" >&5
3193 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3194 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3195 echo $ECHO_N "(cached) $ECHO_C" >&6
3197 if test -n "$ac_ct_AR"; then
3198 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3200 ac_save_IFS=$IFS; IFS=$ac_path_separator
3202 for ac_dir in $ac_dummy; do
3204 test -z "$ac_dir" && ac_dir=.
3205 $as_executable_p "$ac_dir/$ac_word" || continue
3206 ac_cv_prog_ac_ct_AR="ar"
3207 echo "$as_me:3207: found $ac_dir/$ac_word" >&5
3211 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3214 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3215 if test -n "$ac_ct_AR"; then
3216 echo "$as_me:3216: result: $ac_ct_AR" >&5
3217 echo "${ECHO_T}$ac_ct_AR" >&6
3219 echo "$as_me:3219: result: no" >&5
3220 echo "${ECHO_T}no" >&6
3228 echo "$as_me:3228: checking for options to update archives" >&5
3229 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3230 if test "${cf_cv_ar_flags+set}" = set; then
3231 echo $ECHO_N "(cached) $ECHO_C" >&6
3234 cf_cv_ar_flags=unknown
3235 for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
3238 # check if $ARFLAGS already contains this choice
3239 if test "x$ARFLAGS" != "x" ; then
3240 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3241 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3247 rm -f conftest.$ac_cv_objext
3250 cat >conftest.$ac_ext <<EOF
3251 #line 3251 "configure"
3252 int testdata[3] = { 123, 456, 789 };
3254 if { (eval echo "$as_me:3254: \"$ac_compile\"") >&5
3255 (eval $ac_compile) 2>&5
3257 echo "$as_me:3257: \$? = $ac_status" >&5
3258 (exit $ac_status); } ; then
3259 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3260 $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3261 if test -f conftest.a ; then
3262 cf_cv_ar_flags=$cf_ar_flags
3266 test -n "$verbose" && echo " cannot compile test-program" 1>&6
3268 echo "${as_me:-configure}:3268: testing cannot compile test-program ..." 1>&5
3273 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3276 echo "$as_me:3276: result: $cf_cv_ar_flags" >&5
3277 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3279 if test -n "$ARFLAGS" ; then
3280 if test -n "$cf_cv_ar_flags" ; then
3281 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3284 ARFLAGS=$cf_cv_ar_flags
3287 echo "$as_me:3287: checking for PATH separator" >&5
3288 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
3289 case $cf_cv_system_name in
3290 (os2*) PATH_SEPARATOR=';' ;;
3291 (*) ${PATH_SEPARATOR:=':'} ;;
3294 echo "$as_me:3294: result: $PATH_SEPARATOR" >&5
3295 echo "${ECHO_T}$PATH_SEPARATOR" >&6
3297 echo "$as_me:3297: checking if you have specified an install-prefix" >&5
3298 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3300 # Check whether --with-install-prefix or --without-install-prefix was given.
3301 if test "${with_install_prefix+set}" = set; then
3302 withval="$with_install_prefix"
3306 (*) DESTDIR="$withval"
3310 echo "$as_me:3310: result: $DESTDIR" >&5
3311 echo "${ECHO_T}$DESTDIR" >&6
3313 ###############################################################################
3315 # If we're cross-compiling, allow the user to override the tools and their
3316 # options. The configure script is oriented toward identifying the host
3317 # compiler, etc., but we need a build compiler to generate parts of the source.
3319 if test "$cross_compiling" = yes ; then
3321 # defaults that we might want to override
3322 : ${BUILD_CFLAGS:=''}
3323 : ${BUILD_CPPFLAGS:=''}
3324 : ${BUILD_LDFLAGS:=''}
3326 : ${BUILD_EXEEXT:='$x'}
3327 : ${BUILD_OBJEXT:='o'}
3329 # Check whether --with-build-cc or --without-build-cc was given.
3330 if test "${with_build_cc+set}" = set; then
3331 withval="$with_build_cc"
3334 for ac_prog in gcc cc cl
3336 # Extract the first word of "$ac_prog", so it can be a program name with args.
3337 set dummy $ac_prog; ac_word=$2
3338 echo "$as_me:3338: checking for $ac_word" >&5
3339 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3340 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3341 echo $ECHO_N "(cached) $ECHO_C" >&6
3343 if test -n "$BUILD_CC"; then
3344 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3346 ac_save_IFS=$IFS; IFS=$ac_path_separator
3348 for ac_dir in $ac_dummy; do
3350 test -z "$ac_dir" && ac_dir=.
3351 $as_executable_p "$ac_dir/$ac_word" || continue
3352 ac_cv_prog_BUILD_CC="$ac_prog"
3353 echo "$as_me:3353: found $ac_dir/$ac_word" >&5
3359 BUILD_CC=$ac_cv_prog_BUILD_CC
3360 if test -n "$BUILD_CC"; then
3361 echo "$as_me:3361: result: $BUILD_CC" >&5
3362 echo "${ECHO_T}$BUILD_CC" >&6
3364 echo "$as_me:3364: result: no" >&5
3365 echo "${ECHO_T}no" >&6
3368 test -n "$BUILD_CC" && break
3372 echo "$as_me:3372: checking for native build C compiler" >&5
3373 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3374 echo "$as_me:3374: result: $BUILD_CC" >&5
3375 echo "${ECHO_T}$BUILD_CC" >&6
3377 echo "$as_me:3377: checking for native build C preprocessor" >&5
3378 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3380 # Check whether --with-build-cpp or --without-build-cpp was given.
3381 if test "${with_build_cpp+set}" = set; then
3382 withval="$with_build_cpp"
3383 BUILD_CPP="$withval"
3385 BUILD_CPP='${BUILD_CC} -E'
3387 echo "$as_me:3387: result: $BUILD_CPP" >&5
3388 echo "${ECHO_T}$BUILD_CPP" >&6
3390 echo "$as_me:3390: checking for native build C flags" >&5
3391 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3393 # Check whether --with-build-cflags or --without-build-cflags was given.
3394 if test "${with_build_cflags+set}" = set; then
3395 withval="$with_build_cflags"
3396 BUILD_CFLAGS="$withval"
3398 echo "$as_me:3398: result: $BUILD_CFLAGS" >&5
3399 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3401 echo "$as_me:3401: checking for native build C preprocessor-flags" >&5
3402 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3404 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3405 if test "${with_build_cppflags+set}" = set; then
3406 withval="$with_build_cppflags"
3407 BUILD_CPPFLAGS="$withval"
3409 echo "$as_me:3409: result: $BUILD_CPPFLAGS" >&5
3410 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3412 echo "$as_me:3412: checking for native build linker-flags" >&5
3413 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3415 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3416 if test "${with_build_ldflags+set}" = set; then
3417 withval="$with_build_ldflags"
3418 BUILD_LDFLAGS="$withval"
3420 echo "$as_me:3420: result: $BUILD_LDFLAGS" >&5
3421 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3423 echo "$as_me:3423: checking for native build linker-libraries" >&5
3424 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3426 # Check whether --with-build-libs or --without-build-libs was given.
3427 if test "${with_build_libs+set}" = set; then
3428 withval="$with_build_libs"
3429 BUILD_LIBS="$withval"
3431 echo "$as_me:3431: result: $BUILD_LIBS" >&5
3432 echo "${ECHO_T}$BUILD_LIBS" >&6
3434 # this assumes we're on Unix.
3438 : ${BUILD_CC:='${CC}'}
3440 if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3441 { { echo "$as_me:3441: error: Cross-build requires two compilers.
3442 Use --with-build-cc to specify the native compiler." >&5
3443 echo "$as_me: error: Cross-build requires two compilers.
3444 Use --with-build-cc to specify the native compiler." >&2;}
3445 { (exit 1); exit 1; }; }
3449 : ${BUILD_CC:='${CC}'}
3450 : ${BUILD_CPP:='${CPP}'}
3451 : ${BUILD_CFLAGS:='${CFLAGS}'}
3452 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3453 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3454 : ${BUILD_LIBS:='${LIBS}'}
3455 : ${BUILD_EXEEXT:='$x'}
3456 : ${BUILD_OBJEXT:='o'}
3459 ###############################################################################
3461 ### Options to allow the user to specify the set of libraries which are used.
3462 ### Use "--without-normal --with-shared" to allow the default model to be
3463 ### shared, for example.
3466 echo "$as_me:3466: checking if you want to build shared C-objects" >&5
3467 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
3469 # Check whether --with-shared or --without-shared was given.
3470 if test "${with_shared+set}" = set; then
3471 withval="$with_shared"
3472 with_shared=$withval
3476 echo "$as_me:3476: result: $with_shared" >&5
3477 echo "${ECHO_T}$with_shared" >&6
3478 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
3480 echo "$as_me:3480: checking for specified models" >&5
3481 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3482 test -z "$cf_list_models" && cf_list_models=normal
3483 echo "$as_me:3483: result: $cf_list_models" >&5
3484 echo "${ECHO_T}$cf_list_models" >&6
3486 ### Use the first model as the default, and save its suffix for use in building
3487 ### up test-applications.
3488 echo "$as_me:3488: checking for default model" >&5
3489 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3490 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3491 echo "$as_me:3491: result: $DFT_LWR_MODEL" >&5
3492 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3494 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3496 echo "$as_me:3496: checking for specific curses-directory" >&5
3497 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
3499 # Check whether --with-curses-dir or --without-curses-dir was given.
3500 if test "${with_curses_dir+set}" = set; then
3501 withval="$with_curses_dir"
3502 cf_cv_curses_dir=$withval
3506 echo "$as_me:3506: result: $cf_cv_curses_dir" >&5
3507 echo "${ECHO_T}$cf_cv_curses_dir" >&6
3509 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3512 if test "x$prefix" != xNONE; then
3513 cf_path_syntax="$prefix"
3515 cf_path_syntax="$ac_default_prefix"
3523 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3525 (.\${*prefix}*|.\${*dir}*)
3526 eval withval="$withval"
3529 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3534 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3537 { { echo "$as_me:3537: error: expected a pathname, not \"$withval\"" >&5
3538 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3539 { (exit 1); exit 1; }; }
3543 if test -d "$cf_cv_curses_dir"
3546 if test -n "$cf_cv_curses_dir/include" ; then
3547 for cf_add_incdir in $cf_cv_curses_dir/include
3549 while test $cf_add_incdir != /usr/include
3551 if test -d $cf_add_incdir
3554 if test -n "$CFLAGS$CPPFLAGS" ; then
3555 # a loop is needed to ensure we can add subdirs of existing dirs
3556 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3557 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3558 cf_have_incdir=yes; break
3563 if test "$cf_have_incdir" = no ; then
3564 if test "$cf_add_incdir" = /usr/local/include ; then
3565 if test "$GCC" = yes
3567 cf_save_CPPFLAGS=$CPPFLAGS
3568 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3569 cat >conftest.$ac_ext <<_ACEOF
3570 #line 3570 "configure"
3571 #include "confdefs.h"
3581 rm -f conftest.$ac_objext
3582 if { (eval echo "$as_me:3582: \"$ac_compile\"") >&5
3583 (eval $ac_compile) 2>&5
3585 echo "$as_me:3585: \$? = $ac_status" >&5
3586 (exit $ac_status); } &&
3587 { ac_try='test -s conftest.$ac_objext'
3588 { (eval echo "$as_me:3588: \"$ac_try\"") >&5
3591 echo "$as_me:3591: \$? = $ac_status" >&5
3592 (exit $ac_status); }; }; then
3595 echo "$as_me: failed program was:" >&5
3596 cat conftest.$ac_ext >&5
3599 rm -f conftest.$ac_objext conftest.$ac_ext
3600 CPPFLAGS=$cf_save_CPPFLAGS
3605 if test "$cf_have_incdir" = no ; then
3606 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3608 echo "${as_me:-configure}:3608: testing adding $cf_add_incdir to include-path ..." 1>&5
3610 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3612 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3613 test "$cf_top_incdir" = "$cf_add_incdir" && break
3614 cf_add_incdir="$cf_top_incdir"
3625 if test -n "$cf_cv_curses_dir/lib" ; then
3626 for cf_add_libdir in $cf_cv_curses_dir/lib
3628 if test $cf_add_libdir = /usr/lib ; then
3630 elif test -d $cf_add_libdir
3633 if test -n "$LDFLAGS$LIBS" ; then
3634 # a loop is needed to ensure we can add subdirs of existing dirs
3635 for cf_test_libdir in $LDFLAGS $LIBS ; do
3636 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3637 cf_have_libdir=yes; break
3641 if test "$cf_have_libdir" = no ; then
3642 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
3644 echo "${as_me:-configure}:3644: testing adding $cf_add_libdir to library-path ..." 1>&5
3646 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3655 cf_ncuconfig_root=ncurses
3656 cf_have_ncuconfig=no
3658 if test "x${PKG_CONFIG:=none}" != xnone; then
3659 echo "$as_me:3659: checking pkg-config for $cf_ncuconfig_root" >&5
3660 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
3661 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
3662 echo "$as_me:3662: result: yes" >&5
3663 echo "${ECHO_T}yes" >&6
3665 echo "$as_me:3665: checking if the $cf_ncuconfig_root package files work" >&5
3666 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
3667 cf_have_ncuconfig=unknown
3669 cf_save_CPPFLAGS="$CPPFLAGS"
3670 cf_save_LIBS="$LIBS"
3672 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
3674 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
3675 # Filter out duplicates - this happens with badly-designed ".pc" files...
3676 for cf_add_1lib in $LIBS
3678 for cf_add_2lib in $cf_add_libs
3680 if test "x$cf_add_1lib" = "x$cf_add_2lib"
3686 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
3690 cat >conftest.$ac_ext <<_ACEOF
3691 #line 3691 "configure"
3692 #include "confdefs.h"
3693 #include <${cf_cv_ncurses_header:-curses.h}>
3697 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
3702 rm -f conftest.$ac_objext conftest$ac_exeext
3703 if { (eval echo "$as_me:3703: \"$ac_link\"") >&5
3704 (eval $ac_link) 2>&5
3706 echo "$as_me:3706: \$? = $ac_status" >&5
3707 (exit $ac_status); } &&
3708 { ac_try='test -s conftest$ac_exeext'
3709 { (eval echo "$as_me:3709: \"$ac_try\"") >&5
3712 echo "$as_me:3712: \$? = $ac_status" >&5
3713 (exit $ac_status); }; }; then
3714 if test "$cross_compiling" = yes; then
3715 cf_have_ncuconfig=maybe
3717 cat >conftest.$ac_ext <<_ACEOF
3718 #line 3718 "configure"
3719 #include "confdefs.h"
3720 #include <${cf_cv_ncurses_header:-curses.h}>
3722 { char *xx = curses_version(); return (xx == 0); }
3724 rm -f conftest$ac_exeext
3725 if { (eval echo "$as_me:3725: \"$ac_link\"") >&5
3726 (eval $ac_link) 2>&5
3728 echo "$as_me:3728: \$? = $ac_status" >&5
3729 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3730 { (eval echo "$as_me:3730: \"$ac_try\"") >&5
3733 echo "$as_me:3733: \$? = $ac_status" >&5
3734 (exit $ac_status); }; }; then
3735 cf_have_ncuconfig=yes
3737 echo "$as_me: program exited with status $ac_status" >&5
3738 echo "$as_me: failed program was:" >&5
3739 cat conftest.$ac_ext >&5
3740 cf_have_ncuconfig=no
3742 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3745 echo "$as_me: failed program was:" >&5
3746 cat conftest.$ac_ext >&5
3747 cf_have_ncuconfig=no
3749 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3750 echo "$as_me:3750: result: $cf_have_ncuconfig" >&5
3751 echo "${ECHO_T}$cf_have_ncuconfig" >&6
3752 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
3753 if test "$cf_have_ncuconfig" != "yes"
3755 CPPFLAGS="$cf_save_CPPFLAGS"
3756 LIBS="$cf_save_LIBS"
3757 NCURSES_CONFIG_PKG=none
3760 cat >>confdefs.h <<\EOF
3764 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
3768 echo "$as_me:3768: result: no" >&5
3769 echo "${ECHO_T}no" >&6
3770 NCURSES_CONFIG_PKG=none
3773 NCURSES_CONFIG_PKG=none
3776 if test "x$cf_have_ncuconfig" = "xno"; then
3777 echo "Looking for ${cf_ncuconfig_root}-config"
3779 if test -n "$ac_tool_prefix"; then
3780 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
3782 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3783 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3784 echo "$as_me:3784: checking for $ac_word" >&5
3785 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3786 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
3787 echo $ECHO_N "(cached) $ECHO_C" >&6
3789 if test -n "$NCURSES_CONFIG"; then
3790 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
3792 ac_save_IFS=$IFS; IFS=$ac_path_separator
3794 for ac_dir in $ac_dummy; do
3796 test -z "$ac_dir" && ac_dir=.
3797 $as_executable_p "$ac_dir/$ac_word" || continue
3798 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
3799 echo "$as_me:3799: found $ac_dir/$ac_word" >&5
3805 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
3806 if test -n "$NCURSES_CONFIG"; then
3807 echo "$as_me:3807: result: $NCURSES_CONFIG" >&5
3808 echo "${ECHO_T}$NCURSES_CONFIG" >&6
3810 echo "$as_me:3810: result: no" >&5
3811 echo "${ECHO_T}no" >&6
3814 test -n "$NCURSES_CONFIG" && break
3817 if test -z "$NCURSES_CONFIG"; then
3818 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
3819 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
3821 # Extract the first word of "$ac_prog", so it can be a program name with args.
3822 set dummy $ac_prog; ac_word=$2
3823 echo "$as_me:3823: checking for $ac_word" >&5
3824 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3825 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
3826 echo $ECHO_N "(cached) $ECHO_C" >&6
3828 if test -n "$ac_ct_NCURSES_CONFIG"; then
3829 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
3831 ac_save_IFS=$IFS; IFS=$ac_path_separator
3833 for ac_dir in $ac_dummy; do
3835 test -z "$ac_dir" && ac_dir=.
3836 $as_executable_p "$ac_dir/$ac_word" || continue
3837 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
3838 echo "$as_me:3838: found $ac_dir/$ac_word" >&5
3844 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
3845 if test -n "$ac_ct_NCURSES_CONFIG"; then
3846 echo "$as_me:3846: result: $ac_ct_NCURSES_CONFIG" >&5
3847 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
3849 echo "$as_me:3849: result: no" >&5
3850 echo "${ECHO_T}no" >&6
3853 test -n "$ac_ct_NCURSES_CONFIG" && break
3855 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
3857 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
3860 if test "$NCURSES_CONFIG" != none ; then
3862 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
3864 cf_add_libs="`$NCURSES_CONFIG --libs`"
3865 # Filter out duplicates - this happens with badly-designed ".pc" files...
3866 for cf_add_1lib in $LIBS
3868 for cf_add_2lib in $cf_add_libs
3870 if test "x$cf_add_1lib" = "x$cf_add_2lib"
3876 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
3880 # even with config script, some packages use no-override for curses.h
3882 echo "$as_me:3882: checking if we have identified curses headers" >&5
3883 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
3884 if test "${cf_cv_ncurses_header+set}" = set; then
3885 echo $ECHO_N "(cached) $ECHO_C" >&6
3888 cf_cv_ncurses_header=none
3890 ncurses.h ncurses/ncurses.h \
3891 curses.h ncurses/curses.h
3893 cat >conftest.$ac_ext <<_ACEOF
3894 #line 3894 "configure"
3895 #include "confdefs.h"
3896 #include <${cf_header}>
3900 initscr(); tgoto("?", 0,0)
3905 rm -f conftest.$ac_objext
3906 if { (eval echo "$as_me:3906: \"$ac_compile\"") >&5
3907 (eval $ac_compile) 2>&5
3909 echo "$as_me:3909: \$? = $ac_status" >&5
3910 (exit $ac_status); } &&
3911 { ac_try='test -s conftest.$ac_objext'
3912 { (eval echo "$as_me:3912: \"$ac_try\"") >&5
3915 echo "$as_me:3915: \$? = $ac_status" >&5
3916 (exit $ac_status); }; }; then
3917 cf_cv_ncurses_header=$cf_header; break
3919 echo "$as_me: failed program was:" >&5
3920 cat conftest.$ac_ext >&5
3922 rm -f conftest.$ac_objext conftest.$ac_ext
3926 echo "$as_me:3926: result: $cf_cv_ncurses_header" >&5
3927 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
3929 if test "$cf_cv_ncurses_header" = none ; then
3930 { { echo "$as_me:3930: error: No curses header-files found" >&5
3931 echo "$as_me: error: No curses header-files found" >&2;}
3932 { (exit 1); exit 1; }; }
3935 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
3937 for ac_header in $cf_cv_ncurses_header
3939 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3940 echo "$as_me:3940: checking for $ac_header" >&5
3941 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3942 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3943 echo $ECHO_N "(cached) $ECHO_C" >&6
3945 cat >conftest.$ac_ext <<_ACEOF
3946 #line 3946 "configure"
3947 #include "confdefs.h"
3948 #include <$ac_header>
3950 if { (eval echo "$as_me:3950: \"$ac_cpp conftest.$ac_ext\"") >&5
3951 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3953 egrep -v '^ *\+' conftest.er1 >conftest.err
3955 cat conftest.err >&5
3956 echo "$as_me:3956: \$? = $ac_status" >&5
3957 (exit $ac_status); } >/dev/null; then
3958 if test -s conftest.err; then
3959 ac_cpp_err=$ac_c_preproc_warn_flag
3966 if test -z "$ac_cpp_err"; then
3967 eval "$as_ac_Header=yes"
3969 echo "$as_me: failed program was:" >&5
3970 cat conftest.$ac_ext >&5
3971 eval "$as_ac_Header=no"
3973 rm -f conftest.err conftest.$ac_ext
3975 echo "$as_me:3975: result: `eval echo '${'$as_ac_Header'}'`" >&5
3976 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3977 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3978 cat >>confdefs.h <<EOF
3979 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3985 cat >>confdefs.h <<\EOF
3989 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3991 cat >>confdefs.h <<EOF
3992 #define $cf_nculib_ROOT 1
3995 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
3999 cf_ncuhdr_root=ncurses
4001 test -n "$cf_cv_curses_dir" && \
4002 test "$cf_cv_curses_dir" != "no" && { \
4004 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4005 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4007 while test $cf_add_incdir != /usr/include
4009 if test -d $cf_add_incdir
4012 if test -n "$CFLAGS$CPPFLAGS" ; then
4013 # a loop is needed to ensure we can add subdirs of existing dirs
4014 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4015 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4016 cf_have_incdir=yes; break
4021 if test "$cf_have_incdir" = no ; then
4022 if test "$cf_add_incdir" = /usr/local/include ; then
4023 if test "$GCC" = yes
4025 cf_save_CPPFLAGS=$CPPFLAGS
4026 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4027 cat >conftest.$ac_ext <<_ACEOF
4028 #line 4028 "configure"
4029 #include "confdefs.h"
4039 rm -f conftest.$ac_objext
4040 if { (eval echo "$as_me:4040: \"$ac_compile\"") >&5
4041 (eval $ac_compile) 2>&5
4043 echo "$as_me:4043: \$? = $ac_status" >&5
4044 (exit $ac_status); } &&
4045 { ac_try='test -s conftest.$ac_objext'
4046 { (eval echo "$as_me:4046: \"$ac_try\"") >&5
4049 echo "$as_me:4049: \$? = $ac_status" >&5
4050 (exit $ac_status); }; }; then
4053 echo "$as_me: failed program was:" >&5
4054 cat conftest.$ac_ext >&5
4057 rm -f conftest.$ac_objext conftest.$ac_ext
4058 CPPFLAGS=$cf_save_CPPFLAGS
4063 if test "$cf_have_incdir" = no ; then
4064 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4066 echo "${as_me:-configure}:4066: testing adding $cf_add_incdir to include-path ..." 1>&5
4068 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4070 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4071 test "$cf_top_incdir" = "$cf_add_incdir" && break
4072 cf_add_incdir="$cf_top_incdir"
4085 echo "$as_me:4085: checking for $cf_ncuhdr_root header in include-path" >&5
4086 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4087 if test "${cf_cv_ncurses_h+set}" = set; then
4088 echo $ECHO_N "(cached) $ECHO_C" >&6
4091 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4092 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4093 for cf_header in $cf_header_list
4096 cat >conftest.$ac_ext <<_ACEOF
4097 #line 4097 "configure"
4098 #include "confdefs.h"
4100 #include <$cf_header>
4105 #ifdef NCURSES_VERSION
4107 printf("%s\n", NCURSES_VERSION);
4120 rm -f conftest.$ac_objext
4121 if { (eval echo "$as_me:4121: \"$ac_compile\"") >&5
4122 (eval $ac_compile) 2>&5
4124 echo "$as_me:4124: \$? = $ac_status" >&5
4125 (exit $ac_status); } &&
4126 { ac_try='test -s conftest.$ac_objext'
4127 { (eval echo "$as_me:4127: \"$ac_try\"") >&5
4130 echo "$as_me:4130: \$? = $ac_status" >&5
4131 (exit $ac_status); }; }; then
4132 cf_cv_ncurses_h=$cf_header
4135 echo "$as_me: failed program was:" >&5
4136 cat conftest.$ac_ext >&5
4139 rm -f conftest.$ac_objext conftest.$ac_ext
4141 test "$cf_cv_ncurses_h" != no && break
4145 echo "$as_me:4145: result: $cf_cv_ncurses_h" >&5
4146 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4148 if test "$cf_cv_ncurses_h" != no ; then
4149 cf_cv_ncurses_header=$cf_cv_ncurses_h
4152 echo "$as_me:4152: checking for $cf_ncuhdr_root include-path" >&5
4153 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4154 if test "${cf_cv_ncurses_h2+set}" = set; then
4155 echo $ECHO_N "(cached) $ECHO_C" >&6
4158 test -n "$verbose" && echo
4162 # collect the current set of include-directories from compiler flags
4163 cf_header_path_list=""
4164 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4165 for cf_header_path in $CPPFLAGS $CFLAGS
4167 case $cf_header_path in
4169 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4171 test "x$cf_header_path" != "xNONE" && \
4172 test -d "$cf_header_path" && \
4174 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
4175 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
4176 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4177 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4178 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4179 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"
4182 cf_header_path_list="$cf_header_path_list $cf_search"
4188 # add the variations for the package we are looking for
4192 test "x$prefix" != "xNONE" && \
4193 test -d "$prefix" && \
4195 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
4196 test -d $prefix/include && cf_search="$cf_search $prefix/include"
4197 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4198 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4199 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4200 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4203 for cf_subdir_prefix in \
4212 test "x$cf_subdir_prefix" != "x$prefix" && \
4213 test -d "$cf_subdir_prefix" && \
4214 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
4215 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
4216 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
4217 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
4218 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
4219 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
4220 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"
4225 test "$includedir" != NONE && \
4226 test "$includedir" != "/usr/include" && \
4227 test -d "$includedir" && {
4228 test -d $includedir && cf_search="$cf_search $includedir"
4229 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4232 test "$oldincludedir" != NONE && \
4233 test "$oldincludedir" != "/usr/include" && \
4234 test -d "$oldincludedir" && {
4235 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
4236 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4239 cf_search="$cf_search $cf_header_path_list"
4241 test -n "$verbose" && echo search path $cf_search
4242 cf_save2_CPPFLAGS="$CPPFLAGS"
4243 for cf_incdir in $cf_search
4246 if test -n "$cf_incdir" ; then
4247 for cf_add_incdir in $cf_incdir
4249 while test $cf_add_incdir != /usr/include
4251 if test -d $cf_add_incdir
4254 if test -n "$CFLAGS$CPPFLAGS" ; then
4255 # a loop is needed to ensure we can add subdirs of existing dirs
4256 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4257 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4258 cf_have_incdir=yes; break
4263 if test "$cf_have_incdir" = no ; then
4264 if test "$cf_add_incdir" = /usr/local/include ; then
4265 if test "$GCC" = yes
4267 cf_save_CPPFLAGS=$CPPFLAGS
4268 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4269 cat >conftest.$ac_ext <<_ACEOF
4270 #line 4270 "configure"
4271 #include "confdefs.h"
4281 rm -f conftest.$ac_objext
4282 if { (eval echo "$as_me:4282: \"$ac_compile\"") >&5
4283 (eval $ac_compile) 2>&5
4285 echo "$as_me:4285: \$? = $ac_status" >&5
4286 (exit $ac_status); } &&
4287 { ac_try='test -s conftest.$ac_objext'
4288 { (eval echo "$as_me:4288: \"$ac_try\"") >&5
4291 echo "$as_me:4291: \$? = $ac_status" >&5
4292 (exit $ac_status); }; }; then
4295 echo "$as_me: failed program was:" >&5
4296 cat conftest.$ac_ext >&5
4299 rm -f conftest.$ac_objext conftest.$ac_ext
4300 CPPFLAGS=$cf_save_CPPFLAGS
4305 if test "$cf_have_incdir" = no ; then
4306 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4308 echo "${as_me:-configure}:4308: testing adding $cf_add_incdir to include-path ..." 1>&5
4310 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4312 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4313 test "$cf_top_incdir" = "$cf_add_incdir" && break
4314 cf_add_incdir="$cf_top_incdir"
4330 cat >conftest.$ac_ext <<_ACEOF
4331 #line 4331 "configure"
4332 #include "confdefs.h"
4334 #include <$cf_header>
4339 #ifdef NCURSES_VERSION
4341 printf("%s\n", NCURSES_VERSION);
4354 rm -f conftest.$ac_objext
4355 if { (eval echo "$as_me:4355: \"$ac_compile\"") >&5
4356 (eval $ac_compile) 2>&5
4358 echo "$as_me:4358: \$? = $ac_status" >&5
4359 (exit $ac_status); } &&
4360 { ac_try='test -s conftest.$ac_objext'
4361 { (eval echo "$as_me:4361: \"$ac_try\"") >&5
4364 echo "$as_me:4364: \$? = $ac_status" >&5
4365 (exit $ac_status); }; }; then
4366 cf_cv_ncurses_h2=$cf_header
4369 echo "$as_me: failed program was:" >&5
4370 cat conftest.$ac_ext >&5
4373 rm -f conftest.$ac_objext conftest.$ac_ext
4375 if test "$cf_cv_ncurses_h2" != no ; then
4376 cf_cv_ncurses_h2=$cf_incdir/$cf_header
4377 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
4380 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
4382 CPPFLAGS="$cf_save2_CPPFLAGS"
4383 test "$cf_cv_ncurses_h2" != no && break
4385 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:4385: error: not found" >&5
4386 echo "$as_me: error: not found" >&2;}
4387 { (exit 1); exit 1; }; }
4390 echo "$as_me:4390: result: $cf_cv_ncurses_h2" >&5
4391 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
4393 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
4394 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
4395 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
4396 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
4399 if test -n "$cf_1st_incdir" ; then
4400 for cf_add_incdir in $cf_1st_incdir
4402 while test $cf_add_incdir != /usr/include
4404 if test -d $cf_add_incdir
4407 if test -n "$CFLAGS$CPPFLAGS" ; then
4408 # a loop is needed to ensure we can add subdirs of existing dirs
4409 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4410 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4411 cf_have_incdir=yes; break
4416 if test "$cf_have_incdir" = no ; then
4417 if test "$cf_add_incdir" = /usr/local/include ; then
4418 if test "$GCC" = yes
4420 cf_save_CPPFLAGS=$CPPFLAGS
4421 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4422 cat >conftest.$ac_ext <<_ACEOF
4423 #line 4423 "configure"
4424 #include "confdefs.h"
4434 rm -f conftest.$ac_objext
4435 if { (eval echo "$as_me:4435: \"$ac_compile\"") >&5
4436 (eval $ac_compile) 2>&5
4438 echo "$as_me:4438: \$? = $ac_status" >&5
4439 (exit $ac_status); } &&
4440 { ac_try='test -s conftest.$ac_objext'
4441 { (eval echo "$as_me:4441: \"$ac_try\"") >&5
4444 echo "$as_me:4444: \$? = $ac_status" >&5
4445 (exit $ac_status); }; }; then
4448 echo "$as_me: failed program was:" >&5
4449 cat conftest.$ac_ext >&5
4452 rm -f conftest.$ac_objext conftest.$ac_ext
4453 CPPFLAGS=$cf_save_CPPFLAGS
4458 if test "$cf_have_incdir" = no ; then
4459 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4461 echo "${as_me:-configure}:4461: testing adding $cf_add_incdir to include-path ..." 1>&5
4463 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4465 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4466 test "$cf_top_incdir" = "$cf_add_incdir" && break
4467 cf_add_incdir="$cf_top_incdir"
4480 # Set definitions to allow ifdef'ing for ncurses.h
4482 case $cf_cv_ncurses_header in
4485 cat >>confdefs.h <<\EOF
4486 #define HAVE_NCURSES_H 1
4492 case $cf_cv_ncurses_header in
4493 (ncurses/curses.h|ncurses/ncurses.h)
4495 cat >>confdefs.h <<\EOF
4496 #define HAVE_NCURSES_NCURSES_H 1
4500 (ncursesw/curses.h|ncursesw/ncurses.h)
4502 cat >>confdefs.h <<\EOF
4503 #define HAVE_NCURSESW_NCURSES_H 1
4509 echo "$as_me:4509: checking for terminfo header" >&5
4510 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4511 if test "${cf_cv_term_header+set}" = set; then
4512 echo $ECHO_N "(cached) $ECHO_C" >&6
4515 case ${cf_cv_ncurses_header} in
4516 (*/ncurses.h|*/ncursesw.h)
4517 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4520 cf_term_header=term.h
4524 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4526 cat >conftest.$ac_ext <<_ACEOF
4527 #line 4527 "configure"
4528 #include "confdefs.h"
4530 #include <${cf_cv_ncurses_header:-curses.h}>
4536 int x = auto_left_margin
4541 rm -f conftest.$ac_objext
4542 if { (eval echo "$as_me:4542: \"$ac_compile\"") >&5
4543 (eval $ac_compile) 2>&5
4545 echo "$as_me:4545: \$? = $ac_status" >&5
4546 (exit $ac_status); } &&
4547 { ac_try='test -s conftest.$ac_objext'
4548 { (eval echo "$as_me:4548: \"$ac_try\"") >&5
4551 echo "$as_me:4551: \$? = $ac_status" >&5
4552 (exit $ac_status); }; }; then
4554 cf_cv_term_header="$cf_test"
4556 echo "$as_me: failed program was:" >&5
4557 cat conftest.$ac_ext >&5
4559 cf_cv_term_header=unknown
4562 rm -f conftest.$ac_objext conftest.$ac_ext
4563 test "$cf_cv_term_header" != unknown && break
4567 echo "$as_me:4567: result: $cf_cv_term_header" >&5
4568 echo "${ECHO_T}$cf_cv_term_header" >&6
4570 # Set definitions to allow ifdef'ing to accommodate subdirectories
4572 case $cf_cv_term_header in
4575 cat >>confdefs.h <<\EOF
4576 #define HAVE_TERM_H 1
4582 case $cf_cv_term_header in
4585 cat >>confdefs.h <<\EOF
4586 #define HAVE_NCURSES_TERM_H 1
4592 cat >>confdefs.h <<\EOF
4593 #define HAVE_NCURSESW_TERM_H 1
4599 # some applications need this, but should check for NCURSES_VERSION
4601 cat >>confdefs.h <<\EOF
4605 echo "$as_me:4605: checking for ncurses version" >&5
4606 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
4607 if test "${cf_cv_ncurses_version+set}" = set; then
4608 echo $ECHO_N "(cached) $ECHO_C" >&6
4611 cf_cv_ncurses_version=no
4614 if test "$cross_compiling" = yes; then
4616 # This will not work if the preprocessor splits the line after the
4617 # Autoconf token. The 'unproto' program does that.
4618 cat > conftest.$ac_ext <<EOF
4619 #include <${cf_cv_ncurses_header:-curses.h}>
4621 #ifdef NCURSES_VERSION
4622 Autoconf NCURSES_VERSION
4630 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4631 { (eval echo "$as_me:4631: \"$cf_try\"") >&5
4634 echo "$as_me:4634: \$? = $ac_status" >&5
4635 (exit $ac_status); }
4636 if test -f conftest.out ; then
4637 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4638 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4643 cat >conftest.$ac_ext <<_ACEOF
4644 #line 4644 "configure"
4645 #include "confdefs.h"
4647 #include <${cf_cv_ncurses_header:-curses.h}>
4651 FILE *fp = fopen("$cf_tempfile", "w");
4652 #ifdef NCURSES_VERSION
4653 # ifdef NCURSES_VERSION_PATCH
4654 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
4656 fprintf(fp, "%s\n", NCURSES_VERSION);
4660 fprintf(fp, "old\n");
4665 ${cf_cv_main_return:-return}(0);
4668 rm -f conftest$ac_exeext
4669 if { (eval echo "$as_me:4669: \"$ac_link\"") >&5
4670 (eval $ac_link) 2>&5
4672 echo "$as_me:4672: \$? = $ac_status" >&5
4673 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4674 { (eval echo "$as_me:4674: \"$ac_try\"") >&5
4677 echo "$as_me:4677: \$? = $ac_status" >&5
4678 (exit $ac_status); }; }; then
4680 cf_cv_ncurses_version=`cat $cf_tempfile`
4682 echo "$as_me: program exited with status $ac_status" >&5
4683 echo "$as_me: failed program was:" >&5
4684 cat conftest.$ac_ext >&5
4686 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4691 echo "$as_me:4691: result: $cf_cv_ncurses_version" >&5
4692 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
4693 test "$cf_cv_ncurses_version" = no ||
4694 cat >>confdefs.h <<\EOF
4698 cf_nculib_root=ncurses
4699 # This works, except for the special case where we find gpm, but
4700 # ncurses is in a nonstandard location via $LIBS, and we really want
4703 cf_ncurses_SAVE="$LIBS"
4704 echo "$as_me:4704: checking for Gpm_Open in -lgpm" >&5
4705 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4706 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4707 echo $ECHO_N "(cached) $ECHO_C" >&6
4709 ac_check_lib_save_LIBS=$LIBS
4711 cat >conftest.$ac_ext <<_ACEOF
4712 #line 4712 "configure"
4713 #include "confdefs.h"
4715 /* Override any gcc2 internal prototype to avoid an error. */
4719 /* We use char because int might match the return type of a gcc2
4720 builtin and then its argument prototype would still apply. */
4730 rm -f conftest.$ac_objext conftest$ac_exeext
4731 if { (eval echo "$as_me:4731: \"$ac_link\"") >&5
4732 (eval $ac_link) 2>&5
4734 echo "$as_me:4734: \$? = $ac_status" >&5
4735 (exit $ac_status); } &&
4736 { ac_try='test -s conftest$ac_exeext'
4737 { (eval echo "$as_me:4737: \"$ac_try\"") >&5
4740 echo "$as_me:4740: \$? = $ac_status" >&5
4741 (exit $ac_status); }; }; then
4742 ac_cv_lib_gpm_Gpm_Open=yes
4744 echo "$as_me: failed program was:" >&5
4745 cat conftest.$ac_ext >&5
4746 ac_cv_lib_gpm_Gpm_Open=no
4748 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4749 LIBS=$ac_check_lib_save_LIBS
4751 echo "$as_me:4751: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4752 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4753 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4754 echo "$as_me:4754: checking for initscr in -lgpm" >&5
4755 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
4756 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
4757 echo $ECHO_N "(cached) $ECHO_C" >&6
4759 ac_check_lib_save_LIBS=$LIBS
4761 cat >conftest.$ac_ext <<_ACEOF
4762 #line 4762 "configure"
4763 #include "confdefs.h"
4765 /* Override any gcc2 internal prototype to avoid an error. */
4769 /* We use char because int might match the return type of a gcc2
4770 builtin and then its argument prototype would still apply. */
4780 rm -f conftest.$ac_objext conftest$ac_exeext
4781 if { (eval echo "$as_me:4781: \"$ac_link\"") >&5
4782 (eval $ac_link) 2>&5
4784 echo "$as_me:4784: \$? = $ac_status" >&5
4785 (exit $ac_status); } &&
4786 { ac_try='test -s conftest$ac_exeext'
4787 { (eval echo "$as_me:4787: \"$ac_try\"") >&5
4790 echo "$as_me:4790: \$? = $ac_status" >&5
4791 (exit $ac_status); }; }; then
4792 ac_cv_lib_gpm_initscr=yes
4794 echo "$as_me: failed program was:" >&5
4795 cat conftest.$ac_ext >&5
4796 ac_cv_lib_gpm_initscr=no
4798 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4799 LIBS=$ac_check_lib_save_LIBS
4801 echo "$as_me:4801: result: $ac_cv_lib_gpm_initscr" >&5
4802 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
4803 if test $ac_cv_lib_gpm_initscr = yes; then
4804 LIBS="$cf_ncurses_SAVE"
4806 cf_ncurses_LIBS="-lgpm"
4813 # This is only necessary if you are linking against an obsolete
4814 # version of ncurses (but it should do no harm, since it's static).
4815 if test "$cf_nculib_root" = ncurses ; then
4816 echo "$as_me:4816: checking for tgoto in -lmytinfo" >&5
4817 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
4818 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
4819 echo $ECHO_N "(cached) $ECHO_C" >&6
4821 ac_check_lib_save_LIBS=$LIBS
4822 LIBS="-lmytinfo $LIBS"
4823 cat >conftest.$ac_ext <<_ACEOF
4824 #line 4824 "configure"
4825 #include "confdefs.h"
4827 /* Override any gcc2 internal prototype to avoid an error. */
4831 /* We use char because int might match the return type of a gcc2
4832 builtin and then its argument prototype would still apply. */
4842 rm -f conftest.$ac_objext conftest$ac_exeext
4843 if { (eval echo "$as_me:4843: \"$ac_link\"") >&5
4844 (eval $ac_link) 2>&5
4846 echo "$as_me:4846: \$? = $ac_status" >&5
4847 (exit $ac_status); } &&
4848 { ac_try='test -s conftest$ac_exeext'
4849 { (eval echo "$as_me:4849: \"$ac_try\"") >&5
4852 echo "$as_me:4852: \$? = $ac_status" >&5
4853 (exit $ac_status); }; }; then
4854 ac_cv_lib_mytinfo_tgoto=yes
4856 echo "$as_me: failed program was:" >&5
4857 cat conftest.$ac_ext >&5
4858 ac_cv_lib_mytinfo_tgoto=no
4860 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4861 LIBS=$ac_check_lib_save_LIBS
4863 echo "$as_me:4863: result: $ac_cv_lib_mytinfo_tgoto" >&5
4864 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
4865 if test $ac_cv_lib_mytinfo_tgoto = yes; then
4866 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
4873 cf_add_libs="$cf_ncurses_LIBS"
4874 # Filter out duplicates - this happens with badly-designed ".pc" files...
4875 for cf_add_1lib in $LIBS
4877 for cf_add_2lib in $cf_add_libs
4879 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4885 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4889 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4892 cf_add_libs="-l$cf_nculib_root"
4893 # Filter out duplicates - this happens with badly-designed ".pc" files...
4894 for cf_add_1lib in $LIBS
4896 for cf_add_2lib in $cf_add_libs
4898 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4904 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4910 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
4912 echo "$as_me:4912: checking for initscr" >&5
4913 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
4914 if test "${ac_cv_func_initscr+set}" = set; then
4915 echo $ECHO_N "(cached) $ECHO_C" >&6
4917 cat >conftest.$ac_ext <<_ACEOF
4918 #line 4918 "configure"
4919 #include "confdefs.h"
4920 /* System header to define __stub macros and hopefully few prototypes,
4921 which can conflict with char initscr (); below. */
4923 /* Override any gcc2 internal prototype to avoid an error. */
4927 /* We use char because int might match the return type of a gcc2
4928 builtin and then its argument prototype would still apply. */
4935 /* The GNU C library defines this for functions which it implements
4936 to always fail with ENOSYS. Some functions are actually named
4937 something starting with __ and the normal name is an alias. */
4938 #if defined (__stub_initscr) || defined (__stub___initscr)
4941 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
4948 rm -f conftest.$ac_objext conftest$ac_exeext
4949 if { (eval echo "$as_me:4949: \"$ac_link\"") >&5
4950 (eval $ac_link) 2>&5
4952 echo "$as_me:4952: \$? = $ac_status" >&5
4953 (exit $ac_status); } &&
4954 { ac_try='test -s conftest$ac_exeext'
4955 { (eval echo "$as_me:4955: \"$ac_try\"") >&5
4958 echo "$as_me:4958: \$? = $ac_status" >&5
4959 (exit $ac_status); }; }; then
4960 ac_cv_func_initscr=yes
4962 echo "$as_me: failed program was:" >&5
4963 cat conftest.$ac_ext >&5
4964 ac_cv_func_initscr=no
4966 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4968 echo "$as_me:4968: result: $ac_cv_func_initscr" >&5
4969 echo "${ECHO_T}$ac_cv_func_initscr" >&6
4970 if test $ac_cv_func_initscr = yes; then
4971 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4974 cf_save_LIBS="$LIBS"
4975 echo "$as_me:4975: checking for initscr in -l$cf_nculib_root" >&5
4976 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
4977 LIBS="-l$cf_nculib_root $LIBS"
4978 cat >conftest.$ac_ext <<_ACEOF
4979 #line 4979 "configure"
4980 #include "confdefs.h"
4981 #include <${cf_cv_ncurses_header:-curses.h}>
4990 rm -f conftest.$ac_objext conftest$ac_exeext
4991 if { (eval echo "$as_me:4991: \"$ac_link\"") >&5
4992 (eval $ac_link) 2>&5
4994 echo "$as_me:4994: \$? = $ac_status" >&5
4995 (exit $ac_status); } &&
4996 { ac_try='test -s conftest$ac_exeext'
4997 { (eval echo "$as_me:4997: \"$ac_try\"") >&5
5000 echo "$as_me:5000: \$? = $ac_status" >&5
5001 (exit $ac_status); }; }; then
5002 echo "$as_me:5002: result: yes" >&5
5003 echo "${ECHO_T}yes" >&6
5004 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5007 echo "$as_me: failed program was:" >&5
5008 cat conftest.$ac_ext >&5
5009 echo "$as_me:5009: result: no" >&5
5010 echo "${ECHO_T}no" >&6
5013 cf_library_path_list=""
5014 if test -n "${LDFLAGS}${LIBS}" ; then
5015 for cf_library_path in $LDFLAGS $LIBS
5017 case $cf_library_path in
5019 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5021 test "x$cf_library_path" != "xNONE" && \
5022 test -d "$cf_library_path" && \
5024 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
5025 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
5026 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5027 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5028 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5029 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"
5032 cf_library_path_list="$cf_library_path_list $cf_search"
5040 test "x$prefix" != "xNONE" && \
5041 test -d "$prefix" && \
5043 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5044 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5045 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5046 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5047 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5048 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5051 for cf_subdir_prefix in \
5060 test "x$cf_subdir_prefix" != "x$prefix" && \
5061 test -d "$cf_subdir_prefix" && \
5062 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5063 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
5064 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
5065 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
5066 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
5067 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
5068 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"
5073 cf_search="$cf_library_path_list $cf_search"
5075 for cf_libdir in $cf_search
5077 echo "$as_me:5077: checking for -l$cf_nculib_root in $cf_libdir" >&5
5078 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5079 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5080 cat >conftest.$ac_ext <<_ACEOF
5081 #line 5081 "configure"
5082 #include "confdefs.h"
5083 #include <${cf_cv_ncurses_header:-curses.h}>
5092 rm -f conftest.$ac_objext conftest$ac_exeext
5093 if { (eval echo "$as_me:5093: \"$ac_link\"") >&5
5094 (eval $ac_link) 2>&5
5096 echo "$as_me:5096: \$? = $ac_status" >&5
5097 (exit $ac_status); } &&
5098 { ac_try='test -s conftest$ac_exeext'
5099 { (eval echo "$as_me:5099: \"$ac_try\"") >&5
5102 echo "$as_me:5102: \$? = $ac_status" >&5
5103 (exit $ac_status); }; }; then
5104 echo "$as_me:5104: result: yes" >&5
5105 echo "${ECHO_T}yes" >&6
5106 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5109 echo "$as_me: failed program was:" >&5
5110 cat conftest.$ac_ext >&5
5111 echo "$as_me:5111: result: no" >&5
5112 echo "${ECHO_T}no" >&6
5113 LIBS="$cf_save_LIBS"
5115 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5119 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5123 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5125 if test $cf_found_library = no ; then
5126 { { echo "$as_me:5126: error: Cannot link $cf_nculib_root library" >&5
5127 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5128 { (exit 1); exit 1; }; }
5133 if test -n "$cf_ncurses_LIBS" ; then
5134 echo "$as_me:5134: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5135 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5136 cf_ncurses_SAVE="$LIBS"
5137 for p in $cf_ncurses_LIBS ; do
5138 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5139 if test "$q" != "$LIBS" ; then
5143 cat >conftest.$ac_ext <<_ACEOF
5144 #line 5144 "configure"
5145 #include "confdefs.h"
5146 #include <${cf_cv_ncurses_header:-curses.h}>
5150 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5155 rm -f conftest.$ac_objext conftest$ac_exeext
5156 if { (eval echo "$as_me:5156: \"$ac_link\"") >&5
5157 (eval $ac_link) 2>&5
5159 echo "$as_me:5159: \$? = $ac_status" >&5
5160 (exit $ac_status); } &&
5161 { ac_try='test -s conftest$ac_exeext'
5162 { (eval echo "$as_me:5162: \"$ac_try\"") >&5
5165 echo "$as_me:5165: \$? = $ac_status" >&5
5166 (exit $ac_status); }; }; then
5167 echo "$as_me:5167: result: yes" >&5
5168 echo "${ECHO_T}yes" >&6
5170 echo "$as_me: failed program was:" >&5
5171 cat conftest.$ac_ext >&5
5172 echo "$as_me:5172: result: no" >&5
5173 echo "${ECHO_T}no" >&6
5174 LIBS="$cf_ncurses_SAVE"
5176 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5179 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5181 cat >>confdefs.h <<EOF
5182 #define $cf_nculib_ROOT 1
5190 echo "$as_me:5190: checking if you want wide-character code" >&5
5191 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
5193 # Check whether --enable-widec or --disable-widec was given.
5194 if test "${enable_widec+set}" = set; then
5195 enableval="$enable_widec"
5196 with_widec=$enableval
5200 echo "$as_me:5200: result: $with_widec" >&5
5201 echo "${ECHO_T}$with_widec" >&6
5202 if test "$with_widec" = yes ; then
5204 echo "$as_me:5204: checking for multibyte character support" >&5
5205 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
5206 if test "${cf_cv_utf8_lib+set}" = set; then
5207 echo $ECHO_N "(cached) $ECHO_C" >&6
5210 cf_save_LIBS="$LIBS"
5211 cat >conftest.$ac_ext <<_ACEOF
5212 #line 5212 "configure"
5213 #include "confdefs.h"
5224 rm -f conftest.$ac_objext conftest$ac_exeext
5225 if { (eval echo "$as_me:5225: \"$ac_link\"") >&5
5226 (eval $ac_link) 2>&5
5228 echo "$as_me:5228: \$? = $ac_status" >&5
5229 (exit $ac_status); } &&
5230 { ac_try='test -s conftest$ac_exeext'
5231 { (eval echo "$as_me:5231: \"$ac_try\"") >&5
5234 echo "$as_me:5234: \$? = $ac_status" >&5
5235 (exit $ac_status); }; }; then
5238 echo "$as_me: failed program was:" >&5
5239 cat conftest.$ac_ext >&5
5241 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
5242 # will be set on completion of the AC_TRY_LINK below.
5243 cf_cv_header_path_utf8=
5244 cf_cv_library_path_utf8=
5246 echo "${as_me:-configure}:5246: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
5248 cf_save_LIBS="$LIBS"
5250 cat >conftest.$ac_ext <<_ACEOF
5251 #line 5251 "configure"
5252 #include "confdefs.h"
5254 #include <libutf8.h>
5263 rm -f conftest.$ac_objext conftest$ac_exeext
5264 if { (eval echo "$as_me:5264: \"$ac_link\"") >&5
5265 (eval $ac_link) 2>&5
5267 echo "$as_me:5267: \$? = $ac_status" >&5
5268 (exit $ac_status); } &&
5269 { ac_try='test -s conftest$ac_exeext'
5270 { (eval echo "$as_me:5270: \"$ac_try\"") >&5
5273 echo "$as_me:5273: \$? = $ac_status" >&5
5274 (exit $ac_status); }; }; then
5276 cf_cv_find_linkage_utf8=yes
5277 cf_cv_header_path_utf8=/usr/include
5278 cf_cv_library_path_utf8=/usr/lib
5281 echo "$as_me: failed program was:" >&5
5282 cat conftest.$ac_ext >&5
5284 LIBS="-lutf8 $cf_save_LIBS"
5286 cat >conftest.$ac_ext <<_ACEOF
5287 #line 5287 "configure"
5288 #include "confdefs.h"
5290 #include <libutf8.h>
5299 rm -f conftest.$ac_objext conftest$ac_exeext
5300 if { (eval echo "$as_me:5300: \"$ac_link\"") >&5
5301 (eval $ac_link) 2>&5
5303 echo "$as_me:5303: \$? = $ac_status" >&5
5304 (exit $ac_status); } &&
5305 { ac_try='test -s conftest$ac_exeext'
5306 { (eval echo "$as_me:5306: \"$ac_try\"") >&5
5309 echo "$as_me:5309: \$? = $ac_status" >&5
5310 (exit $ac_status); }; }; then
5312 cf_cv_find_linkage_utf8=yes
5313 cf_cv_header_path_utf8=/usr/include
5314 cf_cv_library_path_utf8=/usr/lib
5315 cf_cv_library_file_utf8="-lutf8"
5318 echo "$as_me: failed program was:" >&5
5319 cat conftest.$ac_ext >&5
5321 cf_cv_find_linkage_utf8=no
5322 LIBS="$cf_save_LIBS"
5324 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
5326 echo "${as_me:-configure}:5326: testing find linkage for utf8 library ..." 1>&5
5328 echo "${as_me:-configure}:5328: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
5330 cf_save_CPPFLAGS="$CPPFLAGS"
5331 cf_test_CPPFLAGS="$CPPFLAGS"
5335 # collect the current set of include-directories from compiler flags
5336 cf_header_path_list=""
5337 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5338 for cf_header_path in $CPPFLAGS $CFLAGS
5340 case $cf_header_path in
5342 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5344 test "x$cf_header_path" != "xNONE" && \
5345 test -d "$cf_header_path" && \
5347 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5348 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5349 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
5350 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
5351 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
5352 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
5355 cf_header_path_list="$cf_header_path_list $cf_search"
5361 # add the variations for the package we are looking for
5365 test "x$prefix" != "xNONE" && \
5366 test -d "$prefix" && \
5368 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5369 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5370 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
5371 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
5372 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
5373 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
5376 for cf_subdir_prefix in \
5385 test "x$cf_subdir_prefix" != "x$prefix" && \
5386 test -d "$cf_subdir_prefix" && \
5387 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5388 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5389 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
5390 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
5391 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
5392 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
5393 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
5398 test "$includedir" != NONE && \
5399 test "$includedir" != "/usr/include" && \
5400 test -d "$includedir" && {
5401 test -d $includedir && cf_search="$cf_search $includedir"
5402 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
5405 test "$oldincludedir" != NONE && \
5406 test "$oldincludedir" != "/usr/include" && \
5407 test -d "$oldincludedir" && {
5408 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5409 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
5412 cf_search="$cf_search $cf_header_path_list"
5414 for cf_cv_header_path_utf8 in $cf_search
5416 if test -d $cf_cv_header_path_utf8 ; then
5417 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
5419 echo "${as_me:-configure}:5419: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
5421 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
5422 cat >conftest.$ac_ext <<_ACEOF
5423 #line 5423 "configure"
5424 #include "confdefs.h"
5426 #include <libutf8.h>
5435 rm -f conftest.$ac_objext
5436 if { (eval echo "$as_me:5436: \"$ac_compile\"") >&5
5437 (eval $ac_compile) 2>&5
5439 echo "$as_me:5439: \$? = $ac_status" >&5
5440 (exit $ac_status); } &&
5441 { ac_try='test -s conftest.$ac_objext'
5442 { (eval echo "$as_me:5442: \"$ac_try\"") >&5
5445 echo "$as_me:5445: \$? = $ac_status" >&5
5446 (exit $ac_status); }; }; then
5448 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
5450 echo "${as_me:-configure}:5450: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
5452 cf_cv_find_linkage_utf8=maybe
5453 cf_test_CPPFLAGS="$CPPFLAGS"
5456 echo "$as_me: failed program was:" >&5
5457 cat conftest.$ac_ext >&5
5459 CPPFLAGS="$cf_save_CPPFLAGS"
5462 rm -f conftest.$ac_objext conftest.$ac_ext
5466 if test "$cf_cv_find_linkage_utf8" = maybe ; then
5468 echo "${as_me:-configure}:5468: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
5470 cf_save_LIBS="$LIBS"
5471 cf_save_LDFLAGS="$LDFLAGS"
5473 if test "$cf_cv_find_linkage_utf8" != yes ; then
5476 cf_library_path_list=""
5477 if test -n "${LDFLAGS}${LIBS}" ; then
5478 for cf_library_path in $LDFLAGS $LIBS
5480 case $cf_library_path in
5482 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5484 test "x$cf_library_path" != "xNONE" && \
5485 test -d "$cf_library_path" && \
5487 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
5488 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
5489 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
5490 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
5491 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
5492 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
5495 cf_library_path_list="$cf_library_path_list $cf_search"
5503 test "x$prefix" != "xNONE" && \
5504 test -d "$prefix" && \
5506 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5507 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5508 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
5509 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
5510 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
5511 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
5514 for cf_subdir_prefix in \
5523 test "x$cf_subdir_prefix" != "x$prefix" && \
5524 test -d "$cf_subdir_prefix" && \
5525 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5526 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
5527 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
5528 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
5529 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
5530 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
5531 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
5536 cf_search="$cf_library_path_list $cf_search"
5538 for cf_cv_library_path_utf8 in $cf_search
5540 if test -d $cf_cv_library_path_utf8 ; then
5541 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
5543 echo "${as_me:-configure}:5543: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
5545 CPPFLAGS="$cf_test_CPPFLAGS"
5546 LIBS="-lutf8 $cf_save_LIBS"
5547 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
5548 cat >conftest.$ac_ext <<_ACEOF
5549 #line 5549 "configure"
5550 #include "confdefs.h"
5552 #include <libutf8.h>
5561 rm -f conftest.$ac_objext conftest$ac_exeext
5562 if { (eval echo "$as_me:5562: \"$ac_link\"") >&5
5563 (eval $ac_link) 2>&5
5565 echo "$as_me:5565: \$? = $ac_status" >&5
5566 (exit $ac_status); } &&
5567 { ac_try='test -s conftest$ac_exeext'
5568 { (eval echo "$as_me:5568: \"$ac_try\"") >&5
5571 echo "$as_me:5571: \$? = $ac_status" >&5
5572 (exit $ac_status); }; }; then
5574 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
5576 echo "${as_me:-configure}:5576: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
5578 cf_cv_find_linkage_utf8=yes
5579 cf_cv_library_file_utf8="-lutf8"
5582 echo "$as_me: failed program was:" >&5
5583 cat conftest.$ac_ext >&5
5585 CPPFLAGS="$cf_save_CPPFLAGS"
5586 LIBS="$cf_save_LIBS"
5587 LDFLAGS="$cf_save_LDFLAGS"
5590 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5593 CPPFLAGS="$cf_save_CPPFLAGS"
5594 LDFLAGS="$cf_save_LDFLAGS"
5598 cf_cv_find_linkage_utf8=no
5602 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5605 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5607 LIBS="$cf_save_LIBS"
5609 if test "$cf_cv_find_linkage_utf8" = yes ; then
5610 cf_cv_utf8_lib=add-on
5616 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5618 echo "$as_me:5618: result: $cf_cv_utf8_lib" >&5
5619 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
5621 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
5623 if test "$cf_cv_utf8_lib" = "add-on" ; then
5625 cat >>confdefs.h <<\EOF
5626 #define HAVE_LIBUTF8_H 1
5629 if test -n "$cf_cv_header_path_utf8" ; then
5630 for cf_add_incdir in $cf_cv_header_path_utf8
5632 while test $cf_add_incdir != /usr/include
5634 if test -d $cf_add_incdir
5637 if test -n "$CFLAGS$CPPFLAGS" ; then
5638 # a loop is needed to ensure we can add subdirs of existing dirs
5639 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5640 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5641 cf_have_incdir=yes; break
5646 if test "$cf_have_incdir" = no ; then
5647 if test "$cf_add_incdir" = /usr/local/include ; then
5648 if test "$GCC" = yes
5650 cf_save_CPPFLAGS=$CPPFLAGS
5651 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5652 cat >conftest.$ac_ext <<_ACEOF
5653 #line 5653 "configure"
5654 #include "confdefs.h"
5664 rm -f conftest.$ac_objext
5665 if { (eval echo "$as_me:5665: \"$ac_compile\"") >&5
5666 (eval $ac_compile) 2>&5
5668 echo "$as_me:5668: \$? = $ac_status" >&5
5669 (exit $ac_status); } &&
5670 { ac_try='test -s conftest.$ac_objext'
5671 { (eval echo "$as_me:5671: \"$ac_try\"") >&5
5674 echo "$as_me:5674: \$? = $ac_status" >&5
5675 (exit $ac_status); }; }; then
5678 echo "$as_me: failed program was:" >&5
5679 cat conftest.$ac_ext >&5
5682 rm -f conftest.$ac_objext conftest.$ac_ext
5683 CPPFLAGS=$cf_save_CPPFLAGS
5688 if test "$cf_have_incdir" = no ; then
5689 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5691 echo "${as_me:-configure}:5691: testing adding $cf_add_incdir to include-path ..." 1>&5
5693 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5695 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5696 test "$cf_top_incdir" = "$cf_add_incdir" && break
5697 cf_add_incdir="$cf_top_incdir"
5708 if test -n "$cf_cv_library_path_utf8" ; then
5709 for cf_add_libdir in $cf_cv_library_path_utf8
5711 if test $cf_add_libdir = /usr/lib ; then
5713 elif test -d $cf_add_libdir
5716 if test -n "$LDFLAGS$LIBS" ; then
5717 # a loop is needed to ensure we can add subdirs of existing dirs
5718 for cf_test_libdir in $LDFLAGS $LIBS ; do
5719 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5720 cf_have_libdir=yes; break
5724 if test "$cf_have_libdir" = no ; then
5725 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5727 echo "${as_me:-configure}:5727: testing adding $cf_add_libdir to library-path ..." 1>&5
5729 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5735 cf_add_libs="$cf_cv_library_file_utf8"
5736 # Filter out duplicates - this happens with badly-designed ".pc" files...
5737 for cf_add_1lib in $LIBS
5739 for cf_add_2lib in $cf_add_libs
5741 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5747 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5753 cf_ncuconfig_root=ncursesw
5754 cf_have_ncuconfig=no
5756 if test "x${PKG_CONFIG:=none}" != xnone; then
5757 echo "$as_me:5757: checking pkg-config for $cf_ncuconfig_root" >&5
5758 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
5759 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
5760 echo "$as_me:5760: result: yes" >&5
5761 echo "${ECHO_T}yes" >&6
5763 echo "$as_me:5763: checking if the $cf_ncuconfig_root package files work" >&5
5764 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
5765 cf_have_ncuconfig=unknown
5767 cf_save_CPPFLAGS="$CPPFLAGS"
5768 cf_save_LIBS="$LIBS"
5770 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
5772 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
5773 # Filter out duplicates - this happens with badly-designed ".pc" files...
5774 for cf_add_1lib in $LIBS
5776 for cf_add_2lib in $cf_add_libs
5778 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5784 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5788 cat >conftest.$ac_ext <<_ACEOF
5789 #line 5789 "configure"
5790 #include "confdefs.h"
5791 #include <${cf_cv_ncurses_header:-curses.h}>
5795 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5800 rm -f conftest.$ac_objext conftest$ac_exeext
5801 if { (eval echo "$as_me:5801: \"$ac_link\"") >&5
5802 (eval $ac_link) 2>&5
5804 echo "$as_me:5804: \$? = $ac_status" >&5
5805 (exit $ac_status); } &&
5806 { ac_try='test -s conftest$ac_exeext'
5807 { (eval echo "$as_me:5807: \"$ac_try\"") >&5
5810 echo "$as_me:5810: \$? = $ac_status" >&5
5811 (exit $ac_status); }; }; then
5812 if test "$cross_compiling" = yes; then
5813 cf_have_ncuconfig=maybe
5815 cat >conftest.$ac_ext <<_ACEOF
5816 #line 5816 "configure"
5817 #include "confdefs.h"
5818 #include <${cf_cv_ncurses_header:-curses.h}>
5820 { char *xx = curses_version(); return (xx == 0); }
5822 rm -f conftest$ac_exeext
5823 if { (eval echo "$as_me:5823: \"$ac_link\"") >&5
5824 (eval $ac_link) 2>&5
5826 echo "$as_me:5826: \$? = $ac_status" >&5
5827 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5828 { (eval echo "$as_me:5828: \"$ac_try\"") >&5
5831 echo "$as_me:5831: \$? = $ac_status" >&5
5832 (exit $ac_status); }; }; then
5833 cf_have_ncuconfig=yes
5835 echo "$as_me: program exited with status $ac_status" >&5
5836 echo "$as_me: failed program was:" >&5
5837 cat conftest.$ac_ext >&5
5838 cf_have_ncuconfig=no
5840 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5843 echo "$as_me: failed program was:" >&5
5844 cat conftest.$ac_ext >&5
5845 cf_have_ncuconfig=no
5847 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5848 echo "$as_me:5848: result: $cf_have_ncuconfig" >&5
5849 echo "${ECHO_T}$cf_have_ncuconfig" >&6
5850 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
5851 if test "$cf_have_ncuconfig" != "yes"
5853 CPPFLAGS="$cf_save_CPPFLAGS"
5854 LIBS="$cf_save_LIBS"
5855 NCURSES_CONFIG_PKG=none
5858 cat >>confdefs.h <<\EOF
5862 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
5866 echo "$as_me:5866: result: no" >&5
5867 echo "${ECHO_T}no" >&6
5868 NCURSES_CONFIG_PKG=none
5871 NCURSES_CONFIG_PKG=none
5874 if test "x$cf_have_ncuconfig" = "xno"; then
5875 echo "Looking for ${cf_ncuconfig_root}-config"
5877 if test -n "$ac_tool_prefix"; then
5878 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5880 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5881 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5882 echo "$as_me:5882: checking for $ac_word" >&5
5883 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5884 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5885 echo $ECHO_N "(cached) $ECHO_C" >&6
5887 if test -n "$NCURSES_CONFIG"; then
5888 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5890 ac_save_IFS=$IFS; IFS=$ac_path_separator
5892 for ac_dir in $ac_dummy; do
5894 test -z "$ac_dir" && ac_dir=.
5895 $as_executable_p "$ac_dir/$ac_word" || continue
5896 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5897 echo "$as_me:5897: found $ac_dir/$ac_word" >&5
5903 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5904 if test -n "$NCURSES_CONFIG"; then
5905 echo "$as_me:5905: result: $NCURSES_CONFIG" >&5
5906 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5908 echo "$as_me:5908: result: no" >&5
5909 echo "${ECHO_T}no" >&6
5912 test -n "$NCURSES_CONFIG" && break
5915 if test -z "$NCURSES_CONFIG"; then
5916 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5917 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5919 # Extract the first word of "$ac_prog", so it can be a program name with args.
5920 set dummy $ac_prog; ac_word=$2
5921 echo "$as_me:5921: checking for $ac_word" >&5
5922 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5923 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5924 echo $ECHO_N "(cached) $ECHO_C" >&6
5926 if test -n "$ac_ct_NCURSES_CONFIG"; then
5927 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5929 ac_save_IFS=$IFS; IFS=$ac_path_separator
5931 for ac_dir in $ac_dummy; do
5933 test -z "$ac_dir" && ac_dir=.
5934 $as_executable_p "$ac_dir/$ac_word" || continue
5935 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5936 echo "$as_me:5936: found $ac_dir/$ac_word" >&5
5942 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5943 if test -n "$ac_ct_NCURSES_CONFIG"; then
5944 echo "$as_me:5944: result: $ac_ct_NCURSES_CONFIG" >&5
5945 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5947 echo "$as_me:5947: result: no" >&5
5948 echo "${ECHO_T}no" >&6
5951 test -n "$ac_ct_NCURSES_CONFIG" && break
5953 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5955 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5958 if test "$NCURSES_CONFIG" != none ; then
5960 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
5962 cf_add_libs="`$NCURSES_CONFIG --libs`"
5963 # Filter out duplicates - this happens with badly-designed ".pc" files...
5964 for cf_add_1lib in $LIBS
5966 for cf_add_2lib in $cf_add_libs
5968 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5974 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5978 # even with config script, some packages use no-override for curses.h
5980 echo "$as_me:5980: checking if we have identified curses headers" >&5
5981 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5982 if test "${cf_cv_ncurses_header+set}" = set; then
5983 echo $ECHO_N "(cached) $ECHO_C" >&6
5986 cf_cv_ncurses_header=none
5988 ncurses.h ncursesw/ncurses.h \
5989 curses.h ncursesw/curses.h
5991 cat >conftest.$ac_ext <<_ACEOF
5992 #line 5992 "configure"
5993 #include "confdefs.h"
5994 #include <${cf_header}>
5998 initscr(); tgoto("?", 0,0)
6003 rm -f conftest.$ac_objext
6004 if { (eval echo "$as_me:6004: \"$ac_compile\"") >&5
6005 (eval $ac_compile) 2>&5
6007 echo "$as_me:6007: \$? = $ac_status" >&5
6008 (exit $ac_status); } &&
6009 { ac_try='test -s conftest.$ac_objext'
6010 { (eval echo "$as_me:6010: \"$ac_try\"") >&5
6013 echo "$as_me:6013: \$? = $ac_status" >&5
6014 (exit $ac_status); }; }; then
6015 cf_cv_ncurses_header=$cf_header; break
6017 echo "$as_me: failed program was:" >&5
6018 cat conftest.$ac_ext >&5
6020 rm -f conftest.$ac_objext conftest.$ac_ext
6024 echo "$as_me:6024: result: $cf_cv_ncurses_header" >&5
6025 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6027 if test "$cf_cv_ncurses_header" = none ; then
6028 { { echo "$as_me:6028: error: No curses header-files found" >&5
6029 echo "$as_me: error: No curses header-files found" >&2;}
6030 { (exit 1); exit 1; }; }
6033 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6035 for ac_header in $cf_cv_ncurses_header
6037 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6038 echo "$as_me:6038: checking for $ac_header" >&5
6039 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6040 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6041 echo $ECHO_N "(cached) $ECHO_C" >&6
6043 cat >conftest.$ac_ext <<_ACEOF
6044 #line 6044 "configure"
6045 #include "confdefs.h"
6046 #include <$ac_header>
6048 if { (eval echo "$as_me:6048: \"$ac_cpp conftest.$ac_ext\"") >&5
6049 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6051 egrep -v '^ *\+' conftest.er1 >conftest.err
6053 cat conftest.err >&5
6054 echo "$as_me:6054: \$? = $ac_status" >&5
6055 (exit $ac_status); } >/dev/null; then
6056 if test -s conftest.err; then
6057 ac_cpp_err=$ac_c_preproc_warn_flag
6064 if test -z "$ac_cpp_err"; then
6065 eval "$as_ac_Header=yes"
6067 echo "$as_me: failed program was:" >&5
6068 cat conftest.$ac_ext >&5
6069 eval "$as_ac_Header=no"
6071 rm -f conftest.err conftest.$ac_ext
6073 echo "$as_me:6073: result: `eval echo '${'$as_ac_Header'}'`" >&5
6074 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6075 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6076 cat >>confdefs.h <<EOF
6077 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6083 cat >>confdefs.h <<\EOF
6087 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6089 cat >>confdefs.h <<EOF
6090 #define $cf_nculib_ROOT 1
6093 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6097 cf_ncuhdr_root=ncursesw
6099 test -n "$cf_cv_curses_dir" && \
6100 test "$cf_cv_curses_dir" != "no" && { \
6102 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6103 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6105 while test $cf_add_incdir != /usr/include
6107 if test -d $cf_add_incdir
6110 if test -n "$CFLAGS$CPPFLAGS" ; then
6111 # a loop is needed to ensure we can add subdirs of existing dirs
6112 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6113 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6114 cf_have_incdir=yes; break
6119 if test "$cf_have_incdir" = no ; then
6120 if test "$cf_add_incdir" = /usr/local/include ; then
6121 if test "$GCC" = yes
6123 cf_save_CPPFLAGS=$CPPFLAGS
6124 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6125 cat >conftest.$ac_ext <<_ACEOF
6126 #line 6126 "configure"
6127 #include "confdefs.h"
6137 rm -f conftest.$ac_objext
6138 if { (eval echo "$as_me:6138: \"$ac_compile\"") >&5
6139 (eval $ac_compile) 2>&5
6141 echo "$as_me:6141: \$? = $ac_status" >&5
6142 (exit $ac_status); } &&
6143 { ac_try='test -s conftest.$ac_objext'
6144 { (eval echo "$as_me:6144: \"$ac_try\"") >&5
6147 echo "$as_me:6147: \$? = $ac_status" >&5
6148 (exit $ac_status); }; }; then
6151 echo "$as_me: failed program was:" >&5
6152 cat conftest.$ac_ext >&5
6155 rm -f conftest.$ac_objext conftest.$ac_ext
6156 CPPFLAGS=$cf_save_CPPFLAGS
6161 if test "$cf_have_incdir" = no ; then
6162 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6164 echo "${as_me:-configure}:6164: testing adding $cf_add_incdir to include-path ..." 1>&5
6166 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6168 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6169 test "$cf_top_incdir" = "$cf_add_incdir" && break
6170 cf_add_incdir="$cf_top_incdir"
6183 echo "$as_me:6183: checking for $cf_ncuhdr_root header in include-path" >&5
6184 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6185 if test "${cf_cv_ncurses_h+set}" = set; then
6186 echo $ECHO_N "(cached) $ECHO_C" >&6
6189 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6190 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6191 for cf_header in $cf_header_list
6194 cat >conftest.$ac_ext <<_ACEOF
6195 #line 6195 "configure"
6196 #include "confdefs.h"
6198 #define _XOPEN_SOURCE_EXTENDED
6199 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
6200 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
6202 #include <$cf_header>
6207 #ifdef NCURSES_VERSION
6213 printf("%s\n", NCURSES_VERSION);
6226 rm -f conftest.$ac_objext
6227 if { (eval echo "$as_me:6227: \"$ac_compile\"") >&5
6228 (eval $ac_compile) 2>&5
6230 echo "$as_me:6230: \$? = $ac_status" >&5
6231 (exit $ac_status); } &&
6232 { ac_try='test -s conftest.$ac_objext'
6233 { (eval echo "$as_me:6233: \"$ac_try\"") >&5
6236 echo "$as_me:6236: \$? = $ac_status" >&5
6237 (exit $ac_status); }; }; then
6238 cf_cv_ncurses_h=$cf_header
6241 echo "$as_me: failed program was:" >&5
6242 cat conftest.$ac_ext >&5
6245 rm -f conftest.$ac_objext conftest.$ac_ext
6247 test "$cf_cv_ncurses_h" != no && break
6251 echo "$as_me:6251: result: $cf_cv_ncurses_h" >&5
6252 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6254 if test "$cf_cv_ncurses_h" != no ; then
6255 cf_cv_ncurses_header=$cf_cv_ncurses_h
6258 echo "$as_me:6258: checking for $cf_ncuhdr_root include-path" >&5
6259 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6260 if test "${cf_cv_ncurses_h2+set}" = set; then
6261 echo $ECHO_N "(cached) $ECHO_C" >&6
6264 test -n "$verbose" && echo
6268 # collect the current set of include-directories from compiler flags
6269 cf_header_path_list=""
6270 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6271 for cf_header_path in $CPPFLAGS $CFLAGS
6273 case $cf_header_path in
6275 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6277 test "x$cf_header_path" != "xNONE" && \
6278 test -d "$cf_header_path" && \
6280 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6281 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6282 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6283 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6284 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6285 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"
6288 cf_header_path_list="$cf_header_path_list $cf_search"
6294 # add the variations for the package we are looking for
6298 test "x$prefix" != "xNONE" && \
6299 test -d "$prefix" && \
6301 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6302 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6303 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6304 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6305 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6306 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6309 for cf_subdir_prefix in \
6318 test "x$cf_subdir_prefix" != "x$prefix" && \
6319 test -d "$cf_subdir_prefix" && \
6320 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6321 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6322 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6323 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
6324 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
6325 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
6326 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"
6331 test "$includedir" != NONE && \
6332 test "$includedir" != "/usr/include" && \
6333 test -d "$includedir" && {
6334 test -d $includedir && cf_search="$cf_search $includedir"
6335 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6338 test "$oldincludedir" != NONE && \
6339 test "$oldincludedir" != "/usr/include" && \
6340 test -d "$oldincludedir" && {
6341 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6342 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6345 cf_search="$cf_search $cf_header_path_list"
6347 test -n "$verbose" && echo search path $cf_search
6348 cf_save2_CPPFLAGS="$CPPFLAGS"
6349 for cf_incdir in $cf_search
6352 if test -n "$cf_incdir" ; then
6353 for cf_add_incdir in $cf_incdir
6355 while test $cf_add_incdir != /usr/include
6357 if test -d $cf_add_incdir
6360 if test -n "$CFLAGS$CPPFLAGS" ; then
6361 # a loop is needed to ensure we can add subdirs of existing dirs
6362 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6363 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6364 cf_have_incdir=yes; break
6369 if test "$cf_have_incdir" = no ; then
6370 if test "$cf_add_incdir" = /usr/local/include ; then
6371 if test "$GCC" = yes
6373 cf_save_CPPFLAGS=$CPPFLAGS
6374 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6375 cat >conftest.$ac_ext <<_ACEOF
6376 #line 6376 "configure"
6377 #include "confdefs.h"
6387 rm -f conftest.$ac_objext
6388 if { (eval echo "$as_me:6388: \"$ac_compile\"") >&5
6389 (eval $ac_compile) 2>&5
6391 echo "$as_me:6391: \$? = $ac_status" >&5
6392 (exit $ac_status); } &&
6393 { ac_try='test -s conftest.$ac_objext'
6394 { (eval echo "$as_me:6394: \"$ac_try\"") >&5
6397 echo "$as_me:6397: \$? = $ac_status" >&5
6398 (exit $ac_status); }; }; then
6401 echo "$as_me: failed program was:" >&5
6402 cat conftest.$ac_ext >&5
6405 rm -f conftest.$ac_objext conftest.$ac_ext
6406 CPPFLAGS=$cf_save_CPPFLAGS
6411 if test "$cf_have_incdir" = no ; then
6412 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6414 echo "${as_me:-configure}:6414: testing adding $cf_add_incdir to include-path ..." 1>&5
6416 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6418 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6419 test "$cf_top_incdir" = "$cf_add_incdir" && break
6420 cf_add_incdir="$cf_top_incdir"
6436 cat >conftest.$ac_ext <<_ACEOF
6437 #line 6437 "configure"
6438 #include "confdefs.h"
6440 #include <$cf_header>
6445 #ifdef NCURSES_VERSION
6447 printf("%s\n", NCURSES_VERSION);
6460 rm -f conftest.$ac_objext
6461 if { (eval echo "$as_me:6461: \"$ac_compile\"") >&5
6462 (eval $ac_compile) 2>&5
6464 echo "$as_me:6464: \$? = $ac_status" >&5
6465 (exit $ac_status); } &&
6466 { ac_try='test -s conftest.$ac_objext'
6467 { (eval echo "$as_me:6467: \"$ac_try\"") >&5
6470 echo "$as_me:6470: \$? = $ac_status" >&5
6471 (exit $ac_status); }; }; then
6472 cf_cv_ncurses_h2=$cf_header
6475 echo "$as_me: failed program was:" >&5
6476 cat conftest.$ac_ext >&5
6479 rm -f conftest.$ac_objext conftest.$ac_ext
6481 if test "$cf_cv_ncurses_h2" != no ; then
6482 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6483 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
6486 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
6488 CPPFLAGS="$cf_save2_CPPFLAGS"
6489 test "$cf_cv_ncurses_h2" != no && break
6491 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6491: error: not found" >&5
6492 echo "$as_me: error: not found" >&2;}
6493 { (exit 1); exit 1; }; }
6496 echo "$as_me:6496: result: $cf_cv_ncurses_h2" >&5
6497 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6499 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6500 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6501 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6502 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6505 if test -n "$cf_1st_incdir" ; then
6506 for cf_add_incdir in $cf_1st_incdir
6508 while test $cf_add_incdir != /usr/include
6510 if test -d $cf_add_incdir
6513 if test -n "$CFLAGS$CPPFLAGS" ; then
6514 # a loop is needed to ensure we can add subdirs of existing dirs
6515 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6516 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6517 cf_have_incdir=yes; break
6522 if test "$cf_have_incdir" = no ; then
6523 if test "$cf_add_incdir" = /usr/local/include ; then
6524 if test "$GCC" = yes
6526 cf_save_CPPFLAGS=$CPPFLAGS
6527 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6528 cat >conftest.$ac_ext <<_ACEOF
6529 #line 6529 "configure"
6530 #include "confdefs.h"
6540 rm -f conftest.$ac_objext
6541 if { (eval echo "$as_me:6541: \"$ac_compile\"") >&5
6542 (eval $ac_compile) 2>&5
6544 echo "$as_me:6544: \$? = $ac_status" >&5
6545 (exit $ac_status); } &&
6546 { ac_try='test -s conftest.$ac_objext'
6547 { (eval echo "$as_me:6547: \"$ac_try\"") >&5
6550 echo "$as_me:6550: \$? = $ac_status" >&5
6551 (exit $ac_status); }; }; then
6554 echo "$as_me: failed program was:" >&5
6555 cat conftest.$ac_ext >&5
6558 rm -f conftest.$ac_objext conftest.$ac_ext
6559 CPPFLAGS=$cf_save_CPPFLAGS
6564 if test "$cf_have_incdir" = no ; then
6565 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6567 echo "${as_me:-configure}:6567: testing adding $cf_add_incdir to include-path ..." 1>&5
6569 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6571 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6572 test "$cf_top_incdir" = "$cf_add_incdir" && break
6573 cf_add_incdir="$cf_top_incdir"
6586 # Set definitions to allow ifdef'ing for ncurses.h
6588 case $cf_cv_ncurses_header in
6591 cat >>confdefs.h <<\EOF
6592 #define HAVE_NCURSES_H 1
6598 case $cf_cv_ncurses_header in
6599 (ncurses/curses.h|ncurses/ncurses.h)
6601 cat >>confdefs.h <<\EOF
6602 #define HAVE_NCURSES_NCURSES_H 1
6606 (ncursesw/curses.h|ncursesw/ncurses.h)
6608 cat >>confdefs.h <<\EOF
6609 #define HAVE_NCURSESW_NCURSES_H 1
6615 echo "$as_me:6615: checking for terminfo header" >&5
6616 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6617 if test "${cf_cv_term_header+set}" = set; then
6618 echo $ECHO_N "(cached) $ECHO_C" >&6
6621 case ${cf_cv_ncurses_header} in
6622 (*/ncurses.h|*/ncursesw.h)
6623 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6626 cf_term_header=term.h
6630 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6632 cat >conftest.$ac_ext <<_ACEOF
6633 #line 6633 "configure"
6634 #include "confdefs.h"
6636 #include <${cf_cv_ncurses_header:-curses.h}>
6642 int x = auto_left_margin
6647 rm -f conftest.$ac_objext
6648 if { (eval echo "$as_me:6648: \"$ac_compile\"") >&5
6649 (eval $ac_compile) 2>&5
6651 echo "$as_me:6651: \$? = $ac_status" >&5
6652 (exit $ac_status); } &&
6653 { ac_try='test -s conftest.$ac_objext'
6654 { (eval echo "$as_me:6654: \"$ac_try\"") >&5
6657 echo "$as_me:6657: \$? = $ac_status" >&5
6658 (exit $ac_status); }; }; then
6660 cf_cv_term_header="$cf_test"
6662 echo "$as_me: failed program was:" >&5
6663 cat conftest.$ac_ext >&5
6665 cf_cv_term_header=unknown
6668 rm -f conftest.$ac_objext conftest.$ac_ext
6669 test "$cf_cv_term_header" != unknown && break
6673 echo "$as_me:6673: result: $cf_cv_term_header" >&5
6674 echo "${ECHO_T}$cf_cv_term_header" >&6
6676 # Set definitions to allow ifdef'ing to accommodate subdirectories
6678 case $cf_cv_term_header in
6681 cat >>confdefs.h <<\EOF
6682 #define HAVE_TERM_H 1
6688 case $cf_cv_term_header in
6691 cat >>confdefs.h <<\EOF
6692 #define HAVE_NCURSES_TERM_H 1
6698 cat >>confdefs.h <<\EOF
6699 #define HAVE_NCURSESW_TERM_H 1
6705 # some applications need this, but should check for NCURSES_VERSION
6707 cat >>confdefs.h <<\EOF
6711 echo "$as_me:6711: checking for ncurses version" >&5
6712 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6713 if test "${cf_cv_ncurses_version+set}" = set; then
6714 echo $ECHO_N "(cached) $ECHO_C" >&6
6717 cf_cv_ncurses_version=no
6720 if test "$cross_compiling" = yes; then
6722 # This will not work if the preprocessor splits the line after the
6723 # Autoconf token. The 'unproto' program does that.
6724 cat > conftest.$ac_ext <<EOF
6725 #include <${cf_cv_ncurses_header:-curses.h}>
6727 #ifdef NCURSES_VERSION
6728 Autoconf NCURSES_VERSION
6736 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6737 { (eval echo "$as_me:6737: \"$cf_try\"") >&5
6740 echo "$as_me:6740: \$? = $ac_status" >&5
6741 (exit $ac_status); }
6742 if test -f conftest.out ; then
6743 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6744 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6749 cat >conftest.$ac_ext <<_ACEOF
6750 #line 6750 "configure"
6751 #include "confdefs.h"
6753 #include <${cf_cv_ncurses_header:-curses.h}>
6757 FILE *fp = fopen("$cf_tempfile", "w");
6758 #ifdef NCURSES_VERSION
6759 # ifdef NCURSES_VERSION_PATCH
6760 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6762 fprintf(fp, "%s\n", NCURSES_VERSION);
6766 fprintf(fp, "old\n");
6771 ${cf_cv_main_return:-return}(0);
6774 rm -f conftest$ac_exeext
6775 if { (eval echo "$as_me:6775: \"$ac_link\"") >&5
6776 (eval $ac_link) 2>&5
6778 echo "$as_me:6778: \$? = $ac_status" >&5
6779 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6780 { (eval echo "$as_me:6780: \"$ac_try\"") >&5
6783 echo "$as_me:6783: \$? = $ac_status" >&5
6784 (exit $ac_status); }; }; then
6786 cf_cv_ncurses_version=`cat $cf_tempfile`
6788 echo "$as_me: program exited with status $ac_status" >&5
6789 echo "$as_me: failed program was:" >&5
6790 cat conftest.$ac_ext >&5
6792 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6797 echo "$as_me:6797: result: $cf_cv_ncurses_version" >&5
6798 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6799 test "$cf_cv_ncurses_version" = no ||
6800 cat >>confdefs.h <<\EOF
6804 cf_nculib_root=ncursesw
6805 # This works, except for the special case where we find gpm, but
6806 # ncurses is in a nonstandard location via $LIBS, and we really want
6809 cf_ncurses_SAVE="$LIBS"
6810 echo "$as_me:6810: checking for Gpm_Open in -lgpm" >&5
6811 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6812 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6813 echo $ECHO_N "(cached) $ECHO_C" >&6
6815 ac_check_lib_save_LIBS=$LIBS
6817 cat >conftest.$ac_ext <<_ACEOF
6818 #line 6818 "configure"
6819 #include "confdefs.h"
6821 /* Override any gcc2 internal prototype to avoid an error. */
6825 /* We use char because int might match the return type of a gcc2
6826 builtin and then its argument prototype would still apply. */
6836 rm -f conftest.$ac_objext conftest$ac_exeext
6837 if { (eval echo "$as_me:6837: \"$ac_link\"") >&5
6838 (eval $ac_link) 2>&5
6840 echo "$as_me:6840: \$? = $ac_status" >&5
6841 (exit $ac_status); } &&
6842 { ac_try='test -s conftest$ac_exeext'
6843 { (eval echo "$as_me:6843: \"$ac_try\"") >&5
6846 echo "$as_me:6846: \$? = $ac_status" >&5
6847 (exit $ac_status); }; }; then
6848 ac_cv_lib_gpm_Gpm_Open=yes
6850 echo "$as_me: failed program was:" >&5
6851 cat conftest.$ac_ext >&5
6852 ac_cv_lib_gpm_Gpm_Open=no
6854 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6855 LIBS=$ac_check_lib_save_LIBS
6857 echo "$as_me:6857: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6858 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6859 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6860 echo "$as_me:6860: checking for initscr in -lgpm" >&5
6861 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6862 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6863 echo $ECHO_N "(cached) $ECHO_C" >&6
6865 ac_check_lib_save_LIBS=$LIBS
6867 cat >conftest.$ac_ext <<_ACEOF
6868 #line 6868 "configure"
6869 #include "confdefs.h"
6871 /* Override any gcc2 internal prototype to avoid an error. */
6875 /* We use char because int might match the return type of a gcc2
6876 builtin and then its argument prototype would still apply. */
6886 rm -f conftest.$ac_objext conftest$ac_exeext
6887 if { (eval echo "$as_me:6887: \"$ac_link\"") >&5
6888 (eval $ac_link) 2>&5
6890 echo "$as_me:6890: \$? = $ac_status" >&5
6891 (exit $ac_status); } &&
6892 { ac_try='test -s conftest$ac_exeext'
6893 { (eval echo "$as_me:6893: \"$ac_try\"") >&5
6896 echo "$as_me:6896: \$? = $ac_status" >&5
6897 (exit $ac_status); }; }; then
6898 ac_cv_lib_gpm_initscr=yes
6900 echo "$as_me: failed program was:" >&5
6901 cat conftest.$ac_ext >&5
6902 ac_cv_lib_gpm_initscr=no
6904 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6905 LIBS=$ac_check_lib_save_LIBS
6907 echo "$as_me:6907: result: $ac_cv_lib_gpm_initscr" >&5
6908 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6909 if test $ac_cv_lib_gpm_initscr = yes; then
6910 LIBS="$cf_ncurses_SAVE"
6912 cf_ncurses_LIBS="-lgpm"
6919 # This is only necessary if you are linking against an obsolete
6920 # version of ncurses (but it should do no harm, since it's static).
6921 if test "$cf_nculib_root" = ncurses ; then
6922 echo "$as_me:6922: checking for tgoto in -lmytinfo" >&5
6923 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6924 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6925 echo $ECHO_N "(cached) $ECHO_C" >&6
6927 ac_check_lib_save_LIBS=$LIBS
6928 LIBS="-lmytinfo $LIBS"
6929 cat >conftest.$ac_ext <<_ACEOF
6930 #line 6930 "configure"
6931 #include "confdefs.h"
6933 /* Override any gcc2 internal prototype to avoid an error. */
6937 /* We use char because int might match the return type of a gcc2
6938 builtin and then its argument prototype would still apply. */
6948 rm -f conftest.$ac_objext conftest$ac_exeext
6949 if { (eval echo "$as_me:6949: \"$ac_link\"") >&5
6950 (eval $ac_link) 2>&5
6952 echo "$as_me:6952: \$? = $ac_status" >&5
6953 (exit $ac_status); } &&
6954 { ac_try='test -s conftest$ac_exeext'
6955 { (eval echo "$as_me:6955: \"$ac_try\"") >&5
6958 echo "$as_me:6958: \$? = $ac_status" >&5
6959 (exit $ac_status); }; }; then
6960 ac_cv_lib_mytinfo_tgoto=yes
6962 echo "$as_me: failed program was:" >&5
6963 cat conftest.$ac_ext >&5
6964 ac_cv_lib_mytinfo_tgoto=no
6966 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6967 LIBS=$ac_check_lib_save_LIBS
6969 echo "$as_me:6969: result: $ac_cv_lib_mytinfo_tgoto" >&5
6970 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6971 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6972 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6979 cf_add_libs="$cf_ncurses_LIBS"
6980 # Filter out duplicates - this happens with badly-designed ".pc" files...
6981 for cf_add_1lib in $LIBS
6983 for cf_add_2lib in $cf_add_libs
6985 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6991 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6995 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
6998 cf_add_libs="-l$cf_nculib_root"
6999 # Filter out duplicates - this happens with badly-designed ".pc" files...
7000 for cf_add_1lib in $LIBS
7002 for cf_add_2lib in $cf_add_libs
7004 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7010 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7016 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7018 echo "$as_me:7018: checking for initscr" >&5
7019 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7020 if test "${ac_cv_func_initscr+set}" = set; then
7021 echo $ECHO_N "(cached) $ECHO_C" >&6
7023 cat >conftest.$ac_ext <<_ACEOF
7024 #line 7024 "configure"
7025 #include "confdefs.h"
7026 /* System header to define __stub macros and hopefully few prototypes,
7027 which can conflict with char initscr (); below. */
7029 /* Override any gcc2 internal prototype to avoid an error. */
7033 /* We use char because int might match the return type of a gcc2
7034 builtin and then its argument prototype would still apply. */
7041 /* The GNU C library defines this for functions which it implements
7042 to always fail with ENOSYS. Some functions are actually named
7043 something starting with __ and the normal name is an alias. */
7044 #if defined (__stub_initscr) || defined (__stub___initscr)
7047 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7054 rm -f conftest.$ac_objext conftest$ac_exeext
7055 if { (eval echo "$as_me:7055: \"$ac_link\"") >&5
7056 (eval $ac_link) 2>&5
7058 echo "$as_me:7058: \$? = $ac_status" >&5
7059 (exit $ac_status); } &&
7060 { ac_try='test -s conftest$ac_exeext'
7061 { (eval echo "$as_me:7061: \"$ac_try\"") >&5
7064 echo "$as_me:7064: \$? = $ac_status" >&5
7065 (exit $ac_status); }; }; then
7066 ac_cv_func_initscr=yes
7068 echo "$as_me: failed program was:" >&5
7069 cat conftest.$ac_ext >&5
7070 ac_cv_func_initscr=no
7072 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7074 echo "$as_me:7074: result: $ac_cv_func_initscr" >&5
7075 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7076 if test $ac_cv_func_initscr = yes; then
7077 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7080 cf_save_LIBS="$LIBS"
7081 echo "$as_me:7081: checking for initscr in -l$cf_nculib_root" >&5
7082 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7083 LIBS="-l$cf_nculib_root $LIBS"
7084 cat >conftest.$ac_ext <<_ACEOF
7085 #line 7085 "configure"
7086 #include "confdefs.h"
7087 #include <${cf_cv_ncurses_header:-curses.h}>
7096 rm -f conftest.$ac_objext conftest$ac_exeext
7097 if { (eval echo "$as_me:7097: \"$ac_link\"") >&5
7098 (eval $ac_link) 2>&5
7100 echo "$as_me:7100: \$? = $ac_status" >&5
7101 (exit $ac_status); } &&
7102 { ac_try='test -s conftest$ac_exeext'
7103 { (eval echo "$as_me:7103: \"$ac_try\"") >&5
7106 echo "$as_me:7106: \$? = $ac_status" >&5
7107 (exit $ac_status); }; }; then
7108 echo "$as_me:7108: result: yes" >&5
7109 echo "${ECHO_T}yes" >&6
7110 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7113 echo "$as_me: failed program was:" >&5
7114 cat conftest.$ac_ext >&5
7115 echo "$as_me:7115: result: no" >&5
7116 echo "${ECHO_T}no" >&6
7119 cf_library_path_list=""
7120 if test -n "${LDFLAGS}${LIBS}" ; then
7121 for cf_library_path in $LDFLAGS $LIBS
7123 case $cf_library_path in
7125 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7127 test "x$cf_library_path" != "xNONE" && \
7128 test -d "$cf_library_path" && \
7130 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7131 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7132 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7133 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7134 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7135 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"
7138 cf_library_path_list="$cf_library_path_list $cf_search"
7146 test "x$prefix" != "xNONE" && \
7147 test -d "$prefix" && \
7149 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7150 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7151 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7152 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7153 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7154 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7157 for cf_subdir_prefix in \
7166 test "x$cf_subdir_prefix" != "x$prefix" && \
7167 test -d "$cf_subdir_prefix" && \
7168 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7169 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7170 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
7171 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
7172 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
7173 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
7174 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"
7179 cf_search="$cf_library_path_list $cf_search"
7181 for cf_libdir in $cf_search
7183 echo "$as_me:7183: checking for -l$cf_nculib_root in $cf_libdir" >&5
7184 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7185 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7186 cat >conftest.$ac_ext <<_ACEOF
7187 #line 7187 "configure"
7188 #include "confdefs.h"
7189 #include <${cf_cv_ncurses_header:-curses.h}>
7198 rm -f conftest.$ac_objext conftest$ac_exeext
7199 if { (eval echo "$as_me:7199: \"$ac_link\"") >&5
7200 (eval $ac_link) 2>&5
7202 echo "$as_me:7202: \$? = $ac_status" >&5
7203 (exit $ac_status); } &&
7204 { ac_try='test -s conftest$ac_exeext'
7205 { (eval echo "$as_me:7205: \"$ac_try\"") >&5
7208 echo "$as_me:7208: \$? = $ac_status" >&5
7209 (exit $ac_status); }; }; then
7210 echo "$as_me:7210: result: yes" >&5
7211 echo "${ECHO_T}yes" >&6
7212 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7215 echo "$as_me: failed program was:" >&5
7216 cat conftest.$ac_ext >&5
7217 echo "$as_me:7217: result: no" >&5
7218 echo "${ECHO_T}no" >&6
7219 LIBS="$cf_save_LIBS"
7221 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7225 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7229 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7231 if test $cf_found_library = no ; then
7232 { { echo "$as_me:7232: error: Cannot link $cf_nculib_root library" >&5
7233 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7234 { (exit 1); exit 1; }; }
7239 if test -n "$cf_ncurses_LIBS" ; then
7240 echo "$as_me:7240: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7241 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7242 cf_ncurses_SAVE="$LIBS"
7243 for p in $cf_ncurses_LIBS ; do
7244 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7245 if test "$q" != "$LIBS" ; then
7249 cat >conftest.$ac_ext <<_ACEOF
7250 #line 7250 "configure"
7251 #include "confdefs.h"
7252 #include <${cf_cv_ncurses_header:-curses.h}>
7256 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7261 rm -f conftest.$ac_objext conftest$ac_exeext
7262 if { (eval echo "$as_me:7262: \"$ac_link\"") >&5
7263 (eval $ac_link) 2>&5
7265 echo "$as_me:7265: \$? = $ac_status" >&5
7266 (exit $ac_status); } &&
7267 { ac_try='test -s conftest$ac_exeext'
7268 { (eval echo "$as_me:7268: \"$ac_try\"") >&5
7271 echo "$as_me:7271: \$? = $ac_status" >&5
7272 (exit $ac_status); }; }; then
7273 echo "$as_me:7273: result: yes" >&5
7274 echo "${ECHO_T}yes" >&6
7276 echo "$as_me: failed program was:" >&5
7277 cat conftest.$ac_ext >&5
7278 echo "$as_me:7278: result: no" >&5
7279 echo "${ECHO_T}no" >&6
7280 LIBS="$cf_ncurses_SAVE"
7282 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7285 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7287 cat >>confdefs.h <<EOF
7288 #define $cf_nculib_ROOT 1
7298 cf_ncuconfig_root=ncurses
7299 cf_have_ncuconfig=no
7301 if test "x${PKG_CONFIG:=none}" != xnone; then
7302 echo "$as_me:7302: checking pkg-config for $cf_ncuconfig_root" >&5
7303 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7304 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7305 echo "$as_me:7305: result: yes" >&5
7306 echo "${ECHO_T}yes" >&6
7308 echo "$as_me:7308: checking if the $cf_ncuconfig_root package files work" >&5
7309 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7310 cf_have_ncuconfig=unknown
7312 cf_save_CPPFLAGS="$CPPFLAGS"
7313 cf_save_LIBS="$LIBS"
7315 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7317 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7318 # Filter out duplicates - this happens with badly-designed ".pc" files...
7319 for cf_add_1lib in $LIBS
7321 for cf_add_2lib in $cf_add_libs
7323 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7329 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7333 cat >conftest.$ac_ext <<_ACEOF
7334 #line 7334 "configure"
7335 #include "confdefs.h"
7336 #include <${cf_cv_ncurses_header:-curses.h}>
7340 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7345 rm -f conftest.$ac_objext conftest$ac_exeext
7346 if { (eval echo "$as_me:7346: \"$ac_link\"") >&5
7347 (eval $ac_link) 2>&5
7349 echo "$as_me:7349: \$? = $ac_status" >&5
7350 (exit $ac_status); } &&
7351 { ac_try='test -s conftest$ac_exeext'
7352 { (eval echo "$as_me:7352: \"$ac_try\"") >&5
7355 echo "$as_me:7355: \$? = $ac_status" >&5
7356 (exit $ac_status); }; }; then
7357 if test "$cross_compiling" = yes; then
7358 cf_have_ncuconfig=maybe
7360 cat >conftest.$ac_ext <<_ACEOF
7361 #line 7361 "configure"
7362 #include "confdefs.h"
7363 #include <${cf_cv_ncurses_header:-curses.h}>
7365 { char *xx = curses_version(); return (xx == 0); }
7367 rm -f conftest$ac_exeext
7368 if { (eval echo "$as_me:7368: \"$ac_link\"") >&5
7369 (eval $ac_link) 2>&5
7371 echo "$as_me:7371: \$? = $ac_status" >&5
7372 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7373 { (eval echo "$as_me:7373: \"$ac_try\"") >&5
7376 echo "$as_me:7376: \$? = $ac_status" >&5
7377 (exit $ac_status); }; }; then
7378 cf_have_ncuconfig=yes
7380 echo "$as_me: program exited with status $ac_status" >&5
7381 echo "$as_me: failed program was:" >&5
7382 cat conftest.$ac_ext >&5
7383 cf_have_ncuconfig=no
7385 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7388 echo "$as_me: failed program was:" >&5
7389 cat conftest.$ac_ext >&5
7390 cf_have_ncuconfig=no
7392 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7393 echo "$as_me:7393: result: $cf_have_ncuconfig" >&5
7394 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7395 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7396 if test "$cf_have_ncuconfig" != "yes"
7398 CPPFLAGS="$cf_save_CPPFLAGS"
7399 LIBS="$cf_save_LIBS"
7400 NCURSES_CONFIG_PKG=none
7403 cat >>confdefs.h <<\EOF
7407 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7411 echo "$as_me:7411: result: no" >&5
7412 echo "${ECHO_T}no" >&6
7413 NCURSES_CONFIG_PKG=none
7416 NCURSES_CONFIG_PKG=none
7419 if test "x$cf_have_ncuconfig" = "xno"; then
7420 echo "Looking for ${cf_ncuconfig_root}-config"
7422 if test -n "$ac_tool_prefix"; then
7423 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7425 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7426 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7427 echo "$as_me:7427: checking for $ac_word" >&5
7428 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7429 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7430 echo $ECHO_N "(cached) $ECHO_C" >&6
7432 if test -n "$NCURSES_CONFIG"; then
7433 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7435 ac_save_IFS=$IFS; IFS=$ac_path_separator
7437 for ac_dir in $ac_dummy; do
7439 test -z "$ac_dir" && ac_dir=.
7440 $as_executable_p "$ac_dir/$ac_word" || continue
7441 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7442 echo "$as_me:7442: found $ac_dir/$ac_word" >&5
7448 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7449 if test -n "$NCURSES_CONFIG"; then
7450 echo "$as_me:7450: result: $NCURSES_CONFIG" >&5
7451 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7453 echo "$as_me:7453: result: no" >&5
7454 echo "${ECHO_T}no" >&6
7457 test -n "$NCURSES_CONFIG" && break
7460 if test -z "$NCURSES_CONFIG"; then
7461 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7462 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7464 # Extract the first word of "$ac_prog", so it can be a program name with args.
7465 set dummy $ac_prog; ac_word=$2
7466 echo "$as_me:7466: checking for $ac_word" >&5
7467 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7468 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7469 echo $ECHO_N "(cached) $ECHO_C" >&6
7471 if test -n "$ac_ct_NCURSES_CONFIG"; then
7472 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7474 ac_save_IFS=$IFS; IFS=$ac_path_separator
7476 for ac_dir in $ac_dummy; do
7478 test -z "$ac_dir" && ac_dir=.
7479 $as_executable_p "$ac_dir/$ac_word" || continue
7480 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7481 echo "$as_me:7481: found $ac_dir/$ac_word" >&5
7487 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7488 if test -n "$ac_ct_NCURSES_CONFIG"; then
7489 echo "$as_me:7489: result: $ac_ct_NCURSES_CONFIG" >&5
7490 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7492 echo "$as_me:7492: result: no" >&5
7493 echo "${ECHO_T}no" >&6
7496 test -n "$ac_ct_NCURSES_CONFIG" && break
7498 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7500 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7503 if test "$NCURSES_CONFIG" != none ; then
7505 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
7507 cf_add_libs="`$NCURSES_CONFIG --libs`"
7508 # Filter out duplicates - this happens with badly-designed ".pc" files...
7509 for cf_add_1lib in $LIBS
7511 for cf_add_2lib in $cf_add_libs
7513 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7519 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7523 # even with config script, some packages use no-override for curses.h
7525 echo "$as_me:7525: checking if we have identified curses headers" >&5
7526 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7527 if test "${cf_cv_ncurses_header+set}" = set; then
7528 echo $ECHO_N "(cached) $ECHO_C" >&6
7531 cf_cv_ncurses_header=none
7533 ncurses.h ncurses/ncurses.h \
7534 curses.h ncurses/curses.h
7536 cat >conftest.$ac_ext <<_ACEOF
7537 #line 7537 "configure"
7538 #include "confdefs.h"
7539 #include <${cf_header}>
7543 initscr(); tgoto("?", 0,0)
7548 rm -f conftest.$ac_objext
7549 if { (eval echo "$as_me:7549: \"$ac_compile\"") >&5
7550 (eval $ac_compile) 2>&5
7552 echo "$as_me:7552: \$? = $ac_status" >&5
7553 (exit $ac_status); } &&
7554 { ac_try='test -s conftest.$ac_objext'
7555 { (eval echo "$as_me:7555: \"$ac_try\"") >&5
7558 echo "$as_me:7558: \$? = $ac_status" >&5
7559 (exit $ac_status); }; }; then
7560 cf_cv_ncurses_header=$cf_header; break
7562 echo "$as_me: failed program was:" >&5
7563 cat conftest.$ac_ext >&5
7565 rm -f conftest.$ac_objext conftest.$ac_ext
7569 echo "$as_me:7569: result: $cf_cv_ncurses_header" >&5
7570 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7572 if test "$cf_cv_ncurses_header" = none ; then
7573 { { echo "$as_me:7573: error: No curses header-files found" >&5
7574 echo "$as_me: error: No curses header-files found" >&2;}
7575 { (exit 1); exit 1; }; }
7578 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7580 for ac_header in $cf_cv_ncurses_header
7582 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7583 echo "$as_me:7583: checking for $ac_header" >&5
7584 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7585 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7586 echo $ECHO_N "(cached) $ECHO_C" >&6
7588 cat >conftest.$ac_ext <<_ACEOF
7589 #line 7589 "configure"
7590 #include "confdefs.h"
7591 #include <$ac_header>
7593 if { (eval echo "$as_me:7593: \"$ac_cpp conftest.$ac_ext\"") >&5
7594 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7596 egrep -v '^ *\+' conftest.er1 >conftest.err
7598 cat conftest.err >&5
7599 echo "$as_me:7599: \$? = $ac_status" >&5
7600 (exit $ac_status); } >/dev/null; then
7601 if test -s conftest.err; then
7602 ac_cpp_err=$ac_c_preproc_warn_flag
7609 if test -z "$ac_cpp_err"; then
7610 eval "$as_ac_Header=yes"
7612 echo "$as_me: failed program was:" >&5
7613 cat conftest.$ac_ext >&5
7614 eval "$as_ac_Header=no"
7616 rm -f conftest.err conftest.$ac_ext
7618 echo "$as_me:7618: result: `eval echo '${'$as_ac_Header'}'`" >&5
7619 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7620 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7621 cat >>confdefs.h <<EOF
7622 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7628 cat >>confdefs.h <<\EOF
7632 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7634 cat >>confdefs.h <<EOF
7635 #define $cf_nculib_ROOT 1
7638 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7642 cf_ncuhdr_root=ncurses
7644 test -n "$cf_cv_curses_dir" && \
7645 test "$cf_cv_curses_dir" != "no" && { \
7647 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7648 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7650 while test $cf_add_incdir != /usr/include
7652 if test -d $cf_add_incdir
7655 if test -n "$CFLAGS$CPPFLAGS" ; then
7656 # a loop is needed to ensure we can add subdirs of existing dirs
7657 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7658 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7659 cf_have_incdir=yes; break
7664 if test "$cf_have_incdir" = no ; then
7665 if test "$cf_add_incdir" = /usr/local/include ; then
7666 if test "$GCC" = yes
7668 cf_save_CPPFLAGS=$CPPFLAGS
7669 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7670 cat >conftest.$ac_ext <<_ACEOF
7671 #line 7671 "configure"
7672 #include "confdefs.h"
7682 rm -f conftest.$ac_objext
7683 if { (eval echo "$as_me:7683: \"$ac_compile\"") >&5
7684 (eval $ac_compile) 2>&5
7686 echo "$as_me:7686: \$? = $ac_status" >&5
7687 (exit $ac_status); } &&
7688 { ac_try='test -s conftest.$ac_objext'
7689 { (eval echo "$as_me:7689: \"$ac_try\"") >&5
7692 echo "$as_me:7692: \$? = $ac_status" >&5
7693 (exit $ac_status); }; }; then
7696 echo "$as_me: failed program was:" >&5
7697 cat conftest.$ac_ext >&5
7700 rm -f conftest.$ac_objext conftest.$ac_ext
7701 CPPFLAGS=$cf_save_CPPFLAGS
7706 if test "$cf_have_incdir" = no ; then
7707 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7709 echo "${as_me:-configure}:7709: testing adding $cf_add_incdir to include-path ..." 1>&5
7711 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7713 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7714 test "$cf_top_incdir" = "$cf_add_incdir" && break
7715 cf_add_incdir="$cf_top_incdir"
7728 echo "$as_me:7728: checking for $cf_ncuhdr_root header in include-path" >&5
7729 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
7730 if test "${cf_cv_ncurses_h+set}" = set; then
7731 echo $ECHO_N "(cached) $ECHO_C" >&6
7734 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
7735 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
7736 for cf_header in $cf_header_list
7739 cat >conftest.$ac_ext <<_ACEOF
7740 #line 7740 "configure"
7741 #include "confdefs.h"
7743 #include <$cf_header>
7748 #ifdef NCURSES_VERSION
7750 printf("%s\n", NCURSES_VERSION);
7763 rm -f conftest.$ac_objext
7764 if { (eval echo "$as_me:7764: \"$ac_compile\"") >&5
7765 (eval $ac_compile) 2>&5
7767 echo "$as_me:7767: \$? = $ac_status" >&5
7768 (exit $ac_status); } &&
7769 { ac_try='test -s conftest.$ac_objext'
7770 { (eval echo "$as_me:7770: \"$ac_try\"") >&5
7773 echo "$as_me:7773: \$? = $ac_status" >&5
7774 (exit $ac_status); }; }; then
7775 cf_cv_ncurses_h=$cf_header
7778 echo "$as_me: failed program was:" >&5
7779 cat conftest.$ac_ext >&5
7782 rm -f conftest.$ac_objext conftest.$ac_ext
7784 test "$cf_cv_ncurses_h" != no && break
7788 echo "$as_me:7788: result: $cf_cv_ncurses_h" >&5
7789 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
7791 if test "$cf_cv_ncurses_h" != no ; then
7792 cf_cv_ncurses_header=$cf_cv_ncurses_h
7795 echo "$as_me:7795: checking for $cf_ncuhdr_root include-path" >&5
7796 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
7797 if test "${cf_cv_ncurses_h2+set}" = set; then
7798 echo $ECHO_N "(cached) $ECHO_C" >&6
7801 test -n "$verbose" && echo
7805 # collect the current set of include-directories from compiler flags
7806 cf_header_path_list=""
7807 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7808 for cf_header_path in $CPPFLAGS $CFLAGS
7810 case $cf_header_path in
7812 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7814 test "x$cf_header_path" != "xNONE" && \
7815 test -d "$cf_header_path" && \
7817 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7818 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7819 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
7820 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
7821 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
7822 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"
7825 cf_header_path_list="$cf_header_path_list $cf_search"
7831 # add the variations for the package we are looking for
7835 test "x$prefix" != "xNONE" && \
7836 test -d "$prefix" && \
7838 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7839 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7840 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
7841 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
7842 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
7843 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7846 for cf_subdir_prefix in \
7855 test "x$cf_subdir_prefix" != "x$prefix" && \
7856 test -d "$cf_subdir_prefix" && \
7857 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7858 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7859 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
7860 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
7861 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
7862 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
7863 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"
7868 test "$includedir" != NONE && \
7869 test "$includedir" != "/usr/include" && \
7870 test -d "$includedir" && {
7871 test -d $includedir && cf_search="$cf_search $includedir"
7872 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
7875 test "$oldincludedir" != NONE && \
7876 test "$oldincludedir" != "/usr/include" && \
7877 test -d "$oldincludedir" && {
7878 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7879 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
7882 cf_search="$cf_search $cf_header_path_list"
7884 test -n "$verbose" && echo search path $cf_search
7885 cf_save2_CPPFLAGS="$CPPFLAGS"
7886 for cf_incdir in $cf_search
7889 if test -n "$cf_incdir" ; then
7890 for cf_add_incdir in $cf_incdir
7892 while test $cf_add_incdir != /usr/include
7894 if test -d $cf_add_incdir
7897 if test -n "$CFLAGS$CPPFLAGS" ; then
7898 # a loop is needed to ensure we can add subdirs of existing dirs
7899 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7900 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7901 cf_have_incdir=yes; break
7906 if test "$cf_have_incdir" = no ; then
7907 if test "$cf_add_incdir" = /usr/local/include ; then
7908 if test "$GCC" = yes
7910 cf_save_CPPFLAGS=$CPPFLAGS
7911 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7912 cat >conftest.$ac_ext <<_ACEOF
7913 #line 7913 "configure"
7914 #include "confdefs.h"
7924 rm -f conftest.$ac_objext
7925 if { (eval echo "$as_me:7925: \"$ac_compile\"") >&5
7926 (eval $ac_compile) 2>&5
7928 echo "$as_me:7928: \$? = $ac_status" >&5
7929 (exit $ac_status); } &&
7930 { ac_try='test -s conftest.$ac_objext'
7931 { (eval echo "$as_me:7931: \"$ac_try\"") >&5
7934 echo "$as_me:7934: \$? = $ac_status" >&5
7935 (exit $ac_status); }; }; then
7938 echo "$as_me: failed program was:" >&5
7939 cat conftest.$ac_ext >&5
7942 rm -f conftest.$ac_objext conftest.$ac_ext
7943 CPPFLAGS=$cf_save_CPPFLAGS
7948 if test "$cf_have_incdir" = no ; then
7949 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7951 echo "${as_me:-configure}:7951: testing adding $cf_add_incdir to include-path ..." 1>&5
7953 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7955 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7956 test "$cf_top_incdir" = "$cf_add_incdir" && break
7957 cf_add_incdir="$cf_top_incdir"
7973 cat >conftest.$ac_ext <<_ACEOF
7974 #line 7974 "configure"
7975 #include "confdefs.h"
7977 #include <$cf_header>
7982 #ifdef NCURSES_VERSION
7984 printf("%s\n", NCURSES_VERSION);
7997 rm -f conftest.$ac_objext
7998 if { (eval echo "$as_me:7998: \"$ac_compile\"") >&5
7999 (eval $ac_compile) 2>&5
8001 echo "$as_me:8001: \$? = $ac_status" >&5
8002 (exit $ac_status); } &&
8003 { ac_try='test -s conftest.$ac_objext'
8004 { (eval echo "$as_me:8004: \"$ac_try\"") >&5
8007 echo "$as_me:8007: \$? = $ac_status" >&5
8008 (exit $ac_status); }; }; then
8009 cf_cv_ncurses_h2=$cf_header
8012 echo "$as_me: failed program was:" >&5
8013 cat conftest.$ac_ext >&5
8016 rm -f conftest.$ac_objext conftest.$ac_ext
8018 if test "$cf_cv_ncurses_h2" != no ; then
8019 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8020 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8023 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8025 CPPFLAGS="$cf_save2_CPPFLAGS"
8026 test "$cf_cv_ncurses_h2" != no && break
8028 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8028: error: not found" >&5
8029 echo "$as_me: error: not found" >&2;}
8030 { (exit 1); exit 1; }; }
8033 echo "$as_me:8033: result: $cf_cv_ncurses_h2" >&5
8034 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8036 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8037 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8038 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8039 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8042 if test -n "$cf_1st_incdir" ; then
8043 for cf_add_incdir in $cf_1st_incdir
8045 while test $cf_add_incdir != /usr/include
8047 if test -d $cf_add_incdir
8050 if test -n "$CFLAGS$CPPFLAGS" ; then
8051 # a loop is needed to ensure we can add subdirs of existing dirs
8052 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8053 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8054 cf_have_incdir=yes; break
8059 if test "$cf_have_incdir" = no ; then
8060 if test "$cf_add_incdir" = /usr/local/include ; then
8061 if test "$GCC" = yes
8063 cf_save_CPPFLAGS=$CPPFLAGS
8064 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8065 cat >conftest.$ac_ext <<_ACEOF
8066 #line 8066 "configure"
8067 #include "confdefs.h"
8077 rm -f conftest.$ac_objext
8078 if { (eval echo "$as_me:8078: \"$ac_compile\"") >&5
8079 (eval $ac_compile) 2>&5
8081 echo "$as_me:8081: \$? = $ac_status" >&5
8082 (exit $ac_status); } &&
8083 { ac_try='test -s conftest.$ac_objext'
8084 { (eval echo "$as_me:8084: \"$ac_try\"") >&5
8087 echo "$as_me:8087: \$? = $ac_status" >&5
8088 (exit $ac_status); }; }; then
8091 echo "$as_me: failed program was:" >&5
8092 cat conftest.$ac_ext >&5
8095 rm -f conftest.$ac_objext conftest.$ac_ext
8096 CPPFLAGS=$cf_save_CPPFLAGS
8101 if test "$cf_have_incdir" = no ; then
8102 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8104 echo "${as_me:-configure}:8104: testing adding $cf_add_incdir to include-path ..." 1>&5
8106 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8108 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8109 test "$cf_top_incdir" = "$cf_add_incdir" && break
8110 cf_add_incdir="$cf_top_incdir"
8123 # Set definitions to allow ifdef'ing for ncurses.h
8125 case $cf_cv_ncurses_header in
8128 cat >>confdefs.h <<\EOF
8129 #define HAVE_NCURSES_H 1
8135 case $cf_cv_ncurses_header in
8136 (ncurses/curses.h|ncurses/ncurses.h)
8138 cat >>confdefs.h <<\EOF
8139 #define HAVE_NCURSES_NCURSES_H 1
8143 (ncursesw/curses.h|ncursesw/ncurses.h)
8145 cat >>confdefs.h <<\EOF
8146 #define HAVE_NCURSESW_NCURSES_H 1
8152 echo "$as_me:8152: checking for terminfo header" >&5
8153 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8154 if test "${cf_cv_term_header+set}" = set; then
8155 echo $ECHO_N "(cached) $ECHO_C" >&6
8158 case ${cf_cv_ncurses_header} in
8159 (*/ncurses.h|*/ncursesw.h)
8160 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8163 cf_term_header=term.h
8167 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8169 cat >conftest.$ac_ext <<_ACEOF
8170 #line 8170 "configure"
8171 #include "confdefs.h"
8173 #include <${cf_cv_ncurses_header:-curses.h}>
8179 int x = auto_left_margin
8184 rm -f conftest.$ac_objext
8185 if { (eval echo "$as_me:8185: \"$ac_compile\"") >&5
8186 (eval $ac_compile) 2>&5
8188 echo "$as_me:8188: \$? = $ac_status" >&5
8189 (exit $ac_status); } &&
8190 { ac_try='test -s conftest.$ac_objext'
8191 { (eval echo "$as_me:8191: \"$ac_try\"") >&5
8194 echo "$as_me:8194: \$? = $ac_status" >&5
8195 (exit $ac_status); }; }; then
8197 cf_cv_term_header="$cf_test"
8199 echo "$as_me: failed program was:" >&5
8200 cat conftest.$ac_ext >&5
8202 cf_cv_term_header=unknown
8205 rm -f conftest.$ac_objext conftest.$ac_ext
8206 test "$cf_cv_term_header" != unknown && break
8210 echo "$as_me:8210: result: $cf_cv_term_header" >&5
8211 echo "${ECHO_T}$cf_cv_term_header" >&6
8213 # Set definitions to allow ifdef'ing to accommodate subdirectories
8215 case $cf_cv_term_header in
8218 cat >>confdefs.h <<\EOF
8219 #define HAVE_TERM_H 1
8225 case $cf_cv_term_header in
8228 cat >>confdefs.h <<\EOF
8229 #define HAVE_NCURSES_TERM_H 1
8235 cat >>confdefs.h <<\EOF
8236 #define HAVE_NCURSESW_TERM_H 1
8242 # some applications need this, but should check for NCURSES_VERSION
8244 cat >>confdefs.h <<\EOF
8248 echo "$as_me:8248: checking for ncurses version" >&5
8249 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8250 if test "${cf_cv_ncurses_version+set}" = set; then
8251 echo $ECHO_N "(cached) $ECHO_C" >&6
8254 cf_cv_ncurses_version=no
8257 if test "$cross_compiling" = yes; then
8259 # This will not work if the preprocessor splits the line after the
8260 # Autoconf token. The 'unproto' program does that.
8261 cat > conftest.$ac_ext <<EOF
8262 #include <${cf_cv_ncurses_header:-curses.h}>
8264 #ifdef NCURSES_VERSION
8265 Autoconf NCURSES_VERSION
8273 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8274 { (eval echo "$as_me:8274: \"$cf_try\"") >&5
8277 echo "$as_me:8277: \$? = $ac_status" >&5
8278 (exit $ac_status); }
8279 if test -f conftest.out ; then
8280 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8281 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8286 cat >conftest.$ac_ext <<_ACEOF
8287 #line 8287 "configure"
8288 #include "confdefs.h"
8290 #include <${cf_cv_ncurses_header:-curses.h}>
8294 FILE *fp = fopen("$cf_tempfile", "w");
8295 #ifdef NCURSES_VERSION
8296 # ifdef NCURSES_VERSION_PATCH
8297 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8299 fprintf(fp, "%s\n", NCURSES_VERSION);
8303 fprintf(fp, "old\n");
8308 ${cf_cv_main_return:-return}(0);
8311 rm -f conftest$ac_exeext
8312 if { (eval echo "$as_me:8312: \"$ac_link\"") >&5
8313 (eval $ac_link) 2>&5
8315 echo "$as_me:8315: \$? = $ac_status" >&5
8316 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8317 { (eval echo "$as_me:8317: \"$ac_try\"") >&5
8320 echo "$as_me:8320: \$? = $ac_status" >&5
8321 (exit $ac_status); }; }; then
8323 cf_cv_ncurses_version=`cat $cf_tempfile`
8325 echo "$as_me: program exited with status $ac_status" >&5
8326 echo "$as_me: failed program was:" >&5
8327 cat conftest.$ac_ext >&5
8329 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8334 echo "$as_me:8334: result: $cf_cv_ncurses_version" >&5
8335 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8336 test "$cf_cv_ncurses_version" = no ||
8337 cat >>confdefs.h <<\EOF
8341 cf_nculib_root=ncurses
8342 # This works, except for the special case where we find gpm, but
8343 # ncurses is in a nonstandard location via $LIBS, and we really want
8346 cf_ncurses_SAVE="$LIBS"
8347 echo "$as_me:8347: checking for Gpm_Open in -lgpm" >&5
8348 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8349 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8350 echo $ECHO_N "(cached) $ECHO_C" >&6
8352 ac_check_lib_save_LIBS=$LIBS
8354 cat >conftest.$ac_ext <<_ACEOF
8355 #line 8355 "configure"
8356 #include "confdefs.h"
8358 /* Override any gcc2 internal prototype to avoid an error. */
8362 /* We use char because int might match the return type of a gcc2
8363 builtin and then its argument prototype would still apply. */
8373 rm -f conftest.$ac_objext conftest$ac_exeext
8374 if { (eval echo "$as_me:8374: \"$ac_link\"") >&5
8375 (eval $ac_link) 2>&5
8377 echo "$as_me:8377: \$? = $ac_status" >&5
8378 (exit $ac_status); } &&
8379 { ac_try='test -s conftest$ac_exeext'
8380 { (eval echo "$as_me:8380: \"$ac_try\"") >&5
8383 echo "$as_me:8383: \$? = $ac_status" >&5
8384 (exit $ac_status); }; }; then
8385 ac_cv_lib_gpm_Gpm_Open=yes
8387 echo "$as_me: failed program was:" >&5
8388 cat conftest.$ac_ext >&5
8389 ac_cv_lib_gpm_Gpm_Open=no
8391 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8392 LIBS=$ac_check_lib_save_LIBS
8394 echo "$as_me:8394: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8395 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8396 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8397 echo "$as_me:8397: checking for initscr in -lgpm" >&5
8398 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8399 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8400 echo $ECHO_N "(cached) $ECHO_C" >&6
8402 ac_check_lib_save_LIBS=$LIBS
8404 cat >conftest.$ac_ext <<_ACEOF
8405 #line 8405 "configure"
8406 #include "confdefs.h"
8408 /* Override any gcc2 internal prototype to avoid an error. */
8412 /* We use char because int might match the return type of a gcc2
8413 builtin and then its argument prototype would still apply. */
8423 rm -f conftest.$ac_objext conftest$ac_exeext
8424 if { (eval echo "$as_me:8424: \"$ac_link\"") >&5
8425 (eval $ac_link) 2>&5
8427 echo "$as_me:8427: \$? = $ac_status" >&5
8428 (exit $ac_status); } &&
8429 { ac_try='test -s conftest$ac_exeext'
8430 { (eval echo "$as_me:8430: \"$ac_try\"") >&5
8433 echo "$as_me:8433: \$? = $ac_status" >&5
8434 (exit $ac_status); }; }; then
8435 ac_cv_lib_gpm_initscr=yes
8437 echo "$as_me: failed program was:" >&5
8438 cat conftest.$ac_ext >&5
8439 ac_cv_lib_gpm_initscr=no
8441 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8442 LIBS=$ac_check_lib_save_LIBS
8444 echo "$as_me:8444: result: $ac_cv_lib_gpm_initscr" >&5
8445 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8446 if test $ac_cv_lib_gpm_initscr = yes; then
8447 LIBS="$cf_ncurses_SAVE"
8449 cf_ncurses_LIBS="-lgpm"
8456 # This is only necessary if you are linking against an obsolete
8457 # version of ncurses (but it should do no harm, since it's static).
8458 if test "$cf_nculib_root" = ncurses ; then
8459 echo "$as_me:8459: checking for tgoto in -lmytinfo" >&5
8460 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8461 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8462 echo $ECHO_N "(cached) $ECHO_C" >&6
8464 ac_check_lib_save_LIBS=$LIBS
8465 LIBS="-lmytinfo $LIBS"
8466 cat >conftest.$ac_ext <<_ACEOF
8467 #line 8467 "configure"
8468 #include "confdefs.h"
8470 /* Override any gcc2 internal prototype to avoid an error. */
8474 /* We use char because int might match the return type of a gcc2
8475 builtin and then its argument prototype would still apply. */
8485 rm -f conftest.$ac_objext conftest$ac_exeext
8486 if { (eval echo "$as_me:8486: \"$ac_link\"") >&5
8487 (eval $ac_link) 2>&5
8489 echo "$as_me:8489: \$? = $ac_status" >&5
8490 (exit $ac_status); } &&
8491 { ac_try='test -s conftest$ac_exeext'
8492 { (eval echo "$as_me:8492: \"$ac_try\"") >&5
8495 echo "$as_me:8495: \$? = $ac_status" >&5
8496 (exit $ac_status); }; }; then
8497 ac_cv_lib_mytinfo_tgoto=yes
8499 echo "$as_me: failed program was:" >&5
8500 cat conftest.$ac_ext >&5
8501 ac_cv_lib_mytinfo_tgoto=no
8503 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8504 LIBS=$ac_check_lib_save_LIBS
8506 echo "$as_me:8506: result: $ac_cv_lib_mytinfo_tgoto" >&5
8507 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8508 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8509 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8516 cf_add_libs="$cf_ncurses_LIBS"
8517 # Filter out duplicates - this happens with badly-designed ".pc" files...
8518 for cf_add_1lib in $LIBS
8520 for cf_add_2lib in $cf_add_libs
8522 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8528 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8532 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8535 cf_add_libs="-l$cf_nculib_root"
8536 # Filter out duplicates - this happens with badly-designed ".pc" files...
8537 for cf_add_1lib in $LIBS
8539 for cf_add_2lib in $cf_add_libs
8541 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8547 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8553 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
8555 echo "$as_me:8555: checking for initscr" >&5
8556 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8557 if test "${ac_cv_func_initscr+set}" = set; then
8558 echo $ECHO_N "(cached) $ECHO_C" >&6
8560 cat >conftest.$ac_ext <<_ACEOF
8561 #line 8561 "configure"
8562 #include "confdefs.h"
8563 /* System header to define __stub macros and hopefully few prototypes,
8564 which can conflict with char initscr (); below. */
8566 /* Override any gcc2 internal prototype to avoid an error. */
8570 /* We use char because int might match the return type of a gcc2
8571 builtin and then its argument prototype would still apply. */
8578 /* The GNU C library defines this for functions which it implements
8579 to always fail with ENOSYS. Some functions are actually named
8580 something starting with __ and the normal name is an alias. */
8581 #if defined (__stub_initscr) || defined (__stub___initscr)
8584 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8591 rm -f conftest.$ac_objext conftest$ac_exeext
8592 if { (eval echo "$as_me:8592: \"$ac_link\"") >&5
8593 (eval $ac_link) 2>&5
8595 echo "$as_me:8595: \$? = $ac_status" >&5
8596 (exit $ac_status); } &&
8597 { ac_try='test -s conftest$ac_exeext'
8598 { (eval echo "$as_me:8598: \"$ac_try\"") >&5
8601 echo "$as_me:8601: \$? = $ac_status" >&5
8602 (exit $ac_status); }; }; then
8603 ac_cv_func_initscr=yes
8605 echo "$as_me: failed program was:" >&5
8606 cat conftest.$ac_ext >&5
8607 ac_cv_func_initscr=no
8609 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8611 echo "$as_me:8611: result: $ac_cv_func_initscr" >&5
8612 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8613 if test $ac_cv_func_initscr = yes; then
8614 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8617 cf_save_LIBS="$LIBS"
8618 echo "$as_me:8618: checking for initscr in -l$cf_nculib_root" >&5
8619 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8620 LIBS="-l$cf_nculib_root $LIBS"
8621 cat >conftest.$ac_ext <<_ACEOF
8622 #line 8622 "configure"
8623 #include "confdefs.h"
8624 #include <${cf_cv_ncurses_header:-curses.h}>
8633 rm -f conftest.$ac_objext conftest$ac_exeext
8634 if { (eval echo "$as_me:8634: \"$ac_link\"") >&5
8635 (eval $ac_link) 2>&5
8637 echo "$as_me:8637: \$? = $ac_status" >&5
8638 (exit $ac_status); } &&
8639 { ac_try='test -s conftest$ac_exeext'
8640 { (eval echo "$as_me:8640: \"$ac_try\"") >&5
8643 echo "$as_me:8643: \$? = $ac_status" >&5
8644 (exit $ac_status); }; }; then
8645 echo "$as_me:8645: result: yes" >&5
8646 echo "${ECHO_T}yes" >&6
8647 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8650 echo "$as_me: failed program was:" >&5
8651 cat conftest.$ac_ext >&5
8652 echo "$as_me:8652: result: no" >&5
8653 echo "${ECHO_T}no" >&6
8656 cf_library_path_list=""
8657 if test -n "${LDFLAGS}${LIBS}" ; then
8658 for cf_library_path in $LDFLAGS $LIBS
8660 case $cf_library_path in
8662 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8664 test "x$cf_library_path" != "xNONE" && \
8665 test -d "$cf_library_path" && \
8667 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8668 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
8669 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
8670 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
8671 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
8672 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"
8675 cf_library_path_list="$cf_library_path_list $cf_search"
8683 test "x$prefix" != "xNONE" && \
8684 test -d "$prefix" && \
8686 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8687 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
8688 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
8689 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
8690 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
8691 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
8694 for cf_subdir_prefix in \
8703 test "x$cf_subdir_prefix" != "x$prefix" && \
8704 test -d "$cf_subdir_prefix" && \
8705 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8706 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
8707 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
8708 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
8709 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
8710 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
8711 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"
8716 cf_search="$cf_library_path_list $cf_search"
8718 for cf_libdir in $cf_search
8720 echo "$as_me:8720: checking for -l$cf_nculib_root in $cf_libdir" >&5
8721 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
8722 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
8723 cat >conftest.$ac_ext <<_ACEOF
8724 #line 8724 "configure"
8725 #include "confdefs.h"
8726 #include <${cf_cv_ncurses_header:-curses.h}>
8735 rm -f conftest.$ac_objext conftest$ac_exeext
8736 if { (eval echo "$as_me:8736: \"$ac_link\"") >&5
8737 (eval $ac_link) 2>&5
8739 echo "$as_me:8739: \$? = $ac_status" >&5
8740 (exit $ac_status); } &&
8741 { ac_try='test -s conftest$ac_exeext'
8742 { (eval echo "$as_me:8742: \"$ac_try\"") >&5
8745 echo "$as_me:8745: \$? = $ac_status" >&5
8746 (exit $ac_status); }; }; then
8747 echo "$as_me:8747: result: yes" >&5
8748 echo "${ECHO_T}yes" >&6
8749 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8752 echo "$as_me: failed program was:" >&5
8753 cat conftest.$ac_ext >&5
8754 echo "$as_me:8754: result: no" >&5
8755 echo "${ECHO_T}no" >&6
8756 LIBS="$cf_save_LIBS"
8758 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8762 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8766 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
8768 if test $cf_found_library = no ; then
8769 { { echo "$as_me:8769: error: Cannot link $cf_nculib_root library" >&5
8770 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
8771 { (exit 1); exit 1; }; }
8776 if test -n "$cf_ncurses_LIBS" ; then
8777 echo "$as_me:8777: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
8778 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
8779 cf_ncurses_SAVE="$LIBS"
8780 for p in $cf_ncurses_LIBS ; do
8781 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
8782 if test "$q" != "$LIBS" ; then
8786 cat >conftest.$ac_ext <<_ACEOF
8787 #line 8787 "configure"
8788 #include "confdefs.h"
8789 #include <${cf_cv_ncurses_header:-curses.h}>
8793 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8798 rm -f conftest.$ac_objext conftest$ac_exeext
8799 if { (eval echo "$as_me:8799: \"$ac_link\"") >&5
8800 (eval $ac_link) 2>&5
8802 echo "$as_me:8802: \$? = $ac_status" >&5
8803 (exit $ac_status); } &&
8804 { ac_try='test -s conftest$ac_exeext'
8805 { (eval echo "$as_me:8805: \"$ac_try\"") >&5
8808 echo "$as_me:8808: \$? = $ac_status" >&5
8809 (exit $ac_status); }; }; then
8810 echo "$as_me:8810: result: yes" >&5
8811 echo "${ECHO_T}yes" >&6
8813 echo "$as_me: failed program was:" >&5
8814 cat conftest.$ac_ext >&5
8815 echo "$as_me:8815: result: no" >&5
8816 echo "${ECHO_T}no" >&6
8817 LIBS="$cf_ncurses_SAVE"
8819 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8822 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8824 cat >>confdefs.h <<EOF
8825 #define $cf_nculib_ROOT 1
8835 if test "$NCURSES_CONFIG_PKG" != none ; then
8836 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
8838 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
8839 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
8840 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
8842 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
8843 if test -z "$cf_cv_abi_version"
8845 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
8848 elif test "$NCURSES_CONFIG" != none ; then
8850 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
8852 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
8853 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
8854 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
8856 # ABI version is not available from headers
8857 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
8861 for cf_name in MAJOR MINOR PATCH
8863 cat >conftest.$ac_ext <<CF_EOF
8864 #include <${cf_cv_ncurses_header:-curses.h}>
8865 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
8867 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
8868 { (eval echo "$as_me:8868: \"$cf_try\"") >&5
8871 echo "$as_me:8871: \$? = $ac_status" >&5
8872 (exit $ac_status); }
8873 if test -f conftest.out ; then
8874 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[ ][ ]*//"`
8875 eval NCURSES_$cf_name=\"$cf_result\"
8876 # cat conftest.$ac_ext
8881 cf_cv_abi_version=${NCURSES_MAJOR}
8885 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
8887 cf_cv_timestamp=`date`
8889 echo "$as_me:8889: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
8890 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
8892 echo "$as_me:8892: checking if you want to have a library-prefix" >&5
8893 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
8895 # Check whether --with-lib-prefix or --without-lib-prefix was given.
8896 if test "${with_lib_prefix+set}" = set; then
8897 withval="$with_lib_prefix"
8898 with_lib_prefix=$withval
8900 with_lib_prefix=auto
8902 echo "$as_me:8902: result: $with_lib_prefix" >&5
8903 echo "${ECHO_T}$with_lib_prefix" >&6
8905 if test $with_lib_prefix = auto
8908 case $cf_cv_system_name in
8912 (*) LIB_PREFIX='lib'
8915 cf_prefix=$LIB_PREFIX
8917 elif test $with_lib_prefix = no
8921 LIB_PREFIX=$with_lib_prefix
8926 ###############################################################################
8928 if test X"$CC_G_OPT" = X"" ; then
8930 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
8933 echo "$as_me:8933: checking for default loader flags" >&5
8934 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
8935 case $DFT_LWR_MODEL in
8936 (normal) LD_MODEL='' ;;
8937 (debug) LD_MODEL=$CC_G_OPT ;;
8938 (profile) LD_MODEL='-pg';;
8939 (shared) LD_MODEL='' ;;
8941 echo "$as_me:8941: result: $LD_MODEL" >&5
8942 echo "${ECHO_T}$LD_MODEL" >&6
8945 echo "$as_me:8945: checking for an rpath option" >&5
8946 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
8947 case $cf_cv_system_name in
8949 if test "$GCC" = yes; then
8950 LD_RPATH_OPT="-Wl,-rpath,"
8952 LD_RPATH_OPT="-rpath "
8955 (linux*|gnu*|k*bsd*-gnu)
8956 LD_RPATH_OPT="-Wl,-rpath,"
8958 (openbsd[2-9].*|mirbsd*)
8959 LD_RPATH_OPT="-Wl,-rpath,"
8961 (dragonfly*|freebsd*)
8962 LD_RPATH_OPT="-rpath "
8965 LD_RPATH_OPT="-Wl,-rpath,"
8968 LD_RPATH_OPT="-rpath "
8976 echo "$as_me:8976: result: $LD_RPATH_OPT" >&5
8977 echo "${ECHO_T}$LD_RPATH_OPT" >&6
8979 case "x$LD_RPATH_OPT" in
8981 echo "$as_me:8981: checking if we need a space after rpath option" >&5
8982 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
8983 cf_save_LIBS="$LIBS"
8985 cf_add_libs="${LD_RPATH_OPT}$libdir"
8986 # Filter out duplicates - this happens with badly-designed ".pc" files...
8987 for cf_add_1lib in $LIBS
8989 for cf_add_2lib in $cf_add_libs
8991 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8997 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9001 cat >conftest.$ac_ext <<_ACEOF
9002 #line 9002 "configure"
9003 #include "confdefs.h"
9013 rm -f conftest.$ac_objext conftest$ac_exeext
9014 if { (eval echo "$as_me:9014: \"$ac_link\"") >&5
9015 (eval $ac_link) 2>&5
9017 echo "$as_me:9017: \$? = $ac_status" >&5
9018 (exit $ac_status); } &&
9019 { ac_try='test -s conftest$ac_exeext'
9020 { (eval echo "$as_me:9020: \"$ac_try\"") >&5
9023 echo "$as_me:9023: \$? = $ac_status" >&5
9024 (exit $ac_status); }; }; then
9027 echo "$as_me: failed program was:" >&5
9028 cat conftest.$ac_ext >&5
9031 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9032 LIBS="$cf_save_LIBS"
9033 echo "$as_me:9033: result: $cf_rpath_space" >&5
9034 echo "${ECHO_T}$cf_rpath_space" >&6
9035 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
9043 INSTALL_LIB="-m 644"
9044 : ${rel_builddir:=.}
9050 cf_cv_do_symlinks=no
9052 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
9054 echo "$as_me:9054: checking if release/abi version should be used for shared libs" >&5
9055 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
9057 # Check whether --with-shlib-version or --without-shlib-version was given.
9058 if test "${with_shlib_version+set}" = set; then
9059 withval="$with_shlib_version"
9060 test -z "$withval" && withval=auto
9063 cf_cv_shlib_version=auto
9066 cf_cv_shlib_version=$withval
9069 echo "$as_me:9069: result: $withval" >&5
9070 echo "${ECHO_T}$withval" >&6
9071 { { echo "$as_me:9071: error: option value must be one of: rel, abi, or auto" >&5
9072 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
9073 { (exit 1); exit 1; }; }
9078 cf_cv_shlib_version=auto
9080 echo "$as_me:9080: result: $cf_cv_shlib_version" >&5
9081 echo "${ECHO_T}$cf_cv_shlib_version" >&6
9086 # Some less-capable ports of gcc support only -fpic
9088 if test "$GCC" = yes
9090 echo "$as_me:9090: checking which $CC option to use" >&5
9091 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
9092 cf_save_CFLAGS="$CFLAGS"
9093 for CC_SHARED_OPTS in -fPIC -fpic ''
9095 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
9096 cat >conftest.$ac_ext <<_ACEOF
9097 #line 9097 "configure"
9098 #include "confdefs.h"
9108 rm -f conftest.$ac_objext
9109 if { (eval echo "$as_me:9109: \"$ac_compile\"") >&5
9110 (eval $ac_compile) 2>&5
9112 echo "$as_me:9112: \$? = $ac_status" >&5
9113 (exit $ac_status); } &&
9114 { ac_try='test -s conftest.$ac_objext'
9115 { (eval echo "$as_me:9115: \"$ac_try\"") >&5
9118 echo "$as_me:9118: \$? = $ac_status" >&5
9119 (exit $ac_status); }; }; then
9122 echo "$as_me: failed program was:" >&5
9123 cat conftest.$ac_ext >&5
9125 rm -f conftest.$ac_objext conftest.$ac_ext
9127 echo "$as_me:9127: result: $CC_SHARED_OPTS" >&5
9128 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
9129 CFLAGS="$cf_save_CFLAGS"
9132 cf_cv_shlib_version_infix=no
9134 case $cf_cv_system_name in
9135 (aix4.3-9*|aix[5-7]*)
9136 if test "$GCC" = yes; then
9137 CC_SHARED_OPTS='-Wl,-brtl'
9138 MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
9140 CC_SHARED_OPTS='-brtl'
9141 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
9142 MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
9146 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
9150 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9151 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9152 cf_cv_shlib_version=cygdll
9153 cf_cv_shlib_version_infix=cygdll
9156 cat >mk_shared_lib.sh <<-CF_EOF
9159 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
9162 Linking shared library
9163 ** SHARED_LIB \$SHARED_LIB
9164 ** IMPORT_LIB \$IMPORT_LIB
9166 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9168 chmod +x mk_shared_lib.sh
9172 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9173 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9174 cf_cv_shlib_version=msysdll
9175 cf_cv_shlib_version_infix=msysdll
9178 cat >mk_shared_lib.sh <<-CF_EOF
9181 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
9184 Linking shared library
9185 ** SHARED_LIB \$SHARED_LIB
9186 ** IMPORT_LIB \$IMPORT_LIB
9188 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9190 chmod +x mk_shared_lib.sh
9193 cf_try_cflags="no-cpp-precomp"
9194 CC_SHARED_OPTS="-dynamic"
9195 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
9196 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
9197 cf_cv_shlib_version_infix=yes
9198 echo "$as_me:9198: checking if ld -search_paths_first works" >&5
9199 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
9200 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
9201 echo $ECHO_N "(cached) $ECHO_C" >&6
9204 cf_save_LDFLAGS=$LDFLAGS
9205 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9206 cat >conftest.$ac_ext <<_ACEOF
9207 #line 9207 "configure"
9208 #include "confdefs.h"
9218 rm -f conftest.$ac_objext conftest$ac_exeext
9219 if { (eval echo "$as_me:9219: \"$ac_link\"") >&5
9220 (eval $ac_link) 2>&5
9222 echo "$as_me:9222: \$? = $ac_status" >&5
9223 (exit $ac_status); } &&
9224 { ac_try='test -s conftest$ac_exeext'
9225 { (eval echo "$as_me:9225: \"$ac_try\"") >&5
9228 echo "$as_me:9228: \$? = $ac_status" >&5
9229 (exit $ac_status); }; }; then
9230 cf_cv_ldflags_search_paths_first=yes
9232 echo "$as_me: failed program was:" >&5
9233 cat conftest.$ac_ext >&5
9234 cf_cv_ldflags_search_paths_first=no
9236 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9237 LDFLAGS=$cf_save_LDFLAGS
9239 echo "$as_me:9239: result: $cf_cv_ldflags_search_paths_first" >&5
9240 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
9241 if test $cf_cv_ldflags_search_paths_first = yes; then
9242 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9246 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
9247 if test "$GCC" != yes; then
9250 MK_SHARED_LIB='${LD} -b -o $@'
9251 INSTALL_LIB="-m 555"
9254 # (tested with gcc 2.7.2 -- I don't have c89)
9255 if test "$GCC" = yes; then
9256 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
9259 LD_SHARED_OPTS='-Wl,+b,${libdir}'
9261 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
9262 # HP-UX shared libraries must be executable, and should be
9263 # readonly to exploit a quirk in the memory manager.
9264 INSTALL_LIB="-m 555"
9267 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9268 if test "$cf_cv_shlib_version" = rel; then
9269 cf_shared_soname='`basename .${REL_VERSION}`.${ABI_VERSION}'
9271 cf_shared_soname='`basename `'
9274 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
9277 if test "$cf_cv_enable_rpath" = yes ; then
9278 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9280 # tested with IRIX 5.2 and 'cc'.
9281 if test "$GCC" != yes; then
9282 CC_SHARED_OPTS='-KPIC'
9283 MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
9285 MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
9287 cf_cv_rm_so_locs=yes
9289 (linux*|gnu*|k*bsd*-gnu)
9290 if test "$DFT_LWR_MODEL" = "shared" ; then
9291 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9292 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9294 if test "$cf_cv_enable_rpath" = yes ; then
9295 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9298 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9299 if test "$cf_cv_shlib_version" = rel; then
9300 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9302 cf_cv_shared_soname='`basename $@`'
9305 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9308 cf_cv_shlib_version=mingw
9309 cf_cv_shlib_version_infix=mingw
9312 if test "$DFT_LWR_MODEL" = "shared" ; then
9313 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
9314 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9315 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
9318 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9319 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9320 cat >mk_shared_lib.sh <<-CF_EOF
9323 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
9326 Linking shared library
9327 ** SHARED_LIB \$SHARED_LIB
9328 ** IMPORT_LIB \$IMPORT_LIB
9330 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9332 chmod +x mk_shared_lib.sh
9334 (openbsd[2-9].*|mirbsd*)
9335 if test "$DFT_LWR_MODEL" = "shared" ; then
9336 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9337 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9339 if test "$cf_cv_enable_rpath" = yes ; then
9340 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9342 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9344 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9345 if test "$cf_cv_shlib_version" = rel; then
9346 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9348 cf_cv_shared_soname='`basename $@`'
9351 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9353 (nto-qnx*|openbsd*|freebsd[12].*)
9354 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9355 MK_SHARED_LIB='${LD} -Bshareable -o $@'
9356 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9358 (dragonfly*|freebsd*)
9359 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9360 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
9361 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
9362 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
9363 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9366 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9367 if test "$cf_cv_shlib_version" = rel; then
9368 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9370 cf_cv_shared_soname='`basename $@`'
9373 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9376 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9377 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
9378 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
9379 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9380 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9381 if test "$cf_cv_shlib_version" = auto; then
9382 if test -f /usr/libexec/ld.elf_so; then
9383 cf_cv_shlib_version=abi
9385 cf_cv_shlib_version=rel
9389 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9390 if test "$cf_cv_shlib_version" = rel; then
9391 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9393 cf_cv_shared_soname='`basename $@`'
9396 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
9398 MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
9402 # tested with OSF/1 V3.2 and 'cc'
9403 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
9404 # link with shared libs).
9405 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
9408 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
9411 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
9412 if test "$DFT_LWR_MODEL" = "shared" ; then
9413 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9414 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9416 cf_cv_rm_so_locs=yes
9418 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
9419 # tested with osr5.0.5
9420 if test "$GCC" != yes; then
9421 CC_SHARED_OPTS='-belf -KPIC'
9423 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
9424 if test "$cf_cv_enable_rpath" = yes ; then
9425 # only way is to set LD_RUN_PATH but no switch for it
9428 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9429 LINK_PROGS='LD_RUN_PATH=${libdir}'
9430 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
9433 # tested with SunOS 4.1.1 and gcc 2.7.0
9434 if test "$GCC" != yes; then
9435 CC_SHARED_OPTS='-KPIC'
9437 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
9438 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9441 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
9442 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
9443 if test "$DFT_LWR_MODEL" = "shared" ; then
9444 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
9445 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9447 if test "$cf_cv_enable_rpath" = yes ; then
9448 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
9451 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9452 if test "$cf_cv_shlib_version" = rel; then
9453 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9455 cf_cv_shared_soname='`basename $@`'
9458 if test "$GCC" != yes; then
9459 cf_save_CFLAGS="$CFLAGS"
9460 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
9462 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
9463 cat >conftest.$ac_ext <<_ACEOF
9464 #line 9464 "configure"
9465 #include "confdefs.h"
9475 rm -f conftest.$ac_objext
9476 if { (eval echo "$as_me:9476: \"$ac_compile\"") >&5
9477 (eval $ac_compile) 2>&5
9479 echo "$as_me:9479: \$? = $ac_status" >&5
9480 (exit $ac_status); } &&
9481 { ac_try='test -s conftest.$ac_objext'
9482 { (eval echo "$as_me:9482: \"$ac_try\"") >&5
9485 echo "$as_me:9485: \$? = $ac_status" >&5
9486 (exit $ac_status); }; }; then
9489 echo "$as_me: failed program was:" >&5
9490 cat conftest.$ac_ext >&5
9492 rm -f conftest.$ac_objext conftest.$ac_ext
9494 CFLAGS="$cf_save_CFLAGS"
9495 CC_SHARED_OPTS=$cf_shared_opts
9496 MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
9498 MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
9501 (sysv5uw7*|unix_sv*)
9502 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
9503 if test "$GCC" != yes; then
9504 CC_SHARED_OPTS='-KPIC'
9506 MK_SHARED_LIB='${LD} -d y -G -o $@'
9509 CC_SHARED_OPTS='unknown'
9510 MK_SHARED_LIB='echo unknown'
9514 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
9515 case "$cf_cv_shlib_version" in
9517 case "$MK_SHARED_LIB" in
9519 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
9522 { echo "$as_me:9522: WARNING: ignored --with-shlib-version" >&5
9523 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
9529 if test -n "$cf_try_cflags"
9531 cat > conftest.$ac_ext <<EOF
9532 #line 9532 "${as_me:-configure}"
9534 int main(int argc, char *argv[])
9537 return (argv[argc-1] == 0) ;
9540 cf_save_CFLAGS="$CFLAGS"
9541 for cf_opt in $cf_try_cflags
9543 CFLAGS="$cf_save_CFLAGS -$cf_opt"
9544 echo "$as_me:9544: checking if CFLAGS option -$cf_opt works" >&5
9545 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
9546 if { (eval echo "$as_me:9546: \"$ac_compile\"") >&5
9547 (eval $ac_compile) 2>&5
9549 echo "$as_me:9549: \$? = $ac_status" >&5
9550 (exit $ac_status); }; then
9551 echo "$as_me:9551: result: yes" >&5
9552 echo "${ECHO_T}yes" >&6
9553 cf_save_CFLAGS="$CFLAGS"
9555 echo "$as_me:9555: result: no" >&5
9556 echo "${ECHO_T}no" >&6
9559 CFLAGS="$cf_save_CFLAGS"
9562 # RPATH_LIST is a colon-separated list of directories
9563 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
9564 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
9566 test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
9568 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
9570 echo "${as_me:-configure}:9570: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
9572 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
9574 echo "${as_me:-configure}:9574: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
9576 # The test/sample programs in the original tree link using rpath option.
9577 # Make it optional for packagers.
9578 if test -n "$LOCAL_LDFLAGS"
9580 echo "$as_me:9580: checking if you want to link sample programs with rpath option" >&5
9581 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
9583 # Check whether --enable-rpath-link or --disable-rpath-link was given.
9584 if test "${enable_rpath_link+set}" = set; then
9585 enableval="$enable_rpath_link"
9586 with_rpath_link=$enableval
9590 echo "$as_me:9590: result: $with_rpath_link" >&5
9591 echo "${ECHO_T}$with_rpath_link" >&6
9592 if test "$with_rpath_link" = no
9599 ###############################################################################
9601 ### use option --enable-broken-linker to force on use of broken-linker support
9602 echo "$as_me:9602: checking if you want broken-linker support code" >&5
9603 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9605 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9606 if test "${enable_broken_linker+set}" = set; then
9607 enableval="$enable_broken_linker"
9608 with_broken_linker=$enableval
9610 with_broken_linker=${BROKEN_LINKER:-no}
9612 echo "$as_me:9612: result: $with_broken_linker" >&5
9613 echo "${ECHO_T}$with_broken_linker" >&6
9616 if test "$with_broken_linker" = yes ; then
9617 cat >>confdefs.h <<\EOF
9618 #define BROKEN_LINKER 1
9622 elif test "$DFT_LWR_MODEL" = shared ; then
9623 case $cf_cv_system_name in
9625 cat >>confdefs.h <<\EOF
9626 #define BROKEN_LINKER 1
9630 test -n "$verbose" && echo " cygwin linker is broken anyway" 1>&6
9632 echo "${as_me:-configure}:9632: testing cygwin linker is broken anyway ..." 1>&5
9638 # Check to define _XOPEN_SOURCE "automatically"
9641 cf_POSIX_C_SOURCE=199506L
9646 cf_xopen_source="-D_ALL_SOURCE"
9652 cf_xopen_source="-D_APPLE_C_SOURCE"
9655 cf_xopen_source="-D_DARWIN_C_SOURCE"
9658 (freebsd*|dragonfly*)
9659 # 5.x headers associate
9660 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9661 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9662 cf_POSIX_C_SOURCE=200112L
9664 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9667 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9670 cf_xopen_source="-D_HPUX_SOURCE"
9673 cf_xopen_source="-D_SGI_SOURCE"
9676 (linux*|gnu*|mint*|k*bsd*-gnu)
9678 echo "$as_me:9678: checking if we must define _GNU_SOURCE" >&5
9679 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9680 if test "${cf_cv_gnu_source+set}" = set; then
9681 echo $ECHO_N "(cached) $ECHO_C" >&6
9684 cat >conftest.$ac_ext <<_ACEOF
9685 #line 9685 "configure"
9686 #include "confdefs.h"
9687 #include <sys/types.h>
9692 #ifndef _XOPEN_SOURCE
9699 rm -f conftest.$ac_objext
9700 if { (eval echo "$as_me:9700: \"$ac_compile\"") >&5
9701 (eval $ac_compile) 2>&5
9703 echo "$as_me:9703: \$? = $ac_status" >&5
9704 (exit $ac_status); } &&
9705 { ac_try='test -s conftest.$ac_objext'
9706 { (eval echo "$as_me:9706: \"$ac_try\"") >&5
9709 echo "$as_me:9709: \$? = $ac_status" >&5
9710 (exit $ac_status); }; }; then
9713 echo "$as_me: failed program was:" >&5
9714 cat conftest.$ac_ext >&5
9716 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
9717 cat >conftest.$ac_ext <<_ACEOF
9718 #line 9718 "configure"
9719 #include "confdefs.h"
9720 #include <sys/types.h>
9725 #ifdef _XOPEN_SOURCE
9732 rm -f conftest.$ac_objext
9733 if { (eval echo "$as_me:9733: \"$ac_compile\"") >&5
9734 (eval $ac_compile) 2>&5
9736 echo "$as_me:9736: \$? = $ac_status" >&5
9737 (exit $ac_status); } &&
9738 { ac_try='test -s conftest.$ac_objext'
9739 { (eval echo "$as_me:9739: \"$ac_try\"") >&5
9742 echo "$as_me:9742: \$? = $ac_status" >&5
9743 (exit $ac_status); }; }; then
9746 echo "$as_me: failed program was:" >&5
9747 cat conftest.$ac_ext >&5
9748 cf_cv_gnu_source=yes
9750 rm -f conftest.$ac_objext conftest.$ac_ext
9754 rm -f conftest.$ac_objext conftest.$ac_ext
9757 echo "$as_me:9757: result: $cf_cv_gnu_source" >&5
9758 echo "${ECHO_T}$cf_cv_gnu_source" >&6
9759 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
9763 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9766 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9769 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9771 cf_save_CFLAGS="$CFLAGS"
9772 cf_save_CPPFLAGS="$CPPFLAGS"
9774 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9775 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
9776 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
9778 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9779 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
9780 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
9782 echo "$as_me:9782: checking if we should define _POSIX_C_SOURCE" >&5
9783 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9784 if test "${cf_cv_posix_c_source+set}" = set; then
9785 echo $ECHO_N "(cached) $ECHO_C" >&6
9788 echo "${as_me:-configure}:9788: testing if the symbol is already defined go no further ..." 1>&5
9790 cat >conftest.$ac_ext <<_ACEOF
9791 #line 9791 "configure"
9792 #include "confdefs.h"
9793 #include <sys/types.h>
9798 #ifndef _POSIX_C_SOURCE
9805 rm -f conftest.$ac_objext
9806 if { (eval echo "$as_me:9806: \"$ac_compile\"") >&5
9807 (eval $ac_compile) 2>&5
9809 echo "$as_me:9809: \$? = $ac_status" >&5
9810 (exit $ac_status); } &&
9811 { ac_try='test -s conftest.$ac_objext'
9812 { (eval echo "$as_me:9812: \"$ac_try\"") >&5
9815 echo "$as_me:9815: \$? = $ac_status" >&5
9816 (exit $ac_status); }; }; then
9817 cf_cv_posix_c_source=no
9819 echo "$as_me: failed program was:" >&5
9820 cat conftest.$ac_ext >&5
9821 cf_want_posix_source=no
9822 case .$cf_POSIX_C_SOURCE in
9824 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9827 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9828 cf_want_posix_source=yes
9831 cf_want_posix_source=yes
9834 if test "$cf_want_posix_source" = yes ; then
9835 cat >conftest.$ac_ext <<_ACEOF
9836 #line 9836 "configure"
9837 #include "confdefs.h"
9838 #include <sys/types.h>
9843 #ifdef _POSIX_SOURCE
9850 rm -f conftest.$ac_objext
9851 if { (eval echo "$as_me:9851: \"$ac_compile\"") >&5
9852 (eval $ac_compile) 2>&5
9854 echo "$as_me:9854: \$? = $ac_status" >&5
9855 (exit $ac_status); } &&
9856 { ac_try='test -s conftest.$ac_objext'
9857 { (eval echo "$as_me:9857: \"$ac_try\"") >&5
9860 echo "$as_me:9860: \$? = $ac_status" >&5
9861 (exit $ac_status); }; }; then
9864 echo "$as_me: failed program was:" >&5
9865 cat conftest.$ac_ext >&5
9866 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9868 rm -f conftest.$ac_objext conftest.$ac_ext
9871 echo "${as_me:-configure}:9871: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9873 CFLAGS="$cf_trim_CFLAGS"
9874 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
9876 echo "${as_me:-configure}:9876: testing if the second compile does not leave our definition intact error ..." 1>&5
9878 cat >conftest.$ac_ext <<_ACEOF
9879 #line 9879 "configure"
9880 #include "confdefs.h"
9881 #include <sys/types.h>
9886 #ifndef _POSIX_C_SOURCE
9893 rm -f conftest.$ac_objext
9894 if { (eval echo "$as_me:9894: \"$ac_compile\"") >&5
9895 (eval $ac_compile) 2>&5
9897 echo "$as_me:9897: \$? = $ac_status" >&5
9898 (exit $ac_status); } &&
9899 { ac_try='test -s conftest.$ac_objext'
9900 { (eval echo "$as_me:9900: \"$ac_try\"") >&5
9903 echo "$as_me:9903: \$? = $ac_status" >&5
9904 (exit $ac_status); }; }; then
9907 echo "$as_me: failed program was:" >&5
9908 cat conftest.$ac_ext >&5
9909 cf_cv_posix_c_source=no
9911 rm -f conftest.$ac_objext conftest.$ac_ext
9912 CFLAGS="$cf_save_CFLAGS"
9913 CPPFLAGS="$cf_save_CPPFLAGS"
9916 rm -f conftest.$ac_objext conftest.$ac_ext
9919 echo "$as_me:9919: result: $cf_cv_posix_c_source" >&5
9920 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9922 if test "$cf_cv_posix_c_source" != no ; then
9923 CFLAGS="$cf_trim_CFLAGS"
9924 CPPFLAGS="$cf_trim_CPPFLAGS"
9929 cf_new_extra_cppflags=
9931 for cf_add_cflags in $cf_cv_posix_c_source
9933 case $cf_fix_cppflags in
9935 case $cf_add_cflags in
9936 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9937 case $cf_add_cflags in
9939 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9941 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9942 && test -z "${cf_tst_cflags}" \
9943 && cf_fix_cppflags=yes
9945 if test $cf_fix_cppflags = yes ; then
9946 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9948 elif test "${cf_tst_cflags}" = "\"'" ; then
9949 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9958 case $cf_add_cflags in
9960 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9962 CPPFLAGS=`echo "$CPPFLAGS" | \
9963 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9964 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9968 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9973 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9978 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9980 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9982 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9983 && test -z "${cf_tst_cflags}" \
9984 && cf_fix_cppflags=no
9989 if test -n "$cf_new_cflags" ; then
9991 CFLAGS="$CFLAGS $cf_new_cflags"
9994 if test -n "$cf_new_cppflags" ; then
9996 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9999 if test -n "$cf_new_extra_cppflags" ; then
10001 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10008 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10011 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10012 cf_xopen_source="-D_BSD_SOURCE"
10013 cf_XOPEN_SOURCE=600
10016 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10019 cf_xopen_source="-D_OSF_SOURCE"
10022 cf_xopen_source="-D_QNX_SOURCE"
10025 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10028 cf_xopen_source="-D__EXTENSIONS__"
10029 cf_cv_xopen_source=broken
10031 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10037 echo "$as_me:10037: checking if we should define _XOPEN_SOURCE" >&5
10038 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10039 if test "${cf_cv_xopen_source+set}" = set; then
10040 echo $ECHO_N "(cached) $ECHO_C" >&6
10043 cat >conftest.$ac_ext <<_ACEOF
10044 #line 10044 "configure"
10045 #include "confdefs.h"
10047 #include <stdlib.h>
10048 #include <string.h>
10049 #include <sys/types.h>
10055 #ifndef _XOPEN_SOURCE
10062 rm -f conftest.$ac_objext
10063 if { (eval echo "$as_me:10063: \"$ac_compile\"") >&5
10064 (eval $ac_compile) 2>&5
10066 echo "$as_me:10066: \$? = $ac_status" >&5
10067 (exit $ac_status); } &&
10068 { ac_try='test -s conftest.$ac_objext'
10069 { (eval echo "$as_me:10069: \"$ac_try\"") >&5
10070 (eval $ac_try) 2>&5
10072 echo "$as_me:10072: \$? = $ac_status" >&5
10073 (exit $ac_status); }; }; then
10074 cf_cv_xopen_source=no
10076 echo "$as_me: failed program was:" >&5
10077 cat conftest.$ac_ext >&5
10078 cf_save="$CPPFLAGS"
10079 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10080 cat >conftest.$ac_ext <<_ACEOF
10081 #line 10081 "configure"
10082 #include "confdefs.h"
10084 #include <stdlib.h>
10085 #include <string.h>
10086 #include <sys/types.h>
10092 #ifdef _XOPEN_SOURCE
10099 rm -f conftest.$ac_objext
10100 if { (eval echo "$as_me:10100: \"$ac_compile\"") >&5
10101 (eval $ac_compile) 2>&5
10103 echo "$as_me:10103: \$? = $ac_status" >&5
10104 (exit $ac_status); } &&
10105 { ac_try='test -s conftest.$ac_objext'
10106 { (eval echo "$as_me:10106: \"$ac_try\"") >&5
10107 (eval $ac_try) 2>&5
10109 echo "$as_me:10109: \$? = $ac_status" >&5
10110 (exit $ac_status); }; }; then
10111 cf_cv_xopen_source=no
10113 echo "$as_me: failed program was:" >&5
10114 cat conftest.$ac_ext >&5
10115 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10117 rm -f conftest.$ac_objext conftest.$ac_ext
10118 CPPFLAGS="$cf_save"
10121 rm -f conftest.$ac_objext conftest.$ac_ext
10124 echo "$as_me:10124: result: $cf_cv_xopen_source" >&5
10125 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10127 if test "$cf_cv_xopen_source" != no ; then
10129 CFLAGS=`echo "$CFLAGS" | \
10130 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10131 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10133 CPPFLAGS=`echo "$CPPFLAGS" | \
10134 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10135 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10137 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10142 cf_new_extra_cppflags=
10144 for cf_add_cflags in $cf_temp_xopen_source
10146 case $cf_fix_cppflags in
10148 case $cf_add_cflags in
10149 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10150 case $cf_add_cflags in
10152 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10154 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10155 && test -z "${cf_tst_cflags}" \
10156 && cf_fix_cppflags=yes
10158 if test $cf_fix_cppflags = yes ; then
10159 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10161 elif test "${cf_tst_cflags}" = "\"'" ; then
10162 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10167 case "$CPPFLAGS" in
10171 case $cf_add_cflags in
10173 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10175 CPPFLAGS=`echo "$CPPFLAGS" | \
10176 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10177 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10181 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10186 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10191 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10193 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10195 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10196 && test -z "${cf_tst_cflags}" \
10197 && cf_fix_cppflags=no
10202 if test -n "$cf_new_cflags" ; then
10204 CFLAGS="$CFLAGS $cf_new_cflags"
10207 if test -n "$cf_new_cppflags" ; then
10209 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10212 if test -n "$cf_new_extra_cppflags" ; then
10214 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10219 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10221 cf_save_CFLAGS="$CFLAGS"
10222 cf_save_CPPFLAGS="$CPPFLAGS"
10224 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10225 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10226 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10228 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10229 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10230 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10232 echo "$as_me:10232: checking if we should define _POSIX_C_SOURCE" >&5
10233 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10234 if test "${cf_cv_posix_c_source+set}" = set; then
10235 echo $ECHO_N "(cached) $ECHO_C" >&6
10238 echo "${as_me:-configure}:10238: testing if the symbol is already defined go no further ..." 1>&5
10240 cat >conftest.$ac_ext <<_ACEOF
10241 #line 10241 "configure"
10242 #include "confdefs.h"
10243 #include <sys/types.h>
10248 #ifndef _POSIX_C_SOURCE
10255 rm -f conftest.$ac_objext
10256 if { (eval echo "$as_me:10256: \"$ac_compile\"") >&5
10257 (eval $ac_compile) 2>&5
10259 echo "$as_me:10259: \$? = $ac_status" >&5
10260 (exit $ac_status); } &&
10261 { ac_try='test -s conftest.$ac_objext'
10262 { (eval echo "$as_me:10262: \"$ac_try\"") >&5
10263 (eval $ac_try) 2>&5
10265 echo "$as_me:10265: \$? = $ac_status" >&5
10266 (exit $ac_status); }; }; then
10267 cf_cv_posix_c_source=no
10269 echo "$as_me: failed program was:" >&5
10270 cat conftest.$ac_ext >&5
10271 cf_want_posix_source=no
10272 case .$cf_POSIX_C_SOURCE in
10274 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10277 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10278 cf_want_posix_source=yes
10281 cf_want_posix_source=yes
10284 if test "$cf_want_posix_source" = yes ; then
10285 cat >conftest.$ac_ext <<_ACEOF
10286 #line 10286 "configure"
10287 #include "confdefs.h"
10288 #include <sys/types.h>
10293 #ifdef _POSIX_SOURCE
10300 rm -f conftest.$ac_objext
10301 if { (eval echo "$as_me:10301: \"$ac_compile\"") >&5
10302 (eval $ac_compile) 2>&5
10304 echo "$as_me:10304: \$? = $ac_status" >&5
10305 (exit $ac_status); } &&
10306 { ac_try='test -s conftest.$ac_objext'
10307 { (eval echo "$as_me:10307: \"$ac_try\"") >&5
10308 (eval $ac_try) 2>&5
10310 echo "$as_me:10310: \$? = $ac_status" >&5
10311 (exit $ac_status); }; }; then
10314 echo "$as_me: failed program was:" >&5
10315 cat conftest.$ac_ext >&5
10316 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10318 rm -f conftest.$ac_objext conftest.$ac_ext
10321 echo "${as_me:-configure}:10321: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10323 CFLAGS="$cf_trim_CFLAGS"
10324 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
10326 echo "${as_me:-configure}:10326: testing if the second compile does not leave our definition intact error ..." 1>&5
10328 cat >conftest.$ac_ext <<_ACEOF
10329 #line 10329 "configure"
10330 #include "confdefs.h"
10331 #include <sys/types.h>
10336 #ifndef _POSIX_C_SOURCE
10343 rm -f conftest.$ac_objext
10344 if { (eval echo "$as_me:10344: \"$ac_compile\"") >&5
10345 (eval $ac_compile) 2>&5
10347 echo "$as_me:10347: \$? = $ac_status" >&5
10348 (exit $ac_status); } &&
10349 { ac_try='test -s conftest.$ac_objext'
10350 { (eval echo "$as_me:10350: \"$ac_try\"") >&5
10351 (eval $ac_try) 2>&5
10353 echo "$as_me:10353: \$? = $ac_status" >&5
10354 (exit $ac_status); }; }; then
10357 echo "$as_me: failed program was:" >&5
10358 cat conftest.$ac_ext >&5
10359 cf_cv_posix_c_source=no
10361 rm -f conftest.$ac_objext conftest.$ac_ext
10362 CFLAGS="$cf_save_CFLAGS"
10363 CPPFLAGS="$cf_save_CPPFLAGS"
10366 rm -f conftest.$ac_objext conftest.$ac_ext
10369 echo "$as_me:10369: result: $cf_cv_posix_c_source" >&5
10370 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10372 if test "$cf_cv_posix_c_source" != no ; then
10373 CFLAGS="$cf_trim_CFLAGS"
10374 CPPFLAGS="$cf_trim_CPPFLAGS"
10379 cf_new_extra_cppflags=
10381 for cf_add_cflags in $cf_cv_posix_c_source
10383 case $cf_fix_cppflags in
10385 case $cf_add_cflags in
10386 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10387 case $cf_add_cflags in
10389 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10391 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10392 && test -z "${cf_tst_cflags}" \
10393 && cf_fix_cppflags=yes
10395 if test $cf_fix_cppflags = yes ; then
10396 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10398 elif test "${cf_tst_cflags}" = "\"'" ; then
10399 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10404 case "$CPPFLAGS" in
10408 case $cf_add_cflags in
10410 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10412 CPPFLAGS=`echo "$CPPFLAGS" | \
10413 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10414 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10418 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10423 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10428 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10430 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10432 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10433 && test -z "${cf_tst_cflags}" \
10434 && cf_fix_cppflags=no
10439 if test -n "$cf_new_cflags" ; then
10441 CFLAGS="$CFLAGS $cf_new_cflags"
10444 if test -n "$cf_new_cppflags" ; then
10446 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10449 if test -n "$cf_new_extra_cppflags" ; then
10451 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10459 if test -n "$cf_xopen_source" ; then
10464 cf_new_extra_cppflags=
10466 for cf_add_cflags in $cf_xopen_source
10468 case $cf_fix_cppflags in
10470 case $cf_add_cflags in
10471 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10472 case $cf_add_cflags in
10474 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10476 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10477 && test -z "${cf_tst_cflags}" \
10478 && cf_fix_cppflags=yes
10480 if test $cf_fix_cppflags = yes ; then
10481 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10483 elif test "${cf_tst_cflags}" = "\"'" ; then
10484 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10489 case "$CPPFLAGS" in
10493 case $cf_add_cflags in
10495 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10497 CPPFLAGS=`echo "$CPPFLAGS" | \
10498 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10499 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10503 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10508 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10513 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10515 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10517 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10518 && test -z "${cf_tst_cflags}" \
10519 && cf_fix_cppflags=no
10524 if test -n "$cf_new_cflags" ; then
10525 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
10527 echo "${as_me:-configure}:10527: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10529 CFLAGS="$CFLAGS $cf_new_cflags"
10532 if test -n "$cf_new_cppflags" ; then
10533 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10535 echo "${as_me:-configure}:10535: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10537 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10540 if test -n "$cf_new_extra_cppflags" ; then
10541 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10543 echo "${as_me:-configure}:10543: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10545 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10550 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10551 echo "$as_me:10551: checking if _XOPEN_SOURCE really is set" >&5
10552 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10553 cat >conftest.$ac_ext <<_ACEOF
10554 #line 10554 "configure"
10555 #include "confdefs.h"
10556 #include <stdlib.h>
10561 #ifndef _XOPEN_SOURCE
10568 rm -f conftest.$ac_objext
10569 if { (eval echo "$as_me:10569: \"$ac_compile\"") >&5
10570 (eval $ac_compile) 2>&5
10572 echo "$as_me:10572: \$? = $ac_status" >&5
10573 (exit $ac_status); } &&
10574 { ac_try='test -s conftest.$ac_objext'
10575 { (eval echo "$as_me:10575: \"$ac_try\"") >&5
10576 (eval $ac_try) 2>&5
10578 echo "$as_me:10578: \$? = $ac_status" >&5
10579 (exit $ac_status); }; }; then
10580 cf_XOPEN_SOURCE_set=yes
10582 echo "$as_me: failed program was:" >&5
10583 cat conftest.$ac_ext >&5
10584 cf_XOPEN_SOURCE_set=no
10586 rm -f conftest.$ac_objext conftest.$ac_ext
10587 echo "$as_me:10587: result: $cf_XOPEN_SOURCE_set" >&5
10588 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10589 if test $cf_XOPEN_SOURCE_set = yes
10591 cat >conftest.$ac_ext <<_ACEOF
10592 #line 10592 "configure"
10593 #include "confdefs.h"
10594 #include <stdlib.h>
10599 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10606 rm -f conftest.$ac_objext
10607 if { (eval echo "$as_me:10607: \"$ac_compile\"") >&5
10608 (eval $ac_compile) 2>&5
10610 echo "$as_me:10610: \$? = $ac_status" >&5
10611 (exit $ac_status); } &&
10612 { ac_try='test -s conftest.$ac_objext'
10613 { (eval echo "$as_me:10613: \"$ac_try\"") >&5
10614 (eval $ac_try) 2>&5
10616 echo "$as_me:10616: \$? = $ac_status" >&5
10617 (exit $ac_status); }; }; then
10618 cf_XOPEN_SOURCE_set_ok=yes
10620 echo "$as_me: failed program was:" >&5
10621 cat conftest.$ac_ext >&5
10622 cf_XOPEN_SOURCE_set_ok=no
10624 rm -f conftest.$ac_objext conftest.$ac_ext
10625 if test $cf_XOPEN_SOURCE_set_ok = no
10627 { echo "$as_me:10627: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10628 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10632 echo "$as_me:10632: checking if we should define _XOPEN_SOURCE" >&5
10633 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10634 if test "${cf_cv_xopen_source+set}" = set; then
10635 echo $ECHO_N "(cached) $ECHO_C" >&6
10638 cat >conftest.$ac_ext <<_ACEOF
10639 #line 10639 "configure"
10640 #include "confdefs.h"
10642 #include <stdlib.h>
10643 #include <string.h>
10644 #include <sys/types.h>
10650 #ifndef _XOPEN_SOURCE
10657 rm -f conftest.$ac_objext
10658 if { (eval echo "$as_me:10658: \"$ac_compile\"") >&5
10659 (eval $ac_compile) 2>&5
10661 echo "$as_me:10661: \$? = $ac_status" >&5
10662 (exit $ac_status); } &&
10663 { ac_try='test -s conftest.$ac_objext'
10664 { (eval echo "$as_me:10664: \"$ac_try\"") >&5
10665 (eval $ac_try) 2>&5
10667 echo "$as_me:10667: \$? = $ac_status" >&5
10668 (exit $ac_status); }; }; then
10669 cf_cv_xopen_source=no
10671 echo "$as_me: failed program was:" >&5
10672 cat conftest.$ac_ext >&5
10673 cf_save="$CPPFLAGS"
10674 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10675 cat >conftest.$ac_ext <<_ACEOF
10676 #line 10676 "configure"
10677 #include "confdefs.h"
10679 #include <stdlib.h>
10680 #include <string.h>
10681 #include <sys/types.h>
10687 #ifdef _XOPEN_SOURCE
10694 rm -f conftest.$ac_objext
10695 if { (eval echo "$as_me:10695: \"$ac_compile\"") >&5
10696 (eval $ac_compile) 2>&5
10698 echo "$as_me:10698: \$? = $ac_status" >&5
10699 (exit $ac_status); } &&
10700 { ac_try='test -s conftest.$ac_objext'
10701 { (eval echo "$as_me:10701: \"$ac_try\"") >&5
10702 (eval $ac_try) 2>&5
10704 echo "$as_me:10704: \$? = $ac_status" >&5
10705 (exit $ac_status); }; }; then
10706 cf_cv_xopen_source=no
10708 echo "$as_me: failed program was:" >&5
10709 cat conftest.$ac_ext >&5
10710 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10712 rm -f conftest.$ac_objext conftest.$ac_ext
10713 CPPFLAGS="$cf_save"
10716 rm -f conftest.$ac_objext conftest.$ac_ext
10719 echo "$as_me:10719: result: $cf_cv_xopen_source" >&5
10720 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10722 if test "$cf_cv_xopen_source" != no ; then
10724 CFLAGS=`echo "$CFLAGS" | \
10725 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10726 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10728 CPPFLAGS=`echo "$CPPFLAGS" | \
10729 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10730 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10732 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10737 cf_new_extra_cppflags=
10739 for cf_add_cflags in $cf_temp_xopen_source
10741 case $cf_fix_cppflags in
10743 case $cf_add_cflags in
10744 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10745 case $cf_add_cflags in
10747 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10749 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10750 && test -z "${cf_tst_cflags}" \
10751 && cf_fix_cppflags=yes
10753 if test $cf_fix_cppflags = yes ; then
10754 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10756 elif test "${cf_tst_cflags}" = "\"'" ; then
10757 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10762 case "$CPPFLAGS" in
10766 case $cf_add_cflags in
10768 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10770 CPPFLAGS=`echo "$CPPFLAGS" | \
10771 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10772 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10776 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10781 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10786 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10788 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10790 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10791 && test -z "${cf_tst_cflags}" \
10792 && cf_fix_cppflags=no
10797 if test -n "$cf_new_cflags" ; then
10799 CFLAGS="$CFLAGS $cf_new_cflags"
10802 if test -n "$cf_new_cppflags" ; then
10804 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10807 if test -n "$cf_new_extra_cppflags" ; then
10809 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10817 # Check whether --enable-largefile or --disable-largefile was given.
10818 if test "${enable_largefile+set}" = set; then
10819 enableval="$enable_largefile"
10822 if test "$enable_largefile" != no; then
10824 echo "$as_me:10824: checking for special C compiler options needed for large files" >&5
10825 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10826 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10827 echo $ECHO_N "(cached) $ECHO_C" >&6
10829 ac_cv_sys_largefile_CC=no
10830 if test "$GCC" != yes; then
10833 # IRIX 6.2 and later do not support large files by default,
10834 # so use the C compiler's -n32 option if that helps.
10835 cat >conftest.$ac_ext <<_ACEOF
10836 #line 10836 "configure"
10837 #include "confdefs.h"
10838 #include <sys/types.h>
10839 /* Check that off_t can represent 2**63 - 1 correctly.
10840 We can't simply define LARGE_OFF_T to be 9223372036854775807,
10841 since some C++ compilers masquerading as C compilers
10842 incorrectly reject 9223372036854775807. */
10843 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10844 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10845 && LARGE_OFF_T % 2147483647 == 1)
10855 rm -f conftest.$ac_objext
10856 if { (eval echo "$as_me:10856: \"$ac_compile\"") >&5
10857 (eval $ac_compile) 2>&5
10859 echo "$as_me:10859: \$? = $ac_status" >&5
10860 (exit $ac_status); } &&
10861 { ac_try='test -s conftest.$ac_objext'
10862 { (eval echo "$as_me:10862: \"$ac_try\"") >&5
10863 (eval $ac_try) 2>&5
10865 echo "$as_me:10865: \$? = $ac_status" >&5
10866 (exit $ac_status); }; }; then
10869 echo "$as_me: failed program was:" >&5
10870 cat conftest.$ac_ext >&5
10872 rm -f conftest.$ac_objext
10874 rm -f conftest.$ac_objext
10875 if { (eval echo "$as_me:10875: \"$ac_compile\"") >&5
10876 (eval $ac_compile) 2>&5
10878 echo "$as_me:10878: \$? = $ac_status" >&5
10879 (exit $ac_status); } &&
10880 { ac_try='test -s conftest.$ac_objext'
10881 { (eval echo "$as_me:10881: \"$ac_try\"") >&5
10882 (eval $ac_try) 2>&5
10884 echo "$as_me:10884: \$? = $ac_status" >&5
10885 (exit $ac_status); }; }; then
10886 ac_cv_sys_largefile_CC=' -n32'; break
10888 echo "$as_me: failed program was:" >&5
10889 cat conftest.$ac_ext >&5
10891 rm -f conftest.$ac_objext
10895 rm -f conftest.$ac_ext
10898 echo "$as_me:10898: result: $ac_cv_sys_largefile_CC" >&5
10899 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10900 if test "$ac_cv_sys_largefile_CC" != no; then
10901 CC=$CC$ac_cv_sys_largefile_CC
10904 echo "$as_me:10904: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10905 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10906 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10907 echo $ECHO_N "(cached) $ECHO_C" >&6
10910 ac_cv_sys_file_offset_bits=no
10911 cat >conftest.$ac_ext <<_ACEOF
10912 #line 10912 "configure"
10913 #include "confdefs.h"
10914 #include <sys/types.h>
10915 /* Check that off_t can represent 2**63 - 1 correctly.
10916 We can't simply define LARGE_OFF_T to be 9223372036854775807,
10917 since some C++ compilers masquerading as C compilers
10918 incorrectly reject 9223372036854775807. */
10919 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10920 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10921 && LARGE_OFF_T % 2147483647 == 1)
10931 rm -f conftest.$ac_objext
10932 if { (eval echo "$as_me:10932: \"$ac_compile\"") >&5
10933 (eval $ac_compile) 2>&5
10935 echo "$as_me:10935: \$? = $ac_status" >&5
10936 (exit $ac_status); } &&
10937 { ac_try='test -s conftest.$ac_objext'
10938 { (eval echo "$as_me:10938: \"$ac_try\"") >&5
10939 (eval $ac_try) 2>&5
10941 echo "$as_me:10941: \$? = $ac_status" >&5
10942 (exit $ac_status); }; }; then
10945 echo "$as_me: failed program was:" >&5
10946 cat conftest.$ac_ext >&5
10948 rm -f conftest.$ac_objext conftest.$ac_ext
10949 cat >conftest.$ac_ext <<_ACEOF
10950 #line 10950 "configure"
10951 #include "confdefs.h"
10952 #define _FILE_OFFSET_BITS 64
10953 #include <sys/types.h>
10954 /* Check that off_t can represent 2**63 - 1 correctly.
10955 We can't simply define LARGE_OFF_T to be 9223372036854775807,
10956 since some C++ compilers masquerading as C compilers
10957 incorrectly reject 9223372036854775807. */
10958 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10959 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10960 && LARGE_OFF_T % 2147483647 == 1)
10970 rm -f conftest.$ac_objext
10971 if { (eval echo "$as_me:10971: \"$ac_compile\"") >&5
10972 (eval $ac_compile) 2>&5
10974 echo "$as_me:10974: \$? = $ac_status" >&5
10975 (exit $ac_status); } &&
10976 { ac_try='test -s conftest.$ac_objext'
10977 { (eval echo "$as_me:10977: \"$ac_try\"") >&5
10978 (eval $ac_try) 2>&5
10980 echo "$as_me:10980: \$? = $ac_status" >&5
10981 (exit $ac_status); }; }; then
10982 ac_cv_sys_file_offset_bits=64; break
10984 echo "$as_me: failed program was:" >&5
10985 cat conftest.$ac_ext >&5
10987 rm -f conftest.$ac_objext conftest.$ac_ext
10991 echo "$as_me:10991: result: $ac_cv_sys_file_offset_bits" >&5
10992 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10993 if test "$ac_cv_sys_file_offset_bits" != no; then
10995 cat >>confdefs.h <<EOF
10996 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
11001 echo "$as_me:11001: checking for _LARGE_FILES value needed for large files" >&5
11002 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
11003 if test "${ac_cv_sys_large_files+set}" = set; then
11004 echo $ECHO_N "(cached) $ECHO_C" >&6
11007 ac_cv_sys_large_files=no
11008 cat >conftest.$ac_ext <<_ACEOF
11009 #line 11009 "configure"
11010 #include "confdefs.h"
11011 #include <sys/types.h>
11012 /* Check that off_t can represent 2**63 - 1 correctly.
11013 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11014 since some C++ compilers masquerading as C compilers
11015 incorrectly reject 9223372036854775807. */
11016 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11017 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11018 && LARGE_OFF_T % 2147483647 == 1)
11028 rm -f conftest.$ac_objext
11029 if { (eval echo "$as_me:11029: \"$ac_compile\"") >&5
11030 (eval $ac_compile) 2>&5
11032 echo "$as_me:11032: \$? = $ac_status" >&5
11033 (exit $ac_status); } &&
11034 { ac_try='test -s conftest.$ac_objext'
11035 { (eval echo "$as_me:11035: \"$ac_try\"") >&5
11036 (eval $ac_try) 2>&5
11038 echo "$as_me:11038: \$? = $ac_status" >&5
11039 (exit $ac_status); }; }; then
11042 echo "$as_me: failed program was:" >&5
11043 cat conftest.$ac_ext >&5
11045 rm -f conftest.$ac_objext conftest.$ac_ext
11046 cat >conftest.$ac_ext <<_ACEOF
11047 #line 11047 "configure"
11048 #include "confdefs.h"
11049 #define _LARGE_FILES 1
11050 #include <sys/types.h>
11051 /* Check that off_t can represent 2**63 - 1 correctly.
11052 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11053 since some C++ compilers masquerading as C compilers
11054 incorrectly reject 9223372036854775807. */
11055 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11056 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11057 && LARGE_OFF_T % 2147483647 == 1)
11067 rm -f conftest.$ac_objext
11068 if { (eval echo "$as_me:11068: \"$ac_compile\"") >&5
11069 (eval $ac_compile) 2>&5
11071 echo "$as_me:11071: \$? = $ac_status" >&5
11072 (exit $ac_status); } &&
11073 { ac_try='test -s conftest.$ac_objext'
11074 { (eval echo "$as_me:11074: \"$ac_try\"") >&5
11075 (eval $ac_try) 2>&5
11077 echo "$as_me:11077: \$? = $ac_status" >&5
11078 (exit $ac_status); }; }; then
11079 ac_cv_sys_large_files=1; break
11081 echo "$as_me: failed program was:" >&5
11082 cat conftest.$ac_ext >&5
11084 rm -f conftest.$ac_objext conftest.$ac_ext
11088 echo "$as_me:11088: result: $ac_cv_sys_large_files" >&5
11089 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
11090 if test "$ac_cv_sys_large_files" != no; then
11092 cat >>confdefs.h <<EOF
11093 #define _LARGE_FILES $ac_cv_sys_large_files
11100 if test "$enable_largefile" != no ; then
11101 echo "$as_me:11101: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11102 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
11103 if test "${ac_cv_sys_largefile_source+set}" = set; then
11104 echo $ECHO_N "(cached) $ECHO_C" >&6
11107 ac_cv_sys_largefile_source=no
11108 cat >conftest.$ac_ext <<_ACEOF
11109 #line 11109 "configure"
11110 #include "confdefs.h"
11120 rm -f conftest.$ac_objext
11121 if { (eval echo "$as_me:11121: \"$ac_compile\"") >&5
11122 (eval $ac_compile) 2>&5
11124 echo "$as_me:11124: \$? = $ac_status" >&5
11125 (exit $ac_status); } &&
11126 { ac_try='test -s conftest.$ac_objext'
11127 { (eval echo "$as_me:11127: \"$ac_try\"") >&5
11128 (eval $ac_try) 2>&5
11130 echo "$as_me:11130: \$? = $ac_status" >&5
11131 (exit $ac_status); }; }; then
11134 echo "$as_me: failed program was:" >&5
11135 cat conftest.$ac_ext >&5
11137 rm -f conftest.$ac_objext conftest.$ac_ext
11138 cat >conftest.$ac_ext <<_ACEOF
11139 #line 11139 "configure"
11140 #include "confdefs.h"
11141 #define _LARGEFILE_SOURCE 1
11151 rm -f conftest.$ac_objext
11152 if { (eval echo "$as_me:11152: \"$ac_compile\"") >&5
11153 (eval $ac_compile) 2>&5
11155 echo "$as_me:11155: \$? = $ac_status" >&5
11156 (exit $ac_status); } &&
11157 { ac_try='test -s conftest.$ac_objext'
11158 { (eval echo "$as_me:11158: \"$ac_try\"") >&5
11159 (eval $ac_try) 2>&5
11161 echo "$as_me:11161: \$? = $ac_status" >&5
11162 (exit $ac_status); }; }; then
11163 ac_cv_sys_largefile_source=1; break
11165 echo "$as_me: failed program was:" >&5
11166 cat conftest.$ac_ext >&5
11168 rm -f conftest.$ac_objext conftest.$ac_ext
11172 echo "$as_me:11172: result: $ac_cv_sys_largefile_source" >&5
11173 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
11174 if test "$ac_cv_sys_largefile_source" != no; then
11176 cat >>confdefs.h <<EOF
11177 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11183 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11184 # in glibc 2.1.3, but that breaks too many other things.
11185 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11186 echo "$as_me:11186: checking for fseeko" >&5
11187 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
11188 if test "${ac_cv_func_fseeko+set}" = set; then
11189 echo $ECHO_N "(cached) $ECHO_C" >&6
11191 cat >conftest.$ac_ext <<_ACEOF
11192 #line 11192 "configure"
11193 #include "confdefs.h"
11198 return fseeko && fseeko (stdin, 0, 0);
11203 rm -f conftest.$ac_objext conftest$ac_exeext
11204 if { (eval echo "$as_me:11204: \"$ac_link\"") >&5
11205 (eval $ac_link) 2>&5
11207 echo "$as_me:11207: \$? = $ac_status" >&5
11208 (exit $ac_status); } &&
11209 { ac_try='test -s conftest$ac_exeext'
11210 { (eval echo "$as_me:11210: \"$ac_try\"") >&5
11211 (eval $ac_try) 2>&5
11213 echo "$as_me:11213: \$? = $ac_status" >&5
11214 (exit $ac_status); }; }; then
11215 ac_cv_func_fseeko=yes
11217 echo "$as_me: failed program was:" >&5
11218 cat conftest.$ac_ext >&5
11219 ac_cv_func_fseeko=no
11221 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11223 echo "$as_me:11223: result: $ac_cv_func_fseeko" >&5
11224 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
11225 if test $ac_cv_func_fseeko = yes; then
11227 cat >>confdefs.h <<\EOF
11228 #define HAVE_FSEEKO 1
11233 # Normally we would collect these definitions in the config.h,
11234 # but (like _XOPEN_SOURCE), some environments rely on having these
11235 # defined before any of the system headers are included. Another
11236 # case comes up with C++, e.g., on AIX the compiler compiles the
11237 # header files by themselves before looking at the body files it is
11238 # told to compile. For ncurses, those header files do not include
11240 test "$ac_cv_sys_large_files" != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
11241 test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
11242 test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
11244 echo "$as_me:11244: checking whether to use struct dirent64" >&5
11245 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
11246 if test "${cf_cv_struct_dirent64+set}" = set; then
11247 echo $ECHO_N "(cached) $ECHO_C" >&6
11250 cat >conftest.$ac_ext <<_ACEOF
11251 #line 11251 "configure"
11252 #include "confdefs.h"
11254 #include <sys/types.h>
11255 #include <dirent.h>
11261 /* if transitional largefile support is setup, this is true */
11262 extern struct dirent64 * readdir(DIR *);
11263 struct dirent64 *x = readdir((DIR *)0);
11264 struct dirent *y = readdir((DIR *)0);
11271 rm -f conftest.$ac_objext
11272 if { (eval echo "$as_me:11272: \"$ac_compile\"") >&5
11273 (eval $ac_compile) 2>&5
11275 echo "$as_me:11275: \$? = $ac_status" >&5
11276 (exit $ac_status); } &&
11277 { ac_try='test -s conftest.$ac_objext'
11278 { (eval echo "$as_me:11278: \"$ac_try\"") >&5
11279 (eval $ac_try) 2>&5
11281 echo "$as_me:11281: \$? = $ac_status" >&5
11282 (exit $ac_status); }; }; then
11283 cf_cv_struct_dirent64=yes
11285 echo "$as_me: failed program was:" >&5
11286 cat conftest.$ac_ext >&5
11287 cf_cv_struct_dirent64=no
11289 rm -f conftest.$ac_objext conftest.$ac_ext
11292 echo "$as_me:11292: result: $cf_cv_struct_dirent64" >&5
11293 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11294 test "$cf_cv_struct_dirent64" = yes &&
11295 cat >>confdefs.h <<\EOF
11296 #define HAVE_STRUCT_DIRENT64 1
11301 ### Enable compiling-in rcs id's
11302 echo "$as_me:11302: checking if RCS identifiers should be compiled-in" >&5
11303 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
11305 # Check whether --with-rcs-ids or --without-rcs-ids was given.
11306 if test "${with_rcs_ids+set}" = set; then
11307 withval="$with_rcs_ids"
11308 with_rcs_ids=$withval
11312 echo "$as_me:11312: result: $with_rcs_ids" >&5
11313 echo "${ECHO_T}$with_rcs_ids" >&6
11314 test "$with_rcs_ids" = yes &&
11315 cat >>confdefs.h <<\EOF
11316 #define USE_RCS_IDS 1
11319 ###############################################################################
11321 ### Note that some functions (such as const) are normally disabled anyway.
11322 echo "$as_me:11322: checking if you want to build with function extensions" >&5
11323 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11325 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11326 if test "${enable_ext_funcs+set}" = set; then
11327 enableval="$enable_ext_funcs"
11328 with_ext_funcs=$enableval
11332 echo "$as_me:11332: result: $with_ext_funcs" >&5
11333 echo "${ECHO_T}$with_ext_funcs" >&6
11334 if test "$with_ext_funcs" = yes ; then
11335 NCURSES_EXT_FUNCS=1
11337 cat >>confdefs.h <<\EOF
11338 #define HAVE_USE_DEFAULT_COLORS 1
11341 cat >>confdefs.h <<\EOF
11342 #define NCURSES_EXT_FUNCS 1
11346 NCURSES_EXT_FUNCS=0
11349 ### use option --enable-const to turn on use of const beyond that in XSI.
11350 echo "$as_me:11350: checking for extended use of const keyword" >&5
11351 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11353 # Check whether --enable-const or --disable-const was given.
11354 if test "${enable_const+set}" = set; then
11355 enableval="$enable_const"
11356 with_ext_const=$enableval
11360 echo "$as_me:11360: result: $with_ext_const" >&5
11361 echo "${ECHO_T}$with_ext_const" >&6
11362 NCURSES_CONST='/*nothing*/'
11363 if test "$with_ext_const" = yes ; then
11364 NCURSES_CONST=const
11367 ###############################################################################
11368 # These options are relatively safe to experiment with.
11370 echo "$as_me:11370: checking if you want all development code" >&5
11371 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11373 # Check whether --with-develop or --without-develop was given.
11374 if test "${with_develop+set}" = set; then
11375 withval="$with_develop"
11376 with_develop=$withval
11380 echo "$as_me:11380: result: $with_develop" >&5
11381 echo "${ECHO_T}$with_develop" >&6
11383 ###############################################################################
11384 # These are just experimental, probably should not be in a package:
11386 # This is still experimental (20080329), but should ultimately be moved to
11387 # the script-block --with-normal, etc.
11389 echo "$as_me:11389: checking if you want to link with the pthread library" >&5
11390 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11392 # Check whether --with-pthread or --without-pthread was given.
11393 if test "${with_pthread+set}" = set; then
11394 withval="$with_pthread"
11395 with_pthread=$withval
11399 echo "$as_me:11399: result: $with_pthread" >&5
11400 echo "${ECHO_T}$with_pthread" >&6
11402 if test "$with_pthread" != no ; then
11403 echo "$as_me:11403: checking for pthread.h" >&5
11404 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11405 if test "${ac_cv_header_pthread_h+set}" = set; then
11406 echo $ECHO_N "(cached) $ECHO_C" >&6
11408 cat >conftest.$ac_ext <<_ACEOF
11409 #line 11409 "configure"
11410 #include "confdefs.h"
11411 #include <pthread.h>
11413 if { (eval echo "$as_me:11413: \"$ac_cpp conftest.$ac_ext\"") >&5
11414 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11416 egrep -v '^ *\+' conftest.er1 >conftest.err
11418 cat conftest.err >&5
11419 echo "$as_me:11419: \$? = $ac_status" >&5
11420 (exit $ac_status); } >/dev/null; then
11421 if test -s conftest.err; then
11422 ac_cpp_err=$ac_c_preproc_warn_flag
11429 if test -z "$ac_cpp_err"; then
11430 ac_cv_header_pthread_h=yes
11432 echo "$as_me: failed program was:" >&5
11433 cat conftest.$ac_ext >&5
11434 ac_cv_header_pthread_h=no
11436 rm -f conftest.err conftest.$ac_ext
11438 echo "$as_me:11438: result: $ac_cv_header_pthread_h" >&5
11439 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11440 if test $ac_cv_header_pthread_h = yes; then
11442 cat >>confdefs.h <<\EOF
11443 #define HAVE_PTHREADS_H 1
11446 for cf_lib_pthread in pthread c_r
11448 echo "$as_me:11448: checking if we can link with the $cf_lib_pthread library" >&5
11449 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11450 cf_save_LIBS="$LIBS"
11452 cf_add_libs="-l$cf_lib_pthread"
11453 # Filter out duplicates - this happens with badly-designed ".pc" files...
11454 for cf_add_1lib in $LIBS
11456 for cf_add_2lib in $cf_add_libs
11458 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11464 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11466 LIBS="$cf_add_libs"
11468 cat >conftest.$ac_ext <<_ACEOF
11469 #line 11469 "configure"
11470 #include "confdefs.h"
11472 #include <pthread.h>
11478 int rc = pthread_create(0,0,0,0);
11479 int r2 = pthread_mutexattr_settype(0, 0);
11485 rm -f conftest.$ac_objext conftest$ac_exeext
11486 if { (eval echo "$as_me:11486: \"$ac_link\"") >&5
11487 (eval $ac_link) 2>&5
11489 echo "$as_me:11489: \$? = $ac_status" >&5
11490 (exit $ac_status); } &&
11491 { ac_try='test -s conftest$ac_exeext'
11492 { (eval echo "$as_me:11492: \"$ac_try\"") >&5
11493 (eval $ac_try) 2>&5
11495 echo "$as_me:11495: \$? = $ac_status" >&5
11496 (exit $ac_status); }; }; then
11499 echo "$as_me: failed program was:" >&5
11500 cat conftest.$ac_ext >&5
11503 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11504 LIBS="$cf_save_LIBS"
11505 echo "$as_me:11505: result: $with_pthread" >&5
11506 echo "${ECHO_T}$with_pthread" >&6
11507 test "$with_pthread" = yes && break
11510 if test "$with_pthread" = yes ; then
11512 cf_add_libs="-l$cf_lib_pthread"
11513 # Filter out duplicates - this happens with badly-designed ".pc" files...
11514 for cf_add_1lib in $LIBS
11516 for cf_add_2lib in $cf_add_libs
11518 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11524 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11526 LIBS="$cf_add_libs"
11528 cat >>confdefs.h <<\EOF
11529 #define HAVE_LIBPTHREADS 1
11533 { { echo "$as_me:11533: error: Cannot link with pthread library" >&5
11534 echo "$as_me: error: Cannot link with pthread library" >&2;}
11535 { (exit 1); exit 1; }; }
11542 echo "$as_me:11542: checking if you want to use weak-symbols for pthreads" >&5
11543 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11545 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11546 if test "${enable_weak_symbols+set}" = set; then
11547 enableval="$enable_weak_symbols"
11548 use_weak_symbols=$withval
11550 use_weak_symbols=no
11552 echo "$as_me:11552: result: $use_weak_symbols" >&5
11553 echo "${ECHO_T}$use_weak_symbols" >&6
11554 if test "$use_weak_symbols" = yes ; then
11556 echo "$as_me:11556: checking if $CC supports weak symbols" >&5
11557 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11558 if test "${cf_cv_weak_symbols+set}" = set; then
11559 echo $ECHO_N "(cached) $ECHO_C" >&6
11562 cat >conftest.$ac_ext <<_ACEOF
11563 #line 11563 "configure"
11564 #include "confdefs.h"
11571 #if defined(__GNUC__)
11572 # if defined __USE_ISOC99
11573 # define _cat_pragma(exp) _Pragma(#exp)
11574 # define _weak_pragma(exp) _cat_pragma(weak name)
11576 # define _weak_pragma(exp)
11578 # define _declare(name) __extension__ extern __typeof__(name) name
11579 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
11582 weak_symbol(fopen);
11588 rm -f conftest.$ac_objext
11589 if { (eval echo "$as_me:11589: \"$ac_compile\"") >&5
11590 (eval $ac_compile) 2>&5
11592 echo "$as_me:11592: \$? = $ac_status" >&5
11593 (exit $ac_status); } &&
11594 { ac_try='test -s conftest.$ac_objext'
11595 { (eval echo "$as_me:11595: \"$ac_try\"") >&5
11596 (eval $ac_try) 2>&5
11598 echo "$as_me:11598: \$? = $ac_status" >&5
11599 (exit $ac_status); }; }; then
11600 cf_cv_weak_symbols=yes
11602 echo "$as_me: failed program was:" >&5
11603 cat conftest.$ac_ext >&5
11604 cf_cv_weak_symbols=no
11606 rm -f conftest.$ac_objext conftest.$ac_ext
11609 echo "$as_me:11609: result: $cf_cv_weak_symbols" >&5
11610 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11613 cf_cv_weak_symbols=no
11616 if test $cf_cv_weak_symbols = yes ; then
11618 cat >>confdefs.h <<\EOF
11619 #define USE_WEAK_SYMBOLS 1
11625 if test "$with_pthread" = "yes" ; then
11627 cat >>confdefs.h <<\EOF
11628 #define USE_PTHREADS 1
11631 enable_reentrant=yes
11632 if test $cf_cv_weak_symbols = yes ; then
11637 # OpenSUSE is installing ncurses6, using reentrant option.
11638 echo "$as_me:11638: checking for _nc_TABSIZE" >&5
11639 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
11640 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
11641 echo $ECHO_N "(cached) $ECHO_C" >&6
11643 cat >conftest.$ac_ext <<_ACEOF
11644 #line 11644 "configure"
11645 #include "confdefs.h"
11646 /* System header to define __stub macros and hopefully few prototypes,
11647 which can conflict with char _nc_TABSIZE (); below. */
11648 #include <assert.h>
11649 /* Override any gcc2 internal prototype to avoid an error. */
11653 /* We use char because int might match the return type of a gcc2
11654 builtin and then its argument prototype would still apply. */
11655 char _nc_TABSIZE ();
11661 /* The GNU C library defines this for functions which it implements
11662 to always fail with ENOSYS. Some functions are actually named
11663 something starting with __ and the normal name is an alias. */
11664 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
11667 f = _nc_TABSIZE; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11674 rm -f conftest.$ac_objext conftest$ac_exeext
11675 if { (eval echo "$as_me:11675: \"$ac_link\"") >&5
11676 (eval $ac_link) 2>&5
11678 echo "$as_me:11678: \$? = $ac_status" >&5
11679 (exit $ac_status); } &&
11680 { ac_try='test -s conftest$ac_exeext'
11681 { (eval echo "$as_me:11681: \"$ac_try\"") >&5
11682 (eval $ac_try) 2>&5
11684 echo "$as_me:11684: \$? = $ac_status" >&5
11685 (exit $ac_status); }; }; then
11686 ac_cv_func__nc_TABSIZE=yes
11688 echo "$as_me: failed program was:" >&5
11689 cat conftest.$ac_ext >&5
11690 ac_cv_func__nc_TABSIZE=no
11692 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11694 echo "$as_me:11694: result: $ac_cv_func__nc_TABSIZE" >&5
11695 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
11696 if test $ac_cv_func__nc_TABSIZE = yes; then
11697 assume_reentrant=yes
11699 assume_reentrant=no
11702 # Reentrant code has to be opaque; there's little advantage to making ncurses
11703 # opaque outside of that, so there is no --enable-opaque option. We can use
11704 # this option without --with-pthreads, but this will be always set for
11706 echo "$as_me:11706: checking if you want experimental reentrant code" >&5
11707 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11709 # Check whether --enable-reentrant or --disable-reentrant was given.
11710 if test "${enable_reentrant+set}" = set; then
11711 enableval="$enable_reentrant"
11712 with_reentrant=$enableval
11714 with_reentrant=$assume_reentrant
11716 echo "$as_me:11716: result: $with_reentrant" >&5
11717 echo "${ECHO_T}$with_reentrant" >&6
11718 if test "$with_reentrant" = yes ; then
11719 cf_cv_enable_reentrant=1
11720 if test $cf_cv_weak_symbols = yes ; then
11722 # remove pthread library from $LIBS
11723 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
11725 elif test "$assume_reentrant" = no ; then
11726 LIB_SUFFIX="t${LIB_SUFFIX}"
11729 cat >>confdefs.h <<\EOF
11730 #define USE_REENTRANT 1
11734 cf_cv_enable_reentrant=0
11737 ### Allow using a different wrap-prefix
11738 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11739 echo "$as_me:11739: checking for prefix used to wrap public variables" >&5
11740 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11742 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11743 if test "${with_wrap_prefix+set}" = set; then
11744 withval="$with_wrap_prefix"
11745 NCURSES_WRAP_PREFIX=$withval
11747 NCURSES_WRAP_PREFIX=_nc_
11749 echo "$as_me:11749: result: $NCURSES_WRAP_PREFIX" >&5
11750 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11752 NCURSES_WRAP_PREFIX=_nc_
11755 cat >>confdefs.h <<EOF
11756 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11759 ###############################################################################
11761 ### use option --disable-echo to suppress full display compiling commands
11763 echo "$as_me:11763: checking if you want to see long compiling messages" >&5
11764 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
11766 # Check whether --enable-echo or --disable-echo was given.
11767 if test "${enable_echo+set}" = set; then
11768 enableval="$enable_echo"
11769 test "$enableval" != no && enableval=yes
11770 if test "$enableval" != "yes" ; then
11773 ECHO_LD='@echo linking $@;'
11774 RULE_CC='@echo compiling $<'
11775 SHOW_CC='@echo compiling $@'
11797 echo "$as_me:11797: result: $enableval" >&5
11798 echo "${ECHO_T}$enableval" >&6
11800 ### use option --enable-warnings to turn on all gcc warnings
11801 echo "$as_me:11801: checking if you want to see compiler warnings" >&5
11802 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11804 # Check whether --enable-warnings or --disable-warnings was given.
11805 if test "${enable_warnings+set}" = set; then
11806 enableval="$enable_warnings"
11807 with_warnings=$enableval
11809 echo "$as_me:11809: result: $with_warnings" >&5
11810 echo "${ECHO_T}$with_warnings" >&6
11812 if test "x$with_warnings" = "xyes"; then
11814 ADAFLAGS="$ADAFLAGS -gnatg"
11818 if test "$GCC" = yes ; then
11821 echo "$as_me:11821: checking if this is really Intel C compiler" >&5
11822 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11823 cf_save_CFLAGS="$CFLAGS"
11824 CFLAGS="$CFLAGS -no-gcc"
11825 cat >conftest.$ac_ext <<_ACEOF
11826 #line 11826 "configure"
11827 #include "confdefs.h"
11833 #ifdef __INTEL_COMPILER
11842 rm -f conftest.$ac_objext
11843 if { (eval echo "$as_me:11843: \"$ac_compile\"") >&5
11844 (eval $ac_compile) 2>&5
11846 echo "$as_me:11846: \$? = $ac_status" >&5
11847 (exit $ac_status); } &&
11848 { ac_try='test -s conftest.$ac_objext'
11849 { (eval echo "$as_me:11849: \"$ac_try\"") >&5
11850 (eval $ac_try) 2>&5
11852 echo "$as_me:11852: \$? = $ac_status" >&5
11853 (exit $ac_status); }; }; then
11855 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
11858 echo "$as_me: failed program was:" >&5
11859 cat conftest.$ac_ext >&5
11861 rm -f conftest.$ac_objext conftest.$ac_ext
11862 CFLAGS="$cf_save_CFLAGS"
11863 echo "$as_me:11863: result: $INTEL_COMPILER" >&5
11864 echo "${ECHO_T}$INTEL_COMPILER" >&6
11871 if test "$GCC" = yes ; then
11872 echo "$as_me:11872: checking if this is really Clang C compiler" >&5
11873 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
11874 cf_save_CFLAGS="$CFLAGS"
11875 CFLAGS="$CFLAGS -Qunused-arguments"
11876 cat >conftest.$ac_ext <<_ACEOF
11877 #line 11877 "configure"
11878 #include "confdefs.h"
11893 rm -f conftest.$ac_objext
11894 if { (eval echo "$as_me:11894: \"$ac_compile\"") >&5
11895 (eval $ac_compile) 2>&5
11897 echo "$as_me:11897: \$? = $ac_status" >&5
11898 (exit $ac_status); } &&
11899 { ac_try='test -s conftest.$ac_objext'
11900 { (eval echo "$as_me:11900: \"$ac_try\"") >&5
11901 (eval $ac_try) 2>&5
11903 echo "$as_me:11903: \$? = $ac_status" >&5
11904 (exit $ac_status); }; }; then
11906 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
11909 echo "$as_me: failed program was:" >&5
11910 cat conftest.$ac_ext >&5
11912 rm -f conftest.$ac_objext conftest.$ac_ext
11913 CFLAGS="$cf_save_CFLAGS"
11914 echo "$as_me:11914: result: $CLANG_COMPILER" >&5
11915 echo "${ECHO_T}$CLANG_COMPILER" >&6
11918 cat > conftest.$ac_ext <<EOF
11919 #line 11919 "${as_me:-configure}"
11920 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11923 if test "$INTEL_COMPILER" = yes
11925 # The "-wdXXX" options suppress warnings:
11926 # remark #1419: external declaration in primary source file
11927 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11928 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11929 # remark #193: zero used for undefined preprocessing identifier
11930 # remark #593: variable "curs_sb_left_arrow" was set but never used
11931 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11932 # remark #869: parameter "tw" was never referenced
11933 # remark #981: operands are evaluated in unspecified order
11934 # warning #279: controlling expression is constant
11936 { echo "$as_me:11936: checking for $CC warning options..." >&5
11937 echo "$as_me: checking for $CC warning options..." >&6;}
11938 cf_save_CFLAGS="$CFLAGS"
11939 EXTRA_CFLAGS="-Wall"
11951 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11952 if { (eval echo "$as_me:11952: \"$ac_compile\"") >&5
11953 (eval $ac_compile) 2>&5
11955 echo "$as_me:11955: \$? = $ac_status" >&5
11956 (exit $ac_status); }; then
11957 test -n "$verbose" && echo "$as_me:11957: result: ... -$cf_opt" >&5
11958 echo "${ECHO_T}... -$cf_opt" >&6
11959 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11962 CFLAGS="$cf_save_CFLAGS"
11964 elif test "$GCC" = yes
11966 { echo "$as_me:11966: checking for $CC warning options..." >&5
11967 echo "$as_me: checking for $CC warning options..." >&6;}
11968 cf_save_CFLAGS="$CFLAGS"
11971 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
11972 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
11973 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
11974 for cf_opt in W Wall \
11975 Wbad-function-cast \
11978 Wdeclaration-after-statement \
11981 Wmissing-declarations \
11982 Wmissing-prototypes \
11986 Wstrict-prototypes \
11987 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
11989 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11990 if { (eval echo "$as_me:11990: \"$ac_compile\"") >&5
11991 (eval $ac_compile) 2>&5
11993 echo "$as_me:11993: \$? = $ac_status" >&5
11994 (exit $ac_status); }; then
11995 test -n "$verbose" && echo "$as_me:11995: result: ... -$cf_opt" >&5
11996 echo "${ECHO_T}... -$cf_opt" >&6
11999 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12002 case $GCC_VERSION in
12004 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
12006 echo "${as_me:-configure}:12006: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12012 case $GCC_VERSION in
12014 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
12016 echo "${as_me:-configure}:12016: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12022 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12025 CFLAGS="$cf_save_CFLAGS"
12031 if test "$GCC" = yes
12033 cat > conftest.i <<EOF
12035 #define GCC_PRINTF 0
12038 #define GCC_SCANF 0
12040 #ifndef GCC_NORETURN
12041 #define GCC_NORETURN /* nothing */
12044 #define GCC_UNUSED /* nothing */
12047 if test "$GCC" = yes
12049 { echo "$as_me:12049: checking for $CC __attribute__ directives..." >&5
12050 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12051 cat > conftest.$ac_ext <<EOF
12052 #line 12052 "${as_me:-configure}"
12053 #include "confdefs.h"
12054 #include "conftest.h"
12055 #include "conftest.i"
12057 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12059 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12062 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
12064 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
12066 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12067 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12068 extern void foo(void) GCC_NORETURN;
12069 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12071 cf_printf_attribute=no
12072 cf_scanf_attribute=no
12073 for cf_attribute in scanf printf unused noreturn
12076 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12078 cf_directive="__attribute__(($cf_attribute))"
12079 echo "checking for $CC $cf_directive" 1>&5
12081 case $cf_attribute in
12083 cf_printf_attribute=yes
12084 cat >conftest.h <<EOF
12085 #define GCC_$cf_ATTRIBUTE 1
12089 cf_scanf_attribute=yes
12090 cat >conftest.h <<EOF
12091 #define GCC_$cf_ATTRIBUTE 1
12095 cat >conftest.h <<EOF
12096 #define GCC_$cf_ATTRIBUTE $cf_directive
12101 if { (eval echo "$as_me:12101: \"$ac_compile\"") >&5
12102 (eval $ac_compile) 2>&5
12104 echo "$as_me:12104: \$? = $ac_status" >&5
12105 (exit $ac_status); }; then
12106 test -n "$verbose" && echo "$as_me:12106: result: ... $cf_attribute" >&5
12107 echo "${ECHO_T}... $cf_attribute" >&6
12108 cat conftest.h >>confdefs.h
12109 case $cf_attribute in
12112 cat >>confdefs.h <<EOF
12113 #define GCC_NORETURN $cf_directive
12118 cf_value='/* nothing */'
12119 if test "$cf_printf_attribute" != no ; then
12120 cf_value='__attribute__((format(printf,fmt,var)))'
12122 cat >>confdefs.h <<\EOF
12123 #define GCC_PRINTF 1
12128 cat >>confdefs.h <<EOF
12129 #define GCC_PRINTFLIKE(fmt,var) $cf_value
12134 cf_value='/* nothing */'
12135 if test "$cf_scanf_attribute" != no ; then
12136 cf_value='__attribute__((format(scanf,fmt,var)))'
12138 cat >>confdefs.h <<\EOF
12139 #define GCC_SCANF 1
12144 cat >>confdefs.h <<EOF
12145 #define GCC_SCANFLIKE(fmt,var) $cf_value
12151 cat >>confdefs.h <<EOF
12152 #define GCC_UNUSED $cf_directive
12160 fgrep define conftest.i >>confdefs.h
12165 ### use option --enable-assertions to turn on generation of assertion code
12166 echo "$as_me:12166: checking if you want to enable runtime assertions" >&5
12167 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12169 # Check whether --enable-assertions or --disable-assertions was given.
12170 if test "${enable_assertions+set}" = set; then
12171 enableval="$enable_assertions"
12172 with_assertions=$enableval
12176 echo "$as_me:12176: result: $with_assertions" >&5
12177 echo "${ECHO_T}$with_assertions" >&6
12180 if test "$with_assertions" = no
12182 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12185 ADAFLAGS="$ADAFLAGS -gnata"
12190 ### use option --disable-leaks to suppress "permanent" leaks, for testing
12192 cat >>confdefs.h <<\EOF
12193 #define HAVE_NC_ALLOC_H 1
12196 ### use option --enable-expanded to generate certain macros as functions
12198 # Check whether --enable-expanded or --disable-expanded was given.
12199 if test "${enable_expanded+set}" = set; then
12200 enableval="$enable_expanded"
12201 test "$enableval" = yes &&
12202 cat >>confdefs.h <<\EOF
12203 #define NCURSES_EXPANDED 1
12208 ### use option --disable-macros to suppress macros in favor of functions
12210 # Check whether --enable-macros or --disable-macros was given.
12211 if test "${enable_macros+set}" = set; then
12212 enableval="$enable_macros"
12213 test "$enableval" = no &&
12214 cat >>confdefs.h <<\EOF
12215 #define NCURSES_NOMACROS 1
12220 # Normally we only add trace() to the debug-library. Allow this to be
12221 # extended to all models of the ncurses library:
12223 case "$CFLAGS $CPPFLAGS" in
12229 echo "$as_me:12229: checking whether to add trace feature to all models" >&5
12230 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
12232 # Check whether --with-trace or --without-trace was given.
12233 if test "${with_trace+set}" = set; then
12234 withval="$with_trace"
12235 cf_with_trace=$withval
12237 cf_with_trace=$cf_all_traces
12239 echo "$as_me:12239: result: $cf_with_trace" >&5
12240 echo "${ECHO_T}$cf_with_trace" >&6
12242 if test "$cf_with_trace" = yes ; then
12248 cf_new_extra_cppflags=
12250 for cf_add_cflags in -DTRACE
12252 case $cf_fix_cppflags in
12254 case $cf_add_cflags in
12255 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12256 case $cf_add_cflags in
12258 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12260 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12261 && test -z "${cf_tst_cflags}" \
12262 && cf_fix_cppflags=yes
12264 if test $cf_fix_cppflags = yes ; then
12265 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12267 elif test "${cf_tst_cflags}" = "\"'" ; then
12268 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12273 case "$CPPFLAGS" in
12277 case $cf_add_cflags in
12279 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12281 CPPFLAGS=`echo "$CPPFLAGS" | \
12282 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12283 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12287 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12292 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12297 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12299 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12301 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12302 && test -z "${cf_tst_cflags}" \
12303 && cf_fix_cppflags=no
12308 if test -n "$cf_new_cflags" ; then
12310 CFLAGS="$CFLAGS $cf_new_cflags"
12313 if test -n "$cf_new_cppflags" ; then
12315 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12318 if test -n "$cf_new_extra_cppflags" ; then
12320 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12327 echo "$as_me:12327: checking if we want to use GNAT projects" >&5
12328 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
12330 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
12331 if test "${enable_gnat_projects+set}" = set; then
12332 enableval="$enable_gnat_projects"
12333 test "$enableval" != no && enableval=yes
12334 if test "$enableval" != "yes" ; then
12335 enable_gnat_projects=no
12337 enable_gnat_projects=yes
12341 enable_gnat_projects=yes
12344 echo "$as_me:12344: result: $enable_gnat_projects" >&5
12345 echo "${ECHO_T}$enable_gnat_projects" >&6
12347 ### Checks for libraries.
12348 case $cf_cv_system_name in
12352 echo "$as_me:12352: checking for gettimeofday" >&5
12353 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
12354 if test "${ac_cv_func_gettimeofday+set}" = set; then
12355 echo $ECHO_N "(cached) $ECHO_C" >&6
12357 cat >conftest.$ac_ext <<_ACEOF
12358 #line 12358 "configure"
12359 #include "confdefs.h"
12360 /* System header to define __stub macros and hopefully few prototypes,
12361 which can conflict with char gettimeofday (); below. */
12362 #include <assert.h>
12363 /* Override any gcc2 internal prototype to avoid an error. */
12367 /* We use char because int might match the return type of a gcc2
12368 builtin and then its argument prototype would still apply. */
12369 char gettimeofday ();
12375 /* The GNU C library defines this for functions which it implements
12376 to always fail with ENOSYS. Some functions are actually named
12377 something starting with __ and the normal name is an alias. */
12378 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
12381 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12388 rm -f conftest.$ac_objext conftest$ac_exeext
12389 if { (eval echo "$as_me:12389: \"$ac_link\"") >&5
12390 (eval $ac_link) 2>&5
12392 echo "$as_me:12392: \$? = $ac_status" >&5
12393 (exit $ac_status); } &&
12394 { ac_try='test -s conftest$ac_exeext'
12395 { (eval echo "$as_me:12395: \"$ac_try\"") >&5
12396 (eval $ac_try) 2>&5
12398 echo "$as_me:12398: \$? = $ac_status" >&5
12399 (exit $ac_status); }; }; then
12400 ac_cv_func_gettimeofday=yes
12402 echo "$as_me: failed program was:" >&5
12403 cat conftest.$ac_ext >&5
12404 ac_cv_func_gettimeofday=no
12406 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12408 echo "$as_me:12408: result: $ac_cv_func_gettimeofday" >&5
12409 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
12410 if test $ac_cv_func_gettimeofday = yes; then
12411 cat >>confdefs.h <<\EOF
12412 #define HAVE_GETTIMEOFDAY 1
12417 echo "$as_me:12417: checking for gettimeofday in -lbsd" >&5
12418 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
12419 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
12420 echo $ECHO_N "(cached) $ECHO_C" >&6
12422 ac_check_lib_save_LIBS=$LIBS
12424 cat >conftest.$ac_ext <<_ACEOF
12425 #line 12425 "configure"
12426 #include "confdefs.h"
12428 /* Override any gcc2 internal prototype to avoid an error. */
12432 /* We use char because int might match the return type of a gcc2
12433 builtin and then its argument prototype would still apply. */
12434 char gettimeofday ();
12443 rm -f conftest.$ac_objext conftest$ac_exeext
12444 if { (eval echo "$as_me:12444: \"$ac_link\"") >&5
12445 (eval $ac_link) 2>&5
12447 echo "$as_me:12447: \$? = $ac_status" >&5
12448 (exit $ac_status); } &&
12449 { ac_try='test -s conftest$ac_exeext'
12450 { (eval echo "$as_me:12450: \"$ac_try\"") >&5
12451 (eval $ac_try) 2>&5
12453 echo "$as_me:12453: \$? = $ac_status" >&5
12454 (exit $ac_status); }; }; then
12455 ac_cv_lib_bsd_gettimeofday=yes
12457 echo "$as_me: failed program was:" >&5
12458 cat conftest.$ac_ext >&5
12459 ac_cv_lib_bsd_gettimeofday=no
12461 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12462 LIBS=$ac_check_lib_save_LIBS
12464 echo "$as_me:12464: result: $ac_cv_lib_bsd_gettimeofday" >&5
12465 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
12466 if test $ac_cv_lib_bsd_gettimeofday = yes; then
12468 cat >>confdefs.h <<\EOF
12469 #define HAVE_GETTIMEOFDAY 1
12479 ### Checks for header files.
12480 echo "$as_me:12480: checking for ANSI C header files" >&5
12481 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12482 if test "${ac_cv_header_stdc+set}" = set; then
12483 echo $ECHO_N "(cached) $ECHO_C" >&6
12485 cat >conftest.$ac_ext <<_ACEOF
12486 #line 12486 "configure"
12487 #include "confdefs.h"
12488 #include <stdlib.h>
12489 #include <stdarg.h>
12490 #include <string.h>
12494 if { (eval echo "$as_me:12494: \"$ac_cpp conftest.$ac_ext\"") >&5
12495 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12497 egrep -v '^ *\+' conftest.er1 >conftest.err
12499 cat conftest.err >&5
12500 echo "$as_me:12500: \$? = $ac_status" >&5
12501 (exit $ac_status); } >/dev/null; then
12502 if test -s conftest.err; then
12503 ac_cpp_err=$ac_c_preproc_warn_flag
12510 if test -z "$ac_cpp_err"; then
12511 ac_cv_header_stdc=yes
12513 echo "$as_me: failed program was:" >&5
12514 cat conftest.$ac_ext >&5
12515 ac_cv_header_stdc=no
12517 rm -f conftest.err conftest.$ac_ext
12519 if test $ac_cv_header_stdc = yes; then
12520 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12521 cat >conftest.$ac_ext <<_ACEOF
12522 #line 12522 "configure"
12523 #include "confdefs.h"
12524 #include <string.h>
12527 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12528 egrep "memchr" >/dev/null 2>&1; then
12531 ac_cv_header_stdc=no
12537 if test $ac_cv_header_stdc = yes; then
12538 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12539 cat >conftest.$ac_ext <<_ACEOF
12540 #line 12540 "configure"
12541 #include "confdefs.h"
12542 #include <stdlib.h>
12545 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12546 egrep "free" >/dev/null 2>&1; then
12549 ac_cv_header_stdc=no
12555 if test $ac_cv_header_stdc = yes; then
12556 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12557 if test "$cross_compiling" = yes; then
12560 cat >conftest.$ac_ext <<_ACEOF
12561 #line 12561 "configure"
12562 #include "confdefs.h"
12564 #if ((' ' & 0x0FF) == 0x020)
12565 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12566 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12568 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12569 || ('j' <= (c) && (c) <= 'r') \
12570 || ('s' <= (c) && (c) <= 'z'))
12571 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12574 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12579 for (i = 0; i < 256; i++)
12580 if (XOR (islower (i), ISLOWER (i))
12581 || toupper (i) != TOUPPER (i))
12582 $ac_main_return(2);
12583 $ac_main_return (0);
12586 rm -f conftest$ac_exeext
12587 if { (eval echo "$as_me:12587: \"$ac_link\"") >&5
12588 (eval $ac_link) 2>&5
12590 echo "$as_me:12590: \$? = $ac_status" >&5
12591 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12592 { (eval echo "$as_me:12592: \"$ac_try\"") >&5
12593 (eval $ac_try) 2>&5
12595 echo "$as_me:12595: \$? = $ac_status" >&5
12596 (exit $ac_status); }; }; then
12599 echo "$as_me: program exited with status $ac_status" >&5
12600 echo "$as_me: failed program was:" >&5
12601 cat conftest.$ac_ext >&5
12602 ac_cv_header_stdc=no
12604 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12608 echo "$as_me:12608: result: $ac_cv_header_stdc" >&5
12609 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12610 if test $ac_cv_header_stdc = yes; then
12612 cat >>confdefs.h <<\EOF
12613 #define STDC_HEADERS 1
12618 ac_header_dirent=no
12619 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12620 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12621 echo "$as_me:12621: checking for $ac_hdr that defines DIR" >&5
12622 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12623 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12624 echo $ECHO_N "(cached) $ECHO_C" >&6
12626 cat >conftest.$ac_ext <<_ACEOF
12627 #line 12627 "configure"
12628 #include "confdefs.h"
12629 #include <sys/types.h>
12641 rm -f conftest.$ac_objext
12642 if { (eval echo "$as_me:12642: \"$ac_compile\"") >&5
12643 (eval $ac_compile) 2>&5
12645 echo "$as_me:12645: \$? = $ac_status" >&5
12646 (exit $ac_status); } &&
12647 { ac_try='test -s conftest.$ac_objext'
12648 { (eval echo "$as_me:12648: \"$ac_try\"") >&5
12649 (eval $ac_try) 2>&5
12651 echo "$as_me:12651: \$? = $ac_status" >&5
12652 (exit $ac_status); }; }; then
12653 eval "$as_ac_Header=yes"
12655 echo "$as_me: failed program was:" >&5
12656 cat conftest.$ac_ext >&5
12657 eval "$as_ac_Header=no"
12659 rm -f conftest.$ac_objext conftest.$ac_ext
12661 echo "$as_me:12661: result: `eval echo '${'$as_ac_Header'}'`" >&5
12662 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12663 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12664 cat >>confdefs.h <<EOF
12665 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
12668 ac_header_dirent=$ac_hdr; break
12672 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12673 if test $ac_header_dirent = dirent.h; then
12674 echo "$as_me:12674: checking for opendir in -ldir" >&5
12675 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
12676 if test "${ac_cv_lib_dir_opendir+set}" = set; then
12677 echo $ECHO_N "(cached) $ECHO_C" >&6
12679 ac_check_lib_save_LIBS=$LIBS
12681 cat >conftest.$ac_ext <<_ACEOF
12682 #line 12682 "configure"
12683 #include "confdefs.h"
12685 /* Override any gcc2 internal prototype to avoid an error. */
12689 /* We use char because int might match the return type of a gcc2
12690 builtin and then its argument prototype would still apply. */
12700 rm -f conftest.$ac_objext conftest$ac_exeext
12701 if { (eval echo "$as_me:12701: \"$ac_link\"") >&5
12702 (eval $ac_link) 2>&5
12704 echo "$as_me:12704: \$? = $ac_status" >&5
12705 (exit $ac_status); } &&
12706 { ac_try='test -s conftest$ac_exeext'
12707 { (eval echo "$as_me:12707: \"$ac_try\"") >&5
12708 (eval $ac_try) 2>&5
12710 echo "$as_me:12710: \$? = $ac_status" >&5
12711 (exit $ac_status); }; }; then
12712 ac_cv_lib_dir_opendir=yes
12714 echo "$as_me: failed program was:" >&5
12715 cat conftest.$ac_ext >&5
12716 ac_cv_lib_dir_opendir=no
12718 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12719 LIBS=$ac_check_lib_save_LIBS
12721 echo "$as_me:12721: result: $ac_cv_lib_dir_opendir" >&5
12722 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
12723 if test $ac_cv_lib_dir_opendir = yes; then
12728 echo "$as_me:12728: checking for opendir in -lx" >&5
12729 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
12730 if test "${ac_cv_lib_x_opendir+set}" = set; then
12731 echo $ECHO_N "(cached) $ECHO_C" >&6
12733 ac_check_lib_save_LIBS=$LIBS
12735 cat >conftest.$ac_ext <<_ACEOF
12736 #line 12736 "configure"
12737 #include "confdefs.h"
12739 /* Override any gcc2 internal prototype to avoid an error. */
12743 /* We use char because int might match the return type of a gcc2
12744 builtin and then its argument prototype would still apply. */
12754 rm -f conftest.$ac_objext conftest$ac_exeext
12755 if { (eval echo "$as_me:12755: \"$ac_link\"") >&5
12756 (eval $ac_link) 2>&5
12758 echo "$as_me:12758: \$? = $ac_status" >&5
12759 (exit $ac_status); } &&
12760 { ac_try='test -s conftest$ac_exeext'
12761 { (eval echo "$as_me:12761: \"$ac_try\"") >&5
12762 (eval $ac_try) 2>&5
12764 echo "$as_me:12764: \$? = $ac_status" >&5
12765 (exit $ac_status); }; }; then
12766 ac_cv_lib_x_opendir=yes
12768 echo "$as_me: failed program was:" >&5
12769 cat conftest.$ac_ext >&5
12770 ac_cv_lib_x_opendir=no
12772 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12773 LIBS=$ac_check_lib_save_LIBS
12775 echo "$as_me:12775: result: $ac_cv_lib_x_opendir" >&5
12776 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
12777 if test $ac_cv_lib_x_opendir = yes; then
12783 echo "$as_me:12783: checking whether time.h and sys/time.h may both be included" >&5
12784 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12785 if test "${ac_cv_header_time+set}" = set; then
12786 echo $ECHO_N "(cached) $ECHO_C" >&6
12788 cat >conftest.$ac_ext <<_ACEOF
12789 #line 12789 "configure"
12790 #include "confdefs.h"
12791 #include <sys/types.h>
12792 #include <sys/time.h>
12798 if ((struct tm *) 0)
12804 rm -f conftest.$ac_objext
12805 if { (eval echo "$as_me:12805: \"$ac_compile\"") >&5
12806 (eval $ac_compile) 2>&5
12808 echo "$as_me:12808: \$? = $ac_status" >&5
12809 (exit $ac_status); } &&
12810 { ac_try='test -s conftest.$ac_objext'
12811 { (eval echo "$as_me:12811: \"$ac_try\"") >&5
12812 (eval $ac_try) 2>&5
12814 echo "$as_me:12814: \$? = $ac_status" >&5
12815 (exit $ac_status); }; }; then
12816 ac_cv_header_time=yes
12818 echo "$as_me: failed program was:" >&5
12819 cat conftest.$ac_ext >&5
12820 ac_cv_header_time=no
12822 rm -f conftest.$ac_objext conftest.$ac_ext
12824 echo "$as_me:12824: result: $ac_cv_header_time" >&5
12825 echo "${ECHO_T}$ac_cv_header_time" >&6
12826 if test $ac_cv_header_time = yes; then
12828 cat >>confdefs.h <<\EOF
12829 #define TIME_WITH_SYS_TIME 1
12834 ### checks for compiler characteristics
12836 ac_cpp='$CPP $CPPFLAGS'
12837 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12838 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12839 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12840 ac_main_return=return
12842 echo "$as_me:12842: checking for an ANSI C-conforming const" >&5
12843 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
12844 if test "${ac_cv_c_const+set}" = set; then
12845 echo $ECHO_N "(cached) $ECHO_C" >&6
12847 cat >conftest.$ac_ext <<_ACEOF
12848 #line 12848 "configure"
12849 #include "confdefs.h"
12854 /* FIXME: Include the comments suggested by Paul. */
12855 #ifndef __cplusplus
12856 /* Ultrix mips cc rejects this. */
12857 typedef int charset[2];
12859 /* SunOS 4.1.1 cc rejects this. */
12860 char const *const *ccp;
12862 /* NEC SVR4.0.2 mips cc rejects this. */
12863 struct point {int x, y;};
12864 static struct point const zero = {0,0};
12865 /* AIX XL C 1.02.0.0 rejects this.
12866 It does not let you subtract one const X* pointer from another in
12867 an arm of an if-expression whose if-part is not a constant
12869 const char *g = "string";
12870 ccp = &g + (g ? g-g : 0);
12871 /* HPUX 7.0 cc rejects these. */
12874 ccp = (char const *const *) p;
12875 { /* SCO 3.2v4 cc rejects this. */
12877 char const *s = 0 ? (char *) 0 : (char const *) 0;
12881 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12882 int x[] = {25, 17};
12883 const int *foo = &x[0];
12886 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12887 typedef const int *iptr;
12891 { /* AIX XL C 1.02.0.0 rejects this saying
12892 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12893 struct s { int j; const int *ap[3]; };
12894 struct s *b; b->j = 5;
12896 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12897 const int foo = 10;
12905 rm -f conftest.$ac_objext
12906 if { (eval echo "$as_me:12906: \"$ac_compile\"") >&5
12907 (eval $ac_compile) 2>&5
12909 echo "$as_me:12909: \$? = $ac_status" >&5
12910 (exit $ac_status); } &&
12911 { ac_try='test -s conftest.$ac_objext'
12912 { (eval echo "$as_me:12912: \"$ac_try\"") >&5
12913 (eval $ac_try) 2>&5
12915 echo "$as_me:12915: \$? = $ac_status" >&5
12916 (exit $ac_status); }; }; then
12919 echo "$as_me: failed program was:" >&5
12920 cat conftest.$ac_ext >&5
12923 rm -f conftest.$ac_objext conftest.$ac_ext
12925 echo "$as_me:12925: result: $ac_cv_c_const" >&5
12926 echo "${ECHO_T}$ac_cv_c_const" >&6
12927 if test $ac_cv_c_const = no; then
12929 cat >>confdefs.h <<\EOF
12935 ### Checks for external-data
12937 echo "$as_me:12937: checking if data-only library module links" >&5
12938 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
12939 if test "${cf_cv_link_dataonly+set}" = set; then
12940 echo $ECHO_N "(cached) $ECHO_C" >&6
12944 cat >conftest.$ac_ext <<EOF
12945 #line 12945 "configure"
12946 int testdata[3] = { 123, 456, 789 };
12948 if { (eval echo "$as_me:12948: \"$ac_compile\"") >&5
12949 (eval $ac_compile) 2>&5
12951 echo "$as_me:12951: \$? = $ac_status" >&5
12952 (exit $ac_status); } ; then
12953 mv conftest.o data.o && \
12954 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
12956 rm -f conftest.$ac_ext data.o
12957 cat >conftest.$ac_ext <<EOF
12958 #line 12958 "configure"
12962 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
12964 extern int testdata[3];
12965 return testdata[0] == 123
12966 && testdata[1] == 456
12967 && testdata[2] == 789;
12971 if { (eval echo "$as_me:12971: \"$ac_compile\"") >&5
12972 (eval $ac_compile) 2>&5
12974 echo "$as_me:12974: \$? = $ac_status" >&5
12975 (exit $ac_status); }; then
12976 mv conftest.o func.o && \
12977 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
12979 rm -f conftest.$ac_ext func.o
12980 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
12981 cf_saveLIBS="$LIBS"
12982 LIBS="conftest.a $LIBS"
12983 if test "$cross_compiling" = yes; then
12984 cf_cv_link_dataonly=unknown
12986 cat >conftest.$ac_ext <<_ACEOF
12987 #line 12987 "configure"
12988 #include "confdefs.h"
12992 extern int testfunc();
12993 ${cf_cv_main_return:-return} (!testfunc());
12997 rm -f conftest$ac_exeext
12998 if { (eval echo "$as_me:12998: \"$ac_link\"") >&5
12999 (eval $ac_link) 2>&5
13001 echo "$as_me:13001: \$? = $ac_status" >&5
13002 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13003 { (eval echo "$as_me:13003: \"$ac_try\"") >&5
13004 (eval $ac_try) 2>&5
13006 echo "$as_me:13006: \$? = $ac_status" >&5
13007 (exit $ac_status); }; }; then
13008 cf_cv_link_dataonly=yes
13010 echo "$as_me: program exited with status $ac_status" >&5
13011 echo "$as_me: failed program was:" >&5
13012 cat conftest.$ac_ext >&5
13013 cf_cv_link_dataonly=no
13015 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13017 LIBS="$cf_saveLIBS"
13021 echo "$as_me:13021: result: $cf_cv_link_dataonly" >&5
13022 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
13024 if test "$cf_cv_link_dataonly" = no ; then
13026 cat >>confdefs.h <<\EOF
13027 #define BROKEN_LINKER 1
13033 ### Checks for library functions.
13035 echo "$as_me:13035: checking for working mkstemp" >&5
13036 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
13037 if test "${cf_cv_func_mkstemp+set}" = set; then
13038 echo $ECHO_N "(cached) $ECHO_C" >&6
13042 if test "$cross_compiling" = yes; then
13043 cf_cv_func_mkstemp=maybe
13045 cat >conftest.$ac_ext <<_ACEOF
13046 #line 13046 "configure"
13047 #include "confdefs.h"
13049 #include <sys/types.h>
13050 #include <stdlib.h>
13052 #include <string.h>
13053 #include <sys/stat.h>
13056 char *tmpl = "conftestXXXXXX";
13064 for (n = 0; n < 2; ++n) {
13065 strcpy(name[n], tmpl);
13066 if ((fd = mkstemp(name[n])) >= 0) {
13067 if (!strcmp(name[n], tmpl)
13068 || stat(name[n], &sb) != 0
13069 || (sb.st_mode & S_IFMT) != S_IFREG
13070 || (sb.st_mode & 077) != 0) {
13077 && !strcmp(name[0], name[1]))
13079 ${cf_cv_main_return:-return}(result);
13083 rm -f conftest$ac_exeext
13084 if { (eval echo "$as_me:13084: \"$ac_link\"") >&5
13085 (eval $ac_link) 2>&5
13087 echo "$as_me:13087: \$? = $ac_status" >&5
13088 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13089 { (eval echo "$as_me:13089: \"$ac_try\"") >&5
13090 (eval $ac_try) 2>&5
13092 echo "$as_me:13092: \$? = $ac_status" >&5
13093 (exit $ac_status); }; }; then
13094 cf_cv_func_mkstemp=yes
13097 echo "$as_me: program exited with status $ac_status" >&5
13098 echo "$as_me: failed program was:" >&5
13099 cat conftest.$ac_ext >&5
13100 cf_cv_func_mkstemp=no
13103 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13107 echo "$as_me:13107: result: $cf_cv_func_mkstemp" >&5
13108 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
13109 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
13110 echo "$as_me:13110: checking for mkstemp" >&5
13111 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
13112 if test "${ac_cv_func_mkstemp+set}" = set; then
13113 echo $ECHO_N "(cached) $ECHO_C" >&6
13115 cat >conftest.$ac_ext <<_ACEOF
13116 #line 13116 "configure"
13117 #include "confdefs.h"
13118 /* System header to define __stub macros and hopefully few prototypes,
13119 which can conflict with char mkstemp (); below. */
13120 #include <assert.h>
13121 /* Override any gcc2 internal prototype to avoid an error. */
13125 /* We use char because int might match the return type of a gcc2
13126 builtin and then its argument prototype would still apply. */
13133 /* The GNU C library defines this for functions which it implements
13134 to always fail with ENOSYS. Some functions are actually named
13135 something starting with __ and the normal name is an alias. */
13136 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
13139 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13146 rm -f conftest.$ac_objext conftest$ac_exeext
13147 if { (eval echo "$as_me:13147: \"$ac_link\"") >&5
13148 (eval $ac_link) 2>&5
13150 echo "$as_me:13150: \$? = $ac_status" >&5
13151 (exit $ac_status); } &&
13152 { ac_try='test -s conftest$ac_exeext'
13153 { (eval echo "$as_me:13153: \"$ac_try\"") >&5
13154 (eval $ac_try) 2>&5
13156 echo "$as_me:13156: \$? = $ac_status" >&5
13157 (exit $ac_status); }; }; then
13158 ac_cv_func_mkstemp=yes
13160 echo "$as_me: failed program was:" >&5
13161 cat conftest.$ac_ext >&5
13162 ac_cv_func_mkstemp=no
13164 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13166 echo "$as_me:13166: result: $ac_cv_func_mkstemp" >&5
13167 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
13170 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
13172 cat >>confdefs.h <<\EOF
13173 #define HAVE_MKSTEMP 1
13178 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
13179 CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13180 CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13184 if test "$cf_with_ada" != "no" ; then
13186 cf_ada_make=gnatmake
13187 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
13188 set dummy $cf_ada_make; ac_word=$2
13189 echo "$as_me:13189: checking for $ac_word" >&5
13190 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13191 if test "${ac_cv_prog_gnat_exists+set}" = set; then
13192 echo $ECHO_N "(cached) $ECHO_C" >&6
13194 if test -n "$gnat_exists"; then
13195 ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
13197 ac_save_IFS=$IFS; IFS=$ac_path_separator
13199 for ac_dir in $ac_dummy; do
13201 test -z "$ac_dir" && ac_dir=.
13202 $as_executable_p "$ac_dir/$ac_word" || continue
13203 ac_cv_prog_gnat_exists="yes"
13204 echo "$as_me:13204: found $ac_dir/$ac_word" >&5
13208 test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
13211 gnat_exists=$ac_cv_prog_gnat_exists
13212 if test -n "$gnat_exists"; then
13213 echo "$as_me:13213: result: $gnat_exists" >&5
13214 echo "${ECHO_T}$gnat_exists" >&6
13216 echo "$as_me:13216: result: no" >&5
13217 echo "${ECHO_T}no" >&6
13220 if test "$ac_cv_prog_gnat_exists" = no; then
13222 cf_cv_prog_gnat_correct=no
13225 echo "$as_me:13225: checking for gnat version" >&5
13226 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
13227 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
13228 grep '[0-9].[0-9][0-9]*' |\
13229 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
13230 echo "$as_me:13230: result: $cf_gnat_version" >&5
13231 echo "${ECHO_T}$cf_gnat_version" >&6
13233 case $cf_gnat_version in
13234 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
13235 cf_cv_prog_gnat_correct=yes
13238 { echo "$as_me:13238: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
13239 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
13240 cf_cv_prog_gnat_correct=no
13244 # Extract the first word of "m4", so it can be a program name with args.
13245 set dummy m4; ac_word=$2
13246 echo "$as_me:13246: checking for $ac_word" >&5
13247 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13248 if test "${ac_cv_prog_M4_exists+set}" = set; then
13249 echo $ECHO_N "(cached) $ECHO_C" >&6
13251 if test -n "$M4_exists"; then
13252 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
13254 ac_save_IFS=$IFS; IFS=$ac_path_separator
13256 for ac_dir in $ac_dummy; do
13258 test -z "$ac_dir" && ac_dir=.
13259 $as_executable_p "$ac_dir/$ac_word" || continue
13260 ac_cv_prog_M4_exists="yes"
13261 echo "$as_me:13261: found $ac_dir/$ac_word" >&5
13265 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
13268 M4_exists=$ac_cv_prog_M4_exists
13269 if test -n "$M4_exists"; then
13270 echo "$as_me:13270: result: $M4_exists" >&5
13271 echo "${ECHO_T}$M4_exists" >&6
13273 echo "$as_me:13273: result: no" >&5
13274 echo "${ECHO_T}no" >&6
13277 if test "$ac_cv_prog_M4_exists" = no; then
13278 cf_cv_prog_gnat_correct=no
13279 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
13281 if test "$cf_cv_prog_gnat_correct" = yes; then
13282 echo "$as_me:13282: checking if GNAT works" >&5
13283 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
13285 rm -rf conftest* *~conftest*
13286 cat >>conftest.ads <<CF_EOF
13287 procedure conftest;
13289 cat >>conftest.adb <<CF_EOF
13292 procedure conftest is
13294 Text_IO.Put ("Hello World");
13296 GNAT.OS_Lib.OS_Exit (0);
13299 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
13300 if ( ./conftest 1>&5 2>&1 ) ; then
13301 cf_cv_prog_gnat_correct=yes
13303 cf_cv_prog_gnat_correct=no
13306 cf_cv_prog_gnat_correct=no
13308 rm -rf conftest* *~conftest*
13310 echo "$as_me:13310: result: $cf_cv_prog_gnat_correct" >&5
13311 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
13315 if test "$cf_cv_prog_gnat_correct" = yes; then
13317 echo "$as_me:13317: checking optimization options for ADAFLAGS" >&5
13318 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
13322 ADAFLAGS="$ADAFLAGS -g"
13328 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
13330 ADAFLAGS="$ADAFLAGS $cf_O_flag"
13334 echo "$as_me:13334: result: $ADAFLAGS" >&5
13335 echo "${ECHO_T}$ADAFLAGS" >&6
13337 echo "$as_me:13337: checking if GNATPREP supports -T option" >&5
13338 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
13339 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
13340 echo $ECHO_N "(cached) $ECHO_C" >&6
13343 cf_cv_gnatprep_opt_t=no
13344 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
13347 echo "$as_me:13347: result: $cf_cv_gnatprep_opt_t" >&5
13348 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
13349 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
13351 echo "$as_me:13351: checking if GNAT supports generics" >&5
13352 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
13353 case $cf_gnat_version in
13355 cf_gnat_generics=yes
13358 cf_gnat_generics=no
13361 echo "$as_me:13361: result: $cf_gnat_generics" >&5
13362 echo "${ECHO_T}$cf_gnat_generics" >&6
13364 if test "$cf_gnat_generics" = yes
13366 cf_compile_generics=generics
13367 cf_generic_objects="\${GENOBJS}"
13369 cf_compile_generics=
13370 cf_generic_objects=
13373 echo "$as_me:13373: checking if GNAT supports SIGINT" >&5
13374 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
13375 if test "${cf_cv_gnat_sigint+set}" = set; then
13376 echo $ECHO_N "(cached) $ECHO_C" >&6
13379 rm -rf conftest* *~conftest*
13380 cat >>conftest.ads <<CF_EOF
13381 with Ada.Interrupts.Names;
13383 package ConfTest is
13385 pragma Warnings (Off); -- the next pragma exists since 3.11p
13386 pragma Unreserve_All_Interrupts;
13387 pragma Warnings (On);
13389 protected Process is
13391 function Continue return Boolean;
13392 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
13394 Done : Boolean := False;
13399 cat >>conftest.adb <<CF_EOF
13400 package body ConfTest is
13401 protected body Process is
13406 function Continue return Boolean is
13413 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
13414 cf_cv_gnat_sigint=yes
13416 cf_cv_gnat_sigint=no
13418 rm -rf conftest* *~conftest*
13421 echo "$as_me:13421: result: $cf_cv_gnat_sigint" >&5
13422 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
13424 if test $cf_cv_gnat_sigint = yes ; then
13427 USE_GNAT_SIGINT="#"
13430 cf_gnat_libraries=no
13431 cf_gnat_projects=no
13433 if test "$enable_gnat_projects" != no ; then
13434 echo "$as_me:13434: checking if GNAT supports project files" >&5
13435 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
13436 case $cf_gnat_version in
13440 case $cf_cv_system_name in
13444 mkdir conftest.src conftest.bin conftest.lib
13446 rm -rf conftest* *~conftest*
13447 cat >>library.gpr <<CF_EOF
13449 Kind := External ("LIB_KIND");
13450 for Library_Name use "ConfTest";
13451 for Object_Dir use ".";
13452 for Library_ALI_Dir use External("LIBRARY_DIR");
13453 for Library_Version use External ("SONAME");
13454 for Library_Kind use Kind;
13455 for Library_Dir use External("BUILD_DIR");
13456 Source_Dir := External ("SOURCE_DIR");
13457 for Source_Dirs use (Source_Dir);
13460 cat >>confpackage.ads <<CF_EOF
13461 package ConfPackage is
13462 procedure conftest;
13465 cat >>confpackage.adb <<CF_EOF
13467 package body ConfPackage is
13468 procedure conftest is
13470 Text_IO.Put ("Hello World");
13475 if ( $cf_ada_make $ADAFLAGS \
13477 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
13478 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
13479 -XSOURCE_DIR=`pwd` \
13480 -XSONAME=libConfTest.so.1 \
13481 -XLIB_KIND=static 1>&5 2>&1 ) ; then
13482 cf_gnat_projects=yes
13485 if test -f conftest.lib/confpackage.ali
13487 cf_gnat_libraries=yes
13489 rm -rf conftest* *~conftest*
13494 echo "$as_me:13494: result: $cf_gnat_projects" >&5
13495 echo "${ECHO_T}$cf_gnat_projects" >&6
13496 fi # enable_gnat_projects
13498 if test $cf_gnat_projects = yes
13500 echo "$as_me:13500: checking if GNAT supports libraries" >&5
13501 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
13502 echo "$as_me:13502: result: $cf_gnat_libraries" >&5
13503 echo "${ECHO_T}$cf_gnat_libraries" >&6
13506 if test "$cf_gnat_projects" = yes
13508 USE_OLD_MAKERULES="#"
13509 USE_GNAT_PROJECTS=""
13511 USE_OLD_MAKERULES=""
13512 USE_GNAT_PROJECTS="#"
13515 if test "$cf_gnat_libraries" = yes
13517 USE_GNAT_LIBRARIES=""
13519 USE_GNAT_LIBRARIES="#"
13522 echo "$as_me:13522: checking for ada-compiler" >&5
13523 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
13525 # Check whether --with-ada-compiler or --without-ada-compiler was given.
13526 if test "${with_ada_compiler+set}" = set; then
13527 withval="$with_ada_compiler"
13528 cf_ada_compiler=$withval
13530 cf_ada_compiler=gnatmake
13533 echo "$as_me:13533: result: $cf_ada_compiler" >&5
13534 echo "${ECHO_T}$cf_ada_compiler" >&6
13536 cf_ada_package=terminal_interface
13538 echo "$as_me:13538: checking for ada-include" >&5
13539 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
13541 # Check whether --with-ada-include or --without-ada-include was given.
13542 if test "${with_ada_include+set}" = set; then
13543 withval="$with_ada_include"
13546 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
13547 fi; if test -n "$prefix/share/ada/adainclude" ; then
13549 if test "x$prefix" != xNONE; then
13550 cf_path_syntax="$prefix"
13552 cf_path_syntax="$ac_default_prefix"
13555 case ".$withval" in
13556 (.\$\(*\)*|.\'*\'*)
13560 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13562 (.\${*prefix}*|.\${*dir}*)
13563 eval withval="$withval"
13564 case ".$withval" in
13566 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
13571 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
13574 { { echo "$as_me:13574: error: expected a pathname, not \"$withval\"" >&5
13575 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
13576 { (exit 1); exit 1; }; }
13581 eval ADA_INCLUDE="$withval"
13583 echo "$as_me:13583: result: $ADA_INCLUDE" >&5
13584 echo "${ECHO_T}$ADA_INCLUDE" >&6
13586 echo "$as_me:13586: checking for ada-objects" >&5
13587 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
13589 # Check whether --with-ada-objects or --without-ada-objects was given.
13590 if test "${with_ada_objects+set}" = set; then
13591 withval="$with_ada_objects"
13594 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
13595 fi; if test -n "$prefix/lib/ada/adalib" ; then
13597 if test "x$prefix" != xNONE; then
13598 cf_path_syntax="$prefix"
13600 cf_path_syntax="$ac_default_prefix"
13603 case ".$withval" in
13604 (.\$\(*\)*|.\'*\'*)
13608 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13610 (.\${*prefix}*|.\${*dir}*)
13611 eval withval="$withval"
13612 case ".$withval" in
13614 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
13619 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
13622 { { echo "$as_me:13622: error: expected a pathname, not \"$withval\"" >&5
13623 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
13624 { (exit 1); exit 1; }; }
13629 eval ADA_OBJECTS="$withval"
13631 echo "$as_me:13631: result: $ADA_OBJECTS" >&5
13632 echo "${ECHO_T}$ADA_OBJECTS" >&6
13634 echo "$as_me:13634: checking if an Ada95 shared-library should be built" >&5
13635 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
13637 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
13638 if test "${with_ada_sharedlib+set}" = set; then
13639 withval="$with_ada_sharedlib"
13640 with_ada_sharedlib=$withval
13642 with_ada_sharedlib=no
13644 echo "$as_me:13644: result: $with_ada_sharedlib" >&5
13645 echo "${ECHO_T}$with_ada_sharedlib" >&6
13647 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
13648 MAKE_ADA_SHAREDLIB="#"
13650 if test "x$with_ada_sharedlib" != xno
13652 MAKE_ADA_SHAREDLIB=
13653 if test "x$with_ada_sharedlib" != xyes
13655 ADA_SHAREDLIB="$with_ada_sharedlib"
13660 { { echo "$as_me:13660: error: No usable Ada compiler found" >&5
13661 echo "$as_me: error: No usable Ada compiler found" >&2;}
13662 { (exit 1); exit 1; }; }
13665 { { echo "$as_me:13665: error: The Ada compiler is needed for this package" >&5
13666 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
13667 { (exit 1); exit 1; }; }
13670 ################################################################################
13677 ### Construct the list of include-directories to be generated
13679 if test "$srcdir" != "."; then
13680 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
13682 CPPFLAGS="-I../include $CPPFLAGS"
13683 if test "$srcdir" != "."; then
13684 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
13686 CPPFLAGS="-I. $CPPFLAGS"
13688 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
13689 if test "$srcdir" != "."; then
13690 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
13692 if test "$GCC" != yes; then
13693 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
13694 elif test "$includedir" != "/usr/include"; then
13695 if test "$includedir" = '${prefix}/include' ; then
13696 if test x$prefix != x/usr ; then
13697 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
13700 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
13704 ### Build up pieces for makefile rules
13705 echo "$as_me:13705: checking default library suffix" >&5
13706 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
13708 case $DFT_LWR_MODEL in
13709 (libtool) DFT_ARG_SUFFIX='' ;;
13710 (normal) DFT_ARG_SUFFIX='' ;;
13711 (debug) DFT_ARG_SUFFIX='_g' ;;
13712 (profile) DFT_ARG_SUFFIX='_p' ;;
13713 (shared) DFT_ARG_SUFFIX='' ;;
13715 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
13716 echo "$as_me:13716: result: $DFT_ARG_SUFFIX" >&5
13717 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
13719 echo "$as_me:13719: checking default library-dependency suffix" >&5
13720 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
13722 case X$DFT_LWR_MODEL in
13724 DFT_LIB_SUFFIX='.la'
13725 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13728 DFT_LIB_SUFFIX='_g.a'
13729 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13732 DFT_LIB_SUFFIX='_p.a'
13733 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13736 case $cf_cv_system_name in
13738 DFT_LIB_SUFFIX='.so'
13739 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13741 (cygwin*|msys*|mingw*)
13742 DFT_LIB_SUFFIX='.dll'
13743 DFT_DEP_SUFFIX='.dll.a'
13746 DFT_LIB_SUFFIX='.dylib'
13747 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13752 DFT_LIB_SUFFIX='.so'
13753 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13756 DFT_LIB_SUFFIX='.sl'
13757 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13762 DFT_LIB_SUFFIX='.so'
13763 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13768 DFT_LIB_SUFFIX='.a'
13769 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13772 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
13774 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
13775 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
13777 echo "$as_me:13777: result: $DFT_DEP_SUFFIX" >&5
13778 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
13780 echo "$as_me:13780: checking default object directory" >&5
13781 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
13783 case $DFT_LWR_MODEL in
13784 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
13785 (normal) DFT_OBJ_SUBDIR='objects' ;;
13786 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
13787 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
13789 case $cf_cv_system_name in
13791 DFT_OBJ_SUBDIR='objects' ;;
13793 DFT_OBJ_SUBDIR='obj_s' ;;
13796 echo "$as_me:13796: result: $DFT_OBJ_SUBDIR" >&5
13797 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
13799 ### Set up low-level terminfo dependencies for makefiles.
13801 if test "$DFT_LWR_MODEL" = shared ; then
13802 case $cf_cv_system_name in
13804 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
13807 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
13812 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
13814 ### Construct the list of subdirectories for which we'll customize makefiles
13815 ### with the appropriate compile-rules.
13817 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
13819 cat >>confdefs.h <<EOF
13820 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
13823 ### Now that we're done running tests, add the compiler-warnings, if any
13828 cf_new_extra_cppflags=
13830 for cf_add_cflags in $EXTRA_CFLAGS
13832 case $cf_fix_cppflags in
13834 case $cf_add_cflags in
13835 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13836 case $cf_add_cflags in
13838 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13840 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13841 && test -z "${cf_tst_cflags}" \
13842 && cf_fix_cppflags=yes
13844 if test $cf_fix_cppflags = yes ; then
13845 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13847 elif test "${cf_tst_cflags}" = "\"'" ; then
13848 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13853 case "$CPPFLAGS" in
13857 case $cf_add_cflags in
13859 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13861 CPPFLAGS=`echo "$CPPFLAGS" | \
13862 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13863 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13867 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13872 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13877 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13879 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13881 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13882 && test -z "${cf_tst_cflags}" \
13883 && cf_fix_cppflags=no
13888 if test -n "$cf_new_cflags" ; then
13890 CFLAGS="$CFLAGS $cf_new_cflags"
13893 if test -n "$cf_new_cppflags" ; then
13895 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13898 if test -n "$cf_new_extra_cppflags" ; then
13900 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13903 ################################################################################
13909 NCURSES_SHLIB2="sh -c"
13911 ADA_SUBDIRS="include gen src doc"
13912 if test "x$cf_with_tests" != "xno" ; then
13913 ADA_SUBDIRS="$ADA_SUBDIRS samples"
13915 for cf_dir in $ADA_SUBDIRS
13917 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
13924 # match layout used by make-tar.sh
13925 ADAHTML_DIR=../doc/ada
13927 ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
13928 ac_config_commands="$ac_config_commands default"
13929 cat >confcache <<\_ACEOF
13930 # This file is a shell script that caches the results of configure
13931 # tests run on this system so they can be shared between configure
13932 # scripts and configure runs, see configure's option --config-cache.
13933 # It is not useful on other systems. If it contains results you don't
13934 # want to keep, you may remove or edit it.
13936 # config.status only pays attention to the cache file if you give it
13937 # the --recheck option to rerun configure.
13939 # `ac_cv_env_foo' variables (set or unset) will be overriden when
13940 # loading this file, other *unset* `ac_cv_foo' will be assigned the
13941 # following values.
13945 # The following way of writing the cache mishandles newlines in values,
13946 # but we know of no workaround that is simple, portable, and efficient.
13947 # So, don't put newlines in cache variables' values.
13948 # Ultrix sh set writes to stderr and can't be redirected directly,
13949 # and sets the high bit in the cache file unless we assign to the vars.
13952 case `(ac_space=' '; set | grep ac_space) 2>&1` in
13954 # `set' does not quote correctly, so add quotes (double-quote
13955 # substitution turns \\\\ into \\, and sed turns \\ into \).
13958 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
13961 # `set' quotes correctly as required by POSIX, so do not add quotes.
13963 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
13970 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13972 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13974 if cmp -s $cache_file confcache; then :; else
13975 if test -w $cache_file; then
13976 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
13977 cat confcache >$cache_file
13979 echo "not updating unwritable cache $cache_file"
13984 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13985 # Let make expand exec_prefix.
13986 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13988 # VPATH may cause trouble with some makes, so we remove $(srcdir),
13989 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
13990 # trailing colons and then remove the whole line if VPATH becomes empty
13991 # (actually we leave an empty line to preserve line numbers).
13992 if test "x$srcdir" = x.; then
13993 ac_vpsub='/^[ ]*VPATH[ ]*=/{
13994 s/:*\$(srcdir):*/:/;
13995 s/:*\${srcdir}:*/:/;
13997 s/^\([^=]*=[ ]*\):*/\1/;
14003 DEFS=-DHAVE_CONFIG_H
14005 : ${CONFIG_STATUS=./config.status}
14006 ac_clean_files_save=$ac_clean_files
14007 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14008 { echo "$as_me:14008: creating $CONFIG_STATUS" >&5
14009 echo "$as_me: creating $CONFIG_STATUS" >&6;}
14010 cat >$CONFIG_STATUS <<_ACEOF
14012 # Generated automatically by configure.
14013 # Run this file to recreate the current configuration.
14014 # Compiler output produced by configure, useful for debugging
14015 # configure, is in config.log if it exists.
14018 SHELL=\${CONFIG_SHELL-$SHELL}
14019 ac_cs_invocation="\$0 \$@"
14023 cat >>$CONFIG_STATUS <<\_ACEOF
14024 # Be Bourne compatible
14025 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14028 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
14032 # Name of the executable.
14033 as_me=`echo "$0" |sed 's,.*[\\/],,'`
14035 if expr a : '\(a\)' >/dev/null 2>&1; then
14041 rm -f conf$$ conf$$.exe conf$$.file
14043 if ln -s conf$$.file conf$$ 2>/dev/null; then
14044 # We could just check for DJGPP; but this test a) works b) is more generic
14045 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
14046 if test -f conf$$.exe; then
14047 # Don't use ln at all; we don't have any links
14052 elif ln conf$$.file conf$$ 2>/dev/null; then
14057 rm -f conf$$ conf$$.exe conf$$.file
14059 as_executable_p="test -f"
14061 # Support unset when possible.
14062 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
14069 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
14070 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
14071 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
14072 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
14073 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
14074 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
14075 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
14076 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
14079 # We need space, tab and new line, in precisely that order.
14085 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
14091 # Files that config.status was made for.
14092 if test -n "$ac_config_files"; then
14093 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
14096 if test -n "$ac_config_headers"; then
14097 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
14100 if test -n "$ac_config_links"; then
14101 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
14104 if test -n "$ac_config_commands"; then
14105 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
14108 cat >>$CONFIG_STATUS <<\EOF
14111 \`$as_me' instantiates files from templates according to the
14112 current configuration.
14114 Usage: $0 [OPTIONS] [FILE]...
14116 -h, --help print this help, then exit
14117 -V, --version print version number, then exit
14118 -d, --debug don't remove temporary files
14119 --recheck update $as_me by reconfiguring in the same conditions
14120 --file=FILE[:TEMPLATE]
14121 instantiate the configuration file FILE
14122 --header=FILE[:TEMPLATE]
14123 instantiate the configuration header FILE
14125 Configuration files:
14128 Configuration headers:
14131 Configuration commands:
14134 Report bugs to <dickey@invisible-island.net>."
14137 cat >>$CONFIG_STATUS <<EOF
14140 configured by $0, generated by GNU Autoconf 2.52.20141204,
14141 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
14143 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
14144 Free Software Foundation, Inc.
14145 This config.status script is free software; the Free Software Foundation
14146 gives unlimited permission to copy, distribute and modify it."
14151 cat >>$CONFIG_STATUS <<\EOF
14152 # If no file are specified by the user, then we need to provide default
14153 # value. By we need to know if files were specified by the user.
14159 ac_option=`expr "x$1" : 'x\([^=]*\)='`
14160 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
14162 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
14166 *) # This is not an option, so the user has probably given explicit
14168 ac_need_defaults=false;;
14172 # Handling of the options.
14174 cat >>$CONFIG_STATUS <<EOF
14175 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14176 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
14177 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
14179 cat >>$CONFIG_STATUS <<\EOF
14180 --version | --vers* | -V )
14181 echo "$ac_cs_version"; exit 0 ;;
14183 # Conflict between --help and --header
14184 { { echo "$as_me:14184: error: ambiguous option: $1
14185 Try \`$0 --help' for more information." >&5
14186 echo "$as_me: error: ambiguous option: $1
14187 Try \`$0 --help' for more information." >&2;}
14188 { (exit 1); exit 1; }; };;
14189 --help | --hel | -h )
14190 echo "$ac_cs_usage"; exit 0 ;;
14191 --debug | --d* | -d )
14193 --file | --fil | --fi | --f )
14195 CONFIG_FILES="$CONFIG_FILES $1"
14196 ac_need_defaults=false;;
14197 --header | --heade | --head | --hea )
14199 CONFIG_HEADERS="$CONFIG_HEADERS $1"
14200 ac_need_defaults=false;;
14202 # This is an error.
14203 -*) { { echo "$as_me:14203: error: unrecognized option: $1
14204 Try \`$0 --help' for more information." >&5
14205 echo "$as_me: error: unrecognized option: $1
14206 Try \`$0 --help' for more information." >&2;}
14207 { (exit 1); exit 1; }; } ;;
14209 *) ac_config_targets="$ac_config_targets $1" ;;
14218 ## ----------------------- ##
14219 ## Running config.status. ##
14220 ## ----------------------- ##
14222 This file was extended by $as_me 2.52.20141204, executed with
14223 CONFIG_FILES = $CONFIG_FILES
14224 CONFIG_HEADERS = $CONFIG_HEADERS
14225 CONFIG_LINKS = $CONFIG_LINKS
14226 CONFIG_COMMANDS = $CONFIG_COMMANDS
14227 > $ac_cs_invocation
14228 on `(hostname || uname -n) 2>/dev/null | sed 1q`
14233 cat >>$CONFIG_STATUS <<EOF
14235 # INIT-COMMANDS section.
14238 ### Special initialization commands, used to pass information from the
14239 ### configuration-run into config.status
14242 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
14243 DFT_LWR_MODEL="$DFT_LWR_MODEL"
14244 LIB_NAME="$LIB_NAME"
14245 LIB_PREFIX="$LIB_PREFIX"
14246 LIB_SUFFIX="$LIB_SUFFIX"
14248 NCURSES_MAJOR="$NCURSES_MAJOR"
14249 NCURSES_MINOR="$NCURSES_MINOR"
14250 NCURSES_PATCH="$NCURSES_PATCH"
14251 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
14252 cf_cv_abi_version="$cf_cv_abi_version"
14253 cf_cv_rel_version="$cf_cv_rel_version"
14254 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
14255 cf_cv_shared_soname='$cf_cv_shared_soname'
14256 cf_cv_shlib_version="$cf_cv_shlib_version"
14257 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
14258 cf_cv_system_name="$cf_cv_system_name"
14264 cat >>$CONFIG_STATUS <<\EOF
14265 for ac_config_target in $ac_config_targets
14267 case "$ac_config_target" in
14268 # Handling of arguments.
14269 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
14270 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
14271 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
14272 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
14273 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
14274 *) { { echo "$as_me:14274: error: invalid argument: $ac_config_target" >&5
14275 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
14276 { (exit 1); exit 1; }; };;
14280 # If the user did not use the arguments to specify the items to instantiate,
14281 # then the envvar interface is used. Set only those that are not.
14282 # We use the long form for the default assignment because of an extremely
14283 # bizarre bug on SunOS 4.1.3.
14284 if $ac_need_defaults; then
14285 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14286 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14287 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
14290 # Create a temporary directory, and hook for its removal unless debugging.
14293 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
14294 trap '{ (exit 1); exit 1; }' 1 2 13 15
14297 # Create a (secure) tmp directory for tmp files.
14300 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
14301 test -n "$tmp" && test -d "$tmp"
14304 tmp=$TMPDIR/cs$$-$RANDOM
14305 (umask 077 && mkdir $tmp)
14308 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
14309 { (exit 1); exit 1; }
14314 cat >>$CONFIG_STATUS <<EOF
14317 # CONFIG_FILES section.
14320 # No need to generate the scripts if there are no CONFIG_FILES.
14321 # This happens for instance when ./config.status config.h
14322 if test -n "\$CONFIG_FILES"; then
14323 # Protect against being on the right side of a sed subst in config.status.
14324 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
14325 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
14326 s,@SHELL@,$SHELL,;t t
14327 s,@exec_prefix@,$exec_prefix,;t t
14328 s,@prefix@,$prefix,;t t
14329 s,@program_transform_name@,$program_transform_name,;t t
14330 s,@bindir@,$bindir,;t t
14331 s,@sbindir@,$sbindir,;t t
14332 s,@libexecdir@,$libexecdir,;t t
14333 s,@datarootdir@,$datarootdir,;t t
14334 s,@datadir@,$datadir,;t t
14335 s,@sysconfdir@,$sysconfdir,;t t
14336 s,@sharedstatedir@,$sharedstatedir,;t t
14337 s,@localstatedir@,$localstatedir,;t t
14338 s,@libdir@,$libdir,;t t
14339 s,@includedir@,$includedir,;t t
14340 s,@oldincludedir@,$oldincludedir,;t t
14341 s,@infodir@,$infodir,;t t
14342 s,@mandir@,$mandir,;t t
14343 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
14344 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
14345 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
14346 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
14347 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
14348 s,@build_alias@,$build_alias,;t t
14349 s,@host_alias@,$host_alias,;t t
14350 s,@target_alias@,$target_alias,;t t
14351 s,@ECHO_C@,$ECHO_C,;t t
14352 s,@ECHO_N@,$ECHO_N,;t t
14353 s,@ECHO_T@,$ECHO_T,;t t
14354 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
14355 s,@DEFS@,$DEFS,;t t
14356 s,@LIBS@,$LIBS,;t t
14357 s,@top_builddir@,$top_builddir,;t t
14358 s,@build@,$build,;t t
14359 s,@build_cpu@,$build_cpu,;t t
14360 s,@build_vendor@,$build_vendor,;t t
14361 s,@build_os@,$build_os,;t t
14362 s,@host@,$host,;t t
14363 s,@host_cpu@,$host_cpu,;t t
14364 s,@host_vendor@,$host_vendor,;t t
14365 s,@host_os@,$host_os,;t t
14366 s,@target@,$target,;t t
14367 s,@target_cpu@,$target_cpu,;t t
14368 s,@target_vendor@,$target_vendor,;t t
14369 s,@target_os@,$target_os,;t t
14371 s,@CFLAGS@,$CFLAGS,;t t
14372 s,@LDFLAGS@,$LDFLAGS,;t t
14373 s,@CPPFLAGS@,$CPPFLAGS,;t t
14374 s,@ac_ct_CC@,$ac_ct_CC,;t t
14375 s,@EXEEXT@,$EXEEXT,;t t
14376 s,@OBJEXT@,$OBJEXT,;t t
14377 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
14380 s,@EGREP@,$EGREP,;t t
14381 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
14382 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
14383 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
14384 s,@LN_S@,$LN_S,;t t
14385 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
14386 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
14387 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
14388 s,@SET_MAKE@,$SET_MAKE,;t t
14389 s,@CTAGS@,$CTAGS,;t t
14390 s,@ETAGS@,$ETAGS,;t t
14391 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
14392 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
14393 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
14394 s,@RANLIB@,$RANLIB,;t t
14395 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
14397 s,@ac_ct_LD@,$ac_ct_LD,;t t
14399 s,@ac_ct_AR@,$ac_ct_AR,;t t
14400 s,@ARFLAGS@,$ARFLAGS,;t t
14401 s,@DESTDIR@,$DESTDIR,;t t
14402 s,@BUILD_CC@,$BUILD_CC,;t t
14403 s,@BUILD_CPP@,$BUILD_CPP,;t t
14404 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
14405 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
14406 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
14407 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
14408 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
14409 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
14410 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
14411 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
14412 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
14413 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
14414 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
14415 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
14416 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
14417 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
14418 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
14419 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
14420 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
14421 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
14422 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
14423 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
14424 s,@CC_G_OPT@,$CC_G_OPT,;t t
14425 s,@LD_MODEL@,$LD_MODEL,;t t
14426 s,@shlibdir@,$shlibdir,;t t
14427 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
14428 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
14429 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
14430 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
14431 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
14432 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
14433 s,@LINK_PROGS@,$LINK_PROGS,;t t
14434 s,@LINK_TESTS@,$LINK_TESTS,;t t
14435 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
14436 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
14437 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
14438 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
14439 s,@RPATH_LIST@,$RPATH_LIST,;t t
14440 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
14441 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
14442 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
14443 s,@PTHREAD@,$PTHREAD,;t t
14444 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
14445 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
14446 s,@ECHO_LT@,$ECHO_LT,;t t
14447 s,@ECHO_LD@,$ECHO_LD,;t t
14448 s,@RULE_CC@,$RULE_CC,;t t
14449 s,@SHOW_CC@,$SHOW_CC,;t t
14450 s,@ECHO_CC@,$ECHO_CC,;t t
14451 s,@ADAFLAGS@,$ADAFLAGS,;t t
14452 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
14453 s,@ADA_TRACE@,$ADA_TRACE,;t t
14454 s,@gnat_exists@,$gnat_exists,;t t
14455 s,@M4_exists@,$M4_exists,;t t
14456 s,@cf_ada_make@,$cf_ada_make,;t t
14457 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
14458 s,@cf_compile_generics@,$cf_compile_generics,;t t
14459 s,@cf_generic_objects@,$cf_generic_objects,;t t
14460 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
14461 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
14462 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
14463 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
14464 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
14465 s,@cf_ada_package@,$cf_ada_package,;t t
14466 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
14467 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
14468 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
14469 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
14470 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
14471 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
14472 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
14473 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
14474 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
14475 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
14476 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
14477 s,@TEST_ARG2@,$TEST_ARG2,;t t
14478 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
14479 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
14480 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
14481 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
14482 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
14483 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
14488 cat >>$CONFIG_STATUS <<\EOF
14489 # Split the substitutions into bite-sized pieces for seds with
14490 # small command number limits, like on Digital OSF/1 and HP-UX.
14491 ac_max_sed_lines=48
14492 ac_sed_frag=1 # Number of current file.
14493 ac_beg=1 # First line for current file.
14494 ac_end=$ac_max_sed_lines # Line after last line for current file.
14497 while $ac_more_lines; do
14498 if test $ac_beg -gt 1; then
14499 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
14501 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
14503 if test ! -s $tmp/subs.frag; then
14504 ac_more_lines=false
14506 # The purpose of the label and of the branching condition is to
14507 # speed up the sed processing (if there are no `@' at all, there
14508 # is no need to browse any of the substitutions).
14509 # These are the two extra sed commands mentioned above.
14511 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
14512 if test -z "$ac_sed_cmds"; then
14513 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
14515 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
14517 ac_sed_frag=`expr $ac_sed_frag + 1`
14519 ac_end=`expr $ac_end + $ac_max_sed_lines`
14522 if test -z "$ac_sed_cmds"; then
14525 fi # test -n "$CONFIG_FILES"
14528 cat >>$CONFIG_STATUS <<\EOF
14529 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
14530 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14532 - | *:- | *:-:* ) # input from stdin
14534 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14535 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14536 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14537 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14538 * ) ac_file_in=$ac_file.in ;;
14541 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
14542 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14543 X"$ac_file" : 'X\(//\)[^/]' \| \
14544 X"$ac_file" : 'X\(//\)$' \| \
14545 X"$ac_file" : 'X\(/\)' \| \
14546 . : '\(.\)' 2>/dev/null ||
14548 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
14549 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
14550 /^X\(\/\/\)$/{ s//\1/; q; }
14551 /^X\(\/\).*/{ s//\1/; q; }
14553 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14554 { case "$ac_dir" in
14555 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
14559 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
14560 case $as_mkdir_dir in
14561 # Skip DOS drivespec
14562 ?:) as_incr_dir=$as_mkdir_dir ;;
14564 as_incr_dir=$as_incr_dir/$as_mkdir_dir
14565 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
14570 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
14571 # A "../" for each directory in $ac_dir_suffix.
14572 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
14574 ac_dir_suffix= ac_dots=
14579 if test -z "$ac_dots"; then
14582 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
14584 [\\/]* | ?:[\\/]* )
14585 ac_srcdir=$srcdir$ac_dir_suffix;
14586 ac_top_srcdir=$srcdir ;;
14587 *) # Relative path.
14588 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
14589 ac_top_srcdir=$ac_dots$srcdir ;;
14593 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
14594 *) ac_INSTALL=$ac_dots$INSTALL ;;
14597 if test x"$ac_file" != x-; then
14598 { echo "$as_me:14598: creating $ac_file" >&5
14599 echo "$as_me: creating $ac_file" >&6;}
14602 # Let's still pretend it is `configure' which instantiates (i.e., don't
14603 # use $as_me), people would be surprised to read:
14604 # /* config.h. Generated automatically by config.status. */
14605 configure_input="Generated automatically from `echo $ac_file_in |
14606 sed 's,.*/,,'` by configure."
14608 # First look for the input files in the build tree, otherwise in the
14610 ac_file_inputs=`IFS=:
14611 for f in $ac_file_in; do
14613 -) echo $tmp/stdin ;;
14615 # Absolute (can't be DOS-style, as IFS=:)
14616 test -f "$f" || { { echo "$as_me:14616: error: cannot find input file: $f" >&5
14617 echo "$as_me: error: cannot find input file: $f" >&2;}
14618 { (exit 1); exit 1; }; }
14621 if test -f "$f"; then
14624 elif test -f "$srcdir/$f"; then
14629 { { echo "$as_me:14629: error: cannot find input file: $f" >&5
14630 echo "$as_me: error: cannot find input file: $f" >&2;}
14631 { (exit 1); exit 1; }; }
14634 done` || { (exit 1); exit 1; }
14636 cat >>$CONFIG_STATUS <<\EOF
14637 ac_warn_datarootdir=no
14638 if test x"$ac_file" != x-; then
14639 for ac_item in $ac_file_inputs
14641 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
14642 if test -n "$ac_seen"; then
14643 ac_used=`grep '@datarootdir@' $ac_item`
14644 if test -z "$ac_used"; then
14645 { echo "$as_me:14645: WARNING: datarootdir was used implicitly but not set:
14647 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
14649 ac_warn_datarootdir=yes
14652 ac_seen=`grep '${datarootdir}' $ac_item`
14653 if test -n "$ac_seen"; then
14654 { echo "$as_me:14654: WARNING: datarootdir was used explicitly but not set:
14656 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
14658 ac_warn_datarootdir=yes
14663 if test "x$ac_warn_datarootdir" = xyes; then
14664 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
14668 cat >>$CONFIG_STATUS <<EOF
14672 cat >>$CONFIG_STATUS <<\EOF
14674 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
14675 s,@configure_input@,$configure_input,;t t
14676 s,@srcdir@,$ac_srcdir,;t t
14677 s,@top_srcdir@,$ac_top_srcdir,;t t
14678 s,@INSTALL@,$ac_INSTALL,;t t
14679 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
14681 if test x"$ac_file" != x-; then
14682 cp $tmp/out $ac_file
14684 for ac_name in prefix exec_prefix datarootdir
14686 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
14687 if test -n "$ac_seen"; then
14688 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
14689 if test -z "$ac_init"; then
14690 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
14691 { echo "$as_me:14691: WARNING: Variable $ac_name is used but was not set:
14693 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
14698 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
14699 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
14700 if test -s $tmp/out; then
14701 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
14702 { echo "$as_me:14702: WARNING: Some variables may not be substituted:
14704 echo "$as_me: WARNING: Some variables may not be substituted:
14714 cat >>$CONFIG_STATUS <<\EOF
14717 # CONFIG_HEADER section.
14720 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14721 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14723 # ac_d sets the value in "#define NAME VALUE" lines.
14724 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
14725 ac_dB='[ ].*$,\1#\2'
14728 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14729 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
14730 ac_iB='\([ ]\),\1#\2define\3'
14733 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14734 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
14735 ac_uB='$,\1#\2define\3'
14739 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
14740 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14742 - | *:- | *:-:* ) # input from stdin
14744 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14745 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14746 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14747 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14748 * ) ac_file_in=$ac_file.in ;;
14751 test x"$ac_file" != x- && { echo "$as_me:14751: creating $ac_file" >&5
14752 echo "$as_me: creating $ac_file" >&6;}
14754 # First look for the input files in the build tree, otherwise in the
14756 ac_file_inputs=`IFS=:
14757 for f in $ac_file_in; do
14759 -) echo $tmp/stdin ;;
14761 # Absolute (can't be DOS-style, as IFS=:)
14762 test -f "$f" || { { echo "$as_me:14762: error: cannot find input file: $f" >&5
14763 echo "$as_me: error: cannot find input file: $f" >&2;}
14764 { (exit 1); exit 1; }; }
14767 if test -f "$f"; then
14770 elif test -f "$srcdir/$f"; then
14775 { { echo "$as_me:14775: error: cannot find input file: $f" >&5
14776 echo "$as_me: error: cannot find input file: $f" >&2;}
14777 { (exit 1); exit 1; }; }
14780 done` || { (exit 1); exit 1; }
14781 # Remove the trailing spaces.
14782 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
14786 # Transform confdefs.h into a list of #define's. We won't use it as a sed
14787 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
14788 # be either 'cat' or 'sort'.
14789 cat confdefs.h | uniq >conftest.vals
14791 # Break up conftest.vals because some shells have a limit on
14792 # the size of here documents, and old seds have small limits too.
14794 rm -f conftest.tail
14795 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
14796 while grep . conftest.vals >/dev/null
14798 # Write chunks of a limited-size here document to conftest.frag.
14799 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
14800 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
14801 echo 'CEOF' >> $CONFIG_STATUS
14802 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14803 rm -f conftest.vals
14804 mv conftest.tail conftest.vals
14806 rm -f conftest.vals
14808 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
14810 echo ' cat >> conftest.edit <<CEOF
14811 /@DEFS@/r conftest.frag
14814 sed -f conftest.edit $tmp/in > $tmp/out
14816 mv $tmp/out $tmp/in
14817 rm -f conftest.edit conftest.frag
14818 ' >> $CONFIG_STATUS
14820 cat >>$CONFIG_STATUS <<\EOF
14821 # Let's still pretend it is `configure' which instantiates (i.e., don't
14822 # use $as_me), people would be surprised to read:
14823 # /* config.h. Generated automatically by config.status. */
14824 if test x"$ac_file" = x-; then
14825 echo "/* Generated automatically by configure. */" >$tmp/config.h
14827 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
14829 cat $tmp/in >>$tmp/config.h
14831 if test x"$ac_file" != x-; then
14832 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
14833 { echo "$as_me:14833: $ac_file is unchanged" >&5
14834 echo "$as_me: $ac_file is unchanged" >&6;}
14836 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14837 X"$ac_file" : 'X\(//\)[^/]' \| \
14838 X"$ac_file" : 'X\(//\)$' \| \
14839 X"$ac_file" : 'X\(/\)' \| \
14840 . : '\(.\)' 2>/dev/null ||
14842 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
14843 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
14844 /^X\(\/\/\)$/{ s//\1/; q; }
14845 /^X\(\/\).*/{ s//\1/; q; }
14847 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14848 { case "$ac_dir" in
14849 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
14853 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
14854 case $as_mkdir_dir in
14855 # Skip DOS drivespec
14856 ?:) as_incr_dir=$as_mkdir_dir ;;
14858 as_incr_dir=$as_incr_dir/$as_mkdir_dir
14859 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
14866 mv $tmp/config.h $ac_file
14870 rm -f $tmp/config.h
14874 cat >>$CONFIG_STATUS <<\EOF
14876 # CONFIG_COMMANDS section.
14878 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
14879 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
14880 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
14884 if test -z "$USE_OLD_MAKERULES" ; then
14885 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
14892 cat >>$CONFIG_STATUS <<\EOF
14894 { (exit 0); exit 0; }
14896 chmod +x $CONFIG_STATUS
14897 ac_clean_files=$ac_clean_files_save
14899 # configure is writing to config.log, and then calls config.status.
14900 # config.status does its own redirection, appending to config.log.
14901 # Unfortunately, on DOS this fails, as config.log is still kept open
14902 # by configure, so config.status won't be able to write to it; its
14903 # output is simply discarded. So we exec the FD to /dev/null,
14904 # effectively closing config.log, so it can be properly (re)opened and
14905 # appended to by config.status. When coming back to configure, we
14906 # need to make the FD available again.
14907 if test "$no_create" != yes; then
14910 $SHELL $CONFIG_STATUS || ac_cs_success=false
14912 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14913 # would make configure fail if this is the last instruction.
14914 $ac_cs_success || { (exit 1); exit 1; }
14916 ${MAKE:-make} preinstall