2 # From configure.in Revision: 1.60 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20141204.
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35 if expr a : '\(a\)' >/dev/null 2>&1; then
41 rm -f conf$$ conf$$.exe conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44 # We could just check for DJGPP; but this test a) works b) is more generic
45 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46 if test -f conf$$.exe; then
47 # Don't use ln at all; we don't have any links
52 elif ln conf$$.file conf$$ 2>/dev/null; then
57 rm -f conf$$ conf$$.exe conf$$.file
59 as_executable_p="test -f"
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
79 # We need space, tab and new line, in precisely that order.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
97 ac_default_prefix=/usr/local
101 SHELL=${CONFIG_SHELL-/bin/sh}
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete. It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
108 ac_unique_file="gen/gen.c"
110 # Initialize some variables set by options.
112 ac_init_version=false
113 # The variables have the same names as the options, with
114 # dashes changed to underlines.
122 program_transform_name=s,x,x,
130 # Installation directory options.
131 # These are left unexpanded so users can "make install exec_prefix=/foo"
132 # and all the variables that are supposed to be based on exec_prefix
133 # by default will actually change.
134 # Use braces instead of parens because sh, perl, etc. also accept them.
135 bindir='${exec_prefix}/bin'
136 sbindir='${exec_prefix}/sbin'
137 libexecdir='${exec_prefix}/libexec'
138 datarootdir='${prefix}/share'
139 datadir='${datarootdir}'
140 sysconfdir='${prefix}/etc'
141 sharedstatedir='${prefix}/com'
142 localstatedir='${prefix}/var'
143 libdir='${exec_prefix}/lib'
144 includedir='${prefix}/include'
145 oldincludedir='/usr/include'
146 infodir='${datarootdir}/info'
147 mandir='${datarootdir}/man'
149 # Identity of this package.
159 # If the previous option needs an argument, assign it.
160 if test -n "$ac_prev"; then
161 eval "$ac_prev=\$ac_option"
166 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
168 # Accept the important Cygnus configure options, so we can diagnose typos.
172 -bindir | --bindir | --bindi | --bind | --bin | --bi)
174 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
177 -build | --build | --buil | --bui | --bu)
178 ac_prev=build_alias ;;
179 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
180 build_alias=$ac_optarg ;;
182 -cache-file | --cache-file | --cache-fil | --cache-fi \
183 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
184 ac_prev=cache_file ;;
185 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
186 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
187 cache_file=$ac_optarg ;;
190 cache_file=config.cache ;;
192 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
194 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
196 datadir=$ac_optarg ;;
198 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
199 | --dataroo | --dataro | --datar)
200 ac_prev=datarootdir ;;
201 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
202 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
203 datarootdir=$ac_optarg ;;
205 -disable-* | --disable-*)
206 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
207 # Reject names that are not valid shell variable names.
208 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
209 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
210 { (exit 1); exit 1; }; }
211 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
212 eval "enable_$ac_feature=no" ;;
214 -enable-* | --enable-*)
215 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
216 # Reject names that are not valid shell variable names.
217 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
218 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
219 { (exit 1); exit 1; }; }
220 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
222 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
225 eval "enable_$ac_feature='$ac_optarg'" ;;
227 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
228 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
229 | --exec | --exe | --ex)
230 ac_prev=exec_prefix ;;
231 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
232 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
233 | --exec=* | --exe=* | --ex=*)
234 exec_prefix=$ac_optarg ;;
236 -gas | --gas | --ga | --g)
237 # Obsolete; use --with-gas.
240 -help | --help | --hel | --he | -h)
242 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
243 ac_init_help=recursive ;;
244 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
245 ac_init_help=short ;;
247 -host | --host | --hos | --ho)
248 ac_prev=host_alias ;;
249 -host=* | --host=* | --hos=* | --ho=*)
250 host_alias=$ac_optarg ;;
252 -includedir | --includedir | --includedi | --included | --include \
253 | --includ | --inclu | --incl | --inc)
254 ac_prev=includedir ;;
255 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
256 | --includ=* | --inclu=* | --incl=* | --inc=*)
257 includedir=$ac_optarg ;;
259 -infodir | --infodir | --infodi | --infod | --info | --inf)
261 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
262 infodir=$ac_optarg ;;
264 -libdir | --libdir | --libdi | --libd)
266 -libdir=* | --libdir=* | --libdi=* | --libd=*)
269 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
270 | --libexe | --libex | --libe)
271 ac_prev=libexecdir ;;
272 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
273 | --libexe=* | --libex=* | --libe=*)
274 libexecdir=$ac_optarg ;;
276 -localstatedir | --localstatedir | --localstatedi | --localstated \
277 | --localstate | --localstat | --localsta | --localst \
278 | --locals | --local | --loca | --loc | --lo)
279 ac_prev=localstatedir ;;
280 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
281 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
282 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
283 localstatedir=$ac_optarg ;;
285 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
287 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
291 # Obsolete; use --without-fp.
294 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
298 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
299 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
302 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
303 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
304 | --oldin | --oldi | --old | --ol | --o)
305 ac_prev=oldincludedir ;;
306 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
307 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
308 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
309 oldincludedir=$ac_optarg ;;
311 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
313 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
316 -program-prefix | --program-prefix | --program-prefi | --program-pref \
317 | --program-pre | --program-pr | --program-p)
318 ac_prev=program_prefix ;;
319 -program-prefix=* | --program-prefix=* | --program-prefi=* \
320 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
321 program_prefix=$ac_optarg ;;
323 -program-suffix | --program-suffix | --program-suffi | --program-suff \
324 | --program-suf | --program-su | --program-s)
325 ac_prev=program_suffix ;;
326 -program-suffix=* | --program-suffix=* | --program-suffi=* \
327 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
328 program_suffix=$ac_optarg ;;
330 -program-transform-name | --program-transform-name \
331 | --program-transform-nam | --program-transform-na \
332 | --program-transform-n | --program-transform- \
333 | --program-transform | --program-transfor \
334 | --program-transfo | --program-transf \
335 | --program-trans | --program-tran \
336 | --progr-tra | --program-tr | --program-t)
337 ac_prev=program_transform_name ;;
338 -program-transform-name=* | --program-transform-name=* \
339 | --program-transform-nam=* | --program-transform-na=* \
340 | --program-transform-n=* | --program-transform-=* \
341 | --program-transform=* | --program-transfor=* \
342 | --program-transfo=* | --program-transf=* \
343 | --program-trans=* | --program-tran=* \
344 | --progr-tra=* | --program-tr=* | --program-t=*)
345 program_transform_name=$ac_optarg ;;
347 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
348 | -silent | --silent | --silen | --sile | --sil)
351 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
353 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
355 sbindir=$ac_optarg ;;
357 -sharedstatedir | --sharedstatedir | --sharedstatedi \
358 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
359 | --sharedst | --shareds | --shared | --share | --shar \
361 ac_prev=sharedstatedir ;;
362 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
363 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
364 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
366 sharedstatedir=$ac_optarg ;;
368 -site | --site | --sit)
370 -site=* | --site=* | --sit=*)
373 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
375 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
378 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
379 | --syscon | --sysco | --sysc | --sys | --sy)
380 ac_prev=sysconfdir ;;
381 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
382 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
383 sysconfdir=$ac_optarg ;;
385 -target | --target | --targe | --targ | --tar | --ta | --t)
386 ac_prev=target_alias ;;
387 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
388 target_alias=$ac_optarg ;;
390 -v | -verbose | --verbose | --verbos | --verbo | --verb)
393 -version | --version | --versio | --versi | --vers | -V)
397 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
398 # Reject names that are not valid shell variable names.
399 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
400 { echo "$as_me: error: invalid package name: $ac_package" >&2
401 { (exit 1); exit 1; }; }
402 ac_package=`echo $ac_package| sed 's/-/_/g'`
404 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
407 eval "with_$ac_package='$ac_optarg'" ;;
409 -without-* | --without-*)
410 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
411 # Reject names that are not valid shell variable names.
412 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
413 { echo "$as_me: error: invalid package name: $ac_package" >&2
414 { (exit 1); exit 1; }; }
415 ac_package=`echo $ac_package | sed 's/-/_/g'`
416 eval "with_$ac_package=no" ;;
419 # Obsolete; use --with-x.
422 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
423 | --x-incl | --x-inc | --x-in | --x-i)
424 ac_prev=x_includes ;;
425 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
426 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
427 x_includes=$ac_optarg ;;
429 -x-libraries | --x-libraries | --x-librarie | --x-librari \
430 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
431 ac_prev=x_libraries ;;
432 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
433 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
434 x_libraries=$ac_optarg ;;
436 -*) { echo "$as_me: error: unrecognized option: $ac_option
437 Try \`$0 --help' for more information." >&2
438 { (exit 1); exit 1; }; }
442 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
443 # Reject names that are not valid shell variable names.
444 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
445 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
446 { (exit 1); exit 1; }; }
447 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
448 eval "$ac_envvar='$ac_optarg'"
452 # FIXME: should be removed in autoconf 3.0.
453 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
454 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
455 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
456 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
462 if test -n "$ac_prev"; then
463 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
464 { echo "$as_me: error: missing argument to $ac_option" >&2
465 { (exit 1); exit 1; }; }
468 # Be sure to have absolute paths.
469 for ac_var in exec_prefix prefix
471 eval ac_val=$`echo $ac_var`
473 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
474 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
475 { (exit 1); exit 1; }; };;
479 # Be sure to have absolute paths.
480 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
481 localstatedir libdir includedir oldincludedir infodir mandir
483 eval ac_val=$`echo $ac_var`
485 [\\/$]* | ?:[\\/]* ) ;;
486 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
487 { (exit 1); exit 1; }; };;
491 # There might be people who depend on the old broken behavior: `$host'
492 # used to hold the argument of --host etc.
497 # FIXME: should be removed in autoconf 3.0.
498 if test "x$host_alias" != x; then
499 if test "x$build_alias" = x; then
500 cross_compiling=maybe
501 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
502 If a cross compiler is detected then cross compile mode will be used." >&2
503 elif test "x$build_alias" != "x$host_alias"; then
509 test -n "$host_alias" && ac_tool_prefix=$host_alias-
511 test "$silent" = yes && exec 6>/dev/null
513 # Find the source files, if location was not specified.
514 if test -z "$srcdir"; then
515 ac_srcdir_defaulted=yes
516 # Try the directory containing this script, then its parent.
518 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
519 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
521 if test ! -r $srcdir/$ac_unique_file; then
525 ac_srcdir_defaulted=no
527 if test ! -r $srcdir/$ac_unique_file; then
528 if test "$ac_srcdir_defaulted" = yes; then
529 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
530 { (exit 1); exit 1; }; }
532 { echo "$as_me: error: cannot find sources in $srcdir" >&2
533 { (exit 1); exit 1; }; }
536 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
537 ac_env_build_alias_set=${build_alias+set}
538 ac_env_build_alias_value=$build_alias
539 ac_cv_env_build_alias_set=${build_alias+set}
540 ac_cv_env_build_alias_value=$build_alias
541 ac_env_host_alias_set=${host_alias+set}
542 ac_env_host_alias_value=$host_alias
543 ac_cv_env_host_alias_set=${host_alias+set}
544 ac_cv_env_host_alias_value=$host_alias
545 ac_env_target_alias_set=${target_alias+set}
546 ac_env_target_alias_value=$target_alias
547 ac_cv_env_target_alias_set=${target_alias+set}
548 ac_cv_env_target_alias_value=$target_alias
549 ac_env_CC_set=${CC+set}
551 ac_cv_env_CC_set=${CC+set}
552 ac_cv_env_CC_value=$CC
553 ac_env_CFLAGS_set=${CFLAGS+set}
554 ac_env_CFLAGS_value=$CFLAGS
555 ac_cv_env_CFLAGS_set=${CFLAGS+set}
556 ac_cv_env_CFLAGS_value=$CFLAGS
557 ac_env_LDFLAGS_set=${LDFLAGS+set}
558 ac_env_LDFLAGS_value=$LDFLAGS
559 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
560 ac_cv_env_LDFLAGS_value=$LDFLAGS
561 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
562 ac_env_CPPFLAGS_value=$CPPFLAGS
563 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
564 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
565 ac_env_CPP_set=${CPP+set}
566 ac_env_CPP_value=$CPP
567 ac_cv_env_CPP_set=${CPP+set}
568 ac_cv_env_CPP_value=$CPP
571 # Report the --help message.
573 if test "$ac_init_help" = "long"; then
574 # Omit some internal or obsolete options to make the list less imposing.
575 # This message is too long to be a string in the A/UX 3.1 sh.
577 \`configure' configures this package to adapt to many kinds of systems.
579 Usage: $0 [OPTION]... [VAR=VALUE]...
581 To assign environment variables (e.g., CC, CFLAGS...), specify them as
582 VAR=VALUE. See below for descriptions of some of the useful variables.
584 Defaults for the options are specified in brackets.
587 -h, --help display this help and exit
588 --help=short display options specific to this package
589 --help=recursive display the short help of all the included packages
590 -V, --version display version information and exit
591 -q, --quiet, --silent do not print \`checking...' messages
592 --cache-file=FILE cache test results in FILE [disabled]
593 -C, --config-cache alias for \`--cache-file=config.cache'
594 -n, --no-create do not create output files
595 --srcdir=DIR find the sources in DIR [configure dir or \`..']
600 Installation directories:
601 --prefix=PREFIX install architecture-independent files in PREFIX
603 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
606 By default, \`make install' will install all the files in
607 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
608 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
609 for instance \`--prefix=\$HOME'.
611 For better control, use the options below.
613 Fine tuning of the installation directories:
614 --bindir=DIR user executables [EPREFIX/bin]
615 --sbindir=DIR system admin executables [EPREFIX/sbin]
616 --libexecdir=DIR program executables [EPREFIX/libexec]
617 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
618 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
619 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
620 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
621 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
622 --libdir=DIR object code libraries [EPREFIX/lib]
623 --includedir=DIR C header files [PREFIX/include]
624 --oldincludedir=DIR C header files for non-gcc [/usr/include]
625 --infodir=DIR info documentation [DATAROOTDIR/info]
626 --mandir=DIR man documentation [DATAROOTDIR/man]
632 --program-prefix=PREFIX prepend PREFIX to installed program names
633 --program-suffix=SUFFIX append SUFFIX to installed program names
634 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
637 --build=BUILD configure for building on BUILD [guessed]
638 --host=HOST build programs to run on HOST [BUILD]
639 --target=TARGET configure for building compilers for TARGET [HOST]
643 if test -n "$ac_init_help"; then
648 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
649 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
652 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
653 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
655 --with-system-type=XXX test: override derived host system-type
656 --with-pkg-config{=path} enable/disable use of pkg-config
657 --with-pkg-config-libdir=XXX use given directory for installing pc-files
658 --without-tests suppress build with test-programs
659 --enable-mixed-case tic should assume mixed-case filenames
660 --with-install-prefix prefixes actual install-location ($DESTDIR)
661 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
662 --with-build-cc=XXX the build C compiler ($BUILD_CC)
663 --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
664 --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
665 --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
666 --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
667 --with-build-libs=XXX the build libraries (${BUILD_LIBS})
668 Options to Specify the Libraries Built/Used:
669 --with-shared generate shared C-objects (needed for --with-ada-sharedlib)
670 --with-curses-dir=DIR directory in which (n)curses is installed
671 --enable-widec compile with wide-char/UTF-8 code
672 --with-lib-prefix override library-prefix
673 --with-shlib-version=X Specify rel or abi version for shared libs
674 --enable-rpath-link link sample programs with rpath option
675 Fine-Tuning Your Configuration:
676 --enable-broken_linker compile with broken-linker support code
677 --disable-largefile omit support for large files
678 --with-rcs-ids compile-in RCS identifiers
680 --disable-ext-funcs disable function-extensions
681 --enable-const compile with extra/non-standard const
683 --without-develop disable development options
685 --with-pthread use POSIX thread library
686 --enable-weak-symbols enable weak-symbols for pthreads
687 --enable-reentrant compile with experimental reentrant code
688 --with-wrap-prefix=XXX override prefix used for public variables
689 Testing/development Options:
690 --disable-echo do not display "compiling" commands
691 --enable-warnings build: turn on GCC compiler warnings
692 --enable-assertions test: turn on generation of assertion code
693 --enable-expanded test: generate functions for certain macros
694 --disable-macros test: use functions rather than macros
695 --with-trace test: add trace() function to all models of ncurses
696 --disable-gnat-projects test: disable GNAT projects even if usable
697 Ada95 Binding Options:
698 --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
699 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
700 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
701 --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
703 Some influential environment variables:
704 CC C compiler command
705 CFLAGS C compiler flags
706 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
707 nonstandard directory <lib dir>
708 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
709 headers in a nonstandard directory <include dir>
712 Use these variables to override the choices made by `configure' or to help
713 it to find libraries and programs with nonstandard names/locations.
718 if test "$ac_init_help" = "recursive"; then
719 # If there are subdirs, report their specific --help.
721 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
723 # A "../" for each directory in /$ac_subdir.
724 ac_dots=`echo $ac_subdir |
725 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
728 .) # No --srcdir option. We are building in place.
729 ac_sub_srcdir=$srcdir ;;
730 [\\/]* | ?:[\\/]* ) # Absolute path.
731 ac_sub_srcdir=$srcdir/$ac_subdir ;;
733 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
736 # Check for guested configure; otherwise get Cygnus style configure.
737 if test -f $ac_sub_srcdir/configure.gnu; then
739 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
740 elif test -f $ac_sub_srcdir/configure; then
742 $SHELL $ac_sub_srcdir/configure --help=recursive
743 elif test -f $ac_sub_srcdir/configure.ac ||
744 test -f $ac_sub_srcdir/configure.in; then
748 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
754 test -n "$ac_init_help" && exit 0
755 if $ac_init_version; then
758 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
759 Free Software Foundation, Inc.
760 This configure script is free software; the Free Software Foundation
761 gives unlimited permission to copy, distribute and modify it.
767 This file contains any messages produced by compilers while
768 running configure, to aid debugging if configure makes a mistake.
770 It was created by $as_me, which was
771 generated by GNU Autoconf 2.52.20141204. Invocation command line was
782 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
783 uname -m = `(uname -m) 2>/dev/null || echo unknown`
784 uname -r = `(uname -r) 2>/dev/null || echo unknown`
785 uname -s = `(uname -s) 2>/dev/null || echo unknown`
786 uname -v = `(uname -v) 2>/dev/null || echo unknown`
788 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
789 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
791 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
792 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
793 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
794 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
795 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
796 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
797 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
811 # Keep a trace of the command line.
812 # Strip out --no-create and --no-recursion so they do not pile up.
813 # Also quote any args containing shell meta-characters.
819 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
820 | --no-cr | --no-c) ;;
821 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
822 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
823 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
824 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
825 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
827 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
830 # Get rid of the leading space.
833 # When interrupted or exit'd, cleanup temporary files, and complete
834 # config.log. We remove comments because anyway the quotes in there
835 # would cause problems or look ugly.
837 # Save into config.log some information that might help in debugging.
839 echo "## ----------------- ##" >&5
840 echo "## Cache variables. ##" >&5
841 echo "## ----------------- ##" >&5
843 # The following way of writing the cache mishandles newlines in values,
846 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
849 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
850 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
854 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
858 sed "/^$/d" confdefs.h >conftest.log
859 if test -s conftest.log; then
861 echo "## ------------ ##" >&5
862 echo "## confdefs.h. ##" >&5
863 echo "## ------------ ##" >&5
868 test "$ac_signal" != 0 &&
869 echo "$as_me: caught signal $ac_signal" >&5
870 echo "$as_me: exit $exit_status" >&5
871 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
874 for ac_signal in 1 2 13 15; do
875 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
879 # confdefs.h avoids OS command line length limits that DEFS can exceed.
880 rm -rf conftest* confdefs.h
881 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
884 # Let the site file select an alternate cache file if it wants to.
885 # Prefer explicitly selected file to automatically selected ones.
886 if test -z "$CONFIG_SITE"; then
887 if test "x$prefix" != xNONE; then
888 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
890 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
893 for ac_site_file in $CONFIG_SITE; do
894 if test -r "$ac_site_file"; then
895 { echo "$as_me:895: loading site script $ac_site_file" >&5
896 echo "$as_me: loading site script $ac_site_file" >&6;}
897 cat "$ac_site_file" >&5
902 if test -r "$cache_file"; then
903 # Some versions of bash will fail to source /dev/null (special
904 # files actually), so we avoid doing that.
905 if test -f "$cache_file"; then
906 { echo "$as_me:906: loading cache $cache_file" >&5
907 echo "$as_me: loading cache $cache_file" >&6;}
909 [\\/]* | ?:[\\/]* ) . $cache_file;;
914 { echo "$as_me:914: creating cache $cache_file" >&5
915 echo "$as_me: creating cache $cache_file" >&6;}
919 # Check that the precious variables saved in the cache have kept the same
921 ac_cache_corrupted=false
922 for ac_var in `(set) 2>&1 |
923 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
924 eval ac_old_set=\$ac_cv_env_${ac_var}_set
925 eval ac_new_set=\$ac_env_${ac_var}_set
926 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
927 eval ac_new_val="\$ac_env_${ac_var}_value"
928 case $ac_old_set,$ac_new_set in
930 { echo "$as_me:930: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
931 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
932 ac_cache_corrupted=: ;;
934 { echo "$as_me:934: error: \`$ac_var' was not set in the previous run" >&5
935 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
936 ac_cache_corrupted=: ;;
939 if test "x$ac_old_val" != "x$ac_new_val"; then
940 { echo "$as_me:940: error: \`$ac_var' has changed since the previous run:" >&5
941 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
942 { echo "$as_me:942: former value: $ac_old_val" >&5
943 echo "$as_me: former value: $ac_old_val" >&2;}
944 { echo "$as_me:944: current value: $ac_new_val" >&5
945 echo "$as_me: current value: $ac_new_val" >&2;}
949 # Pass precious variables to config.status. It doesn't matter if
950 # we pass some twice (in addition to the command line arguments).
951 if test "$ac_new_set" = set; then
953 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
954 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
955 ac_configure_args="$ac_configure_args '$ac_arg'"
957 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
962 if $ac_cache_corrupted; then
963 { echo "$as_me:963: error: changes in the environment can compromise the build" >&5
964 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
965 { { echo "$as_me:965: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
966 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
967 { (exit 1); exit 1; }; }
971 ac_cpp='$CPP $CPPFLAGS'
972 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
973 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
974 ac_compiler_gnu=$ac_cv_c_compiler_gnu
975 ac_main_return=return
977 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
978 *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
980 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
981 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
983 echo "#! $SHELL" >conftest.sh
984 echo "exit 0" >>conftest.sh
986 if { (echo "$as_me:986: PATH=\".;.\"; conftest.sh") >&5
987 (PATH=".;."; conftest.sh) 2>&5
989 echo "$as_me:989: \$? = $ac_status" >&5
990 (exit $ac_status); }; then
991 ac_path_separator=';'
995 PATH_SEPARATOR="$ac_path_separator"
998 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1003 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1004 if test -f $ac_dir/install-sh; then
1006 ac_install_sh="$ac_aux_dir/install-sh -c"
1008 elif test -f $ac_dir/install.sh; then
1010 ac_install_sh="$ac_aux_dir/install.sh -c"
1012 elif test -f $ac_dir/shtool; then
1014 ac_install_sh="$ac_aux_dir/shtool install -c"
1018 if test -z "$ac_aux_dir"; then
1019 { { echo "$as_me:1019: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1020 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1021 { (exit 1); exit 1; }; }
1023 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1024 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1025 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1027 # Make sure we can run config.sub.
1028 $ac_config_sub sun4 >/dev/null 2>&1 ||
1029 { { echo "$as_me:1029: error: cannot run $ac_config_sub" >&5
1030 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1031 { (exit 1); exit 1; }; }
1033 echo "$as_me:1033: checking build system type" >&5
1034 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1035 if test "${ac_cv_build+set}" = set; then
1036 echo $ECHO_N "(cached) $ECHO_C" >&6
1038 ac_cv_build_alias=$build_alias
1039 test -z "$ac_cv_build_alias" &&
1040 ac_cv_build_alias=`$ac_config_guess`
1041 test -z "$ac_cv_build_alias" &&
1042 { { echo "$as_me:1042: error: cannot guess build type; you must specify one" >&5
1043 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1044 { (exit 1); exit 1; }; }
1045 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1046 { { echo "$as_me:1046: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1047 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1048 { (exit 1); exit 1; }; }
1051 echo "$as_me:1051: result: $ac_cv_build" >&5
1052 echo "${ECHO_T}$ac_cv_build" >&6
1054 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1055 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1056 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1058 echo "$as_me:1058: checking host system type" >&5
1059 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1060 if test "${ac_cv_host+set}" = set; then
1061 echo $ECHO_N "(cached) $ECHO_C" >&6
1063 ac_cv_host_alias=$host_alias
1064 test -z "$ac_cv_host_alias" &&
1065 ac_cv_host_alias=$ac_cv_build_alias
1066 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1067 { { echo "$as_me:1067: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1068 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1069 { (exit 1); exit 1; }; }
1072 echo "$as_me:1072: result: $ac_cv_host" >&5
1073 echo "${ECHO_T}$ac_cv_host" >&6
1075 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1076 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1077 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1079 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1080 echo "$as_me:1080: checking target system type" >&5
1081 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1082 if test "${ac_cv_target+set}" = set; then
1083 echo $ECHO_N "(cached) $ECHO_C" >&6
1085 ac_cv_target_alias=$target_alias
1086 test "x$ac_cv_target_alias" = "x" &&
1087 ac_cv_target_alias=$ac_cv_host_alias
1088 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1089 { { echo "$as_me:1089: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1090 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1091 { (exit 1); exit 1; }; }
1094 echo "$as_me:1094: result: $ac_cv_target" >&5
1095 echo "${ECHO_T}$ac_cv_target" >&6
1096 target=$ac_cv_target
1097 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1098 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1099 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1101 # The aliases save the names the user supplied, while $host etc.
1102 # will get canonicalized.
1103 test -n "$target_alias" &&
1104 test "$program_prefix$program_suffix$program_transform_name" = \
1106 program_prefix=${target_alias}-
1107 system_name="$host_os"
1109 system_name="`(uname -s -r) 2>/dev/null`"
1110 if test -z "$system_name" ; then
1111 system_name="`(hostname) 2>/dev/null`"
1114 test -n "$system_name" &&
1115 cat >>confdefs.h <<EOF
1116 #define SYSTEM_NAME "$system_name"
1119 if test "${cf_cv_system_name+set}" = set; then
1120 echo $ECHO_N "(cached) $ECHO_C" >&6
1122 cf_cv_system_name="$system_name"
1125 test -z "$system_name" && system_name="$cf_cv_system_name"
1126 test -n "$cf_cv_system_name" && echo "$as_me:1126: result: Configuring for $cf_cv_system_name" >&5
1127 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1129 if test ".$system_name" != ".$cf_cv_system_name" ; then
1130 echo "$as_me:1130: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1131 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1132 { { echo "$as_me:1132: error: \"Please remove config.cache and try again.\"" >&5
1133 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1134 { (exit 1); exit 1; }; }
1137 # Check whether --with-system-type or --without-system-type was given.
1138 if test "${with_system_type+set}" = set; then
1139 withval="$with_system_type"
1140 { echo "$as_me:1140: WARNING: overriding system type to $withval" >&5
1141 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1142 cf_cv_system_name=$withval
1147 ### Save the given $CFLAGS to allow user-override.
1148 cf_user_CFLAGS="$CFLAGS"
1150 ### Default install-location
1152 echo "$as_me:1152: checking for prefix" >&5
1153 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1154 if test "x$prefix" = "xNONE" ; then
1155 case "$cf_cv_system_name" in
1156 # non-vendor systems don't have a conflict
1157 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1160 (*) prefix=$ac_default_prefix
1164 echo "$as_me:1164: result: $prefix" >&5
1165 echo "${ECHO_T}$prefix" >&6
1167 if test "x$prefix" = "xNONE" ; then
1168 echo "$as_me:1168: checking for default include-directory" >&5
1169 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1170 test -n "$verbose" && echo 1>&6
1173 $includedir/ncurses \
1175 $prefix/include/ncurses \
1176 /usr/local/include \
1177 /usr/local/include/ncurses \
1179 /usr/include/ncurses
1181 cf_dir=`eval echo $cf_symbol`
1182 if test -f $cf_dir/curses.h ; then
1183 if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1184 includedir="$cf_symbol"
1185 test -n "$verbose" && echo $ac_n " found " 1>&6
1189 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1191 echo "$as_me:1191: result: $includedir" >&5
1192 echo "${ECHO_T}$includedir" >&6
1195 ### Checks for programs.
1198 ac_cpp='$CPP $CPPFLAGS'
1199 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1200 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1201 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1202 ac_main_return=return
1203 if test -n "$ac_tool_prefix"; then
1204 for ac_prog in gnatgcc gcc cc
1206 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1207 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1208 echo "$as_me:1208: checking for $ac_word" >&5
1209 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1210 if test "${ac_cv_prog_CC+set}" = set; then
1211 echo $ECHO_N "(cached) $ECHO_C" >&6
1213 if test -n "$CC"; then
1214 ac_cv_prog_CC="$CC" # Let the user override the test.
1216 ac_save_IFS=$IFS; IFS=$ac_path_separator
1218 for ac_dir in $ac_dummy; do
1220 test -z "$ac_dir" && ac_dir=.
1221 $as_executable_p "$ac_dir/$ac_word" || continue
1222 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1223 echo "$as_me:1223: found $ac_dir/$ac_word" >&5
1230 if test -n "$CC"; then
1231 echo "$as_me:1231: result: $CC" >&5
1232 echo "${ECHO_T}$CC" >&6
1234 echo "$as_me:1234: result: no" >&5
1235 echo "${ECHO_T}no" >&6
1238 test -n "$CC" && break
1241 if test -z "$CC"; then
1243 for ac_prog in gnatgcc gcc cc
1245 # Extract the first word of "$ac_prog", so it can be a program name with args.
1246 set dummy $ac_prog; ac_word=$2
1247 echo "$as_me:1247: checking for $ac_word" >&5
1248 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1249 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1250 echo $ECHO_N "(cached) $ECHO_C" >&6
1252 if test -n "$ac_ct_CC"; then
1253 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1255 ac_save_IFS=$IFS; IFS=$ac_path_separator
1257 for ac_dir in $ac_dummy; do
1259 test -z "$ac_dir" && ac_dir=.
1260 $as_executable_p "$ac_dir/$ac_word" || continue
1261 ac_cv_prog_ac_ct_CC="$ac_prog"
1262 echo "$as_me:1262: found $ac_dir/$ac_word" >&5
1268 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1269 if test -n "$ac_ct_CC"; then
1270 echo "$as_me:1270: result: $ac_ct_CC" >&5
1271 echo "${ECHO_T}$ac_ct_CC" >&6
1273 echo "$as_me:1273: result: no" >&5
1274 echo "${ECHO_T}no" >&6
1277 test -n "$ac_ct_CC" && break
1283 test -z "$CC" && { { echo "$as_me:1283: error: no acceptable cc found in \$PATH" >&5
1284 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1285 { (exit 1); exit 1; }; }
1287 # Provide some information about the compiler.
1288 echo "$as_me:1288:" \
1289 "checking for C compiler version" >&5
1290 ac_compiler=`set X $ac_compile; echo $2`
1291 { (eval echo "$as_me:1291: \"$ac_compiler --version </dev/null >&5\"") >&5
1292 (eval $ac_compiler --version </dev/null >&5) 2>&5
1294 echo "$as_me:1294: \$? = $ac_status" >&5
1295 (exit $ac_status); }
1296 { (eval echo "$as_me:1296: \"$ac_compiler -v </dev/null >&5\"") >&5
1297 (eval $ac_compiler -v </dev/null >&5) 2>&5
1299 echo "$as_me:1299: \$? = $ac_status" >&5
1300 (exit $ac_status); }
1301 { (eval echo "$as_me:1301: \"$ac_compiler -V </dev/null >&5\"") >&5
1302 (eval $ac_compiler -V </dev/null >&5) 2>&5
1304 echo "$as_me:1304: \$? = $ac_status" >&5
1305 (exit $ac_status); }
1307 cat >conftest.$ac_ext <<_ACEOF
1308 #line 1308 "configure"
1309 #include "confdefs.h"
1319 ac_clean_files_save=$ac_clean_files
1320 ac_clean_files="$ac_clean_files a.out a.exe"
1321 # Try to create an executable without -o first, disregard a.out.
1322 # It will help us diagnose broken compilers, and finding out an intuition
1324 echo "$as_me:1324: checking for C compiler default output" >&5
1325 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1326 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1327 if { (eval echo "$as_me:1327: \"$ac_link_default\"") >&5
1328 (eval $ac_link_default) 2>&5
1330 echo "$as_me:1330: \$? = $ac_status" >&5
1331 (exit $ac_status); }; then
1332 # Find the output, starting from the most likely. This scheme is
1333 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1335 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1336 ls a.out conftest 2>/dev/null;
1337 ls a.* conftest.* 2>/dev/null`; do
1339 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1340 a.out ) # We found the default executable, but exeext='' is most
1343 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1344 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1351 echo "$as_me: failed program was:" >&5
1352 cat conftest.$ac_ext >&5
1353 { { echo "$as_me:1353: error: C compiler cannot create executables" >&5
1354 echo "$as_me: error: C compiler cannot create executables" >&2;}
1355 { (exit 77); exit 77; }; }
1358 ac_exeext=$ac_cv_exeext
1359 echo "$as_me:1359: result: $ac_file" >&5
1360 echo "${ECHO_T}$ac_file" >&6
1362 # Check the compiler produces executables we can run. If not, either
1363 # the compiler is broken, or we cross compile.
1364 echo "$as_me:1364: checking whether the C compiler works" >&5
1365 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1366 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1367 # If not cross compiling, check that we can run a simple program.
1368 if test "$cross_compiling" != yes; then
1369 if { ac_try='./$ac_file'
1370 { (eval echo "$as_me:1370: \"$ac_try\"") >&5
1373 echo "$as_me:1373: \$? = $ac_status" >&5
1374 (exit $ac_status); }; }; then
1377 if test "$cross_compiling" = maybe; then
1380 { { echo "$as_me:1380: error: cannot run C compiled programs.
1381 If you meant to cross compile, use \`--host'." >&5
1382 echo "$as_me: error: cannot run C compiled programs.
1383 If you meant to cross compile, use \`--host'." >&2;}
1384 { (exit 1); exit 1; }; }
1388 echo "$as_me:1388: result: yes" >&5
1389 echo "${ECHO_T}yes" >&6
1391 rm -f a.out a.exe conftest$ac_cv_exeext
1392 ac_clean_files=$ac_clean_files_save
1393 # Check the compiler produces executables we can run. If not, either
1394 # the compiler is broken, or we cross compile.
1395 echo "$as_me:1395: checking whether we are cross compiling" >&5
1396 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1397 echo "$as_me:1397: result: $cross_compiling" >&5
1398 echo "${ECHO_T}$cross_compiling" >&6
1400 echo "$as_me:1400: checking for executable suffix" >&5
1401 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1402 if { (eval echo "$as_me:1402: \"$ac_link\"") >&5
1403 (eval $ac_link) 2>&5
1405 echo "$as_me:1405: \$? = $ac_status" >&5
1406 (exit $ac_status); }; then
1407 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1408 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1409 # work properly (i.e., refer to `conftest.exe'), while it won't with
1411 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1413 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1414 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1421 { { echo "$as_me:1421: error: cannot compute EXEEXT: cannot compile and link" >&5
1422 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1423 { (exit 1); exit 1; }; }
1426 rm -f conftest$ac_cv_exeext
1427 echo "$as_me:1427: result: $ac_cv_exeext" >&5
1428 echo "${ECHO_T}$ac_cv_exeext" >&6
1430 rm -f conftest.$ac_ext
1431 EXEEXT=$ac_cv_exeext
1433 echo "$as_me:1433: checking for object suffix" >&5
1434 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1435 if test "${ac_cv_objext+set}" = set; then
1436 echo $ECHO_N "(cached) $ECHO_C" >&6
1438 cat >conftest.$ac_ext <<_ACEOF
1439 #line 1439 "configure"
1440 #include "confdefs.h"
1450 rm -f conftest.o conftest.obj
1451 if { (eval echo "$as_me:1451: \"$ac_compile\"") >&5
1452 (eval $ac_compile) 2>&5
1454 echo "$as_me:1454: \$? = $ac_status" >&5
1455 (exit $ac_status); }; then
1456 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1458 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1459 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1464 echo "$as_me: failed program was:" >&5
1465 cat conftest.$ac_ext >&5
1466 { { echo "$as_me:1466: error: cannot compute OBJEXT: cannot compile" >&5
1467 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1468 { (exit 1); exit 1; }; }
1471 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1473 echo "$as_me:1473: result: $ac_cv_objext" >&5
1474 echo "${ECHO_T}$ac_cv_objext" >&6
1475 OBJEXT=$ac_cv_objext
1477 echo "$as_me:1477: checking whether we are using the GNU C compiler" >&5
1478 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1479 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1480 echo $ECHO_N "(cached) $ECHO_C" >&6
1482 cat >conftest.$ac_ext <<_ACEOF
1483 #line 1483 "configure"
1484 #include "confdefs.h"
1497 rm -f conftest.$ac_objext
1498 if { (eval echo "$as_me:1498: \"$ac_compile\"") >&5
1499 (eval $ac_compile) 2>&5
1501 echo "$as_me:1501: \$? = $ac_status" >&5
1502 (exit $ac_status); } &&
1503 { ac_try='test -s conftest.$ac_objext'
1504 { (eval echo "$as_me:1504: \"$ac_try\"") >&5
1507 echo "$as_me:1507: \$? = $ac_status" >&5
1508 (exit $ac_status); }; }; then
1511 echo "$as_me: failed program was:" >&5
1512 cat conftest.$ac_ext >&5
1515 rm -f conftest.$ac_objext conftest.$ac_ext
1516 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1519 echo "$as_me:1519: result: $ac_cv_c_compiler_gnu" >&5
1520 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1521 GCC=`test $ac_compiler_gnu = yes && echo yes`
1522 ac_test_CFLAGS=${CFLAGS+set}
1523 ac_save_CFLAGS=$CFLAGS
1525 echo "$as_me:1525: checking whether $CC accepts -g" >&5
1526 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1527 if test "${ac_cv_prog_cc_g+set}" = set; then
1528 echo $ECHO_N "(cached) $ECHO_C" >&6
1530 cat >conftest.$ac_ext <<_ACEOF
1531 #line 1531 "configure"
1532 #include "confdefs.h"
1542 rm -f conftest.$ac_objext
1543 if { (eval echo "$as_me:1543: \"$ac_compile\"") >&5
1544 (eval $ac_compile) 2>&5
1546 echo "$as_me:1546: \$? = $ac_status" >&5
1547 (exit $ac_status); } &&
1548 { ac_try='test -s conftest.$ac_objext'
1549 { (eval echo "$as_me:1549: \"$ac_try\"") >&5
1552 echo "$as_me:1552: \$? = $ac_status" >&5
1553 (exit $ac_status); }; }; then
1556 echo "$as_me: failed program was:" >&5
1557 cat conftest.$ac_ext >&5
1560 rm -f conftest.$ac_objext conftest.$ac_ext
1562 echo "$as_me:1562: result: $ac_cv_prog_cc_g" >&5
1563 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1564 if test "$ac_test_CFLAGS" = set; then
1565 CFLAGS=$ac_save_CFLAGS
1566 elif test $ac_cv_prog_cc_g = yes; then
1567 if test "$GCC" = yes; then
1573 if test "$GCC" = yes; then
1579 # Some people use a C++ compiler to compile C. Since we use `exit',
1580 # in C++ we need to declare it. In case someone uses the same compiler
1581 # for both compiling C and C++ we need to have the C++ compiler decide
1582 # the declaration of exit, since it's the most demanding environment.
1583 cat >conftest.$ac_ext <<_ACEOF
1588 rm -f conftest.$ac_objext
1589 if { (eval echo "$as_me:1589: \"$ac_compile\"") >&5
1590 (eval $ac_compile) 2>&5
1592 echo "$as_me:1592: \$? = $ac_status" >&5
1593 (exit $ac_status); } &&
1594 { ac_try='test -s conftest.$ac_objext'
1595 { (eval echo "$as_me:1595: \"$ac_try\"") >&5
1598 echo "$as_me:1598: \$? = $ac_status" >&5
1599 (exit $ac_status); }; }; then
1600 for ac_declaration in \
1602 '#include <stdlib.h>' \
1603 'extern "C" void std::exit (int) throw (); using std::exit;' \
1604 'extern "C" void std::exit (int); using std::exit;' \
1605 'extern "C" void exit (int) throw ();' \
1606 'extern "C" void exit (int);' \
1609 cat >conftest.$ac_ext <<_ACEOF
1610 #line 1610 "configure"
1611 #include "confdefs.h"
1622 rm -f conftest.$ac_objext
1623 if { (eval echo "$as_me:1623: \"$ac_compile\"") >&5
1624 (eval $ac_compile) 2>&5
1626 echo "$as_me:1626: \$? = $ac_status" >&5
1627 (exit $ac_status); } &&
1628 { ac_try='test -s conftest.$ac_objext'
1629 { (eval echo "$as_me:1629: \"$ac_try\"") >&5
1632 echo "$as_me:1632: \$? = $ac_status" >&5
1633 (exit $ac_status); }; }; then
1636 echo "$as_me: failed program was:" >&5
1637 cat conftest.$ac_ext >&5
1640 rm -f conftest.$ac_objext conftest.$ac_ext
1641 cat >conftest.$ac_ext <<_ACEOF
1642 #line 1642 "configure"
1643 #include "confdefs.h"
1653 rm -f conftest.$ac_objext
1654 if { (eval echo "$as_me:1654: \"$ac_compile\"") >&5
1655 (eval $ac_compile) 2>&5
1657 echo "$as_me:1657: \$? = $ac_status" >&5
1658 (exit $ac_status); } &&
1659 { ac_try='test -s conftest.$ac_objext'
1660 { (eval echo "$as_me:1660: \"$ac_try\"") >&5
1663 echo "$as_me:1663: \$? = $ac_status" >&5
1664 (exit $ac_status); }; }; then
1667 echo "$as_me: failed program was:" >&5
1668 cat conftest.$ac_ext >&5
1670 rm -f conftest.$ac_objext conftest.$ac_ext
1673 if test -n "$ac_declaration"; then
1674 echo '#ifdef __cplusplus' >>confdefs.h
1675 echo $ac_declaration >>confdefs.h
1676 echo '#endif' >>confdefs.h
1680 echo "$as_me: failed program was:" >&5
1681 cat conftest.$ac_ext >&5
1683 rm -f conftest.$ac_objext conftest.$ac_ext
1685 ac_cpp='$CPP $CPPFLAGS'
1686 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1687 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1688 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1689 ac_main_return=return
1692 if test "$GCC" = yes ; then
1693 echo "$as_me:1693: checking version of $CC" >&5
1694 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1695 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1696 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1697 echo "$as_me:1697: result: $GCC_VERSION" >&5
1698 echo "${ECHO_T}$GCC_VERSION" >&6
1701 echo "$as_me:1701: checking for $CC option to accept ANSI C" >&5
1702 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1703 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1704 echo $ECHO_N "(cached) $ECHO_C" >&6
1706 ac_cv_prog_cc_stdc=no
1708 cat >conftest.$ac_ext <<_ACEOF
1709 #line 1709 "configure"
1710 #include "confdefs.h"
1713 #include <sys/types.h>
1714 #include <sys/stat.h>
1715 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1716 struct buf { int x; };
1717 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1718 static char *e (p, i)
1724 static char *f (char * (*g) (char **, int), char **p, ...)
1729 s = g (p, va_arg (v,int));
1733 int test (int i, double x);
1734 struct s1 {int (*f) (int a);};
1735 struct s2 {int (*f) (double a);};
1736 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1742 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1747 # Don't try gcc -ansi; that turns off useful extensions and
1748 # breaks some systems' header files.
1749 # AIX -qlanglvl=ansi
1750 # Ultrix and OSF/1 -std1
1751 # HP-UX 10.20 and later -Ae
1752 # HP-UX older versions -Aa -D_HPUX_SOURCE
1753 # SVR4 -Xc -D__EXTENSIONS__
1754 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1756 CC="$ac_save_CC $ac_arg"
1757 rm -f conftest.$ac_objext
1758 if { (eval echo "$as_me:1758: \"$ac_compile\"") >&5
1759 (eval $ac_compile) 2>&5
1761 echo "$as_me:1761: \$? = $ac_status" >&5
1762 (exit $ac_status); } &&
1763 { ac_try='test -s conftest.$ac_objext'
1764 { (eval echo "$as_me:1764: \"$ac_try\"") >&5
1767 echo "$as_me:1767: \$? = $ac_status" >&5
1768 (exit $ac_status); }; }; then
1769 ac_cv_prog_cc_stdc=$ac_arg
1772 echo "$as_me: failed program was:" >&5
1773 cat conftest.$ac_ext >&5
1775 rm -f conftest.$ac_objext
1777 rm -f conftest.$ac_ext conftest.$ac_objext
1782 case "x$ac_cv_prog_cc_stdc" in
1784 echo "$as_me:1784: result: none needed" >&5
1785 echo "${ECHO_T}none needed" >&6 ;;
1787 echo "$as_me:1787: result: $ac_cv_prog_cc_stdc" >&5
1788 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1789 CC="$CC $ac_cv_prog_cc_stdc" ;;
1792 # This should have been defined by AC_PROG_CC
1795 echo "$as_me:1795: checking \$CC variable" >&5
1796 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1799 echo "$as_me:1799: result: broken" >&5
1800 echo "${ECHO_T}broken" >&6
1801 { echo "$as_me:1801: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1802 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1804 cf_flags=`echo "$CC" | sed -e 's/^[^ ]*[ ]//'`
1805 CC=`echo "$CC" | sed -e 's/[ ].*//'`
1810 cf_new_extra_cppflags=
1812 for cf_add_cflags in $cf_flags
1814 case $cf_fix_cppflags in
1816 case $cf_add_cflags in
1817 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1818 case $cf_add_cflags in
1820 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1822 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1823 && test -z "${cf_tst_cflags}" \
1824 && cf_fix_cppflags=yes
1826 if test $cf_fix_cppflags = yes ; then
1827 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1829 elif test "${cf_tst_cflags}" = "\"'" ; then
1830 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1839 case $cf_add_cflags in
1841 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1843 CPPFLAGS=`echo "$CPPFLAGS" | \
1844 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1845 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1849 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1854 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1859 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1861 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1863 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1864 && test -z "${cf_tst_cflags}" \
1865 && cf_fix_cppflags=no
1870 if test -n "$cf_new_cflags" ; then
1872 CFLAGS="$CFLAGS $cf_new_cflags"
1875 if test -n "$cf_new_cppflags" ; then
1877 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1880 if test -n "$cf_new_extra_cppflags" ; then
1882 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1887 echo "$as_me:1887: result: ok" >&5
1888 echo "${ECHO_T}ok" >&6
1893 ac_cpp='$CPP $CPPFLAGS'
1894 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1895 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1896 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1897 ac_main_return=return
1898 echo "$as_me:1898: checking how to run the C preprocessor" >&5
1899 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1900 # On Suns, sometimes $CPP names a directory.
1901 if test -n "$CPP" && test -d "$CPP"; then
1904 if test -z "$CPP"; then
1905 if test "${ac_cv_prog_CPP+set}" = set; then
1906 echo $ECHO_N "(cached) $ECHO_C" >&6
1908 # Double quotes because CPP needs to be expanded
1909 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1912 for ac_c_preproc_warn_flag in '' yes
1914 # Use a header file that comes with gcc, so configuring glibc
1915 # with a fresh cross-compiler works.
1916 # On the NeXT, cc -E runs the code through the compiler's parser,
1917 # not just through cpp. "Syntax error" is here to catch this case.
1918 cat >conftest.$ac_ext <<_ACEOF
1919 #line 1919 "configure"
1920 #include "confdefs.h"
1924 if { (eval echo "$as_me:1924: \"$ac_cpp conftest.$ac_ext\"") >&5
1925 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1927 egrep -v '^ *\+' conftest.er1 >conftest.err
1929 cat conftest.err >&5
1930 echo "$as_me:1930: \$? = $ac_status" >&5
1931 (exit $ac_status); } >/dev/null; then
1932 if test -s conftest.err; then
1933 ac_cpp_err=$ac_c_preproc_warn_flag
1940 if test -z "$ac_cpp_err"; then
1943 echo "$as_me: failed program was:" >&5
1944 cat conftest.$ac_ext >&5
1945 # Broken: fails on valid input.
1948 rm -f conftest.err conftest.$ac_ext
1950 # OK, works on sane cases. Now check whether non-existent headers
1951 # can be detected and how.
1952 cat >conftest.$ac_ext <<_ACEOF
1953 #line 1953 "configure"
1954 #include "confdefs.h"
1955 #include <ac_nonexistent.h>
1957 if { (eval echo "$as_me:1957: \"$ac_cpp conftest.$ac_ext\"") >&5
1958 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1960 egrep -v '^ *\+' conftest.er1 >conftest.err
1962 cat conftest.err >&5
1963 echo "$as_me:1963: \$? = $ac_status" >&5
1964 (exit $ac_status); } >/dev/null; then
1965 if test -s conftest.err; then
1966 ac_cpp_err=$ac_c_preproc_warn_flag
1973 if test -z "$ac_cpp_err"; then
1974 # Broken: success on invalid input.
1977 echo "$as_me: failed program was:" >&5
1978 cat conftest.$ac_ext >&5
1979 # Passes both tests.
1983 rm -f conftest.err conftest.$ac_ext
1986 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1987 rm -f conftest.err conftest.$ac_ext
1988 if $ac_preproc_ok; then
2000 echo "$as_me:2000: result: $CPP" >&5
2001 echo "${ECHO_T}$CPP" >&6
2003 for ac_c_preproc_warn_flag in '' yes
2005 # Use a header file that comes with gcc, so configuring glibc
2006 # with a fresh cross-compiler works.
2007 # On the NeXT, cc -E runs the code through the compiler's parser,
2008 # not just through cpp. "Syntax error" is here to catch this case.
2009 cat >conftest.$ac_ext <<_ACEOF
2010 #line 2010 "configure"
2011 #include "confdefs.h"
2015 if { (eval echo "$as_me:2015: \"$ac_cpp conftest.$ac_ext\"") >&5
2016 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2018 egrep -v '^ *\+' conftest.er1 >conftest.err
2020 cat conftest.err >&5
2021 echo "$as_me:2021: \$? = $ac_status" >&5
2022 (exit $ac_status); } >/dev/null; then
2023 if test -s conftest.err; then
2024 ac_cpp_err=$ac_c_preproc_warn_flag
2031 if test -z "$ac_cpp_err"; then
2034 echo "$as_me: failed program was:" >&5
2035 cat conftest.$ac_ext >&5
2036 # Broken: fails on valid input.
2039 rm -f conftest.err conftest.$ac_ext
2041 # OK, works on sane cases. Now check whether non-existent headers
2042 # can be detected and how.
2043 cat >conftest.$ac_ext <<_ACEOF
2044 #line 2044 "configure"
2045 #include "confdefs.h"
2046 #include <ac_nonexistent.h>
2048 if { (eval echo "$as_me:2048: \"$ac_cpp conftest.$ac_ext\"") >&5
2049 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2051 egrep -v '^ *\+' conftest.er1 >conftest.err
2053 cat conftest.err >&5
2054 echo "$as_me:2054: \$? = $ac_status" >&5
2055 (exit $ac_status); } >/dev/null; then
2056 if test -s conftest.err; then
2057 ac_cpp_err=$ac_c_preproc_warn_flag
2064 if test -z "$ac_cpp_err"; then
2065 # Broken: success on invalid input.
2068 echo "$as_me: failed program was:" >&5
2069 cat conftest.$ac_ext >&5
2070 # Passes both tests.
2074 rm -f conftest.err conftest.$ac_ext
2077 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2078 rm -f conftest.err conftest.$ac_ext
2079 if $ac_preproc_ok; then
2082 { { echo "$as_me:2082: error: C preprocessor \"$CPP\" fails sanity check" >&5
2083 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2084 { (exit 1); exit 1; }; }
2088 ac_cpp='$CPP $CPPFLAGS'
2089 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2090 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2091 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2092 ac_main_return=return
2094 if test $ac_cv_c_compiler_gnu = yes; then
2095 echo "$as_me:2095: checking whether $CC needs -traditional" >&5
2096 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2097 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2098 echo $ECHO_N "(cached) $ECHO_C" >&6
2100 ac_pattern="Autoconf.*'x'"
2101 cat >conftest.$ac_ext <<_ACEOF
2102 #line 2102 "configure"
2103 #include "confdefs.h"
2105 int Autoconf = TIOCGETP;
2107 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2108 egrep "$ac_pattern" >/dev/null 2>&1; then
2109 ac_cv_prog_gcc_traditional=yes
2111 ac_cv_prog_gcc_traditional=no
2115 if test $ac_cv_prog_gcc_traditional = no; then
2116 cat >conftest.$ac_ext <<_ACEOF
2117 #line 2117 "configure"
2118 #include "confdefs.h"
2120 int Autoconf = TCGETA;
2122 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2123 egrep "$ac_pattern" >/dev/null 2>&1; then
2124 ac_cv_prog_gcc_traditional=yes
2130 echo "$as_me:2130: result: $ac_cv_prog_gcc_traditional" >&5
2131 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2132 if test $ac_cv_prog_gcc_traditional = yes; then
2133 CC="$CC -traditional"
2137 echo "$as_me:2137: checking whether $CC understands -c and -o together" >&5
2138 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2139 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2140 echo $ECHO_N "(cached) $ECHO_C" >&6
2143 cat > conftest.$ac_ext <<CF_EOF
2147 ${cf_cv_main_return:-return}(0);
2150 # We do the test twice because some compilers refuse to overwrite an
2151 # existing .o file with -o, though they will create one.
2152 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2153 if { (eval echo "$as_me:2153: \"$ac_try\"") >&5
2156 echo "$as_me:2156: \$? = $ac_status" >&5
2157 (exit $ac_status); } &&
2158 test -f conftest2.$ac_objext && { (eval echo "$as_me:2158: \"$ac_try\"") >&5
2161 echo "$as_me:2161: \$? = $ac_status" >&5
2162 (exit $ac_status); };
2164 eval cf_cv_prog_CC_c_o=yes
2166 eval cf_cv_prog_CC_c_o=no
2171 if test $cf_cv_prog_CC_c_o = yes; then
2172 echo "$as_me:2172: result: yes" >&5
2173 echo "${ECHO_T}yes" >&6
2175 echo "$as_me:2175: result: no" >&5
2176 echo "${ECHO_T}no" >&6
2179 test "$program_prefix" != NONE &&
2180 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2181 # Use a double $ so make ignores it.
2182 test "$program_suffix" != NONE &&
2183 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2184 # Double any \ or $. echo might interpret backslashes.
2185 # By default was `s,x,x', remove it if useless.
2186 cat <<\_ACEOF >conftest.sed
2187 s/[\\$]/&&/g;s/;s,x,x,$//
2189 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2192 for ac_prog in mawk gawk nawk awk
2194 # Extract the first word of "$ac_prog", so it can be a program name with args.
2195 set dummy $ac_prog; ac_word=$2
2196 echo "$as_me:2196: checking for $ac_word" >&5
2197 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2198 if test "${ac_cv_prog_AWK+set}" = set; then
2199 echo $ECHO_N "(cached) $ECHO_C" >&6
2201 if test -n "$AWK"; then
2202 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2204 ac_save_IFS=$IFS; IFS=$ac_path_separator
2206 for ac_dir in $ac_dummy; do
2208 test -z "$ac_dir" && ac_dir=.
2209 $as_executable_p "$ac_dir/$ac_word" || continue
2210 ac_cv_prog_AWK="$ac_prog"
2211 echo "$as_me:2211: found $ac_dir/$ac_word" >&5
2218 if test -n "$AWK"; then
2219 echo "$as_me:2219: result: $AWK" >&5
2220 echo "${ECHO_T}$AWK" >&6
2222 echo "$as_me:2222: result: no" >&5
2223 echo "${ECHO_T}no" >&6
2226 test -n "$AWK" && break
2229 test -z "$AWK" && { { echo "$as_me:2229: error: No awk program found" >&5
2230 echo "$as_me: error: No awk program found" >&2;}
2231 { (exit 1); exit 1; }; }
2233 echo "$as_me:2233: checking for egrep" >&5
2234 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2235 if test "${ac_cv_prog_egrep+set}" = set; then
2236 echo $ECHO_N "(cached) $ECHO_C" >&6
2238 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2239 then ac_cv_prog_egrep='grep -E'
2240 else ac_cv_prog_egrep='egrep'
2243 echo "$as_me:2243: result: $ac_cv_prog_egrep" >&5
2244 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2245 EGREP=$ac_cv_prog_egrep
2247 test -z "$EGREP" && { { echo "$as_me:2247: error: No egrep program found" >&5
2248 echo "$as_me: error: No egrep program found" >&2;}
2249 { (exit 1); exit 1; }; }
2251 # Find a good install program. We prefer a C program (faster),
2252 # so one script is as good as another. But avoid the broken or
2253 # incompatible versions:
2254 # SysV /etc/install, /usr/sbin/install
2255 # SunOS /usr/etc/install
2256 # IRIX /sbin/install
2258 # AmigaOS /C/install, which installs bootblocks on floppy discs
2259 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2260 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2261 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2262 # ./install, which can be erroneously created by make from ./install.sh.
2263 echo "$as_me:2263: checking for a BSD compatible install" >&5
2264 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2265 if test -z "$INSTALL"; then
2266 if test "${ac_cv_path_install+set}" = set; then
2267 echo $ECHO_N "(cached) $ECHO_C" >&6
2269 ac_save_IFS=$IFS; IFS=$ac_path_separator
2270 for ac_dir in $PATH; do
2272 # Account for people who put trailing slashes in PATH elements.
2274 / | ./ | .// | /cC/* \
2275 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2278 # OSF1 and SCO ODT 3.0 have their own names for install.
2279 # Don't use installbsd from OSF since it installs stuff as root
2281 for ac_prog in ginstall scoinst install; do
2282 if $as_executable_p "$ac_dir/$ac_prog"; then
2283 if test $ac_prog = install &&
2284 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2285 # AIX install. It has an incompatible calling convention.
2287 elif test $ac_prog = install &&
2288 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2289 # program-specific install script used by HP pwplus--don't use.
2292 ac_cv_path_install="$ac_dir/$ac_prog -c"
2302 if test "${ac_cv_path_install+set}" = set; then
2303 INSTALL=$ac_cv_path_install
2305 # As a last resort, use the slow shell script. We don't cache a
2306 # path for INSTALL within a source directory, because that will
2307 # break other packages using the cache if that directory is
2308 # removed, or if the path is relative.
2309 INSTALL=$ac_install_sh
2312 echo "$as_me:2312: result: $INSTALL" >&5
2313 echo "${ECHO_T}$INSTALL" >&6
2315 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2316 # It thinks the first close brace ends the variable substitution.
2317 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2319 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2321 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2323 echo "$as_me:2323: checking whether ln -s works" >&5
2324 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2326 if test "$LN_S" = "ln -s"; then
2327 echo "$as_me:2327: result: yes" >&5
2328 echo "${ECHO_T}yes" >&6
2330 echo "$as_me:2330: result: no, using $LN_S" >&5
2331 echo "${ECHO_T}no, using $LN_S" >&6
2334 echo "$as_me:2334: checking if $LN_S -f options work" >&5
2335 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2337 rm -f conf$$.src conf$$dst
2339 echo first >conf$$.src
2340 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2345 rm -f conf$$.dst conf$$src
2346 echo "$as_me:2346: result: $cf_prog_ln_sf" >&5
2347 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2349 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2351 echo "$as_me:2351: checking for long file names" >&5
2352 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2353 if test "${ac_cv_sys_long_file_names+set}" = set; then
2354 echo $ECHO_N "(cached) $ECHO_C" >&6
2356 ac_cv_sys_long_file_names=yes
2357 # Test for long file names in all the places we know might matter:
2358 # . the current directory, where building will happen
2359 # $prefix/lib where we will be installing things
2360 # $exec_prefix/lib likewise
2361 # eval it to expand exec_prefix.
2362 # $TMPDIR if set, where it might want to write temporary files
2363 # if $TMPDIR is not set:
2364 # /tmp where it might want to write temporary files
2367 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2370 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2372 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2373 test -d $ac_dir || continue
2374 test -w $ac_dir || continue # It is less confusing to not echo anything here.
2375 ac_xdir=$ac_dir/cf$$
2376 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2377 ac_tf1=$ac_xdir/conftest9012345
2378 ac_tf2=$ac_xdir/conftest9012346
2379 (echo 1 >$ac_tf1) 2>/dev/null
2380 (echo 2 >$ac_tf2) 2>/dev/null
2381 ac_val=`cat $ac_tf1 2>/dev/null`
2382 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2383 ac_cv_sys_long_file_names=no
2384 rm -rf $ac_xdir 2>/dev/null
2387 rm -rf $ac_xdir 2>/dev/null
2390 echo "$as_me:2390: result: $ac_cv_sys_long_file_names" >&5
2391 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2392 if test $ac_cv_sys_long_file_names = yes; then
2394 cat >>confdefs.h <<\EOF
2395 #define HAVE_LONG_FILE_NAMES 1
2400 # if we find pkg-config, check if we should install the ".pc" files.
2402 echo "$as_me:2402: checking if you want to use pkg-config" >&5
2403 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2405 # Check whether --with-pkg-config or --without-pkg-config was given.
2406 if test "${with_pkg_config+set}" = set; then
2407 withval="$with_pkg_config"
2408 cf_pkg_config=$withval
2412 echo "$as_me:2412: result: $cf_pkg_config" >&5
2413 echo "${ECHO_T}$cf_pkg_config" >&6
2415 case $cf_pkg_config in
2421 if test -n "$ac_tool_prefix"; then
2422 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
2423 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
2424 echo "$as_me:2424: checking for $ac_word" >&5
2425 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2426 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2427 echo $ECHO_N "(cached) $ECHO_C" >&6
2431 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2434 ac_save_IFS=$IFS; IFS=$ac_path_separator
2436 for ac_dir in $ac_dummy; do
2438 test -z "$ac_dir" && ac_dir=.
2439 if $as_executable_p "$ac_dir/$ac_word"; then
2440 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2441 echo "$as_me:2441: found $ac_dir/$ac_word" >&5
2449 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2451 if test -n "$PKG_CONFIG"; then
2452 echo "$as_me:2452: result: $PKG_CONFIG" >&5
2453 echo "${ECHO_T}$PKG_CONFIG" >&6
2455 echo "$as_me:2455: result: no" >&5
2456 echo "${ECHO_T}no" >&6
2460 if test -z "$ac_cv_path_PKG_CONFIG"; then
2461 ac_pt_PKG_CONFIG=$PKG_CONFIG
2462 # Extract the first word of "pkg-config", so it can be a program name with args.
2463 set dummy pkg-config; ac_word=$2
2464 echo "$as_me:2464: checking for $ac_word" >&5
2465 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2466 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
2467 echo $ECHO_N "(cached) $ECHO_C" >&6
2469 case $ac_pt_PKG_CONFIG in
2471 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
2474 ac_save_IFS=$IFS; IFS=$ac_path_separator
2476 for ac_dir in $ac_dummy; do
2478 test -z "$ac_dir" && ac_dir=.
2479 if $as_executable_p "$ac_dir/$ac_word"; then
2480 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
2481 echo "$as_me:2481: found $ac_dir/$ac_word" >&5
2486 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
2490 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
2492 if test -n "$ac_pt_PKG_CONFIG"; then
2493 echo "$as_me:2493: result: $ac_pt_PKG_CONFIG" >&5
2494 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
2496 echo "$as_me:2496: result: no" >&5
2497 echo "${ECHO_T}no" >&6
2500 PKG_CONFIG=$ac_pt_PKG_CONFIG
2502 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
2511 test -z "$PKG_CONFIG" && PKG_CONFIG=none
2512 if test "$PKG_CONFIG" != none ; then
2514 if test "x$prefix" != xNONE; then
2515 cf_path_syntax="$prefix"
2517 cf_path_syntax="$ac_default_prefix"
2520 case ".$PKG_CONFIG" in
2525 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
2527 (.\${*prefix}*|.\${*dir}*)
2528 eval PKG_CONFIG="$PKG_CONFIG"
2529 case ".$PKG_CONFIG" in
2531 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2536 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2539 { { echo "$as_me:2539: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
2540 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
2541 { (exit 1); exit 1; }; }
2545 elif test "x$cf_pkg_config" != xno ; then
2546 { echo "$as_me:2546: WARNING: pkg-config is not installed" >&5
2547 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
2550 echo "$as_me:2550: checking for $PKG_CONFIG library directory" >&5
2551 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
2552 if test "x$PKG_CONFIG" = xnone ; then
2553 PKG_CONFIG_LIBDIR=none
2556 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
2557 if test "${with_pkg_config_libdir+set}" = set; then
2558 withval="$with_pkg_config_libdir"
2559 PKG_CONFIG_LIBDIR=$withval
2561 PKG_CONFIG_LIBDIR=yes
2565 case x$PKG_CONFIG_LIBDIR in
2569 # Look for the library directory using the same prefix as the executable
2570 if test "x$PKG_CONFIG" = xnone
2574 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
2577 # If you don't like using the default architecture, you have to specify the
2578 # intended library directory and corresponding compiler/linker options.
2580 # This case allows for Debian's 2014-flavor of multiarch, along with the
2581 # most common variations before that point. Some other variants spell the
2582 # directory differently, e.g., "pkg-config", and put it in unusual places.
2583 # pkg-config has always been poorly standardized, which is ironic...
2584 case x`(arch) 2>/dev/null` in
2587 $cf_path/lib/*64-linux-gnu \
2595 $cf_path/lib/*-linux-gnu \
2603 test -n "$verbose" && echo " list..." 1>&6
2605 echo "${as_me:-configure}:2605: testing list... ..." 1>&5
2607 for cf_config in $cf_search_path
2609 test -n "$verbose" && echo " checking $cf_config/pkgconfig" 1>&6
2611 echo "${as_me:-configure}:2611: testing checking $cf_config/pkgconfig ..." 1>&5
2613 if test -d $cf_config/pkgconfig
2615 PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
2616 echo "$as_me:2616: checking done" >&5
2617 echo $ECHO_N "checking done... $ECHO_C" >&6
2626 if test "x$PKG_CONFIG" != xnone ; then
2627 echo "$as_me:2627: result: $PKG_CONFIG_LIBDIR" >&5
2628 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
2631 echo "$as_me:2631: checking if you want to build test-programs" >&5
2632 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2634 # Check whether --with-tests or --without-tests was given.
2635 if test "${with_tests+set}" = set; then
2636 withval="$with_tests"
2637 cf_with_tests=$withval
2641 echo "$as_me:2641: result: $cf_with_tests" >&5
2642 echo "${ECHO_T}$cf_with_tests" >&6
2644 echo "$as_me:2644: checking if we should assume mixed-case filenames" >&5
2645 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
2647 # Check whether --enable-mixed-case or --disable-mixed-case was given.
2648 if test "${enable_mixed_case+set}" = set; then
2649 enableval="$enable_mixed_case"
2650 enable_mixedcase=$enableval
2652 enable_mixedcase=auto
2654 echo "$as_me:2654: result: $enable_mixedcase" >&5
2655 echo "${ECHO_T}$enable_mixedcase" >&6
2656 if test "$enable_mixedcase" = "auto" ; then
2658 echo "$as_me:2658: checking if filesystem supports mixed-case filenames" >&5
2659 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2660 if test "${cf_cv_mixedcase+set}" = set; then
2661 echo $ECHO_N "(cached) $ECHO_C" >&6
2664 if test "$cross_compiling" = yes ; then
2665 case $target_alias in
2666 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2674 rm -f conftest CONFTEST
2676 if test -f CONFTEST ; then
2681 rm -f conftest CONFTEST
2685 echo "$as_me:2685: result: $cf_cv_mixedcase" >&5
2686 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2687 test "$cf_cv_mixedcase" = yes &&
2688 cat >>confdefs.h <<\EOF
2689 #define MIXEDCASE_FILENAMES 1
2693 cf_cv_mixedcase=$enable_mixedcase
2694 if test "$enable_mixedcase" = "yes" ; then
2695 cat >>confdefs.h <<\EOF
2696 #define MIXEDCASE_FILENAMES 1
2702 # do this after mixed-case option (tags/TAGS is not as important as tic).
2703 echo "$as_me:2703: checking whether ${MAKE-make} sets \${MAKE}" >&5
2704 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2705 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2706 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2707 echo $ECHO_N "(cached) $ECHO_C" >&6
2709 cat >conftest.make <<\EOF
2711 @echo 'ac_maketemp="${MAKE}"'
2713 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2714 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2715 if test -n "$ac_maketemp"; then
2716 eval ac_cv_prog_make_${ac_make}_set=yes
2718 eval ac_cv_prog_make_${ac_make}_set=no
2722 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2723 echo "$as_me:2723: result: yes" >&5
2724 echo "${ECHO_T}yes" >&6
2727 echo "$as_me:2727: result: no" >&5
2728 echo "${ECHO_T}no" >&6
2729 SET_MAKE="MAKE=${MAKE-make}"
2732 for ac_prog in exctags ctags
2734 # Extract the first word of "$ac_prog", so it can be a program name with args.
2735 set dummy $ac_prog; ac_word=$2
2736 echo "$as_me:2736: checking for $ac_word" >&5
2737 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2738 if test "${ac_cv_prog_CTAGS+set}" = set; then
2739 echo $ECHO_N "(cached) $ECHO_C" >&6
2741 if test -n "$CTAGS"; then
2742 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2744 ac_save_IFS=$IFS; IFS=$ac_path_separator
2746 for ac_dir in $ac_dummy; do
2748 test -z "$ac_dir" && ac_dir=.
2749 $as_executable_p "$ac_dir/$ac_word" || continue
2750 ac_cv_prog_CTAGS="$ac_prog"
2751 echo "$as_me:2751: found $ac_dir/$ac_word" >&5
2757 CTAGS=$ac_cv_prog_CTAGS
2758 if test -n "$CTAGS"; then
2759 echo "$as_me:2759: result: $CTAGS" >&5
2760 echo "${ECHO_T}$CTAGS" >&6
2762 echo "$as_me:2762: result: no" >&5
2763 echo "${ECHO_T}no" >&6
2766 test -n "$CTAGS" && break
2769 for ac_prog in exetags etags
2771 # Extract the first word of "$ac_prog", so it can be a program name with args.
2772 set dummy $ac_prog; ac_word=$2
2773 echo "$as_me:2773: checking for $ac_word" >&5
2774 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2775 if test "${ac_cv_prog_ETAGS+set}" = set; then
2776 echo $ECHO_N "(cached) $ECHO_C" >&6
2778 if test -n "$ETAGS"; then
2779 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2781 ac_save_IFS=$IFS; IFS=$ac_path_separator
2783 for ac_dir in $ac_dummy; do
2785 test -z "$ac_dir" && ac_dir=.
2786 $as_executable_p "$ac_dir/$ac_word" || continue
2787 ac_cv_prog_ETAGS="$ac_prog"
2788 echo "$as_me:2788: found $ac_dir/$ac_word" >&5
2794 ETAGS=$ac_cv_prog_ETAGS
2795 if test -n "$ETAGS"; then
2796 echo "$as_me:2796: result: $ETAGS" >&5
2797 echo "${ECHO_T}$ETAGS" >&6
2799 echo "$as_me:2799: result: no" >&5
2800 echo "${ECHO_T}no" >&6
2803 test -n "$ETAGS" && break
2806 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2807 set dummy ${CTAGS:-ctags}; ac_word=$2
2808 echo "$as_me:2808: checking for $ac_word" >&5
2809 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2810 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2811 echo $ECHO_N "(cached) $ECHO_C" >&6
2813 if test -n "$MAKE_LOWER_TAGS"; then
2814 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2816 ac_save_IFS=$IFS; IFS=$ac_path_separator
2818 for ac_dir in $ac_dummy; do
2820 test -z "$ac_dir" && ac_dir=.
2821 $as_executable_p "$ac_dir/$ac_word" || continue
2822 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2823 echo "$as_me:2823: found $ac_dir/$ac_word" >&5
2827 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2830 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2831 if test -n "$MAKE_LOWER_TAGS"; then
2832 echo "$as_me:2832: result: $MAKE_LOWER_TAGS" >&5
2833 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2835 echo "$as_me:2835: result: no" >&5
2836 echo "${ECHO_T}no" >&6
2839 if test "$cf_cv_mixedcase" = yes ; then
2840 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2841 set dummy ${ETAGS:-etags}; ac_word=$2
2842 echo "$as_me:2842: checking for $ac_word" >&5
2843 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2844 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2845 echo $ECHO_N "(cached) $ECHO_C" >&6
2847 if test -n "$MAKE_UPPER_TAGS"; then
2848 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2850 ac_save_IFS=$IFS; IFS=$ac_path_separator
2852 for ac_dir in $ac_dummy; do
2854 test -z "$ac_dir" && ac_dir=.
2855 $as_executable_p "$ac_dir/$ac_word" || continue
2856 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2857 echo "$as_me:2857: found $ac_dir/$ac_word" >&5
2861 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2864 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2865 if test -n "$MAKE_UPPER_TAGS"; then
2866 echo "$as_me:2866: result: $MAKE_UPPER_TAGS" >&5
2867 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2869 echo "$as_me:2869: result: no" >&5
2870 echo "${ECHO_T}no" >&6
2877 if test "$MAKE_UPPER_TAGS" = yes ; then
2883 if test "$MAKE_LOWER_TAGS" = yes ; then
2889 echo "$as_me:2889: checking for makeflags variable" >&5
2890 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
2891 if test "${cf_cv_makeflags+set}" = set; then
2892 echo $ECHO_N "(cached) $ECHO_C" >&6
2896 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
2898 cat >cf_makeflags.tmp <<CF_EOF
2901 @ echo '.$cf_option'
2903 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ ]*$,,'`
2904 case "$cf_result" in
2906 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
2907 case "$cf_result" in
2908 (.*CC=*) cf_cv_makeflags=
2910 (*) cf_cv_makeflags=$cf_option
2916 (*) echo "given option \"$cf_option\", no match \"$cf_result\""
2920 rm -f cf_makeflags.tmp
2923 echo "$as_me:2923: result: $cf_cv_makeflags" >&5
2924 echo "${ECHO_T}$cf_cv_makeflags" >&6
2926 if test -n "$ac_tool_prefix"; then
2927 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2928 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2929 echo "$as_me:2929: checking for $ac_word" >&5
2930 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2931 if test "${ac_cv_prog_RANLIB+set}" = set; then
2932 echo $ECHO_N "(cached) $ECHO_C" >&6
2934 if test -n "$RANLIB"; then
2935 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2937 ac_save_IFS=$IFS; IFS=$ac_path_separator
2939 for ac_dir in $ac_dummy; do
2941 test -z "$ac_dir" && ac_dir=.
2942 $as_executable_p "$ac_dir/$ac_word" || continue
2943 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2944 echo "$as_me:2944: found $ac_dir/$ac_word" >&5
2950 RANLIB=$ac_cv_prog_RANLIB
2951 if test -n "$RANLIB"; then
2952 echo "$as_me:2952: result: $RANLIB" >&5
2953 echo "${ECHO_T}$RANLIB" >&6
2955 echo "$as_me:2955: result: no" >&5
2956 echo "${ECHO_T}no" >&6
2960 if test -z "$ac_cv_prog_RANLIB"; then
2961 ac_ct_RANLIB=$RANLIB
2962 # Extract the first word of "ranlib", so it can be a program name with args.
2963 set dummy ranlib; ac_word=$2
2964 echo "$as_me:2964: checking for $ac_word" >&5
2965 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2966 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2967 echo $ECHO_N "(cached) $ECHO_C" >&6
2969 if test -n "$ac_ct_RANLIB"; then
2970 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2972 ac_save_IFS=$IFS; IFS=$ac_path_separator
2974 for ac_dir in $ac_dummy; do
2976 test -z "$ac_dir" && ac_dir=.
2977 $as_executable_p "$ac_dir/$ac_word" || continue
2978 ac_cv_prog_ac_ct_RANLIB="ranlib"
2979 echo "$as_me:2979: found $ac_dir/$ac_word" >&5
2983 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
2986 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2987 if test -n "$ac_ct_RANLIB"; then
2988 echo "$as_me:2988: result: $ac_ct_RANLIB" >&5
2989 echo "${ECHO_T}$ac_ct_RANLIB" >&6
2991 echo "$as_me:2991: result: no" >&5
2992 echo "${ECHO_T}no" >&6
2995 RANLIB=$ac_ct_RANLIB
2997 RANLIB="$ac_cv_prog_RANLIB"
3000 if test -n "$ac_tool_prefix"; then
3001 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3002 set dummy ${ac_tool_prefix}ld; ac_word=$2
3003 echo "$as_me:3003: checking for $ac_word" >&5
3004 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3005 if test "${ac_cv_prog_LD+set}" = set; then
3006 echo $ECHO_N "(cached) $ECHO_C" >&6
3008 if test -n "$LD"; then
3009 ac_cv_prog_LD="$LD" # Let the user override the test.
3011 ac_save_IFS=$IFS; IFS=$ac_path_separator
3013 for ac_dir in $ac_dummy; do
3015 test -z "$ac_dir" && ac_dir=.
3016 $as_executable_p "$ac_dir/$ac_word" || continue
3017 ac_cv_prog_LD="${ac_tool_prefix}ld"
3018 echo "$as_me:3018: found $ac_dir/$ac_word" >&5
3025 if test -n "$LD"; then
3026 echo "$as_me:3026: result: $LD" >&5
3027 echo "${ECHO_T}$LD" >&6
3029 echo "$as_me:3029: result: no" >&5
3030 echo "${ECHO_T}no" >&6
3034 if test -z "$ac_cv_prog_LD"; then
3036 # Extract the first word of "ld", so it can be a program name with args.
3037 set dummy ld; ac_word=$2
3038 echo "$as_me:3038: checking for $ac_word" >&5
3039 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3040 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3041 echo $ECHO_N "(cached) $ECHO_C" >&6
3043 if test -n "$ac_ct_LD"; then
3044 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3046 ac_save_IFS=$IFS; IFS=$ac_path_separator
3048 for ac_dir in $ac_dummy; do
3050 test -z "$ac_dir" && ac_dir=.
3051 $as_executable_p "$ac_dir/$ac_word" || continue
3052 ac_cv_prog_ac_ct_LD="ld"
3053 echo "$as_me:3053: found $ac_dir/$ac_word" >&5
3057 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3060 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3061 if test -n "$ac_ct_LD"; then
3062 echo "$as_me:3062: result: $ac_ct_LD" >&5
3063 echo "${ECHO_T}$ac_ct_LD" >&6
3065 echo "$as_me:3065: result: no" >&5
3066 echo "${ECHO_T}no" >&6
3074 if test -n "$ac_tool_prefix"; then
3075 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3076 set dummy ${ac_tool_prefix}ar; ac_word=$2
3077 echo "$as_me:3077: checking for $ac_word" >&5
3078 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3079 if test "${ac_cv_prog_AR+set}" = set; then
3080 echo $ECHO_N "(cached) $ECHO_C" >&6
3082 if test -n "$AR"; then
3083 ac_cv_prog_AR="$AR" # Let the user override the test.
3085 ac_save_IFS=$IFS; IFS=$ac_path_separator
3087 for ac_dir in $ac_dummy; do
3089 test -z "$ac_dir" && ac_dir=.
3090 $as_executable_p "$ac_dir/$ac_word" || continue
3091 ac_cv_prog_AR="${ac_tool_prefix}ar"
3092 echo "$as_me:3092: found $ac_dir/$ac_word" >&5
3099 if test -n "$AR"; then
3100 echo "$as_me:3100: result: $AR" >&5
3101 echo "${ECHO_T}$AR" >&6
3103 echo "$as_me:3103: result: no" >&5
3104 echo "${ECHO_T}no" >&6
3108 if test -z "$ac_cv_prog_AR"; then
3110 # Extract the first word of "ar", so it can be a program name with args.
3111 set dummy ar; ac_word=$2
3112 echo "$as_me:3112: checking for $ac_word" >&5
3113 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3114 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3115 echo $ECHO_N "(cached) $ECHO_C" >&6
3117 if test -n "$ac_ct_AR"; then
3118 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3120 ac_save_IFS=$IFS; IFS=$ac_path_separator
3122 for ac_dir in $ac_dummy; do
3124 test -z "$ac_dir" && ac_dir=.
3125 $as_executable_p "$ac_dir/$ac_word" || continue
3126 ac_cv_prog_ac_ct_AR="ar"
3127 echo "$as_me:3127: found $ac_dir/$ac_word" >&5
3131 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3134 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3135 if test -n "$ac_ct_AR"; then
3136 echo "$as_me:3136: result: $ac_ct_AR" >&5
3137 echo "${ECHO_T}$ac_ct_AR" >&6
3139 echo "$as_me:3139: result: no" >&5
3140 echo "${ECHO_T}no" >&6
3148 if test -n "$ac_tool_prefix"; then
3149 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3150 set dummy ${ac_tool_prefix}ar; ac_word=$2
3151 echo "$as_me:3151: checking for $ac_word" >&5
3152 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3153 if test "${ac_cv_prog_AR+set}" = set; then
3154 echo $ECHO_N "(cached) $ECHO_C" >&6
3156 if test -n "$AR"; then
3157 ac_cv_prog_AR="$AR" # Let the user override the test.
3159 ac_save_IFS=$IFS; IFS=$ac_path_separator
3161 for ac_dir in $ac_dummy; do
3163 test -z "$ac_dir" && ac_dir=.
3164 $as_executable_p "$ac_dir/$ac_word" || continue
3165 ac_cv_prog_AR="${ac_tool_prefix}ar"
3166 echo "$as_me:3166: found $ac_dir/$ac_word" >&5
3173 if test -n "$AR"; then
3174 echo "$as_me:3174: result: $AR" >&5
3175 echo "${ECHO_T}$AR" >&6
3177 echo "$as_me:3177: result: no" >&5
3178 echo "${ECHO_T}no" >&6
3182 if test -z "$ac_cv_prog_AR"; then
3184 # Extract the first word of "ar", so it can be a program name with args.
3185 set dummy ar; ac_word=$2
3186 echo "$as_me:3186: checking for $ac_word" >&5
3187 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3188 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3189 echo $ECHO_N "(cached) $ECHO_C" >&6
3191 if test -n "$ac_ct_AR"; then
3192 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3194 ac_save_IFS=$IFS; IFS=$ac_path_separator
3196 for ac_dir in $ac_dummy; do
3198 test -z "$ac_dir" && ac_dir=.
3199 $as_executable_p "$ac_dir/$ac_word" || continue
3200 ac_cv_prog_ac_ct_AR="ar"
3201 echo "$as_me:3201: found $ac_dir/$ac_word" >&5
3205 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3208 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3209 if test -n "$ac_ct_AR"; then
3210 echo "$as_me:3210: result: $ac_ct_AR" >&5
3211 echo "${ECHO_T}$ac_ct_AR" >&6
3213 echo "$as_me:3213: result: no" >&5
3214 echo "${ECHO_T}no" >&6
3222 echo "$as_me:3222: checking for options to update archives" >&5
3223 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3224 if test "${cf_cv_ar_flags+set}" = set; then
3225 echo $ECHO_N "(cached) $ECHO_C" >&6
3228 cf_cv_ar_flags=unknown
3229 for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
3232 # check if $ARFLAGS already contains this choice
3233 if test "x$ARFLAGS" != "x" ; then
3234 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3235 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3241 rm -f conftest.$ac_cv_objext
3244 cat >conftest.$ac_ext <<EOF
3245 #line 3245 "configure"
3246 int testdata[3] = { 123, 456, 789 };
3248 if { (eval echo "$as_me:3248: \"$ac_compile\"") >&5
3249 (eval $ac_compile) 2>&5
3251 echo "$as_me:3251: \$? = $ac_status" >&5
3252 (exit $ac_status); } ; then
3253 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3254 $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3255 if test -f conftest.a ; then
3256 cf_cv_ar_flags=$cf_ar_flags
3260 test -n "$verbose" && echo " cannot compile test-program" 1>&6
3262 echo "${as_me:-configure}:3262: testing cannot compile test-program ..." 1>&5
3267 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3270 echo "$as_me:3270: result: $cf_cv_ar_flags" >&5
3271 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3273 if test -n "$ARFLAGS" ; then
3274 if test -n "$cf_cv_ar_flags" ; then
3275 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3278 ARFLAGS=$cf_cv_ar_flags
3281 echo "$as_me:3281: checking for PATH separator" >&5
3282 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
3283 case $cf_cv_system_name in
3284 (os2*) PATH_SEPARATOR=';' ;;
3285 (*) ${PATH_SEPARATOR:=':'} ;;
3288 echo "$as_me:3288: result: $PATH_SEPARATOR" >&5
3289 echo "${ECHO_T}$PATH_SEPARATOR" >&6
3291 echo "$as_me:3291: checking if you have specified an install-prefix" >&5
3292 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3294 # Check whether --with-install-prefix or --without-install-prefix was given.
3295 if test "${with_install_prefix+set}" = set; then
3296 withval="$with_install_prefix"
3300 (*) DESTDIR="$withval"
3304 echo "$as_me:3304: result: $DESTDIR" >&5
3305 echo "${ECHO_T}$DESTDIR" >&6
3307 ###############################################################################
3309 # If we're cross-compiling, allow the user to override the tools and their
3310 # options. The configure script is oriented toward identifying the host
3311 # compiler, etc., but we need a build compiler to generate parts of the source.
3313 if test "$cross_compiling" = yes ; then
3315 # defaults that we might want to override
3316 : ${BUILD_CFLAGS:=''}
3317 : ${BUILD_CPPFLAGS:=''}
3318 : ${BUILD_LDFLAGS:=''}
3320 : ${BUILD_EXEEXT:='$x'}
3321 : ${BUILD_OBJEXT:='o'}
3323 # Check whether --with-build-cc or --without-build-cc was given.
3324 if test "${with_build_cc+set}" = set; then
3325 withval="$with_build_cc"
3328 for ac_prog in gcc cc cl
3330 # Extract the first word of "$ac_prog", so it can be a program name with args.
3331 set dummy $ac_prog; ac_word=$2
3332 echo "$as_me:3332: checking for $ac_word" >&5
3333 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3334 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3335 echo $ECHO_N "(cached) $ECHO_C" >&6
3337 if test -n "$BUILD_CC"; then
3338 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3340 ac_save_IFS=$IFS; IFS=$ac_path_separator
3342 for ac_dir in $ac_dummy; do
3344 test -z "$ac_dir" && ac_dir=.
3345 $as_executable_p "$ac_dir/$ac_word" || continue
3346 ac_cv_prog_BUILD_CC="$ac_prog"
3347 echo "$as_me:3347: found $ac_dir/$ac_word" >&5
3353 BUILD_CC=$ac_cv_prog_BUILD_CC
3354 if test -n "$BUILD_CC"; then
3355 echo "$as_me:3355: result: $BUILD_CC" >&5
3356 echo "${ECHO_T}$BUILD_CC" >&6
3358 echo "$as_me:3358: result: no" >&5
3359 echo "${ECHO_T}no" >&6
3362 test -n "$BUILD_CC" && break
3366 echo "$as_me:3366: checking for native build C compiler" >&5
3367 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3368 echo "$as_me:3368: result: $BUILD_CC" >&5
3369 echo "${ECHO_T}$BUILD_CC" >&6
3371 echo "$as_me:3371: checking for native build C preprocessor" >&5
3372 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3374 # Check whether --with-build-cpp or --without-build-cpp was given.
3375 if test "${with_build_cpp+set}" = set; then
3376 withval="$with_build_cpp"
3377 BUILD_CPP="$withval"
3379 BUILD_CPP='${BUILD_CC} -E'
3381 echo "$as_me:3381: result: $BUILD_CPP" >&5
3382 echo "${ECHO_T}$BUILD_CPP" >&6
3384 echo "$as_me:3384: checking for native build C flags" >&5
3385 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3387 # Check whether --with-build-cflags or --without-build-cflags was given.
3388 if test "${with_build_cflags+set}" = set; then
3389 withval="$with_build_cflags"
3390 BUILD_CFLAGS="$withval"
3392 echo "$as_me:3392: result: $BUILD_CFLAGS" >&5
3393 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3395 echo "$as_me:3395: checking for native build C preprocessor-flags" >&5
3396 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3398 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3399 if test "${with_build_cppflags+set}" = set; then
3400 withval="$with_build_cppflags"
3401 BUILD_CPPFLAGS="$withval"
3403 echo "$as_me:3403: result: $BUILD_CPPFLAGS" >&5
3404 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3406 echo "$as_me:3406: checking for native build linker-flags" >&5
3407 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3409 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3410 if test "${with_build_ldflags+set}" = set; then
3411 withval="$with_build_ldflags"
3412 BUILD_LDFLAGS="$withval"
3414 echo "$as_me:3414: result: $BUILD_LDFLAGS" >&5
3415 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3417 echo "$as_me:3417: checking for native build linker-libraries" >&5
3418 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3420 # Check whether --with-build-libs or --without-build-libs was given.
3421 if test "${with_build_libs+set}" = set; then
3422 withval="$with_build_libs"
3423 BUILD_LIBS="$withval"
3425 echo "$as_me:3425: result: $BUILD_LIBS" >&5
3426 echo "${ECHO_T}$BUILD_LIBS" >&6
3428 # this assumes we're on Unix.
3432 : ${BUILD_CC:='${CC}'}
3434 if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3435 { { echo "$as_me:3435: error: Cross-build requires two compilers.
3436 Use --with-build-cc to specify the native compiler." >&5
3437 echo "$as_me: error: Cross-build requires two compilers.
3438 Use --with-build-cc to specify the native compiler." >&2;}
3439 { (exit 1); exit 1; }; }
3443 : ${BUILD_CC:='${CC}'}
3444 : ${BUILD_CPP:='${CPP}'}
3445 : ${BUILD_CFLAGS:='${CFLAGS}'}
3446 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3447 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3448 : ${BUILD_LIBS:='${LIBS}'}
3449 : ${BUILD_EXEEXT:='$x'}
3450 : ${BUILD_OBJEXT:='o'}
3453 ###############################################################################
3455 ### Options to allow the user to specify the set of libraries which are used.
3456 ### Use "--without-normal --with-shared" to allow the default model to be
3457 ### shared, for example.
3460 echo "$as_me:3460: checking if you want to build shared C-objects" >&5
3461 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
3463 # Check whether --with-shared or --without-shared was given.
3464 if test "${with_shared+set}" = set; then
3465 withval="$with_shared"
3466 with_shared=$withval
3470 echo "$as_me:3470: result: $with_shared" >&5
3471 echo "${ECHO_T}$with_shared" >&6
3472 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
3474 echo "$as_me:3474: checking for specified models" >&5
3475 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3476 test -z "$cf_list_models" && cf_list_models=normal
3477 echo "$as_me:3477: result: $cf_list_models" >&5
3478 echo "${ECHO_T}$cf_list_models" >&6
3480 ### Use the first model as the default, and save its suffix for use in building
3481 ### up test-applications.
3482 echo "$as_me:3482: checking for default model" >&5
3483 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3484 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3485 echo "$as_me:3485: result: $DFT_LWR_MODEL" >&5
3486 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3488 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3490 echo "$as_me:3490: checking for specific curses-directory" >&5
3491 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
3493 # Check whether --with-curses-dir or --without-curses-dir was given.
3494 if test "${with_curses_dir+set}" = set; then
3495 withval="$with_curses_dir"
3496 cf_cv_curses_dir=$withval
3500 echo "$as_me:3500: result: $cf_cv_curses_dir" >&5
3501 echo "${ECHO_T}$cf_cv_curses_dir" >&6
3503 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3506 if test "x$prefix" != xNONE; then
3507 cf_path_syntax="$prefix"
3509 cf_path_syntax="$ac_default_prefix"
3517 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3519 (.\${*prefix}*|.\${*dir}*)
3520 eval withval="$withval"
3523 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3528 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3531 { { echo "$as_me:3531: error: expected a pathname, not \"$withval\"" >&5
3532 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3533 { (exit 1); exit 1; }; }
3537 if test -d "$cf_cv_curses_dir"
3540 if test -n "$cf_cv_curses_dir/include" ; then
3541 for cf_add_incdir in $cf_cv_curses_dir/include
3543 while test $cf_add_incdir != /usr/include
3545 if test -d $cf_add_incdir
3548 if test -n "$CFLAGS$CPPFLAGS" ; then
3549 # a loop is needed to ensure we can add subdirs of existing dirs
3550 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3551 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3552 cf_have_incdir=yes; break
3557 if test "$cf_have_incdir" = no ; then
3558 if test "$cf_add_incdir" = /usr/local/include ; then
3559 if test "$GCC" = yes
3561 cf_save_CPPFLAGS=$CPPFLAGS
3562 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3563 cat >conftest.$ac_ext <<_ACEOF
3564 #line 3564 "configure"
3565 #include "confdefs.h"
3575 rm -f conftest.$ac_objext
3576 if { (eval echo "$as_me:3576: \"$ac_compile\"") >&5
3577 (eval $ac_compile) 2>&5
3579 echo "$as_me:3579: \$? = $ac_status" >&5
3580 (exit $ac_status); } &&
3581 { ac_try='test -s conftest.$ac_objext'
3582 { (eval echo "$as_me:3582: \"$ac_try\"") >&5
3585 echo "$as_me:3585: \$? = $ac_status" >&5
3586 (exit $ac_status); }; }; then
3589 echo "$as_me: failed program was:" >&5
3590 cat conftest.$ac_ext >&5
3593 rm -f conftest.$ac_objext conftest.$ac_ext
3594 CPPFLAGS=$cf_save_CPPFLAGS
3599 if test "$cf_have_incdir" = no ; then
3600 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3602 echo "${as_me:-configure}:3602: testing adding $cf_add_incdir to include-path ..." 1>&5
3604 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3606 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3607 test "$cf_top_incdir" = "$cf_add_incdir" && break
3608 cf_add_incdir="$cf_top_incdir"
3617 if test -n "$cf_cv_curses_dir/lib" ; then
3618 for cf_add_libdir in $cf_cv_curses_dir/lib
3620 if test $cf_add_libdir = /usr/lib ; then
3622 elif test -d $cf_add_libdir
3625 if test -n "$LDFLAGS$LIBS" ; then
3626 # a loop is needed to ensure we can add subdirs of existing dirs
3627 for cf_test_libdir in $LDFLAGS $LIBS ; do
3628 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3629 cf_have_libdir=yes; break
3633 if test "$cf_have_libdir" = no ; then
3634 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
3636 echo "${as_me:-configure}:3636: testing adding $cf_add_libdir to library-path ..." 1>&5
3638 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3647 cf_ncuconfig_root=ncurses
3648 cf_have_ncuconfig=no
3650 if test "x$PKG_CONFIG" != xnone; then
3651 echo "$as_me:3651: checking pkg-config for $cf_ncuconfig_root" >&5
3652 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
3653 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
3654 echo "$as_me:3654: result: yes" >&5
3655 echo "${ECHO_T}yes" >&6
3657 echo "$as_me:3657: checking if the $cf_ncuconfig_root package files work" >&5
3658 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
3659 cf_have_ncuconfig=unknown
3661 cf_save_CPPFLAGS="$CPPFLAGS"
3662 cf_save_LIBS="$LIBS"
3664 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
3666 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
3667 # Filter out duplicates - this happens with badly-designed ".pc" files...
3668 for cf_add_1lib in $LIBS
3670 for cf_add_2lib in $cf_add_libs
3672 if test "x$cf_add_1lib" = "x$cf_add_2lib"
3678 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
3682 cat >conftest.$ac_ext <<_ACEOF
3683 #line 3683 "configure"
3684 #include "confdefs.h"
3685 #include <${cf_cv_ncurses_header:-curses.h}>
3689 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
3694 rm -f conftest.$ac_objext conftest$ac_exeext
3695 if { (eval echo "$as_me:3695: \"$ac_link\"") >&5
3696 (eval $ac_link) 2>&5
3698 echo "$as_me:3698: \$? = $ac_status" >&5
3699 (exit $ac_status); } &&
3700 { ac_try='test -s conftest$ac_exeext'
3701 { (eval echo "$as_me:3701: \"$ac_try\"") >&5
3704 echo "$as_me:3704: \$? = $ac_status" >&5
3705 (exit $ac_status); }; }; then
3706 if test "$cross_compiling" = yes; then
3707 { { echo "$as_me:3707: error: cannot run test program while cross compiling" >&5
3708 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
3709 { (exit 1); exit 1; }; }
3711 cat >conftest.$ac_ext <<_ACEOF
3712 #line 3712 "configure"
3713 #include "confdefs.h"
3714 #include <${cf_cv_ncurses_header:-curses.h}>
3716 { char *xx = curses_version(); return (xx == 0); }
3718 rm -f conftest$ac_exeext
3719 if { (eval echo "$as_me:3719: \"$ac_link\"") >&5
3720 (eval $ac_link) 2>&5
3722 echo "$as_me:3722: \$? = $ac_status" >&5
3723 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3724 { (eval echo "$as_me:3724: \"$ac_try\"") >&5
3727 echo "$as_me:3727: \$? = $ac_status" >&5
3728 (exit $ac_status); }; }; then
3729 cf_have_ncuconfig=yes
3731 echo "$as_me: program exited with status $ac_status" >&5
3732 echo "$as_me: failed program was:" >&5
3733 cat conftest.$ac_ext >&5
3734 cf_have_ncuconfig=no
3736 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3739 echo "$as_me: failed program was:" >&5
3740 cat conftest.$ac_ext >&5
3741 cf_have_ncuconfig=no
3743 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3745 echo "$as_me:3745: result: $cf_have_ncuconfig" >&5
3746 echo "${ECHO_T}$cf_have_ncuconfig" >&6
3747 if test "$cf_have_ncuconfig" != "yes"
3749 CPPFLAGS="$cf_save_CPPFLAGS"
3750 LIBS="$cf_save_LIBS"
3751 NCURSES_CONFIG_PKG=none
3754 cat >>confdefs.h <<\EOF
3758 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
3762 echo "$as_me:3762: result: no" >&5
3763 echo "${ECHO_T}no" >&6
3764 NCURSES_CONFIG_PKG=none
3767 NCURSES_CONFIG_PKG=none
3770 if test "x$cf_have_ncuconfig" = "xno"; then
3771 echo "Looking for ${cf_ncuconfig_root}-config"
3773 if test -n "$ac_tool_prefix"; then
3774 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
3776 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3777 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3778 echo "$as_me:3778: checking for $ac_word" >&5
3779 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3780 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
3781 echo $ECHO_N "(cached) $ECHO_C" >&6
3783 if test -n "$NCURSES_CONFIG"; then
3784 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
3786 ac_save_IFS=$IFS; IFS=$ac_path_separator
3788 for ac_dir in $ac_dummy; do
3790 test -z "$ac_dir" && ac_dir=.
3791 $as_executable_p "$ac_dir/$ac_word" || continue
3792 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
3793 echo "$as_me:3793: found $ac_dir/$ac_word" >&5
3799 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
3800 if test -n "$NCURSES_CONFIG"; then
3801 echo "$as_me:3801: result: $NCURSES_CONFIG" >&5
3802 echo "${ECHO_T}$NCURSES_CONFIG" >&6
3804 echo "$as_me:3804: result: no" >&5
3805 echo "${ECHO_T}no" >&6
3808 test -n "$NCURSES_CONFIG" && break
3811 if test -z "$NCURSES_CONFIG"; then
3812 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
3813 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
3815 # Extract the first word of "$ac_prog", so it can be a program name with args.
3816 set dummy $ac_prog; ac_word=$2
3817 echo "$as_me:3817: checking for $ac_word" >&5
3818 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3819 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
3820 echo $ECHO_N "(cached) $ECHO_C" >&6
3822 if test -n "$ac_ct_NCURSES_CONFIG"; then
3823 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
3825 ac_save_IFS=$IFS; IFS=$ac_path_separator
3827 for ac_dir in $ac_dummy; do
3829 test -z "$ac_dir" && ac_dir=.
3830 $as_executable_p "$ac_dir/$ac_word" || continue
3831 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
3832 echo "$as_me:3832: found $ac_dir/$ac_word" >&5
3838 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
3839 if test -n "$ac_ct_NCURSES_CONFIG"; then
3840 echo "$as_me:3840: result: $ac_ct_NCURSES_CONFIG" >&5
3841 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
3843 echo "$as_me:3843: result: no" >&5
3844 echo "${ECHO_T}no" >&6
3847 test -n "$ac_ct_NCURSES_CONFIG" && break
3849 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
3851 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
3854 if test "$NCURSES_CONFIG" != none ; then
3856 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
3858 cf_add_libs="`$NCURSES_CONFIG --libs`"
3859 # Filter out duplicates - this happens with badly-designed ".pc" files...
3860 for cf_add_1lib in $LIBS
3862 for cf_add_2lib in $cf_add_libs
3864 if test "x$cf_add_1lib" = "x$cf_add_2lib"
3870 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
3874 # even with config script, some packages use no-override for curses.h
3876 echo "$as_me:3876: checking if we have identified curses headers" >&5
3877 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
3878 if test "${cf_cv_ncurses_header+set}" = set; then
3879 echo $ECHO_N "(cached) $ECHO_C" >&6
3882 cf_cv_ncurses_header=none
3884 ncurses.h ncurses/ncurses.h \
3885 curses.h ncurses/curses.h
3887 cat >conftest.$ac_ext <<_ACEOF
3888 #line 3888 "configure"
3889 #include "confdefs.h"
3890 #include <${cf_header}>
3894 initscr(); tgoto("?", 0,0)
3899 rm -f conftest.$ac_objext
3900 if { (eval echo "$as_me:3900: \"$ac_compile\"") >&5
3901 (eval $ac_compile) 2>&5
3903 echo "$as_me:3903: \$? = $ac_status" >&5
3904 (exit $ac_status); } &&
3905 { ac_try='test -s conftest.$ac_objext'
3906 { (eval echo "$as_me:3906: \"$ac_try\"") >&5
3909 echo "$as_me:3909: \$? = $ac_status" >&5
3910 (exit $ac_status); }; }; then
3911 cf_cv_ncurses_header=$cf_header; break
3913 echo "$as_me: failed program was:" >&5
3914 cat conftest.$ac_ext >&5
3916 rm -f conftest.$ac_objext conftest.$ac_ext
3920 echo "$as_me:3920: result: $cf_cv_ncurses_header" >&5
3921 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
3923 if test "$cf_cv_ncurses_header" = none ; then
3924 { { echo "$as_me:3924: error: No curses header-files found" >&5
3925 echo "$as_me: error: No curses header-files found" >&2;}
3926 { (exit 1); exit 1; }; }
3929 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
3931 for ac_header in $cf_cv_ncurses_header
3933 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3934 echo "$as_me:3934: checking for $ac_header" >&5
3935 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3936 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3937 echo $ECHO_N "(cached) $ECHO_C" >&6
3939 cat >conftest.$ac_ext <<_ACEOF
3940 #line 3940 "configure"
3941 #include "confdefs.h"
3942 #include <$ac_header>
3944 if { (eval echo "$as_me:3944: \"$ac_cpp conftest.$ac_ext\"") >&5
3945 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3947 egrep -v '^ *\+' conftest.er1 >conftest.err
3949 cat conftest.err >&5
3950 echo "$as_me:3950: \$? = $ac_status" >&5
3951 (exit $ac_status); } >/dev/null; then
3952 if test -s conftest.err; then
3953 ac_cpp_err=$ac_c_preproc_warn_flag
3960 if test -z "$ac_cpp_err"; then
3961 eval "$as_ac_Header=yes"
3963 echo "$as_me: failed program was:" >&5
3964 cat conftest.$ac_ext >&5
3965 eval "$as_ac_Header=no"
3967 rm -f conftest.err conftest.$ac_ext
3969 echo "$as_me:3969: result: `eval echo '${'$as_ac_Header'}'`" >&5
3970 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3971 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3972 cat >>confdefs.h <<EOF
3973 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3979 cat >>confdefs.h <<\EOF
3983 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3985 cat >>confdefs.h <<EOF
3986 #define $cf_nculib_ROOT 1
3989 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
3993 cf_ncuhdr_root=ncurses
3995 test -n "$cf_cv_curses_dir" && \
3996 test "$cf_cv_curses_dir" != "no" && { \
3998 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
3999 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4001 while test $cf_add_incdir != /usr/include
4003 if test -d $cf_add_incdir
4006 if test -n "$CFLAGS$CPPFLAGS" ; then
4007 # a loop is needed to ensure we can add subdirs of existing dirs
4008 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4009 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4010 cf_have_incdir=yes; break
4015 if test "$cf_have_incdir" = no ; then
4016 if test "$cf_add_incdir" = /usr/local/include ; then
4017 if test "$GCC" = yes
4019 cf_save_CPPFLAGS=$CPPFLAGS
4020 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4021 cat >conftest.$ac_ext <<_ACEOF
4022 #line 4022 "configure"
4023 #include "confdefs.h"
4033 rm -f conftest.$ac_objext
4034 if { (eval echo "$as_me:4034: \"$ac_compile\"") >&5
4035 (eval $ac_compile) 2>&5
4037 echo "$as_me:4037: \$? = $ac_status" >&5
4038 (exit $ac_status); } &&
4039 { ac_try='test -s conftest.$ac_objext'
4040 { (eval echo "$as_me:4040: \"$ac_try\"") >&5
4043 echo "$as_me:4043: \$? = $ac_status" >&5
4044 (exit $ac_status); }; }; then
4047 echo "$as_me: failed program was:" >&5
4048 cat conftest.$ac_ext >&5
4051 rm -f conftest.$ac_objext conftest.$ac_ext
4052 CPPFLAGS=$cf_save_CPPFLAGS
4057 if test "$cf_have_incdir" = no ; then
4058 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4060 echo "${as_me:-configure}:4060: testing adding $cf_add_incdir to include-path ..." 1>&5
4062 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4064 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4065 test "$cf_top_incdir" = "$cf_add_incdir" && break
4066 cf_add_incdir="$cf_top_incdir"
4077 echo "$as_me:4077: checking for $cf_ncuhdr_root header in include-path" >&5
4078 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4079 if test "${cf_cv_ncurses_h+set}" = set; then
4080 echo $ECHO_N "(cached) $ECHO_C" >&6
4083 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4084 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4085 for cf_header in $cf_header_list
4088 cat >conftest.$ac_ext <<_ACEOF
4089 #line 4089 "configure"
4090 #include "confdefs.h"
4092 #include <$cf_header>
4097 #ifdef NCURSES_VERSION
4099 printf("%s\n", NCURSES_VERSION);
4112 rm -f conftest.$ac_objext
4113 if { (eval echo "$as_me:4113: \"$ac_compile\"") >&5
4114 (eval $ac_compile) 2>&5
4116 echo "$as_me:4116: \$? = $ac_status" >&5
4117 (exit $ac_status); } &&
4118 { ac_try='test -s conftest.$ac_objext'
4119 { (eval echo "$as_me:4119: \"$ac_try\"") >&5
4122 echo "$as_me:4122: \$? = $ac_status" >&5
4123 (exit $ac_status); }; }; then
4124 cf_cv_ncurses_h=$cf_header
4127 echo "$as_me: failed program was:" >&5
4128 cat conftest.$ac_ext >&5
4131 rm -f conftest.$ac_objext conftest.$ac_ext
4133 test "$cf_cv_ncurses_h" != no && break
4137 echo "$as_me:4137: result: $cf_cv_ncurses_h" >&5
4138 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4140 if test "$cf_cv_ncurses_h" != no ; then
4141 cf_cv_ncurses_header=$cf_cv_ncurses_h
4144 echo "$as_me:4144: checking for $cf_ncuhdr_root include-path" >&5
4145 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4146 if test "${cf_cv_ncurses_h2+set}" = set; then
4147 echo $ECHO_N "(cached) $ECHO_C" >&6
4150 test -n "$verbose" && echo
4154 # collect the current set of include-directories from compiler flags
4155 cf_header_path_list=""
4156 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4157 for cf_header_path in $CPPFLAGS $CFLAGS
4159 case $cf_header_path in
4161 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4163 test "x$cf_header_path" != "xNONE" && \
4164 test -d "$cf_header_path" && \
4166 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
4167 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
4168 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4169 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4170 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4171 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"
4174 cf_header_path_list="$cf_header_path_list $cf_search"
4180 # add the variations for the package we are looking for
4184 test "x$prefix" != "xNONE" && \
4185 test -d "$prefix" && \
4187 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
4188 test -d $prefix/include && cf_search="$cf_search $prefix/include"
4189 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4190 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4191 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4192 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4195 for cf_subdir_prefix in \
4204 test "x$cf_subdir_prefix" != "x$prefix" && \
4205 test -d "$cf_subdir_prefix" && \
4206 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
4207 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
4208 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
4209 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
4210 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
4211 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
4212 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"
4217 test "$includedir" != NONE && \
4218 test "$includedir" != "/usr/include" && \
4219 test -d "$includedir" && {
4220 test -d $includedir && cf_search="$cf_search $includedir"
4221 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4224 test "$oldincludedir" != NONE && \
4225 test "$oldincludedir" != "/usr/include" && \
4226 test -d "$oldincludedir" && {
4227 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
4228 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4231 cf_search="$cf_search $cf_header_path_list"
4233 test -n "$verbose" && echo search path $cf_search
4234 cf_save2_CPPFLAGS="$CPPFLAGS"
4235 for cf_incdir in $cf_search
4238 if test -n "$cf_incdir" ; then
4239 for cf_add_incdir in $cf_incdir
4241 while test $cf_add_incdir != /usr/include
4243 if test -d $cf_add_incdir
4246 if test -n "$CFLAGS$CPPFLAGS" ; then
4247 # a loop is needed to ensure we can add subdirs of existing dirs
4248 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4249 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4250 cf_have_incdir=yes; break
4255 if test "$cf_have_incdir" = no ; then
4256 if test "$cf_add_incdir" = /usr/local/include ; then
4257 if test "$GCC" = yes
4259 cf_save_CPPFLAGS=$CPPFLAGS
4260 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4261 cat >conftest.$ac_ext <<_ACEOF
4262 #line 4262 "configure"
4263 #include "confdefs.h"
4273 rm -f conftest.$ac_objext
4274 if { (eval echo "$as_me:4274: \"$ac_compile\"") >&5
4275 (eval $ac_compile) 2>&5
4277 echo "$as_me:4277: \$? = $ac_status" >&5
4278 (exit $ac_status); } &&
4279 { ac_try='test -s conftest.$ac_objext'
4280 { (eval echo "$as_me:4280: \"$ac_try\"") >&5
4283 echo "$as_me:4283: \$? = $ac_status" >&5
4284 (exit $ac_status); }; }; then
4287 echo "$as_me: failed program was:" >&5
4288 cat conftest.$ac_ext >&5
4291 rm -f conftest.$ac_objext conftest.$ac_ext
4292 CPPFLAGS=$cf_save_CPPFLAGS
4297 if test "$cf_have_incdir" = no ; then
4298 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4300 echo "${as_me:-configure}:4300: testing adding $cf_add_incdir to include-path ..." 1>&5
4302 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4304 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4305 test "$cf_top_incdir" = "$cf_add_incdir" && break
4306 cf_add_incdir="$cf_top_incdir"
4320 cat >conftest.$ac_ext <<_ACEOF
4321 #line 4321 "configure"
4322 #include "confdefs.h"
4324 #include <$cf_header>
4329 #ifdef NCURSES_VERSION
4331 printf("%s\n", NCURSES_VERSION);
4344 rm -f conftest.$ac_objext
4345 if { (eval echo "$as_me:4345: \"$ac_compile\"") >&5
4346 (eval $ac_compile) 2>&5
4348 echo "$as_me:4348: \$? = $ac_status" >&5
4349 (exit $ac_status); } &&
4350 { ac_try='test -s conftest.$ac_objext'
4351 { (eval echo "$as_me:4351: \"$ac_try\"") >&5
4354 echo "$as_me:4354: \$? = $ac_status" >&5
4355 (exit $ac_status); }; }; then
4356 cf_cv_ncurses_h2=$cf_header
4359 echo "$as_me: failed program was:" >&5
4360 cat conftest.$ac_ext >&5
4363 rm -f conftest.$ac_objext conftest.$ac_ext
4365 if test "$cf_cv_ncurses_h2" != no ; then
4366 cf_cv_ncurses_h2=$cf_incdir/$cf_header
4367 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
4370 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
4372 CPPFLAGS="$cf_save2_CPPFLAGS"
4373 test "$cf_cv_ncurses_h2" != no && break
4375 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:4375: error: not found" >&5
4376 echo "$as_me: error: not found" >&2;}
4377 { (exit 1); exit 1; }; }
4380 echo "$as_me:4380: result: $cf_cv_ncurses_h2" >&5
4381 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
4383 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
4384 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
4385 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
4386 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
4389 if test -n "$cf_1st_incdir" ; then
4390 for cf_add_incdir in $cf_1st_incdir
4392 while test $cf_add_incdir != /usr/include
4394 if test -d $cf_add_incdir
4397 if test -n "$CFLAGS$CPPFLAGS" ; then
4398 # a loop is needed to ensure we can add subdirs of existing dirs
4399 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4400 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4401 cf_have_incdir=yes; break
4406 if test "$cf_have_incdir" = no ; then
4407 if test "$cf_add_incdir" = /usr/local/include ; then
4408 if test "$GCC" = yes
4410 cf_save_CPPFLAGS=$CPPFLAGS
4411 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4412 cat >conftest.$ac_ext <<_ACEOF
4413 #line 4413 "configure"
4414 #include "confdefs.h"
4424 rm -f conftest.$ac_objext
4425 if { (eval echo "$as_me:4425: \"$ac_compile\"") >&5
4426 (eval $ac_compile) 2>&5
4428 echo "$as_me:4428: \$? = $ac_status" >&5
4429 (exit $ac_status); } &&
4430 { ac_try='test -s conftest.$ac_objext'
4431 { (eval echo "$as_me:4431: \"$ac_try\"") >&5
4434 echo "$as_me:4434: \$? = $ac_status" >&5
4435 (exit $ac_status); }; }; then
4438 echo "$as_me: failed program was:" >&5
4439 cat conftest.$ac_ext >&5
4442 rm -f conftest.$ac_objext conftest.$ac_ext
4443 CPPFLAGS=$cf_save_CPPFLAGS
4448 if test "$cf_have_incdir" = no ; then
4449 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4451 echo "${as_me:-configure}:4451: testing adding $cf_add_incdir to include-path ..." 1>&5
4453 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4455 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4456 test "$cf_top_incdir" = "$cf_add_incdir" && break
4457 cf_add_incdir="$cf_top_incdir"
4468 # Set definitions to allow ifdef'ing for ncurses.h
4470 case $cf_cv_ncurses_header in
4473 cat >>confdefs.h <<\EOF
4474 #define HAVE_NCURSES_H 1
4480 case $cf_cv_ncurses_header in
4481 (ncurses/curses.h|ncurses/ncurses.h)
4483 cat >>confdefs.h <<\EOF
4484 #define HAVE_NCURSES_NCURSES_H 1
4488 (ncursesw/curses.h|ncursesw/ncurses.h)
4490 cat >>confdefs.h <<\EOF
4491 #define HAVE_NCURSESW_NCURSES_H 1
4497 echo "$as_me:4497: checking for terminfo header" >&5
4498 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4499 if test "${cf_cv_term_header+set}" = set; then
4500 echo $ECHO_N "(cached) $ECHO_C" >&6
4503 case ${cf_cv_ncurses_header} in
4504 (*/ncurses.h|*/ncursesw.h)
4505 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4508 cf_term_header=term.h
4512 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4514 cat >conftest.$ac_ext <<_ACEOF
4515 #line 4515 "configure"
4516 #include "confdefs.h"
4518 #include <${cf_cv_ncurses_header:-curses.h}>
4524 int x = auto_left_margin
4529 rm -f conftest.$ac_objext
4530 if { (eval echo "$as_me:4530: \"$ac_compile\"") >&5
4531 (eval $ac_compile) 2>&5
4533 echo "$as_me:4533: \$? = $ac_status" >&5
4534 (exit $ac_status); } &&
4535 { ac_try='test -s conftest.$ac_objext'
4536 { (eval echo "$as_me:4536: \"$ac_try\"") >&5
4539 echo "$as_me:4539: \$? = $ac_status" >&5
4540 (exit $ac_status); }; }; then
4542 cf_cv_term_header="$cf_test"
4544 echo "$as_me: failed program was:" >&5
4545 cat conftest.$ac_ext >&5
4547 cf_cv_term_header=unknown
4550 rm -f conftest.$ac_objext conftest.$ac_ext
4551 test "$cf_cv_term_header" != unknown && break
4555 echo "$as_me:4555: result: $cf_cv_term_header" >&5
4556 echo "${ECHO_T}$cf_cv_term_header" >&6
4558 # Set definitions to allow ifdef'ing to accommodate subdirectories
4560 case $cf_cv_term_header in
4563 cat >>confdefs.h <<\EOF
4564 #define HAVE_TERM_H 1
4570 case $cf_cv_term_header in
4573 cat >>confdefs.h <<\EOF
4574 #define HAVE_NCURSES_TERM_H 1
4580 cat >>confdefs.h <<\EOF
4581 #define HAVE_NCURSESW_TERM_H 1
4587 # some applications need this, but should check for NCURSES_VERSION
4589 cat >>confdefs.h <<\EOF
4593 echo "$as_me:4593: checking for ncurses version" >&5
4594 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
4595 if test "${cf_cv_ncurses_version+set}" = set; then
4596 echo $ECHO_N "(cached) $ECHO_C" >&6
4599 cf_cv_ncurses_version=no
4602 if test "$cross_compiling" = yes; then
4604 # This will not work if the preprocessor splits the line after the
4605 # Autoconf token. The 'unproto' program does that.
4606 cat > conftest.$ac_ext <<EOF
4607 #include <${cf_cv_ncurses_header:-curses.h}>
4609 #ifdef NCURSES_VERSION
4610 Autoconf NCURSES_VERSION
4618 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4619 { (eval echo "$as_me:4619: \"$cf_try\"") >&5
4622 echo "$as_me:4622: \$? = $ac_status" >&5
4623 (exit $ac_status); }
4624 if test -f conftest.out ; then
4625 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4626 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4631 cat >conftest.$ac_ext <<_ACEOF
4632 #line 4632 "configure"
4633 #include "confdefs.h"
4635 #include <${cf_cv_ncurses_header:-curses.h}>
4639 FILE *fp = fopen("$cf_tempfile", "w");
4640 #ifdef NCURSES_VERSION
4641 # ifdef NCURSES_VERSION_PATCH
4642 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
4644 fprintf(fp, "%s\n", NCURSES_VERSION);
4648 fprintf(fp, "old\n");
4653 ${cf_cv_main_return:-return}(0);
4656 rm -f conftest$ac_exeext
4657 if { (eval echo "$as_me:4657: \"$ac_link\"") >&5
4658 (eval $ac_link) 2>&5
4660 echo "$as_me:4660: \$? = $ac_status" >&5
4661 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4662 { (eval echo "$as_me:4662: \"$ac_try\"") >&5
4665 echo "$as_me:4665: \$? = $ac_status" >&5
4666 (exit $ac_status); }; }; then
4668 cf_cv_ncurses_version=`cat $cf_tempfile`
4670 echo "$as_me: program exited with status $ac_status" >&5
4671 echo "$as_me: failed program was:" >&5
4672 cat conftest.$ac_ext >&5
4674 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4679 echo "$as_me:4679: result: $cf_cv_ncurses_version" >&5
4680 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
4681 test "$cf_cv_ncurses_version" = no ||
4682 cat >>confdefs.h <<\EOF
4686 cf_nculib_root=ncurses
4687 # This works, except for the special case where we find gpm, but
4688 # ncurses is in a nonstandard location via $LIBS, and we really want
4691 cf_ncurses_SAVE="$LIBS"
4692 echo "$as_me:4692: checking for Gpm_Open in -lgpm" >&5
4693 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4694 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4695 echo $ECHO_N "(cached) $ECHO_C" >&6
4697 ac_check_lib_save_LIBS=$LIBS
4699 cat >conftest.$ac_ext <<_ACEOF
4700 #line 4700 "configure"
4701 #include "confdefs.h"
4703 /* Override any gcc2 internal prototype to avoid an error. */
4707 /* We use char because int might match the return type of a gcc2
4708 builtin and then its argument prototype would still apply. */
4718 rm -f conftest.$ac_objext conftest$ac_exeext
4719 if { (eval echo "$as_me:4719: \"$ac_link\"") >&5
4720 (eval $ac_link) 2>&5
4722 echo "$as_me:4722: \$? = $ac_status" >&5
4723 (exit $ac_status); } &&
4724 { ac_try='test -s conftest$ac_exeext'
4725 { (eval echo "$as_me:4725: \"$ac_try\"") >&5
4728 echo "$as_me:4728: \$? = $ac_status" >&5
4729 (exit $ac_status); }; }; then
4730 ac_cv_lib_gpm_Gpm_Open=yes
4732 echo "$as_me: failed program was:" >&5
4733 cat conftest.$ac_ext >&5
4734 ac_cv_lib_gpm_Gpm_Open=no
4736 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4737 LIBS=$ac_check_lib_save_LIBS
4739 echo "$as_me:4739: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4740 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4741 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4742 echo "$as_me:4742: checking for initscr in -lgpm" >&5
4743 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
4744 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
4745 echo $ECHO_N "(cached) $ECHO_C" >&6
4747 ac_check_lib_save_LIBS=$LIBS
4749 cat >conftest.$ac_ext <<_ACEOF
4750 #line 4750 "configure"
4751 #include "confdefs.h"
4753 /* Override any gcc2 internal prototype to avoid an error. */
4757 /* We use char because int might match the return type of a gcc2
4758 builtin and then its argument prototype would still apply. */
4768 rm -f conftest.$ac_objext conftest$ac_exeext
4769 if { (eval echo "$as_me:4769: \"$ac_link\"") >&5
4770 (eval $ac_link) 2>&5
4772 echo "$as_me:4772: \$? = $ac_status" >&5
4773 (exit $ac_status); } &&
4774 { ac_try='test -s conftest$ac_exeext'
4775 { (eval echo "$as_me:4775: \"$ac_try\"") >&5
4778 echo "$as_me:4778: \$? = $ac_status" >&5
4779 (exit $ac_status); }; }; then
4780 ac_cv_lib_gpm_initscr=yes
4782 echo "$as_me: failed program was:" >&5
4783 cat conftest.$ac_ext >&5
4784 ac_cv_lib_gpm_initscr=no
4786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4787 LIBS=$ac_check_lib_save_LIBS
4789 echo "$as_me:4789: result: $ac_cv_lib_gpm_initscr" >&5
4790 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
4791 if test $ac_cv_lib_gpm_initscr = yes; then
4792 LIBS="$cf_ncurses_SAVE"
4794 cf_ncurses_LIBS="-lgpm"
4801 # This is only necessary if you are linking against an obsolete
4802 # version of ncurses (but it should do no harm, since it's static).
4803 if test "$cf_nculib_root" = ncurses ; then
4804 echo "$as_me:4804: checking for tgoto in -lmytinfo" >&5
4805 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
4806 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
4807 echo $ECHO_N "(cached) $ECHO_C" >&6
4809 ac_check_lib_save_LIBS=$LIBS
4810 LIBS="-lmytinfo $LIBS"
4811 cat >conftest.$ac_ext <<_ACEOF
4812 #line 4812 "configure"
4813 #include "confdefs.h"
4815 /* Override any gcc2 internal prototype to avoid an error. */
4819 /* We use char because int might match the return type of a gcc2
4820 builtin and then its argument prototype would still apply. */
4830 rm -f conftest.$ac_objext conftest$ac_exeext
4831 if { (eval echo "$as_me:4831: \"$ac_link\"") >&5
4832 (eval $ac_link) 2>&5
4834 echo "$as_me:4834: \$? = $ac_status" >&5
4835 (exit $ac_status); } &&
4836 { ac_try='test -s conftest$ac_exeext'
4837 { (eval echo "$as_me:4837: \"$ac_try\"") >&5
4840 echo "$as_me:4840: \$? = $ac_status" >&5
4841 (exit $ac_status); }; }; then
4842 ac_cv_lib_mytinfo_tgoto=yes
4844 echo "$as_me: failed program was:" >&5
4845 cat conftest.$ac_ext >&5
4846 ac_cv_lib_mytinfo_tgoto=no
4848 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4849 LIBS=$ac_check_lib_save_LIBS
4851 echo "$as_me:4851: result: $ac_cv_lib_mytinfo_tgoto" >&5
4852 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
4853 if test $ac_cv_lib_mytinfo_tgoto = yes; then
4854 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
4861 cf_add_libs="$cf_ncurses_LIBS"
4862 # Filter out duplicates - this happens with badly-designed ".pc" files...
4863 for cf_add_1lib in $LIBS
4865 for cf_add_2lib in $cf_add_libs
4867 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4873 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4877 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4880 cf_add_libs="-l$cf_nculib_root"
4881 # Filter out duplicates - this happens with badly-designed ".pc" files...
4882 for cf_add_1lib in $LIBS
4884 for cf_add_2lib in $cf_add_libs
4886 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4892 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4898 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
4900 echo "$as_me:4900: checking for initscr" >&5
4901 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
4902 if test "${ac_cv_func_initscr+set}" = set; then
4903 echo $ECHO_N "(cached) $ECHO_C" >&6
4905 cat >conftest.$ac_ext <<_ACEOF
4906 #line 4906 "configure"
4907 #include "confdefs.h"
4908 /* System header to define __stub macros and hopefully few prototypes,
4909 which can conflict with char initscr (); below. */
4911 /* Override any gcc2 internal prototype to avoid an error. */
4915 /* We use char because int might match the return type of a gcc2
4916 builtin and then its argument prototype would still apply. */
4923 /* The GNU C library defines this for functions which it implements
4924 to always fail with ENOSYS. Some functions are actually named
4925 something starting with __ and the normal name is an alias. */
4926 #if defined (__stub_initscr) || defined (__stub___initscr)
4929 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
4936 rm -f conftest.$ac_objext conftest$ac_exeext
4937 if { (eval echo "$as_me:4937: \"$ac_link\"") >&5
4938 (eval $ac_link) 2>&5
4940 echo "$as_me:4940: \$? = $ac_status" >&5
4941 (exit $ac_status); } &&
4942 { ac_try='test -s conftest$ac_exeext'
4943 { (eval echo "$as_me:4943: \"$ac_try\"") >&5
4946 echo "$as_me:4946: \$? = $ac_status" >&5
4947 (exit $ac_status); }; }; then
4948 ac_cv_func_initscr=yes
4950 echo "$as_me: failed program was:" >&5
4951 cat conftest.$ac_ext >&5
4952 ac_cv_func_initscr=no
4954 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4956 echo "$as_me:4956: result: $ac_cv_func_initscr" >&5
4957 echo "${ECHO_T}$ac_cv_func_initscr" >&6
4958 if test $ac_cv_func_initscr = yes; then
4959 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4962 cf_save_LIBS="$LIBS"
4963 echo "$as_me:4963: checking for initscr in -l$cf_nculib_root" >&5
4964 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
4965 LIBS="-l$cf_nculib_root $LIBS"
4966 cat >conftest.$ac_ext <<_ACEOF
4967 #line 4967 "configure"
4968 #include "confdefs.h"
4969 #include <${cf_cv_ncurses_header:-curses.h}>
4978 rm -f conftest.$ac_objext conftest$ac_exeext
4979 if { (eval echo "$as_me:4979: \"$ac_link\"") >&5
4980 (eval $ac_link) 2>&5
4982 echo "$as_me:4982: \$? = $ac_status" >&5
4983 (exit $ac_status); } &&
4984 { ac_try='test -s conftest$ac_exeext'
4985 { (eval echo "$as_me:4985: \"$ac_try\"") >&5
4988 echo "$as_me:4988: \$? = $ac_status" >&5
4989 (exit $ac_status); }; }; then
4990 echo "$as_me:4990: result: yes" >&5
4991 echo "${ECHO_T}yes" >&6
4992 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4995 echo "$as_me: failed program was:" >&5
4996 cat conftest.$ac_ext >&5
4997 echo "$as_me:4997: result: no" >&5
4998 echo "${ECHO_T}no" >&6
5001 cf_library_path_list=""
5002 if test -n "${LDFLAGS}${LIBS}" ; then
5003 for cf_library_path in $LDFLAGS $LIBS
5005 case $cf_library_path in
5007 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5009 test "x$cf_library_path" != "xNONE" && \
5010 test -d "$cf_library_path" && \
5012 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
5013 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
5014 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5015 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5016 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5017 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"
5020 cf_library_path_list="$cf_library_path_list $cf_search"
5028 test "x$prefix" != "xNONE" && \
5029 test -d "$prefix" && \
5031 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5032 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5033 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5034 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5035 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5036 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5039 for cf_subdir_prefix in \
5048 test "x$cf_subdir_prefix" != "x$prefix" && \
5049 test -d "$cf_subdir_prefix" && \
5050 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5051 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
5052 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
5053 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
5054 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
5055 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
5056 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"
5061 cf_search="$cf_library_path_list $cf_search"
5063 for cf_libdir in $cf_search
5065 echo "$as_me:5065: checking for -l$cf_nculib_root in $cf_libdir" >&5
5066 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5067 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5068 cat >conftest.$ac_ext <<_ACEOF
5069 #line 5069 "configure"
5070 #include "confdefs.h"
5071 #include <${cf_cv_ncurses_header:-curses.h}>
5080 rm -f conftest.$ac_objext conftest$ac_exeext
5081 if { (eval echo "$as_me:5081: \"$ac_link\"") >&5
5082 (eval $ac_link) 2>&5
5084 echo "$as_me:5084: \$? = $ac_status" >&5
5085 (exit $ac_status); } &&
5086 { ac_try='test -s conftest$ac_exeext'
5087 { (eval echo "$as_me:5087: \"$ac_try\"") >&5
5090 echo "$as_me:5090: \$? = $ac_status" >&5
5091 (exit $ac_status); }; }; then
5092 echo "$as_me:5092: result: yes" >&5
5093 echo "${ECHO_T}yes" >&6
5094 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5097 echo "$as_me: failed program was:" >&5
5098 cat conftest.$ac_ext >&5
5099 echo "$as_me:5099: result: no" >&5
5100 echo "${ECHO_T}no" >&6
5101 LIBS="$cf_save_LIBS"
5103 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5107 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5111 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5113 if test $cf_found_library = no ; then
5114 { { echo "$as_me:5114: error: Cannot link $cf_nculib_root library" >&5
5115 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5116 { (exit 1); exit 1; }; }
5121 if test -n "$cf_ncurses_LIBS" ; then
5122 echo "$as_me:5122: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5123 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5124 cf_ncurses_SAVE="$LIBS"
5125 for p in $cf_ncurses_LIBS ; do
5126 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5127 if test "$q" != "$LIBS" ; then
5131 cat >conftest.$ac_ext <<_ACEOF
5132 #line 5132 "configure"
5133 #include "confdefs.h"
5134 #include <${cf_cv_ncurses_header:-curses.h}>
5138 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5143 rm -f conftest.$ac_objext conftest$ac_exeext
5144 if { (eval echo "$as_me:5144: \"$ac_link\"") >&5
5145 (eval $ac_link) 2>&5
5147 echo "$as_me:5147: \$? = $ac_status" >&5
5148 (exit $ac_status); } &&
5149 { ac_try='test -s conftest$ac_exeext'
5150 { (eval echo "$as_me:5150: \"$ac_try\"") >&5
5153 echo "$as_me:5153: \$? = $ac_status" >&5
5154 (exit $ac_status); }; }; then
5155 echo "$as_me:5155: result: yes" >&5
5156 echo "${ECHO_T}yes" >&6
5158 echo "$as_me: failed program was:" >&5
5159 cat conftest.$ac_ext >&5
5160 echo "$as_me:5160: result: no" >&5
5161 echo "${ECHO_T}no" >&6
5162 LIBS="$cf_ncurses_SAVE"
5164 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5167 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5169 cat >>confdefs.h <<EOF
5170 #define $cf_nculib_ROOT 1
5178 echo "$as_me:5178: checking if you want wide-character code" >&5
5179 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
5181 # Check whether --enable-widec or --disable-widec was given.
5182 if test "${enable_widec+set}" = set; then
5183 enableval="$enable_widec"
5184 with_widec=$enableval
5188 echo "$as_me:5188: result: $with_widec" >&5
5189 echo "${ECHO_T}$with_widec" >&6
5190 if test "$with_widec" = yes ; then
5192 echo "$as_me:5192: checking for multibyte character support" >&5
5193 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
5194 if test "${cf_cv_utf8_lib+set}" = set; then
5195 echo $ECHO_N "(cached) $ECHO_C" >&6
5198 cf_save_LIBS="$LIBS"
5199 cat >conftest.$ac_ext <<_ACEOF
5200 #line 5200 "configure"
5201 #include "confdefs.h"
5212 rm -f conftest.$ac_objext conftest$ac_exeext
5213 if { (eval echo "$as_me:5213: \"$ac_link\"") >&5
5214 (eval $ac_link) 2>&5
5216 echo "$as_me:5216: \$? = $ac_status" >&5
5217 (exit $ac_status); } &&
5218 { ac_try='test -s conftest$ac_exeext'
5219 { (eval echo "$as_me:5219: \"$ac_try\"") >&5
5222 echo "$as_me:5222: \$? = $ac_status" >&5
5223 (exit $ac_status); }; }; then
5226 echo "$as_me: failed program was:" >&5
5227 cat conftest.$ac_ext >&5
5229 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
5230 # will be set on completion of the AC_TRY_LINK below.
5231 cf_cv_header_path_utf8=
5232 cf_cv_library_path_utf8=
5234 echo "${as_me:-configure}:5234: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
5236 cf_save_LIBS="$LIBS"
5238 cat >conftest.$ac_ext <<_ACEOF
5239 #line 5239 "configure"
5240 #include "confdefs.h"
5242 #include <libutf8.h>
5251 rm -f conftest.$ac_objext conftest$ac_exeext
5252 if { (eval echo "$as_me:5252: \"$ac_link\"") >&5
5253 (eval $ac_link) 2>&5
5255 echo "$as_me:5255: \$? = $ac_status" >&5
5256 (exit $ac_status); } &&
5257 { ac_try='test -s conftest$ac_exeext'
5258 { (eval echo "$as_me:5258: \"$ac_try\"") >&5
5261 echo "$as_me:5261: \$? = $ac_status" >&5
5262 (exit $ac_status); }; }; then
5264 cf_cv_find_linkage_utf8=yes
5265 cf_cv_header_path_utf8=/usr/include
5266 cf_cv_library_path_utf8=/usr/lib
5269 echo "$as_me: failed program was:" >&5
5270 cat conftest.$ac_ext >&5
5272 LIBS="-lutf8 $cf_save_LIBS"
5274 cat >conftest.$ac_ext <<_ACEOF
5275 #line 5275 "configure"
5276 #include "confdefs.h"
5278 #include <libutf8.h>
5287 rm -f conftest.$ac_objext conftest$ac_exeext
5288 if { (eval echo "$as_me:5288: \"$ac_link\"") >&5
5289 (eval $ac_link) 2>&5
5291 echo "$as_me:5291: \$? = $ac_status" >&5
5292 (exit $ac_status); } &&
5293 { ac_try='test -s conftest$ac_exeext'
5294 { (eval echo "$as_me:5294: \"$ac_try\"") >&5
5297 echo "$as_me:5297: \$? = $ac_status" >&5
5298 (exit $ac_status); }; }; then
5300 cf_cv_find_linkage_utf8=yes
5301 cf_cv_header_path_utf8=/usr/include
5302 cf_cv_library_path_utf8=/usr/lib
5303 cf_cv_library_file_utf8="-lutf8"
5306 echo "$as_me: failed program was:" >&5
5307 cat conftest.$ac_ext >&5
5309 cf_cv_find_linkage_utf8=no
5310 LIBS="$cf_save_LIBS"
5312 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
5314 echo "${as_me:-configure}:5314: testing find linkage for utf8 library ..." 1>&5
5316 echo "${as_me:-configure}:5316: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
5318 cf_save_CPPFLAGS="$CPPFLAGS"
5319 cf_test_CPPFLAGS="$CPPFLAGS"
5323 # collect the current set of include-directories from compiler flags
5324 cf_header_path_list=""
5325 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5326 for cf_header_path in $CPPFLAGS $CFLAGS
5328 case $cf_header_path in
5330 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5332 test "x$cf_header_path" != "xNONE" && \
5333 test -d "$cf_header_path" && \
5335 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5336 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5337 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
5338 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
5339 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
5340 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
5343 cf_header_path_list="$cf_header_path_list $cf_search"
5349 # add the variations for the package we are looking for
5353 test "x$prefix" != "xNONE" && \
5354 test -d "$prefix" && \
5356 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5357 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5358 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
5359 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
5360 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
5361 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
5364 for cf_subdir_prefix in \
5373 test "x$cf_subdir_prefix" != "x$prefix" && \
5374 test -d "$cf_subdir_prefix" && \
5375 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5376 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5377 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
5378 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
5379 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
5380 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
5381 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
5386 test "$includedir" != NONE && \
5387 test "$includedir" != "/usr/include" && \
5388 test -d "$includedir" && {
5389 test -d $includedir && cf_search="$cf_search $includedir"
5390 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
5393 test "$oldincludedir" != NONE && \
5394 test "$oldincludedir" != "/usr/include" && \
5395 test -d "$oldincludedir" && {
5396 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5397 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
5400 cf_search="$cf_search $cf_header_path_list"
5402 for cf_cv_header_path_utf8 in $cf_search
5404 if test -d $cf_cv_header_path_utf8 ; then
5405 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
5407 echo "${as_me:-configure}:5407: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
5409 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
5410 cat >conftest.$ac_ext <<_ACEOF
5411 #line 5411 "configure"
5412 #include "confdefs.h"
5414 #include <libutf8.h>
5423 rm -f conftest.$ac_objext
5424 if { (eval echo "$as_me:5424: \"$ac_compile\"") >&5
5425 (eval $ac_compile) 2>&5
5427 echo "$as_me:5427: \$? = $ac_status" >&5
5428 (exit $ac_status); } &&
5429 { ac_try='test -s conftest.$ac_objext'
5430 { (eval echo "$as_me:5430: \"$ac_try\"") >&5
5433 echo "$as_me:5433: \$? = $ac_status" >&5
5434 (exit $ac_status); }; }; then
5436 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
5438 echo "${as_me:-configure}:5438: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
5440 cf_cv_find_linkage_utf8=maybe
5441 cf_test_CPPFLAGS="$CPPFLAGS"
5444 echo "$as_me: failed program was:" >&5
5445 cat conftest.$ac_ext >&5
5447 CPPFLAGS="$cf_save_CPPFLAGS"
5450 rm -f conftest.$ac_objext conftest.$ac_ext
5454 if test "$cf_cv_find_linkage_utf8" = maybe ; then
5456 echo "${as_me:-configure}:5456: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
5458 cf_save_LIBS="$LIBS"
5459 cf_save_LDFLAGS="$LDFLAGS"
5461 if test "$cf_cv_find_linkage_utf8" != yes ; then
5464 cf_library_path_list=""
5465 if test -n "${LDFLAGS}${LIBS}" ; then
5466 for cf_library_path in $LDFLAGS $LIBS
5468 case $cf_library_path in
5470 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5472 test "x$cf_library_path" != "xNONE" && \
5473 test -d "$cf_library_path" && \
5475 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
5476 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
5477 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
5478 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
5479 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
5480 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
5483 cf_library_path_list="$cf_library_path_list $cf_search"
5491 test "x$prefix" != "xNONE" && \
5492 test -d "$prefix" && \
5494 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5495 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5496 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
5497 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
5498 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
5499 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
5502 for cf_subdir_prefix in \
5511 test "x$cf_subdir_prefix" != "x$prefix" && \
5512 test -d "$cf_subdir_prefix" && \
5513 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5514 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
5515 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
5516 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
5517 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
5518 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
5519 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
5524 cf_search="$cf_library_path_list $cf_search"
5526 for cf_cv_library_path_utf8 in $cf_search
5528 if test -d $cf_cv_library_path_utf8 ; then
5529 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
5531 echo "${as_me:-configure}:5531: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
5533 CPPFLAGS="$cf_test_CPPFLAGS"
5534 LIBS="-lutf8 $cf_save_LIBS"
5535 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
5536 cat >conftest.$ac_ext <<_ACEOF
5537 #line 5537 "configure"
5538 #include "confdefs.h"
5540 #include <libutf8.h>
5549 rm -f conftest.$ac_objext conftest$ac_exeext
5550 if { (eval echo "$as_me:5550: \"$ac_link\"") >&5
5551 (eval $ac_link) 2>&5
5553 echo "$as_me:5553: \$? = $ac_status" >&5
5554 (exit $ac_status); } &&
5555 { ac_try='test -s conftest$ac_exeext'
5556 { (eval echo "$as_me:5556: \"$ac_try\"") >&5
5559 echo "$as_me:5559: \$? = $ac_status" >&5
5560 (exit $ac_status); }; }; then
5562 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
5564 echo "${as_me:-configure}:5564: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
5566 cf_cv_find_linkage_utf8=yes
5567 cf_cv_library_file_utf8="-lutf8"
5570 echo "$as_me: failed program was:" >&5
5571 cat conftest.$ac_ext >&5
5573 CPPFLAGS="$cf_save_CPPFLAGS"
5574 LIBS="$cf_save_LIBS"
5575 LDFLAGS="$cf_save_LDFLAGS"
5578 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5581 CPPFLAGS="$cf_save_CPPFLAGS"
5582 LDFLAGS="$cf_save_LDFLAGS"
5586 cf_cv_find_linkage_utf8=no
5590 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5593 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5595 LIBS="$cf_save_LIBS"
5597 if test "$cf_cv_find_linkage_utf8" = yes ; then
5598 cf_cv_utf8_lib=add-on
5604 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5606 echo "$as_me:5606: result: $cf_cv_utf8_lib" >&5
5607 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
5609 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
5611 if test "$cf_cv_utf8_lib" = "add-on" ; then
5613 cat >>confdefs.h <<\EOF
5614 #define HAVE_LIBUTF8_H 1
5617 if test -n "$cf_cv_header_path_utf8" ; then
5618 for cf_add_incdir in $cf_cv_header_path_utf8
5620 while test $cf_add_incdir != /usr/include
5622 if test -d $cf_add_incdir
5625 if test -n "$CFLAGS$CPPFLAGS" ; then
5626 # a loop is needed to ensure we can add subdirs of existing dirs
5627 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5628 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5629 cf_have_incdir=yes; break
5634 if test "$cf_have_incdir" = no ; then
5635 if test "$cf_add_incdir" = /usr/local/include ; then
5636 if test "$GCC" = yes
5638 cf_save_CPPFLAGS=$CPPFLAGS
5639 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5640 cat >conftest.$ac_ext <<_ACEOF
5641 #line 5641 "configure"
5642 #include "confdefs.h"
5652 rm -f conftest.$ac_objext
5653 if { (eval echo "$as_me:5653: \"$ac_compile\"") >&5
5654 (eval $ac_compile) 2>&5
5656 echo "$as_me:5656: \$? = $ac_status" >&5
5657 (exit $ac_status); } &&
5658 { ac_try='test -s conftest.$ac_objext'
5659 { (eval echo "$as_me:5659: \"$ac_try\"") >&5
5662 echo "$as_me:5662: \$? = $ac_status" >&5
5663 (exit $ac_status); }; }; then
5666 echo "$as_me: failed program was:" >&5
5667 cat conftest.$ac_ext >&5
5670 rm -f conftest.$ac_objext conftest.$ac_ext
5671 CPPFLAGS=$cf_save_CPPFLAGS
5676 if test "$cf_have_incdir" = no ; then
5677 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5679 echo "${as_me:-configure}:5679: testing adding $cf_add_incdir to include-path ..." 1>&5
5681 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5683 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5684 test "$cf_top_incdir" = "$cf_add_incdir" && break
5685 cf_add_incdir="$cf_top_incdir"
5694 if test -n "$cf_cv_library_path_utf8" ; then
5695 for cf_add_libdir in $cf_cv_library_path_utf8
5697 if test $cf_add_libdir = /usr/lib ; then
5699 elif test -d $cf_add_libdir
5702 if test -n "$LDFLAGS$LIBS" ; then
5703 # a loop is needed to ensure we can add subdirs of existing dirs
5704 for cf_test_libdir in $LDFLAGS $LIBS ; do
5705 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5706 cf_have_libdir=yes; break
5710 if test "$cf_have_libdir" = no ; then
5711 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5713 echo "${as_me:-configure}:5713: testing adding $cf_add_libdir to library-path ..." 1>&5
5715 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5721 cf_add_libs="$cf_cv_library_file_utf8"
5722 # Filter out duplicates - this happens with badly-designed ".pc" files...
5723 for cf_add_1lib in $LIBS
5725 for cf_add_2lib in $cf_add_libs
5727 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5733 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5739 cf_ncuconfig_root=ncursesw
5740 cf_have_ncuconfig=no
5742 if test "x$PKG_CONFIG" != xnone; then
5743 echo "$as_me:5743: checking pkg-config for $cf_ncuconfig_root" >&5
5744 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
5745 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
5746 echo "$as_me:5746: result: yes" >&5
5747 echo "${ECHO_T}yes" >&6
5749 echo "$as_me:5749: checking if the $cf_ncuconfig_root package files work" >&5
5750 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
5751 cf_have_ncuconfig=unknown
5753 cf_save_CPPFLAGS="$CPPFLAGS"
5754 cf_save_LIBS="$LIBS"
5756 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
5758 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
5759 # Filter out duplicates - this happens with badly-designed ".pc" files...
5760 for cf_add_1lib in $LIBS
5762 for cf_add_2lib in $cf_add_libs
5764 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5770 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5774 cat >conftest.$ac_ext <<_ACEOF
5775 #line 5775 "configure"
5776 #include "confdefs.h"
5777 #include <${cf_cv_ncurses_header:-curses.h}>
5781 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5786 rm -f conftest.$ac_objext conftest$ac_exeext
5787 if { (eval echo "$as_me:5787: \"$ac_link\"") >&5
5788 (eval $ac_link) 2>&5
5790 echo "$as_me:5790: \$? = $ac_status" >&5
5791 (exit $ac_status); } &&
5792 { ac_try='test -s conftest$ac_exeext'
5793 { (eval echo "$as_me:5793: \"$ac_try\"") >&5
5796 echo "$as_me:5796: \$? = $ac_status" >&5
5797 (exit $ac_status); }; }; then
5798 if test "$cross_compiling" = yes; then
5799 { { echo "$as_me:5799: error: cannot run test program while cross compiling" >&5
5800 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5801 { (exit 1); exit 1; }; }
5803 cat >conftest.$ac_ext <<_ACEOF
5804 #line 5804 "configure"
5805 #include "confdefs.h"
5806 #include <${cf_cv_ncurses_header:-curses.h}>
5808 { char *xx = curses_version(); return (xx == 0); }
5810 rm -f conftest$ac_exeext
5811 if { (eval echo "$as_me:5811: \"$ac_link\"") >&5
5812 (eval $ac_link) 2>&5
5814 echo "$as_me:5814: \$? = $ac_status" >&5
5815 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5816 { (eval echo "$as_me:5816: \"$ac_try\"") >&5
5819 echo "$as_me:5819: \$? = $ac_status" >&5
5820 (exit $ac_status); }; }; then
5821 cf_have_ncuconfig=yes
5823 echo "$as_me: program exited with status $ac_status" >&5
5824 echo "$as_me: failed program was:" >&5
5825 cat conftest.$ac_ext >&5
5826 cf_have_ncuconfig=no
5828 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5831 echo "$as_me: failed program was:" >&5
5832 cat conftest.$ac_ext >&5
5833 cf_have_ncuconfig=no
5835 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5837 echo "$as_me:5837: result: $cf_have_ncuconfig" >&5
5838 echo "${ECHO_T}$cf_have_ncuconfig" >&6
5839 if test "$cf_have_ncuconfig" != "yes"
5841 CPPFLAGS="$cf_save_CPPFLAGS"
5842 LIBS="$cf_save_LIBS"
5843 NCURSES_CONFIG_PKG=none
5846 cat >>confdefs.h <<\EOF
5850 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
5854 echo "$as_me:5854: result: no" >&5
5855 echo "${ECHO_T}no" >&6
5856 NCURSES_CONFIG_PKG=none
5859 NCURSES_CONFIG_PKG=none
5862 if test "x$cf_have_ncuconfig" = "xno"; then
5863 echo "Looking for ${cf_ncuconfig_root}-config"
5865 if test -n "$ac_tool_prefix"; then
5866 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5868 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5869 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5870 echo "$as_me:5870: checking for $ac_word" >&5
5871 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5872 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5873 echo $ECHO_N "(cached) $ECHO_C" >&6
5875 if test -n "$NCURSES_CONFIG"; then
5876 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5878 ac_save_IFS=$IFS; IFS=$ac_path_separator
5880 for ac_dir in $ac_dummy; do
5882 test -z "$ac_dir" && ac_dir=.
5883 $as_executable_p "$ac_dir/$ac_word" || continue
5884 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5885 echo "$as_me:5885: found $ac_dir/$ac_word" >&5
5891 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5892 if test -n "$NCURSES_CONFIG"; then
5893 echo "$as_me:5893: result: $NCURSES_CONFIG" >&5
5894 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5896 echo "$as_me:5896: result: no" >&5
5897 echo "${ECHO_T}no" >&6
5900 test -n "$NCURSES_CONFIG" && break
5903 if test -z "$NCURSES_CONFIG"; then
5904 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5905 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5907 # Extract the first word of "$ac_prog", so it can be a program name with args.
5908 set dummy $ac_prog; ac_word=$2
5909 echo "$as_me:5909: checking for $ac_word" >&5
5910 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5911 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5912 echo $ECHO_N "(cached) $ECHO_C" >&6
5914 if test -n "$ac_ct_NCURSES_CONFIG"; then
5915 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5917 ac_save_IFS=$IFS; IFS=$ac_path_separator
5919 for ac_dir in $ac_dummy; do
5921 test -z "$ac_dir" && ac_dir=.
5922 $as_executable_p "$ac_dir/$ac_word" || continue
5923 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5924 echo "$as_me:5924: found $ac_dir/$ac_word" >&5
5930 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5931 if test -n "$ac_ct_NCURSES_CONFIG"; then
5932 echo "$as_me:5932: result: $ac_ct_NCURSES_CONFIG" >&5
5933 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5935 echo "$as_me:5935: result: no" >&5
5936 echo "${ECHO_T}no" >&6
5939 test -n "$ac_ct_NCURSES_CONFIG" && break
5941 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5943 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5946 if test "$NCURSES_CONFIG" != none ; then
5948 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
5950 cf_add_libs="`$NCURSES_CONFIG --libs`"
5951 # Filter out duplicates - this happens with badly-designed ".pc" files...
5952 for cf_add_1lib in $LIBS
5954 for cf_add_2lib in $cf_add_libs
5956 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5962 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5966 # even with config script, some packages use no-override for curses.h
5968 echo "$as_me:5968: checking if we have identified curses headers" >&5
5969 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5970 if test "${cf_cv_ncurses_header+set}" = set; then
5971 echo $ECHO_N "(cached) $ECHO_C" >&6
5974 cf_cv_ncurses_header=none
5976 ncurses.h ncursesw/ncurses.h \
5977 curses.h ncursesw/curses.h
5979 cat >conftest.$ac_ext <<_ACEOF
5980 #line 5980 "configure"
5981 #include "confdefs.h"
5982 #include <${cf_header}>
5986 initscr(); tgoto("?", 0,0)
5991 rm -f conftest.$ac_objext
5992 if { (eval echo "$as_me:5992: \"$ac_compile\"") >&5
5993 (eval $ac_compile) 2>&5
5995 echo "$as_me:5995: \$? = $ac_status" >&5
5996 (exit $ac_status); } &&
5997 { ac_try='test -s conftest.$ac_objext'
5998 { (eval echo "$as_me:5998: \"$ac_try\"") >&5
6001 echo "$as_me:6001: \$? = $ac_status" >&5
6002 (exit $ac_status); }; }; then
6003 cf_cv_ncurses_header=$cf_header; break
6005 echo "$as_me: failed program was:" >&5
6006 cat conftest.$ac_ext >&5
6008 rm -f conftest.$ac_objext conftest.$ac_ext
6012 echo "$as_me:6012: result: $cf_cv_ncurses_header" >&5
6013 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6015 if test "$cf_cv_ncurses_header" = none ; then
6016 { { echo "$as_me:6016: error: No curses header-files found" >&5
6017 echo "$as_me: error: No curses header-files found" >&2;}
6018 { (exit 1); exit 1; }; }
6021 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6023 for ac_header in $cf_cv_ncurses_header
6025 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6026 echo "$as_me:6026: checking for $ac_header" >&5
6027 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6028 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6029 echo $ECHO_N "(cached) $ECHO_C" >&6
6031 cat >conftest.$ac_ext <<_ACEOF
6032 #line 6032 "configure"
6033 #include "confdefs.h"
6034 #include <$ac_header>
6036 if { (eval echo "$as_me:6036: \"$ac_cpp conftest.$ac_ext\"") >&5
6037 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6039 egrep -v '^ *\+' conftest.er1 >conftest.err
6041 cat conftest.err >&5
6042 echo "$as_me:6042: \$? = $ac_status" >&5
6043 (exit $ac_status); } >/dev/null; then
6044 if test -s conftest.err; then
6045 ac_cpp_err=$ac_c_preproc_warn_flag
6052 if test -z "$ac_cpp_err"; then
6053 eval "$as_ac_Header=yes"
6055 echo "$as_me: failed program was:" >&5
6056 cat conftest.$ac_ext >&5
6057 eval "$as_ac_Header=no"
6059 rm -f conftest.err conftest.$ac_ext
6061 echo "$as_me:6061: result: `eval echo '${'$as_ac_Header'}'`" >&5
6062 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6063 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6064 cat >>confdefs.h <<EOF
6065 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6071 cat >>confdefs.h <<\EOF
6075 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6077 cat >>confdefs.h <<EOF
6078 #define $cf_nculib_ROOT 1
6081 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6085 cf_ncuhdr_root=ncursesw
6087 test -n "$cf_cv_curses_dir" && \
6088 test "$cf_cv_curses_dir" != "no" && { \
6090 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6091 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6093 while test $cf_add_incdir != /usr/include
6095 if test -d $cf_add_incdir
6098 if test -n "$CFLAGS$CPPFLAGS" ; then
6099 # a loop is needed to ensure we can add subdirs of existing dirs
6100 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6101 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6102 cf_have_incdir=yes; break
6107 if test "$cf_have_incdir" = no ; then
6108 if test "$cf_add_incdir" = /usr/local/include ; then
6109 if test "$GCC" = yes
6111 cf_save_CPPFLAGS=$CPPFLAGS
6112 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6113 cat >conftest.$ac_ext <<_ACEOF
6114 #line 6114 "configure"
6115 #include "confdefs.h"
6125 rm -f conftest.$ac_objext
6126 if { (eval echo "$as_me:6126: \"$ac_compile\"") >&5
6127 (eval $ac_compile) 2>&5
6129 echo "$as_me:6129: \$? = $ac_status" >&5
6130 (exit $ac_status); } &&
6131 { ac_try='test -s conftest.$ac_objext'
6132 { (eval echo "$as_me:6132: \"$ac_try\"") >&5
6135 echo "$as_me:6135: \$? = $ac_status" >&5
6136 (exit $ac_status); }; }; then
6139 echo "$as_me: failed program was:" >&5
6140 cat conftest.$ac_ext >&5
6143 rm -f conftest.$ac_objext conftest.$ac_ext
6144 CPPFLAGS=$cf_save_CPPFLAGS
6149 if test "$cf_have_incdir" = no ; then
6150 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6152 echo "${as_me:-configure}:6152: testing adding $cf_add_incdir to include-path ..." 1>&5
6154 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6156 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6157 test "$cf_top_incdir" = "$cf_add_incdir" && break
6158 cf_add_incdir="$cf_top_incdir"
6169 echo "$as_me:6169: checking for $cf_ncuhdr_root header in include-path" >&5
6170 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6171 if test "${cf_cv_ncurses_h+set}" = set; then
6172 echo $ECHO_N "(cached) $ECHO_C" >&6
6175 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6176 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6177 for cf_header in $cf_header_list
6180 cat >conftest.$ac_ext <<_ACEOF
6181 #line 6181 "configure"
6182 #include "confdefs.h"
6184 #define _XOPEN_SOURCE_EXTENDED
6185 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
6186 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
6188 #include <$cf_header>
6193 #ifdef NCURSES_VERSION
6199 printf("%s\n", NCURSES_VERSION);
6212 rm -f conftest.$ac_objext
6213 if { (eval echo "$as_me:6213: \"$ac_compile\"") >&5
6214 (eval $ac_compile) 2>&5
6216 echo "$as_me:6216: \$? = $ac_status" >&5
6217 (exit $ac_status); } &&
6218 { ac_try='test -s conftest.$ac_objext'
6219 { (eval echo "$as_me:6219: \"$ac_try\"") >&5
6222 echo "$as_me:6222: \$? = $ac_status" >&5
6223 (exit $ac_status); }; }; then
6224 cf_cv_ncurses_h=$cf_header
6227 echo "$as_me: failed program was:" >&5
6228 cat conftest.$ac_ext >&5
6231 rm -f conftest.$ac_objext conftest.$ac_ext
6233 test "$cf_cv_ncurses_h" != no && break
6237 echo "$as_me:6237: result: $cf_cv_ncurses_h" >&5
6238 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6240 if test "$cf_cv_ncurses_h" != no ; then
6241 cf_cv_ncurses_header=$cf_cv_ncurses_h
6244 echo "$as_me:6244: checking for $cf_ncuhdr_root include-path" >&5
6245 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6246 if test "${cf_cv_ncurses_h2+set}" = set; then
6247 echo $ECHO_N "(cached) $ECHO_C" >&6
6250 test -n "$verbose" && echo
6254 # collect the current set of include-directories from compiler flags
6255 cf_header_path_list=""
6256 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6257 for cf_header_path in $CPPFLAGS $CFLAGS
6259 case $cf_header_path in
6261 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6263 test "x$cf_header_path" != "xNONE" && \
6264 test -d "$cf_header_path" && \
6266 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6267 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6268 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6269 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6270 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6271 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"
6274 cf_header_path_list="$cf_header_path_list $cf_search"
6280 # add the variations for the package we are looking for
6284 test "x$prefix" != "xNONE" && \
6285 test -d "$prefix" && \
6287 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6288 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6289 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6290 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6291 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6292 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6295 for cf_subdir_prefix in \
6304 test "x$cf_subdir_prefix" != "x$prefix" && \
6305 test -d "$cf_subdir_prefix" && \
6306 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6307 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6308 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6309 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
6310 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
6311 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
6312 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"
6317 test "$includedir" != NONE && \
6318 test "$includedir" != "/usr/include" && \
6319 test -d "$includedir" && {
6320 test -d $includedir && cf_search="$cf_search $includedir"
6321 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6324 test "$oldincludedir" != NONE && \
6325 test "$oldincludedir" != "/usr/include" && \
6326 test -d "$oldincludedir" && {
6327 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6328 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6331 cf_search="$cf_search $cf_header_path_list"
6333 test -n "$verbose" && echo search path $cf_search
6334 cf_save2_CPPFLAGS="$CPPFLAGS"
6335 for cf_incdir in $cf_search
6338 if test -n "$cf_incdir" ; then
6339 for cf_add_incdir in $cf_incdir
6341 while test $cf_add_incdir != /usr/include
6343 if test -d $cf_add_incdir
6346 if test -n "$CFLAGS$CPPFLAGS" ; then
6347 # a loop is needed to ensure we can add subdirs of existing dirs
6348 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6349 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6350 cf_have_incdir=yes; break
6355 if test "$cf_have_incdir" = no ; then
6356 if test "$cf_add_incdir" = /usr/local/include ; then
6357 if test "$GCC" = yes
6359 cf_save_CPPFLAGS=$CPPFLAGS
6360 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6361 cat >conftest.$ac_ext <<_ACEOF
6362 #line 6362 "configure"
6363 #include "confdefs.h"
6373 rm -f conftest.$ac_objext
6374 if { (eval echo "$as_me:6374: \"$ac_compile\"") >&5
6375 (eval $ac_compile) 2>&5
6377 echo "$as_me:6377: \$? = $ac_status" >&5
6378 (exit $ac_status); } &&
6379 { ac_try='test -s conftest.$ac_objext'
6380 { (eval echo "$as_me:6380: \"$ac_try\"") >&5
6383 echo "$as_me:6383: \$? = $ac_status" >&5
6384 (exit $ac_status); }; }; then
6387 echo "$as_me: failed program was:" >&5
6388 cat conftest.$ac_ext >&5
6391 rm -f conftest.$ac_objext conftest.$ac_ext
6392 CPPFLAGS=$cf_save_CPPFLAGS
6397 if test "$cf_have_incdir" = no ; then
6398 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6400 echo "${as_me:-configure}:6400: testing adding $cf_add_incdir to include-path ..." 1>&5
6402 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6404 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6405 test "$cf_top_incdir" = "$cf_add_incdir" && break
6406 cf_add_incdir="$cf_top_incdir"
6420 cat >conftest.$ac_ext <<_ACEOF
6421 #line 6421 "configure"
6422 #include "confdefs.h"
6424 #include <$cf_header>
6429 #ifdef NCURSES_VERSION
6431 printf("%s\n", NCURSES_VERSION);
6444 rm -f conftest.$ac_objext
6445 if { (eval echo "$as_me:6445: \"$ac_compile\"") >&5
6446 (eval $ac_compile) 2>&5
6448 echo "$as_me:6448: \$? = $ac_status" >&5
6449 (exit $ac_status); } &&
6450 { ac_try='test -s conftest.$ac_objext'
6451 { (eval echo "$as_me:6451: \"$ac_try\"") >&5
6454 echo "$as_me:6454: \$? = $ac_status" >&5
6455 (exit $ac_status); }; }; then
6456 cf_cv_ncurses_h2=$cf_header
6459 echo "$as_me: failed program was:" >&5
6460 cat conftest.$ac_ext >&5
6463 rm -f conftest.$ac_objext conftest.$ac_ext
6465 if test "$cf_cv_ncurses_h2" != no ; then
6466 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6467 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
6470 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
6472 CPPFLAGS="$cf_save2_CPPFLAGS"
6473 test "$cf_cv_ncurses_h2" != no && break
6475 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6475: error: not found" >&5
6476 echo "$as_me: error: not found" >&2;}
6477 { (exit 1); exit 1; }; }
6480 echo "$as_me:6480: result: $cf_cv_ncurses_h2" >&5
6481 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6483 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6484 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6485 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6486 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6489 if test -n "$cf_1st_incdir" ; then
6490 for cf_add_incdir in $cf_1st_incdir
6492 while test $cf_add_incdir != /usr/include
6494 if test -d $cf_add_incdir
6497 if test -n "$CFLAGS$CPPFLAGS" ; then
6498 # a loop is needed to ensure we can add subdirs of existing dirs
6499 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6500 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6501 cf_have_incdir=yes; break
6506 if test "$cf_have_incdir" = no ; then
6507 if test "$cf_add_incdir" = /usr/local/include ; then
6508 if test "$GCC" = yes
6510 cf_save_CPPFLAGS=$CPPFLAGS
6511 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6512 cat >conftest.$ac_ext <<_ACEOF
6513 #line 6513 "configure"
6514 #include "confdefs.h"
6524 rm -f conftest.$ac_objext
6525 if { (eval echo "$as_me:6525: \"$ac_compile\"") >&5
6526 (eval $ac_compile) 2>&5
6528 echo "$as_me:6528: \$? = $ac_status" >&5
6529 (exit $ac_status); } &&
6530 { ac_try='test -s conftest.$ac_objext'
6531 { (eval echo "$as_me:6531: \"$ac_try\"") >&5
6534 echo "$as_me:6534: \$? = $ac_status" >&5
6535 (exit $ac_status); }; }; then
6538 echo "$as_me: failed program was:" >&5
6539 cat conftest.$ac_ext >&5
6542 rm -f conftest.$ac_objext conftest.$ac_ext
6543 CPPFLAGS=$cf_save_CPPFLAGS
6548 if test "$cf_have_incdir" = no ; then
6549 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6551 echo "${as_me:-configure}:6551: testing adding $cf_add_incdir to include-path ..." 1>&5
6553 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6555 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6556 test "$cf_top_incdir" = "$cf_add_incdir" && break
6557 cf_add_incdir="$cf_top_incdir"
6568 # Set definitions to allow ifdef'ing for ncurses.h
6570 case $cf_cv_ncurses_header in
6573 cat >>confdefs.h <<\EOF
6574 #define HAVE_NCURSES_H 1
6580 case $cf_cv_ncurses_header in
6581 (ncurses/curses.h|ncurses/ncurses.h)
6583 cat >>confdefs.h <<\EOF
6584 #define HAVE_NCURSES_NCURSES_H 1
6588 (ncursesw/curses.h|ncursesw/ncurses.h)
6590 cat >>confdefs.h <<\EOF
6591 #define HAVE_NCURSESW_NCURSES_H 1
6597 echo "$as_me:6597: checking for terminfo header" >&5
6598 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6599 if test "${cf_cv_term_header+set}" = set; then
6600 echo $ECHO_N "(cached) $ECHO_C" >&6
6603 case ${cf_cv_ncurses_header} in
6604 (*/ncurses.h|*/ncursesw.h)
6605 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6608 cf_term_header=term.h
6612 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6614 cat >conftest.$ac_ext <<_ACEOF
6615 #line 6615 "configure"
6616 #include "confdefs.h"
6618 #include <${cf_cv_ncurses_header:-curses.h}>
6624 int x = auto_left_margin
6629 rm -f conftest.$ac_objext
6630 if { (eval echo "$as_me:6630: \"$ac_compile\"") >&5
6631 (eval $ac_compile) 2>&5
6633 echo "$as_me:6633: \$? = $ac_status" >&5
6634 (exit $ac_status); } &&
6635 { ac_try='test -s conftest.$ac_objext'
6636 { (eval echo "$as_me:6636: \"$ac_try\"") >&5
6639 echo "$as_me:6639: \$? = $ac_status" >&5
6640 (exit $ac_status); }; }; then
6642 cf_cv_term_header="$cf_test"
6644 echo "$as_me: failed program was:" >&5
6645 cat conftest.$ac_ext >&5
6647 cf_cv_term_header=unknown
6650 rm -f conftest.$ac_objext conftest.$ac_ext
6651 test "$cf_cv_term_header" != unknown && break
6655 echo "$as_me:6655: result: $cf_cv_term_header" >&5
6656 echo "${ECHO_T}$cf_cv_term_header" >&6
6658 # Set definitions to allow ifdef'ing to accommodate subdirectories
6660 case $cf_cv_term_header in
6663 cat >>confdefs.h <<\EOF
6664 #define HAVE_TERM_H 1
6670 case $cf_cv_term_header in
6673 cat >>confdefs.h <<\EOF
6674 #define HAVE_NCURSES_TERM_H 1
6680 cat >>confdefs.h <<\EOF
6681 #define HAVE_NCURSESW_TERM_H 1
6687 # some applications need this, but should check for NCURSES_VERSION
6689 cat >>confdefs.h <<\EOF
6693 echo "$as_me:6693: checking for ncurses version" >&5
6694 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6695 if test "${cf_cv_ncurses_version+set}" = set; then
6696 echo $ECHO_N "(cached) $ECHO_C" >&6
6699 cf_cv_ncurses_version=no
6702 if test "$cross_compiling" = yes; then
6704 # This will not work if the preprocessor splits the line after the
6705 # Autoconf token. The 'unproto' program does that.
6706 cat > conftest.$ac_ext <<EOF
6707 #include <${cf_cv_ncurses_header:-curses.h}>
6709 #ifdef NCURSES_VERSION
6710 Autoconf NCURSES_VERSION
6718 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6719 { (eval echo "$as_me:6719: \"$cf_try\"") >&5
6722 echo "$as_me:6722: \$? = $ac_status" >&5
6723 (exit $ac_status); }
6724 if test -f conftest.out ; then
6725 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6726 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6731 cat >conftest.$ac_ext <<_ACEOF
6732 #line 6732 "configure"
6733 #include "confdefs.h"
6735 #include <${cf_cv_ncurses_header:-curses.h}>
6739 FILE *fp = fopen("$cf_tempfile", "w");
6740 #ifdef NCURSES_VERSION
6741 # ifdef NCURSES_VERSION_PATCH
6742 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6744 fprintf(fp, "%s\n", NCURSES_VERSION);
6748 fprintf(fp, "old\n");
6753 ${cf_cv_main_return:-return}(0);
6756 rm -f conftest$ac_exeext
6757 if { (eval echo "$as_me:6757: \"$ac_link\"") >&5
6758 (eval $ac_link) 2>&5
6760 echo "$as_me:6760: \$? = $ac_status" >&5
6761 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6762 { (eval echo "$as_me:6762: \"$ac_try\"") >&5
6765 echo "$as_me:6765: \$? = $ac_status" >&5
6766 (exit $ac_status); }; }; then
6768 cf_cv_ncurses_version=`cat $cf_tempfile`
6770 echo "$as_me: program exited with status $ac_status" >&5
6771 echo "$as_me: failed program was:" >&5
6772 cat conftest.$ac_ext >&5
6774 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6779 echo "$as_me:6779: result: $cf_cv_ncurses_version" >&5
6780 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6781 test "$cf_cv_ncurses_version" = no ||
6782 cat >>confdefs.h <<\EOF
6786 cf_nculib_root=ncursesw
6787 # This works, except for the special case where we find gpm, but
6788 # ncurses is in a nonstandard location via $LIBS, and we really want
6791 cf_ncurses_SAVE="$LIBS"
6792 echo "$as_me:6792: checking for Gpm_Open in -lgpm" >&5
6793 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6794 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6795 echo $ECHO_N "(cached) $ECHO_C" >&6
6797 ac_check_lib_save_LIBS=$LIBS
6799 cat >conftest.$ac_ext <<_ACEOF
6800 #line 6800 "configure"
6801 #include "confdefs.h"
6803 /* Override any gcc2 internal prototype to avoid an error. */
6807 /* We use char because int might match the return type of a gcc2
6808 builtin and then its argument prototype would still apply. */
6818 rm -f conftest.$ac_objext conftest$ac_exeext
6819 if { (eval echo "$as_me:6819: \"$ac_link\"") >&5
6820 (eval $ac_link) 2>&5
6822 echo "$as_me:6822: \$? = $ac_status" >&5
6823 (exit $ac_status); } &&
6824 { ac_try='test -s conftest$ac_exeext'
6825 { (eval echo "$as_me:6825: \"$ac_try\"") >&5
6828 echo "$as_me:6828: \$? = $ac_status" >&5
6829 (exit $ac_status); }; }; then
6830 ac_cv_lib_gpm_Gpm_Open=yes
6832 echo "$as_me: failed program was:" >&5
6833 cat conftest.$ac_ext >&5
6834 ac_cv_lib_gpm_Gpm_Open=no
6836 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6837 LIBS=$ac_check_lib_save_LIBS
6839 echo "$as_me:6839: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6840 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6841 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6842 echo "$as_me:6842: checking for initscr in -lgpm" >&5
6843 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6844 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6845 echo $ECHO_N "(cached) $ECHO_C" >&6
6847 ac_check_lib_save_LIBS=$LIBS
6849 cat >conftest.$ac_ext <<_ACEOF
6850 #line 6850 "configure"
6851 #include "confdefs.h"
6853 /* Override any gcc2 internal prototype to avoid an error. */
6857 /* We use char because int might match the return type of a gcc2
6858 builtin and then its argument prototype would still apply. */
6868 rm -f conftest.$ac_objext conftest$ac_exeext
6869 if { (eval echo "$as_me:6869: \"$ac_link\"") >&5
6870 (eval $ac_link) 2>&5
6872 echo "$as_me:6872: \$? = $ac_status" >&5
6873 (exit $ac_status); } &&
6874 { ac_try='test -s conftest$ac_exeext'
6875 { (eval echo "$as_me:6875: \"$ac_try\"") >&5
6878 echo "$as_me:6878: \$? = $ac_status" >&5
6879 (exit $ac_status); }; }; then
6880 ac_cv_lib_gpm_initscr=yes
6882 echo "$as_me: failed program was:" >&5
6883 cat conftest.$ac_ext >&5
6884 ac_cv_lib_gpm_initscr=no
6886 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6887 LIBS=$ac_check_lib_save_LIBS
6889 echo "$as_me:6889: result: $ac_cv_lib_gpm_initscr" >&5
6890 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6891 if test $ac_cv_lib_gpm_initscr = yes; then
6892 LIBS="$cf_ncurses_SAVE"
6894 cf_ncurses_LIBS="-lgpm"
6901 # This is only necessary if you are linking against an obsolete
6902 # version of ncurses (but it should do no harm, since it's static).
6903 if test "$cf_nculib_root" = ncurses ; then
6904 echo "$as_me:6904: checking for tgoto in -lmytinfo" >&5
6905 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6906 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6907 echo $ECHO_N "(cached) $ECHO_C" >&6
6909 ac_check_lib_save_LIBS=$LIBS
6910 LIBS="-lmytinfo $LIBS"
6911 cat >conftest.$ac_ext <<_ACEOF
6912 #line 6912 "configure"
6913 #include "confdefs.h"
6915 /* Override any gcc2 internal prototype to avoid an error. */
6919 /* We use char because int might match the return type of a gcc2
6920 builtin and then its argument prototype would still apply. */
6930 rm -f conftest.$ac_objext conftest$ac_exeext
6931 if { (eval echo "$as_me:6931: \"$ac_link\"") >&5
6932 (eval $ac_link) 2>&5
6934 echo "$as_me:6934: \$? = $ac_status" >&5
6935 (exit $ac_status); } &&
6936 { ac_try='test -s conftest$ac_exeext'
6937 { (eval echo "$as_me:6937: \"$ac_try\"") >&5
6940 echo "$as_me:6940: \$? = $ac_status" >&5
6941 (exit $ac_status); }; }; then
6942 ac_cv_lib_mytinfo_tgoto=yes
6944 echo "$as_me: failed program was:" >&5
6945 cat conftest.$ac_ext >&5
6946 ac_cv_lib_mytinfo_tgoto=no
6948 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6949 LIBS=$ac_check_lib_save_LIBS
6951 echo "$as_me:6951: result: $ac_cv_lib_mytinfo_tgoto" >&5
6952 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6953 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6954 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6961 cf_add_libs="$cf_ncurses_LIBS"
6962 # Filter out duplicates - this happens with badly-designed ".pc" files...
6963 for cf_add_1lib in $LIBS
6965 for cf_add_2lib in $cf_add_libs
6967 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6973 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6977 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
6980 cf_add_libs="-l$cf_nculib_root"
6981 # Filter out duplicates - this happens with badly-designed ".pc" files...
6982 for cf_add_1lib in $LIBS
6984 for cf_add_2lib in $cf_add_libs
6986 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6992 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6998 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7000 echo "$as_me:7000: checking for initscr" >&5
7001 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7002 if test "${ac_cv_func_initscr+set}" = set; then
7003 echo $ECHO_N "(cached) $ECHO_C" >&6
7005 cat >conftest.$ac_ext <<_ACEOF
7006 #line 7006 "configure"
7007 #include "confdefs.h"
7008 /* System header to define __stub macros and hopefully few prototypes,
7009 which can conflict with char initscr (); below. */
7011 /* Override any gcc2 internal prototype to avoid an error. */
7015 /* We use char because int might match the return type of a gcc2
7016 builtin and then its argument prototype would still apply. */
7023 /* The GNU C library defines this for functions which it implements
7024 to always fail with ENOSYS. Some functions are actually named
7025 something starting with __ and the normal name is an alias. */
7026 #if defined (__stub_initscr) || defined (__stub___initscr)
7029 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7036 rm -f conftest.$ac_objext conftest$ac_exeext
7037 if { (eval echo "$as_me:7037: \"$ac_link\"") >&5
7038 (eval $ac_link) 2>&5
7040 echo "$as_me:7040: \$? = $ac_status" >&5
7041 (exit $ac_status); } &&
7042 { ac_try='test -s conftest$ac_exeext'
7043 { (eval echo "$as_me:7043: \"$ac_try\"") >&5
7046 echo "$as_me:7046: \$? = $ac_status" >&5
7047 (exit $ac_status); }; }; then
7048 ac_cv_func_initscr=yes
7050 echo "$as_me: failed program was:" >&5
7051 cat conftest.$ac_ext >&5
7052 ac_cv_func_initscr=no
7054 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7056 echo "$as_me:7056: result: $ac_cv_func_initscr" >&5
7057 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7058 if test $ac_cv_func_initscr = yes; then
7059 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7062 cf_save_LIBS="$LIBS"
7063 echo "$as_me:7063: checking for initscr in -l$cf_nculib_root" >&5
7064 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7065 LIBS="-l$cf_nculib_root $LIBS"
7066 cat >conftest.$ac_ext <<_ACEOF
7067 #line 7067 "configure"
7068 #include "confdefs.h"
7069 #include <${cf_cv_ncurses_header:-curses.h}>
7078 rm -f conftest.$ac_objext conftest$ac_exeext
7079 if { (eval echo "$as_me:7079: \"$ac_link\"") >&5
7080 (eval $ac_link) 2>&5
7082 echo "$as_me:7082: \$? = $ac_status" >&5
7083 (exit $ac_status); } &&
7084 { ac_try='test -s conftest$ac_exeext'
7085 { (eval echo "$as_me:7085: \"$ac_try\"") >&5
7088 echo "$as_me:7088: \$? = $ac_status" >&5
7089 (exit $ac_status); }; }; then
7090 echo "$as_me:7090: result: yes" >&5
7091 echo "${ECHO_T}yes" >&6
7092 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7095 echo "$as_me: failed program was:" >&5
7096 cat conftest.$ac_ext >&5
7097 echo "$as_me:7097: result: no" >&5
7098 echo "${ECHO_T}no" >&6
7101 cf_library_path_list=""
7102 if test -n "${LDFLAGS}${LIBS}" ; then
7103 for cf_library_path in $LDFLAGS $LIBS
7105 case $cf_library_path in
7107 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7109 test "x$cf_library_path" != "xNONE" && \
7110 test -d "$cf_library_path" && \
7112 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7113 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7114 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7115 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7116 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7117 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"
7120 cf_library_path_list="$cf_library_path_list $cf_search"
7128 test "x$prefix" != "xNONE" && \
7129 test -d "$prefix" && \
7131 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7132 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7133 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7134 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7135 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7136 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7139 for cf_subdir_prefix in \
7148 test "x$cf_subdir_prefix" != "x$prefix" && \
7149 test -d "$cf_subdir_prefix" && \
7150 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7151 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7152 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
7153 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
7154 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
7155 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
7156 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"
7161 cf_search="$cf_library_path_list $cf_search"
7163 for cf_libdir in $cf_search
7165 echo "$as_me:7165: checking for -l$cf_nculib_root in $cf_libdir" >&5
7166 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7167 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7168 cat >conftest.$ac_ext <<_ACEOF
7169 #line 7169 "configure"
7170 #include "confdefs.h"
7171 #include <${cf_cv_ncurses_header:-curses.h}>
7180 rm -f conftest.$ac_objext conftest$ac_exeext
7181 if { (eval echo "$as_me:7181: \"$ac_link\"") >&5
7182 (eval $ac_link) 2>&5
7184 echo "$as_me:7184: \$? = $ac_status" >&5
7185 (exit $ac_status); } &&
7186 { ac_try='test -s conftest$ac_exeext'
7187 { (eval echo "$as_me:7187: \"$ac_try\"") >&5
7190 echo "$as_me:7190: \$? = $ac_status" >&5
7191 (exit $ac_status); }; }; then
7192 echo "$as_me:7192: result: yes" >&5
7193 echo "${ECHO_T}yes" >&6
7194 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7197 echo "$as_me: failed program was:" >&5
7198 cat conftest.$ac_ext >&5
7199 echo "$as_me:7199: result: no" >&5
7200 echo "${ECHO_T}no" >&6
7201 LIBS="$cf_save_LIBS"
7203 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7207 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7211 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7213 if test $cf_found_library = no ; then
7214 { { echo "$as_me:7214: error: Cannot link $cf_nculib_root library" >&5
7215 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7216 { (exit 1); exit 1; }; }
7221 if test -n "$cf_ncurses_LIBS" ; then
7222 echo "$as_me:7222: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7223 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7224 cf_ncurses_SAVE="$LIBS"
7225 for p in $cf_ncurses_LIBS ; do
7226 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7227 if test "$q" != "$LIBS" ; then
7231 cat >conftest.$ac_ext <<_ACEOF
7232 #line 7232 "configure"
7233 #include "confdefs.h"
7234 #include <${cf_cv_ncurses_header:-curses.h}>
7238 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7243 rm -f conftest.$ac_objext conftest$ac_exeext
7244 if { (eval echo "$as_me:7244: \"$ac_link\"") >&5
7245 (eval $ac_link) 2>&5
7247 echo "$as_me:7247: \$? = $ac_status" >&5
7248 (exit $ac_status); } &&
7249 { ac_try='test -s conftest$ac_exeext'
7250 { (eval echo "$as_me:7250: \"$ac_try\"") >&5
7253 echo "$as_me:7253: \$? = $ac_status" >&5
7254 (exit $ac_status); }; }; then
7255 echo "$as_me:7255: result: yes" >&5
7256 echo "${ECHO_T}yes" >&6
7258 echo "$as_me: failed program was:" >&5
7259 cat conftest.$ac_ext >&5
7260 echo "$as_me:7260: result: no" >&5
7261 echo "${ECHO_T}no" >&6
7262 LIBS="$cf_ncurses_SAVE"
7264 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7267 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7269 cat >>confdefs.h <<EOF
7270 #define $cf_nculib_ROOT 1
7280 cf_ncuconfig_root=ncurses
7281 cf_have_ncuconfig=no
7283 if test "x$PKG_CONFIG" != xnone; then
7284 echo "$as_me:7284: checking pkg-config for $cf_ncuconfig_root" >&5
7285 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7286 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7287 echo "$as_me:7287: result: yes" >&5
7288 echo "${ECHO_T}yes" >&6
7290 echo "$as_me:7290: checking if the $cf_ncuconfig_root package files work" >&5
7291 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7292 cf_have_ncuconfig=unknown
7294 cf_save_CPPFLAGS="$CPPFLAGS"
7295 cf_save_LIBS="$LIBS"
7297 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7299 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7300 # Filter out duplicates - this happens with badly-designed ".pc" files...
7301 for cf_add_1lib in $LIBS
7303 for cf_add_2lib in $cf_add_libs
7305 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7311 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7315 cat >conftest.$ac_ext <<_ACEOF
7316 #line 7316 "configure"
7317 #include "confdefs.h"
7318 #include <${cf_cv_ncurses_header:-curses.h}>
7322 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7327 rm -f conftest.$ac_objext conftest$ac_exeext
7328 if { (eval echo "$as_me:7328: \"$ac_link\"") >&5
7329 (eval $ac_link) 2>&5
7331 echo "$as_me:7331: \$? = $ac_status" >&5
7332 (exit $ac_status); } &&
7333 { ac_try='test -s conftest$ac_exeext'
7334 { (eval echo "$as_me:7334: \"$ac_try\"") >&5
7337 echo "$as_me:7337: \$? = $ac_status" >&5
7338 (exit $ac_status); }; }; then
7339 if test "$cross_compiling" = yes; then
7340 { { echo "$as_me:7340: error: cannot run test program while cross compiling" >&5
7341 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7342 { (exit 1); exit 1; }; }
7344 cat >conftest.$ac_ext <<_ACEOF
7345 #line 7345 "configure"
7346 #include "confdefs.h"
7347 #include <${cf_cv_ncurses_header:-curses.h}>
7349 { char *xx = curses_version(); return (xx == 0); }
7351 rm -f conftest$ac_exeext
7352 if { (eval echo "$as_me:7352: \"$ac_link\"") >&5
7353 (eval $ac_link) 2>&5
7355 echo "$as_me:7355: \$? = $ac_status" >&5
7356 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7357 { (eval echo "$as_me:7357: \"$ac_try\"") >&5
7360 echo "$as_me:7360: \$? = $ac_status" >&5
7361 (exit $ac_status); }; }; then
7362 cf_have_ncuconfig=yes
7364 echo "$as_me: program exited with status $ac_status" >&5
7365 echo "$as_me: failed program was:" >&5
7366 cat conftest.$ac_ext >&5
7367 cf_have_ncuconfig=no
7369 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7372 echo "$as_me: failed program was:" >&5
7373 cat conftest.$ac_ext >&5
7374 cf_have_ncuconfig=no
7376 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7378 echo "$as_me:7378: result: $cf_have_ncuconfig" >&5
7379 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7380 if test "$cf_have_ncuconfig" != "yes"
7382 CPPFLAGS="$cf_save_CPPFLAGS"
7383 LIBS="$cf_save_LIBS"
7384 NCURSES_CONFIG_PKG=none
7387 cat >>confdefs.h <<\EOF
7391 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7395 echo "$as_me:7395: result: no" >&5
7396 echo "${ECHO_T}no" >&6
7397 NCURSES_CONFIG_PKG=none
7400 NCURSES_CONFIG_PKG=none
7403 if test "x$cf_have_ncuconfig" = "xno"; then
7404 echo "Looking for ${cf_ncuconfig_root}-config"
7406 if test -n "$ac_tool_prefix"; then
7407 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7409 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7410 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7411 echo "$as_me:7411: checking for $ac_word" >&5
7412 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7413 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7414 echo $ECHO_N "(cached) $ECHO_C" >&6
7416 if test -n "$NCURSES_CONFIG"; then
7417 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7419 ac_save_IFS=$IFS; IFS=$ac_path_separator
7421 for ac_dir in $ac_dummy; do
7423 test -z "$ac_dir" && ac_dir=.
7424 $as_executable_p "$ac_dir/$ac_word" || continue
7425 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7426 echo "$as_me:7426: found $ac_dir/$ac_word" >&5
7432 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7433 if test -n "$NCURSES_CONFIG"; then
7434 echo "$as_me:7434: result: $NCURSES_CONFIG" >&5
7435 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7437 echo "$as_me:7437: result: no" >&5
7438 echo "${ECHO_T}no" >&6
7441 test -n "$NCURSES_CONFIG" && break
7444 if test -z "$NCURSES_CONFIG"; then
7445 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7446 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7448 # Extract the first word of "$ac_prog", so it can be a program name with args.
7449 set dummy $ac_prog; ac_word=$2
7450 echo "$as_me:7450: checking for $ac_word" >&5
7451 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7452 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7453 echo $ECHO_N "(cached) $ECHO_C" >&6
7455 if test -n "$ac_ct_NCURSES_CONFIG"; then
7456 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7458 ac_save_IFS=$IFS; IFS=$ac_path_separator
7460 for ac_dir in $ac_dummy; do
7462 test -z "$ac_dir" && ac_dir=.
7463 $as_executable_p "$ac_dir/$ac_word" || continue
7464 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7465 echo "$as_me:7465: found $ac_dir/$ac_word" >&5
7471 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7472 if test -n "$ac_ct_NCURSES_CONFIG"; then
7473 echo "$as_me:7473: result: $ac_ct_NCURSES_CONFIG" >&5
7474 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7476 echo "$as_me:7476: result: no" >&5
7477 echo "${ECHO_T}no" >&6
7480 test -n "$ac_ct_NCURSES_CONFIG" && break
7482 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7484 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7487 if test "$NCURSES_CONFIG" != none ; then
7489 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
7491 cf_add_libs="`$NCURSES_CONFIG --libs`"
7492 # Filter out duplicates - this happens with badly-designed ".pc" files...
7493 for cf_add_1lib in $LIBS
7495 for cf_add_2lib in $cf_add_libs
7497 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7503 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7507 # even with config script, some packages use no-override for curses.h
7509 echo "$as_me:7509: checking if we have identified curses headers" >&5
7510 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7511 if test "${cf_cv_ncurses_header+set}" = set; then
7512 echo $ECHO_N "(cached) $ECHO_C" >&6
7515 cf_cv_ncurses_header=none
7517 ncurses.h ncurses/ncurses.h \
7518 curses.h ncurses/curses.h
7520 cat >conftest.$ac_ext <<_ACEOF
7521 #line 7521 "configure"
7522 #include "confdefs.h"
7523 #include <${cf_header}>
7527 initscr(); tgoto("?", 0,0)
7532 rm -f conftest.$ac_objext
7533 if { (eval echo "$as_me:7533: \"$ac_compile\"") >&5
7534 (eval $ac_compile) 2>&5
7536 echo "$as_me:7536: \$? = $ac_status" >&5
7537 (exit $ac_status); } &&
7538 { ac_try='test -s conftest.$ac_objext'
7539 { (eval echo "$as_me:7539: \"$ac_try\"") >&5
7542 echo "$as_me:7542: \$? = $ac_status" >&5
7543 (exit $ac_status); }; }; then
7544 cf_cv_ncurses_header=$cf_header; break
7546 echo "$as_me: failed program was:" >&5
7547 cat conftest.$ac_ext >&5
7549 rm -f conftest.$ac_objext conftest.$ac_ext
7553 echo "$as_me:7553: result: $cf_cv_ncurses_header" >&5
7554 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7556 if test "$cf_cv_ncurses_header" = none ; then
7557 { { echo "$as_me:7557: error: No curses header-files found" >&5
7558 echo "$as_me: error: No curses header-files found" >&2;}
7559 { (exit 1); exit 1; }; }
7562 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7564 for ac_header in $cf_cv_ncurses_header
7566 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7567 echo "$as_me:7567: checking for $ac_header" >&5
7568 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7569 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7570 echo $ECHO_N "(cached) $ECHO_C" >&6
7572 cat >conftest.$ac_ext <<_ACEOF
7573 #line 7573 "configure"
7574 #include "confdefs.h"
7575 #include <$ac_header>
7577 if { (eval echo "$as_me:7577: \"$ac_cpp conftest.$ac_ext\"") >&5
7578 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7580 egrep -v '^ *\+' conftest.er1 >conftest.err
7582 cat conftest.err >&5
7583 echo "$as_me:7583: \$? = $ac_status" >&5
7584 (exit $ac_status); } >/dev/null; then
7585 if test -s conftest.err; then
7586 ac_cpp_err=$ac_c_preproc_warn_flag
7593 if test -z "$ac_cpp_err"; then
7594 eval "$as_ac_Header=yes"
7596 echo "$as_me: failed program was:" >&5
7597 cat conftest.$ac_ext >&5
7598 eval "$as_ac_Header=no"
7600 rm -f conftest.err conftest.$ac_ext
7602 echo "$as_me:7602: result: `eval echo '${'$as_ac_Header'}'`" >&5
7603 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7604 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7605 cat >>confdefs.h <<EOF
7606 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7612 cat >>confdefs.h <<\EOF
7616 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7618 cat >>confdefs.h <<EOF
7619 #define $cf_nculib_ROOT 1
7622 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7626 cf_ncuhdr_root=ncurses
7628 test -n "$cf_cv_curses_dir" && \
7629 test "$cf_cv_curses_dir" != "no" && { \
7631 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7632 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7634 while test $cf_add_incdir != /usr/include
7636 if test -d $cf_add_incdir
7639 if test -n "$CFLAGS$CPPFLAGS" ; then
7640 # a loop is needed to ensure we can add subdirs of existing dirs
7641 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7642 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7643 cf_have_incdir=yes; break
7648 if test "$cf_have_incdir" = no ; then
7649 if test "$cf_add_incdir" = /usr/local/include ; then
7650 if test "$GCC" = yes
7652 cf_save_CPPFLAGS=$CPPFLAGS
7653 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7654 cat >conftest.$ac_ext <<_ACEOF
7655 #line 7655 "configure"
7656 #include "confdefs.h"
7666 rm -f conftest.$ac_objext
7667 if { (eval echo "$as_me:7667: \"$ac_compile\"") >&5
7668 (eval $ac_compile) 2>&5
7670 echo "$as_me:7670: \$? = $ac_status" >&5
7671 (exit $ac_status); } &&
7672 { ac_try='test -s conftest.$ac_objext'
7673 { (eval echo "$as_me:7673: \"$ac_try\"") >&5
7676 echo "$as_me:7676: \$? = $ac_status" >&5
7677 (exit $ac_status); }; }; then
7680 echo "$as_me: failed program was:" >&5
7681 cat conftest.$ac_ext >&5
7684 rm -f conftest.$ac_objext conftest.$ac_ext
7685 CPPFLAGS=$cf_save_CPPFLAGS
7690 if test "$cf_have_incdir" = no ; then
7691 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7693 echo "${as_me:-configure}:7693: testing adding $cf_add_incdir to include-path ..." 1>&5
7695 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7697 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7698 test "$cf_top_incdir" = "$cf_add_incdir" && break
7699 cf_add_incdir="$cf_top_incdir"
7710 echo "$as_me:7710: checking for $cf_ncuhdr_root header in include-path" >&5
7711 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
7712 if test "${cf_cv_ncurses_h+set}" = set; then
7713 echo $ECHO_N "(cached) $ECHO_C" >&6
7716 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
7717 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
7718 for cf_header in $cf_header_list
7721 cat >conftest.$ac_ext <<_ACEOF
7722 #line 7722 "configure"
7723 #include "confdefs.h"
7725 #include <$cf_header>
7730 #ifdef NCURSES_VERSION
7732 printf("%s\n", NCURSES_VERSION);
7745 rm -f conftest.$ac_objext
7746 if { (eval echo "$as_me:7746: \"$ac_compile\"") >&5
7747 (eval $ac_compile) 2>&5
7749 echo "$as_me:7749: \$? = $ac_status" >&5
7750 (exit $ac_status); } &&
7751 { ac_try='test -s conftest.$ac_objext'
7752 { (eval echo "$as_me:7752: \"$ac_try\"") >&5
7755 echo "$as_me:7755: \$? = $ac_status" >&5
7756 (exit $ac_status); }; }; then
7757 cf_cv_ncurses_h=$cf_header
7760 echo "$as_me: failed program was:" >&5
7761 cat conftest.$ac_ext >&5
7764 rm -f conftest.$ac_objext conftest.$ac_ext
7766 test "$cf_cv_ncurses_h" != no && break
7770 echo "$as_me:7770: result: $cf_cv_ncurses_h" >&5
7771 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
7773 if test "$cf_cv_ncurses_h" != no ; then
7774 cf_cv_ncurses_header=$cf_cv_ncurses_h
7777 echo "$as_me:7777: checking for $cf_ncuhdr_root include-path" >&5
7778 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
7779 if test "${cf_cv_ncurses_h2+set}" = set; then
7780 echo $ECHO_N "(cached) $ECHO_C" >&6
7783 test -n "$verbose" && echo
7787 # collect the current set of include-directories from compiler flags
7788 cf_header_path_list=""
7789 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7790 for cf_header_path in $CPPFLAGS $CFLAGS
7792 case $cf_header_path in
7794 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7796 test "x$cf_header_path" != "xNONE" && \
7797 test -d "$cf_header_path" && \
7799 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7800 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7801 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
7802 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
7803 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
7804 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"
7807 cf_header_path_list="$cf_header_path_list $cf_search"
7813 # add the variations for the package we are looking for
7817 test "x$prefix" != "xNONE" && \
7818 test -d "$prefix" && \
7820 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7821 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7822 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
7823 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
7824 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
7825 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7828 for cf_subdir_prefix in \
7837 test "x$cf_subdir_prefix" != "x$prefix" && \
7838 test -d "$cf_subdir_prefix" && \
7839 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7840 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7841 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
7842 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
7843 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
7844 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
7845 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"
7850 test "$includedir" != NONE && \
7851 test "$includedir" != "/usr/include" && \
7852 test -d "$includedir" && {
7853 test -d $includedir && cf_search="$cf_search $includedir"
7854 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
7857 test "$oldincludedir" != NONE && \
7858 test "$oldincludedir" != "/usr/include" && \
7859 test -d "$oldincludedir" && {
7860 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7861 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
7864 cf_search="$cf_search $cf_header_path_list"
7866 test -n "$verbose" && echo search path $cf_search
7867 cf_save2_CPPFLAGS="$CPPFLAGS"
7868 for cf_incdir in $cf_search
7871 if test -n "$cf_incdir" ; then
7872 for cf_add_incdir in $cf_incdir
7874 while test $cf_add_incdir != /usr/include
7876 if test -d $cf_add_incdir
7879 if test -n "$CFLAGS$CPPFLAGS" ; then
7880 # a loop is needed to ensure we can add subdirs of existing dirs
7881 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7882 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7883 cf_have_incdir=yes; break
7888 if test "$cf_have_incdir" = no ; then
7889 if test "$cf_add_incdir" = /usr/local/include ; then
7890 if test "$GCC" = yes
7892 cf_save_CPPFLAGS=$CPPFLAGS
7893 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7894 cat >conftest.$ac_ext <<_ACEOF
7895 #line 7895 "configure"
7896 #include "confdefs.h"
7906 rm -f conftest.$ac_objext
7907 if { (eval echo "$as_me:7907: \"$ac_compile\"") >&5
7908 (eval $ac_compile) 2>&5
7910 echo "$as_me:7910: \$? = $ac_status" >&5
7911 (exit $ac_status); } &&
7912 { ac_try='test -s conftest.$ac_objext'
7913 { (eval echo "$as_me:7913: \"$ac_try\"") >&5
7916 echo "$as_me:7916: \$? = $ac_status" >&5
7917 (exit $ac_status); }; }; then
7920 echo "$as_me: failed program was:" >&5
7921 cat conftest.$ac_ext >&5
7924 rm -f conftest.$ac_objext conftest.$ac_ext
7925 CPPFLAGS=$cf_save_CPPFLAGS
7930 if test "$cf_have_incdir" = no ; then
7931 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7933 echo "${as_me:-configure}:7933: testing adding $cf_add_incdir to include-path ..." 1>&5
7935 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7937 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7938 test "$cf_top_incdir" = "$cf_add_incdir" && break
7939 cf_add_incdir="$cf_top_incdir"
7953 cat >conftest.$ac_ext <<_ACEOF
7954 #line 7954 "configure"
7955 #include "confdefs.h"
7957 #include <$cf_header>
7962 #ifdef NCURSES_VERSION
7964 printf("%s\n", NCURSES_VERSION);
7977 rm -f conftest.$ac_objext
7978 if { (eval echo "$as_me:7978: \"$ac_compile\"") >&5
7979 (eval $ac_compile) 2>&5
7981 echo "$as_me:7981: \$? = $ac_status" >&5
7982 (exit $ac_status); } &&
7983 { ac_try='test -s conftest.$ac_objext'
7984 { (eval echo "$as_me:7984: \"$ac_try\"") >&5
7987 echo "$as_me:7987: \$? = $ac_status" >&5
7988 (exit $ac_status); }; }; then
7989 cf_cv_ncurses_h2=$cf_header
7992 echo "$as_me: failed program was:" >&5
7993 cat conftest.$ac_ext >&5
7996 rm -f conftest.$ac_objext conftest.$ac_ext
7998 if test "$cf_cv_ncurses_h2" != no ; then
7999 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8000 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8003 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8005 CPPFLAGS="$cf_save2_CPPFLAGS"
8006 test "$cf_cv_ncurses_h2" != no && break
8008 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8008: error: not found" >&5
8009 echo "$as_me: error: not found" >&2;}
8010 { (exit 1); exit 1; }; }
8013 echo "$as_me:8013: result: $cf_cv_ncurses_h2" >&5
8014 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8016 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8017 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8018 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8019 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8022 if test -n "$cf_1st_incdir" ; then
8023 for cf_add_incdir in $cf_1st_incdir
8025 while test $cf_add_incdir != /usr/include
8027 if test -d $cf_add_incdir
8030 if test -n "$CFLAGS$CPPFLAGS" ; then
8031 # a loop is needed to ensure we can add subdirs of existing dirs
8032 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8033 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8034 cf_have_incdir=yes; break
8039 if test "$cf_have_incdir" = no ; then
8040 if test "$cf_add_incdir" = /usr/local/include ; then
8041 if test "$GCC" = yes
8043 cf_save_CPPFLAGS=$CPPFLAGS
8044 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8045 cat >conftest.$ac_ext <<_ACEOF
8046 #line 8046 "configure"
8047 #include "confdefs.h"
8057 rm -f conftest.$ac_objext
8058 if { (eval echo "$as_me:8058: \"$ac_compile\"") >&5
8059 (eval $ac_compile) 2>&5
8061 echo "$as_me:8061: \$? = $ac_status" >&5
8062 (exit $ac_status); } &&
8063 { ac_try='test -s conftest.$ac_objext'
8064 { (eval echo "$as_me:8064: \"$ac_try\"") >&5
8067 echo "$as_me:8067: \$? = $ac_status" >&5
8068 (exit $ac_status); }; }; then
8071 echo "$as_me: failed program was:" >&5
8072 cat conftest.$ac_ext >&5
8075 rm -f conftest.$ac_objext conftest.$ac_ext
8076 CPPFLAGS=$cf_save_CPPFLAGS
8081 if test "$cf_have_incdir" = no ; then
8082 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8084 echo "${as_me:-configure}:8084: testing adding $cf_add_incdir to include-path ..." 1>&5
8086 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8088 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8089 test "$cf_top_incdir" = "$cf_add_incdir" && break
8090 cf_add_incdir="$cf_top_incdir"
8101 # Set definitions to allow ifdef'ing for ncurses.h
8103 case $cf_cv_ncurses_header in
8106 cat >>confdefs.h <<\EOF
8107 #define HAVE_NCURSES_H 1
8113 case $cf_cv_ncurses_header in
8114 (ncurses/curses.h|ncurses/ncurses.h)
8116 cat >>confdefs.h <<\EOF
8117 #define HAVE_NCURSES_NCURSES_H 1
8121 (ncursesw/curses.h|ncursesw/ncurses.h)
8123 cat >>confdefs.h <<\EOF
8124 #define HAVE_NCURSESW_NCURSES_H 1
8130 echo "$as_me:8130: checking for terminfo header" >&5
8131 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8132 if test "${cf_cv_term_header+set}" = set; then
8133 echo $ECHO_N "(cached) $ECHO_C" >&6
8136 case ${cf_cv_ncurses_header} in
8137 (*/ncurses.h|*/ncursesw.h)
8138 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8141 cf_term_header=term.h
8145 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8147 cat >conftest.$ac_ext <<_ACEOF
8148 #line 8148 "configure"
8149 #include "confdefs.h"
8151 #include <${cf_cv_ncurses_header:-curses.h}>
8157 int x = auto_left_margin
8162 rm -f conftest.$ac_objext
8163 if { (eval echo "$as_me:8163: \"$ac_compile\"") >&5
8164 (eval $ac_compile) 2>&5
8166 echo "$as_me:8166: \$? = $ac_status" >&5
8167 (exit $ac_status); } &&
8168 { ac_try='test -s conftest.$ac_objext'
8169 { (eval echo "$as_me:8169: \"$ac_try\"") >&5
8172 echo "$as_me:8172: \$? = $ac_status" >&5
8173 (exit $ac_status); }; }; then
8175 cf_cv_term_header="$cf_test"
8177 echo "$as_me: failed program was:" >&5
8178 cat conftest.$ac_ext >&5
8180 cf_cv_term_header=unknown
8183 rm -f conftest.$ac_objext conftest.$ac_ext
8184 test "$cf_cv_term_header" != unknown && break
8188 echo "$as_me:8188: result: $cf_cv_term_header" >&5
8189 echo "${ECHO_T}$cf_cv_term_header" >&6
8191 # Set definitions to allow ifdef'ing to accommodate subdirectories
8193 case $cf_cv_term_header in
8196 cat >>confdefs.h <<\EOF
8197 #define HAVE_TERM_H 1
8203 case $cf_cv_term_header in
8206 cat >>confdefs.h <<\EOF
8207 #define HAVE_NCURSES_TERM_H 1
8213 cat >>confdefs.h <<\EOF
8214 #define HAVE_NCURSESW_TERM_H 1
8220 # some applications need this, but should check for NCURSES_VERSION
8222 cat >>confdefs.h <<\EOF
8226 echo "$as_me:8226: checking for ncurses version" >&5
8227 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8228 if test "${cf_cv_ncurses_version+set}" = set; then
8229 echo $ECHO_N "(cached) $ECHO_C" >&6
8232 cf_cv_ncurses_version=no
8235 if test "$cross_compiling" = yes; then
8237 # This will not work if the preprocessor splits the line after the
8238 # Autoconf token. The 'unproto' program does that.
8239 cat > conftest.$ac_ext <<EOF
8240 #include <${cf_cv_ncurses_header:-curses.h}>
8242 #ifdef NCURSES_VERSION
8243 Autoconf NCURSES_VERSION
8251 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8252 { (eval echo "$as_me:8252: \"$cf_try\"") >&5
8255 echo "$as_me:8255: \$? = $ac_status" >&5
8256 (exit $ac_status); }
8257 if test -f conftest.out ; then
8258 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8259 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8264 cat >conftest.$ac_ext <<_ACEOF
8265 #line 8265 "configure"
8266 #include "confdefs.h"
8268 #include <${cf_cv_ncurses_header:-curses.h}>
8272 FILE *fp = fopen("$cf_tempfile", "w");
8273 #ifdef NCURSES_VERSION
8274 # ifdef NCURSES_VERSION_PATCH
8275 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8277 fprintf(fp, "%s\n", NCURSES_VERSION);
8281 fprintf(fp, "old\n");
8286 ${cf_cv_main_return:-return}(0);
8289 rm -f conftest$ac_exeext
8290 if { (eval echo "$as_me:8290: \"$ac_link\"") >&5
8291 (eval $ac_link) 2>&5
8293 echo "$as_me:8293: \$? = $ac_status" >&5
8294 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8295 { (eval echo "$as_me:8295: \"$ac_try\"") >&5
8298 echo "$as_me:8298: \$? = $ac_status" >&5
8299 (exit $ac_status); }; }; then
8301 cf_cv_ncurses_version=`cat $cf_tempfile`
8303 echo "$as_me: program exited with status $ac_status" >&5
8304 echo "$as_me: failed program was:" >&5
8305 cat conftest.$ac_ext >&5
8307 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8312 echo "$as_me:8312: result: $cf_cv_ncurses_version" >&5
8313 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8314 test "$cf_cv_ncurses_version" = no ||
8315 cat >>confdefs.h <<\EOF
8319 cf_nculib_root=ncurses
8320 # This works, except for the special case where we find gpm, but
8321 # ncurses is in a nonstandard location via $LIBS, and we really want
8324 cf_ncurses_SAVE="$LIBS"
8325 echo "$as_me:8325: checking for Gpm_Open in -lgpm" >&5
8326 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8327 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8328 echo $ECHO_N "(cached) $ECHO_C" >&6
8330 ac_check_lib_save_LIBS=$LIBS
8332 cat >conftest.$ac_ext <<_ACEOF
8333 #line 8333 "configure"
8334 #include "confdefs.h"
8336 /* Override any gcc2 internal prototype to avoid an error. */
8340 /* We use char because int might match the return type of a gcc2
8341 builtin and then its argument prototype would still apply. */
8351 rm -f conftest.$ac_objext conftest$ac_exeext
8352 if { (eval echo "$as_me:8352: \"$ac_link\"") >&5
8353 (eval $ac_link) 2>&5
8355 echo "$as_me:8355: \$? = $ac_status" >&5
8356 (exit $ac_status); } &&
8357 { ac_try='test -s conftest$ac_exeext'
8358 { (eval echo "$as_me:8358: \"$ac_try\"") >&5
8361 echo "$as_me:8361: \$? = $ac_status" >&5
8362 (exit $ac_status); }; }; then
8363 ac_cv_lib_gpm_Gpm_Open=yes
8365 echo "$as_me: failed program was:" >&5
8366 cat conftest.$ac_ext >&5
8367 ac_cv_lib_gpm_Gpm_Open=no
8369 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8370 LIBS=$ac_check_lib_save_LIBS
8372 echo "$as_me:8372: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8373 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8374 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8375 echo "$as_me:8375: checking for initscr in -lgpm" >&5
8376 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8377 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8378 echo $ECHO_N "(cached) $ECHO_C" >&6
8380 ac_check_lib_save_LIBS=$LIBS
8382 cat >conftest.$ac_ext <<_ACEOF
8383 #line 8383 "configure"
8384 #include "confdefs.h"
8386 /* Override any gcc2 internal prototype to avoid an error. */
8390 /* We use char because int might match the return type of a gcc2
8391 builtin and then its argument prototype would still apply. */
8401 rm -f conftest.$ac_objext conftest$ac_exeext
8402 if { (eval echo "$as_me:8402: \"$ac_link\"") >&5
8403 (eval $ac_link) 2>&5
8405 echo "$as_me:8405: \$? = $ac_status" >&5
8406 (exit $ac_status); } &&
8407 { ac_try='test -s conftest$ac_exeext'
8408 { (eval echo "$as_me:8408: \"$ac_try\"") >&5
8411 echo "$as_me:8411: \$? = $ac_status" >&5
8412 (exit $ac_status); }; }; then
8413 ac_cv_lib_gpm_initscr=yes
8415 echo "$as_me: failed program was:" >&5
8416 cat conftest.$ac_ext >&5
8417 ac_cv_lib_gpm_initscr=no
8419 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8420 LIBS=$ac_check_lib_save_LIBS
8422 echo "$as_me:8422: result: $ac_cv_lib_gpm_initscr" >&5
8423 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8424 if test $ac_cv_lib_gpm_initscr = yes; then
8425 LIBS="$cf_ncurses_SAVE"
8427 cf_ncurses_LIBS="-lgpm"
8434 # This is only necessary if you are linking against an obsolete
8435 # version of ncurses (but it should do no harm, since it's static).
8436 if test "$cf_nculib_root" = ncurses ; then
8437 echo "$as_me:8437: checking for tgoto in -lmytinfo" >&5
8438 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8439 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8440 echo $ECHO_N "(cached) $ECHO_C" >&6
8442 ac_check_lib_save_LIBS=$LIBS
8443 LIBS="-lmytinfo $LIBS"
8444 cat >conftest.$ac_ext <<_ACEOF
8445 #line 8445 "configure"
8446 #include "confdefs.h"
8448 /* Override any gcc2 internal prototype to avoid an error. */
8452 /* We use char because int might match the return type of a gcc2
8453 builtin and then its argument prototype would still apply. */
8463 rm -f conftest.$ac_objext conftest$ac_exeext
8464 if { (eval echo "$as_me:8464: \"$ac_link\"") >&5
8465 (eval $ac_link) 2>&5
8467 echo "$as_me:8467: \$? = $ac_status" >&5
8468 (exit $ac_status); } &&
8469 { ac_try='test -s conftest$ac_exeext'
8470 { (eval echo "$as_me:8470: \"$ac_try\"") >&5
8473 echo "$as_me:8473: \$? = $ac_status" >&5
8474 (exit $ac_status); }; }; then
8475 ac_cv_lib_mytinfo_tgoto=yes
8477 echo "$as_me: failed program was:" >&5
8478 cat conftest.$ac_ext >&5
8479 ac_cv_lib_mytinfo_tgoto=no
8481 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8482 LIBS=$ac_check_lib_save_LIBS
8484 echo "$as_me:8484: result: $ac_cv_lib_mytinfo_tgoto" >&5
8485 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8486 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8487 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8494 cf_add_libs="$cf_ncurses_LIBS"
8495 # Filter out duplicates - this happens with badly-designed ".pc" files...
8496 for cf_add_1lib in $LIBS
8498 for cf_add_2lib in $cf_add_libs
8500 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8506 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8510 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8513 cf_add_libs="-l$cf_nculib_root"
8514 # Filter out duplicates - this happens with badly-designed ".pc" files...
8515 for cf_add_1lib in $LIBS
8517 for cf_add_2lib in $cf_add_libs
8519 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8525 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8531 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
8533 echo "$as_me:8533: checking for initscr" >&5
8534 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8535 if test "${ac_cv_func_initscr+set}" = set; then
8536 echo $ECHO_N "(cached) $ECHO_C" >&6
8538 cat >conftest.$ac_ext <<_ACEOF
8539 #line 8539 "configure"
8540 #include "confdefs.h"
8541 /* System header to define __stub macros and hopefully few prototypes,
8542 which can conflict with char initscr (); below. */
8544 /* Override any gcc2 internal prototype to avoid an error. */
8548 /* We use char because int might match the return type of a gcc2
8549 builtin and then its argument prototype would still apply. */
8556 /* The GNU C library defines this for functions which it implements
8557 to always fail with ENOSYS. Some functions are actually named
8558 something starting with __ and the normal name is an alias. */
8559 #if defined (__stub_initscr) || defined (__stub___initscr)
8562 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8569 rm -f conftest.$ac_objext conftest$ac_exeext
8570 if { (eval echo "$as_me:8570: \"$ac_link\"") >&5
8571 (eval $ac_link) 2>&5
8573 echo "$as_me:8573: \$? = $ac_status" >&5
8574 (exit $ac_status); } &&
8575 { ac_try='test -s conftest$ac_exeext'
8576 { (eval echo "$as_me:8576: \"$ac_try\"") >&5
8579 echo "$as_me:8579: \$? = $ac_status" >&5
8580 (exit $ac_status); }; }; then
8581 ac_cv_func_initscr=yes
8583 echo "$as_me: failed program was:" >&5
8584 cat conftest.$ac_ext >&5
8585 ac_cv_func_initscr=no
8587 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8589 echo "$as_me:8589: result: $ac_cv_func_initscr" >&5
8590 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8591 if test $ac_cv_func_initscr = yes; then
8592 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8595 cf_save_LIBS="$LIBS"
8596 echo "$as_me:8596: checking for initscr in -l$cf_nculib_root" >&5
8597 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8598 LIBS="-l$cf_nculib_root $LIBS"
8599 cat >conftest.$ac_ext <<_ACEOF
8600 #line 8600 "configure"
8601 #include "confdefs.h"
8602 #include <${cf_cv_ncurses_header:-curses.h}>
8611 rm -f conftest.$ac_objext conftest$ac_exeext
8612 if { (eval echo "$as_me:8612: \"$ac_link\"") >&5
8613 (eval $ac_link) 2>&5
8615 echo "$as_me:8615: \$? = $ac_status" >&5
8616 (exit $ac_status); } &&
8617 { ac_try='test -s conftest$ac_exeext'
8618 { (eval echo "$as_me:8618: \"$ac_try\"") >&5
8621 echo "$as_me:8621: \$? = $ac_status" >&5
8622 (exit $ac_status); }; }; then
8623 echo "$as_me:8623: result: yes" >&5
8624 echo "${ECHO_T}yes" >&6
8625 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8628 echo "$as_me: failed program was:" >&5
8629 cat conftest.$ac_ext >&5
8630 echo "$as_me:8630: result: no" >&5
8631 echo "${ECHO_T}no" >&6
8634 cf_library_path_list=""
8635 if test -n "${LDFLAGS}${LIBS}" ; then
8636 for cf_library_path in $LDFLAGS $LIBS
8638 case $cf_library_path in
8640 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8642 test "x$cf_library_path" != "xNONE" && \
8643 test -d "$cf_library_path" && \
8645 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8646 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
8647 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
8648 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
8649 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
8650 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"
8653 cf_library_path_list="$cf_library_path_list $cf_search"
8661 test "x$prefix" != "xNONE" && \
8662 test -d "$prefix" && \
8664 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8665 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
8666 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
8667 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
8668 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
8669 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
8672 for cf_subdir_prefix in \
8681 test "x$cf_subdir_prefix" != "x$prefix" && \
8682 test -d "$cf_subdir_prefix" && \
8683 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8684 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
8685 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
8686 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
8687 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
8688 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
8689 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"
8694 cf_search="$cf_library_path_list $cf_search"
8696 for cf_libdir in $cf_search
8698 echo "$as_me:8698: checking for -l$cf_nculib_root in $cf_libdir" >&5
8699 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
8700 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
8701 cat >conftest.$ac_ext <<_ACEOF
8702 #line 8702 "configure"
8703 #include "confdefs.h"
8704 #include <${cf_cv_ncurses_header:-curses.h}>
8713 rm -f conftest.$ac_objext conftest$ac_exeext
8714 if { (eval echo "$as_me:8714: \"$ac_link\"") >&5
8715 (eval $ac_link) 2>&5
8717 echo "$as_me:8717: \$? = $ac_status" >&5
8718 (exit $ac_status); } &&
8719 { ac_try='test -s conftest$ac_exeext'
8720 { (eval echo "$as_me:8720: \"$ac_try\"") >&5
8723 echo "$as_me:8723: \$? = $ac_status" >&5
8724 (exit $ac_status); }; }; then
8725 echo "$as_me:8725: result: yes" >&5
8726 echo "${ECHO_T}yes" >&6
8727 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8730 echo "$as_me: failed program was:" >&5
8731 cat conftest.$ac_ext >&5
8732 echo "$as_me:8732: result: no" >&5
8733 echo "${ECHO_T}no" >&6
8734 LIBS="$cf_save_LIBS"
8736 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8740 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8744 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
8746 if test $cf_found_library = no ; then
8747 { { echo "$as_me:8747: error: Cannot link $cf_nculib_root library" >&5
8748 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
8749 { (exit 1); exit 1; }; }
8754 if test -n "$cf_ncurses_LIBS" ; then
8755 echo "$as_me:8755: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
8756 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
8757 cf_ncurses_SAVE="$LIBS"
8758 for p in $cf_ncurses_LIBS ; do
8759 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
8760 if test "$q" != "$LIBS" ; then
8764 cat >conftest.$ac_ext <<_ACEOF
8765 #line 8765 "configure"
8766 #include "confdefs.h"
8767 #include <${cf_cv_ncurses_header:-curses.h}>
8771 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8776 rm -f conftest.$ac_objext conftest$ac_exeext
8777 if { (eval echo "$as_me:8777: \"$ac_link\"") >&5
8778 (eval $ac_link) 2>&5
8780 echo "$as_me:8780: \$? = $ac_status" >&5
8781 (exit $ac_status); } &&
8782 { ac_try='test -s conftest$ac_exeext'
8783 { (eval echo "$as_me:8783: \"$ac_try\"") >&5
8786 echo "$as_me:8786: \$? = $ac_status" >&5
8787 (exit $ac_status); }; }; then
8788 echo "$as_me:8788: result: yes" >&5
8789 echo "${ECHO_T}yes" >&6
8791 echo "$as_me: failed program was:" >&5
8792 cat conftest.$ac_ext >&5
8793 echo "$as_me:8793: result: no" >&5
8794 echo "${ECHO_T}no" >&6
8795 LIBS="$cf_ncurses_SAVE"
8797 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8800 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8802 cat >>confdefs.h <<EOF
8803 #define $cf_nculib_ROOT 1
8813 if test "$NCURSES_CONFIG_PKG" != none ; then
8814 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
8816 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
8817 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
8818 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
8820 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
8821 if test -z "$cf_cv_abi_version"
8823 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
8826 elif test "$NCURSES_CONFIG" != none ; then
8828 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
8830 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
8831 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
8832 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
8834 # ABI version is not available from headers
8835 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
8839 for cf_name in MAJOR MINOR PATCH
8841 cat >conftest.$ac_ext <<CF_EOF
8842 #include <${cf_cv_ncurses_header:-curses.h}>
8843 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
8845 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
8846 { (eval echo "$as_me:8846: \"$cf_try\"") >&5
8849 echo "$as_me:8849: \$? = $ac_status" >&5
8850 (exit $ac_status); }
8851 if test -f conftest.out ; then
8852 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[ ][ ]*//"`
8853 eval NCURSES_$cf_name=\"$cf_result\"
8854 # cat conftest.$ac_ext
8859 cf_cv_abi_version=${NCURSES_MAJOR}
8863 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
8865 cf_cv_timestamp=`date`
8867 echo "$as_me:8867: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
8868 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
8870 echo "$as_me:8870: checking if you want to have a library-prefix" >&5
8871 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
8873 # Check whether --with-lib-prefix or --without-lib-prefix was given.
8874 if test "${with_lib_prefix+set}" = set; then
8875 withval="$with_lib_prefix"
8876 with_lib_prefix=$withval
8878 with_lib_prefix=auto
8880 echo "$as_me:8880: result: $with_lib_prefix" >&5
8881 echo "${ECHO_T}$with_lib_prefix" >&6
8883 if test $with_lib_prefix = auto
8886 case $cf_cv_system_name in
8890 (*) LIB_PREFIX='lib'
8893 cf_prefix=$LIB_PREFIX
8895 elif test $with_lib_prefix = no
8899 LIB_PREFIX=$with_lib_prefix
8904 ###############################################################################
8906 if test X"$CC_G_OPT" = X"" ; then
8908 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
8911 echo "$as_me:8911: checking for default loader flags" >&5
8912 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
8913 case $DFT_LWR_MODEL in
8914 (normal) LD_MODEL='' ;;
8915 (debug) LD_MODEL=$CC_G_OPT ;;
8916 (profile) LD_MODEL='-pg';;
8917 (shared) LD_MODEL='' ;;
8919 echo "$as_me:8919: result: $LD_MODEL" >&5
8920 echo "${ECHO_T}$LD_MODEL" >&6
8923 echo "$as_me:8923: checking for an rpath option" >&5
8924 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
8925 case $cf_cv_system_name in
8927 if test "$GCC" = yes; then
8928 LD_RPATH_OPT="-Wl,-rpath,"
8930 LD_RPATH_OPT="-rpath "
8933 (linux*|gnu*|k*bsd*-gnu)
8934 LD_RPATH_OPT="-Wl,-rpath,"
8936 (openbsd[2-9].*|mirbsd*)
8937 LD_RPATH_OPT="-Wl,-rpath,"
8939 (dragonfly*|freebsd*)
8940 LD_RPATH_OPT="-rpath "
8943 LD_RPATH_OPT="-Wl,-rpath,"
8946 LD_RPATH_OPT="-rpath "
8954 echo "$as_me:8954: result: $LD_RPATH_OPT" >&5
8955 echo "${ECHO_T}$LD_RPATH_OPT" >&6
8957 case "x$LD_RPATH_OPT" in
8959 echo "$as_me:8959: checking if we need a space after rpath option" >&5
8960 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
8961 cf_save_LIBS="$LIBS"
8963 cf_add_libs="${LD_RPATH_OPT}$libdir"
8964 # Filter out duplicates - this happens with badly-designed ".pc" files...
8965 for cf_add_1lib in $LIBS
8967 for cf_add_2lib in $cf_add_libs
8969 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8975 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8979 cat >conftest.$ac_ext <<_ACEOF
8980 #line 8980 "configure"
8981 #include "confdefs.h"
8991 rm -f conftest.$ac_objext conftest$ac_exeext
8992 if { (eval echo "$as_me:8992: \"$ac_link\"") >&5
8993 (eval $ac_link) 2>&5
8995 echo "$as_me:8995: \$? = $ac_status" >&5
8996 (exit $ac_status); } &&
8997 { ac_try='test -s conftest$ac_exeext'
8998 { (eval echo "$as_me:8998: \"$ac_try\"") >&5
9001 echo "$as_me:9001: \$? = $ac_status" >&5
9002 (exit $ac_status); }; }; then
9005 echo "$as_me: failed program was:" >&5
9006 cat conftest.$ac_ext >&5
9009 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9010 LIBS="$cf_save_LIBS"
9011 echo "$as_me:9011: result: $cf_rpath_space" >&5
9012 echo "${ECHO_T}$cf_rpath_space" >&6
9013 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
9021 INSTALL_LIB="-m 644"
9022 : ${rel_builddir:=.}
9028 cf_cv_do_symlinks=no
9030 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
9032 echo "$as_me:9032: checking if release/abi version should be used for shared libs" >&5
9033 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
9035 # Check whether --with-shlib-version or --without-shlib-version was given.
9036 if test "${with_shlib_version+set}" = set; then
9037 withval="$with_shlib_version"
9038 test -z "$withval" && withval=auto
9041 cf_cv_shlib_version=auto
9044 cf_cv_shlib_version=$withval
9047 { { echo "$as_me:9047: error: option value must be one of: rel, abi, auto or no" >&5
9048 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
9049 { (exit 1); exit 1; }; }
9054 cf_cv_shlib_version=auto
9056 echo "$as_me:9056: result: $cf_cv_shlib_version" >&5
9057 echo "${ECHO_T}$cf_cv_shlib_version" >&6
9062 # Some less-capable ports of gcc support only -fpic
9064 if test "$GCC" = yes
9066 echo "$as_me:9066: checking which $CC option to use" >&5
9067 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
9068 cf_save_CFLAGS="$CFLAGS"
9069 for CC_SHARED_OPTS in -fPIC -fpic ''
9071 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
9072 cat >conftest.$ac_ext <<_ACEOF
9073 #line 9073 "configure"
9074 #include "confdefs.h"
9084 rm -f conftest.$ac_objext
9085 if { (eval echo "$as_me:9085: \"$ac_compile\"") >&5
9086 (eval $ac_compile) 2>&5
9088 echo "$as_me:9088: \$? = $ac_status" >&5
9089 (exit $ac_status); } &&
9090 { ac_try='test -s conftest.$ac_objext'
9091 { (eval echo "$as_me:9091: \"$ac_try\"") >&5
9094 echo "$as_me:9094: \$? = $ac_status" >&5
9095 (exit $ac_status); }; }; then
9098 echo "$as_me: failed program was:" >&5
9099 cat conftest.$ac_ext >&5
9101 rm -f conftest.$ac_objext conftest.$ac_ext
9103 echo "$as_me:9103: result: $CC_SHARED_OPTS" >&5
9104 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
9105 CFLAGS="$cf_save_CFLAGS"
9108 cf_cv_shlib_version_infix=no
9110 case $cf_cv_system_name in
9111 (aix4.3-9*|aix[5-7]*)
9112 if test "$GCC" = yes; then
9113 CC_SHARED_OPTS='-Wl,-brtl'
9114 MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
9116 CC_SHARED_OPTS='-brtl'
9117 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
9118 MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
9122 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
9126 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9127 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9128 cf_cv_shlib_version=cygdll
9129 cf_cv_shlib_version_infix=cygdll
9132 cat >mk_shared_lib.sh <<-CF_EOF
9135 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
9138 Linking shared library
9139 ** SHARED_LIB \$SHARED_LIB
9140 ** IMPORT_LIB \$IMPORT_LIB
9142 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9144 chmod +x mk_shared_lib.sh
9148 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9149 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9150 cf_cv_shlib_version=msysdll
9151 cf_cv_shlib_version_infix=msysdll
9154 cat >mk_shared_lib.sh <<-CF_EOF
9157 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
9160 Linking shared library
9161 ** SHARED_LIB \$SHARED_LIB
9162 ** IMPORT_LIB \$IMPORT_LIB
9164 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9166 chmod +x mk_shared_lib.sh
9169 cf_try_cflags="no-cpp-precomp"
9170 CC_SHARED_OPTS="-dynamic"
9171 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
9172 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
9173 cf_cv_shlib_version_infix=yes
9174 echo "$as_me:9174: checking if ld -search_paths_first works" >&5
9175 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
9176 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
9177 echo $ECHO_N "(cached) $ECHO_C" >&6
9180 cf_save_LDFLAGS=$LDFLAGS
9181 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9182 cat >conftest.$ac_ext <<_ACEOF
9183 #line 9183 "configure"
9184 #include "confdefs.h"
9194 rm -f conftest.$ac_objext conftest$ac_exeext
9195 if { (eval echo "$as_me:9195: \"$ac_link\"") >&5
9196 (eval $ac_link) 2>&5
9198 echo "$as_me:9198: \$? = $ac_status" >&5
9199 (exit $ac_status); } &&
9200 { ac_try='test -s conftest$ac_exeext'
9201 { (eval echo "$as_me:9201: \"$ac_try\"") >&5
9204 echo "$as_me:9204: \$? = $ac_status" >&5
9205 (exit $ac_status); }; }; then
9206 cf_cv_ldflags_search_paths_first=yes
9208 echo "$as_me: failed program was:" >&5
9209 cat conftest.$ac_ext >&5
9210 cf_cv_ldflags_search_paths_first=no
9212 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9213 LDFLAGS=$cf_save_LDFLAGS
9215 echo "$as_me:9215: result: $cf_cv_ldflags_search_paths_first" >&5
9216 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
9217 if test $cf_cv_ldflags_search_paths_first = yes; then
9218 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9222 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
9223 if test "$GCC" != yes; then
9226 MK_SHARED_LIB='${LD} -b -o $@'
9227 INSTALL_LIB="-m 555"
9230 # (tested with gcc 2.7.2 -- I don't have c89)
9231 if test "$GCC" = yes; then
9232 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
9235 LD_SHARED_OPTS='-Wl,+b,${libdir}'
9237 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
9238 # HP-UX shared libraries must be executable, and should be
9239 # readonly to exploit a quirk in the memory manager.
9240 INSTALL_LIB="-m 555"
9243 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9244 if test "$cf_cv_shlib_version" = rel; then
9245 cf_shared_soname='`basename .${REL_VERSION}`.${ABI_VERSION}'
9247 cf_shared_soname='`basename `'
9250 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
9253 if test "$cf_cv_enable_rpath" = yes ; then
9254 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9256 # tested with IRIX 5.2 and 'cc'.
9257 if test "$GCC" != yes; then
9258 CC_SHARED_OPTS='-KPIC'
9259 MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
9261 MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
9263 cf_cv_rm_so_locs=yes
9265 (linux*|gnu*|k*bsd*-gnu)
9266 if test "$DFT_LWR_MODEL" = "shared" ; then
9267 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9268 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9270 if test "$cf_cv_enable_rpath" = yes ; then
9271 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9274 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9275 if test "$cf_cv_shlib_version" = rel; then
9276 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9278 cf_cv_shared_soname='`basename $@`'
9281 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9284 cf_cv_shlib_version=mingw
9285 cf_cv_shlib_version_infix=mingw
9288 if test "$DFT_LWR_MODEL" = "shared" ; then
9289 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
9290 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9291 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
9294 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9295 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9296 cat >mk_shared_lib.sh <<-CF_EOF
9299 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
9302 Linking shared library
9303 ** SHARED_LIB \$SHARED_LIB
9304 ** IMPORT_LIB \$IMPORT_LIB
9306 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9308 chmod +x mk_shared_lib.sh
9310 (openbsd[2-9].*|mirbsd*)
9311 if test "$DFT_LWR_MODEL" = "shared" ; then
9312 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9313 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9315 if test "$cf_cv_enable_rpath" = yes ; then
9316 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9318 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9320 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9321 if test "$cf_cv_shlib_version" = rel; then
9322 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9324 cf_cv_shared_soname='`basename $@`'
9327 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9329 (nto-qnx*|openbsd*|freebsd[12].*)
9330 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9331 MK_SHARED_LIB='${LD} -Bshareable -o $@'
9332 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9334 (dragonfly*|freebsd*)
9335 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9336 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
9337 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
9338 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
9339 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9342 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9343 if test "$cf_cv_shlib_version" = rel; then
9344 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9346 cf_cv_shared_soname='`basename $@`'
9349 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9352 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9353 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
9354 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
9355 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9356 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9357 if test "$cf_cv_shlib_version" = auto; then
9358 if test -f /usr/libexec/ld.elf_so; then
9359 cf_cv_shlib_version=abi
9361 cf_cv_shlib_version=rel
9365 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9366 if test "$cf_cv_shlib_version" = rel; then
9367 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9369 cf_cv_shared_soname='`basename $@`'
9372 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
9374 MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
9378 # tested with OSF/1 V3.2 and 'cc'
9379 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
9380 # link with shared libs).
9381 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
9384 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
9387 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
9388 if test "$DFT_LWR_MODEL" = "shared" ; then
9389 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9390 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9392 cf_cv_rm_so_locs=yes
9394 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
9395 # tested with osr5.0.5
9396 if test "$GCC" != yes; then
9397 CC_SHARED_OPTS='-belf -KPIC'
9399 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
9400 if test "$cf_cv_enable_rpath" = yes ; then
9401 # only way is to set LD_RUN_PATH but no switch for it
9404 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9405 LINK_PROGS='LD_RUN_PATH=${libdir}'
9406 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
9409 # tested with SunOS 4.1.1 and gcc 2.7.0
9410 if test "$GCC" != yes; then
9411 CC_SHARED_OPTS='-KPIC'
9413 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
9414 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9417 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
9418 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
9419 if test "$DFT_LWR_MODEL" = "shared" ; then
9420 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
9421 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9423 if test "$cf_cv_enable_rpath" = yes ; then
9424 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
9427 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9428 if test "$cf_cv_shlib_version" = rel; then
9429 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9431 cf_cv_shared_soname='`basename $@`'
9434 if test "$GCC" != yes; then
9435 cf_save_CFLAGS="$CFLAGS"
9436 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
9438 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
9439 cat >conftest.$ac_ext <<_ACEOF
9440 #line 9440 "configure"
9441 #include "confdefs.h"
9451 rm -f conftest.$ac_objext
9452 if { (eval echo "$as_me:9452: \"$ac_compile\"") >&5
9453 (eval $ac_compile) 2>&5
9455 echo "$as_me:9455: \$? = $ac_status" >&5
9456 (exit $ac_status); } &&
9457 { ac_try='test -s conftest.$ac_objext'
9458 { (eval echo "$as_me:9458: \"$ac_try\"") >&5
9461 echo "$as_me:9461: \$? = $ac_status" >&5
9462 (exit $ac_status); }; }; then
9465 echo "$as_me: failed program was:" >&5
9466 cat conftest.$ac_ext >&5
9468 rm -f conftest.$ac_objext conftest.$ac_ext
9470 CFLAGS="$cf_save_CFLAGS"
9471 CC_SHARED_OPTS=$cf_shared_opts
9472 MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
9474 MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
9477 (sysv5uw7*|unix_sv*)
9478 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
9479 if test "$GCC" != yes; then
9480 CC_SHARED_OPTS='-KPIC'
9482 MK_SHARED_LIB='${LD} -d y -G -o $@'
9485 CC_SHARED_OPTS='unknown'
9486 MK_SHARED_LIB='echo unknown'
9490 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
9491 case "$cf_cv_shlib_version" in
9493 case "$MK_SHARED_LIB" in
9495 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
9498 { echo "$as_me:9498: WARNING: ignored --with-shlib-version" >&5
9499 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
9505 if test -n "$cf_try_cflags"
9507 cat > conftest.$ac_ext <<EOF
9508 #line 9508 "${as_me:-configure}"
9510 int main(int argc, char *argv[])
9513 return (argv[argc-1] == 0) ;
9516 cf_save_CFLAGS="$CFLAGS"
9517 for cf_opt in $cf_try_cflags
9519 CFLAGS="$cf_save_CFLAGS -$cf_opt"
9520 echo "$as_me:9520: checking if CFLAGS option -$cf_opt works" >&5
9521 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
9522 if { (eval echo "$as_me:9522: \"$ac_compile\"") >&5
9523 (eval $ac_compile) 2>&5
9525 echo "$as_me:9525: \$? = $ac_status" >&5
9526 (exit $ac_status); }; then
9527 echo "$as_me:9527: result: yes" >&5
9528 echo "${ECHO_T}yes" >&6
9529 cf_save_CFLAGS="$CFLAGS"
9531 echo "$as_me:9531: result: no" >&5
9532 echo "${ECHO_T}no" >&6
9535 CFLAGS="$cf_save_CFLAGS"
9538 # RPATH_LIST is a colon-separated list of directories
9539 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
9540 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
9542 test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
9544 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
9546 echo "${as_me:-configure}:9546: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
9548 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
9550 echo "${as_me:-configure}:9550: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
9552 # The test/sample programs in the original tree link using rpath option.
9553 # Make it optional for packagers.
9554 if test -n "$LOCAL_LDFLAGS"
9556 echo "$as_me:9556: checking if you want to link sample programs with rpath option" >&5
9557 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
9559 # Check whether --enable-rpath-link or --disable-rpath-link was given.
9560 if test "${enable_rpath_link+set}" = set; then
9561 enableval="$enable_rpath_link"
9562 with_rpath_link=$enableval
9566 echo "$as_me:9566: result: $with_rpath_link" >&5
9567 echo "${ECHO_T}$with_rpath_link" >&6
9568 if test "$with_rpath_link" = no
9575 ###############################################################################
9577 ### use option --enable-broken-linker to force on use of broken-linker support
9578 echo "$as_me:9578: checking if you want broken-linker support code" >&5
9579 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9581 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9582 if test "${enable_broken_linker+set}" = set; then
9583 enableval="$enable_broken_linker"
9584 with_broken_linker=$enableval
9586 with_broken_linker=${BROKEN_LINKER:-no}
9588 echo "$as_me:9588: result: $with_broken_linker" >&5
9589 echo "${ECHO_T}$with_broken_linker" >&6
9592 if test "$with_broken_linker" = yes ; then
9593 cat >>confdefs.h <<\EOF
9594 #define BROKEN_LINKER 1
9598 elif test "$DFT_LWR_MODEL" = shared ; then
9599 case $cf_cv_system_name in
9601 cat >>confdefs.h <<\EOF
9602 #define BROKEN_LINKER 1
9606 test -n "$verbose" && echo " cygwin linker is broken anyway" 1>&6
9608 echo "${as_me:-configure}:9608: testing cygwin linker is broken anyway ..." 1>&5
9614 # Check to define _XOPEN_SOURCE "automatically"
9617 cf_POSIX_C_SOURCE=199506L
9622 cf_xopen_source="-D_ALL_SOURCE"
9628 cf_xopen_source="-D_APPLE_C_SOURCE"
9631 cf_xopen_source="-D_DARWIN_C_SOURCE"
9634 (freebsd*|dragonfly*)
9635 # 5.x headers associate
9636 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9637 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9638 cf_POSIX_C_SOURCE=200112L
9640 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9643 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9646 cf_xopen_source="-D_HPUX_SOURCE"
9649 cf_xopen_source="-D_SGI_SOURCE"
9652 (linux*|gnu*|mint*|k*bsd*-gnu)
9654 echo "$as_me:9654: checking if we must define _GNU_SOURCE" >&5
9655 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9656 if test "${cf_cv_gnu_source+set}" = set; then
9657 echo $ECHO_N "(cached) $ECHO_C" >&6
9660 cat >conftest.$ac_ext <<_ACEOF
9661 #line 9661 "configure"
9662 #include "confdefs.h"
9663 #include <sys/types.h>
9668 #ifndef _XOPEN_SOURCE
9675 rm -f conftest.$ac_objext
9676 if { (eval echo "$as_me:9676: \"$ac_compile\"") >&5
9677 (eval $ac_compile) 2>&5
9679 echo "$as_me:9679: \$? = $ac_status" >&5
9680 (exit $ac_status); } &&
9681 { ac_try='test -s conftest.$ac_objext'
9682 { (eval echo "$as_me:9682: \"$ac_try\"") >&5
9685 echo "$as_me:9685: \$? = $ac_status" >&5
9686 (exit $ac_status); }; }; then
9689 echo "$as_me: failed program was:" >&5
9690 cat conftest.$ac_ext >&5
9692 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
9693 cat >conftest.$ac_ext <<_ACEOF
9694 #line 9694 "configure"
9695 #include "confdefs.h"
9696 #include <sys/types.h>
9701 #ifdef _XOPEN_SOURCE
9708 rm -f conftest.$ac_objext
9709 if { (eval echo "$as_me:9709: \"$ac_compile\"") >&5
9710 (eval $ac_compile) 2>&5
9712 echo "$as_me:9712: \$? = $ac_status" >&5
9713 (exit $ac_status); } &&
9714 { ac_try='test -s conftest.$ac_objext'
9715 { (eval echo "$as_me:9715: \"$ac_try\"") >&5
9718 echo "$as_me:9718: \$? = $ac_status" >&5
9719 (exit $ac_status); }; }; then
9722 echo "$as_me: failed program was:" >&5
9723 cat conftest.$ac_ext >&5
9724 cf_cv_gnu_source=yes
9726 rm -f conftest.$ac_objext conftest.$ac_ext
9730 rm -f conftest.$ac_objext conftest.$ac_ext
9733 echo "$as_me:9733: result: $cf_cv_gnu_source" >&5
9734 echo "${ECHO_T}$cf_cv_gnu_source" >&6
9735 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
9739 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9742 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9745 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9747 cf_save_CFLAGS="$CFLAGS"
9748 cf_save_CPPFLAGS="$CPPFLAGS"
9750 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9751 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
9752 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
9754 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9755 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
9756 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
9758 echo "$as_me:9758: checking if we should define _POSIX_C_SOURCE" >&5
9759 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9760 if test "${cf_cv_posix_c_source+set}" = set; then
9761 echo $ECHO_N "(cached) $ECHO_C" >&6
9764 echo "${as_me:-configure}:9764: testing if the symbol is already defined go no further ..." 1>&5
9766 cat >conftest.$ac_ext <<_ACEOF
9767 #line 9767 "configure"
9768 #include "confdefs.h"
9769 #include <sys/types.h>
9774 #ifndef _POSIX_C_SOURCE
9781 rm -f conftest.$ac_objext
9782 if { (eval echo "$as_me:9782: \"$ac_compile\"") >&5
9783 (eval $ac_compile) 2>&5
9785 echo "$as_me:9785: \$? = $ac_status" >&5
9786 (exit $ac_status); } &&
9787 { ac_try='test -s conftest.$ac_objext'
9788 { (eval echo "$as_me:9788: \"$ac_try\"") >&5
9791 echo "$as_me:9791: \$? = $ac_status" >&5
9792 (exit $ac_status); }; }; then
9793 cf_cv_posix_c_source=no
9795 echo "$as_me: failed program was:" >&5
9796 cat conftest.$ac_ext >&5
9797 cf_want_posix_source=no
9798 case .$cf_POSIX_C_SOURCE in
9800 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9803 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9804 cf_want_posix_source=yes
9807 cf_want_posix_source=yes
9810 if test "$cf_want_posix_source" = yes ; then
9811 cat >conftest.$ac_ext <<_ACEOF
9812 #line 9812 "configure"
9813 #include "confdefs.h"
9814 #include <sys/types.h>
9819 #ifdef _POSIX_SOURCE
9826 rm -f conftest.$ac_objext
9827 if { (eval echo "$as_me:9827: \"$ac_compile\"") >&5
9828 (eval $ac_compile) 2>&5
9830 echo "$as_me:9830: \$? = $ac_status" >&5
9831 (exit $ac_status); } &&
9832 { ac_try='test -s conftest.$ac_objext'
9833 { (eval echo "$as_me:9833: \"$ac_try\"") >&5
9836 echo "$as_me:9836: \$? = $ac_status" >&5
9837 (exit $ac_status); }; }; then
9840 echo "$as_me: failed program was:" >&5
9841 cat conftest.$ac_ext >&5
9842 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9844 rm -f conftest.$ac_objext conftest.$ac_ext
9847 echo "${as_me:-configure}:9847: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9849 CFLAGS="$cf_trim_CFLAGS"
9850 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
9852 echo "${as_me:-configure}:9852: testing if the second compile does not leave our definition intact error ..." 1>&5
9854 cat >conftest.$ac_ext <<_ACEOF
9855 #line 9855 "configure"
9856 #include "confdefs.h"
9857 #include <sys/types.h>
9862 #ifndef _POSIX_C_SOURCE
9869 rm -f conftest.$ac_objext
9870 if { (eval echo "$as_me:9870: \"$ac_compile\"") >&5
9871 (eval $ac_compile) 2>&5
9873 echo "$as_me:9873: \$? = $ac_status" >&5
9874 (exit $ac_status); } &&
9875 { ac_try='test -s conftest.$ac_objext'
9876 { (eval echo "$as_me:9876: \"$ac_try\"") >&5
9879 echo "$as_me:9879: \$? = $ac_status" >&5
9880 (exit $ac_status); }; }; then
9883 echo "$as_me: failed program was:" >&5
9884 cat conftest.$ac_ext >&5
9885 cf_cv_posix_c_source=no
9887 rm -f conftest.$ac_objext conftest.$ac_ext
9888 CFLAGS="$cf_save_CFLAGS"
9889 CPPFLAGS="$cf_save_CPPFLAGS"
9892 rm -f conftest.$ac_objext conftest.$ac_ext
9895 echo "$as_me:9895: result: $cf_cv_posix_c_source" >&5
9896 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9898 if test "$cf_cv_posix_c_source" != no ; then
9899 CFLAGS="$cf_trim_CFLAGS"
9900 CPPFLAGS="$cf_trim_CPPFLAGS"
9905 cf_new_extra_cppflags=
9907 for cf_add_cflags in $cf_cv_posix_c_source
9909 case $cf_fix_cppflags in
9911 case $cf_add_cflags in
9912 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9913 case $cf_add_cflags in
9915 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9917 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9918 && test -z "${cf_tst_cflags}" \
9919 && cf_fix_cppflags=yes
9921 if test $cf_fix_cppflags = yes ; then
9922 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9924 elif test "${cf_tst_cflags}" = "\"'" ; then
9925 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9934 case $cf_add_cflags in
9936 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9938 CPPFLAGS=`echo "$CPPFLAGS" | \
9939 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9940 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9944 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9949 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9954 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9956 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9958 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9959 && test -z "${cf_tst_cflags}" \
9960 && cf_fix_cppflags=no
9965 if test -n "$cf_new_cflags" ; then
9967 CFLAGS="$CFLAGS $cf_new_cflags"
9970 if test -n "$cf_new_cppflags" ; then
9972 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9975 if test -n "$cf_new_extra_cppflags" ; then
9977 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9984 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
9987 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
9988 cf_xopen_source="-D_BSD_SOURCE"
9992 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
9995 cf_xopen_source="-D_OSF_SOURCE"
9998 cf_xopen_source="-D_QNX_SOURCE"
10001 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10004 cf_xopen_source="-D__EXTENSIONS__"
10005 cf_cv_xopen_source=broken
10007 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10013 echo "$as_me:10013: checking if we should define _XOPEN_SOURCE" >&5
10014 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10015 if test "${cf_cv_xopen_source+set}" = set; then
10016 echo $ECHO_N "(cached) $ECHO_C" >&6
10019 cat >conftest.$ac_ext <<_ACEOF
10020 #line 10020 "configure"
10021 #include "confdefs.h"
10023 #include <stdlib.h>
10024 #include <string.h>
10025 #include <sys/types.h>
10031 #ifndef _XOPEN_SOURCE
10038 rm -f conftest.$ac_objext
10039 if { (eval echo "$as_me:10039: \"$ac_compile\"") >&5
10040 (eval $ac_compile) 2>&5
10042 echo "$as_me:10042: \$? = $ac_status" >&5
10043 (exit $ac_status); } &&
10044 { ac_try='test -s conftest.$ac_objext'
10045 { (eval echo "$as_me:10045: \"$ac_try\"") >&5
10046 (eval $ac_try) 2>&5
10048 echo "$as_me:10048: \$? = $ac_status" >&5
10049 (exit $ac_status); }; }; then
10050 cf_cv_xopen_source=no
10052 echo "$as_me: failed program was:" >&5
10053 cat conftest.$ac_ext >&5
10054 cf_save="$CPPFLAGS"
10055 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10056 cat >conftest.$ac_ext <<_ACEOF
10057 #line 10057 "configure"
10058 #include "confdefs.h"
10060 #include <stdlib.h>
10061 #include <string.h>
10062 #include <sys/types.h>
10068 #ifdef _XOPEN_SOURCE
10075 rm -f conftest.$ac_objext
10076 if { (eval echo "$as_me:10076: \"$ac_compile\"") >&5
10077 (eval $ac_compile) 2>&5
10079 echo "$as_me:10079: \$? = $ac_status" >&5
10080 (exit $ac_status); } &&
10081 { ac_try='test -s conftest.$ac_objext'
10082 { (eval echo "$as_me:10082: \"$ac_try\"") >&5
10083 (eval $ac_try) 2>&5
10085 echo "$as_me:10085: \$? = $ac_status" >&5
10086 (exit $ac_status); }; }; then
10087 cf_cv_xopen_source=no
10089 echo "$as_me: failed program was:" >&5
10090 cat conftest.$ac_ext >&5
10091 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10093 rm -f conftest.$ac_objext conftest.$ac_ext
10094 CPPFLAGS="$cf_save"
10097 rm -f conftest.$ac_objext conftest.$ac_ext
10100 echo "$as_me:10100: result: $cf_cv_xopen_source" >&5
10101 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10103 if test "$cf_cv_xopen_source" != no ; then
10105 CFLAGS=`echo "$CFLAGS" | \
10106 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10107 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10109 CPPFLAGS=`echo "$CPPFLAGS" | \
10110 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10111 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10113 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10118 cf_new_extra_cppflags=
10120 for cf_add_cflags in $cf_temp_xopen_source
10122 case $cf_fix_cppflags in
10124 case $cf_add_cflags in
10125 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10126 case $cf_add_cflags in
10128 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10130 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10131 && test -z "${cf_tst_cflags}" \
10132 && cf_fix_cppflags=yes
10134 if test $cf_fix_cppflags = yes ; then
10135 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10137 elif test "${cf_tst_cflags}" = "\"'" ; then
10138 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10143 case "$CPPFLAGS" in
10147 case $cf_add_cflags in
10149 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10151 CPPFLAGS=`echo "$CPPFLAGS" | \
10152 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10153 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10157 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10162 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10167 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10169 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10171 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10172 && test -z "${cf_tst_cflags}" \
10173 && cf_fix_cppflags=no
10178 if test -n "$cf_new_cflags" ; then
10180 CFLAGS="$CFLAGS $cf_new_cflags"
10183 if test -n "$cf_new_cppflags" ; then
10185 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10188 if test -n "$cf_new_extra_cppflags" ; then
10190 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10195 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10197 cf_save_CFLAGS="$CFLAGS"
10198 cf_save_CPPFLAGS="$CPPFLAGS"
10200 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10201 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10202 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10204 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10205 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10206 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10208 echo "$as_me:10208: checking if we should define _POSIX_C_SOURCE" >&5
10209 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10210 if test "${cf_cv_posix_c_source+set}" = set; then
10211 echo $ECHO_N "(cached) $ECHO_C" >&6
10214 echo "${as_me:-configure}:10214: testing if the symbol is already defined go no further ..." 1>&5
10216 cat >conftest.$ac_ext <<_ACEOF
10217 #line 10217 "configure"
10218 #include "confdefs.h"
10219 #include <sys/types.h>
10224 #ifndef _POSIX_C_SOURCE
10231 rm -f conftest.$ac_objext
10232 if { (eval echo "$as_me:10232: \"$ac_compile\"") >&5
10233 (eval $ac_compile) 2>&5
10235 echo "$as_me:10235: \$? = $ac_status" >&5
10236 (exit $ac_status); } &&
10237 { ac_try='test -s conftest.$ac_objext'
10238 { (eval echo "$as_me:10238: \"$ac_try\"") >&5
10239 (eval $ac_try) 2>&5
10241 echo "$as_me:10241: \$? = $ac_status" >&5
10242 (exit $ac_status); }; }; then
10243 cf_cv_posix_c_source=no
10245 echo "$as_me: failed program was:" >&5
10246 cat conftest.$ac_ext >&5
10247 cf_want_posix_source=no
10248 case .$cf_POSIX_C_SOURCE in
10250 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10253 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10254 cf_want_posix_source=yes
10257 cf_want_posix_source=yes
10260 if test "$cf_want_posix_source" = yes ; then
10261 cat >conftest.$ac_ext <<_ACEOF
10262 #line 10262 "configure"
10263 #include "confdefs.h"
10264 #include <sys/types.h>
10269 #ifdef _POSIX_SOURCE
10276 rm -f conftest.$ac_objext
10277 if { (eval echo "$as_me:10277: \"$ac_compile\"") >&5
10278 (eval $ac_compile) 2>&5
10280 echo "$as_me:10280: \$? = $ac_status" >&5
10281 (exit $ac_status); } &&
10282 { ac_try='test -s conftest.$ac_objext'
10283 { (eval echo "$as_me:10283: \"$ac_try\"") >&5
10284 (eval $ac_try) 2>&5
10286 echo "$as_me:10286: \$? = $ac_status" >&5
10287 (exit $ac_status); }; }; then
10290 echo "$as_me: failed program was:" >&5
10291 cat conftest.$ac_ext >&5
10292 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10294 rm -f conftest.$ac_objext conftest.$ac_ext
10297 echo "${as_me:-configure}:10297: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10299 CFLAGS="$cf_trim_CFLAGS"
10300 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
10302 echo "${as_me:-configure}:10302: testing if the second compile does not leave our definition intact error ..." 1>&5
10304 cat >conftest.$ac_ext <<_ACEOF
10305 #line 10305 "configure"
10306 #include "confdefs.h"
10307 #include <sys/types.h>
10312 #ifndef _POSIX_C_SOURCE
10319 rm -f conftest.$ac_objext
10320 if { (eval echo "$as_me:10320: \"$ac_compile\"") >&5
10321 (eval $ac_compile) 2>&5
10323 echo "$as_me:10323: \$? = $ac_status" >&5
10324 (exit $ac_status); } &&
10325 { ac_try='test -s conftest.$ac_objext'
10326 { (eval echo "$as_me:10326: \"$ac_try\"") >&5
10327 (eval $ac_try) 2>&5
10329 echo "$as_me:10329: \$? = $ac_status" >&5
10330 (exit $ac_status); }; }; then
10333 echo "$as_me: failed program was:" >&5
10334 cat conftest.$ac_ext >&5
10335 cf_cv_posix_c_source=no
10337 rm -f conftest.$ac_objext conftest.$ac_ext
10338 CFLAGS="$cf_save_CFLAGS"
10339 CPPFLAGS="$cf_save_CPPFLAGS"
10342 rm -f conftest.$ac_objext conftest.$ac_ext
10345 echo "$as_me:10345: result: $cf_cv_posix_c_source" >&5
10346 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10348 if test "$cf_cv_posix_c_source" != no ; then
10349 CFLAGS="$cf_trim_CFLAGS"
10350 CPPFLAGS="$cf_trim_CPPFLAGS"
10355 cf_new_extra_cppflags=
10357 for cf_add_cflags in $cf_cv_posix_c_source
10359 case $cf_fix_cppflags in
10361 case $cf_add_cflags in
10362 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10363 case $cf_add_cflags in
10365 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10367 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10368 && test -z "${cf_tst_cflags}" \
10369 && cf_fix_cppflags=yes
10371 if test $cf_fix_cppflags = yes ; then
10372 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10374 elif test "${cf_tst_cflags}" = "\"'" ; then
10375 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10380 case "$CPPFLAGS" in
10384 case $cf_add_cflags in
10386 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10388 CPPFLAGS=`echo "$CPPFLAGS" | \
10389 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10390 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10394 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10399 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10404 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10406 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10408 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10409 && test -z "${cf_tst_cflags}" \
10410 && cf_fix_cppflags=no
10415 if test -n "$cf_new_cflags" ; then
10417 CFLAGS="$CFLAGS $cf_new_cflags"
10420 if test -n "$cf_new_cppflags" ; then
10422 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10425 if test -n "$cf_new_extra_cppflags" ; then
10427 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10435 if test -n "$cf_xopen_source" ; then
10440 cf_new_extra_cppflags=
10442 for cf_add_cflags in $cf_xopen_source
10444 case $cf_fix_cppflags in
10446 case $cf_add_cflags in
10447 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10448 case $cf_add_cflags in
10450 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10452 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10453 && test -z "${cf_tst_cflags}" \
10454 && cf_fix_cppflags=yes
10456 if test $cf_fix_cppflags = yes ; then
10457 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10459 elif test "${cf_tst_cflags}" = "\"'" ; then
10460 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10465 case "$CPPFLAGS" in
10469 case $cf_add_cflags in
10471 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10473 CPPFLAGS=`echo "$CPPFLAGS" | \
10474 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10475 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10479 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10484 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10489 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10491 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10493 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10494 && test -z "${cf_tst_cflags}" \
10495 && cf_fix_cppflags=no
10500 if test -n "$cf_new_cflags" ; then
10501 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
10503 echo "${as_me:-configure}:10503: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10505 CFLAGS="$CFLAGS $cf_new_cflags"
10508 if test -n "$cf_new_cppflags" ; then
10509 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10511 echo "${as_me:-configure}:10511: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10513 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10516 if test -n "$cf_new_extra_cppflags" ; then
10517 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10519 echo "${as_me:-configure}:10519: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10521 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10526 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10527 echo "$as_me:10527: checking if _XOPEN_SOURCE really is set" >&5
10528 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10529 cat >conftest.$ac_ext <<_ACEOF
10530 #line 10530 "configure"
10531 #include "confdefs.h"
10532 #include <stdlib.h>
10537 #ifndef _XOPEN_SOURCE
10544 rm -f conftest.$ac_objext
10545 if { (eval echo "$as_me:10545: \"$ac_compile\"") >&5
10546 (eval $ac_compile) 2>&5
10548 echo "$as_me:10548: \$? = $ac_status" >&5
10549 (exit $ac_status); } &&
10550 { ac_try='test -s conftest.$ac_objext'
10551 { (eval echo "$as_me:10551: \"$ac_try\"") >&5
10552 (eval $ac_try) 2>&5
10554 echo "$as_me:10554: \$? = $ac_status" >&5
10555 (exit $ac_status); }; }; then
10556 cf_XOPEN_SOURCE_set=yes
10558 echo "$as_me: failed program was:" >&5
10559 cat conftest.$ac_ext >&5
10560 cf_XOPEN_SOURCE_set=no
10562 rm -f conftest.$ac_objext conftest.$ac_ext
10563 echo "$as_me:10563: result: $cf_XOPEN_SOURCE_set" >&5
10564 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10565 if test $cf_XOPEN_SOURCE_set = yes
10567 cat >conftest.$ac_ext <<_ACEOF
10568 #line 10568 "configure"
10569 #include "confdefs.h"
10570 #include <stdlib.h>
10575 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10582 rm -f conftest.$ac_objext
10583 if { (eval echo "$as_me:10583: \"$ac_compile\"") >&5
10584 (eval $ac_compile) 2>&5
10586 echo "$as_me:10586: \$? = $ac_status" >&5
10587 (exit $ac_status); } &&
10588 { ac_try='test -s conftest.$ac_objext'
10589 { (eval echo "$as_me:10589: \"$ac_try\"") >&5
10590 (eval $ac_try) 2>&5
10592 echo "$as_me:10592: \$? = $ac_status" >&5
10593 (exit $ac_status); }; }; then
10594 cf_XOPEN_SOURCE_set_ok=yes
10596 echo "$as_me: failed program was:" >&5
10597 cat conftest.$ac_ext >&5
10598 cf_XOPEN_SOURCE_set_ok=no
10600 rm -f conftest.$ac_objext conftest.$ac_ext
10601 if test $cf_XOPEN_SOURCE_set_ok = no
10603 { echo "$as_me:10603: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10604 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10608 echo "$as_me:10608: checking if we should define _XOPEN_SOURCE" >&5
10609 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10610 if test "${cf_cv_xopen_source+set}" = set; then
10611 echo $ECHO_N "(cached) $ECHO_C" >&6
10614 cat >conftest.$ac_ext <<_ACEOF
10615 #line 10615 "configure"
10616 #include "confdefs.h"
10618 #include <stdlib.h>
10619 #include <string.h>
10620 #include <sys/types.h>
10626 #ifndef _XOPEN_SOURCE
10633 rm -f conftest.$ac_objext
10634 if { (eval echo "$as_me:10634: \"$ac_compile\"") >&5
10635 (eval $ac_compile) 2>&5
10637 echo "$as_me:10637: \$? = $ac_status" >&5
10638 (exit $ac_status); } &&
10639 { ac_try='test -s conftest.$ac_objext'
10640 { (eval echo "$as_me:10640: \"$ac_try\"") >&5
10641 (eval $ac_try) 2>&5
10643 echo "$as_me:10643: \$? = $ac_status" >&5
10644 (exit $ac_status); }; }; then
10645 cf_cv_xopen_source=no
10647 echo "$as_me: failed program was:" >&5
10648 cat conftest.$ac_ext >&5
10649 cf_save="$CPPFLAGS"
10650 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10651 cat >conftest.$ac_ext <<_ACEOF
10652 #line 10652 "configure"
10653 #include "confdefs.h"
10655 #include <stdlib.h>
10656 #include <string.h>
10657 #include <sys/types.h>
10663 #ifdef _XOPEN_SOURCE
10670 rm -f conftest.$ac_objext
10671 if { (eval echo "$as_me:10671: \"$ac_compile\"") >&5
10672 (eval $ac_compile) 2>&5
10674 echo "$as_me:10674: \$? = $ac_status" >&5
10675 (exit $ac_status); } &&
10676 { ac_try='test -s conftest.$ac_objext'
10677 { (eval echo "$as_me:10677: \"$ac_try\"") >&5
10678 (eval $ac_try) 2>&5
10680 echo "$as_me:10680: \$? = $ac_status" >&5
10681 (exit $ac_status); }; }; then
10682 cf_cv_xopen_source=no
10684 echo "$as_me: failed program was:" >&5
10685 cat conftest.$ac_ext >&5
10686 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10688 rm -f conftest.$ac_objext conftest.$ac_ext
10689 CPPFLAGS="$cf_save"
10692 rm -f conftest.$ac_objext conftest.$ac_ext
10695 echo "$as_me:10695: result: $cf_cv_xopen_source" >&5
10696 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10698 if test "$cf_cv_xopen_source" != no ; then
10700 CFLAGS=`echo "$CFLAGS" | \
10701 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10702 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10704 CPPFLAGS=`echo "$CPPFLAGS" | \
10705 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10706 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10708 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10713 cf_new_extra_cppflags=
10715 for cf_add_cflags in $cf_temp_xopen_source
10717 case $cf_fix_cppflags in
10719 case $cf_add_cflags in
10720 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10721 case $cf_add_cflags in
10723 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10725 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10726 && test -z "${cf_tst_cflags}" \
10727 && cf_fix_cppflags=yes
10729 if test $cf_fix_cppflags = yes ; then
10730 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10732 elif test "${cf_tst_cflags}" = "\"'" ; then
10733 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10738 case "$CPPFLAGS" in
10742 case $cf_add_cflags in
10744 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10746 CPPFLAGS=`echo "$CPPFLAGS" | \
10747 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10748 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10752 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10757 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10762 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10764 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10766 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10767 && test -z "${cf_tst_cflags}" \
10768 && cf_fix_cppflags=no
10773 if test -n "$cf_new_cflags" ; then
10775 CFLAGS="$CFLAGS $cf_new_cflags"
10778 if test -n "$cf_new_cppflags" ; then
10780 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10783 if test -n "$cf_new_extra_cppflags" ; then
10785 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10793 # Check whether --enable-largefile or --disable-largefile was given.
10794 if test "${enable_largefile+set}" = set; then
10795 enableval="$enable_largefile"
10798 if test "$enable_largefile" != no; then
10800 echo "$as_me:10800: checking for special C compiler options needed for large files" >&5
10801 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10802 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10803 echo $ECHO_N "(cached) $ECHO_C" >&6
10805 ac_cv_sys_largefile_CC=no
10806 if test "$GCC" != yes; then
10809 # IRIX 6.2 and later do not support large files by default,
10810 # so use the C compiler's -n32 option if that helps.
10811 cat >conftest.$ac_ext <<_ACEOF
10812 #line 10812 "configure"
10813 #include "confdefs.h"
10814 #include <sys/types.h>
10815 /* Check that off_t can represent 2**63 - 1 correctly.
10816 We can't simply define LARGE_OFF_T to be 9223372036854775807,
10817 since some C++ compilers masquerading as C compilers
10818 incorrectly reject 9223372036854775807. */
10819 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10820 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10821 && LARGE_OFF_T % 2147483647 == 1)
10831 rm -f conftest.$ac_objext
10832 if { (eval echo "$as_me:10832: \"$ac_compile\"") >&5
10833 (eval $ac_compile) 2>&5
10835 echo "$as_me:10835: \$? = $ac_status" >&5
10836 (exit $ac_status); } &&
10837 { ac_try='test -s conftest.$ac_objext'
10838 { (eval echo "$as_me:10838: \"$ac_try\"") >&5
10839 (eval $ac_try) 2>&5
10841 echo "$as_me:10841: \$? = $ac_status" >&5
10842 (exit $ac_status); }; }; then
10845 echo "$as_me: failed program was:" >&5
10846 cat conftest.$ac_ext >&5
10848 rm -f conftest.$ac_objext
10850 rm -f conftest.$ac_objext
10851 if { (eval echo "$as_me:10851: \"$ac_compile\"") >&5
10852 (eval $ac_compile) 2>&5
10854 echo "$as_me:10854: \$? = $ac_status" >&5
10855 (exit $ac_status); } &&
10856 { ac_try='test -s conftest.$ac_objext'
10857 { (eval echo "$as_me:10857: \"$ac_try\"") >&5
10858 (eval $ac_try) 2>&5
10860 echo "$as_me:10860: \$? = $ac_status" >&5
10861 (exit $ac_status); }; }; then
10862 ac_cv_sys_largefile_CC=' -n32'; break
10864 echo "$as_me: failed program was:" >&5
10865 cat conftest.$ac_ext >&5
10867 rm -f conftest.$ac_objext
10871 rm -f conftest.$ac_ext
10874 echo "$as_me:10874: result: $ac_cv_sys_largefile_CC" >&5
10875 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10876 if test "$ac_cv_sys_largefile_CC" != no; then
10877 CC=$CC$ac_cv_sys_largefile_CC
10880 echo "$as_me:10880: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10881 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10882 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10883 echo $ECHO_N "(cached) $ECHO_C" >&6
10886 ac_cv_sys_file_offset_bits=no
10887 cat >conftest.$ac_ext <<_ACEOF
10888 #line 10888 "configure"
10889 #include "confdefs.h"
10890 #include <sys/types.h>
10891 /* Check that off_t can represent 2**63 - 1 correctly.
10892 We can't simply define LARGE_OFF_T to be 9223372036854775807,
10893 since some C++ compilers masquerading as C compilers
10894 incorrectly reject 9223372036854775807. */
10895 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10896 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10897 && LARGE_OFF_T % 2147483647 == 1)
10907 rm -f conftest.$ac_objext
10908 if { (eval echo "$as_me:10908: \"$ac_compile\"") >&5
10909 (eval $ac_compile) 2>&5
10911 echo "$as_me:10911: \$? = $ac_status" >&5
10912 (exit $ac_status); } &&
10913 { ac_try='test -s conftest.$ac_objext'
10914 { (eval echo "$as_me:10914: \"$ac_try\"") >&5
10915 (eval $ac_try) 2>&5
10917 echo "$as_me:10917: \$? = $ac_status" >&5
10918 (exit $ac_status); }; }; then
10921 echo "$as_me: failed program was:" >&5
10922 cat conftest.$ac_ext >&5
10924 rm -f conftest.$ac_objext conftest.$ac_ext
10925 cat >conftest.$ac_ext <<_ACEOF
10926 #line 10926 "configure"
10927 #include "confdefs.h"
10928 #define _FILE_OFFSET_BITS 64
10929 #include <sys/types.h>
10930 /* Check that off_t can represent 2**63 - 1 correctly.
10931 We can't simply define LARGE_OFF_T to be 9223372036854775807,
10932 since some C++ compilers masquerading as C compilers
10933 incorrectly reject 9223372036854775807. */
10934 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10935 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10936 && LARGE_OFF_T % 2147483647 == 1)
10946 rm -f conftest.$ac_objext
10947 if { (eval echo "$as_me:10947: \"$ac_compile\"") >&5
10948 (eval $ac_compile) 2>&5
10950 echo "$as_me:10950: \$? = $ac_status" >&5
10951 (exit $ac_status); } &&
10952 { ac_try='test -s conftest.$ac_objext'
10953 { (eval echo "$as_me:10953: \"$ac_try\"") >&5
10954 (eval $ac_try) 2>&5
10956 echo "$as_me:10956: \$? = $ac_status" >&5
10957 (exit $ac_status); }; }; then
10958 ac_cv_sys_file_offset_bits=64; break
10960 echo "$as_me: failed program was:" >&5
10961 cat conftest.$ac_ext >&5
10963 rm -f conftest.$ac_objext conftest.$ac_ext
10967 echo "$as_me:10967: result: $ac_cv_sys_file_offset_bits" >&5
10968 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10969 if test "$ac_cv_sys_file_offset_bits" != no; then
10971 cat >>confdefs.h <<EOF
10972 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10977 echo "$as_me:10977: checking for _LARGE_FILES value needed for large files" >&5
10978 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10979 if test "${ac_cv_sys_large_files+set}" = set; then
10980 echo $ECHO_N "(cached) $ECHO_C" >&6
10983 ac_cv_sys_large_files=no
10984 cat >conftest.$ac_ext <<_ACEOF
10985 #line 10985 "configure"
10986 #include "confdefs.h"
10987 #include <sys/types.h>
10988 /* Check that off_t can represent 2**63 - 1 correctly.
10989 We can't simply define LARGE_OFF_T to be 9223372036854775807,
10990 since some C++ compilers masquerading as C compilers
10991 incorrectly reject 9223372036854775807. */
10992 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10993 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10994 && LARGE_OFF_T % 2147483647 == 1)
11004 rm -f conftest.$ac_objext
11005 if { (eval echo "$as_me:11005: \"$ac_compile\"") >&5
11006 (eval $ac_compile) 2>&5
11008 echo "$as_me:11008: \$? = $ac_status" >&5
11009 (exit $ac_status); } &&
11010 { ac_try='test -s conftest.$ac_objext'
11011 { (eval echo "$as_me:11011: \"$ac_try\"") >&5
11012 (eval $ac_try) 2>&5
11014 echo "$as_me:11014: \$? = $ac_status" >&5
11015 (exit $ac_status); }; }; then
11018 echo "$as_me: failed program was:" >&5
11019 cat conftest.$ac_ext >&5
11021 rm -f conftest.$ac_objext conftest.$ac_ext
11022 cat >conftest.$ac_ext <<_ACEOF
11023 #line 11023 "configure"
11024 #include "confdefs.h"
11025 #define _LARGE_FILES 1
11026 #include <sys/types.h>
11027 /* Check that off_t can represent 2**63 - 1 correctly.
11028 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11029 since some C++ compilers masquerading as C compilers
11030 incorrectly reject 9223372036854775807. */
11031 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11032 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11033 && LARGE_OFF_T % 2147483647 == 1)
11043 rm -f conftest.$ac_objext
11044 if { (eval echo "$as_me:11044: \"$ac_compile\"") >&5
11045 (eval $ac_compile) 2>&5
11047 echo "$as_me:11047: \$? = $ac_status" >&5
11048 (exit $ac_status); } &&
11049 { ac_try='test -s conftest.$ac_objext'
11050 { (eval echo "$as_me:11050: \"$ac_try\"") >&5
11051 (eval $ac_try) 2>&5
11053 echo "$as_me:11053: \$? = $ac_status" >&5
11054 (exit $ac_status); }; }; then
11055 ac_cv_sys_large_files=1; break
11057 echo "$as_me: failed program was:" >&5
11058 cat conftest.$ac_ext >&5
11060 rm -f conftest.$ac_objext conftest.$ac_ext
11064 echo "$as_me:11064: result: $ac_cv_sys_large_files" >&5
11065 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
11066 if test "$ac_cv_sys_large_files" != no; then
11068 cat >>confdefs.h <<EOF
11069 #define _LARGE_FILES $ac_cv_sys_large_files
11076 if test "$enable_largefile" != no ; then
11077 echo "$as_me:11077: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11078 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
11079 if test "${ac_cv_sys_largefile_source+set}" = set; then
11080 echo $ECHO_N "(cached) $ECHO_C" >&6
11083 ac_cv_sys_largefile_source=no
11084 cat >conftest.$ac_ext <<_ACEOF
11085 #line 11085 "configure"
11086 #include "confdefs.h"
11096 rm -f conftest.$ac_objext
11097 if { (eval echo "$as_me:11097: \"$ac_compile\"") >&5
11098 (eval $ac_compile) 2>&5
11100 echo "$as_me:11100: \$? = $ac_status" >&5
11101 (exit $ac_status); } &&
11102 { ac_try='test -s conftest.$ac_objext'
11103 { (eval echo "$as_me:11103: \"$ac_try\"") >&5
11104 (eval $ac_try) 2>&5
11106 echo "$as_me:11106: \$? = $ac_status" >&5
11107 (exit $ac_status); }; }; then
11110 echo "$as_me: failed program was:" >&5
11111 cat conftest.$ac_ext >&5
11113 rm -f conftest.$ac_objext conftest.$ac_ext
11114 cat >conftest.$ac_ext <<_ACEOF
11115 #line 11115 "configure"
11116 #include "confdefs.h"
11117 #define _LARGEFILE_SOURCE 1
11127 rm -f conftest.$ac_objext
11128 if { (eval echo "$as_me:11128: \"$ac_compile\"") >&5
11129 (eval $ac_compile) 2>&5
11131 echo "$as_me:11131: \$? = $ac_status" >&5
11132 (exit $ac_status); } &&
11133 { ac_try='test -s conftest.$ac_objext'
11134 { (eval echo "$as_me:11134: \"$ac_try\"") >&5
11135 (eval $ac_try) 2>&5
11137 echo "$as_me:11137: \$? = $ac_status" >&5
11138 (exit $ac_status); }; }; then
11139 ac_cv_sys_largefile_source=1; break
11141 echo "$as_me: failed program was:" >&5
11142 cat conftest.$ac_ext >&5
11144 rm -f conftest.$ac_objext conftest.$ac_ext
11148 echo "$as_me:11148: result: $ac_cv_sys_largefile_source" >&5
11149 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
11150 if test "$ac_cv_sys_largefile_source" != no; then
11152 cat >>confdefs.h <<EOF
11153 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11159 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11160 # in glibc 2.1.3, but that breaks too many other things.
11161 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11162 echo "$as_me:11162: checking for fseeko" >&5
11163 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
11164 if test "${ac_cv_func_fseeko+set}" = set; then
11165 echo $ECHO_N "(cached) $ECHO_C" >&6
11167 cat >conftest.$ac_ext <<_ACEOF
11168 #line 11168 "configure"
11169 #include "confdefs.h"
11174 return fseeko && fseeko (stdin, 0, 0);
11179 rm -f conftest.$ac_objext conftest$ac_exeext
11180 if { (eval echo "$as_me:11180: \"$ac_link\"") >&5
11181 (eval $ac_link) 2>&5
11183 echo "$as_me:11183: \$? = $ac_status" >&5
11184 (exit $ac_status); } &&
11185 { ac_try='test -s conftest$ac_exeext'
11186 { (eval echo "$as_me:11186: \"$ac_try\"") >&5
11187 (eval $ac_try) 2>&5
11189 echo "$as_me:11189: \$? = $ac_status" >&5
11190 (exit $ac_status); }; }; then
11191 ac_cv_func_fseeko=yes
11193 echo "$as_me: failed program was:" >&5
11194 cat conftest.$ac_ext >&5
11195 ac_cv_func_fseeko=no
11197 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11199 echo "$as_me:11199: result: $ac_cv_func_fseeko" >&5
11200 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
11201 if test $ac_cv_func_fseeko = yes; then
11203 cat >>confdefs.h <<\EOF
11204 #define HAVE_FSEEKO 1
11209 # Normally we would collect these definitions in the config.h,
11210 # but (like _XOPEN_SOURCE), some environments rely on having these
11211 # defined before any of the system headers are included. Another
11212 # case comes up with C++, e.g., on AIX the compiler compiles the
11213 # header files by themselves before looking at the body files it is
11214 # told to compile. For ncurses, those header files do not include
11216 test "$ac_cv_sys_large_files" != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
11217 test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
11218 test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
11220 echo "$as_me:11220: checking whether to use struct dirent64" >&5
11221 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
11222 if test "${cf_cv_struct_dirent64+set}" = set; then
11223 echo $ECHO_N "(cached) $ECHO_C" >&6
11226 cat >conftest.$ac_ext <<_ACEOF
11227 #line 11227 "configure"
11228 #include "confdefs.h"
11230 #include <sys/types.h>
11231 #include <dirent.h>
11237 /* if transitional largefile support is setup, this is true */
11238 extern struct dirent64 * readdir(DIR *);
11239 struct dirent64 *x = readdir((DIR *)0);
11240 struct dirent *y = readdir((DIR *)0);
11247 rm -f conftest.$ac_objext
11248 if { (eval echo "$as_me:11248: \"$ac_compile\"") >&5
11249 (eval $ac_compile) 2>&5
11251 echo "$as_me:11251: \$? = $ac_status" >&5
11252 (exit $ac_status); } &&
11253 { ac_try='test -s conftest.$ac_objext'
11254 { (eval echo "$as_me:11254: \"$ac_try\"") >&5
11255 (eval $ac_try) 2>&5
11257 echo "$as_me:11257: \$? = $ac_status" >&5
11258 (exit $ac_status); }; }; then
11259 cf_cv_struct_dirent64=yes
11261 echo "$as_me: failed program was:" >&5
11262 cat conftest.$ac_ext >&5
11263 cf_cv_struct_dirent64=no
11265 rm -f conftest.$ac_objext conftest.$ac_ext
11268 echo "$as_me:11268: result: $cf_cv_struct_dirent64" >&5
11269 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11270 test "$cf_cv_struct_dirent64" = yes &&
11271 cat >>confdefs.h <<\EOF
11272 #define HAVE_STRUCT_DIRENT64 1
11277 ### Enable compiling-in rcs id's
11278 echo "$as_me:11278: checking if RCS identifiers should be compiled-in" >&5
11279 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
11281 # Check whether --with-rcs-ids or --without-rcs-ids was given.
11282 if test "${with_rcs_ids+set}" = set; then
11283 withval="$with_rcs_ids"
11284 with_rcs_ids=$withval
11288 echo "$as_me:11288: result: $with_rcs_ids" >&5
11289 echo "${ECHO_T}$with_rcs_ids" >&6
11290 test "$with_rcs_ids" = yes &&
11291 cat >>confdefs.h <<\EOF
11292 #define USE_RCS_IDS 1
11295 ###############################################################################
11297 ### Note that some functions (such as const) are normally disabled anyway.
11298 echo "$as_me:11298: checking if you want to build with function extensions" >&5
11299 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11301 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11302 if test "${enable_ext_funcs+set}" = set; then
11303 enableval="$enable_ext_funcs"
11304 with_ext_funcs=$enableval
11308 echo "$as_me:11308: result: $with_ext_funcs" >&5
11309 echo "${ECHO_T}$with_ext_funcs" >&6
11310 if test "$with_ext_funcs" = yes ; then
11311 NCURSES_EXT_FUNCS=1
11313 cat >>confdefs.h <<\EOF
11314 #define HAVE_USE_DEFAULT_COLORS 1
11317 cat >>confdefs.h <<\EOF
11318 #define NCURSES_EXT_FUNCS 1
11322 NCURSES_EXT_FUNCS=0
11325 ### use option --enable-const to turn on use of const beyond that in XSI.
11326 echo "$as_me:11326: checking for extended use of const keyword" >&5
11327 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11329 # Check whether --enable-const or --disable-const was given.
11330 if test "${enable_const+set}" = set; then
11331 enableval="$enable_const"
11332 with_ext_const=$enableval
11336 echo "$as_me:11336: result: $with_ext_const" >&5
11337 echo "${ECHO_T}$with_ext_const" >&6
11338 NCURSES_CONST='/*nothing*/'
11339 if test "$with_ext_const" = yes ; then
11340 NCURSES_CONST=const
11343 ###############################################################################
11344 # These options are relatively safe to experiment with.
11346 echo "$as_me:11346: checking if you want all development code" >&5
11347 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11349 # Check whether --with-develop or --without-develop was given.
11350 if test "${with_develop+set}" = set; then
11351 withval="$with_develop"
11352 with_develop=$withval
11356 echo "$as_me:11356: result: $with_develop" >&5
11357 echo "${ECHO_T}$with_develop" >&6
11359 ###############################################################################
11360 # These are just experimental, probably should not be in a package:
11362 # This is still experimental (20080329), but should ultimately be moved to
11363 # the script-block --with-normal, etc.
11365 echo "$as_me:11365: checking if you want to link with the pthread library" >&5
11366 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11368 # Check whether --with-pthread or --without-pthread was given.
11369 if test "${with_pthread+set}" = set; then
11370 withval="$with_pthread"
11371 with_pthread=$withval
11375 echo "$as_me:11375: result: $with_pthread" >&5
11376 echo "${ECHO_T}$with_pthread" >&6
11378 if test "$with_pthread" != no ; then
11379 echo "$as_me:11379: checking for pthread.h" >&5
11380 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11381 if test "${ac_cv_header_pthread_h+set}" = set; then
11382 echo $ECHO_N "(cached) $ECHO_C" >&6
11384 cat >conftest.$ac_ext <<_ACEOF
11385 #line 11385 "configure"
11386 #include "confdefs.h"
11387 #include <pthread.h>
11389 if { (eval echo "$as_me:11389: \"$ac_cpp conftest.$ac_ext\"") >&5
11390 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11392 egrep -v '^ *\+' conftest.er1 >conftest.err
11394 cat conftest.err >&5
11395 echo "$as_me:11395: \$? = $ac_status" >&5
11396 (exit $ac_status); } >/dev/null; then
11397 if test -s conftest.err; then
11398 ac_cpp_err=$ac_c_preproc_warn_flag
11405 if test -z "$ac_cpp_err"; then
11406 ac_cv_header_pthread_h=yes
11408 echo "$as_me: failed program was:" >&5
11409 cat conftest.$ac_ext >&5
11410 ac_cv_header_pthread_h=no
11412 rm -f conftest.err conftest.$ac_ext
11414 echo "$as_me:11414: result: $ac_cv_header_pthread_h" >&5
11415 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11416 if test $ac_cv_header_pthread_h = yes; then
11418 cat >>confdefs.h <<\EOF
11419 #define HAVE_PTHREADS_H 1
11422 for cf_lib_pthread in pthread c_r
11424 echo "$as_me:11424: checking if we can link with the $cf_lib_pthread library" >&5
11425 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11426 cf_save_LIBS="$LIBS"
11428 cf_add_libs="-l$cf_lib_pthread"
11429 # Filter out duplicates - this happens with badly-designed ".pc" files...
11430 for cf_add_1lib in $LIBS
11432 for cf_add_2lib in $cf_add_libs
11434 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11440 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11442 LIBS="$cf_add_libs"
11444 cat >conftest.$ac_ext <<_ACEOF
11445 #line 11445 "configure"
11446 #include "confdefs.h"
11448 #include <pthread.h>
11454 int rc = pthread_create(0,0,0,0);
11455 int r2 = pthread_mutexattr_settype(0, 0);
11461 rm -f conftest.$ac_objext conftest$ac_exeext
11462 if { (eval echo "$as_me:11462: \"$ac_link\"") >&5
11463 (eval $ac_link) 2>&5
11465 echo "$as_me:11465: \$? = $ac_status" >&5
11466 (exit $ac_status); } &&
11467 { ac_try='test -s conftest$ac_exeext'
11468 { (eval echo "$as_me:11468: \"$ac_try\"") >&5
11469 (eval $ac_try) 2>&5
11471 echo "$as_me:11471: \$? = $ac_status" >&5
11472 (exit $ac_status); }; }; then
11475 echo "$as_me: failed program was:" >&5
11476 cat conftest.$ac_ext >&5
11479 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11480 LIBS="$cf_save_LIBS"
11481 echo "$as_me:11481: result: $with_pthread" >&5
11482 echo "${ECHO_T}$with_pthread" >&6
11483 test "$with_pthread" = yes && break
11486 if test "$with_pthread" = yes ; then
11488 cf_add_libs="-l$cf_lib_pthread"
11489 # Filter out duplicates - this happens with badly-designed ".pc" files...
11490 for cf_add_1lib in $LIBS
11492 for cf_add_2lib in $cf_add_libs
11494 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11500 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11502 LIBS="$cf_add_libs"
11504 cat >>confdefs.h <<\EOF
11505 #define HAVE_LIBPTHREADS 1
11509 { { echo "$as_me:11509: error: Cannot link with pthread library" >&5
11510 echo "$as_me: error: Cannot link with pthread library" >&2;}
11511 { (exit 1); exit 1; }; }
11518 echo "$as_me:11518: checking if you want to use weak-symbols for pthreads" >&5
11519 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11521 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11522 if test "${enable_weak_symbols+set}" = set; then
11523 enableval="$enable_weak_symbols"
11524 use_weak_symbols=$withval
11526 use_weak_symbols=no
11528 echo "$as_me:11528: result: $use_weak_symbols" >&5
11529 echo "${ECHO_T}$use_weak_symbols" >&6
11530 if test "$use_weak_symbols" = yes ; then
11532 echo "$as_me:11532: checking if $CC supports weak symbols" >&5
11533 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11534 if test "${cf_cv_weak_symbols+set}" = set; then
11535 echo $ECHO_N "(cached) $ECHO_C" >&6
11538 cat >conftest.$ac_ext <<_ACEOF
11539 #line 11539 "configure"
11540 #include "confdefs.h"
11547 #if defined(__GNUC__)
11548 # if defined __USE_ISOC99
11549 # define _cat_pragma(exp) _Pragma(#exp)
11550 # define _weak_pragma(exp) _cat_pragma(weak name)
11552 # define _weak_pragma(exp)
11554 # define _declare(name) __extension__ extern __typeof__(name) name
11555 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
11558 weak_symbol(fopen);
11564 rm -f conftest.$ac_objext
11565 if { (eval echo "$as_me:11565: \"$ac_compile\"") >&5
11566 (eval $ac_compile) 2>&5
11568 echo "$as_me:11568: \$? = $ac_status" >&5
11569 (exit $ac_status); } &&
11570 { ac_try='test -s conftest.$ac_objext'
11571 { (eval echo "$as_me:11571: \"$ac_try\"") >&5
11572 (eval $ac_try) 2>&5
11574 echo "$as_me:11574: \$? = $ac_status" >&5
11575 (exit $ac_status); }; }; then
11576 cf_cv_weak_symbols=yes
11578 echo "$as_me: failed program was:" >&5
11579 cat conftest.$ac_ext >&5
11580 cf_cv_weak_symbols=no
11582 rm -f conftest.$ac_objext conftest.$ac_ext
11585 echo "$as_me:11585: result: $cf_cv_weak_symbols" >&5
11586 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11589 cf_cv_weak_symbols=no
11592 if test $cf_cv_weak_symbols = yes ; then
11594 cat >>confdefs.h <<\EOF
11595 #define USE_WEAK_SYMBOLS 1
11601 if test "$with_pthread" = "yes" ; then
11603 cat >>confdefs.h <<\EOF
11604 #define USE_PTHREADS 1
11607 enable_reentrant=yes
11608 if test $cf_cv_weak_symbols = yes ; then
11613 # OpenSUSE is installing ncurses6, using reentrant option.
11614 echo "$as_me:11614: checking for _nc_TABSIZE" >&5
11615 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
11616 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
11617 echo $ECHO_N "(cached) $ECHO_C" >&6
11619 cat >conftest.$ac_ext <<_ACEOF
11620 #line 11620 "configure"
11621 #include "confdefs.h"
11622 /* System header to define __stub macros and hopefully few prototypes,
11623 which can conflict with char _nc_TABSIZE (); below. */
11624 #include <assert.h>
11625 /* Override any gcc2 internal prototype to avoid an error. */
11629 /* We use char because int might match the return type of a gcc2
11630 builtin and then its argument prototype would still apply. */
11631 char _nc_TABSIZE ();
11637 /* The GNU C library defines this for functions which it implements
11638 to always fail with ENOSYS. Some functions are actually named
11639 something starting with __ and the normal name is an alias. */
11640 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
11643 f = _nc_TABSIZE; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11650 rm -f conftest.$ac_objext conftest$ac_exeext
11651 if { (eval echo "$as_me:11651: \"$ac_link\"") >&5
11652 (eval $ac_link) 2>&5
11654 echo "$as_me:11654: \$? = $ac_status" >&5
11655 (exit $ac_status); } &&
11656 { ac_try='test -s conftest$ac_exeext'
11657 { (eval echo "$as_me:11657: \"$ac_try\"") >&5
11658 (eval $ac_try) 2>&5
11660 echo "$as_me:11660: \$? = $ac_status" >&5
11661 (exit $ac_status); }; }; then
11662 ac_cv_func__nc_TABSIZE=yes
11664 echo "$as_me: failed program was:" >&5
11665 cat conftest.$ac_ext >&5
11666 ac_cv_func__nc_TABSIZE=no
11668 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11670 echo "$as_me:11670: result: $ac_cv_func__nc_TABSIZE" >&5
11671 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
11672 if test $ac_cv_func__nc_TABSIZE = yes; then
11673 assume_reentrant=yes
11675 assume_reentrant=no
11678 # Reentrant code has to be opaque; there's little advantage to making ncurses
11679 # opaque outside of that, so there is no --enable-opaque option. We can use
11680 # this option without --with-pthreads, but this will be always set for
11682 echo "$as_me:11682: checking if you want experimental reentrant code" >&5
11683 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11685 # Check whether --enable-reentrant or --disable-reentrant was given.
11686 if test "${enable_reentrant+set}" = set; then
11687 enableval="$enable_reentrant"
11688 with_reentrant=$enableval
11690 with_reentrant=$assume_reentrant
11692 echo "$as_me:11692: result: $with_reentrant" >&5
11693 echo "${ECHO_T}$with_reentrant" >&6
11694 if test "$with_reentrant" = yes ; then
11695 cf_cv_enable_reentrant=1
11696 if test $cf_cv_weak_symbols = yes ; then
11698 # remove pthread library from $LIBS
11699 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
11701 elif test "$assume_reentrant" = no ; then
11702 LIB_SUFFIX="t${LIB_SUFFIX}"
11705 cat >>confdefs.h <<\EOF
11706 #define USE_REENTRANT 1
11710 cf_cv_enable_reentrant=0
11713 ### Allow using a different wrap-prefix
11714 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11715 echo "$as_me:11715: checking for prefix used to wrap public variables" >&5
11716 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11718 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11719 if test "${with_wrap_prefix+set}" = set; then
11720 withval="$with_wrap_prefix"
11721 NCURSES_WRAP_PREFIX=$withval
11723 NCURSES_WRAP_PREFIX=_nc_
11725 echo "$as_me:11725: result: $NCURSES_WRAP_PREFIX" >&5
11726 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11728 NCURSES_WRAP_PREFIX=_nc_
11731 cat >>confdefs.h <<EOF
11732 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11735 ###############################################################################
11737 ### use option --disable-echo to suppress full display compiling commands
11739 echo "$as_me:11739: checking if you want to see long compiling messages" >&5
11740 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
11742 # Check whether --enable-echo or --disable-echo was given.
11743 if test "${enable_echo+set}" = set; then
11744 enableval="$enable_echo"
11745 test "$enableval" != no && enableval=yes
11746 if test "$enableval" != "yes" ; then
11749 ECHO_LD='@echo linking $@;'
11750 RULE_CC='@echo compiling $<'
11751 SHOW_CC='@echo compiling $@'
11773 echo "$as_me:11773: result: $enableval" >&5
11774 echo "${ECHO_T}$enableval" >&6
11776 ### use option --enable-warnings to turn on all gcc warnings
11777 echo "$as_me:11777: checking if you want to see compiler warnings" >&5
11778 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11780 # Check whether --enable-warnings or --disable-warnings was given.
11781 if test "${enable_warnings+set}" = set; then
11782 enableval="$enable_warnings"
11783 with_warnings=$enableval
11785 echo "$as_me:11785: result: $with_warnings" >&5
11786 echo "${ECHO_T}$with_warnings" >&6
11788 if test "x$with_warnings" = "xyes"; then
11790 ADAFLAGS="$ADAFLAGS -gnatg"
11794 if test "$GCC" = yes ; then
11797 echo "$as_me:11797: checking if this is really Intel C compiler" >&5
11798 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11799 cf_save_CFLAGS="$CFLAGS"
11800 CFLAGS="$CFLAGS -no-gcc"
11801 cat >conftest.$ac_ext <<_ACEOF
11802 #line 11802 "configure"
11803 #include "confdefs.h"
11809 #ifdef __INTEL_COMPILER
11818 rm -f conftest.$ac_objext
11819 if { (eval echo "$as_me:11819: \"$ac_compile\"") >&5
11820 (eval $ac_compile) 2>&5
11822 echo "$as_me:11822: \$? = $ac_status" >&5
11823 (exit $ac_status); } &&
11824 { ac_try='test -s conftest.$ac_objext'
11825 { (eval echo "$as_me:11825: \"$ac_try\"") >&5
11826 (eval $ac_try) 2>&5
11828 echo "$as_me:11828: \$? = $ac_status" >&5
11829 (exit $ac_status); }; }; then
11831 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
11834 echo "$as_me: failed program was:" >&5
11835 cat conftest.$ac_ext >&5
11837 rm -f conftest.$ac_objext conftest.$ac_ext
11838 CFLAGS="$cf_save_CFLAGS"
11839 echo "$as_me:11839: result: $INTEL_COMPILER" >&5
11840 echo "${ECHO_T}$INTEL_COMPILER" >&6
11847 if test "$GCC" = yes ; then
11848 echo "$as_me:11848: checking if this is really Clang C compiler" >&5
11849 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
11850 cf_save_CFLAGS="$CFLAGS"
11851 CFLAGS="$CFLAGS -Qunused-arguments"
11852 cat >conftest.$ac_ext <<_ACEOF
11853 #line 11853 "configure"
11854 #include "confdefs.h"
11869 rm -f conftest.$ac_objext
11870 if { (eval echo "$as_me:11870: \"$ac_compile\"") >&5
11871 (eval $ac_compile) 2>&5
11873 echo "$as_me:11873: \$? = $ac_status" >&5
11874 (exit $ac_status); } &&
11875 { ac_try='test -s conftest.$ac_objext'
11876 { (eval echo "$as_me:11876: \"$ac_try\"") >&5
11877 (eval $ac_try) 2>&5
11879 echo "$as_me:11879: \$? = $ac_status" >&5
11880 (exit $ac_status); }; }; then
11882 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
11885 echo "$as_me: failed program was:" >&5
11886 cat conftest.$ac_ext >&5
11888 rm -f conftest.$ac_objext conftest.$ac_ext
11889 CFLAGS="$cf_save_CFLAGS"
11890 echo "$as_me:11890: result: $CLANG_COMPILER" >&5
11891 echo "${ECHO_T}$CLANG_COMPILER" >&6
11894 cat > conftest.$ac_ext <<EOF
11895 #line 11895 "${as_me:-configure}"
11896 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11899 if test "$INTEL_COMPILER" = yes
11901 # The "-wdXXX" options suppress warnings:
11902 # remark #1419: external declaration in primary source file
11903 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11904 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11905 # remark #193: zero used for undefined preprocessing identifier
11906 # remark #593: variable "curs_sb_left_arrow" was set but never used
11907 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11908 # remark #869: parameter "tw" was never referenced
11909 # remark #981: operands are evaluated in unspecified order
11910 # warning #279: controlling expression is constant
11912 { echo "$as_me:11912: checking for $CC warning options..." >&5
11913 echo "$as_me: checking for $CC warning options..." >&6;}
11914 cf_save_CFLAGS="$CFLAGS"
11915 EXTRA_CFLAGS="-Wall"
11927 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11928 if { (eval echo "$as_me:11928: \"$ac_compile\"") >&5
11929 (eval $ac_compile) 2>&5
11931 echo "$as_me:11931: \$? = $ac_status" >&5
11932 (exit $ac_status); }; then
11933 test -n "$verbose" && echo "$as_me:11933: result: ... -$cf_opt" >&5
11934 echo "${ECHO_T}... -$cf_opt" >&6
11935 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11938 CFLAGS="$cf_save_CFLAGS"
11940 elif test "$GCC" = yes
11942 { echo "$as_me:11942: checking for $CC warning options..." >&5
11943 echo "$as_me: checking for $CC warning options..." >&6;}
11944 cf_save_CFLAGS="$CFLAGS"
11947 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
11948 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
11949 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
11950 for cf_opt in W Wall \
11951 Wbad-function-cast \
11954 Wdeclaration-after-statement \
11957 Wmissing-declarations \
11958 Wmissing-prototypes \
11962 Wstrict-prototypes \
11963 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
11965 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11966 if { (eval echo "$as_me:11966: \"$ac_compile\"") >&5
11967 (eval $ac_compile) 2>&5
11969 echo "$as_me:11969: \$? = $ac_status" >&5
11970 (exit $ac_status); }; then
11971 test -n "$verbose" && echo "$as_me:11971: result: ... -$cf_opt" >&5
11972 echo "${ECHO_T}... -$cf_opt" >&6
11975 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
11978 case $GCC_VERSION in
11980 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
11982 echo "${as_me:-configure}:11982: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
11988 case $GCC_VERSION in
11990 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
11992 echo "${as_me:-configure}:11992: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
11998 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12001 CFLAGS="$cf_save_CFLAGS"
12007 if test "$GCC" = yes
12009 cat > conftest.i <<EOF
12011 #define GCC_PRINTF 0
12014 #define GCC_SCANF 0
12016 #ifndef GCC_NORETURN
12017 #define GCC_NORETURN /* nothing */
12020 #define GCC_UNUSED /* nothing */
12023 if test "$GCC" = yes
12025 { echo "$as_me:12025: checking for $CC __attribute__ directives..." >&5
12026 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12027 cat > conftest.$ac_ext <<EOF
12028 #line 12028 "${as_me:-configure}"
12029 #include "confdefs.h"
12030 #include "conftest.h"
12031 #include "conftest.i"
12033 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12035 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12038 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
12040 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
12042 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12043 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12044 extern void foo(void) GCC_NORETURN;
12045 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12047 cf_printf_attribute=no
12048 cf_scanf_attribute=no
12049 for cf_attribute in scanf printf unused noreturn
12052 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12054 cf_directive="__attribute__(($cf_attribute))"
12055 echo "checking for $CC $cf_directive" 1>&5
12057 case $cf_attribute in
12059 cf_printf_attribute=yes
12060 cat >conftest.h <<EOF
12061 #define GCC_$cf_ATTRIBUTE 1
12065 cf_scanf_attribute=yes
12066 cat >conftest.h <<EOF
12067 #define GCC_$cf_ATTRIBUTE 1
12071 cat >conftest.h <<EOF
12072 #define GCC_$cf_ATTRIBUTE $cf_directive
12077 if { (eval echo "$as_me:12077: \"$ac_compile\"") >&5
12078 (eval $ac_compile) 2>&5
12080 echo "$as_me:12080: \$? = $ac_status" >&5
12081 (exit $ac_status); }; then
12082 test -n "$verbose" && echo "$as_me:12082: result: ... $cf_attribute" >&5
12083 echo "${ECHO_T}... $cf_attribute" >&6
12084 cat conftest.h >>confdefs.h
12085 case $cf_attribute in
12088 cat >>confdefs.h <<EOF
12089 #define GCC_NORETURN $cf_directive
12094 cf_value='/* nothing */'
12095 if test "$cf_printf_attribute" != no ; then
12096 cf_value='__attribute__((format(printf,fmt,var)))'
12098 cat >>confdefs.h <<\EOF
12099 #define GCC_PRINTF 1
12104 cat >>confdefs.h <<EOF
12105 #define GCC_PRINTFLIKE(fmt,var) $cf_value
12110 cf_value='/* nothing */'
12111 if test "$cf_scanf_attribute" != no ; then
12112 cf_value='__attribute__((format(scanf,fmt,var)))'
12114 cat >>confdefs.h <<\EOF
12115 #define GCC_SCANF 1
12120 cat >>confdefs.h <<EOF
12121 #define GCC_SCANFLIKE(fmt,var) $cf_value
12127 cat >>confdefs.h <<EOF
12128 #define GCC_UNUSED $cf_directive
12136 fgrep define conftest.i >>confdefs.h
12141 ### use option --enable-assertions to turn on generation of assertion code
12142 echo "$as_me:12142: checking if you want to enable runtime assertions" >&5
12143 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12145 # Check whether --enable-assertions or --disable-assertions was given.
12146 if test "${enable_assertions+set}" = set; then
12147 enableval="$enable_assertions"
12148 with_assertions=$enableval
12152 echo "$as_me:12152: result: $with_assertions" >&5
12153 echo "${ECHO_T}$with_assertions" >&6
12156 if test "$with_assertions" = no
12158 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12161 ADAFLAGS="$ADAFLAGS -gnata"
12166 ### use option --disable-leaks to suppress "permanent" leaks, for testing
12168 cat >>confdefs.h <<\EOF
12169 #define HAVE_NC_ALLOC_H 1
12172 ### use option --enable-expanded to generate certain macros as functions
12174 # Check whether --enable-expanded or --disable-expanded was given.
12175 if test "${enable_expanded+set}" = set; then
12176 enableval="$enable_expanded"
12177 test "$enableval" = yes &&
12178 cat >>confdefs.h <<\EOF
12179 #define NCURSES_EXPANDED 1
12184 ### use option --disable-macros to suppress macros in favor of functions
12186 # Check whether --enable-macros or --disable-macros was given.
12187 if test "${enable_macros+set}" = set; then
12188 enableval="$enable_macros"
12189 test "$enableval" = no &&
12190 cat >>confdefs.h <<\EOF
12191 #define NCURSES_NOMACROS 1
12196 # Normally we only add trace() to the debug-library. Allow this to be
12197 # extended to all models of the ncurses library:
12199 case "$CFLAGS $CPPFLAGS" in
12205 echo "$as_me:12205: checking whether to add trace feature to all models" >&5
12206 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
12208 # Check whether --with-trace or --without-trace was given.
12209 if test "${with_trace+set}" = set; then
12210 withval="$with_trace"
12211 cf_with_trace=$withval
12213 cf_with_trace=$cf_all_traces
12215 echo "$as_me:12215: result: $cf_with_trace" >&5
12216 echo "${ECHO_T}$cf_with_trace" >&6
12218 if test "$cf_with_trace" = yes ; then
12224 cf_new_extra_cppflags=
12226 for cf_add_cflags in -DTRACE
12228 case $cf_fix_cppflags in
12230 case $cf_add_cflags in
12231 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12232 case $cf_add_cflags in
12234 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12236 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12237 && test -z "${cf_tst_cflags}" \
12238 && cf_fix_cppflags=yes
12240 if test $cf_fix_cppflags = yes ; then
12241 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12243 elif test "${cf_tst_cflags}" = "\"'" ; then
12244 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12249 case "$CPPFLAGS" in
12253 case $cf_add_cflags in
12255 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12257 CPPFLAGS=`echo "$CPPFLAGS" | \
12258 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12259 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12263 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12268 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12273 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12275 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12277 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12278 && test -z "${cf_tst_cflags}" \
12279 && cf_fix_cppflags=no
12284 if test -n "$cf_new_cflags" ; then
12286 CFLAGS="$CFLAGS $cf_new_cflags"
12289 if test -n "$cf_new_cppflags" ; then
12291 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12294 if test -n "$cf_new_extra_cppflags" ; then
12296 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12303 echo "$as_me:12303: checking if we want to use GNAT projects" >&5
12304 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
12306 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
12307 if test "${enable_gnat_projects+set}" = set; then
12308 enableval="$enable_gnat_projects"
12309 test "$enableval" != no && enableval=yes
12310 if test "$enableval" != "yes" ; then
12311 enable_gnat_projects=no
12313 enable_gnat_projects=yes
12317 enable_gnat_projects=yes
12320 echo "$as_me:12320: result: $enable_gnat_projects" >&5
12321 echo "${ECHO_T}$enable_gnat_projects" >&6
12323 ### Checks for libraries.
12324 case $cf_cv_system_name in
12328 echo "$as_me:12328: checking for gettimeofday" >&5
12329 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
12330 if test "${ac_cv_func_gettimeofday+set}" = set; then
12331 echo $ECHO_N "(cached) $ECHO_C" >&6
12333 cat >conftest.$ac_ext <<_ACEOF
12334 #line 12334 "configure"
12335 #include "confdefs.h"
12336 /* System header to define __stub macros and hopefully few prototypes,
12337 which can conflict with char gettimeofday (); below. */
12338 #include <assert.h>
12339 /* Override any gcc2 internal prototype to avoid an error. */
12343 /* We use char because int might match the return type of a gcc2
12344 builtin and then its argument prototype would still apply. */
12345 char gettimeofday ();
12351 /* The GNU C library defines this for functions which it implements
12352 to always fail with ENOSYS. Some functions are actually named
12353 something starting with __ and the normal name is an alias. */
12354 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
12357 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12364 rm -f conftest.$ac_objext conftest$ac_exeext
12365 if { (eval echo "$as_me:12365: \"$ac_link\"") >&5
12366 (eval $ac_link) 2>&5
12368 echo "$as_me:12368: \$? = $ac_status" >&5
12369 (exit $ac_status); } &&
12370 { ac_try='test -s conftest$ac_exeext'
12371 { (eval echo "$as_me:12371: \"$ac_try\"") >&5
12372 (eval $ac_try) 2>&5
12374 echo "$as_me:12374: \$? = $ac_status" >&5
12375 (exit $ac_status); }; }; then
12376 ac_cv_func_gettimeofday=yes
12378 echo "$as_me: failed program was:" >&5
12379 cat conftest.$ac_ext >&5
12380 ac_cv_func_gettimeofday=no
12382 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12384 echo "$as_me:12384: result: $ac_cv_func_gettimeofday" >&5
12385 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
12386 if test $ac_cv_func_gettimeofday = yes; then
12387 cat >>confdefs.h <<\EOF
12388 #define HAVE_GETTIMEOFDAY 1
12393 echo "$as_me:12393: checking for gettimeofday in -lbsd" >&5
12394 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
12395 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
12396 echo $ECHO_N "(cached) $ECHO_C" >&6
12398 ac_check_lib_save_LIBS=$LIBS
12400 cat >conftest.$ac_ext <<_ACEOF
12401 #line 12401 "configure"
12402 #include "confdefs.h"
12404 /* Override any gcc2 internal prototype to avoid an error. */
12408 /* We use char because int might match the return type of a gcc2
12409 builtin and then its argument prototype would still apply. */
12410 char gettimeofday ();
12419 rm -f conftest.$ac_objext conftest$ac_exeext
12420 if { (eval echo "$as_me:12420: \"$ac_link\"") >&5
12421 (eval $ac_link) 2>&5
12423 echo "$as_me:12423: \$? = $ac_status" >&5
12424 (exit $ac_status); } &&
12425 { ac_try='test -s conftest$ac_exeext'
12426 { (eval echo "$as_me:12426: \"$ac_try\"") >&5
12427 (eval $ac_try) 2>&5
12429 echo "$as_me:12429: \$? = $ac_status" >&5
12430 (exit $ac_status); }; }; then
12431 ac_cv_lib_bsd_gettimeofday=yes
12433 echo "$as_me: failed program was:" >&5
12434 cat conftest.$ac_ext >&5
12435 ac_cv_lib_bsd_gettimeofday=no
12437 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12438 LIBS=$ac_check_lib_save_LIBS
12440 echo "$as_me:12440: result: $ac_cv_lib_bsd_gettimeofday" >&5
12441 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
12442 if test $ac_cv_lib_bsd_gettimeofday = yes; then
12444 cat >>confdefs.h <<\EOF
12445 #define HAVE_GETTIMEOFDAY 1
12455 ### Checks for header files.
12456 echo "$as_me:12456: checking for ANSI C header files" >&5
12457 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12458 if test "${ac_cv_header_stdc+set}" = set; then
12459 echo $ECHO_N "(cached) $ECHO_C" >&6
12461 cat >conftest.$ac_ext <<_ACEOF
12462 #line 12462 "configure"
12463 #include "confdefs.h"
12464 #include <stdlib.h>
12465 #include <stdarg.h>
12466 #include <string.h>
12470 if { (eval echo "$as_me:12470: \"$ac_cpp conftest.$ac_ext\"") >&5
12471 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12473 egrep -v '^ *\+' conftest.er1 >conftest.err
12475 cat conftest.err >&5
12476 echo "$as_me:12476: \$? = $ac_status" >&5
12477 (exit $ac_status); } >/dev/null; then
12478 if test -s conftest.err; then
12479 ac_cpp_err=$ac_c_preproc_warn_flag
12486 if test -z "$ac_cpp_err"; then
12487 ac_cv_header_stdc=yes
12489 echo "$as_me: failed program was:" >&5
12490 cat conftest.$ac_ext >&5
12491 ac_cv_header_stdc=no
12493 rm -f conftest.err conftest.$ac_ext
12495 if test $ac_cv_header_stdc = yes; then
12496 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12497 cat >conftest.$ac_ext <<_ACEOF
12498 #line 12498 "configure"
12499 #include "confdefs.h"
12500 #include <string.h>
12503 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12504 egrep "memchr" >/dev/null 2>&1; then
12507 ac_cv_header_stdc=no
12513 if test $ac_cv_header_stdc = yes; then
12514 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12515 cat >conftest.$ac_ext <<_ACEOF
12516 #line 12516 "configure"
12517 #include "confdefs.h"
12518 #include <stdlib.h>
12521 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12522 egrep "free" >/dev/null 2>&1; then
12525 ac_cv_header_stdc=no
12531 if test $ac_cv_header_stdc = yes; then
12532 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12533 if test "$cross_compiling" = yes; then
12536 cat >conftest.$ac_ext <<_ACEOF
12537 #line 12537 "configure"
12538 #include "confdefs.h"
12540 #if ((' ' & 0x0FF) == 0x020)
12541 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12542 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12544 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12545 || ('j' <= (c) && (c) <= 'r') \
12546 || ('s' <= (c) && (c) <= 'z'))
12547 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12550 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12555 for (i = 0; i < 256; i++)
12556 if (XOR (islower (i), ISLOWER (i))
12557 || toupper (i) != TOUPPER (i))
12558 $ac_main_return(2);
12559 $ac_main_return (0);
12562 rm -f conftest$ac_exeext
12563 if { (eval echo "$as_me:12563: \"$ac_link\"") >&5
12564 (eval $ac_link) 2>&5
12566 echo "$as_me:12566: \$? = $ac_status" >&5
12567 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12568 { (eval echo "$as_me:12568: \"$ac_try\"") >&5
12569 (eval $ac_try) 2>&5
12571 echo "$as_me:12571: \$? = $ac_status" >&5
12572 (exit $ac_status); }; }; then
12575 echo "$as_me: program exited with status $ac_status" >&5
12576 echo "$as_me: failed program was:" >&5
12577 cat conftest.$ac_ext >&5
12578 ac_cv_header_stdc=no
12580 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12584 echo "$as_me:12584: result: $ac_cv_header_stdc" >&5
12585 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12586 if test $ac_cv_header_stdc = yes; then
12588 cat >>confdefs.h <<\EOF
12589 #define STDC_HEADERS 1
12594 ac_header_dirent=no
12595 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12596 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12597 echo "$as_me:12597: checking for $ac_hdr that defines DIR" >&5
12598 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12599 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12600 echo $ECHO_N "(cached) $ECHO_C" >&6
12602 cat >conftest.$ac_ext <<_ACEOF
12603 #line 12603 "configure"
12604 #include "confdefs.h"
12605 #include <sys/types.h>
12617 rm -f conftest.$ac_objext
12618 if { (eval echo "$as_me:12618: \"$ac_compile\"") >&5
12619 (eval $ac_compile) 2>&5
12621 echo "$as_me:12621: \$? = $ac_status" >&5
12622 (exit $ac_status); } &&
12623 { ac_try='test -s conftest.$ac_objext'
12624 { (eval echo "$as_me:12624: \"$ac_try\"") >&5
12625 (eval $ac_try) 2>&5
12627 echo "$as_me:12627: \$? = $ac_status" >&5
12628 (exit $ac_status); }; }; then
12629 eval "$as_ac_Header=yes"
12631 echo "$as_me: failed program was:" >&5
12632 cat conftest.$ac_ext >&5
12633 eval "$as_ac_Header=no"
12635 rm -f conftest.$ac_objext conftest.$ac_ext
12637 echo "$as_me:12637: result: `eval echo '${'$as_ac_Header'}'`" >&5
12638 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12639 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12640 cat >>confdefs.h <<EOF
12641 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
12644 ac_header_dirent=$ac_hdr; break
12648 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12649 if test $ac_header_dirent = dirent.h; then
12650 echo "$as_me:12650: checking for opendir in -ldir" >&5
12651 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
12652 if test "${ac_cv_lib_dir_opendir+set}" = set; then
12653 echo $ECHO_N "(cached) $ECHO_C" >&6
12655 ac_check_lib_save_LIBS=$LIBS
12657 cat >conftest.$ac_ext <<_ACEOF
12658 #line 12658 "configure"
12659 #include "confdefs.h"
12661 /* Override any gcc2 internal prototype to avoid an error. */
12665 /* We use char because int might match the return type of a gcc2
12666 builtin and then its argument prototype would still apply. */
12676 rm -f conftest.$ac_objext conftest$ac_exeext
12677 if { (eval echo "$as_me:12677: \"$ac_link\"") >&5
12678 (eval $ac_link) 2>&5
12680 echo "$as_me:12680: \$? = $ac_status" >&5
12681 (exit $ac_status); } &&
12682 { ac_try='test -s conftest$ac_exeext'
12683 { (eval echo "$as_me:12683: \"$ac_try\"") >&5
12684 (eval $ac_try) 2>&5
12686 echo "$as_me:12686: \$? = $ac_status" >&5
12687 (exit $ac_status); }; }; then
12688 ac_cv_lib_dir_opendir=yes
12690 echo "$as_me: failed program was:" >&5
12691 cat conftest.$ac_ext >&5
12692 ac_cv_lib_dir_opendir=no
12694 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12695 LIBS=$ac_check_lib_save_LIBS
12697 echo "$as_me:12697: result: $ac_cv_lib_dir_opendir" >&5
12698 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
12699 if test $ac_cv_lib_dir_opendir = yes; then
12704 echo "$as_me:12704: checking for opendir in -lx" >&5
12705 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
12706 if test "${ac_cv_lib_x_opendir+set}" = set; then
12707 echo $ECHO_N "(cached) $ECHO_C" >&6
12709 ac_check_lib_save_LIBS=$LIBS
12711 cat >conftest.$ac_ext <<_ACEOF
12712 #line 12712 "configure"
12713 #include "confdefs.h"
12715 /* Override any gcc2 internal prototype to avoid an error. */
12719 /* We use char because int might match the return type of a gcc2
12720 builtin and then its argument prototype would still apply. */
12730 rm -f conftest.$ac_objext conftest$ac_exeext
12731 if { (eval echo "$as_me:12731: \"$ac_link\"") >&5
12732 (eval $ac_link) 2>&5
12734 echo "$as_me:12734: \$? = $ac_status" >&5
12735 (exit $ac_status); } &&
12736 { ac_try='test -s conftest$ac_exeext'
12737 { (eval echo "$as_me:12737: \"$ac_try\"") >&5
12738 (eval $ac_try) 2>&5
12740 echo "$as_me:12740: \$? = $ac_status" >&5
12741 (exit $ac_status); }; }; then
12742 ac_cv_lib_x_opendir=yes
12744 echo "$as_me: failed program was:" >&5
12745 cat conftest.$ac_ext >&5
12746 ac_cv_lib_x_opendir=no
12748 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12749 LIBS=$ac_check_lib_save_LIBS
12751 echo "$as_me:12751: result: $ac_cv_lib_x_opendir" >&5
12752 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
12753 if test $ac_cv_lib_x_opendir = yes; then
12759 echo "$as_me:12759: checking whether time.h and sys/time.h may both be included" >&5
12760 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12761 if test "${ac_cv_header_time+set}" = set; then
12762 echo $ECHO_N "(cached) $ECHO_C" >&6
12764 cat >conftest.$ac_ext <<_ACEOF
12765 #line 12765 "configure"
12766 #include "confdefs.h"
12767 #include <sys/types.h>
12768 #include <sys/time.h>
12774 if ((struct tm *) 0)
12780 rm -f conftest.$ac_objext
12781 if { (eval echo "$as_me:12781: \"$ac_compile\"") >&5
12782 (eval $ac_compile) 2>&5
12784 echo "$as_me:12784: \$? = $ac_status" >&5
12785 (exit $ac_status); } &&
12786 { ac_try='test -s conftest.$ac_objext'
12787 { (eval echo "$as_me:12787: \"$ac_try\"") >&5
12788 (eval $ac_try) 2>&5
12790 echo "$as_me:12790: \$? = $ac_status" >&5
12791 (exit $ac_status); }; }; then
12792 ac_cv_header_time=yes
12794 echo "$as_me: failed program was:" >&5
12795 cat conftest.$ac_ext >&5
12796 ac_cv_header_time=no
12798 rm -f conftest.$ac_objext conftest.$ac_ext
12800 echo "$as_me:12800: result: $ac_cv_header_time" >&5
12801 echo "${ECHO_T}$ac_cv_header_time" >&6
12802 if test $ac_cv_header_time = yes; then
12804 cat >>confdefs.h <<\EOF
12805 #define TIME_WITH_SYS_TIME 1
12810 ### checks for compiler characteristics
12812 ac_cpp='$CPP $CPPFLAGS'
12813 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12814 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12815 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12816 ac_main_return=return
12818 echo "$as_me:12818: checking for an ANSI C-conforming const" >&5
12819 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
12820 if test "${ac_cv_c_const+set}" = set; then
12821 echo $ECHO_N "(cached) $ECHO_C" >&6
12823 cat >conftest.$ac_ext <<_ACEOF
12824 #line 12824 "configure"
12825 #include "confdefs.h"
12830 /* FIXME: Include the comments suggested by Paul. */
12831 #ifndef __cplusplus
12832 /* Ultrix mips cc rejects this. */
12833 typedef int charset[2];
12835 /* SunOS 4.1.1 cc rejects this. */
12836 char const *const *ccp;
12838 /* NEC SVR4.0.2 mips cc rejects this. */
12839 struct point {int x, y;};
12840 static struct point const zero = {0,0};
12841 /* AIX XL C 1.02.0.0 rejects this.
12842 It does not let you subtract one const X* pointer from another in
12843 an arm of an if-expression whose if-part is not a constant
12845 const char *g = "string";
12846 ccp = &g + (g ? g-g : 0);
12847 /* HPUX 7.0 cc rejects these. */
12850 ccp = (char const *const *) p;
12851 { /* SCO 3.2v4 cc rejects this. */
12853 char const *s = 0 ? (char *) 0 : (char const *) 0;
12857 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12858 int x[] = {25, 17};
12859 const int *foo = &x[0];
12862 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12863 typedef const int *iptr;
12867 { /* AIX XL C 1.02.0.0 rejects this saying
12868 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12869 struct s { int j; const int *ap[3]; };
12870 struct s *b; b->j = 5;
12872 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12873 const int foo = 10;
12881 rm -f conftest.$ac_objext
12882 if { (eval echo "$as_me:12882: \"$ac_compile\"") >&5
12883 (eval $ac_compile) 2>&5
12885 echo "$as_me:12885: \$? = $ac_status" >&5
12886 (exit $ac_status); } &&
12887 { ac_try='test -s conftest.$ac_objext'
12888 { (eval echo "$as_me:12888: \"$ac_try\"") >&5
12889 (eval $ac_try) 2>&5
12891 echo "$as_me:12891: \$? = $ac_status" >&5
12892 (exit $ac_status); }; }; then
12895 echo "$as_me: failed program was:" >&5
12896 cat conftest.$ac_ext >&5
12899 rm -f conftest.$ac_objext conftest.$ac_ext
12901 echo "$as_me:12901: result: $ac_cv_c_const" >&5
12902 echo "${ECHO_T}$ac_cv_c_const" >&6
12903 if test $ac_cv_c_const = no; then
12905 cat >>confdefs.h <<\EOF
12911 ### Checks for external-data
12913 echo "$as_me:12913: checking if data-only library module links" >&5
12914 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
12915 if test "${cf_cv_link_dataonly+set}" = set; then
12916 echo $ECHO_N "(cached) $ECHO_C" >&6
12920 cat >conftest.$ac_ext <<EOF
12921 #line 12921 "configure"
12922 int testdata[3] = { 123, 456, 789 };
12924 if { (eval echo "$as_me:12924: \"$ac_compile\"") >&5
12925 (eval $ac_compile) 2>&5
12927 echo "$as_me:12927: \$? = $ac_status" >&5
12928 (exit $ac_status); } ; then
12929 mv conftest.o data.o && \
12930 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
12932 rm -f conftest.$ac_ext data.o
12933 cat >conftest.$ac_ext <<EOF
12934 #line 12934 "configure"
12938 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
12940 extern int testdata[3];
12941 return testdata[0] == 123
12942 && testdata[1] == 456
12943 && testdata[2] == 789;
12947 if { (eval echo "$as_me:12947: \"$ac_compile\"") >&5
12948 (eval $ac_compile) 2>&5
12950 echo "$as_me:12950: \$? = $ac_status" >&5
12951 (exit $ac_status); }; then
12952 mv conftest.o func.o && \
12953 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
12955 rm -f conftest.$ac_ext func.o
12956 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
12957 cf_saveLIBS="$LIBS"
12958 LIBS="conftest.a $LIBS"
12959 if test "$cross_compiling" = yes; then
12960 cf_cv_link_dataonly=unknown
12962 cat >conftest.$ac_ext <<_ACEOF
12963 #line 12963 "configure"
12964 #include "confdefs.h"
12968 extern int testfunc();
12969 ${cf_cv_main_return:-return} (!testfunc());
12973 rm -f conftest$ac_exeext
12974 if { (eval echo "$as_me:12974: \"$ac_link\"") >&5
12975 (eval $ac_link) 2>&5
12977 echo "$as_me:12977: \$? = $ac_status" >&5
12978 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12979 { (eval echo "$as_me:12979: \"$ac_try\"") >&5
12980 (eval $ac_try) 2>&5
12982 echo "$as_me:12982: \$? = $ac_status" >&5
12983 (exit $ac_status); }; }; then
12984 cf_cv_link_dataonly=yes
12986 echo "$as_me: program exited with status $ac_status" >&5
12987 echo "$as_me: failed program was:" >&5
12988 cat conftest.$ac_ext >&5
12989 cf_cv_link_dataonly=no
12991 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12993 LIBS="$cf_saveLIBS"
12997 echo "$as_me:12997: result: $cf_cv_link_dataonly" >&5
12998 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
13000 if test "$cf_cv_link_dataonly" = no ; then
13002 cat >>confdefs.h <<\EOF
13003 #define BROKEN_LINKER 1
13009 ### Checks for library functions.
13011 echo "$as_me:13011: checking for working mkstemp" >&5
13012 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
13013 if test "${cf_cv_func_mkstemp+set}" = set; then
13014 echo $ECHO_N "(cached) $ECHO_C" >&6
13018 if test "$cross_compiling" = yes; then
13019 cf_cv_func_mkstemp=maybe
13021 cat >conftest.$ac_ext <<_ACEOF
13022 #line 13022 "configure"
13023 #include "confdefs.h"
13025 #include <sys/types.h>
13026 #include <stdlib.h>
13028 #include <string.h>
13029 #include <sys/stat.h>
13032 char *tmpl = "conftestXXXXXX";
13040 for (n = 0; n < 2; ++n) {
13041 strcpy(name[n], tmpl);
13042 if ((fd = mkstemp(name[n])) >= 0) {
13043 if (!strcmp(name[n], tmpl)
13044 || stat(name[n], &sb) != 0
13045 || (sb.st_mode & S_IFMT) != S_IFREG
13046 || (sb.st_mode & 077) != 0) {
13053 && !strcmp(name[0], name[1]))
13055 ${cf_cv_main_return:-return}(result);
13059 rm -f conftest$ac_exeext
13060 if { (eval echo "$as_me:13060: \"$ac_link\"") >&5
13061 (eval $ac_link) 2>&5
13063 echo "$as_me:13063: \$? = $ac_status" >&5
13064 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13065 { (eval echo "$as_me:13065: \"$ac_try\"") >&5
13066 (eval $ac_try) 2>&5
13068 echo "$as_me:13068: \$? = $ac_status" >&5
13069 (exit $ac_status); }; }; then
13070 cf_cv_func_mkstemp=yes
13073 echo "$as_me: program exited with status $ac_status" >&5
13074 echo "$as_me: failed program was:" >&5
13075 cat conftest.$ac_ext >&5
13076 cf_cv_func_mkstemp=no
13079 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13083 echo "$as_me:13083: result: $cf_cv_func_mkstemp" >&5
13084 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
13085 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
13086 echo "$as_me:13086: checking for mkstemp" >&5
13087 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
13088 if test "${ac_cv_func_mkstemp+set}" = set; then
13089 echo $ECHO_N "(cached) $ECHO_C" >&6
13091 cat >conftest.$ac_ext <<_ACEOF
13092 #line 13092 "configure"
13093 #include "confdefs.h"
13094 /* System header to define __stub macros and hopefully few prototypes,
13095 which can conflict with char mkstemp (); below. */
13096 #include <assert.h>
13097 /* Override any gcc2 internal prototype to avoid an error. */
13101 /* We use char because int might match the return type of a gcc2
13102 builtin and then its argument prototype would still apply. */
13109 /* The GNU C library defines this for functions which it implements
13110 to always fail with ENOSYS. Some functions are actually named
13111 something starting with __ and the normal name is an alias. */
13112 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
13115 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13122 rm -f conftest.$ac_objext conftest$ac_exeext
13123 if { (eval echo "$as_me:13123: \"$ac_link\"") >&5
13124 (eval $ac_link) 2>&5
13126 echo "$as_me:13126: \$? = $ac_status" >&5
13127 (exit $ac_status); } &&
13128 { ac_try='test -s conftest$ac_exeext'
13129 { (eval echo "$as_me:13129: \"$ac_try\"") >&5
13130 (eval $ac_try) 2>&5
13132 echo "$as_me:13132: \$? = $ac_status" >&5
13133 (exit $ac_status); }; }; then
13134 ac_cv_func_mkstemp=yes
13136 echo "$as_me: failed program was:" >&5
13137 cat conftest.$ac_ext >&5
13138 ac_cv_func_mkstemp=no
13140 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13142 echo "$as_me:13142: result: $ac_cv_func_mkstemp" >&5
13143 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
13146 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
13148 cat >>confdefs.h <<\EOF
13149 #define HAVE_MKSTEMP 1
13154 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
13155 CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13156 CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13160 if test "$cf_with_ada" != "no" ; then
13162 cf_ada_make=gnatmake
13163 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
13164 set dummy $cf_ada_make; ac_word=$2
13165 echo "$as_me:13165: checking for $ac_word" >&5
13166 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13167 if test "${ac_cv_prog_gnat_exists+set}" = set; then
13168 echo $ECHO_N "(cached) $ECHO_C" >&6
13170 if test -n "$gnat_exists"; then
13171 ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
13173 ac_save_IFS=$IFS; IFS=$ac_path_separator
13175 for ac_dir in $ac_dummy; do
13177 test -z "$ac_dir" && ac_dir=.
13178 $as_executable_p "$ac_dir/$ac_word" || continue
13179 ac_cv_prog_gnat_exists="yes"
13180 echo "$as_me:13180: found $ac_dir/$ac_word" >&5
13184 test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
13187 gnat_exists=$ac_cv_prog_gnat_exists
13188 if test -n "$gnat_exists"; then
13189 echo "$as_me:13189: result: $gnat_exists" >&5
13190 echo "${ECHO_T}$gnat_exists" >&6
13192 echo "$as_me:13192: result: no" >&5
13193 echo "${ECHO_T}no" >&6
13196 if test "$ac_cv_prog_gnat_exists" = no; then
13198 cf_cv_prog_gnat_correct=no
13201 echo "$as_me:13201: checking for gnat version" >&5
13202 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
13203 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
13204 grep '[0-9].[0-9][0-9]*' |\
13205 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
13206 echo "$as_me:13206: result: $cf_gnat_version" >&5
13207 echo "${ECHO_T}$cf_gnat_version" >&6
13209 case $cf_gnat_version in
13210 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
13211 cf_cv_prog_gnat_correct=yes
13214 { echo "$as_me:13214: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
13215 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
13216 cf_cv_prog_gnat_correct=no
13220 # Extract the first word of "m4", so it can be a program name with args.
13221 set dummy m4; ac_word=$2
13222 echo "$as_me:13222: checking for $ac_word" >&5
13223 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13224 if test "${ac_cv_prog_M4_exists+set}" = set; then
13225 echo $ECHO_N "(cached) $ECHO_C" >&6
13227 if test -n "$M4_exists"; then
13228 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
13230 ac_save_IFS=$IFS; IFS=$ac_path_separator
13232 for ac_dir in $ac_dummy; do
13234 test -z "$ac_dir" && ac_dir=.
13235 $as_executable_p "$ac_dir/$ac_word" || continue
13236 ac_cv_prog_M4_exists="yes"
13237 echo "$as_me:13237: found $ac_dir/$ac_word" >&5
13241 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
13244 M4_exists=$ac_cv_prog_M4_exists
13245 if test -n "$M4_exists"; then
13246 echo "$as_me:13246: result: $M4_exists" >&5
13247 echo "${ECHO_T}$M4_exists" >&6
13249 echo "$as_me:13249: result: no" >&5
13250 echo "${ECHO_T}no" >&6
13253 if test "$ac_cv_prog_M4_exists" = no; then
13254 cf_cv_prog_gnat_correct=no
13255 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
13257 if test "$cf_cv_prog_gnat_correct" = yes; then
13258 echo "$as_me:13258: checking if GNAT works" >&5
13259 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
13261 rm -rf conftest* *~conftest*
13262 cat >>conftest.ads <<CF_EOF
13263 procedure conftest;
13265 cat >>conftest.adb <<CF_EOF
13268 procedure conftest is
13270 Text_IO.Put ("Hello World");
13272 GNAT.OS_Lib.OS_Exit (0);
13275 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
13276 if ( ./conftest 1>&5 2>&1 ) ; then
13277 cf_cv_prog_gnat_correct=yes
13279 cf_cv_prog_gnat_correct=no
13282 cf_cv_prog_gnat_correct=no
13284 rm -rf conftest* *~conftest*
13286 echo "$as_me:13286: result: $cf_cv_prog_gnat_correct" >&5
13287 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
13291 if test "$cf_cv_prog_gnat_correct" = yes; then
13293 echo "$as_me:13293: checking optimization options for ADAFLAGS" >&5
13294 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
13298 ADAFLAGS="$ADAFLAGS -g"
13304 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
13306 ADAFLAGS="$ADAFLAGS $cf_O_flag"
13310 echo "$as_me:13310: result: $ADAFLAGS" >&5
13311 echo "${ECHO_T}$ADAFLAGS" >&6
13313 echo "$as_me:13313: checking if GNATPREP supports -T option" >&5
13314 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
13315 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
13316 echo $ECHO_N "(cached) $ECHO_C" >&6
13319 cf_cv_gnatprep_opt_t=no
13320 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
13323 echo "$as_me:13323: result: $cf_cv_gnatprep_opt_t" >&5
13324 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
13325 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
13327 echo "$as_me:13327: checking if GNAT supports generics" >&5
13328 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
13329 case $cf_gnat_version in
13331 cf_gnat_generics=yes
13334 cf_gnat_generics=no
13337 echo "$as_me:13337: result: $cf_gnat_generics" >&5
13338 echo "${ECHO_T}$cf_gnat_generics" >&6
13340 if test "$cf_gnat_generics" = yes
13342 cf_compile_generics=generics
13343 cf_generic_objects="\${GENOBJS}"
13345 cf_compile_generics=
13346 cf_generic_objects=
13349 echo "$as_me:13349: checking if GNAT supports SIGINT" >&5
13350 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
13351 if test "${cf_cv_gnat_sigint+set}" = set; then
13352 echo $ECHO_N "(cached) $ECHO_C" >&6
13355 rm -rf conftest* *~conftest*
13356 cat >>conftest.ads <<CF_EOF
13357 with Ada.Interrupts.Names;
13359 package ConfTest is
13361 pragma Warnings (Off); -- the next pragma exists since 3.11p
13362 pragma Unreserve_All_Interrupts;
13363 pragma Warnings (On);
13365 protected Process is
13367 function Continue return Boolean;
13368 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
13370 Done : Boolean := False;
13375 cat >>conftest.adb <<CF_EOF
13376 package body ConfTest is
13377 protected body Process is
13382 function Continue return Boolean is
13389 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
13390 cf_cv_gnat_sigint=yes
13392 cf_cv_gnat_sigint=no
13394 rm -rf conftest* *~conftest*
13397 echo "$as_me:13397: result: $cf_cv_gnat_sigint" >&5
13398 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
13400 if test $cf_cv_gnat_sigint = yes ; then
13403 USE_GNAT_SIGINT="#"
13406 cf_gnat_libraries=no
13407 cf_gnat_projects=no
13409 if test "$enable_gnat_projects" != no ; then
13410 echo "$as_me:13410: checking if GNAT supports project files" >&5
13411 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
13412 case $cf_gnat_version in
13416 case $cf_cv_system_name in
13420 mkdir conftest.src conftest.bin conftest.lib
13422 rm -rf conftest* *~conftest*
13423 cat >>library.gpr <<CF_EOF
13425 Kind := External ("LIB_KIND");
13426 for Library_Name use "ConfTest";
13427 for Object_Dir use ".";
13428 for Library_ALI_Dir use External("LIBRARY_DIR");
13429 for Library_Version use External ("SONAME");
13430 for Library_Kind use Kind;
13431 for Library_Dir use External("BUILD_DIR");
13432 Source_Dir := External ("SOURCE_DIR");
13433 for Source_Dirs use (Source_Dir);
13436 cat >>confpackage.ads <<CF_EOF
13437 package ConfPackage is
13438 procedure conftest;
13441 cat >>confpackage.adb <<CF_EOF
13443 package body ConfPackage is
13444 procedure conftest is
13446 Text_IO.Put ("Hello World");
13451 if ( $cf_ada_make $ADAFLAGS \
13453 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
13454 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
13455 -XSOURCE_DIR=`pwd` \
13456 -XSONAME=libConfTest.so.1 \
13457 -XLIB_KIND=static 1>&5 2>&1 ) ; then
13458 cf_gnat_projects=yes
13461 if test -f conftest.lib/confpackage.ali
13463 cf_gnat_libraries=yes
13465 rm -rf conftest* *~conftest*
13470 echo "$as_me:13470: result: $cf_gnat_projects" >&5
13471 echo "${ECHO_T}$cf_gnat_projects" >&6
13472 fi # enable_gnat_projects
13474 if test $cf_gnat_projects = yes
13476 echo "$as_me:13476: checking if GNAT supports libraries" >&5
13477 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
13478 echo "$as_me:13478: result: $cf_gnat_libraries" >&5
13479 echo "${ECHO_T}$cf_gnat_libraries" >&6
13482 if test "$cf_gnat_projects" = yes
13484 USE_OLD_MAKERULES="#"
13485 USE_GNAT_PROJECTS=""
13487 USE_OLD_MAKERULES=""
13488 USE_GNAT_PROJECTS="#"
13491 if test "$cf_gnat_libraries" = yes
13493 USE_GNAT_LIBRARIES=""
13495 USE_GNAT_LIBRARIES="#"
13498 echo "$as_me:13498: checking for ada-compiler" >&5
13499 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
13501 # Check whether --with-ada-compiler or --without-ada-compiler was given.
13502 if test "${with_ada_compiler+set}" = set; then
13503 withval="$with_ada_compiler"
13504 cf_ada_compiler=$withval
13506 cf_ada_compiler=gnatmake
13509 echo "$as_me:13509: result: $cf_ada_compiler" >&5
13510 echo "${ECHO_T}$cf_ada_compiler" >&6
13512 cf_ada_package=terminal_interface
13514 echo "$as_me:13514: checking for ada-include" >&5
13515 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
13517 # Check whether --with-ada-include or --without-ada-include was given.
13518 if test "${with_ada_include+set}" = set; then
13519 withval="$with_ada_include"
13522 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
13523 fi; if test -n "$prefix/share/ada/adainclude" ; then
13525 if test "x$prefix" != xNONE; then
13526 cf_path_syntax="$prefix"
13528 cf_path_syntax="$ac_default_prefix"
13531 case ".$withval" in
13532 (.\$\(*\)*|.\'*\'*)
13536 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13538 (.\${*prefix}*|.\${*dir}*)
13539 eval withval="$withval"
13540 case ".$withval" in
13542 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
13547 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
13550 { { echo "$as_me:13550: error: expected a pathname, not \"$withval\"" >&5
13551 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
13552 { (exit 1); exit 1; }; }
13557 eval ADA_INCLUDE="$withval"
13559 echo "$as_me:13559: result: $ADA_INCLUDE" >&5
13560 echo "${ECHO_T}$ADA_INCLUDE" >&6
13562 echo "$as_me:13562: checking for ada-objects" >&5
13563 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
13565 # Check whether --with-ada-objects or --without-ada-objects was given.
13566 if test "${with_ada_objects+set}" = set; then
13567 withval="$with_ada_objects"
13570 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
13571 fi; if test -n "$prefix/lib/ada/adalib" ; then
13573 if test "x$prefix" != xNONE; then
13574 cf_path_syntax="$prefix"
13576 cf_path_syntax="$ac_default_prefix"
13579 case ".$withval" in
13580 (.\$\(*\)*|.\'*\'*)
13584 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13586 (.\${*prefix}*|.\${*dir}*)
13587 eval withval="$withval"
13588 case ".$withval" in
13590 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
13595 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
13598 { { echo "$as_me:13598: error: expected a pathname, not \"$withval\"" >&5
13599 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
13600 { (exit 1); exit 1; }; }
13605 eval ADA_OBJECTS="$withval"
13607 echo "$as_me:13607: result: $ADA_OBJECTS" >&5
13608 echo "${ECHO_T}$ADA_OBJECTS" >&6
13610 echo "$as_me:13610: checking if an Ada95 shared-library should be built" >&5
13611 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
13613 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
13614 if test "${with_ada_sharedlib+set}" = set; then
13615 withval="$with_ada_sharedlib"
13616 with_ada_sharedlib=$withval
13618 with_ada_sharedlib=no
13620 echo "$as_me:13620: result: $with_ada_sharedlib" >&5
13621 echo "${ECHO_T}$with_ada_sharedlib" >&6
13623 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
13624 MAKE_ADA_SHAREDLIB="#"
13626 if test "x$with_ada_sharedlib" != xno
13628 MAKE_ADA_SHAREDLIB=
13629 if test "x$with_ada_sharedlib" != xyes
13631 ADA_SHAREDLIB="$with_ada_sharedlib"
13636 { { echo "$as_me:13636: error: No usable Ada compiler found" >&5
13637 echo "$as_me: error: No usable Ada compiler found" >&2;}
13638 { (exit 1); exit 1; }; }
13641 { { echo "$as_me:13641: error: The Ada compiler is needed for this package" >&5
13642 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
13643 { (exit 1); exit 1; }; }
13646 ################################################################################
13653 ### Construct the list of include-directories to be generated
13655 if test "$srcdir" != "."; then
13656 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
13658 CPPFLAGS="-I../include $CPPFLAGS"
13659 if test "$srcdir" != "."; then
13660 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
13662 CPPFLAGS="-I. $CPPFLAGS"
13664 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
13665 if test "$srcdir" != "."; then
13666 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
13668 if test "$GCC" != yes; then
13669 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
13670 elif test "$includedir" != "/usr/include"; then
13671 if test "$includedir" = '${prefix}/include' ; then
13672 if test x$prefix != x/usr ; then
13673 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
13676 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
13680 ### Build up pieces for makefile rules
13681 echo "$as_me:13681: checking default library suffix" >&5
13682 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
13684 case $DFT_LWR_MODEL in
13685 (libtool) DFT_ARG_SUFFIX='' ;;
13686 (normal) DFT_ARG_SUFFIX='' ;;
13687 (debug) DFT_ARG_SUFFIX='_g' ;;
13688 (profile) DFT_ARG_SUFFIX='_p' ;;
13689 (shared) DFT_ARG_SUFFIX='' ;;
13691 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
13692 echo "$as_me:13692: result: $DFT_ARG_SUFFIX" >&5
13693 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
13695 echo "$as_me:13695: checking default library-dependency suffix" >&5
13696 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
13698 case X$DFT_LWR_MODEL in
13700 DFT_LIB_SUFFIX='.la'
13701 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13704 DFT_LIB_SUFFIX='_g.a'
13705 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13708 DFT_LIB_SUFFIX='_p.a'
13709 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13712 case $cf_cv_system_name in
13714 DFT_LIB_SUFFIX='.so'
13715 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13717 (cygwin*|msys*|mingw*)
13718 DFT_LIB_SUFFIX='.dll'
13719 DFT_DEP_SUFFIX='.dll.a'
13722 DFT_LIB_SUFFIX='.dylib'
13723 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13728 DFT_LIB_SUFFIX='.so'
13729 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13732 DFT_LIB_SUFFIX='.sl'
13733 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13738 DFT_LIB_SUFFIX='.so'
13739 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13744 DFT_LIB_SUFFIX='.a'
13745 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13748 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
13750 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
13751 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
13753 echo "$as_me:13753: result: $DFT_DEP_SUFFIX" >&5
13754 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
13756 echo "$as_me:13756: checking default object directory" >&5
13757 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
13759 case $DFT_LWR_MODEL in
13760 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
13761 (normal) DFT_OBJ_SUBDIR='objects' ;;
13762 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
13763 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
13765 case $cf_cv_system_name in
13767 DFT_OBJ_SUBDIR='objects' ;;
13769 DFT_OBJ_SUBDIR='obj_s' ;;
13772 echo "$as_me:13772: result: $DFT_OBJ_SUBDIR" >&5
13773 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
13775 ### Set up low-level terminfo dependencies for makefiles.
13777 if test "$DFT_LWR_MODEL" = shared ; then
13778 case $cf_cv_system_name in
13780 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
13783 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
13788 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
13790 ### Construct the list of subdirectories for which we'll customize makefiles
13791 ### with the appropriate compile-rules.
13793 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
13795 cat >>confdefs.h <<EOF
13796 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
13799 ### Now that we're done running tests, add the compiler-warnings, if any
13804 cf_new_extra_cppflags=
13806 for cf_add_cflags in $EXTRA_CFLAGS
13808 case $cf_fix_cppflags in
13810 case $cf_add_cflags in
13811 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13812 case $cf_add_cflags in
13814 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13816 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13817 && test -z "${cf_tst_cflags}" \
13818 && cf_fix_cppflags=yes
13820 if test $cf_fix_cppflags = yes ; then
13821 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13823 elif test "${cf_tst_cflags}" = "\"'" ; then
13824 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13829 case "$CPPFLAGS" in
13833 case $cf_add_cflags in
13835 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13837 CPPFLAGS=`echo "$CPPFLAGS" | \
13838 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13839 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13843 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13848 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13853 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13855 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13857 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13858 && test -z "${cf_tst_cflags}" \
13859 && cf_fix_cppflags=no
13864 if test -n "$cf_new_cflags" ; then
13866 CFLAGS="$CFLAGS $cf_new_cflags"
13869 if test -n "$cf_new_cppflags" ; then
13871 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13874 if test -n "$cf_new_extra_cppflags" ; then
13876 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13879 ################################################################################
13885 NCURSES_SHLIB2="sh -c"
13887 ADA_SUBDIRS="include gen src doc"
13888 if test "x$cf_with_tests" != "xno" ; then
13889 ADA_SUBDIRS="$ADA_SUBDIRS samples"
13891 for cf_dir in $ADA_SUBDIRS
13893 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
13900 # match layout used by make-tar.sh
13901 ADAHTML_DIR=../doc/ada
13903 ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
13904 ac_config_commands="$ac_config_commands default"
13905 cat >confcache <<\_ACEOF
13906 # This file is a shell script that caches the results of configure
13907 # tests run on this system so they can be shared between configure
13908 # scripts and configure runs, see configure's option --config-cache.
13909 # It is not useful on other systems. If it contains results you don't
13910 # want to keep, you may remove or edit it.
13912 # config.status only pays attention to the cache file if you give it
13913 # the --recheck option to rerun configure.
13915 # `ac_cv_env_foo' variables (set or unset) will be overriden when
13916 # loading this file, other *unset* `ac_cv_foo' will be assigned the
13917 # following values.
13921 # The following way of writing the cache mishandles newlines in values,
13922 # but we know of no workaround that is simple, portable, and efficient.
13923 # So, don't put newlines in cache variables' values.
13924 # Ultrix sh set writes to stderr and can't be redirected directly,
13925 # and sets the high bit in the cache file unless we assign to the vars.
13928 case `(ac_space=' '; set | grep ac_space) 2>&1` in
13930 # `set' does not quote correctly, so add quotes (double-quote
13931 # substitution turns \\\\ into \\, and sed turns \\ into \).
13934 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
13937 # `set' quotes correctly as required by POSIX, so do not add quotes.
13939 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
13946 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13948 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13950 if cmp -s $cache_file confcache; then :; else
13951 if test -w $cache_file; then
13952 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
13953 cat confcache >$cache_file
13955 echo "not updating unwritable cache $cache_file"
13960 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13961 # Let make expand exec_prefix.
13962 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13964 # VPATH may cause trouble with some makes, so we remove $(srcdir),
13965 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
13966 # trailing colons and then remove the whole line if VPATH becomes empty
13967 # (actually we leave an empty line to preserve line numbers).
13968 if test "x$srcdir" = x.; then
13969 ac_vpsub='/^[ ]*VPATH[ ]*=/{
13970 s/:*\$(srcdir):*/:/;
13971 s/:*\${srcdir}:*/:/;
13973 s/^\([^=]*=[ ]*\):*/\1/;
13979 DEFS=-DHAVE_CONFIG_H
13981 : ${CONFIG_STATUS=./config.status}
13982 ac_clean_files_save=$ac_clean_files
13983 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
13984 { echo "$as_me:13984: creating $CONFIG_STATUS" >&5
13985 echo "$as_me: creating $CONFIG_STATUS" >&6;}
13986 cat >$CONFIG_STATUS <<_ACEOF
13988 # Generated automatically by configure.
13989 # Run this file to recreate the current configuration.
13990 # Compiler output produced by configure, useful for debugging
13991 # configure, is in config.log if it exists.
13994 SHELL=\${CONFIG_SHELL-$SHELL}
13995 ac_cs_invocation="\$0 \$@"
13999 cat >>$CONFIG_STATUS <<\_ACEOF
14000 # Be Bourne compatible
14001 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14004 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
14008 # Name of the executable.
14009 as_me=`echo "$0" |sed 's,.*[\\/],,'`
14011 if expr a : '\(a\)' >/dev/null 2>&1; then
14017 rm -f conf$$ conf$$.exe conf$$.file
14019 if ln -s conf$$.file conf$$ 2>/dev/null; then
14020 # We could just check for DJGPP; but this test a) works b) is more generic
14021 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
14022 if test -f conf$$.exe; then
14023 # Don't use ln at all; we don't have any links
14028 elif ln conf$$.file conf$$ 2>/dev/null; then
14033 rm -f conf$$ conf$$.exe conf$$.file
14035 as_executable_p="test -f"
14037 # Support unset when possible.
14038 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
14045 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
14046 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
14047 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
14048 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
14049 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
14050 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
14051 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
14052 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
14055 # We need space, tab and new line, in precisely that order.
14061 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
14067 # Files that config.status was made for.
14068 if test -n "$ac_config_files"; then
14069 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
14072 if test -n "$ac_config_headers"; then
14073 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
14076 if test -n "$ac_config_links"; then
14077 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
14080 if test -n "$ac_config_commands"; then
14081 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
14084 cat >>$CONFIG_STATUS <<\EOF
14087 \`$as_me' instantiates files from templates according to the
14088 current configuration.
14090 Usage: $0 [OPTIONS] [FILE]...
14092 -h, --help print this help, then exit
14093 -V, --version print version number, then exit
14094 -d, --debug don't remove temporary files
14095 --recheck update $as_me by reconfiguring in the same conditions
14096 --file=FILE[:TEMPLATE]
14097 instantiate the configuration file FILE
14098 --header=FILE[:TEMPLATE]
14099 instantiate the configuration header FILE
14101 Configuration files:
14104 Configuration headers:
14107 Configuration commands:
14110 Report bugs to <dickey@invisible-island.net>."
14113 cat >>$CONFIG_STATUS <<EOF
14116 configured by $0, generated by GNU Autoconf 2.52.20141204,
14117 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
14119 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
14120 Free Software Foundation, Inc.
14121 This config.status script is free software; the Free Software Foundation
14122 gives unlimited permission to copy, distribute and modify it."
14127 cat >>$CONFIG_STATUS <<\EOF
14128 # If no file are specified by the user, then we need to provide default
14129 # value. By we need to know if files were specified by the user.
14135 ac_option=`expr "x$1" : 'x\([^=]*\)='`
14136 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
14138 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
14142 *) # This is not an option, so the user has probably given explicit
14144 ac_need_defaults=false;;
14148 # Handling of the options.
14150 cat >>$CONFIG_STATUS <<EOF
14151 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14152 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
14153 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
14155 cat >>$CONFIG_STATUS <<\EOF
14156 --version | --vers* | -V )
14157 echo "$ac_cs_version"; exit 0 ;;
14159 # Conflict between --help and --header
14160 { { echo "$as_me:14160: error: ambiguous option: $1
14161 Try \`$0 --help' for more information." >&5
14162 echo "$as_me: error: ambiguous option: $1
14163 Try \`$0 --help' for more information." >&2;}
14164 { (exit 1); exit 1; }; };;
14165 --help | --hel | -h )
14166 echo "$ac_cs_usage"; exit 0 ;;
14167 --debug | --d* | -d )
14169 --file | --fil | --fi | --f )
14171 CONFIG_FILES="$CONFIG_FILES $1"
14172 ac_need_defaults=false;;
14173 --header | --heade | --head | --hea )
14175 CONFIG_HEADERS="$CONFIG_HEADERS $1"
14176 ac_need_defaults=false;;
14178 # This is an error.
14179 -*) { { echo "$as_me:14179: error: unrecognized option: $1
14180 Try \`$0 --help' for more information." >&5
14181 echo "$as_me: error: unrecognized option: $1
14182 Try \`$0 --help' for more information." >&2;}
14183 { (exit 1); exit 1; }; } ;;
14185 *) ac_config_targets="$ac_config_targets $1" ;;
14194 ## ----------------------- ##
14195 ## Running config.status. ##
14196 ## ----------------------- ##
14198 This file was extended by $as_me 2.52.20141204, executed with
14199 CONFIG_FILES = $CONFIG_FILES
14200 CONFIG_HEADERS = $CONFIG_HEADERS
14201 CONFIG_LINKS = $CONFIG_LINKS
14202 CONFIG_COMMANDS = $CONFIG_COMMANDS
14203 > $ac_cs_invocation
14204 on `(hostname || uname -n) 2>/dev/null | sed 1q`
14209 cat >>$CONFIG_STATUS <<EOF
14211 # INIT-COMMANDS section.
14214 ### Special initialization commands, used to pass information from the
14215 ### configuration-run into config.status
14218 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
14219 DFT_LWR_MODEL="$DFT_LWR_MODEL"
14220 LIB_NAME="$LIB_NAME"
14221 LIB_PREFIX="$LIB_PREFIX"
14222 LIB_SUFFIX="$LIB_SUFFIX"
14224 NCURSES_MAJOR="$NCURSES_MAJOR"
14225 NCURSES_MINOR="$NCURSES_MINOR"
14226 NCURSES_PATCH="$NCURSES_PATCH"
14227 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
14228 cf_cv_abi_version="$cf_cv_abi_version"
14229 cf_cv_rel_version="$cf_cv_rel_version"
14230 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
14231 cf_cv_shared_soname='$cf_cv_shared_soname'
14232 cf_cv_shlib_version="$cf_cv_shlib_version"
14233 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
14234 cf_cv_system_name="$cf_cv_system_name"
14240 cat >>$CONFIG_STATUS <<\EOF
14241 for ac_config_target in $ac_config_targets
14243 case "$ac_config_target" in
14244 # Handling of arguments.
14245 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
14246 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
14247 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
14248 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
14249 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
14250 *) { { echo "$as_me:14250: error: invalid argument: $ac_config_target" >&5
14251 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
14252 { (exit 1); exit 1; }; };;
14256 # If the user did not use the arguments to specify the items to instantiate,
14257 # then the envvar interface is used. Set only those that are not.
14258 # We use the long form for the default assignment because of an extremely
14259 # bizarre bug on SunOS 4.1.3.
14260 if $ac_need_defaults; then
14261 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14262 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14263 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
14266 # Create a temporary directory, and hook for its removal unless debugging.
14269 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
14270 trap '{ (exit 1); exit 1; }' 1 2 13 15
14273 # Create a (secure) tmp directory for tmp files.
14276 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
14277 test -n "$tmp" && test -d "$tmp"
14280 tmp=$TMPDIR/cs$$-$RANDOM
14281 (umask 077 && mkdir $tmp)
14284 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
14285 { (exit 1); exit 1; }
14290 cat >>$CONFIG_STATUS <<EOF
14293 # CONFIG_FILES section.
14296 # No need to generate the scripts if there are no CONFIG_FILES.
14297 # This happens for instance when ./config.status config.h
14298 if test -n "\$CONFIG_FILES"; then
14299 # Protect against being on the right side of a sed subst in config.status.
14300 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
14301 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
14302 s,@SHELL@,$SHELL,;t t
14303 s,@exec_prefix@,$exec_prefix,;t t
14304 s,@prefix@,$prefix,;t t
14305 s,@program_transform_name@,$program_transform_name,;t t
14306 s,@bindir@,$bindir,;t t
14307 s,@sbindir@,$sbindir,;t t
14308 s,@libexecdir@,$libexecdir,;t t
14309 s,@datarootdir@,$datarootdir,;t t
14310 s,@datadir@,$datadir,;t t
14311 s,@sysconfdir@,$sysconfdir,;t t
14312 s,@sharedstatedir@,$sharedstatedir,;t t
14313 s,@localstatedir@,$localstatedir,;t t
14314 s,@libdir@,$libdir,;t t
14315 s,@includedir@,$includedir,;t t
14316 s,@oldincludedir@,$oldincludedir,;t t
14317 s,@infodir@,$infodir,;t t
14318 s,@mandir@,$mandir,;t t
14319 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
14320 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
14321 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
14322 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
14323 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
14324 s,@build_alias@,$build_alias,;t t
14325 s,@host_alias@,$host_alias,;t t
14326 s,@target_alias@,$target_alias,;t t
14327 s,@ECHO_C@,$ECHO_C,;t t
14328 s,@ECHO_N@,$ECHO_N,;t t
14329 s,@ECHO_T@,$ECHO_T,;t t
14330 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
14331 s,@DEFS@,$DEFS,;t t
14332 s,@LIBS@,$LIBS,;t t
14333 s,@top_builddir@,$top_builddir,;t t
14334 s,@build@,$build,;t t
14335 s,@build_cpu@,$build_cpu,;t t
14336 s,@build_vendor@,$build_vendor,;t t
14337 s,@build_os@,$build_os,;t t
14338 s,@host@,$host,;t t
14339 s,@host_cpu@,$host_cpu,;t t
14340 s,@host_vendor@,$host_vendor,;t t
14341 s,@host_os@,$host_os,;t t
14342 s,@target@,$target,;t t
14343 s,@target_cpu@,$target_cpu,;t t
14344 s,@target_vendor@,$target_vendor,;t t
14345 s,@target_os@,$target_os,;t t
14347 s,@CFLAGS@,$CFLAGS,;t t
14348 s,@LDFLAGS@,$LDFLAGS,;t t
14349 s,@CPPFLAGS@,$CPPFLAGS,;t t
14350 s,@ac_ct_CC@,$ac_ct_CC,;t t
14351 s,@EXEEXT@,$EXEEXT,;t t
14352 s,@OBJEXT@,$OBJEXT,;t t
14353 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
14356 s,@EGREP@,$EGREP,;t t
14357 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
14358 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
14359 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
14360 s,@LN_S@,$LN_S,;t t
14361 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
14362 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
14363 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
14364 s,@SET_MAKE@,$SET_MAKE,;t t
14365 s,@CTAGS@,$CTAGS,;t t
14366 s,@ETAGS@,$ETAGS,;t t
14367 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
14368 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
14369 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
14370 s,@RANLIB@,$RANLIB,;t t
14371 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
14373 s,@ac_ct_LD@,$ac_ct_LD,;t t
14375 s,@ac_ct_AR@,$ac_ct_AR,;t t
14376 s,@ARFLAGS@,$ARFLAGS,;t t
14377 s,@DESTDIR@,$DESTDIR,;t t
14378 s,@BUILD_CC@,$BUILD_CC,;t t
14379 s,@BUILD_CPP@,$BUILD_CPP,;t t
14380 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
14381 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
14382 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
14383 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
14384 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
14385 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
14386 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
14387 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
14388 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
14389 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
14390 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
14391 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
14392 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
14393 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
14394 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
14395 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
14396 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
14397 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
14398 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
14399 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
14400 s,@CC_G_OPT@,$CC_G_OPT,;t t
14401 s,@LD_MODEL@,$LD_MODEL,;t t
14402 s,@shlibdir@,$shlibdir,;t t
14403 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
14404 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
14405 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
14406 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
14407 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
14408 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
14409 s,@LINK_PROGS@,$LINK_PROGS,;t t
14410 s,@LINK_TESTS@,$LINK_TESTS,;t t
14411 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
14412 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
14413 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
14414 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
14415 s,@RPATH_LIST@,$RPATH_LIST,;t t
14416 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
14417 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
14418 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
14419 s,@PTHREAD@,$PTHREAD,;t t
14420 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
14421 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
14422 s,@ECHO_LT@,$ECHO_LT,;t t
14423 s,@ECHO_LD@,$ECHO_LD,;t t
14424 s,@RULE_CC@,$RULE_CC,;t t
14425 s,@SHOW_CC@,$SHOW_CC,;t t
14426 s,@ECHO_CC@,$ECHO_CC,;t t
14427 s,@ADAFLAGS@,$ADAFLAGS,;t t
14428 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
14429 s,@ADA_TRACE@,$ADA_TRACE,;t t
14430 s,@gnat_exists@,$gnat_exists,;t t
14431 s,@M4_exists@,$M4_exists,;t t
14432 s,@cf_ada_make@,$cf_ada_make,;t t
14433 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
14434 s,@cf_compile_generics@,$cf_compile_generics,;t t
14435 s,@cf_generic_objects@,$cf_generic_objects,;t t
14436 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
14437 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
14438 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
14439 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
14440 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
14441 s,@cf_ada_package@,$cf_ada_package,;t t
14442 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
14443 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
14444 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
14445 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
14446 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
14447 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
14448 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
14449 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
14450 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
14451 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
14452 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
14453 s,@TEST_ARG2@,$TEST_ARG2,;t t
14454 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
14455 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
14456 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
14457 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
14458 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
14459 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
14464 cat >>$CONFIG_STATUS <<\EOF
14465 # Split the substitutions into bite-sized pieces for seds with
14466 # small command number limits, like on Digital OSF/1 and HP-UX.
14467 ac_max_sed_lines=48
14468 ac_sed_frag=1 # Number of current file.
14469 ac_beg=1 # First line for current file.
14470 ac_end=$ac_max_sed_lines # Line after last line for current file.
14473 while $ac_more_lines; do
14474 if test $ac_beg -gt 1; then
14475 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
14477 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
14479 if test ! -s $tmp/subs.frag; then
14480 ac_more_lines=false
14482 # The purpose of the label and of the branching condition is to
14483 # speed up the sed processing (if there are no `@' at all, there
14484 # is no need to browse any of the substitutions).
14485 # These are the two extra sed commands mentioned above.
14487 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
14488 if test -z "$ac_sed_cmds"; then
14489 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
14491 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
14493 ac_sed_frag=`expr $ac_sed_frag + 1`
14495 ac_end=`expr $ac_end + $ac_max_sed_lines`
14498 if test -z "$ac_sed_cmds"; then
14501 fi # test -n "$CONFIG_FILES"
14504 cat >>$CONFIG_STATUS <<\EOF
14505 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
14506 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14508 - | *:- | *:-:* ) # input from stdin
14510 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14511 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14512 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14513 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14514 * ) ac_file_in=$ac_file.in ;;
14517 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
14518 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14519 X"$ac_file" : 'X\(//\)[^/]' \| \
14520 X"$ac_file" : 'X\(//\)$' \| \
14521 X"$ac_file" : 'X\(/\)' \| \
14522 . : '\(.\)' 2>/dev/null ||
14524 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
14525 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
14526 /^X\(\/\/\)$/{ s//\1/; q; }
14527 /^X\(\/\).*/{ s//\1/; q; }
14529 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14530 { case "$ac_dir" in
14531 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
14535 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
14536 case $as_mkdir_dir in
14537 # Skip DOS drivespec
14538 ?:) as_incr_dir=$as_mkdir_dir ;;
14540 as_incr_dir=$as_incr_dir/$as_mkdir_dir
14541 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
14546 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
14547 # A "../" for each directory in $ac_dir_suffix.
14548 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
14550 ac_dir_suffix= ac_dots=
14555 if test -z "$ac_dots"; then
14558 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
14560 [\\/]* | ?:[\\/]* )
14561 ac_srcdir=$srcdir$ac_dir_suffix;
14562 ac_top_srcdir=$srcdir ;;
14563 *) # Relative path.
14564 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
14565 ac_top_srcdir=$ac_dots$srcdir ;;
14569 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
14570 *) ac_INSTALL=$ac_dots$INSTALL ;;
14573 if test x"$ac_file" != x-; then
14574 { echo "$as_me:14574: creating $ac_file" >&5
14575 echo "$as_me: creating $ac_file" >&6;}
14578 # Let's still pretend it is `configure' which instantiates (i.e., don't
14579 # use $as_me), people would be surprised to read:
14580 # /* config.h. Generated automatically by config.status. */
14581 configure_input="Generated automatically from `echo $ac_file_in |
14582 sed 's,.*/,,'` by configure."
14584 # First look for the input files in the build tree, otherwise in the
14586 ac_file_inputs=`IFS=:
14587 for f in $ac_file_in; do
14589 -) echo $tmp/stdin ;;
14591 # Absolute (can't be DOS-style, as IFS=:)
14592 test -f "$f" || { { echo "$as_me:14592: error: cannot find input file: $f" >&5
14593 echo "$as_me: error: cannot find input file: $f" >&2;}
14594 { (exit 1); exit 1; }; }
14597 if test -f "$f"; then
14600 elif test -f "$srcdir/$f"; then
14605 { { echo "$as_me:14605: error: cannot find input file: $f" >&5
14606 echo "$as_me: error: cannot find input file: $f" >&2;}
14607 { (exit 1); exit 1; }; }
14610 done` || { (exit 1); exit 1; }
14612 cat >>$CONFIG_STATUS <<\EOF
14613 ac_warn_datarootdir=no
14614 if test x"$ac_file" != x-; then
14615 for ac_item in $ac_file_inputs
14617 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
14618 if test -n "$ac_seen"; then
14619 ac_used=`grep '@datarootdir@' $ac_item`
14620 if test -z "$ac_used"; then
14621 { echo "$as_me:14621: WARNING: datarootdir was used implicitly but not set:
14623 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
14625 ac_warn_datarootdir=yes
14628 ac_seen=`grep '${datarootdir}' $ac_item`
14629 if test -n "$ac_seen"; then
14630 { echo "$as_me:14630: WARNING: datarootdir was used explicitly but not set:
14632 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
14634 ac_warn_datarootdir=yes
14639 if test "x$ac_warn_datarootdir" = xyes; then
14640 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
14644 cat >>$CONFIG_STATUS <<EOF
14648 cat >>$CONFIG_STATUS <<\EOF
14650 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
14651 s,@configure_input@,$configure_input,;t t
14652 s,@srcdir@,$ac_srcdir,;t t
14653 s,@top_srcdir@,$ac_top_srcdir,;t t
14654 s,@INSTALL@,$ac_INSTALL,;t t
14655 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
14657 if test x"$ac_file" != x-; then
14658 cp $tmp/out $ac_file
14660 for ac_name in prefix exec_prefix datarootdir
14662 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
14663 if test -n "$ac_seen"; then
14664 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
14665 if test -z "$ac_init"; then
14666 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
14667 { echo "$as_me:14667: WARNING: Variable $ac_name is used but was not set:
14669 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
14674 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
14675 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
14676 if test -s $tmp/out; then
14677 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
14678 { echo "$as_me:14678: WARNING: Some variables may not be substituted:
14680 echo "$as_me: WARNING: Some variables may not be substituted:
14690 cat >>$CONFIG_STATUS <<\EOF
14693 # CONFIG_HEADER section.
14696 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14697 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14699 # ac_d sets the value in "#define NAME VALUE" lines.
14700 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
14701 ac_dB='[ ].*$,\1#\2'
14704 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14705 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
14706 ac_iB='\([ ]\),\1#\2define\3'
14709 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14710 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
14711 ac_uB='$,\1#\2define\3'
14715 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
14716 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14718 - | *:- | *:-:* ) # input from stdin
14720 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14721 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14722 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14723 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14724 * ) ac_file_in=$ac_file.in ;;
14727 test x"$ac_file" != x- && { echo "$as_me:14727: creating $ac_file" >&5
14728 echo "$as_me: creating $ac_file" >&6;}
14730 # First look for the input files in the build tree, otherwise in the
14732 ac_file_inputs=`IFS=:
14733 for f in $ac_file_in; do
14735 -) echo $tmp/stdin ;;
14737 # Absolute (can't be DOS-style, as IFS=:)
14738 test -f "$f" || { { echo "$as_me:14738: error: cannot find input file: $f" >&5
14739 echo "$as_me: error: cannot find input file: $f" >&2;}
14740 { (exit 1); exit 1; }; }
14743 if test -f "$f"; then
14746 elif test -f "$srcdir/$f"; then
14751 { { echo "$as_me:14751: error: cannot find input file: $f" >&5
14752 echo "$as_me: error: cannot find input file: $f" >&2;}
14753 { (exit 1); exit 1; }; }
14756 done` || { (exit 1); exit 1; }
14757 # Remove the trailing spaces.
14758 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
14762 # Transform confdefs.h into a list of #define's. We won't use it as a sed
14763 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
14764 # be either 'cat' or 'sort'.
14765 cat confdefs.h | uniq >conftest.vals
14767 # Break up conftest.vals because some shells have a limit on
14768 # the size of here documents, and old seds have small limits too.
14770 rm -f conftest.tail
14771 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
14772 while grep . conftest.vals >/dev/null
14774 # Write chunks of a limited-size here document to conftest.frag.
14775 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
14776 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
14777 echo 'CEOF' >> $CONFIG_STATUS
14778 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14779 rm -f conftest.vals
14780 mv conftest.tail conftest.vals
14782 rm -f conftest.vals
14784 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
14786 echo ' cat >> conftest.edit <<CEOF
14787 /@DEFS@/r conftest.frag
14790 sed -f conftest.edit $tmp/in > $tmp/out
14792 mv $tmp/out $tmp/in
14793 rm -f conftest.edit conftest.frag
14794 ' >> $CONFIG_STATUS
14796 cat >>$CONFIG_STATUS <<\EOF
14797 # Let's still pretend it is `configure' which instantiates (i.e., don't
14798 # use $as_me), people would be surprised to read:
14799 # /* config.h. Generated automatically by config.status. */
14800 if test x"$ac_file" = x-; then
14801 echo "/* Generated automatically by configure. */" >$tmp/config.h
14803 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
14805 cat $tmp/in >>$tmp/config.h
14807 if test x"$ac_file" != x-; then
14808 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
14809 { echo "$as_me:14809: $ac_file is unchanged" >&5
14810 echo "$as_me: $ac_file is unchanged" >&6;}
14812 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14813 X"$ac_file" : 'X\(//\)[^/]' \| \
14814 X"$ac_file" : 'X\(//\)$' \| \
14815 X"$ac_file" : 'X\(/\)' \| \
14816 . : '\(.\)' 2>/dev/null ||
14818 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
14819 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
14820 /^X\(\/\/\)$/{ s//\1/; q; }
14821 /^X\(\/\).*/{ s//\1/; q; }
14823 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14824 { case "$ac_dir" in
14825 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
14829 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
14830 case $as_mkdir_dir in
14831 # Skip DOS drivespec
14832 ?:) as_incr_dir=$as_mkdir_dir ;;
14834 as_incr_dir=$as_incr_dir/$as_mkdir_dir
14835 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
14842 mv $tmp/config.h $ac_file
14846 rm -f $tmp/config.h
14850 cat >>$CONFIG_STATUS <<\EOF
14852 # CONFIG_COMMANDS section.
14854 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
14855 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
14856 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
14860 if test -z "$USE_OLD_MAKERULES" ; then
14861 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
14868 cat >>$CONFIG_STATUS <<\EOF
14870 { (exit 0); exit 0; }
14872 chmod +x $CONFIG_STATUS
14873 ac_clean_files=$ac_clean_files_save
14875 # configure is writing to config.log, and then calls config.status.
14876 # config.status does its own redirection, appending to config.log.
14877 # Unfortunately, on DOS this fails, as config.log is still kept open
14878 # by configure, so config.status won't be able to write to it; its
14879 # output is simply discarded. So we exec the FD to /dev/null,
14880 # effectively closing config.log, so it can be properly (re)opened and
14881 # appended to by config.status. When coming back to configure, we
14882 # need to make the FD available again.
14883 if test "$no_create" != yes; then
14886 $SHELL $CONFIG_STATUS || ac_cs_success=false
14888 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14889 # would make configure fail if this is the last instruction.
14890 $ac_cs_success || { (exit 1); exit 1; }
14892 ${MAKE:-make} preinstall