]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/configure
ncurses 5.7 - patch 20100904
[ncurses.git] / Ada95 / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.19 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20100814.
5 #
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.
10
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
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
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"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >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
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
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; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
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`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
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}
107
108 ac_unique_file="gen/gen.c"
109
110 # Initialize some variables set by options.
111 ac_init_help=
112 ac_init_version=false
113 # The variables have the same names as the options, with
114 # dashes changed to underlines.
115 cache_file=/dev/null
116 exec_prefix=NONE
117 no_create=
118 no_recursion=
119 prefix=NONE
120 program_prefix=NONE
121 program_suffix=NONE
122 program_transform_name=s,x,x,
123 silent=
124 site=
125 srcdir=
126 verbose=
127 x_includes=NONE
128 x_libraries=NONE
129
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 datadir='${prefix}/share'
139 sysconfdir='${prefix}/etc'
140 sharedstatedir='${prefix}/com'
141 localstatedir='${prefix}/var'
142 libdir='${exec_prefix}/lib'
143 includedir='${prefix}/include'
144 oldincludedir='/usr/include'
145 infodir='${prefix}/info'
146 mandir='${prefix}/man'
147
148 # Identity of this package.
149 PACKAGE_NAME=
150 PACKAGE_TARNAME=
151 PACKAGE_VERSION=
152 PACKAGE_STRING=
153 PACKAGE_BUGREPORT=
154
155 ac_prev=
156 for ac_option
157 do
158   # If the previous option needs an argument, assign it.
159   if test -n "$ac_prev"; then
160     eval "$ac_prev=\$ac_option"
161     ac_prev=
162     continue
163   fi
164
165   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
166
167   # Accept the important Cygnus configure options, so we can diagnose typos.
168
169   case $ac_option in
170
171   -bindir | --bindir | --bindi | --bind | --bin | --bi)
172     ac_prev=bindir ;;
173   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
174     bindir=$ac_optarg ;;
175
176   -build | --build | --buil | --bui | --bu)
177     ac_prev=build_alias ;;
178   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
179     build_alias=$ac_optarg ;;
180
181   -cache-file | --cache-file | --cache-fil | --cache-fi \
182   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
183     ac_prev=cache_file ;;
184   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
185   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
186     cache_file=$ac_optarg ;;
187
188   --config-cache | -C)
189     cache_file=config.cache ;;
190
191   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
192     ac_prev=datadir ;;
193   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
194   | --da=*)
195     datadir=$ac_optarg ;;
196
197   -disable-* | --disable-*)
198     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
199     # Reject names that are not valid shell variable names.
200     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
201       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
202    { (exit 1); exit 1; }; }
203     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
204     eval "enable_$ac_feature=no" ;;
205
206   -enable-* | --enable-*)
207     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
208     # Reject names that are not valid shell variable names.
209     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
210       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
211    { (exit 1); exit 1; }; }
212     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
213     case $ac_option in
214       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
215       *) ac_optarg=yes ;;
216     esac
217     eval "enable_$ac_feature='$ac_optarg'" ;;
218
219   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
220   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
221   | --exec | --exe | --ex)
222     ac_prev=exec_prefix ;;
223   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
224   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
225   | --exec=* | --exe=* | --ex=*)
226     exec_prefix=$ac_optarg ;;
227
228   -gas | --gas | --ga | --g)
229     # Obsolete; use --with-gas.
230     with_gas=yes ;;
231
232   -help | --help | --hel | --he | -h)
233     ac_init_help=long ;;
234   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
235     ac_init_help=recursive ;;
236   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
237     ac_init_help=short ;;
238
239   -host | --host | --hos | --ho)
240     ac_prev=host_alias ;;
241   -host=* | --host=* | --hos=* | --ho=*)
242     host_alias=$ac_optarg ;;
243
244   -includedir | --includedir | --includedi | --included | --include \
245   | --includ | --inclu | --incl | --inc)
246     ac_prev=includedir ;;
247   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
248   | --includ=* | --inclu=* | --incl=* | --inc=*)
249     includedir=$ac_optarg ;;
250
251   -infodir | --infodir | --infodi | --infod | --info | --inf)
252     ac_prev=infodir ;;
253   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
254     infodir=$ac_optarg ;;
255
256   -libdir | --libdir | --libdi | --libd)
257     ac_prev=libdir ;;
258   -libdir=* | --libdir=* | --libdi=* | --libd=*)
259     libdir=$ac_optarg ;;
260
261   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
262   | --libexe | --libex | --libe)
263     ac_prev=libexecdir ;;
264   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
265   | --libexe=* | --libex=* | --libe=*)
266     libexecdir=$ac_optarg ;;
267
268   -localstatedir | --localstatedir | --localstatedi | --localstated \
269   | --localstate | --localstat | --localsta | --localst \
270   | --locals | --local | --loca | --loc | --lo)
271     ac_prev=localstatedir ;;
272   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
273   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
274   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
275     localstatedir=$ac_optarg ;;
276
277   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
278     ac_prev=mandir ;;
279   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
280     mandir=$ac_optarg ;;
281
282   -nfp | --nfp | --nf)
283     # Obsolete; use --without-fp.
284     with_fp=no ;;
285
286   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
287   | --no-cr | --no-c)
288     no_create=yes ;;
289
290   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
291   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
292     no_recursion=yes ;;
293
294   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
295   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
296   | --oldin | --oldi | --old | --ol | --o)
297     ac_prev=oldincludedir ;;
298   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
299   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
300   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
301     oldincludedir=$ac_optarg ;;
302
303   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
304     ac_prev=prefix ;;
305   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
306     prefix=$ac_optarg ;;
307
308   -program-prefix | --program-prefix | --program-prefi | --program-pref \
309   | --program-pre | --program-pr | --program-p)
310     ac_prev=program_prefix ;;
311   -program-prefix=* | --program-prefix=* | --program-prefi=* \
312   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
313     program_prefix=$ac_optarg ;;
314
315   -program-suffix | --program-suffix | --program-suffi | --program-suff \
316   | --program-suf | --program-su | --program-s)
317     ac_prev=program_suffix ;;
318   -program-suffix=* | --program-suffix=* | --program-suffi=* \
319   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
320     program_suffix=$ac_optarg ;;
321
322   -program-transform-name | --program-transform-name \
323   | --program-transform-nam | --program-transform-na \
324   | --program-transform-n | --program-transform- \
325   | --program-transform | --program-transfor \
326   | --program-transfo | --program-transf \
327   | --program-trans | --program-tran \
328   | --progr-tra | --program-tr | --program-t)
329     ac_prev=program_transform_name ;;
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     program_transform_name=$ac_optarg ;;
338
339   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
340   | -silent | --silent | --silen | --sile | --sil)
341     silent=yes ;;
342
343   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
344     ac_prev=sbindir ;;
345   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
346   | --sbi=* | --sb=*)
347     sbindir=$ac_optarg ;;
348
349   -sharedstatedir | --sharedstatedir | --sharedstatedi \
350   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
351   | --sharedst | --shareds | --shared | --share | --shar \
352   | --sha | --sh)
353     ac_prev=sharedstatedir ;;
354   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
355   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
356   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
357   | --sha=* | --sh=*)
358     sharedstatedir=$ac_optarg ;;
359
360   -site | --site | --sit)
361     ac_prev=site ;;
362   -site=* | --site=* | --sit=*)
363     site=$ac_optarg ;;
364
365   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
366     ac_prev=srcdir ;;
367   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
368     srcdir=$ac_optarg ;;
369
370   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
371   | --syscon | --sysco | --sysc | --sys | --sy)
372     ac_prev=sysconfdir ;;
373   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
374   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
375     sysconfdir=$ac_optarg ;;
376
377   -target | --target | --targe | --targ | --tar | --ta | --t)
378     ac_prev=target_alias ;;
379   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
380     target_alias=$ac_optarg ;;
381
382   -v | -verbose | --verbose | --verbos | --verbo | --verb)
383     verbose=yes ;;
384
385   -version | --version | --versio | --versi | --vers | -V)
386     ac_init_version=: ;;
387
388   -with-* | --with-*)
389     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
390     # Reject names that are not valid shell variable names.
391     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
392       { echo "$as_me: error: invalid package name: $ac_package" >&2
393    { (exit 1); exit 1; }; }
394     ac_package=`echo $ac_package| sed 's/-/_/g'`
395     case $ac_option in
396       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
397       *) ac_optarg=yes ;;
398     esac
399     eval "with_$ac_package='$ac_optarg'" ;;
400
401   -without-* | --without-*)
402     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
403     # Reject names that are not valid shell variable names.
404     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
405       { echo "$as_me: error: invalid package name: $ac_package" >&2
406    { (exit 1); exit 1; }; }
407     ac_package=`echo $ac_package | sed 's/-/_/g'`
408     eval "with_$ac_package=no" ;;
409
410   --x)
411     # Obsolete; use --with-x.
412     with_x=yes ;;
413
414   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
415   | --x-incl | --x-inc | --x-in | --x-i)
416     ac_prev=x_includes ;;
417   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
418   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
419     x_includes=$ac_optarg ;;
420
421   -x-libraries | --x-libraries | --x-librarie | --x-librari \
422   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
423     ac_prev=x_libraries ;;
424   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
425   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
426     x_libraries=$ac_optarg ;;
427
428   -*) { echo "$as_me: error: unrecognized option: $ac_option
429 Try \`$0 --help' for more information." >&2
430    { (exit 1); exit 1; }; }
431     ;;
432
433   *=*)
434     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
435     # Reject names that are not valid shell variable names.
436     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
437       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
438    { (exit 1); exit 1; }; }
439     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
440     eval "$ac_envvar='$ac_optarg'"
441     export $ac_envvar ;;
442
443   *)
444     # FIXME: should be removed in autoconf 3.0.
445     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
446     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
447       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
448     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
449     ;;
450
451   esac
452 done
453
454 if test -n "$ac_prev"; then
455   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
456   { echo "$as_me: error: missing argument to $ac_option" >&2
457    { (exit 1); exit 1; }; }
458 fi
459
460 # Be sure to have absolute paths.
461 for ac_var in exec_prefix prefix
462 do
463   eval ac_val=$`echo $ac_var`
464   case $ac_val in
465     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
466     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
467    { (exit 1); exit 1; }; };;
468   esac
469 done
470
471 # Be sure to have absolute paths.
472 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
473               localstatedir libdir includedir oldincludedir infodir mandir
474 do
475   eval ac_val=$`echo $ac_var`
476   case $ac_val in
477     [\\/$]* | ?:[\\/]* ) ;;
478     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
479    { (exit 1); exit 1; }; };;
480   esac
481 done
482
483 # There might be people who depend on the old broken behavior: `$host'
484 # used to hold the argument of --host etc.
485 build=$build_alias
486 host=$host_alias
487 target=$target_alias
488
489 # FIXME: should be removed in autoconf 3.0.
490 if test "x$host_alias" != x; then
491   if test "x$build_alias" = x; then
492     cross_compiling=maybe
493     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
494     If a cross compiler is detected then cross compile mode will be used." >&2
495   elif test "x$build_alias" != "x$host_alias"; then
496     cross_compiling=yes
497   fi
498 fi
499
500 ac_tool_prefix=
501 test -n "$host_alias" && ac_tool_prefix=$host_alias-
502
503 test "$silent" = yes && exec 6>/dev/null
504
505 # Find the source files, if location was not specified.
506 if test -z "$srcdir"; then
507   ac_srcdir_defaulted=yes
508   # Try the directory containing this script, then its parent.
509   ac_prog=$0
510   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
511   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
512   srcdir=$ac_confdir
513   if test ! -r $srcdir/$ac_unique_file; then
514     srcdir=..
515   fi
516 else
517   ac_srcdir_defaulted=no
518 fi
519 if test ! -r $srcdir/$ac_unique_file; then
520   if test "$ac_srcdir_defaulted" = yes; then
521     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
522    { (exit 1); exit 1; }; }
523   else
524     { echo "$as_me: error: cannot find sources in $srcdir" >&2
525    { (exit 1); exit 1; }; }
526   fi
527 fi
528 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
529 ac_env_build_alias_set=${build_alias+set}
530 ac_env_build_alias_value=$build_alias
531 ac_cv_env_build_alias_set=${build_alias+set}
532 ac_cv_env_build_alias_value=$build_alias
533 ac_env_host_alias_set=${host_alias+set}
534 ac_env_host_alias_value=$host_alias
535 ac_cv_env_host_alias_set=${host_alias+set}
536 ac_cv_env_host_alias_value=$host_alias
537 ac_env_target_alias_set=${target_alias+set}
538 ac_env_target_alias_value=$target_alias
539 ac_cv_env_target_alias_set=${target_alias+set}
540 ac_cv_env_target_alias_value=$target_alias
541 ac_env_CC_set=${CC+set}
542 ac_env_CC_value=$CC
543 ac_cv_env_CC_set=${CC+set}
544 ac_cv_env_CC_value=$CC
545 ac_env_CFLAGS_set=${CFLAGS+set}
546 ac_env_CFLAGS_value=$CFLAGS
547 ac_cv_env_CFLAGS_set=${CFLAGS+set}
548 ac_cv_env_CFLAGS_value=$CFLAGS
549 ac_env_LDFLAGS_set=${LDFLAGS+set}
550 ac_env_LDFLAGS_value=$LDFLAGS
551 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
552 ac_cv_env_LDFLAGS_value=$LDFLAGS
553 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
554 ac_env_CPPFLAGS_value=$CPPFLAGS
555 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
556 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
557 ac_env_CPP_set=${CPP+set}
558 ac_env_CPP_value=$CPP
559 ac_cv_env_CPP_set=${CPP+set}
560 ac_cv_env_CPP_value=$CPP
561
562 #
563 # Report the --help message.
564 #
565 if test "$ac_init_help" = "long"; then
566   # Omit some internal or obsolete options to make the list less imposing.
567   # This message is too long to be a string in the A/UX 3.1 sh.
568   cat <<EOF
569 \`configure' configures this package to adapt to many kinds of systems.
570
571 Usage: $0 [OPTION]... [VAR=VALUE]...
572
573 To assign environment variables (e.g., CC, CFLAGS...), specify them as
574 VAR=VALUE.  See below for descriptions of some of the useful variables.
575
576 Defaults for the options are specified in brackets.
577
578 Configuration:
579   -h, --help              display this help and exit
580       --help=short        display options specific to this package
581       --help=recursive    display the short help of all the included packages
582   -V, --version           display version information and exit
583   -q, --quiet, --silent   do not print \`checking...' messages
584       --cache-file=FILE   cache test results in FILE [disabled]
585   -C, --config-cache      alias for \`--cache-file=config.cache'
586   -n, --no-create         do not create output files
587       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
588
589 EOF
590
591   cat <<EOF
592 Installation directories:
593   --prefix=PREFIX         install architecture-independent files in PREFIX
594                           [$ac_default_prefix]
595   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
596                           [PREFIX]
597
598 By default, \`make install' will install all the files in
599 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
600 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
601 for instance \`--prefix=\$HOME'.
602
603 For better control, use the options below.
604
605 Fine tuning of the installation directories:
606   --bindir=DIR            user executables [EPREFIX/bin]
607   --sbindir=DIR           system admin executables [EPREFIX/sbin]
608   --libexecdir=DIR        program executables [EPREFIX/libexec]
609   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
610   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
611   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
612   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
613   --libdir=DIR            object code libraries [EPREFIX/lib]
614   --includedir=DIR        C header files [PREFIX/include]
615   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
616   --infodir=DIR           info documentation [PREFIX/info]
617   --mandir=DIR            man documentation [PREFIX/man]
618 EOF
619
620   cat <<\EOF
621
622 Program names:
623   --program-prefix=PREFIX            prepend PREFIX to installed program names
624   --program-suffix=SUFFIX            append SUFFIX to installed program names
625   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
626
627 System types:
628   --build=BUILD           configure for building on BUILD [guessed]
629   --host=HOST       build programs to run on HOST [BUILD]
630   --target=TARGET   configure for building compilers for TARGET [HOST]
631 EOF
632 fi
633
634 if test -n "$ac_init_help"; then
635
636   cat <<\EOF
637
638 Optional Packages:
639   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
640   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
641
642 Optional Features:
643   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
644   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
645
646   --with-system-type=XXX  test: override derived host system-type
647   --with-pkg-config{=path} enable/disable use of pkg-config
648   --enable-pc-files       generate and install .pc files for pkg-config
649   --without-tests         suppress build with test-programs
650   --enable-mixed-case     tic should assume mixed-case filenames
651   --with-install-prefix   prefixes actual install-location ($DESTDIR)
652 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
653   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
654   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
655   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
656   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
657   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
658   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
659 Options to Specify the Libraries Built/Used:
660   --enable-widec          compile with wide-char/UTF-8 code
661   --with-curses-dir=DIR   directory in which (n)curses is installed
662   --with-shlib-version=X  Specify rel or abi version for shared libs
663 Fine-Tuning Your Configuration:
664   --enable-broken_linker  compile with broken-linker support code
665   --disable-largefile     omit support for large files
666   --with-rcs-ids          compile-in RCS identifiers
667 Extensions:
668   --disable-ext-funcs     disable function-extensions
669   --enable-const          compile with extra/non-standard const
670 Development Code:
671   --without-develop       disable development options
672 Experimental Code:
673   --with-pthread          use POSIX thread library
674   --enable-weak-symbols   enable weak-symbols for pthreads
675   --enable-reentrant      compile with experimental reentrant code
676   --with-wrap-prefix=XXX  override prefix used for public variables
677 Testing/development Options:
678   --enable-echo           build: display "compiling" commands (default)
679   --enable-warnings       build: turn on GCC compiler warnings
680   --enable-assertions     test: turn on generation of assertion code
681   --enable-expanded       test: generate functions for certain macros
682   --disable-macros        test: use functions rather than macros
683   --with-trace            test: add trace() function to all models of ncurses
684 Ada95 Binding Options:
685   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
686   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
687   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
688   --with-ada-sharedlib=XX build Ada95 shared-library
689
690 Some influential environment variables:
691   CC          C compiler command
692   CFLAGS      C compiler flags
693   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
694               nonstandard directory <lib dir>
695   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
696               headers in a nonstandard directory <include dir>
697   CPP         C preprocessor
698
699 Use these variables to override the choices made by `configure' or to help
700 it to find libraries and programs with nonstandard names/locations.
701
702 EOF
703 fi
704
705 if test "$ac_init_help" = "recursive"; then
706   # If there are subdirs, report their specific --help.
707   ac_popdir=`pwd`
708   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
709     cd $ac_subdir
710     # A "../" for each directory in /$ac_subdir.
711     ac_dots=`echo $ac_subdir |
712              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
713
714     case $srcdir in
715     .) # No --srcdir option.  We are building in place.
716       ac_sub_srcdir=$srcdir ;;
717     [\\/]* | ?:[\\/]* ) # Absolute path.
718       ac_sub_srcdir=$srcdir/$ac_subdir ;;
719     *) # Relative path.
720       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
721     esac
722
723     # Check for guested configure; otherwise get Cygnus style configure.
724     if test -f $ac_sub_srcdir/configure.gnu; then
725       echo
726       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
727     elif test -f $ac_sub_srcdir/configure; then
728       echo
729       $SHELL $ac_sub_srcdir/configure  --help=recursive
730     elif test -f $ac_sub_srcdir/configure.ac ||
731            test -f $ac_sub_srcdir/configure.in; then
732       echo
733       $ac_configure --help
734     else
735       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
736     fi
737     cd $ac_popdir
738   done
739 fi
740
741 test -n "$ac_init_help" && exit 0
742 if $ac_init_version; then
743   cat <<\EOF
744
745 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
746 Free Software Foundation, Inc.
747 This configure script is free software; the Free Software Foundation
748 gives unlimited permission to copy, distribute and modify it.
749 EOF
750   exit 0
751 fi
752 exec 5>config.log
753 cat >&5 <<EOF
754 This file contains any messages produced by compilers while
755 running configure, to aid debugging if configure makes a mistake.
756
757 It was created by $as_me, which was
758 generated by GNU Autoconf 2.52.20100814.  Invocation command line was
759
760   $ $0 $@
761
762 EOF
763 {
764 cat <<_ASUNAME
765 ## ---------- ##
766 ## Platform.  ##
767 ## ---------- ##
768
769 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
770 uname -m = `(uname -m) 2>/dev/null || echo unknown`
771 uname -r = `(uname -r) 2>/dev/null || echo unknown`
772 uname -s = `(uname -s) 2>/dev/null || echo unknown`
773 uname -v = `(uname -v) 2>/dev/null || echo unknown`
774
775 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
776 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
777
778 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
779 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
780 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
781 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
782 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
783 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
784 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
785
786 PATH = $PATH
787
788 _ASUNAME
789 } >&5
790
791 cat >&5 <<EOF
792 ## ------------ ##
793 ## Core tests.  ##
794 ## ------------ ##
795
796 EOF
797
798 # Keep a trace of the command line.
799 # Strip out --no-create and --no-recursion so they do not pile up.
800 # Also quote any args containing shell meta-characters.
801 ac_configure_args=
802 ac_sep=
803 for ac_arg
804 do
805   case $ac_arg in
806   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
807   | --no-cr | --no-c) ;;
808   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
809   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
810   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
811     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
812     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
813     ac_sep=" " ;;
814   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
815      ac_sep=" " ;;
816   esac
817   # Get rid of the leading space.
818 done
819
820 # When interrupted or exit'd, cleanup temporary files, and complete
821 # config.log.  We remove comments because anyway the quotes in there
822 # would cause problems or look ugly.
823 trap 'exit_status=$?
824   # Save into config.log some information that might help in debugging.
825   echo >&5
826   echo "## ----------------- ##" >&5
827   echo "## Cache variables.  ##" >&5
828   echo "## ----------------- ##" >&5
829   echo >&5
830   # The following way of writing the cache mishandles newlines in values,
831 {
832   (set) 2>&1 |
833     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
834     *ac_space=\ *)
835       sed -n \
836         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
837           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
838       ;;
839     *)
840       sed -n \
841         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
842       ;;
843     esac;
844 } >&5
845   sed "/^$/d" confdefs.h >conftest.log
846   if test -s conftest.log; then
847     echo >&5
848     echo "## ------------ ##" >&5
849     echo "## confdefs.h.  ##" >&5
850     echo "## ------------ ##" >&5
851     echo >&5
852     cat conftest.log >&5
853   fi
854   (echo; echo) >&5
855   test "$ac_signal" != 0 &&
856     echo "$as_me: caught signal $ac_signal" >&5
857   echo "$as_me: exit $exit_status" >&5
858   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
859     exit $exit_status
860      ' 0
861 for ac_signal in 1 2 13 15; do
862   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
863 done
864 ac_signal=0
865
866 # confdefs.h avoids OS command line length limits that DEFS can exceed.
867 rm -rf conftest* confdefs.h
868 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
869 echo >confdefs.h
870
871 # Let the site file select an alternate cache file if it wants to.
872 # Prefer explicitly selected file to automatically selected ones.
873 if test -z "$CONFIG_SITE"; then
874   if test "x$prefix" != xNONE; then
875     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
876   else
877     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
878   fi
879 fi
880 for ac_site_file in $CONFIG_SITE; do
881   if test -r "$ac_site_file"; then
882     { echo "$as_me:882: loading site script $ac_site_file" >&5
883 echo "$as_me: loading site script $ac_site_file" >&6;}
884     cat "$ac_site_file" >&5
885     . "$ac_site_file"
886   fi
887 done
888
889 if test -r "$cache_file"; then
890   # Some versions of bash will fail to source /dev/null (special
891   # files actually), so we avoid doing that.
892   if test -f "$cache_file"; then
893     { echo "$as_me:893: loading cache $cache_file" >&5
894 echo "$as_me: loading cache $cache_file" >&6;}
895     case $cache_file in
896       [\\/]* | ?:[\\/]* ) . $cache_file;;
897       *)                      . ./$cache_file;;
898     esac
899   fi
900 else
901   { echo "$as_me:901: creating cache $cache_file" >&5
902 echo "$as_me: creating cache $cache_file" >&6;}
903   >$cache_file
904 fi
905
906 # Check that the precious variables saved in the cache have kept the same
907 # value.
908 ac_cache_corrupted=false
909 for ac_var in `(set) 2>&1 |
910                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
911   eval ac_old_set=\$ac_cv_env_${ac_var}_set
912   eval ac_new_set=\$ac_env_${ac_var}_set
913   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
914   eval ac_new_val="\$ac_env_${ac_var}_value"
915   case $ac_old_set,$ac_new_set in
916     set,)
917       { echo "$as_me:917: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
918 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
919       ac_cache_corrupted=: ;;
920     ,set)
921       { echo "$as_me:921: error: \`$ac_var' was not set in the previous run" >&5
922 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
923       ac_cache_corrupted=: ;;
924     ,);;
925     *)
926       if test "x$ac_old_val" != "x$ac_new_val"; then
927         { echo "$as_me:927: error: \`$ac_var' has changed since the previous run:" >&5
928 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
929         { echo "$as_me:929:   former value:  $ac_old_val" >&5
930 echo "$as_me:   former value:  $ac_old_val" >&2;}
931         { echo "$as_me:931:   current value: $ac_new_val" >&5
932 echo "$as_me:   current value: $ac_new_val" >&2;}
933         ac_cache_corrupted=:
934       fi;;
935   esac
936   # Pass precious variables to config.status.  It doesn't matter if
937   # we pass some twice (in addition to the command line arguments).
938   if test "$ac_new_set" = set; then
939     case $ac_new_val in
940     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
941       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
942       ac_configure_args="$ac_configure_args '$ac_arg'"
943       ;;
944     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
945        ;;
946     esac
947   fi
948 done
949 if $ac_cache_corrupted; then
950   { echo "$as_me:950: error: changes in the environment can compromise the build" >&5
951 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
952   { { echo "$as_me:952: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
953 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
954    { (exit 1); exit 1; }; }
955 fi
956
957 ac_ext=c
958 ac_cpp='$CPP $CPPFLAGS'
959 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
960 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
961 ac_compiler_gnu=$ac_cv_c_compiler_gnu
962 ac_main_return=return
963
964 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
965   *c*,-n*) ECHO_N= ECHO_C='
966 ' ECHO_T='      ' ;;
967   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
968   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
969 esac
970 echo "#! $SHELL" >conftest.sh
971 echo  "exit 0"   >>conftest.sh
972 chmod +x conftest.sh
973 if { (echo "$as_me:973: PATH=\".;.\"; conftest.sh") >&5
974   (PATH=".;."; conftest.sh) 2>&5
975   ac_status=$?
976   echo "$as_me:976: \$? = $ac_status" >&5
977   (exit $ac_status); }; then
978   ac_path_separator=';'
979 else
980   ac_path_separator=:
981 fi
982 PATH_SEPARATOR="$ac_path_separator"
983 rm -f conftest.sh
984
985 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
986
987 top_builddir=`pwd`
988
989 ac_aux_dir=
990 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
991   if test -f $ac_dir/install-sh; then
992     ac_aux_dir=$ac_dir
993     ac_install_sh="$ac_aux_dir/install-sh -c"
994     break
995   elif test -f $ac_dir/install.sh; then
996     ac_aux_dir=$ac_dir
997     ac_install_sh="$ac_aux_dir/install.sh -c"
998     break
999   elif test -f $ac_dir/shtool; then
1000     ac_aux_dir=$ac_dir
1001     ac_install_sh="$ac_aux_dir/shtool install -c"
1002     break
1003   fi
1004 done
1005 if test -z "$ac_aux_dir"; then
1006   { { echo "$as_me:1006: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1007 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1008    { (exit 1); exit 1; }; }
1009 fi
1010 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1011 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1012 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1013
1014 # Make sure we can run config.sub.
1015 $ac_config_sub sun4 >/dev/null 2>&1 ||
1016   { { echo "$as_me:1016: error: cannot run $ac_config_sub" >&5
1017 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1018    { (exit 1); exit 1; }; }
1019
1020 echo "$as_me:1020: checking build system type" >&5
1021 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1022 if test "${ac_cv_build+set}" = set; then
1023   echo $ECHO_N "(cached) $ECHO_C" >&6
1024 else
1025   ac_cv_build_alias=$build_alias
1026 test -z "$ac_cv_build_alias" &&
1027   ac_cv_build_alias=`$ac_config_guess`
1028 test -z "$ac_cv_build_alias" &&
1029   { { echo "$as_me:1029: error: cannot guess build type; you must specify one" >&5
1030 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1031    { (exit 1); exit 1; }; }
1032 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1033   { { echo "$as_me:1033: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1034 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1035    { (exit 1); exit 1; }; }
1036
1037 fi
1038 echo "$as_me:1038: result: $ac_cv_build" >&5
1039 echo "${ECHO_T}$ac_cv_build" >&6
1040 build=$ac_cv_build
1041 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1042 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1043 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1044
1045 echo "$as_me:1045: checking host system type" >&5
1046 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1047 if test "${ac_cv_host+set}" = set; then
1048   echo $ECHO_N "(cached) $ECHO_C" >&6
1049 else
1050   ac_cv_host_alias=$host_alias
1051 test -z "$ac_cv_host_alias" &&
1052   ac_cv_host_alias=$ac_cv_build_alias
1053 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1054   { { echo "$as_me:1054: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1055 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1056    { (exit 1); exit 1; }; }
1057
1058 fi
1059 echo "$as_me:1059: result: $ac_cv_host" >&5
1060 echo "${ECHO_T}$ac_cv_host" >&6
1061 host=$ac_cv_host
1062 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1063 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1064 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1065
1066 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1067         echo "$as_me:1067: checking target system type" >&5
1068 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1069 if test "${ac_cv_target+set}" = set; then
1070   echo $ECHO_N "(cached) $ECHO_C" >&6
1071 else
1072   ac_cv_target_alias=$target_alias
1073 test "x$ac_cv_target_alias" = "x" &&
1074   ac_cv_target_alias=$ac_cv_host_alias
1075 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1076   { { echo "$as_me:1076: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1077 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1078    { (exit 1); exit 1; }; }
1079
1080 fi
1081 echo "$as_me:1081: result: $ac_cv_target" >&5
1082 echo "${ECHO_T}$ac_cv_target" >&6
1083 target=$ac_cv_target
1084 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1085 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1086 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1087
1088 # The aliases save the names the user supplied, while $host etc.
1089 # will get canonicalized.
1090 test -n "$target_alias" &&
1091   test "$program_prefix$program_suffix$program_transform_name" = \
1092     NONENONEs,x,x, &&
1093   program_prefix=${target_alias}-
1094         system_name="$host_os"
1095 else
1096         system_name="`(uname -s -r) 2>/dev/null`"
1097         if test -z "$system_name" ; then
1098                 system_name="`(hostname) 2>/dev/null`"
1099         fi
1100 fi
1101 test -n "$system_name" && cat >>confdefs.h <<EOF
1102 #define SYSTEM_NAME "$system_name"
1103 EOF
1104
1105 if test "${cf_cv_system_name+set}" = set; then
1106   echo $ECHO_N "(cached) $ECHO_C" >&6
1107 else
1108   cf_cv_system_name="$system_name"
1109 fi
1110
1111 test -z "$system_name" && system_name="$cf_cv_system_name"
1112 test -n "$cf_cv_system_name" && echo "$as_me:1112: result: Configuring for $cf_cv_system_name" >&5
1113 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1114
1115 if test ".$system_name" != ".$cf_cv_system_name" ; then
1116         echo "$as_me:1116: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1117 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1118         { { echo "$as_me:1118: error: \"Please remove config.cache and try again.\"" >&5
1119 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1120    { (exit 1); exit 1; }; }
1121 fi
1122
1123 # Check whether --with-system-type or --without-system-type was given.
1124 if test "${with_system_type+set}" = set; then
1125   withval="$with_system_type"
1126   { echo "$as_me:1126: WARNING: overriding system type to $withval" >&5
1127 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1128  cf_cv_system_name=$withval
1129 fi;
1130
1131 ###     Save the given $CFLAGS to allow user-override.
1132 cf_user_CFLAGS="$CFLAGS"
1133
1134 ###     Default install-location
1135
1136 echo "$as_me:1136: checking for prefix" >&5
1137 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1138 if test "x$prefix" = "xNONE" ; then
1139         case "$cf_cv_system_name" in
1140                 # non-vendor systems don't have a conflict
1141         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1142                 prefix=/usr
1143                 ;;
1144         *)      prefix=$ac_default_prefix
1145                 ;;
1146         esac
1147 fi
1148 echo "$as_me:1148: result: $prefix" >&5
1149 echo "${ECHO_T}$prefix" >&6
1150
1151 if test "x$prefix" = "xNONE" ; then
1152 echo "$as_me:1152: checking for default include-directory" >&5
1153 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1154 test -n "$verbose" && echo 1>&6
1155 for cf_symbol in \
1156         $includedir \
1157         $includedir/ncurses \
1158         $prefix/include \
1159         $prefix/include/ncurses \
1160         /usr/local/include \
1161         /usr/local/include/ncurses \
1162         /usr/include \
1163         /usr/include/ncurses
1164 do
1165         cf_dir=`eval echo $cf_symbol`
1166         if test -f $cf_dir/curses.h ; then
1167         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1168                 includedir="$cf_symbol"
1169                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1170                 break
1171         fi
1172         fi
1173         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1174 done
1175 echo "$as_me:1175: result: $includedir" >&5
1176 echo "${ECHO_T}$includedir" >&6
1177 fi
1178
1179 ###     Checks for programs.
1180 ac_ext=c
1181 ac_cpp='$CPP $CPPFLAGS'
1182 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1183 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1184 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1185 ac_main_return=return
1186 if test -n "$ac_tool_prefix"; then
1187   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1188 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1189 echo "$as_me:1189: checking for $ac_word" >&5
1190 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1191 if test "${ac_cv_prog_CC+set}" = set; then
1192   echo $ECHO_N "(cached) $ECHO_C" >&6
1193 else
1194   if test -n "$CC"; then
1195   ac_cv_prog_CC="$CC" # Let the user override the test.
1196 else
1197   ac_save_IFS=$IFS; IFS=$ac_path_separator
1198 ac_dummy="$PATH"
1199 for ac_dir in $ac_dummy; do
1200   IFS=$ac_save_IFS
1201   test -z "$ac_dir" && ac_dir=.
1202   $as_executable_p "$ac_dir/$ac_word" || continue
1203 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1204 echo "$as_me:1204: found $ac_dir/$ac_word" >&5
1205 break
1206 done
1207
1208 fi
1209 fi
1210 CC=$ac_cv_prog_CC
1211 if test -n "$CC"; then
1212   echo "$as_me:1212: result: $CC" >&5
1213 echo "${ECHO_T}$CC" >&6
1214 else
1215   echo "$as_me:1215: result: no" >&5
1216 echo "${ECHO_T}no" >&6
1217 fi
1218
1219 fi
1220 if test -z "$ac_cv_prog_CC"; then
1221   ac_ct_CC=$CC
1222   # Extract the first word of "gcc", so it can be a program name with args.
1223 set dummy gcc; ac_word=$2
1224 echo "$as_me:1224: checking for $ac_word" >&5
1225 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1226 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1227   echo $ECHO_N "(cached) $ECHO_C" >&6
1228 else
1229   if test -n "$ac_ct_CC"; then
1230   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1231 else
1232   ac_save_IFS=$IFS; IFS=$ac_path_separator
1233 ac_dummy="$PATH"
1234 for ac_dir in $ac_dummy; do
1235   IFS=$ac_save_IFS
1236   test -z "$ac_dir" && ac_dir=.
1237   $as_executable_p "$ac_dir/$ac_word" || continue
1238 ac_cv_prog_ac_ct_CC="gcc"
1239 echo "$as_me:1239: found $ac_dir/$ac_word" >&5
1240 break
1241 done
1242
1243 fi
1244 fi
1245 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1246 if test -n "$ac_ct_CC"; then
1247   echo "$as_me:1247: result: $ac_ct_CC" >&5
1248 echo "${ECHO_T}$ac_ct_CC" >&6
1249 else
1250   echo "$as_me:1250: result: no" >&5
1251 echo "${ECHO_T}no" >&6
1252 fi
1253
1254   CC=$ac_ct_CC
1255 else
1256   CC="$ac_cv_prog_CC"
1257 fi
1258
1259 if test -z "$CC"; then
1260   if test -n "$ac_tool_prefix"; then
1261   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1262 set dummy ${ac_tool_prefix}cc; ac_word=$2
1263 echo "$as_me:1263: checking for $ac_word" >&5
1264 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1265 if test "${ac_cv_prog_CC+set}" = set; then
1266   echo $ECHO_N "(cached) $ECHO_C" >&6
1267 else
1268   if test -n "$CC"; then
1269   ac_cv_prog_CC="$CC" # Let the user override the test.
1270 else
1271   ac_save_IFS=$IFS; IFS=$ac_path_separator
1272 ac_dummy="$PATH"
1273 for ac_dir in $ac_dummy; do
1274   IFS=$ac_save_IFS
1275   test -z "$ac_dir" && ac_dir=.
1276   $as_executable_p "$ac_dir/$ac_word" || continue
1277 ac_cv_prog_CC="${ac_tool_prefix}cc"
1278 echo "$as_me:1278: found $ac_dir/$ac_word" >&5
1279 break
1280 done
1281
1282 fi
1283 fi
1284 CC=$ac_cv_prog_CC
1285 if test -n "$CC"; then
1286   echo "$as_me:1286: result: $CC" >&5
1287 echo "${ECHO_T}$CC" >&6
1288 else
1289   echo "$as_me:1289: result: no" >&5
1290 echo "${ECHO_T}no" >&6
1291 fi
1292
1293 fi
1294 if test -z "$ac_cv_prog_CC"; then
1295   ac_ct_CC=$CC
1296   # Extract the first word of "cc", so it can be a program name with args.
1297 set dummy cc; ac_word=$2
1298 echo "$as_me:1298: checking for $ac_word" >&5
1299 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1300 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1301   echo $ECHO_N "(cached) $ECHO_C" >&6
1302 else
1303   if test -n "$ac_ct_CC"; then
1304   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1305 else
1306   ac_save_IFS=$IFS; IFS=$ac_path_separator
1307 ac_dummy="$PATH"
1308 for ac_dir in $ac_dummy; do
1309   IFS=$ac_save_IFS
1310   test -z "$ac_dir" && ac_dir=.
1311   $as_executable_p "$ac_dir/$ac_word" || continue
1312 ac_cv_prog_ac_ct_CC="cc"
1313 echo "$as_me:1313: found $ac_dir/$ac_word" >&5
1314 break
1315 done
1316
1317 fi
1318 fi
1319 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1320 if test -n "$ac_ct_CC"; then
1321   echo "$as_me:1321: result: $ac_ct_CC" >&5
1322 echo "${ECHO_T}$ac_ct_CC" >&6
1323 else
1324   echo "$as_me:1324: result: no" >&5
1325 echo "${ECHO_T}no" >&6
1326 fi
1327
1328   CC=$ac_ct_CC
1329 else
1330   CC="$ac_cv_prog_CC"
1331 fi
1332
1333 fi
1334 if test -z "$CC"; then
1335   # Extract the first word of "cc", so it can be a program name with args.
1336 set dummy cc; ac_word=$2
1337 echo "$as_me:1337: checking for $ac_word" >&5
1338 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1339 if test "${ac_cv_prog_CC+set}" = set; then
1340   echo $ECHO_N "(cached) $ECHO_C" >&6
1341 else
1342   if test -n "$CC"; then
1343   ac_cv_prog_CC="$CC" # Let the user override the test.
1344 else
1345   ac_prog_rejected=no
1346   ac_save_IFS=$IFS; IFS=$ac_path_separator
1347 ac_dummy="$PATH"
1348 for ac_dir in $ac_dummy; do
1349   IFS=$ac_save_IFS
1350   test -z "$ac_dir" && ac_dir=.
1351   $as_executable_p "$ac_dir/$ac_word" || continue
1352 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1353   ac_prog_rejected=yes
1354   continue
1355 fi
1356 ac_cv_prog_CC="cc"
1357 echo "$as_me:1357: found $ac_dir/$ac_word" >&5
1358 break
1359 done
1360
1361 if test $ac_prog_rejected = yes; then
1362   # We found a bogon in the path, so make sure we never use it.
1363   set dummy $ac_cv_prog_CC
1364   shift
1365   if test $# != 0; then
1366     # We chose a different compiler from the bogus one.
1367     # However, it has the same basename, so the bogon will be chosen
1368     # first if we set CC to just the basename; use the full file name.
1369     shift
1370     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1371     shift
1372     ac_cv_prog_CC="$@"
1373   fi
1374 fi
1375 fi
1376 fi
1377 CC=$ac_cv_prog_CC
1378 if test -n "$CC"; then
1379   echo "$as_me:1379: result: $CC" >&5
1380 echo "${ECHO_T}$CC" >&6
1381 else
1382   echo "$as_me:1382: result: no" >&5
1383 echo "${ECHO_T}no" >&6
1384 fi
1385
1386 fi
1387 if test -z "$CC"; then
1388   if test -n "$ac_tool_prefix"; then
1389   for ac_prog in cl
1390   do
1391     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1392 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1393 echo "$as_me:1393: checking for $ac_word" >&5
1394 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1395 if test "${ac_cv_prog_CC+set}" = set; then
1396   echo $ECHO_N "(cached) $ECHO_C" >&6
1397 else
1398   if test -n "$CC"; then
1399   ac_cv_prog_CC="$CC" # Let the user override the test.
1400 else
1401   ac_save_IFS=$IFS; IFS=$ac_path_separator
1402 ac_dummy="$PATH"
1403 for ac_dir in $ac_dummy; do
1404   IFS=$ac_save_IFS
1405   test -z "$ac_dir" && ac_dir=.
1406   $as_executable_p "$ac_dir/$ac_word" || continue
1407 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1408 echo "$as_me:1408: found $ac_dir/$ac_word" >&5
1409 break
1410 done
1411
1412 fi
1413 fi
1414 CC=$ac_cv_prog_CC
1415 if test -n "$CC"; then
1416   echo "$as_me:1416: result: $CC" >&5
1417 echo "${ECHO_T}$CC" >&6
1418 else
1419   echo "$as_me:1419: result: no" >&5
1420 echo "${ECHO_T}no" >&6
1421 fi
1422
1423     test -n "$CC" && break
1424   done
1425 fi
1426 if test -z "$CC"; then
1427   ac_ct_CC=$CC
1428   for ac_prog in cl
1429 do
1430   # Extract the first word of "$ac_prog", so it can be a program name with args.
1431 set dummy $ac_prog; ac_word=$2
1432 echo "$as_me:1432: checking for $ac_word" >&5
1433 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1434 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1435   echo $ECHO_N "(cached) $ECHO_C" >&6
1436 else
1437   if test -n "$ac_ct_CC"; then
1438   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1439 else
1440   ac_save_IFS=$IFS; IFS=$ac_path_separator
1441 ac_dummy="$PATH"
1442 for ac_dir in $ac_dummy; do
1443   IFS=$ac_save_IFS
1444   test -z "$ac_dir" && ac_dir=.
1445   $as_executable_p "$ac_dir/$ac_word" || continue
1446 ac_cv_prog_ac_ct_CC="$ac_prog"
1447 echo "$as_me:1447: found $ac_dir/$ac_word" >&5
1448 break
1449 done
1450
1451 fi
1452 fi
1453 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1454 if test -n "$ac_ct_CC"; then
1455   echo "$as_me:1455: result: $ac_ct_CC" >&5
1456 echo "${ECHO_T}$ac_ct_CC" >&6
1457 else
1458   echo "$as_me:1458: result: no" >&5
1459 echo "${ECHO_T}no" >&6
1460 fi
1461
1462   test -n "$ac_ct_CC" && break
1463 done
1464
1465   CC=$ac_ct_CC
1466 fi
1467
1468 fi
1469
1470 test -z "$CC" && { { echo "$as_me:1470: error: no acceptable cc found in \$PATH" >&5
1471 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1472    { (exit 1); exit 1; }; }
1473
1474 # Provide some information about the compiler.
1475 echo "$as_me:1475:" \
1476      "checking for C compiler version" >&5
1477 ac_compiler=`set X $ac_compile; echo $2`
1478 { (eval echo "$as_me:1478: \"$ac_compiler --version </dev/null >&5\"") >&5
1479   (eval $ac_compiler --version </dev/null >&5) 2>&5
1480   ac_status=$?
1481   echo "$as_me:1481: \$? = $ac_status" >&5
1482   (exit $ac_status); }
1483 { (eval echo "$as_me:1483: \"$ac_compiler -v </dev/null >&5\"") >&5
1484   (eval $ac_compiler -v </dev/null >&5) 2>&5
1485   ac_status=$?
1486   echo "$as_me:1486: \$? = $ac_status" >&5
1487   (exit $ac_status); }
1488 { (eval echo "$as_me:1488: \"$ac_compiler -V </dev/null >&5\"") >&5
1489   (eval $ac_compiler -V </dev/null >&5) 2>&5
1490   ac_status=$?
1491   echo "$as_me:1491: \$? = $ac_status" >&5
1492   (exit $ac_status); }
1493
1494 cat >conftest.$ac_ext <<_ACEOF
1495 #line 1495 "configure"
1496 #include "confdefs.h"
1497
1498 int
1499 main ()
1500 {
1501
1502   ;
1503   return 0;
1504 }
1505 _ACEOF
1506 ac_clean_files_save=$ac_clean_files
1507 ac_clean_files="$ac_clean_files a.out a.exe"
1508 # Try to create an executable without -o first, disregard a.out.
1509 # It will help us diagnose broken compilers, and finding out an intuition
1510 # of exeext.
1511 echo "$as_me:1511: checking for C compiler default output" >&5
1512 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1513 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1514 if { (eval echo "$as_me:1514: \"$ac_link_default\"") >&5
1515   (eval $ac_link_default) 2>&5
1516   ac_status=$?
1517   echo "$as_me:1517: \$? = $ac_status" >&5
1518   (exit $ac_status); }; then
1519   # Find the output, starting from the most likely.  This scheme is
1520 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1521 # resort.
1522 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1523                 ls a.out conftest 2>/dev/null;
1524                 ls a.* conftest.* 2>/dev/null`; do
1525   case $ac_file in
1526     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1527     a.out ) # We found the default executable, but exeext='' is most
1528             # certainly right.
1529             break;;
1530     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1531           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1532           export ac_cv_exeext
1533           break;;
1534     * ) break;;
1535   esac
1536 done
1537 else
1538   echo "$as_me: failed program was:" >&5
1539 cat conftest.$ac_ext >&5
1540 { { echo "$as_me:1540: error: C compiler cannot create executables" >&5
1541 echo "$as_me: error: C compiler cannot create executables" >&2;}
1542    { (exit 77); exit 77; }; }
1543 fi
1544
1545 ac_exeext=$ac_cv_exeext
1546 echo "$as_me:1546: result: $ac_file" >&5
1547 echo "${ECHO_T}$ac_file" >&6
1548
1549 # Check the compiler produces executables we can run.  If not, either
1550 # the compiler is broken, or we cross compile.
1551 echo "$as_me:1551: checking whether the C compiler works" >&5
1552 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1553 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1554 # If not cross compiling, check that we can run a simple program.
1555 if test "$cross_compiling" != yes; then
1556   if { ac_try='./$ac_file'
1557   { (eval echo "$as_me:1557: \"$ac_try\"") >&5
1558   (eval $ac_try) 2>&5
1559   ac_status=$?
1560   echo "$as_me:1560: \$? = $ac_status" >&5
1561   (exit $ac_status); }; }; then
1562     cross_compiling=no
1563   else
1564     if test "$cross_compiling" = maybe; then
1565         cross_compiling=yes
1566     else
1567         { { echo "$as_me:1567: error: cannot run C compiled programs.
1568 If you meant to cross compile, use \`--host'." >&5
1569 echo "$as_me: error: cannot run C compiled programs.
1570 If you meant to cross compile, use \`--host'." >&2;}
1571    { (exit 1); exit 1; }; }
1572     fi
1573   fi
1574 fi
1575 echo "$as_me:1575: result: yes" >&5
1576 echo "${ECHO_T}yes" >&6
1577
1578 rm -f a.out a.exe conftest$ac_cv_exeext
1579 ac_clean_files=$ac_clean_files_save
1580 # Check the compiler produces executables we can run.  If not, either
1581 # the compiler is broken, or we cross compile.
1582 echo "$as_me:1582: checking whether we are cross compiling" >&5
1583 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1584 echo "$as_me:1584: result: $cross_compiling" >&5
1585 echo "${ECHO_T}$cross_compiling" >&6
1586
1587 echo "$as_me:1587: checking for executable suffix" >&5
1588 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1589 if { (eval echo "$as_me:1589: \"$ac_link\"") >&5
1590   (eval $ac_link) 2>&5
1591   ac_status=$?
1592   echo "$as_me:1592: \$? = $ac_status" >&5
1593   (exit $ac_status); }; then
1594   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1595 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1596 # work properly (i.e., refer to `conftest.exe'), while it won't with
1597 # `rm'.
1598 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1599   case $ac_file in
1600     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1601     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1602           export ac_cv_exeext
1603           break;;
1604     * ) break;;
1605   esac
1606 done
1607 else
1608   { { echo "$as_me:1608: error: cannot compute EXEEXT: cannot compile and link" >&5
1609 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1610    { (exit 1); exit 1; }; }
1611 fi
1612
1613 rm -f conftest$ac_cv_exeext
1614 echo "$as_me:1614: result: $ac_cv_exeext" >&5
1615 echo "${ECHO_T}$ac_cv_exeext" >&6
1616
1617 rm -f conftest.$ac_ext
1618 EXEEXT=$ac_cv_exeext
1619 ac_exeext=$EXEEXT
1620 echo "$as_me:1620: checking for object suffix" >&5
1621 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1622 if test "${ac_cv_objext+set}" = set; then
1623   echo $ECHO_N "(cached) $ECHO_C" >&6
1624 else
1625   cat >conftest.$ac_ext <<_ACEOF
1626 #line 1626 "configure"
1627 #include "confdefs.h"
1628
1629 int
1630 main ()
1631 {
1632
1633   ;
1634   return 0;
1635 }
1636 _ACEOF
1637 rm -f conftest.o conftest.obj
1638 if { (eval echo "$as_me:1638: \"$ac_compile\"") >&5
1639   (eval $ac_compile) 2>&5
1640   ac_status=$?
1641   echo "$as_me:1641: \$? = $ac_status" >&5
1642   (exit $ac_status); }; then
1643   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1644   case $ac_file in
1645     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1646     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1647        break;;
1648   esac
1649 done
1650 else
1651   echo "$as_me: failed program was:" >&5
1652 cat conftest.$ac_ext >&5
1653 { { echo "$as_me:1653: error: cannot compute OBJEXT: cannot compile" >&5
1654 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1655    { (exit 1); exit 1; }; }
1656 fi
1657
1658 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1659 fi
1660 echo "$as_me:1660: result: $ac_cv_objext" >&5
1661 echo "${ECHO_T}$ac_cv_objext" >&6
1662 OBJEXT=$ac_cv_objext
1663 ac_objext=$OBJEXT
1664 echo "$as_me:1664: checking whether we are using the GNU C compiler" >&5
1665 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1666 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1667   echo $ECHO_N "(cached) $ECHO_C" >&6
1668 else
1669   cat >conftest.$ac_ext <<_ACEOF
1670 #line 1670 "configure"
1671 #include "confdefs.h"
1672
1673 int
1674 main ()
1675 {
1676 #ifndef __GNUC__
1677        choke me
1678 #endif
1679
1680   ;
1681   return 0;
1682 }
1683 _ACEOF
1684 rm -f conftest.$ac_objext
1685 if { (eval echo "$as_me:1685: \"$ac_compile\"") >&5
1686   (eval $ac_compile) 2>&5
1687   ac_status=$?
1688   echo "$as_me:1688: \$? = $ac_status" >&5
1689   (exit $ac_status); } &&
1690          { ac_try='test -s conftest.$ac_objext'
1691   { (eval echo "$as_me:1691: \"$ac_try\"") >&5
1692   (eval $ac_try) 2>&5
1693   ac_status=$?
1694   echo "$as_me:1694: \$? = $ac_status" >&5
1695   (exit $ac_status); }; }; then
1696   ac_compiler_gnu=yes
1697 else
1698   echo "$as_me: failed program was:" >&5
1699 cat conftest.$ac_ext >&5
1700 ac_compiler_gnu=no
1701 fi
1702 rm -f conftest.$ac_objext conftest.$ac_ext
1703 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1704
1705 fi
1706 echo "$as_me:1706: result: $ac_cv_c_compiler_gnu" >&5
1707 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1708 GCC=`test $ac_compiler_gnu = yes && echo yes`
1709 ac_test_CFLAGS=${CFLAGS+set}
1710 ac_save_CFLAGS=$CFLAGS
1711 CFLAGS="-g"
1712 echo "$as_me:1712: checking whether $CC accepts -g" >&5
1713 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1714 if test "${ac_cv_prog_cc_g+set}" = set; then
1715   echo $ECHO_N "(cached) $ECHO_C" >&6
1716 else
1717   cat >conftest.$ac_ext <<_ACEOF
1718 #line 1718 "configure"
1719 #include "confdefs.h"
1720
1721 int
1722 main ()
1723 {
1724
1725   ;
1726   return 0;
1727 }
1728 _ACEOF
1729 rm -f conftest.$ac_objext
1730 if { (eval echo "$as_me:1730: \"$ac_compile\"") >&5
1731   (eval $ac_compile) 2>&5
1732   ac_status=$?
1733   echo "$as_me:1733: \$? = $ac_status" >&5
1734   (exit $ac_status); } &&
1735          { ac_try='test -s conftest.$ac_objext'
1736   { (eval echo "$as_me:1736: \"$ac_try\"") >&5
1737   (eval $ac_try) 2>&5
1738   ac_status=$?
1739   echo "$as_me:1739: \$? = $ac_status" >&5
1740   (exit $ac_status); }; }; then
1741   ac_cv_prog_cc_g=yes
1742 else
1743   echo "$as_me: failed program was:" >&5
1744 cat conftest.$ac_ext >&5
1745 ac_cv_prog_cc_g=no
1746 fi
1747 rm -f conftest.$ac_objext conftest.$ac_ext
1748 fi
1749 echo "$as_me:1749: result: $ac_cv_prog_cc_g" >&5
1750 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1751 if test "$ac_test_CFLAGS" = set; then
1752   CFLAGS=$ac_save_CFLAGS
1753 elif test $ac_cv_prog_cc_g = yes; then
1754   if test "$GCC" = yes; then
1755     CFLAGS="-g -O2"
1756   else
1757     CFLAGS="-g"
1758   fi
1759 else
1760   if test "$GCC" = yes; then
1761     CFLAGS="-O2"
1762   else
1763     CFLAGS=
1764   fi
1765 fi
1766 # Some people use a C++ compiler to compile C.  Since we use `exit',
1767 # in C++ we need to declare it.  In case someone uses the same compiler
1768 # for both compiling C and C++ we need to have the C++ compiler decide
1769 # the declaration of exit, since it's the most demanding environment.
1770 cat >conftest.$ac_ext <<_ACEOF
1771 #ifndef __cplusplus
1772   choke me
1773 #endif
1774 _ACEOF
1775 rm -f conftest.$ac_objext
1776 if { (eval echo "$as_me:1776: \"$ac_compile\"") >&5
1777   (eval $ac_compile) 2>&5
1778   ac_status=$?
1779   echo "$as_me:1779: \$? = $ac_status" >&5
1780   (exit $ac_status); } &&
1781          { ac_try='test -s conftest.$ac_objext'
1782   { (eval echo "$as_me:1782: \"$ac_try\"") >&5
1783   (eval $ac_try) 2>&5
1784   ac_status=$?
1785   echo "$as_me:1785: \$? = $ac_status" >&5
1786   (exit $ac_status); }; }; then
1787   for ac_declaration in \
1788    ''\
1789    '#include <stdlib.h>' \
1790    'extern "C" void std::exit (int) throw (); using std::exit;' \
1791    'extern "C" void std::exit (int); using std::exit;' \
1792    'extern "C" void exit (int) throw ();' \
1793    'extern "C" void exit (int);' \
1794    'void exit (int);'
1795 do
1796   cat >conftest.$ac_ext <<_ACEOF
1797 #line 1797 "configure"
1798 #include "confdefs.h"
1799 #include <stdlib.h>
1800 $ac_declaration
1801 int
1802 main ()
1803 {
1804 exit (42);
1805   ;
1806   return 0;
1807 }
1808 _ACEOF
1809 rm -f conftest.$ac_objext
1810 if { (eval echo "$as_me:1810: \"$ac_compile\"") >&5
1811   (eval $ac_compile) 2>&5
1812   ac_status=$?
1813   echo "$as_me:1813: \$? = $ac_status" >&5
1814   (exit $ac_status); } &&
1815          { ac_try='test -s conftest.$ac_objext'
1816   { (eval echo "$as_me:1816: \"$ac_try\"") >&5
1817   (eval $ac_try) 2>&5
1818   ac_status=$?
1819   echo "$as_me:1819: \$? = $ac_status" >&5
1820   (exit $ac_status); }; }; then
1821   :
1822 else
1823   echo "$as_me: failed program was:" >&5
1824 cat conftest.$ac_ext >&5
1825 continue
1826 fi
1827 rm -f conftest.$ac_objext conftest.$ac_ext
1828   cat >conftest.$ac_ext <<_ACEOF
1829 #line 1829 "configure"
1830 #include "confdefs.h"
1831 $ac_declaration
1832 int
1833 main ()
1834 {
1835 exit (42);
1836   ;
1837   return 0;
1838 }
1839 _ACEOF
1840 rm -f conftest.$ac_objext
1841 if { (eval echo "$as_me:1841: \"$ac_compile\"") >&5
1842   (eval $ac_compile) 2>&5
1843   ac_status=$?
1844   echo "$as_me:1844: \$? = $ac_status" >&5
1845   (exit $ac_status); } &&
1846          { ac_try='test -s conftest.$ac_objext'
1847   { (eval echo "$as_me:1847: \"$ac_try\"") >&5
1848   (eval $ac_try) 2>&5
1849   ac_status=$?
1850   echo "$as_me:1850: \$? = $ac_status" >&5
1851   (exit $ac_status); }; }; then
1852   break
1853 else
1854   echo "$as_me: failed program was:" >&5
1855 cat conftest.$ac_ext >&5
1856 fi
1857 rm -f conftest.$ac_objext conftest.$ac_ext
1858 done
1859 rm -rf conftest*
1860 if test -n "$ac_declaration"; then
1861   echo '#ifdef __cplusplus' >>confdefs.h
1862   echo $ac_declaration      >>confdefs.h
1863   echo '#endif'             >>confdefs.h
1864 fi
1865
1866 else
1867   echo "$as_me: failed program was:" >&5
1868 cat conftest.$ac_ext >&5
1869 fi
1870 rm -f conftest.$ac_objext conftest.$ac_ext
1871 ac_ext=c
1872 ac_cpp='$CPP $CPPFLAGS'
1873 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1874 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1875 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1876 ac_main_return=return
1877
1878 GCC_VERSION=none
1879 if test "$GCC" = yes ; then
1880         echo "$as_me:1880: checking version of $CC" >&5
1881 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1882         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1883         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1884         echo "$as_me:1884: result: $GCC_VERSION" >&5
1885 echo "${ECHO_T}$GCC_VERSION" >&6
1886 fi
1887
1888 ac_ext=c
1889 ac_cpp='$CPP $CPPFLAGS'
1890 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1891 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1892 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1893 ac_main_return=return
1894 echo "$as_me:1894: checking how to run the C preprocessor" >&5
1895 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1896 # On Suns, sometimes $CPP names a directory.
1897 if test -n "$CPP" && test -d "$CPP"; then
1898   CPP=
1899 fi
1900 if test -z "$CPP"; then
1901   if test "${ac_cv_prog_CPP+set}" = set; then
1902   echo $ECHO_N "(cached) $ECHO_C" >&6
1903 else
1904       # Double quotes because CPP needs to be expanded
1905     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1906     do
1907       ac_preproc_ok=false
1908 for ac_c_preproc_warn_flag in '' yes
1909 do
1910   # Use a header file that comes with gcc, so configuring glibc
1911   # with a fresh cross-compiler works.
1912   # On the NeXT, cc -E runs the code through the compiler's parser,
1913   # not just through cpp. "Syntax error" is here to catch this case.
1914   cat >conftest.$ac_ext <<_ACEOF
1915 #line 1915 "configure"
1916 #include "confdefs.h"
1917 #include <assert.h>
1918                      Syntax error
1919 _ACEOF
1920 if { (eval echo "$as_me:1920: \"$ac_cpp conftest.$ac_ext\"") >&5
1921   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1922   ac_status=$?
1923   egrep -v '^ *\+' conftest.er1 >conftest.err
1924   rm -f conftest.er1
1925   cat conftest.err >&5
1926   echo "$as_me:1926: \$? = $ac_status" >&5
1927   (exit $ac_status); } >/dev/null; then
1928   if test -s conftest.err; then
1929     ac_cpp_err=$ac_c_preproc_warn_flag
1930   else
1931     ac_cpp_err=
1932   fi
1933 else
1934   ac_cpp_err=yes
1935 fi
1936 if test -z "$ac_cpp_err"; then
1937   :
1938 else
1939   echo "$as_me: failed program was:" >&5
1940   cat conftest.$ac_ext >&5
1941   # Broken: fails on valid input.
1942 continue
1943 fi
1944 rm -f conftest.err conftest.$ac_ext
1945
1946   # OK, works on sane cases.  Now check whether non-existent headers
1947   # can be detected and how.
1948   cat >conftest.$ac_ext <<_ACEOF
1949 #line 1949 "configure"
1950 #include "confdefs.h"
1951 #include <ac_nonexistent.h>
1952 _ACEOF
1953 if { (eval echo "$as_me:1953: \"$ac_cpp conftest.$ac_ext\"") >&5
1954   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1955   ac_status=$?
1956   egrep -v '^ *\+' conftest.er1 >conftest.err
1957   rm -f conftest.er1
1958   cat conftest.err >&5
1959   echo "$as_me:1959: \$? = $ac_status" >&5
1960   (exit $ac_status); } >/dev/null; then
1961   if test -s conftest.err; then
1962     ac_cpp_err=$ac_c_preproc_warn_flag
1963   else
1964     ac_cpp_err=
1965   fi
1966 else
1967   ac_cpp_err=yes
1968 fi
1969 if test -z "$ac_cpp_err"; then
1970   # Broken: success on invalid input.
1971 continue
1972 else
1973   echo "$as_me: failed program was:" >&5
1974   cat conftest.$ac_ext >&5
1975   # Passes both tests.
1976 ac_preproc_ok=:
1977 break
1978 fi
1979 rm -f conftest.err conftest.$ac_ext
1980
1981 done
1982 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1983 rm -f conftest.err conftest.$ac_ext
1984 if $ac_preproc_ok; then
1985   break
1986 fi
1987
1988     done
1989     ac_cv_prog_CPP=$CPP
1990
1991 fi
1992   CPP=$ac_cv_prog_CPP
1993 else
1994   ac_cv_prog_CPP=$CPP
1995 fi
1996 echo "$as_me:1996: result: $CPP" >&5
1997 echo "${ECHO_T}$CPP" >&6
1998 ac_preproc_ok=false
1999 for ac_c_preproc_warn_flag in '' yes
2000 do
2001   # Use a header file that comes with gcc, so configuring glibc
2002   # with a fresh cross-compiler works.
2003   # On the NeXT, cc -E runs the code through the compiler's parser,
2004   # not just through cpp. "Syntax error" is here to catch this case.
2005   cat >conftest.$ac_ext <<_ACEOF
2006 #line 2006 "configure"
2007 #include "confdefs.h"
2008 #include <assert.h>
2009                      Syntax error
2010 _ACEOF
2011 if { (eval echo "$as_me:2011: \"$ac_cpp conftest.$ac_ext\"") >&5
2012   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2013   ac_status=$?
2014   egrep -v '^ *\+' conftest.er1 >conftest.err
2015   rm -f conftest.er1
2016   cat conftest.err >&5
2017   echo "$as_me:2017: \$? = $ac_status" >&5
2018   (exit $ac_status); } >/dev/null; then
2019   if test -s conftest.err; then
2020     ac_cpp_err=$ac_c_preproc_warn_flag
2021   else
2022     ac_cpp_err=
2023   fi
2024 else
2025   ac_cpp_err=yes
2026 fi
2027 if test -z "$ac_cpp_err"; then
2028   :
2029 else
2030   echo "$as_me: failed program was:" >&5
2031   cat conftest.$ac_ext >&5
2032   # Broken: fails on valid input.
2033 continue
2034 fi
2035 rm -f conftest.err conftest.$ac_ext
2036
2037   # OK, works on sane cases.  Now check whether non-existent headers
2038   # can be detected and how.
2039   cat >conftest.$ac_ext <<_ACEOF
2040 #line 2040 "configure"
2041 #include "confdefs.h"
2042 #include <ac_nonexistent.h>
2043 _ACEOF
2044 if { (eval echo "$as_me:2044: \"$ac_cpp conftest.$ac_ext\"") >&5
2045   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2046   ac_status=$?
2047   egrep -v '^ *\+' conftest.er1 >conftest.err
2048   rm -f conftest.er1
2049   cat conftest.err >&5
2050   echo "$as_me:2050: \$? = $ac_status" >&5
2051   (exit $ac_status); } >/dev/null; then
2052   if test -s conftest.err; then
2053     ac_cpp_err=$ac_c_preproc_warn_flag
2054   else
2055     ac_cpp_err=
2056   fi
2057 else
2058   ac_cpp_err=yes
2059 fi
2060 if test -z "$ac_cpp_err"; then
2061   # Broken: success on invalid input.
2062 continue
2063 else
2064   echo "$as_me: failed program was:" >&5
2065   cat conftest.$ac_ext >&5
2066   # Passes both tests.
2067 ac_preproc_ok=:
2068 break
2069 fi
2070 rm -f conftest.err conftest.$ac_ext
2071
2072 done
2073 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2074 rm -f conftest.err conftest.$ac_ext
2075 if $ac_preproc_ok; then
2076   :
2077 else
2078   { { echo "$as_me:2078: error: C preprocessor \"$CPP\" fails sanity check" >&5
2079 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2080    { (exit 1); exit 1; }; }
2081 fi
2082
2083 ac_ext=c
2084 ac_cpp='$CPP $CPPFLAGS'
2085 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2086 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2087 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2088 ac_main_return=return
2089
2090 if test $ac_cv_c_compiler_gnu = yes; then
2091     echo "$as_me:2091: checking whether $CC needs -traditional" >&5
2092 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2093 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2094   echo $ECHO_N "(cached) $ECHO_C" >&6
2095 else
2096     ac_pattern="Autoconf.*'x'"
2097   cat >conftest.$ac_ext <<_ACEOF
2098 #line 2098 "configure"
2099 #include "confdefs.h"
2100 #include <sgtty.h>
2101 int Autoconf = TIOCGETP;
2102 _ACEOF
2103 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2104   egrep "$ac_pattern" >/dev/null 2>&1; then
2105   ac_cv_prog_gcc_traditional=yes
2106 else
2107   ac_cv_prog_gcc_traditional=no
2108 fi
2109 rm -rf conftest*
2110
2111   if test $ac_cv_prog_gcc_traditional = no; then
2112     cat >conftest.$ac_ext <<_ACEOF
2113 #line 2113 "configure"
2114 #include "confdefs.h"
2115 #include <termio.h>
2116 int Autoconf = TCGETA;
2117 _ACEOF
2118 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2119   egrep "$ac_pattern" >/dev/null 2>&1; then
2120   ac_cv_prog_gcc_traditional=yes
2121 fi
2122 rm -rf conftest*
2123
2124   fi
2125 fi
2126 echo "$as_me:2126: result: $ac_cv_prog_gcc_traditional" >&5
2127 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2128   if test $ac_cv_prog_gcc_traditional = yes; then
2129     CC="$CC -traditional"
2130   fi
2131 fi
2132
2133 echo "$as_me:2133: checking whether $CC understands -c and -o together" >&5
2134 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2135 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2136   echo $ECHO_N "(cached) $ECHO_C" >&6
2137 else
2138
2139 cat > conftest.$ac_ext <<CF_EOF
2140 #include <stdio.h>
2141 int main()
2142 {
2143         ${cf_cv_main_return:-return}(0);
2144 }
2145 CF_EOF
2146 # We do the test twice because some compilers refuse to overwrite an
2147 # existing .o file with -o, though they will create one.
2148 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2149 if { (eval echo "$as_me:2149: \"$ac_try\"") >&5
2150   (eval $ac_try) 2>&5
2151   ac_status=$?
2152   echo "$as_me:2152: \$? = $ac_status" >&5
2153   (exit $ac_status); } &&
2154   test -f conftest2.$ac_objext && { (eval echo "$as_me:2154: \"$ac_try\"") >&5
2155   (eval $ac_try) 2>&5
2156   ac_status=$?
2157   echo "$as_me:2157: \$? = $ac_status" >&5
2158   (exit $ac_status); };
2159 then
2160   eval cf_cv_prog_CC_c_o=yes
2161 else
2162   eval cf_cv_prog_CC_c_o=no
2163 fi
2164 rm -rf conftest*
2165
2166 fi
2167 if test $cf_cv_prog_CC_c_o = yes; then
2168   echo "$as_me:2168: result: yes" >&5
2169 echo "${ECHO_T}yes" >&6
2170 else
2171   echo "$as_me:2171: result: no" >&5
2172 echo "${ECHO_T}no" >&6
2173 fi
2174
2175 echo "$as_me:2175: checking for POSIXized ISC" >&5
2176 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2177 if test -d /etc/conf/kconfig.d &&
2178    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2179 then
2180   echo "$as_me:2180: result: yes" >&5
2181 echo "${ECHO_T}yes" >&6
2182   ISC=yes # If later tests want to check for ISC.
2183
2184 cat >>confdefs.h <<\EOF
2185 #define _POSIX_SOURCE 1
2186 EOF
2187
2188   if test "$GCC" = yes; then
2189     CC="$CC -posix"
2190   else
2191     CC="$CC -Xp"
2192   fi
2193 else
2194   echo "$as_me:2194: result: no" >&5
2195 echo "${ECHO_T}no" >&6
2196   ISC=
2197 fi
2198
2199 echo "$as_me:2199: checking for ${CC-cc} option to accept ANSI C" >&5
2200 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2201 if test "${cf_cv_ansi_cc+set}" = set; then
2202   echo $ECHO_N "(cached) $ECHO_C" >&6
2203 else
2204
2205 cf_cv_ansi_cc=no
2206 cf_save_CFLAGS="$CFLAGS"
2207 cf_save_CPPFLAGS="$CPPFLAGS"
2208 # Don't try gcc -ansi; that turns off useful extensions and
2209 # breaks some systems' header files.
2210 # AIX                   -qlanglvl=ansi
2211 # Ultrix and OSF/1      -std1
2212 # HP-UX                 -Aa -D_HPUX_SOURCE
2213 # SVR4                  -Xc
2214 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2215 for cf_arg in "-DCC_HAS_PROTOS" \
2216         "" \
2217         -qlanglvl=ansi \
2218         -std1 \
2219         -Ae \
2220         "-Aa -D_HPUX_SOURCE" \
2221         -Xc
2222 do
2223
2224 cf_fix_cppflags=no
2225 cf_new_cflags=
2226 cf_new_cppflags=
2227 cf_new_extra_cppflags=
2228
2229 for cf_add_cflags in $cf_arg
2230 do
2231 case $cf_fix_cppflags in
2232 no)
2233         case $cf_add_cflags in #(vi
2234         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2235                 case $cf_add_cflags in
2236                 -D*)
2237                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2238
2239                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2240                                 && test -z "${cf_tst_cflags}" \
2241                                 && cf_fix_cppflags=yes
2242
2243                         if test $cf_fix_cppflags = yes ; then
2244                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2245                                 continue
2246                         elif test "${cf_tst_cflags}" = "\"'" ; then
2247                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2248                                 continue
2249                         fi
2250                         ;;
2251                 esac
2252                 case "$CPPFLAGS" in
2253                 *$cf_add_cflags) #(vi
2254                         ;;
2255                 *) #(vi
2256                         case $cf_add_cflags in #(vi
2257                         -D*)
2258                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2259
2260 CPPFLAGS=`echo "$CPPFLAGS" | \
2261         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2262                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2263
2264                                 ;;
2265                         esac
2266                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2267                         ;;
2268                 esac
2269                 ;;
2270         *)
2271                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2272                 ;;
2273         esac
2274         ;;
2275 yes)
2276         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2277
2278         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2279
2280         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2281                 && test -z "${cf_tst_cflags}" \
2282                 && cf_fix_cppflags=no
2283         ;;
2284 esac
2285 done
2286
2287 if test -n "$cf_new_cflags" ; then
2288
2289         CFLAGS="$CFLAGS $cf_new_cflags"
2290 fi
2291
2292 if test -n "$cf_new_cppflags" ; then
2293
2294         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2295 fi
2296
2297 if test -n "$cf_new_extra_cppflags" ; then
2298
2299         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2300 fi
2301
2302         cat >conftest.$ac_ext <<_ACEOF
2303 #line 2303 "configure"
2304 #include "confdefs.h"
2305
2306 #ifndef CC_HAS_PROTOS
2307 #if !defined(__STDC__) || (__STDC__ != 1)
2308 choke me
2309 #endif
2310 #endif
2311
2312 int
2313 main ()
2314 {
2315
2316         int test (int i, double x);
2317         struct s1 {int (*f) (int a);};
2318         struct s2 {int (*f) (double a);};
2319   ;
2320   return 0;
2321 }
2322 _ACEOF
2323 rm -f conftest.$ac_objext
2324 if { (eval echo "$as_me:2324: \"$ac_compile\"") >&5
2325   (eval $ac_compile) 2>&5
2326   ac_status=$?
2327   echo "$as_me:2327: \$? = $ac_status" >&5
2328   (exit $ac_status); } &&
2329          { ac_try='test -s conftest.$ac_objext'
2330   { (eval echo "$as_me:2330: \"$ac_try\"") >&5
2331   (eval $ac_try) 2>&5
2332   ac_status=$?
2333   echo "$as_me:2333: \$? = $ac_status" >&5
2334   (exit $ac_status); }; }; then
2335   cf_cv_ansi_cc="$cf_arg"; break
2336 else
2337   echo "$as_me: failed program was:" >&5
2338 cat conftest.$ac_ext >&5
2339 fi
2340 rm -f conftest.$ac_objext conftest.$ac_ext
2341 done
2342 CFLAGS="$cf_save_CFLAGS"
2343 CPPFLAGS="$cf_save_CPPFLAGS"
2344
2345 fi
2346 echo "$as_me:2346: result: $cf_cv_ansi_cc" >&5
2347 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2348
2349 if test "$cf_cv_ansi_cc" != "no"; then
2350 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2351
2352 cf_fix_cppflags=no
2353 cf_new_cflags=
2354 cf_new_cppflags=
2355 cf_new_extra_cppflags=
2356
2357 for cf_add_cflags in $cf_cv_ansi_cc
2358 do
2359 case $cf_fix_cppflags in
2360 no)
2361         case $cf_add_cflags in #(vi
2362         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2363                 case $cf_add_cflags in
2364                 -D*)
2365                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2366
2367                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2368                                 && test -z "${cf_tst_cflags}" \
2369                                 && cf_fix_cppflags=yes
2370
2371                         if test $cf_fix_cppflags = yes ; then
2372                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2373                                 continue
2374                         elif test "${cf_tst_cflags}" = "\"'" ; then
2375                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2376                                 continue
2377                         fi
2378                         ;;
2379                 esac
2380                 case "$CPPFLAGS" in
2381                 *$cf_add_cflags) #(vi
2382                         ;;
2383                 *) #(vi
2384                         case $cf_add_cflags in #(vi
2385                         -D*)
2386                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2387
2388 CPPFLAGS=`echo "$CPPFLAGS" | \
2389         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2390                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2391
2392                                 ;;
2393                         esac
2394                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2395                         ;;
2396                 esac
2397                 ;;
2398         *)
2399                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2400                 ;;
2401         esac
2402         ;;
2403 yes)
2404         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2405
2406         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2407
2408         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2409                 && test -z "${cf_tst_cflags}" \
2410                 && cf_fix_cppflags=no
2411         ;;
2412 esac
2413 done
2414
2415 if test -n "$cf_new_cflags" ; then
2416
2417         CFLAGS="$CFLAGS $cf_new_cflags"
2418 fi
2419
2420 if test -n "$cf_new_cppflags" ; then
2421
2422         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2423 fi
2424
2425 if test -n "$cf_new_extra_cppflags" ; then
2426
2427         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2428 fi
2429
2430 else
2431         cat >>confdefs.h <<\EOF
2432 #define CC_HAS_PROTOS 1
2433 EOF
2434
2435 fi
2436 fi
2437
2438 if test "$cf_cv_ansi_cc" = "no"; then
2439         { { echo "$as_me:2439: error: Your compiler does not appear to recognize prototypes.
2440 You have the following choices:
2441         a. adjust your compiler options
2442         b. get an up-to-date compiler
2443         c. use a wrapper such as unproto" >&5
2444 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2445 You have the following choices:
2446         a. adjust your compiler options
2447         b. get an up-to-date compiler
2448         c. use a wrapper such as unproto" >&2;}
2449    { (exit 1); exit 1; }; }
2450 fi
2451
2452 case $cf_cv_system_name in
2453 os2*)
2454     CFLAGS="$CFLAGS -Zmt"
2455     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2456     CXXFLAGS="$CXXFLAGS -Zmt"
2457     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2458     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2459     ac_cv_exeext=.exe
2460     ;;
2461 esac
2462
2463 PROG_EXT="$EXEEXT"
2464
2465 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2466 #define PROG_EXT "$PROG_EXT"
2467 EOF
2468
2469 test "$program_prefix" != NONE &&
2470   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2471 # Use a double $ so make ignores it.
2472 test "$program_suffix" != NONE &&
2473   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2474 # Double any \ or $.  echo might interpret backslashes.
2475 # By default was `s,x,x', remove it if useless.
2476 cat <<\_ACEOF >conftest.sed
2477 s/[\\$]/&&/g;s/;s,x,x,$//
2478 _ACEOF
2479 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2480 rm conftest.sed
2481
2482 for ac_prog in mawk gawk nawk awk
2483 do
2484   # Extract the first word of "$ac_prog", so it can be a program name with args.
2485 set dummy $ac_prog; ac_word=$2
2486 echo "$as_me:2486: checking for $ac_word" >&5
2487 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2488 if test "${ac_cv_prog_AWK+set}" = set; then
2489   echo $ECHO_N "(cached) $ECHO_C" >&6
2490 else
2491   if test -n "$AWK"; then
2492   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2493 else
2494   ac_save_IFS=$IFS; IFS=$ac_path_separator
2495 ac_dummy="$PATH"
2496 for ac_dir in $ac_dummy; do
2497   IFS=$ac_save_IFS
2498   test -z "$ac_dir" && ac_dir=.
2499   $as_executable_p "$ac_dir/$ac_word" || continue
2500 ac_cv_prog_AWK="$ac_prog"
2501 echo "$as_me:2501: found $ac_dir/$ac_word" >&5
2502 break
2503 done
2504
2505 fi
2506 fi
2507 AWK=$ac_cv_prog_AWK
2508 if test -n "$AWK"; then
2509   echo "$as_me:2509: result: $AWK" >&5
2510 echo "${ECHO_T}$AWK" >&6
2511 else
2512   echo "$as_me:2512: result: no" >&5
2513 echo "${ECHO_T}no" >&6
2514 fi
2515
2516   test -n "$AWK" && break
2517 done
2518
2519 test -z "$AWK" && { { echo "$as_me:2519: error: No awk program found" >&5
2520 echo "$as_me: error: No awk program found" >&2;}
2521    { (exit 1); exit 1; }; }
2522
2523 echo "$as_me:2523: checking for egrep" >&5
2524 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2525 if test "${ac_cv_prog_egrep+set}" = set; then
2526   echo $ECHO_N "(cached) $ECHO_C" >&6
2527 else
2528   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2529     then ac_cv_prog_egrep='grep -E'
2530     else ac_cv_prog_egrep='egrep'
2531     fi
2532 fi
2533 echo "$as_me:2533: result: $ac_cv_prog_egrep" >&5
2534 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2535  EGREP=$ac_cv_prog_egrep
2536
2537 test -z "$EGREP" && { { echo "$as_me:2537: error: No egrep program found" >&5
2538 echo "$as_me: error: No egrep program found" >&2;}
2539    { (exit 1); exit 1; }; }
2540
2541 # Find a good install program.  We prefer a C program (faster),
2542 # so one script is as good as another.  But avoid the broken or
2543 # incompatible versions:
2544 # SysV /etc/install, /usr/sbin/install
2545 # SunOS /usr/etc/install
2546 # IRIX /sbin/install
2547 # AIX /bin/install
2548 # AmigaOS /C/install, which installs bootblocks on floppy discs
2549 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2550 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2551 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2552 # ./install, which can be erroneously created by make from ./install.sh.
2553 echo "$as_me:2553: checking for a BSD compatible install" >&5
2554 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2555 if test -z "$INSTALL"; then
2556 if test "${ac_cv_path_install+set}" = set; then
2557   echo $ECHO_N "(cached) $ECHO_C" >&6
2558 else
2559     ac_save_IFS=$IFS; IFS=$ac_path_separator
2560   for ac_dir in $PATH; do
2561     IFS=$ac_save_IFS
2562     # Account for people who put trailing slashes in PATH elements.
2563     case $ac_dir/ in
2564     / | ./ | .// | /cC/* \
2565     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2566     | /usr/ucb/* ) ;;
2567     *)
2568       # OSF1 and SCO ODT 3.0 have their own names for install.
2569       # Don't use installbsd from OSF since it installs stuff as root
2570       # by default.
2571       for ac_prog in ginstall scoinst install; do
2572         if $as_executable_p "$ac_dir/$ac_prog"; then
2573           if test $ac_prog = install &&
2574             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2575             # AIX install.  It has an incompatible calling convention.
2576             :
2577           elif test $ac_prog = install &&
2578             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2579             # program-specific install script used by HP pwplus--don't use.
2580             :
2581           else
2582             ac_cv_path_install="$ac_dir/$ac_prog -c"
2583             break 2
2584           fi
2585         fi
2586       done
2587       ;;
2588     esac
2589   done
2590
2591 fi
2592   if test "${ac_cv_path_install+set}" = set; then
2593     INSTALL=$ac_cv_path_install
2594   else
2595     # As a last resort, use the slow shell script.  We don't cache a
2596     # path for INSTALL within a source directory, because that will
2597     # break other packages using the cache if that directory is
2598     # removed, or if the path is relative.
2599     INSTALL=$ac_install_sh
2600   fi
2601 fi
2602 echo "$as_me:2602: result: $INSTALL" >&5
2603 echo "${ECHO_T}$INSTALL" >&6
2604
2605 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2606 # It thinks the first close brace ends the variable substitution.
2607 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2608
2609 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2610
2611 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2612
2613 echo "$as_me:2613: checking whether ln -s works" >&5
2614 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2615 LN_S=$as_ln_s
2616 if test "$LN_S" = "ln -s"; then
2617   echo "$as_me:2617: result: yes" >&5
2618 echo "${ECHO_T}yes" >&6
2619 else
2620   echo "$as_me:2620: result: no, using $LN_S" >&5
2621 echo "${ECHO_T}no, using $LN_S" >&6
2622 fi
2623
2624 echo "$as_me:2624: checking if $LN_S -f options work" >&5
2625 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2626
2627 rm -f conf$$.src conf$$dst
2628 echo >conf$$.dst
2629 echo first >conf$$.src
2630 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2631         cf_prog_ln_sf=yes
2632 else
2633         cf_prog_ln_sf=no
2634 fi
2635 rm -f conf$$.dst conf$$src
2636 echo "$as_me:2636: result: $cf_prog_ln_sf" >&5
2637 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2638
2639 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2640
2641 echo "$as_me:2641: checking for long file names" >&5
2642 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2643 if test "${ac_cv_sys_long_file_names+set}" = set; then
2644   echo $ECHO_N "(cached) $ECHO_C" >&6
2645 else
2646   ac_cv_sys_long_file_names=yes
2647 # Test for long file names in all the places we know might matter:
2648 #      .                the current directory, where building will happen
2649 #      $prefix/lib      where we will be installing things
2650 #      $exec_prefix/lib likewise
2651 # eval it to expand exec_prefix.
2652 #      $TMPDIR          if set, where it might want to write temporary files
2653 # if $TMPDIR is not set:
2654 #      /tmp             where it might want to write temporary files
2655 #      /var/tmp         likewise
2656 #      /usr/tmp         likewise
2657 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2658   ac_tmpdirs=$TMPDIR
2659 else
2660   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2661 fi
2662 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2663   test -d $ac_dir || continue
2664   test -w $ac_dir || continue # It is less confusing to not echo anything here.
2665   ac_xdir=$ac_dir/cf$$
2666   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2667   ac_tf1=$ac_xdir/conftest9012345
2668   ac_tf2=$ac_xdir/conftest9012346
2669   (echo 1 >$ac_tf1) 2>/dev/null
2670   (echo 2 >$ac_tf2) 2>/dev/null
2671   ac_val=`cat $ac_tf1 2>/dev/null`
2672   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2673     ac_cv_sys_long_file_names=no
2674     rm -rf $ac_xdir 2>/dev/null
2675     break
2676   fi
2677   rm -rf $ac_xdir 2>/dev/null
2678 done
2679 fi
2680 echo "$as_me:2680: result: $ac_cv_sys_long_file_names" >&5
2681 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2682 if test $ac_cv_sys_long_file_names = yes; then
2683
2684 cat >>confdefs.h <<\EOF
2685 #define HAVE_LONG_FILE_NAMES 1
2686 EOF
2687
2688 fi
2689
2690 # if we find pkg-config, check if we should install the ".pc" files.
2691
2692 echo "$as_me:2692: checking if you want to use pkg-config" >&5
2693 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2694
2695 # Check whether --with-pkg-config or --without-pkg-config was given.
2696 if test "${with_pkg_config+set}" = set; then
2697   withval="$with_pkg_config"
2698   cf_pkg_config=$withval
2699 else
2700   cf_pkg_config=yes
2701 fi;
2702 echo "$as_me:2702: result: $cf_pkg_config" >&5
2703 echo "${ECHO_T}$cf_pkg_config" >&6
2704
2705 case $cf_pkg_config in #(vi
2706 no) #(vi
2707         PKG_CONFIG=none
2708         ;;
2709 yes) #(vi
2710         # Extract the first word of "pkg-config", so it can be a program name with args.
2711 set dummy pkg-config; ac_word=$2
2712 echo "$as_me:2712: checking for $ac_word" >&5
2713 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2714 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2715   echo $ECHO_N "(cached) $ECHO_C" >&6
2716 else
2717   case $PKG_CONFIG in
2718   [\\/]* | ?:[\\/]*)
2719   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2720   ;;
2721   *)
2722   ac_save_IFS=$IFS; IFS=$ac_path_separator
2723 ac_dummy="$PATH"
2724 for ac_dir in $ac_dummy; do
2725   IFS=$ac_save_IFS
2726   test -z "$ac_dir" && ac_dir=.
2727   if $as_executable_p "$ac_dir/$ac_word"; then
2728    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2729    echo "$as_me:2729: found $ac_dir/$ac_word" >&5
2730    break
2731 fi
2732 done
2733
2734   test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="none"
2735   ;;
2736 esac
2737 fi
2738 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2739
2740 if test -n "$PKG_CONFIG"; then
2741   echo "$as_me:2741: result: $PKG_CONFIG" >&5
2742 echo "${ECHO_T}$PKG_CONFIG" >&6
2743 else
2744   echo "$as_me:2744: result: no" >&5
2745 echo "${ECHO_T}no" >&6
2746 fi
2747
2748         ;;
2749 *)
2750         PKG_CONFIG=$withval
2751         ;;
2752 esac
2753
2754 test -z "$PKG_CONFIG" && PKG_CONFIG=none
2755 if test "$PKG_CONFIG" != none ; then
2756
2757 if test "x$prefix" != xNONE; then
2758   cf_path_syntax="$prefix"
2759 else
2760   cf_path_syntax="$ac_default_prefix"
2761 fi
2762
2763 case ".$PKG_CONFIG" in #(vi
2764 .\$\(*\)*|.\'*\'*) #(vi
2765   ;;
2766 ..|./*|.\\*) #(vi
2767   ;;
2768 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2769   ;;
2770 .\${*prefix}*) #(vi
2771   eval PKG_CONFIG="$PKG_CONFIG"
2772   case ".$PKG_CONFIG" in #(vi
2773   .NONE/*)
2774     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2775     ;;
2776   esac
2777   ;; #(vi
2778 .no|.NONE/*)
2779   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2780   ;;
2781 *)
2782   { { echo "$as_me:2782: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
2783 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
2784    { (exit 1); exit 1; }; }
2785   ;;
2786 esac
2787
2788 fi
2789
2790 if test "$PKG_CONFIG" != no ; then
2791         echo "$as_me:2791: checking if we should install .pc files for $PKG_CONFIG" >&5
2792 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
2793
2794         # Leave this as something that can be overridden in the environment.
2795         if test -z "$PKG_CONFIG_LIBDIR" ; then
2796                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
2797         fi
2798         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
2799         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
2800
2801 # Check whether --enable-pc-files or --disable-pc-files was given.
2802 if test "${enable_pc_files+set}" = set; then
2803   enableval="$enable_pc_files"
2804   enable_pc_files=$enableval
2805 else
2806   enable_pc_files=no
2807 fi;
2808                 echo "$as_me:2808: result: $enable_pc_files" >&5
2809 echo "${ECHO_T}$enable_pc_files" >&6
2810         else
2811                 echo "$as_me:2811: result: no" >&5
2812 echo "${ECHO_T}no" >&6
2813                 { echo "$as_me:2813: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
2814 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
2815                 enable_pc_files=no
2816         fi
2817 fi
2818
2819 echo "$as_me:2819: checking if you want to build test-programs" >&5
2820 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2821
2822 # Check whether --with-tests or --without-tests was given.
2823 if test "${with_tests+set}" = set; then
2824   withval="$with_tests"
2825   cf_with_tests=$withval
2826 else
2827   cf_with_tests=yes
2828 fi;
2829 echo "$as_me:2829: result: $cf_with_tests" >&5
2830 echo "${ECHO_T}$cf_with_tests" >&6
2831
2832 echo "$as_me:2832: checking if we should assume mixed-case filenames" >&5
2833 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
2834
2835 # Check whether --enable-mixed-case or --disable-mixed-case was given.
2836 if test "${enable_mixed_case+set}" = set; then
2837   enableval="$enable_mixed_case"
2838   enable_mixedcase=$enableval
2839 else
2840   enable_mixedcase=auto
2841 fi;
2842 echo "$as_me:2842: result: $enable_mixedcase" >&5
2843 echo "${ECHO_T}$enable_mixedcase" >&6
2844 if test "$enable_mixedcase" = "auto" ; then
2845
2846 echo "$as_me:2846: checking if filesystem supports mixed-case filenames" >&5
2847 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2848 if test "${cf_cv_mixedcase+set}" = set; then
2849   echo $ECHO_N "(cached) $ECHO_C" >&6
2850 else
2851
2852 if test "$cross_compiling" = yes ; then
2853         case $target_alias in #(vi
2854         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
2855                 cf_cv_mixedcase=no
2856                 ;;
2857         *)
2858                 cf_cv_mixedcase=yes
2859                 ;;
2860         esac
2861 else
2862         rm -f conftest CONFTEST
2863         echo test >conftest
2864         if test -f CONFTEST ; then
2865                 cf_cv_mixedcase=no
2866         else
2867                 cf_cv_mixedcase=yes
2868         fi
2869         rm -f conftest CONFTEST
2870 fi
2871
2872 fi
2873 echo "$as_me:2873: result: $cf_cv_mixedcase" >&5
2874 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2875 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
2876 #define MIXEDCASE_FILENAMES 1
2877 EOF
2878
2879 else
2880     cf_cv_mixedcase=$enable_mixedcase
2881     if test "$enable_mixedcase" = "yes" ; then
2882         cat >>confdefs.h <<\EOF
2883 #define MIXEDCASE_FILENAMES 1
2884 EOF
2885
2886     fi
2887 fi
2888
2889 # do this after mixed-case option (tags/TAGS is not as important as tic).
2890 echo "$as_me:2890: checking whether ${MAKE-make} sets \${MAKE}" >&5
2891 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2892 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2893 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2894   echo $ECHO_N "(cached) $ECHO_C" >&6
2895 else
2896   cat >conftest.make <<\EOF
2897 all:
2898         @echo 'ac_maketemp="${MAKE}"'
2899 EOF
2900 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2901 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2902 if test -n "$ac_maketemp"; then
2903   eval ac_cv_prog_make_${ac_make}_set=yes
2904 else
2905   eval ac_cv_prog_make_${ac_make}_set=no
2906 fi
2907 rm -f conftest.make
2908 fi
2909 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2910   echo "$as_me:2910: result: yes" >&5
2911 echo "${ECHO_T}yes" >&6
2912   SET_MAKE=
2913 else
2914   echo "$as_me:2914: result: no" >&5
2915 echo "${ECHO_T}no" >&6
2916   SET_MAKE="MAKE=${MAKE-make}"
2917 fi
2918
2919 for ac_prog in exctags ctags
2920 do
2921   # Extract the first word of "$ac_prog", so it can be a program name with args.
2922 set dummy $ac_prog; ac_word=$2
2923 echo "$as_me:2923: checking for $ac_word" >&5
2924 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2925 if test "${ac_cv_prog_CTAGS+set}" = set; then
2926   echo $ECHO_N "(cached) $ECHO_C" >&6
2927 else
2928   if test -n "$CTAGS"; then
2929   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2930 else
2931   ac_save_IFS=$IFS; IFS=$ac_path_separator
2932 ac_dummy="$PATH"
2933 for ac_dir in $ac_dummy; do
2934   IFS=$ac_save_IFS
2935   test -z "$ac_dir" && ac_dir=.
2936   $as_executable_p "$ac_dir/$ac_word" || continue
2937 ac_cv_prog_CTAGS="$ac_prog"
2938 echo "$as_me:2938: found $ac_dir/$ac_word" >&5
2939 break
2940 done
2941
2942 fi
2943 fi
2944 CTAGS=$ac_cv_prog_CTAGS
2945 if test -n "$CTAGS"; then
2946   echo "$as_me:2946: result: $CTAGS" >&5
2947 echo "${ECHO_T}$CTAGS" >&6
2948 else
2949   echo "$as_me:2949: result: no" >&5
2950 echo "${ECHO_T}no" >&6
2951 fi
2952
2953   test -n "$CTAGS" && break
2954 done
2955
2956 for ac_prog in exetags etags
2957 do
2958   # Extract the first word of "$ac_prog", so it can be a program name with args.
2959 set dummy $ac_prog; ac_word=$2
2960 echo "$as_me:2960: checking for $ac_word" >&5
2961 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2962 if test "${ac_cv_prog_ETAGS+set}" = set; then
2963   echo $ECHO_N "(cached) $ECHO_C" >&6
2964 else
2965   if test -n "$ETAGS"; then
2966   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2967 else
2968   ac_save_IFS=$IFS; IFS=$ac_path_separator
2969 ac_dummy="$PATH"
2970 for ac_dir in $ac_dummy; do
2971   IFS=$ac_save_IFS
2972   test -z "$ac_dir" && ac_dir=.
2973   $as_executable_p "$ac_dir/$ac_word" || continue
2974 ac_cv_prog_ETAGS="$ac_prog"
2975 echo "$as_me:2975: found $ac_dir/$ac_word" >&5
2976 break
2977 done
2978
2979 fi
2980 fi
2981 ETAGS=$ac_cv_prog_ETAGS
2982 if test -n "$ETAGS"; then
2983   echo "$as_me:2983: result: $ETAGS" >&5
2984 echo "${ECHO_T}$ETAGS" >&6
2985 else
2986   echo "$as_me:2986: result: no" >&5
2987 echo "${ECHO_T}no" >&6
2988 fi
2989
2990   test -n "$ETAGS" && break
2991 done
2992
2993 # Extract the first word of "${CTAGS-ctags}", so it can be a program name with args.
2994 set dummy ${CTAGS-ctags}; ac_word=$2
2995 echo "$as_me:2995: checking for $ac_word" >&5
2996 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2997 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2998   echo $ECHO_N "(cached) $ECHO_C" >&6
2999 else
3000   if test -n "$MAKE_LOWER_TAGS"; then
3001   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3002 else
3003   ac_save_IFS=$IFS; IFS=$ac_path_separator
3004 ac_dummy="$PATH"
3005 for ac_dir in $ac_dummy; do
3006   IFS=$ac_save_IFS
3007   test -z "$ac_dir" && ac_dir=.
3008   $as_executable_p "$ac_dir/$ac_word" || continue
3009 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3010 echo "$as_me:3010: found $ac_dir/$ac_word" >&5
3011 break
3012 done
3013
3014   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3015 fi
3016 fi
3017 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3018 if test -n "$MAKE_LOWER_TAGS"; then
3019   echo "$as_me:3019: result: $MAKE_LOWER_TAGS" >&5
3020 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3021 else
3022   echo "$as_me:3022: result: no" >&5
3023 echo "${ECHO_T}no" >&6
3024 fi
3025
3026 if test "$cf_cv_mixedcase" = yes ; then
3027         # Extract the first word of "${ETAGS-etags}", so it can be a program name with args.
3028 set dummy ${ETAGS-etags}; ac_word=$2
3029 echo "$as_me:3029: checking for $ac_word" >&5
3030 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3031 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3032   echo $ECHO_N "(cached) $ECHO_C" >&6
3033 else
3034   if test -n "$MAKE_UPPER_TAGS"; then
3035   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3036 else
3037   ac_save_IFS=$IFS; IFS=$ac_path_separator
3038 ac_dummy="$PATH"
3039 for ac_dir in $ac_dummy; do
3040   IFS=$ac_save_IFS
3041   test -z "$ac_dir" && ac_dir=.
3042   $as_executable_p "$ac_dir/$ac_word" || continue
3043 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3044 echo "$as_me:3044: found $ac_dir/$ac_word" >&5
3045 break
3046 done
3047
3048   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3049 fi
3050 fi
3051 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3052 if test -n "$MAKE_UPPER_TAGS"; then
3053   echo "$as_me:3053: result: $MAKE_UPPER_TAGS" >&5
3054 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3055 else
3056   echo "$as_me:3056: result: no" >&5
3057 echo "${ECHO_T}no" >&6
3058 fi
3059
3060 else
3061         MAKE_UPPER_TAGS=no
3062 fi
3063
3064 if test "$MAKE_UPPER_TAGS" = yes ; then
3065         MAKE_UPPER_TAGS=
3066 else
3067         MAKE_UPPER_TAGS="#"
3068 fi
3069
3070 if test "$MAKE_LOWER_TAGS" = yes ; then
3071         MAKE_LOWER_TAGS=
3072 else
3073         MAKE_LOWER_TAGS="#"
3074 fi
3075
3076 echo "$as_me:3076: checking for makeflags variable" >&5
3077 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3078 if test "${cf_cv_makeflags+set}" = set; then
3079   echo $ECHO_N "(cached) $ECHO_C" >&6
3080 else
3081
3082         cf_cv_makeflags=''
3083         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3084         do
3085                 cat >cf_makeflags.tmp <<CF_EOF
3086 SHELL = /bin/sh
3087 all :
3088         @ echo '.$cf_option'
3089 CF_EOF
3090                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3091                 case "$cf_result" in
3092                 .*k)
3093                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3094                         case "$cf_result" in
3095                         .*CC=*) cf_cv_makeflags=
3096                                 ;;
3097                         *)      cf_cv_makeflags=$cf_option
3098                                 ;;
3099                         esac
3100                         break
3101                         ;;
3102                 .-)     ;;
3103                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3104                         ;;
3105                 esac
3106         done
3107         rm -f cf_makeflags.tmp
3108
3109 fi
3110 echo "$as_me:3110: result: $cf_cv_makeflags" >&5
3111 echo "${ECHO_T}$cf_cv_makeflags" >&6
3112
3113 if test -n "$ac_tool_prefix"; then
3114   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3115 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3116 echo "$as_me:3116: checking for $ac_word" >&5
3117 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3118 if test "${ac_cv_prog_RANLIB+set}" = set; then
3119   echo $ECHO_N "(cached) $ECHO_C" >&6
3120 else
3121   if test -n "$RANLIB"; then
3122   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3123 else
3124   ac_save_IFS=$IFS; IFS=$ac_path_separator
3125 ac_dummy="$PATH"
3126 for ac_dir in $ac_dummy; do
3127   IFS=$ac_save_IFS
3128   test -z "$ac_dir" && ac_dir=.
3129   $as_executable_p "$ac_dir/$ac_word" || continue
3130 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3131 echo "$as_me:3131: found $ac_dir/$ac_word" >&5
3132 break
3133 done
3134
3135 fi
3136 fi
3137 RANLIB=$ac_cv_prog_RANLIB
3138 if test -n "$RANLIB"; then
3139   echo "$as_me:3139: result: $RANLIB" >&5
3140 echo "${ECHO_T}$RANLIB" >&6
3141 else
3142   echo "$as_me:3142: result: no" >&5
3143 echo "${ECHO_T}no" >&6
3144 fi
3145
3146 fi
3147 if test -z "$ac_cv_prog_RANLIB"; then
3148   ac_ct_RANLIB=$RANLIB
3149   # Extract the first word of "ranlib", so it can be a program name with args.
3150 set dummy ranlib; 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_ac_ct_RANLIB+set}" = set; then
3154   echo $ECHO_N "(cached) $ECHO_C" >&6
3155 else
3156   if test -n "$ac_ct_RANLIB"; then
3157   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3158 else
3159   ac_save_IFS=$IFS; IFS=$ac_path_separator
3160 ac_dummy="$PATH"
3161 for ac_dir in $ac_dummy; do
3162   IFS=$ac_save_IFS
3163   test -z "$ac_dir" && ac_dir=.
3164   $as_executable_p "$ac_dir/$ac_word" || continue
3165 ac_cv_prog_ac_ct_RANLIB="ranlib"
3166 echo "$as_me:3166: found $ac_dir/$ac_word" >&5
3167 break
3168 done
3169
3170   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3171 fi
3172 fi
3173 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3174 if test -n "$ac_ct_RANLIB"; then
3175   echo "$as_me:3175: result: $ac_ct_RANLIB" >&5
3176 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3177 else
3178   echo "$as_me:3178: result: no" >&5
3179 echo "${ECHO_T}no" >&6
3180 fi
3181
3182   RANLIB=$ac_ct_RANLIB
3183 else
3184   RANLIB="$ac_cv_prog_RANLIB"
3185 fi
3186
3187 if test -n "$ac_tool_prefix"; then
3188   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3189 set dummy ${ac_tool_prefix}ld; ac_word=$2
3190 echo "$as_me:3190: checking for $ac_word" >&5
3191 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3192 if test "${ac_cv_prog_LD+set}" = set; then
3193   echo $ECHO_N "(cached) $ECHO_C" >&6
3194 else
3195   if test -n "$LD"; then
3196   ac_cv_prog_LD="$LD" # Let the user override the test.
3197 else
3198   ac_save_IFS=$IFS; IFS=$ac_path_separator
3199 ac_dummy="$PATH"
3200 for ac_dir in $ac_dummy; do
3201   IFS=$ac_save_IFS
3202   test -z "$ac_dir" && ac_dir=.
3203   $as_executable_p "$ac_dir/$ac_word" || continue
3204 ac_cv_prog_LD="${ac_tool_prefix}ld"
3205 echo "$as_me:3205: found $ac_dir/$ac_word" >&5
3206 break
3207 done
3208
3209 fi
3210 fi
3211 LD=$ac_cv_prog_LD
3212 if test -n "$LD"; then
3213   echo "$as_me:3213: result: $LD" >&5
3214 echo "${ECHO_T}$LD" >&6
3215 else
3216   echo "$as_me:3216: result: no" >&5
3217 echo "${ECHO_T}no" >&6
3218 fi
3219
3220 fi
3221 if test -z "$ac_cv_prog_LD"; then
3222   ac_ct_LD=$LD
3223   # Extract the first word of "ld", so it can be a program name with args.
3224 set dummy ld; ac_word=$2
3225 echo "$as_me:3225: checking for $ac_word" >&5
3226 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3227 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3228   echo $ECHO_N "(cached) $ECHO_C" >&6
3229 else
3230   if test -n "$ac_ct_LD"; then
3231   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3232 else
3233   ac_save_IFS=$IFS; IFS=$ac_path_separator
3234 ac_dummy="$PATH"
3235 for ac_dir in $ac_dummy; do
3236   IFS=$ac_save_IFS
3237   test -z "$ac_dir" && ac_dir=.
3238   $as_executable_p "$ac_dir/$ac_word" || continue
3239 ac_cv_prog_ac_ct_LD="ld"
3240 echo "$as_me:3240: found $ac_dir/$ac_word" >&5
3241 break
3242 done
3243
3244   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3245 fi
3246 fi
3247 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3248 if test -n "$ac_ct_LD"; then
3249   echo "$as_me:3249: result: $ac_ct_LD" >&5
3250 echo "${ECHO_T}$ac_ct_LD" >&6
3251 else
3252   echo "$as_me:3252: result: no" >&5
3253 echo "${ECHO_T}no" >&6
3254 fi
3255
3256   LD=$ac_ct_LD
3257 else
3258   LD="$ac_cv_prog_LD"
3259 fi
3260
3261 if test -n "$ac_tool_prefix"; then
3262   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3263 set dummy ${ac_tool_prefix}ar; ac_word=$2
3264 echo "$as_me:3264: checking for $ac_word" >&5
3265 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3266 if test "${ac_cv_prog_AR+set}" = set; then
3267   echo $ECHO_N "(cached) $ECHO_C" >&6
3268 else
3269   if test -n "$AR"; then
3270   ac_cv_prog_AR="$AR" # Let the user override the test.
3271 else
3272   ac_save_IFS=$IFS; IFS=$ac_path_separator
3273 ac_dummy="$PATH"
3274 for ac_dir in $ac_dummy; do
3275   IFS=$ac_save_IFS
3276   test -z "$ac_dir" && ac_dir=.
3277   $as_executable_p "$ac_dir/$ac_word" || continue
3278 ac_cv_prog_AR="${ac_tool_prefix}ar"
3279 echo "$as_me:3279: found $ac_dir/$ac_word" >&5
3280 break
3281 done
3282
3283 fi
3284 fi
3285 AR=$ac_cv_prog_AR
3286 if test -n "$AR"; then
3287   echo "$as_me:3287: result: $AR" >&5
3288 echo "${ECHO_T}$AR" >&6
3289 else
3290   echo "$as_me:3290: result: no" >&5
3291 echo "${ECHO_T}no" >&6
3292 fi
3293
3294 fi
3295 if test -z "$ac_cv_prog_AR"; then
3296   ac_ct_AR=$AR
3297   # Extract the first word of "ar", so it can be a program name with args.
3298 set dummy ar; ac_word=$2
3299 echo "$as_me:3299: checking for $ac_word" >&5
3300 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3301 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3302   echo $ECHO_N "(cached) $ECHO_C" >&6
3303 else
3304   if test -n "$ac_ct_AR"; then
3305   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3306 else
3307   ac_save_IFS=$IFS; IFS=$ac_path_separator
3308 ac_dummy="$PATH"
3309 for ac_dir in $ac_dummy; do
3310   IFS=$ac_save_IFS
3311   test -z "$ac_dir" && ac_dir=.
3312   $as_executable_p "$ac_dir/$ac_word" || continue
3313 ac_cv_prog_ac_ct_AR="ar"
3314 echo "$as_me:3314: found $ac_dir/$ac_word" >&5
3315 break
3316 done
3317
3318   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3319 fi
3320 fi
3321 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3322 if test -n "$ac_ct_AR"; then
3323   echo "$as_me:3323: result: $ac_ct_AR" >&5
3324 echo "${ECHO_T}$ac_ct_AR" >&6
3325 else
3326   echo "$as_me:3326: result: no" >&5
3327 echo "${ECHO_T}no" >&6
3328 fi
3329
3330   AR=$ac_ct_AR
3331 else
3332   AR="$ac_cv_prog_AR"
3333 fi
3334
3335 if test -n "$ac_tool_prefix"; then
3336   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3337 set dummy ${ac_tool_prefix}ar; ac_word=$2
3338 echo "$as_me:3338: checking for $ac_word" >&5
3339 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3340 if test "${ac_cv_prog_AR+set}" = set; then
3341   echo $ECHO_N "(cached) $ECHO_C" >&6
3342 else
3343   if test -n "$AR"; then
3344   ac_cv_prog_AR="$AR" # Let the user override the test.
3345 else
3346   ac_save_IFS=$IFS; IFS=$ac_path_separator
3347 ac_dummy="$PATH"
3348 for ac_dir in $ac_dummy; do
3349   IFS=$ac_save_IFS
3350   test -z "$ac_dir" && ac_dir=.
3351   $as_executable_p "$ac_dir/$ac_word" || continue
3352 ac_cv_prog_AR="${ac_tool_prefix}ar"
3353 echo "$as_me:3353: found $ac_dir/$ac_word" >&5
3354 break
3355 done
3356
3357 fi
3358 fi
3359 AR=$ac_cv_prog_AR
3360 if test -n "$AR"; then
3361   echo "$as_me:3361: result: $AR" >&5
3362 echo "${ECHO_T}$AR" >&6
3363 else
3364   echo "$as_me:3364: result: no" >&5
3365 echo "${ECHO_T}no" >&6
3366 fi
3367
3368 fi
3369 if test -z "$ac_cv_prog_AR"; then
3370   ac_ct_AR=$AR
3371   # Extract the first word of "ar", so it can be a program name with args.
3372 set dummy ar; ac_word=$2
3373 echo "$as_me:3373: checking for $ac_word" >&5
3374 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3375 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3376   echo $ECHO_N "(cached) $ECHO_C" >&6
3377 else
3378   if test -n "$ac_ct_AR"; then
3379   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3380 else
3381   ac_save_IFS=$IFS; IFS=$ac_path_separator
3382 ac_dummy="$PATH"
3383 for ac_dir in $ac_dummy; do
3384   IFS=$ac_save_IFS
3385   test -z "$ac_dir" && ac_dir=.
3386   $as_executable_p "$ac_dir/$ac_word" || continue
3387 ac_cv_prog_ac_ct_AR="ar"
3388 echo "$as_me:3388: found $ac_dir/$ac_word" >&5
3389 break
3390 done
3391
3392   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3393 fi
3394 fi
3395 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3396 if test -n "$ac_ct_AR"; then
3397   echo "$as_me:3397: result: $ac_ct_AR" >&5
3398 echo "${ECHO_T}$ac_ct_AR" >&6
3399 else
3400   echo "$as_me:3400: result: no" >&5
3401 echo "${ECHO_T}no" >&6
3402 fi
3403
3404   AR=$ac_ct_AR
3405 else
3406   AR="$ac_cv_prog_AR"
3407 fi
3408
3409 echo "$as_me:3409: checking for options to update archives" >&5
3410 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3411 if test "${cf_cv_ar_flags+set}" = set; then
3412   echo $ECHO_N "(cached) $ECHO_C" >&6
3413 else
3414
3415         cf_cv_ar_flags=unknown
3416         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
3417         do
3418
3419                 # check if $ARFLAGS already contains this choice
3420                 if test "x$ARFLAGS" != "x" ; then
3421                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3422                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3423                                 cf_cv_ar_flags=
3424                                 break
3425                         fi
3426                 fi
3427
3428                 rm -f conftest.$ac_cv_objext
3429                 rm -f conftest.a
3430
3431                 cat >conftest.$ac_ext <<EOF
3432 #line 3432 "configure"
3433 int     testdata[3] = { 123, 456, 789 };
3434 EOF
3435                 if { (eval echo "$as_me:3435: \"$ac_compile\"") >&5
3436   (eval $ac_compile) 2>&5
3437   ac_status=$?
3438   echo "$as_me:3438: \$? = $ac_status" >&5
3439   (exit $ac_status); } ; then
3440                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3441                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3442                         if test -f conftest.a ; then
3443                                 cf_cv_ar_flags=$cf_ar_flags
3444                                 break
3445                         fi
3446                 else
3447                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
3448
3449 echo "${as_me-configure}:3449: testing cannot compile test-program ..." 1>&5
3450
3451                         break
3452                 fi
3453         done
3454         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3455
3456 fi
3457 echo "$as_me:3457: result: $cf_cv_ar_flags" >&5
3458 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3459
3460 if test -n "$ARFLAGS" ; then
3461         if test -n "$cf_cv_ar_flags" ; then
3462                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3463         fi
3464 else
3465         ARFLAGS=$cf_cv_ar_flags
3466 fi
3467
3468 echo "$as_me:3468: checking if you have specified an install-prefix" >&5
3469 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3470
3471 # Check whether --with-install-prefix or --without-install-prefix was given.
3472 if test "${with_install_prefix+set}" = set; then
3473   withval="$with_install_prefix"
3474   case "$withval" in #(vi
3475         yes|no) #(vi
3476                 ;;
3477         *)      DESTDIR="$withval"
3478                 ;;
3479         esac
3480 fi;
3481 echo "$as_me:3481: result: $DESTDIR" >&5
3482 echo "${ECHO_T}$DESTDIR" >&6
3483
3484 ###############################################################################
3485
3486 # If we're cross-compiling, allow the user to override the tools and their
3487 # options.  The configure script is oriented toward identifying the host
3488 # compiler, etc., but we need a build compiler to generate parts of the source.
3489
3490 if test "$cross_compiling" = yes ; then
3491
3492         # defaults that we might want to override
3493         : ${BUILD_CFLAGS:=''}
3494         : ${BUILD_CPPFLAGS:=''}
3495         : ${BUILD_LDFLAGS:=''}
3496         : ${BUILD_LIBS:=''}
3497         : ${BUILD_EXEEXT:='$x'}
3498         : ${BUILD_OBJEXT:='o'}
3499
3500 # Check whether --with-build-cc or --without-build-cc was given.
3501 if test "${with_build_cc+set}" = set; then
3502   withval="$with_build_cc"
3503   BUILD_CC="$withval"
3504 else
3505   for ac_prog in gcc cc cl
3506 do
3507   # Extract the first word of "$ac_prog", so it can be a program name with args.
3508 set dummy $ac_prog; ac_word=$2
3509 echo "$as_me:3509: checking for $ac_word" >&5
3510 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3511 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3512   echo $ECHO_N "(cached) $ECHO_C" >&6
3513 else
3514   if test -n "$BUILD_CC"; then
3515   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3516 else
3517   ac_save_IFS=$IFS; IFS=$ac_path_separator
3518 ac_dummy="$PATH"
3519 for ac_dir in $ac_dummy; do
3520   IFS=$ac_save_IFS
3521   test -z "$ac_dir" && ac_dir=.
3522   $as_executable_p "$ac_dir/$ac_word" || continue
3523 ac_cv_prog_BUILD_CC="$ac_prog"
3524 echo "$as_me:3524: found $ac_dir/$ac_word" >&5
3525 break
3526 done
3527
3528 fi
3529 fi
3530 BUILD_CC=$ac_cv_prog_BUILD_CC
3531 if test -n "$BUILD_CC"; then
3532   echo "$as_me:3532: result: $BUILD_CC" >&5
3533 echo "${ECHO_T}$BUILD_CC" >&6
3534 else
3535   echo "$as_me:3535: result: no" >&5
3536 echo "${ECHO_T}no" >&6
3537 fi
3538
3539   test -n "$BUILD_CC" && break
3540 done
3541
3542 fi;
3543         echo "$as_me:3543: checking for native build C compiler" >&5
3544 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3545         echo "$as_me:3545: result: $BUILD_CC" >&5
3546 echo "${ECHO_T}$BUILD_CC" >&6
3547
3548         echo "$as_me:3548: checking for native build C preprocessor" >&5
3549 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3550
3551 # Check whether --with-build-cpp or --without-build-cpp was given.
3552 if test "${with_build_cpp+set}" = set; then
3553   withval="$with_build_cpp"
3554   BUILD_CPP="$withval"
3555 else
3556   BUILD_CPP='${BUILD_CC} -E'
3557 fi;
3558         echo "$as_me:3558: result: $BUILD_CPP" >&5
3559 echo "${ECHO_T}$BUILD_CPP" >&6
3560
3561         echo "$as_me:3561: checking for native build C flags" >&5
3562 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3563
3564 # Check whether --with-build-cflags or --without-build-cflags was given.
3565 if test "${with_build_cflags+set}" = set; then
3566   withval="$with_build_cflags"
3567   BUILD_CFLAGS="$withval"
3568 fi;
3569         echo "$as_me:3569: result: $BUILD_CFLAGS" >&5
3570 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3571
3572         echo "$as_me:3572: checking for native build C preprocessor-flags" >&5
3573 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3574
3575 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3576 if test "${with_build_cppflags+set}" = set; then
3577   withval="$with_build_cppflags"
3578   BUILD_CPPFLAGS="$withval"
3579 fi;
3580         echo "$as_me:3580: result: $BUILD_CPPFLAGS" >&5
3581 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3582
3583         echo "$as_me:3583: checking for native build linker-flags" >&5
3584 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3585
3586 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3587 if test "${with_build_ldflags+set}" = set; then
3588   withval="$with_build_ldflags"
3589   BUILD_LDFLAGS="$withval"
3590 fi;
3591         echo "$as_me:3591: result: $BUILD_LDFLAGS" >&5
3592 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3593
3594         echo "$as_me:3594: checking for native build linker-libraries" >&5
3595 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3596
3597 # Check whether --with-build-libs or --without-build-libs was given.
3598 if test "${with_build_libs+set}" = set; then
3599   withval="$with_build_libs"
3600   BUILD_LIBS="$withval"
3601 fi;
3602         echo "$as_me:3602: result: $BUILD_LIBS" >&5
3603 echo "${ECHO_T}$BUILD_LIBS" >&6
3604
3605         # this assumes we're on Unix.
3606         BUILD_EXEEXT=
3607         BUILD_OBJEXT=o
3608
3609         : ${BUILD_CC:='${CC}'}
3610
3611         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3612                 { { echo "$as_me:3612: error: Cross-build requires two compilers.
3613 Use --with-build-cc to specify the native compiler." >&5
3614 echo "$as_me: error: Cross-build requires two compilers.
3615 Use --with-build-cc to specify the native compiler." >&2;}
3616    { (exit 1); exit 1; }; }
3617         fi
3618
3619 else
3620         : ${BUILD_CC:='${CC}'}
3621         : ${BUILD_CPP:='${CPP}'}
3622         : ${BUILD_CFLAGS:='${CFLAGS}'}
3623         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3624         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3625         : ${BUILD_LIBS:='${LIBS}'}
3626         : ${BUILD_EXEEXT:='$x'}
3627         : ${BUILD_OBJEXT:='o'}
3628 fi
3629
3630 ###############################################################################
3631
3632 ### Options to allow the user to specify the set of libraries which are used.
3633 ### Use "--without-normal --with-shared" to allow the default model to be
3634 ### shared, for example.
3635 cf_list_models=""
3636 echo "$as_me:3636: checking for specified models" >&5
3637 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3638 test -z "$cf_list_models" && cf_list_models=normal
3639 echo "$as_me:3639: result: $cf_list_models" >&5
3640 echo "${ECHO_T}$cf_list_models" >&6
3641
3642 ### Use the first model as the default, and save its suffix for use in building
3643 ### up test-applications.
3644 echo "$as_me:3644: checking for default model" >&5
3645 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3646 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3647 echo "$as_me:3647: result: $DFT_LWR_MODEL" >&5
3648 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3649
3650 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3651
3652 # Check whether --with-curses-dir or --without-curses-dir was given.
3653 if test "${with_curses_dir+set}" = set; then
3654   withval="$with_curses_dir"
3655
3656 if test "x$prefix" != xNONE; then
3657   cf_path_syntax="$prefix"
3658 else
3659   cf_path_syntax="$ac_default_prefix"
3660 fi
3661
3662 case ".$withval" in #(vi
3663 .\$\(*\)*|.\'*\'*) #(vi
3664   ;;
3665 ..|./*|.\\*) #(vi
3666   ;;
3667 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3668   ;;
3669 .\${*prefix}*) #(vi
3670   eval withval="$withval"
3671   case ".$withval" in #(vi
3672   .NONE/*)
3673     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3674     ;;
3675   esac
3676   ;; #(vi
3677 .no|.NONE/*)
3678   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3679   ;;
3680 *)
3681   { { echo "$as_me:3681: error: expected a pathname, not \"$withval\"" >&5
3682 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3683    { (exit 1); exit 1; }; }
3684   ;;
3685 esac
3686
3687          cf_cv_curses_dir=$withval
3688 else
3689   cf_cv_curses_dir=no
3690 fi;
3691
3692 echo "$as_me:3692: checking if you want wide-character code" >&5
3693 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
3694
3695 # Check whether --enable-widec or --disable-widec was given.
3696 if test "${enable_widec+set}" = set; then
3697   enableval="$enable_widec"
3698   with_widec=$enableval
3699 else
3700   with_widec=no
3701 fi;
3702 echo "$as_me:3702: result: $with_widec" >&5
3703 echo "${ECHO_T}$with_widec" >&6
3704 if test "$with_widec" = yes ; then
3705
3706 echo "$as_me:3706: checking for multibyte character support" >&5
3707 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
3708 if test "${cf_cv_utf8_lib+set}" = set; then
3709   echo $ECHO_N "(cached) $ECHO_C" >&6
3710 else
3711
3712         cf_save_LIBS="$LIBS"
3713         cat >conftest.$ac_ext <<_ACEOF
3714 #line 3714 "configure"
3715 #include "confdefs.h"
3716
3717 #include <stdlib.h>
3718 int
3719 main ()
3720 {
3721 putwc(0,0);
3722   ;
3723   return 0;
3724 }
3725 _ACEOF
3726 rm -f conftest.$ac_objext conftest$ac_exeext
3727 if { (eval echo "$as_me:3727: \"$ac_link\"") >&5
3728   (eval $ac_link) 2>&5
3729   ac_status=$?
3730   echo "$as_me:3730: \$? = $ac_status" >&5
3731   (exit $ac_status); } &&
3732          { ac_try='test -s conftest$ac_exeext'
3733   { (eval echo "$as_me:3733: \"$ac_try\"") >&5
3734   (eval $ac_try) 2>&5
3735   ac_status=$?
3736   echo "$as_me:3736: \$? = $ac_status" >&5
3737   (exit $ac_status); }; }; then
3738   cf_cv_utf8_lib=yes
3739 else
3740   echo "$as_me: failed program was:" >&5
3741 cat conftest.$ac_ext >&5
3742
3743 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
3744 # will be set on completion of the AC_TRY_LINK below.
3745 cf_cv_header_path_utf8=
3746 cf_cv_library_path_utf8=
3747
3748 echo "${as_me-configure}:3748: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
3749
3750 cf_save_LIBS="$LIBS"
3751
3752 cat >conftest.$ac_ext <<_ACEOF
3753 #line 3753 "configure"
3754 #include "confdefs.h"
3755
3756 #include <libutf8.h>
3757 int
3758 main ()
3759 {
3760 putwc(0,0);
3761   ;
3762   return 0;
3763 }
3764 _ACEOF
3765 rm -f conftest.$ac_objext conftest$ac_exeext
3766 if { (eval echo "$as_me:3766: \"$ac_link\"") >&5
3767   (eval $ac_link) 2>&5
3768   ac_status=$?
3769   echo "$as_me:3769: \$? = $ac_status" >&5
3770   (exit $ac_status); } &&
3771          { ac_try='test -s conftest$ac_exeext'
3772   { (eval echo "$as_me:3772: \"$ac_try\"") >&5
3773   (eval $ac_try) 2>&5
3774   ac_status=$?
3775   echo "$as_me:3775: \$? = $ac_status" >&5
3776   (exit $ac_status); }; }; then
3777
3778         cf_cv_find_linkage_utf8=yes
3779         cf_cv_header_path_utf8=/usr/include
3780         cf_cv_library_path_utf8=/usr/lib
3781
3782 else
3783   echo "$as_me: failed program was:" >&5
3784 cat conftest.$ac_ext >&5
3785
3786 LIBS="-lutf8  $cf_save_LIBS"
3787
3788 cat >conftest.$ac_ext <<_ACEOF
3789 #line 3789 "configure"
3790 #include "confdefs.h"
3791
3792 #include <libutf8.h>
3793 int
3794 main ()
3795 {
3796 putwc(0,0);
3797   ;
3798   return 0;
3799 }
3800 _ACEOF
3801 rm -f conftest.$ac_objext conftest$ac_exeext
3802 if { (eval echo "$as_me:3802: \"$ac_link\"") >&5
3803   (eval $ac_link) 2>&5
3804   ac_status=$?
3805   echo "$as_me:3805: \$? = $ac_status" >&5
3806   (exit $ac_status); } &&
3807          { ac_try='test -s conftest$ac_exeext'
3808   { (eval echo "$as_me:3808: \"$ac_try\"") >&5
3809   (eval $ac_try) 2>&5
3810   ac_status=$?
3811   echo "$as_me:3811: \$? = $ac_status" >&5
3812   (exit $ac_status); }; }; then
3813
3814         cf_cv_find_linkage_utf8=yes
3815         cf_cv_header_path_utf8=/usr/include
3816         cf_cv_library_path_utf8=/usr/lib
3817         cf_cv_library_file_utf8="-lutf8"
3818
3819 else
3820   echo "$as_me: failed program was:" >&5
3821 cat conftest.$ac_ext >&5
3822
3823         cf_cv_find_linkage_utf8=no
3824         LIBS="$cf_save_LIBS"
3825
3826     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
3827
3828 echo "${as_me-configure}:3828: testing find linkage for utf8 library ..." 1>&5
3829
3830 echo "${as_me-configure}:3830: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
3831
3832     cf_save_CPPFLAGS="$CPPFLAGS"
3833     cf_test_CPPFLAGS="$CPPFLAGS"
3834
3835 cf_search=
3836
3837 # collect the current set of include-directories from compiler flags
3838 cf_header_path_list=""
3839 if test -n "${CFLAGS}${CPPFLAGS}" ; then
3840         for cf_header_path in $CPPFLAGS $CFLAGS
3841         do
3842                 case $cf_header_path in #(vi
3843                 -I*)
3844                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
3845
3846 test "$cf_header_path" != "NONE" && \
3847 test -d "$cf_header_path" && \
3848  {
3849         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
3850         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
3851         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
3852         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
3853         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
3854         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
3855 }
3856
3857                         cf_header_path_list="$cf_header_path_list $cf_search"
3858                         ;;
3859                 esac
3860         done
3861 fi
3862
3863 # add the variations for the package we are looking for
3864
3865 cf_search=
3866
3867 test "/usr" != "$prefix" && \
3868 test -d "/usr" && \
3869 (test $prefix = NONE || test "/usr" != "$prefix") && {
3870         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
3871         test -d /usr/include &&          cf_search="$cf_search /usr/include"
3872         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
3873         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
3874         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
3875         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
3876 }
3877
3878 test "$prefix" != "NONE" && \
3879 test -d "$prefix" && \
3880  {
3881         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
3882         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
3883         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
3884         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
3885         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
3886         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
3887 }
3888
3889 test "/usr/local" != "$prefix" && \
3890 test -d "/usr/local" && \
3891 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
3892         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
3893         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
3894         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
3895         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
3896         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
3897         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
3898 }
3899
3900 test "/opt" != "$prefix" && \
3901 test -d "/opt" && \
3902 (test $prefix = NONE || test "/opt" != "$prefix") && {
3903         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
3904         test -d /opt/include &&          cf_search="$cf_search /opt/include"
3905         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
3906         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
3907         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
3908         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
3909 }
3910
3911 test "$HOME" != "$prefix" && \
3912 test -d "$HOME" && \
3913 (test $prefix = NONE || test "$HOME" != "$prefix") && {
3914         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
3915         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
3916         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
3917         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
3918         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
3919         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
3920 }
3921
3922 test "$includedir" != NONE && \
3923 test "$includedir" != "/usr/include" && \
3924 test -d "$includedir" && {
3925         test -d $includedir &&    cf_search="$cf_search $includedir"
3926         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
3927 }
3928
3929 test "$oldincludedir" != NONE && \
3930 test "$oldincludedir" != "/usr/include" && \
3931 test -d "$oldincludedir" && {
3932         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
3933         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
3934 }
3935
3936 cf_search="$cf_search $cf_header_path_list"
3937
3938     for cf_cv_header_path_utf8 in $cf_search
3939     do
3940       if test -d $cf_cv_header_path_utf8 ; then
3941         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
3942
3943 echo "${as_me-configure}:3943: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
3944
3945         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
3946         cat >conftest.$ac_ext <<_ACEOF
3947 #line 3947 "configure"
3948 #include "confdefs.h"
3949
3950 #include <libutf8.h>
3951 int
3952 main ()
3953 {
3954 putwc(0,0);
3955   ;
3956   return 0;
3957 }
3958 _ACEOF
3959 rm -f conftest.$ac_objext
3960 if { (eval echo "$as_me:3960: \"$ac_compile\"") >&5
3961   (eval $ac_compile) 2>&5
3962   ac_status=$?
3963   echo "$as_me:3963: \$? = $ac_status" >&5
3964   (exit $ac_status); } &&
3965          { ac_try='test -s conftest.$ac_objext'
3966   { (eval echo "$as_me:3966: \"$ac_try\"") >&5
3967   (eval $ac_try) 2>&5
3968   ac_status=$?
3969   echo "$as_me:3969: \$? = $ac_status" >&5
3970   (exit $ac_status); }; }; then
3971
3972             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
3973
3974 echo "${as_me-configure}:3974: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
3975
3976             cf_cv_find_linkage_utf8=maybe
3977             cf_test_CPPFLAGS="$CPPFLAGS"
3978             break
3979 else
3980   echo "$as_me: failed program was:" >&5
3981 cat conftest.$ac_ext >&5
3982
3983             CPPFLAGS="$cf_save_CPPFLAGS"
3984
3985 fi
3986 rm -f conftest.$ac_objext conftest.$ac_ext
3987       fi
3988     done
3989
3990     if test "$cf_cv_find_linkage_utf8" = maybe ; then
3991
3992 echo "${as_me-configure}:3992: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
3993
3994       cf_save_LIBS="$LIBS"
3995       cf_save_LDFLAGS="$LDFLAGS"
3996
3997       if test "$cf_cv_find_linkage_utf8" != yes ; then
3998
3999 cf_search=
4000 cf_library_path_list=""
4001 if test -n "${LDFLAGS}${LIBS}" ; then
4002         for cf_library_path in $LDFLAGS $LIBS
4003         do
4004                 case $cf_library_path in #(vi
4005                 -L*)
4006                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
4007
4008 test "$cf_library_path" != "NONE" && \
4009 test -d "$cf_library_path" && \
4010  {
4011         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
4012         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
4013         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
4014         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
4015         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
4016         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
4017 }
4018
4019                         cf_library_path_list="$cf_library_path_list $cf_search"
4020                         ;;
4021                 esac
4022         done
4023 fi
4024
4025 cf_search=
4026
4027 test "/usr" != "$prefix" && \
4028 test -d "/usr" && \
4029 (test $prefix = NONE || test "/usr" != "$prefix") && {
4030         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
4031         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
4032         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
4033         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
4034         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
4035         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
4036 }
4037
4038 test "$prefix" != "NONE" && \
4039 test -d "$prefix" && \
4040  {
4041         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
4042         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
4043         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
4044         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
4045         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
4046         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
4047 }
4048
4049 test "/usr/local" != "$prefix" && \
4050 test -d "/usr/local" && \
4051 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4052         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
4053         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
4054         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
4055         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
4056         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
4057         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
4058 }
4059
4060 test "/opt" != "$prefix" && \
4061 test -d "/opt" && \
4062 (test $prefix = NONE || test "/opt" != "$prefix") && {
4063         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
4064         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
4065         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
4066         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
4067         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
4068         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
4069 }
4070
4071 test "$HOME" != "$prefix" && \
4072 test -d "$HOME" && \
4073 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4074         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
4075         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
4076         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
4077         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
4078         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
4079         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
4080 }
4081
4082 cf_search="$cf_library_path_list $cf_search"
4083
4084         for cf_cv_library_path_utf8 in $cf_search
4085         do
4086           if test -d $cf_cv_library_path_utf8 ; then
4087             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
4088
4089 echo "${as_me-configure}:4089: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
4090
4091             CPPFLAGS="$cf_test_CPPFLAGS"
4092             LIBS="-lutf8  $cf_save_LIBS"
4093             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
4094             cat >conftest.$ac_ext <<_ACEOF
4095 #line 4095 "configure"
4096 #include "confdefs.h"
4097
4098 #include <libutf8.h>
4099 int
4100 main ()
4101 {
4102 putwc(0,0);
4103   ;
4104   return 0;
4105 }
4106 _ACEOF
4107 rm -f conftest.$ac_objext conftest$ac_exeext
4108 if { (eval echo "$as_me:4108: \"$ac_link\"") >&5
4109   (eval $ac_link) 2>&5
4110   ac_status=$?
4111   echo "$as_me:4111: \$? = $ac_status" >&5
4112   (exit $ac_status); } &&
4113          { ac_try='test -s conftest$ac_exeext'
4114   { (eval echo "$as_me:4114: \"$ac_try\"") >&5
4115   (eval $ac_try) 2>&5
4116   ac_status=$?
4117   echo "$as_me:4117: \$? = $ac_status" >&5
4118   (exit $ac_status); }; }; then
4119
4120                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
4121
4122 echo "${as_me-configure}:4122: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
4123
4124                 cf_cv_find_linkage_utf8=yes
4125                 cf_cv_library_file_utf8="-lutf8"
4126                 break
4127 else
4128   echo "$as_me: failed program was:" >&5
4129 cat conftest.$ac_ext >&5
4130
4131                 CPPFLAGS="$cf_save_CPPFLAGS"
4132                 LIBS="$cf_save_LIBS"
4133                 LDFLAGS="$cf_save_LDFLAGS"
4134
4135 fi
4136 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4137           fi
4138         done
4139         CPPFLAGS="$cf_save_CPPFLAGS"
4140         LDFLAGS="$cf_save_LDFLAGS"
4141       fi
4142
4143     else
4144       cf_cv_find_linkage_utf8=no
4145     fi
4146
4147 fi
4148 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4149
4150 fi
4151 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4152
4153 LIBS="$cf_save_LIBS"
4154
4155 if test "$cf_cv_find_linkage_utf8" = yes ; then
4156 cf_cv_utf8_lib=add-on
4157 else
4158 cf_cv_utf8_lib=no
4159 fi
4160
4161 fi
4162 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4163 fi
4164 echo "$as_me:4164: result: $cf_cv_utf8_lib" >&5
4165 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
4166
4167 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
4168 # ncurses/ncursesw:
4169 if test "$cf_cv_utf8_lib" = "add-on" ; then
4170         cat >>confdefs.h <<\EOF
4171 #define HAVE_LIBUTF8_H 1
4172 EOF
4173
4174 if test -n "$cf_cv_header_path_utf8" ; then
4175   for cf_add_incdir in $cf_cv_header_path_utf8
4176   do
4177         while test $cf_add_incdir != /usr/include
4178         do
4179           if test -d $cf_add_incdir
4180           then
4181                 cf_have_incdir=no
4182                 if test -n "$CFLAGS$CPPFLAGS" ; then
4183                   # a loop is needed to ensure we can add subdirs of existing dirs
4184                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4185                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4186                           cf_have_incdir=yes; break
4187                         fi
4188                   done
4189                 fi
4190
4191                 if test "$cf_have_incdir" = no ; then
4192                   if test "$cf_add_incdir" = /usr/local/include ; then
4193                         if test "$GCC" = yes
4194                         then
4195                           cf_save_CPPFLAGS=$CPPFLAGS
4196                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4197                           cat >conftest.$ac_ext <<_ACEOF
4198 #line 4198 "configure"
4199 #include "confdefs.h"
4200 #include <stdio.h>
4201 int
4202 main ()
4203 {
4204 printf("Hello")
4205   ;
4206   return 0;
4207 }
4208 _ACEOF
4209 rm -f conftest.$ac_objext
4210 if { (eval echo "$as_me:4210: \"$ac_compile\"") >&5
4211   (eval $ac_compile) 2>&5
4212   ac_status=$?
4213   echo "$as_me:4213: \$? = $ac_status" >&5
4214   (exit $ac_status); } &&
4215          { ac_try='test -s conftest.$ac_objext'
4216   { (eval echo "$as_me:4216: \"$ac_try\"") >&5
4217   (eval $ac_try) 2>&5
4218   ac_status=$?
4219   echo "$as_me:4219: \$? = $ac_status" >&5
4220   (exit $ac_status); }; }; then
4221   :
4222 else
4223   echo "$as_me: failed program was:" >&5
4224 cat conftest.$ac_ext >&5
4225 cf_have_incdir=yes
4226 fi
4227 rm -f conftest.$ac_objext conftest.$ac_ext
4228                           CPPFLAGS=$cf_save_CPPFLAGS
4229                         fi
4230                   fi
4231                 fi
4232
4233                 if test "$cf_have_incdir" = no ; then
4234                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4235
4236 echo "${as_me-configure}:4236: testing adding $cf_add_incdir to include-path ..." 1>&5
4237
4238                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4239
4240                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4241                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4242                   cf_add_incdir="$cf_top_incdir"
4243                 else
4244                   break
4245                 fi
4246           fi
4247         done
4248   done
4249 fi
4250
4251 if test -n "$cf_cv_library_path_utf8" ; then
4252   for cf_add_libdir in $cf_cv_library_path_utf8
4253   do
4254     if test $cf_add_libdir = /usr/lib ; then
4255       :
4256     elif test -d $cf_add_libdir
4257     then
4258       cf_have_libdir=no
4259       if test -n "$LDFLAGS$LIBS" ; then
4260         # a loop is needed to ensure we can add subdirs of existing dirs
4261         for cf_test_libdir in $LDFLAGS $LIBS ; do
4262           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4263             cf_have_libdir=yes; break
4264           fi
4265         done
4266       fi
4267       if test "$cf_have_libdir" = no ; then
4268         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4269
4270 echo "${as_me-configure}:4270: testing adding $cf_add_libdir to library-path ..." 1>&5
4271
4272         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4273       fi
4274     fi
4275   done
4276 fi
4277
4278         LIBS="$cf_cv_library_file_utf8 $LIBS"
4279 fi
4280
4281 cf_ncuconfig_root=ncursesw
4282
4283 echo "Looking for ${cf_ncuconfig_root}-config"
4284 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4285 do
4286   # Extract the first word of "$ac_prog", so it can be a program name with args.
4287 set dummy $ac_prog; ac_word=$2
4288 echo "$as_me:4288: checking for $ac_word" >&5
4289 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4290 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
4291   echo $ECHO_N "(cached) $ECHO_C" >&6
4292 else
4293   case $NCURSES_CONFIG in
4294   [\\/]* | ?:[\\/]*)
4295   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
4296   ;;
4297   *)
4298   ac_save_IFS=$IFS; IFS=$ac_path_separator
4299 ac_dummy="$PATH"
4300 for ac_dir in $ac_dummy; do
4301   IFS=$ac_save_IFS
4302   test -z "$ac_dir" && ac_dir=.
4303   if $as_executable_p "$ac_dir/$ac_word"; then
4304    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
4305    echo "$as_me:4305: found $ac_dir/$ac_word" >&5
4306    break
4307 fi
4308 done
4309
4310   ;;
4311 esac
4312 fi
4313 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
4314
4315 if test -n "$NCURSES_CONFIG"; then
4316   echo "$as_me:4316: result: $NCURSES_CONFIG" >&5
4317 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4318 else
4319   echo "$as_me:4319: result: no" >&5
4320 echo "${ECHO_T}no" >&6
4321 fi
4322
4323   test -n "$NCURSES_CONFIG" && break
4324 done
4325 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
4326
4327 if test "$NCURSES_CONFIG" != none ; then
4328
4329 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
4330 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
4331
4332 # even with config script, some packages use no-override for curses.h
4333
4334 echo "$as_me:4334: checking if we have identified curses headers" >&5
4335 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4336 if test "${cf_cv_ncurses_header+set}" = set; then
4337   echo $ECHO_N "(cached) $ECHO_C" >&6
4338 else
4339
4340 cf_cv_ncurses_header=none
4341 for cf_header in  \
4342     ncursesw/curses.h \
4343         ncursesw/ncurses.h \
4344         curses.h \
4345         ncurses.h
4346 do
4347 cat >conftest.$ac_ext <<_ACEOF
4348 #line 4348 "configure"
4349 #include "confdefs.h"
4350 #include <${cf_header}>
4351 int
4352 main ()
4353 {
4354 initscr(); tgoto("?", 0,0)
4355   ;
4356   return 0;
4357 }
4358 _ACEOF
4359 rm -f conftest.$ac_objext
4360 if { (eval echo "$as_me:4360: \"$ac_compile\"") >&5
4361   (eval $ac_compile) 2>&5
4362   ac_status=$?
4363   echo "$as_me:4363: \$? = $ac_status" >&5
4364   (exit $ac_status); } &&
4365          { ac_try='test -s conftest.$ac_objext'
4366   { (eval echo "$as_me:4366: \"$ac_try\"") >&5
4367   (eval $ac_try) 2>&5
4368   ac_status=$?
4369   echo "$as_me:4369: \$? = $ac_status" >&5
4370   (exit $ac_status); }; }; then
4371   cf_cv_ncurses_header=$cf_header; break
4372 else
4373   echo "$as_me: failed program was:" >&5
4374 cat conftest.$ac_ext >&5
4375 fi
4376 rm -f conftest.$ac_objext conftest.$ac_ext
4377 done
4378
4379 fi
4380 echo "$as_me:4380: result: $cf_cv_ncurses_header" >&5
4381 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4382
4383 if test "$cf_cv_ncurses_header" = none ; then
4384         { { echo "$as_me:4384: error: No curses header-files found" >&5
4385 echo "$as_me: error: No curses header-files found" >&2;}
4386    { (exit 1); exit 1; }; }
4387 fi
4388
4389 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4390
4391 for ac_header in $cf_cv_ncurses_header
4392 do
4393 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4394 echo "$as_me:4394: checking for $ac_header" >&5
4395 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4396 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4397   echo $ECHO_N "(cached) $ECHO_C" >&6
4398 else
4399   cat >conftest.$ac_ext <<_ACEOF
4400 #line 4400 "configure"
4401 #include "confdefs.h"
4402 #include <$ac_header>
4403 _ACEOF
4404 if { (eval echo "$as_me:4404: \"$ac_cpp conftest.$ac_ext\"") >&5
4405   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4406   ac_status=$?
4407   egrep -v '^ *\+' conftest.er1 >conftest.err
4408   rm -f conftest.er1
4409   cat conftest.err >&5
4410   echo "$as_me:4410: \$? = $ac_status" >&5
4411   (exit $ac_status); } >/dev/null; then
4412   if test -s conftest.err; then
4413     ac_cpp_err=$ac_c_preproc_warn_flag
4414   else
4415     ac_cpp_err=
4416   fi
4417 else
4418   ac_cpp_err=yes
4419 fi
4420 if test -z "$ac_cpp_err"; then
4421   eval "$as_ac_Header=yes"
4422 else
4423   echo "$as_me: failed program was:" >&5
4424   cat conftest.$ac_ext >&5
4425   eval "$as_ac_Header=no"
4426 fi
4427 rm -f conftest.err conftest.$ac_ext
4428 fi
4429 echo "$as_me:4429: result: `eval echo '${'$as_ac_Header'}'`" >&5
4430 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4431 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4432   cat >>confdefs.h <<EOF
4433 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4434 EOF
4435
4436 fi
4437 done
4438
4439 cat >>confdefs.h <<\EOF
4440 #define NCURSES 1
4441 EOF
4442
4443 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4444
4445 cat >>confdefs.h <<EOF
4446 #define $cf_nculib_ROOT 1
4447 EOF
4448
4449 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4450
4451 else
4452
4453 cf_ncuhdr_root=ncursesw
4454
4455 test -n "$cf_cv_curses_dir" && \
4456 test "$cf_cv_curses_dir" != "no" && { \
4457
4458 if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4459   for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
4460   do
4461         while test $cf_add_incdir != /usr/include
4462         do
4463           if test -d $cf_add_incdir
4464           then
4465                 cf_have_incdir=no
4466                 if test -n "$CFLAGS$CPPFLAGS" ; then
4467                   # a loop is needed to ensure we can add subdirs of existing dirs
4468                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4469                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4470                           cf_have_incdir=yes; break
4471                         fi
4472                   done
4473                 fi
4474
4475                 if test "$cf_have_incdir" = no ; then
4476                   if test "$cf_add_incdir" = /usr/local/include ; then
4477                         if test "$GCC" = yes
4478                         then
4479                           cf_save_CPPFLAGS=$CPPFLAGS
4480                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4481                           cat >conftest.$ac_ext <<_ACEOF
4482 #line 4482 "configure"
4483 #include "confdefs.h"
4484 #include <stdio.h>
4485 int
4486 main ()
4487 {
4488 printf("Hello")
4489   ;
4490   return 0;
4491 }
4492 _ACEOF
4493 rm -f conftest.$ac_objext
4494 if { (eval echo "$as_me:4494: \"$ac_compile\"") >&5
4495   (eval $ac_compile) 2>&5
4496   ac_status=$?
4497   echo "$as_me:4497: \$? = $ac_status" >&5
4498   (exit $ac_status); } &&
4499          { ac_try='test -s conftest.$ac_objext'
4500   { (eval echo "$as_me:4500: \"$ac_try\"") >&5
4501   (eval $ac_try) 2>&5
4502   ac_status=$?
4503   echo "$as_me:4503: \$? = $ac_status" >&5
4504   (exit $ac_status); }; }; then
4505   :
4506 else
4507   echo "$as_me: failed program was:" >&5
4508 cat conftest.$ac_ext >&5
4509 cf_have_incdir=yes
4510 fi
4511 rm -f conftest.$ac_objext conftest.$ac_ext
4512                           CPPFLAGS=$cf_save_CPPFLAGS
4513                         fi
4514                   fi
4515                 fi
4516
4517                 if test "$cf_have_incdir" = no ; then
4518                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4519
4520 echo "${as_me-configure}:4520: testing adding $cf_add_incdir to include-path ..." 1>&5
4521
4522                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4523
4524                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4525                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4526                   cf_add_incdir="$cf_top_incdir"
4527                 else
4528                   break
4529                 fi
4530           fi
4531         done
4532   done
4533 fi
4534
4535 }
4536
4537 echo "$as_me:4537: checking for $cf_ncuhdr_root header in include-path" >&5
4538 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4539 if test "${cf_cv_ncurses_h+set}" = set; then
4540   echo $ECHO_N "(cached) $ECHO_C" >&6
4541 else
4542
4543         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4544         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4545         for cf_header in $cf_header_list
4546         do
4547
4548         cat >conftest.$ac_ext <<_ACEOF
4549 #line 4549 "configure"
4550 #include "confdefs.h"
4551
4552 #define _XOPEN_SOURCE_EXTENDED
4553 #undef  HAVE_LIBUTF8_H  /* in case we used CF_UTF8_LIB */
4554 #define HAVE_LIBUTF8_H  /* to force ncurses' header file to use cchar_t */
4555
4556 #include <$cf_header>
4557 int
4558 main ()
4559 {
4560
4561 #ifdef NCURSES_VERSION
4562
4563 #ifndef WACS_BSSB
4564         make an error
4565 #endif
4566
4567 printf("%s\n", NCURSES_VERSION);
4568 #else
4569 #ifdef __NCURSES_H
4570 printf("old\n");
4571 #else
4572         make an error
4573 #endif
4574 #endif
4575
4576   ;
4577   return 0;
4578 }
4579 _ACEOF
4580 rm -f conftest.$ac_objext
4581 if { (eval echo "$as_me:4581: \"$ac_compile\"") >&5
4582   (eval $ac_compile) 2>&5
4583   ac_status=$?
4584   echo "$as_me:4584: \$? = $ac_status" >&5
4585   (exit $ac_status); } &&
4586          { ac_try='test -s conftest.$ac_objext'
4587   { (eval echo "$as_me:4587: \"$ac_try\"") >&5
4588   (eval $ac_try) 2>&5
4589   ac_status=$?
4590   echo "$as_me:4590: \$? = $ac_status" >&5
4591   (exit $ac_status); }; }; then
4592   cf_cv_ncurses_h=$cf_header
4593
4594 else
4595   echo "$as_me: failed program was:" >&5
4596 cat conftest.$ac_ext >&5
4597 cf_cv_ncurses_h=no
4598 fi
4599 rm -f conftest.$ac_objext conftest.$ac_ext
4600
4601                 test "$cf_cv_ncurses_h" != no && break
4602         done
4603
4604 fi
4605 echo "$as_me:4605: result: $cf_cv_ncurses_h" >&5
4606 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4607
4608 if test "$cf_cv_ncurses_h" != no ; then
4609         cf_cv_ncurses_header=$cf_cv_ncurses_h
4610 else
4611
4612 echo "$as_me:4612: checking for $cf_ncuhdr_root include-path" >&5
4613 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4614 if test "${cf_cv_ncurses_h2+set}" = set; then
4615   echo $ECHO_N "(cached) $ECHO_C" >&6
4616 else
4617
4618         test -n "$verbose" && echo
4619
4620 cf_search=
4621
4622 # collect the current set of include-directories from compiler flags
4623 cf_header_path_list=""
4624 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4625         for cf_header_path in $CPPFLAGS $CFLAGS
4626         do
4627                 case $cf_header_path in #(vi
4628                 -I*)
4629                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4630
4631 test "$cf_header_path" != "NONE" && \
4632 test -d "$cf_header_path" && \
4633  {
4634         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
4635         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
4636         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4637         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4638         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4639         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"
4640 }
4641
4642                         cf_header_path_list="$cf_header_path_list $cf_search"
4643                         ;;
4644                 esac
4645         done
4646 fi
4647
4648 # add the variations for the package we are looking for
4649
4650 cf_search=
4651
4652 test "/usr" != "$prefix" && \
4653 test -d "/usr" && \
4654 (test $prefix = NONE || test "/usr" != "$prefix") && {
4655         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
4656         test -d /usr/include &&          cf_search="$cf_search /usr/include"
4657         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
4658         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
4659         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
4660         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4661 }
4662
4663 test "$prefix" != "NONE" && \
4664 test -d "$prefix" && \
4665  {
4666         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
4667         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
4668         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4669         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4670         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4671         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4672 }
4673
4674 test "/usr/local" != "$prefix" && \
4675 test -d "/usr/local" && \
4676 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4677         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
4678         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
4679         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
4680         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
4681         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
4682         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4683 }
4684
4685 test "/opt" != "$prefix" && \
4686 test -d "/opt" && \
4687 (test $prefix = NONE || test "/opt" != "$prefix") && {
4688         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
4689         test -d /opt/include &&          cf_search="$cf_search /opt/include"
4690         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
4691         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
4692         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
4693         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4694 }
4695
4696 test "$HOME" != "$prefix" && \
4697 test -d "$HOME" && \
4698 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4699         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
4700         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
4701         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
4702         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
4703         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
4704         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4705 }
4706
4707 test "$includedir" != NONE && \
4708 test "$includedir" != "/usr/include" && \
4709 test -d "$includedir" && {
4710         test -d $includedir &&    cf_search="$cf_search $includedir"
4711         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4712 }
4713
4714 test "$oldincludedir" != NONE && \
4715 test "$oldincludedir" != "/usr/include" && \
4716 test -d "$oldincludedir" && {
4717         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
4718         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4719 }
4720
4721 cf_search="$cf_search $cf_header_path_list"
4722
4723         test -n "$verbose" && echo search path $cf_search
4724         cf_save2_CPPFLAGS="$CPPFLAGS"
4725         for cf_incdir in $cf_search
4726         do
4727
4728 if test -n "$cf_incdir" ; then
4729   for cf_add_incdir in $cf_incdir
4730   do
4731         while test $cf_add_incdir != /usr/include
4732         do
4733           if test -d $cf_add_incdir
4734           then
4735                 cf_have_incdir=no
4736                 if test -n "$CFLAGS$CPPFLAGS" ; then
4737                   # a loop is needed to ensure we can add subdirs of existing dirs
4738                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4739                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4740                           cf_have_incdir=yes; break
4741                         fi
4742                   done
4743                 fi
4744
4745                 if test "$cf_have_incdir" = no ; then
4746                   if test "$cf_add_incdir" = /usr/local/include ; then
4747                         if test "$GCC" = yes
4748                         then
4749                           cf_save_CPPFLAGS=$CPPFLAGS
4750                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4751                           cat >conftest.$ac_ext <<_ACEOF
4752 #line 4752 "configure"
4753 #include "confdefs.h"
4754 #include <stdio.h>
4755 int
4756 main ()
4757 {
4758 printf("Hello")
4759   ;
4760   return 0;
4761 }
4762 _ACEOF
4763 rm -f conftest.$ac_objext
4764 if { (eval echo "$as_me:4764: \"$ac_compile\"") >&5
4765   (eval $ac_compile) 2>&5
4766   ac_status=$?
4767   echo "$as_me:4767: \$? = $ac_status" >&5
4768   (exit $ac_status); } &&
4769          { ac_try='test -s conftest.$ac_objext'
4770   { (eval echo "$as_me:4770: \"$ac_try\"") >&5
4771   (eval $ac_try) 2>&5
4772   ac_status=$?
4773   echo "$as_me:4773: \$? = $ac_status" >&5
4774   (exit $ac_status); }; }; then
4775   :
4776 else
4777   echo "$as_me: failed program was:" >&5
4778 cat conftest.$ac_ext >&5
4779 cf_have_incdir=yes
4780 fi
4781 rm -f conftest.$ac_objext conftest.$ac_ext
4782                           CPPFLAGS=$cf_save_CPPFLAGS
4783                         fi
4784                   fi
4785                 fi
4786
4787                 if test "$cf_have_incdir" = no ; then
4788                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4789
4790 echo "${as_me-configure}:4790: testing adding $cf_add_incdir to include-path ..." 1>&5
4791
4792                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4793
4794                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4795                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4796                   cf_add_incdir="$cf_top_incdir"
4797                 else
4798                   break
4799                 fi
4800           fi
4801         done
4802   done
4803 fi
4804
4805                 for cf_header in \
4806                         ncurses.h \
4807                         curses.h
4808                 do
4809
4810         cat >conftest.$ac_ext <<_ACEOF
4811 #line 4811 "configure"
4812 #include "confdefs.h"
4813
4814 #include <$cf_header>
4815 int
4816 main ()
4817 {
4818
4819 #ifdef NCURSES_VERSION
4820
4821 printf("%s\n", NCURSES_VERSION);
4822 #else
4823 #ifdef __NCURSES_H
4824 printf("old\n");
4825 #else
4826         make an error
4827 #endif
4828 #endif
4829
4830   ;
4831   return 0;
4832 }
4833 _ACEOF
4834 rm -f conftest.$ac_objext
4835 if { (eval echo "$as_me:4835: \"$ac_compile\"") >&5
4836   (eval $ac_compile) 2>&5
4837   ac_status=$?
4838   echo "$as_me:4838: \$? = $ac_status" >&5
4839   (exit $ac_status); } &&
4840          { ac_try='test -s conftest.$ac_objext'
4841   { (eval echo "$as_me:4841: \"$ac_try\"") >&5
4842   (eval $ac_try) 2>&5
4843   ac_status=$?
4844   echo "$as_me:4844: \$? = $ac_status" >&5
4845   (exit $ac_status); }; }; then
4846   cf_cv_ncurses_h2=$cf_header
4847
4848 else
4849   echo "$as_me: failed program was:" >&5
4850 cat conftest.$ac_ext >&5
4851 cf_cv_ncurses_h2=no
4852 fi
4853 rm -f conftest.$ac_objext conftest.$ac_ext
4854
4855                         if test "$cf_cv_ncurses_h2" != no ; then
4856                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
4857                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
4858                                 break
4859                         fi
4860                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
4861                 done
4862                 CPPFLAGS="$cf_save2_CPPFLAGS"
4863                 test "$cf_cv_ncurses_h2" != no && break
4864         done
4865         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:4865: error: not found" >&5
4866 echo "$as_me: error: not found" >&2;}
4867    { (exit 1); exit 1; }; }
4868
4869 fi
4870 echo "$as_me:4870: result: $cf_cv_ncurses_h2" >&5
4871 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
4872
4873         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
4874         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
4875         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
4876                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
4877         fi
4878
4879 if test -n "$cf_1st_incdir" ; then
4880   for cf_add_incdir in $cf_1st_incdir
4881   do
4882         while test $cf_add_incdir != /usr/include
4883         do
4884           if test -d $cf_add_incdir
4885           then
4886                 cf_have_incdir=no
4887                 if test -n "$CFLAGS$CPPFLAGS" ; then
4888                   # a loop is needed to ensure we can add subdirs of existing dirs
4889                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4890                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4891                           cf_have_incdir=yes; break
4892                         fi
4893                   done
4894                 fi
4895
4896                 if test "$cf_have_incdir" = no ; then
4897                   if test "$cf_add_incdir" = /usr/local/include ; then
4898                         if test "$GCC" = yes
4899                         then
4900                           cf_save_CPPFLAGS=$CPPFLAGS
4901                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4902                           cat >conftest.$ac_ext <<_ACEOF
4903 #line 4903 "configure"
4904 #include "confdefs.h"
4905 #include <stdio.h>
4906 int
4907 main ()
4908 {
4909 printf("Hello")
4910   ;
4911   return 0;
4912 }
4913 _ACEOF
4914 rm -f conftest.$ac_objext
4915 if { (eval echo "$as_me:4915: \"$ac_compile\"") >&5
4916   (eval $ac_compile) 2>&5
4917   ac_status=$?
4918   echo "$as_me:4918: \$? = $ac_status" >&5
4919   (exit $ac_status); } &&
4920          { ac_try='test -s conftest.$ac_objext'
4921   { (eval echo "$as_me:4921: \"$ac_try\"") >&5
4922   (eval $ac_try) 2>&5
4923   ac_status=$?
4924   echo "$as_me:4924: \$? = $ac_status" >&5
4925   (exit $ac_status); }; }; then
4926   :
4927 else
4928   echo "$as_me: failed program was:" >&5
4929 cat conftest.$ac_ext >&5
4930 cf_have_incdir=yes
4931 fi
4932 rm -f conftest.$ac_objext conftest.$ac_ext
4933                           CPPFLAGS=$cf_save_CPPFLAGS
4934                         fi
4935                   fi
4936                 fi
4937
4938                 if test "$cf_have_incdir" = no ; then
4939                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4940
4941 echo "${as_me-configure}:4941: testing adding $cf_add_incdir to include-path ..." 1>&5
4942
4943                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4944
4945                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4946                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4947                   cf_add_incdir="$cf_top_incdir"
4948                 else
4949                   break
4950                 fi
4951           fi
4952         done
4953   done
4954 fi
4955
4956 fi
4957
4958 # Set definitions to allow ifdef'ing for ncurses.h
4959
4960 case $cf_cv_ncurses_header in # (vi
4961 *ncurses.h)
4962         cat >>confdefs.h <<\EOF
4963 #define HAVE_NCURSES_H 1
4964 EOF
4965
4966         ;;
4967 esac
4968
4969 case $cf_cv_ncurses_header in # (vi
4970 ncurses/curses.h|ncurses/ncurses.h)
4971         cat >>confdefs.h <<\EOF
4972 #define HAVE_NCURSES_NCURSES_H 1
4973 EOF
4974
4975         ;;
4976 ncursesw/curses.h|ncursesw/ncurses.h)
4977         cat >>confdefs.h <<\EOF
4978 #define HAVE_NCURSESW_NCURSES_H 1
4979 EOF
4980
4981         ;;
4982 esac
4983
4984 echo "$as_me:4984: checking for terminfo header" >&5
4985 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4986 if test "${cf_cv_term_header+set}" = set; then
4987   echo $ECHO_N "(cached) $ECHO_C" >&6
4988 else
4989
4990 case ${cf_cv_ncurses_header} in #(vi
4991 */ncurses.h|*/ncursesw.h) #(vi
4992         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4993         ;;
4994 *)
4995         cf_term_header=term.h
4996         ;;
4997 esac
4998
4999 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5000 do
5001 cat >conftest.$ac_ext <<_ACEOF
5002 #line 5002 "configure"
5003 #include "confdefs.h"
5004 #include <stdio.h>
5005 #include <${cf_cv_ncurses_header-curses.h}>
5006 #include <$cf_test>
5007
5008 int
5009 main ()
5010 {
5011 int x = auto_left_margin
5012   ;
5013   return 0;
5014 }
5015 _ACEOF
5016 rm -f conftest.$ac_objext
5017 if { (eval echo "$as_me:5017: \"$ac_compile\"") >&5
5018   (eval $ac_compile) 2>&5
5019   ac_status=$?
5020   echo "$as_me:5020: \$? = $ac_status" >&5
5021   (exit $ac_status); } &&
5022          { ac_try='test -s conftest.$ac_objext'
5023   { (eval echo "$as_me:5023: \"$ac_try\"") >&5
5024   (eval $ac_try) 2>&5
5025   ac_status=$?
5026   echo "$as_me:5026: \$? = $ac_status" >&5
5027   (exit $ac_status); }; }; then
5028
5029         cf_cv_term_header="$cf_test"
5030 else
5031   echo "$as_me: failed program was:" >&5
5032 cat conftest.$ac_ext >&5
5033
5034         cf_cv_term_header=unknown
5035
5036 fi
5037 rm -f conftest.$ac_objext conftest.$ac_ext
5038         test "$cf_cv_term_header" != unknown && break
5039 done
5040
5041 fi
5042 echo "$as_me:5042: result: $cf_cv_term_header" >&5
5043 echo "${ECHO_T}$cf_cv_term_header" >&6
5044
5045 # Set definitions to allow ifdef'ing to accommodate subdirectories
5046
5047 case $cf_cv_term_header in # (vi
5048 *term.h)
5049         cat >>confdefs.h <<\EOF
5050 #define HAVE_TERM_H 1
5051 EOF
5052
5053         ;;
5054 esac
5055
5056 case $cf_cv_term_header in # (vi
5057 ncurses/term.h) #(vi
5058         cat >>confdefs.h <<\EOF
5059 #define HAVE_NCURSES_TERM_H 1
5060 EOF
5061
5062         ;;
5063 ncursesw/term.h)
5064         cat >>confdefs.h <<\EOF
5065 #define HAVE_NCURSESW_TERM_H 1
5066 EOF
5067
5068         ;;
5069 esac
5070
5071 # some applications need this, but should check for NCURSES_VERSION
5072 cat >>confdefs.h <<\EOF
5073 #define NCURSES 1
5074 EOF
5075
5076 echo "$as_me:5076: checking for ncurses version" >&5
5077 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5078 if test "${cf_cv_ncurses_version+set}" = set; then
5079   echo $ECHO_N "(cached) $ECHO_C" >&6
5080 else
5081
5082         cf_cv_ncurses_version=no
5083         cf_tempfile=out$$
5084         rm -f $cf_tempfile
5085         if test "$cross_compiling" = yes; then
5086
5087         # This will not work if the preprocessor splits the line after the
5088         # Autoconf token.  The 'unproto' program does that.
5089         cat > conftest.$ac_ext <<EOF
5090 #include <${cf_cv_ncurses_header-curses.h}>
5091 #undef Autoconf
5092 #ifdef NCURSES_VERSION
5093 Autoconf NCURSES_VERSION
5094 #else
5095 #ifdef __NCURSES_H
5096 Autoconf "old"
5097 #endif
5098 ;
5099 #endif
5100 EOF
5101         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5102         { (eval echo "$as_me:5102: \"$cf_try\"") >&5
5103   (eval $cf_try) 2>&5
5104   ac_status=$?
5105   echo "$as_me:5105: \$? = $ac_status" >&5
5106   (exit $ac_status); }
5107         if test -f conftest.out ; then
5108                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5109                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5110                 rm -f conftest.out
5111         fi
5112
5113 else
5114   cat >conftest.$ac_ext <<_ACEOF
5115 #line 5115 "configure"
5116 #include "confdefs.h"
5117
5118 #include <${cf_cv_ncurses_header-curses.h}>
5119 #include <stdio.h>
5120 int main()
5121 {
5122         FILE *fp = fopen("$cf_tempfile", "w");
5123 #ifdef NCURSES_VERSION
5124 # ifdef NCURSES_VERSION_PATCH
5125         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5126 # else
5127         fprintf(fp, "%s\n", NCURSES_VERSION);
5128 # endif
5129 #else
5130 # ifdef __NCURSES_H
5131         fprintf(fp, "old\n");
5132 # else
5133         make an error
5134 # endif
5135 #endif
5136         ${cf_cv_main_return-return}(0);
5137 }
5138 _ACEOF
5139 rm -f conftest$ac_exeext
5140 if { (eval echo "$as_me:5140: \"$ac_link\"") >&5
5141   (eval $ac_link) 2>&5
5142   ac_status=$?
5143   echo "$as_me:5143: \$? = $ac_status" >&5
5144   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5145   { (eval echo "$as_me:5145: \"$ac_try\"") >&5
5146   (eval $ac_try) 2>&5
5147   ac_status=$?
5148   echo "$as_me:5148: \$? = $ac_status" >&5
5149   (exit $ac_status); }; }; then
5150
5151         cf_cv_ncurses_version=`cat $cf_tempfile`
5152 else
5153   echo "$as_me: program exited with status $ac_status" >&5
5154 echo "$as_me: failed program was:" >&5
5155 cat conftest.$ac_ext >&5
5156 fi
5157 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5158 fi
5159         rm -f $cf_tempfile
5160
5161 fi
5162 echo "$as_me:5162: result: $cf_cv_ncurses_version" >&5
5163 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5164 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
5165 #define NCURSES 1
5166 EOF
5167
5168 cf_nculib_root=ncursesw
5169         # This works, except for the special case where we find gpm, but
5170         # ncurses is in a nonstandard location via $LIBS, and we really want
5171         # to link gpm.
5172 cf_ncurses_LIBS=""
5173 cf_ncurses_SAVE="$LIBS"
5174 echo "$as_me:5174: checking for Gpm_Open in -lgpm" >&5
5175 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5176 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5177   echo $ECHO_N "(cached) $ECHO_C" >&6
5178 else
5179   ac_check_lib_save_LIBS=$LIBS
5180 LIBS="-lgpm  $LIBS"
5181 cat >conftest.$ac_ext <<_ACEOF
5182 #line 5182 "configure"
5183 #include "confdefs.h"
5184
5185 /* Override any gcc2 internal prototype to avoid an error.  */
5186 #ifdef __cplusplus
5187 extern "C"
5188 #endif
5189 /* We use char because int might match the return type of a gcc2
5190    builtin and then its argument prototype would still apply.  */
5191 char Gpm_Open ();
5192 int
5193 main ()
5194 {
5195 Gpm_Open ();
5196   ;
5197   return 0;
5198 }
5199 _ACEOF
5200 rm -f conftest.$ac_objext conftest$ac_exeext
5201 if { (eval echo "$as_me:5201: \"$ac_link\"") >&5
5202   (eval $ac_link) 2>&5
5203   ac_status=$?
5204   echo "$as_me:5204: \$? = $ac_status" >&5
5205   (exit $ac_status); } &&
5206          { ac_try='test -s conftest$ac_exeext'
5207   { (eval echo "$as_me:5207: \"$ac_try\"") >&5
5208   (eval $ac_try) 2>&5
5209   ac_status=$?
5210   echo "$as_me:5210: \$? = $ac_status" >&5
5211   (exit $ac_status); }; }; then
5212   ac_cv_lib_gpm_Gpm_Open=yes
5213 else
5214   echo "$as_me: failed program was:" >&5
5215 cat conftest.$ac_ext >&5
5216 ac_cv_lib_gpm_Gpm_Open=no
5217 fi
5218 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5219 LIBS=$ac_check_lib_save_LIBS
5220 fi
5221 echo "$as_me:5221: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5222 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5223 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5224   echo "$as_me:5224: checking for initscr in -lgpm" >&5
5225 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5226 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5227   echo $ECHO_N "(cached) $ECHO_C" >&6
5228 else
5229   ac_check_lib_save_LIBS=$LIBS
5230 LIBS="-lgpm  $LIBS"
5231 cat >conftest.$ac_ext <<_ACEOF
5232 #line 5232 "configure"
5233 #include "confdefs.h"
5234
5235 /* Override any gcc2 internal prototype to avoid an error.  */
5236 #ifdef __cplusplus
5237 extern "C"
5238 #endif
5239 /* We use char because int might match the return type of a gcc2
5240    builtin and then its argument prototype would still apply.  */
5241 char initscr ();
5242 int
5243 main ()
5244 {
5245 initscr ();
5246   ;
5247   return 0;
5248 }
5249 _ACEOF
5250 rm -f conftest.$ac_objext conftest$ac_exeext
5251 if { (eval echo "$as_me:5251: \"$ac_link\"") >&5
5252   (eval $ac_link) 2>&5
5253   ac_status=$?
5254   echo "$as_me:5254: \$? = $ac_status" >&5
5255   (exit $ac_status); } &&
5256          { ac_try='test -s conftest$ac_exeext'
5257   { (eval echo "$as_me:5257: \"$ac_try\"") >&5
5258   (eval $ac_try) 2>&5
5259   ac_status=$?
5260   echo "$as_me:5260: \$? = $ac_status" >&5
5261   (exit $ac_status); }; }; then
5262   ac_cv_lib_gpm_initscr=yes
5263 else
5264   echo "$as_me: failed program was:" >&5
5265 cat conftest.$ac_ext >&5
5266 ac_cv_lib_gpm_initscr=no
5267 fi
5268 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5269 LIBS=$ac_check_lib_save_LIBS
5270 fi
5271 echo "$as_me:5271: result: $ac_cv_lib_gpm_initscr" >&5
5272 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
5273 if test $ac_cv_lib_gpm_initscr = yes; then
5274   LIBS="$cf_ncurses_SAVE"
5275 else
5276   cf_ncurses_LIBS="-lgpm"
5277 fi
5278
5279 fi
5280
5281 case $host_os in #(vi
5282 freebsd*)
5283         # This is only necessary if you are linking against an obsolete
5284         # version of ncurses (but it should do no harm, since it's static).
5285         if test "$cf_nculib_root" = ncurses ; then
5286                 echo "$as_me:5286: checking for tgoto in -lmytinfo" >&5
5287 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5288 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5289   echo $ECHO_N "(cached) $ECHO_C" >&6
5290 else
5291   ac_check_lib_save_LIBS=$LIBS
5292 LIBS="-lmytinfo  $LIBS"
5293 cat >conftest.$ac_ext <<_ACEOF
5294 #line 5294 "configure"
5295 #include "confdefs.h"
5296
5297 /* Override any gcc2 internal prototype to avoid an error.  */
5298 #ifdef __cplusplus
5299 extern "C"
5300 #endif
5301 /* We use char because int might match the return type of a gcc2
5302    builtin and then its argument prototype would still apply.  */
5303 char tgoto ();
5304 int
5305 main ()
5306 {
5307 tgoto ();
5308   ;
5309   return 0;
5310 }
5311 _ACEOF
5312 rm -f conftest.$ac_objext conftest$ac_exeext
5313 if { (eval echo "$as_me:5313: \"$ac_link\"") >&5
5314   (eval $ac_link) 2>&5
5315   ac_status=$?
5316   echo "$as_me:5316: \$? = $ac_status" >&5
5317   (exit $ac_status); } &&
5318          { ac_try='test -s conftest$ac_exeext'
5319   { (eval echo "$as_me:5319: \"$ac_try\"") >&5
5320   (eval $ac_try) 2>&5
5321   ac_status=$?
5322   echo "$as_me:5322: \$? = $ac_status" >&5
5323   (exit $ac_status); }; }; then
5324   ac_cv_lib_mytinfo_tgoto=yes
5325 else
5326   echo "$as_me: failed program was:" >&5
5327 cat conftest.$ac_ext >&5
5328 ac_cv_lib_mytinfo_tgoto=no
5329 fi
5330 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5331 LIBS=$ac_check_lib_save_LIBS
5332 fi
5333 echo "$as_me:5333: result: $ac_cv_lib_mytinfo_tgoto" >&5
5334 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5335 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5336   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5337 fi
5338
5339         fi
5340         ;;
5341 esac
5342
5343 LIBS="$cf_ncurses_LIBS $LIBS"
5344
5345 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5346 then
5347
5348 if test -n "$cf_cv_curses_dir/lib" ; then
5349   for cf_add_libdir in $cf_cv_curses_dir/lib
5350   do
5351     if test $cf_add_libdir = /usr/lib ; then
5352       :
5353     elif test -d $cf_add_libdir
5354     then
5355       cf_have_libdir=no
5356       if test -n "$LDFLAGS$LIBS" ; then
5357         # a loop is needed to ensure we can add subdirs of existing dirs
5358         for cf_test_libdir in $LDFLAGS $LIBS ; do
5359           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5360             cf_have_libdir=yes; break
5361           fi
5362         done
5363       fi
5364       if test "$cf_have_libdir" = no ; then
5365         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5366
5367 echo "${as_me-configure}:5367: testing adding $cf_add_libdir to library-path ..." 1>&5
5368
5369         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5370       fi
5371     fi
5372   done
5373 fi
5374
5375         LIBS="-l$cf_nculib_root $LIBS"
5376 else
5377
5378         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5379         cf_libdir=""
5380         echo "$as_me:5380: checking for initscr" >&5
5381 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
5382 if test "${ac_cv_func_initscr+set}" = set; then
5383   echo $ECHO_N "(cached) $ECHO_C" >&6
5384 else
5385   cat >conftest.$ac_ext <<_ACEOF
5386 #line 5386 "configure"
5387 #include "confdefs.h"
5388 /* System header to define __stub macros and hopefully few prototypes,
5389     which can conflict with char initscr (); below.  */
5390 #include <assert.h>
5391 /* Override any gcc2 internal prototype to avoid an error.  */
5392 #ifdef __cplusplus
5393 extern "C"
5394 #endif
5395 /* We use char because int might match the return type of a gcc2
5396    builtin and then its argument prototype would still apply.  */
5397 char initscr ();
5398 char (*f) ();
5399
5400 int
5401 main ()
5402 {
5403 /* The GNU C library defines this for functions which it implements
5404     to always fail with ENOSYS.  Some functions are actually named
5405     something starting with __ and the normal name is an alias.  */
5406 #if defined (__stub_initscr) || defined (__stub___initscr)
5407 choke me
5408 #else
5409 f = initscr;
5410 #endif
5411
5412   ;
5413   return 0;
5414 }
5415 _ACEOF
5416 rm -f conftest.$ac_objext conftest$ac_exeext
5417 if { (eval echo "$as_me:5417: \"$ac_link\"") >&5
5418   (eval $ac_link) 2>&5
5419   ac_status=$?
5420   echo "$as_me:5420: \$? = $ac_status" >&5
5421   (exit $ac_status); } &&
5422          { ac_try='test -s conftest$ac_exeext'
5423   { (eval echo "$as_me:5423: \"$ac_try\"") >&5
5424   (eval $ac_try) 2>&5
5425   ac_status=$?
5426   echo "$as_me:5426: \$? = $ac_status" >&5
5427   (exit $ac_status); }; }; then
5428   ac_cv_func_initscr=yes
5429 else
5430   echo "$as_me: failed program was:" >&5
5431 cat conftest.$ac_ext >&5
5432 ac_cv_func_initscr=no
5433 fi
5434 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5435 fi
5436 echo "$as_me:5436: result: $ac_cv_func_initscr" >&5
5437 echo "${ECHO_T}$ac_cv_func_initscr" >&6
5438 if test $ac_cv_func_initscr = yes; then
5439   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5440 else
5441
5442                 cf_save_LIBS="$LIBS"
5443                 echo "$as_me:5443: checking for initscr in -l$cf_nculib_root" >&5
5444 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
5445                 LIBS="-l$cf_nculib_root $LIBS"
5446                 cat >conftest.$ac_ext <<_ACEOF
5447 #line 5447 "configure"
5448 #include "confdefs.h"
5449 #include <${cf_cv_ncurses_header-curses.h}>
5450 int
5451 main ()
5452 {
5453 initscr()
5454   ;
5455   return 0;
5456 }
5457 _ACEOF
5458 rm -f conftest.$ac_objext conftest$ac_exeext
5459 if { (eval echo "$as_me:5459: \"$ac_link\"") >&5
5460   (eval $ac_link) 2>&5
5461   ac_status=$?
5462   echo "$as_me:5462: \$? = $ac_status" >&5
5463   (exit $ac_status); } &&
5464          { ac_try='test -s conftest$ac_exeext'
5465   { (eval echo "$as_me:5465: \"$ac_try\"") >&5
5466   (eval $ac_try) 2>&5
5467   ac_status=$?
5468   echo "$as_me:5468: \$? = $ac_status" >&5
5469   (exit $ac_status); }; }; then
5470   echo "$as_me:5470: result: yes" >&5
5471 echo "${ECHO_T}yes" >&6
5472                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5473
5474 else
5475   echo "$as_me: failed program was:" >&5
5476 cat conftest.$ac_ext >&5
5477 echo "$as_me:5477: result: no" >&5
5478 echo "${ECHO_T}no" >&6
5479
5480 cf_search=
5481 cf_library_path_list=""
5482 if test -n "${LDFLAGS}${LIBS}" ; then
5483         for cf_library_path in $LDFLAGS $LIBS
5484         do
5485                 case $cf_library_path in #(vi
5486                 -L*)
5487                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5488
5489 test "$cf_library_path" != "NONE" && \
5490 test -d "$cf_library_path" && \
5491  {
5492         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
5493         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
5494         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5495         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5496         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5497         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"
5498 }
5499
5500                         cf_library_path_list="$cf_library_path_list $cf_search"
5501                         ;;
5502                 esac
5503         done
5504 fi
5505
5506 cf_search=
5507
5508 test "/usr" != "$prefix" && \
5509 test -d "/usr" && \
5510 (test $prefix = NONE || test "/usr" != "$prefix") && {
5511         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
5512         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
5513         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
5514         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
5515         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
5516         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
5517 }
5518
5519 test "$prefix" != "NONE" && \
5520 test -d "$prefix" && \
5521  {
5522         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
5523         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
5524         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5525         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5526         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5527         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5528 }
5529
5530 test "/usr/local" != "$prefix" && \
5531 test -d "/usr/local" && \
5532 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
5533         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
5534         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
5535         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
5536         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
5537         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
5538         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
5539 }
5540
5541 test "/opt" != "$prefix" && \
5542 test -d "/opt" && \
5543 (test $prefix = NONE || test "/opt" != "$prefix") && {
5544         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
5545         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
5546         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
5547         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
5548         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
5549         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
5550 }
5551
5552 test "$HOME" != "$prefix" && \
5553 test -d "$HOME" && \
5554 (test $prefix = NONE || test "$HOME" != "$prefix") && {
5555         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
5556         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
5557         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
5558         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
5559         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
5560         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
5561 }
5562
5563 cf_search="$cf_library_path_list $cf_search"
5564
5565                         for cf_libdir in $cf_search
5566                         do
5567                                 echo "$as_me:5567: checking for -l$cf_nculib_root in $cf_libdir" >&5
5568 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5569                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5570                                 cat >conftest.$ac_ext <<_ACEOF
5571 #line 5571 "configure"
5572 #include "confdefs.h"
5573 #include <${cf_cv_ncurses_header-curses.h}>
5574 int
5575 main ()
5576 {
5577 initscr()
5578   ;
5579   return 0;
5580 }
5581 _ACEOF
5582 rm -f conftest.$ac_objext conftest$ac_exeext
5583 if { (eval echo "$as_me:5583: \"$ac_link\"") >&5
5584   (eval $ac_link) 2>&5
5585   ac_status=$?
5586   echo "$as_me:5586: \$? = $ac_status" >&5
5587   (exit $ac_status); } &&
5588          { ac_try='test -s conftest$ac_exeext'
5589   { (eval echo "$as_me:5589: \"$ac_try\"") >&5
5590   (eval $ac_try) 2>&5
5591   ac_status=$?
5592   echo "$as_me:5592: \$? = $ac_status" >&5
5593   (exit $ac_status); }; }; then
5594   echo "$as_me:5594: result: yes" >&5
5595 echo "${ECHO_T}yes" >&6
5596                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5597                                          break
5598 else
5599   echo "$as_me: failed program was:" >&5
5600 cat conftest.$ac_ext >&5
5601 echo "$as_me:5601: result: no" >&5
5602 echo "${ECHO_T}no" >&6
5603                                          LIBS="$cf_save_LIBS"
5604 fi
5605 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5606                         done
5607
5608 fi
5609 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5610
5611 fi
5612
5613 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5614
5615 if test $cf_found_library = no ; then
5616         { { echo "$as_me:5616: error: Cannot link $cf_nculib_root library" >&5
5617 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5618    { (exit 1); exit 1; }; }
5619 fi
5620
5621 fi
5622
5623 if test -n "$cf_ncurses_LIBS" ; then
5624         echo "$as_me:5624: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5625 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5626         cf_ncurses_SAVE="$LIBS"
5627         for p in $cf_ncurses_LIBS ; do
5628                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5629                 if test "$q" != "$LIBS" ; then
5630                         LIBS="$q"
5631                 fi
5632         done
5633         cat >conftest.$ac_ext <<_ACEOF
5634 #line 5634 "configure"
5635 #include "confdefs.h"
5636 #include <${cf_cv_ncurses_header-curses.h}>
5637 int
5638 main ()
5639 {
5640 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5641   ;
5642   return 0;
5643 }
5644 _ACEOF
5645 rm -f conftest.$ac_objext conftest$ac_exeext
5646 if { (eval echo "$as_me:5646: \"$ac_link\"") >&5
5647   (eval $ac_link) 2>&5
5648   ac_status=$?
5649   echo "$as_me:5649: \$? = $ac_status" >&5
5650   (exit $ac_status); } &&
5651          { ac_try='test -s conftest$ac_exeext'
5652   { (eval echo "$as_me:5652: \"$ac_try\"") >&5
5653   (eval $ac_try) 2>&5
5654   ac_status=$?
5655   echo "$as_me:5655: \$? = $ac_status" >&5
5656   (exit $ac_status); }; }; then
5657   echo "$as_me:5657: result: yes" >&5
5658 echo "${ECHO_T}yes" >&6
5659 else
5660   echo "$as_me: failed program was:" >&5
5661 cat conftest.$ac_ext >&5
5662 echo "$as_me:5662: result: no" >&5
5663 echo "${ECHO_T}no" >&6
5664                  LIBS="$cf_ncurses_SAVE"
5665 fi
5666 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5667 fi
5668
5669 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5670
5671 cat >>confdefs.h <<EOF
5672 #define $cf_nculib_ROOT 1
5673 EOF
5674
5675 fi
5676
5677 else
5678
5679 cf_ncuconfig_root=ncurses
5680
5681 echo "Looking for ${cf_ncuconfig_root}-config"
5682 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5683 do
5684   # Extract the first word of "$ac_prog", so it can be a program name with args.
5685 set dummy $ac_prog; ac_word=$2
5686 echo "$as_me:5686: checking for $ac_word" >&5
5687 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5688 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
5689   echo $ECHO_N "(cached) $ECHO_C" >&6
5690 else
5691   case $NCURSES_CONFIG in
5692   [\\/]* | ?:[\\/]*)
5693   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
5694   ;;
5695   *)
5696   ac_save_IFS=$IFS; IFS=$ac_path_separator
5697 ac_dummy="$PATH"
5698 for ac_dir in $ac_dummy; do
5699   IFS=$ac_save_IFS
5700   test -z "$ac_dir" && ac_dir=.
5701   if $as_executable_p "$ac_dir/$ac_word"; then
5702    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
5703    echo "$as_me:5703: found $ac_dir/$ac_word" >&5
5704    break
5705 fi
5706 done
5707
5708   ;;
5709 esac
5710 fi
5711 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
5712
5713 if test -n "$NCURSES_CONFIG"; then
5714   echo "$as_me:5714: result: $NCURSES_CONFIG" >&5
5715 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5716 else
5717   echo "$as_me:5717: result: no" >&5
5718 echo "${ECHO_T}no" >&6
5719 fi
5720
5721   test -n "$NCURSES_CONFIG" && break
5722 done
5723 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
5724
5725 if test "$NCURSES_CONFIG" != none ; then
5726
5727 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
5728 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
5729
5730 # even with config script, some packages use no-override for curses.h
5731
5732 echo "$as_me:5732: checking if we have identified curses headers" >&5
5733 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5734 if test "${cf_cv_ncurses_header+set}" = set; then
5735   echo $ECHO_N "(cached) $ECHO_C" >&6
5736 else
5737
5738 cf_cv_ncurses_header=none
5739 for cf_header in  \
5740     ncurses/curses.h \
5741         ncurses/ncurses.h \
5742         curses.h \
5743         ncurses.h
5744 do
5745 cat >conftest.$ac_ext <<_ACEOF
5746 #line 5746 "configure"
5747 #include "confdefs.h"
5748 #include <${cf_header}>
5749 int
5750 main ()
5751 {
5752 initscr(); tgoto("?", 0,0)
5753   ;
5754   return 0;
5755 }
5756 _ACEOF
5757 rm -f conftest.$ac_objext
5758 if { (eval echo "$as_me:5758: \"$ac_compile\"") >&5
5759   (eval $ac_compile) 2>&5
5760   ac_status=$?
5761   echo "$as_me:5761: \$? = $ac_status" >&5
5762   (exit $ac_status); } &&
5763          { ac_try='test -s conftest.$ac_objext'
5764   { (eval echo "$as_me:5764: \"$ac_try\"") >&5
5765   (eval $ac_try) 2>&5
5766   ac_status=$?
5767   echo "$as_me:5767: \$? = $ac_status" >&5
5768   (exit $ac_status); }; }; then
5769   cf_cv_ncurses_header=$cf_header; break
5770 else
5771   echo "$as_me: failed program was:" >&5
5772 cat conftest.$ac_ext >&5
5773 fi
5774 rm -f conftest.$ac_objext conftest.$ac_ext
5775 done
5776
5777 fi
5778 echo "$as_me:5778: result: $cf_cv_ncurses_header" >&5
5779 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5780
5781 if test "$cf_cv_ncurses_header" = none ; then
5782         { { echo "$as_me:5782: error: No curses header-files found" >&5
5783 echo "$as_me: error: No curses header-files found" >&2;}
5784    { (exit 1); exit 1; }; }
5785 fi
5786
5787 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5788
5789 for ac_header in $cf_cv_ncurses_header
5790 do
5791 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5792 echo "$as_me:5792: checking for $ac_header" >&5
5793 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5794 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5795   echo $ECHO_N "(cached) $ECHO_C" >&6
5796 else
5797   cat >conftest.$ac_ext <<_ACEOF
5798 #line 5798 "configure"
5799 #include "confdefs.h"
5800 #include <$ac_header>
5801 _ACEOF
5802 if { (eval echo "$as_me:5802: \"$ac_cpp conftest.$ac_ext\"") >&5
5803   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5804   ac_status=$?
5805   egrep -v '^ *\+' conftest.er1 >conftest.err
5806   rm -f conftest.er1
5807   cat conftest.err >&5
5808   echo "$as_me:5808: \$? = $ac_status" >&5
5809   (exit $ac_status); } >/dev/null; then
5810   if test -s conftest.err; then
5811     ac_cpp_err=$ac_c_preproc_warn_flag
5812   else
5813     ac_cpp_err=
5814   fi
5815 else
5816   ac_cpp_err=yes
5817 fi
5818 if test -z "$ac_cpp_err"; then
5819   eval "$as_ac_Header=yes"
5820 else
5821   echo "$as_me: failed program was:" >&5
5822   cat conftest.$ac_ext >&5
5823   eval "$as_ac_Header=no"
5824 fi
5825 rm -f conftest.err conftest.$ac_ext
5826 fi
5827 echo "$as_me:5827: result: `eval echo '${'$as_ac_Header'}'`" >&5
5828 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5829 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5830   cat >>confdefs.h <<EOF
5831 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5832 EOF
5833
5834 fi
5835 done
5836
5837 cat >>confdefs.h <<\EOF
5838 #define NCURSES 1
5839 EOF
5840
5841 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5842
5843 cat >>confdefs.h <<EOF
5844 #define $cf_nculib_ROOT 1
5845 EOF
5846
5847 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
5848
5849 else
5850
5851 cf_ncuhdr_root=ncurses
5852
5853 test -n "$cf_cv_curses_dir" && \
5854 test "$cf_cv_curses_dir" != "no" && { \
5855
5856 if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5857   for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
5858   do
5859         while test $cf_add_incdir != /usr/include
5860         do
5861           if test -d $cf_add_incdir
5862           then
5863                 cf_have_incdir=no
5864                 if test -n "$CFLAGS$CPPFLAGS" ; then
5865                   # a loop is needed to ensure we can add subdirs of existing dirs
5866                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5867                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5868                           cf_have_incdir=yes; break
5869                         fi
5870                   done
5871                 fi
5872
5873                 if test "$cf_have_incdir" = no ; then
5874                   if test "$cf_add_incdir" = /usr/local/include ; then
5875                         if test "$GCC" = yes
5876                         then
5877                           cf_save_CPPFLAGS=$CPPFLAGS
5878                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5879                           cat >conftest.$ac_ext <<_ACEOF
5880 #line 5880 "configure"
5881 #include "confdefs.h"
5882 #include <stdio.h>
5883 int
5884 main ()
5885 {
5886 printf("Hello")
5887   ;
5888   return 0;
5889 }
5890 _ACEOF
5891 rm -f conftest.$ac_objext
5892 if { (eval echo "$as_me:5892: \"$ac_compile\"") >&5
5893   (eval $ac_compile) 2>&5
5894   ac_status=$?
5895   echo "$as_me:5895: \$? = $ac_status" >&5
5896   (exit $ac_status); } &&
5897          { ac_try='test -s conftest.$ac_objext'
5898   { (eval echo "$as_me:5898: \"$ac_try\"") >&5
5899   (eval $ac_try) 2>&5
5900   ac_status=$?
5901   echo "$as_me:5901: \$? = $ac_status" >&5
5902   (exit $ac_status); }; }; then
5903   :
5904 else
5905   echo "$as_me: failed program was:" >&5
5906 cat conftest.$ac_ext >&5
5907 cf_have_incdir=yes
5908 fi
5909 rm -f conftest.$ac_objext conftest.$ac_ext
5910                           CPPFLAGS=$cf_save_CPPFLAGS
5911                         fi
5912                   fi
5913                 fi
5914
5915                 if test "$cf_have_incdir" = no ; then
5916                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5917
5918 echo "${as_me-configure}:5918: testing adding $cf_add_incdir to include-path ..." 1>&5
5919
5920                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5921
5922                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5923                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5924                   cf_add_incdir="$cf_top_incdir"
5925                 else
5926                   break
5927                 fi
5928           fi
5929         done
5930   done
5931 fi
5932
5933 }
5934
5935 echo "$as_me:5935: checking for $cf_ncuhdr_root header in include-path" >&5
5936 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5937 if test "${cf_cv_ncurses_h+set}" = set; then
5938   echo $ECHO_N "(cached) $ECHO_C" >&6
5939 else
5940
5941         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5942         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
5943         for cf_header in $cf_header_list
5944         do
5945
5946         cat >conftest.$ac_ext <<_ACEOF
5947 #line 5947 "configure"
5948 #include "confdefs.h"
5949
5950 #include <$cf_header>
5951 int
5952 main ()
5953 {
5954
5955 #ifdef NCURSES_VERSION
5956
5957 printf("%s\n", NCURSES_VERSION);
5958 #else
5959 #ifdef __NCURSES_H
5960 printf("old\n");
5961 #else
5962         make an error
5963 #endif
5964 #endif
5965
5966   ;
5967   return 0;
5968 }
5969 _ACEOF
5970 rm -f conftest.$ac_objext
5971 if { (eval echo "$as_me:5971: \"$ac_compile\"") >&5
5972   (eval $ac_compile) 2>&5
5973   ac_status=$?
5974   echo "$as_me:5974: \$? = $ac_status" >&5
5975   (exit $ac_status); } &&
5976          { ac_try='test -s conftest.$ac_objext'
5977   { (eval echo "$as_me:5977: \"$ac_try\"") >&5
5978   (eval $ac_try) 2>&5
5979   ac_status=$?
5980   echo "$as_me:5980: \$? = $ac_status" >&5
5981   (exit $ac_status); }; }; then
5982   cf_cv_ncurses_h=$cf_header
5983
5984 else
5985   echo "$as_me: failed program was:" >&5
5986 cat conftest.$ac_ext >&5
5987 cf_cv_ncurses_h=no
5988 fi
5989 rm -f conftest.$ac_objext conftest.$ac_ext
5990
5991                 test "$cf_cv_ncurses_h" != no && break
5992         done
5993
5994 fi
5995 echo "$as_me:5995: result: $cf_cv_ncurses_h" >&5
5996 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5997
5998 if test "$cf_cv_ncurses_h" != no ; then
5999         cf_cv_ncurses_header=$cf_cv_ncurses_h
6000 else
6001
6002 echo "$as_me:6002: checking for $cf_ncuhdr_root include-path" >&5
6003 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6004 if test "${cf_cv_ncurses_h2+set}" = set; then
6005   echo $ECHO_N "(cached) $ECHO_C" >&6
6006 else
6007
6008         test -n "$verbose" && echo
6009
6010 cf_search=
6011
6012 # collect the current set of include-directories from compiler flags
6013 cf_header_path_list=""
6014 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6015         for cf_header_path in $CPPFLAGS $CFLAGS
6016         do
6017                 case $cf_header_path in #(vi
6018                 -I*)
6019                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6020
6021 test "$cf_header_path" != "NONE" && \
6022 test -d "$cf_header_path" && \
6023  {
6024         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
6025         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
6026         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6027         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6028         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6029         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"
6030 }
6031
6032                         cf_header_path_list="$cf_header_path_list $cf_search"
6033                         ;;
6034                 esac
6035         done
6036 fi
6037
6038 # add the variations for the package we are looking for
6039
6040 cf_search=
6041
6042 test "/usr" != "$prefix" && \
6043 test -d "/usr" && \
6044 (test $prefix = NONE || test "/usr" != "$prefix") && {
6045         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
6046         test -d /usr/include &&          cf_search="$cf_search /usr/include"
6047         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
6048         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
6049         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
6050         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6051 }
6052
6053 test "$prefix" != "NONE" && \
6054 test -d "$prefix" && \
6055  {
6056         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
6057         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6058         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6059         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6060         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6061         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6062 }
6063
6064 test "/usr/local" != "$prefix" && \
6065 test -d "/usr/local" && \
6066 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6067         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
6068         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
6069         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
6070         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
6071         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
6072         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6073 }
6074
6075 test "/opt" != "$prefix" && \
6076 test -d "/opt" && \
6077 (test $prefix = NONE || test "/opt" != "$prefix") && {
6078         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
6079         test -d /opt/include &&          cf_search="$cf_search /opt/include"
6080         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
6081         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
6082         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
6083         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6084 }
6085
6086 test "$HOME" != "$prefix" && \
6087 test -d "$HOME" && \
6088 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6089         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
6090         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
6091         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
6092         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
6093         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
6094         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6095 }
6096
6097 test "$includedir" != NONE && \
6098 test "$includedir" != "/usr/include" && \
6099 test -d "$includedir" && {
6100         test -d $includedir &&    cf_search="$cf_search $includedir"
6101         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6102 }
6103
6104 test "$oldincludedir" != NONE && \
6105 test "$oldincludedir" != "/usr/include" && \
6106 test -d "$oldincludedir" && {
6107         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6108         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6109 }
6110
6111 cf_search="$cf_search $cf_header_path_list"
6112
6113         test -n "$verbose" && echo search path $cf_search
6114         cf_save2_CPPFLAGS="$CPPFLAGS"
6115         for cf_incdir in $cf_search
6116         do
6117
6118 if test -n "$cf_incdir" ; then
6119   for cf_add_incdir in $cf_incdir
6120   do
6121         while test $cf_add_incdir != /usr/include
6122         do
6123           if test -d $cf_add_incdir
6124           then
6125                 cf_have_incdir=no
6126                 if test -n "$CFLAGS$CPPFLAGS" ; then
6127                   # a loop is needed to ensure we can add subdirs of existing dirs
6128                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6129                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6130                           cf_have_incdir=yes; break
6131                         fi
6132                   done
6133                 fi
6134
6135                 if test "$cf_have_incdir" = no ; then
6136                   if test "$cf_add_incdir" = /usr/local/include ; then
6137                         if test "$GCC" = yes
6138                         then
6139                           cf_save_CPPFLAGS=$CPPFLAGS
6140                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6141                           cat >conftest.$ac_ext <<_ACEOF
6142 #line 6142 "configure"
6143 #include "confdefs.h"
6144 #include <stdio.h>
6145 int
6146 main ()
6147 {
6148 printf("Hello")
6149   ;
6150   return 0;
6151 }
6152 _ACEOF
6153 rm -f conftest.$ac_objext
6154 if { (eval echo "$as_me:6154: \"$ac_compile\"") >&5
6155   (eval $ac_compile) 2>&5
6156   ac_status=$?
6157   echo "$as_me:6157: \$? = $ac_status" >&5
6158   (exit $ac_status); } &&
6159          { ac_try='test -s conftest.$ac_objext'
6160   { (eval echo "$as_me:6160: \"$ac_try\"") >&5
6161   (eval $ac_try) 2>&5
6162   ac_status=$?
6163   echo "$as_me:6163: \$? = $ac_status" >&5
6164   (exit $ac_status); }; }; then
6165   :
6166 else
6167   echo "$as_me: failed program was:" >&5
6168 cat conftest.$ac_ext >&5
6169 cf_have_incdir=yes
6170 fi
6171 rm -f conftest.$ac_objext conftest.$ac_ext
6172                           CPPFLAGS=$cf_save_CPPFLAGS
6173                         fi
6174                   fi
6175                 fi
6176
6177                 if test "$cf_have_incdir" = no ; then
6178                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6179
6180 echo "${as_me-configure}:6180: testing adding $cf_add_incdir to include-path ..." 1>&5
6181
6182                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6183
6184                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6185                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6186                   cf_add_incdir="$cf_top_incdir"
6187                 else
6188                   break
6189                 fi
6190           fi
6191         done
6192   done
6193 fi
6194
6195                 for cf_header in \
6196                         ncurses.h \
6197                         curses.h
6198                 do
6199
6200         cat >conftest.$ac_ext <<_ACEOF
6201 #line 6201 "configure"
6202 #include "confdefs.h"
6203
6204 #include <$cf_header>
6205 int
6206 main ()
6207 {
6208
6209 #ifdef NCURSES_VERSION
6210
6211 printf("%s\n", NCURSES_VERSION);
6212 #else
6213 #ifdef __NCURSES_H
6214 printf("old\n");
6215 #else
6216         make an error
6217 #endif
6218 #endif
6219
6220   ;
6221   return 0;
6222 }
6223 _ACEOF
6224 rm -f conftest.$ac_objext
6225 if { (eval echo "$as_me:6225: \"$ac_compile\"") >&5
6226   (eval $ac_compile) 2>&5
6227   ac_status=$?
6228   echo "$as_me:6228: \$? = $ac_status" >&5
6229   (exit $ac_status); } &&
6230          { ac_try='test -s conftest.$ac_objext'
6231   { (eval echo "$as_me:6231: \"$ac_try\"") >&5
6232   (eval $ac_try) 2>&5
6233   ac_status=$?
6234   echo "$as_me:6234: \$? = $ac_status" >&5
6235   (exit $ac_status); }; }; then
6236   cf_cv_ncurses_h2=$cf_header
6237
6238 else
6239   echo "$as_me: failed program was:" >&5
6240 cat conftest.$ac_ext >&5
6241 cf_cv_ncurses_h2=no
6242 fi
6243 rm -f conftest.$ac_objext conftest.$ac_ext
6244
6245                         if test "$cf_cv_ncurses_h2" != no ; then
6246                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6247                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
6248                                 break
6249                         fi
6250                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
6251                 done
6252                 CPPFLAGS="$cf_save2_CPPFLAGS"
6253                 test "$cf_cv_ncurses_h2" != no && break
6254         done
6255         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6255: error: not found" >&5
6256 echo "$as_me: error: not found" >&2;}
6257    { (exit 1); exit 1; }; }
6258
6259 fi
6260 echo "$as_me:6260: result: $cf_cv_ncurses_h2" >&5
6261 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6262
6263         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6264         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6265         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6266                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6267         fi
6268
6269 if test -n "$cf_1st_incdir" ; then
6270   for cf_add_incdir in $cf_1st_incdir
6271   do
6272         while test $cf_add_incdir != /usr/include
6273         do
6274           if test -d $cf_add_incdir
6275           then
6276                 cf_have_incdir=no
6277                 if test -n "$CFLAGS$CPPFLAGS" ; then
6278                   # a loop is needed to ensure we can add subdirs of existing dirs
6279                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6280                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6281                           cf_have_incdir=yes; break
6282                         fi
6283                   done
6284                 fi
6285
6286                 if test "$cf_have_incdir" = no ; then
6287                   if test "$cf_add_incdir" = /usr/local/include ; then
6288                         if test "$GCC" = yes
6289                         then
6290                           cf_save_CPPFLAGS=$CPPFLAGS
6291                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6292                           cat >conftest.$ac_ext <<_ACEOF
6293 #line 6293 "configure"
6294 #include "confdefs.h"
6295 #include <stdio.h>
6296 int
6297 main ()
6298 {
6299 printf("Hello")
6300   ;
6301   return 0;
6302 }
6303 _ACEOF
6304 rm -f conftest.$ac_objext
6305 if { (eval echo "$as_me:6305: \"$ac_compile\"") >&5
6306   (eval $ac_compile) 2>&5
6307   ac_status=$?
6308   echo "$as_me:6308: \$? = $ac_status" >&5
6309   (exit $ac_status); } &&
6310          { ac_try='test -s conftest.$ac_objext'
6311   { (eval echo "$as_me:6311: \"$ac_try\"") >&5
6312   (eval $ac_try) 2>&5
6313   ac_status=$?
6314   echo "$as_me:6314: \$? = $ac_status" >&5
6315   (exit $ac_status); }; }; then
6316   :
6317 else
6318   echo "$as_me: failed program was:" >&5
6319 cat conftest.$ac_ext >&5
6320 cf_have_incdir=yes
6321 fi
6322 rm -f conftest.$ac_objext conftest.$ac_ext
6323                           CPPFLAGS=$cf_save_CPPFLAGS
6324                         fi
6325                   fi
6326                 fi
6327
6328                 if test "$cf_have_incdir" = no ; then
6329                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6330
6331 echo "${as_me-configure}:6331: testing adding $cf_add_incdir to include-path ..." 1>&5
6332
6333                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6334
6335                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6336                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6337                   cf_add_incdir="$cf_top_incdir"
6338                 else
6339                   break
6340                 fi
6341           fi
6342         done
6343   done
6344 fi
6345
6346 fi
6347
6348 # Set definitions to allow ifdef'ing for ncurses.h
6349
6350 case $cf_cv_ncurses_header in # (vi
6351 *ncurses.h)
6352         cat >>confdefs.h <<\EOF
6353 #define HAVE_NCURSES_H 1
6354 EOF
6355
6356         ;;
6357 esac
6358
6359 case $cf_cv_ncurses_header in # (vi
6360 ncurses/curses.h|ncurses/ncurses.h)
6361         cat >>confdefs.h <<\EOF
6362 #define HAVE_NCURSES_NCURSES_H 1
6363 EOF
6364
6365         ;;
6366 ncursesw/curses.h|ncursesw/ncurses.h)
6367         cat >>confdefs.h <<\EOF
6368 #define HAVE_NCURSESW_NCURSES_H 1
6369 EOF
6370
6371         ;;
6372 esac
6373
6374 echo "$as_me:6374: checking for terminfo header" >&5
6375 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6376 if test "${cf_cv_term_header+set}" = set; then
6377   echo $ECHO_N "(cached) $ECHO_C" >&6
6378 else
6379
6380 case ${cf_cv_ncurses_header} in #(vi
6381 */ncurses.h|*/ncursesw.h) #(vi
6382         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6383         ;;
6384 *)
6385         cf_term_header=term.h
6386         ;;
6387 esac
6388
6389 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6390 do
6391 cat >conftest.$ac_ext <<_ACEOF
6392 #line 6392 "configure"
6393 #include "confdefs.h"
6394 #include <stdio.h>
6395 #include <${cf_cv_ncurses_header-curses.h}>
6396 #include <$cf_test>
6397
6398 int
6399 main ()
6400 {
6401 int x = auto_left_margin
6402   ;
6403   return 0;
6404 }
6405 _ACEOF
6406 rm -f conftest.$ac_objext
6407 if { (eval echo "$as_me:6407: \"$ac_compile\"") >&5
6408   (eval $ac_compile) 2>&5
6409   ac_status=$?
6410   echo "$as_me:6410: \$? = $ac_status" >&5
6411   (exit $ac_status); } &&
6412          { ac_try='test -s conftest.$ac_objext'
6413   { (eval echo "$as_me:6413: \"$ac_try\"") >&5
6414   (eval $ac_try) 2>&5
6415   ac_status=$?
6416   echo "$as_me:6416: \$? = $ac_status" >&5
6417   (exit $ac_status); }; }; then
6418
6419         cf_cv_term_header="$cf_test"
6420 else
6421   echo "$as_me: failed program was:" >&5
6422 cat conftest.$ac_ext >&5
6423
6424         cf_cv_term_header=unknown
6425
6426 fi
6427 rm -f conftest.$ac_objext conftest.$ac_ext
6428         test "$cf_cv_term_header" != unknown && break
6429 done
6430
6431 fi
6432 echo "$as_me:6432: result: $cf_cv_term_header" >&5
6433 echo "${ECHO_T}$cf_cv_term_header" >&6
6434
6435 # Set definitions to allow ifdef'ing to accommodate subdirectories
6436
6437 case $cf_cv_term_header in # (vi
6438 *term.h)
6439         cat >>confdefs.h <<\EOF
6440 #define HAVE_TERM_H 1
6441 EOF
6442
6443         ;;
6444 esac
6445
6446 case $cf_cv_term_header in # (vi
6447 ncurses/term.h) #(vi
6448         cat >>confdefs.h <<\EOF
6449 #define HAVE_NCURSES_TERM_H 1
6450 EOF
6451
6452         ;;
6453 ncursesw/term.h)
6454         cat >>confdefs.h <<\EOF
6455 #define HAVE_NCURSESW_TERM_H 1
6456 EOF
6457
6458         ;;
6459 esac
6460
6461 # some applications need this, but should check for NCURSES_VERSION
6462 cat >>confdefs.h <<\EOF
6463 #define NCURSES 1
6464 EOF
6465
6466 echo "$as_me:6466: checking for ncurses version" >&5
6467 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6468 if test "${cf_cv_ncurses_version+set}" = set; then
6469   echo $ECHO_N "(cached) $ECHO_C" >&6
6470 else
6471
6472         cf_cv_ncurses_version=no
6473         cf_tempfile=out$$
6474         rm -f $cf_tempfile
6475         if test "$cross_compiling" = yes; then
6476
6477         # This will not work if the preprocessor splits the line after the
6478         # Autoconf token.  The 'unproto' program does that.
6479         cat > conftest.$ac_ext <<EOF
6480 #include <${cf_cv_ncurses_header-curses.h}>
6481 #undef Autoconf
6482 #ifdef NCURSES_VERSION
6483 Autoconf NCURSES_VERSION
6484 #else
6485 #ifdef __NCURSES_H
6486 Autoconf "old"
6487 #endif
6488 ;
6489 #endif
6490 EOF
6491         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6492         { (eval echo "$as_me:6492: \"$cf_try\"") >&5
6493   (eval $cf_try) 2>&5
6494   ac_status=$?
6495   echo "$as_me:6495: \$? = $ac_status" >&5
6496   (exit $ac_status); }
6497         if test -f conftest.out ; then
6498                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6499                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6500                 rm -f conftest.out
6501         fi
6502
6503 else
6504   cat >conftest.$ac_ext <<_ACEOF
6505 #line 6505 "configure"
6506 #include "confdefs.h"
6507
6508 #include <${cf_cv_ncurses_header-curses.h}>
6509 #include <stdio.h>
6510 int main()
6511 {
6512         FILE *fp = fopen("$cf_tempfile", "w");
6513 #ifdef NCURSES_VERSION
6514 # ifdef NCURSES_VERSION_PATCH
6515         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6516 # else
6517         fprintf(fp, "%s\n", NCURSES_VERSION);
6518 # endif
6519 #else
6520 # ifdef __NCURSES_H
6521         fprintf(fp, "old\n");
6522 # else
6523         make an error
6524 # endif
6525 #endif
6526         ${cf_cv_main_return-return}(0);
6527 }
6528 _ACEOF
6529 rm -f conftest$ac_exeext
6530 if { (eval echo "$as_me:6530: \"$ac_link\"") >&5
6531   (eval $ac_link) 2>&5
6532   ac_status=$?
6533   echo "$as_me:6533: \$? = $ac_status" >&5
6534   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6535   { (eval echo "$as_me:6535: \"$ac_try\"") >&5
6536   (eval $ac_try) 2>&5
6537   ac_status=$?
6538   echo "$as_me:6538: \$? = $ac_status" >&5
6539   (exit $ac_status); }; }; then
6540
6541         cf_cv_ncurses_version=`cat $cf_tempfile`
6542 else
6543   echo "$as_me: program exited with status $ac_status" >&5
6544 echo "$as_me: failed program was:" >&5
6545 cat conftest.$ac_ext >&5
6546 fi
6547 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6548 fi
6549         rm -f $cf_tempfile
6550
6551 fi
6552 echo "$as_me:6552: result: $cf_cv_ncurses_version" >&5
6553 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6554 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
6555 #define NCURSES 1
6556 EOF
6557
6558 cf_nculib_root=ncurses
6559         # This works, except for the special case where we find gpm, but
6560         # ncurses is in a nonstandard location via $LIBS, and we really want
6561         # to link gpm.
6562 cf_ncurses_LIBS=""
6563 cf_ncurses_SAVE="$LIBS"
6564 echo "$as_me:6564: checking for Gpm_Open in -lgpm" >&5
6565 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6566 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6567   echo $ECHO_N "(cached) $ECHO_C" >&6
6568 else
6569   ac_check_lib_save_LIBS=$LIBS
6570 LIBS="-lgpm  $LIBS"
6571 cat >conftest.$ac_ext <<_ACEOF
6572 #line 6572 "configure"
6573 #include "confdefs.h"
6574
6575 /* Override any gcc2 internal prototype to avoid an error.  */
6576 #ifdef __cplusplus
6577 extern "C"
6578 #endif
6579 /* We use char because int might match the return type of a gcc2
6580    builtin and then its argument prototype would still apply.  */
6581 char Gpm_Open ();
6582 int
6583 main ()
6584 {
6585 Gpm_Open ();
6586   ;
6587   return 0;
6588 }
6589 _ACEOF
6590 rm -f conftest.$ac_objext conftest$ac_exeext
6591 if { (eval echo "$as_me:6591: \"$ac_link\"") >&5
6592   (eval $ac_link) 2>&5
6593   ac_status=$?
6594   echo "$as_me:6594: \$? = $ac_status" >&5
6595   (exit $ac_status); } &&
6596          { ac_try='test -s conftest$ac_exeext'
6597   { (eval echo "$as_me:6597: \"$ac_try\"") >&5
6598   (eval $ac_try) 2>&5
6599   ac_status=$?
6600   echo "$as_me:6600: \$? = $ac_status" >&5
6601   (exit $ac_status); }; }; then
6602   ac_cv_lib_gpm_Gpm_Open=yes
6603 else
6604   echo "$as_me: failed program was:" >&5
6605 cat conftest.$ac_ext >&5
6606 ac_cv_lib_gpm_Gpm_Open=no
6607 fi
6608 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6609 LIBS=$ac_check_lib_save_LIBS
6610 fi
6611 echo "$as_me:6611: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6612 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6613 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6614   echo "$as_me:6614: checking for initscr in -lgpm" >&5
6615 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6616 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6617   echo $ECHO_N "(cached) $ECHO_C" >&6
6618 else
6619   ac_check_lib_save_LIBS=$LIBS
6620 LIBS="-lgpm  $LIBS"
6621 cat >conftest.$ac_ext <<_ACEOF
6622 #line 6622 "configure"
6623 #include "confdefs.h"
6624
6625 /* Override any gcc2 internal prototype to avoid an error.  */
6626 #ifdef __cplusplus
6627 extern "C"
6628 #endif
6629 /* We use char because int might match the return type of a gcc2
6630    builtin and then its argument prototype would still apply.  */
6631 char initscr ();
6632 int
6633 main ()
6634 {
6635 initscr ();
6636   ;
6637   return 0;
6638 }
6639 _ACEOF
6640 rm -f conftest.$ac_objext conftest$ac_exeext
6641 if { (eval echo "$as_me:6641: \"$ac_link\"") >&5
6642   (eval $ac_link) 2>&5
6643   ac_status=$?
6644   echo "$as_me:6644: \$? = $ac_status" >&5
6645   (exit $ac_status); } &&
6646          { ac_try='test -s conftest$ac_exeext'
6647   { (eval echo "$as_me:6647: \"$ac_try\"") >&5
6648   (eval $ac_try) 2>&5
6649   ac_status=$?
6650   echo "$as_me:6650: \$? = $ac_status" >&5
6651   (exit $ac_status); }; }; then
6652   ac_cv_lib_gpm_initscr=yes
6653 else
6654   echo "$as_me: failed program was:" >&5
6655 cat conftest.$ac_ext >&5
6656 ac_cv_lib_gpm_initscr=no
6657 fi
6658 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6659 LIBS=$ac_check_lib_save_LIBS
6660 fi
6661 echo "$as_me:6661: result: $ac_cv_lib_gpm_initscr" >&5
6662 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6663 if test $ac_cv_lib_gpm_initscr = yes; then
6664   LIBS="$cf_ncurses_SAVE"
6665 else
6666   cf_ncurses_LIBS="-lgpm"
6667 fi
6668
6669 fi
6670
6671 case $host_os in #(vi
6672 freebsd*)
6673         # This is only necessary if you are linking against an obsolete
6674         # version of ncurses (but it should do no harm, since it's static).
6675         if test "$cf_nculib_root" = ncurses ; then
6676                 echo "$as_me:6676: checking for tgoto in -lmytinfo" >&5
6677 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6678 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6679   echo $ECHO_N "(cached) $ECHO_C" >&6
6680 else
6681   ac_check_lib_save_LIBS=$LIBS
6682 LIBS="-lmytinfo  $LIBS"
6683 cat >conftest.$ac_ext <<_ACEOF
6684 #line 6684 "configure"
6685 #include "confdefs.h"
6686
6687 /* Override any gcc2 internal prototype to avoid an error.  */
6688 #ifdef __cplusplus
6689 extern "C"
6690 #endif
6691 /* We use char because int might match the return type of a gcc2
6692    builtin and then its argument prototype would still apply.  */
6693 char tgoto ();
6694 int
6695 main ()
6696 {
6697 tgoto ();
6698   ;
6699   return 0;
6700 }
6701 _ACEOF
6702 rm -f conftest.$ac_objext conftest$ac_exeext
6703 if { (eval echo "$as_me:6703: \"$ac_link\"") >&5
6704   (eval $ac_link) 2>&5
6705   ac_status=$?
6706   echo "$as_me:6706: \$? = $ac_status" >&5
6707   (exit $ac_status); } &&
6708          { ac_try='test -s conftest$ac_exeext'
6709   { (eval echo "$as_me:6709: \"$ac_try\"") >&5
6710   (eval $ac_try) 2>&5
6711   ac_status=$?
6712   echo "$as_me:6712: \$? = $ac_status" >&5
6713   (exit $ac_status); }; }; then
6714   ac_cv_lib_mytinfo_tgoto=yes
6715 else
6716   echo "$as_me: failed program was:" >&5
6717 cat conftest.$ac_ext >&5
6718 ac_cv_lib_mytinfo_tgoto=no
6719 fi
6720 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6721 LIBS=$ac_check_lib_save_LIBS
6722 fi
6723 echo "$as_me:6723: result: $ac_cv_lib_mytinfo_tgoto" >&5
6724 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6725 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6726   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6727 fi
6728
6729         fi
6730         ;;
6731 esac
6732
6733 LIBS="$cf_ncurses_LIBS $LIBS"
6734
6735 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
6736 then
6737
6738 if test -n "$cf_cv_curses_dir/lib" ; then
6739   for cf_add_libdir in $cf_cv_curses_dir/lib
6740   do
6741     if test $cf_add_libdir = /usr/lib ; then
6742       :
6743     elif test -d $cf_add_libdir
6744     then
6745       cf_have_libdir=no
6746       if test -n "$LDFLAGS$LIBS" ; then
6747         # a loop is needed to ensure we can add subdirs of existing dirs
6748         for cf_test_libdir in $LDFLAGS $LIBS ; do
6749           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6750             cf_have_libdir=yes; break
6751           fi
6752         done
6753       fi
6754       if test "$cf_have_libdir" = no ; then
6755         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
6756
6757 echo "${as_me-configure}:6757: testing adding $cf_add_libdir to library-path ..." 1>&5
6758
6759         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6760       fi
6761     fi
6762   done
6763 fi
6764
6765         LIBS="-l$cf_nculib_root $LIBS"
6766 else
6767
6768         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
6769         cf_libdir=""
6770         echo "$as_me:6770: checking for initscr" >&5
6771 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6772 if test "${ac_cv_func_initscr+set}" = set; then
6773   echo $ECHO_N "(cached) $ECHO_C" >&6
6774 else
6775   cat >conftest.$ac_ext <<_ACEOF
6776 #line 6776 "configure"
6777 #include "confdefs.h"
6778 /* System header to define __stub macros and hopefully few prototypes,
6779     which can conflict with char initscr (); below.  */
6780 #include <assert.h>
6781 /* Override any gcc2 internal prototype to avoid an error.  */
6782 #ifdef __cplusplus
6783 extern "C"
6784 #endif
6785 /* We use char because int might match the return type of a gcc2
6786    builtin and then its argument prototype would still apply.  */
6787 char initscr ();
6788 char (*f) ();
6789
6790 int
6791 main ()
6792 {
6793 /* The GNU C library defines this for functions which it implements
6794     to always fail with ENOSYS.  Some functions are actually named
6795     something starting with __ and the normal name is an alias.  */
6796 #if defined (__stub_initscr) || defined (__stub___initscr)
6797 choke me
6798 #else
6799 f = initscr;
6800 #endif
6801
6802   ;
6803   return 0;
6804 }
6805 _ACEOF
6806 rm -f conftest.$ac_objext conftest$ac_exeext
6807 if { (eval echo "$as_me:6807: \"$ac_link\"") >&5
6808   (eval $ac_link) 2>&5
6809   ac_status=$?
6810   echo "$as_me:6810: \$? = $ac_status" >&5
6811   (exit $ac_status); } &&
6812          { ac_try='test -s conftest$ac_exeext'
6813   { (eval echo "$as_me:6813: \"$ac_try\"") >&5
6814   (eval $ac_try) 2>&5
6815   ac_status=$?
6816   echo "$as_me:6816: \$? = $ac_status" >&5
6817   (exit $ac_status); }; }; then
6818   ac_cv_func_initscr=yes
6819 else
6820   echo "$as_me: failed program was:" >&5
6821 cat conftest.$ac_ext >&5
6822 ac_cv_func_initscr=no
6823 fi
6824 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6825 fi
6826 echo "$as_me:6826: result: $ac_cv_func_initscr" >&5
6827 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6828 if test $ac_cv_func_initscr = yes; then
6829   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6830 else
6831
6832                 cf_save_LIBS="$LIBS"
6833                 echo "$as_me:6833: checking for initscr in -l$cf_nculib_root" >&5
6834 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6835                 LIBS="-l$cf_nculib_root $LIBS"
6836                 cat >conftest.$ac_ext <<_ACEOF
6837 #line 6837 "configure"
6838 #include "confdefs.h"
6839 #include <${cf_cv_ncurses_header-curses.h}>
6840 int
6841 main ()
6842 {
6843 initscr()
6844   ;
6845   return 0;
6846 }
6847 _ACEOF
6848 rm -f conftest.$ac_objext conftest$ac_exeext
6849 if { (eval echo "$as_me:6849: \"$ac_link\"") >&5
6850   (eval $ac_link) 2>&5
6851   ac_status=$?
6852   echo "$as_me:6852: \$? = $ac_status" >&5
6853   (exit $ac_status); } &&
6854          { ac_try='test -s conftest$ac_exeext'
6855   { (eval echo "$as_me:6855: \"$ac_try\"") >&5
6856   (eval $ac_try) 2>&5
6857   ac_status=$?
6858   echo "$as_me:6858: \$? = $ac_status" >&5
6859   (exit $ac_status); }; }; then
6860   echo "$as_me:6860: result: yes" >&5
6861 echo "${ECHO_T}yes" >&6
6862                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6863
6864 else
6865   echo "$as_me: failed program was:" >&5
6866 cat conftest.$ac_ext >&5
6867 echo "$as_me:6867: result: no" >&5
6868 echo "${ECHO_T}no" >&6
6869
6870 cf_search=
6871 cf_library_path_list=""
6872 if test -n "${LDFLAGS}${LIBS}" ; then
6873         for cf_library_path in $LDFLAGS $LIBS
6874         do
6875                 case $cf_library_path in #(vi
6876                 -L*)
6877                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6878
6879 test "$cf_library_path" != "NONE" && \
6880 test -d "$cf_library_path" && \
6881  {
6882         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
6883         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
6884         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6885         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6886         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6887         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"
6888 }
6889
6890                         cf_library_path_list="$cf_library_path_list $cf_search"
6891                         ;;
6892                 esac
6893         done
6894 fi
6895
6896 cf_search=
6897
6898 test "/usr" != "$prefix" && \
6899 test -d "/usr" && \
6900 (test $prefix = NONE || test "/usr" != "$prefix") && {
6901         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
6902         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
6903         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
6904         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
6905         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
6906         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
6907 }
6908
6909 test "$prefix" != "NONE" && \
6910 test -d "$prefix" && \
6911  {
6912         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
6913         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
6914         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6915         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6916         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6917         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6918 }
6919
6920 test "/usr/local" != "$prefix" && \
6921 test -d "/usr/local" && \
6922 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6923         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
6924         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
6925         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
6926         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
6927         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
6928         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
6929 }
6930
6931 test "/opt" != "$prefix" && \
6932 test -d "/opt" && \
6933 (test $prefix = NONE || test "/opt" != "$prefix") && {
6934         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
6935         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
6936         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
6937         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
6938         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
6939         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
6940 }
6941
6942 test "$HOME" != "$prefix" && \
6943 test -d "$HOME" && \
6944 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6945         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
6946         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
6947         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
6948         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
6949         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
6950         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
6951 }
6952
6953 cf_search="$cf_library_path_list $cf_search"
6954
6955                         for cf_libdir in $cf_search
6956                         do
6957                                 echo "$as_me:6957: checking for -l$cf_nculib_root in $cf_libdir" >&5
6958 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6959                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6960                                 cat >conftest.$ac_ext <<_ACEOF
6961 #line 6961 "configure"
6962 #include "confdefs.h"
6963 #include <${cf_cv_ncurses_header-curses.h}>
6964 int
6965 main ()
6966 {
6967 initscr()
6968   ;
6969   return 0;
6970 }
6971 _ACEOF
6972 rm -f conftest.$ac_objext conftest$ac_exeext
6973 if { (eval echo "$as_me:6973: \"$ac_link\"") >&5
6974   (eval $ac_link) 2>&5
6975   ac_status=$?
6976   echo "$as_me:6976: \$? = $ac_status" >&5
6977   (exit $ac_status); } &&
6978          { ac_try='test -s conftest$ac_exeext'
6979   { (eval echo "$as_me:6979: \"$ac_try\"") >&5
6980   (eval $ac_try) 2>&5
6981   ac_status=$?
6982   echo "$as_me:6982: \$? = $ac_status" >&5
6983   (exit $ac_status); }; }; then
6984   echo "$as_me:6984: result: yes" >&5
6985 echo "${ECHO_T}yes" >&6
6986                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6987                                          break
6988 else
6989   echo "$as_me: failed program was:" >&5
6990 cat conftest.$ac_ext >&5
6991 echo "$as_me:6991: result: no" >&5
6992 echo "${ECHO_T}no" >&6
6993                                          LIBS="$cf_save_LIBS"
6994 fi
6995 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6996                         done
6997
6998 fi
6999 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7000
7001 fi
7002
7003 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7004
7005 if test $cf_found_library = no ; then
7006         { { echo "$as_me:7006: error: Cannot link $cf_nculib_root library" >&5
7007 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7008    { (exit 1); exit 1; }; }
7009 fi
7010
7011 fi
7012
7013 if test -n "$cf_ncurses_LIBS" ; then
7014         echo "$as_me:7014: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7015 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7016         cf_ncurses_SAVE="$LIBS"
7017         for p in $cf_ncurses_LIBS ; do
7018                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7019                 if test "$q" != "$LIBS" ; then
7020                         LIBS="$q"
7021                 fi
7022         done
7023         cat >conftest.$ac_ext <<_ACEOF
7024 #line 7024 "configure"
7025 #include "confdefs.h"
7026 #include <${cf_cv_ncurses_header-curses.h}>
7027 int
7028 main ()
7029 {
7030 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7031   ;
7032   return 0;
7033 }
7034 _ACEOF
7035 rm -f conftest.$ac_objext conftest$ac_exeext
7036 if { (eval echo "$as_me:7036: \"$ac_link\"") >&5
7037   (eval $ac_link) 2>&5
7038   ac_status=$?
7039   echo "$as_me:7039: \$? = $ac_status" >&5
7040   (exit $ac_status); } &&
7041          { ac_try='test -s conftest$ac_exeext'
7042   { (eval echo "$as_me:7042: \"$ac_try\"") >&5
7043   (eval $ac_try) 2>&5
7044   ac_status=$?
7045   echo "$as_me:7045: \$? = $ac_status" >&5
7046   (exit $ac_status); }; }; then
7047   echo "$as_me:7047: result: yes" >&5
7048 echo "${ECHO_T}yes" >&6
7049 else
7050   echo "$as_me: failed program was:" >&5
7051 cat conftest.$ac_ext >&5
7052 echo "$as_me:7052: result: no" >&5
7053 echo "${ECHO_T}no" >&6
7054                  LIBS="$cf_ncurses_SAVE"
7055 fi
7056 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7057 fi
7058
7059 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7060
7061 cat >>confdefs.h <<EOF
7062 #define $cf_nculib_ROOT 1
7063 EOF
7064
7065 fi
7066
7067 fi
7068
7069 if test "$NCURSES_CONFIG" != none ; then
7070
7071 cf_version=`$NCURSES_CONFIG --version`
7072
7073 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
7074 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9]\+\.//' -e 's/\..*//'`
7075 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9]\+\.[0-9]\+\.//'`
7076
7077 # ABI version is not available from headers
7078 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version`
7079
7080 else
7081
7082 for cf_name in MAJOR MINOR PATCH
7083 do
7084 cat >conftest.$ac_ext <<CF_EOF
7085 #include <${cf_cv_ncurses_header-curses.h}>
7086 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
7087 CF_EOF
7088         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
7089         { (eval echo "$as_me:7089: \"$cf_try\"") >&5
7090   (eval $cf_try) 2>&5
7091   ac_status=$?
7092   echo "$as_me:7092: \$? = $ac_status" >&5
7093   (exit $ac_status); }
7094         if test -f conftest.out ; then
7095                 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[   ]\+//"`
7096                 eval NCURSES_$cf_name=$cf_result
7097                 cat conftest.$ac_ext
7098                 cat conftest.out
7099         fi
7100 done
7101
7102 cf_cv_abi_version=${NCURSES_MAJOR}
7103
7104 fi
7105
7106 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
7107
7108 cf_cv_timestamp=`date`
7109
7110 echo "$as_me:7110: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
7111 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
7112
7113         case $cf_cv_system_name in #(vi
7114         OS/2*|os2*) #(vi
7115         LIB_PREFIX=''
7116         ;;
7117         *)      LIB_PREFIX='lib'
7118         ;;
7119         esac
7120 cf_prefix=$LIB_PREFIX
7121
7122 LIB_PREFIX=$cf_prefix
7123
7124 LIB_SUFFIX=
7125
7126 ###############################################################################
7127
7128 if test X"$CC_G_OPT" = X"" ; then
7129         CC_G_OPT='-g'
7130         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
7131 fi
7132
7133 echo "$as_me:7133: checking for default loader flags" >&5
7134 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
7135 case $DFT_LWR_MODEL in
7136 normal)  LD_MODEL=''   ;;
7137 debug)   LD_MODEL=$CC_G_OPT ;;
7138 profile) LD_MODEL='-pg';;
7139 shared)  LD_MODEL=''   ;;
7140 esac
7141 echo "$as_me:7141: result: $LD_MODEL" >&5
7142 echo "${ECHO_T}$LD_MODEL" >&6
7143
7144 LD_RPATH_OPT=
7145 echo "$as_me:7145: checking for an rpath option" >&5
7146 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
7147 case $cf_cv_system_name in #(vi
7148 irix*) #(vi
7149         if test "$GCC" = yes; then
7150                 LD_RPATH_OPT="-Wl,-rpath,"
7151         else
7152                 LD_RPATH_OPT="-rpath "
7153         fi
7154         ;;
7155 linux*|gnu*|k*bsd*-gnu) #(vi
7156         LD_RPATH_OPT="-Wl,-rpath,"
7157         ;;
7158 openbsd[2-9].*) #(vi
7159         LD_RPATH_OPT="-Wl,-rpath,"
7160         ;;
7161 freebsd*) #(vi
7162         LD_RPATH_OPT="-rpath "
7163         ;;
7164 netbsd*) #(vi
7165         LD_RPATH_OPT="-Wl,-rpath,"
7166         ;;
7167 osf*|mls+*) #(vi
7168         LD_RPATH_OPT="-rpath "
7169         ;;
7170 solaris2*) #(vi
7171         LD_RPATH_OPT="-R"
7172         ;;
7173 *)
7174         ;;
7175 esac
7176 echo "$as_me:7176: result: $LD_RPATH_OPT" >&5
7177 echo "${ECHO_T}$LD_RPATH_OPT" >&6
7178
7179 case "x$LD_RPATH_OPT" in #(vi
7180 x-R*)
7181         echo "$as_me:7181: checking if we need a space after rpath option" >&5
7182 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
7183         cf_save_LIBS="$LIBS"
7184         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
7185         cat >conftest.$ac_ext <<_ACEOF
7186 #line 7186 "configure"
7187 #include "confdefs.h"
7188
7189 int
7190 main ()
7191 {
7192
7193   ;
7194   return 0;
7195 }
7196 _ACEOF
7197 rm -f conftest.$ac_objext conftest$ac_exeext
7198 if { (eval echo "$as_me:7198: \"$ac_link\"") >&5
7199   (eval $ac_link) 2>&5
7200   ac_status=$?
7201   echo "$as_me:7201: \$? = $ac_status" >&5
7202   (exit $ac_status); } &&
7203          { ac_try='test -s conftest$ac_exeext'
7204   { (eval echo "$as_me:7204: \"$ac_try\"") >&5
7205   (eval $ac_try) 2>&5
7206   ac_status=$?
7207   echo "$as_me:7207: \$? = $ac_status" >&5
7208   (exit $ac_status); }; }; then
7209   cf_rpath_space=no
7210 else
7211   echo "$as_me: failed program was:" >&5
7212 cat conftest.$ac_ext >&5
7213 cf_rpath_space=yes
7214 fi
7215 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7216         LIBS="$cf_save_LIBS"
7217         echo "$as_me:7217: result: $cf_rpath_space" >&5
7218 echo "${ECHO_T}$cf_rpath_space" >&6
7219         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
7220         ;;
7221 esac
7222
7223         LOCAL_LDFLAGS=
7224         LOCAL_LDFLAGS2=
7225         LD_SHARED_OPTS=
7226         INSTALL_LIB="-m 644"
7227
7228         cf_cv_do_symlinks=no
7229         cf_ld_rpath_opt=
7230         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
7231
7232         echo "$as_me:7232: checking if release/abi version should be used for shared libs" >&5
7233 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
7234
7235 # Check whether --with-shlib-version or --without-shlib-version was given.
7236 if test "${with_shlib_version+set}" = set; then
7237   withval="$with_shlib_version"
7238   test -z "$withval" && withval=auto
7239         case $withval in #(vi
7240         yes) #(vi
7241                 cf_cv_shlib_version=auto
7242                 ;;
7243         rel|abi|auto|no) #(vi
7244                 cf_cv_shlib_version=$withval
7245                 ;;
7246         *)
7247                 { { echo "$as_me:7247: error: option value must be one of: rel, abi, auto or no" >&5
7248 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
7249    { (exit 1); exit 1; }; }
7250                 ;;
7251         esac
7252
7253 else
7254   cf_cv_shlib_version=auto
7255 fi;
7256         echo "$as_me:7256: result: $cf_cv_shlib_version" >&5
7257 echo "${ECHO_T}$cf_cv_shlib_version" >&6
7258
7259         cf_cv_rm_so_locs=no
7260
7261         # Some less-capable ports of gcc support only -fpic
7262         CC_SHARED_OPTS=
7263         if test "$GCC" = yes
7264         then
7265                 echo "$as_me:7265: checking which $CC option to use" >&5
7266 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
7267                 cf_save_CFLAGS="$CFLAGS"
7268                 for CC_SHARED_OPTS in -fPIC -fpic ''
7269                 do
7270                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
7271                         cat >conftest.$ac_ext <<_ACEOF
7272 #line 7272 "configure"
7273 #include "confdefs.h"
7274 #include <stdio.h>
7275 int
7276 main ()
7277 {
7278 int x = 1
7279   ;
7280   return 0;
7281 }
7282 _ACEOF
7283 rm -f conftest.$ac_objext
7284 if { (eval echo "$as_me:7284: \"$ac_compile\"") >&5
7285   (eval $ac_compile) 2>&5
7286   ac_status=$?
7287   echo "$as_me:7287: \$? = $ac_status" >&5
7288   (exit $ac_status); } &&
7289          { ac_try='test -s conftest.$ac_objext'
7290   { (eval echo "$as_me:7290: \"$ac_try\"") >&5
7291   (eval $ac_try) 2>&5
7292   ac_status=$?
7293   echo "$as_me:7293: \$? = $ac_status" >&5
7294   (exit $ac_status); }; }; then
7295   break
7296 else
7297   echo "$as_me: failed program was:" >&5
7298 cat conftest.$ac_ext >&5
7299 fi
7300 rm -f conftest.$ac_objext conftest.$ac_ext
7301                 done
7302                 echo "$as_me:7302: result: $CC_SHARED_OPTS" >&5
7303 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
7304                 CFLAGS="$cf_save_CFLAGS"
7305         fi
7306
7307         cf_cv_shlib_version_infix=no
7308
7309         case $cf_cv_system_name in #(vi
7310         aix[56]*) #(vi
7311                 if test "$GCC" = yes; then
7312                         CC_SHARED_OPTS=
7313                         MK_SHARED_LIB='$(CC) -shared'
7314                 fi
7315                 ;;
7316         beos*) #(vi
7317                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
7318                 ;;
7319         cygwin*) #(vi
7320                 CC_SHARED_OPTS=
7321                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
7322                 cf_cv_shlib_version=cygdll
7323                 cf_cv_shlib_version_infix=cygdll
7324                 cat >mk_shared_lib.sh <<-CF_EOF
7325                 #!/bin/sh
7326                 SHARED_LIB=\$1
7327                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
7328                 shift
7329                 cat <<-EOF
7330                 Linking shared library
7331                 ** SHARED_LIB \$SHARED_LIB
7332                 ** IMPORT_LIB \$IMPORT_LIB
7333 EOF
7334                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
7335 CF_EOF
7336                 chmod +x mk_shared_lib.sh
7337                 ;;
7338         darwin*) #(vi
7339                 EXTRA_CFLAGS="-no-cpp-precomp"
7340                 CC_SHARED_OPTS="-dynamic"
7341                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
7342                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
7343                 cf_cv_shlib_version_infix=yes
7344                 echo "$as_me:7344: checking if ld -search_paths_first works" >&5
7345 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
7346 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
7347   echo $ECHO_N "(cached) $ECHO_C" >&6
7348 else
7349
7350                         cf_save_LDFLAGS=$LDFLAGS
7351                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7352                         cat >conftest.$ac_ext <<_ACEOF
7353 #line 7353 "configure"
7354 #include "confdefs.h"
7355
7356 int
7357 main ()
7358 {
7359 int i;
7360   ;
7361   return 0;
7362 }
7363 _ACEOF
7364 rm -f conftest.$ac_objext conftest$ac_exeext
7365 if { (eval echo "$as_me:7365: \"$ac_link\"") >&5
7366   (eval $ac_link) 2>&5
7367   ac_status=$?
7368   echo "$as_me:7368: \$? = $ac_status" >&5
7369   (exit $ac_status); } &&
7370          { ac_try='test -s conftest$ac_exeext'
7371   { (eval echo "$as_me:7371: \"$ac_try\"") >&5
7372   (eval $ac_try) 2>&5
7373   ac_status=$?
7374   echo "$as_me:7374: \$? = $ac_status" >&5
7375   (exit $ac_status); }; }; then
7376   cf_cv_ldflags_search_paths_first=yes
7377 else
7378   echo "$as_me: failed program was:" >&5
7379 cat conftest.$ac_ext >&5
7380 cf_cv_ldflags_search_paths_first=no
7381 fi
7382 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7383                                 LDFLAGS=$cf_save_LDFLAGS
7384 fi
7385 echo "$as_me:7385: result: $cf_cv_ldflags_search_paths_first" >&5
7386 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
7387                 if test $cf_cv_ldflags_search_paths_first = yes; then
7388                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7389                 fi
7390                 ;;
7391         hpux*) #(vi
7392                 # (tested with gcc 2.7.2 -- I don't have c89)
7393                 if test "$GCC" = yes; then
7394                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
7395                 else
7396                         CC_SHARED_OPTS='+Z'
7397                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
7398                 fi
7399                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
7400                 # HP-UX shared libraries must be executable, and should be
7401                 # readonly to exploit a quirk in the memory manager.
7402                 INSTALL_LIB="-m 555"
7403                 ;;
7404         irix*) #(vi
7405                 if test "$cf_cv_enable_rpath" = yes ; then
7406                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7407                 fi
7408                 # tested with IRIX 5.2 and 'cc'.
7409                 if test "$GCC" != yes; then
7410                         CC_SHARED_OPTS='-KPIC'
7411                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
7412                 else
7413                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
7414                 fi
7415                 cf_cv_rm_so_locs=yes
7416                 ;;
7417         linux*|gnu*|k*bsd*-gnu) #(vi
7418                 if test "$DFT_LWR_MODEL" = "shared" ; then
7419                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7420                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7421                 fi
7422                 if test "$cf_cv_enable_rpath" = yes ; then
7423                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7424                 fi
7425
7426         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7427         if test "$cf_cv_shlib_version" = rel; then
7428                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7429         else
7430                 cf_cv_shared_soname='`basename $@`'
7431         fi
7432
7433                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7434                 ;;
7435         openbsd[2-9].*) #(vi
7436                 if test "$DFT_LWR_MODEL" = "shared" ; then
7437                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7438                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7439                 fi
7440                 if test "$cf_cv_enable_rpath" = yes ; then
7441                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7442                 fi
7443                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7444
7445         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7446         if test "$cf_cv_shlib_version" = rel; then
7447                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7448         else
7449                 cf_cv_shared_soname='`basename $@`'
7450         fi
7451
7452                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7453                 ;;
7454         nto-qnx*|openbsd*|freebsd[12].*) #(vi
7455                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7456                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
7457                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7458                 ;;
7459         freebsd*) #(vi
7460                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7461                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7462                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7463                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
7464                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7465                 fi
7466
7467         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7468         if test "$cf_cv_shlib_version" = rel; then
7469                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7470         else
7471                 cf_cv_shared_soname='`basename $@`'
7472         fi
7473
7474                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
7475                 ;;
7476         netbsd*) #(vi
7477                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7478                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7479                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7480                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7481                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7482                         if test "$cf_cv_shlib_version" = auto; then
7483                         if test -f /usr/libexec/ld.elf_so; then
7484                                 cf_cv_shlib_version=abi
7485                         else
7486                                 cf_cv_shlib_version=rel
7487                         fi
7488                         fi
7489
7490         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7491         if test "$cf_cv_shlib_version" = rel; then
7492                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7493         else
7494                 cf_cv_shared_soname='`basename $@`'
7495         fi
7496
7497                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7498                 else
7499                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
7500                 fi
7501                 ;;
7502         osf*|mls+*) #(vi
7503                 # tested with OSF/1 V3.2 and 'cc'
7504                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7505                 # link with shared libs).
7506                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7507                 case $host_os in #(vi
7508                 osf4*)
7509                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7510                         ;;
7511                 esac
7512                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7513                 if test "$DFT_LWR_MODEL" = "shared" ; then
7514                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7515                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7516                 fi
7517                 cf_cv_rm_so_locs=yes
7518                 ;;
7519         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
7520                 # tested with osr5.0.5
7521                 if test "$GCC" != yes; then
7522                         CC_SHARED_OPTS='-belf -KPIC'
7523                 fi
7524                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7525                 if test "$cf_cv_enable_rpath" = yes ; then
7526                         # only way is to set LD_RUN_PATH but no switch for it
7527                         RUN_PATH=$libdir
7528                 fi
7529                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7530                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7531                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7532                 ;;
7533         sunos4*) #(vi
7534                 # tested with SunOS 4.1.1 and gcc 2.7.0
7535                 if test "$GCC" != yes; then
7536                         CC_SHARED_OPTS='-KPIC'
7537                 fi
7538                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
7539                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7540                 ;;
7541         solaris2*) #(vi
7542                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7543                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7544                 if test "$DFT_LWR_MODEL" = "shared" ; then
7545                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
7546                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7547                 fi
7548                 if test "$cf_cv_enable_rpath" = yes ; then
7549                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
7550                 fi
7551
7552         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7553         if test "$cf_cv_shlib_version" = rel; then
7554                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7555         else
7556                 cf_cv_shared_soname='`basename $@`'
7557         fi
7558
7559                 if test "$GCC" != yes; then
7560                         cf_save_CFLAGS="$CFLAGS"
7561                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7562                         do
7563                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7564                                 cat >conftest.$ac_ext <<_ACEOF
7565 #line 7565 "configure"
7566 #include "confdefs.h"
7567 #include <stdio.h>
7568 int
7569 main ()
7570 {
7571 printf("Hello\n");
7572   ;
7573   return 0;
7574 }
7575 _ACEOF
7576 rm -f conftest.$ac_objext
7577 if { (eval echo "$as_me:7577: \"$ac_compile\"") >&5
7578   (eval $ac_compile) 2>&5
7579   ac_status=$?
7580   echo "$as_me:7580: \$? = $ac_status" >&5
7581   (exit $ac_status); } &&
7582          { ac_try='test -s conftest.$ac_objext'
7583   { (eval echo "$as_me:7583: \"$ac_try\"") >&5
7584   (eval $ac_try) 2>&5
7585   ac_status=$?
7586   echo "$as_me:7586: \$? = $ac_status" >&5
7587   (exit $ac_status); }; }; then
7588   break
7589 else
7590   echo "$as_me: failed program was:" >&5
7591 cat conftest.$ac_ext >&5
7592 fi
7593 rm -f conftest.$ac_objext conftest.$ac_ext
7594                         done
7595                         CFLAGS="$cf_save_CFLAGS"
7596                         CC_SHARED_OPTS=$cf_shared_opts
7597                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
7598                 else
7599                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
7600                 fi
7601                 ;;
7602         sysv5uw7*|unix_sv*) #(vi
7603                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7604                 if test "$GCC" != yes; then
7605                         CC_SHARED_OPTS='-KPIC'
7606                 fi
7607                 MK_SHARED_LIB='${LD} -d y -G -o $@'
7608                 ;;
7609         *)
7610                 CC_SHARED_OPTS='unknown'
7611                 MK_SHARED_LIB='echo unknown'
7612                 ;;
7613         esac
7614
7615         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7616         case "$cf_cv_shlib_version" in #(vi
7617         rel|abi)
7618                 case "$MK_SHARED_LIB" in #(vi
7619                 *'-o $@') #(vi
7620                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7621                         ;;
7622                 *)
7623                         { echo "$as_me:7623: WARNING: ignored --with-shlib-version" >&5
7624 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7625                         ;;
7626                 esac
7627                 ;;
7628         esac
7629
7630         if test -n "$cf_ld_rpath_opt" ; then
7631                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
7632         fi
7633
7634 ###############################################################################
7635
7636         case $cf_cv_system_name in
7637         os2*)   PATH_SEPARATOR=';'  ;;
7638         *)      PATH_SEPARATOR=':'  ;;
7639         esac
7640
7641 ###   use option --enable-broken-linker to force on use of broken-linker support
7642 echo "$as_me:7642: checking if you want broken-linker support code" >&5
7643 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7644
7645 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7646 if test "${enable_broken_linker+set}" = set; then
7647   enableval="$enable_broken_linker"
7648   with_broken_linker=$enableval
7649 else
7650   with_broken_linker=${BROKEN_LINKER-no}
7651 fi;
7652 echo "$as_me:7652: result: $with_broken_linker" >&5
7653 echo "${ECHO_T}$with_broken_linker" >&6
7654
7655 BROKEN_LINKER=0
7656 if test "$with_broken_linker" = yes ; then
7657         cat >>confdefs.h <<\EOF
7658 #define BROKEN_LINKER 1
7659 EOF
7660
7661         BROKEN_LINKER=1
7662 elif test "$DFT_LWR_MODEL" = shared ; then
7663         case $cf_cv_system_name in #(vi
7664         cygwin*)
7665                 cat >>confdefs.h <<\EOF
7666 #define BROKEN_LINKER 1
7667 EOF
7668
7669                 BROKEN_LINKER=1
7670                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7671
7672 echo "${as_me-configure}:7672: testing cygwin linker is broken anyway ..." 1>&5
7673
7674                 ;;
7675         esac
7676 fi
7677
7678 # Check to define _XOPEN_SOURCE "automatically"
7679
7680 cf_XOPEN_SOURCE=500
7681 cf_POSIX_C_SOURCE=199506L
7682 cf_xopen_source=
7683
7684 case $host_os in #(vi
7685 aix[456]*) #(vi
7686         cf_xopen_source="-D_ALL_SOURCE"
7687         ;;
7688 darwin[0-8].*) #(vi
7689         cf_xopen_source="-D_APPLE_C_SOURCE"
7690         ;;
7691 darwin*) #(vi
7692         cf_xopen_source="-D_DARWIN_C_SOURCE"
7693         ;;
7694 freebsd*|dragonfly*) #(vi
7695         # 5.x headers associate
7696         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7697         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7698         cf_POSIX_C_SOURCE=200112L
7699         cf_XOPEN_SOURCE=600
7700         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7701         ;;
7702 hpux11*) #(vi
7703         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7704         ;;
7705 hpux*) #(vi
7706         cf_xopen_source="-D_HPUX_SOURCE"
7707         ;;
7708 irix[56].*) #(vi
7709         cf_xopen_source="-D_SGI_SOURCE"
7710         ;;
7711 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7712
7713 echo "$as_me:7713: checking if we must define _GNU_SOURCE" >&5
7714 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7715 if test "${cf_cv_gnu_source+set}" = set; then
7716   echo $ECHO_N "(cached) $ECHO_C" >&6
7717 else
7718
7719 cat >conftest.$ac_ext <<_ACEOF
7720 #line 7720 "configure"
7721 #include "confdefs.h"
7722 #include <sys/types.h>
7723 int
7724 main ()
7725 {
7726
7727 #ifndef _XOPEN_SOURCE
7728 make an error
7729 #endif
7730   ;
7731   return 0;
7732 }
7733 _ACEOF
7734 rm -f conftest.$ac_objext
7735 if { (eval echo "$as_me:7735: \"$ac_compile\"") >&5
7736   (eval $ac_compile) 2>&5
7737   ac_status=$?
7738   echo "$as_me:7738: \$? = $ac_status" >&5
7739   (exit $ac_status); } &&
7740          { ac_try='test -s conftest.$ac_objext'
7741   { (eval echo "$as_me:7741: \"$ac_try\"") >&5
7742   (eval $ac_try) 2>&5
7743   ac_status=$?
7744   echo "$as_me:7744: \$? = $ac_status" >&5
7745   (exit $ac_status); }; }; then
7746   cf_cv_gnu_source=no
7747 else
7748   echo "$as_me: failed program was:" >&5
7749 cat conftest.$ac_ext >&5
7750 cf_save="$CPPFLAGS"
7751          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7752          cat >conftest.$ac_ext <<_ACEOF
7753 #line 7753 "configure"
7754 #include "confdefs.h"
7755 #include <sys/types.h>
7756 int
7757 main ()
7758 {
7759
7760 #ifdef _XOPEN_SOURCE
7761 make an error
7762 #endif
7763   ;
7764   return 0;
7765 }
7766 _ACEOF
7767 rm -f conftest.$ac_objext
7768 if { (eval echo "$as_me:7768: \"$ac_compile\"") >&5
7769   (eval $ac_compile) 2>&5
7770   ac_status=$?
7771   echo "$as_me:7771: \$? = $ac_status" >&5
7772   (exit $ac_status); } &&
7773          { ac_try='test -s conftest.$ac_objext'
7774   { (eval echo "$as_me:7774: \"$ac_try\"") >&5
7775   (eval $ac_try) 2>&5
7776   ac_status=$?
7777   echo "$as_me:7777: \$? = $ac_status" >&5
7778   (exit $ac_status); }; }; then
7779   cf_cv_gnu_source=no
7780 else
7781   echo "$as_me: failed program was:" >&5
7782 cat conftest.$ac_ext >&5
7783 cf_cv_gnu_source=yes
7784 fi
7785 rm -f conftest.$ac_objext conftest.$ac_ext
7786         CPPFLAGS="$cf_save"
7787
7788 fi
7789 rm -f conftest.$ac_objext conftest.$ac_ext
7790
7791 fi
7792 echo "$as_me:7792: result: $cf_cv_gnu_source" >&5
7793 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7794 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7795
7796         ;;
7797 mirbsd*) #(vi
7798         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
7799         ;;
7800 netbsd*) #(vi
7801         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7802         ;;
7803 openbsd*) #(vi
7804         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7805         ;;
7806 osf[45]*) #(vi
7807         cf_xopen_source="-D_OSF_SOURCE"
7808         ;;
7809 nto-qnx*) #(vi
7810         cf_xopen_source="-D_QNX_SOURCE"
7811         ;;
7812 sco*) #(vi
7813         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7814         ;;
7815 solaris2.1[0-9]) #(vi
7816         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7817         ;;
7818 solaris2.[1-9]) #(vi
7819         cf_xopen_source="-D__EXTENSIONS__"
7820         ;;
7821 *)
7822         echo "$as_me:7822: checking if we should define _XOPEN_SOURCE" >&5
7823 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7824 if test "${cf_cv_xopen_source+set}" = set; then
7825   echo $ECHO_N "(cached) $ECHO_C" >&6
7826 else
7827
7828         cat >conftest.$ac_ext <<_ACEOF
7829 #line 7829 "configure"
7830 #include "confdefs.h"
7831 #include <sys/types.h>
7832 int
7833 main ()
7834 {
7835
7836 #ifndef _XOPEN_SOURCE
7837 make an error
7838 #endif
7839   ;
7840   return 0;
7841 }
7842 _ACEOF
7843 rm -f conftest.$ac_objext
7844 if { (eval echo "$as_me:7844: \"$ac_compile\"") >&5
7845   (eval $ac_compile) 2>&5
7846   ac_status=$?
7847   echo "$as_me:7847: \$? = $ac_status" >&5
7848   (exit $ac_status); } &&
7849          { ac_try='test -s conftest.$ac_objext'
7850   { (eval echo "$as_me:7850: \"$ac_try\"") >&5
7851   (eval $ac_try) 2>&5
7852   ac_status=$?
7853   echo "$as_me:7853: \$? = $ac_status" >&5
7854   (exit $ac_status); }; }; then
7855   cf_cv_xopen_source=no
7856 else
7857   echo "$as_me: failed program was:" >&5
7858 cat conftest.$ac_ext >&5
7859 cf_save="$CPPFLAGS"
7860          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7861          cat >conftest.$ac_ext <<_ACEOF
7862 #line 7862 "configure"
7863 #include "confdefs.h"
7864 #include <sys/types.h>
7865 int
7866 main ()
7867 {
7868
7869 #ifdef _XOPEN_SOURCE
7870 make an error
7871 #endif
7872   ;
7873   return 0;
7874 }
7875 _ACEOF
7876 rm -f conftest.$ac_objext
7877 if { (eval echo "$as_me:7877: \"$ac_compile\"") >&5
7878   (eval $ac_compile) 2>&5
7879   ac_status=$?
7880   echo "$as_me:7880: \$? = $ac_status" >&5
7881   (exit $ac_status); } &&
7882          { ac_try='test -s conftest.$ac_objext'
7883   { (eval echo "$as_me:7883: \"$ac_try\"") >&5
7884   (eval $ac_try) 2>&5
7885   ac_status=$?
7886   echo "$as_me:7886: \$? = $ac_status" >&5
7887   (exit $ac_status); }; }; then
7888   cf_cv_xopen_source=no
7889 else
7890   echo "$as_me: failed program was:" >&5
7891 cat conftest.$ac_ext >&5
7892 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7893 fi
7894 rm -f conftest.$ac_objext conftest.$ac_ext
7895         CPPFLAGS="$cf_save"
7896
7897 fi
7898 rm -f conftest.$ac_objext conftest.$ac_ext
7899
7900 fi
7901 echo "$as_me:7901: result: $cf_cv_xopen_source" >&5
7902 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7903         if test "$cf_cv_xopen_source" != no ; then
7904
7905 CFLAGS=`echo "$CFLAGS" | \
7906         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7907                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7908
7909 CPPFLAGS=`echo "$CPPFLAGS" | \
7910         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7911                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7912
7913                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7914
7915 cf_fix_cppflags=no
7916 cf_new_cflags=
7917 cf_new_cppflags=
7918 cf_new_extra_cppflags=
7919
7920 for cf_add_cflags in $cf_temp_xopen_source
7921 do
7922 case $cf_fix_cppflags in
7923 no)
7924         case $cf_add_cflags in #(vi
7925         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7926                 case $cf_add_cflags in
7927                 -D*)
7928                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7929
7930                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7931                                 && test -z "${cf_tst_cflags}" \
7932                                 && cf_fix_cppflags=yes
7933
7934                         if test $cf_fix_cppflags = yes ; then
7935                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7936                                 continue
7937                         elif test "${cf_tst_cflags}" = "\"'" ; then
7938                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7939                                 continue
7940                         fi
7941                         ;;
7942                 esac
7943                 case "$CPPFLAGS" in
7944                 *$cf_add_cflags) #(vi
7945                         ;;
7946                 *) #(vi
7947                         case $cf_add_cflags in #(vi
7948                         -D*)
7949                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7950
7951 CPPFLAGS=`echo "$CPPFLAGS" | \
7952         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7953                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7954
7955                                 ;;
7956                         esac
7957                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7958                         ;;
7959                 esac
7960                 ;;
7961         *)
7962                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7963                 ;;
7964         esac
7965         ;;
7966 yes)
7967         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7968
7969         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7970
7971         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7972                 && test -z "${cf_tst_cflags}" \
7973                 && cf_fix_cppflags=no
7974         ;;
7975 esac
7976 done
7977
7978 if test -n "$cf_new_cflags" ; then
7979
7980         CFLAGS="$CFLAGS $cf_new_cflags"
7981 fi
7982
7983 if test -n "$cf_new_cppflags" ; then
7984
7985         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7986 fi
7987
7988 if test -n "$cf_new_extra_cppflags" ; then
7989
7990         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7991 fi
7992
7993         fi
7994
7995 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7996
7997 cf_save_CFLAGS="$CFLAGS"
7998 cf_save_CPPFLAGS="$CPPFLAGS"
7999
8000 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8001         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8002                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8003
8004 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8005         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8006                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8007
8008 echo "$as_me:8008: checking if we should define _POSIX_C_SOURCE" >&5
8009 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8010 if test "${cf_cv_posix_c_source+set}" = set; then
8011   echo $ECHO_N "(cached) $ECHO_C" >&6
8012 else
8013
8014 echo "${as_me-configure}:8014: testing if the symbol is already defined go no further ..." 1>&5
8015
8016         cat >conftest.$ac_ext <<_ACEOF
8017 #line 8017 "configure"
8018 #include "confdefs.h"
8019 #include <sys/types.h>
8020 int
8021 main ()
8022 {
8023
8024 #ifndef _POSIX_C_SOURCE
8025 make an error
8026 #endif
8027   ;
8028   return 0;
8029 }
8030 _ACEOF
8031 rm -f conftest.$ac_objext
8032 if { (eval echo "$as_me:8032: \"$ac_compile\"") >&5
8033   (eval $ac_compile) 2>&5
8034   ac_status=$?
8035   echo "$as_me:8035: \$? = $ac_status" >&5
8036   (exit $ac_status); } &&
8037          { ac_try='test -s conftest.$ac_objext'
8038   { (eval echo "$as_me:8038: \"$ac_try\"") >&5
8039   (eval $ac_try) 2>&5
8040   ac_status=$?
8041   echo "$as_me:8041: \$? = $ac_status" >&5
8042   (exit $ac_status); }; }; then
8043   cf_cv_posix_c_source=no
8044 else
8045   echo "$as_me: failed program was:" >&5
8046 cat conftest.$ac_ext >&5
8047 cf_want_posix_source=no
8048          case .$cf_POSIX_C_SOURCE in #(vi
8049          .[12]??*) #(vi
8050                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8051                 ;;
8052          .2) #(vi
8053                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8054                 cf_want_posix_source=yes
8055                 ;;
8056          .*)
8057                 cf_want_posix_source=yes
8058                 ;;
8059          esac
8060          if test "$cf_want_posix_source" = yes ; then
8061                 cat >conftest.$ac_ext <<_ACEOF
8062 #line 8062 "configure"
8063 #include "confdefs.h"
8064 #include <sys/types.h>
8065 int
8066 main ()
8067 {
8068
8069 #ifdef _POSIX_SOURCE
8070 make an error
8071 #endif
8072   ;
8073   return 0;
8074 }
8075 _ACEOF
8076 rm -f conftest.$ac_objext
8077 if { (eval echo "$as_me:8077: \"$ac_compile\"") >&5
8078   (eval $ac_compile) 2>&5
8079   ac_status=$?
8080   echo "$as_me:8080: \$? = $ac_status" >&5
8081   (exit $ac_status); } &&
8082          { ac_try='test -s conftest.$ac_objext'
8083   { (eval echo "$as_me:8083: \"$ac_try\"") >&5
8084   (eval $ac_try) 2>&5
8085   ac_status=$?
8086   echo "$as_me:8086: \$? = $ac_status" >&5
8087   (exit $ac_status); }; }; then
8088   :
8089 else
8090   echo "$as_me: failed program was:" >&5
8091 cat conftest.$ac_ext >&5
8092 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8093 fi
8094 rm -f conftest.$ac_objext conftest.$ac_ext
8095          fi
8096
8097 echo "${as_me-configure}:8097: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8098
8099          CFLAGS="$cf_trim_CFLAGS"
8100          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8101
8102 echo "${as_me-configure}:8102: testing if the second compile does not leave our definition intact error ..." 1>&5
8103
8104          cat >conftest.$ac_ext <<_ACEOF
8105 #line 8105 "configure"
8106 #include "confdefs.h"
8107 #include <sys/types.h>
8108 int
8109 main ()
8110 {
8111
8112 #ifndef _POSIX_C_SOURCE
8113 make an error
8114 #endif
8115   ;
8116   return 0;
8117 }
8118 _ACEOF
8119 rm -f conftest.$ac_objext
8120 if { (eval echo "$as_me:8120: \"$ac_compile\"") >&5
8121   (eval $ac_compile) 2>&5
8122   ac_status=$?
8123   echo "$as_me:8123: \$? = $ac_status" >&5
8124   (exit $ac_status); } &&
8125          { ac_try='test -s conftest.$ac_objext'
8126   { (eval echo "$as_me:8126: \"$ac_try\"") >&5
8127   (eval $ac_try) 2>&5
8128   ac_status=$?
8129   echo "$as_me:8129: \$? = $ac_status" >&5
8130   (exit $ac_status); }; }; then
8131   :
8132 else
8133   echo "$as_me: failed program was:" >&5
8134 cat conftest.$ac_ext >&5
8135 cf_cv_posix_c_source=no
8136 fi
8137 rm -f conftest.$ac_objext conftest.$ac_ext
8138          CFLAGS="$cf_save_CFLAGS"
8139          CPPFLAGS="$cf_save_CPPFLAGS"
8140
8141 fi
8142 rm -f conftest.$ac_objext conftest.$ac_ext
8143
8144 fi
8145 echo "$as_me:8145: result: $cf_cv_posix_c_source" >&5
8146 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8147
8148 if test "$cf_cv_posix_c_source" != no ; then
8149         CFLAGS="$cf_trim_CFLAGS"
8150         CPPFLAGS="$cf_trim_CPPFLAGS"
8151
8152 cf_fix_cppflags=no
8153 cf_new_cflags=
8154 cf_new_cppflags=
8155 cf_new_extra_cppflags=
8156
8157 for cf_add_cflags in $cf_cv_posix_c_source
8158 do
8159 case $cf_fix_cppflags in
8160 no)
8161         case $cf_add_cflags in #(vi
8162         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8163                 case $cf_add_cflags in
8164                 -D*)
8165                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8166
8167                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8168                                 && test -z "${cf_tst_cflags}" \
8169                                 && cf_fix_cppflags=yes
8170
8171                         if test $cf_fix_cppflags = yes ; then
8172                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8173                                 continue
8174                         elif test "${cf_tst_cflags}" = "\"'" ; then
8175                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8176                                 continue
8177                         fi
8178                         ;;
8179                 esac
8180                 case "$CPPFLAGS" in
8181                 *$cf_add_cflags) #(vi
8182                         ;;
8183                 *) #(vi
8184                         case $cf_add_cflags in #(vi
8185                         -D*)
8186                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8187
8188 CPPFLAGS=`echo "$CPPFLAGS" | \
8189         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8190                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8191
8192                                 ;;
8193                         esac
8194                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8195                         ;;
8196                 esac
8197                 ;;
8198         *)
8199                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8200                 ;;
8201         esac
8202         ;;
8203 yes)
8204         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8205
8206         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8207
8208         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8209                 && test -z "${cf_tst_cflags}" \
8210                 && cf_fix_cppflags=no
8211         ;;
8212 esac
8213 done
8214
8215 if test -n "$cf_new_cflags" ; then
8216
8217         CFLAGS="$CFLAGS $cf_new_cflags"
8218 fi
8219
8220 if test -n "$cf_new_cppflags" ; then
8221
8222         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8223 fi
8224
8225 if test -n "$cf_new_extra_cppflags" ; then
8226
8227         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8228 fi
8229
8230 fi
8231
8232         ;;
8233 esac
8234
8235 if test -n "$cf_xopen_source" ; then
8236
8237 cf_fix_cppflags=no
8238 cf_new_cflags=
8239 cf_new_cppflags=
8240 cf_new_extra_cppflags=
8241
8242 for cf_add_cflags in $cf_xopen_source
8243 do
8244 case $cf_fix_cppflags in
8245 no)
8246         case $cf_add_cflags in #(vi
8247         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8248                 case $cf_add_cflags in
8249                 -D*)
8250                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8251
8252                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8253                                 && test -z "${cf_tst_cflags}" \
8254                                 && cf_fix_cppflags=yes
8255
8256                         if test $cf_fix_cppflags = yes ; then
8257                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8258                                 continue
8259                         elif test "${cf_tst_cflags}" = "\"'" ; then
8260                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8261                                 continue
8262                         fi
8263                         ;;
8264                 esac
8265                 case "$CPPFLAGS" in
8266                 *$cf_add_cflags) #(vi
8267                         ;;
8268                 *) #(vi
8269                         case $cf_add_cflags in #(vi
8270                         -D*)
8271                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8272
8273 CPPFLAGS=`echo "$CPPFLAGS" | \
8274         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8275                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8276
8277                                 ;;
8278                         esac
8279                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8280                         ;;
8281                 esac
8282                 ;;
8283         *)
8284                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8285                 ;;
8286         esac
8287         ;;
8288 yes)
8289         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8290
8291         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8292
8293         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8294                 && test -z "${cf_tst_cflags}" \
8295                 && cf_fix_cppflags=no
8296         ;;
8297 esac
8298 done
8299
8300 if test -n "$cf_new_cflags" ; then
8301
8302         CFLAGS="$CFLAGS $cf_new_cflags"
8303 fi
8304
8305 if test -n "$cf_new_cppflags" ; then
8306
8307         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8308 fi
8309
8310 if test -n "$cf_new_extra_cppflags" ; then
8311
8312         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8313 fi
8314
8315 fi
8316
8317 # Check whether --enable-largefile or --disable-largefile was given.
8318 if test "${enable_largefile+set}" = set; then
8319   enableval="$enable_largefile"
8320
8321 fi;
8322 if test "$enable_largefile" != no; then
8323
8324   echo "$as_me:8324: checking for special C compiler options needed for large files" >&5
8325 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8326 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8327   echo $ECHO_N "(cached) $ECHO_C" >&6
8328 else
8329   ac_cv_sys_largefile_CC=no
8330      if test "$GCC" != yes; then
8331        ac_save_CC=$CC
8332        while :; do
8333          # IRIX 6.2 and later do not support large files by default,
8334          # so use the C compiler's -n32 option if that helps.
8335          cat >conftest.$ac_ext <<_ACEOF
8336 #line 8336 "configure"
8337 #include "confdefs.h"
8338 #include <sys/types.h>
8339  /* Check that off_t can represent 2**63 - 1 correctly.
8340     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8341     since some C++ compilers masquerading as C compilers
8342     incorrectly reject 9223372036854775807.  */
8343 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8344   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8345                        && LARGE_OFF_T % 2147483647 == 1)
8346                       ? 1 : -1];
8347 int
8348 main ()
8349 {
8350
8351   ;
8352   return 0;
8353 }
8354 _ACEOF
8355          rm -f conftest.$ac_objext
8356 if { (eval echo "$as_me:8356: \"$ac_compile\"") >&5
8357   (eval $ac_compile) 2>&5
8358   ac_status=$?
8359   echo "$as_me:8359: \$? = $ac_status" >&5
8360   (exit $ac_status); } &&
8361          { ac_try='test -s conftest.$ac_objext'
8362   { (eval echo "$as_me:8362: \"$ac_try\"") >&5
8363   (eval $ac_try) 2>&5
8364   ac_status=$?
8365   echo "$as_me:8365: \$? = $ac_status" >&5
8366   (exit $ac_status); }; }; then
8367   break
8368 else
8369   echo "$as_me: failed program was:" >&5
8370 cat conftest.$ac_ext >&5
8371 fi
8372 rm -f conftest.$ac_objext
8373          CC="$CC -n32"
8374          rm -f conftest.$ac_objext
8375 if { (eval echo "$as_me:8375: \"$ac_compile\"") >&5
8376   (eval $ac_compile) 2>&5
8377   ac_status=$?
8378   echo "$as_me:8378: \$? = $ac_status" >&5
8379   (exit $ac_status); } &&
8380          { ac_try='test -s conftest.$ac_objext'
8381   { (eval echo "$as_me:8381: \"$ac_try\"") >&5
8382   (eval $ac_try) 2>&5
8383   ac_status=$?
8384   echo "$as_me:8384: \$? = $ac_status" >&5
8385   (exit $ac_status); }; }; then
8386   ac_cv_sys_largefile_CC=' -n32'; break
8387 else
8388   echo "$as_me: failed program was:" >&5
8389 cat conftest.$ac_ext >&5
8390 fi
8391 rm -f conftest.$ac_objext
8392          break
8393        done
8394        CC=$ac_save_CC
8395        rm -f conftest.$ac_ext
8396     fi
8397 fi
8398 echo "$as_me:8398: result: $ac_cv_sys_largefile_CC" >&5
8399 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8400   if test "$ac_cv_sys_largefile_CC" != no; then
8401     CC=$CC$ac_cv_sys_largefile_CC
8402   fi
8403
8404   echo "$as_me:8404: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8405 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8406 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8407   echo $ECHO_N "(cached) $ECHO_C" >&6
8408 else
8409   while :; do
8410   ac_cv_sys_file_offset_bits=no
8411   cat >conftest.$ac_ext <<_ACEOF
8412 #line 8412 "configure"
8413 #include "confdefs.h"
8414 #include <sys/types.h>
8415  /* Check that off_t can represent 2**63 - 1 correctly.
8416     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8417     since some C++ compilers masquerading as C compilers
8418     incorrectly reject 9223372036854775807.  */
8419 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8420   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8421                        && LARGE_OFF_T % 2147483647 == 1)
8422                       ? 1 : -1];
8423 int
8424 main ()
8425 {
8426
8427   ;
8428   return 0;
8429 }
8430 _ACEOF
8431 rm -f conftest.$ac_objext
8432 if { (eval echo "$as_me:8432: \"$ac_compile\"") >&5
8433   (eval $ac_compile) 2>&5
8434   ac_status=$?
8435   echo "$as_me:8435: \$? = $ac_status" >&5
8436   (exit $ac_status); } &&
8437          { ac_try='test -s conftest.$ac_objext'
8438   { (eval echo "$as_me:8438: \"$ac_try\"") >&5
8439   (eval $ac_try) 2>&5
8440   ac_status=$?
8441   echo "$as_me:8441: \$? = $ac_status" >&5
8442   (exit $ac_status); }; }; then
8443   break
8444 else
8445   echo "$as_me: failed program was:" >&5
8446 cat conftest.$ac_ext >&5
8447 fi
8448 rm -f conftest.$ac_objext conftest.$ac_ext
8449   cat >conftest.$ac_ext <<_ACEOF
8450 #line 8450 "configure"
8451 #include "confdefs.h"
8452 #define _FILE_OFFSET_BITS 64
8453 #include <sys/types.h>
8454  /* Check that off_t can represent 2**63 - 1 correctly.
8455     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8456     since some C++ compilers masquerading as C compilers
8457     incorrectly reject 9223372036854775807.  */
8458 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8459   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8460                        && LARGE_OFF_T % 2147483647 == 1)
8461                       ? 1 : -1];
8462 int
8463 main ()
8464 {
8465
8466   ;
8467   return 0;
8468 }
8469 _ACEOF
8470 rm -f conftest.$ac_objext
8471 if { (eval echo "$as_me:8471: \"$ac_compile\"") >&5
8472   (eval $ac_compile) 2>&5
8473   ac_status=$?
8474   echo "$as_me:8474: \$? = $ac_status" >&5
8475   (exit $ac_status); } &&
8476          { ac_try='test -s conftest.$ac_objext'
8477   { (eval echo "$as_me:8477: \"$ac_try\"") >&5
8478   (eval $ac_try) 2>&5
8479   ac_status=$?
8480   echo "$as_me:8480: \$? = $ac_status" >&5
8481   (exit $ac_status); }; }; then
8482   ac_cv_sys_file_offset_bits=64; break
8483 else
8484   echo "$as_me: failed program was:" >&5
8485 cat conftest.$ac_ext >&5
8486 fi
8487 rm -f conftest.$ac_objext conftest.$ac_ext
8488   break
8489 done
8490 fi
8491 echo "$as_me:8491: result: $ac_cv_sys_file_offset_bits" >&5
8492 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8493 if test "$ac_cv_sys_file_offset_bits" != no; then
8494
8495 cat >>confdefs.h <<EOF
8496 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8497 EOF
8498
8499 fi
8500 rm -rf conftest*
8501   echo "$as_me:8501: checking for _LARGE_FILES value needed for large files" >&5
8502 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8503 if test "${ac_cv_sys_large_files+set}" = set; then
8504   echo $ECHO_N "(cached) $ECHO_C" >&6
8505 else
8506   while :; do
8507   ac_cv_sys_large_files=no
8508   cat >conftest.$ac_ext <<_ACEOF
8509 #line 8509 "configure"
8510 #include "confdefs.h"
8511 #include <sys/types.h>
8512  /* Check that off_t can represent 2**63 - 1 correctly.
8513     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8514     since some C++ compilers masquerading as C compilers
8515     incorrectly reject 9223372036854775807.  */
8516 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8517   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8518                        && LARGE_OFF_T % 2147483647 == 1)
8519                       ? 1 : -1];
8520 int
8521 main ()
8522 {
8523
8524   ;
8525   return 0;
8526 }
8527 _ACEOF
8528 rm -f conftest.$ac_objext
8529 if { (eval echo "$as_me:8529: \"$ac_compile\"") >&5
8530   (eval $ac_compile) 2>&5
8531   ac_status=$?
8532   echo "$as_me:8532: \$? = $ac_status" >&5
8533   (exit $ac_status); } &&
8534          { ac_try='test -s conftest.$ac_objext'
8535   { (eval echo "$as_me:8535: \"$ac_try\"") >&5
8536   (eval $ac_try) 2>&5
8537   ac_status=$?
8538   echo "$as_me:8538: \$? = $ac_status" >&5
8539   (exit $ac_status); }; }; then
8540   break
8541 else
8542   echo "$as_me: failed program was:" >&5
8543 cat conftest.$ac_ext >&5
8544 fi
8545 rm -f conftest.$ac_objext conftest.$ac_ext
8546   cat >conftest.$ac_ext <<_ACEOF
8547 #line 8547 "configure"
8548 #include "confdefs.h"
8549 #define _LARGE_FILES 1
8550 #include <sys/types.h>
8551  /* Check that off_t can represent 2**63 - 1 correctly.
8552     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8553     since some C++ compilers masquerading as C compilers
8554     incorrectly reject 9223372036854775807.  */
8555 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8556   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8557                        && LARGE_OFF_T % 2147483647 == 1)
8558                       ? 1 : -1];
8559 int
8560 main ()
8561 {
8562
8563   ;
8564   return 0;
8565 }
8566 _ACEOF
8567 rm -f conftest.$ac_objext
8568 if { (eval echo "$as_me:8568: \"$ac_compile\"") >&5
8569   (eval $ac_compile) 2>&5
8570   ac_status=$?
8571   echo "$as_me:8571: \$? = $ac_status" >&5
8572   (exit $ac_status); } &&
8573          { ac_try='test -s conftest.$ac_objext'
8574   { (eval echo "$as_me:8574: \"$ac_try\"") >&5
8575   (eval $ac_try) 2>&5
8576   ac_status=$?
8577   echo "$as_me:8577: \$? = $ac_status" >&5
8578   (exit $ac_status); }; }; then
8579   ac_cv_sys_large_files=1; break
8580 else
8581   echo "$as_me: failed program was:" >&5
8582 cat conftest.$ac_ext >&5
8583 fi
8584 rm -f conftest.$ac_objext conftest.$ac_ext
8585   break
8586 done
8587 fi
8588 echo "$as_me:8588: result: $ac_cv_sys_large_files" >&5
8589 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8590 if test "$ac_cv_sys_large_files" != no; then
8591
8592 cat >>confdefs.h <<EOF
8593 #define _LARGE_FILES $ac_cv_sys_large_files
8594 EOF
8595
8596 fi
8597 rm -rf conftest*
8598 fi
8599
8600     if test "$enable_largefile" != no ; then
8601         echo "$as_me:8601: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8602 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8603 if test "${ac_cv_sys_largefile_source+set}" = set; then
8604   echo $ECHO_N "(cached) $ECHO_C" >&6
8605 else
8606   while :; do
8607   ac_cv_sys_largefile_source=no
8608   cat >conftest.$ac_ext <<_ACEOF
8609 #line 8609 "configure"
8610 #include "confdefs.h"
8611 #include <stdio.h>
8612 int
8613 main ()
8614 {
8615 return !fseeko;
8616   ;
8617   return 0;
8618 }
8619 _ACEOF
8620 rm -f conftest.$ac_objext
8621 if { (eval echo "$as_me:8621: \"$ac_compile\"") >&5
8622   (eval $ac_compile) 2>&5
8623   ac_status=$?
8624   echo "$as_me:8624: \$? = $ac_status" >&5
8625   (exit $ac_status); } &&
8626          { ac_try='test -s conftest.$ac_objext'
8627   { (eval echo "$as_me:8627: \"$ac_try\"") >&5
8628   (eval $ac_try) 2>&5
8629   ac_status=$?
8630   echo "$as_me:8630: \$? = $ac_status" >&5
8631   (exit $ac_status); }; }; then
8632   break
8633 else
8634   echo "$as_me: failed program was:" >&5
8635 cat conftest.$ac_ext >&5
8636 fi
8637 rm -f conftest.$ac_objext conftest.$ac_ext
8638   cat >conftest.$ac_ext <<_ACEOF
8639 #line 8639 "configure"
8640 #include "confdefs.h"
8641 #define _LARGEFILE_SOURCE 1
8642 #include <stdio.h>
8643 int
8644 main ()
8645 {
8646 return !fseeko;
8647   ;
8648   return 0;
8649 }
8650 _ACEOF
8651 rm -f conftest.$ac_objext
8652 if { (eval echo "$as_me:8652: \"$ac_compile\"") >&5
8653   (eval $ac_compile) 2>&5
8654   ac_status=$?
8655   echo "$as_me:8655: \$? = $ac_status" >&5
8656   (exit $ac_status); } &&
8657          { ac_try='test -s conftest.$ac_objext'
8658   { (eval echo "$as_me:8658: \"$ac_try\"") >&5
8659   (eval $ac_try) 2>&5
8660   ac_status=$?
8661   echo "$as_me:8661: \$? = $ac_status" >&5
8662   (exit $ac_status); }; }; then
8663   ac_cv_sys_largefile_source=1; break
8664 else
8665   echo "$as_me: failed program was:" >&5
8666 cat conftest.$ac_ext >&5
8667 fi
8668 rm -f conftest.$ac_objext conftest.$ac_ext
8669   break
8670 done
8671 fi
8672 echo "$as_me:8672: result: $ac_cv_sys_largefile_source" >&5
8673 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8674 if test "$ac_cv_sys_largefile_source" != no; then
8675
8676 cat >>confdefs.h <<EOF
8677 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8678 EOF
8679
8680 fi
8681 rm -rf conftest*
8682
8683 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8684 # in glibc 2.1.3, but that breaks too many other things.
8685 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8686 echo "$as_me:8686: checking for fseeko" >&5
8687 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8688 if test "${ac_cv_func_fseeko+set}" = set; then
8689   echo $ECHO_N "(cached) $ECHO_C" >&6
8690 else
8691   cat >conftest.$ac_ext <<_ACEOF
8692 #line 8692 "configure"
8693 #include "confdefs.h"
8694 #include <stdio.h>
8695 int
8696 main ()
8697 {
8698 return fseeko && fseeko (stdin, 0, 0);
8699   ;
8700   return 0;
8701 }
8702 _ACEOF
8703 rm -f conftest.$ac_objext conftest$ac_exeext
8704 if { (eval echo "$as_me:8704: \"$ac_link\"") >&5
8705   (eval $ac_link) 2>&5
8706   ac_status=$?
8707   echo "$as_me:8707: \$? = $ac_status" >&5
8708   (exit $ac_status); } &&
8709          { ac_try='test -s conftest$ac_exeext'
8710   { (eval echo "$as_me:8710: \"$ac_try\"") >&5
8711   (eval $ac_try) 2>&5
8712   ac_status=$?
8713   echo "$as_me:8713: \$? = $ac_status" >&5
8714   (exit $ac_status); }; }; then
8715   ac_cv_func_fseeko=yes
8716 else
8717   echo "$as_me: failed program was:" >&5
8718 cat conftest.$ac_ext >&5
8719 ac_cv_func_fseeko=no
8720 fi
8721 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8722 fi
8723 echo "$as_me:8723: result: $ac_cv_func_fseeko" >&5
8724 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8725 if test $ac_cv_func_fseeko = yes; then
8726
8727 cat >>confdefs.h <<\EOF
8728 #define HAVE_FSEEKO 1
8729 EOF
8730
8731 fi
8732
8733         # Normally we would collect these definitions in the config.h,
8734         # but (like _XOPEN_SOURCE), some environments rely on having these
8735         # defined before any of the system headers are included.  Another
8736         # case comes up with C++, e.g., on AIX the compiler compiles the
8737         # header files by themselves before looking at the body files it is
8738         # told to compile.  For ncurses, those header files do not include
8739         # the config.h
8740         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
8741         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
8742         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
8743
8744         echo "$as_me:8744: checking whether to use struct dirent64" >&5
8745 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
8746 if test "${cf_cv_struct_dirent64+set}" = set; then
8747   echo $ECHO_N "(cached) $ECHO_C" >&6
8748 else
8749
8750                 cat >conftest.$ac_ext <<_ACEOF
8751 #line 8751 "configure"
8752 #include "confdefs.h"
8753
8754 #include <sys/types.h>
8755 #include <dirent.h>
8756
8757 int
8758 main ()
8759 {
8760
8761                 /* if transitional largefile support is setup, this is true */
8762                 extern struct dirent64 * readdir(DIR *);
8763                 struct dirent64 *x = readdir((DIR *)0);
8764                 struct dirent *y = readdir((DIR *)0);
8765                 int z = x - y;
8766
8767   ;
8768   return 0;
8769 }
8770 _ACEOF
8771 rm -f conftest.$ac_objext
8772 if { (eval echo "$as_me:8772: \"$ac_compile\"") >&5
8773   (eval $ac_compile) 2>&5
8774   ac_status=$?
8775   echo "$as_me:8775: \$? = $ac_status" >&5
8776   (exit $ac_status); } &&
8777          { ac_try='test -s conftest.$ac_objext'
8778   { (eval echo "$as_me:8778: \"$ac_try\"") >&5
8779   (eval $ac_try) 2>&5
8780   ac_status=$?
8781   echo "$as_me:8781: \$? = $ac_status" >&5
8782   (exit $ac_status); }; }; then
8783   cf_cv_struct_dirent64=yes
8784 else
8785   echo "$as_me: failed program was:" >&5
8786 cat conftest.$ac_ext >&5
8787 cf_cv_struct_dirent64=no
8788 fi
8789 rm -f conftest.$ac_objext conftest.$ac_ext
8790
8791 fi
8792 echo "$as_me:8792: result: $cf_cv_struct_dirent64" >&5
8793 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
8794         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
8795 #define HAVE_STRUCT_DIRENT64 1
8796 EOF
8797
8798     fi
8799
8800 ### Enable compiling-in rcs id's
8801 echo "$as_me:8801: checking if RCS identifiers should be compiled-in" >&5
8802 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
8803
8804 # Check whether --with-rcs-ids or --without-rcs-ids was given.
8805 if test "${with_rcs_ids+set}" = set; then
8806   withval="$with_rcs_ids"
8807   with_rcs_ids=$withval
8808 else
8809   with_rcs_ids=no
8810 fi;
8811 echo "$as_me:8811: result: $with_rcs_ids" >&5
8812 echo "${ECHO_T}$with_rcs_ids" >&6
8813 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
8814 #define USE_RCS_IDS 1
8815 EOF
8816
8817 ###############################################################################
8818
8819 ### Note that some functions (such as const) are normally disabled anyway.
8820 echo "$as_me:8820: checking if you want to build with function extensions" >&5
8821 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8822
8823 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8824 if test "${enable_ext_funcs+set}" = set; then
8825   enableval="$enable_ext_funcs"
8826   with_ext_funcs=$enableval
8827 else
8828   with_ext_funcs=yes
8829 fi;
8830 echo "$as_me:8830: result: $with_ext_funcs" >&5
8831 echo "${ECHO_T}$with_ext_funcs" >&6
8832 if test "$with_ext_funcs" = yes ; then
8833         NCURSES_EXT_FUNCS=1
8834         cat >>confdefs.h <<\EOF
8835 #define HAVE_USE_DEFAULT_COLORS 1
8836 EOF
8837
8838         cat >>confdefs.h <<\EOF
8839 #define NCURSES_EXT_FUNCS 1
8840 EOF
8841
8842 else
8843         NCURSES_EXT_FUNCS=0
8844 fi
8845
8846 ###   use option --enable-const to turn on use of const beyond that in XSI.
8847 echo "$as_me:8847: checking for extended use of const keyword" >&5
8848 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8849
8850 # Check whether --enable-const or --disable-const was given.
8851 if test "${enable_const+set}" = set; then
8852   enableval="$enable_const"
8853   with_ext_const=$enableval
8854 else
8855   with_ext_const=no
8856 fi;
8857 echo "$as_me:8857: result: $with_ext_const" >&5
8858 echo "${ECHO_T}$with_ext_const" >&6
8859 NCURSES_CONST='/*nothing*/'
8860 if test "$with_ext_const" = yes ; then
8861         NCURSES_CONST=const
8862 fi
8863
8864 ###############################################################################
8865 # These options are relatively safe to experiment with.
8866
8867 echo "$as_me:8867: checking if you want all development code" >&5
8868 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
8869
8870 # Check whether --with-develop or --without-develop was given.
8871 if test "${with_develop+set}" = set; then
8872   withval="$with_develop"
8873   with_develop=$withval
8874 else
8875   with_develop=no
8876 fi;
8877 echo "$as_me:8877: result: $with_develop" >&5
8878 echo "${ECHO_T}$with_develop" >&6
8879
8880 ###############################################################################
8881 # These are just experimental, probably should not be in a package:
8882
8883 # This is still experimental (20080329), but should ultimately be moved to
8884 # the script-block --with-normal, etc.
8885
8886 echo "$as_me:8886: checking if you want to link with the pthread library" >&5
8887 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
8888
8889 # Check whether --with-pthread or --without-pthread was given.
8890 if test "${with_pthread+set}" = set; then
8891   withval="$with_pthread"
8892   with_pthread=$withval
8893 else
8894   with_pthread=no
8895 fi;
8896 echo "$as_me:8896: result: $with_pthread" >&5
8897 echo "${ECHO_T}$with_pthread" >&6
8898
8899 if test "$with_pthread" != no ; then
8900     echo "$as_me:8900: checking for pthread.h" >&5
8901 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
8902 if test "${ac_cv_header_pthread_h+set}" = set; then
8903   echo $ECHO_N "(cached) $ECHO_C" >&6
8904 else
8905   cat >conftest.$ac_ext <<_ACEOF
8906 #line 8906 "configure"
8907 #include "confdefs.h"
8908 #include <pthread.h>
8909 _ACEOF
8910 if { (eval echo "$as_me:8910: \"$ac_cpp conftest.$ac_ext\"") >&5
8911   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8912   ac_status=$?
8913   egrep -v '^ *\+' conftest.er1 >conftest.err
8914   rm -f conftest.er1
8915   cat conftest.err >&5
8916   echo "$as_me:8916: \$? = $ac_status" >&5
8917   (exit $ac_status); } >/dev/null; then
8918   if test -s conftest.err; then
8919     ac_cpp_err=$ac_c_preproc_warn_flag
8920   else
8921     ac_cpp_err=
8922   fi
8923 else
8924   ac_cpp_err=yes
8925 fi
8926 if test -z "$ac_cpp_err"; then
8927   ac_cv_header_pthread_h=yes
8928 else
8929   echo "$as_me: failed program was:" >&5
8930   cat conftest.$ac_ext >&5
8931   ac_cv_header_pthread_h=no
8932 fi
8933 rm -f conftest.err conftest.$ac_ext
8934 fi
8935 echo "$as_me:8935: result: $ac_cv_header_pthread_h" >&5
8936 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
8937 if test $ac_cv_header_pthread_h = yes; then
8938
8939         cat >>confdefs.h <<\EOF
8940 #define HAVE_PTHREADS_H 1
8941 EOF
8942
8943         echo "$as_me:8943: checking if we can link with the pthread library" >&5
8944 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
8945         cf_save_LIBS="$LIBS"
8946         LIBS="-lpthread $LIBS"
8947         cat >conftest.$ac_ext <<_ACEOF
8948 #line 8948 "configure"
8949 #include "confdefs.h"
8950
8951 #include <pthread.h>
8952
8953 int
8954 main ()
8955 {
8956
8957         int rc = pthread_create(0,0,0,0);
8958
8959   ;
8960   return 0;
8961 }
8962 _ACEOF
8963 rm -f conftest.$ac_objext conftest$ac_exeext
8964 if { (eval echo "$as_me:8964: \"$ac_link\"") >&5
8965   (eval $ac_link) 2>&5
8966   ac_status=$?
8967   echo "$as_me:8967: \$? = $ac_status" >&5
8968   (exit $ac_status); } &&
8969          { ac_try='test -s conftest$ac_exeext'
8970   { (eval echo "$as_me:8970: \"$ac_try\"") >&5
8971   (eval $ac_try) 2>&5
8972   ac_status=$?
8973   echo "$as_me:8973: \$? = $ac_status" >&5
8974   (exit $ac_status); }; }; then
8975   with_pthread=yes
8976 else
8977   echo "$as_me: failed program was:" >&5
8978 cat conftest.$ac_ext >&5
8979 with_pthread=no
8980 fi
8981 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8982         LIBS="$cf_save_LIBS"
8983         echo "$as_me:8983: result: $with_pthread" >&5
8984 echo "${ECHO_T}$with_pthread" >&6
8985
8986         if test "$with_pthread" = yes ; then
8987             LIBS="-lpthread $LIBS"
8988             cat >>confdefs.h <<\EOF
8989 #define HAVE_LIBPTHREADS 1
8990 EOF
8991
8992         else
8993             { { echo "$as_me:8993: error: Cannot link with pthread library" >&5
8994 echo "$as_me: error: Cannot link with pthread library" >&2;}
8995    { (exit 1); exit 1; }; }
8996         fi
8997
8998 fi
8999
9000 fi
9001
9002 echo "$as_me:9002: checking if you want to use weak-symbols for pthreads" >&5
9003 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
9004
9005 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
9006 if test "${enable_weak_symbols+set}" = set; then
9007   enableval="$enable_weak_symbols"
9008   use_weak_symbols=$withval
9009 else
9010   use_weak_symbols=no
9011 fi;
9012 echo "$as_me:9012: result: $use_weak_symbols" >&5
9013 echo "${ECHO_T}$use_weak_symbols" >&6
9014 if test "$use_weak_symbols" = yes ; then
9015
9016 echo "$as_me:9016: checking if $CC supports weak symbols" >&5
9017 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
9018 if test "${cf_cv_weak_symbols+set}" = set; then
9019   echo $ECHO_N "(cached) $ECHO_C" >&6
9020 else
9021
9022 cat >conftest.$ac_ext <<_ACEOF
9023 #line 9023 "configure"
9024 #include "confdefs.h"
9025
9026 #include <stdio.h>
9027 int
9028 main ()
9029 {
9030
9031 #if defined(__GNUC__)
9032 #  if defined __USE_ISOC99
9033 #    define _cat_pragma(exp)    _Pragma(#exp)
9034 #    define _weak_pragma(exp)   _cat_pragma(weak name)
9035 #  else
9036 #    define _weak_pragma(exp)
9037 #  endif
9038 #  define _declare(name)        __extension__ extern __typeof__(name) name
9039 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
9040 #endif
9041
9042 weak_symbol(fopen);
9043
9044   ;
9045   return 0;
9046 }
9047 _ACEOF
9048 rm -f conftest.$ac_objext
9049 if { (eval echo "$as_me:9049: \"$ac_compile\"") >&5
9050   (eval $ac_compile) 2>&5
9051   ac_status=$?
9052   echo "$as_me:9052: \$? = $ac_status" >&5
9053   (exit $ac_status); } &&
9054          { ac_try='test -s conftest.$ac_objext'
9055   { (eval echo "$as_me:9055: \"$ac_try\"") >&5
9056   (eval $ac_try) 2>&5
9057   ac_status=$?
9058   echo "$as_me:9058: \$? = $ac_status" >&5
9059   (exit $ac_status); }; }; then
9060   cf_cv_weak_symbols=yes
9061 else
9062   echo "$as_me: failed program was:" >&5
9063 cat conftest.$ac_ext >&5
9064 cf_cv_weak_symbols=no
9065 fi
9066 rm -f conftest.$ac_objext conftest.$ac_ext
9067
9068 fi
9069 echo "$as_me:9069: result: $cf_cv_weak_symbols" >&5
9070 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
9071
9072 else
9073     cf_cv_weak_symbols=no
9074 fi
9075
9076 if test $cf_cv_weak_symbols = yes ; then
9077     cat >>confdefs.h <<\EOF
9078 #define USE_WEAK_SYMBOLS 1
9079 EOF
9080
9081 fi
9082
9083 PTHREAD=
9084 if test "$with_pthread" = "yes" ; then
9085     cat >>confdefs.h <<\EOF
9086 #define USE_PTHREADS 1
9087 EOF
9088
9089     enable_reentrant=yes
9090     if test $cf_cv_weak_symbols = yes ; then
9091         PTHREAD=-lpthread
9092     fi
9093 fi
9094
9095 # Reentrant code has to be opaque; there's little advantage to making ncurses
9096 # opaque outside of that, so there is no --enable-opaque option.  We can use
9097 # this option without --with-pthreads, but this will be always set for
9098 # pthreads.
9099 echo "$as_me:9099: checking if you want experimental reentrant code" >&5
9100 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9101
9102 # Check whether --enable-reentrant or --disable-reentrant was given.
9103 if test "${enable_reentrant+set}" = set; then
9104   enableval="$enable_reentrant"
9105   with_reentrant=$enableval
9106 else
9107   with_reentrant=no
9108 fi;
9109 echo "$as_me:9109: result: $with_reentrant" >&5
9110 echo "${ECHO_T}$with_reentrant" >&6
9111 if test "$with_reentrant" = yes ; then
9112         cf_cv_enable_reentrant=1
9113         if test $cf_cv_weak_symbols = yes ; then
9114
9115 # remove pthread library from $LIBS
9116 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
9117
9118         else
9119                 LIB_SUFFIX="t${LIB_SUFFIX}"
9120         fi
9121         cat >>confdefs.h <<\EOF
9122 #define USE_REENTRANT 1
9123 EOF
9124
9125 else
9126         cf_cv_enable_reentrant=0
9127 fi
9128
9129 ### Allow using a different wrap-prefix
9130 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
9131         echo "$as_me:9131: checking for prefix used to wrap public variables" >&5
9132 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
9133
9134 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
9135 if test "${with_wrap_prefix+set}" = set; then
9136   withval="$with_wrap_prefix"
9137   NCURSES_WRAP_PREFIX=$withval
9138 else
9139   NCURSES_WRAP_PREFIX=_nc_
9140 fi;
9141         echo "$as_me:9141: result: $NCURSES_WRAP_PREFIX" >&5
9142 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
9143 else
9144         NCURSES_WRAP_PREFIX=_nc_
9145 fi
9146
9147 cat >>confdefs.h <<EOF
9148 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
9149 EOF
9150
9151 ###############################################################################
9152
9153 ###     use option --disable-echo to suppress full display compiling commands
9154 echo "$as_me:9154: checking if you want to display full commands during build" >&5
9155 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9156
9157 # Check whether --enable-echo or --disable-echo was given.
9158 if test "${enable_echo+set}" = set; then
9159   enableval="$enable_echo"
9160   with_echo=$enableval
9161 else
9162   with_echo=yes
9163 fi;
9164 if test "$with_echo" = yes; then
9165         ECHO_LINK=
9166 else
9167         ECHO_LINK='@ echo linking $@ ... ;'
9168 fi
9169 echo "$as_me:9169: result: $with_echo" >&5
9170 echo "${ECHO_T}$with_echo" >&6
9171
9172 ###     use option --enable-warnings to turn on all gcc warnings
9173 echo "$as_me:9173: checking if you want to see compiler warnings" >&5
9174 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9175
9176 # Check whether --enable-warnings or --disable-warnings was given.
9177 if test "${enable_warnings+set}" = set; then
9178   enableval="$enable_warnings"
9179   with_warnings=$enableval
9180 fi;
9181 echo "$as_me:9181: result: $with_warnings" >&5
9182 echo "${ECHO_T}$with_warnings" >&6
9183
9184 if test "x$with_warnings" = "xyes"; then
9185         ADAFLAGS="$ADAFLAGS -gnatg"
9186
9187 INTEL_COMPILER=no
9188
9189 if test "$GCC" = yes ; then
9190         case $host_os in
9191         linux*|gnu*)
9192                 echo "$as_me:9192: checking if this is really Intel C compiler" >&5
9193 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9194                 cf_save_CFLAGS="$CFLAGS"
9195                 CFLAGS="$CFLAGS -no-gcc"
9196                 cat >conftest.$ac_ext <<_ACEOF
9197 #line 9197 "configure"
9198 #include "confdefs.h"
9199
9200 int
9201 main ()
9202 {
9203
9204 #ifdef __INTEL_COMPILER
9205 #else
9206 make an error
9207 #endif
9208
9209   ;
9210   return 0;
9211 }
9212 _ACEOF
9213 rm -f conftest.$ac_objext
9214 if { (eval echo "$as_me:9214: \"$ac_compile\"") >&5
9215   (eval $ac_compile) 2>&5
9216   ac_status=$?
9217   echo "$as_me:9217: \$? = $ac_status" >&5
9218   (exit $ac_status); } &&
9219          { ac_try='test -s conftest.$ac_objext'
9220   { (eval echo "$as_me:9220: \"$ac_try\"") >&5
9221   (eval $ac_try) 2>&5
9222   ac_status=$?
9223   echo "$as_me:9223: \$? = $ac_status" >&5
9224   (exit $ac_status); }; }; then
9225   INTEL_COMPILER=yes
9226 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9227
9228 else
9229   echo "$as_me: failed program was:" >&5
9230 cat conftest.$ac_ext >&5
9231 fi
9232 rm -f conftest.$ac_objext conftest.$ac_ext
9233                 CFLAGS="$cf_save_CFLAGS"
9234                 echo "$as_me:9234: result: $INTEL_COMPILER" >&5
9235 echo "${ECHO_T}$INTEL_COMPILER" >&6
9236                 ;;
9237         esac
9238 fi
9239
9240 cat > conftest.$ac_ext <<EOF
9241 #line 9241 "${as_me-configure}"
9242 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9243 EOF
9244
9245 if test "$INTEL_COMPILER" = yes
9246 then
9247 # The "-wdXXX" options suppress warnings:
9248 # remark #1419: external declaration in primary source file
9249 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9250 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9251 # remark #193: zero used for undefined preprocessing identifier
9252 # remark #593: variable "curs_sb_left_arrow" was set but never used
9253 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9254 # remark #869: parameter "tw" was never referenced
9255 # remark #981: operands are evaluated in unspecified order
9256 # warning #279: controlling expression is constant
9257
9258         { echo "$as_me:9258: checking for $CC warning options..." >&5
9259 echo "$as_me: checking for $CC warning options..." >&6;}
9260         cf_save_CFLAGS="$CFLAGS"
9261         EXTRA_CFLAGS="-Wall"
9262         for cf_opt in \
9263                 wd1419 \
9264                 wd1683 \
9265                 wd1684 \
9266                 wd193 \
9267                 wd593 \
9268                 wd279 \
9269                 wd810 \
9270                 wd869 \
9271                 wd981
9272         do
9273                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9274                 if { (eval echo "$as_me:9274: \"$ac_compile\"") >&5
9275   (eval $ac_compile) 2>&5
9276   ac_status=$?
9277   echo "$as_me:9277: \$? = $ac_status" >&5
9278   (exit $ac_status); }; then
9279                         test -n "$verbose" && echo "$as_me:9279: result: ... -$cf_opt" >&5
9280 echo "${ECHO_T}... -$cf_opt" >&6
9281                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9282                 fi
9283         done
9284         CFLAGS="$cf_save_CFLAGS"
9285
9286 elif test "$GCC" = yes
9287 then
9288         { echo "$as_me:9288: checking for $CC warning options..." >&5
9289 echo "$as_me: checking for $CC warning options..." >&6;}
9290         cf_save_CFLAGS="$CFLAGS"
9291         EXTRA_CFLAGS=
9292         cf_warn_CONST=""
9293         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9294         for cf_opt in W Wall \
9295                 Wbad-function-cast \
9296                 Wcast-align \
9297                 Wcast-qual \
9298                 Winline \
9299                 Wmissing-declarations \
9300                 Wmissing-prototypes \
9301                 Wnested-externs \
9302                 Wpointer-arith \
9303                 Wshadow \
9304                 Wstrict-prototypes \
9305                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
9306         do
9307                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9308                 if { (eval echo "$as_me:9308: \"$ac_compile\"") >&5
9309   (eval $ac_compile) 2>&5
9310   ac_status=$?
9311   echo "$as_me:9311: \$? = $ac_status" >&5
9312   (exit $ac_status); }; then
9313                         test -n "$verbose" && echo "$as_me:9313: result: ... -$cf_opt" >&5
9314 echo "${ECHO_T}... -$cf_opt" >&6
9315                         case $cf_opt in #(vi
9316                         Wcast-qual) #(vi
9317                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9318                                 ;;
9319                         Winline) #(vi
9320                                 case $GCC_VERSION in
9321                                 [34].*)
9322                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
9323
9324 echo "${as_me-configure}:9324: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
9325
9326                                         continue;;
9327                                 esac
9328                                 ;;
9329                         esac
9330                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9331                 fi
9332         done
9333         CFLAGS="$cf_save_CFLAGS"
9334 fi
9335 rm -rf conftest*
9336
9337 fi
9338
9339 if test "$GCC" = yes
9340 then
9341 cat > conftest.i <<EOF
9342 #ifndef GCC_PRINTF
9343 #define GCC_PRINTF 0
9344 #endif
9345 #ifndef GCC_SCANF
9346 #define GCC_SCANF 0
9347 #endif
9348 #ifndef GCC_NORETURN
9349 #define GCC_NORETURN /* nothing */
9350 #endif
9351 #ifndef GCC_UNUSED
9352 #define GCC_UNUSED /* nothing */
9353 #endif
9354 EOF
9355 if test "$GCC" = yes
9356 then
9357         { echo "$as_me:9357: checking for $CC __attribute__ directives..." >&5
9358 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9359 cat > conftest.$ac_ext <<EOF
9360 #line 9360 "${as_me-configure}"
9361 #include "confdefs.h"
9362 #include "conftest.h"
9363 #include "conftest.i"
9364 #if     GCC_PRINTF
9365 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9366 #else
9367 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9368 #endif
9369 #if     GCC_SCANF
9370 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9371 #else
9372 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9373 #endif
9374 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9375 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9376 extern void foo(void) GCC_NORETURN;
9377 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9378 EOF
9379         cf_printf_attribute=no
9380         cf_scanf_attribute=no
9381         for cf_attribute in scanf printf unused noreturn
9382         do
9383
9384 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9385
9386                 cf_directive="__attribute__(($cf_attribute))"
9387                 echo "checking for $CC $cf_directive" 1>&5
9388
9389                 case $cf_attribute in #(vi
9390                 printf) #(vi
9391                         cf_printf_attribute=yes
9392                         cat >conftest.h <<EOF
9393 #define GCC_$cf_ATTRIBUTE 1
9394 EOF
9395                         ;;
9396                 scanf) #(vi
9397                         cf_scanf_attribute=yes
9398                         cat >conftest.h <<EOF
9399 #define GCC_$cf_ATTRIBUTE 1
9400 EOF
9401                         ;;
9402                 *) #(vi
9403                         cat >conftest.h <<EOF
9404 #define GCC_$cf_ATTRIBUTE $cf_directive
9405 EOF
9406                         ;;
9407                 esac
9408
9409                 if { (eval echo "$as_me:9409: \"$ac_compile\"") >&5
9410   (eval $ac_compile) 2>&5
9411   ac_status=$?
9412   echo "$as_me:9412: \$? = $ac_status" >&5
9413   (exit $ac_status); }; then
9414                         test -n "$verbose" && echo "$as_me:9414: result: ... $cf_attribute" >&5
9415 echo "${ECHO_T}... $cf_attribute" >&6
9416                         cat conftest.h >>confdefs.h
9417                         case $cf_attribute in #(vi
9418                         printf) #(vi
9419                                 if test "$cf_printf_attribute" = no ; then
9420                                         cat >>confdefs.h <<EOF
9421 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
9422 EOF
9423                                 else
9424                                         cat >>confdefs.h <<EOF
9425 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9426 EOF
9427                                 fi
9428                                 ;;
9429                         scanf) #(vi
9430                                 if test "$cf_scanf_attribute" = no ; then
9431                                         cat >>confdefs.h <<EOF
9432 #define GCC_SCANFLIKE(fmt,var) /* nothing */
9433 EOF
9434                                 else
9435                                         cat >>confdefs.h <<EOF
9436 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9437 EOF
9438                                 fi
9439                                 ;;
9440                         esac
9441                 fi
9442         done
9443 else
9444         fgrep define conftest.i >>confdefs.h
9445 fi
9446 rm -rf conftest*
9447 fi
9448
9449 ###     use option --enable-assertions to turn on generation of assertion code
9450 echo "$as_me:9450: checking if you want to enable runtime assertions" >&5
9451 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9452
9453 # Check whether --enable-assertions or --disable-assertions was given.
9454 if test "${enable_assertions+set}" = set; then
9455   enableval="$enable_assertions"
9456   with_assertions=$enableval
9457 else
9458   with_assertions=no
9459 fi;
9460 echo "$as_me:9460: result: $with_assertions" >&5
9461 echo "${ECHO_T}$with_assertions" >&6
9462 if test -n "$GCC"
9463 then
9464         if test "$with_assertions" = no
9465         then
9466                 cat >>confdefs.h <<\EOF
9467 #define NDEBUG 1
9468 EOF
9469
9470                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
9471         else
9472                 ADAFLAGS="$ADAFLAGS -gnata"
9473         fi
9474 fi
9475
9476 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
9477 cat >>confdefs.h <<\EOF
9478 #define HAVE_NC_ALLOC_H 1
9479 EOF
9480
9481 ###     use option --enable-expanded to generate certain macros as functions
9482
9483 # Check whether --enable-expanded or --disable-expanded was given.
9484 if test "${enable_expanded+set}" = set; then
9485   enableval="$enable_expanded"
9486   test "$enableval" = yes && cat >>confdefs.h <<\EOF
9487 #define NCURSES_EXPANDED 1
9488 EOF
9489
9490 fi;
9491
9492 ###     use option --disable-macros to suppress macros in favor of functions
9493
9494 # Check whether --enable-macros or --disable-macros was given.
9495 if test "${enable_macros+set}" = set; then
9496   enableval="$enable_macros"
9497   test "$enableval" = no && cat >>confdefs.h <<\EOF
9498 #define NCURSES_NOMACROS 1
9499 EOF
9500
9501 fi;
9502
9503 # Normally we only add trace() to the debug-library.  Allow this to be
9504 # extended to all models of the ncurses library:
9505 cf_all_traces=no
9506 case "$CFLAGS $CPPFLAGS" in
9507 *-DTRACE*)
9508         cf_all_traces=yes
9509         ;;
9510 esac
9511
9512 echo "$as_me:9512: checking whether to add trace feature to all models" >&5
9513 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
9514
9515 # Check whether --with-trace or --without-trace was given.
9516 if test "${with_trace+set}" = set; then
9517   withval="$with_trace"
9518   cf_with_trace=$withval
9519 else
9520   cf_with_trace=$cf_all_traces
9521 fi;
9522 echo "$as_me:9522: result: $cf_with_trace" >&5
9523 echo "${ECHO_T}$cf_with_trace" >&6
9524
9525 if test "$cf_with_trace" = yes ; then
9526         ADA_TRACE=TRUE
9527
9528 cf_fix_cppflags=no
9529 cf_new_cflags=
9530 cf_new_cppflags=
9531 cf_new_extra_cppflags=
9532
9533 for cf_add_cflags in -DTRACE
9534 do
9535 case $cf_fix_cppflags in
9536 no)
9537         case $cf_add_cflags in #(vi
9538         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9539                 case $cf_add_cflags in
9540                 -D*)
9541                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9542
9543                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9544                                 && test -z "${cf_tst_cflags}" \
9545                                 && cf_fix_cppflags=yes
9546
9547                         if test $cf_fix_cppflags = yes ; then
9548                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9549                                 continue
9550                         elif test "${cf_tst_cflags}" = "\"'" ; then
9551                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9552                                 continue
9553                         fi
9554                         ;;
9555                 esac
9556                 case "$CPPFLAGS" in
9557                 *$cf_add_cflags) #(vi
9558                         ;;
9559                 *) #(vi
9560                         case $cf_add_cflags in #(vi
9561                         -D*)
9562                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9563
9564 CPPFLAGS=`echo "$CPPFLAGS" | \
9565         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9566                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9567
9568                                 ;;
9569                         esac
9570                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9571                         ;;
9572                 esac
9573                 ;;
9574         *)
9575                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9576                 ;;
9577         esac
9578         ;;
9579 yes)
9580         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9581
9582         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9583
9584         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9585                 && test -z "${cf_tst_cflags}" \
9586                 && cf_fix_cppflags=no
9587         ;;
9588 esac
9589 done
9590
9591 if test -n "$cf_new_cflags" ; then
9592
9593         CFLAGS="$CFLAGS $cf_new_cflags"
9594 fi
9595
9596 if test -n "$cf_new_cppflags" ; then
9597
9598         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9599 fi
9600
9601 if test -n "$cf_new_extra_cppflags" ; then
9602
9603         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9604 fi
9605
9606 else
9607         ADA_TRACE=FALSE
9608 fi
9609
9610 ###     Checks for libraries.
9611 case $cf_cv_system_name in #(vi
9612 *mingw32*) #(vi
9613         ;;
9614 *)
9615 echo "$as_me:9615: checking for gettimeofday" >&5
9616 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
9617 if test "${ac_cv_func_gettimeofday+set}" = set; then
9618   echo $ECHO_N "(cached) $ECHO_C" >&6
9619 else
9620   cat >conftest.$ac_ext <<_ACEOF
9621 #line 9621 "configure"
9622 #include "confdefs.h"
9623 /* System header to define __stub macros and hopefully few prototypes,
9624     which can conflict with char gettimeofday (); below.  */
9625 #include <assert.h>
9626 /* Override any gcc2 internal prototype to avoid an error.  */
9627 #ifdef __cplusplus
9628 extern "C"
9629 #endif
9630 /* We use char because int might match the return type of a gcc2
9631    builtin and then its argument prototype would still apply.  */
9632 char gettimeofday ();
9633 char (*f) ();
9634
9635 int
9636 main ()
9637 {
9638 /* The GNU C library defines this for functions which it implements
9639     to always fail with ENOSYS.  Some functions are actually named
9640     something starting with __ and the normal name is an alias.  */
9641 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
9642 choke me
9643 #else
9644 f = gettimeofday;
9645 #endif
9646
9647   ;
9648   return 0;
9649 }
9650 _ACEOF
9651 rm -f conftest.$ac_objext conftest$ac_exeext
9652 if { (eval echo "$as_me:9652: \"$ac_link\"") >&5
9653   (eval $ac_link) 2>&5
9654   ac_status=$?
9655   echo "$as_me:9655: \$? = $ac_status" >&5
9656   (exit $ac_status); } &&
9657          { ac_try='test -s conftest$ac_exeext'
9658   { (eval echo "$as_me:9658: \"$ac_try\"") >&5
9659   (eval $ac_try) 2>&5
9660   ac_status=$?
9661   echo "$as_me:9661: \$? = $ac_status" >&5
9662   (exit $ac_status); }; }; then
9663   ac_cv_func_gettimeofday=yes
9664 else
9665   echo "$as_me: failed program was:" >&5
9666 cat conftest.$ac_ext >&5
9667 ac_cv_func_gettimeofday=no
9668 fi
9669 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9670 fi
9671 echo "$as_me:9671: result: $ac_cv_func_gettimeofday" >&5
9672 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
9673 if test $ac_cv_func_gettimeofday = yes; then
9674   cat >>confdefs.h <<\EOF
9675 #define HAVE_GETTIMEOFDAY 1
9676 EOF
9677
9678 else
9679
9680 echo "$as_me:9680: checking for gettimeofday in -lbsd" >&5
9681 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
9682 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
9683   echo $ECHO_N "(cached) $ECHO_C" >&6
9684 else
9685   ac_check_lib_save_LIBS=$LIBS
9686 LIBS="-lbsd  $LIBS"
9687 cat >conftest.$ac_ext <<_ACEOF
9688 #line 9688 "configure"
9689 #include "confdefs.h"
9690
9691 /* Override any gcc2 internal prototype to avoid an error.  */
9692 #ifdef __cplusplus
9693 extern "C"
9694 #endif
9695 /* We use char because int might match the return type of a gcc2
9696    builtin and then its argument prototype would still apply.  */
9697 char gettimeofday ();
9698 int
9699 main ()
9700 {
9701 gettimeofday ();
9702   ;
9703   return 0;
9704 }
9705 _ACEOF
9706 rm -f conftest.$ac_objext conftest$ac_exeext
9707 if { (eval echo "$as_me:9707: \"$ac_link\"") >&5
9708   (eval $ac_link) 2>&5
9709   ac_status=$?
9710   echo "$as_me:9710: \$? = $ac_status" >&5
9711   (exit $ac_status); } &&
9712          { ac_try='test -s conftest$ac_exeext'
9713   { (eval echo "$as_me:9713: \"$ac_try\"") >&5
9714   (eval $ac_try) 2>&5
9715   ac_status=$?
9716   echo "$as_me:9716: \$? = $ac_status" >&5
9717   (exit $ac_status); }; }; then
9718   ac_cv_lib_bsd_gettimeofday=yes
9719 else
9720   echo "$as_me: failed program was:" >&5
9721 cat conftest.$ac_ext >&5
9722 ac_cv_lib_bsd_gettimeofday=no
9723 fi
9724 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9725 LIBS=$ac_check_lib_save_LIBS
9726 fi
9727 echo "$as_me:9727: result: $ac_cv_lib_bsd_gettimeofday" >&5
9728 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
9729 if test $ac_cv_lib_bsd_gettimeofday = yes; then
9730   cat >>confdefs.h <<\EOF
9731 #define HAVE_GETTIMEOFDAY 1
9732 EOF
9733
9734         LIBS="$LIBS -lbsd"
9735 fi
9736
9737 fi
9738         ;;
9739 esac
9740
9741 ###     Checks for header files.
9742 echo "$as_me:9742: checking for ANSI C header files" >&5
9743 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9744 if test "${ac_cv_header_stdc+set}" = set; then
9745   echo $ECHO_N "(cached) $ECHO_C" >&6
9746 else
9747   cat >conftest.$ac_ext <<_ACEOF
9748 #line 9748 "configure"
9749 #include "confdefs.h"
9750 #include <stdlib.h>
9751 #include <stdarg.h>
9752 #include <string.h>
9753 #include <float.h>
9754
9755 _ACEOF
9756 if { (eval echo "$as_me:9756: \"$ac_cpp conftest.$ac_ext\"") >&5
9757   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9758   ac_status=$?
9759   egrep -v '^ *\+' conftest.er1 >conftest.err
9760   rm -f conftest.er1
9761   cat conftest.err >&5
9762   echo "$as_me:9762: \$? = $ac_status" >&5
9763   (exit $ac_status); } >/dev/null; then
9764   if test -s conftest.err; then
9765     ac_cpp_err=$ac_c_preproc_warn_flag
9766   else
9767     ac_cpp_err=
9768   fi
9769 else
9770   ac_cpp_err=yes
9771 fi
9772 if test -z "$ac_cpp_err"; then
9773   ac_cv_header_stdc=yes
9774 else
9775   echo "$as_me: failed program was:" >&5
9776   cat conftest.$ac_ext >&5
9777   ac_cv_header_stdc=no
9778 fi
9779 rm -f conftest.err conftest.$ac_ext
9780
9781 if test $ac_cv_header_stdc = yes; then
9782   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9783   cat >conftest.$ac_ext <<_ACEOF
9784 #line 9784 "configure"
9785 #include "confdefs.h"
9786 #include <string.h>
9787
9788 _ACEOF
9789 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9790   egrep "memchr" >/dev/null 2>&1; then
9791   :
9792 else
9793   ac_cv_header_stdc=no
9794 fi
9795 rm -rf conftest*
9796
9797 fi
9798
9799 if test $ac_cv_header_stdc = yes; then
9800   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9801   cat >conftest.$ac_ext <<_ACEOF
9802 #line 9802 "configure"
9803 #include "confdefs.h"
9804 #include <stdlib.h>
9805
9806 _ACEOF
9807 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9808   egrep "free" >/dev/null 2>&1; then
9809   :
9810 else
9811   ac_cv_header_stdc=no
9812 fi
9813 rm -rf conftest*
9814
9815 fi
9816
9817 if test $ac_cv_header_stdc = yes; then
9818   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9819   if test "$cross_compiling" = yes; then
9820   :
9821 else
9822   cat >conftest.$ac_ext <<_ACEOF
9823 #line 9823 "configure"
9824 #include "confdefs.h"
9825 #include <ctype.h>
9826 #if ((' ' & 0x0FF) == 0x020)
9827 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9828 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9829 #else
9830 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9831                      || ('j' <= (c) && (c) <= 'r') \
9832                      || ('s' <= (c) && (c) <= 'z'))
9833 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9834 #endif
9835
9836 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9837 int
9838 main ()
9839 {
9840   int i;
9841   for (i = 0; i < 256; i++)
9842     if (XOR (islower (i), ISLOWER (i))
9843         || toupper (i) != TOUPPER (i))
9844       $ac_main_return(2);
9845   $ac_main_return (0);
9846 }
9847 _ACEOF
9848 rm -f conftest$ac_exeext
9849 if { (eval echo "$as_me:9849: \"$ac_link\"") >&5
9850   (eval $ac_link) 2>&5
9851   ac_status=$?
9852   echo "$as_me:9852: \$? = $ac_status" >&5
9853   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9854   { (eval echo "$as_me:9854: \"$ac_try\"") >&5
9855   (eval $ac_try) 2>&5
9856   ac_status=$?
9857   echo "$as_me:9857: \$? = $ac_status" >&5
9858   (exit $ac_status); }; }; then
9859   :
9860 else
9861   echo "$as_me: program exited with status $ac_status" >&5
9862 echo "$as_me: failed program was:" >&5
9863 cat conftest.$ac_ext >&5
9864 ac_cv_header_stdc=no
9865 fi
9866 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9867 fi
9868 fi
9869 fi
9870 echo "$as_me:9870: result: $ac_cv_header_stdc" >&5
9871 echo "${ECHO_T}$ac_cv_header_stdc" >&6
9872 if test $ac_cv_header_stdc = yes; then
9873
9874 cat >>confdefs.h <<\EOF
9875 #define STDC_HEADERS 1
9876 EOF
9877
9878 fi
9879
9880 ac_header_dirent=no
9881 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
9882   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
9883 echo "$as_me:9883: checking for $ac_hdr that defines DIR" >&5
9884 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
9885 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9886   echo $ECHO_N "(cached) $ECHO_C" >&6
9887 else
9888   cat >conftest.$ac_ext <<_ACEOF
9889 #line 9889 "configure"
9890 #include "confdefs.h"
9891 #include <sys/types.h>
9892 #include <$ac_hdr>
9893
9894 int
9895 main ()
9896 {
9897 if ((DIR *) 0)
9898 return 0;
9899   ;
9900   return 0;
9901 }
9902 _ACEOF
9903 rm -f conftest.$ac_objext
9904 if { (eval echo "$as_me:9904: \"$ac_compile\"") >&5
9905   (eval $ac_compile) 2>&5
9906   ac_status=$?
9907   echo "$as_me:9907: \$? = $ac_status" >&5
9908   (exit $ac_status); } &&
9909          { ac_try='test -s conftest.$ac_objext'
9910   { (eval echo "$as_me:9910: \"$ac_try\"") >&5
9911   (eval $ac_try) 2>&5
9912   ac_status=$?
9913   echo "$as_me:9913: \$? = $ac_status" >&5
9914   (exit $ac_status); }; }; then
9915   eval "$as_ac_Header=yes"
9916 else
9917   echo "$as_me: failed program was:" >&5
9918 cat conftest.$ac_ext >&5
9919 eval "$as_ac_Header=no"
9920 fi
9921 rm -f conftest.$ac_objext conftest.$ac_ext
9922 fi
9923 echo "$as_me:9923: result: `eval echo '${'$as_ac_Header'}'`" >&5
9924 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9925 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9926   cat >>confdefs.h <<EOF
9927 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
9928 EOF
9929
9930 ac_header_dirent=$ac_hdr; break
9931 fi
9932
9933 done
9934 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9935 if test $ac_header_dirent = dirent.h; then
9936   echo "$as_me:9936: checking for opendir in -ldir" >&5
9937 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
9938 if test "${ac_cv_lib_dir_opendir+set}" = set; then
9939   echo $ECHO_N "(cached) $ECHO_C" >&6
9940 else
9941   ac_check_lib_save_LIBS=$LIBS
9942 LIBS="-ldir  $LIBS"
9943 cat >conftest.$ac_ext <<_ACEOF
9944 #line 9944 "configure"
9945 #include "confdefs.h"
9946
9947 /* Override any gcc2 internal prototype to avoid an error.  */
9948 #ifdef __cplusplus
9949 extern "C"
9950 #endif
9951 /* We use char because int might match the return type of a gcc2
9952    builtin and then its argument prototype would still apply.  */
9953 char opendir ();
9954 int
9955 main ()
9956 {
9957 opendir ();
9958   ;
9959   return 0;
9960 }
9961 _ACEOF
9962 rm -f conftest.$ac_objext conftest$ac_exeext
9963 if { (eval echo "$as_me:9963: \"$ac_link\"") >&5
9964   (eval $ac_link) 2>&5
9965   ac_status=$?
9966   echo "$as_me:9966: \$? = $ac_status" >&5
9967   (exit $ac_status); } &&
9968          { ac_try='test -s conftest$ac_exeext'
9969   { (eval echo "$as_me:9969: \"$ac_try\"") >&5
9970   (eval $ac_try) 2>&5
9971   ac_status=$?
9972   echo "$as_me:9972: \$? = $ac_status" >&5
9973   (exit $ac_status); }; }; then
9974   ac_cv_lib_dir_opendir=yes
9975 else
9976   echo "$as_me: failed program was:" >&5
9977 cat conftest.$ac_ext >&5
9978 ac_cv_lib_dir_opendir=no
9979 fi
9980 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9981 LIBS=$ac_check_lib_save_LIBS
9982 fi
9983 echo "$as_me:9983: result: $ac_cv_lib_dir_opendir" >&5
9984 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
9985 if test $ac_cv_lib_dir_opendir = yes; then
9986   LIBS="$LIBS -ldir"
9987 fi
9988
9989 else
9990   echo "$as_me:9990: checking for opendir in -lx" >&5
9991 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
9992 if test "${ac_cv_lib_x_opendir+set}" = set; then
9993   echo $ECHO_N "(cached) $ECHO_C" >&6
9994 else
9995   ac_check_lib_save_LIBS=$LIBS
9996 LIBS="-lx  $LIBS"
9997 cat >conftest.$ac_ext <<_ACEOF
9998 #line 9998 "configure"
9999 #include "confdefs.h"
10000
10001 /* Override any gcc2 internal prototype to avoid an error.  */
10002 #ifdef __cplusplus
10003 extern "C"
10004 #endif
10005 /* We use char because int might match the return type of a gcc2
10006    builtin and then its argument prototype would still apply.  */
10007 char opendir ();
10008 int
10009 main ()
10010 {
10011 opendir ();
10012   ;
10013   return 0;
10014 }
10015 _ACEOF
10016 rm -f conftest.$ac_objext conftest$ac_exeext
10017 if { (eval echo "$as_me:10017: \"$ac_link\"") >&5
10018   (eval $ac_link) 2>&5
10019   ac_status=$?
10020   echo "$as_me:10020: \$? = $ac_status" >&5
10021   (exit $ac_status); } &&
10022          { ac_try='test -s conftest$ac_exeext'
10023   { (eval echo "$as_me:10023: \"$ac_try\"") >&5
10024   (eval $ac_try) 2>&5
10025   ac_status=$?
10026   echo "$as_me:10026: \$? = $ac_status" >&5
10027   (exit $ac_status); }; }; then
10028   ac_cv_lib_x_opendir=yes
10029 else
10030   echo "$as_me: failed program was:" >&5
10031 cat conftest.$ac_ext >&5
10032 ac_cv_lib_x_opendir=no
10033 fi
10034 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10035 LIBS=$ac_check_lib_save_LIBS
10036 fi
10037 echo "$as_me:10037: result: $ac_cv_lib_x_opendir" >&5
10038 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10039 if test $ac_cv_lib_x_opendir = yes; then
10040   LIBS="$LIBS -lx"
10041 fi
10042
10043 fi
10044
10045 echo "$as_me:10045: checking whether time.h and sys/time.h may both be included" >&5
10046 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10047 if test "${ac_cv_header_time+set}" = set; then
10048   echo $ECHO_N "(cached) $ECHO_C" >&6
10049 else
10050   cat >conftest.$ac_ext <<_ACEOF
10051 #line 10051 "configure"
10052 #include "confdefs.h"
10053 #include <sys/types.h>
10054 #include <sys/time.h>
10055 #include <time.h>
10056
10057 int
10058 main ()
10059 {
10060 if ((struct tm *) 0)
10061 return 0;
10062   ;
10063   return 0;
10064 }
10065 _ACEOF
10066 rm -f conftest.$ac_objext
10067 if { (eval echo "$as_me:10067: \"$ac_compile\"") >&5
10068   (eval $ac_compile) 2>&5
10069   ac_status=$?
10070   echo "$as_me:10070: \$? = $ac_status" >&5
10071   (exit $ac_status); } &&
10072          { ac_try='test -s conftest.$ac_objext'
10073   { (eval echo "$as_me:10073: \"$ac_try\"") >&5
10074   (eval $ac_try) 2>&5
10075   ac_status=$?
10076   echo "$as_me:10076: \$? = $ac_status" >&5
10077   (exit $ac_status); }; }; then
10078   ac_cv_header_time=yes
10079 else
10080   echo "$as_me: failed program was:" >&5
10081 cat conftest.$ac_ext >&5
10082 ac_cv_header_time=no
10083 fi
10084 rm -f conftest.$ac_objext conftest.$ac_ext
10085 fi
10086 echo "$as_me:10086: result: $ac_cv_header_time" >&5
10087 echo "${ECHO_T}$ac_cv_header_time" >&6
10088 if test $ac_cv_header_time = yes; then
10089
10090 cat >>confdefs.h <<\EOF
10091 #define TIME_WITH_SYS_TIME 1
10092 EOF
10093
10094 fi
10095
10096 ###     checks for compiler characteristics
10097 ac_ext=c
10098 ac_cpp='$CPP $CPPFLAGS'
10099 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10100 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10101 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10102 ac_main_return=return
10103
10104 echo "$as_me:10104: checking for $CC option to accept ANSI C" >&5
10105 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
10106 if test "${ac_cv_prog_cc_stdc+set}" = set; then
10107   echo $ECHO_N "(cached) $ECHO_C" >&6
10108 else
10109   ac_cv_prog_cc_stdc=no
10110 ac_save_CC=$CC
10111 cat >conftest.$ac_ext <<_ACEOF
10112 #line 10112 "configure"
10113 #include "confdefs.h"
10114 #include <stdarg.h>
10115 #include <stdio.h>
10116 #include <sys/types.h>
10117 #include <sys/stat.h>
10118 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
10119 struct buf { int x; };
10120 FILE * (*rcsopen) (struct buf *, struct stat *, int);
10121 static char *e (p, i)
10122      char **p;
10123      int i;
10124 {
10125   return p[i];
10126 }
10127 static char *f (char * (*g) (char **, int), char **p, ...)
10128 {
10129   char *s;
10130   va_list v;
10131   va_start (v,p);
10132   s = g (p, va_arg (v,int));
10133   va_end (v);
10134   return s;
10135 }
10136 int test (int i, double x);
10137 struct s1 {int (*f) (int a);};
10138 struct s2 {int (*f) (double a);};
10139 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
10140 int argc;
10141 char **argv;
10142 int
10143 main ()
10144 {
10145 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
10146   ;
10147   return 0;
10148 }
10149 _ACEOF
10150 # Don't try gcc -ansi; that turns off useful extensions and
10151 # breaks some systems' header files.
10152 # AIX                   -qlanglvl=ansi
10153 # Ultrix and OSF/1      -std1
10154 # HP-UX 10.20 and later -Ae
10155 # HP-UX older versions  -Aa -D_HPUX_SOURCE
10156 # SVR4                  -Xc -D__EXTENSIONS__
10157 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
10158 do
10159   CC="$ac_save_CC $ac_arg"
10160   rm -f conftest.$ac_objext
10161 if { (eval echo "$as_me:10161: \"$ac_compile\"") >&5
10162   (eval $ac_compile) 2>&5
10163   ac_status=$?
10164   echo "$as_me:10164: \$? = $ac_status" >&5
10165   (exit $ac_status); } &&
10166          { ac_try='test -s conftest.$ac_objext'
10167   { (eval echo "$as_me:10167: \"$ac_try\"") >&5
10168   (eval $ac_try) 2>&5
10169   ac_status=$?
10170   echo "$as_me:10170: \$? = $ac_status" >&5
10171   (exit $ac_status); }; }; then
10172   ac_cv_prog_cc_stdc=$ac_arg
10173 break
10174 else
10175   echo "$as_me: failed program was:" >&5
10176 cat conftest.$ac_ext >&5
10177 fi
10178 rm -f conftest.$ac_objext
10179 done
10180 rm -f conftest.$ac_ext conftest.$ac_objext
10181 CC=$ac_save_CC
10182
10183 fi
10184
10185 case "x$ac_cv_prog_cc_stdc" in
10186   x|xno)
10187     echo "$as_me:10187: result: none needed" >&5
10188 echo "${ECHO_T}none needed" >&6 ;;
10189   *)
10190     echo "$as_me:10190: result: $ac_cv_prog_cc_stdc" >&5
10191 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
10192     CC="$CC $ac_cv_prog_cc_stdc" ;;
10193 esac
10194
10195 echo "$as_me:10195: checking for an ANSI C-conforming const" >&5
10196 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
10197 if test "${ac_cv_c_const+set}" = set; then
10198   echo $ECHO_N "(cached) $ECHO_C" >&6
10199 else
10200   cat >conftest.$ac_ext <<_ACEOF
10201 #line 10201 "configure"
10202 #include "confdefs.h"
10203
10204 int
10205 main ()
10206 {
10207 /* FIXME: Include the comments suggested by Paul. */
10208 #ifndef __cplusplus
10209   /* Ultrix mips cc rejects this.  */
10210   typedef int charset[2];
10211   const charset x;
10212   /* SunOS 4.1.1 cc rejects this.  */
10213   char const *const *ccp;
10214   char **p;
10215   /* NEC SVR4.0.2 mips cc rejects this.  */
10216   struct point {int x, y;};
10217   static struct point const zero = {0,0};
10218   /* AIX XL C 1.02.0.0 rejects this.
10219      It does not let you subtract one const X* pointer from another in
10220      an arm of an if-expression whose if-part is not a constant
10221      expression */
10222   const char *g = "string";
10223   ccp = &g + (g ? g-g : 0);
10224   /* HPUX 7.0 cc rejects these. */
10225   ++ccp;
10226   p = (char**) ccp;
10227   ccp = (char const *const *) p;
10228   { /* SCO 3.2v4 cc rejects this.  */
10229     char *t;
10230     char const *s = 0 ? (char *) 0 : (char const *) 0;
10231
10232     *t++ = 0;
10233   }
10234   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10235     int x[] = {25, 17};
10236     const int *foo = &x[0];
10237     ++foo;
10238   }
10239   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10240     typedef const int *iptr;
10241     iptr p = 0;
10242     ++p;
10243   }
10244   { /* AIX XL C 1.02.0.0 rejects this saying
10245        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10246     struct s { int j; const int *ap[3]; };
10247     struct s *b; b->j = 5;
10248   }
10249   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10250     const int foo = 10;
10251   }
10252 #endif
10253
10254   ;
10255   return 0;
10256 }
10257 _ACEOF
10258 rm -f conftest.$ac_objext
10259 if { (eval echo "$as_me:10259: \"$ac_compile\"") >&5
10260   (eval $ac_compile) 2>&5
10261   ac_status=$?
10262   echo "$as_me:10262: \$? = $ac_status" >&5
10263   (exit $ac_status); } &&
10264          { ac_try='test -s conftest.$ac_objext'
10265   { (eval echo "$as_me:10265: \"$ac_try\"") >&5
10266   (eval $ac_try) 2>&5
10267   ac_status=$?
10268   echo "$as_me:10268: \$? = $ac_status" >&5
10269   (exit $ac_status); }; }; then
10270   ac_cv_c_const=yes
10271 else
10272   echo "$as_me: failed program was:" >&5
10273 cat conftest.$ac_ext >&5
10274 ac_cv_c_const=no
10275 fi
10276 rm -f conftest.$ac_objext conftest.$ac_ext
10277 fi
10278 echo "$as_me:10278: result: $ac_cv_c_const" >&5
10279 echo "${ECHO_T}$ac_cv_c_const" >&6
10280 if test $ac_cv_c_const = no; then
10281
10282 cat >>confdefs.h <<\EOF
10283 #define const
10284 EOF
10285
10286 fi
10287
10288 ###     Checks for external-data
10289
10290 echo "$as_me:10290: checking if data-only library module links" >&5
10291 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
10292 if test "${cf_cv_link_dataonly+set}" = set; then
10293   echo $ECHO_N "(cached) $ECHO_C" >&6
10294 else
10295
10296         rm -f conftest.a
10297         cat >conftest.$ac_ext <<EOF
10298 #line 10298 "configure"
10299 int     testdata[3] = { 123, 456, 789 };
10300 EOF
10301         if { (eval echo "$as_me:10301: \"$ac_compile\"") >&5
10302   (eval $ac_compile) 2>&5
10303   ac_status=$?
10304   echo "$as_me:10304: \$? = $ac_status" >&5
10305   (exit $ac_status); } ; then
10306                 mv conftest.o data.o && \
10307                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
10308         fi
10309         rm -f conftest.$ac_ext data.o
10310         cat >conftest.$ac_ext <<EOF
10311 #line 10311 "configure"
10312 int     testfunc()
10313 {
10314 #if defined(NeXT)
10315         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
10316 #else
10317         extern int testdata[3];
10318         return testdata[0] == 123
10319            &&  testdata[1] == 456
10320            &&  testdata[2] == 789;
10321 #endif
10322 }
10323 EOF
10324         if { (eval echo "$as_me:10324: \"$ac_compile\"") >&5
10325   (eval $ac_compile) 2>&5
10326   ac_status=$?
10327   echo "$as_me:10327: \$? = $ac_status" >&5
10328   (exit $ac_status); }; then
10329                 mv conftest.o func.o && \
10330                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
10331         fi
10332         rm -f conftest.$ac_ext func.o
10333         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
10334         cf_saveLIBS="$LIBS"
10335         LIBS="conftest.a $LIBS"
10336         if test "$cross_compiling" = yes; then
10337   cf_cv_link_dataonly=unknown
10338 else
10339   cat >conftest.$ac_ext <<_ACEOF
10340 #line 10340 "configure"
10341 #include "confdefs.h"
10342
10343         int main()
10344         {
10345                 extern int testfunc();
10346                 ${cf_cv_main_return:-return} (!testfunc());
10347         }
10348
10349 _ACEOF
10350 rm -f conftest$ac_exeext
10351 if { (eval echo "$as_me:10351: \"$ac_link\"") >&5
10352   (eval $ac_link) 2>&5
10353   ac_status=$?
10354   echo "$as_me:10354: \$? = $ac_status" >&5
10355   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10356   { (eval echo "$as_me:10356: \"$ac_try\"") >&5
10357   (eval $ac_try) 2>&5
10358   ac_status=$?
10359   echo "$as_me:10359: \$? = $ac_status" >&5
10360   (exit $ac_status); }; }; then
10361   cf_cv_link_dataonly=yes
10362 else
10363   echo "$as_me: program exited with status $ac_status" >&5
10364 echo "$as_me: failed program was:" >&5
10365 cat conftest.$ac_ext >&5
10366 cf_cv_link_dataonly=no
10367 fi
10368 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10369 fi
10370         LIBS="$cf_saveLIBS"
10371
10372 fi
10373
10374 echo "$as_me:10374: result: $cf_cv_link_dataonly" >&5
10375 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
10376
10377 if test "$cf_cv_link_dataonly" = no ; then
10378         cat >>confdefs.h <<\EOF
10379 #define BROKEN_LINKER 1
10380 EOF
10381
10382         BROKEN_LINKER=1
10383 fi
10384
10385 ###     Checks for library functions.
10386
10387 echo "$as_me:10387: checking for working mkstemp" >&5
10388 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
10389 if test "${cf_cv_func_mkstemp+set}" = set; then
10390   echo $ECHO_N "(cached) $ECHO_C" >&6
10391 else
10392
10393 rm -rf conftest*
10394 if test "$cross_compiling" = yes; then
10395   echo "$as_me:10395: checking for mkstemp" >&5
10396 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
10397 if test "${ac_cv_func_mkstemp+set}" = set; then
10398   echo $ECHO_N "(cached) $ECHO_C" >&6
10399 else
10400   cat >conftest.$ac_ext <<_ACEOF
10401 #line 10401 "configure"
10402 #include "confdefs.h"
10403 /* System header to define __stub macros and hopefully few prototypes,
10404     which can conflict with char mkstemp (); below.  */
10405 #include <assert.h>
10406 /* Override any gcc2 internal prototype to avoid an error.  */
10407 #ifdef __cplusplus
10408 extern "C"
10409 #endif
10410 /* We use char because int might match the return type of a gcc2
10411    builtin and then its argument prototype would still apply.  */
10412 char mkstemp ();
10413 char (*f) ();
10414
10415 int
10416 main ()
10417 {
10418 /* The GNU C library defines this for functions which it implements
10419     to always fail with ENOSYS.  Some functions are actually named
10420     something starting with __ and the normal name is an alias.  */
10421 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
10422 choke me
10423 #else
10424 f = mkstemp;
10425 #endif
10426
10427   ;
10428   return 0;
10429 }
10430 _ACEOF
10431 rm -f conftest.$ac_objext conftest$ac_exeext
10432 if { (eval echo "$as_me:10432: \"$ac_link\"") >&5
10433   (eval $ac_link) 2>&5
10434   ac_status=$?
10435   echo "$as_me:10435: \$? = $ac_status" >&5
10436   (exit $ac_status); } &&
10437          { ac_try='test -s conftest$ac_exeext'
10438   { (eval echo "$as_me:10438: \"$ac_try\"") >&5
10439   (eval $ac_try) 2>&5
10440   ac_status=$?
10441   echo "$as_me:10441: \$? = $ac_status" >&5
10442   (exit $ac_status); }; }; then
10443   ac_cv_func_mkstemp=yes
10444 else
10445   echo "$as_me: failed program was:" >&5
10446 cat conftest.$ac_ext >&5
10447 ac_cv_func_mkstemp=no
10448 fi
10449 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10450 fi
10451 echo "$as_me:10451: result: $ac_cv_func_mkstemp" >&5
10452 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
10453
10454 else
10455   cat >conftest.$ac_ext <<_ACEOF
10456 #line 10456 "configure"
10457 #include "confdefs.h"
10458
10459 #include <sys/types.h>
10460 #include <stdlib.h>
10461 #include <stdio.h>
10462 #include <string.h>
10463 #include <sys/stat.h>
10464 int main()
10465 {
10466         char *tmpl = "conftestXXXXXX";
10467         char name[2][80];
10468         int n;
10469         int result = 0;
10470         int fd;
10471         struct stat sb;
10472
10473         umask(077);
10474         for (n = 0; n < 2; ++n) {
10475                 strcpy(name[n], tmpl);
10476                 if ((fd = mkstemp(name[n])) >= 0) {
10477                         if (!strcmp(name[n], tmpl)
10478                          || stat(name[n], &sb) != 0
10479                          || (sb.st_mode & S_IFMT) != S_IFREG
10480                          || (sb.st_mode & 077) != 0) {
10481                                 result = 1;
10482                         }
10483                         close(fd);
10484                 }
10485         }
10486         if (result == 0
10487          && !strcmp(name[0], name[1]))
10488                 result = 1;
10489         ${cf_cv_main_return:-return}(result);
10490 }
10491
10492 _ACEOF
10493 rm -f conftest$ac_exeext
10494 if { (eval echo "$as_me:10494: \"$ac_link\"") >&5
10495   (eval $ac_link) 2>&5
10496   ac_status=$?
10497   echo "$as_me:10497: \$? = $ac_status" >&5
10498   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10499   { (eval echo "$as_me:10499: \"$ac_try\"") >&5
10500   (eval $ac_try) 2>&5
10501   ac_status=$?
10502   echo "$as_me:10502: \$? = $ac_status" >&5
10503   (exit $ac_status); }; }; then
10504   cf_cv_func_mkstemp=yes
10505
10506 else
10507   echo "$as_me: program exited with status $ac_status" >&5
10508 echo "$as_me: failed program was:" >&5
10509 cat conftest.$ac_ext >&5
10510 cf_cv_func_mkstemp=no
10511
10512 fi
10513 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10514 fi
10515
10516 fi
10517 echo "$as_me:10517: result: $cf_cv_func_mkstemp" >&5
10518 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
10519 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
10520         cat >>confdefs.h <<\EOF
10521 #define HAVE_MKSTEMP 1
10522 EOF
10523
10524 fi
10525
10526 echo "$as_me:10526: checking return type of signal handlers" >&5
10527 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
10528 if test "${ac_cv_type_signal+set}" = set; then
10529   echo $ECHO_N "(cached) $ECHO_C" >&6
10530 else
10531   cat >conftest.$ac_ext <<_ACEOF
10532 #line 10532 "configure"
10533 #include "confdefs.h"
10534 #include <sys/types.h>
10535 #include <signal.h>
10536 #ifdef signal
10537 # undef signal
10538 #endif
10539 #ifdef __cplusplus
10540 extern "C" void (*signal (int, void (*)(int)))(int);
10541 #else
10542 void (*signal ()) ();
10543 #endif
10544
10545 int
10546 main ()
10547 {
10548 int i;
10549   ;
10550   return 0;
10551 }
10552 _ACEOF
10553 rm -f conftest.$ac_objext
10554 if { (eval echo "$as_me:10554: \"$ac_compile\"") >&5
10555   (eval $ac_compile) 2>&5
10556   ac_status=$?
10557   echo "$as_me:10557: \$? = $ac_status" >&5
10558   (exit $ac_status); } &&
10559          { ac_try='test -s conftest.$ac_objext'
10560   { (eval echo "$as_me:10560: \"$ac_try\"") >&5
10561   (eval $ac_try) 2>&5
10562   ac_status=$?
10563   echo "$as_me:10563: \$? = $ac_status" >&5
10564   (exit $ac_status); }; }; then
10565   ac_cv_type_signal=void
10566 else
10567   echo "$as_me: failed program was:" >&5
10568 cat conftest.$ac_ext >&5
10569 ac_cv_type_signal=int
10570 fi
10571 rm -f conftest.$ac_objext conftest.$ac_ext
10572 fi
10573 echo "$as_me:10573: result: $ac_cv_type_signal" >&5
10574 echo "${ECHO_T}$ac_cv_type_signal" >&6
10575
10576 cat >>confdefs.h <<EOF
10577 #define RETSIGTYPE $ac_cv_type_signal
10578 EOF
10579
10580 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
10581         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
10582         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
10583 fi
10584
10585 if test "$cf_with_ada" != "no" ; then
10586
10587 cf_ada_make=gnatmake
10588 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
10589 set dummy $cf_ada_make; ac_word=$2
10590 echo "$as_me:10590: checking for $ac_word" >&5
10591 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10592 if test "${ac_cv_prog_gnat_exists+set}" = set; then
10593   echo $ECHO_N "(cached) $ECHO_C" >&6
10594 else
10595   if test -n "$gnat_exists"; then
10596   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
10597 else
10598   ac_save_IFS=$IFS; IFS=$ac_path_separator
10599 ac_dummy="$PATH"
10600 for ac_dir in $ac_dummy; do
10601   IFS=$ac_save_IFS
10602   test -z "$ac_dir" && ac_dir=.
10603   $as_executable_p "$ac_dir/$ac_word" || continue
10604 ac_cv_prog_gnat_exists="yes"
10605 echo "$as_me:10605: found $ac_dir/$ac_word" >&5
10606 break
10607 done
10608
10609   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
10610 fi
10611 fi
10612 gnat_exists=$ac_cv_prog_gnat_exists
10613 if test -n "$gnat_exists"; then
10614   echo "$as_me:10614: result: $gnat_exists" >&5
10615 echo "${ECHO_T}$gnat_exists" >&6
10616 else
10617   echo "$as_me:10617: result: no" >&5
10618 echo "${ECHO_T}no" >&6
10619 fi
10620
10621 if test "$ac_cv_prog_gnat_exists" = no; then
10622    cf_ada_make=
10623 else
10624
10625 echo "$as_me:10625: checking for gnat version" >&5
10626 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
10627 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
10628   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
10629 echo "$as_me:10629: result: $cf_gnat_version" >&5
10630 echo "${ECHO_T}$cf_gnat_version" >&6
10631
10632 case $cf_gnat_version in
10633   3.1[1-9]*|3.[2-9]*|[4-9].*)
10634     cf_cv_prog_gnat_correct=yes
10635     ;;
10636   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
10637      cf_cv_prog_gnat_correct=no
10638      ;;
10639 esac
10640
10641 case $cf_gnat_version in
10642   3.[1-9]*|[4-9].*)
10643       cf_compile_generics=generics
10644       cf_generic_objects="\${GENOBJS}"
10645       ;;
10646   *)  cf_compile_generics=
10647       cf_generic_objects=
10648       ;;
10649 esac
10650
10651 case $cf_gnat_version in
10652   3.[0-9]*)
10653     USE_OLD_MAKERULES=""
10654     USE_GNAT_PROJECTS="#"
10655     ;;
10656   *)
10657     USE_OLD_MAKERULES="#"
10658     USE_GNAT_PROJECTS=""
10659     ;;
10660 esac
10661
10662    # Extract the first word of "m4", so it can be a program name with args.
10663 set dummy m4; ac_word=$2
10664 echo "$as_me:10664: checking for $ac_word" >&5
10665 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10666 if test "${ac_cv_prog_M4_exists+set}" = set; then
10667   echo $ECHO_N "(cached) $ECHO_C" >&6
10668 else
10669   if test -n "$M4_exists"; then
10670   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
10671 else
10672   ac_save_IFS=$IFS; IFS=$ac_path_separator
10673 ac_dummy="$PATH"
10674 for ac_dir in $ac_dummy; do
10675   IFS=$ac_save_IFS
10676   test -z "$ac_dir" && ac_dir=.
10677   $as_executable_p "$ac_dir/$ac_word" || continue
10678 ac_cv_prog_M4_exists="yes"
10679 echo "$as_me:10679: found $ac_dir/$ac_word" >&5
10680 break
10681 done
10682
10683   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
10684 fi
10685 fi
10686 M4_exists=$ac_cv_prog_M4_exists
10687 if test -n "$M4_exists"; then
10688   echo "$as_me:10688: result: $M4_exists" >&5
10689 echo "${ECHO_T}$M4_exists" >&6
10690 else
10691   echo "$as_me:10691: result: no" >&5
10692 echo "${ECHO_T}no" >&6
10693 fi
10694
10695    if test "$ac_cv_prog_M4_exists" = no; then
10696       cf_cv_prog_gnat_correct=no
10697       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
10698    fi
10699    if test "$cf_cv_prog_gnat_correct" = yes; then
10700       echo "$as_me:10700: checking if GNAT works" >&5
10701 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
10702
10703 rm -rf conftest*
10704 cat >>conftest.ads <<CF_EOF
10705 procedure conftest;
10706 CF_EOF
10707 cat >>conftest.adb <<CF_EOF
10708 with Text_IO;
10709 with GNAT.OS_Lib;
10710 procedure conftest is
10711 begin
10712    Text_IO.Put ("Hello World");
10713    Text_IO.New_Line;
10714    GNAT.OS_Lib.OS_Exit (0);
10715 end conftest;
10716 CF_EOF
10717 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
10718    if ( ./conftest 1>&5 2>&1 ) ; then
10719       cf_cv_prog_gnat_correct=yes
10720    else
10721       cf_cv_prog_gnat_correct=no
10722    fi
10723 else
10724    cf_cv_prog_gnat_correct=no
10725 fi
10726 rm -rf conftest*
10727
10728       echo "$as_me:10728: result: $cf_cv_prog_gnat_correct" >&5
10729 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
10730    fi
10731 fi
10732
10733         if test "$cf_cv_prog_gnat_correct" = yes; then
10734
10735         ADAFLAGS="$ADAFLAGS -O3 -gnatpn"
10736
10737 echo "$as_me:10737: checking if GNAT pragma Unreferenced works" >&5
10738 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
10739 if test "${cf_cv_pragma_unreferenced+set}" = set; then
10740   echo $ECHO_N "(cached) $ECHO_C" >&6
10741 else
10742
10743 rm -rf conftest*
10744 cat >>conftest.ads <<CF_EOF
10745 procedure conftest;
10746 CF_EOF
10747 cat >>conftest.adb <<CF_EOF
10748 with Text_IO;
10749 with GNAT.OS_Lib;
10750 procedure conftest is
10751    test : Integer;
10752    pragma Unreferenced (test);
10753 begin
10754    test := 1;
10755    Text_IO.Put ("Hello World");
10756    Text_IO.New_Line;
10757    GNAT.OS_Lib.OS_Exit (0);
10758 end conftest;
10759 CF_EOF
10760 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
10761       cf_cv_pragma_unreferenced=yes
10762 else
10763    cf_cv_pragma_unreferenced=no
10764 fi
10765 rm -rf conftest*
10766
10767 fi
10768 echo "$as_me:10768: result: $cf_cv_pragma_unreferenced" >&5
10769 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
10770
10771 # if the pragma is supported, use it (needed in the Trace code).
10772 if test $cf_cv_pragma_unreferenced = yes ; then
10773         PRAGMA_UNREF=TRUE
10774 else
10775         PRAGMA_UNREF=FALSE
10776 fi
10777
10778 echo "$as_me:10778: checking for ada-compiler" >&5
10779 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
10780
10781 # Check whether --with-ada-compiler or --without-ada-compiler was given.
10782 if test "${with_ada_compiler+set}" = set; then
10783   withval="$with_ada_compiler"
10784   cf_ada_compiler=$withval
10785 else
10786   cf_ada_compiler=gnatmake
10787 fi;
10788
10789 echo "$as_me:10789: result: $cf_ada_compiler" >&5
10790 echo "${ECHO_T}$cf_ada_compiler" >&6
10791
10792                 cf_ada_package=terminal_interface
10793
10794 echo "$as_me:10794: checking for ada-include" >&5
10795 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
10796
10797 # Check whether --with-ada-include or --without-ada-include was given.
10798 if test "${with_ada_include+set}" = set; then
10799   withval="$with_ada_include"
10800
10801 else
10802   withval="${ADA_INCLUDE-$prefix/share/ada/adainclude}"
10803 fi; if test -n "$prefix/share/ada/adainclude" ; then
10804
10805 if test "x$prefix" != xNONE; then
10806   cf_path_syntax="$prefix"
10807 else
10808   cf_path_syntax="$ac_default_prefix"
10809 fi
10810
10811 case ".$withval" in #(vi
10812 .\$\(*\)*|.\'*\'*) #(vi
10813   ;;
10814 ..|./*|.\\*) #(vi
10815   ;;
10816 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
10817   ;;
10818 .\${*prefix}*) #(vi
10819   eval withval="$withval"
10820   case ".$withval" in #(vi
10821   .NONE/*)
10822     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
10823     ;;
10824   esac
10825   ;; #(vi
10826 .no|.NONE/*)
10827   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
10828   ;;
10829 *)
10830   { { echo "$as_me:10830: error: expected a pathname, not \"$withval\"" >&5
10831 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
10832    { (exit 1); exit 1; }; }
10833   ;;
10834 esac
10835
10836 fi
10837 ADA_INCLUDE="$withval"
10838
10839 echo "$as_me:10839: result: $ADA_INCLUDE" >&5
10840 echo "${ECHO_T}$ADA_INCLUDE" >&6
10841
10842 echo "$as_me:10842: checking for ada-objects" >&5
10843 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
10844
10845 # Check whether --with-ada-objects or --without-ada-objects was given.
10846 if test "${with_ada_objects+set}" = set; then
10847   withval="$with_ada_objects"
10848
10849 else
10850   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
10851 fi; if test -n "$prefix/lib/ada/adalib" ; then
10852
10853 if test "x$prefix" != xNONE; then
10854   cf_path_syntax="$prefix"
10855 else
10856   cf_path_syntax="$ac_default_prefix"
10857 fi
10858
10859 case ".$withval" in #(vi
10860 .\$\(*\)*|.\'*\'*) #(vi
10861   ;;
10862 ..|./*|.\\*) #(vi
10863   ;;
10864 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
10865   ;;
10866 .\${*prefix}*) #(vi
10867   eval withval="$withval"
10868   case ".$withval" in #(vi
10869   .NONE/*)
10870     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
10871     ;;
10872   esac
10873   ;; #(vi
10874 .no|.NONE/*)
10875   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
10876   ;;
10877 *)
10878   { { echo "$as_me:10878: error: expected a pathname, not \"$withval\"" >&5
10879 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
10880    { (exit 1); exit 1; }; }
10881   ;;
10882 esac
10883
10884 fi
10885 ADA_OBJECTS="$withval"
10886
10887 echo "$as_me:10887: result: $ADA_OBJECTS" >&5
10888 echo "${ECHO_T}$ADA_OBJECTS" >&6
10889
10890 echo "$as_me:10890: checking if an Ada95 shared-library should be built" >&5
10891 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
10892
10893 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
10894 if test "${with_ada_sharedlib+set}" = set; then
10895   withval="$with_ada_sharedlib"
10896   with_ada_sharedlib=$withval
10897 else
10898   with_ada_sharedlib=no
10899 fi;
10900 echo "$as_me:10900: result: $with_ada_sharedlib" >&5
10901 echo "${ECHO_T}$with_ada_sharedlib" >&6
10902
10903 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
10904 MAKE_ADA_SHAREDLIB="#"
10905
10906 if test "x$with_ada_sharedlib" != xno
10907 then
10908         MAKE_ADA_SHAREDLIB=
10909         if test "x$with_ada_sharedlib" != xyes
10910         then
10911                 ADA_SHAREDLIB="$with_ada_sharedlib"
10912         fi
10913 fi
10914
10915         fi
10916 fi
10917
10918 ################################################################################
10919
10920 # not needed
10921 TINFO_ARGS2=
10922
10923 ### Construct the list of include-directories to be generated
10924
10925 CPPFLAGS="$CPPFLAGS -I. -I../include"
10926 if test "$srcdir" != "."; then
10927         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
10928 fi
10929 if test "$GCC" != yes; then
10930         CPPFLAGS="$CPPFLAGS -I\${includedir}"
10931 elif test "$includedir" != "/usr/include"; then
10932         if test "$includedir" = '${prefix}/include' ; then
10933                 if test $prefix != /usr ; then
10934                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
10935                 fi
10936         else
10937                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
10938         fi
10939 fi
10940
10941 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
10942 if test "$srcdir" != "."; then
10943         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
10944 fi
10945 if test "$GCC" != yes; then
10946         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
10947 elif test "$includedir" != "/usr/include"; then
10948         if test "$includedir" = '${prefix}/include' ; then
10949                 if test $prefix != /usr ; then
10950                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
10951                 fi
10952         else
10953                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
10954         fi
10955 fi
10956
10957 ### Build up pieces for makefile rules
10958 echo "$as_me:10958: checking default library suffix" >&5
10959 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
10960
10961         case $DFT_LWR_MODEL in
10962         libtool) DFT_ARG_SUFFIX=''   ;;
10963         normal)  DFT_ARG_SUFFIX=''   ;;
10964         debug)   DFT_ARG_SUFFIX='_g' ;;
10965         profile) DFT_ARG_SUFFIX='_p' ;;
10966         shared)  DFT_ARG_SUFFIX=''   ;;
10967         esac
10968         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
10969 echo "$as_me:10969: result: $DFT_ARG_SUFFIX" >&5
10970 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
10971
10972 echo "$as_me:10972: checking default library-dependency suffix" >&5
10973 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
10974
10975         case $DFT_LWR_MODEL in #(vi
10976         libtool) #(vi
10977                 DFT_LIB_SUFFIX='.la'
10978                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10979                 ;;
10980         normal) #(vi
10981                 DFT_LIB_SUFFIX='.a'
10982                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10983                 ;;
10984         debug) #(vi
10985                 DFT_LIB_SUFFIX='_g.a'
10986                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10987                 ;;
10988         profile) #(vi
10989                 DFT_LIB_SUFFIX='_p.a'
10990                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10991                 ;;
10992         shared) #(vi
10993                 case $cf_cv_system_name in
10994                 aix[56]*) #(vi
10995                         DFT_LIB_SUFFIX='.a'
10996                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10997                         ;;
10998                 cygwin*) #(vi
10999                         DFT_LIB_SUFFIX='.dll'
11000                         DFT_DEP_SUFFIX='.dll.a'
11001                         ;;
11002                 darwin*) #(vi
11003                         DFT_LIB_SUFFIX='.dylib'
11004                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11005                         ;;
11006                 hpux*) #(vi
11007                         case $target in
11008                         ia64*) #(vi
11009                                 DFT_LIB_SUFFIX='.so'
11010                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11011                                 ;;
11012                         *) #(vi
11013                                 DFT_LIB_SUFFIX='.sl'
11014                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11015                                 ;;
11016                         esac
11017                         ;;
11018                 *)      DFT_LIB_SUFFIX='.so'
11019                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11020                         ;;
11021                 esac
11022         esac
11023         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
11024         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
11025 echo "$as_me:11025: result: $DFT_DEP_SUFFIX" >&5
11026 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
11027
11028 echo "$as_me:11028: checking default object directory" >&5
11029 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
11030
11031         case $DFT_LWR_MODEL in
11032         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
11033         normal)  DFT_OBJ_SUBDIR='objects' ;;
11034         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
11035         profile) DFT_OBJ_SUBDIR='obj_p' ;;
11036         shared)
11037                 case $cf_cv_system_name in #(vi
11038                 cygwin) #(vi
11039                         DFT_OBJ_SUBDIR='objects' ;;
11040                 *)
11041                         DFT_OBJ_SUBDIR='obj_s' ;;
11042                 esac
11043         esac
11044 echo "$as_me:11044: result: $DFT_OBJ_SUBDIR" >&5
11045 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
11046
11047 ### Set up low-level terminfo dependencies for makefiles.
11048
11049 if test "$DFT_LWR_MODEL" = shared ; then
11050         case $cf_cv_system_name in #(vi
11051         cygwin*)
11052                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
11053                 ;;
11054         esac
11055 fi
11056
11057 ### Construct the list of subdirectories for which we'll customize makefiles
11058 ### with the appropriate compile-rules.
11059
11060 SUB_MAKEFILES="gen/adacurses${DFT_ARG_SUFFIX}-config:gen/adacurses-config.in"
11061
11062 cat >>confdefs.h <<EOF
11063 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
11064 EOF
11065
11066 ### Now that we're done running tests, add the compiler-warnings, if any
11067
11068 cf_fix_cppflags=no
11069 cf_new_cflags=
11070 cf_new_cppflags=
11071 cf_new_extra_cppflags=
11072
11073 for cf_add_cflags in $EXTRA_CFLAGS
11074 do
11075 case $cf_fix_cppflags in
11076 no)
11077         case $cf_add_cflags in #(vi
11078         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11079                 case $cf_add_cflags in
11080                 -D*)
11081                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11082
11083                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11084                                 && test -z "${cf_tst_cflags}" \
11085                                 && cf_fix_cppflags=yes
11086
11087                         if test $cf_fix_cppflags = yes ; then
11088                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11089                                 continue
11090                         elif test "${cf_tst_cflags}" = "\"'" ; then
11091                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11092                                 continue
11093                         fi
11094                         ;;
11095                 esac
11096                 case "$CPPFLAGS" in
11097                 *$cf_add_cflags) #(vi
11098                         ;;
11099                 *) #(vi
11100                         case $cf_add_cflags in #(vi
11101                         -D*)
11102                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11103
11104 CPPFLAGS=`echo "$CPPFLAGS" | \
11105         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11106                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11107
11108                                 ;;
11109                         esac
11110                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11111                         ;;
11112                 esac
11113                 ;;
11114         *)
11115                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11116                 ;;
11117         esac
11118         ;;
11119 yes)
11120         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11121
11122         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11123
11124         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11125                 && test -z "${cf_tst_cflags}" \
11126                 && cf_fix_cppflags=no
11127         ;;
11128 esac
11129 done
11130
11131 if test -n "$cf_new_cflags" ; then
11132
11133         CFLAGS="$CFLAGS $cf_new_cflags"
11134 fi
11135
11136 if test -n "$cf_new_cppflags" ; then
11137
11138         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11139 fi
11140
11141 if test -n "$cf_new_extra_cppflags" ; then
11142
11143         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11144 fi
11145
11146 ################################################################################
11147
11148 if test x"$enable_pc_files" = xyes ; then \
11149 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
11150 MAKE_PC_FILES=
11151 else
11152 MAKE_PC_FILES="#"
11153 fi
11154
11155 ################################################################################
11156
11157 TEST_ARG2=
11158
11159 TEST_LIBS2=
11160
11161 NCURSES_SHLIB2="sh -c"
11162
11163 ADA_SUBDIRS="gen src"
11164 if test "x$cf_with_tests" != "xno" ; then
11165         ADA_SUBDIRS="$ADA_SUBDIRS samples"
11166 fi
11167 for cf_dir in $ADA_SUBDIRS
11168 do
11169         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
11170 done
11171
11172 NCURSES_TREE="#"
11173
11174 EXTERNAL_TREE=
11175
11176 ac_config_files="$ac_config_files $SUB_MAKEFILES Makefile"
11177 ac_config_commands="$ac_config_commands default"
11178 cat >confcache <<\_ACEOF
11179 # This file is a shell script that caches the results of configure
11180 # tests run on this system so they can be shared between configure
11181 # scripts and configure runs, see configure's option --config-cache.
11182 # It is not useful on other systems.  If it contains results you don't
11183 # want to keep, you may remove or edit it.
11184 #
11185 # config.status only pays attention to the cache file if you give it
11186 # the --recheck option to rerun configure.
11187 #
11188 # `ac_cv_env_foo' variables (set or unset) will be overriden when
11189 # loading this file, other *unset* `ac_cv_foo' will be assigned the
11190 # following values.
11191
11192 _ACEOF
11193
11194 # The following way of writing the cache mishandles newlines in values,
11195 # but we know of no workaround that is simple, portable, and efficient.
11196 # So, don't put newlines in cache variables' values.
11197 # Ultrix sh set writes to stderr and can't be redirected directly,
11198 # and sets the high bit in the cache file unless we assign to the vars.
11199 {
11200   (set) 2>&1 |
11201     case `(ac_space=' '; set | grep ac_space) 2>&1` in
11202     *ac_space=\ *)
11203       # `set' does not quote correctly, so add quotes (double-quote
11204       # substitution turns \\\\ into \\, and sed turns \\ into \).
11205       sed -n \
11206         "s/'/'\\\\''/g;
11207           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
11208       ;;
11209     *)
11210       # `set' quotes correctly as required by POSIX, so do not add quotes.
11211       sed -n \
11212         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
11213       ;;
11214     esac;
11215 } |
11216   sed '
11217      t clear
11218      : clear
11219      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
11220      t end
11221      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
11222      : end' >>confcache
11223 if cmp -s $cache_file confcache; then :; else
11224   if test -w $cache_file; then
11225     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
11226     cat confcache >$cache_file
11227   else
11228     echo "not updating unwritable cache $cache_file"
11229   fi
11230 fi
11231 rm -f confcache
11232
11233 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11234 # Let make expand exec_prefix.
11235 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11236
11237 # VPATH may cause trouble with some makes, so we remove $(srcdir),
11238 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
11239 # trailing colons and then remove the whole line if VPATH becomes empty
11240 # (actually we leave an empty line to preserve line numbers).
11241 if test "x$srcdir" = x.; then
11242   ac_vpsub='/^[         ]*VPATH[        ]*=/{
11243 s/:*\$(srcdir):*/:/;
11244 s/:*\${srcdir}:*/:/;
11245 s/:*@srcdir@:*/:/;
11246 s/^\([^=]*=[    ]*\):*/\1/;
11247 s/:*$//;
11248 s/^[^=]*=[      ]*$//;
11249 }'
11250 fi
11251
11252 DEFS=-DHAVE_CONFIG_H
11253
11254 : ${CONFIG_STATUS=./config.status}
11255 ac_clean_files_save=$ac_clean_files
11256 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
11257 { echo "$as_me:11257: creating $CONFIG_STATUS" >&5
11258 echo "$as_me: creating $CONFIG_STATUS" >&6;}
11259 cat >$CONFIG_STATUS <<_ACEOF
11260 #! $SHELL
11261 # Generated automatically by configure.
11262 # Run this file to recreate the current configuration.
11263 # Compiler output produced by configure, useful for debugging
11264 # configure, is in config.log if it exists.
11265
11266 debug=false
11267 SHELL=\${CONFIG_SHELL-$SHELL}
11268 ac_cs_invocation="\$0 \$@"
11269
11270 _ACEOF
11271
11272 cat >>$CONFIG_STATUS <<\_ACEOF
11273 # Be Bourne compatible
11274 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
11275   emulate sh
11276   NULLCMD=:
11277 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
11278   set -o posix
11279 fi
11280
11281 # Name of the executable.
11282 as_me=`echo "$0" |sed 's,.*[\\/],,'`
11283
11284 if expr a : '\(a\)' >/dev/null 2>&1; then
11285   as_expr=expr
11286 else
11287   as_expr=false
11288 fi
11289
11290 rm -f conf$$ conf$$.exe conf$$.file
11291 echo >conf$$.file
11292 if ln -s conf$$.file conf$$ 2>/dev/null; then
11293   # We could just check for DJGPP; but this test a) works b) is more generic
11294   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
11295   if test -f conf$$.exe; then
11296     # Don't use ln at all; we don't have any links
11297     as_ln_s='cp -p'
11298   else
11299     as_ln_s='ln -s'
11300   fi
11301 elif ln conf$$.file conf$$ 2>/dev/null; then
11302   as_ln_s=ln
11303 else
11304   as_ln_s='cp -p'
11305 fi
11306 rm -f conf$$ conf$$.exe conf$$.file
11307
11308 as_executable_p="test -f"
11309
11310 # Support unset when possible.
11311 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
11312   as_unset=unset
11313 else
11314   as_unset=false
11315 fi
11316
11317 # NLS nuisances.
11318 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
11319 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
11320 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
11321 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
11322 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
11323 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
11324 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
11325 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
11326
11327 # IFS
11328 # We need space, tab and new line, in precisely that order.
11329 as_nl='
11330 '
11331 IFS="   $as_nl"
11332
11333 # CDPATH.
11334 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
11335
11336 exec 6>&1
11337
11338 _ACEOF
11339
11340 # Files that config.status was made for.
11341 if test -n "$ac_config_files"; then
11342   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
11343 fi
11344
11345 if test -n "$ac_config_headers"; then
11346   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
11347 fi
11348
11349 if test -n "$ac_config_links"; then
11350   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
11351 fi
11352
11353 if test -n "$ac_config_commands"; then
11354   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
11355 fi
11356
11357 cat >>$CONFIG_STATUS <<\EOF
11358
11359 ac_cs_usage="\
11360 \`$as_me' instantiates files from templates according to the
11361 current configuration.
11362
11363 Usage: $0 [OPTIONS] [FILE]...
11364
11365   -h, --help       print this help, then exit
11366   -V, --version    print version number, then exit
11367   -d, --debug      don't remove temporary files
11368       --recheck    update $as_me by reconfiguring in the same conditions
11369   --file=FILE[:TEMPLATE]
11370                    instantiate the configuration file FILE
11371   --header=FILE[:TEMPLATE]
11372                    instantiate the configuration header FILE
11373
11374 Configuration files:
11375 $config_files
11376
11377 Configuration headers:
11378 $config_headers
11379
11380 Configuration commands:
11381 $config_commands
11382
11383 Report bugs to <bug-autoconf@gnu.org>."
11384 EOF
11385
11386 cat >>$CONFIG_STATUS <<EOF
11387 ac_cs_version="\\
11388 config.status
11389 configured by $0, generated by GNU Autoconf 2.52.20100814,
11390   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
11391
11392 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
11393 Free Software Foundation, Inc.
11394 This config.status script is free software; the Free Software Foundation
11395 gives unlimited permission to copy, distribute and modify it."
11396 srcdir=$srcdir
11397 INSTALL="$INSTALL"
11398 EOF
11399
11400 cat >>$CONFIG_STATUS <<\EOF
11401 # If no file are specified by the user, then we need to provide default
11402 # value.  By we need to know if files were specified by the user.
11403 ac_need_defaults=:
11404 while test $# != 0
11405 do
11406   case $1 in
11407   --*=*)
11408     ac_option=`expr "x$1" : 'x\([^=]*\)='`
11409     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
11410     shift
11411     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
11412     shift
11413     ;;
11414   -*);;
11415   *) # This is not an option, so the user has probably given explicit
11416      # arguments.
11417      ac_need_defaults=false;;
11418   esac
11419
11420   case $1 in
11421   # Handling of the options.
11422 EOF
11423 cat >>$CONFIG_STATUS <<EOF
11424   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11425     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
11426     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
11427 EOF
11428 cat >>$CONFIG_STATUS <<\EOF
11429   --version | --vers* | -V )
11430     echo "$ac_cs_version"; exit 0 ;;
11431   --he | --h)
11432     # Conflict between --help and --header
11433     { { echo "$as_me:11433: error: ambiguous option: $1
11434 Try \`$0 --help' for more information." >&5
11435 echo "$as_me: error: ambiguous option: $1
11436 Try \`$0 --help' for more information." >&2;}
11437    { (exit 1); exit 1; }; };;
11438   --help | --hel | -h )
11439     echo "$ac_cs_usage"; exit 0 ;;
11440   --debug | --d* | -d )
11441     debug=: ;;
11442   --file | --fil | --fi | --f )
11443     shift
11444     CONFIG_FILES="$CONFIG_FILES $1"
11445     ac_need_defaults=false;;
11446   --header | --heade | --head | --hea )
11447     shift
11448     CONFIG_HEADERS="$CONFIG_HEADERS $1"
11449     ac_need_defaults=false;;
11450
11451   # This is an error.
11452   -*) { { echo "$as_me:11452: error: unrecognized option: $1
11453 Try \`$0 --help' for more information." >&5
11454 echo "$as_me: error: unrecognized option: $1
11455 Try \`$0 --help' for more information." >&2;}
11456    { (exit 1); exit 1; }; } ;;
11457
11458   *) ac_config_targets="$ac_config_targets $1" ;;
11459
11460   esac
11461   shift
11462 done
11463
11464 exec 5>>config.log
11465 cat >&5 << _ACEOF
11466
11467 ## ----------------------- ##
11468 ## Running config.status.  ##
11469 ## ----------------------- ##
11470
11471 This file was extended by $as_me 2.52.20100814, executed with
11472   CONFIG_FILES    = $CONFIG_FILES
11473   CONFIG_HEADERS  = $CONFIG_HEADERS
11474   CONFIG_LINKS    = $CONFIG_LINKS
11475   CONFIG_COMMANDS = $CONFIG_COMMANDS
11476   > $ac_cs_invocation
11477 on `(hostname || uname -n) 2>/dev/null | sed 1q`
11478
11479 _ACEOF
11480 EOF
11481
11482 cat >>$CONFIG_STATUS <<EOF
11483 #
11484 # INIT-COMMANDS section.
11485 #
11486
11487 ### Special initialization commands, used to pass information from the
11488 ### configuration-run into config.status
11489
11490 AWK="$AWK"
11491 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
11492 DFT_LWR_MODEL="$DFT_LWR_MODEL"
11493 ECHO_LINK="$ECHO_LINK"
11494 LIB_NAME="$LIB_NAME"
11495 LIB_SUFFIX="$LIB_SUFFIX"
11496 LN_S="$LN_S"
11497 NCURSES_MAJOR="$NCURSES_MAJOR"
11498 NCURSES_MINOR="$NCURSES_MINOR"
11499 NCURSES_PATCH="$NCURSES_PATCH"
11500 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
11501 cf_cv_abi_version="$cf_cv_abi_version"
11502 cf_cv_rel_version="$cf_cv_rel_version"
11503 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
11504 cf_cv_shared_soname='$cf_cv_shared_soname'
11505 cf_cv_shlib_version="$cf_cv_shlib_version"
11506 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
11507 cf_cv_system_name="$cf_cv_system_name"
11508 host="$host"
11509 target="$target"
11510
11511 EOF
11512
11513 cat >>$CONFIG_STATUS <<\EOF
11514 for ac_config_target in $ac_config_targets
11515 do
11516   case "$ac_config_target" in
11517   # Handling of arguments.
11518   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
11519   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
11520   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
11521   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
11522   *) { { echo "$as_me:11522: error: invalid argument: $ac_config_target" >&5
11523 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
11524    { (exit 1); exit 1; }; };;
11525   esac
11526 done
11527
11528 # If the user did not use the arguments to specify the items to instantiate,
11529 # then the envvar interface is used.  Set only those that are not.
11530 # We use the long form for the default assignment because of an extremely
11531 # bizarre bug on SunOS 4.1.3.
11532 if $ac_need_defaults; then
11533   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
11534   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
11535   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
11536 fi
11537
11538 # Create a temporary directory, and hook for its removal unless debugging.
11539 $debug ||
11540 {
11541   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
11542   trap '{ (exit 1); exit 1; }' 1 2 13 15
11543 }
11544
11545 # Create a (secure) tmp directory for tmp files.
11546 : ${TMPDIR=/tmp}
11547 {
11548   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
11549   test -n "$tmp" && test -d "$tmp"
11550 }  ||
11551 {
11552   tmp=$TMPDIR/cs$$-$RANDOM
11553   (umask 077 && mkdir $tmp)
11554 } ||
11555 {
11556    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
11557    { (exit 1); exit 1; }
11558 }
11559
11560 EOF
11561
11562 cat >>$CONFIG_STATUS <<EOF
11563
11564 #
11565 # CONFIG_FILES section.
11566 #
11567
11568 # No need to generate the scripts if there are no CONFIG_FILES.
11569 # This happens for instance when ./config.status config.h
11570 if test -n "\$CONFIG_FILES"; then
11571   # Protect against being on the right side of a sed subst in config.status.
11572   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
11573    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
11574 s,@SHELL@,$SHELL,;t t
11575 s,@exec_prefix@,$exec_prefix,;t t
11576 s,@prefix@,$prefix,;t t
11577 s,@program_transform_name@,$program_transform_name,;t t
11578 s,@bindir@,$bindir,;t t
11579 s,@sbindir@,$sbindir,;t t
11580 s,@libexecdir@,$libexecdir,;t t
11581 s,@datadir@,$datadir,;t t
11582 s,@sysconfdir@,$sysconfdir,;t t
11583 s,@sharedstatedir@,$sharedstatedir,;t t
11584 s,@localstatedir@,$localstatedir,;t t
11585 s,@libdir@,$libdir,;t t
11586 s,@includedir@,$includedir,;t t
11587 s,@oldincludedir@,$oldincludedir,;t t
11588 s,@infodir@,$infodir,;t t
11589 s,@mandir@,$mandir,;t t
11590 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
11591 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
11592 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
11593 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
11594 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
11595 s,@build_alias@,$build_alias,;t t
11596 s,@host_alias@,$host_alias,;t t
11597 s,@target_alias@,$target_alias,;t t
11598 s,@ECHO_C@,$ECHO_C,;t t
11599 s,@ECHO_N@,$ECHO_N,;t t
11600 s,@ECHO_T@,$ECHO_T,;t t
11601 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
11602 s,@DEFS@,$DEFS,;t t
11603 s,@LIBS@,$LIBS,;t t
11604 s,@top_builddir@,$top_builddir,;t t
11605 s,@build@,$build,;t t
11606 s,@build_cpu@,$build_cpu,;t t
11607 s,@build_vendor@,$build_vendor,;t t
11608 s,@build_os@,$build_os,;t t
11609 s,@host@,$host,;t t
11610 s,@host_cpu@,$host_cpu,;t t
11611 s,@host_vendor@,$host_vendor,;t t
11612 s,@host_os@,$host_os,;t t
11613 s,@target@,$target,;t t
11614 s,@target_cpu@,$target_cpu,;t t
11615 s,@target_vendor@,$target_vendor,;t t
11616 s,@target_os@,$target_os,;t t
11617 s,@CC@,$CC,;t t
11618 s,@CFLAGS@,$CFLAGS,;t t
11619 s,@LDFLAGS@,$LDFLAGS,;t t
11620 s,@CPPFLAGS@,$CPPFLAGS,;t t
11621 s,@ac_ct_CC@,$ac_ct_CC,;t t
11622 s,@EXEEXT@,$EXEEXT,;t t
11623 s,@OBJEXT@,$OBJEXT,;t t
11624 s,@CPP@,$CPP,;t t
11625 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
11626 s,@PROG_EXT@,$PROG_EXT,;t t
11627 s,@AWK@,$AWK,;t t
11628 s,@EGREP@,$EGREP,;t t
11629 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
11630 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
11631 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
11632 s,@LN_S@,$LN_S,;t t
11633 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
11634 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
11635 s,@SET_MAKE@,$SET_MAKE,;t t
11636 s,@CTAGS@,$CTAGS,;t t
11637 s,@ETAGS@,$ETAGS,;t t
11638 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
11639 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
11640 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
11641 s,@RANLIB@,$RANLIB,;t t
11642 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
11643 s,@LD@,$LD,;t t
11644 s,@ac_ct_LD@,$ac_ct_LD,;t t
11645 s,@AR@,$AR,;t t
11646 s,@ac_ct_AR@,$ac_ct_AR,;t t
11647 s,@ARFLAGS@,$ARFLAGS,;t t
11648 s,@DESTDIR@,$DESTDIR,;t t
11649 s,@BUILD_CC@,$BUILD_CC,;t t
11650 s,@BUILD_CPP@,$BUILD_CPP,;t t
11651 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
11652 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
11653 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
11654 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
11655 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
11656 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
11657 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
11658 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
11659 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
11660 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
11661 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
11662 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
11663 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
11664 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
11665 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
11666 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
11667 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
11668 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
11669 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
11670 s,@CC_G_OPT@,$CC_G_OPT,;t t
11671 s,@LD_MODEL@,$LD_MODEL,;t t
11672 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
11673 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
11674 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
11675 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
11676 s,@LINK_PROGS@,$LINK_PROGS,;t t
11677 s,@LINK_TESTS@,$LINK_TESTS,;t t
11678 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
11679 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
11680 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
11681 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
11682 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
11683 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
11684 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
11685 s,@PTHREAD@,$PTHREAD,;t t
11686 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
11687 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
11688 s,@ECHO_LINK@,$ECHO_LINK,;t t
11689 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
11690 s,@ADA_TRACE@,$ADA_TRACE,;t t
11691 s,@gnat_exists@,$gnat_exists,;t t
11692 s,@cf_compile_generics@,$cf_compile_generics,;t t
11693 s,@cf_generic_objects@,$cf_generic_objects,;t t
11694 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
11695 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
11696 s,@M4_exists@,$M4_exists,;t t
11697 s,@cf_ada_make@,$cf_ada_make,;t t
11698 s,@ADAFLAGS@,$ADAFLAGS,;t t
11699 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
11700 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
11701 s,@cf_ada_package@,$cf_ada_package,;t t
11702 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
11703 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
11704 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
11705 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
11706 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
11707 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
11708 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
11709 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
11710 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
11711 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
11712 s,@cross_compiling@,$cross_compiling,;t t
11713 s,@TEST_ARG2@,$TEST_ARG2,;t t
11714 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
11715 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
11716 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
11717 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
11718 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
11719 CEOF
11720
11721 EOF
11722
11723   cat >>$CONFIG_STATUS <<\EOF
11724   # Split the substitutions into bite-sized pieces for seds with
11725   # small command number limits, like on Digital OSF/1 and HP-UX.
11726   ac_max_sed_lines=48
11727   ac_sed_frag=1 # Number of current file.
11728   ac_beg=1 # First line for current file.
11729   ac_end=$ac_max_sed_lines # Line after last line for current file.
11730   ac_more_lines=:
11731   ac_sed_cmds=
11732   while $ac_more_lines; do
11733     if test $ac_beg -gt 1; then
11734       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
11735     else
11736       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
11737     fi
11738     if test ! -s $tmp/subs.frag; then
11739       ac_more_lines=false
11740     else
11741       # The purpose of the label and of the branching condition is to
11742       # speed up the sed processing (if there are no `@' at all, there
11743       # is no need to browse any of the substitutions).
11744       # These are the two extra sed commands mentioned above.
11745       (echo ':t
11746   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
11747       if test -z "$ac_sed_cmds"; then
11748         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
11749       else
11750         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
11751       fi
11752       ac_sed_frag=`expr $ac_sed_frag + 1`
11753       ac_beg=$ac_end
11754       ac_end=`expr $ac_end + $ac_max_sed_lines`
11755     fi
11756   done
11757   if test -z "$ac_sed_cmds"; then
11758     ac_sed_cmds=cat
11759   fi
11760 fi # test -n "$CONFIG_FILES"
11761
11762 EOF
11763 cat >>$CONFIG_STATUS <<\EOF
11764 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
11765   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11766   case $ac_file in
11767   - | *:- | *:-:* ) # input from stdin
11768         cat >$tmp/stdin
11769         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
11770         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
11771   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
11772         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
11773   * )   ac_file_in=$ac_file.in ;;
11774   esac
11775
11776   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
11777   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11778          X"$ac_file" : 'X\(//\)[^/]' \| \
11779          X"$ac_file" : 'X\(//\)$' \| \
11780          X"$ac_file" : 'X\(/\)' \| \
11781          .     : '\(.\)' 2>/dev/null ||
11782 echo X"$ac_file" |
11783     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
11784           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
11785           /^X\(\/\/\)$/{ s//\1/; q; }
11786           /^X\(\/\).*/{ s//\1/; q; }
11787           s/.*/./; q'`
11788   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11789     { case "$ac_dir" in
11790   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
11791   *)                      as_incr_dir=.;;
11792 esac
11793 as_dummy="$ac_dir"
11794 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
11795   case $as_mkdir_dir in
11796     # Skip DOS drivespec
11797     ?:) as_incr_dir=$as_mkdir_dir ;;
11798     *)
11799       as_incr_dir=$as_incr_dir/$as_mkdir_dir
11800       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
11801     ;;
11802   esac
11803 done; }
11804
11805     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
11806     # A "../" for each directory in $ac_dir_suffix.
11807     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
11808   else
11809     ac_dir_suffix= ac_dots=
11810   fi
11811
11812   case $srcdir in
11813   .)  ac_srcdir=.
11814       if test -z "$ac_dots"; then
11815          ac_top_srcdir=.
11816       else
11817          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
11818       fi ;;
11819   [\\/]* | ?:[\\/]* )
11820       ac_srcdir=$srcdir$ac_dir_suffix;
11821       ac_top_srcdir=$srcdir ;;
11822   *) # Relative path.
11823     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
11824     ac_top_srcdir=$ac_dots$srcdir ;;
11825   esac
11826
11827   case $INSTALL in
11828   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
11829   *) ac_INSTALL=$ac_dots$INSTALL ;;
11830   esac
11831
11832   if test x"$ac_file" != x-; then
11833     { echo "$as_me:11833: creating $ac_file" >&5
11834 echo "$as_me: creating $ac_file" >&6;}
11835     rm -f "$ac_file"
11836   fi
11837   # Let's still pretend it is `configure' which instantiates (i.e., don't
11838   # use $as_me), people would be surprised to read:
11839   #    /* config.h.  Generated automatically by config.status.  */
11840   configure_input="Generated automatically from `echo $ac_file_in |
11841                                                  sed 's,.*/,,'` by configure."
11842
11843   # First look for the input files in the build tree, otherwise in the
11844   # src tree.
11845   ac_file_inputs=`IFS=:
11846     for f in $ac_file_in; do
11847       case $f in
11848       -) echo $tmp/stdin ;;
11849       [\\/$]*)
11850          # Absolute (can't be DOS-style, as IFS=:)
11851          test -f "$f" || { { echo "$as_me:11851: error: cannot find input file: $f" >&5
11852 echo "$as_me: error: cannot find input file: $f" >&2;}
11853    { (exit 1); exit 1; }; }
11854          echo $f;;
11855       *) # Relative
11856          if test -f "$f"; then
11857            # Build tree
11858            echo $f
11859          elif test -f "$srcdir/$f"; then
11860            # Source tree
11861            echo $srcdir/$f
11862          else
11863            # /dev/null tree
11864            { { echo "$as_me:11864: error: cannot find input file: $f" >&5
11865 echo "$as_me: error: cannot find input file: $f" >&2;}
11866    { (exit 1); exit 1; }; }
11867          fi;;
11868       esac
11869     done` || { (exit 1); exit 1; }
11870 EOF
11871 cat >>$CONFIG_STATUS <<EOF
11872   sed "$ac_vpsub
11873 $extrasub
11874 EOF
11875 cat >>$CONFIG_STATUS <<\EOF
11876 :t
11877 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
11878 s,@configure_input@,$configure_input,;t t
11879 s,@srcdir@,$ac_srcdir,;t t
11880 s,@top_srcdir@,$ac_top_srcdir,;t t
11881 s,@INSTALL@,$ac_INSTALL,;t t
11882 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
11883   rm -f $tmp/stdin
11884   if test x"$ac_file" != x-; then
11885     mv $tmp/out $ac_file
11886   else
11887     cat $tmp/out
11888     rm -f $tmp/out
11889   fi
11890
11891 done
11892 EOF
11893 cat >>$CONFIG_STATUS <<\EOF
11894
11895 #
11896 # CONFIG_HEADER section.
11897 #
11898
11899 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11900 # NAME is the cpp macro being defined and VALUE is the value it is being given.
11901 #
11902 # ac_d sets the value in "#define NAME VALUE" lines.
11903 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
11904 ac_dB='[        ].*$,\1#\2'
11905 ac_dC=' '
11906 ac_dD=',;t'
11907 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11908 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11909 ac_iB='\([      ]\),\1#\2define\3'
11910 ac_iC=' '
11911 ac_iD='\4,;t'
11912 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11913 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11914 ac_uB='$,\1#\2define\3'
11915 ac_uC=' '
11916 ac_uD=',;t'
11917
11918 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
11919   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11920   case $ac_file in
11921   - | *:- | *:-:* ) # input from stdin
11922         cat >$tmp/stdin
11923         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
11924         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
11925   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
11926         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
11927   * )   ac_file_in=$ac_file.in ;;
11928   esac
11929
11930   test x"$ac_file" != x- && { echo "$as_me:11930: creating $ac_file" >&5
11931 echo "$as_me: creating $ac_file" >&6;}
11932
11933   # First look for the input files in the build tree, otherwise in the
11934   # src tree.
11935   ac_file_inputs=`IFS=:
11936     for f in $ac_file_in; do
11937       case $f in
11938       -) echo $tmp/stdin ;;
11939       [\\/$]*)
11940          # Absolute (can't be DOS-style, as IFS=:)
11941          test -f "$f" || { { echo "$as_me:11941: error: cannot find input file: $f" >&5
11942 echo "$as_me: error: cannot find input file: $f" >&2;}
11943    { (exit 1); exit 1; }; }
11944          echo $f;;
11945       *) # Relative
11946          if test -f "$f"; then
11947            # Build tree
11948            echo $f
11949          elif test -f "$srcdir/$f"; then
11950            # Source tree
11951            echo $srcdir/$f
11952          else
11953            # /dev/null tree
11954            { { echo "$as_me:11954: error: cannot find input file: $f" >&5
11955 echo "$as_me: error: cannot find input file: $f" >&2;}
11956    { (exit 1); exit 1; }; }
11957          fi;;
11958       esac
11959     done` || { (exit 1); exit 1; }
11960   # Remove the trailing spaces.
11961   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
11962
11963 EOF
11964
11965 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
11966 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
11967 # be either 'cat' or 'sort'.
11968 cat confdefs.h | uniq >conftest.vals
11969
11970 # Break up conftest.vals because some shells have a limit on
11971 # the size of here documents, and old seds have small limits too.
11972
11973 rm -f conftest.tail
11974 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
11975 while grep . conftest.vals >/dev/null
11976 do
11977   # Write chunks of a limited-size here document to conftest.frag.
11978   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
11979   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
11980   echo 'CEOF' >> $CONFIG_STATUS
11981   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11982   rm -f conftest.vals
11983   mv conftest.tail conftest.vals
11984 done
11985 rm -f conftest.vals
11986
11987 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
11988 # marker @DEFS@.
11989 echo '  cat >> conftest.edit <<CEOF
11990 /@DEFS@/r conftest.frag
11991 /@DEFS@/d
11992 CEOF
11993 sed -f conftest.edit $tmp/in > $tmp/out
11994 rm -f $tmp/in
11995 mv $tmp/out $tmp/in
11996 rm -f conftest.edit conftest.frag
11997 ' >> $CONFIG_STATUS
11998
11999 cat >>$CONFIG_STATUS <<\EOF
12000   # Let's still pretend it is `configure' which instantiates (i.e., don't
12001   # use $as_me), people would be surprised to read:
12002   #    /* config.h.  Generated automatically by config.status.  */
12003   if test x"$ac_file" = x-; then
12004     echo "/* Generated automatically by configure.  */" >$tmp/config.h
12005   else
12006     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
12007   fi
12008   cat $tmp/in >>$tmp/config.h
12009   rm -f $tmp/in
12010   if test x"$ac_file" != x-; then
12011     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
12012       { echo "$as_me:12012: $ac_file is unchanged" >&5
12013 echo "$as_me: $ac_file is unchanged" >&6;}
12014     else
12015       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12016          X"$ac_file" : 'X\(//\)[^/]' \| \
12017          X"$ac_file" : 'X\(//\)$' \| \
12018          X"$ac_file" : 'X\(/\)' \| \
12019          .     : '\(.\)' 2>/dev/null ||
12020 echo X"$ac_file" |
12021     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12022           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12023           /^X\(\/\/\)$/{ s//\1/; q; }
12024           /^X\(\/\).*/{ s//\1/; q; }
12025           s/.*/./; q'`
12026       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12027         { case "$ac_dir" in
12028   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
12029   *)                      as_incr_dir=.;;
12030 esac
12031 as_dummy="$ac_dir"
12032 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
12033   case $as_mkdir_dir in
12034     # Skip DOS drivespec
12035     ?:) as_incr_dir=$as_mkdir_dir ;;
12036     *)
12037       as_incr_dir=$as_incr_dir/$as_mkdir_dir
12038       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
12039     ;;
12040   esac
12041 done; }
12042
12043       fi
12044       rm -f $ac_file
12045       mv $tmp/config.h $ac_file
12046     fi
12047   else
12048     cat $tmp/config.h
12049     rm -f $tmp/config.h
12050   fi
12051 done
12052 EOF
12053 cat >>$CONFIG_STATUS <<\EOF
12054 #
12055 # CONFIG_COMMANDS section.
12056 #
12057 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
12058   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
12059   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
12060
12061   case $ac_dest in
12062     default )
12063 if test -z "$USE_OLD_MAKERULES" ; then
12064         $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
12065 fi
12066  ;;
12067   esac
12068 done
12069 EOF
12070
12071 cat >>$CONFIG_STATUS <<\EOF
12072
12073 { (exit 0); exit 0; }
12074 EOF
12075 chmod +x $CONFIG_STATUS
12076 ac_clean_files=$ac_clean_files_save
12077
12078 # configure is writing to config.log, and then calls config.status.
12079 # config.status does its own redirection, appending to config.log.
12080 # Unfortunately, on DOS this fails, as config.log is still kept open
12081 # by configure, so config.status won't be able to write to it; its
12082 # output is simply discarded.  So we exec the FD to /dev/null,
12083 # effectively closing config.log, so it can be properly (re)opened and
12084 # appended to by config.status.  When coming back to configure, we
12085 # need to make the FD available again.
12086 if test "$no_create" != yes; then
12087   ac_cs_success=:
12088   exec 5>/dev/null
12089   $SHELL $CONFIG_STATUS || ac_cs_success=false
12090   exec 5>>config.log
12091   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
12092   # would make configure fail if this is the last instruction.
12093   $ac_cs_success || { (exit 1); exit 1; }
12094 fi
12095 ${MAKE-make} preinstall